myDSL Extensions (deprecated) :: Python



Hi!

I was wondering if I go to myDSL repository and grab Python's tar.gz file, would I be able to install it properly? The thing is that it needs a C/C++ compiler to install properly, and I don't think there is one that came with DSL? So, how do I get Python installed and working properly?

Thanks!

The python.tar.gz filename may be fooling you...

This is not a gzipped tar that contains sources,

This file is a completely built and installed python package,
extracted from its install location in a working DSL box,
and retarred to be reinstallable back into the DSL environment..

Once installed , your python files and programs will run as if you
had compiled and installed python from sources,
or apt-get installed it from Debian.

All the files in the repository work in this fashion,
They are click-n-run add-ons for DSL.

73
ke4nt

One thing that I have noticed about the python.tar.gz that might throw you after you get it loaded is that when you open a bash shell and type python, it doesn't start!  There is a menu item to start python under the mydsl menu.  That opens up python fine, but sometimes you want to run a *.py file that's been made executable.  If that's the case then open a bash shell and type:

export PATH=$PATH:/opt/python/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/python/lib


then the system knows were to look for the python files.

Do the export commands need to be added to the python.tar.gz menu item?

Chris

They could be, but an additional menu item might be better.  I've made menu items that look like this and then a bash script:

[exec] (Python bash shell) {rxvt -rv -T "Python Shell" -e /bin/bash --init-file python.script}

python.script:
Code Sample
PS1='\u@\h:\w\$ '
export PATH=$PATH:/opt/python/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/python/lib


I added the PS1= because if you don't, the prompt isn't the same as it normally is.  This will keep a window open that you can work in and any *.py command will know where to look.

Next Page...
original here.