Updated Cygwin Package: python-2.5.1-2

2007-05-21 Thread Jason Tishler
New News: === I have updated the version of Python to 2.5.1-2. The tarballs should be available on a Cygwin mirror near you shortly. The following is the only notable change since the previous release: o include bz2 module that was accidentally omitted in the previous release

Re: Unable to strip \n characters

2007-05-21 Thread Asun Friere
On May 20, 10:49 pm, Michael Bentley [EMAIL PROTECTED] wrote: On May 20, 2007, at 7:41 AM, Michael Bentley wrote: (upload.strip()) Oops: (upload.strip(),) or upload.strip() Superfluous though the braces around your original were, it should still run ... ie. (a) == a --

Re: A few questions

2007-05-21 Thread John Nagle
jay wrote: Hi, I'm totally new to Python and was hoping someone might be able to answer a few questions for me: 1. What are your views about Python vs Perl? Do you see one as better than the other? Python is a much cleaner language than Perl, but not as widely used. The Python

getting output from a command into a list to work with

2007-05-21 Thread Anthony Irwin
Hi All, I would like to run the command below and have each line from the output stored as an element in a list. find /some/path/ -maxdepth 1 -type f -size +10k -exec ls -1 '{}' \ The reason for this is so I can then work on each file in the following manner var = command for i in var:

Re: getting output from a command into a list to work with

2007-05-21 Thread Peter Otten
Anthony Irwin wrote: I would like to run the command below and have each line from the output stored as an element in a list. find /some/path/ -maxdepth 1 -type f -size +10k -exec ls -1 '{}' \ The reason for this is so I can then work on each file in the following manner var =

Re: trouble with pyvtk

2007-05-21 Thread Gabriel Genellina
En Mon, 21 May 2007 02:11:46 -0300, LokiDawg [EMAIL PROTECTED] escribió: Thanks for the tip, Ondrej. Unfortunately, this didn't do it, as pytvk still ends up at the same place: File /usr/lib/python2.4/site-packages/pyvtk/common.py, line 149, in get_datatype r = self.get_datatype(o)

Help needed to install ZOracleDA

2007-05-21 Thread Manish Kumar
Hi All, How can I install ZOracleDA on Red Hat Linux machine? Configuration of my system is as below: Zope-2.7 Python-2.3.5 Oracle-9i I have tried to install ZOracleDA but installable needed rh-7.1-python-1.5.2-dco2.so file which is not present in Binaries directory. Any help

Needs help to install ZOracleDA

2007-05-21 Thread Manish Kumar
Hi All, How can I install ZOracleDA on Red Hat Linux machine? Configuration of my system is as below: Zope-2.7 Python-2.3.5 Oracle-9i I have tried to install ZOracleDA but installable needed rh-7.1-python-1.5.2-dco2.so file which is not present in Binaries directory. Any help from you

distutil visual-studio-2005

2007-05-21 Thread Mathieu Gontier
Hello, Few month ago, I try to build/install additional python packages like Numarray, Numpy, etc on Windows with Visual Studio 2005. I realized that distutil does not support Visual Studio 2005 and it was not planned to be included in the Python release at this moment. Now, does someone has

Hello World!

2007-05-21 Thread Heizenreder Guillermo
Hello World! I am new in the list -- Heizenreder Guillermo -- -- http://mail.python.org/mailman/listinfo/python-list

Needs help to install ZOracleDA

2007-05-21 Thread Manish Kumar
Hi All, How can I install ZOracleDA on Red Hat Linux machine? Configuration of my system is as below: Zope-2.7 Python-2.3.5 Oracle-9i I have tried to install ZOracleDA but installable needed rh-7.1-python-1.5.2-dco2.so file which is not present in Binaries directory. Any help

Re: Python Newbie Suggestions

2007-05-21 Thread Urban, Gabor
Stephen wrote: For a newbie any material referenced should be current and include what is available in Python 2.5. I disagree. A newbie should learn Python and and Python programming . Not the latest should be the best choice Gabor Urban NMC - ART --

Re: mod_python performs several magnitudes slower than PHP?

2007-05-21 Thread Winfried Tilanus
On 05/20/2007 Graham Dumpleton wrote: Hi, A more suitable example for comparison would have been: And are there any benchmarks with this new version available? Just curious... best wishes, Winfried -- http://mail.python.org/mailman/listinfo/python-list

Re: Cycle detection and object memory usage?

