Re: [Tutor] multithreading random()

2006-10-09 Thread John Fouhy
On 10/10/06, Dick Moores <[EMAIL PROTECTED]> wrote: > Please refer to > , from which I > quote: > > "The functions supplied by this module are actually bound methods of > a hidden instance of the random.Random class. You can instantiate > y

Re: [Tutor] multithreading random()

2006-10-09 Thread John Fouhy
On 10/10/06, Dick Moores <[EMAIL PROTECTED]> wrote: > And another question. That page also says, "Almost all module > functions depend on the basic function random(), which generates a > random float uniformly in the semi-open range [0.0, 1.0). Python uses > the Mersenne Twister as the core generat

[Tutor] multithreading random()

2006-10-09 Thread Dick Moores
Please refer to , from which I quote: "The functions supplied by this module are actually bound methods of a hidden instance of the random.Random class. You can instantiate your own instances of Random to get generators that don't share

Re: [Tutor] Threaded FTP class

2006-10-09 Thread Bill Burns
>> I'm trying to make a small, threaded FTP app and I'm running into >> a problem. >> >> My program has a GUI (I use PythonCard) and I want the GUI to be >> responsive while network operations are going on. >> >> I assumed that if I made a class (shown below) which was sub-classed >> from threading

Re: [Tutor] Threaded FTP class

2006-10-09 Thread Kent Johnson
Bill Burns wrote: > I'm trying to make a small, threaded FTP app and I'm running into > a problem. > > My program has a GUI (I use PythonCard) and I want the GUI to be > responsive while network operations are going on. > > I assumed that if I made a class (shown below) which was sub-classed > fr

Re: [Tutor] tkinter

2006-10-09 Thread Paulino
; -- next part -- > An HTML attachment was scrubbed... > URL: > http://mail.python.org/pipermail/tutor/attachments/20061009/41a5ee23/attachment-0001.html > > > ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] re-reading file-like objects

2006-10-09 Thread Kent Johnson
Tiago Saboga wrote: > I'm afraid I don't fully understand file objects. I thought I could use it > just as a file: if I have one, and I want several copies, I just save it with > several names. So, if Popen.stdout already is a file object, I thought the > easier way would be to save it with anot

[Tutor] Threaded FTP class

2006-10-09 Thread Bill Burns
Hi all, I'm trying to make a small, threaded FTP app and I'm running into a problem. My program has a GUI (I use PythonCard) and I want the GUI to be responsive while network operations are going on. I assumed that if I made a class (shown below) which was sub-classed from threading.Thread - I w

Re: [Tutor] Seeking good resources for Tkinter

2006-10-09 Thread Alan Gauld
> I want to learn the GUI programming in Python. Can you suggest some > nice web > resources as well as books to start. It never fails to amaze me how often we get near identical questions being asked within a few days of each other and then never mentioned again for weeks! There are many differ

Re: [Tutor] What after Learning Python 2nd

2006-10-09 Thread Alan Gauld
> Hi I have finished Learning Python 2nd ed. > What to do next? Write code. Lots of code. Think of a project that will need more than a single file so you get practice with modules. Think of a project that can use OOP to practice with objects. Do some text processing, or write a web client to t

Re: [Tutor] Seeking good resources for Tkinter

2006-10-09 Thread Michael Lange
On Mon, 9 Oct 2006 22:04:17 +0100 "Asrarahmed Kadri" <[EMAIL PROTECTED]> wrote: > Hi folks, > > I want to learn the GUI programming in Python. Can you suggest some nice web > resources as well as books to start. > > Thanks in anticipation. > Hi Asrar, for Tkinter a good place to start is the

Re: [Tutor] re-reading file-like objects

2006-10-09 Thread Alan Gauld
> For this simple example, this solution is fine, and I think the > solution > proposed by Alan (StringIO) is not going to add anything. Would it > be faster? Probably not, the StringIO solution is just closer to how you described the problem, but also provides a fuller set of file-like method

Re: [Tutor] tkinter

2006-10-09 Thread Michael Lange
On Mon, 9 Oct 2006 14:00:26 +0100 "Alan Gauld" <[EMAIL PROTECTED]> wrote: > > We try to build new software using python and tkinter. We would like > > to > > enter some fields using grid style. > > Based on the fact that you say: > > > these. I hope I could explain I did not mean this grid whic

