PYTHON?
Python is a high-level
programming language interpreted, object-oriented and extensible. It is a
multi-paradigm language variables are not typed, which allows Python to be
versatile, fast and efficient. Precisely because of these characteristics,
it proves useful to scripting.
STRO
GNU / LINUX AND PYTHON
Our goal is to have
access to a Linux device file via browser from any machine connected via LAN
cable (LAN) or wireless (WLAN).
But how?
What we need is a small server to boot from the terminal.
But how?
What we need is a small server to boot from the terminal.
The SimpleHTTPServer, this is the
script name in the directory we will use
/ Usr / lib /
pythonx.y /
is available in all
systems that have installed Python version 2.5 or higher.
Given some element of theory, let’s practice!
Given some element of theory, let’s practice!
LET’S
PRACTICE!
We want to share the
folder “mia_cartella” contained in one of the system.
We initiate the terminal.
Let’s move the folder to be exchanged: Use the command “cd” (change directory).
Let’s move the folder to be exchanged: Use the command “cd” (change directory).
cd Desktop /
mia_cartella
Finally we start the
script. The syntax is:
sudo python-m
SimpleHTTPServer 80
where 80 is the port
on which to listen.
For more ports of 1024 can omit “sudo”.
This is what will appear: The server starts at localhost on port choice.
To end the session just press Ctrl + C
For more ports of 1024 can omit “sudo”.
This is what will appear: The server starts at localhost on port choice.
To end the session just press Ctrl + C
Now just find the IP
address of the pc to share the folder with one of the many methods, I suggest
sites like http://www.ip-adress.com/ .
Point your Web browser connected to the device (W) LAN from which you access
Point your Web browser connected to the device (W) LAN from which you access
http://ipaddress:port/
No comments:
Post a Comment