[ANN] python-dateutil 1.0

2005-07-20 Thread Gustavo Niemeyer
Changes since 0.9 - * Fixing parsing of XXhXXm formatted time after day/month/year has been parsed. * Adding patch by Jeffrey Harris optimizing rrule.__contains__. What is it? --- The dateutil module provides powerful extensions to the standard datetime module,

[ANN] Release 0.43 of Task Coach

2005-07-20 Thread Frank Niessink
Hi all, Unfortunately, release 0.42 of Task Coach introduced a bug, causing Task Coach to not update information correctly in the tree and list view. Release 0.43 is meant to fix that. Bug fixed: * Tree and list view were not updated correctly when changing sort key or sort order, or

Re: Could anyone write a small program to log the Signal-to-Noise figures for a Netgear DG834 router?

2005-07-20 Thread Chris
In article [EMAIL PROTECTED], [EMAIL PROTECTED] [EMAIL PROTECTED] writes Chris, How would a wireless router show a signal to noise ratio? Especially if it's providing the signal? The Netgear DG834 is a wired router. Its statistics page gives line loss and SNR. -- Chris --

Re: Could anyone write a small program to log the Signal-to-Noise figures for a Netgear DG834 router?

2005-07-20 Thread Chris
In article [EMAIL PROTECTED], Steven D'Aprano [EMAIL PROTECTED] writes On Tue, 19 Jul 2005 07:24:19 +0100, Chris wrote: Could anyone write a small program to log the Signal-to-Noise figures for a Netgear DG834 router? Are you offering to pay somebody to do it, or just suggesting a project for

Re: Web Framework Reviews

2005-07-20 Thread flupke
Dave Cook wrote: On 2005-07-19, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: On the other hand I even in its current form I don't see how I would to the simple things that I need every day. Create a session, set a cookie, redirect to another url, perform HTTP autentication, create filter, use

Re: OO design

2005-07-20 Thread flupke
Robert Kern wrote: chris wrote: When I think about what I should do I end up with a class XY that has a method for everything I want to do eg. class XY: def read_file def scale_data def plot_data def shelve_data But somehow that doesn't feel right, especially when I expect the

Re: main window in tkinter app

2005-07-20 Thread Christopher Subich
William Gill wrote: O.K. I tried from scratch, and the following snippet produces an infinite loop saying: File C:\Python24\lib\lib-tk\Tkinter.py, line 1647, in __getattr__ return getattr(self.tk, attr) If I comment out the __init__ method, I get the titled window, and print

Using SHFileOperation

2005-07-20 Thread avishay
Hi All, I want to use SHFileOperation using Python and Win32 extentions, in order to move a file to the trash can. The function itself can be accessed by importing win32com.shell.shell. However, I cannot find anywhere the SHFILEOPSTRUCT. This structure is mentioned in the documentation of the

is a file open ?

2005-07-20 Thread luis
for root, dirs, files in os.walk(path): for file in files: # ¿ is opened ? Best regards Luis -- http://mail.python.org/mailman/listinfo/python-list

Reg file uploading

2005-07-20 Thread praba kar
Dear All, I have doubt regarding file uploading. When we upload a file to the remote server we can get file type through file extentions. How we can find out file type if a file doesn't have any extentions ? with regards PRabahar

Re: goto

2005-07-20 Thread Sybren Stuvel
Mike Meyer enlightened us with: I dislike gotos because it is too easy to inadvertently create infinite loops. 10 WINK; 20 GOTO 10 And it's impossible without them? while True: pass I thought the same thing, but then I read it again and thought about the inadvertently. As soon as you see a

Web shop in Python

2005-07-20 Thread Lad
Does anyone know about an e-shop solution written in Python? Thanks for reply Lad. -- http://mail.python.org/mailman/listinfo/python-list

Re: Documentation bug: Python console behaviour changed

2005-07-20 Thread Claudio Grondi
'Ctrl-Z' does not shut down the console but 'Ctrl-D' etc. Usually means you have a readline package installed. Right. Readline uninstalled, Ctrl-Z works again. By the way: After trying to take over readline support from Gary Bishop, I have inbetween given up trying to fix readline behaviour on

