how to compile python .py file to .pyc file

python -c “import compileall; compileall.compile_dir(‘目录’)”

e.g.

python -c "import compileall; compileall.compile_dir('C:/python26/pyc')"

One Response to “how to compile python .py file to .pyc file”

  1. good says:

    his entry was posted on Wednesday, January 27th, 2010 at 2:42 am and is filed under python. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site

Leave a Reply

You must be logged in to post a comment.