Re: [Tutor] function won't import from module

2005-08-09 Thread Dick Moores
Alan G wrote at 03:22 8/9/2005: >>I tried deleting a mycalc.pyc that had been created and the problem >>cleared up! If I remember correctly, for a while I had moved mycalc.py >>to another folder in PYTHONPATH (I had recently learned how to modify >>PYTHONPATH in Win XP), and the .pyc was in this

Re: [Tutor] function won't import from module

2005-08-09 Thread Alan G
> I tried deleting a mycalc.pyc that had been created and the problem > cleared up! If I remember correctly, for a while I had moved > mycalc.py to another folder in PYTHONPATH (I had recently learned > how to modify PYTHONPATH in Win XP), and the .pyc was in this > folder. Sorry I don't rememb

Re: [Tutor] function won't import from module

2005-08-09 Thread Dick Moores
Alan G wrote at 00:42 8/9/2005: >Dick, > >I can't see a problem but I notice an inconsistency below: > >>#testof_cmpSeq.py >>import mycalc > >>which produces: >> >>Traceback (most recent call last): >> File "C:\Python24\MyScripts\testof_cmpSeq.py", line 1, in -toplevel- >> from mycalc import

Re: [Tutor] function won't import from module

2005-08-09 Thread Alan G
Dick, I can't see a problem but I notice an inconsistency below: > #testof_cmpSeq.py > import mycalc > which produces: > > Traceback (most recent call last): > File "C:\Python24\MyScripts\testof_cmpSeq.py", line 1, > in -toplevel- > from mycalc import cmpSeq > ImportError: cannot import n

Re: [Tutor] function won't import from module

2005-08-08 Thread Javier Ruere
Dick Moores wrote: > I have a bunch of functions I've collected in one script, "mycalc.py", > which I use as a module, "mycalc". The last one I wrote, cmpSeq() is as > follows: > [code] > > In a script, cmpSeq() works fine. For example followed by > [example] > > The output is: > [output] > > c

[Tutor] function won't import from module

2005-08-08 Thread Dick Moores
I have a bunch of functions I've collected in one script, "mycalc.py", which I use as a module, "mycalc". The last one I wrote, cmpSeq() is as follows: ===begin code== def cmpSeq(seq1, seq2): """ find first index at which two sequences differ """ if seq1 =