User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Python section within the Software Development category of DaniWeb, a massive community of 427,378 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,042 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Python advertiser: Programming Forums
Views: 662 | Replies: 7
Reply
Join Date: Feb 2008
Posts: 12
Reputation: nirmalarasu is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
nirmalarasu nirmalarasu is offline Offline
Newbie Poster

Python support in Linux

  #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
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Dec 2006
Posts: 450
Reputation: woooee is on a distinguished road 
Rep Power: 2
Solved Threads: 62
woooee woooee is offline Offline
Posting Pro in Training

Re: Python support in Linux

  #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 12:45 pm.
Reply With Quote  
Join Date: Feb 2008
Posts: 12
Reputation: nirmalarasu is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
nirmalarasu nirmalarasu is offline Offline
Newbie Poster

Re: Python support in Linux

  #3  
Feb 8th, 2008
Thanks
i wanted to know whether python installed as default package in all flavors of linux.
Reply With Quote  
Join Date: Dec 2006
Posts: 450
Reputation: woooee is on a distinguished road 
Rep Power: 2
Solved Threads: 62
woooee woooee is offline Offline
Posting Pro in Training

Re: Python support in Linux

  #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  
Join Date: Jan 2008
Posts: 55
Reputation: Walkere is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 5
Walkere Walkere is offline Offline
Junior Poster in Training

Re: Python support in Linux

  #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  
Join Date: Oct 2007
Location: Cherry Hill, NJ
Posts: 1,876
Reputation: Duoas is a splendid one to behold Duoas is a splendid one to behold Duoas is a splendid one to behold Duoas is a splendid one to behold Duoas is a splendid one to behold Duoas is a splendid one to behold Duoas is a splendid one to behold 
Rep Power: 11
Solved Threads: 193
Featured Poster
Duoas's Avatar
Duoas Duoas is offline Offline
Posting Virtuoso

Re: Python support in Linux

  #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 10:39 pm.
Reply With Quote  
Join Date: Feb 2008
Posts: 12
Reputation: nirmalarasu is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
nirmalarasu nirmalarasu is offline Offline
Newbie Poster

Re: Python support in Linux

  #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  
Join Date: Oct 2007
Location: Cherry Hill, NJ
Posts: 1,876
Reputation: Duoas is a splendid one to behold Duoas is a splendid one to behold Duoas is a splendid one to behold Duoas is a splendid one to behold Duoas is a splendid one to behold Duoas is a splendid one to behold Duoas is a splendid one to behold 
Rep Power: 11
Solved Threads: 193
Featured Poster
Duoas's Avatar
Duoas Duoas is offline Offline
Posting Virtuoso

Re: Python support in Linux

  #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  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb Python Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the Python Forum

All times are GMT -4. The time now is 4:01 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC