stupid_idiot
Group: Members
Posts: 344
Joined: Oct. 2006 |
|
Posted: Mar. 05 2008,05:14 |
|
Currently, 'python-2.5.uci' places executables in '/opt/py-25/bin'. If you want to run something in there, you would type "/opt/py-25/bin/someprogram". To avoid typing in that long path, you can do:Code Sample | export PATH=$PATH:/opt/py-25/bin | This will append '/opt/py-25/bin' to your $PATH, so you can just type in 'someprogram'. (To check your $PATH, you can do:Or you could do:This will list all your environment variables including $PATH.)
If you install any custom Python software, such as BitTorrent, the libraries that come with BitTorrent will be installed to '/opt/py-25/site-packages'. Meanwhile, the executables, e.g. bittorrent.py or btdownloadcurses.py will be installed to '/opt/py-25/bin'. (In actual fact, Python installs to '/opt/python-2.5/lib/python/site-packages' and '/opt/python-2.5/bin', but those directories are symlinked to '/opt/py-25/site-packages' and '/opt/py-25/bin' respectively. So, e.g. when Python installs files to '/opt/python-2.5/bin', they end up in '/opt/py-25/bin'. Because '/opt/python-2.5/bin' is symlinked to '/opt/py-25/bin', you can also run /opt/py-25/someprogram by typing in /opt/python-2.5/bin/someprogram. '/opt/py-25' is used as '/opt/python-2.5' is not writeable, because 'python-2.5.uci' is mounted there read-only.) p.s. If you have a file 'foo' that is a symlink, and you want to see what it points to, you can do:or
Re: Backup/restore 1. Add the folder '/opt/py-25' to your '/home/dsl/.filetool.lst' 2. Run DSL's Backup/Restore tool (this can also be performed during shutdown/reboot) and choose to backup. Your '/opt/py-25' directory will be restored on the next reboot. Of course, you will need to load 'python-2.5.uci' again to run Python.
|