Re: os.path.walk -- Can You Limit Directories Returned?

2008-06-05 Thread Diez B. Roggisch
Jeff Nyman schrieb: Greetings all. I did some searching on this but I can't seem to find a specific solution. I have code like this: = def walker1(arg, dirname, names): DC_List.append((dirname,'')) os.path.walk('vcdcflx006\\Flex\\Sites', walker1,

Problem with TimedRotatingFileHandler

2008-06-05 Thread Dominique.Holzwarth
Hi everyone I'm trying to use python's logging mechanism to write exception data into a log file with the TimedRotatingFileHandler but the rotating of the file is not working... Here's a bit of sample code of what I'm doing (just the interessting part of it ;-)): import logging import logging.

Re: Image Processing (batch)

2008-06-05 Thread Tim Roberts
Thomas Guettler <[EMAIL PROTECTED]> wrote: > >I tried PIL for image batch processing. But somehow I don't like it > - Font-Selection: You need to give the name of the font file. > - Drawing on an image needs a different object that pasting and saving. > - The handbook is from Dec. 2006. I have

Re: readline() & seek() ???

2008-06-05 Thread Tim Roberts
DataSmash <[EMAIL PROTECTED]> wrote: > >I have a text file that contains thousands of lines and each line is >256 characters long. > >This is my task: >For each line in the file, move to the 25th character, if the >character is a "T", >move to the 35th character of the line and read 5 characters fr

Re: line continuation for lines ending in "and" or "or"

2008-06-05 Thread Tim Roberts
Dan Bishop <[EMAIL PROTECTED]> wrote: >On Jun 4, 10:09 pm, "Russ P." <[EMAIL PROTECTED]> wrote: >> I've always appreciated Python's lack of requirement for a semi-colon >> at the end of each line. I also appreciate its rules for automatic >> line continuation. If a statement ends with a "+", for ex

Re: Problem with PEXPECT in Python

2008-06-05 Thread A.T.Hofkamp
On 2008-06-04, Mallikarjun Melagiri <[EMAIL PROTECTED]> wrote: > Hi Noah, > > I am new to python. I'm trying to use pexpect. > > Following is my problem definition: > > I should have a script on my machine A, which > should 'ssh' to machine B and from there i

ero magazines

2008-06-05 Thread yura
http://ero-mag.net -- http://mail.python.org/mailman/listinfo/python-list

Re: os.path.walk -- Can You Limit Directories Returned?

2008-06-05 Thread Gary Herron
Jeff Nyman wrote: Greetings all. I did some searching on this but I can't seem to find a specific solution. I have code like this: = def walker1(arg, dirname, names): DC_List.append((dirname,'')) os.path.walk('vcdcflx006\\Flex\\Sites', walker1, 0

Re: os.path.walk -- Can You Limit Directories Returned?

2008-06-05 Thread alex23
On Jun 5, 4:54 pm, Jeff Nyman <[EMAIL PROTECTED]> wrote: > The problem is that my code grabs every single directory that is > under the various city directories when what I really want it to do is > just grab the directories that are under Sites\ and that's it. I don't > want it to recurse down int

Re: Looking for some good python learning resources on the web

2008-06-05 Thread Stefan Behnel
[EMAIL PROTECTED] wrote: > What are the best sites to read to learn python? http://wiki.python.org/moin/BeginnersGuide Stefan -- http://mail.python.org/mailman/listinfo/python-list

Re: Question regarding re module

2008-06-05 Thread Diez B. Roggisch
Tomohiro Kusumi schrieb: > Hi, > > I have a question regarding re module. > # By the way I'm not in this list, so I'm sorry but please CC me. > > I tried following code in Python shell using a regular expression. > Why doesn't the result of dir(reg) have 'pattern', 'flags', and > 'groupindex' alt

Interesting Math Problem

2008-06-05 Thread BEES INC
I've been awfully busy programming lately. My Django-based side project is coming along well and I hope to have it ready for use in a few weeks. Please don't ask more about it, that's really all I can say for now. Anyways, I came across an interesting little math problem today and was hoping some s

Re: Why does python not have a mechanism for data hiding?

2008-06-05 Thread Antoon Pardon
On 2008-06-04, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > On Wed, 04 Jun 2008 09:34:58 +, Antoon Pardon wrote: > >> On 2008-06-04, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: >> > it makes sense to me to also test if they work as documented. If they affect the

Squeak-like environment for Python?

2008-06-05 Thread Jumping Arne
I've been playing with Squeak a bit and I really like the persistent storage model, I also liked HyperCard and Frontier (well, the persistent storage model at least). I wonder if there is some similar environment but based on python, I would like to use this environment not as a development env

Re: Interesting Math Problem

