🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Closed Source Possible With Python?

Started by
21 comments, last by GameDev.net 17 years, 8 months ago
I recently decided to start learning to program and Python was my language of choice. I mentioned I wanted to develop a closed source application on another forum and somebody replied "Isn't Python an interpreted language, and doesn't that make writing closed-source stuff with it impossible?". Is there any truth to this? Is it impossible to develop closed source programs with Python? If so are all interpretive languages that way? I'd hate to have to start with a harder language but closed source is essential to making any money off of my projects. Any help would be most appreciated.
Advertisement
Legally you can write a closed source program with it, you can add an EULA that forbids reverse engineering and dissasembling, you can charge for it all you want, but tecnically its fairly easy to decompile and access the code, if you dont mind that, you're fine.
There are tools like Py2Exe that convert python code to standard windows executables. I don't know if these are easier to hack than exes generated by other compilers, but it should be a lot better than distributing the .pyc files.
Yeah I read about py2exe in the book I bought to learn the language but it didn't state anything about protecting your work. Anybody know if py2exe or any other program can help me hide my code for good or should I start looking into language again?
Quote: Original post by modmiddy
Is it impossible to develop closed source programs with Python? If so are all interpretive languages that way?
Yes and yes. The best you can do with Python is to obfuscate the code, i.e. use variable and function names that nobody will understand and write algorithms so complex that nobody understands them. Even if they decopile your code, they won't get the comments (they will get Python docstrings though - but you could write a tool that automatically removes docstrings from code, if you don't use them in the program). But such things are very easily deciphered if your code is worth deciphering, so you might as well not bother. If it's not worth deciphering, it might as well be open source with all the comments and such.
Quote: I'd hate to have to start with a harder language but closed source is essential to making any money off of my projects.
Why? What kinds of projects are you going to make, in which source code is so valuable that it should be closed? The only thing I can think of is something very cutting-edge code-wise, like a new engine or a plugin like speed-tree which you'd like to sell to dev studios. But since you're coding in Python which is pretty slow for such things, I doubt that's what you'd be doing as your first project..
Quote: Original post by modmiddy
Yeah I read about py2exe in the book I bought to learn the language but it didn't state anything about protecting your work. Anybody know if py2exe or any other program can help me hide my code for good or should I start looking into language again?
No. py2exe creates a library.zip which contains the pyc files. Which in turn can be decompiled easily. Ok you could encrypt the zip and then create some exe which has some obfuscation for the decrypt algo. But even that would be rather easily hacked.
Quote: Original post by Kwizatz
Legally you can write a closed source program with it, you can add an EULA that forbids reverse engineering and dissasembling
Such EULAs are invalid in large parts of the world.
Quote: Why? What kinds of projects are you going to make, in which source code is so valuable that it should be closed?
I don't understand how I could develop something, have the source be open, and charge people money to use the compiled version of it. Why would anybody pay for something they could just compile themselves? It will be a pretty small program that will allow people with no programming knowledge to create their own board and card card games using predefined templates, drop down menus, drag and droping, etc... and filling in "the blanks" themselves. There is already a small target audience in which a previously popular peice of software is no longer being developed. People had no trouble paying for that one and mine will be much better.
Quote: Original post by modmiddy
Quote: Why? What kinds of projects are you going to make, in which source code is so valuable that it should be closed?
I don't understand how I could develop something, have the source be open, and charge people money to use the compiled version of it. Why would anybody pay for something they could just compile themselves? It will be a pretty small program that will allow people with no programming knowledge to create their own board and card card games using predefined templates, drop down menus, drag and droping, etc... and filling in "the blanks" themselves. There is already a small target audience in which a previously popular peice of software is no longer being developed. People had no trouble paying for that one and mine will be much better.


simple: make it a web based service (possibly driven using python) and then provide customers with the resulting script/binary-that way, there's no need to open/close any sources, simply because the customer will never have access to the generating sources
Quote: Original post by modmiddy
Quote: Why? What kinds of projects are you going to make, in which source code is so valuable that it should be closed?
I don't understand how I could develop something, have the source be open, and charge people money to use the compiled version of it. Why would anybody pay for something they could just compile themselves?
They wouldn't have legal access to the source code without them paying you. If they copied the source code from net, it would be as illegal as copying a compiled exe from the net. The kind of open source necessiated by scripting languages doesn't mean the source code must be available for free. You still own the copyright for it.

This topic is closed to new replies.

Advertisement