RE: PDF generator decision

2013-05-14 Thread Carlos Nepomuceno
Christian, have you tried pod[1]? You can use create templates in OpenDocument format and then create the PDFs just passing the arguments, like: args = {'name':'John', 'email':'j...@example.com'} renderer = Renderer('template.odt', args, 'result.odt')renderer.run() [1] http://appyframework.org

Determine actually given command line arguments

2013-05-14 Thread Henry Leyh
Hello, I am writing a program that gets its parameters from a combination of config file (using configparser) and command line arguments (using argparse). Now I would also like the program to be able to _write_ a configparser config file that contains only the parameters actually given on the

Re: PDF generator decision

2013-05-14 Thread dieter
Christian Jurk writes: > ... > So far I'd like to ask which is the (probably) best way to create PDFs in > Python (3)? It is important for me that I am able to specify not only > background graphics, paragaphs, tables and so on but also to specify page > headers/footers. The reason is that I h

Re: Debugging difficulty in python with __getattr__, decorated properties and AttributeError.

2013-05-14 Thread dieter
"Mr. Joe" writes: > ... > Sorry for digging this old topic back. I see that my "'property' does not > play well with polymorphic code" comment generated some controversy. So > here's something in my defense: I did not intend to "attack" you. > ... > Yes, I like decorators and descriptors. I also

RE: IndexError: pop index out of range

2013-05-14 Thread Carlos Nepomuceno
Your "for idx, val in enumerate(words):" is running on words not list_temp. As you remove from list_temp and keeps parsing words you get the IndexError. > From: form...@gmail.com > Date: Wed, 15 May 2013 00:22:05 -0400 > Subject: IndexError: pop index out of range

IndexError: pop index out of range

2013-05-14 Thread Andrew Z
hello, going fru some basic examples and can't figureout why the following errors out. Help is very much appreciated: def front_x(words): # +++your code here+++ print "words passed : ", words list_xx = [] list_temp = words[:] print "list_temp -", list_temp print "words -", w

Re: Python for philosophers

2013-05-14 Thread Ramchandra Apte
On Sunday, 12 May 2013 01:33:15 UTC+5:30, Citizen Kant wrote: > Hi, > this could be seen as an extravagant subject but that is not my original > purpose. I still don't know if I want to become a programmer or not. At this > moment I'm just inspecting the environment. I'm making my way to Python

Re: Python's sad, unimaginative Enum

2013-05-14 Thread rusi
On May 14, 2:24 pm, Jean-Michel Pichavant wrote: > - Original Message - > > On Mon, 13 May 2013 13:00:36 +0200, Jean-Michel Pichavant wrote: > > > > - Original Message - > > >> That's the title of this little beast > > >>http://www.acooke.org/cute/Pythonssad0.htmlif anybody's > > >

Re: Python's sad, unimaginative Enum

2013-05-14 Thread 88888 Dihedral
Chris Angelico於 2013年5月14日星期二UTC+8上午1時36分34秒寫道: > On Mon, May 13, 2013 at 8:17 PM, Steven D'Aprano > > wrote: > > > Let's look at his major criticisms: > > > > > > 1) values aren't automatically generated. > > > > > > True. So what? That is the *least* important part of enums. > > > > I s

weave in 64 bit strange behavior

2013-05-14 Thread Jadhav, Alok
Hi everyone, I realize my previous post was quite unreadable, thanks to my email client. I am going to report my question here, with slight enhancements. Apologies for inconvenience caused and spamming your mailboxes. I am facing a strange problem using weave on 64 bit machine. Specifically

Re: Differences of "!=" operator behavior in python3 and python2 [ bug? ]

2013-05-14 Thread Steven D'Aprano
On Tue, 14 May 2013 19:01:38 -0400, Dennis Lee Bieber wrote: > On 14 May 2013 05:09:48 GMT, Steven D'Aprano > declaimed the following in > gmane.comp.python.general: >> The <> operator comes from Pascal, where it was used as "not equal" >> since > > I thought it came from BASIC... > http:

Re: Fwd: Python for philosophers

2013-05-14 Thread DJC
On 14/05/13 09:34, Citizen Kant wrote: 2013/5/14 Steven D'Aprano On Tue, 14 May 2013 01:32:43 +0200, Citizen Kant wrote: An entity named Python must be somehow as a serpent. Don't forget that I'm with the freeing up of my memory, now I'm not trying to follow the path of what's told but actin

Re: Illegal seek error with seek() and os.lseek()

2013-05-14 Thread Andreas Perstinger
On 14.05.2013 21:00, krishna2pra...@gmail.com wrote: # first, open the file as a plain binary try: self.file = open(/dev/relpcfpga, "r+b", buffering=0) Aren't you missing the quotes for "/dev/relpcfpga"? The method seek() complains "OSError: [Errno 29] Illegal seek" The device relpc

Re: Message passing syntax for objects | OOPv2

