As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
Although this question is very popular here in StackOverflow, after spending some time here and in the Google, I still haven't find a concrete answer on what is the most appropriate way to do SOAP consuming in Python 3.
I took a look at Does a Python 3 SOAP client module exist?, and I hope it is outdated and today some solution to this may have appeared.
I was thinking about some ideas:
Use 2to3 script to port some existing libraries to Python 3 (SOAPy, suds, etc).
Load an external module, by mixing technologies (Py3k + Jython, Py3k + Python 2.6, etc.)
Write in hardcode Python classes that corresponds to definitions of WSDL files (which implies in tight-coupling/high maintenance).
Write the software in Python 3.0, call the "python2.6-only" module functions through the execnet package. Which requires the Python 2.6 to be installed on the machine and the software written in Python3.0 to be a frozen binary.
Any ideas?
Thanks in advance
I would probably start by trying your suggested 2to3 port. For many things, it works pretty well. It would still be a day or two worth of work to convert something like suds, I imagine.
Related
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I'm working on an open source project (Master of Mana, a mod for Civilization 4) which uses Python 2.4.1 for several game mechanics. Is there a chance for a performance improvement if I try to upgrade to Python 2.7.3 or even 3.3.0?
Related to this, has anyone done a performance analysis on different Python versions?
Most newer Python versions bring new features.
Existing code parts are probably updated as well, either for performance or for extended functionality.
The former kind of changes bring a performance benefit, but extended functionality might lead to a poorer performance.
I don't know what is the relationship between these kinds of changes. Probably you will have to do some profiling on yourself.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
I'm learning Linux administration and after that i'm going to learn programming on Linux using Python.
While i'm reading in a Linux Administration book, i came into Shell scripting chapter. I saw Bash language and i got dizzy. Let's say it's not one of the good-looking languages in my humble opinion.
And i said to myself. I'm gonna learn Python at the end.. Why not just use in instead of Bash ?
Now, is there anything wrong for a total beginner in shell scripting to use Python and not learn Bash at all ?
Python is not a shell scripting language, because there are basically no Python shells in production use. You can do everything in Python that you can do in bash, but it won't be as natural if you're fundamentally trying to write "shell scripts" in the classic sense--scripts that just invoke a series of other programs like mv and gzip and ssh and so on.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
I'm attempting to convert a Python application I coded using the cmd module into a gui. Initially, I came across EasyGui. But after giving it a try, I find that it is very limited, the gui screens are not consistent, and overall not easy on the eyes. I read about IronPython (Python + .NET), but cannot find adequate documentation on it. Before I order a book from Amazon on IronPython (as this seems the most legitimate), does anyone know of a decent gui alternative for Python? Thanks!
Tkinter is in the standard library, works on all platforms, and is fairly simple and lightweight, but it looks a bit clunky.
WxPython tries to use platform widgets, so it looks a bit better, but it's a separate library. On Linux, I still find it doesn't look quite right.
PyQt is a large, powerful framework - it looks good, and you can do a lot with it, but it's more complex and a larger install.
There are plenty of others, but those are probably the most popular.
I've used libglade before to write GUIs in Python. I thought the results felt very native (as native as any GUI toolkit can under Linux), and using it was a lot like every other GUI toolkit I've used.
The best GUI's for Python are tkinter, Qt (PyQt), and wx (wxPython). Search any of those terms to learn more.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
We think about whether we should convert a quite large python web application to Python 3 in the near future.
All experiences, possible challenges or guidelines are highly appreciated.
My suggestion is that you stick with Python 2.6+, but simply add the -3 flag to warn you about incompatibilities with Python 3.0. Then you can make sure your Python 2.6 can be easily upgraded to Python 3.0 via 2to3, without actually making that jump quite yet. I would suggest you hold back at the moment, because you may at some point want to use a library and find out that it is only available for 2.6 and not 3.0; if you make sure to cleanup things flagged by -3, then you will be easily able to make the jump, but you will also be able to take advantage of the code that is only available for 2.6+ and which is not yet ready for 3.0.
For each third-party library that you use, make sure it has Python 3 support. A lot of the major Python libraries are migrated to 3 now. Check the docs and mailing lists for the libraries.
When all the libraries you depend on are supported, I suggest you go for it.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
Could someone tell me which is better of the two for bundling Python applications — cx_Freeze or PyInstaller? I'm looking for a comparison based on factors such as:
Popularity (i.e. larger user base)
Footprint of the built binary
Cross platform compatibility
Ease of use
I tried both for a current project and decided to use cx_freeze. I found it easier to get started. It has an option to bundle dependencies in a zip archive, which makes it easy to check that everything was properly included.
I had trouble getting PyInstaller to include certain egg dependencies. It couldn't handle conditional imports as well as I needed and looking through the bundled archive was difficult. On Windows, it requires pywin32 (so it can't be used with virtualenv) and version 1.4 doesn't work with Python 2.6. There's no information on whether Python 2.7 is supported.
Why not use something like GUI2EXE?
GUI2Exe is a Graphical User Interface
frontend to all the "executable
builders" available for the Python
programming language. It can be used
to build standalone Windows
executables, Linux applications and
Mac OS application bundles and plugins
starting from Python scripts.
For my experience, I found that for some programs py2exe doesn't work right, but cx_freeze does. haven't tried pyinstaller.