Re: email format in python

2005-07-20 Thread dimitri pater
hello, this one works quite well on validating email syntax: http://www.secureprogramming.com/?action=""> regards, DimitriOn 7/20/05, Dark Cowherd [EMAIL PROTECTED] wrote: This seems to give reasonable results.import repattern = r'[EMAIL PROTECTED],4}\b'pattobj = re.compile(pattern)ps =

Re: dictionary as property

2005-07-20 Thread Benjamin Niemann
Thanos Tsouanas wrote: Hello. (How) can I have a class property d, such that d['foo'] = 'bar' will run a certain function of the class with 'foo' and 'bar' as it's arguments? I think you mean: class A: def __init__(self): self.d = {} def dict_change(self, key, value): print

Re: Opinions on KYLIX 3 (Delphi 4 Linux)

2005-07-20 Thread David Trudgett
Thomas Bartkus [EMAIL PROTECTED] writes: Good question! Wither Borland? My impression (second hand - based on no direct experience with Kylix!) is that Borlands wonderful Delphi product ported to Linux has been a dissapointment. * * * Someone with real experience on Kylix - please jump

Re: Python IDE

2005-07-20 Thread Fuzzyman
Hmmm.. I've *never* hada problem with SPE crashing.. at least not under Windoze... Regards, Fuzzy http://www.voidspace.org.uk/python -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Programming Contest

2005-07-20 Thread Brian Quinlan
Raymond Hettinger wrote: I'm curious about the stability of your timing setup. If you run your own version of fly.py several times with the same starting seed, how much variation do you see between runs? There is very little variation (about 0.1%) but my solution is over an order of

Re: Reg file uploading

2005-07-20 Thread Sybren Stuvel
praba kar enlightened us with: When we upload a file to the remote server we can get file type through file extentions. No you can't, you can only make a better guess. If I name my PNG file somefile.jpg, you won't be able to get the file type through file extentions. How we can find out file

Re: Ordering Products

2005-07-20 Thread Ron Adam
Kay Schluehr wrote: Ron Adam wrote: Kay Schluehr wrote: BTW.. Usually when people say I don't want to discourage..., They really want or mean the exact oppisite. Yes, but taken some renitence into account they will provoke the opposite. Old game theoretic wisdoms ;) True.. but I

Re: is a file open ?

2005-07-20 Thread John Machin
luis wrote: for root, dirs, files in os.walk(path): for file in files: # ¿ is opened ? ¡ rtfm ! files is a list of fileNAMEs -- i.e. strings. ¿ How could you possibly imagine that your sample code would open a file? What a design-nonsense that would be: instant complaints from folk

Re: is a file open ?

2005-07-20 Thread Daniel Dittmar
luis wrote: for root, dirs, files in os.walk(path): for file in files: # ¿ is opened ? On Linux and some other Unixes, you can probably read the /proc filesystem. On Windows, you'll probably get the quickest result by running handle.exe

Re: Python IDE

2005-07-20 Thread Franz Steinhaeusler
On 18 Jul 2005 22:32:43 -0700, linuxfreak [EMAIL PROTECTED] wrote: Tried SPE and Dr.Pyhton but the former crashes regulary and the latter is quite unweildy and does not have a great many features Hello, what are you missing in DrPython? Did you took a look at the plugins? What do you mean by

Re: is a file open ?

2005-07-20 Thread John Machin
Daniel Dittmar wrote: luis wrote: for root, dirs, files in os.walk(path): for file in files: # ¿ is opened ? On Linux and some other Unixes, you can probably read the /proc filesystem. On Windows, you'll probably get the quickest result by running handle.exe

Re: Python IDE

2005-07-20 Thread Franz Steinhaeusler
On 19 Jul 2005 19:56:49 -0700, Luis M. Gonzalez [EMAIL PROTECTED] wrote: Have you tried PyCrust? http://sourceforge.net/projects/pycrust/ It is long time ago, that pycrust was delevoped as sourceforge project. It is part of the wxPython distribution and I have recently added some features.

Re: list implementation

