Re: [Tutor] Threading + socket server (blocking IO)

2006-02-06 Thread Liam Clarke
On 2/7/06, Kent Johnson <[EMAIL PROTECTED]> wrote: > Liam Clarke wrote: > > Hi all, > > > > About to embark on my first foray into threading, and rather unsure of > > initial approach. I have a basic UDPServer from SocketServer running > > using serve_forever(). I'd like to stick this in a thread w

Re: [Tutor] Changing instance attributes in different threads

2006-02-06 Thread Bernard Lebel
Hi Kent, I have put together a little script to give a rough idea about what the program does. http://www.bernardlebel.com/scripts/nonxsi/help/bl_threadtest.py The true program does this: - the top program file imports a module called fcJob - the top program instantiate the only class in the

Re: [Tutor] Sharing Variables Across Modules

2006-02-06 Thread Rich Shepard
On Mon, 6 Feb 2006, Rich Shepard wrote: > So, now the entered name displays in the TextCtrl widget, but it's not > being assigned to the variable, modName, in the modModel class. But, I think > that I have a better understanding now of what's going on and, with some > trial and error exploration

Re: [Tutor] Sharing Variables Across Modules

2006-02-06 Thread Rich Shepard
On Mon, 6 Feb 2006, Andre Roberge wrote: I would *guess* that you'd want instead something like tcName = self.myNotebook.modModel.tcName André, You got me looking in the right direction. What works is: tcName = self.mainNB.pane_1.tcName So, now the entered name displays in the TextCtr

Re: [Tutor] Sharing Variables Across Modules

2006-02-06 Thread Kent Johnson
Rich Shepard wrote: >I'm developing a wxPython-based application. The UI is a notebook, with the > contents of each page in a separate module. In one module (modelPage.py), I > have defined the class modModel, which is an instance of a wx.Panel class. > Within modModel is a text control widget

Re: [Tutor] Sharing Variables Across Modules

2006-02-06 Thread Andre Roberge
On 2/6/06, Rich Shepard <[EMAIL PROTECTED]> wrote: >I'm developing a wxPython-based application. The UI is a notebook, with the > contents of each page in a separate module. In one module (modelPage.py), I > have defined the class modModel, which is an instance of a wx.Panel class. > Within mod

[Tutor] Sharing Variables Across Modules

2006-02-06 Thread Rich Shepard
I'm developing a wxPython-based application. The UI is a notebook, with the contents of each page in a separate module. In one module (modelPage.py), I have defined the class modModel, which is an instance of a wx.Panel class. Within modModel is a text control widget named tcName. The main m

Re: [Tutor] Changing instance attributes in different threads

2006-02-06 Thread Kent Johnson
Bernard Lebel wrote: > Example: > > - Class instance Bernard has attribute "name", whose value is "bernard". > - A function in a thread tests the value of "name". If "name" == > "bernard", do nothing. > - A function in another thread, for some reason, changes "name" to "bob". > - The first functio

Re: [Tutor] question about ascii and bytes

