Differences between revisions 6 and 15 (spanning 9 versions)
Revision 6 as of 2008-10-04 03:36:47
Size: 6871
Editor: cpe-72-128-41-249
Comment:
Revision 15 as of 2010-07-21 16:13:41
Size: 1475
Editor: chello212186002156
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
http://undefined.org/python/py2app.html
print "WELCOME TO SAM OS V.2 ;)"
print"============================================================="
print "by CH TECH"
print " "
  * http://undefined.org/python/py2app.html
Line 7: Line 3:
This may be more current (believe the above is incompatible w/ current setuptools):
Line 8: Line 5:
   * http://svn.pythonmac.org/py2app/py2app/trunk/
Line 9: Line 7:
== 2010-07 ==
Line 10: Line 9:
sentinel=0
b=0
while sentinel!= 11235813:
    sentinel=input ('THE ? IS MIGHTIER THAN THE SWORD')
    if sentinel!=11235813:
       
        print'ACCESS DENIED'
    
        
=== Problems ===
Line 20: Line 11:
print "S.A.M. DATABASE ACCESSED"  * for 64-bit systems, the pypi package (0.4.2) failed.
   even with macholib, altgraph and modulegraph gathered from all around.
 * here is some workaround http://hg.hardcoded.net/py2app,
   that i have not tested, as macholib is missing
Line 22: Line 16:
print"----------------------------------------------------------" === current state ===
Line 24: Line 18:
print"WELCOME TO CLAYTON HENDERSON'S PERSONAL OPERATING SYSTEM"  * http://svn.pythonmac.org/py2app/py2app/trunk
 * http://svn.pythonmac.org/macholib/macholib/trunk
 * http://svn.pythonmac.org/altgraph/altgraph/trunk
 * http://svn.pythonmac.org/modulegraph/modulegraph/trunk
Line 26: Line 23:
print"---------------------------------------------------------" checkout and install. install with "python setup.py install"
Line 28: Line 25:
print"HOW MAY I BE OF SERVICE ?"
print"======================================================================="
'''ATTENTION''' some things are in /Library/Python and some things
in /Library/Frameworks/Python.framework/.
Line 31: Line 28:
a=input("PLEASE ENTER THE CODE OF YOUR CHOICE, TYPE 1 FOR DIVISION PROBLEMS "
        "2 FOR MULTIPLUCATION,"
        "3 FOR MORE OR LESS,"
        "4 FOR GUESSING GAME "
        "5 FOR FAMILY INFO,"
        "6 FOR AREA,"
        "7 FOR VOLUME,"
        "8 FOR EXPONENTS,"
        "9 FOR AREA OF A TRIANGLE,"
        "14 FOR ALGEBRA,"
        " 15 FOR FIBBOACCI,"
        " 16 FOR FILE DATABASE,"
        " 17 FOR ADDRESS BOOK,"
        " 18 for TAKBOARD"
        "TYPE exit TO END THE PROGRAM")
print"========================================================================"
if a==1:
    a=input("ENTER DIVISIOR")
    b=input("ENTER DIVIDEND")
    print b/a
=== questions ===
Line 52: Line 30:
is it really necessary to run 'python setup.py py2app' with sudo ?
Line 53: Line 32:
if a==2:
    a=input("ENTER A NUMBER")
    b=input("ENTER A NUMBER")
    print a*b
it writes into /Library ?
Line 58: Line 34:
if a==3:
    X=input ('enter a num')
    if X<50:
        print' number is less than 50'
and there still is an error that ::
Line 63: Line 36:
    if X>50:
        print 'number is greater than 50'
 '/Library/Python/2.6/site-packages/py2app-0.5-py2.6.egg/py2app/apptemplate/prebuilt/main-i386'
Line 66: Line 38:
    if X==50:
        print'The number is equal to 50'
is missing. There is only ::
Line 69: Line 40:
if a==4:
    import random
  main-fat3 main-intel main-universal
Line 72: Line 42:
    num=random.randint(1,50) == Development ==
Line 74: Line 44:
    counter=15
    print"you have 16 guesses. My number is between 1 and 50"
    guess=input("guess a number:")
=== Python Versions ===
Line 78: Line 46:
    while guess!=num and counter>0:
        if guess >num:
            print"guess is too hi"
        if guess<num:
            print "you guessed too low"
        guess=input("try again:")
        counter=counter-1
 
    if guess!=num:
        print"you loose my number was"+str (num)
modulegraph/util.py requires python>=2.6 for immutable bytes by 'b"something"'.
Line 89: Line 48:
    if guess==num:
        print'YOU WIN'
=== Testing ===
Line 92: Line 50:
if a==5:
    sentinel=0
    while sentinel!= 2157:
        sentinel=input("ENTER FAMILY PASSWORD")
        if sentinel!=2157:
            print "FAMILY DATABASE RESTRICTED TO YOU"
    if sentinel==2157:
        print"WELCOME"
        
    
    print "DATABASE ACCESSED. ENTER FILE NAME."

    family=["camille","nate","clayton","annette", "david"]

    intel=[" is 8, 4th grade, plays soccer,"," is 11, 6th grade obsessive, gym & soccer", "RESTRICTED"," is approx 47,works @ grapevine designs"," is approx 43,works at Providence Med Center"]

    name=raw_input("enter a file name for family intel:")
    x=0
    while name!=family [x]:
        x=x+1


    
    print name+intel [x]



