I have a project (pynliner, a python module) on github that I never gave much thought about licensing. Today I got an email asking what license it is under because someone wants to use it in their commercial software.

My first thought is that I would love to have 2 licenses one that is free for non-commercial use and one for commercial use. So I started researching software licenses... and got very dizzy. Then I realized I may not even be able to use most of them because my module uses several other modules. So I have a few questions about how licenses filter down.

My module uses but does not include code under:

And my module uses and includes code under:

This is a relatively minor project but I would like to use it as a learning process for the right way to approach licensing.


  • If I include someone else's code then any licenses I use must not break the included code's license correct?
  • Does the same hold true for other software I use but don't include? Am I limited by the MIT License on BeautifulSoup or LGPL3 on cssutils if I use them but don't include the source in my project?


Thanks for pointing out the licenses I had missed on cssutils and soupselect.py. Once these were pointed out the rest of my questions really come down to what is allowed within the MIT License since it is the only one over code I have included and whether or not the output of cssutils is free.

I'm comfortable with looking these up the rest of the way. Thanks all.

  • If it's on Google Code it's open-source, in some manner. You can't host non-open-source on GC.
    – dkuntz2
    Sep 12, 2011 at 21:51
  • Actually, it explicitly says on the info page for soupselect.py that it's licensed under an MIT License.
    – dkuntz2
    Sep 12, 2011 at 21:52
  • Thanks, I looked right past that and only paid attention to the header comments in the file itself. I'll update my question to reflect this
    – rennat
    Sep 12, 2011 at 21:56
  • cssutils is LGPL3: packages.python.org/cssutils/README.html#license
    – back2dos
    Sep 12, 2011 at 22:06

2 Answers 2


If I include someone else's code then any licenses I use must not break the included code's license correct?

Correct - you are only allowed to use it or distribute it under the terms of their licence. If you re-use it, you are actually using it under their licence - you aren't re-licencing it - so anything you do must be allowed under their licence.

Does the same hold true for other software I use but don't include? Am I limited by the copyright on cssutils if I use it but don't include the source in my project?

You can use tools, information etc without including them in your project. The test is does your project become a 'derived work' - normally meaning you have included significant IP from that tool in the project you distribute. If you are distributing source code this is unlikely (unless the GPL tool is a code generator) - if you are distributing a binary it might have parts of the tool's library included in it.

If using code under the MIT License doesn't prevent me from having commercial and non-commercial licenses, what permissions would I need to get from the authors of the the copyrighted cssutils?

cssutils is licenced under LGPL. That means you can include it in your own closed source project if you include it as a dynamic library or run-time loaded module such that the user can swap it for their own version.

edit: not entirely familiar with cssutils but it seems to also be a css code generator. If you are using it in your app when run by your user, then yes - it is distributed as a runtime loaded python module, that's fine under the LGPL. All you have to do is make the original source available to your users.

If you are using it to generate css files which will then be included separately in your project that's a little trickier. The css files may contain parts of the cssutils IP. You should probably check with the authors of csutils, or check for a faq on their site. The same question comes up with the GPL version of YACC which includes a specific exemption to use it's output freely.

Note copyrighted isn't the same as licenced. Everything you create is copyrighted to you (or perhaps your employer) you only need to consider the licence when you want to give it to other people and want to attach conditions to what they can do with it.

  • Thanks for the info, this is helping make licensing seem less overwhelming.
    – rennat
    Sep 12, 2011 at 22:19
  • The only complicated bit is cssutils - is it being used as a code generator or as a library. Sep 12, 2011 at 22:20
  • I guess in this case it would count as a code generator. I'll check the faq and ask the author.
    – rennat
    Sep 12, 2011 at 22:30
  • I'm pretty sure cssutils has an exception for its generated output.
    – Tim Post
    Sep 12, 2011 at 22:34
  • It had been a while since I had touched the code for this project so when I got back into it just now I noticed that I'm only using cssutils to parse and organize the css but using BeautifulSoup to generate the output.
    – rennat
    Sep 12, 2011 at 22:52

MIT is a permissive license: there are little or no restrictions on code under it. As others have mentioned, GPL and LGPL can be harder to figure out. Sometimes it's just easiest to ask the authors if they think your usage is OK.

This is an aside, but I tend to use MIT or BSD for my OSS code because I want as many people to use it as possible.

  • Not intending to star a holy war - but there are two ways of looking at that. Use MIT and Mega$$$ corp take your code and hide it in their OS and nobody knows - use GPL and they are forced to show it to people who then use it. Depends if you mean use the 'code' or use the code I suppose ! Sep 12, 2011 at 22:52
  • In this case it's a small project and I'm perfectly happy with people using it for generated emails. The only thing I would want to limit is using it in a paid service like campaign monitor mainly because I wrote it to replace my use of campaign monitor at the time and feel like I should get something out of it if thats the case... is there a license that says basically that?
    – rennat
    Sep 12, 2011 at 23:00
  • 1
    @Martin: of course it's a toss-up. As I said, I'd like to see my code used as widely as possible, so I go with permissive. I'm quite happy if that means someone makes money from it. I write commercial closed source software as my day job and we get a lot of benefit from OSS (code and tools). Being permissive in my personal projects is kinda my way of 'giving back' :-)
    – Ben Hughes
    Sep 13, 2011 at 0:08
  • @rennat I don't know if there's a license that's as specific as that, but of course you could write your own. You can dual license too - have a no-charge GPL'd version, but charge for a version that can be used commercially. That means that people can use your lib without having to GPL their codebase, if they're willing to pay for the privilege. Keep in mind though that that model would also mean OSS devs using a non-GPL compatible license wouldn't be able to use your lib without paying/getting your explicit permission.
    – Ben Hughes
    Sep 13, 2011 at 0:14
  • @Ben - and ironically I probably commit back more changes to BSD licenced projects like openCV than I have to GPL ones - simply because I have used them more! Sep 13, 2011 at 2:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.