2005-07-20 Thread Heikki Orsila
Raymond Hettinger [EMAIL PROTECTED] wrote: [sj] Thus, random access is an O(1) operation while insertion/deletion is an O(n) operation. Yes. Unfortunately no. Check Terry Reeds answer. Random access is O(1), insertion/deletion to front is O(n), and i/d to back is O(1). The back i/d operation

Re: OO design

2005-07-20 Thread chris
Extremely grateful for all the responses. I've pasted them all into a document and can now read all your valuable ideas together. Even at a first reading they have already helped clarify my thinking. Also minor clarifications:: I'm hoping some of you python lamas out there might be able to

Re: How to send a query to the browser from time to time?

2005-07-20 Thread Admin
On Tue, 19 Jul 2005 19:43:25 -0300, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: otherwise, my only suggestion is to use another protocol instead of http. What do you suggest? -- Thanks, Admin. Want to buy me a book? http://tinyurl.com/78xzb :) --

Re: access the text being generated in other windows

2005-07-20 Thread bmgz
algebraist wrote: is there a way python can access the text being generated in other windows, by other programs/processes? my guess- you will probably have to resort to some rather downright dirty screen scraping. -- http://mail.python.org/mailman/listinfo/python-list

Re: goto

2005-07-20 Thread Peter Hansen
Sybren Stuvel wrote: Mike Meyer enlightened us with: I dislike gotos because it is too easy to inadvertently create infinite loops. 10 WINK; 20 GOTO 10 And it's impossible without them? while True: pass I thought the same thing, but then I read it again and thought about the

Re: Strange os.path.exists() behaviour

