Last active
July 5, 2019 06:55
-
-
Save Eidansoft/4cae288fef4a195c9e3ad25d760ddfbb to your computer and use it in GitHub Desktop.
Python tips
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# View the source code of any function in use directly at the debugger, useful to be sure what code are you executing | |
import inspect | |
print(''.join(inspect.getsourcelines(NAME_OF_METHOD_TO_SEE_SOURCE_CODE)[0])) | |
# Create a virtual environment with a specific python version | |
virtualenv --python=/usr/bin/python2.7 ~/.virtualenvs/test | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment