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

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.

Thanks
i wanted to know whether python installed as default package in all flavors of 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.

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

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.

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.

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.