writing_python_scripts/quickref.tex
changeset 335 d5248a15274c
parent 296 641a6ee868c0
--- a/writing_python_scripts/quickref.tex	Tue Oct 12 11:26:09 2010 +0530
+++ b/writing_python_scripts/quickref.tex	Tue Oct 12 11:44:33 2010 +0530
@@ -1,11 +1,9 @@
-Creating a tuple:\\
-{\ex \lstinline|    t = (1, "hello", 2.5)|}
-
-Accessing elements of tuples:\\
-{\ex \lstinline|    t[index] Ex: t[2]|}
+See where python searches for modules:\\
+{\ex \lstinline|    sys.path|}
 
-Accessing slices of tuples:\\
-{\ex \lstinline|    t[start:stop:step]|}
+Include our own path in PYTHONPATH:\\
+{\ex \lstinline|    sys.path.append(our_path)|}
 
-Swapping values:\\
-{\ex \lstinline|    a, b = b, a|}
+Run certian code only if executed and not if imported:\\
+{\ex \lstinline|    if __name__=="__main__": #do something|}
+