Python-URL! - weekly Python news and links (May 26)

2008-06-03 Thread Gabriel Genellina
QOTW: GHUM: There are no big applications written in Python. GHUM: Big applications are written in JAVA or COBOL or C# or other legacy programming systems. GHUM: If you programm in Python, your applications become quite small. Only frameworks in Python are big. JMC: So the fact that there

ANN: equivalence 0.1

2008-06-03 Thread George Sakkis
Equivalence is a class that can be used to maintain a partition of objects into equivalence sets, making sure that the equivalence properties (reflexivity, symmetry, transitivity) are preserved. Two objects x and y are considered equivalent either implicitly (through a key function) or explicitly

Python-URL! - weekly Python news and links (Jun 3)

2008-06-03 Thread Gabriel Genellina
QOTW: PS: in some ways it's interesting and relevant that there has been no discussion on psf-members of Google's AppEngine, which many people I've talked to think is the most important thing that's ever happened to Python ever. - David Ascher Alternatives for a multi dimensional

GOZERBOT 0.8.1.0 released

2008-06-03 Thread Bart Thate
0.8.1.0 is here and can be downloaded from http://gozerbot.org new features: * ssl connections are now supported * third party software included into gozerbot: o feedparser (used by RSS) .. makes atom feeds possible o simplejson (used by COLLECTIVE) o

KPAX CMS - The human CMS from another planet

2008-06-03 Thread Massimo Di Pierro
Hello everybody, I just released the KPAX CMS 1.0 beta (based on web2py). Create web pages, wikis with locking and versioning, blogs, chats, surveys, video/audio streams. No programming required. Runs off a USB drive too. The name is temporary. Here is a screencast/tutorial

ConfigObj quoting issues

2008-06-03 Thread Roopesh
Hi, I am using ConfigObj to write email addresses, as a list. I am using email module functions to extract email addresses: to_address = header.get_all('To', []) address_list = getaddresses(to_address) to = map(lambda address: ''+address[0]+' '+address[1]+'' ,address_list) conf_obj['to'] = to

PyInstaller: problem to build exe with PyQt4

2008-06-03 Thread Mark Delon
Hi, I need to generate single EXEcutable via PyInstaller. It will be genereated - i get one single executable. AFTER CALL (exe) I get an error: no module named _gt Build command: 1. Configure.py 2. Makespec.py -F script.py 3. Build.py script.spec

Re: Merging ordered lists

2008-06-03 Thread Raymond Hettinger
Thanks for the tip; itertools never ceases to amaze. One issue: groupby doesn't seem to remove all duplicates, just consecutive ones (for lists of strings and integers, at least): [k for k, g in itertools.groupby(list(asdfdfffdf))] ['a', 's', 'd', 'f', 'd', 'f', 'd', 'f'] That's why the

Writing Empty folders into ZipFile

2008-06-03 Thread otaeris
Hello. I'm having situation writing folders structure into a zip file. Folders contain no files. Is it possible to do in python ? Regards, Bartek -- http://mail.python.org/mailman/listinfo/python-list

Re: Code correctness, and testing strategies

2008-06-03 Thread Paul Rubin
Duncan Booth [EMAIL PROTECTED] writes: I made the mistake at one point when I was trying to sell the concept of TDD telling the people I was trying to persuade that by writing the tests up front it influences the design of the code. I felt the room go cold: they said the customer has to

Re: Writing Empty folders into ZipFile

2008-06-03 Thread Christian Heimes
[EMAIL PROTECTED] schrieb: Hello. I'm having situation writing folders structure into a zip file. Folders contain no files. Is it possible to do in python ? As far as I remember the zip format it's not possible at all. Folders are created implicitly. The zip format doesn't support empty

Re: Database Query Contains Old Data

2008-06-03 Thread James A. Donald
On Mon, 02 Jun 2008 20:59:09 -0700, [EMAIL PROTECTED] wrote: James A. Donald If one has transactions open for a long time, or transactions that involve a great deal of data, this will result in poor performance or poor scalability. But one may have such large transactions without being

Re: pythton 调用 so 共享库不能转换参数类型