Re: [Tutor] Menus / Mac

2006-10-09 Thread John Fouhy
On 09 Oct 2006 15:43:01 -0400, Joel Levine <[EMAIL PROTECTED]> wrote: > I'm guessing it is a Mac problem. I've tried it on 3 different Macs, with > slightly different dates and configurations of Python and its libraries. > Same story each time. It works for me :-) (MBPro, Tiger) Remember that

[Tutor] Seeking good resources for Tkinter

2006-10-09 Thread Asrarahmed Kadri
Hi folks,   I want to learn the GUI programming in Python. Can you suggest some nice web resources as well as books to start.   Thanks in anticipation.   Regards, Asrar-- To HIM you shall return. ___ Tutor maillist - Tutor@python.org http://mail.python

[Tutor] Menus / Mac

2006-10-09 Thread Joel Levine
I'm trying to learn menus, starting with a textbook example. The textbook example (pasted below) doesn't work, but doesn't die either: It opens a window that has no menu. I'm guessing it is a Mac problem. I've tried it on 3 different Macs, with slightly different dates and configurations of P

Re: [Tutor] What after Learning Python 2nd

2006-10-09 Thread Gabriel Farrell
On Mon, Oct 09, 2006 at 10:51:26AM -0700, josip wrote: > Hi. > > Hi I have finished Learning Python 2nd ed. > What to do next? > Should I go with Programming Python book or Python Cookbook or? > Or maybe something else? > > Thanks people! > I went from Learning Python to the

Re: [Tutor] What after Learning Python 2nd

2006-10-09 Thread wesley chun
> > Hi I have finished Learning Python 2nd ed. > > What to do next? > > Should I go with Programming Python book or Python Cookbook or? > > Or maybe something else? > > However, LP should've left you with just enough knowledge to be > dangerous, so I'd encourage you to work on several small project

Re: [Tutor] Variable help

2006-10-09 Thread Kent Johnson
Tiago Saboga wrote: > Hi! > > I think your problem was solved, and that the list of lists is the better > approach indeed. But I'd like to add an answer to a direct question you > asked: > > Em Domingo 08 Outubro 2006 07:47, Tom R. escreveu: >> Basically I want to be able to integrate the value

Re: [Tutor] Variable help

2006-10-09 Thread Tiago Saboga
Hi! I think your problem was solved, and that the list of lists is the better approach indeed. But I'd like to add an answer to a direct question you asked: Em Domingo 08 Outubro 2006 07:47, Tom R. escreveu: > Basically I want to be able to integrate the value of one variable into > another var

Re: [Tutor] What after Learning Python 2nd

2006-10-09 Thread Rob Andrews
Those are both fine "next book" choices, and neither should prove a disapointment. However, LP should've left you with just enough knowledge to be dangerous, so I'd encourage you to work on several small projects in python using what you already know. In the process of taking a crack at those, you

Re: [Tutor] re-reading file-like objects

2006-10-09 Thread Tiago Saboga
Em Segunda 09 Outubro 2006 10:41, Kent Johnson escreveu: > Tiago Saboga wrote: > > Hi! > > > > I have a problem with file-like objects for months now, and I hoped I > > could cope with it, but I keep using what seems to me like a newbie > > workaround... > > > > The question is: how can I read a fi

[Tutor] What after Learning Python 2nd

2006-10-09 Thread josip
Hi.   Hi I have finished Learning Python 2nd ed. What to do next? Should I go with Programming Python book or Python Cookbook or? Or maybe something else?   Thanks people!   Do you Yahoo!? Get on board. You're invited to try the new Yahoo! Mail._

Re: [Tutor] re-reading file-like objects

2006-10-09 Thread Alan Gauld
> because it reads the file with read() method, which can only be used > once. If > it's a real file, on disk, I agree it would not be a clever > strategy, reading > it once for each copy, and I would be happy keeping its content in a > variable. But if the file is in memory, why can't I simply r

Re: [Tutor] re-reading file-like objects (SOLVED?)

2006-10-09 Thread Kent Johnson
Tiago Saboga wrote: > But I strip the code, and post a new one. The solution I found is in the > seek() method of the file object. And the problem I had is that not all the > file-like objects have a functional seek() method. It's not the case for the > object referenced by the stdout attribute

