In article
<[EMAIL PROTECTED]>,
Lie <[EMAIL PROTECTED]> wrote:
> On Jun 19, 7:21 pm, Ulrich Eckhardt <[EMAIL PROTECTED]> wrote:
> > John Dann wrote:
> > > Let's say I define the class in a module called comms.py. The class
> > > isn't really going to inherit from any other class (except presumab
On Jun 19, 10:49 pm, Ulrich Eckhardt <[EMAIL PROTECTED]> wrote:
> Lie wrote:
> > I think it's not that hard to see that it's just a pseudo code
>
> "...in comms.py I have: ..." actually explicitly says that it is actual code
> from a file.
>
> *shrug*
>
> Uli
>
I'm not sure how you think saying 'i
John Dann <[EMAIL PROTECTED]> wrote:
> Yes I was wondering about that, but I wasn't clear about when 'body'
> code (ie not contained within a def block) in the module might run
> under Python. So it seemed to be safer to place the import statement
> inside the 'constructor' to get the earliest war
>
> Yes I was wondering about that, but I wasn't clear about when 'body'
> code (ie not contained within a def block) in the module might run
> under Python. So it seemed to be safer to place the import statement
> inside the 'constructor' to get the earliest warning of non-visibility
> of pyserial
Many thanks for the further comments:
On Thu, 19 Jun 2008 21:24:31 -0400, Terry Reedy <[EMAIL PROTECTED]>
wrote:
>> def __init__(self):
>> Try
>> Import serial # the pyserial library
>The import should be at module level. You only want to do it once, not
John Dann wrote:
Let's say I define the class in a module called comms.py. The class
isn't really going to inherit from any other class (except presumably
in the most primitive base-class sense, which is presumably automatic
and implicit in using the class keyword). Let's call the class
serial
Lie wrote:
> I think it's not that hard to see that it's just a pseudo code
"...in comms.py I have: ..." actually explicitly says that it is actual code
from a file.
*shrug*
Uli
--
Sator Laser GmbH
Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932
--
http://mail.python.org/ma
On Jun 19, 7:21 pm, Ulrich Eckhardt <[EMAIL PROTECTED]> wrote:
> John Dann wrote:
> > Let's say I define the class in a module called comms.py. The class
> > isn't really going to inherit from any other class (except presumably
> > in the most primitive base-class sense, which is presumably automat
Le Thursday 19 June 2008 15:13:39 John Dann, vous avez écrit :
> Many thanks for the speedy replies.
>
> On Thu, 19 Jun 2008 14:14:02 +0200, Cédric Lucantis <[EMAIL PROTECTED]>
>
> wrote:
> >Le Thursday 19 June 2008 13:54:03 John Dann, vous avez écrit :
> >> Let's say I define the class in a module
Many thanks for the speedy replies.
On Thu, 19 Jun 2008 14:14:02 +0200, Cédric Lucantis <[EMAIL PROTECTED]>
wrote:
>Le Thursday 19 June 2008 13:54:03 John Dann, vous avez écrit :
>> Let's say I define the class in a module called comms.py. The class
>> isn't really going to inherit from any other
John Dann wrote:
> Let's say I define the class in a module called comms.py. The class
> isn't really going to inherit from any other class (except presumably
> in the most primitive base-class sense, which is presumably automatic
> and implicit in using the class keyword). Let's call the class
> s
On Jun 19, 6:54 pm, John Dann <[EMAIL PROTECTED]> wrote:
> A Python newbie, but some basic understanding of how classes, objects
> etc work in eg VB.Net. However, I'm struggling a little to translate
> this knowledge into the Python context.
>
> I'm trying to teach myself this aspect of Python by w
Le Thursday 19 June 2008 13:54:03 John Dann, vous avez écrit :
> A Python newbie, but some basic understanding of how classes, objects
> etc work in eg VB.Net. However, I'm struggling a little to translate
> this knowledge into the Python context.
>
> Maybe I could provide some outline code as an i
13 matches
Mail list logo