Python support in Linux

Please support our Python advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Feb 2008
Posts: 12
Reputation: nirmalarasu is an unknown quantity at this point 
Solved Threads: 0
nirmalarasu nirmalarasu is offline Offline
Newbie Poster

Python support in Linux

 
0
  #1
Feb 8th, 2008
Hi,
I would like to know whether linux installed as default in all flavors of linux (redhat,suse) or in customized linux distributions.

is not so is there any other script to be supported in all linux distributions?

thanks
Reply With Quote Quick reply to this message  
Join Date: Dec 2006
Posts: 1,028
Reputation: woooee is a jewel in the rough woooee is a jewel in the rough woooee is a jewel in the rough 
Solved Threads: 289
woooee woooee is online now Online
Veteran Poster

Re: Python support in Linux

 
0
  #2
Feb 8th, 2008
Key "python" into a terminal. If you get the python prompt (>>>) then you have Python installed. Ctrl-D exits python. Most distros will have it installed in /usr/bin, so you can also check for a /usr/bin/python2.x file.
Last edited by woooee; Feb 8th, 2008 at 1:45 pm.
Reply With Quote Quick reply to this message  
Join Date: Feb 2008
Posts: 12
Reputation: nirmalarasu is an unknown quantity at this point 
Solved Threads: 0
nirmalarasu nirmalarasu is offline Offline
Newbie Poster

Re: Python support in Linux

 
0
  #3
Feb 8th, 2008
Thanks
i wanted to know whether python installed as default package in all flavors of linux.
Reply With Quote Quick reply to this message  
Join Date: Dec 2006
Posts: 1,028
Reputation: woooee is a jewel in the rough woooee is a jewel in the rough woooee is a jewel in the rough 
Solved Threads: 289
woooee woooee is online now Online
Veteran Poster

Re: Python support in Linux

 
0
  #4
Feb 8th, 2008
You will have to find someone who has used all flavors of Linux to get an answer to that. Since that is impossible, you might have to use a bash script to check for a Python installation, and if Python is installed, if would then run the Python program.
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 57
Reputation: Walkere is an unknown quantity at this point 
Solved Threads: 5
Walkere Walkere is offline Offline
Junior Poster in Training

Re: Python support in Linux

 
0
  #5
Feb 8th, 2008
Originally Posted by nirmalarasu View Post
Thanks
i wanted to know whether python installed as default package in all flavors of linux.
Well, then time for you to do a little data collection and research. =)

I'm sporting Ubuntu Gutsy Gibbon, and it came with Python pre-installed (although I had to install the mysqlDB package myself).

- Walkere
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 1,953
Reputation: Duoas has much to be proud of Duoas has much to be proud of Duoas has much to be proud of Duoas has much to be proud of Duoas has much to be proud of Duoas has much to be proud of Duoas has much to be proud of Duoas has much to be proud of 
Solved Threads: 214
Featured Poster
Duoas's Avatar
Duoas Duoas is offline Offline
Posting Virtuoso

Re: Python support in Linux

 
0
  #6
Feb 8th, 2008
The answer is no.

Not even Tcl is installed by default on all flavors of linux. About the only thing you can guarantee is that either /usr/bin/sh or /bin/sh is available. (And on most linuxes it is actually bash.)

You can, of course, make your install and/or start script(s) test for python and complain with a user-friendly "please install python" message if not found.
Last edited by Duoas; Feb 8th, 2008 at 11:39 pm.
Reply With Quote Quick reply to this message  
Join Date: Feb 2008
Posts: 12
Reputation: nirmalarasu is an unknown quantity at this point 
Solved Threads: 0
nirmalarasu nirmalarasu is offline Offline
Newbie Poster

Re: Python support in Linux

 
0
  #7
Feb 11th, 2008
I have found standalone executable kit, "PyInstaller". Using this I have made
linux binary & succesfully executed python script in machine where python is not installed.

If any body found wrong in approach please correct me.
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 1,953
Reputation: Duoas has much to be proud of Duoas has much to be proud of Duoas has much to be proud of Duoas has much to be proud of Duoas has much to be proud of Duoas has much to be proud of Duoas has much to be proud of Duoas has much to be proud of 
Solved Threads: 214
Featured Poster
Duoas's Avatar
Duoas Duoas is offline Offline
Posting Virtuoso

Re: Python support in Linux

 
0
  #8
Feb 13th, 2008
A better approach might be to create a package installer (such as a .deb or .rpm) which lists python as a dependency.

If you plan to support more linux variants than just RedHat and Debian and those that work with their package systems (which are quite a few!), you can roll your own using a program like makeself.

Hope this helps.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC