Re: [Tutor] about reload

2006-12-30 Thread Luke Paireepinart
> I got confused now:-> if IDLE keeps the imports in between runs of the > program, do I still need import and reload? or click F5 in IDLE is OK? > The purpose of import is so that python knows what packages you intend to use, because if it imported every package every time, then many bad things

[Tutor] question about importing threads

2006-12-30 Thread shawn bright
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

Re: [Tutor] XML-RPC data transfers.

2006-12-30 Thread Kent Johnson
Chris Hengge wrote: > I might have been unclear, or this tid-bit might have been lost in the > thread... but I'm trying to send directly from ImageGrab.Grab(), without > saving the data as a file. Thats where I'm getting hung... If it try to > send an actual stored file, I have no problem. Is th

Re: [Tutor] question about importing threads

2006-12-30 Thread Kent Johnson
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

Re: [Tutor] question about importing threads

2006-12-30 Thread shawn bright
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

Re: [Tutor] question about importing threads

2006-12-30 Thread Kent Johnson
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

Re: [Tutor] question about importing threads

2006-12-30 Thread shawn bright
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

Re: [Tutor] question about importing threads

2006-12-30 Thread Alan Gauld
"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

Re: [Tutor] about reload

2006-12-30 Thread linda.s
On 12/30/06, Luke Paireepinart <[EMAIL PROTECTED]> wrote: > > > I got confused now:-> if IDLE keeps the imports in between runs of the > > program, do I still need import and reload? or click F5 in IDLE is OK? > > > The purpose of import is so that python knows what packages you intend > to use, >

Re: [Tutor] XML-RPC data transfers.

2006-12-30 Thread Chris Hengge
if I'm trying to transmit a 'file' that is actually saved on the HD, the code from the link in my first post works fine (reading in the file using binary mode access). My problem is that I'm trying to figure out how to transfer data that isn't yet saved to the drive, because I'm wanting to be able

Re: [Tutor] XML-RPC data transfers.

2006-12-30 Thread Chris Hengge
This works... d = xmlrpclib.Binary(open("C:\\somefile.exe", "rb").read()) What I need is more like screenShot = ImageGrab.Grab() d = xmlrpclib.Binary(screenShot) This doesn't work though. On 12/30/06, Kent Johnson <[EMAIL PROTECTED]> wrote: Chris Hengge wrote: > I might have been unclear, or

Re: [Tutor] XML-RPC data transfers.

2006-12-30 Thread Luke Paireepinart
Chris Hengge wrote: > if I'm trying to transmit a 'file' that is actually saved on the HD, > the code from the link in my first post works fine (reading in the > file using binary mode access). My problem is that I'm trying to > figure out how to transfer data that isn't yet saved to the drive,

Re: [Tutor] XML-RPC data transfers.

2006-12-30 Thread Luke Paireepinart
Chris Hengge wrote: > This works... > d = xmlrpclib.Binary(open("C:\\somefile.exe", "rb").read()) > > What I need is more like > screenShot = ImageGrab.Grab() > d = xmlrpclib.Binary(screenShot) because screenShot is not binary data. It's an instance of the class Image.

Re: [Tutor] XML-RPC data transfers.

2006-12-30 Thread Chris Hengge
First off, thanks for the info luke, I'll give these idea's a shot. Second, I fully understand the wow factor from figuring out stuff on my own, but I also work fulltime and attend roughly 20 credits of college a term, while taking care of my family/homelife and this xmas break is one of the few c

Re: [Tutor] XML-RPC data transfers.

2006-12-30 Thread Kent Johnson
Chris Hengge wrote: > if I'm trying to transmit a 'file' that is actually saved on the HD, the > code from the link in my first post works fine (reading in the file > using binary mode access). My problem is that I'm trying to figure out > how to transfer data that isn't yet saved to the drive,

Re: [Tutor] XML-RPC data transfers.

2006-12-30 Thread Kent Johnson
Luke Paireepinart wrote: > But the main strategy is to get the data out of the ImageGrab object. > one way is stated above - use the save method to write to a file. > another possible way is to create a filelike class, implementing 'tell' > 'seek' and 'write' methods, that just collects all the d

[Tutor] Starting python from a DOS prompt from any directory?

2006-12-30 Thread Daniel McQuay
hello fellow programmers, newbie question here and this isn't much a programming question as it is a windows and python question, so sorry in advance. i have been having what i think is a problem with running python on windows from a DOS prompt. i am used to running python from a linux box where