Re: [Tutor] re-reading file-like objects

2006-10-09 Thread Kent Johnson
Tiago Saboga wrote: > Hi! > > I have a problem with file-like objects for months now, and I hoped I could > cope with it, but I keep using what seems to me like a newbie workaround... > > The question is: how can I read a file (more precisely, a file-like object) > more than one single time? >

Re: [Tutor] revisiting struct and bytes again.

2006-10-09 Thread Hugo González Monteverde
> i can make a byte a string or number or whatever now. Up to the number 255. > I now have a problem with something that comes in as a 4 byte > representation of > the number of seconds since 1970. Hi Shawn, That's an epoch time as used in UNIX. Are you sure that what you're trying to do canno

Re: [Tutor] tkinter

2006-10-09 Thread Alan Gauld
> We try to build new software using python and tkinter. We would like > to > enter some fields using grid style. Based on the fact that you say: > these. I hope I could explain I did not mean this grid which is > using > instead of pack. I assume you mean like a spreadsheet grid of cells? >

Re: [Tutor] re-reading file-like objects (SOLVED?)

2006-10-09 Thread Tiago Saboga
I keep the original question: Em Segunda 09 Outubro 2006 09:21, Tiago Saboga escreveu: > Hi! > > I have a problem with file-like objects for months now, and I hoped I could > cope with it, but I keep using what seems to me like a newbie workaround... > > The question is: how can I read a file (mor

[Tutor] re-reading file-like objects

2006-10-09 Thread Tiago Saboga
Hi! I have a problem with file-like objects for months now, and I hoped I could cope with it, but I keep using what seems to me like a newbie workaround... The question is: how can I read a file (more precisely, a file-like object) more than one single time? In the following example, I want t

[Tutor] tkinter

2006-10-09 Thread Abdullah Anar
hello,We try to build new software using python and tkinter. We would like to enter some fields using grid style. I mean we want to use rows to see old entries and to enter new one. I hope I could explain, because it also is not  easy. I know there is grid to locate buttons, labels and something li

[Tutor] Handling large arrays/lists

2006-10-09 Thread Duncan Gibson
One part of the application I'm dealing with handles a conceptual 'cube' of data, but is in fact implemented as a single python list. Items are stored and retrieved - no manipulation at the moment - by the classical approach of multiplying the appropriate x, y and z indices with the x, y and z ex

Re: [Tutor] Point in polygon intro please~!

2006-10-09 Thread János Juhász
Hi Michael, > Subject: Re: [Tutor] Point in polygon intro please~! > To: Michael Shulman <[EMAIL PROTECTED]> > Cc: tutor@python.org > Message-ID: <[EMAIL PROTECTED]> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > Michael Shulman wrote: > > Hello, I'm very new to both python and

[Tutor] a Apache-python-postgres kit

2006-10-09 Thread Picio
Hello, last week I configured three home made servers to host a little python web app (django based). Searching on the web about a kit/script to have Apache+PostgreSQL+Python, I found only Apache2triad. That is a littlel "overweight" for me because I got also: PHP Perl Mysql Slimftpd Xmail OpenSSL

Re: [Tutor] python RMI

2006-10-09 Thread Picio
Hello, I was out for the week-end, sorry If I'm so late answering, and sorry because I wrote my message In italian. Since I have a subscription to another python mailing-list in italian, I've confused the tutor list with that. Thanks, I'm impressed, you were so kind triyng to help me!! I read the

Re: [Tutor] Help me with two dimensional arrays in Python

2006-10-09 Thread János Juhász
Dear Asrarahmed, I have found the next recipe in the cookbook. It should be interesting for you :) http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/392153 > Message: 1 > Date: Thu, 05 Oct 2006 10:26:19 -0400 > From: Kent Johnson <[EMAIL PROTECTED]> > Subject: Re: [Tutor] Help me with two

Re: [Tutor] embedding python

2006-10-09 Thread Alan Gauld
> know a little html not much i can make a page with backround coler a > title > words and pictures as well as links > > but i cant find any tutorials on embedding python useing html i > found some > that use c++ and i think one that used asp Can you give an example of what you mean by *embeddin