Author of a Python Success Story Needs a Job!

2009-12-27 Thread Andrew Jonathan Fine
To whom it may concern, I am the author of "Honeywell Avoids Documentation Costs with Python and other Open Standards!" I was laid off by Honeywell several months after I had made my presentation in the 2005 Python Conference. Since then I have been unable to find work either as a software engin

Re: Question-Answer based web App

2009-12-27 Thread Gabriel Genellina
En Fri, 25 Dec 2009 16:13:14 -0300, aditya shukla escribió: I am trying to make a web based application which has a set of questions and answers associated with it such that a report is generated based on the answers a user chooses for each question.It's like facebook apps where we have que

Re: PYO versus PYC Behavior

2009-12-27 Thread Gabriel Genellina
En Thu, 24 Dec 2009 12:32:47 -0300, Boris Arloff escribió: All python docs and description indicate that optimization (-OO) does not do much anything except the removal off pydoc. A single "O" removes comments and asserts, and with the removal of pydoc with double "O" option the *.pyo by

Re: Difference Between Two datetimes

2009-12-27 Thread Lie Ryan
On 12/28/2009 5:42 PM, W. eWatson wrote: You're right. Y. Works fine. The produces datetime.datetime(2009, 1, 2, 13, 1, 15). If I now use t2=datetime.datetime.strptime("2009/01/04 13:01:15","%Y/%m/%d %H:%M:%S") I get tw as datetime.datetime(2009, 1, 4, 13, 1, 15) Then t2-t1 gives, datetime.timede

the need for 64 bits

2009-12-27 Thread Mensanator
I routinely use large numbers in my Collatz Conjecture work. Really large. As in a quarter million bits. You wouldn't think that the processor would make all that much difference. But using the number is a doddle. The real trick is getting there. There is a limitation that few encounter. In an ex

Re: Difference Between Two datetimes

2009-12-27 Thread W. eWatson
Ben Finney wrote: "W. eWatson" writes: How do I get the strings into a shape that will accommodate a difference? For example, t1=datetime.datetime.strptime("2009/01/02 13:01:15","%y/%m/%d %H:%M:%S") doesn't do it. ValueError: time data did not match format: data=2009/01/02 13:01:15 fmt=%y/%m

Re: Difference Between Two datetimes

2009-12-27 Thread W. eWatson
You're right. Y. Works fine. The produces datetime.datetime(2009, 1, 2, 13, 1, 15). If I now use t2=datetime.datetime.strptime("2009/01/04 13:01:15","%Y/%m/%d %H:%M:%S") I get tw as datetime.datetime(2009, 1, 4, 13, 1, 15) Then t2-t1 gives, datetime.timedelta(2) which is a 2 day difference--I gue

multiprocessing and threads

2009-12-27 Thread Deepak Rokade
Are there any special guidelines for using multiprocessing package and threads in python program. I am designing a application that works with database and files. In my program I was spawning some threads and then some process pools. Only my main process use the threads and my child processes

Re: OS independent way to check if a python app is running?

2009-12-27 Thread srid
On Dec 14, 12:35 pm, MRAB wrote: > pyt...@bdurham.com wrote: > > Is there an os independent way to check if a python app is running? > > > Goal: I have a server program based on cherrypy that I only want to have > > running once. If a system administrator accidentally attempts to run > > this prog

Re: Difference Between Two datetimes

2009-12-27 Thread Ben Finney
"W. eWatson" writes: > How do I get the strings into a shape that will accommodate a difference? > > For example, > t1=datetime.datetime.strptime("2009/01/02 13:01:15","%y/%m/%d %H:%M:%S") > doesn't do it. > ValueError: time data did not match format: data=2009/01/02 13:01:15 > fmt=%y/%m/%d %H:%

Re: Difference Between Two datetimes