2008-06-03 Thread Mark Tolonen
windwiny [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] 我初学python 的 ctypes, 现在的环境是 ubuntu 8.04, Python 2.5.2 (r252:60911, May 7 2008, 15:19:09) , gcc (GCC) 4.2.3 (Ubuntu 4.2.3-2ubuntu7) 我创建了一个 so 共享库 - #include math.h double myfd(double x) { return x * 2;}

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

2008-06-03 Thread Antoon Pardon
On 2008-06-03, Carl Banks [EMAIL PROTECTED] wrote: On Jun 2, 10:14 am, Antoon Pardon [EMAIL PROTECTED] wrote: On 2008-06-02, Carl Banks [EMAIL PROTECTED] wrote: Can't you look beyond the specific example? The GetX is just an example. Any local function of __init__ has access to hidden and its

Books for programmers

2008-06-03 Thread V
Hi, I'm a C++, Java and C programmer, and I'm searching for a (preferably printed) book that teaches me the Python idioms, i.e. the Python way of doing something. Ideally, I'm searching for a book like Effective C++ or Effective Java, that does not lose time teaching what is a class, or a

Re: Code correctness, and testing strategies

2008-06-03 Thread Duncan Booth
[EMAIL PROTECTED] (Jacob Hallen) wrote: The most important aspect of usnit testing is actually that it makes the code testable. This may sound lik an oxymoron but it is actually a really important property. Testable code has to have a level of modularity as well as simplicity and clarity in

Re: Merging ordered lists

2008-06-03 Thread Peter Otten
etal wrote: def unique(items):     u = set(items)     if len(u) == len(items):         return items     result = []     for item in items:         if item in u:             result.append(item)             u.remove(item)     return result You did right by preserving the

Re: Better performance

2008-06-03 Thread Paul Boddie
On 2 Jun, 20:16, David [EMAIL PROTECTED] wrote: PHP: Easy to make web pages. Perl: Lots of libraries, good text processing support Python: Easy to read and maintain PHP: For the security vulnerabilities. Perl: For the maintenance problem. Python: To the rescue! ;-) You could even use all

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

2008-06-03 Thread alex23
On Jun 3, 3:42 pm, Russ P. [EMAIL PROTECTED] wrote: Well, the designers of C++, Java, and Ada, to name just three very popular languages (well, two) seem to think it makes sense. But maybe you know more than they know. You do realise the same argument could be made about you and the designers

Re: convert binary to float

2008-06-03 Thread Lie
On Jun 2, 2:55 am, Mason [EMAIL PROTECTED] wrote: I have tried and tried... I'd like to read in a binary file, convert it's 4 byte values into floats, and then save as a .txt file. This works from the command line (import struct);     In [1]: f = open(test2.pc0, rb)     In [2]: tagData =

Re: Database Query Contains Old Data

2008-06-03 Thread Paul Boddie
On 3 Jun, 00:17, James A. Donald [EMAIL PROTECTED] wrote: On Wed, 21 May 2008 07:23:04 -0700 (PDT), Paul Boddie MySQL appears to use repeatable read by default [1] as its transaction isolation level, whereas PostgreSQL (for example) uses read committed by default [2]. I would guess that if

Re: Formatting Output

2008-06-03 Thread TheSaint
On 06:15, martedì 03 giugno 2008 Mensanator wrote: In Access, I create a query with this SQL: But this isn't python itself. I'd like to see a small function to let 'locate' the cursor into a TTY console. Surely it can't scroll. If it is not possible, then ncurses is the way. I don't know if it

Re: ConfigObj quoting issues

2008-06-03 Thread TheSaint
On 14:25, martedì 03 giugno 2008 Roopesh wrote: This error is because of the presence of \', \, \n etc. I had to do the following to make it work. address[i].replace(\','').replace('\','').replace('\n','') it's rather ugly :) I suggest use re module as follow: import re address[i] =

Re: PyInstaller: problem to build exe with PyQt4

2008-06-03 Thread Giovanni Bajo
On Tue, 03 Jun 2008 08:35:37 +0200, Mark Delon wrote: Hi, I need to generate single EXEcutable via PyInstaller. It will be genereated - i get one single executable. AFTER CALL (exe) I get an error: no module named _gt Build command: 1. Configure.py 2. Makespec.py -F script.py 3.

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