2005-07-20 Thread Casey Hawthorne
Does this work differently under other platforms? Pierre Quentel [EMAIL PROTECTED] wrote: os.path.exists(path) returns True if path exists But on Windows it also returns True for path followed by any number of dots : Python 2.4 (#60, Nov 30 2004, 11:49:19) [MSC v.1310 32 bit (Intel)] on win32

Re: python certification

2005-07-20 Thread [EMAIL PROTECTED]
hi i bassically need it cuz i am appyling to colleges this year and i know this kind of stuff really helps. besides since i am learning python i thought i might get some credit for it as well. its bassically for a mention in my resume/bio-data/appliccation i am willing to spend about $50-100 but

Re: python certification

2005-07-20 Thread dimitri pater
Hello, Python is not about certificates or diplomas, so do not spend any money on it (the other guy was only joking). If you want to show your python skills to others (like the teachers from the college you want to go to), use this list. Participate in discusions, ask quesions, maybe even write a

Re: Python s60 Contact DB

2005-07-20 Thread xen0n
I have already posted the question to the Nokia forum, but, for now, noone seems to have an answer... Hope this is a bug of py2sis... I dont want to rewrite my entire application for a stupid bug! could ildg ha scritto: You should raise this question at Nokia python for series60 forum, I'm sure

is this pythonic?

2005-07-20 Thread Mage
Or is there better way? for (i, url) in [(i,links[i]) for i in range(len(links))]: ... links is a list. Mage -- http://mail.python.org/mailman/listinfo/python-list

Re: is this pythonic?

2005-07-20 Thread Simon Brunning
On 7/20/05, Mage [EMAIL PROTECTED] wrote: Or is there better way? for (i, url) in [(i,links[i]) for i in range(len(links))]: for i, url in enumerate(links): -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ --

Re: main window in tkinter app

2005-07-20 Thread William Gill
That does it!, thanks. Thinking about it, when I created a derived class with an __init__ method, I overrode the base class's init. It should have been intuitive that I needed to explicitly call baseclass.__init(self), it wasn't. It might have hit me if the fault was related to someting in

Re: socket programming

2005-07-20 Thread gry
What I have done in similar circumstances is put in a random sleep between connections to fool the server's load manager. Something like: .import time .min_pause,max_pause = (5.0, 10.0) #seconds .while True: . time.sleep(random.uniform(min_pause, max_pause)) . do_connection_and_query_stuff()

Re: Python IDE

2005-07-20 Thread projecktzero
You should probably stick with Xemacs. I use VIM, but I would be surprised if Xemacs doesn't have those features you want. Also, it's probably better to learn one editor well than a little bit of a bunch of different editors. -- http://mail.python.org/mailman/listinfo/python-list

Re: How do I send keystrokes to a console window in Windows XP?

2005-07-20 Thread RTG
Thank you, Peter. The application is a continuously running interactive program and we want to automatically interact with it (e.g. sendkeys and capture certain text responses). I will look for the thread you mentioned. - Roy -- http://mail.python.org/mailman/listinfo/python-list

Re: How to kill easygui dialog?

2005-07-20 Thread utabintarbo
William, Thanks for the reply. No flames, but I am running on both Linux and Windows, so I need a x-platform solution. I thought I had it with easygui... Must try some other ideas -- http://mail.python.org/mailman/listinfo/python-list

Re: socket programming

2005-07-20 Thread Helge Aksdal
* gry@ll.mit.edu gry@ll.mit.edu [2005/07/20 15:26]: What I have done in similar circumstances is put in a random sleep between connections to fool the server's load manager. Something like: .import time .min_pause,max_pause = (5.0, 10.0) #seconds .while True: .

getting the class name of a subclass

2005-07-20 Thread flupke
I have the following test code setup, trying to get the class name of a subclass in the super class. (Reason why i want this is described below) file class_name_start.py import class_name as cn obj = cn.B() obj.printclass() file class_name.py

Re: python certification

2005-07-20 Thread Fabien
Python is not about certificates or diplomas, so do not spend any money on it (the other guy was only joking). Even if Python is not about certificates, I think it's not the case for some company. And when you say to a company that you know how to dev. in Python, they don't know anything about

Re: How to kill easygui dialog?

2005-07-20 Thread Martin Franklin
[EMAIL PROTECTED] wrote: William, Thanks for the reply. No flames, but I am running on both Linux and Windows, so I need a x-platform solution. I thought I had it with easygui... Must try some other ideas Can you post an example... the following works for me... import easygui

Re: python certification

2005-07-20 Thread Cyril Bazin
Fine, Go to http://www.pythonchallenge.com and try the challenge, if you are able to get to the level 17-18, you can say you start to have good skills in Python. You will prove: you are not stupid, you know regex, basic sound/image treatment, the basics of zip/bz2, you understood how to use

Crafting IP packets with DNS queries .........newbie

2005-07-20 Thread laksh
hi all im looking for some code that can capture the IP packets from my system and craft them so that im able to put lots of DNS requests in them and send them to the server. is it possible and will the DNS server takes it for legal DNS request packets?? and should i need to incorporate some

wxPython field validation

2005-07-20 Thread lux
Hi all, I'm using wxPython and I need to block the cursor (focus) in a TextCtrl until the field value is valid. I've look EVT_KILL_FOCUS but I can't stop the focus beavoir (no focus to next field) Any ideas? Tanks a lot and sorry for my english. --

Re: python certification

2005-07-20 Thread Andreas Kostyrka
On Wed, Jul 20, 2005 at 04:22:10PM +0200, Fabien wrote: Python is not about certificates or diplomas, so do not spend any money on it (the other guy was only joking). Even if Python is not about certificates, I think it's not the case for some company. And when you say to a company that

Re: Windows command line problem

2005-07-20 Thread Benji York
[EMAIL PROTECTED] wrote: I think the lesson there is 'dont depend on getopt, write your own command line parser'. I always write my own, as it's so easy to do. While I'll agree that getopt isn't ideal, I find optparse to be much better. -- Benji York --

Re: python certification

2005-07-20 Thread Kay Schluehr
[EMAIL PROTECTED] schrieb: hi i bassically need it cuz i am appyling to colleges this year and i know this kind of stuff really helps. besides since i am learning python i thought i might get some credit for it as well. its bassically for a mention in my resume/bio-data/appliccation i am

Re: python certification

2005-07-20 Thread Kay Schluehr
Andreas Kostyrka schrieb: (These are the people look for Pearl and Pyhton programmers ;) ) Or Phyton :) Kay -- http://mail.python.org/mailman/listinfo/python-list

