[Tutor] Run a few Python commands from a temporary filesystem when the rootfs is halted
Steven D'Aprano
steve at pearwood.info
Sat Apr 23 02:22:49 CEST 2011
Frederick Grose wrote:
> With Bash, when one needs to halt the current root filesystem, to pivot to a
> new filesystem, one can copy some of the command files and their
> dependencies to a temporary file system and execute from that code base.
>
> Is there a way to accomplish the same within a Python script?
This is way off-topic for a Python tutor list. This is about learning
the Python programming language, not the intricate corners of (I assume)
Linux system administration.
I would imagine that it would be very, very difficult in Python, because
you would need somehow to end the *current* Python process and start up
a *new* Python process running from executables on the new file system,
without manual intervention.
I strongly suggest you take this question to the main Python list,
python at python.org, which is also available as a news group
comp.lang.python, and show the bash code you are trying to duplicate.
There's no guarantee you'll get an answer there either, but it's more
likely than here.
Good luck!
--
Steven
More information about the Tutor
mailing list