Matt Nordhoff wrote:
Matt Nordhoff wrote:
You could use data: URIs [1].
For example, a 43-byte single pixel GIF becomes this URI:
They don't have universal browser support, but that might not be a
problem in this case.
As for generating them with Python, I'm not sure... I just used Hixie's
chris wrote:
I'm creating a data plot and need to display the image to a web page.
What's the best way of doing this without having to save the image to
disk? I already have a mod_python script that outputs the data in
tabular format, but I haven't been able to find anything on adding a
generated
Hello. Im using doctests to check the functions that ive made. Wat i
dnt understand is that it gives me a fialure even though the expected
and got values are the same. Check this out:
**
File "C:\Python25\Lib\idlelib\idle.pyw", li
i am looking for python code to convert a textfile(.txt) to an
image(preferrably Tiff).I believe it involves some scanning and
conversion using some font table and probably compression using
huffman encoding..is there an open source code doing this?can someone
give a pointer?
jim
--
http://mail.py
eliben a écrit :
Hello,
In a Python program I'm writing I need to dynamically generate
functions[*]
(snip)
[*] I know that each time a code generation question comes up people
suggest that there's a better way to achieve this, without using exec,
eval, etc.
Just to make things clear: you
Terry Reedy <[EMAIL PROTECTED]> wrote:
>> [['Fizz', 'Buzz', 'FizzBuzz', str(i)][62/(pow(i, 4, 15) + 1)%4] for i
>> in xrange(1, 101)]
>
> These make the lookup table variable, so it has to be recalculated for
> each i.
>
So what? Mark Wooding was posting about mathematical elegance and came up
Hi,
I am using poplib's retr() to fetch mails from my gmail account. It
works fine, in some cases it gets stuck inside the retr() method and
does not come out.
>From the logs I could find that when retr() is called, it stops
executing further statements, nor does it throw an exceptions but
simply
Sallu <[EMAIL PROTECTED]> wrote:
> string = 'riché'
...
> unicode(string)).encode('ASCII', 'ignore')
...
>
> Output :
>
> sys:1: DeprecationWarning: Non-ASCII character '\xc3' in file regu.py
> on line 4, but no encoding declared; see
> http://www.python.org/peps/pep-0263.html for details
> riché
Michael Torrie wrote:
Aspersieman wrote:
SPAM
Obviously. Please refrain from replying to the SPAM on this list. It
just makes the problem worse.
Thanks.
--
http://mail.python.org/mailman/listinfo/python-list
ErrrOk.
I read somewhere that replying to potenti
J-Burns wrote:
> Hello. Im using doctests to check the functions that ive made. Wat i
> dnt understand is that it gives me a fialure even though the expected
> and got values are the same. Check this out:
>
> **
> File "C:\Python
I guess it didn't because I was reading through Google Mail, and it
wasn't filtered.
Best Regards,
Bryan Rasmussen
On Fri, Jun 20, 2008 at 9:42 AM, Aspersieman <[EMAIL PROTECTED]> wrote:
> Michael Torrie wrote:
>
> Aspersieman wrote:
>
>
> SPAM
>
>
> Obviously. Please refrain from replying to th
Duncan Booth pisze:
Sallu <[EMAIL PROTECTED]> wrote:
string = 'riché'
...
unicode(string)).encode('ASCII', 'ignore')
...
Output :
sys:1: DeprecationWarning: Non-ASCII character '\xc3' in file regu.py
on line 4, but no encoding declared; see
http://www.python.org/peps/pep-0263.html for detai
On 20 июн, 11:31, Duncan Booth <[EMAIL PROTECTED]> wrote:
> Terry Reedy <[EMAIL PROTECTED]> wrote:
> >> [['Fizz', 'Buzz', 'FizzBuzz', str(i)][62/(pow(i, 4, 15) + 1)%4] for i
> >> in xrange(1, 101)]
>
> > These make the lookup table variable, so it has to be recalculated for
> > each i.
>
> So what?
Earn 25 US$ in just 5 mins . . .
You can earn 25 US$ in just 5mins from now, please follow the simple
steps:
It's absolutely free to join.
Step 01
CLICK HERE
http://www.awsurveys.com/HomeMain.cfm?RefID=ad125
A page will open
Step 02
Click on "Create a Free Account"
Step 03
Fill up the details a
I found the namedtuple very convenient for rapid prototyping code, for
functions that have to return a number of results that could grow as
the code evolves. They are more elegant than dicts, and I don't have
to create a new explicit class. Unfortunately in this situation they
lose the conv
Hi there,
I am currently involved in managing a large python/c++ project
(using swig to automagically wrap c++ code to python). So far my
current experience was that python was a second class citizen and
extremely little python code was written and everything seemed to
work.
Now this is the c
On Jun 20, 9:15 am, jimgardener <[EMAIL PROTECTED]> wrote:
> i am looking for python code to convert a textfile(.txt) to an
> image(preferrably Tiff).I believe it involves some scanning and
> conversion using some font table and probably compression using
> huffman encoding..is there an open sourc
OK, this ought to be simple. I'm parsing a large text file (originally
a database dump) in order to process the contents back into a SQLite3
database. The data looks like this:
'AAA','PF',-17.4167,-145.5,'Anaa, French Polynesia','Pacific/
Tahiti','Anaa';'AAB','AU',-26.75,141,'Arrabury, Que
On Jun 20, 1:45 am, Chris <[EMAIL PROTECTED]> wrote:
> On Jun 17, 1:09 pm, [EMAIL PROTECTED] wrote:
>
> > Kirk Strauser:
>
> > > Hint: recursion. Your general algorithm will be something like:
>
> > Another solution is to use a better (different) language, that has
> > built-in pattern matching, o
On Jun 19, 12:40 pm, Paul McGuire <[EMAIL PROTECTED]> wrote:
> I just ran my pyparsing unit tests with the latest Python 2.6b1
> (labeled internally as Python 2.6a3 - ???), and the current 1.5.0
> version of pyparsing runs with no warnings or regressions.
>
> I was pleasantly surprised by the impro
TYR wrote:
> OK, this ought to be simple. I'm parsing a large text file (originally
> a database dump) in order to process the contents back into a SQLite3
> database. The data looks like this:
>
> 'AAA','PF',-17.4167,-145.5,'Anaa, French Polynesia','Pacific/
> Tahiti','Anaa';'AAB','AU',-
TYR wrote:
> OK, this ought to be simple. I'm parsing a large text file (originally
> a database dump) in order to process the contents back into a SQLite3
> database. The data looks like this:
>
> 'AAA','PF',-17.4167,-145.5,'Anaa, French Polynesia','Pacific/
> Tahiti','Anaa';'AAB','AU',-
Many thanks for the further comments:
On Thu, 19 Jun 2008 21:24:31 -0400, Terry Reedy <[EMAIL PROTECTED]>
wrote:
>> def __init__(self):
>> Try
>> Import serial # the pyserial library
>The import should be at module level. You only want to do it once, not
>
> Yes I was wondering about that, but I wasn't clear about when 'body'
> code (ie not contained within a def block) in the module might run
> under Python. So it seemed to be safer to place the import statement
> inside the 'constructor' to get the earliest warning of non-visibility
> of pyserial
On Jun 20, 9:17 am, Bruno Desthuilliers wrote:
> eliben a écrit :> Hello,
>
> > In a Python program I'm writing I need to dynamically generate
> > functions[*]
>
> (snip)
>
> > [*] I know that each time a code generation question comes up people
> > suggest that there's a better way to achieve thi
Hi,
My requirement is i have to execute a python script on a remote machine as a
subprocess from a python script and to get the subprocess pid of the process
running the script. Is there anyway to do that??
I have used subprocess.popen() method to do that. I have done as following:
executable = '
On Jun 20, 9:01 pm, TYR <[EMAIL PROTECTED]> wrote:
> OK, this ought to be simple. I'm parsing a large text file (originally
> a database dump) in order to process the contents back into a SQLite3
> database. The data looks like this:
>
> 'AAA','PF',-17.4167,-145.5,'Anaa, French Polynesia','
John Dann <[EMAIL PROTECTED]> wrote:
> Yes I was wondering about that, but I wasn't clear about when 'body'
> code (ie not contained within a def block) in the module might run
> under Python. So it seemed to be safer to place the import statement
> inside the 'constructor' to get the earliest war
On Jun 19, 8:40 pm, Paul McGuire <[EMAIL PROTECTED]> wrote:
> I just ran my pyparsing unit tests with the latest Python 2.6b1
> (labeled internally as Python 2.6a3 - ???),
Hi, Paul. If it says 2.6a3, that's what it is. Look at the thread of
replies to Barry Warsaw's announcement of 2.6b1 ... [from
In <[EMAIL PROTECTED]> Matimus <[EMAIL PROTECTED]> writes:
>If you are in the interpreter and you type: help(foo.bar.baz) you get
>the embeded documentation.
>I usually go straight to the `global module index` http://docs.python.org/m=
>odindex.html
Thanks!
kynn
--
NOTE: In my address everythi
In <[EMAIL PROTECTED]> John Machin <[EMAIL PROTECTED]> writes:
>On Jun 20, 7:17 am, kj <[EMAIL PROTECTED]> wrote:
>> OK, the following should work but doesn't, and I can't figure out
>> why:
>>
>> >>> from xml.marshal.generic import dumps
>> >>> dumps( ( 1, 2.0, 'foo', [3,4,5] ) )
>>
>> '> version
>How do you propose to parse that string into a "set of values"? Can
>you rely there being data commas only in the 5th field, or do you need
>a general solution? What if (as Peter remarked) there is a ';' in the
>data? What if there's a "'" in the data (think O'Hare)?
My plan was to be pointlessl
Hi. Does anyone know of a module that will take a suitable Python
dictionary and return the corresponding XML structure?
In Perl I use XML::Simple's handy XMLout function:
use XML::Simple 'XMLout';
my %h = ( 'Foo' => +{
'Bar' => +{
On Jun 20, 10:33 pm, TYR <[EMAIL PROTECTED]> wrote:
> >How do you propose to parse that string into a "set of values"? Can
> >you rely there being data commas only in the 5th field, or do you need
> >a general solution? What if (as Peter remarked) there is a ';' in the
> >data? What if there's a "
eliben wrote:
> Additionally, I've found indentation to be a problem in such
> constructs. Is there a workable way to indent the code at the level of
> build_func, and not on column 0 ?
exec "if 1:" + code.rstrip()
Peter
--
http://mail.python.org/mailman/listinfo/python-list
Hi all and one
i wrote this script, working fine without fail( just run it)
import re
value='This is Praveen'
print value
#value = 'riché gerry'
#words=str(value.split()).strip('[]').replace(', ', '') ( here i tried
to convert in to list and then back to string)
#print words
richre=re.compile(r'[a
kj wrote:
> Hi. Does anyone know of a module that will take a suitable Python
> dictionary and return the corresponding XML structure?
>
> In Perl I use XML::Simple's handy XMLout function:
>
> use XML::Simple 'XMLout';
> my %h = ( 'Foo' => +{
> 'Bar' => +{
>
AndreH <[EMAIL PROTECTED]>:
> On Jun 17, 12:11 pm, AndreH <[EMAIL PROTECTED]> wrote:
>> On Jun 13, 3:39 pm, AndreH <[EMAIL PROTECTED]> wrote:
>>
>>
>>
>> > Good day,
>>
>> > I just installed pyinotify on my gentoo box.
>>
>> > When I test the library through "pyinotify.pv -v /tmp" under root,
>> >
> I'm surprised that splitting on \b doesn't work as expected, so it
> might be that re.split has been defined only to split on one or more
> characters. Is it something that should it be 'fixed'?
Thats's my main doubt: is this a bug or not?
[]'s
- Walter
--
http://mail.python.org/mailman/listinf
On Jun 20, 8:03 am, eliben <[EMAIL PROTECTED]> wrote:
> On Jun 20, 9:17 am, Bruno Desthuilliers
> [EMAIL PROTECTED]> wrote:
> > eliben a écrit :> Hello,
>
> > > In a Python program I'm writing I need to dynamically generate
> > > functions[*]
>
> > (snip)
>
> > > [*] I know that each time a code g
On Jun 20, 5:03 am, eliben <[EMAIL PROTECTED]> wrote:
> I've rewritten it using a dynamically generated procedure
> for each field, that does hard coded access to its data. For example:
>
> def get_counter(packet):
> data = packet[2:6]
> data.reverse()
> return data
>
> This gave me a huge sp
"Sallu" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Hi all and one
i wrote this script, working fine without fail( just run it)
import re
value='This is Praveen'
print value
#value = 'riché gerry'
#words=str(value.split()).strip('[]').replace(', ', '') ( here i tried
to convert
Thanks everybody, yes, I use 'exec' for files.
And "freeze" modules - thanks too, I almost forgot this opportunity.
--
Best regards, Alex Gusarov
--
http://mail.python.org/mailman/listinfo/python-list
On Jun 20, 6:01 am, TYR <[EMAIL PROTECTED]> wrote:
> OK, this ought to be simple. I'm parsing a large text file (originally
> a database dump) in order to process the contents back into a SQLite3
> database. The data looks like this:
>
> 'AAA','PF',-17.4167,-145.5,'Anaa, French Polynesia','
Sallu schrieb:
Hi all and one
i wrote this script, working fine without fail( just run it)
import re
value='This is Praveen'
print value
#value = 'riché gerry'
#words=str(value.split()).strip('[]').replace(', ', '') ( here i tried
to convert in to list and then back to string)
#print words
richr
On Jun 20, 9:38 am, Giuseppe Ottaviano <[EMAIL PROTECTED]> wrote:
> I found the namedtuple very convenient for rapid prototyping code, for
> functions that have to return a number of results that could grow as
> the code evolves. They are more elegant than dicts, and I don't have
> to create
hello
I have a problem with py2exe and QtWebKit :
I make a program with a QtWebKit view.
If I launch the .py directly, all images (jpg, png) are displayed but
if I compile it with py2exe I have only png images. No jpg !
No error message, nothing.
Have you a solution ? Thank you.
--
http://mail.py
jimgardener wrote:
i am looking for python code to convert a textfile(.txt) to an
image(preferrably Tiff).I believe it involves some scanning and
conversion using some font table and probably compression using
huffman encoding..is there an open source code doing this?can someone
give a pointer?
On Jun 19, 10:49 pm, Ulrich Eckhardt <[EMAIL PROTECTED]> wrote:
> Lie wrote:
> > I think it's not that hard to see that it's just a pseudo code
>
> "...in comms.py I have: ..." actually explicitly says that it is actual code
> from a file.
>
> *shrug*
>
> Uli
>
I'm not sure how you think saying 'i
On Jun 20, 1:52 am, Michael Ströder <[EMAIL PROTECTED]> wrote:
> Matt Nordhoff wrote:
> > Matt Nordhoff wrote:
> >> You could use data: URIs [1].
>
> >> For example, a 43-byte single pixel GIF becomes this URI:
>
> >>
>
> >> They don't have universal browser support, but that might not be a
> >> p
eliben a écrit :
On Jun 20, 9:17 am, Bruno Desthuilliers wrote:
eliben a écrit :> Hello,
In a Python program I'm writing I need to dynamically generate
functions[*]
(snip)
[*] I know that each time a code generation question comes up people
suggest that there's a better way to achieve this
Tkinter makes it very easy to drag jpeg images around on a
canvas, but I would like to have a "target" change color when
the cursor dragging an image passes over it. I seem to be
blocked by the fact that the callbacks that might tell the
target that the mouse has entered it (, ,
even ) aren't call
srinivasan srinivas wrote:
Hi,
My requirement is i have to execute a python script on a remote machine as a
subprocess from a python script and to get the subprocess pid of the process
running the script. Is there anyway to do that??
I have used subprocess.popen() method to do that. I have done
I am not certain why this is the case, but...
>>> a = 256
>>> b = 256
>>> a is b
True
>>> a = 257
>>> b = 257
>>> a is b
False
Can anyone explain this further? Why does it happen? 8-bit integer
differences?
--
http://mail.python.org/mailman/listinfo/python-list
[snip]
Provided you don't change the order of the items in the tuple, you can
just use slicing:
a, b = f()[ : 2]
Yes, this is what you would normally do with tuples. But i find this
syntax very implicit and awkward. Also, you cannot skip elements, so
you often end up with things like
a,
On Fri, 20 Jun 2008 08:04:57 -0700 (PDT), Carbonimax <[EMAIL PROTECTED]>
wrote:
> hello
>
> I have a problem with py2exe and QtWebKit :
> I make a program with a QtWebKit view.
> If I launch the .py directly, all images (jpg, png) are displayed but
> if I compile it with py2exe I have only png ima
On Fri, 20 Jun 2008 09:31:57 -0700 (PDT), [EMAIL PROTECTED] wrote:
I am not certain why this is the case, but...
a = 256
b = 256
a is b
True
a = 257
b = 257
a is b
False
Can anyone explain this further? Why does it happen? 8-bit integer
differences?
http://mail.python.org/pipermail/pytho
On Fri, Jun 20, 2008 at 1:11 PM, Peter Pearson <[EMAIL PROTECTED]> wrote:
> Tkinter makes it very easy to drag jpeg images around on a
> canvas, but I would like to have a "target" change color when
> the cursor dragging an image passes over it. I seem to be
> blocked by the fact that the callback
On Jun 20, 12:31 pm, [EMAIL PROTECTED] wrote:
> I am not certain why this is the case, but...
>
> >>> a = 256
> >>> b = 256
> >>> a is b
>
> True
>
> >>> a = 257
> >>> b = 257
> >>> a is b
>
> False
>
> Can anyone explain this further? Why does it happen? 8-bit integer
> differences?
No, implement
On Jun 20, 9:38 am, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote:
> On Fri, 20 Jun 2008 09:31:57 -0700 (PDT), [EMAIL PROTECTED] wrote:
> >I am not certain why this is the case, but...
>
> a = 256
> b = 256
> a is b
> >True
>
> a = 257
> b = 257
> a is b
> >False
>
> >
On Jun 20, 9:42 am, George Sakkis <[EMAIL PROTECTED]> wrote:
> On Jun 20, 12:31 pm, [EMAIL PROTECTED] wrote:
>
>
>
> > I am not certain why this is the case, but...
>
> > >>> a = 256
> > >>> b = 256
> > >>> a is b
>
> > True
>
> > >>> a = 257
> > >>> b = 257
> > >>> a is b
>
> > False
>
> > Can any
Aahz wrote:
In article <[EMAIL PROTECTED]>,
Simon Forman <[EMAIL PROTECTED]> wrote:
FWIW, I got around to implementing a function that checks if a string
is safe to evaluate (that it consists only of numbers, operators, and
"(" and ")"). Here it is. :)
What's safe about "1000 ** 1000
On Fri, Jun 20, 2008 at 3:17 AM, Bruno Desthuilliers
<[EMAIL PROTECTED]> wrote:
Just to make things clear: you do know that you can dynamically build
> functions without exec, do you ?
Actually, I don't know how to do this, but would like to. Can you point me
to a place where I can read more a
On Jun 20, 12:45 pm, [EMAIL PROTECTED] wrote:
> On Jun 20, 9:42 am, George Sakkis <[EMAIL PROTECTED]> wrote:
>
>
>
> > On Jun 20, 12:31 pm, [EMAIL PROTECTED] wrote:
>
> > > I am not certain why this is the case, but...
>
> > > >>> a = 256
> > > >>> b = 256
> > > >>> a is b
>
> > > True
>
> > > >>>
On Fri, 20 Jun 2008 10:07:56 -0700 (PDT), George Sakkis <[EMAIL PROTECTED]>
wrote:
On Jun 20, 12:45 pm, [EMAIL PROTECTED] wrote:
On Jun 20, 9:42 am, George Sakkis <[EMAIL PROTECTED]> wrote:
> On Jun 20, 12:31 pm, [EMAIL PROTECTED] wrote:
> > I am not certain why this is the case, but...
>
I need help to parse html file into Microsoft Access database table.
Right now I could parse it in a csv file but the way it is parsing is
not that I want and I could not import the list into access table as the
information is parsing one after another and it is not a row column
format.
Any
On Jun 19, 11:09 pm, Brendon Costa <[EMAIL PROTECTED]> wrote:
> > If only the main thread can receive KeyboardInterrupt, is there any
> > reason why you couldn't move the functionality of the Read thread into
> > the main thread? It looks like it's not doing any work, just waiting
> > for the Proc
This is ok.
Is there any other way to find it out?
Thanks,
Srini
- Original Message
From: Gerhard Häring <[EMAIL PROTECTED]>
To: python-list@python.org
Sent: Friday, 20 June, 2008 10:03:30 PM
Subject: Re: Execute a script on a remote machine
srinivasan srinivas wrote:
> Hi,
> My require
I'm on Windows with VS2005 testing ctypes on a very simple dll
I create a test.dll project which exports a function fntest(). I don't
touch anything in the autogenerated source and build it. I can load
the dll but can't access the function by its name fntest. Only by
ordinal number or calling getat
On Jun 20, 9:11 am, Peter Pearson <[EMAIL PROTECTED]> wrote:
> Tkinter makes it very easy to drag jpeg images around on a
> canvas, but I would like to have a "target" change color when
> the cursor dragging an image passes over it. I seem to be
> blocked by the fact that the callbacks that might
On Jun 20, 1:37 pm, kj <[EMAIL PROTECTED]> wrote:
> Hi. Does anyone know of a module that will take a suitable Python
> dictionary and return the corresponding XML structure?
>
> In Perl I use XML::Simple's handy XMLout function:
>
> use XML::Simple 'XMLout';
> my %h = ( 'Foo' => +{
>
In article
<[EMAIL PROTECTED]>,
Lie <[EMAIL PROTECTED]> wrote:
> On Jun 19, 7:21 pm, Ulrich Eckhardt <[EMAIL PROTECTED]> wrote:
> > John Dann wrote:
> > > Let's say I define the class in a module called comms.py. The class
> > > isn't really going to inherit from any other class (except presumab
[EMAIL PROTECTED] wrote:
On Jun 20, 9:38 am, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote:
On Fri, 20 Jun 2008 09:31:57 -0700 (PDT), [EMAIL PROTECTED] wrote:
I am not certain why this is the case, but...
a = 256
b = 256
a is b
True
a = 257
b = 257
a is b
> FWIW, when I had a similar challenge for dynamic coding, I just
> generated a py file and then imported it. This technique was nice
> because can also work with Pyrex or Psyco.
>
I guess this is not much different than using exec, at the conceptual
level. exec is perhaps more suitable when you
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
srinivasan srinivas wrote:
> Is there any other way rather than communicating back to the caller?
No, the remote PID isn't magically transferred via RSH. The remote
script must communicate the PID back.
Just writing it remotely as first line and on t
> [1] except using compile to build a code object with the function's
> body, then instanciate a function object using this code, but I'm not
> sure whether it will buy you much more performance-wise. I'd personnaly
> prefer this because I find it more explicit and readable, but YMMV.
>
How is com
On Jun 20, 3:19 pm, George Sakkis <[EMAIL PROTECTED]> wrote:
> On Jun 20, 8:03 am, eliben <[EMAIL PROTECTED]> wrote:
>
>
>
> > On Jun 20, 9:17 am, Bruno Desthuilliers
> > [EMAIL PROTECTED]> wrote:
> > > eliben a écrit :> Hello,
>
> > > > In a Python program I'm writing I need to dynamically genera
On Jun 19, 11:26 pm, Dan Bishop <[EMAIL PROTECTED]> wrote:
> On Jun 19, 9:24 pm, Carl Banks <[EMAIL PROTECTED]> wrote:
>
>
>
> > On Jun 19, 10:17 pm, Terry Reedy <[EMAIL PROTECTED]> wrote:
>
> > > Carl Banks wrote:
> > > > Tuples will have an index method in Python 2.6.
>
> > > > I promise I won't
On Jun 17, 10:54 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> > Do you know if there is such XPath engine that can be applied to a DOM-
> > like structure ?
>
> No. But I toyed with the idea to write one :)
>
> > One way would be to take an XPath engine from an existing XML engine
> > (Eleme
I'm using xml.dom.pulldom to parse through an XML file. I use
expandNode() to scrutinize certain blocks of it that I'm interested
in.
Once I find a block of XML in the input file that I'm interested in, I
need to add my own block . to the pulldom tree I'm
building in memory.
The documentati
docs on urllib module say this about the FancyUrlOpener:
"class FancyURLopener( ...)
FancyURLopener subclasses URLopener providing default handling
for ..."
does that mean the FancyURLopener is a subclass of URLopener?
--
http://mail.python.org/mailman/listinfo/python-list
On 20 juin, 22:34, davidj411 <[EMAIL PROTECTED]> wrote:
> docs on urllib module say this about the FancyUrlOpener:
> "class FancyURLopener( ...)
>
> FancyURLopener subclasses URLopener providing default handling
> for ..."
>
> does that mean the FancyURLopener is a subclass of URLopener?
You could
On Jun 20, 3:44 pm, eliben <[EMAIL PROTECTED]> wrote:
> On Jun 20, 3:19 pm, George Sakkis <[EMAIL PROTECTED]> wrote:
>
>
>
> > On Jun 20, 8:03 am, eliben <[EMAIL PROTECTED]> wrote:
>
> > > On Jun 20, 9:17 am, Bruno Desthuilliers
> > > [EMAIL PROTECTED]> wrote:
> > > > eliben a écrit :> Hello,
>
>
On 20 juin, 21:41, eliben <[EMAIL PROTECTED]> wrote:
> > [1] except using compile to build a code object with the function's
> > body, then instanciate a function object using this code, but I'm not
> > sure whether it will buy you much more performance-wise. I'd personnaly
> > prefer this because
On Jun 20, 11:10 am, Matimus <[EMAIL PROTECTED]> wrote:
> On Jun 20, 9:11 am, Peter Pearson <[EMAIL PROTECTED]> wrote:
>
> > Tkinter makes it very easy to drag jpeg images around on a
> > canvas, but I would like to have a "target" change color when
> > the cursor dragging an image passes over it.
A new open source project has been started by Linden Lab, makers of the
Second Life™ virtual worlds, and the Second Life Architecture Working
Group (AWG) to test LL's proposed virtual worlds Open Grid Protocols
(OGP) that will allow any virtual world to support multi-world login,
between-world
On 20 juin, 21:44, eliben <[EMAIL PROTECTED]> wrote:
> On Jun 20, 3:19 pm, George Sakkis <[EMAIL PROTECTED]> wrote:
>
(snip)
> > It's still not clear why the generic version is so slower, unless you
> > extract only a few selected fields, not all of them. Can you post a
> > sample of how you used
I have this class:
class Vector(object):
TOL = 1e-5
def __eq__( self, other, tolerance=TOL ):
print tolerance
shortened for clarity obviously. so I want to subclass this class like
so:
class BigVector(Vector)
TOL = 100
for example if I was working with large vector
On Fri, Jun 20, 2008 at 6:19 PM, Hamish McKenzie
<[EMAIL PROTECTED]> wrote:
>
> I have this class:
>
> class Vector(object):
> TOL = 1e-5
> def __eq__( self, other, tolerance=TOL ):
> print tolerance
>
>
> shortened for clarity obviously. so I want to subclass this class like
> s
On Friday 20 June 2008 17:24, Phil Thompson wrote:
> On Fri, 20 Jun 2008 08:04:57 -0700 (PDT), Carbonimax
> <[EMAIL PROTECTED]> wrote:
>> I have a problem with py2exe and QtWebKit :
>> I make a program with a QtWebKit view.
>> If I launch the .py directly, all images (jpg, png) are displayed but
On 20 Jun, 22:17, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> I'm using xml.dom.pulldom to parse through an XML file. I use
> expandNode() to scrutinize certain blocks of it that I'm interested
> in.
Right. This is the thing which differentiates pulldom from traditional
DOM implementations, w
I'm doing a lot of regular expressions these days. Sometimes when I'm
crafting them I mess up, and make them too complicated. So that when
my program runs, they take forever. (Maybe not literally forever---I
abort the program after a few seconds.)
What I'd like to have happen is every time I se
Hi,
optparse doesn't seem to have a pass-through capability for command line
parameters/options that were not registered with add_option.
I'm not the first person to complain about this. On Wed Mar 17 08:20:10 CET
2004, there's a thread titled "Perceived optparse shortcomings" where someone
Jeff Keasler wrote:
Hi,
optparse doesn't seem to have a pass-through capability for command line
parameters/options that were not registered with add_option.
I'm not the first person to complain about this. On Wed Mar 17 08:20:10
CET 2004, there's a thread titled "Perceived optparse shortc
would like to call for papers, articles, opinion pieces and feedback
to include in Volume 3, Issue 2 of The Python Papers. We would love to
receive articles on Python for beginners and discussions about Python
performance. Any article will be gratefully received, of course, so do
not let the above
Hey,
can someone please explain this behavior:
The code:
def test1(value=1):
def inner():
print value
inner()
def test2(value=2):
def inner():
value = value
inner()
test1()
test2()
[EMAIL PROTECTED] ~/dev/tests]$ python locals.py
1
Traceback (most recent call
i know how to programmatically create python functions:
module = __import__( '__main__')
def factory( val ):
def f( arg=val ): print arg, val
f.__name__ = 'function%s' % x
return f
for x in [1,2,3,4]:
func = factory( x )
setattr( module, func.__name__, fu
On Jun 20, 4:34 pm, davidj411 <[EMAIL PROTECTED]> wrote:
> docs on urllib module say this about the FancyUrlOpener:
> "class FancyURLopener( ...)
>
> FancyURLopener subclasses URLopener providing default handling
> for ..."
>
> does that mean the FancyURLopener is a subclass of URLopener?
Yes. An
Sebastjan Trepca wrote:
> Hey,
>
> can someone please explain this behavior:
>
> The code:
>
> def test1(value=1):
> def inner():
> print value
> inner()
>
>
> def test2(value=2):
> def inner():
> value = value
> inner()
>
> test1()
> test2()
>
> [EMAIL PROTEC
On Jun 20, 6:37 am, kj <[EMAIL PROTECTED]> wrote:
> Hi. Does anyone know of a module that will take a suitable Python
> dictionary and return the corresponding XML structure?
>
> In Perl I use XML::Simple's handy XMLout function:
>
> use XML::Simple 'XMLout';
> my %h = ( 'Foo' => +{
>
1 - 100 of 106 matches
Mail list logo