generating a tree-like structure

2007-05-31 Thread Thorsten Kampe
Hi, This is a fairly general question: is there some kind of module or framework that allows building a tree like structure from certain kind of data? To be specific: I have a program that dumps the content of a LDAP directory including all properties and values and groups the result from the

RE: c[:]()

2007-05-31 Thread Warren Stringer
> >> c[:] holds many behaviors that change dynamically. > > > > I've absolutely no clue what that sentence means. If c[:] does > > behave differently than c, then somebody's done something > > seriously weird and probably needs to be slapped around for > > felonious overriding. I'm still a bit ne

pack() and the division of vertical space

2007-05-31 Thread [EMAIL PROTECTED]
I am trying to figure out how to stack two widgets in a frame vertically so that they both expand horizontally and during vertical expansion, the top one sticks to the top of the frame and the bottom one consumes the remaining vertical space. I thought this would do it but it doesn't. What am I m

Re: Is PEP-8 a Code or More of a Guideline?

2007-05-31 Thread Wildemar Wildenburger
Warren Stringer wrote: > i.prefer.dots-- no, seriously > > sure it's slow, but forces you the think about names in a new way. > Are you now suggesting that "addinfourl()" should actually be called "url()", placed in a module named "info", which is part of a package called "add", so as to

Re: Python memory handling

2007-05-31 Thread Thorsten Kampe
* (31 May 2007 06:15:18 -0700) > On 31 mai, 14:16, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > > In <[EMAIL PROTECTED]>, frederic.pica > > wrote: > And I'm not sure that the system will swap first this > unused memory, it could also swap first another application... AFAIK. Definitely no

FAQ: how to vary the byte offset of a field of a ctypes.Structure

2007-05-31 Thread p . lavarre
How do I vary the byte offset of a field of a ctypes.Structure? How do I "use the dynamic nature of Python, and (re-)define the data type after the required size is already known, on a case by case basis"? \\\ For example, suppose sometimes I receive the value '\x03hi' + \x04bye' for the struct:

strange PyLint configuration (was: PEP 8 style enforcing program)

