Skip to content Skip to sidebar Skip to footer

Export Runnable Program From Python Eclipse Project On Ubuntu

It is my first time to use python, so i doing a simple program with a simple UI. I am using eclipse with PyDev as an IDE. I know in JAVA a to export a runnable program we use .jar

Solution 1:

Easiest way on windows is py2exe. If you're using Mac, check out py2app. If you're in a Linux/Unix environment, I'm a bit less familiar with how to create a standalone, but a simple shell script like

python script_name.py

should do the trick. Call it launch.sh or something and set the permissions to rwx--x--x or whatever fits your security paradigm and you should be good.

Note, none of those actually uses the Eclipse IDE itself, but they aren't very difficult to use, and all you need to know if the folder where Eclipse is dumping your stuff (which you want to know for backup/verson control purposes anyway).


Solution 2:

Eclipse/PyDev has nothing really specific for that... still, Python has tools which can automate that work to bundle a python executable along your code to execute it in a client.

My preferred tool for that is cx_Freeze: http://cx-freeze.sourceforge.net (mostly because it's cross-platform), although there are many options (py2exe, py2app, pyinstaller...).

If you however wanted to distribute the code for other developers, you'd want to distribute to PyPi: https://pypi.python.org/pypi, creating a setup.py to categorize your content and say what needs to be distributed and uploaded to PyPi so that other devs can install it with pip.


Post a Comment for "Export Runnable Program From Python Eclipse Project On Ubuntu"