2013-05-14 Thread Fábio Santos
Impressive, I'd say. On Tue, May 14, 2013 at 8:11 PM, Mark Janssen wrote: >> Sounds a lot like reddit threads. > > It's similar, but it goes a lot further. Where every other site > without centralized editors, the thread mess on a simple flat page > doesn't scale after about a 100 interactions.

Re: Illegal seek error with seek() and os.lseek()

2013-05-14 Thread Roy Smith
In article <50bf9366-46e0-4a7f-865b-3f7c7b0f6...@googlegroups.com>, krishna2pra...@gmail.com wrote: > I am trying to use os.open() and os.lseek() methods to operate on a device > file in Linux. My code goes something like this - > > # first, open the file as a plain binary > try: > self.

Re: Illegal seek error with seek() and os.lseek()

2013-05-14 Thread mar...@python.net
On Tue, May 14, 2013, at 03:00 PM, krishna2pra...@gmail.com wrote: > I am trying to use os.open() and os.lseek() methods to operate on a > device file in Linux. My code goes something like this - > > # first, open the file as a plain binary > try: > self.file = open(/dev/relpcfpga, "r+b", b

Re: ssl proxy server

2013-05-14 Thread Skip Montanaro
I haven't touched the SpamBayes setup for the usenet-to-mail gateway in a long while. For whatever reason, this message was either held and then approved by the current list moderator(s), or (more likely) slipped through unscathed. No filter is perfect. Skip On Tue, May 14, 2013 at 1:40 PM, Chr

Re: Message passing syntax for objects | OOPv2

2013-05-14 Thread Mark Janssen
> Sounds a lot like reddit threads. It's similar, but it goes a lot further. Where every other site without centralized editors, the thread mess on a simple flat page doesn't scale after about a 100 interactions. To sort out the mess, it takes another dimension. The project I'm working on uses

Illegal seek error with seek() and os.lseek()

2013-05-14 Thread krishna2prasad
I am trying to use os.open() and os.lseek() methods to operate on a device file in Linux. My code goes something like this - # first, open the file as a plain binary try: self.file = open(/dev/relpcfpga, "r+b", buffering=0) except IOError: raise IOError ('Failed to open.') # Figu

Re: Python for philosophers

2013-05-14 Thread Mark Janssen
On Sat, May 11, 2013 at 1:03 PM, Citizen Kant wrote: >I'm making my way to Python (and > OOP in general) from a philosophical perspective or point of view and try to > set the more global definition of Python's core as an "entity". In order to > do that, and following Wittgenstein's indication abo

Re: ssl proxy server

2013-05-14 Thread Chris “Kwpolska” Warrick
On Tue, May 14, 2013 at 2:34 PM, 23alagmy wrote: > ssl proxy server > > hxxp://natigtas7ab.blogspot.com/2013/05/ssl-proxy-server.html > -- > http://mail.python.org/mailman/listinfo/python-list I have been seeing those mails for a long time. Why didn’t anybody ban that guy? If it comes from Usen

Re: PDF generator decision

2013-05-14 Thread jmfauth
On 14 mai, 17:05, Christian Jurk wrote: > Hi folks, > > This questions may be asked several times already, but the development of > relevant software continues day-for-day. For some time now I've been using > xhtml2pdf [1] to generate PDF documents from HTML templates (which are > rendered thro

Re: Writing a blog post on the new Enum.

2013-05-14 Thread Fábio Santos
I corrected it indeed. On Tue, May 14, 2013 at 4:36 PM, Chris Angelico wrote: > On Wed, May 15, 2013 at 1:07 AM, Terry Jan Reedy wrote: >> On 5/14/2013 3:52 AM, Chris Angelico wrote: >>> >>> On Tue, May 14, 2013 at 9:40 AM, Fábio Santos >>> wrote: >> http://fabiosantoscode.blogspot.pt/2013

First post

2013-05-14 Thread Carlos Nepomuceno
Hi guys! This is my first post on this list. I'd like have your opinion on how to safely implement WSGI on a production server. My benchmarks show no performance differences between our PHP and Python environments. I'm using mod_wsgi v3.4 with Apache 2.4. Is that ok or can it get faster? Than

Re: Writing a blog post on the new Enum.

2013-05-14 Thread Chris Angelico
On Wed, May 15, 2013 at 1:07 AM, Terry Jan Reedy wrote: > On 5/14/2013 3:52 AM, Chris Angelico wrote: >> >> On Tue, May 14, 2013 at 9:40 AM, Fábio Santos >> wrote: > >>> http://fabiosantoscode.blogspot.pt/2013/05/pythons-new-enum-class.html >> >> >> class Text(unicode, Enum): >> one

Re: PDF generator decision