Re: getting the class name of a subclass

2005-07-20 Thread George Sakkis
flupke [EMAIL PROTECTED] wrote: I have the following test code setup, trying to get the class name of a subclass in the super class. (Reason why i want this is described below) file class_name_start.py import class_name as cn obj = cn.B() obj.printclass()

Re: getting the class name of a subclass

2005-07-20 Thread flupke
George Sakkis wrote: snip Make printclass a class method: class A(object): def __init__(self): print I'm A # for python 2.4 @classmethod def printclass(cls): print Module, cls.__module__ print Class, cls.__name__ # for 2.3 or older

Re: wxPython field validation

2005-07-20 Thread fred.dixon
why not validate then put cursor back into that field until satisfied. might use the lost focus (cant remember exact name right now) -- http://mail.python.org/mailman/listinfo/python-list

Re: getting the class name of a subclass

2005-07-20 Thread Dan Sommers
On Wed, 20 Jul 2005 14:06:57 GMT, flupke [EMAIL PROTECTED] wrote: file class_name.py class A(object): def __init__(self): print I'm A def printclass(self): print Name ,__name__ print Class ,A.__name__ Why A.__name__ and not

Re: What does :: mean?

2005-07-20 Thread qwweeeit
Hi Robert, I didn't succeed in reversing a string with the full form you proposed: live[len(live)-1:-1:-1] # where live=live The result is an empty string. To reverse live (in a full form), I have to put a char in front of the string and...: ('x'+live)[len(live)+1:0:-1] # -- evil Is it due

Need to interrupt to check for mouse movement

2005-07-20 Thread stringy
I have a program that shows a 3d representation of a cell, depending on some data that it receives from some C++. It runs with wx.timer(500), and on wx.EVT_TIMER, it updates the the data, and receives it over the socket. In my program I also want to be able to rotate the 3d representation, and can

Re: What does :: mean?

2005-07-20 Thread Robert Kern
[EMAIL PROTECTED] wrote: Hi Robert, I didn't succeed in reversing a string with the full form you proposed: live[len(live)-1:-1:-1] # where live=live The result is an empty string. To reverse live (in a full form), I have to put a char in front of the string and...:

Re: Image orientation and color information with PIL?

2005-07-20 Thread tvmaly
Jeff, this was exactly what I was looking for. I wrote a script with this code and it worked perfectly. Thanks Ty -- http://mail.python.org/mailman/listinfo/python-list

ANN: PyDev 0.9.6 released

2005-07-20 Thread Fabio Zadrozny
Hi All, PyDev - Python IDE (Python Development Enviroment for Eclipse) version 0.9.6 has just been released. This is to be considered a stable release for all features but the debugger, as there are still some integration issues for it to work with Eclipse 3.1, so, if you are using PyDev

convert ascii escapes into binary form

2005-07-20 Thread Hans-Peter Jansen
Hi Pythonistas, I need to convert ascii escapes into binary form, e.g.: \f - ^L [EMAIL PROTECTED] - [EMAIL PROTECTED]@ (rvalues in terminal representation) Any idea, how to do this most elegantly in python? Do I really need to do a search n'replace orgy, combined with regex for this task?

Re: python certification

2005-07-20 Thread Sebastian Bassi
On 16 Jul 2005 09:51:55 -0700, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: i want to get a small certificate or diploma in python. it should be online cuz i live in pakistan and wont have teast centers near me. it should be low cost as i am not rich. and hopefully it would be something like a

Re: Newbie question: Explain this behavior - a followup

2005-07-20 Thread David Smith
max wrote: David Smith [EMAIL PROTECTED] wrote in news:[EMAIL PROTECTED]: range statements, the example doesn't work. Given that the beginning and ending values for the inner range statement are the same, the inner range statement will never be Is your question about the semantics of

How to store 3D data? (data structure question)

2005-07-20 Thread Sebastian Bassi
Hello, I have to parse a text file (was excel, but I translated to CSV) like the one below, and I am not sure how to store it (to manipulate it later). Here is an extract of the data: Name,Allele,RHA280,RHA801,RHA373,RHA377,HA383 TDF1,181, ,188, ,190, ,193,*,*,,, ,None,,,*,*,*

