Uncompyle6 works for Python 3.x and 2.7 – recommended option as it’s most recent tool, aiming to unify earlier forks and focusing on automated unit testing. The GitHub page has more details.
- if you use Python 3.7+, you could also try decompile3, a fork of Uncompyle6 focusing on 3.7 and higher.
- do raise GitHub issues on these projects if needed – both run unit test suites on a range of Python versions
With these tools, you get your code back including variable names and docstrings, but without the comments.
The older Uncompyle2 supports Python 2.7 only. This worked well for me some time ago to decompile the .pyc bytecode into .py, whereas unpyclib crashed with an exception.
Related Posts:
- If Python is interpreted, what are .pyc files?
- What do the python file extensions, .pyc .pyd .pyo stand for?
- What does %s mean in a python format string?
- ImportError: No module named ‘tensorflow.python’
- How to access environment variable values
- python numpy ValueError: operands could not be broadcast together with shapes
- error: command ‘gcc’ failed with exit status 1 while installing eventlet
- Python foreach equivalent
- Python NoneType object is not callable (beginner)
- _tkinter.TclError: no display name and no $DISPLAY environment variable
- What does if __name__ == “__main__”: do?
- How to fix IndexError: invalid index to scalar variable
- How to write inline if statement for print?
- Could not install packages due to a “Environment error :[error 13]: permission denied : ‘usr/local/bin/f2py'”
- How does numpy.newaxis work and when to use it?
- How to move a file in Python?
- Round a floating-point number down to the nearest integer?
- beyond top level package error in relative import
- How do you append to a file?
- sklearn error ValueError: Input contains NaN, infinity or a value too large for dtype(‘float64’)
- Jupyter Notebook not saving: ‘_xsrf’ argument missing from post
- What does it mean to have an index to scalar variable error? python
- Why are Python’s ‘private’ methods not actually private?
- Pandas DataFrame column to list
- Error: ” ‘dict’ object has no attribute ‘iteritems’ “
- Does Python have “private” variables in classes?
- Rename Pandas DataFrame Index
- How to upgrade pip3?
- Is module __file__ attribute absolute or relative?
- How do I convert a list of ascii values to a string in python?
- How can I compare two lists in python and return matches
- Convert DataFrame column type from string to datetime, dd/mm/yyyy format
- How can I remove a trailing newline?
- Remove the first character of a string
- Difference in output with waitKey(0) and waitKey(1)
- Overcome ValueError for empty array
- Python list directory, subdirectory, and files
- Parsing boolean values with argparse
- Running Jupyter via command line on Windows
- Using Pip to install packages to Anaconda Environment
- Using %matplotlib notebook after %matplotlib inline in Jupyter Notebook doesn’t work
- How to create new folder?
- Python Sets vs Lists
- How do I resize an image using PIL and maintain its aspect ratio?
- Python throws ValueError: list.remove(x): x not in list
- ‘int’ object has no attribute ‘__getitem__’
- Selecting/excluding sets of columns in pandas
- How to add title to seaborn boxplot
- Pygame mouse clicking detection
- How to update SQLAlchemy row entry?
- django MultiValueDictKeyError error, how do I deal with it
- Python, print all floats to 2 decimal places in output
- RuntimeWarning: divide by zero encountered in log
- What is the perfect counterpart in Python for “while not EOF”
- Numpy.dot TypeError: Cannot cast array data from dtype(‘float64’) to dtype(‘S32’) according to the rule ‘safe’
- NumPy array is not JSON serializable
- How to XOR two strings in Python
- What’s the difference between lists enclosed by square brackets and parentheses in Python?
- AttributeError: ‘Tensor’ object has no attribute ‘_keras_history’
- pip install -r requirements.txt [Errno 2] No such file or directory: ‘requirements.txt’
- Zsh: Conda/Pip installs command not found
- Find the nth occurrence of substring in a string
- How to convert ‘binary string’ to normal string in Python3?
- What is the meaning of curly braces?
- Copy a list of list by value and not reference
- What is the quickest way to HTTP GET in Python?
- Pandas index column title or name
- Removing nan values from an array
- Python – While-Loop until list is empty
- ImportError: No module named xgboost
- How to properly create a HeatMap with Bokeh
- How to detect key presses?
- NaN loss when training regression network
- Building multi-regression model throws error: `Pandas data cast to numpy dtype of object. Check input data with np.asarray(data).`
- TypeError: ‘set’ object does not support indexing
- Python 3.6 No module named pip
- Difference between import tkinter as tk and from tkinter import
- Split function add: \xef\xbb\xbf…\n to my list
- ImportError in importing from sklearn: cannot import name check_build
- How do I merge lists in python? [duplicate]
- creating a reverse method for a python list from scratch
- What does on_delete do on Django models?
- Convert floats to ints in Pandas?
- Unable to import tweepy module
- pandas comparison raises TypeError: cannot compare a dtyped [float64] array with a scalar of type [bool]
- NameError: name ‘python’ is not defined
- What is an easy way to implement fprintf in python?
- What is the recommended way to use Vim folding for Python code
- Plotting a python dict in order of key values
- How to normalize a NumPy array to within a certain range?
- How can I recover the return value of a function passed to multiprocessing.Process?
- Python Remove last char from string and return it
- NameError: name ‘reduce’ is not defined in Python
- numpy : calculate the derivative of the softmax function
- Difference between exit(0) and exit(1) in Python
- IOError: [Errno 32] Broken pipe when piping: `prog.py | othercmd`
- Python ‘while’ with two conditions: “and” or “or”
- How to pass a list by reference?
- Python Quicksort Runtime Error: Maximum Recursion Depth Exceeded in cmp
- i want to run python script in wordpress