Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 7 years ago.
Improve this question
So I am importing a library (reportlab), which is licensed BSD, but itself uses some libraries that are licensed GPL.
My question is, if I import reportlab into python - do I have to abide by BSD or GPL license?
IANAL. You have to abide by the licenses of all the packages you're using.
However, most would say if you only use the public API of those libraries, and they could theoretically be swapped out for other libraries implementing the same API, your code does not fall under the GPL, only any modifications you make to those libraries.
This is the point of view taken by the Linux kernel development community, for example.
Edit: After looking at the site of reportlab, it is clear that if you don't use the PyXML parser then you're only bound by the BSD license, as you're not using any GPL'd code.
Also, the question was raised in the comments whether your code is affected by the GPL if you don't distribute any GPL'd packages because the GPL primarily deals with modification of the code under the license and redistribution of that code. The answer is that if your code is a derivative work of the GPL'd code, you have to license your code under the GPL whether or not you're redistributing the original GPL'd code.
IANAL. From section 1.3 of the reportlab page here:reportlab licensing you can see they want you to talk to them about a commercial license.
GPL code when linked to BSD code requires you to license the BSD code under GPL - I'm talking static linking here. Dynamic linking to GPLed code is not allowed by non-GPL software - in fact, this is the reason for the existence of the LGPL license which allows dynamic linking from non-(L)GPL code. There is also an exception in the glibc license because they want you to be able to build commercial software with it.
The Linux Kernel developers do not all agree on all aspects of linking issues. If you're building against a standard API (POSIX) then it seems obvious you don't need to be GPL. But their arguments go deeper than that, so I don't think there is a direct comparison.
From the link above: "yRXP, our XML parser, is under the GNU General Public License. This is because the RXP parser underneath it is under this license. If you want to use pyRXP in a closed source project, you have to negotiate with us." This suggests they own pyRPX and can give or sell you a different license for it.
That's similar to the pyQT issue. You can make GPLed software with it, but for commercial stuff you need to pay up. Unless you want to make a commercial product that is GPLed of course.
IANAL either, but I think it doesn't even come into play as long as you are not going to distribute the other software as well. For example, if you just tell your users "you have to install pyRXP in order to use this" (maybe easier if you make that "reportlab"), I think the GPL does not apply to your own code.
EDIT: While there is no problem with using the reportlab toolkit in this particular case, the above interpretation does not seem to be correct (see agf's comments on this answer below, as well as his own answer)
Note that the reportlab toolkit (although it's by the same company "ReportLab") doesn't necessarily use pyRXP. They are two different things, each with it's own license.
Looking at reportlab's source code, in reportlab.lib.rparsexml, it seems that pyRXP is only imported if it is installed (separately, because it is not included), and it uses another xml parser if pyRXP is not available. (I guess this is their way of allowing pyRXP to be used, and still keeping reportlab under BSD license)
But maybe you'd best ask on the reportlab mailing list...
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
What are your recommendations for GUI libraries for Python. My own research has me looking at TKinter, but I am open to suggestions.
FYI, the Python application will serve as a kind of bridge between 2 applications. It will use the third party API to extract data, then move and rename the data into a canonical folder structure, use Robocopy to transfer the exported into our in-house processing environment and make proper entries into our in-house database.
Just googling "GUI libraries for Python" you can get "GUI Programming in Python":
https://wiki.python.org/moin/GuiProgramming
Due to this site -- Python has a huge number of GUI frameworks available for it, from TkInter to a number of other cross-platform solutions ... Please, have a look at them ... and find out a suitable tool :)
Have a look at this for a list of some GUI development platforms.
Tkinter
Standard builds of Python include an object-oriented interface to the Tcl/Tk widget set, called Tkinter. This is probably the easiest to install and use. For more info about Tk, including pointers to the source, see the Tcl/Tk home page at http://www.tcl.tk. Tcl/Tk is fully portable to the Mac OS X, Windows, and Unix platforms.
wxWidgets
wxWidgets (http://www.wxwidgets.org) is a free, portable GUI class library written in C++ that provides a native look and feel on a number of platforms, with Windows, Mac OS X, GTK, X11, all listed as current stable targets. Language bindings are available for a number of languages including Python, Perl, Ruby, etc.
wxPython (http://www.wxpython.org) is the Python binding for wxwidgets. While it often lags slightly behind the official wxWidgets releases, it also offers a number of features via pure Python extensions that are not available in other language bindings. There is an active wxPython user and developer community.
Both wxWidgets and wxPython are free, open source, software with permissive licences that allow their use in commercial products as well as in freeware or shareware.
Qt
There are bindings available for the Qt toolkit (using either PyQt or PySide) and for KDE (PyKDE). PyQt is currently more mature than PySide, but you must buy a PyQt license from Riverbank Computing if you want to write proprietary applications. PySide is free for all applications.
Qt 4.5 upwards is licensed under the LGPL license; also, commercial licenses are available from The Qt Company.
These three are probably the most common ones but you can try others if you wish.
Having only used Tkinter and PyQt I would recommend PyQt, however this may not be what you need so I recomend doing some research to find out which will best suit your needs.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 7 years ago.
Improve this question
Good morning, I have created a little software for photo retouch by PIL python. By py2exe i have created an exe version from my .py file. In my dist and build folder I can find PIL module pyc and every file that permit at my program to work on every computer without python.Now i would distribute this program freeware (only .exe and not the source code) by a my web site. I read on PIL software license this
Permission to use, copy, modify, and distribute this software and its associated documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appears in all copies, and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of Secret Labs AB or the author not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission.
If i have only .pyc file in my distr and build folder created by py2exe how can I maintain the copyright notice?
In a day, my web site will have many visit perhaps i will put ADsense Google to have little profit, are there any PIL license violation? About license, distribution I'm very confused...could someone help me?
As long as you put the notice in the documentation of your program, you're free to distribute your program.
Regarding the advertisement in the license, it concerns only the advertising of your own program. It means you're not allowed to use the name of Secret Labs AB on the download page of your program, or on an ad if you're buying ad space to distribute your program for example.
Adding to ssidorenko answer: If you really want to make sure to contain the copyright notice on your packaged executable, maybe add it as a "docstring" to the source code, and then it should be contained in the generated *.pyc as well. (I see py2exe can be configured at setup time to generate optimized *.pyo files - in that case, do not use the -OO when running python setup.py py2exe, as it will remove docstrings from the generated *.pyo file.) You can make clear in the docstring that this is the notice for PIL e.g. by saying "This software contains PIL with the following copyright notice:..."
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I have very simple task to accomplish in python. Need to draw textual data (Unicode) as rows on the screen, navigatable and user can select/deselect row. However, this should work on headless Linux, as well as Windows or Mac OS. Curses doesn't have Windows port. Console module from Fredrik Lundh works only on Windows. I could use both libraries and check OS, but then it takes double effort to make/maintain the same functionality on 2 different libraries.
I'm looking for simple multiplatform console library to draw what I've described.
At a lower level you will have to use curses and there are several choices for the underlying curses library on Windows which may or may not work. You won't have any real problems with curses on UNIX so if I were you, I would get it working on Windows first and if a particular feature doesn't work their, program around it. The UNIX port should be painless.
PDCurses for Windows is available as a DLL or source code and it is possible to interface directly to any DLL using the ctypes module. There is a tool which can automatically generate a ctypes wrapper for you called ctypesgen.py http://wavetossed.blogspot.com/2011/07/asynchronous-gnu-readline.html I'm not sure if that works for a Windows DLL quite so automatically, but it does work from header files so it is worth a try.
For more background on ctypes, have a look at some of the questions here like Scheduling function calls in a Python curses UI
I recently had a similar issue for a package I was putting together (https://github.com/peterbrittain/asciimatics). I wasn't very happy with the solutions that required you to install (or worse) build separate binary executables like PDCurses or cygwin, so I created a unified API that provides console colours, cursor positioning and keyboard input for Windows and UNIX platforms.
There is a gallery of sample applications here. In more recent releases, I have also added a set of widget objects to allow you to create TUIs like this:
This is now live and has been tested on CentOS 6/7 and Windows 7/8. You can install it from PYPI using pip and then use the Screen class to do exactly what you want. If not, please post an enhancement request on GitHub and I'll see what I can do.
I use urwid. It's documentation is poor, but on the other hand, its source base is very compact. It supports Unicode well and works fine on Cygwin. Doesn't seem work in native CMD.exe, but it's worth closer investigating seeing how the curses dependency is only optional.
Examples from the project site:
(source: urwid.org)
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 3 years ago.
Improve this question
What's ActivePython actually about?
From what I've read it's just standard Python with OpenSSL and PyWin32 (on Windows). No big deal I guess; I could install them in matter of minutes, and most people don't need them anyway. All other mentioned libraries (zlib, bzip2, SQLite 3, Tkinter, ElementTree, ctypes, and multiprocessing) are part of the core Python distribution.
Next up, the tag-line "ActivePython is the industry-standard Python distribution", isn't core Python distribution "industry-standard" (whatever that means?)?
And the weirdest thing, is that ActiveState bundles it with crappy PythonWin, and not their own most-awesome Python editor/IDE, Komodo. What gives?
I actually never got to installing ActivePython, so maybe I don't know something, but it seems pretty irrelevant, and I see the name quite often on forums or here.
It's a packaging, or "distribution", of Python, with some extras -- not (anywhere) quite as "Sumo" as Enthought's huge distribution of "Python plus everything", but still in a similar vein (and it first appeared much earlier).
I don't think you're missing anything in particular, except perhaps the fact that David Ascher (Python enthusiast and my coauthor in the Python Cookbook) used to be CTO at ActiveState (and so no doubt internally pushed Python to go with other dynamic languages ActiveState focuses on), but he's gone now (he's CEO at the Mozilla-owned firm that deals with email and similar forms of communication -- Thunderbird and the like, in terms of programs).
No doubt some firms prefer to purchase a distribution with commercially available support contracts, like ActivePython, just because that's the way some purchasing departments in several enterprises (and/or their IT departments) are used to work. Unless you care about such issues, I don't think you're missing anything by giving ActiveState's Python distribution a pass;-).
(I feel similarly about costly Enterprise distributions of Linux, vs. Debian or Ubuntu or the like -- but then I'm not in purchasing, nor in an IT department, nor do I work for a very traditional enterprise anyway;-) )
ActiveState has a long tradition contributing Windows support to Python, Tcl, and Perl: by hiring key developers (like Mark Hammond, for some time), by fixing bugs specific to Windows, and having employees contribute fixes back, and by being sponsors of the Python Software Foundation.
While it is true that the distribution they produce is fairly similar to mine, it's as RichieHindle says: you can get paid support from ActiveState (but not from me).
The main feature is that you can buy a paid support contract for it.
Why does Red Hat Enterprise Linux exist when you can compile everything yourself? 8-)
For many businesses, the combination of proven Open Source software and a support contract from people who build, package and test that software, is an excellent proposition.
I've been using ActivePerl for years and when I made the switch to Python, I very naturally downloaded ActivePython.
I never had any problems with the Active* distributions - they're robust, come with a few useful libraries, like PyWin32, that the vanilla core Python doesn't have. They also come bundled with a .CHM Python documentation compilation that's very useful.
Here is an email to python-list I wrote on this a long while ago:
https://mail.python.org/pipermail/python-list/2007-July/456660.html
Mostly those details are still true. Also, all the other responses I've seen to this question are fair.
Note that as of release 2.6.3.7 ActivePython includes PyPM (similar to PPM for ActivePerl) to help with installing Python packages -- the hoped for benefit over "easy_install" and "pip" (and others) to be the installation of popular binary packages.
ActiveState will also be supporting Python 2.7 while the standard Python 2.7 will no longer be supported in 2020. If you have a large codebase that won't be migrated in time, you'll need to make security patches yourself or go with something like ActiveState Python.
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 looking to set up my development environment at home for writing Windows applications in Python.
For my first piece, I'm writing a simple, forms-based application that stores data input as XML (and can read that information back.) I do want to set up the tools I'd use professionally, though, having already done a round of didactic programming.
What tools are professional python developers using these days? In order to have a working python environment, what version of the compiler should I be using? What editor is common for professionals? What libraries are considered a must-have for every serious python developer?
Specifically, which Windowing and XML libraries are de rigeur for working in Windows?
I like Eclipse + PyDev (with extensions).
It is available on Windows, and it works very well well. However, there are many other IDEs, with strengths and weakness.
As for the interpreter (Python is interpreted, not compiled!), you have three main choices: CPython, IronPython and Jython.
When people say "Python" they usually refer to "CPython" that is the reference implementation, but the other two (based, respectively, on .Net and Java) are full pythons as well :-)
In your case, I would maybe go on IronPython, because it will allow you to leverage your knowledge of .Net to build the GUI and treating the XML, while leaving the implementation of business logic to Python.
Finally, should you decide to use CPython, finally, there are several choices for working with xml:
minidom; included in the standard library
lxml, faster and with a better API; it means an additional installation on top of Python.
Lots of questions, most hard to answer correctly. First of all, most of python development happens on unix-like platforms. You will hit many walls during development on Windows box.
Python is not a compiled lanugage, current preferred version for production is 2.5. For environement setup you should take a look at virtualenv. Editor is a personal choice, many Python developers use Vim, you can customize it pretty well to suite your needs.
About libraries, Python is very strong around this area and it's really hard to say what is a must to know. If you want to handle XML, I would preffer lxml.
If you go for CPython, make sure you get the win32 extensions by Mark Hammond, either as a separate download which you install on top of the vanilla Python installation, or as part of ActiveState's ActivePython. It includes an integrated editor and debugger.
Jython has recently reached 2.5 compliancy, but we quickly ran into recursion limit issues.
The standard distribution includes IDLE, a graphical editor and debugger.
I like shells, so I'm using IPython for interactive work, and pydb as debugger (unfortunately, I had problems getting pydb to work under Windows).
"What tools are professional python developers using these days?"
Lots
"In order to have a working python environment, what version of the compiler should I be using?"
["compiler" is meaningless. I'll assume you mean "Python"]
We use 2.5.4. We'll be upgrading to 2.6 as soon as we've done the testing.
"What editor is common for professionals?"
We use Komodo Edit.
"What libraries are considered a must-have for every serious python developer?"
We use Django, XLRD, PIL, and a few others. We don't plan this kind of thing in advance. As our requirements arrive, we start looking for libraries. We don't "pre-load" a bunch of "must-have" libraries. The very idea is silly. We load what we need to solve the problems we have.
There are no set standards in these matters, and for good reasons:
there is a fair amount of good choice
different people are productive with different tools
different tools and libraries are suited for solving different problems
That said, I think it's a valid question exactly because there is a fair amount of good choice. When there is too much choice people often do not chose at all and move on. You still need to do your own research to decide what is best for you but you may find here some good starting points.
Here is what I use professionally on windows:
python 2.5.4
latest wxPython
XRC Resource Editor from the wxPython docs & demos for the grunt of the tedious GUI design
lxml or gnosis utils for xml
WingIDE Professional
Taking the headline question literally, the answer has to be IronPython. The 2.0 releases are equivalent to CPython 2.5, and the 2.6 release (currently at beta2) is intended to match CPython 2.6 (full 2.6 release some time in the next couple of months). With either you can use the state of the art in Windows GUI frameworks, i.e. WPF; and you get the whole .net XML support libraries (excepting Linq to XML, which relies on clever bits of C# that IronPython cannot yet emulate).
I've used NetBeans Python plug-in happily as an IDE for IronPython using WPF.
The answer would depend on what you want to do with Python. If you want to do web programming, Python is blessed with many web frameworks. The most popular ones are: Django, Pylons, and Turbogears. There's also Google App Engine, where you can deploy your Python webapp (based on GAE framework) to Google's infrastructure. If you want to do Desktop programming then there is PyQT and TkInter, or you can even try using Java Swing with Jython. And if you want to do Mobile app programming then there is Python for S60 which is backed by Nokia.
Python is interpreted language, so there is no compiler (although the interpreter also compiles your python module into bytecode). I would recommend using Python 2.6 as it has some syntax and libraries that is different compared to 2.5. You can also start learning Python 3.0 too.
There is several IDE that is good for Python. You don't have to get yourself attached into one editor/IDE because most of them are good ones. For the commercial ones there is WingIDE which is really focus on making IDE for Python and I would really recommend IntelliJ IDEA with Python plugin which is really nice if you often look at the libraries in your Python environment. For the free ones (as others have said) there is Komodo Edit or you can also try Netbeans with Python plugin.
As for the must-have libraries, this is depending on what you want to do. What kind of application you want to develop with Python. But I think every Python developer should consider PIL for imaging library. I also use simplejson quite often, because I prefer using JSON rather than XML. If you are using XML though, you can use lxml as it is really fast in parsing XML.