-2

I have a script and i think its compiled with something like Cpython. I can run this script, but i want to access to source code. Is there any way to do this?

Thanks

purya nms
  • 48
  • 1
  • 7
  • There are several questions in SO, dealing with that topic. What python version has been used? – gehbiszumeis Jan 25 '19 at 11:50
  • Python 3.5 used but i'm not sure compiled with cpython or no – purya nms Jan 25 '19 at 12:03
  • It is totally unclear what "script" you have, how it has been "compiled". Please take a look at [ask]. – ead Jan 25 '19 at 12:46
  • Without knowing more, at least the type or extension of the so called compiled script we will not be able to help you. This seems to be your second question here, and it will not be well received again. You really should read [ask]. – Serge Ballesta Jan 25 '19 at 12:50
  • Your first question was "how do I encode my Python script so it can't be read or edited?" and this question is "I've encode my script, how do I undo it?"... – DavidW Jan 25 '19 at 14:09

1 Answers1

1

I think uncompyle6 will work for you. In my win7 cmd This works.

pip install uncompyle6

uncompyle6 compiled.pyc > uncompiled.py
Rahul
  • 10,830
  • 4
  • 53
  • 88
  • its not a .pyc file – purya nms Jan 25 '19 at 12:38
  • it can also decompile `pyo` file – Rahul Jan 26 '19 at 12:05
  • @Rahul I suspect based on [a comment on OP's previous question](https://stackoverflow.com/questions/53805421/python-how-do-i-encode-my-python-script#comment94483746_53805755) that they have compiled their module through C using Cython (so this isn't applicable). However there's no way of actually knowing from what we've been told here... – DavidW Jan 26 '19 at 15:57
  • Oh. I see. Thanks – Rahul Jan 27 '19 at 06:44