Re: convert ascii escapes into binary form

2005-07-20 Thread Robert Kern
Hans-Peter Jansen wrote: Hi Pythonistas, I need to convert ascii escapes into binary form, e.g.: \f - ^L [EMAIL PROTECTED] - [EMAIL PROTECTED]@ (rvalues in terminal representation) Any idea, how to do this most elegantly in python? Do I really need to do a search n'replace orgy,

Re: main window in tkinter app

2005-07-20 Thread Christopher Subich
William Gill wrote: That does it!, thanks. Thinking about it, when I created a derived class with an __init__ method, I overrode the base class's init. It should have been intuitive that I needed to explicitly call baseclass.__init(self), it wasn't. It might have hit me if the fault

Re: Newbie - chapter 19 in How to think like a CS in python

2005-07-20 Thread MooMaster
Well, being a lowly CS student myself this sounded like fun, so I went ahead and took the challenge. The first thing you have to consider is how to add the new element to the list. Obviously you have to iterate through the list, find the first element that the new one is greater than, and insert

Re: Need to interrupt to check for mouse movement

2005-07-20 Thread MooMaster
Have you tried binding EVT_MOTION(func) to your window? -- http://mail.python.org/mailman/listinfo/python-list

Re: How to store 3D data? (data structure question)

2005-07-20 Thread Graham Fawcett
Sebastian Bassi wrote: Hello, I have to parse a text file (was excel, but I translated to CSV) like the one below, and I am not sure how to store it (to manipulate it later). Here is an extract of the data: [snip] This looks a lot like 2D data (row/column), not 3D. What's the third axis?

Re: Using SHFileOperation

2005-07-20 Thread Roger Upole
SHFILEOPSTRUCT is just a tuple, with the elements listed in docs. from win32com.shell import shell, shellcon shell.SHFileOperation((0, shellcon.FO_DELETE, 'somefilename', None, shellcon.FOF_ALLOWUNDO|shellcon.FOF_NOCONFIRMATION)) hth Roger avishay [EMAIL PROTECTED] wrote in message

Re: How to store 3D data? (data structure question)

2005-07-20 Thread Sebastian Bassi
On 20 Jul 2005 10:47:50 -0700, Graham Fawcett [EMAIL PROTECTED] wrote: This looks a lot like 2D data (row/column), not 3D. What's the third axis? It looks, too, that you're not really interested in storage, but in analysis... I think it as 3D like this: 1st axis: [MARKER]Name, like TDF1,

Re: convert ascii escapes into binary form

2005-07-20 Thread Hans-Peter Jansen
Robert Kern wrote: Hans-Peter Jansen wrote: Hi Pythonistas, I need to convert ascii escapes into binary form, e.g.: \f - ^L [EMAIL PROTECTED] - [EMAIL PROTECTED]@ (rvalues in terminal representation) Any idea, how to do this most elegantly in python? Do I really need to do a search

Re: access the text being generated in other windows

2005-07-20 Thread algebraist
yeah, someone else mentioned getting the window's handle (can use spyxx.exe for this) and then using hooks... but i'm not sure where to go to learn about using window hooks, in python (or in general, actually)... is this 'downright dirty screen scraping'? --

EasyDialogs in MacOSX Tiger

2005-07-20 Thread Ian A. York
When I use EasyDialogs.Message in OSX (10.4.2), I have to manually switch to Python, the icon for which jumps in the dock until I click it. This is the case using pythonw with either 2.3 or 2.4. This question has come up before (EasyDialogs module problem with python 2.4.1, April 18/05),

Re: OO design

2005-07-20 Thread Terry Hancock
On Wednesday 20 July 2005 07:22 am, chris wrote: Also minor clarifications:: I'm hoping some of you python lamas out there might be able to share some of your wisdom on the subject. lama = guru = teacher(not a furry animal, although my dog has certainly taught me a few tricks ...

Re: How to store 3D data? (data structure question)