2008-06-05 Thread Ken Starks
BEES INC wrote: I've been awfully busy programming lately. My Django-based side project is coming along well and I hope to have it ready for use in a few weeks. Please don't ask more about it, that's really all I can say for now. Anyways, I came across an interesting little math problem today and

Re: Interesting Math Problem

2008-06-05 Thread Iain King
On Jun 4, 9:03 am, "BEES INC" <[EMAIL PROTECTED]> wrote: > I've been awfully busy programming lately. My Django-based side > project is coming along well and I hope to have it ready for use in a > few weeks. Please don't ask more about it, that's really all I can say > for now. Anyways, I came acro

Re: readline() & seek() ???

2008-06-05 Thread Carl Banks
On Jun 4, 5:30 pm, DataSmash <[EMAIL PROTECTED]> wrote: > Hi group, > I have a text file that contains thousands of lines and each line is > 256 characters long. > > This is my task: > For each line in the file, move to the 25th character, if the > character is a "T", > move to the 35th character o

Re: Interesting Math Problem

2008-06-05 Thread Chuckk Hubbard
On Thu, Jun 5, 2008 at 11:52 AM, Chuckk Hubbard <[EMAIL PROTECTED]> wrote: > On Wed, Jun 4, 2008 at 11:03 AM, BEES INC <[EMAIL PROTECTED]> wrote: > >> My Solution (in Python): >> >> # round to one decimal place and >> # separate into whole and fractional parts >> parts = str(round(star_sum/num_rate

Re: multiprocessing module (PEP 371)

2008-06-05 Thread pataphor
In article <877a5774-d3cc-49d3-bb64-5cab8505a419 @m3g2000hsc.googlegroups.com>, [EMAIL PROTECTED] says... > I don't see pyprocessing as a drop-in replacement for the threading > module. Multi-threading and multi-processing code tend to be > different, unless something like mutable objects in share

Re: How to make py2.5 distutil to use VC2005?

2008-06-05 Thread 甜瓜
> The problem is not compiler, but runtime. For example, if python is > built with runtime foo, and yours with runtime bar, and you use in bar > a file handle, you're screwed: > > http://msdn.microsoft.com/en-us/library/ms235460(VS.80).aspx > > That's why you cannot build a python extension with VS

comp.lang.python

2008-06-05 Thread dev
www.freeservice6.blogspot.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Squeak-like environment for Python?

2008-06-05 Thread Diez B. Roggisch
Jumping Arne wrote: > I've been playing with Squeak a bit and I really like the persistent > storage model, I also liked HyperCard and Frontier (well, the persistent > storage model at least). > > I wonder if there is some similar environment but based on python, I would > like to use this enviro

Re: Image Processing (batch)

2008-06-05 Thread Ulrich Eckhardt
Tim Roberts wrote: > Thomas Guettler <[EMAIL PROTECTED]> wrote: >> >>I tried PIL for image batch processing. But somehow I don't like it >> - Font-Selection: You need to give the name of the font file. >> - Drawing on an image needs a different object that pasting and saving. >> - The handbook i

Re: Exit from os.chroot()

2008-06-05 Thread Thomas Bellman
Tobiah <[EMAIL PROTECTED]> writes: >> It is better to make copies of the needed binaries and libraries, >> and *only* them. > Or symbolic links, of course. Also, wouldn't links prevent > the process from puffing actual binaries in /usr/bin? Well, if you create symlinks from the chroot jail that

Python and Harry Potter?

2008-06-05 Thread Helmut Jarausch
Hi, just to let you know ... Today I've got an email from Amazon recommending me Harry Potter and the Deathly Hallows and they told me why they recommended this book, because I've bought Core PYTHON Programming Didn't know, Harry Potter is a Python fan. -- Helmut Jarausch Lehrstuhl fuer Nume

can you help me

2008-06-05 Thread merzouki tarek
  hello please, I have this error, error C1083 Cannot open include file BaseTsd.h, invalide argument, I installed the platformSDK , but the same error , can you help me __ Do You Yahoo!? En finir avec le spam? Yahoo! Mail vous offre la meilleure

Re: multiprocessing module (PEP 371)

2008-06-05 Thread sturlamolden
On Jun 5, 11:02 am, pataphor <[EMAIL PROTECTED]> wrote: > This is probably not very central to the main intention of your post, > but I see a terminology problem coming up here. It is possible for > python objects to share a reference to some other object. This has > nothing to do with threads or

Re: The Importance of Terminology's Quality

2008-06-05 Thread Jon Harrop
Robert Maas, http://tinyurl.com/uh3t wrote: >> From: [EMAIL PROTECTED] (David Combs) >> Lisp is *so* early a language (1960?), preceeded mainly only by >> Fortran (1957?)?, and for sure the far-and-away the first as a >> platform for *so many* concepts of computer-science, eg lexical vs >> dynamic

