December 24th, 2012, 01:27 PM
Packaging a python application as a module rather then a stand alone exicutable
First off I need to say "yes I am a newbie" actually more of a hobbyist when it comes to python, but I had a question that I cant seem to find an answer to. I was wondering if there is a way to package a python application and any associated libraries so that it can be used as a module in another python application. For example, in my case I am working on a project that I have put together to test out pyside (Python bindings for QT). However, now that I have come up with some cool stuff, I was thinking it would be nice to be able to share it with others. Being that I have never actually deployed an application like this before I started googling for answers. So far what I have found are applications like py2exe that package everything up into a single executable file which is cool. But what I would like to do is be able to package my python scripts, pyside and the associated Qt libraries as a module somehow so that it can then be used in another python application on a machine where pyside had not been installed. Is this possible?
December 24th, 2012, 02:25 PM
py2exe also obtains 3rd party modules from my exp. Most of the time though, you do not need these as you are just "sharing" your programs. Linux users know how to obtain all the 3rd party modules if they don't have them already, and windows users will just have to learn.
So if you made a "tool" for other python programmers, they know how to obtain the 3rd party modules. You don't have to include it, nor would you want to as the version you package in it might not be compatible with theirs. If you made a program that you just want to show off to your friends, pc-illiterates, then py2exe would be best.
December 24th, 2012, 02:57 PM
Thanks metulburr I suppose there is something to be said about folks installing their own set of modules. However, in my case I am actually a 3D professional and have been playing around with a 3d software package called Blender. For the most part it is built using python and I am trying to expand on some of the features using pyside. My goal is to be able to develop some cool new tools and then share them with designers without them having to go through the trouble of installing pyside on their machines.