views:

86

answers:

1

If I create a gui for windows using python 2.6 and Qt, and then want to running in solaris or linux world.

What do I need on both systems, I'm guessing 2.6 and Qt for both platforms. Is this correct or would there be a better solution.

If wxpython, the same right?

+5  A: 

To run a Python application, one obviously need to have the Python interpreter installed, usually at least the same version used for developement (but sometimes you didn't use features new to that version, so the code is backwards-compatible). A newer version should work, too - only Python 3 isn't backwards compatible to 2.x versions.

Also, all third party libraries need to be installed, of course. So if your GUI uses PyQt, users need PyQt installed. If you use wxPython, users need wxPython installed.

Apart from that, it is possible, although much harder than with certain other languages, to break compability with other platforms, especially when dealing with files and paths manually (e.g. joining an absolute with a relative path with "\\" instead of using the cross-platform os.path.join).

It is possible (and especially for applications aimed at casual users, especially on Windows) to "freeze" a Python program and libraries it uses into an executable file (ideally without dependencies, I don't know if that's always the case in practice). There are a few tools that work for one platform, and the supposedly cross-platform cx_Freeze. Although I don't know if one can produce a Linux executable on a windows machine...

delnan
So, any calls or use of file system would/could cause prob, thanks. Now, thinking of use of Database as part of solution. sqlite and or mysql.
@user428862: Not necessarily, the standard library has cross-platform solutions for about everything filesystem related (mostly in `os`, `os.path` and `shutil`) - you just have to use it ;)
delnan
thanks, I'm new to python. I know very little about X-nix systems file sturctures. thanks for saving me sometime.