2006-02-06 Thread Alan Gauld
> the server wants to get info a certain way. Each message has to start > with an ascii "STX" (literally the three letters, not the standart ascii > 'STX') then it has to have another four bytes that give the length of > the message, then the message itself, then end with an ascii "ENX" > (again,t

Re: [Tutor] Changing instance attributes in different threads

2006-02-06 Thread Bernard Lebel
hi Kent, See [Bernard] below. On 2/6/06, Kent Johnson <[EMAIL PROTECTED]> wrote: > Bernard Lebel wrote: > > Hello, > > > > I have an instance attribute (a few characters string) that two > > separate threads may change, potentially both at the same time. > > My program doesn't implement thread s

Re: [Tutor] Dictionaries versus classes

2006-02-06 Thread Alan Gauld
> In the end my program will have to create a printed representation of a > certain number of "things" ... each thing will also have to have a series > of > other attributes ... which will change during the process of assigning > content (for instance: once content 'A' is assigned to foo, bar > i

Re: [Tutor] Changing instance attributes in different threads

2006-02-06 Thread Kent Johnson
Bernard Lebel wrote: > Hello, > > I have an instance attribute (a few characters string) that two > separate threads may change, potentially both at the same time. > My program doesn't implement thread safety for this particular task. > > So far I have never run into issues with this, but I have

Re: [Tutor] IDE - Editors - Python

2006-02-06 Thread Alan Gauld
> Avoid debuggers like a plague. If someone applies for a job > with us and starts talking about their proficiency in > debuggers, the interview stops right there and we keep looking. grin noted but seriously, why? I tend to take the opposite approach. A good understanding of de

Re: [Tutor] IDE - Editors - Python

2006-02-06 Thread Tim Johnson
* Danny Yoo <[EMAIL PROTECTED]> [060206 09:57]: > >Avoid debuggers like a plague. If someone applies for a job > > with us and starts talking about their proficiency in > > debuggers, the interview stops right there and we keep looking. > > Hi Tim, Hey Danny: > Seriously

Re: [Tutor] First Gui App - Please scrutinize

2006-02-06 Thread John Fouhy
On 07/02/06, Paul Kraus <[EMAIL PROTECTED]> wrote: > This is my first gui application. It just takes a percentage and then based on > some options calculates a new price. Ok.. A few minor comments --- > class Application( Frame ): > """ Price Calc GUI """ > def __init__( self, master): >

[Tutor] question about ascii and bytes

2006-02-06 Thread nephish
ok, so i have sparce documentation from a server that i need to make a socket connection with. the server wants to get info a certain way. Each message has to start with an ascii "STX" (literally the three letters, not the standart ascii 'STX') then it has to have another four bytes that give the

Re: [Tutor] IDE - Editors - Python

2006-02-06 Thread Tim Johnson
* Marilyn Davis <[EMAIL PROTECTED]> [060206 11:30]: > On Mon, 6 Feb 2006, Danny Yoo wrote: > > > >Avoid debuggers like a plague. If someone applies for a job > > > with us and starts talking about their proficiency in > > > debuggers, the interview stops right there and we ke

[Tutor] Changing instance attributes in different threads

2006-02-06 Thread Bernard Lebel
Hello, I have an instance attribute (a few characters string) that two separate threads may change, potentially both at the same time. My program doesn't implement thread safety for this particular task. So far I have never run into issues with this, but I have been reading about data corruption

[Tutor] First Gui App - Please scrutinize

2006-02-06 Thread Paul Kraus
This is my first gui application. It just takes a percentage and then based on some options calculates a new price. --- #!/usr/bin/python from Tkinter import * class Application( Frame ): """ Price Calc GUI """ def __init__( self, master): Frame.__

Re: [Tutor] IDE - Editors - Python

2006-02-06 Thread Marilyn Davis
On Mon, 6 Feb 2006, Danny Yoo wrote: > >Avoid debuggers like a plague. If someone applies for a job > > with us and starts talking about their proficiency in > > debuggers, the interview stops right there and we keep looking. I can see that bragging about "proficiency in deb

Re: [Tutor] IDE - Editors - Python

2006-02-06 Thread Alan Gauld
> Which editors does everyone use and why. Please keep the discussion to > IDE's Another hotly debated topic. What do you define as requyirements of an IDE? To me Unix is the best IDE I've ever used, but others would challenge my definition of an IDE... > rather then any editors. I am well ver

Re: [Tutor] GUI Development - Which toolkit

2006-02-06 Thread Alan Gauld
>I am developing applications that need to run without work on both windows >and > linux and was wondering what gui toolkits everyone uses and why. > > I have been looking at wxpython and tkinter. If you just wqant to wrap up some scropts Tkinter is probably slightly easier to use (IMHO), but it

Re: [Tutor] Debugger Needed

2006-02-06 Thread Alan Gauld
> A new "beautiful" Debugger is winpdb. > Also on Sourceforge. It looked nice and I tried it a few months back but it hung up on me a few times so I left it to "mature" for later.. :-) Alan G. ___ Tutor maillist - Tutor@python.org http://mail.python.

Re: [Tutor] installing python on windows and macs

2006-02-06 Thread Alan Gauld
> Also, it is really boring to go through ./configure, make and make > install. Why it is not as convenient as Windows? Aha! Thats because you are installing from source. If you visit the MacPython site you will find a normal Mac install package. You just drop it on the Desktop (or anywhere else!

Re: [Tutor] installing python on windows and macs

2006-02-06 Thread Ian Jones
In article <[EMAIL PROTECTED]>, "linda.s" <[EMAIL PROTECTED]> wrote: > Where is the binary Python 2.4.2 for Mac? I could not find it, > Thanks! You can download a Mac installer for Python 2.4.1 here: http://undefined.org/python/ If you're on Tiger (OS X 10.4), you should also install the Ti

Re: [Tutor] IDE - Editors - Python

2006-02-06 Thread Mike Hansen
> Subject: > [Tutor] IDE - Editors - Python > From: > Paul Kraus <[EMAIL PROTECTED]> > Date: > Mon, 6 Feb 2006 09:46:42 -0500 > To: > tutor@python.org > > To: > tutor@python.org > > > Which editors does everyone use and why. Please keep the discussion to IDE's > rather then any editors. I am we

Re: [Tutor] Dictionaries versus classes

2006-02-06 Thread Kent Johnson
Michele Alzetta wrote: > In the end my program will have to create a printed representation of a > certain number of "things" which are characterized by each having a time > attribute (moment when they start, moment when they end); each "thing" > will have to be filled in by a certain content, c

Re: [Tutor] IDE - Editors - Python

2006-02-06 Thread Andre Roberge
On 2/6/06, Tim Johnson <[EMAIL PROTECTED]> wrote: > * Paul Kraus <[EMAIL PROTECTED]> [060206 06:04]: > > Which editors does everyone use and why. Please keep the discussion to IDE's > > rather then any editors. I am well versed on Emacs and VI so anything beyond > > them would be appreciative. Why

Re: [Tutor] IDE - Editors - Python

2006-02-06 Thread Danny Yoo
>Avoid debuggers like a plague. If someone applies for a job > with us and starts talking about their proficiency in > debuggers, the interview stops right there and we keep looking. Hi Tim, Seriously? I know that the implication is that sufficient test cases and design wil

Re: [Tutor] installing python on windows and macs

2006-02-06 Thread Danny Yoo
> Thanks for your kindness. The version of My Mac is > Mac OX 10.4.4; I guess that Python 2.3.5 has been installed before. > Now I tried to install Python 2.4.2; Hi Linda, Ah, ok, then the long "installation" time you are seeing is perfectly normal, and the comparison you're making between the i

[Tutor] Dictionaries versus classes

2006-02-06 Thread Michele Alzetta
Hi all,   after a longish pause I've taken up my pet python project again (must say that the decisive factor was the discovery of how easy it is to code the GUI with QT designer and pyqt).   The core of the problem I'm facing, however, is not the GUI, it is conceptual.   In the end my program will

Re: [Tutor] IDE - Editors - Python

2006-02-06 Thread Tim Johnson
* Paul Kraus <[EMAIL PROTECTED]> [060206 06:04]: > Which editors does everyone use and why. Please keep the discussion to IDE's > rather then any editors. I am well versed on Emacs and VI so anything beyond > them would be appreciative. Why you like the editor and how it helps reduce > your deve

Re: [Tutor] IDE - Editors - Python

2006-02-06 Thread Rinzwind
When you code with Python there's only 1 editor Boa Constructor Even the name owns any other editor :-)http://boa-constructor.sourceforge.net/ ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] GUI Development - Which toolkit

2006-02-06 Thread Michael Lange
On Mon, 6 Feb 2006 09:44:48 -0500 Paul Kraus <[EMAIL PROTECTED]> wrote: > I am developing applications that need to run without work on both windows > and > linux and was wondering what gui toolkits everyone uses and why. > > I have been looking at wxpython and tkinter. > I have only used Tki

Re: [Tutor] Threading + socket server (blocking IO)

2006-02-06 Thread Matthew Webber
>> The GIL prevents Python from effectively running multiple threads on multiple processors. This statement is slightly misleading. You can run multiple threads on a multi-processor system quite effectively, the limitation of the GIL is simply that you can typically utilize only one processor at

Re: [Tutor] Threading + socket server (blocking IO)

2006-02-06 Thread Kent Johnson
Matthew Webber wrote: >>>The GIL prevents Python from effectively running multiple threads on > > multiple processors. > > This statement is slightly misleading. You can run multiple threads on a > multi-processor system quite effectively, the limitation of the GIL is > simply that you can typic

[Tutor] IDE - Editors - Python

2006-02-06 Thread Paul Kraus
Which editors does everyone use and why. Please keep the discussion to IDE's rather then any editors. I am well versed on Emacs and VI so anything beyond them would be appreciative. Why you like the editor and how it helps reduce your development time would be productive and helpfull. TIA, --

[Tutor] GUI Development - Which toolkit

2006-02-06 Thread Paul Kraus
I am developing applications that need to run without work on both windows and linux and was wondering what gui toolkits everyone uses and why. I have been looking at wxpython and tkinter. Thanks in advance, -- Paul Kraus =-=-=-=-=-=-=-=-=-=-= PEL Supply Company Network Administrator 216.267.57

Re: [Tutor] Copy files

2006-02-06 Thread David Holland
Alan,Thanks for that.  I had the wrong file names, now it works, in case anyone is interested here is the code.  I use it because at work I need to change different versions of sqlnet.ora :-def compare_files(file_name1, file_name2):     x = filecmp.cmp (file_name1, file_name2)     print

Re: [Tutor] Documentation

2006-02-06 Thread Kent Johnson
Paul Kraus wrote: > I have been working through a couple of books and learning alot. However I > can't seem to find any easy way to learn more about different methods and > commands. > > For instance what are all of the methods that can be applied to lists and > what > do they do and how do th

Re: [Tutor] Threading + socket server (blocking IO)

2006-02-06 Thread Kent Johnson
Liam Clarke wrote: > Is this going to be possible? I've been reading about GIL and what not > in the Tutor archives and this presentation here - > http://starship.python.net/crew/aahz/OSCON2001/ but I'm a little > unsure as to what is possible. Python has good support for multiple threads running

Re: [Tutor] Threading + socket server (blocking IO)

2006-02-06 Thread Kent Johnson
Liam Clarke wrote: > Hi all, > > About to embark on my first foray into threading, and rather unsure of > initial approach. I have a basic UDPServer from SocketServer running > using serve_forever(). I'd like to stick this in a thread where it can > endlessly loop waiting for incoming packets, and

Re: [Tutor] Debugger Needed

2006-02-06 Thread Franz Steinhaeusler
On Mon, 6 Feb 2006 08:59:37 -, "Alan Gauld" <[EMAIL PROTECTED]> wrote: >> I am new to python, I want to know how to use a debugger and which >> debugger give a GUI . > >If you are new to Python but experienced in programming then you should find >the pdb debugger is a lot like the GNU gdb one

Re: [Tutor] is there any tool like "run line or selection" inPythonwin?

2006-02-06 Thread Alan Gauld
> I am very curious why the installation under Mac take so long time > compared to that under Windows. So am I. On my 600MHz iBook a new python install takes about the same time as it does on my 2GHz XP box. (around 3-5 minutes in both cases) How long did it take on your Mac? And how did you in

Re: [Tutor] installing python on windows and macs

2006-02-06 Thread linda.s
On 2/6/06, Jan Erik Moström <[EMAIL PROTECTED]> wrote: > linda.s <[EMAIL PROTECTED]> 2006-02-06 09:09: > > > Now I tried to install Python 2.4.2; It works fine till "Make > > Install". After I reenter the terminal, I still saw Python 2.3.5 and > > 2.4.2. does not appear. > > Also, it is really bori

Re: [Tutor] installing python on windows and macs

2006-02-06 Thread Jan Erik Moström
linda.s <[EMAIL PROTECTED]> 2006-02-06 09:09: > Now I tried to install Python 2.4.2; It works fine till "Make > Install". After I reenter the terminal, I still saw Python 2.3.5 and > 2.4.2. does not appear. > Also, it is really boring to go through ./configure, make and make > install. Why it is n

Re: [Tutor] Debugger Needed

2006-02-06 Thread Alan Gauld
> I am new to python, I want to know how to use a debugger and which > debugger give a GUI . If you are new to Python but experienced in programming then you should find the pdb debugger is a lot like the GNU gdb one. Its not a GUI hiowever. (Although I beliebe you can get it to work with ddx etc

Re: [Tutor] Documentation

2006-02-06 Thread Alan Gauld
> There is a free book on using Tkinter to be found at > http://infohost.nmt.edu/tcc/help/lang/python/tkinter.html > >Another great resource is to be found on > http://www.pythonware.com/library/index.htm And a useful paper book is Tcl/Tk in a Nutshell You have to translate from native Tcl/Tk com

[Tutor] Threading + socket server (blocking IO)

2006-02-06 Thread Liam Clarke
Hi all, About to embark on my first foray into threading, and rather unsure of initial approach. I have a basic UDPServer from SocketServer running using serve_forever(). I'd like to stick this in a thread where it can endlessly loop waiting for incoming packets, and pushing the received data into

Re: [Tutor] installing python on windows and macs

2006-02-06 Thread linda.s
On 2/5/06, Danny Yoo <[EMAIL PROTECTED]> wrote: > > > On Sun, 5 Feb 2006, linda.s wrote: > > > I installed python in both Windows and Mac. I am very curious why the > > installation under Mac take so long time compared to that under > > Windows. > > Hi Linda, > > But that's somewhat odd, because it