LATEST VERSION: v0.3
LAST UPDATED: JULY 16, 2010
CHANGES FROM v0.2.3
- Note app added
- "Bad command" changed
- Author info better
SOURCE
note = ""
def app_note():
global note
print("Welcome to the note app! Here you can write a note and leave it for later.")
print('\n')
if note == "":
areusure = str(input("You don't seem to have a note. Write one now? [Y/N] "))
if areusure == "Y":
note = str(input("Write your note here: "))
print("Note saved")
load_the_os(0)
else:
load_the_os(0)
else:
print("Current note:", note)
areusure = str(input("Make new note? [Y/N] "))
if areusure == "Y":
note = str(input("Write your note here: "))
print("Note saved")
load_the_os(0)
else:
load_the_os(0)
def show_the_ver():
print("PY-DOS v0.3 by ThePCKid on Scratch")
load_the_os(0)
def get_some_help():
print("help Display this help screen")
print("ver Display the version of this fake OS")
print("stop Shutdown PY-DOS")
print("logout Logout of PY-DOS")
print("note Launch the note app")
load_the_os(0)
def load_the_os(i):
if i == 1:
print("Type 'help' for help")
print("Please note that because PY-DOS is written in Python, command names, usernames, and passwords are case-sensitive.")
inpt = str(input(">"))
if inpt == "help":
get_some_help()
elif inpt == "ver":
show_the_ver()
elif inpt == "stop":
areusure = str(input("Are you sure? [Y/N] "))
if areusure == "Y":
pass
else:
load_the_os(0)
elif inpt == "logout":
for i in range(0, 15):
print('\n')
try_to_login()
elif inpt == "note":
app_note()
else:
print("Unknown command. Try 'help' to get a list of known commands.")
load_the_os(0)
def try_to_login():
tempuser = temppass = ""
tempuser = str(input("Username: "))
temppass = str(input("Password: "))
if tempuser == username:
if temppass == password:
print("Logged in!")
for i in range(0, 25):
print('\n')
load_the_os(1);
else:
print("Incorrect password")
try_to_login()
else:
print("Incorrect username")
try_to_login()
username = password = ""
username = str(input("Enter your desired username: "))
password = str(input("Enter your desired password: "))
for i in range(0, 25):
print('\n')
try_to_login()Last edited by ThePCKid (2011-04-17 12:49:29)
Offline
ok.... how do i run it? and where? with what?

