shawn bright wrote:
> great, saves me 15 lines.
> thanks
You have 15 lines of imports?
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
great, saves me 15 lines.
thanks
sk
On 2/11/07, Kent Johnson <[EMAIL PROTECTED]> wrote:
shawn bright wrote:
> one last queston. if i have a class that i import as a module, say a
> script that emails me when something goes wrong.
> so i have a file called my_own_email.py and in it a class call
shawn bright wrote:
> one last queston. if i have a class that i import as a module, say a
> script that emails me when something goes wrong.
> so i have a file called my_own_email.py and in it a class called
> MyOwnEmail. Now MyOwnEmail needs the smtplib module. Do i need to import
> it just fo
Yes, Mr Gauld, this is a help. Even though i am still newbie enough to take
some time digesting it.
one last queston. if i have a class that i import as a module, say a script
that emails me when something goes wrong.
so i have a file called my_own_email.py and in it a class called MyOwnEmail.
No
> i have two classes in my program that use a global object
> that is a socket connection.
> ... code snipped
> is there something tricky about passing this as a global object to
> different modules that would need to use it?
Whiler its possible to use a global in this way its usually better to
ok, i have started doing this with my 4000 + line file. So far its been
working out.
i have another question about it.
i have two classes in my program that use a global object that is a socket
connection.
example:
global my_sockobj
serverhost = 'mehost.com'
serverport = 9100
my_sockobj = socke
"shawn bright" <[EMAIL PROTECTED]> wrote
> Yes, the thing is getting to be a pain to deal with at this size, i
> am
> in-process of splitting out the classes into their own files.
One thing to watch is that while its easy and tempting to create
one file per class it's often better to keep depend
Thanks, Alan.
Yes, the thing is getting to be a pain to deal with at this size, i am
in-process of splitting out the classes into their own files.
Thanks for your help.
shawn
On 12/30/06, Alan Gauld <[EMAIL PROTECTED]> wrote:
"shawn bright" <[EMAIL PROTECTED]> wrote i
> testing this right aw
"shawn bright" <[EMAIL PROTECTED]> wrote i
> testing this right away. This long a .py script is becomming a
> headache and
> i think it will be easier by far if it is pulled apart somewhat.
As a general rule of thumb, any Python script (or any programming
language file for that matter!) that ge
great help, and great link, thanks again.
shawn
On 12/30/06, Kent Johnson <[EMAIL PROTECTED]> wrote:
shawn bright wrote:
> Kent, Thanks.
> this is great. Yes, when i start the thread, i also pass the gtk object
> to it.
> kinda like this.
>
> serial_1 = Serial1(self.serial_1_buffer, self.serial
shawn bright wrote:
> Kent, Thanks.
> this is great. Yes, when i start the thread, i also pass the gtk object
> to it.
> kinda like this.
>
> serial_1 = Serial1(self.serial_1_buffer, self.serial_1_view)
> serial_1.start()
>
> so i am wanting to change that, but i do not exactly know how to stop
Kent, Thanks.
this is great. Yes, when i start the thread, i also pass the gtk object to
it.
kinda like this.
serial_1 = Serial1(self.serial_1_buffer, self.serial_1_view)
serial_1.start()
so i am wanting to change that, but i do not exactly know how to stop a
thread once i have it running, so th
shawn bright wrote:
> Hello there all.
> i have an app that has grown to about 4000 lines. It uses 6 threads and
> a GTK2 GUI.
> i was wondering if i could split it into seperate files that i could
> import. Each thread is a class.
That should be fine.
> i did not think that this would be a pro
Hello there all.
i have an app that has grown to about 4000 lines. It uses 6 threads and a
GTK2 GUI.
i was wondering if i could split it into seperate files that i could import.
Each thread is a class.
i did not think that this would be a problem, but some of the threads pass
information to views
14 matches
Mail list logo