Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
Pages: (2) </ [1] 2 >/

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: Python, How to get it to work?< Next Oldest | Next Newest >
cooler Offline





Group: Members
Posts: 7
Joined: Jan. 2005
Posted: Jan. 20 2005,03:18 QUOTE

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!
Back to top
Profile PM 
ke4nt1 Offline





Group: Members
Posts: 2329
Joined: Oct. 2003
Posted: Jan. 20 2005,04:14 QUOTE

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
Back to top
Profile PM 
clacker Offline





Group: Members
Posts: 570
Joined: June 2004
Posted: Jan. 25 2005,13:07 QUOTE

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.
Back to top
Profile PM 
clivesay Offline





Group: Guests
Posts: 935
Joined: Dec. 2003
Posted: Jan. 25 2005,13:56 QUOTE

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

Chris
Back to top
Profile PM MSN YIM 
clacker Offline





Group: Members
Posts: 570
Joined: June 2004
Posted: Jan. 25 2005,14:08 QUOTE

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.
Back to top
Profile PM 
7 replies since Jan. 20 2005,03:18 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

Pages: (2) </ [1] 2 >/
reply to topic new topic new poll
Quick Reply: Python

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code