Re: [Tutor] networking

2004-12-28 Thread Bill Burns
On Monday 27 December 2004 4:22 pm, Marco wrote: > Hi python tutors, > Im interested on learning python but i would like to focus in a specific > topic, networking, where can i find documention networking in python? > sockets and all that stuff? i looked for some information but all of them > were

Re: [Tutor] O.T.

2004-12-28 Thread Liam Clarke
I'm 23, married, 3 month old son, employed in New Zealand's social welfare department, in a totally non IT role, learning Python purely out of personal interest and a desire to stop working for New Zealand's social welfare department someday. I too climb mountains, having previously been based in

[Tutor] Using the £ symbol

2004-12-28 Thread David Holland
I am trying to use a program that usea s '£' symbolon the pygame screen and I get this message :- 'sys:1: DeprecationWarning: Non-ASCII character '\xc2' in file birdgame29e.py on line 88, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details line 86 ' Now I did look th

Re: [Tutor] Output to a printer

2004-12-28 Thread Alan Gauld
Hi Luc, I'm interested. Does it handle more than plain text - although even that would be good! > I wrote a module that permits something like: > >d = Win32PrinterDocument(printerName,spoolFile) >f = file(inputfile) >for line in f.readlines(): > d.PrintLine(line.rstrip()) >d

[Tutor] Re: Soem list operation questions?

2004-12-28 Thread Roel Schroeven
Karl Pflästerer wrote: Why searching for a more complicated solution if such a good one exists? It may be a nice lecture but then you should put a big exclamation mark near it, so Python beginners (we are on a Tutor list) do not pick up wrong habits. I guess you have a point there. -- "Codito ergo

Re: [Tutor] Re: Soem list operation questions?

2004-12-28 Thread Karl Pflästerer
On 28 Dez 2004, [EMAIL PROTECTED] wrote: > Karl, > The ''.join() method was the first one suggested. Roel then suggested > a math-based method, which I attempted to improve upon. I know. I read it all; ''.join() was suggested together with a list comprehension (in such simple situations map() is

[Tutor] Re: Soem list operation questions?

2004-12-28 Thread Roel Schroeven
Karl Pflästerer wrote: Sorry but IMO the above is too much complicated for such a simple task. That depends on your point of view, I think; I find it conceptually at least as easy only to think in terms of numbers when both input and output are numbers. Our assumptions are different too: I assume

Re: [Tutor] Re: Soem list operation questions?

2004-12-28 Thread Orri Ganel
Karl, The ''.join() method was the first one suggested. Roel then suggested a math-based method, which I attempted to improve upon. -- Email: singingxduck AT gmail DOT com AIM: singingxduck Programming Python for the fun of it. ___ Tutor maillist - Tu

Re: [Tutor] Re: Soem list operation questions?

2004-12-28 Thread Karl Pflästerer
On 28 Dez 2004, [EMAIL PROTECTED] wrote: > Though, of course, by modifying your way (using str() ), it will still work: > def listtoint(digits): > result = 0 > for digit in digits: > result *= (10**len(str(digit))) ## just multiply it by 10 > result += digit ## to the

[Tutor] Re: Soem list operation questions?

2004-12-28 Thread Roel Schroeven
Orri Ganel wrote: Though, of course, by modifying your way (using str() ), it will still work: def listtoint(digits): result = 0 for digit in digits: result *= (10**len(str(digit))) ## just multiply it by 10 result += digit ## to the power of the number of digits retur

[Tutor] Re: Soem list operation questions?

2004-12-28 Thread Roel Schroeven
Orri Ganel wrote: Yes, but your way only works when the numbers in the list are single digit: True, but I think (I could be wrong of course) that is what kilovh intended: "...and combine them into digits of one number". -- "Codito ergo sum" Roel Schroeven _

Re: [Tutor] Output to a printer

2004-12-28 Thread Jacob S.
I'm definitely interested. Jacob S. > On 06.05.2004 21:06, Alan Gauld wrote: > > THis is a problem in all programming languages on Windows because > > basically Windows treats documents to be printed as graphics, so > > you have to convert your document into something windows can print. > > Its p

Re: [Tutor] Tkinter packing confusion

2004-12-28 Thread Jacob S.
And this, right here, is why I like the grid method. ; ) I can easily place everything into a grid that I lay out before hand. I'm used to coordinate systems. I just don't have a firm grasp on the way pack works. Jacob Schmidt > First, thanks for the responses on my questions on using Tkinter fo

Re: [Tutor] Re: Soem list operation questions?

2004-12-28 Thread Orri Ganel
Though, of course, by modifying your way (using str() ), it will still work: >>> def listtoint(digits): result = 0 for digit in digits: result *= (10**len(str(digit))) ## just multiply it by 10 result += digit ## to the power of the number of digits return result >>> l

Re: [Tutor] Re: Soem list operation questions?

2004-12-28 Thread Orri Ganel
Yes, but your way only works when the numbers in the list are single digit: >>> def listtoint(digits): result = 0 for digit in digits: result *= 10 result += digit return result >>> listtoint([1,2,3,4]) 1234 >>> listtoint([11,22,33,44]) 13574 -- Email: singingxduck A

Re: [Tutor] O.T.

2004-12-28 Thread Bob Gailer
I'm 64. Degrees in EE and MDiv. Career a mixture of engineering, computers, minister, teacher, Just started a new romantic relationship! Programmed in more languages than I care to recall. The more interesting/arcane include IBM 650: machine language (my first), SOAP, CLASSMATE GE 415: FORTR

Re: [Tutor] Re: O.T.

2004-12-28 Thread Jacob S.
> Season's Greetings Jacob and all the circus. > Not to be nosy, Jacob, but is that 14 years old (or 14 yrs a student)? > Married at 14 might be a little wierd! 14 years old. I should have put " single (obviously) ", or something like that. However, where I live--Portland, IN--the high school kid

Re: [Tutor] Output to a printer

2004-12-28 Thread Luc Saffre
On 06.05.2004 21:06, Alan Gauld wrote: THis is a problem in all programming languages on Windows because basically Windows treats documents to be printed as graphics, so you have to convert your document into something windows can print. Its possible but painful (unless you find a module somewhere,

Re: [Tutor] Tkinter packing confusion

2004-12-28 Thread Alan Gauld
> manager. What I want to see is a window with something like this (bear > with my ascii art): > > URL: [ http://www.somewhere.com/default ] > > ++ +---+ ++ > | Cancel | | Reset | | OK | > ++ +---+ ++ > > What I'm getting is: > >URL: > +

[Tutor] Re: Soem list operation questions?

2004-12-28 Thread Roel Schroeven
kilovh wrote: 2. Is there any way to take seperate integers in a list and combine them into digits of one number? (e.g. changing [1,2,3,4] into 1234) Instead of using strings as in the other replies, it's also possible to take the math approach: def listtoint(digits): result = 0 for digi

Re: [Tutor] networking

2004-12-28 Thread Alan Gauld
> Im interested on learning python but i would like to focus in > a specific topic, networking, where can i find documention > networking in python? sockets and all that stuff? Look at the sockets module documentation. If you know how to use sockets in C or Perl then it should be obvious. Als

Re: [Tutor] O.T.

2004-12-28 Thread Alan Gauld
It was late last night and I messed up sending this. I'll try again in the cold light of day... :-( > But who are you all, what are you're ages, > what do you do, marriage status, 46, married, no kids, new house, big mortgage :-( I am an IT architect for the UK national telecomms company, BT