1 using python shell in emacs 24
1.1 first
create a new py file and launch python-mode
1.2 second
C-c C-p to launch python-shell
1.3 fill in your test code
Python 2.7.9 (default, Apr 2 2015, 15:33:21)
[GCC 4.9.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> >>> >>> >>> the_world_is_flat = 1
>>> if the_world_is_flat:
... print "Be careful not to fall off!"
...
Be careful not to fall off!
>>>
Note:
- do not need any other python modules
- type tab at the begining of line [print "Be careful not to fall off!"] because there is a ":" in above line
- type Enter key to execute the above python scripts in shell
Created: 2016-01-27 三 16:44