writing_python_scripts/quickref.tex
changeset 336 c77f7f5850dd
parent 335 d5248a15274c
--- a/writing_python_scripts/quickref.tex	Thu Oct 14 14:11:54 2010 +0530
+++ b/writing_python_scripts/quickref.tex	Mon Oct 18 21:11:34 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|}
+