Re: str.format fails with JSON?

2017-02-21 Thread Carlo Pires
Em terça-feira, 21 de fevereiro de 2017 11:39:13 UTC-3, Chris Angelico escreveu: > On Wed, Feb 22, 2017 at 1:23 AM, Carlo Pires wrote: > > Hi, > > > > When I run this piece of code: > > > > 'From {"value": 1}, value={value}'.format(value=

Re: UTF-8 question from Dive into Python 3

2011-01-17 Thread carlo
On 17 Gen, 23:34, Antoine Pitrou wrote: > On Mon, 17 Jan 2011 14:19:13 -0800 (PST) > > carlo wrote: > > Is it true UTF-8 does not have any "big-endian/little-endian" issue > > because of its encoding method? > > Yes. > > > And if it is true, why M

UTF-8 question from Dive into Python 3

2011-01-17 Thread carlo
d if it is true, why Mark (and everyone does) writes about UTF-8 with and without BOM some chapters later? What would be the BOM purpose then? 2- If that were true, can you point me to some documentation about the math that, as Mark says, demonstrates this? thank you Carlo -- http://mail.python.

Re: string find/replace

2010-12-01 Thread Carlo
On 2010-12-01, Peter Otten <__pete...@web.de> wrote: import re re.compile("([a-z])([A-Z])").sub(r"\1 \2", "camelCase") > 'camel Case' Very simple if you know it. Thank you! -- http://mail.python.org/mailman/listinfo/python-list

string find/replace

2010-12-01 Thread Carlo
Hello, I want the Python equivalent of the Perl expression: s/([a-z])([A-Z])/\1 \2/g In plain language: place a space between a lowercase and uppercase letter. I get lost in the RE module. Can someone help me? Thanks! -- http://mail.python.org/mailman/listinfo/python-list

Re: Image to SVG conversion with Python

2009-11-16 Thread Carlo DiCelico
On Nov 16, 11:48 am, Dave Angel wrote: > Carlo DiCelico wrote: > > I need to convert JPEG and PNG files to SVG. I'm currently using PIL > > to generate the JPEG/PNG files to begin with. However, I need to be > > able to scale the generated images up in size without a

Image to SVG conversion with Python

2009-11-16 Thread Carlo DiCelico
s? Thanks, Carlo -- http://mail.python.org/mailman/listinfo/python-list

Re: Simple Python struct issue

2009-10-02 Thread Carlo DiCelico
On Oct 2, 12:49 pm, MRAB wrote: > Carlo DiCelico wrote: > > I saw an article on O'Reilly about using NumPy and Dislin to analyze > > and visualize WAV files. It's a really fantastic article but was a > > little out of date. I updated the script to work with the newe

Re: Simple Python struct issue

2009-10-02 Thread Carlo DiCelico
On Oct 2, 3:17 pm, Simon Forman wrote: > On Fri, Oct 2, 2009 at 12:35 PM, Carlo DiCelico > > > > > > wrote: > > On Oct 2, 12:15 pm, Simon Forman wrote: > >> On Fri, Oct 2, 2009 at 12:07 PM, Carlo DiCelico > >> wrote: > >> > I saw an ar

Re: Simple Python struct issue

2009-10-02 Thread Carlo DiCelico
On Oct 2, 12:15 pm, Simon Forman wrote: > On Fri, Oct 2, 2009 at 12:07 PM, Carlo DiCelico > > > > > > wrote: > > I saw an article on O'Reilly about using NumPy and Dislin to analyze > > and visualize WAV files. It's a really fantastic article but

Simple Python struct issue

2009-10-02 Thread Carlo DiCelico
I saw an article on O'Reilly about using NumPy and Dislin to analyze and visualize WAV files. It's a really fantastic article but was a little out of date. I updated the script to work with the newer modules &etc but am still having trouble getting it working. The line temp[i,:] = array(struct.un

Re: ctypes list library

2009-06-22 Thread Carlo Salinari
Diez B. Roggisch wrote: > luca72 schrieb: >> There is a command for ctypes that help me to know the entry points >> inside a library. > > dir() on a loaded library? > > But it won't do you any good, without having the header-file you can't > possibly know what the functions take for parameters.

Re: Lie Hetland book: Beginning Python..

2005-11-09 Thread carlo
Gerhard Häring ha scritto: > The reason why pysqlite 0.x/1.x used paramstyle "pyformat", based on > Python string substitution for SQL parameters is that at the time > pysqlite was started, SQLite 2.x did not have any support for parameter > binding. So we had to "fake" it in Python, just like th