This file contains 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
#!/usr/bin/env python | |
import rlcompleter, readline | |
readline.parse_and_bind('tab: complete') |
This file contains 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
%page? #pager | |
%pdef # prints definition headers | |
%pdoc # prints docstring of function | |
%pfile # run given file containing an object if found | |
%pinfo # provides information (type, base class, namespace, docstr) | |
%psource # show source for given element | |
%psearch # look for python objects by name |
This file contains 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
%history #provides access to the history via readline |
This file contains 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
%store # persist your macros and plain python variables | |
%reset # deletes all variables from the interactive namespace | |
%macro # lets you define a block of code that can be executed later inline | |
%run # executes the specified file in iPython | |
%save # save the specified input lines to specified output |
This file contains 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
goodnight~ |
This file contains 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
#!/usr/bin/env python | |
groceries=['bread', 'milk', 'eggs', 'bacon', 'peanut butter'] | |
for grocery in groceries: | |
print grocery |
This file contains 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
#!/usr/bin/env python | |
def plusten(y): | |
return y+10 | |
print plusten(87) |
This file contains 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
print '''This is a multiline statement | |
you can say as much as you need here | |
and noone can say a damn thing..''' |
This file contains 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
print ''' | |
Python Escape Sequences | |
\\newline ignored | |
\\\ backslash | |
\\' single quote | |
\\" double quote | |
\\a ascii bell | |
\\b ascii backspace | |
\\f ascii form feed |