2008-06-03 Thread BJörn Lindqvist
On Mon, Jun 2, 2008 at 10:50 PM, Russ P. [EMAIL PROTECTED] wrote: On Jun 2, 6:41 am, Carl Banks [EMAIL PROTECTED] wrote: You are not realizing that only useful(**) thing about data hiding is that some code has access to the data, other code does not. If you hide data equally from everyone

Re: Database Query Contains Old Data

2008-06-03 Thread M.-A. Lemburg
On 2008-06-03 00:17, James A. Donald wrote: On Wed, 21 May 2008 07:23:04 -0700 (PDT), Paul Boddie MySQL appears to use repeatable read by default [1] as its transaction isolation level, whereas PostgreSQL (for example) uses read committed by default [2]. I would guess that if you were using

Re: Books for programmers

2008-06-03 Thread Matt
Hi, Hm, depends of course, how good your programming skills are in the languages you knwo already, but I rely on the book Beginning Python - From Novice to Professional by Magnus Lie Hetland, published by Apress. And for GUI programming I use the official wxPython book. Both books are

Re: Misuse of list comprehensions?

2008-06-03 Thread Lie
On May 20, 8:51 pm, Diez B. Roggisch [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: John Salerno: What does everyone think about this? The Example 2 builds a list, that is then thrown away. It's just a waste of memory (and time). No, it doesn't. It uses append because it refers to

Re: ctypes, function pointers and a lot of trouble

2008-06-03 Thread Matt
Hello! ouch, I should have seen that c_char... :S Well, I guess I just prove that it's useless to go to work and do some programming while having a headache like I had yesterday... okay well, back to topic: The DLL function seems to accept my parameters now, but unfortunately Python

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

2008-06-03 Thread Lie
On May 24, 9:14 pm, Fuzzyman [EMAIL PROTECTED] wrote: On May 24, 2:58 pm, Ben Finney [EMAIL PROTECTED] wrote: Sh4wn [EMAIL PROTECTED] writes: 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

Re: Books for programmers

2008-06-03 Thread V
Hi Matt, and thank you very much for your answer. Hm, depends of course, how good your programming skills are in the languages you knwo already, but I rely on the book Beginning Python - From Novice to Professional by Magnus Lie Hetland, published by Apress. I think that I'm interested in a

Re: printf in python

2008-06-03 Thread gianluca
On 2 Giu, 20:51, gianluca [EMAIL PROTECTED] wrote: On 2 Giu, 17:54, Dennis Lee Bieber [EMAIL PROTECTED] wrote: On Mon, 2 Jun 2008 00:32:33 -0700 (PDT), gianluca [EMAIL PROTECTED] declaimed the following in comp.lang.python: Hy, I've a problem with may python library generated with swig

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

2008-06-03 Thread George Sakkis
On Jun 3, 1:42 am, Russ P. [EMAIL PROTECTED] wrote: On Jun 2, 10:23 pm, alex23 [EMAIL PROTECTED] wrote: Then again, I have no issue with the current convention and personally find the idea of adding a private keyword makes as much sense as being able to syntactically define model, view and

Re: Compare 2 files and discard common lines

2008-06-03 Thread Mark
On Thu, 29 May 2008 01:36:44 -0700, loial wrote: I have a requirement to compare 2 text files and write to a 3rd file only those lines that appear in the 2nd file but not in the 1st file. Rather than re-invent the wheel I am wondering if anyone has written anything already? Of course you

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

2008-06-03 Thread Lie
On Jun 3, 5:07 pm, BJörn Lindqvist [EMAIL PROTECTED] wrote: On Mon, Jun 2, 2008 at 10:50 PM, Russ P. [EMAIL PROTECTED] wrote: On Jun 2, 6:41 am, Carl Banks [EMAIL PROTECTED] wrote: You are not realizing that only useful(**) thing about data hiding is that some code has access to the data,

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

2008-06-03 Thread Giuseppe Ottaviano
Hmm, difficult to react to this. On the one hand I have had people argue that block delimiting in python is explicit too. So in that case python doesn't differ from those other languages. On the other hand if we accept that blocks are delimited implicitely in python then it seems python doesn't

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

2008-06-03 Thread Antoon Pardon
On 2008-06-03, George Sakkis [EMAIL PROTECTED] wrote: On Jun 3, 1:42 am, Russ P. [EMAIL PROTECTED] wrote: On Jun 2, 10:23 pm, alex23 [EMAIL PROTECTED] wrote: Then again, I have no issue with the current convention and personally find the idea of adding a private keyword makes as much sense

Image Processing (batch)

2008-06-03 Thread Thomas Guettler
Hi, 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. What image libraries do you suggest? I think there

Re: make a string a list

2008-06-03 Thread Lie
On May 30, 4:30 am, Nikhil [EMAIL PROTECTED] wrote: or a string iterable ? How can I do that. I have lots of '\r\n' characters in the string which I think can be easier if it were made into a list and I can easily see if the required value (its a numeral) is present in it or not after some

Re: pythton 调用 so 共享库不能转换参数类 型

2008-06-03 Thread windwiny
On Jun 3, 3:19 pm, Mark Tolonen [EMAIL PROTECTED] wrote: windwiny [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] 我初学python 的 ctypes, 现在的环境是 ubuntu 8.04, Python 2.5.2 (r252:60911, May 7 2008, 15:19:09) , gcc (GCC) 4.2.3 (Ubuntu 4.2.3-2ubuntu7) 我创建了一个 so 共享库

Re: Good grid + calendar, etc.?

2008-06-03 Thread Fuzzyman
On Jun 2, 3:36 am, Michael Torrie [EMAIL PROTECTED] wrote: Gilles Ganault wrote: Thegridcan be quite advanced. Did you look at the wxPython demo? Or Dabo? Yes, but although the basic wigets are just fine, wxGrid looks a bit like the basic TStringGrid in Delphi, ie. it's pretty basic so

Re: Database Query Contains Old Data

2008-06-03 Thread James A. Donald
On Tue, 03 Jun 2008 12:07:07 +0200, M.-A. Lemburg [EMAIL PROTECTED] wrote: As others have mentioned, in systems that have long running logical transactions, it's usually best to collect the data until the very end and then apply all changes in one go (and one database transaction). I

Re: Compare 2 files and discard common lines

2008-06-03 Thread Lie
On May 29, 3:36 pm, loial [EMAIL PROTECTED] wrote: I have a requirement to compare 2 text files and write to a 3rd file only those lines that appear in the 2nd file but not in the 1st file. Rather than re-invent the wheel I am wondering if anyone has written anything already? It's so easy to

Re: question

2008-06-03 Thread Lie
On May 30, 5:41 am, Gandalf [EMAIL PROTECTED] wrote: On May 30, 12:14 am, John Henderson [EMAIL PROTECTED] wrote: Gandalf wrote: how do i write this code in order for python to understand it and print me the x variable x=1 def ():     x++     if x 1:         print

Re: Ideas for master's thesis

2008-06-03 Thread janislaw
On Jun 3, 2:27 am, [EMAIL PROTECTED] wrote: I'm sure you could probably find something having to do with Pypy (http://codespeak.net/pypy/dist/pypy/doc/home.html) that would be both manageable and significant enough to warrant a Master's thesis. The Pypy will fade out. You can for example write

Re: Generating event from event

2008-06-03 Thread Lie
On May 31, 1:27 am, Mike Driscoll [EMAIL PROTECTED] wrote: On May 30, 12:11 pm, Gandalf [EMAIL PROTECTED] wrote: Hi Diez, I can't see how it  matter which GUI-Toolkit i uses because I can combine libraries. I think all that matter is that i work with windows XP. if you ever done

Re: Image Processing (batch)

2008-06-03 Thread Weinhandl Herbert
Thomas Guettler schrieb: Hi, 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. What image libraries do

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

2008-06-03 Thread Lie
On May 24, 9:14 pm, Fuzzyman [EMAIL PROTECTED] wrote: On May 24, 2:58 pm, Ben Finney [EMAIL PROTECTED] wrote: Sh4wn [EMAIL PROTECTED] writes: 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

Re: printf in python

2008-06-03 Thread gianluca
On 3 Giu, 12:48, gianluca [EMAIL PROTECTED] wrote: On 2 Giu, 20:51, gianluca [EMAIL PROTECTED] wrote: On 2 Giu, 17:54, Dennis Lee Bieber [EMAIL PROTECTED] wrote: On Mon, 2 Jun 2008 00:32:33 -0700 (PDT), gianluca [EMAIL PROTECTED] declaimed the following in comp.lang.python: Hy,

regex help

2008-06-03 Thread Support Desk
I am trying to put together a regular expression that will rename users address books on our server due to a recent change we made. Users with address books user.abook need to be changed to [EMAIL PROTECTED] I'm having trouble with the regex. Any help would be appreciated. -Mike --

Webpy vs Django?

2008-06-03 Thread circularfunc
i have been trying to get Django running for 2 days now and it drives me crazy. i played with webpy a bit and it is easy to get going with. but django seems like once you have it all up and running it will be easier. just that the barrier of entry is much higher. is django worth it? seems so

Re: Webpy vs Django?

2008-06-03 Thread Michele Simionato
On Jun 3, 3:14 pm, [EMAIL PROTECTED] wrote: what do you think of webpy for big projects that need performance? A better question would be: do you need features which are in Django and not in webpy? If webpy suits your needs and you are happy with it, keep it. OTOH, if you need more than webpy,

Re: Code correctness, and testing strategies

2008-06-03 Thread Ben Finney
Duncan Booth [EMAIL PROTECTED] writes: I made the mistake at one point when I was trying to sell the concept of TDD telling the people I was trying to persuade that by writing the tests up front it influences the design of the code. I felt the room go cold: they said the customer has to sign

Re: Books for programmers

2008-06-03 Thread Rick Kwan
On Jun 3, 12:22 am, V [EMAIL PROTECTED] wrote: I'm a C++, Java and C programmer, and I'm searching for a (preferably printed) book that teaches me the Python idioms, i.e. the Python way of doing something. Ideally, I'm searching for a book like Effective C++ or Effective Java, that does not

parser recommendation

2008-06-03 Thread Filipe Fernandes
I have a project that uses a proprietary format and I've been using regex to extract information from it. I haven't hit any roadblocks yet, but I'd like to use a parsing library rather than maintain my own code base of complicated regex's. I've been intrigued by the parsers available in python,

Re: Cast list of objects to list of strings

2008-06-03 Thread jay graves
On Jun 2, 8:36 pm, Gabriel Genellina [EMAIL PROTECTED] wrote: Still nitpicking: using a generator expression in this case has no advantage. The first thing that str.join does is to create a list out of its argument (unless it is already a list or a tuple). In fact, a list comprehension is

UTC datetime.fromtimestamp

2008-06-03 Thread Alok Kumar
Dear All, I have UTC datetime as datetime.fromtimestamp(ParseDateTimeUTC(2007-12-06 20:37:05)) How can I add a day into this. Your help will be highly appreciated. Regards Alok -- http://mail.python.org/mailman/listinfo/python-list

RE: regex help

2008-06-03 Thread Reedick, Andrew
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Support Desk Sent: Tuesday, June 03, 2008 9:32 AM To: python-list@python.org Subject: regex help I am trying to put together a regular expression that will rename users address books on our server due to a recent change

Re: Books for programmers

2008-06-03 Thread Mike Driscoll
On Jun 3, 5:45 am, V [EMAIL PROTECTED] wrote: Hi Matt, and thank you very much for your answer. Hm, depends of course, how good your programming skills are in the languages you knwo already, but I rely on the book Beginning Python - From Novice to Professional by Magnus Lie Hetland,

Re: Code correctness, and testing strategies

2008-06-03 Thread Nicola Musatti
On Jun 3, 12:35 am, [EMAIL PROTECTED] (Jacob Hallen) wrote: In article [EMAIL PROTECTED], David [EMAIL PROTECTED] wrote: [...] That's why you have human testing QA. Unit tests can help, but they are a poor substitute. If the customer is happy with the first version, you can improve it, fix

Re: UTC datetime.fromtimestamp

2008-06-03 Thread Gerhard Häring
Alok Kumar wrote: Dear All, I have UTC datetime as datetime.fromtimestamp(ParseDateTimeUTC(2007-12-06 20:37:05)) Just datetime.timedelta(days=1). -- Gerhard -- http://mail.python.org/mailman/listinfo/python-list

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

2008-06-03 Thread Bruno Desthuilliers
Russ P. a écrit : On Jun 2, 6:41 am, Carl Banks [EMAIL PROTECTED] wrote: You are not realizing that only useful(**) thing about data hiding is that some code has access to the data, other code does not. If you hide data equally from everyone it's just a useless spelling change. I think

trinity school defender

2008-06-03 Thread Dino Dragovic
u gorenavedenom flajeru u 8. redu: postoji više od 60.000 virusa i drugih štetnih programa samo virusa ima nekoliko stotina tisuca, zajedno sa potencijalno stetim aplikacijama i ostalim malicioznim kodom brojka ide preko milion -- http://mail.python.org/mailman/listinfo/python-list

Re: ThreadPoolingMixIn

2008-06-03 Thread pavel . uvarov
On Jun 3, 1:19 am, [EMAIL PROTECTED] wrote: On Jun 2, 12:41 pm, [EMAIL PROTECTED] wrote: On Jun 2, 7:15 pm, Michael Ströder [EMAIL PROTECTED] wrote: Here are benchmarks for FreeBSD 6.2, amd64 packet_size x y 0499.57 1114.54 1024499.29

RE: regex help

2008-06-03 Thread Support Desk
That’s it exactly..thx -Original Message- From: Reedick, Andrew [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 03, 2008 9:26 AM To: Support Desk Subject: RE: regex help The regex will now skip anything with an '@'in the filename on the assumption it's already in the correct format.

Re: ctypes, function pointers and a lot of trouble

2008-06-03 Thread MRAB
On Jun 3, 11:22 am, Matt [EMAIL PROTECTED] wrote: Hello! ouch, I should have seen that c_char... :S Well, I guess I just prove that it's useless to go to work and do some programming while having a headache like I had yesterday... okay well, back to topic: The DLL function seems to accept

need help with timezone conversion (unexpected side effect of time.mktime ??)

2008-06-03 Thread Ivan Velev
Hello, Minimal example below - it gives me different output if I comment / uncomment the extra time.mktime call - note that this call is not related in any way to main logic flow. When problematicStamp = ... is commented I get gmtStamp: 1130634600.0 when I uncomment that line I get gmtStamp:

Re: Please solve me the problem

2008-06-03 Thread Gerhard Häring
sagar panda wrote: Hi I am sagar. I want to write a python script that will run the python scripts automatically from a directory. Please help me out to sovle this problem? You can use the execfile() builtin function to execute Python scripts. And you can use glob.glob(/some/path/*.py) to

Re: python's setuptools (eggs) vs ruby's gems survey/discussion

2008-06-03 Thread Sion Arrowsmith
Carl Banks [EMAIL PROTECTED] wrote: 1. setuptools will download and install dependencies on the user's behalf, without asking, by default. It will *attempt* to download etc. etc. on the assumption that you have convenient, fast network connection. If you don't My experience is getting on

Re: parser recommendation

2008-06-03 Thread Paul McGuire
On Jun 3, 8:43 am, Filipe Fernandes [EMAIL PROTECTED] wrote: I've briefly looked at PLY and pyparsing.  There are several others, but too many to enumerate.  My understanding is that PLY (although more difficult to use) has much more flexibility than pyparsing.  I'm basically looking to make

Re: parser recommendation

2008-06-03 Thread Kay Schluehr
On 3 Jun., 15:43, Filipe Fernandes [EMAIL PROTECTED] wrote: I have a project that uses a proprietary format and I've been using regex to extract information from it. I haven't hit any roadblocks yet, but I'd like to use a parsing library rather than maintain my own code base of complicated

Re: Webpy vs Django?

2008-06-03 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : i have been trying to get Django running for 2 days now and it drives me crazy. i played with webpy a bit and it is easy to get going with. but django seems like once you have it all up and running it will be easier. just that the barrier of entry is much higher.

Re: Image Processing (batch)

2008-06-03 Thread Ulrich Eckhardt
Thomas Guettler 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. What image libraries do

Re: need help with timezone conversion (unexpected side effect of time.mktime ??)

2008-06-03 Thread Paul Boddie
On 3 Jun, 16:12, Ivan Velev [EMAIL PROTECTED] wrote: Minimal example below - it gives me different output if I comment / uncomment the extra time.mktime call - note that this call is not related in any way to main logic flow. When problematicStamp = ... is commented I get gmtStamp:

Re: Writing Empty folders into ZipFile

2008-06-03 Thread MRAB
On Jun 3, 10:03 am, Christian Heimes [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] schrieb: Hello. I'm having situation writing folders structure into a zip file. Folders contain no files. Is it possible to do in python ? As far as I remember the zip format it's not possible at all.

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

2008-06-03 Thread greg
On May 25, 9:50 pm, [EMAIL PROTECTED] wrote: On May 24, 9:41 am, Sh4wn [EMAIL PROTECTED] wrote: Python advertises himself as a full OOP language, but why does it miss one of the basic principles of OOP? Will it ever be added to python? Others have already answered this directly, but I'd

Python-URL! - weekly Python news and links (Jun 3)

2008-06-03 Thread Gabriel Genellina
QOTW: PS: in some ways it's interesting and relevant that there has been no discussion on psf-members of Google's AppEngine, which many people I've talked to think is the most important thing that's ever happened to Python ever. - David Ascher Alternatives for a multi dimensional

Re: Continuous Timer

2008-06-03 Thread John Nagle
Gabriel Genellina wrote: En Fri, 30 May 2008 22:50:13 -0300, Robert Dailey [EMAIL PROTECTED] escribió: Reading through the Python 2.5 docs, I'm seeing a Timer class in the threading module, however I cannot find a timer object that will continuously call a function of my choice every

Keep a script running in the background

2008-06-03 Thread Guillermo
Hi, I need a script to keep running in the background after it's loaded some data. It will make this data available to the main program in the form of a dictionary, but I don't want to reload the calculated data every time the user needs it via the main program. I won't be working with an UI,

Re: Easy install / setuptools

2008-06-03 Thread John Nagle
Gabriel Genellina wrote: En Thu, 29 May 2008 06:29:00 -0300, [EMAIL PROTECTED] escribió: I'm trying to figure out the best way to distribute my own python packages. Well... don't use an egg in the first place :) easy install usually isn't. It tends to do the wrong thing, then leave

Re: trinity school defender

2008-06-03 Thread Paul McGuire
On Jun 3, 10:26 am, Dino Dragovic [EMAIL PROTECTED] wrote: u gorenavedenom flajeru u 8. redu: postoji više od 60.000 virusa i drugih štetnih programa samo virusa ima nekoliko stotina tisuca, zajedno sa potencijalno stetim aplikacijama i ostalim malicioznim kodom brojka ide preko milion

Re: Importing xlrd

2008-06-03 Thread Chanman
On Jun 2, 5:48 pm, John Machin [EMAIL PROTECTED] wrote: On Jun 3, 8:23 am, Chanman [EMAIL PROTECTED] wrote: This is probably a simple question to most of you, but here goes. I've downloaded the xlrd (version 0.6.1) module and placed in in the site-packages folder. Now, when I write a

Re: ctypes, function pointers and a lot of trouble

2008-06-03 Thread Matt
The docs say CFUNCTYPE(restype, *argtypes), so: cstreamopen = CFUNCTYPE(c_uint, c_ushort, c_uint) is saying that the result type is c_uint, not void. I think you need: cstreamopen = CFUNCTYPE(None, c_uint, c_ushort, c_uint) instead. Hm, thanks, now I can access my data in the functions

Re: parser recommendation

2008-06-03 Thread Filipe Fernandes
On Tue, Jun 3, 2008 at 10:41 AM, Paul McGuire [EMAIL PROTECTED] wrote: If you learn both, you may find that pyparsing is a good way to quickly prototype a particular parsing problem, which you can then convert to PLY for performance if necessary. The pyparsing prototype will be an efficient

Re: Webpy vs Django?

2008-06-03 Thread [EMAIL PROTECTED]
i played with webpy a bit and it is easy to get going with. but django seems like once you have it all up and running it will be easier. just that the barrier of entry is much higher. I can't comment on webpy, but yes, Django has a bit more of a learning curve in some areas, less in others.

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

2008-06-03 Thread sturlamolden
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 private when you prefix them with 2 underscores, but I hate prefixing my

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

2008-06-03 Thread Richard Levasseur
On Jun 3, 3:07 am, BJörn Lindqvist [EMAIL PROTECTED] wrote: On Mon, Jun 2, 2008 at 10:50 PM, Russ P. [EMAIL PROTECTED] wrote: On Jun 2, 6:41 am, Carl Banks [EMAIL PROTECTED] wrote: You are not realizing that only useful(**) thing about data hiding is that some code has access to the data,

Re: parser recommendation

2008-06-03 Thread Kay Schluehr
On 3 Jun., 19:34, Filipe Fernandes [EMAIL PROTECTED] wrote: # The current implementation is only somewhat object-oriented. The # LR parser itself is defined in terms of an object (which allows multiple # parsers to co-exist). However, most of the variables used during table # construction

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

2008-06-03 Thread sturlamolden
On Jun 2, 12:40 pm, Antoon Pardon [EMAIL PROTECTED] wrote: I think you completed missed the point. This is just a proof of concept thing. In a real example there would of course no Set en Get methods but just methods that in the course of their execution would access or update the hidden

Data Structures - Getting started..

2008-06-03 Thread rh0dium
Hi all, I have a primitive data structure which looks like this. cells = [{'name': 'AND2X1', 'pins': [{'direction': 'input', 'name': 'A', 'type': 'signal'}, {'direction': 'input', 'name': 'B', 'type': 'signal'}, {'direction': 'output',

Re: Keep a script running in the background

2008-06-03 Thread Daniel Fetchinson
I need a script to keep running in the background after it's loaded some data. It will make this data available to the main program in the form of a dictionary, but I don't want to reload the calculated data every time the user needs it via the main program. I won't be working with an UI,

Re: Keep a script running in the background

2008-06-03 Thread subeen
On Jun 3, 10:07 pm, Guillermo [EMAIL PROTECTED] wrote: Hi, I need a script to keep running in the background after it's loaded some data. It will make this data available to the main program in the form of a dictionary, but I don't want to reload the calculated data every time the user needs

Re: Merging ordered lists

2008-06-03 Thread etal
On Jun 2, 11:08 pm, Raymond Hettinger [EMAIL PROTECTED] wrote: If the inputs were not sorted, then I don't think you have a precise idea of what it means to merge them while preserving order.   For example if the inputs are XYZPDQ and bYlmPz, then what does a merged sequence look like once

Re: Keep a script running in the background

2008-06-03 Thread Bjoern Schliessmann
Guillermo wrote: I need a script to keep running in the background after it's loaded some data. It will make this data available to the main program in the form of a dictionary, but I don't want to reload the calculated data every time the user needs it via the main program. I won't be

Re: need help with timezone conversion (unexpected side effect of time.mktime ??)

2008-06-03 Thread Ivan Velev
I've tried this with Python 2.3 and 2.4 on Red Hat Enterprise Linux 4 and can't reproduce the problem, even with other TZ values such as Thanks for the quick reply. Can you please let me know what value do you receive during your tests ? As far as I can see, Python timezone API is just a

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

2008-06-03 Thread Russ P.
On Jun 3, 11:02 am, Richard Levasseur [EMAIL PROTECTED] wrote: On Jun 3, 3:07 am, BJörn Lindqvist [EMAIL PROTECTED] wrote: On Mon, Jun 2, 2008 at 10:50 PM, Russ P. [EMAIL PROTECTED] wrote: On Jun 2, 6:41 am, Carl Banks [EMAIL PROTECTED] wrote: You are not realizing that only

Handling some isolated iso-8859-1 characters

2008-06-03 Thread Daniel Mahoney
I'm working on an app that's processing Usenet messages. I'm making a connection to my NNTP feed and grabbing the headers for the groups I'm interested in, saving the info to disk, and doing some post-processing. I'm finding a few bizarre characters and I'm not sure how to handle them

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

2008-06-03 Thread Russ P.
On Jun 3, 4:21 am, George Sakkis [EMAIL PROTECTED] wrote: On Jun 3, 1:42 am, Russ P. [EMAIL PROTECTED] wrote: On Jun 2, 10:23 pm, alex23 [EMAIL PROTECTED] wrote: Then again, I have no issue with the current convention and personally find the idea of adding a private keyword makes as

New variable?

2008-06-03 Thread tmallen
What's the proper way to instantiate a new variable? x = ? -- http://mail.python.org/mailman/listinfo/python-list

Shed Skin (restricted) Python-to-C++ Compiler 0.0.28

2008-06-03 Thread srepmub
Hi all, I have just released Shed Skin 0.0.28, with the following changes. Thanks to those mentioned for helping out! - basic 'socket' support (Michael Elkins) - support for os.{popen3, popen4} under UNIX (Jaroslaw Tworek) - support for time.strptime under Windows (David Marek) - options for

  1   2   3   >