2007-05-31 Thread Bjoern Schliessmann
Alexander Eisenhuth wrote: > Pylint is one of them (http://www.logilab.org/857) BTW: Why does pylint want all names with underscores? I tested it and it complains about malformed names in e.g. the following cases that are conformant to PEP 8: - single letter as parameter - firstLowerCamelCase na

Re: Python memory handling

2007-05-31 Thread Thorsten Kampe
* Chris Mellon (Thu, 31 May 2007 12:10:07 -0500) > > Like: > > import pool > > pool.free() > > pool.limit(size in megabytes) > > > > Why not letting the user choosing that, why not giving the user more > > flexibility ? > > I will try later under linux with the latest stable python > > > > Regards,

Standalone HTTP parser?

2007-05-31 Thread Christopher Stawarz
Does anyone know of a standalone module for parsing and generating HTTP messages? I'm looking for something that will take a string and return a convenient message object, and vice versa. All the Python HTTP parsing code I've seen is either intimately bound to the corresponding socket I/O

Re: Python memory handling

2007-05-31 Thread Klaas
On May 31, 11:00 am, Thorsten Kampe <[EMAIL PROTECTED]> wrote: > If it's swapped to disk than this is a big concern. If your Python app > allocates 600 MB of RAM and does not use 550 MB after one minute and > this unused memory gets into the page file then the Operating System > has to allocate an

Re: FAQ: how to vary the byte offset of a field of a ctypes.Structure

2007-05-31 Thread Larry Bates
[EMAIL PROTECTED] wrote: > How do I vary the byte offset of a field of a ctypes.Structure? > > How do I "use the dynamic nature of Python, and (re-)define the data > type after the required size is already known, on a case by case > basis"? > > \\\ > > For example, suppose sometimes I receive th

Re: strange PyLint configuration (was: PEP 8 style enforcing program)

2007-05-31 Thread Eduardo \"EdCrypt\" O. Padoan
On 5/31/07, Bjoern Schliessmann <[EMAIL PROTECTED]> wrote: > Alexander Eisenhuth wrote: > > > Pylint is one of them (http://www.logilab.org/857) > > BTW: Why does pylint want all names with underscores? I tested it > and it complains about malformed names in e.g. the following cases > that are conf

Adding tuples to a dictionary

2007-05-31 Thread Maciej Bliziński
Hi Pythonistas! I've got a question about storing tuples in a dictionary. First, a small test case which creates a list of dictionaries: import time list_of_dicts = [] keys = [str(x) for x in range(20)] prev_clk = time.clock() for i in range(20): my_dict = {} for key in keys:

Re: Adding tuples to a dictionary

2007-05-31 Thread Peter Otten
Maciej Blizi?ski wrote: > Hi Pythonistas! > > I've got a question about storing tuples in a dictionary. First, a > small test case which creates a list of dictionaries: > > import time > > list_of_dicts = [] > keys = [str(x) for x in range(20)] > prev_clk = time.clock() > for i in range(20)

Re: c[:]()

2007-05-31 Thread Douglas Woodrow
On Thu, 31 May 2007 07:49:22, Warren Stringer <[EMAIL PROTECTED]> wrote >> >>def a(): return 'b' >> >>def b(): print 'polly! wakey wakey' >> >>c = {} >> >>c['a'] = b >> >>c[a()]() #works! >> > >> > >> >(typo correction for other easily-confused newbies like myself) >> > >> >I think you mean [...]

Re: Python memory handling

2007-05-31 Thread Paul Melis
[EMAIL PROTECTED] wrote: > I will try later with python 2.5 under linux, but as far as I can see, > it's the same problem under my windows python 2.5 > After reading this document : > http://evanjones.ca/memoryallocator/python-memory.pdf > > I think it's because list or dictionnaries are used by t

Re: generating a tree-like structure

2007-05-31 Thread kyosohma
On May 31, 12:44 pm, Thorsten Kampe <[EMAIL PROTECTED]> wrote: > Hi, > > This is a fairly general question: is there some kind of module or > framework that allows building a tree like structure from certain kind > of data? > > To be specific: I have a program that dumps the content of a LDAP > dir

interesting take on python OO

2007-05-31 Thread 7stud
http://www.evolt.org/article/OO_programming_the_Python_way/18/449/ - The last article gives you the absolute basics of using Python. This time, we'll do the OO side of Python. Yes, Python: a true object- oriented language with classes, inheritance and all. Ok, my OO background comes from the

Re: generating a tree-like structure

2007-05-31 Thread Thorsten Kampe
* (31 May 2007 12:15:48 -0700) > On May 31, 12:44 pm, Thorsten Kampe <[EMAIL PROTECTED]> wrote: > > This is a fairly general question: is there some kind of module or > > framework that allows building a tree like structure from certain kind > > of data? > > > > To be specific: I have a program th

Re: FAQ: how to vary the byte offset of a field of a ctypes.Structure

2007-05-31 Thread Thomas Heller
[EMAIL PROTECTED] schrieb: > How do I vary the byte offset of a field of a ctypes.Structure? > > How do I "use the dynamic nature of Python, and (re-)define the data > type after the required size is already known, on a case by case > basis"? > > \\\ > > For example, suppose sometimes I receive

Webmail application for mod_python

2007-05-31 Thread Wolfgang Draxinger
I'm looking for a Squirrelmail* like webmail application, that I can hook up into mod_python. Is there anything ready to use or do I have to hack it myself? I don't like Squirrelmail, since I don't like PHP, and Squirrelmail depends on it. In the danger of getting my ears biten off in this NG: we

Re: Adding tuples to a dictionary

2007-05-31 Thread bvukov
On May 31, 8:30 pm, Maciej Bliziński <[EMAIL PROTECTED]> wrote: > Hi Pythonistas! > > I've got a question about storing tuples in a dictionary. First, a > small test case which creates a list of dictionaries: > > import time > > list_of_dicts = [] > keys = [str(x) for x in range(20)] > prev_clk

Re: c[:]()

2007-05-31 Thread Steve Holden
Warren Stringer wrote: c[:] holds many behaviors that change dynamically. >>> I've absolutely no clue what that sentence means. If c[:] does >>> behave differently than c, then somebody's done something >>> seriously weird and probably needs to be slapped around for >>> felonious overriding.

Re: strange PyLint configuration

2007-05-31 Thread Bjoern Schliessmann
Eduardo "EdCrypt" O. Padoan wrote: > No. Quoting PEP 8: > Functions: > """ > mixedCase is allowed only in contexts where that's already the > prevailing style (e.g. threading.py), to retain backwards > compatibility. > """ > Methods and instances: > """ > Use the function naming rules:

Re: Using PIL to find separator pages

2007-05-31 Thread Steve Holden
Larry Bates wrote: > I have a project that I wanted to solicit some advice > on from this group. I have millions of pages of scanned > documents with each page in and individual .JPG file. > When the documents were scanned the people that did > the scanning put a colored (hot pink) separator page

Re: Standalone HTTP parser?

2007-05-31 Thread Gabriel Genellina
En Thu, 31 May 2007 15:07:00 -0300, Christopher Stawarz <[EMAIL PROTECTED]> escribió: > Does anyone know of a standalone module for parsing and generating > HTTP messages? I'm looking for something that will take a string and > return a convenient message object, and vice versa. All the Python

Re: Standalone HTTP parser?

2007-05-31 Thread Steve Holden
Christopher Stawarz wrote: > Does anyone know of a standalone module for parsing and generating > HTTP messages? I'm looking for something that will take a string and > return a convenient message object, and vice versa. All the Python > HTTP parsing code I've seen is either intimately boun

RE: Is PEP-8 a Code or More of a Guideline?

2007-05-31 Thread Warren Stringer
Wildemar Wildenburger wrote: > This may be a nice > idea for the Next Overwhelming Programming Escapade (Codename: NOPE) > ... > You may want to elaborate on the "new way to think about names". Maybe > you have a point which I just don't see. Is it considered pythonic to LOL? Nietzsche would lov

Re: Python memory handling

2007-05-31 Thread Matthew Woodcraft
Josh Bloom <[EMAIL PROTECTED]> wrote: > If the memory usage is that important to you, you could break this out > into 2 programs, one that starts the jobs when needed, the other that > does the processing and then quits. > As long as the python startup time isn't an issue for you. And if python st

Re: Python memory handling

2007-05-31 Thread Chris Mellon
On 5/31/07, Thorsten Kampe <[EMAIL PROTECTED]> wrote: > * Chris Mellon (Thu, 31 May 2007 12:10:07 -0500) > > > Like: > > > import pool > > > pool.free() > > > pool.limit(size in megabytes) > > > > > > Why not letting the user choosing that, why not giving the user more > > > flexibility ? > > > I w

Re: non standard path characters

2007-05-31 Thread Martin v. Löwis
> thanks for that. I guess the problem is that when a path is obtained > from such an object the code that gets the path usually has no way of > knowing what the intended use is. That makes storage as simple bytes > hard. I guess the correct way is to always convert to a standard (say > utf8) and t

Re: Standalone HTTP parser?

2007-05-31 Thread Jean-Paul Calderone
On Thu, 31 May 2007 14:07:00 -0400, Christopher Stawarz <[EMAIL PROTECTED]> wrote: >Does anyone know of a standalone module for parsing and generating >HTTP messages? I'm looking for something that will take a string and >return a convenient message object, and vice versa. All the Python >HTTP p

Python 2.5.1 broken os.stat module

2007-05-31 Thread Joe Salmeri
I just upgraded from Python 2.4.2 to Python 2.5.1 and have found some unexpected behavior that appears to be a bug in the os.stat module. My OS is Windows XP SP2 + all updates. I have several programs that have worked flawlessly on all previous Python versions for years and they are now produc

call function in console without paranthesis

2007-05-31 Thread Troels Thomsen
Hello, I am wondering if I can write some code, that allows me to call functions in the console , IDLE, without using the paranthesis notation. Like print. This will improve "intreractive'ness" serialOpen() # some magic is issued here !!! tx Hello instead of serialObj = mySerial() serialObj

Re: FAQ: how to vary the byte offset of a field of a ctypes.Structure

2007-05-31 Thread p . lavarre
ctypes.sizeof(a) is still zero, as if ctypes.Structure.__init__ fetches a.__class__._fields_ rather than a._fields_ -- http://mail.python.org/mailman/listinfo/python-list

Re: FAQ: how to vary the byte offset of a field of a ctypes.Structure

2007-05-31 Thread p . lavarre
""" Thomas, Ouch ouch I must have misunderstood what you meant by "use the dynamic nature of Python, and (re-)define the data type after the required size is already known, on a case by case basis". Do you have an example of what you meant? I searched but did not find. Are those your words? Yes,

RE: c[:]()

2007-05-31 Thread Warren Stringer
Quotes out of context with mistaken assumptions, now follow: > So c[:]() -- or the more recent go(c)() -- executes all those > behaviors. > > No it doesn't. See below. > > > > If c[:]() works, the so does this, using real world names > > > > orchestra[:].pickle() > > orchestra[c

implementing callback function

2007-05-31 Thread Ron Provost
Within an application I'm working on. The app is written in multiple layers such that lower layers provided services to higher layers. Ideally in such an architecture, the high-level objects know about lower-level ones, but lower-level objects know nothing about the higher-level ones. There's

Re: Python 2.5.1 broken os.stat module

2007-05-31 Thread Tony Meyer
On Jun 1, 9:16 am, "Joe Salmeri" <[EMAIL PROTECTED]> wrote: > I just upgraded from Python 2.4.2 to Python 2.5.1 and have found some > unexpected behavior that appears to be a bug in the os.stat module. Have you read this thread? http://groups.google.com/group/comp.lang.python/browse_thread/thread

Re: c[:]()

2007-05-31 Thread Jerry Hill
On 5/31/07, Warren Stringer <[EMAIL PROTECTED]> wrote: > In summation: > I started this thread asking why c[:]() wouldn't work Because it's not part of the language. Did you read something that made you think it would work? Or are you proposing a change to the language? I think you're

Re: paste text with newlines into raw_input?

2007-05-31 Thread BartlebyScrivener
Hi, I'm going to post this here in case somebody else searches for an example Tkinter Text Widget for entering multiline text. I don't like GUI and don't even quite understand how it works, but it seems to work. In my case it's part of a program for pasting a quote from the clipboard into a MySQL

Re: c[:]()

2007-05-31 Thread Grant Edwards
On 2007-05-31, Jerry Hill <[EMAIL PROTECTED]> wrote: > On 5/31/07, Warren Stringer <[EMAIL PROTECTED]> wrote: >> In summation: >> I started this thread asking why c[:]() wouldn't work > > Because it's not part of the language. It's got nothing to do with the OP's usage, but it will work if

Re: call function in console without paranthesis

2007-05-31 Thread Wildemar Wildenburger
Troels Thomsen wrote: > Hello, > > I am wondering if I can write some code, that allows me to call functions in > the console , IDLE, without using the paranthesis notation. Like print. > This will improve "intreractive'ness" > Matlab-like, right? In a nutshell: No, not possible in python *its

Re: c[:]()

2007-05-31 Thread Erik Max Francis
Warren Stringer wrote: > I'm still a bit new at this, was wondering why c[:]() doesn't work, and > implicitly wondering why it *shouldn't* work. It does work. It means "make a sliced copy of `c`, and then call it with no arguments." Functionally that is _no different_ from `c()`, which means

Re: c[:]()

2007-05-31 Thread Steve Holden
Warren Stringer wrote: > Quotes out of context with mistaken assumptions, now follow: > >> So c[:]() -- or the more recent go(c)() -- executes all those >> behaviors. >> No it doesn't. See below. >>> If c[:]() works, the so does this, using real world names >>> >>> orchestra[:].pickle(

M2Crypto-0.17 blocks python threads?

2007-05-31 Thread reizes
I am having a problem with python threads and M2Crypto. It appears the M2Crypto used in multi-thread application blocks other threads from running: Environment: Linux 2.6 (centos 5.0), OpenSSL 0.9.8b, M2Crypto-0.17 I am using echod-thread.py and echo.py as test vehicles. Start up echod-thread.p

Re: call function in console without paranthesis

2007-05-31 Thread Robert Kern
Troels Thomsen wrote: > Hello, > > I am wondering if I can write some code, that allows me to call functions in > the console , IDLE, without using the paranthesis notation. Like print. > This will improve "intreractive'ness" > > serialOpen() # some magic is issued here !!! > tx Hello > > inste

Re: Using PIL to find separator pages

2007-05-31 Thread half . italian
On May 31, 10:01 am, Larry Bates <[EMAIL PROTECTED]> wrote: > I have a project that I wanted to solicit some advice > on from this group. I have millions of pages of scanned > documents with each page in and individual .JPG file. > When the documents were scanned the people that did > the scanning

Re: implementing callback function

2007-05-31 Thread Steve Holden
Ron Provost wrote: > Within an application I'm working on. The app is written in multiple > layers such that lower layers provided services to higher layers. > Ideally in such an architecture, the high-level objects know about > lower-level ones, but lower-level objects know nothing about the

Re: Python 2.5.1 broken os.stat module

2007-05-31 Thread Joe Salmeri
Hi Tony, I still believe there is a problem. I was searching for os.stat problems so I hadn't seen that one yet. (THANKS) I just read that thread but it seems that the conclusion was that this was a bug in a Microsoft c runtime library. Here's why I think there is still a problem: I created a

Re: file reading by record separator (not line by line)

2007-05-31 Thread Steve Howell
--- Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > There was just recently a thread with a > `itertools.groupby()` solution. Yes, indeed. I think it's a very common coding problem (with plenty of mostly analogous variations) that has these very common pitfalls: 1) People often forget t

Re: ImageMagick Issue

2007-05-31 Thread Sick Monkey
I ran into another slight problem. And I attempted to fix it, but have not been able to do so yet. If a filename does not contain a space, then this method works like a charm. But if there is a space then the code throws a nasty error. import os import subprocess from os import * imagefile = "

Re: getmtime differs between Py2.5 and Py2.4

2007-05-31 Thread Joe Salmeri
Hi Martin, Please see my response to Tony Meyer titled "Python 2.5.1 broke os.stat module" I provide a sample program that demonstrates that the results that are produced by the Python 2.4.2 os.stat module ALWAYS match the results that Windows Explorer displays as well as the results of the di

yes I would like register

2007-05-31 Thread ibrahima
- Original Message - From: <[EMAIL PROTECTED]> To: Sent: Thursday, May 31, 2007 11:46 PM Subject: Python-list Digest, Vol 45, Issue 2 > Send Python-list mailing list submissions to > python-list@python.org > > To subscribe or unsubscribe via the World Wide Web, visit > http://mail.pyth

RE: c[:]()

2007-05-31 Thread Warren Stringer
> > What?!? I started this thread. > > > No you didn't. Your original post was a reply to a message whose subject > line was 'Re: "is" and ==', and included the header > > In-Reply-To: <[EMAIL PROTECTED]> You're right, thanks. > >> I think the fundamental mistake you have made is to convince you

RE: c[:]()

2007-05-31 Thread Warren Stringer
> > I did not hijack another thread > > You really did. In the first message you sent, we see the following > header: > > > In-Reply-To: <[EMAIL PROTECTED]> ... Damn! I suck. Outlook as a newsreader sucks. I need to use something else. > I retyped the code you posted in the first pos

Roundup, smtplib, TLS and MS Exchange

2007-05-31 Thread carlistixx
Hi, I'm using the roundup issue tracker (http://roundup.sourceforge.net) which uses smtplib to send mail. It all worked until we moved to a hosted Exchange MTA. The hosting provider requires the use of TLS. Now roundup can't send mail. My version of python is: Python 2.3.4 (#1, Feb 6 2006, 10:38

get message form ie

2007-05-31 Thread Ashok
Hi, Is there any way i can get a message form internet explorer into my python script when internet explorer completes loading a page? _ ashok -- http://mail.python.org/mailman/listinfo/python-list

Re: c[:]()

2007-05-31 Thread Steve Holden
Warren Stringer wrote: >>> What?!? I started this thread. >>> >> No you didn't. Your original post was a reply to a message whose subject >> line was 'Re: "is" and ==', and included the header >> >> In-Reply-To: <[EMAIL PROTECTED]> > > You're right, thanks. > I think the fundamental mistake

Re: How to clean a module?

2007-05-31 Thread ai
Yes, you are right. But from this problem, could I infer that the statement "del xxx" doesn't release the memory which xxx used? On May 31, 11:21 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > ai schrieb: > > > It assumes that there is a module A which have two global variables X > > and Y.

Re: FAQ: how to vary the byte offset of a field of a ctypes.Structure

2007-05-31 Thread p . lavarre
I see that changing self._fields_ doesn't change ctypes.sizeof(self). I guess ctypes.Structure.__init__(self) fetches self.__class__._fields_ not self._fields_. -- http://mail.python.org/mailman/listinfo/python-list

Re: How to clean a module?

2007-05-31 Thread ai
Perhaps you misundstand me. I means if you reedit a module file and reload it, the interpreter doesn't follow the change you have made exactly. For example, you import a module, edit the module file (you may remove a global variable or change its name), save the change, reload the module (or del t

Re: ImageMagick Issue

2007-05-31 Thread Michael Bentley
On May 31, 2007, at 8:08 PM, Sick Monkey wrote: I ran into another slight problem. And I attempted to fix it, but have not been able to do so yet. If a filename does not contain a space, then this method works like a charm. But if there is a space then the code throws a nasty error. i

Re: c[:]()

2007-05-31 Thread Steve Holden
Warren Stringer wrote: > As mentioned a while back, I'm now predisposed towards using `do(c)()` > because square brackets are hard with cell phones. The one mitigating factor > for more general use, outside of cell phones, is speed. If a PEP enables a > much faster solution with c[selector()]() the

RE: c[:]()

2007-05-31 Thread Warren Stringer
As mentioned a while back, I'm now predisposed towards using `do(c)()` because square brackets are hard with cell phones. The one mitigating factor for more general use, outside of cell phones, is speed. If a PEP enables a much faster solution with c[selector()]() then it may be worthwhile. But, I

Market Your Business On Search Engines

2007-05-31 Thread DannyBoy Advertising
Utilize the Internet's search engines to promote your specific business website. Yahoo, Google, MSN, Business, Ask, and many more! If you have a website for your business, take it to the next level! Market locally, regionally, nationally or worldwide! *Promote Events *Produce Leads *Increase Sa

Ergonomic Mobile Computing

2007-05-31 Thread siddeshone
I'm sharing with you my secret of the ultimate comfort using a laptop. Working with a laptop desk helps cool my laptop and it's a lot more easier to handle. The painful experience of aching wrists, strained neck and back is a story of the past with ergonomic typing and viewing angles. I feel more a

Embed text document in excel application using python

2007-05-31 Thread padmashreeg
Hi, How to embed object in excel using python? Thanks, padma -- http://mail.python.org/mailman/listinfo/python-list

Thread-safety of dict

2007-05-31 Thread Adam Olsen
It seems to be a commonly held belief that basic dict operations (get, set, del) are atomic. However, since I know searching the hash table is a multistep process, I thought I'd check it out for sure. First, my assumption is that one thread is attempting to get a single key, while other threads a

Re: Embed text document in excel application using python

2007-05-31 Thread Michel Claveau
Hi! > to embed object in excel An example come with PyWin32. This example create a toolbar inside Excel. This toolbar is write with Python. -- @-salutations Michel Claveau -- http://mail.python.org/mailman/listinfo/python-list

Re: Is PEP-8 a Code or More of a Guideline?

2007-05-31 Thread Tim Roberts
Carl Banks <[EMAIL PROTECTED]> wrote: > >Identifiers should just allow spaces. > >first element.get item(selected value) > >This is not a joke. I don't mean Python should necessarily do this >(though it could be done without any ambiguity or backward >incompatibility: there is currently nowhere in

Re: c[:]()

2007-05-31 Thread Grant Edwards
On 2007-06-01, Warren Stringer <[EMAIL PROTECTED]> wrote: >> python-ideas lists are the correct forum for those issues, >> though you will of course get all sorts of opinions on c.l.py. > > Oh well. Perhaps I can relax and actually write functioning > code ;-) What do you mean by 'c.l.py'? comp.l

Re: strange PyLint configuration

2007-05-31 Thread Steven Bethard
Bjoern Schliessmann wrote: > Eduardo "EdCrypt" O. Padoan wrote: > >> No. Quoting PEP 8: >> Functions: >> """ >> mixedCase is allowed only in contexts where that's already the >> prevailing style (e.g. threading.py), to retain backwards >> compatibility. >> """ >> Methods and instances:

RE: c[:]()

2007-05-31 Thread Warren Stringer
Steve Holden Wrote > The general rule in Python is that you provide the right objects and > expect error tracebacks if you do something wrong. So I don't really see > why you feel it's necessary to "[be] unambiguous about using a > container" when you don't appear to feel the same about its contain

Re: c[:]()

2007-05-31 Thread Grant Edwards
On 2007-06-01, Warren Stringer <[EMAIL PROTECTED]> wrote: > As mentioned a while back, I'm now predisposed towards using > `do(c)()` because square brackets are hard with cell phones. Yet you insist on adding gratuitous instances of [:] in your code. Methinks you're being disingenuous. > The on

Re: Python 2.5.1 broken os.stat module

2007-05-31 Thread Martin v. Löwis
> I created a file and specifically set the created date, last accessed date > and last write date to > > 01/02/2003 12:34:56 How did you do that? > In the case of my above test I know exactly what the timestamp on the file > is because I manually set it so that all 3 timestamps are the sa

Re: Announcing: ACM SIGAPL apl 2007 -- Arrays and Objects

2007-05-31 Thread Mike Kent
The APL2007 URL was given incorrectly should be http://www.sigapl.org/apl2007.html -- http://mail.python.org/mailman/listinfo/python-list

Re: implementing callback function

2007-05-31 Thread 7stud
Ron Provost wrote: > class X( object ): >fn = None >@staticmethod >def callX( n ): > return X.fn( n ) > Now, the following global stuff represents my higher-level routines: > def fn_impl( n ): # my callback >return n + 1 > X.fn = fn_impl # register my callback > No

Re: file reading by record separator (not line by line)

2007-05-31 Thread Hendrik van Rooyen
"Lee Sander" <[EMAIL PROTECTED]>wrote: > I wanted to also say that this file is really huge, so I cannot > just do a read() and then split on ">" to get a record > thanks > lee > > On May 31, 1:26 pm, Lee Sander <[EMAIL PROTECTED]> wrote: > > Dear all, > > I would like toreada really hugefileth

Re: c[:]()

2007-05-31 Thread Erik Max Francis
Warren Stringer wrote: > `c[:]()` is unambiguous because: > > def c(): print 'yo' > > c() # works, but > c[:]() # causes: > > Traceback (most recent call last)... > c[:]() # causes: > TypeError: unsubscriptable object > > There are many `c()` to be found in th

Re: c[:]()

2007-05-31 Thread Erik Max Francis
Warren Stringer wrote: > As mentioned a while back, I'm now predisposed towards using `do(c)()` > because square brackets are hard with cell phones. The one mitigating factor > for more general use, outside of cell phones, is speed. The speed at which you can type code is almost _never_ a valid r

Re: Tkinter Listbox - Different Text colors in one listbox

2007-05-31 Thread Hendrik van Rooyen
<[EMAIL PROTECTED]> wrote: > On May 29, 2:02 pm, [EMAIL PROTECTED] wrote: > > Hi, > > Is it possible to havedifferentitems in alistboxindifferentcolors? Or is it justonecolor for all items in alistbox? > > Thanks > > Rahul > > from Tkinter import * > > root = Tk() > l = Listbox(root) > l.pack()

Re: Is PEP-8 a Code or More of a Guideline?

2007-05-31 Thread Hendrik van Rooyen
"projecktzero" <[EMAIL PROTECTED]> wrote: > On May 30, 12:36 am, "Hendrik van Rooyen" <[EMAIL PROTECTED]> > wrote: > > "Maric Michaud" <[EMAIL PROTECTED]> wrote: > > > > Typist is fine, although MCP that I am, I tend to think of > > typist as female... > > > - Hendrik > > What does being a Mi

Re: is there a standard way to "install" egg-files under windows ?

2007-05-31 Thread stef
John Nagle wrote: > Diez B. Roggisch wrote: >> Stef Mientki schrieb: >> >>> hello, >>> >>> after 4 months playing around with Python, >>> and I still have troubles with egg files. >>> Sometimes it works, sometimes it doesn't. >>> >>> If I google on "python egg", I get lost of links, >>> which conta

Re: c[:]()

2007-05-31 Thread Duncan Booth
[EMAIL PROTECTED] wrote: > On May 31, 12:31 am, "Warren Stringer" <[EMAIL PROTECTED]> wrote: >> This is inconsistent: >> >> why does c[:][0]() work but c[:]() does not? >> Why does c[0]() has exactly the same results as c[:][0]() ? >> Moreover, c[:][0]() implies that a slice was invoked > > It's

Re: trouble with wxPython intro

2007-05-31 Thread 7stud
On May 30, 11:41 pm, Anthony Irwin <[EMAIL PROTECTED]> wrote: > Daniel Gee wrote: > > I'm trying to learn WxPython with the tutorial: > >http://wiki.wxpython.org/Getting_Started > I'm a wxPython beginner too, but instead of Anthony Irwin's suggestions, I think you should delete these two lines: I

Re: trouble with wxPython intro

2007-05-31 Thread Daniel Gee
That's so simple I'm embarrassed. I should have noticed the change from the example before to this one. It works now, thank you. -- http://mail.python.org/mailman/listinfo/python-list

Re: c[:]()

2007-05-31 Thread Douglas Woodrow
On Wed, 30 May 2007 23:23:22, Warren Stringer <[EMAIL PROTECTED]> wrote > >def a(): return 'b' >def b(): print 'polly! wakey wakey' >c = {} >c['a'] = b >c[a()]() #works! (typo correction for other easily-confused newbies like myself) I think you mean , | c['a']() #works! ` -- Doug Wo

Researcher/Lecturer Position at MODUL University Vienna

2007-05-31 Thread johannaostertag
I would like to draw your attention to the following open position at the Department of New Media Technology of MODUL University Vienna (under accreditation): * Geospatial, Semantic and Web 2.0 Technologies http://www.ecoresearch.net/download/nmt-tech.pdf MODUL University Vienna is a recently fo

Re: trouble with wxPython intro

2007-05-31 Thread 7stud
On May 31, 1:56 am, 7stud <[EMAIL PROTECTED]> wrote: > By setting redirect=False in wx.App.__init__(), the errors will be > sent to the console. Hmmm...I just read a note I scribbled in the margin of my book that says setting redirect=False sends the error messages to the console on Mac and Window

qt doevent

2007-05-31 Thread luca72
Hello at all I try to use qt , but i have problem, i don't find the command like wx.Yield() in wx or doevent in vb. Can you tell me the same command in qt Regards Luca -- http://mail.python.org/mailman/listinfo/python-list

Re: c[:]()

2007-05-31 Thread Douglas Woodrow
On Thu, 31 May 2007 08:57:56, Douglas Woodrow <[EMAIL PROTECTED]> wrote >On Wed, 30 May 2007 23:23:22, Warren Stringer <[EMAIL PROTECTED]> wrote >> >>def a(): return 'b' >>def b(): print 'polly! wakey wakey' >>c = {} >>c['a'] = b >>c[a()]() #works! > > >(typo correction for other easily-confused

RE: c[:]()

2007-05-31 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Warren Stringer wrote: > Oops! guess I should have tested my rather hasty complaint about executable > containers. This is nice: > > def a(): return 'b' > def b(): print 'polly! wakey wakey' > c = {} > c['a'] = b > c[a()]() #works! > > > c[a()]() is a switch statement w

Re: qt doevent

2007-05-31 Thread Phil Thompson
On Thursday 31 May 2007 9:04 am, luca72 wrote: > Hello at all > I try to use qt , but i have problem, i don't find the command like > wx.Yield() in wx or doevent in vb. > Can you tell me the same command in qt QApplication.processEvents() Phil -- http://mail.python.org/mailman/listinfo/python-li

Embedding objects( txt, doc) into excel using python

2007-05-31 Thread Girish
Hi, I want to embed a txt document into an excel using python. Here is my code, but i get an error message === Traceback (most recent call last): File "C:\Documents and Settings\kusumap\Desktop\Girish.py", line 7, in ? worksheet.OLEObjects.Ad

Re: Usage of the __and__ method

2007-05-31 Thread theju
Thank you folks for reminding me that the logical AND cannot be over- ridden and that the __and__ method represents the bit-wise AND operation. Thank You Thejaswi Puthraya http://thejuhyd.blogspot.com -- http://mail.python.org/mailman/listinfo/python-list

Good Python style?

2007-05-31 Thread Andreas Beyer
Hi, I found the following quite cryptic code, which basically reads the first column of some_file into a set. In Python I am used to seeing much more verbose/explicit code. However, the example below _may_ actually be faster than the usual "for line in ..." Do you consider this code good Python st

Re: Good Python style?

2007-05-31 Thread rishi pathak
What if I want to process lines.In this case I would have to iterate over the set and do the processing On 5/31/07, Andreas Beyer <[EMAIL PROTECTED]> wrote: Hi, I found the following quite cryptic code, which basically reads the first column of some_file into a set. In Python I am used to seei

Re: Embedding objects( txt, doc) into excel using python

2007-05-31 Thread Tim Golden
Girish wrote: > I want to embed a txt document into an excel using python. I didn't know people still did that! Still, each to his own ;) > Here is my code, but i get an error message > === > Traceback (most recent call last): > File "C:\Documen

Re: Good Python style?

2007-05-31 Thread Michael Bentley
On May 31, 2007, at 2:59 AM, Andreas Beyer wrote: > Hi, > > I found the following quite cryptic code, which basically reads the > first column of some_file into a set. > In Python I am used to seeing much more verbose/explicit code. > However, > the example below _may_ actually be faster than t

  1   2   >