2007-05-21 Thread Gabriel Genellina
En Sun, 20 May 2007 23:54:15 -0300, Jim Kleckner [EMAIL PROTECTED] escribió: I understand from the documentation that types with a finalizer method that participate in cycles can't be collected. Yes; older Python versions could not manage any kind of cycles, now only objects with __del__

Re: Inverse of id()?

2007-05-21 Thread Gabriel Genellina
En Sun, 20 May 2007 22:19:01 -0300, Ian Clark [EMAIL PROTECTED] escribió: On 5/20/07, Michael Hoffman [EMAIL PROTECTED] wrote: [snip] That's not what I get: That's because you didn't have 'del a'. Now I tried this in the shell and got different id's for a and b, but when I typed it into

Re: Inverse of id()?

2007-05-21 Thread Duncan Booth
Ian Clark [EMAIL PROTECTED] wrote: Now I tried this in the shell and got different id's for a and b, but when I typed it into a file and ran from there the id's where always the same. Must have something to do with other programs allocating space faster than I can type everything out (I do

Re: Translating some Java to Python

2007-05-21 Thread Herman Slagman
Daniel Gee [EMAIL PROTECTED] schreef in bericht news:[EMAIL PROTECTED] class Foo: def statAdd(self,a): return a+5 or do you drop the 'self' bit and just use a 1 variable parameter list? class Foo: @staticmethod def statAdd(a): return a+5 HTH Herman --

Re: mod_python performs several magnitudes slower than PHP?

2007-05-21 Thread Graham Dumpleton
On May 21, 5:51 pm, Winfried Tilanus [EMAIL PROTECTED] wrote: On 05/20/2007 Graham Dumpleton wrote: Hi, A more suitable example for comparison would have been: And are there any benchmarks with this new version available? Just curious... Unless someone else posts that specific example

Re: Translating some Java to Python

2007-05-21 Thread Ant
On May 20, 9:24 pm, Daniel Gee [EMAIL PROTECTED] wrote: ... The Java version has static methods for common roll styles (XdY and XdY +Z) for classes that just want a result but don't want to bother keeping an object around for later. So the question is, assuming that I wanted to keep the

Re: questions about programming styles

2007-05-21 Thread [EMAIL PROTECTED]
Arvind Singh wrote: On 5/20/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: which is the better way to calculate the value of attributes of a class ? for example: (A) def cal_attr(self, args): #do some calculations self.attr = calculated_value and then if the vlue of

Re: Inverse of id()?

2007-05-21 Thread Paul Boddie
On 20 May, 01:42, Paul McGuire [EMAIL PROTECTED] wrote: re = Regex((\d*)).setResultsName(x).setParseAction(lambda t:int(t[0])) results = re.parseString(123) pyparsing results have some special lookup behavior, that if the results name is a Python-friendly identifier, can use the name as if

Re: Components for a client/server architecture

2007-05-21 Thread Diez B. Roggisch
- Java (and possibly Jython) or Mono/C# (or possibly IronPython) on the server. Requirements are: A strong and fair threading model. This is actually what drove me away from Perl and what essentially prevents using a normal Python interpreter on the server. I don't know whether the

www.eBankGame.com Buy WoW gold RS gold WG k gold

2007-05-21 Thread ebankgame.com
www.eBankGame.com Buy WoW gold RS gold WG k gold www.eBankGame.com (w w w .e BankGame . c o m ) As you might or might not known that Taiwan earthquake has caused most of supplier are experiencing the serve problem to process the gold. However, eBankGame is always stay line with all the game

SOAPpy My Class

2007-05-21 Thread Robert Rawlins - Think Blue
Hello Chaps, I've used SOAPpy in its very basic form for consuming web services on my web server, but I'm now looking to publish a web service from my application. Basically I'm looking to create a public 'proxy' of an object I have in the application. The idea being that my application will

Re: TIFF to PDF

2007-05-21 Thread revuesbio
I'm trying to use tifflib but i have some problems. When i use direct command line like C:\Program Files\GnuWin32\bin\tiff2pdf.exe -o C:\test.pdf C: \test.TIF the pdf file is ok. but when i try to launch command line via python the pdf file doesn't create. import os os.system('C:\Program

Re: Translating some Java to Python

2007-05-21 Thread Herman Slagman
Ant [EMAIL PROTECTED] schreef in bericht news:[EMAIL PROTECTED] Herman has shown you *how* to do static methods in Python, but typically they are not used. Since Python has first class functions, and they can be defined at the module level, there is no need to use static methods. Hmm, As

Re: TIFF to PDF

2007-05-21 Thread revuesbio
I'm trying to use tifflib but i have some problems : when i use direct command line : C:\Program Files\GnuWin32\bin\tiff2pdf.exe -o C:\test.pdf C: \test.TIF the pdf is ok. but when i try to launch command line via python the pdf file is not created. where is the problem ? import os

Re: TIFF to PDF

2007-05-21 Thread Gabriel Genellina
En Mon, 21 May 2007 07:42:21 -0300, revuesbio [EMAIL PROTECTED] escribió: os.system('C:\Program Files\GnuWin32\bin\tiff2pdf.exe -o C:\test.pdf C:\test.TIF') \ is used as a escape character in strings. Use either \\ or a raw string, that is: os.system('C:\\Program

Re: Translating some Java to Python

2007-05-21 Thread Diez B. Roggisch
Hmm, As an experienced developer I'm rather new to Python, so please forgive me any non-Pythonic babbling. From a language point you're probably right, but from a design point I'd like to have methods that are clearly associated with a class as methods of that class, even if they don't

Re: Translating some Java to Python

2007-05-21 Thread Gabriel Genellina
En Mon, 21 May 2007 07:39:09 -0300, Unknown [EMAIL PROTECTED] escribió: Ant [EMAIL PROTECTED] schreef in bericht news:[EMAIL PROTECTED] Herman has shown you *how* to do static methods in Python, but typically they are not used. Since Python has first class functions, and they can be

Lists vs tuples (newbie)

2007-05-21 Thread Szabolcs
I was wondering about why are there both tuples and lists? Is there anything I can do with a tuple that I cannot do with a list? In what circumstances is it advantageous to use tuples instead of lists? Is there a difference in performance? I am still learning Python, so please be gentle ...

Re: TIFF to PDF

2007-05-21 Thread revuesbio
On 21 mai, 13:01, Gabriel Genellina [EMAIL PROTECTED] wrote: En Mon, 21 May 2007 07:42:21 -0300, revuesbio [EMAIL PROTECTED] escribió: os.system('C:\Program Files\GnuWin32\bin\tiff2pdf.exe -o C:\test.pdf C:\test.TIF') \ is used as a escape character in strings. Use either \\ or a raw

Re: converting strings to most their efficient types '1' -- 1, 'A' --- 'A', '1.2'--- 1.2

2007-05-21 Thread James Stroud
I need to correct myself here before someone else does. I didn't actually reverse the probabilities as promised for the failing case. It was late last night and I was starting to get a little cloudy. Pf(D|H) = 0.2 (We *guess* a 20% chance by random any column is Int.) This can be read

Re: Lists vs tuples (newbie)

2007-05-21 Thread Duncan Booth
Szabolcs [EMAIL PROTECTED] wrote: I was wondering about why are there both tuples and lists? Is there anything I can do with a tuple that I cannot do with a list? In what circumstances is it advantageous to use tuples instead of lists? Is there a difference in performance? I am still

Re: Lists vs tuples (newbie)

2007-05-21 Thread rzed
Szabolcs [EMAIL PROTECTED] wrote in news:[EMAIL PROTECTED]: I was wondering about why are there both tuples and lists? Is there anything I can do with a tuple that I cannot do with a list? In what circumstances is it advantageous to use tuples instead of lists? Is there a difference in

Re: Lists vs tuples (newbie)

2007-05-21 Thread Phoe6
On May 21, 4:48 pm, Szabolcs [EMAIL PROTECTED] wrote: In what circumstances is it advantageous to use tuples instead of lists? Is there a difference in performance? As you should not, tuples are immutable while lists are mutable. You can think of all the scenarios where immutable datatype are

NEWBIE: Extending a For Statement.

2007-05-21 Thread mosscliffe
I keep seeing examples of statements where it seems conditionals are appended to a for statement, but I do not understand them. I would like to use one in the following scenario. I have a dictionary of mydict = { 1: 500, 2:700, 3: 800, 60: 456, 62: 543, 58: 6789} for key in mydict: if key

Re: NEWBIE: Extending a For Statement.

2007-05-21 Thread Jean-Paul Calderone
On 21 May 2007 05:10:46 -0700, mosscliffe [EMAIL PROTECTED] wrote: I keep seeing examples of statements where it seems conditionals are appended to a for statement, but I do not understand them. I would like to use one in the following scenario. I have a dictionary of mydict = { 1: 500, 2:700,

Re: Translating some Java to Python

2007-05-21 Thread Herman Slagman
Gabriel Genellina [EMAIL PROTECTED] schreef in bericht news:[EMAIL PROTECTED] En Mon, 21 May 2007 07:39:09 -0300, Unknown [EMAIL PROTECTED] escribió: Ant [EMAIL PROTECTED] schreef in bericht news:[EMAIL PROTECTED] Herman has shown you *how* to do static methods in Python, but typically

Re: Lists vs tuples (newbie)

2007-05-21 Thread Szabolcs
Thanks for all the replies! Phoe6 wrote: 1) Return values from a function. When you return multiple values from a function. You store them as a tuple and access them individually rather then in the list, which bear the danger of being modified. Look up the standard library itself and you

Re: converting strings to most their efficient types '1' -- 1, 'A' --- 'A', '1.2'--- 1.2

2007-05-21 Thread Neil Cerutti
On 2007-05-20, John Machin [EMAIL PROTECTED] wrote: On 19/05/2007 3:14 PM, Paddy wrote: On May 19, 12:07 am, py_genetic [EMAIL PROTECTED] wrote: Hello, I'm importing large text files of data using csv. I would like to add some more auto sensing abilities. I'm considing sampling the data

Re: Lists vs tuples (newbie)

2007-05-21 Thread Alexander Schmolck
Szabolcs [EMAIL PROTECTED] writes: Thanks for all the replies! Phoe6 wrote: 1) Return values from a function. When you return multiple values from a function. You store them as a tuple and access them individually rather then in the list, which bear the danger of being modified. Look up

help - python can't find file

2007-05-21 Thread enquiring mind
-learning python with limited knowledge of linux. -get error msg 21 file or directory does not exist -running Suse linux 10. -haven't had a problem before - rebooted several times. -python opened in shell/terminal program Konsole window like this [EMAIL PROTECTED] - shell - Konsole Sessions View

Re: NEWBIE: Extending a For Statement.

2007-05-21 Thread Dustan
On May 21, 7:22 am, Jean-Paul Calderone [EMAIL PROTECTED] wrote: On 21 May 2007 05:10:46 -0700, mosscliffe [EMAIL PROTECTED] wrote: I keep seeing examples of statements where it seems conditionals are appended to a for statement, but I do not understand them. I would like to use one in the

Re: NEWBIE: Extending a For Statement.

2007-05-21 Thread Dustan
On May 21, 7:22 am, Jean-Paul Calderone [EMAIL PROTECTED] wrote: On 21 May 2007 05:10:46 -0700, mosscliffe [EMAIL PROTECTED] wrote: I keep seeing examples of statements where it seems conditionals are appended to a for statement, but I do not understand them. I would like to use one in the

Simple web apps....mod_python or framework?

2007-05-21 Thread cbmeeks
If you guys where going to do a simple web-app (as in, 4-5 tables with 99% being simple CRUD), would you use a framework (Django, CodeIgniter, whatever...) or would you do it using maybe mod_python and Python code? Just curious. I'm trying to learn Python but some of the frameworks make CRUD

Re: Python assignment loop

2007-05-21 Thread Alexey Borzenkov
On May 21, 8:12 am, Silver Rock [EMAIL PROTECTED] wrote: yes, that is the way I a solving the problem. using lists. so it seems that there is no way around it then.. There's at least one way to do it that I can think of straight away: selfmodule = __import__(__name__, None, None, (None,))

Sysad tasks (was: Python compared to other language)

2007-05-21 Thread Cameron Laird
In article [EMAIL PROTECTED], Bruno Desthuilliers [EMAIL PROTECTED] wrote: . . . Ruby is probably far better than Python at sys-admin tasks. And, while . .

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

2007-05-21 Thread Gabriel Genelli
QOTW: A java class full of static methods translates to a python module populated with functions in general. - Arnaud Delobelle Neurons are far more valuable than disk space, screen lines, or CPU cycles. - Ben Finney How do people install Python and libraries in a server without root

RE: tkinter button state = DISABLED

2007-05-21 Thread Hamilton, William
From: Eric Brunel On Thu, 17 May 2007 09:30:57 +0200, Hendrik van Rooyen [EMAIL PROTECTED] wrote: Gabriel Genellina [EMAIL PROTECTED] wrote: En Wed, 16 May 2007 03:22:17 -0300, Hendrik van Rooyen I have never seen this working in Tkinter, unless the button was pressed on the widget

Re: howto get function from module, known by string names?

2007-05-21 Thread dmitrey
And howto check does module 'asdf' exist (is available for import) or no? (without try/cache of course) Thx, D. Carsten Haese wrote: On 15 May 2007 04:29:56 -0700, dmitrey wrote hi all, can anyone explain howto get function from module, known by string names? I.e. something like def

Re: NEWBIE: Extending a For Statement.

2007-05-21 Thread Larry Bates
mosscliffe wrote: I keep seeing examples of statements where it seems conditionals are appended to a for statement, but I do not understand them. I would like to use one in the following scenario. I have a dictionary of mydict = { 1: 500, 2:700, 3: 800, 60: 456, 62: 543, 58: 6789}

Re: howto get function from module, known by string names?

2007-05-21 Thread dmitrey
And howto check does module 'asdf' exist (is available for import) or no? (without try/cache of course) Thx, D. Carsten Haese wrote: On 15 May 2007 04:29:56 -0700, dmitrey wrote hi all, can anyone explain howto get function from module, known by string names? I.e. something like def

Re: howto get function from module, known by string names?

2007-05-21 Thread dmitrey
And howto check does module 'asdf' exist (is available for import) or no? (without try/cache of course) Thx, D. Carsten Haese wrote: On 15 May 2007 04:29:56 -0700, dmitrey wrote hi all, can anyone explain howto get function from module, known by string names? I.e. something like def

howto check does module 'asdf' exist? (is available for import)

2007-05-21 Thread dmitrey
howto check does module 'asdf' exist (is available for import) or no? (without try/cache of course) Thx in advance, D. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python compared to other language

2007-05-21 Thread [EMAIL PROTECTED]
Python is a strongly typed but dynamic language ... In the A few questions thread, John Nagle's summary of Python begins Python is a byte-code interpreted untyped procedural dynamic language with implicit declaration. Is Python strongly typed or untyped? --

Re: howto get function from module, known by string names?

2007-05-21 Thread dmitrey
Sorry, some problems with internet connection yield these messages -- http://mail.python.org/mailman/listinfo/python-list

RE: Random selection

2007-05-21 Thread Hamilton, William
From: Tartifola Hi, I have a list with probabilities as elements [p1,p2,p3] with of course p1+p2+p3=1. I'd like to draw a random element from this list, based on the probabilities contained in the list itself, and return its index. Any help on the best way to do that? Thanks ran =

Re: Python compared to other language

2007-05-21 Thread Mark Morss
On May 20, 5:02 pm, Bruno Desthuilliers Ruby is probably far better than Python at sys-admin tasks. Why, pray tell? I don't know much about Ruby, but I know that Python is the language that Gentoo uses for package management, which certainly qualifies as a sys-admin task. --

Re: howto check does module 'asdf' exist? (is available for import)

2007-05-21 Thread Jean-Paul Calderone
On 21 May 2007 06:17:16 -0700, dmitrey [EMAIL PROTECTED] wrote: howto check does module 'asdf' exist (is available for import) or no? (without try/cache of course) Thx in advance, D. You could use twisted.python.modules: $ python Python 2.4.3 (#2, Oct 6 2006, 07:52:30) [GCC 4.0.3

Re: Translating some Java to Python

2007-05-21 Thread Gabriel Genellina
En Mon, 21 May 2007 09:26:19 -0300, Unknown [EMAIL PROTECTED] escribió: One example that comes to mind is a class that is a proxy for a database class, say Person. The Person.Load(id) method doesn't use any instance or class data, it instantiates a Person and populates it from the database.

Re: howto check does module 'asdf' exist? (is available for import)

2007-05-21 Thread Stefan Behnel
dmitrey wrote: howto check does module 'asdf' exist (is available for import) or no? Walk through sys.path and find it yourself? (without try/cache of course) Why is the obvious (and most common) try/import/catch solution of course out? Stefan --

full screen graphics

2007-05-21 Thread myheartinamerica
Hello, I need to run a particular graphics application over and over again with a different command line to get benchmarks on the applications performance (frame rates and similar data). I am running the following within a while loop that parses out a different command line from a configuration

Installing Python in a path that contains a blank

2007-05-21 Thread Konrad Hinsen
I am trying to install Python from sources in my home directory on a Mac cluster (running MacOS X 10.4.8). The path to my home directory contains a blank, and since the installation procedure insists on getting an absolute path for the prefix, I cannot avoid installing to a path whose name

re.compile for names

2007-05-21 Thread brad
I am developing a list of 3 character strings like this: and bra cam dom emi mar smi ... The goal of the list is to have enough strings to identify files that may contain the names of people. Missing a name in a file is unacceptable. For example, the string 'mar' would get marc, mark, mary,

Re: TIFF to PDF

2007-05-21 Thread Brian van den Broek
Gabriel Genellina said unto the world upon 05/21/2007 07:01 AM: En Mon, 21 May 2007 07:42:21 -0300, revuesbio [EMAIL PROTECTED] escribió: os.system('C:\Program Files\GnuWin32\bin\tiff2pdf.exe -o C:\test.pdf C:\test.TIF') \ is used as a escape character in strings. Use either \\ or a

Re: Inverse of id()?

2007-05-21 Thread Paul McGuire
On May 21, 4:55 am, Paul Boddie [EMAIL PROTECTED] wrote: some very kind comments re: pyparsing :) You'd even be able to incorporate the parse action, too, with some extra magic. As pyparsing is a library which seems to encourage clean grammar definitions, I think this makes quite a

Re: howto check does module 'asdf' exist? (is available for import)

2007-05-21 Thread js
Why not just use try? Trying to import a module is a python idiom. http://www.diveintopython.org/file_handling/index.html On 21 May 2007 06:17:16 -0700, dmitrey [EMAIL PROTECTED] wrote: howto check does module 'asdf' exist (is available for import) or no? (without try/cache of course) Thx in

Re: howto get function from module, known by string names?

2007-05-21 Thread Gabriel Genellina
En Mon, 21 May 2007 10:13:02 -0300, dmitrey [EMAIL PROTECTED] escribió: And howto check does module 'asdf' exist (is available for import) or no? (without try/cache of course) What's wrong with this: try: import asdf except ImportError: asdf = None ...later... if asdf: asdf.zxcv(1)

Re: model browser

2007-05-21 Thread kyosohma
On May 20, 3:02 pm, Daniel Nogradi [EMAIL PROTECTED] wrote: And before you ask, yes, I did readhttp://mail.python.org/pipermail/python-list/2007-May/440337.htmlbut there was nothing beyond django/tg :) SqlAlchemy is being or has been integrated with quite a few web frameworks. You might check

Re: re.compile for names

2007-05-21 Thread Marc 'BlackJack' Rintsch
In [EMAIL PROTECTED], brad wrote: I am developing a list of 3 character strings like this: and bra cam dom emi mar smi ... The goal of the list is to have enough strings to identify files that may contain the names of people. Missing a name in a file is unacceptable. Then simply

Re: Python compared to other language

2007-05-21 Thread Neil Cerutti
On 2007-05-21, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Python is a strongly typed but dynamic language ... In the A few questions thread, John Nagle's summary of Python begins Python is a byte-code interpreted untyped procedural dynamic language with implicit declaration. Is Python

Re: Python compared to other language

2007-05-21 Thread Marc 'BlackJack' Rintsch
In [EMAIL PROTECTED], [EMAIL PROTECTED] wrote: Python is a strongly typed but dynamic language ... In the A few questions thread, John Nagle's summary of Python begins Python is a byte-code interpreted untyped procedural dynamic language with implicit declaration. Is Python strongly

Re: re.compile for names

2007-05-21 Thread Paul McGuire
On May 21, 8:46 am, brad [EMAIL PROTECTED] wrote: I am developing a list of 3 character strings like this: and bra cam dom emi mar smi ... The goal of the list is to have enough strings to identify files that may contain the names of people. Missing a name in a file is unacceptable.

Re: NEWBIE: Extending a For Statement.

2007-05-21 Thread bearophileHUGS
mosscliffe: if key in xrange (60,69) or key == 3: I keep seeing again and again code like this, mostly from people not much expert of Python, but the PEP 260 shows the fast in was removed, so it's O(n). Maybe removing the fast __contains__ was bad for necomers (or just the casual Python users,

Re: re.compile for names

2007-05-21 Thread brad
Marc 'BlackJack' Rintsch wrote: What about names with letters not in the ASCII range? Like Asian names? The names we encounter are spelled out in English... like Xu, Zu, Li-Cheng, Matsumoto, Wantanabee, etc. So the ASCII approach would still work. I guess. My first thought was to spell out

Re: TIFF to PDF

2007-05-21 Thread Gabriel Genellina
En Mon, 21 May 2007 10:53:08 -0300, Brian van den Broek [EMAIL PROTECTED] escribió: Gabriel Genellina said unto the world upon 05/21/2007 07:01 AM: En Mon, 21 May 2007 07:42:21 -0300, revuesbio [EMAIL PROTECTED] escribió: os.system('C:\Program Files\GnuWin32\bin\tiff2pdf.exe -o C:\test.pdf

Re: NEWBIE: Extending a For Statement.

2007-05-21 Thread mosscliffe
On 21 May, 14:13, Larry Bates [EMAIL PROTECTED] wrote: mosscliffe wrote: I keep seeing examples of statements where it seems conditionals are appended to a for statement, but I do not understand them. I would like to use one in the following scenario. I have a dictionary of mydict =

Re: questions about programming styles

2007-05-21 Thread Wildemar Wildenburger
[EMAIL PROTECTED] wrote: Thanks a lot for all kind replies! I think I need a systematic learning of design patterns. I have found some tutorials about design pattern about python, but can somebody point me which is the best to start with ? When you say Design Patterns, what do you

Re: NEWBIE: Extending a For Statement.

2007-05-21 Thread mosscliffe
On 21 May, 15:02, [EMAIL PROTECTED] wrote: mosscliffe: if key in xrange (60,69) or key == 3: I keep seeing again and again code like this, mostly from people not much expert of Python, but the PEP 260 shows the fast in was removed, so it's O(n). Maybe removing the fast __contains__ was bad

Re: List Moderator

2007-05-21 Thread Grant Edwards
On 2007-05-21, Grant Edwards [EMAIL PROTECTED] wrote: On 2007-05-20, Dennis Lee Bieber [EMAIL PROTECTED] wrote: It doesn't all go through a central point - users like me who use a news server to access the list submit articles through a local news server using NNTP. While there *is* a

Executing Python interpreter from Java

2007-05-21 Thread nadeemabdulhamid
Hello, I'm trying to write some Java code that will launch a python interpreter shell and pipe input/output back and forth from the interpreter's i/o streams and the Java program. The code posted below seems to work just fine under Mac OS X; however, under Windows XP (Java 1.6 and Python 2.5

Re: NEWBIE: Extending a For Statement.

2007-05-21 Thread Wildemar Wildenburger
Dustan wrote: (key, mydict[key] for key in mydict if key in xrange(60, 69) or key == 3] File stdin, line 1 (key, mydict[key] for key in mydict if key in xrange(60, 69) or key == 3] ^ SyntaxError: invalid syntax Perhaps you meant that second one to

Leo 4.4.3 beta 1 released

2007-05-21 Thread Edward K Ream
Leo 4.4.3 beta 1 is available at: http://sourceforge.net/project/showfiles.php?group_id=3458package_id=29106 Leo is a text editor, data organizer, project manager and much more. See: http://webpages.charter.net/edreamleo/intro.html The highlights of Leo 4.4.3: -

Re: TIFF to PDF

2007-05-21 Thread Brian van den Broek
Gabriel Genellina said unto the world upon 05/21/2007 10:12 AM: En Mon, 21 May 2007 10:53:08 -0300, Brian van den Broek [EMAIL PROTECTED] escribió: Gabriel Genellina said unto the world upon 05/21/2007 07:01 AM: En Mon, 21 May 2007 07:42:21 -0300, revuesbio [EMAIL PROTECTED] escribió:

Re: howto get function from module, known by string names?

2007-05-21 Thread Carsten Haese
On Mon, 2007-05-21 at 06:13 -0700, dmitrey wrote: And howto check does module 'asdf' exist (is available for import) or no? (without try/cache of course) Why would you need to do that? What are you planning to do when you have determined that the module doesn't exist? Surely you're not planning

Re: List Moderator

2007-05-21 Thread Michael L Torrie
On Mon, 2007-05-21 at 14:24 +, Grant Edwards wrote: To quantify things for curiosity's sake, I just scanned through the last 1000 postings in c.l.p. There was exactly 1 spam message and two replies to spam messages complaining about them. I'm seeing 2 messages a day, lately, to c.l.p

Help required with Python App

2007-05-21 Thread Trevor Hennion
Hi, I am producing a Web based database application for a customer and could do with some help producing pdf documents from the data. The project uses Apache. Postgresql and Python CGI scripts on a Linux server for a company with 20-25 users. I have been looking at the http://www.reportlab.org

Re: Python compared to other language

2007-05-21 Thread Michael L Torrie
On Mon, 2007-05-21 at 16:00 +0200, Marc 'BlackJack' Rintsch wrote: In [EMAIL PROTECTED], [EMAIL PROTECTED] wrote: Python is a strongly typed but dynamic language ... In the A few questions thread, John Nagle's summary of Python begins Python is a byte-code interpreted untyped

Re: full screen graphics

2007-05-21 Thread kyosohma
On May 21, 8:39 am, myheartinamerica [EMAIL PROTECTED] wrote: Hello, I need to run a particular graphics application over and over again with a different command line to get benchmarks on the applications performance (frame rates and similar data). I am running the following within a while

Python and GUI

2007-05-21 Thread sdoty044
Just wondering on what peoples opinions are of the GUIs avaiable for Python? All I am doing is prompting users for some data (listbox, radio buttons, text box, ect...). Then I will have some text output, maybe a scrolling text message as things are happening. I have some minor things I need to

Re: A few questions

2007-05-21 Thread brad
Alex Martelli wrote: Most popular, however, is no doubt wxWindows -- mostly because you can freely use it to develop SW which you plan to distribute under closed-source licenses, while Qt c force you to choose -- either pay, or, if you even distribute your code, it will have to be under the

Re: Python and GUI

2007-05-21 Thread brad
[EMAIL PROTECTED] wrote: Just wondering on what peoples opinions are of the GUIs avaiable for Python? We have used wxPython with great results. It's cross platform. Can use native OS widgets and is easy to program. Compiles easily to exe binaries for Windows users as well. Best of luck,

doctest environment question

2007-05-21 Thread thomas . guest
I'm not making progress with the following and would appreciate any help. Here's an interpreted Python session. import sys def f(): pass ... this_module = sys.modules[__name__] delattr(this_module, 'f') f() Traceback (most recent call last): File stdin, line 1, in module NameError: name

Re: Python and GUI

2007-05-21 Thread Thomas Lenarz
On 21 May 2007 08:39:44 -0700, [EMAIL PROTECTED] wrote: All I am doing is prompting users for some data (listbox, radio buttons, text box, ect...). Then I will have some text output, maybe a scrolling text message as things are happening. I have some minor things I need to do, for example, if

Re: converting strings to most their efficient types '1' -- 1, 'A' --- 'A', '1.2'--- 1.2

2007-05-21 Thread py_genetic
This is excellect advise, thank you gentelman. Paddy: We can't really, in this arena make assumtions about the data source. I fully agree with your point, but if we had the luxury of really knowing the source we wouldn't be having this conversation. Files we can deal with could be consumer data

Re: Python and GUI

2007-05-21 Thread Petr Muller
[EMAIL PROTECTED] wrote: Just wondering on what peoples opinions are of the GUIs avaiable for Python? All I am doing is prompting users for some data (listbox, radio buttons, text box, ect...). Then I will have some text output, maybe a scrolling text message as things are happening. I

pyparsing actinos (WAS: Inverse of id()?)

2007-05-21 Thread Steven Bethard
Paul McGuire wrote: For instance, Seo Sanghyeon (I believe the same one now working on IronPython) uses the following technique in the EBNF parser/compiler that he contributed to the pyparsing examples directory: # list of all the grammar variable names all_names = ''' integer

Re: Help required with Python App

2007-05-21 Thread vasudevram
On May 21, 8:11 pm, Trevor Hennion [EMAIL PROTECTED] wrote: Hi, I am producing a Web based database application for a customer and could do with some help producing pdf documents from the data. The project uses Apache. Postgresql and Python CGI scripts on a Linux server for a company with

Re: Help required with Python App

2007-05-21 Thread vasudevram
On May 21, 8:11 pm, Trevor Hennion [EMAIL PROTECTED] wrote: Hi, I am producing a Web based database application for a customer and could do with some help producing pdf documents from the data. The project uses Apache. Postgresql and Python CGI scripts on a Linux server for a company with

  1   2   >