943,721 Members | Top Members by Rank

Ad:
  • Python Discussion Thread
  • Unsolved
  • Views: 1866
  • Python RSS
Feb 8th, 2008
0

Python support in Linux

Expand Post »
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
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
nirmalarasu is offline Offline
12 posts
since Feb 2008
Feb 8th, 2008
0

Re: Python support in Linux

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.
Reputation Points: 741
Solved Threads: 692
Nearly a Posting Maven
woooee is offline Offline
2,305 posts
since Dec 2006
Feb 8th, 2008
0

Re: Python support in Linux

Thanks
i wanted to know whether python installed as default package in all flavors of linux.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
nirmalarasu is offline Offline
12 posts
since Feb 2008
Feb 8th, 2008
0

Re: Python support in Linux

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.
Reputation Points: 741
Solved Threads: 692
Nearly a Posting Maven
woooee is offline Offline
2,305 posts
since Dec 2006
Feb 8th, 2008
0

Re: Python support in Linux

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
Reputation Points: 29
Solved Threads: 5
Junior Poster in Training
Walkere is offline Offline
57 posts
since Jan 2008
Feb 8th, 2008
0

Re: Python support in Linux

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.
Featured Poster
Reputation Points: 1140
Solved Threads: 229
Postaholic
Duoas is offline Offline
2,039 posts
since Oct 2007
Feb 11th, 2008
0

Re: Python support in Linux

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.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
nirmalarasu is offline Offline
12 posts
since Feb 2008
Feb 13th, 2008
0

Re: Python support in Linux

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.
Featured Poster
Reputation Points: 1140
Solved Threads: 229
Postaholic
Duoas is offline Offline
2,039 posts
since Oct 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Python Forum Timeline: Python script to save telnet sesion output in a local file
Next Thread in Python Forum Timeline: Images Not Painting





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC