ow to start webpy command line and exit the terminal without
interrupting
the program ?
I found this solution that I wish to share, but I do not know if any
other.
If you work with lighttpd and use it with proxy, webpy behind, it is
possible
that you need to close the terminal. Unfortunately the closure of the
terminal
would stop webpy if it is started with "python code.py" command line.
The command "screen" on Linux allows you to run lengthy processes that
normally
needs to be started and stopped manually. screen is an easy way to
allow
processes to continue running after the session is terminated or if
you lose
connection ( screen will save your spot).
First, you must run the command by appointing a session:
screen -S project_name
exemple :
screen -S webpy-server
Session webpy-server may be recalled later.
Now you are running in screen.
The new terminal session appears blank. Just type the desired command:
python /home/mylogin/webpy/web/code.py
This starts the server webpy in the new session.
If you want to disconnect from this screen and leave your processes
running hit
ctrl-a + d
You can close too the terminal or connect yourself to that session
from a
remote terminal (via ssh for exemple).
If you want to reconnect to the session:
screen -r project_name
If you can not remember the name of the project or if you want to list
all projects :
screen -list
Terminal shows for exemple:
13379.toto1 (Detached)
13308.toto2 (Detached)
13356.toto3 (Dead ???)
If you have dead screen ( as in the example above) you can remove
them:
screen -wipe
I do not know if it is a good solution, but for now the only one I
found.
Perhaps you know others?
Best regards,
Boubou.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web.py" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---