2013-05-14 Thread Frank Miles
On Tue, 14 May 2013 08:05:53 -0700, Christian Jurk wrote: > Hi folks, > > This questions may be asked several times already, but the development > of relevant software continues day-for-day. For some time now I've been > using xhtml2pdf [1] to generate PDF documents from HTML templates (which > a

PDF generator decision

2013-05-14 Thread Christian Jurk
Hi folks, This questions may be asked several times already, but the development of relevant software continues day-for-day. For some time now I've been using xhtml2pdf [1] to generate PDF documents from HTML templates (which are rendered through my Django-based web application. This have been

Re: Debugging difficulty in python with __getattr__, decorated properties and AttributeError.

2013-05-14 Thread Mr. Joe
Sorry for digging this old topic back. I see that my "'property' does not play well with polymorphic code" comment generated some controversy. So here's something in my defense: Here's the link to stackoveflow topic I am talking about: http://stackoverflow.com/questions/237432/python-properties-a

Re: Writing a blog post on the new Enum.

2013-05-14 Thread Terry Jan Reedy
On 5/14/2013 3:52 AM, Chris Angelico wrote: On Tue, May 14, 2013 at 9:40 AM, Fábio Santos wrote: http://fabiosantoscode.blogspot.pt/2013/05/pythons-new-enum-class.html class Text(unicode, Enum): one = u'one' two = u'two' three = u'three' Is this supposed to

Re: Fwd: Python for philosophers

2013-05-14 Thread Terry Jan Reedy
2013/5/14 Steven D'Aprano mailto:steve+comp.lang.pyt...@pearwood.info>> >Python is not named after the snake, but after Monty Python the British >comedy troupe. And they picked their name because it sounded funny. That does not mean they were unaware that Pythons are snakes. "

ssl proxy server

2013-05-14 Thread 23alagmy
ssl proxy server http://natigtas7ab.blogspot.com/2013/05/ssl-proxy-server.html -- http://mail.python.org/mailman/listinfo/python-list

Fwd: Python for philosophers

2013-05-14 Thread Citizen Kant
Case study (kind of) Imagine that I use to explore with my mind a particular topic and I want to map and model the mechanics of that exploration. That's mostly metaphysical. I have a partner called Python with whom I must communicate in Python. Which would be the basics that I must "know" in order

Re: Python's sad, unimaginative Enum

2013-05-14 Thread Fábio Santos
On 13 May 2013 12:05, "Jean-Michel Pichavant" wrote: > > class Enum: > class __metaclass__(type): That's some cool metaclass fu! I didn't know that to be possible -- http://mail.python.org/mailman/listinfo/python-list

Re: Python's sad, unimaginative Enum

2013-05-14 Thread Jean-Michel Pichavant
- Original Message - > On Mon, 13 May 2013 13:00:36 +0200, Jean-Michel Pichavant wrote: > > > - Original Message - > >> That's the title of this little beast > >> http://www.acooke.org/cute/Pythonssad0.html if anybody's > >> interested. > >> > >> -- > >> If you're using GoogleCrap

Fwd: Python for philosophers

2013-05-14 Thread Citizen Kant
>>From: llanitedave >>On Monday, May 13, 2013 4:32:43 PM UTC-7, Citizen Kant wrote: >>>An entity named Python must be >>> somehow as a serpent. llanitedave wrote: Moe like a dead parrot, actually. That's a good one! Even If doesn't lead to the fact that Python (so to speak) use to giv

Fwd: Python for philosophers

2013-05-14 Thread Citizen Kant
2013/5/14 Steven D'Aprano > On Tue, 14 May 2013 01:32:43 +0200, Citizen Kant wrote: > > >> An entity named Python must be somehow as a serpent. Don't forget that > >> I'm with the freeing up of my memory, now I'm not trying to follow the > >> path of what's told but acting like the monkey and pus

Re: Writing a blog post on the new Enum.

2013-05-14 Thread Chris Angelico
On Tue, May 14, 2013 at 9:40 AM, Fábio Santos wrote: > Well I am thus defying the law and order of this world by publishing > it on the internets! > > --- > > And here it is: > http://fabiosantoscode.blogspot.pt/2013/05/pythons-new-enum-class.html class Text(unicode, Enum): one = u'on

Re: Differences of "!=" operator behavior in python3 and python2 [ bug? ]

2013-05-14 Thread Chris Angelico
On Tue, May 14, 2013 at 9:22 AM, Dave Angel wrote: > On 05/13/2013 06:53 PM, Mark Lawrence wrote: >> I much prefer the alternative <> for != but some silly people insisted >> that this be removed from Python3. Just how stupid can you get? >> > > So which special methods should the <> operator cal

weave and 64 bit issues

2013-05-14 Thread Jadhav, Alok
Hi everyone, I am facing a strange problem using weave on 64 bit machine. Specifically with weave's inline function. It has something to do with weave's catalog. Similar issues I found in the past (very old) http://mail.scipy.org/pipermail/scipy-dev/2006-June/005908.html http://mail.s