global variables and local functions.
astrophels at yahoo.com
Thu Aug 29 06:11:31 CEST 2002
Mark McEahern wrote:
> [Micah Mayo]
>>Basically here's what I'm trying to do:
>>list1 = 
>>list2 = 
>>global_int = 0
> I'm sorry, but I find it hard to follow pseudocode and intuit how that's
> related to the real error you're getting.
sourcePath = 
destPath = 
mlistLen = 0
textFile = open('movelist')
for eachLine in textFile.readlines():
source, dest = eachLine.split()
mlistLen += 1
for x in range(mlistLen):
So, that's the part that doesn't work almost line for line.
> Please do the hard work of posting a complete but abbreviated version of
> your code that actually generates the error you're seeing. Chances are,
> you'll solve your own problem in the process.
> There's a reason people eschew global variables, by the way. <wink>
Which is? I've been programming since Monday, so I'm pretty new at this. :)
> // mark
More information about the Python-list