Okay, I just learned that in order to call a program I made in python, say, myfile.pyw, into a seperate program (say, other.pyw) I would use
execfile('myfile.pyw')
instead of
import myfile.pyw
. I did that, and get one of those ever so helpful traceback errors saying that 'start', the user input value that is supposed to call
execfile('myfile.pyw')
is not defined. But, I defined 'start' along with it's alternative 'begin' in prompt_st(). Now, my function dencodefun() calls prompt_st() for user input, and all works fine up until their.
I honestly cannot figure out where the heck I am going wrong.
def prompt_st():
prompt_c = raw_input("Tell Sally:").lower()
if prompt_c == "help":
print '''Well, hello Denay, I assume you need some help with Codex? Alright.
When you first load the program, you come to the main menu screen. Here you will
choose an option that best suits your needs.
Choose option (1) to Encode, or translate readable messages into Ceaser Salad code.
Choose option (2) to Decode, or, translate Ceaser Salad code into readable words.
Option number (3) will tell you alittle more about Codex v1.0, while
Option number (4) will exit the program. REMEMBER Denay, when making a selection, type
in the number of the action you wish to make, not the words. To begin the fun, type
'start'. '''
elif prompt_c == "start" or prompt_c == "begin":
execfile('pymat2000.pyw')
else:
print "I am yet still very young, could you type everything out so I can understand?"
prompt_st()
NOTE: this is not the entire source, I assumed that you would only need this function seeing as it is where the problem is (i hope). If you can't find anything in here, then I will have to start looking at the other functions.
Thanks!