2005-07-20 Thread Sebastian Bassi
On 20 Jul 2005 10:47:50 -0700, Graham Fawcett [EMAIL PROTECTED] wrote: # zip is your friend here. It lets you iterate # across your line names and corresponding values # in parallel. This zip function is new to me, the only zip I knew was pkzip :). So will read about it. -- a

Printing a variable's name not its value

2005-07-20 Thread travislspencer
Hey, I am trying to write a function that takes an arbitrary number of arguments and does one of two things. If the variable is a key in a dictionary, it prints the key and its value. Otherwise, if any of the variables isn't in the dictionary, the function prints the variable's name and value.

Re: How to store 3D data? (data structure question)

2005-07-20 Thread Graham Fawcett
Sebastian Bassi wrote: On 20 Jul 2005 10:47:50 -0700, Graham Fawcett [EMAIL PROTECTED] wrote: This looks a lot like 2D data (row/column), not 3D. What's the third axis? It looks, too, that you're not really interested in storage, but in analysis... I think it as 3D like this: 1st axis:

Re: Printing a variable's name not its value

2005-07-20 Thread Simon Dahlbacka
as you have been told, there is no way to get a variable's name, take a look at http://effbot.org/zone/python-objects.htm to find out why this is so. -- http://mail.python.org/mailman/listinfo/python-list

Re: How to store 3D data? (data structure question)

2005-07-20 Thread Sebastian Bassi
On 20 Jul 2005 11:51:56 -0700, Graham Fawcett [EMAIL PROTECTED] wrote: You get the idea: model the data in the way that makes it most useable to you, and/or most efficient (if this is a large data set). I don't think this could be called a large dataset (about 40Kb all the file). It would be

wxPython wxGlade

2005-07-20 Thread Mike L.G.
Hello! Is there a way to span columns using wxGlade? I'd like to get a layout that looks like this: |---| ||-||--|| ||edit ||button|| ||-||--|| ||-|| || button|| ||-|| |---| I would like the 2nd button on the 2nd row to span

Re: OO design

2005-07-20 Thread Florian Diesch
chris [EMAIL PROTECTED] wrote: I've been scripting with python for a while now. Basically writing a few functions and running in the ipython shell. That's been very useful. But the more I do this the more I see that I'm doing more or less the same thing over and over again. So its feels like I

Re: Python IDE

2005-07-20 Thread Florian Diesch
linuxfreak [EMAIL PROTECTED] wrote: Got going with python...and i must say its a pretty cool language. Been using Xemacs to write me programs. But I want an IDE that would I'm using GNU emacs give me auto-completion, Read the manual about tags and abbrevs Emacs Language Sensitive Editor

Re: Printing a variable's name not its value

2005-07-20 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : Hey, I am trying to write a function that takes an arbitrary number of arguments and does one of two things. If the variable is a key in a dictionary, it prints the key and its value. Otherwise, if any of the variables isn't in the dictionary, the function

Re: How to store 3D data? (data structure question)

2005-07-20 Thread Cyril Bazin
The question of the type of the data sutructure depends of your use of the data. You could avoid some confusion without naming your columns lines... Anyway, here is a piece of code that read the file and count the star on the fly: (The result is a dict of dict of int.)

Re: How to store 3D data? (data structure question)

2005-07-20 Thread Sebastian Bassi
On 7/20/05, Cyril Bazin [EMAIL PROTECTED] wrote: The question of the type of the data sutructure depends of your use of the data. You could avoid some confusion without naming your columns lines... Yes, that is because they are plant lines, that is why is called lines :) Anyway, here is a

Re: Printing a variable's name not its value

2005-07-20 Thread travislspencer
Bruno Desthuilliers wrote: [EMAIL PROTECTED] a écrit : globals = {} globals() is a builtin function, you should no shadow it. Oh, woops. I'll fix that. def printVerbose(*args, **kwargs): if VERBOSE in globals: for a in args: if a in globals:

Re: Printing a variable's name not its value

2005-07-20 Thread travislspencer
Simon Dahlbacka wrote: as you have been told, there is no way to get a variable's name, take a look at http://effbot.org/zone/python-objects.htm to find out why this is so. Thanks, Simon, for the link. -- Regards, Travis Spencer -- http://mail.python.org/mailman/listinfo/python-list

