For windows only!
-
Install MinGW (http://www.mingw.org/) or Git (https://git-scm.com/). That is you will get "sh.exe".
-
Add path to the system variables: System / Advanced System Settings / Enviroment Variables.
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
| ####################################################################### | |
| Add PyCharm Community icon in Ubuntu | |
| ####################################################################### | |
| 1) Firstly unlock an old icon for the previous PyCharm version from the Unity dash board. | |
| 2) Extract archive with a new PyCharm version (for example "pycharm-community-3.4.1.tar.gz") in the home ("user/home") folder; | |
| 3) Go to a bin folder ("/home/maks/pycharm-community-3.4.1/bin"); | |
| 4) Open Terminal in the bin folder and enter the command below: | |
| sudo ./pycharm.sh |
| # link: http://askubuntu.com/questions/271388/how-to-install-gcc-4-8?newreg=6c2b1c109685438c8bc7b37a87cefb21 | |
| # link to the repository: https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test?field.series_filter=precise | |
| # Open a terminal(Ctrl+Alt+t) and run the following commands: | |
| sudo apt-get install python-software-properties | |
| sudo add-apt-repository ppa:ubuntu-toolchain-r/test | |
| sudo apt-get update | |
| # install gcc | |
| sudo apt-get install gcc-4.8 |
| # link : https://www.python.org/dev/peps/pep-0008/#code-lay-out | |
| # Indentation. Use 4 spaces | |
| # Aligned with opening delimiter. | |
| foo = long_function_name(var_one, var_two, | |
| var_three, var_four) | |
| # No extra indentation. | |
| if (this_is_one_thing and |
| # Due to lack support of "Class Diagram/View" in the PyCharm Community Edition you could install "PlantUML integration" plugin to create a # class diagram by yourself. | |
| # https://www.jetbrains.com/pycharm/features/editions_comparison_matrix.html | |
| # Install "PlantUML integration" plugin for PyCharm Community Edition through "Settings/Plugins" | |
| https://plugins.jetbrains.com/plugin/7017 | |
| # Install "graphviz" and "libgraphviz4", that requires for "graphviz" | |
| # Add repository for "libgraphviz4" | |
| http://www.graphviz.org/Download..php |
| http://forum.jetbrains.com/thread/PyCharm-1675 | |
| http://blog.jetbrains.com/pycharm/2012/08/gevent-debug-support/ | |
| Enable Gevent support. | |
| In recent versions of PyCharm, the option has moved to the main settings dialog. You can enable it under Settings | Python Debugger | Gevent compatible debugging. |
| If you face with an error like this while use "super": | |
| "TypeError: must be type, not classobj" | |
| link: | |
| http://stackoverflow.com/questions/489269/python-super-raises-typeerror-why | |
| Solution: add inheratence from the "object" class in the base class. | |
| class Class1(object): | |
| def __init__(self): |
| # link: https://docs.python.org/2/library/functions.html | |
| class C(object): | |
| def __init__(self): | |
| self._x = None | |
| @property | |
| def x(self): | |
| """I'm the 'x' property.""" | |
| return self._x |
| __debug__ | |
| # This constant is true if Python was not started with an -O option. See also the assert statement. | |
| # link: https://docs.python.org/2/library/constants.html |
For windows only!
Install MinGW (http://www.mingw.org/) or Git (https://git-scm.com/). That is you will get "sh.exe".
Add path to the system variables: System / Advanced System Settings / Enviroment Variables.