simple


Dating back to 2005 or 2006, this program was yet another attempt at a command-line (I must’ve been obsessed with those at that point because I can’t find many other post-worthy examples of what I was doing back then). If I had known C back then, I may have been an unstoppable Linux developer. 😮

while 1:
   com0 = raw_input('Type Command :')
   if com0 == "say":
           print "print"
   if com0 == "end":
       break
   if com0 == "makefile":
       com1 = raw_input('Name? :')
       com2 = raw_input('Write : Y/N')
       file = open(com1, 'w')
       file.close()
       if com2 == "y":
          com4 = raw_input('Script Mode? : Y/N')
          if com4 == "y":
             com5 = raw_input('Program :')
             file = open(com1, 'w')
             say = "print"
             if com5 == "say":
                 com6 = raw_input('Program :')
                 file.write(say+" "+com6)
             file.close()
             print 'Done'
             
          com3 = raw_input('Write')
          file = open(com1, 'w')
          file.write(com3)
          file.close()
          print 'Done'
   else:
       print com0

Posted in: Code by nsundin
Copyright © 2011-2025 Programmatic Verse · RSS Feed
Built on Skeleton
Powerered by Wordpress