Re: is this pythonic?

2005-07-20 Thread Caleb Hattingh
Wow, I didn't know about enumerate. Many thanks Caleb On Wed, 20 Jul 2005 15:19:50 +0200, Simon Brunning [EMAIL PROTECTED] wrote: On 7/20/05, Mage [EMAIL PROTECTED] wrote: Or is there better way? for (i, url) in [(i,links[i]) for i in range(len(links))]: for i, url in enumerate(links):

mod_python Apache/2.0.52 (Win32) Python 2.4

2005-07-20 Thread Dieter Raber
Hi there, I am wondering if there is a mod_python for the above configuration. I downloaded mod_python-3.1.3.win32-py2.3.exe, which of course as the name implies keeps on asking me for a python 2.3 installation. I imagine one could cheat a little bit with a fake registry entry that says it was

Lots of pdf files

2005-07-20 Thread Greg Lindstrom
Hello- I'm running Python 2.3 on a Linux system and have lots (about 2000) files in pdf format to print each day. If I just wind up and fire all the files at the printer at once (as 2000 separate print jobs), the print server throws a fit and our system admin comes down and slaps me around

returning list of strings from Python COM to Visual basic 6

2005-07-20 Thread Philippe C. Martin
Hi, Is it possible ? ex: return ['1','2'] If so which type should I use in VB ? dim res as ??? Set testObj = CreateObject() res = testObj.AMethodThatReturnsAListOfStrings() Thanks, Philippe -- http://mail.python.org/mailman/listinfo/python-list

Re: wxPython wxGlade

2005-07-20 Thread Simon Dahlbacka
basically, you can just stack an outer vertical box sizer with two items and in the upper slot you put a horizontal box sizer with your two buttons and in the bottom slot you put the big button hope this helps /Simon ps. as this is a wxpython related question, you might get better answers on

Re: convert ascii escapes into binary form

2005-07-20 Thread Hans-Peter Jansen
Hi Robert, Hans-Peter Jansen wrote: Robert Kern wrote: That did the trick, thanks a lot, Peter. Unfortunately, on the s/Peter/Robert/g Sorry, Robert. That's the price to pay for doing multiple replies at the same time. Mea culpa.. target system, there's still python 2.0 running :-( Looks

Re: is this pythonic?

2005-07-20 Thread Bill Mill
On 7/20/05, Bill Mill [EMAIL PROTECTED] wrote: On 7/20/05, Simon Brunning [EMAIL PROTECTED] wrote: On 7/20/05, Mage [EMAIL PROTECTED] wrote: Or is there better way? for (i, url) in [(i,links[i]) for i in range(len(links))]: for i, url in enumerate(links): +2 for creating

Re: returning list of strings from Python COM to Visual basic 6

2005-07-20 Thread Philippe C. Martin
Sorry, it was in the book: Variant ! Regards; Philippe Philippe C. Martin wrote: Hi, Is it possible ? ex: return ['1','2'] If so which type should I use in VB ? dim res as ??? Set testObj = CreateObject() res = testObj.AMethodThatReturnsAListOfStrings()

Re: Printing a variable's name not its value

2005-07-20 Thread tiissa
Simon Dahlbacka wrote: as you have been told, there is no way to get a variable's name Well, if you really want to, you can get all the names bound to a given object: def get_names(obj): g = globals() names = [] for name in g: if g[name] is obj:

Re: Lots of pdf files

2005-07-20 Thread Wojciech Mula
Greg Lindstrom wrote: There does not appear to be a simple way to merge many pdf's into one. Program pdftk can merge pdf's, but I have never tried it. You may also use pdflatex --- there is a package called pdfpages provides powerful command \includepdf. w. --

Re: Printing a variable's name not its value

2005-07-20 Thread travislspencer
[EMAIL PROTECTED] wrote: Bruno Desthuilliers wrote: def printVerbose(*args, **kwargs): if VERBOSE in globals: for a in args: if a in globals: value = globals[a] for k, v in kwargs.iteritems(): print %s: %s %

  1   2   >