Offline
poppypaynterscratch wrote:
ok.... how do i run it? and where? with what?
Download Python 3.1.2 (or greater)
Open this in Python.
Run -> Run module
Python's site: http://python.org/
You can't compile Python files, so I posted the source
Last edited by ThePCKid (2010-07-14 22:13:05)
Offline
ooooooo.... i see, thx
i think i'll need to learn python sometime...
(i've heard they have souls 0w0 )

Offline
It sounds like pie dos.
Offline
lol, but it not working D: says this:
SyntaxError: unexpected character after line continuation character
*************'s-imac:untitled folder **********$
the stars stannd for the machine name

Offline
poppypaynterscratch wrote:
lol, but it not working D: says this:
SyntaxError: unexpected character after line continuation character
*************'s-imac:untitled folder **********$
the stars stannd for the machine name
Weird, it works fine on Windows...
Offline
ThePCKid wrote:
poppypaynterscratch wrote:
lol, but it not working D: says this:
SyntaxError: unexpected character after line continuation character
*************'s-imac:untitled folder **********$
the stars stannd for the machine nameWeird, it works fine on Windows...
huh... should i not replace the spaces with tabs?

Offline
poppypaynterscratch wrote:
ThePCKid wrote:
poppypaynterscratch wrote:
lol, but it not working D: says this:
SyntaxError: unexpected character after line continuation character
*************'s-imac:untitled folder **********$
the stars stannd for the machine nameWeird, it works fine on Windows...
huh... should i not replace the spaces with tabs?
Don't replace anything
Offline
ThePCKid wrote:
poppypaynterscratch wrote:
ThePCKid wrote:
Weird, it works fine on Windows...huh... should i not replace the spaces with tabs?
Don't replace anything
tried again doing that, and it didnt work
me wrote:
me wrote:
me wrote:
boohoo
![]()
Last edited by poppypaynterscratch (2010-07-14 22:39:34)

Offline
Offline
ihaveamac wrote:
It sounds like pie dos.
That's exactly how you say it
Offline
ThePCKid wrote:
ihaveamac wrote:
It sounds like pie dos.
That's exactly how you say it
does it work now? also, i just made this :3
(looks terrible here, awesome in word
)
_________
...—‘’’’ ‘’’’’’--....
.-‘’’ ‘’’-.
/’’ ‘\
/’’ ‘\
/ \
/ \
/ \
|’ ‘|
| |
| .----. .---. |
| ( ) ( ) |
‘| ‘’’’’’ ‘’’’’ |’
\ /
\ /
\ /
\ ‘-----------‘ /
\ /
\ _______________ /
’\ /’
‘-. .-‘
‘-. .-‘
‘ -.. _ _..- ‘
‘’’’’’’’’’’’’’’

Offline
poppypaynterscratch wrote:
ThePCKid wrote:
ihaveamac wrote:
It sounds like pie dos.
That's exactly how you say it
does it work now? also, i just made this :3
(looks terrible here, awesome in word)
_________
...—‘’’’ ‘’’’’’--....
.-‘’’ ‘’’-.
/’’ ‘\
/’’ ‘\
/ \
/ \
/ \
|’ ‘|
| |
| .----. .---. |
| ( ) ( ) |
‘| ‘’’’’’ ‘’’’’ |’
\ /
\ /
\ /
\ ‘-----------‘ /
\ /
\ _______________ /
’\ /’
‘-. .-‘
‘-. .-‘
‘ -.. _ _..- ‘
‘’’’’’’’’’’’’’’
Try this:
Open Notepad (TextEdit if you use a Mac), copy the source in it, from one of the comboboxes choose "All files" (or something like that), and save the file as 'fakeos.py' (without the quotes).
Offline
Offline
Added archive link. Will grow in time.
Offline
Offline
Offline
ok.... i really hate textedit -_- it doesn't have all files option, but you can change the file type after you save it. i mean REALLY? WHAT THE FRUIT. anyways, ill try again....
well, it didnt work. what a surprise. everytime it says that theres an extra character or whatever... will someone else that has a mac try it? and tell me what im doing wrong?
Last edited by poppypaynterscratch (2010-07-17 20:21:26)

Offline
Topic reopened via request of owner.

Offline
I have never tried Python 3.1.3, but I recently installed Python 2.7.1 and 3.2.
In both of those versions, PY-DOS doesn't work. There is no traceback. On every command, even if it's valid, I get my invalid command message that I put in PY-DOS.
Does anyone know how I can fix that?
cheddargirl wrote:
Topic reopened via request of owner.
Thanks!
Last edited by ThePCKid (2011-04-17 12:48:03)
Offline
Well, I just installed a brand-new shiny version of Python 3.2 on my laptop (never got around to it after my hard drive failure a while back) and copied the Python text from your post and pasted it into a text file with a .py extension, then I loaded it into IDLE and it ran perfectly. This is on a Windows PC running Vista Home Premium. So it works for me...
Offline
Paddle2See wrote:
Well, I just installed a brand-new shiny version of Python 3.2 on my laptop (never got around to it after my hard drive failure a while back) and copied the Python text from your post and pasted it into a text file with a .py extension, then I loaded it into IDLE and it ran perfectly. This is on a Windows PC running Vista Home Premium. So it works for me...
It works in IDLE, but it doesn't work in the command line. Do you know how to make it work on the command line? It worked in both IDLE and the command line in 3.1.2...
Offline
Offline
does this work better?
note = ""
def app_note():
global note
print("Welcome to the note app! Here you can write a note and leave it for later.")
print('\n')
if note == "":
areusure = str(input("You don't seem to have a note. Write one now? [Y/N] "))
if areusure == "Y":
note = str(input("Write your note here: "))
print("Note saved")
load_the_os(0)
else:
load_the_os(0)
else:
print("Current note:", note)
areusure = str(input("Make new note? [Y/N] "))
if areusure == "Y":
note = str(input("Write your note here: "))
print("Note saved")
load_the_os(0)
else:
load_the_os(0)
def show_the_ver():
print("PY-DOS v0.3 by ThePCKid on Scratch")
load_the_os(0)
def get_some_help():
print("help Display this help screen")
print("ver Display the version of this fake OS")
print("stop Shutdown PY-DOS")
print("logout Logout of PY-DOS")
print("note Launch the note app")
load_the_os(0)
def load_the_os(i):
if i == 1:
print("Type 'help' for help")
print("Please note that because PY-DOS is written in Python, command names, usernames, and passwords are case-sensitive.")
inpt = str(input(">"))
if inpt == "help":
get_some_help()
elif inpt == "ver":
show_the_ver()
elif inpt == "stop":
areusure = str(input("Are you sure? [Y/N] "))
if areusure == "Y":
pass
else:
load_the_os(0)
elif inpt == "logout":
for i in range(0, 15):
print('\n')
try_to_login()
elif inpt == "note":
app_note()
else:
print("Unknown command. Try 'help' to get a list of known commands.")
load_the_os(0)
def try_to_login():
tempuser = temppass = ""
tempuser = str(input("Username: "))
temppass = str(input("Password: "))
if tempuser == username:
if temppass == password:
print("Logged in!")
for i in range(0, 25):
print('\n')
load_the_os(1);
else:
print("Incorrect password")
try_to_login()
else:
print("Incorrect username")
try_to_login()
username = password = ""
username = str(input("Enter your desired username: "))
password = str(input("Enter your desired password: "))
for i in range(0, 25):
print('\n')
try_to_login()
Offline