471,350 Members | 1,665 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,350 software developers and data experts.

getting source for a .pyc file

I have a .pyc file but not the .py file, any way of converting it back to .py?
Jul 20 '07 #1
3 3860
bartonc
6,596 Expert 4TB
I have a .pyc file but not the .py file, any way of converting it back to .py?
One source says

You cannot. .pyc files are bytecode, and you can only disassemble them
into a representation of bytecode. That's not as low-level as
machine-code, but it's not Python code either ! See the 'dis' module on
how to disassemble.
But you should check out decompyle.
Jul 20 '07 #2
bartonc
6,596 Expert 4TB
One source saysBut you should check out decompyle.
Never mind the decompyle thing. It looked interesting, but after review I'll be deleting that link after you reply.
Jul 20 '07 #3
Thanks for your replies. I guess I'll try contacting the original author of the module to try to get a copy.
Jul 22 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

9 posts views Thread by JeffFinnan | last post: by
11 posts views Thread by Brett | last post: by
4 posts views Thread by Larry Tate | last post: by
2 posts views Thread by William Gower | last post: by
6 posts views Thread by nibiery | last post: by
4 posts views Thread by renguy | last post: by
12 posts views Thread by mistral | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.