How can I convert .py file to .pyc file.

876 views
Skip to first unread message

jitesh

unread,
Jun 19, 2008, 5:57:44 AM6/19/08
to Cape Town Python Users Group
Sorry for my noviceness.
Is it possible to handover an application to my client without giving
the source code because I don't want to open the source code OR is
there any way to convert .py file to .pyc or .exe file.
Any help is appreciated.

Alen Ribic

unread,
Jun 19, 2008, 6:03:04 AM6/19/08
to Cape Town Python Users Group
from shell/command

python -m compileall .

-Alen

Johan Venter

unread,
Jun 19, 2008, 6:03:10 AM6/19/08
to ct...@googlegroups.com
Take a look at http://www.py2exe.org/

2008/6/19 jitesh <panda....@gmail.com>:

Stéfan van der Walt

unread,
Jun 19, 2008, 6:06:12 AM6/19/08
to ct...@googlegroups.com
2008/6/19 jitesh <panda....@gmail.com>:

>
> Sorry for my noviceness.
> Is it possible to handover an application to my client without giving
> the source code because I don't want to open the source code OR is
> there any way to convert .py file to .pyc or .exe file.

You can do that, but it won't help much. If the Python interpreter
can execute a .pyd file, then it isn't very difficult to reverse
engineer it either.

<opinion>
Hiding your code is a Bad Idea (TM): why not consider a different
business model or negotiate better terms with your client?
</opinion>

Regards
Stéfan

Louis Cordier

unread,
Jun 19, 2008, 7:04:23 AM6/19/08
to ct...@googlegroups.com

> Take a look at http://www.py2exe.org/

There is also, cx_Freeze,
http://www.python.net/crew/atuining/cx_Freeze/

--
Louis Cordier <lcor...@point45.com> cell: +27721472305
Point45 Entertainment (Pty) Ltd. http://www.point45.com

jitesh

unread,
Jun 21, 2008, 2:45:03 AM6/21/08
to Cape Town Python Users Group

Thanx a lot for the quick responce and valuable inormation.

regards
Jitesh
Reply all
Reply to author
Forward
0 new messages