summaryrefslogtreecommitdiff
path: root/Technology/Python.md
diff options
context:
space:
mode:
Diffstat (limited to 'Technology/Python.md')
-rw-r--r--Technology/Python.md24
1 files changed, 23 insertions, 1 deletions
diff --git a/Technology/Python.md b/Technology/Python.md
index 8374f6b..fffa970 100644
--- a/Technology/Python.md
+++ b/Technology/Python.md
@@ -1,10 +1,32 @@
-methods this format foo.bar .bar
+Python does not have a classpath and unless you are root, you can't install new pkg for the whole system
+
+virtualenv - solution to pkg management? - isolated space with own instance of python
+
+virtualenv TESTENV -p python
+source TESTENV/bin/activate
+# to get out of env
+deactivate
+
+
+** exponant
+
+x = 'Mark'
+len(x) - function
+x.upper() - method
dir() - built it give directory of an object (all methods available)
+# Data containers
list() - []
dict() - {}
tuple() - ()
set() - set()
+
+
+
+__ init__ - where to assign instance specific attributes when object first constructed
+__ str__ - control how object is printed
+__ repr__ - object output when interactive shell
+__ eq__ - uniquely identify all created object