Re: Squeak-like environment for Python?

2008-06-05 Thread Bruno Desthuilliers
Diez B. Roggisch a écrit : Jumping Arne wrote: I've been playing with Squeak a bit and I really like the persistent storage model, I also liked HyperCard and Frontier (well, the persistent storage model at least). I wonder if there is some similar environment but based on python, I would like

Re: Python and Harry Potter?

2008-06-05 Thread Marc 'BlackJack' Rintsch
On Thu, 05 Jun 2008 11:58:14 +0200, Helmut Jarausch wrote: > Today I've got an email from Amazon recommending me > Harry Potter and the Deathly Hallows > > and they told me why they recommended this book, > because I've bought > Core PYTHON Programming > > Didn't know, Harry Potter is a Python f

Re: Why does python not have a mechanism for data hiding?

2008-06-05 Thread Marc 'BlackJack' Rintsch
On Thu, 05 Jun 2008 08:21:41 +, Antoon Pardon wrote: > On 2008-06-04, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: >> On Wed, 04 Jun 2008 09:34:58 +, Antoon Pardon wrote: >> >>> On 2008-06-04, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: >>> >> it makes sense to me to al

Re: Squeak-like environment for Python?

2008-06-05 Thread Michael Mabin
Check out the Brainwave platform, which uses a new "neural" database model. It allows you to create databases to store any kind of Python object as a "neuron" and allows objects to be connected via link to create complex structures that don't require conventional tables and columns. It is a develo

Re: Why does python not have a mechanism for data hiding?

2008-06-05 Thread Antoon Pardon
On 2008-06-05, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > On Thu, 05 Jun 2008 08:21:41 +, Antoon Pardon wrote: > >> On 2008-06-04, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: >>> On Wed, 04 Jun 2008 09:34:58 +, Antoon Pardon wrote: >>> On 2008-06-04, Marc 'BlackJack'

Re: Update

2008-06-05 Thread monika
http://windowsxpprotips.blogspot.com/ windows xp pro tips http://thebesthealthtips.blogspot.com/the best health tips http://unwealthyhabits.blogspot.com/ unwealthy habits http://beautytipsfornewu.blogspot.com/ beauty tips for new u http://datingattractivewomen.blogspot.com/how to a

Re: Why does python not have a mechanism for data hiding?

2008-06-05 Thread Bruno Desthuilliers
Antoon Pardon a écrit : On 2008-06-04, NickC <[EMAIL PROTECTED]> wrote: On Jun 4, 4:09 am, "Russ P." <[EMAIL PROTECTED]> wrote: What is it about leading underscores that bothers me? To me, they are like a small pebble in your shoe while you are on a hike. Yes, you can live with it, and it does

Re: Python and Harry Potter?

2008-06-05 Thread Casey
Python fan??? Harry speaks Python fluently. We should all be so lucky! I'm told Harry is looking forward to Py3K and getting rid of all the old (hog)warts -- http://mail.python.org/mailman/listinfo/python-list

Re: Python and Harry Potter?

2008-06-05 Thread Michael Mabin
Harry Potter is a Parselmouth. He can speak to snakes. Of course, Amazon would get this right! Sheesh! On Thu, Jun 5, 2008 at 6:10 AM, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > On Thu, 05 Jun 2008 11:58:14 +0200, Helmut Jarausch wrote: > > > Today I've got an email from Amazon recom

Re: Why does python not have a mechanism for data hiding?

2008-06-05 Thread Bruno Desthuilliers
Russ P. a écrit : (snip) (answering to Carl Bank) I thought you were saying that encapsulation or so-called "data hiding" is worthless. As far as I'm concerned, I view encapsulation as very desirable, and data-hidding as totally worthless when applied to Python's object model. Here's what

Re: line continuation for lines ending in "and" or "or"

2008-06-05 Thread Larry Bates
Dennis Lee Bieber wrote: On Wed, 4 Jun 2008 21:50:19 -0700 (PDT), "Russ P." <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: Darnit! You're right. I've been reading up on Scala lately, and I guess I got confused. Well, it wouldn't be a bad idea for Python to do what I thought it

Re: Question regarding re module

2008-06-05 Thread Tomohiro Kusumi
Diez, Thanks, you're right. Delegated attributes are not in the dir() result. >>> getattr(reg, "pattern") '[0-9]+' >>> getattr(reg, "flags") 0 >>> getattr(reg, "groupindex") {} Tomohiro Kusumi > Tomohiro Kusumi schrieb: >> Hi, >> >> I have a question regarding re module. >> # By the way I'm no

