How do I decompile Pyc

Do you have questions about writing plugins or scripts in Python? Meet the coders here.
Post Reply
jachin99
Experienced User
Posts: 398
Joined: Sat Feb 13, 2016 8:39 pm

How do I decompile Pyc

Post by jachin99 » Mon Aug 21, 2017 5:13 pm

I have pycharm, along with a few other IDEs installed on my machine and I want to view a pyc file in human readable format. How do I decompile this or open it so that I can view and edit a pyc file. I tried using dotpeek but I'm assuming my file isn't using .net so that didn't work. Thanks.

User avatar
kgschlosser
Site Admin
Posts: 3595
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: How do I decompile Pyc

Post by kgschlosser » Tue Aug 22, 2017 2:46 am

you don't. But in PyCharm if you open a python scratch file and import the module. then click on the name of the module. then click on the view drop down and click on quick definition this should bring up the code for the file. if you wanted to edit it I am guessing you could copy the code and paste it into a new .py file. if this will work or not I do not know.
If you like the work I have been doing then feel free to Image

Post Reply