Re: Two Classes In Two Files

2006-08-10 Thread Sion Arrowsmith
Pedro Werneck <[EMAIL PROTECTED]> wrote: >"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: >> Wasn't so much a worry, just trying to figure out how to think the >> python way. >Seems like you're thinking the Java way... if you don't want to do it, >put both classes in the same file. OP: think of a

Re: Two Classes In Two Files

2006-08-10 Thread Thomas Nelson
Perhaps __init__.py has what you're looking for? THN [EMAIL PROTECTED] wrote: > I just started working with Python and ran into an annoyance. Is there > a way to avoid having to use the "from xxx import yyy" syntax from > files in the same directory? I'm sure it's been asked a million times, > b

Re: Two Classes In Two Files

2006-08-10 Thread Ant
[EMAIL PROTECTED] wrote: > Yes, I have been ruined for the last 5 years with Java and C#. Perl was > my only salvation, but now I can't read the programs I wrote. ROFL! That's got to be a contender for Quote of the week. -- http://mail.python.org/mailman/listinfo/python-list

Re: Two Classes In Two Files

2006-08-10 Thread [EMAIL PROTECTED]
Yes, I have been ruined for the last 5 years with Java and C#. Perl was my only salvation, but now I can't read the programs I wrote. Pedro Werneck wrote: > On 9 Aug 2006 12:35:48 -0700 > "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > > > > > It's just the way it is. Why worry about it? > > >

Re: Two Classes In Two Files

2006-08-09 Thread Gabriel Genellina
At Wednesday 9/8/2006 16:24, [EMAIL PROTECTED] wrote: I just started working with Python and ran into an annoyance. Is there a way to avoid having to use the "from xxx import yyy" syntax from files in the same directory? I'm sure it's been asked a million times, but I can't seem to find the answ

Re: Two Classes In Two Files

2006-08-09 Thread Pedro Werneck
On 9 Aug 2006 12:35:48 -0700 "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > > It's just the way it is. Why worry about it? > > Wasn't so much a worry, just trying to figure out how to think the > python way. Seems like you're thinking the Java way... if you don't want to do it, put both cla

Re: Two Classes In Two Files

2006-08-09 Thread [EMAIL PROTECTED]
> It's just the way it is. Why worry about it? Wasn't so much a worry, just trying to figure out how to think the python way. Max M wrote: > [EMAIL PROTECTED] wrote: > > I just started working with Python and ran into an annoyance. Is there > > a way to avoid having to use the "from xxx import yy

Re: Two Classes In Two Files

2006-08-09 Thread bearophileHUGS
[EMAIL PROTECTED]: > Is there > a way to avoid having to use the "from xxx import yyy" syntax from > files in the same directory? You can just use: import xxx and then: class Two(xxx.One): ... If you don't want to use the import line, you have to put the two classes into the same module. By

Re: Two Classes In Two Files

2006-08-09 Thread Max M
[EMAIL PROTECTED] wrote: > I just started working with Python and ran into an annoyance. Is there > a way to avoid having to use the "from xxx import yyy" syntax from > files in the same directory? I'm sure it's been asked a million times, > but I can't seem to find the answer. Probably none that

Two Classes In Two Files

2006-08-09 Thread [EMAIL PROTECTED]
I just started working with Python and ran into an annoyance. Is there a way to avoid having to use the "from xxx import yyy" syntax from files in the same directory? I'm sure it's been asked a million times, but I can't seem to find the answer. For example, I have two classes stored in separate f