Re: Simple import question about mac osx

2008-04-29 Thread ivan
On Apr 29, 3:47 pm, "Jerry Hill" <[EMAIL PROTECTED]> wrote: > When you run your code in pythonwin, it's just like calling 'python -i > chap2.py'  It runs the code in chap2.py, then gives you an interpreter > window to interact with your code.  In this case, that means that > FooClass is visible wit

Re: Simple import question about mac osx

2008-04-29 Thread Jerry Hill
On Tue, Apr 29, 2008 at 3:17 PM, jmDesktop <[EMAIL PROTECTED]> wrote: > On Windows I took the text file I created on mac with vi and opened it > in PythonWin. I ran it. It compiled. I run the import and call from > the python interpreter. You're not doing what you think you're doing. I'm no

Re: Simple import question about mac osx

2008-04-29 Thread s0suk3
On Apr 29, 2:17 pm, jmDesktop <[EMAIL PROTECTED]> wrote: > On Apr 29, 2:37 pm, "Jerry Hill" <[EMAIL PROTECTED]> wrote: > > > > > On Tue, Apr 29, 2008 at 2:14 PM, jmDesktop <[EMAIL PROTECTED]> wrote: > > > Thanks. That worked on mac. But it does work like I said in > > > Windows. Don't know why

Re: Simple import question about mac osx

2008-04-29 Thread jmDesktop
On Apr 29, 2:37 pm, "Jerry Hill" <[EMAIL PROTECTED]> wrote: > On Tue, Apr 29, 2008 at 2:14 PM, jmDesktop <[EMAIL PROTECTED]> wrote: > >  Thanks.  That worked on mac.  But it does work like I said in > >  Windows.  Don't know why.  Mr. Chun must also be using Windows because > >  that is the way he

Re: Simple import question about mac osx

2008-04-29 Thread Jerry Hill
On Tue, Apr 29, 2008 at 2:14 PM, jmDesktop <[EMAIL PROTECTED]> wrote: > Thanks. That worked on mac. But it does work like I said in > Windows. Don't know why. Mr. Chun must also be using Windows because > that is the way he does it in his book. It shouldn't work that way on windows either.

Re: Simple import question about mac osx

2008-04-29 Thread jmDesktop
On Apr 29, 1:54 pm, [EMAIL PROTECTED] wrote: > On Apr 29, 12:46 pm, jmDesktop <[EMAIL PROTECTED]> wrote: > > > > > > > On Apr 29, 1:16 pm, jmDesktop <[EMAIL PROTECTED]> wrote: > > > > Hi, I have this code (learning from Core Python, Chun's book), module > > > named chap2.py. > > > > class FooClass(

Re: Simple import question about mac osx

2008-04-29 Thread s0suk3
On Apr 29, 12:46 pm, jmDesktop <[EMAIL PROTECTED]> wrote: > On Apr 29, 1:16 pm, jmDesktop <[EMAIL PROTECTED]> wrote: > > > > > Hi, I have this code (learning from Core Python, Chun's book), module > > named chap2.py. > > > class FooClass(object): > > version=0.1 > > > def __init__(s

Re: Simple import question about mac osx

2008-04-29 Thread jmDesktop
On Apr 29, 1:16 pm, jmDesktop <[EMAIL PROTECTED]> wrote: > Hi, I have this code (learning from Core Python, Chun's book), module > named chap2.py. > > class FooClass(object): >         version=0.1 > >         def __init__(self, nm='John Doe'): >                 self.name=nm >                 print

Simple import question about mac osx

2008-04-29 Thread jmDesktop
Hi, I have this code (learning from Core Python, Chun's book), module named chap2.py. class FooClass(object): version=0.1 def __init__(self, nm='John Doe'): self.name=nm print 'Created a class instance for ', nm def showname(self):