2009-12-27 Thread Stephen Hansen
On Sun, Dec 27, 2009 at 8:54 PM, W. eWatson wrote: > That's fine, but I'd like to start with two dates as strings, as > "1961/06/16 04:35:25" and "1973/01/18 03:45:50" > > How do I get the strings into a shape that will accommodate a difference? > > For example, > t1=datetime.datetime.strptime("2

Difference Between Two datetimes

2009-12-27 Thread W. eWatson
According to one web source, this program: import datetime bree = datetime.datetime(1981, 6, 16, 4, 35, 25) nat = datetime.datetime(1973, 1, 18, 3, 45, 50) difference = bree - nat print "There were", difference, "minutes between Nat and Bree" yields: There were 3071 days, 0:49:35 minutes betwe

[ANN] Pyspread 0.0.13 released

2009-12-27 Thread Martin Manns
Pyspread 0.0.13 released I am pleased to announce the new release 0.0.13 of pyspread. About: -- Pyspread is a cross-platform Python spreadsheet application. It is based on and written in the programming language Python. Instead of spreadsheet formulas, Python ex

XDG Base Directory Specification

2009-12-27 Thread Lawrence D'Oliveiro
The XDG Base Directory Specification seems like the best idea anyone’s come up with so far to end the dotfile clutter in everyone’s home directories. But it needs application software to support it. I’ve put together a very simple library

Re: OS independent way to check if a python app is running?

2009-12-27 Thread python
Dan, >> Unfortunately, Windows is not a respectable OS. Unlike Unix, it allows >> two processes to bind to the same port. The theory is that this somehow >> allows the two processes to share their workload. One thing the OP can >> portably do, is try to connect() to the port. If that succeeds, the

Re: OS independent way to check if a python app is running?

2009-12-27 Thread Stephen Hansen
On Sun, Dec 27, 2009 at 4:42 PM, Dan Sommers wrote: > On Sun, 27 Dec 2009 19:07:12 -0500, python wrote: > > > Hans, > > > >> Unfortunately, Windows is not a respectable OS. Unlike Unix, it allows > >> two processes to bind to the same port. The theory is that this somehow > >> allows the two proc

Re: how to register with pypi - no such setup.py

2009-12-27 Thread Diez B. Roggisch
Phlip schrieb: I have no alternative, to fix bugs in PyPi, _not_ in "that file", but to continue burning up version numbers that nobody cares about. The message is condescending because I am aware of the reason we version packages, and the message is _not_ helping me apply that reason! Aaand I

Re: OS independent way to check if a python app is running?

2009-12-27 Thread Dan Sommers
On Sun, 27 Dec 2009 19:07:12 -0500, python wrote: > Hans, > >> Unfortunately, Windows is not a respectable OS. Unlike Unix, it allows >> two processes to bind to the same port. The theory is that this somehow >> allows the two processes to share their workload. One thing the OP can >> portably do

Re: OS independent way to check if a python app is running?

2009-12-27 Thread python
Hans, > Unfortunately, Windows is not a respectable OS. Unlike Unix, it allows two > processes to bind to the same port. The theory is that this somehow allows > the two processes to share their workload. One thing the OP can portably do, > is try to connect() to the port. If that succeeds, the

Re: How to iterate the input over a particular size?

2009-12-27 Thread joy99
On Dec 27, 8:42 pm, Benjamin Kaplan wrote: > On Sun, Dec 27, 2009 at 9:44 AM, joy99 wrote: > > Dear Group, > > > I am encountering a small question. > > > Suppose, I write the following code, > > > input_string=raw_input("PRINT A STRING:") > > string_to_word=input_string.split() > > len_word_list

Re: Which version of MSVC?90.DLL's to distribute with Python 2.6 based Py2exe executables?

2009-12-27 Thread Martin v. Loewis
> Thank you for your answers. From my research and testing on this topic: Unfortunately, I can't answer these questions for py2exe. In principle, it would hope that it is possible to include the DLLs *in* the executable, if the py2exe mode is used where it includes all DLLs. Regards, Martin -- h

Re: A way to convert RTF to HTML?

2009-12-27 Thread Tim Wintle
On Sun, 2009-12-27 at 20:10 +, Star Glider wrote: > the problem is that the one of the fields as text in rich text format, > and it needs to be display without the RTF markup, of course. > Is there any way to convert RTF to HTML? Depending on how precisely you need to lay it out you might fin

A way to convert RTF to HTML?

2009-12-27 Thread Star Glider
Hi, I'm converting an application to Python/PyQt, one of the tasks is to retrive data from a database and show it, no problem, the problem is that the one of the fields as text in rich text format, and it needs to be display without the RTF markup, of course. Is there any way to convert RTF to HTM

Re: [wxPy] Why I can not change a ListItem property?

2009-12-27 Thread David
Il Sat, 26 Dec 2009 17:17:20 -0800, Tim Roberts ha scritto: >>I have la ListCtrl in LC_REPORT mode and i need to change the color of a >>single cell. > > That can't be done. In LC_REPORT mode, the whole row has to be the same > color. You can't change individual cells within a row. > > You nee

Re: How do I install GMPY 1.11 on a Mac with OS X 10.6 and Python 3.1? -SOLVED!

2009-12-27 Thread Mensanator
On Dec 27, 8:19 am, Steve Holden wrote: > Mensanator wrote: > > On Dec 26, 10:02 pm, Benjamin Kaplan wrote: > >> On Sat, Dec 26, 2009 at 9:21 PM, Mensanator wrote: > >>> On Dec 26, 4:20 pm, Mensanator wrote: > On Dec 26, 3:57 pm, Benjamin Kaplan wrote: > > On Sat, Dec 26, 2009 at 4:36

Re: DB Table Processor?

2009-12-27 Thread Diez B. Roggisch
Shawn Milochik schrieb: It sounds like you're looking for SQLAlchemy. http://www.sqlalchemy.org/ I'd rather say he looks for Django Admin or SPROX. Diez -- http://mail.python.org/mailman/listinfo/python-list

Re: Missing collections

2009-12-27 Thread Lie Ryan
On 12/27/2009 4:53 PM, Bearophile wrote: - frozenDict perhaps we could extend namedtuple to become the "frozenDict" - persistentList, persistentDict aren't they database? Am I missing something here? Regarding the standard library of Python 3, it's easy enough to create for mistake a modu

Re: DB Table Processor?

2009-12-27 Thread Shawn Milochik
It sounds like you're looking for SQLAlchemy. http://www.sqlalchemy.org/ Enjoy! Shawn -- http://mail.python.org/mailman/listinfo/python-list

DB Table Processor?

2009-12-27 Thread A. Shore
Folks, I'm considering developing a particular app in Python - I've been working in PHP for some years now - and it will be db-intensive. Whether it's based on sqllite or mySQL is TBD as of right now. One tool that's done me well in the past is a generalized table processor, which I use as a way o

Re: How to iterate the input over a particular size?

2009-12-27 Thread Benjamin Kaplan
On Sun, Dec 27, 2009 at 9:44 AM, joy99 wrote: > Dear Group, > > I am encountering a small question. > > Suppose, I write the following code, > > input_string=raw_input("PRINT A STRING:") > string_to_word=input_string.split() > len_word_list=len(string_to_word) > if len_word_list>9: >             r

Re: How to iterate the input over a particular size?

2009-12-27 Thread Shawn Milochik
A couple of notes: Your code is too packed together. That makes it hard to read. Put in some whitespace (and comments, where necessary), and put spaces around your equal signs (x = 23 instead of x=23). That said, here's something I threw together: #!/usr/bin/env python def chop_list(words, si

How to iterate the input over a particular size?

2009-12-27 Thread joy99
Dear Group, I am encountering a small question. Suppose, I write the following code, input_string=raw_input("PRINT A STRING:") string_to_word=input_string.split() len_word_list=len(string_to_word) if len_word_list>9: rest_words=string_to_word[9:] len_rest_word=len(rest_

Re: How do I install GMPY 1.11 on a Mac with OS X 10.6 and Python 3.1? -SOLVED!

2009-12-27 Thread Steve Holden
Mensanator wrote: > On Dec 26, 10:02 pm, Benjamin Kaplan wrote: >> On Sat, Dec 26, 2009 at 9:21 PM, Mensanator wrote: >>> On Dec 26, 4:20 pm, Mensanator wrote: On Dec 26, 3:57 pm, Benjamin Kaplan wrote: > On Sat, Dec 26, 2009 at 4:36 PM, Mensanator wrote: >> I guess the point here

Re: Recommendation for small, fast, Python based web server

2009-12-27 Thread python
> This is a new wsgi web server implemented in a single file. > http://code.google.com/p/web2py/source/browse/gluon/sneaky.py Thank you Massimo. Regards, Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Re: Which version of MSVC?90.DLL's to distribute with Python 2.6 based Py2exe executables?

2009-12-27 Thread python
Hi Martin, > You'll need to include Microsoft.VC90.CRT.manifest and msvcr90.dll. Thank you for your answers. From my research and testing on this topic: 1. Can I safely place these 2 files in the same folder as my Py2exe generated EXE file or do I need to place the MSVCR90.DLL file in a speciall

Re: What should I use for testing a web service?

2009-12-27 Thread dusans
On Dec 27, 12:35 pm, "Diez B. Roggisch" wrote: > Fencer schrieb: > > > Hello, I need to write a test program for a web service. The web service > > publishes its method through a wsdl-file. I recall using SOAPpy in the > > past and as a I remember it, it was very easy to "load" the WSDL-file > > a

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

2009-12-27 Thread Cameron Laird
QOTW: "It took Python to make me realize that programming *could* be fun, or at least not annoying enough to keep me from making a career of programming." - Aahz http://groups.google.com/group/comp.lang.python/msg/65ad4e71c194d97e Thanks to Gabriel Genellina for these references: How t

Re: Missing Images

2009-12-27 Thread Victor Subervi
On Sat, Dec 26, 2009 at 4:52 PM, Carsten Haese wrote: > Victor Subervi wrote: > > Right. Thank you again. I'd forgotten to put in > > enctype="multipart/form-data". Now I have the following snipped: > > > > for pic in ourPics: > > sql = 'update %s set pic%d=%s where ID="%s";' % (stor

Re: What should I use for testing a web service?

2009-12-27 Thread Diez B. Roggisch
Fencer schrieb: Hello, I need to write a test program for a web service. The web service publishes its method through a wsdl-file. I recall using SOAPpy in the past and as a I remember it, it was very easy to "load" the WSDL-file and call web service methods. But is SOAPpy really maintained any

Re: Missing collections

2009-12-27 Thread Arnaud Delobelle
On Dec 27, 5:53 am, Bearophile wrote: > What are the useful collections that are missing in the collections > module? > > Let's see: > - sortedDict, sortedSet (based on a search tree) There was a thread on these two on python-ideas: http://mail.python.org/pipermail/python-ideas/2009-July/005219.

What should I use for testing a web service?

2009-12-27 Thread Fencer
Hello, I need to write a test program for a web service. The web service publishes its method through a wsdl-file. I recall using SOAPpy in the past and as a I remember it, it was very easy to "load" the WSDL-file and call web service methods. But is SOAPpy really maintained anymore? Someone me

Re: Simple distributed example for learning purposes?

2009-12-27 Thread Shawn Milochik
The special features of the Shrek DVD showed how the rendering took so much processing power that everyone's workstation was used overnight as a rendering farm. Some kind of video rendering would make a great example. However, it might be a lot of overhead for you to set up, unless you can find