if a==6:
    print"AREA"
    

    A=input("enter the length")
    C=input("enter the with")

    
    print A*C


    raw_input()




if a==7:
    print"VOLUME"
    

    A=input("enter the length")
    C=input("enter the with")
    B=input("enter height")

    print A*B*C
 


    raw_input()



if a==8:
    print"EXPONENTS"
    A=input("base")
    B=input("power")

    print A**B


    

    






if a==00:
    print"PLAN MODE STARTED"
    print"--------------------------------------------------"
    V1=raw_input("PLEASE ENTER THE FIRST VARIABLE IN PLAN")
    V2=raw_input("PLEASE ENTER THE SECOND VARIABLE IN PLAN")
    obj=raw_input("ENTER THE OBJECTIVE")
    obs=raw_input("ARE THERE ANY OBSTICLES")
    action=raw_input("ENTER SELECTED PLAN OF ACTION")

    print "THE VARIABLES ARE " +V1 + V2
    print "THE OBJECTIVE IS " +obj
    print" THE OBSTICLE IS " +obs
    print "OUR SELECTED PLAN OF ACTION IS " +action
if a==14:
    print"====================================================="
    print "ALGEBRA SOLVER BETA PROGRAM"
    print"---------------------------------------------------"
    V1=input("()")
    V2=input("Exponents num**num")
    V3=input("multiply x*x")
    V4=input("division x/x")
    V5=input("addition x+x")
    V6=input("subtract x-x")

    choice1=input("YOUR CHOICES ARE...1:MULTIPLY, 2 ADD, 3 SUB, 4 DIVIDE")
    choice2=input("YOUR CHOICES ARE...1:MULTIPLY, 2 ADD, 3 SUB, 4 DIVIDE")
    choice3=input("YOUR CHOICES ARE...1:MULTIPLY, 2 ADD, 3 SUB, 4 DIVIDE")
    

    




    if choice1==1:
        print V1*V2
    if choice1==2:
        print V1+V2
    if choice1==3:
        print V1-V2
    if choice1==4:
        print V1/V2

    
    if choice2==1:
        print V3*V34
    if choice2==2:
        print V3+V4
    if choice2==3:
        print V3-V4
    if choice2==4:
        print V3/V4

    
    if choice3==1:
        print V5*V6
    if choice3==2:
        print V5+V6
    if choice3==3:
        print V5-V6
    if choice3==4:
        print V5/V6

    

    

if a==9:
    a=input("height")
    b=input("base")
    print a*(b*.5)

if a==15:
    a=0
    b=1
    c=0
    d=0
    e=input("enter a number")

    while d<e:
        print a+b
        c=a
        a=b
        b=c+b

        d+=1

    raw_input()





if a ==16:
    print "FILE DATABASE SUBSYSTEM"

    
    Word=["Clayton", "SAM","Computer", "Program","Internet","Door Code", "Apple Computers",]

    Define=[" -Clayton wrote this program "," -SAM is a personal OS", "-a machine that works with a user interface","-An environment in which a computer completes a task", "-is a network of servers that a user may connect to","3502","-A computer company which makes and designs powerful processors and hardware"]
    iWord=raw_input("ENTER KEYWORD:")
    x=0
    while iWord!=Word [x]:
        x=x+1


    print"================================================"
    print iWord+Define [x]
    print"================================================"


if a==17:
    print"================================================="
    print"ADDRESS BOOK"
    print"=================================================="

    Name=["Andy","Robbie","Jackson"]
    Phone=["962-1568","962-5710","268-3787"]
    a=input("ENTER NAME")


    b=0
    while a!=Name [b]:
        b=b+1

    print"==================================================="
    print a+Phone[b]
    print"==================================================="

if a==18:
    print "TAK-BOARD"
    print" "
    a=input("ENTER TIME DO NOT USE A :")
    b=input("ENTER PLACE")
    c=input("ENTER EVENT")

    print"----------------------------------------------"
    print a + b + c

    

raw_input("PROGRAM HAS CEASED, RESTART TO CONTINUE THANK YOU FOR USING SAM OS V")
py.test is used for testing. modulegraph/util.py contains tests in util.py.
maybe revert to unittest.

This may be more current (believe the above is incompatible w/ current setuptools):

2010-07

Problems

  • for 64-bit systems, the pypi package (0.4.2) failed.
    • even with macholib, altgraph and modulegraph gathered from all around.
  • here is some workaround http://hg.hardcoded.net/py2app,

    • that i have not tested, as macholib is missing

current state

checkout and install. install with "python setup.py install"

ATTENTION some things are in /Library/Python and some things in /Library/Frameworks/Python.framework/.

questions

is it really necessary to run 'python setup.py py2app' with sudo ?

it writes into /Library ?

and there still is an error that ::

  • '/Library/Python/2.6/site-packages/py2app-0.5-py2.6.egg/py2app/apptemplate/prebuilt/main-i386'

is missing. There is only ::

  • main-fat3 main-intel main-universal

Development

Python Versions

modulegraph/util.py requires python>=2.6 for immutable bytes by 'b"something"'.

Testing

py.test is used for testing. modulegraph/util.py contains tests in util.py. maybe revert to unittest.

MacPython/py2app (last edited 2010-08-29 12:25:55 by chello212186002156)

Unable to edit the page? See the FrontPage for instructions.