This repository has been archived by the owner on Nov 16, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
demo.py
54 lines (35 loc) · 1.34 KB
/
demo.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
"""Module for testing some python-mode features."""
# import os
from utils import set_breakpoint
# from utils import does_not_exist
def my_god_it_is_full_of_colors(*args, **kwargs):
"""See? We got nice syntax highting."""
print 'Hello world'
def fold_this():
"""We can fold code blocks by pressing ``f``."""
print 'Fold it.'
def fold_all():
"""We can fold everything by pressing ``F``."""
print 'Fold all.'
def create_ropeproject():
"""We would create a ropeproject by executing ``:RopeOpenProject``."""
print 'Now add your venv to ``.ropeproject/config.py``!'
def life_syntax_checking():
"""Pylint checks our code on each save."""
# Try to uncomment this and save.
# Try to uncomment the os import and save.
# Try to uncomment the does_not_exist imort and save.
# abc = 5
def code_completion():
"""Code completion makes life easy."""
# Try to call one of our methods here.
# Try to import something from utils
def open_utils_py():
"""We can use Ctlp to open files in our project."""
print 'Open ``utils.py`` in a new vertical split via ``<C-p>ut<C-v>``'
print 'Now open ``utils.py`` in a new tab via ``<C-p>ut<C-t>``.'
def main():
"""Try to set a breakpoint before the next line."""
set_breakpoint(42, 42, data={'foobar': 'test', })
if __name__ == '__main__':
main()