Re: os.path.walk -- Can You Limit Directories Returned?

2008-06-05 Thread Jeff Nyman
Thank you to everyone for your help. Much appreciated. I now have a better understanding of how glob can be used and I have a much better understanding of using the more effective os.walk. - Jeff -- http://mail.python.org/mailman/listinfo/python-list

Creating A Tuple From A List, Adding To Tuple As You Do

2008-06-05 Thread Jeff Nyman
Greetings all. The subject line of this thread is probably one of the worst ever. I was trying to encapsulate what I am doing. Based on my new-found knowledge from another thread, I'm able to get a list of directories and they come to me in the form of a list. Here is an example: from glob import

Re: readline() & seek() ???

2008-06-05 Thread DataSmash
On Jun 5, 3:50 am, Carl Banks <[EMAIL PROTECTED]> wrote: > On Jun 4, 5:30 pm, DataSmash <[EMAIL PROTECTED]> wrote: > > > Hi group, > > I have a text file that contains thousands of lines and each line is > > 256 characters long. > > > This is my task: > > For each line in the file, move to the 25th

Re: Creating A Tuple From A List, Adding To Tuple As You Do

2008-06-05 Thread Karsten Heymann
Jeff Nyman <[EMAIL PROTECTED]> writes: > from glob import glob > DC_List = glob('vcdcflx006\\Flex\\Sites\\*\\') > DC_List = ['Baltimore', 'Birmingham', 'Cincinnati', 'Cleveland', > LosAngeles'] > The problem is that I need to pass this list to a list control in a > wxWidgets application. In or

Re: Creating A Tuple From A List, Adding To Tuple As You Do

2008-06-05 Thread Paul McGuire
On Jun 5, 7:41 am, Jeff Nyman <[EMAIL PROTECTED]> wrote: > DC_List = ['Baltimore', 'Birmingham', 'Cincinnati', 'Cleveland', > LosAngeles'] > > (Each element in the DC_List is actually a full directory path, but I > shortened that in the interest of clarity.) > > The problem is that I need to pass t

Re: Creating A Tuple From A List, Adding To Tuple As You Do

2008-06-05 Thread Fuzzyman
On Jun 5, 1:41 pm, Jeff Nyman <[EMAIL PROTECTED]> wrote: > Greetings all. > > The subject line of this thread is probably one of the worst ever. I > was trying to encapsulate what I am doing. Based on my new-found > knowledge from another thread, I'm able to get a list of directories > and they com

Re: Question regarding re module

2008-06-05 Thread Paul McGuire
On Jun 5, 7:11 am, Tomohiro Kusumi <[EMAIL PROTECTED]> wrote: > > > It could be that the result overloads the __getattr__-method to delegate > > calls to some object. Thus it's not part of the outer instance. > Didn't I read that Py3 will support a __dir__ method so that classes *could* report suc

Re: re

2008-06-05 Thread David C. Ullrich
On Wed, 04 Jun 2008 20:07:41 +0200, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: >> Whitespace is actually \s. But [\s]disc[whatever] >> doesn't do the job - then it won't match "(disc)", >> which counts as "disc appearing as a full word. > >Ok, then this works: Yes it does. My real question wa

Re: Creating A Tuple From A List, Adding To Tuple As You Do

2008-06-05 Thread Jeff Nyman
Thanks to everyone who responded! Yes, those solutions all work and do what I need. I'm also getting much more familiar with how flexible Python is in terms of its language. I think that's been the hardest challenge for me. I'm usually finding I try to "overdo it" when coming up with solutions. O

Re: Books for learning how to write "big" programs

2008-06-05 Thread s0suk3
On May 22, 12:49 pm, "Kurt Smith" <[EMAIL PROTECTED]> wrote: > On Thu, May 22, 2008 at 10:55 AM, duli <[EMAIL PROTECTED]> wrote: > > Hi: > > I would like recommendations forbooks(in any language, not > > necessarily C++, C, python) which have walkthroughs for developing > > a big software project ?

Re: The Importance of Terminology's Quality

2008-06-05 Thread jon . harrop . ms . sharp
On 5 Giu, 12:37, Jon Harrop <[EMAIL PROTECTED]> wrote: > [...] P.S. Please don't look at my profile (at google groups), thanks! Jon Harrop -- http://mail.python.org/mailman/listinfo/python-list

nike shoes jordans prada dunk

2008-06-05 Thread [EMAIL PROTECTED]
"China supply Nike_Air_Max_87,Nike_Air_Max_95,Nike_Air_Max_360,Nike_Air_Max_Ltd,Nike_Air_Max_TN,Nike_Air_Max_Rift,Nike_Shoes_R3,Nike_Shoes_R4,Nike_Shoes_R5,Nike_Shoes_R6,Nike_Shoes_NZ,Nike_Shoes_OZ,Nike_Shoes_TL,Nike_Shoes_Monster,Nike_Sho¬es_Energia,Nike_Shoes_Turob,Air_Force_1s etc.More please si

Re: Tuples part 2

2008-06-05 Thread [EMAIL PROTECTED]
On Jun 5, 1:37 am, [EMAIL PROTECTED] wrote: > [EMAIL PROTECTED]: > > Do you mean something like this? (notice the many formatting > differences, use a formatting similar to this one in your code) > > coords = [] > > for i in xrange(1, 5): > for j in xrange(1, 5): > for k in xrange(1, 2)

Re: Why does python not have a mechanism for data hiding?

2008-06-05 Thread Fuzzyman
On Jun 3, 6:54 pm, sturlamolden <[EMAIL PROTECTED]> wrote: > On May 24, 3:41 pm, Sh4wn <[EMAIL PROTECTED]> wrote: > > > first, python is one of my fav languages, and i'll definitely keep > > developing with it. But, there's 1 one thing what I -really- miss: > > data hiding. I know member vars are p

Re: Python and Harry Potter?

2008-06-05 Thread Hans Nowak
Helmut Jarausch wrote: Hi, just to let you know ... Today I've got an email from Amazon recommending me Harry Potter and the Deathly Hallows and they told me why they recommended this book, because I've bought Core PYTHON Programming Didn't know, Harry Potter is a Python fan. If you scan the

Re: Python and Flaming Thunder

2008-06-05 Thread John Salerno
"Dave Parker" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Kind of like how this year's program won't work on next year's > Python? Except Flaming Thunder is faster. ;) To be fair (and accurate), Python 3.0 has been in development for a long time without being marketed for prod

[no subject]

2008-06-05 Thread garywood
Hi there. So I have a challenge in the Python book I am using (python programming for the absolute beginner) that tells me to improve an ask_number() function, so that it can be called with a step value, and I havn't been able to find out yet what's meant by a step value, but i'll keep looking of c

Re: Tuples part 2

2008-06-05 Thread George Sakkis
On Jun 5, 9:26 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > On Jun 5, 1:37 am, [EMAIL PROTECTED] wrote: > > > > > [EMAIL PROTECTED]: > > > Do you mean something like this? (notice the many formatting > > differences, use a formatting similar to this one in your code) > > > coords = [] > > >

Re: Python and Flaming Thunder

2008-06-05 Thread John Salerno
"Dave Parker" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] On May 20, 7:05 pm, Collin <[EMAIL PROTECTED]> wrote: --- For example, consider the two statements: x = 8 x = 10 The reaction from most math teachers (and kids) was "one of those is wrong because x can't equal 2

Re: Python and Harry Potter?

2008-06-05 Thread Bjoern Schliessmann
Casey wrote: > Python fan??? Harry speaks Python fluently. We should all be so > lucky! > > I'm told Harry is looking forward to Py3K and getting rid of all > the old (hog)warts Well, how about another Python renaming flame thread then? Let's call Python 3.0 "Parselmouth" instead ... Regar

Re: Creating A Tuple From A List, Adding To Tuple As You Do

2008-06-05 Thread John Salerno
"Jeff Nyman" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Does anyone have an > idea of a good approach here? I think it's pretty cool that all three responses to your question suggested the exact same solution. But I guess that in itself is a feature of Python. :) -- http:

Re: Python and Flaming Thunder

2008-06-05 Thread Dan Upton
On Thu, Jun 5, 2008 at 9:43 AM, John Salerno <[EMAIL PROTECTED]> wrote: > "Dave Parker" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > On May 20, 7:05 pm, Collin <[EMAIL PROTECTED]> wrote: > > --- > For example, consider the two statements: > > x = 8 > x = 10 > > The reacti

Re: Interesting Math Problem

2008-06-05 Thread Gary Herron
BEES INC wrote: I've been awfully busy programming lately. My Django-based side project is coming along well and I hope to have it ready for use in a few weeks. Please don't ask more about it, that's really all I can say for now. Anyways, I came across an interesting little math problem today and

Re: Interesting Math Problem

2008-06-05 Thread Chuckk Hubbard
On Wed, Jun 4, 2008 at 11:03 AM, BEES INC <[EMAIL PROTECTED]> wrote: > My Solution (in Python): > > # round to one decimal place and > # separate into whole and fractional parts > parts = str(round(star_sum/num_raters, 1)).split('.') > whole = int(parts[0]) > frac = int(parts[1]) > if frac < 3: >

Re:

2008-06-05 Thread Quentin Gallet-Gilles
I don't want to spoil the fun, so I'll just say that "range" is the key here. Quentin On Thu, Jun 5, 2008 at 3:43 PM, garywood <[EMAIL PROTECTED]> wrote: > Hi there. So I have a challenge in the Python book I am using (python > programming for the absolute beginner) that tells me to improve an

Re: Tuples part 2

2008-06-05 Thread Ivan Illarionov
On 5 июн, 01:57, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hi Everyone, > > i have another question. What if i wanted to make n tuples, each with > a list of coordinates. For example : > > coords = list() > for h in xrange(1,11,1): >for i in xrange(1, 5, 1) : > for j in xrange(1, 5

Re: Creating A Tuple From A List, Adding To Tuple As You Do

2008-06-05 Thread Karsten Heymann
Hi Jeff, Jeff Nyman <[EMAIL PROTECTED]> writes: > I did try this: > > for count in range(0, len(DC_List)): > DC_List.insert(count, '') On additional note: You can be quite sure you'll never have to iterate over the length of a list (or tuple) in python. Just iterate over the list itself: for

Re: Python and Harry Potter?

2008-06-05 Thread Eduardo O. Padoan
On Thu, Jun 5, 2008 at 10:29 AM, Hans Nowak <[EMAIL PROTECTED]> wrote: > Helmut Jarausch wrote: >> >> Hi, >> just to let you know ... >> >> Today I've got an email from Amazon recommending me >> Harry Potter and the Deathly Hallows >> >> and they told me why they recommended this book, >> because I

Proof that \ is a better line joiner than parenthetical sets

2008-06-05 Thread John Salerno
Goofy post of the day... According to the Zen of Python, "explicit is better than implicit", and the section in the Reference Manual describing the \ line joiner is called "Explicit line joining" and the section describing parentheticals is called "Implicit line joining." So there! ;) -- ht

Re: Why does python not have a mechanism for data hiding?

2008-06-05 Thread sturlamolden
On Jun 5, 3:26 pm, Fuzzyman <[EMAIL PROTECTED]> wrote: > So, you are stating that no API programmer using Python *ever* has a > valid or genuine reason for wanting (even if he can't have it) genuine > 'hiding' of internal state or members from consumers of his (or > her...) API? > > Michael Foordh

Re: Creating A Tuple From A List, Adding To Tuple As You Do

2008-06-05 Thread Iain King
On Jun 5, 1:41 pm, Jeff Nyman <[EMAIL PROTECTED]> wrote: > Greetings all. > > The subject line of this thread is probably one of the worst ever. I > was trying to encapsulate what I am doing. Based on my new-found > knowledge from another thread, I'm able to get a list of directories > and they com

Re: Tuples part 2

2008-06-05 Thread [EMAIL PROTECTED]
On Jun 5, 3:49 pm, Ivan Illarionov <[EMAIL PROTECTED]> wrote: > On 5 ÉÀÎ, 01:57, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> > wrote: > > > > > Hi Everyone, > > > i have another question. What if i wanted to make n tuples, each with > > a list of coordinates. For example : > > > coords = list() > > for

Re: Tuples part 2

2008-06-05 Thread Ivan Illarionov
On 5 июн, 18:19, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > On Jun 5, 3:49 pm, Ivan Illarionov <[EMAIL PROTECTED]> wrote: > > > > > On 5 ÉÀÎ, 01:57, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> > > wrote: > > > > Hi Everyone, > > > > i have another question. What if i wanted to make n tuples, each

Re: Tuples part 2

2008-06-05 Thread Ivan Illarionov
On 5 июн, 18:19, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > On Jun 5, 3:49 pm, Ivan Illarionov <[EMAIL PROTECTED]> wrote: > > > > > On 5 ÉÀÎ, 01:57, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> > > wrote: > > > > Hi Everyone, > > > > i have another question. What if i wanted to make n tuples, each

Re: Tuples part 2

2008-06-05 Thread Ivan Illarionov
On 5 июн, 18:56, Ivan Illarionov <[EMAIL PROTECTED]> wrote: > On 5 июн, 18:19, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> > wrote: > > > > > On Jun 5, 3:49 pm, Ivan Illarionov <[EMAIL PROTECTED]> wrote: > > > > On 5 ÉÀÎ, 01:57, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> > > > wrote: > > > > > Hi Everyone

Re: Tuples part 2

2008-06-05 Thread George Sakkis
On Jun 5, 11:21 am, Ivan Illarionov <[EMAIL PROTECTED]> wrote: > On 5 июн, 18:56, Ivan Illarionov <[EMAIL PROTECTED]> wrote: > > > > > On 5 июн, 18:19, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> > > wrote: > > > > On Jun 5, 3:49 pm, Ivan Illarionov <[EMAIL PROTECTED]> wrote: > > > > > On 5 ÉÀÎ, 01:57,

mod_python installer fails

2008-06-05 Thread RossGK
I've been running python 2.5 for a while on WinXP, working fine. I code and compile in PyDev/Eclipse. I wanted to start playing with Django, but when I go to install mod_python for Apache 2.2 I get the error: python version 2.5 required, which was not found in the registry from the installe

Re: Import removing first module component

2008-06-05 Thread koblas
On Jun 4, 2:48 pm, "David C. Ullrich" <[EMAIL PROTECTED]> wrote: > In article > <[EMAIL PROTECTED]>, > >  koblas <[EMAIL PROTECTED]> wrote: > > Have the following line: > >         import notewave.runner.LMTP > > > Yeilding the following error: > >         ImportError: No module named runner.LMTP >

ClassName.attribute vs self.__class__.attribute

2008-06-05 Thread Gabriel Rossetti
Hello everyone, I had read somewhere that it is preferred to use self.__class__.attribute over ClassName.attribute to access class (aka static) attributes. I had done this and it seamed to work, until I subclassed a class using this technique and from there on things started screwing up. I fi

Re: Tuples part 2

2008-06-05 Thread Ivan Illarionov
On 5 июн, 19:38, George Sakkis <[EMAIL PROTECTED]> wrote: > On Jun 5, 11:21 am, Ivan Illarionov <[EMAIL PROTECTED]> wrote: > > > > > On 5 июн, 18:56, Ivan Illarionov <[EMAIL PROTECTED]> wrote: > > > > On 5 июн, 18:19, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> > > > wrote: > > > > > On Jun 5, 3:49 pm,

Nested dictionary displays?

2008-06-05 Thread Robert Dailey
Hi, I'm using Python 3.0 (the latest as of now) and I have a very large dictionary that I'm attempting to do some processing on. The dictionary basically has strings in it, as well as other dictionaries which themselves also have strings. Using a display, I'm trying to (with as little code possibl

Loading Python programs on the net.

2008-06-05 Thread Noorhan Abbas
Hello, I have developed a program in Python.  I need to put this program on the web. Could somebody advice me on the different tools that I can use to do this job. My python program basically displays a tree ctrl that allows users to choose from it and displays text as an output.  I need to deve

Import text file

2008-06-05 Thread Franck Y
Hello, I have a text file where there is xxx=value yyy=value zzz=value etc... I would like use the from myfile import Since it has not the extension py how can i read it ? I know the way to do it with the open file but i think this one is easier... Thansk Franck -- http://mail.python.org/

Re: Import removing first module component

2008-06-05 Thread alex23
On Jun 6, 1:44 am, koblas <[EMAIL PROTECTED]> wrote: > Another person pointed out that I should check on the __init__.py and > make sure lmtp is defined in the __all__ block. I didn't have an > __init__.py at that level of the tree, which must have been causing > problems, but clearly I don't unde

Re: Import text file

2008-06-05 Thread alex23
On Jun 6, 2:28 am, Franck Y <[EMAIL PROTECTED]> wrote: > I have a text file where there is > > xxx=value > yyy=value > zzz=value > etc... > > I would like use the from myfile import > > Since it has not the extension py how can i read it ? > I know the way to do it with the open file but i thi

Re: Interesting Math Problem

2008-06-05 Thread MRAB
On Jun 4, 9:03 am, "BEES INC" <[EMAIL PROTECTED]> wrote: > I've been awfully busy programming lately. My Django-based side > project is coming along well and I hope to have it ready for use in a > few weeks. Please don't ask more about it, that's really all I can say > for now. Anyways, I came acro

Re: gcc error in Mac OS X

2008-06-05 Thread Zhaojie Boulder
Hi Tommy, When I typed which gcc,nothing happened,I checked the /usr/bin path myself and gcc was not there. In fact, the Xcode folder is at the same level with the usr folder. Is there a way you can install Xcode in the right place? I did not find such a option during the installation process of Xc

Re: Proof that \ is a better line joiner than parenthetical sets

2008-06-05 Thread Joshua Kugler
John Salerno wrote: > According to the Zen of Python, "explicit is better than implicit", and > the section in the Reference Manual describing the \ line joiner is called > "Explicit line joining" and the section describing parentheticals is > called "Implicit line joining." > > So there! ;) Howe

Re: Tuples part 2

2008-06-05 Thread George Sakkis
On Jun 5, 11:48 am, Ivan Illarionov <[EMAIL PROTECTED]> wrote: > On 5 июн, 19:38, George Sakkis <[EMAIL PROTECTED]> wrote: > > > > > On Jun 5, 11:21 am, Ivan Illarionov <[EMAIL PROTECTED]> wrote: > > > > On 5 июн, 18:56, Ivan Illarionov <[EMAIL PROTECTED]> wrote: > > > > > On 5 июн, 18:19, "[EMAIL

Re: Pylons and memory use?

2008-06-05 Thread Joshua Kugler
John Salerno wrote: > Hi everyone. I was thinking about signing up with a web host that > supports Pylons (among many other things) and one of the differences > between the various plans is application memory for long-running > processes. The plan I'd like to sign up for has 80MB. Does anyone know

Re: gcc error in Mac OS X

2008-06-05 Thread Zhaojie Boulder
Hi Tommy, When I typed which gcc,nothing happened,I checked the /usr/bin path myself and gcc was not there. In fact, the Xcode folder is at the same level with the usr folder. Is there a way you can install Xcode in the right place? I did not find such a option during the installation process of X

Re: Why does python not have a mechanism for data hiding?

2008-06-05 Thread Russ P.
On Jun 5, 4:47 am, Bruno Desthuilliers wrote: > Antoon Pardon a écrit : > > > On 2008-06-04, NickC <[EMAIL PROTECTED]> wrote: > >> On Jun 4, 4:09 am, "Russ P." <[EMAIL PROTECTED]> wrote: > >>> What is it about leading underscores that bothers me? To me, they are > >>> like a small pebble in your s

Re: Help need with subprocess communicate

2008-06-05 Thread Daniel Klein
On Tue, 3 Jun 2008 23:48:38 -0700 (PDT), [EMAIL PROTECTED] wrote: >On Jun 3, 11:23 pm, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: >> On Tue, 3 Jun 2008 18:04:40 -0700 (PDT), [EMAIL PROTECTED] declaimed the >> following in comp.lang.python: >> >> >> >> > Hi Daniel, >> > Thanks for your reply.. >>

Re: ANN: Resolver One 1.1 released

2008-06-05 Thread Laura Creighton
Hey, Congratulations! Laura Creighton -- http://mail.python.org/mailman/listinfo/python-list

Re: Why does python not have a mechanism for data hiding?

2008-06-05 Thread George Sakkis
On Jun 5, 2:07 pm, "Russ P." <[EMAIL PROTECTED]> wrote: > The "private" keyword goes further and prevents > access even by derived classes. The double leading underscore in > Python does no such thing. Who develops these derived classes ? A competitor ? A malicious hacker ? A spammer ? Who are yo

Please unregister this mail-address out of mailing-list.

2008-06-05 Thread Hank @ITGroup
Dear Python Staff, I am writing this letter to unsubscribe this mail-address from python mail-list. One problem is that this python community is so active that I always lost myself to find my business emails. So, I want to quit this mail-address from you, and want to set up a specific mail-box

Re: Please unregister this mail-address out of mailing-list.

2008-06-05 Thread Patrick Stinson
you can unsubscribe yourself at the list info page (the same page you subscribed from) On Thu, Jun 5, 2008 at 10:22 AM, Hank @ITGroup <[EMAIL PROTECTED]> wrote: > Dear Python Staff, > I am writing this letter to unsubscribe this mail-address from python > mail-list. One problem is that this python

Re: Why does python not have a mechanism for data hiding?

2008-06-05 Thread Russ P.
On Jun 5, 4:53 am, Bruno Desthuilliers wrote: > Russ P. a écrit : > Given your very recent discovery of what 'dynamic' *really* means in > Python (like, for exemple, dynamically adding / replacing attributes - > including methods - on a per-class or per-instance basis), possibly, yes. My "very r

Re: Tuples part 2

2008-06-05 Thread Ivan Illarionov
On 5 июн, 21:22, George Sakkis <[EMAIL PROTECTED]> wrote: > On Jun 5, 11:48 am, Ivan Illarionov <[EMAIL PROTECTED]> wrote: > > > > > On 5 июн, 19:38, George Sakkis <[EMAIL PROTECTED]> wrote: > > > > On Jun 5, 11:21 am, Ivan Illarionov <[EMAIL PROTECTED]> wrote: > > > > > On 5 июн, 18:56, Ivan Illar

Re: Why does python not have a mechanism for data hiding?

2008-06-05 Thread Russ P.
On Jun 5, 11:25 am, George Sakkis <[EMAIL PROTECTED]> wrote: > On Jun 5, 2:07 pm, "Russ P." <[EMAIL PROTECTED]> wrote: > > > The "private" keyword goes further and prevents > > access even by derived classes. The double leading underscore in > > Python does no such thing. > > Who develops these der

  1   2   >