Skip to content
Browse files

A bit more code...

  • Loading branch information...
1 parent 619537b commit 0e60b322fb40c111e7861fcdf869fececd8a106d Andy Elvey committed May 26, 2009
Showing with 47 additions and 12 deletions.
  1. +34 −0 manage_users.py
  2. +13 −12 plan_42.py
View
34 manage_users.py
@@ -0,0 +1,34 @@
+
+
+# A class to manage users
+
+# This code is released to the public domain
+
+
+class manage_users():
+ def __init__(self, username, pw):
+ self.username = username
+ self.pw = pw
+ self.userlist = []
+
+ @staticmethod
+ def adduser(username):
+ self.userlist.append(username)
+
+ @staticmethod
+ def userprefs(username, apptype, appname):
+ pass
+
+ @staticmethod
+ def user_rights(username, right, yn):
+ pass
+
+
+# Run the class. Give the user a feeble password.... ;)
+
+a = manage_users("fred", "password")
+
+
+
+
+
View
25 plan_42.py
@@ -7,16 +7,7 @@
# This code is released to the publ;ic domain.
-# This code requires Teagit.
-
-
-# Teagit will be the toy "file system".
-
-# Note - to open a file in vi and go to a given
-# line, do this - vi +5 myfile.txt - goes to line 5.
-
-# from teagit import *
-
+import time
# A logon class
class logon():
@@ -27,9 +18,19 @@ def __init__(self, os, username, pw):
os = os.lower()
+ # Do some stuff to imitate setup during boot
+ print "Welcome to Plan 42! Share and enjoy.... "
+ time.sleep(3)
+ print "Mounting drives... please wait..."
+ time.sleep(3)
+ print "Mounted / /dev /usr /etc "
+ time.sleep(3)
+
if "win" in os:
- print "Oh, come on now, be serious - use a REAL OS!"
-
+ print "Oh, come on now, be serious - use a REAL OS!"
+ time.sleep(2)
+ print "Loaded BSOD() :) "
+
# Run the class
a = logon("win", "fred", "foobar")

0 comments on commit 0e60b32

Please sign in to comment.
Something went wrong with that request. Please try again.