Hello,
I'm a little confused about None in comparison.
>>> id ( None )
3086100672L
>>> id ( 1 )
134541104
>>> None < 1
True
>>>
I thought, the id of the object is the last comparison criterion.
Therefore, None must be greater then 1.
Where is the behaviour of the comparison defined?. In the __cmp
On 17 Jul., 22:21, Lars Gustäbel <[EMAIL PROTECTED]> wrote:
>
> > Maybe we should post this issue to python-dev mailing list.
> > Parsing large tar-files is not uncommon.
>
> This issue is known and was fixed for Python 3.0,
> seehttp://bugs.python.org/issue2058.
The proposed patch does not avoid
On Jul 18, 4:26 pm, castironpi <[EMAIL PROTECTED]> wrote:
> I delicately ask for an example in natural language and daily life in
> which we change what object a name refers to,
her, him, it, ... i.e. any pronoun
--
http://mail.python.org/mailman/listinfo/python-list
On Jul 17, 11:39 pm, Kay Schluehr <[EMAIL PROTECTED]> wrote:
> On 18 Jul., 01:15, castironpi <[EMAIL PROTECTED]> wrote:
>
>
>
> > On Jul 17, 5:37 pm, I V <[EMAIL PROTECTED]> wrote:
>
> > > On Thu, 17 Jul 2008 15:08:17 -0700, castironpi wrote:
> > > > The Python disassembly is baffling though.
>
> >
On Jul 17, 7:36 pm, bgeddy <[EMAIL PROTECTED]> wrote:
> bgeddy wrote:
> > castironpi wrote:
> >> On Jul 17, 10:05 am, mk <[EMAIL PROTECTED]> wrote:
> def f2(arg):
> return "f2 "+arg
> def f1(arg):
> return "f1 "+arg
> a={"1":"f1","2":"f2"}
> print [eval(x[1])(x
Steven Howe <[EMAIL PROTECTED]> wrote:
>Terry Reedy wrote:
>>
>> korean_dave wrote:
>>> What does this operator do? Specifically in this context
>>>
>>> test.log( "[[Log level %d: %s]]" % ( level, msg ), description )
>
>I thought, in this contexted, it was mapping operator.
What??
Python does
zhw <[EMAIL PROTECTED]> wrote:
>Ben Finney <[EMAIL PROTECTED]> >wrote:
>>
>> What problem are you trying to solve?
>
>I an sorry, I can't tell you.
That's nonsense. No one is asking you to reveal the design of your
company's next product. However, you have some overall problem you are
trying to
In message
<[EMAIL PROTECTED]>, Craig
Allen wrote:
> On Jul 16, 7:01 pm, Lawrence D'Oliveiro <[EMAIL PROTECTED]
> central.gen.new_zealand> wrote:
>>
>> >>> class TehLibrary(object) :
>>
>> ... @classmethod
>> ... def __new__(self, cls) :
>> ... return self
>>
>> >>> s = TehLibrary(
In message <[EMAIL PROTECTED]>, Gabriel
Genellina wrote:
> Note that I used %s everywhere (it's just a placeholder, not a format) ...
>From /usr/lib64/python2.5/site-packages/MySQLdb/cursors.py, lines 150-151:
if args is not None:
query = query % db.literal(args)
--
http://mail.pytho
paypal wholesale men jordans (paypal accept)(www goodsaler com
paypal wholesale men jordans 1 (paypal accept)(www goodsaler com
paypal wholesale men jordans 2 (paypal accept)(www goodsaler com
paypal wholesale men jordans 3 (paypal accept)(www goodsaler com
paypal wholesale men jordans 4 (pa
wholesale p u m a sneaker(paypal accept)(www goodsaler
com)paypal
wholesale p u m a sneaker(paypal accept)(www goodsaler
com)paypal
wholesale p u m a sneaker(paypal accept)(www goodsaler
com)paypal
wholesale p u m a sneaker(paypal accept)(www goodsaler
com)paypal
wholesale p u m a sneaker(paypal ac
wholesale n i k e sneaker(paypal accept)(www all-wholesaler
com)paypal
wholesale n i k e sneaker(paypal accept)(www all-wholesaler
com)paypal
wholesale n i k e sneaker(paypal accept)(www all-wholesaler
com)paypal
wholesale n i k e sneaker(paypal accept)(www all-wholesaler
com)paypal
wholesale n i k
Cyril Bazin wrote:
Thanks for your reply
The apache log contains lines like :
[Tue Jul 15 23:31:01 2008] [notice] mod_python (pid=11836,
interpreter='www.toto.fr'): Importing module
'/usr/local/apache2/htdocs/intranet/courrier/test.py'
[Tue Jul 15 23:31:02 2008] [notice] child pid 11836 exit si
On 18 Jul., 01:15, castironpi <[EMAIL PROTECTED]> wrote:
> On Jul 17, 5:37 pm, I V <[EMAIL PROTECTED]> wrote:
>
>
>
> > On Thu, 17 Jul 2008 15:08:17 -0700, castironpi wrote:
> > > The Python disassembly is baffling though.
>
> > y= 3
> > dis.dis('x=y+1')
>
> > You can't disassemble string
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On behalf of the Python development team and the Python community, I
am happy to announce the second beta releases of Python 2.6 and Python
3.0.
Please note that these are beta releases, and as such are not suitable
for production environments
On Jul 18, 10:36 am, bgeddy <[EMAIL PROTECTED]> wrote:
[snip]
> the OP's post revolved around having a rewritable
> set of "labels" - which could be recorded at one time and when re
> referenced the new definitions of those labels would be used. For
> example a "collection" (list,dictionary,tuple)
castironpi wrote:
On Jul 17, 5:37 pm, I V <[EMAIL PROTECTED]> wrote:
Oh. How is the stack represented?
As usual, as successive locations in memory.
I have the impression that CPython uses the same stack C does.
While conceptually, CPython may put objects on the stack, I am pretty
sure it
bgeddy wrote:
castironpi wrote:
On Jul 17, 10:05 am, mk <[EMAIL PROTECTED]> wrote:
def f2(arg):
return "f2 "+arg
def f1(arg):
return "f1 "+arg
a={"1":"f1","2":"f2"}
print [eval(x[1])(x[0]) for x in a.items()]
def f2(arg):
return "New f2 "+arg
print [eval(x[1])(x[0]) for x in a.items
castironpi wrote:
On Jul 17, 10:05 am, mk <[EMAIL PROTECTED]> wrote:
def f2(arg):
return "f2 "+arg
def f1(arg):
return "f1 "+arg
a={"1":"f1","2":"f2"}
print [eval(x[1])(x[0]) for x in a.items()]
def f2(arg):
return "New f2 "+arg
print [eval(x[1])(x[0]) for x in a.items()]
Neat trick
En Thu, 17 Jul 2008 09:40:29 -0300, <[EMAIL PROTECTED]> escribi�:
The way you read the file is rather strange -mixing calls to readline and
pickle.load- I'd write the data using pickle.dump calls *only* and then
read it using pickle.load calls *only*.
I used 13.1.7 Example of the Python Library
On Jul 18, 8:01 am, DaveM <[EMAIL PROTECTED]> wrote:
> On Thu, 17 Jul 2008 17:32:30 -0400, Terry Reedy <[EMAIL PROTECTED]> wrote:
> > >>> *x, = [3]
> > >>> x
> >[3]
>
> What does *x signify?
Mostly that Terry is using Python 3.0.
See: http://www.python.org/dev/peps/pep-3132/
--
http://mail.pytho
En Wed, 16 Jul 2008 15:00:50 -0300, Keith Hughitt
<[EMAIL PROTECTED]> escribi�:
Thanks Gabriel!
That helps clear things up for me. The above method works very well. I
only have one remaining question:
How can I pass a datetime object to MySQL?'
So far, what I've been doing is building the qu
On Jul 17, 5:37 pm, I V <[EMAIL PROTECTED]> wrote:
> On Thu, 17 Jul 2008 15:08:17 -0700, castironpi wrote:
> > The Python disassembly is baffling though.
>
> y= 3
> dis.dis('x=y+1')
>
> You can't disassemble strings of python source (well, you can, but, as
> you've seen, the results are n
I have two versions of a script on my machine. One version is for new
development and the other version is a production version. This script
imports a module from a different directory, and this module again has two
versions (a development version and a production version). What I want is
for the
On Thu, 17 Jul 2008 15:08:17 -0700, castironpi wrote:
> The Python disassembly is baffling though.
>
y= 3
dis.dis('x=y+1')
You can't disassemble strings of python source (well, you can, but, as
you've seen, the results are not meaningful). You need to compile the
source first:
>>> co
On Jul 17, 2:15 am, Uwe Schmitt <[EMAIL PROTECTED]>
wrote:
> On 17 Jul., 00:20, Craig Allen <[EMAIL PROTECTED]> wrote:
>
>
>
> > I have several classes in our system which need to act like
> > singletons, they are libraries of data classifications, and other such
> > libraries of configurations for
On Jul 17, 3:42 pm, Terry Reedy <[EMAIL PROTECTED]> wrote:
> korean_dave wrote:
> > What does this operator do? Specifically in this context
>
> > test.log( "[[Log level %d: %s]]" % ( level, msg ), description )
>
> > (Tried googling and searching, but the "%" gets interpreted as an
> > operation a
On Thu, Jul 17, 2008 at 6:48 PM, C Martin <[EMAIL PROTECTED]> wrote:
> How do you setup a Tcl extension to be accessible through Python? I
> understand that I'll have to use native Tcl calls to use it (tk.call()
> etc), but I can't figure out where to put the files or how to
> initialize them so I
I'm curious about some of the details of the internals of the Python
interpreter:
I understand C from a hardware perspective.
x= y+ 1;
Move value from place y into a register
Add 1 to the value in the register
Move the addition's result to place x
The Python disassembly is baffling though.
>>>
On Thu, 17 Jul 2008 17:32:30 -0400, Terry Reedy <[EMAIL PROTECTED]> wrote:
> >>> *x, = [3]
> >>> x
>[3]
What does *x signify?
DaveM
--
http://mail.python.org/mailman/listinfo/python-list
On 2008-07-17 22:43, Dennis Lee Bieber wrote:
On Thu, 17 Jul 2008 19:55:44 +0200, "M.-A. Lemburg" <[EMAIL PROTECTED]>
declaimed the following in comp.lang.python:
Use binding parameters and it should work:
query = "INSERT INTO image VALUES(%d, %d, %s, '%s')"
If this is MySQLdb inter
thanks Stefan,
both lxml and threading works perfect.
One small problem, "with_tail" was not recognized as a valid keyword.
cheers,
Stef
Stefan Behnel wrote:
Stef Mientki gmail.com> writes:
Although it works functionally,
it can take lots of time waiting for the translation.
What I basic
How do you setup a Tcl extension to be accessible through Python? I
understand that I'll have to use native Tcl calls to use it (tk.call()
etc), but I can't figure out where to put the files or how to
initialize them so I can call them.
The package I would like to use is TkPNG:
http://www.muonics
kj wrote:
I just came across an assignment of the form
x, = y
where y is a string (in case it matters).
1. What's the meaning of the comma in the LHS of the assignment?
2. How could I have found this out on my own?
1.Experiment with the interactive interpreter. It is sooo easy.
>>> x
McA wrote:
Do you know the "protocol" used by python while unpacking?
Is it a direct assingnment? Or iterating?
In CPython, at least, both, just as with normal unpack and multiple
assignment. The iterable is unpacked into pieces by iterating (with
knowledge of the number of targets and wh
On Thu, Jul 17, 2008 at 10:39:23AM -0700, Uwe Schmitt wrote:
> On 17 Jul., 17:55, Terry Carroll <[EMAIL PROTECTED]> wrote:
> > On Thu, 17 Jul 2008 06:14:45 -0700 (PDT), Uwe Schmitt
> >
> > <[EMAIL PROTECTED]> wrote:
> > >I had a look at tarfile.py in my current Python 2.5 installations
> > >lib pat
kj <[EMAIL PROTECTED]> wrote:
> I still don't get it. If we write
>
> y = 'Y'
> x, = y
>
> what's the difference now between x and y? And if there's no
> difference, what's the point of performing such "unpacking"?
None whatsoever when the string has only one character, but with 2
char
[EMAIL PROTECTED] wrote:
> I wish to decorate all of the CX.func() in the same way. One way to
> do this is to add a decorator to each of the derived classes. But
> this is tedious and involves modifying multiple files.
>
> Is there a way to modify the parent class and have the same effect?
> O
kj wrote:
> I still don't get it. If we write
>
> y = 'Y'
> x, = y
>
> what's the difference now between x and y? And if there's no
> difference, what's the point of performing such "unpacking"?
If y really is is a string, I think it's likely that the line you came
across was a typo.
In the
Hey all, I'm simply trying to get my feet wet with XML parsing, and I
tried to just do something simple with ElementTree, just throw the XML
tags from a file into a list. The code is as follows (and may be
wrong):
import glob
import xml.etree.ElementTree as ET
tree = ET.parse('nameofFileh
Terry Reedy wrote:
korean_dave wrote:
What does this operator do? Specifically in this context
test.log( "[[Log level %d: %s]]" % ( level, msg ), description )
(Tried googling and searching, but the "%" gets interpreted as an
operation and distorts the search results)
Having seen a number
On Jul 17, 12:55 pm, kj <[EMAIL PROTECTED]> wrote:
> what's the point of performing such "unpacking"?
record = [name, address, telephone]
...
name, address, telephone = record
--
http://mail.python.org/mailman/listinfo/python-list
On Jul 17, 12:55 pm, kj <[EMAIL PROTECTED]> wrote:
> I still don't get it. If we write
>
> y = 'Y'
> x, = y
>
> what's the difference now between x and y? And if there's no
> difference, what's the point of performing such "unpacking"?
>
Try:
y = "abc"
x, = y
You were unpacking y into
On Thu, Jul 17, 2008 at 2:55 PM, kj <[EMAIL PROTECTED]> wrote:
> In <[EMAIL PROTECTED]> Erik Max Francis <[EMAIL PROTECTED]> writes:
>
>>kj wrote:
>
>>> I just came across an assignment of the form
>>>
>>> x, = y
>>>
>>> where y is a string (in case it matters).
>>>
>>> 1. What's the meaning of t
Say, we have a (parent) class P.
It has N child classes C1(P), C2(P) ... CN(P)
Each of the child classes defines (differently) a method func().
I wish to decorate all of the CX.func() in the same way. One way to
do this is to add a decorator to each of the derived classes. But
this is tedious
In <[EMAIL PROTECTED]> Erik Max Francis <[EMAIL PROTECTED]> writes:
>kj wrote:
>> I just came across an assignment of the form
>>
>> x, = y
>>
>> where y is a string (in case it matters).
>>
>> 1. What's the meaning of the comma in the LHS of the assignment?
>It's unpacking a 1-tuple:
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:python-
> [EMAIL PROTECTED] On Behalf Of Ratko
> Sent: Thursday, July 17, 2008 12:27 PM
> To: python-list@python.org
> Subject: properly delete item during "for item in..."
>
> Say you have something like this:
>
> for item in myLis
korean_dave wrote:
What does this operator do? Specifically in this context
test.log( "[[Log level %d: %s]]" % ( level, msg ), description )
(Tried googling and searching, but the "%" gets interpreted as an
operation and distorts the search results)
Having seen a number of comments like thi
> > For dictionaries we can just iterate over values() or items() as
> > opposed to itervalues() or iteritems() since that's technically a copy
> > of values or items in the dict, right?
>
> No! In fact the whole point of iteritems and itervalues and iterkeys is
> that they *DO NOT* make copies, s
On Jul 17, 10:05 am, mk <[EMAIL PROTECTED]> wrote:
> > def f2(arg):
> > return "f2 "+arg
>
> > def f1(arg):
> > return "f1 "+arg
>
> > a={"1":"f1","2":"f2"}
> > print [eval(x[1])(x[0]) for x in a.items()]
> > def f2(arg):
> > return "New f2 "+arg
> > print [eval(x[1])(x[0]) for x in a.i
kj wrote:
I just came across an assignment of the form
x, = y
where y is a string (in case it matters).
1. What's the meaning of the comma in the LHS of the assignment?
2. How could I have found this out on my own?
(Regarding (2) above, I consulted the index of several Python
reference boo
paypal wholesale air bape sneaker(paypal accept)(www all-wholesaler
com)paypal
wholesale air bape sneaker(paypal accept)(www all-wholesaler
com)paypal
wholesale air bape sneaker(paypal accept)(www all-wholesaler
com)paypal
wholesale air bape sneaker(paypal accept)(www all-wholesaler
com)paypal
whol
paypal wholesale adidas sneaker(paypal accept)(www all-wholesaler
com)paypal
wholesale adidas sneaker(paypal accept)(www all-wholesaler com)paypal
wholesale adidas sneaker(paypal accept)(www all-wholesaler com)paypal
wholesale adidas sneaker(paypal accept)(www all-wholesaler com)paypal
wholesale ad
paypal wholesale n i k e sneaker(paypal accept)(www all-wholesaler
com)paypal
wholesale n i k e sneaker(paypal accept)(www all-wholesaler
com)paypal
wholesale n i k e sneaker(paypal accept)(www all-wholesaler
com)paypal
wholesale n i k e sneaker(paypal accept)(www all-wholesaler
com)paypal
wholesal
I just came across an assignment of the form
x, = y
where y is a string (in case it matters).
1. What's the meaning of the comma in the LHS of the assignment?
2. How could I have found this out on my own?
(Regarding (2) above, I consulted the index of several Python
reference books but I c
J-Burns wrote:
Hello. Need some help here. I have a 4*4 cube. So the equation of the
cube becoming:
x + 4*y + 16*z
Now i want to rotate this cube 90 degrees anticlockwise( a right
rotation). How can i do that? The rotation must take place with the
a
Have you taken the time to solve the problem for the 2D case?
I can't say my code is correct or even good python, but this was my
attempt at the 2D case, maybe it will give you some ideas.
http://code.google.com/p/rs-wxpython-nooberdev/source/browse/rectangle.py
For the rest of c.l.p, criticism
Fair enough.
All details of the project will be disclosed so a proper bid can be
put in place. I just need an experienced Python Programmer and I'll
put you in direct contact with the client and I won't even take a
referral fee. I just want the project completed.
Thanks again,
Rob
On Jul 16, 6:0
Ratko wrote:
On Jul 17, 9:57 am, mk <[EMAIL PROTECTED]> wrote:
Gary Herron wrote:
You could remove the object from the list with
del myList[i]
if you knew i. HOWEVER, don't do that while looping through the list!
Changing a list's length will interact badly with the for loop's
indexin
McA wrote:
On 17 Jul., 18:33, Gary Herron <[EMAIL PROTECTED]> wrote:
In Python 2.x, you can't do that directly, but you should be able to
create a function that lengthens or shortens an input tuple of arguments
to the correct length so you can do:
a,c,b = fix(1,2)
d,e,f = fix(1,2,3,4)
H
On 2008-07-16 20:00, Keith Hughitt wrote:
Thanks Gabriel!
That helps clear things up for me. The above method works very well. I
only have one remaining question:
How can I pass a datetime object to MySQL?'
So far, what I've been doing is building the query as a string, for
example:
query = "I
>> That's seriously weird. What's your Python version and platform? On my
>> Windows and Linux machines, with more recent Python versions the above
>> trick works flawlessly.
>>
>> Check your environment, namely PYTHON* variables. There may be
>> something causing this behaviour. Unset them.
>>
On 17 Jul., 17:55, Terry Carroll <[EMAIL PROTECTED]> wrote:
> On Thu, 17 Jul 2008 06:14:45 -0700 (PDT), Uwe Schmitt
>
> <[EMAIL PROTECTED]> wrote:
> >I had a look at tarfile.py in my current Python 2.5 installations
> >lib path. The iterator caches TarInfo objects in a list
> >tf.members . If you o
On Jul 17, 8:27 am, Jeff <[EMAIL PROTECTED]> wrote:
> Thanks, that made things very clear. I like that technique for adding
> memoization via the parameter. That is clever. It would be nice if
> there were a way to have multiple functions close over a shared local
> variable in Python, like let-
I don't understand what you're trying to do here.
On Thu, Jul 17, 2008 at 10:57 AM, mk <[EMAIL PROTECTED]> wrote:
>
> It seems like getter is defined in such way that it passes only 'self':
>
>
> class FunDict(dict):
>def __init__(self):
>self.fundict = dict()
>
>d
On 17 Jul., 18:33, Gary Herron <[EMAIL PROTECTED]> wrote:
>
> In Python 2.x, you can't do that directly, but you should be able to
> create a function that lengthens or shortens an input tuple of arguments
> to the correct length so you can do:
>
> a,c,b = fix(1,2)
> d,e,f = fix(1,2,3,4)
>
> Ho
mk <[EMAIL PROTECTED]> wrote:
> Iterating over a copy may _probably_ work:
>
> >>> t=['a', 'c', 'b', 'd']
> >>>
> >>> for el in t[:]:
> del t[t.index(el)]
>
>
> >>> t
> []
>
>
> However, is it really safe? Defining safe as "works reliably in every
> corner case for every indexable
> That's seriously weird. What's your Python version and platform? On my
> Windows and Linux machines, with more recent Python versions the above
> trick works flawlessly.
>
> Check your environment, namely PYTHON* variables. There may be something
> causing this behaviour. Unset them.
>
> Check
http://linux.byexamples.com/archives/365/python-convey-the-exception-traceba
ck-into-log-file/
if __name__=="__main__":
try:
main()
except:
print "Trigger Exception, traceback info forward to log file."
traceback.print_exc(file=open("errlog.txt","a"))
On Jul 17, 9:57 am, mk <[EMAIL PROTECTED]> wrote:
> Gary Herron wrote:
> > You could remove the object from the list with
> > del myList[i]
> > if you knew i. HOWEVER, don't do that while looping through the list!
> > Changing a list's length will interact badly with the for loop's
> > indexing t
Gary Herron wrote:
You could remove the object from the list with
del myList[i]
if you knew i. HOWEVER, don't do that while looping through the list!
Changing a list's length will interact badly with the for loop's
indexing through the list, causing the loop to mis the element following
the
Hi MK,
>>Robert Rawlins wrote:
>>
>> I certainly like that implementation for logging the exceptions, however,
at
>> the moment I don't even know where the exceptions are occurring, or what
>> type they are, could I still use this method to log any and all
exceptions
>> raised in the application?
Ratko wrote:
Say you have something like this:
for item in myList:
del item
Would this actually delete the item from the list or just decrement
the reference counter because the item in myList is not associated
with name "item" anymore (but still is with myList[itemIndex])? In
other words, i
On Thu, 17 Jul 2008 09:27:27 -0700, Ratko wrote:
> for item in myList:
>del item
>
> Would this actually delete the item from the list or just decrement
> the reference counter because the item in myList is not associated
> with name "item" anymore (but still is with myList[itemIndex])? In
>
Err, the line above should be:
proxy_handler = urllib2.ProxyHandler( { "http": "http://
myusername:[EMAIL PROTECTED]:3128" } )
(Sorry! :)
--
http://mail.python.org/mailman/listinfo/python-list
McA wrote:
Hi all,
probably a dumb question, but I didn't find something elegant for my
problem so far.
In perl you can unpack the element of a list to variables similar as
in python
(a, b, c = [0, 1, 2]), but the number of variables need not to fit the
number
of list elements.
That means, if yo
Say you have something like this:
for item in myList:
del item
Would this actually delete the item from the list or just decrement
the reference counter because the item in myList is not associated
with name "item" anymore (but still is with myList[itemIndex])? In
other words, is "item" a temp
Robert Rawlins wrote:
I certainly like that implementation for logging the exceptions, however, at
the moment I don't even know where the exceptions are occurring, or what
type they are, could I still use this method to log any and all exceptions
raised in the application?
Sure.
I'm a little
Greetings, Pythonistas!
My employer has a Squid Proxy between my Python programs and The
Internet.
I've searched high-and-low, and can only find examples online of how
to do basic authentication to connect TO an external Web Server, but
not how to go THROUGH a (corporate) Proxy, thus my question
Hi all,
probably a dumb question, but I didn't find something elegant for my
problem so far.
In perl you can unpack the element of a list to variables similar as
in python
(a, b, c = [0, 1, 2]), but the number of variables need not to fit the
number
of list elements.
That means, if you have less l
Hi Mk,
> Why not capture exceptions themselves to a log file?
>
> http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/466332
Thanks for the reply mate, I appreciate you getting back to me so quickly.
I certainly like that implementation for logging the exceptions, however, at
the moment I do
On Thu, 17 Jul 2008 06:14:45 -0700 (PDT), Uwe Schmitt
<[EMAIL PROTECTED]> wrote:
>I had a look at tarfile.py in my current Python 2.5 installations
>lib path. The iterator caches TarInfo objects in a list
>tf.members . If you only want to iterate and you are not interested
>in more functionallity
I have looked through the application for any unusual or bare try/except
blocks that don’t actually do anything with the except just in case any
of them are causing the issue but can’t seem to see any.
Why not capture exceptions themselves to a log file?
http://aspn.activestate.com/ASPN/Cookbo
Hello Chaps,
I have an unusual situation with my application which I've also seen once or
twice in the past but never found a solution too. Basically the application
stops properly reporting Exceptions when they are thrown.
My application logs extensively to a file using the python logging
Evren Esat Ozkan <[EMAIL PROTECTED]> writes:
> I'm trying to encrypt a string with RSA. But it needs to be compitable
> with Dave's JavaScript RSA implementation*.
What exactly are you trying to do? That Javascript implementation
looks like bad news. If you're trying to secure a web page, use S
def f2(arg):
return "f2 "+arg
def f1(arg):
return "f1 "+arg
a={"1":"f1","2":"f2"}
print [eval(x[1])(x[0]) for x in a.items()]
def f2(arg):
return "New f2 "+arg
print [eval(x[1])(x[0]) for x in a.items()]
Neat trick, if probably dangerous in some circumstances. Anyway, thanks,
I
Chris wrote:
> Can anyone recommend a good HTML/XHTML parser, similar to
> HTMLParser.HTMLParser or htmllib.HTMLParser, but able to intelligently
> know that certain tags, like , are implicitly closed? I need to
> iterate through the entire DOM, building up a DOM path, but the stdlib
> parsers aren
Dear Diez:
I see. I appreciate your help really.
best regards
fang
--
http://mail.python.org/mailman/listinfo/python-list
On Jul 17, 9:57 am, Thomas Troeger <[EMAIL PROTECTED]>
wrote:
> > I'd say that PyGame could be a solution.
>
> > Or otherwise you could do your own audio/graphics programming (you don't
> > tell us which OS you use, but there exist python modules that allow you
> > to do barebones graphics & sound
It seems like getter is defined in such way that it passes only 'self':
class FunDict(dict):
def __init__(self):
self.fundict = dict()
def fget(self, fun):
return fundict[fun.func_name]
def fset(self, newfun):
self.fundic
Uwe Schmitt wrote:
Python stores references in dictionaries and does not copy ! (unless
you explicitly use the copy module) !
In your case the entry in the dictionary is a reference to the same
object which f1 references, that is the object at 0xb7f0ba04.
If you now say "f1=...:" then f1 refere
mk wrote:
Calvin Spealman wrote:
To your actual problem... Why do you wanna do this anyway? If you want
to change the function in the dictionary, why don't you simply define
the functions you'll want to use, and change the one you have bound to
the key in the dictionary when you want to change i
Hi.
I'm newbie in Twisted.
Can anyone explain how does twisted server work? What happens after
reactor.listenTCP running?
I've got many connections from one client (one connection-one socket),
each of them is served by class serve(Protocol).
every protocol owns transport
every transport owns sock
The percent sign is a placeholder.
For example, if
level = 1
msg = 'look'
Then
'[[Log level %d: %s]]' % ( level, msg )
becomes
'[[Log level 1: look]]'
%d means insert an integer
%s means insert a string
You can also use dictionaries.
d = {'string1': 'hey', 'string2': 'you'}
Then
'%(string1)s %(
fang wrote:
> Dear Diez:
>
> It is attaching a C-debugger to python. I can attach python-
> debugger(for example:wingIDE) to c-debugger(for example:VS2008), but I
> cannot attach VS2008 to wingIDE. I need both python statement and c
> statement can be single-step debugged.
AFAIK that's not possi
korean_dave wrote:
What does this operator do? Specifically in this context
test.log( "[[Log level %d: %s]]" % ( level, msg ), description )
(Tried googling and searching, but the "%" gets interpreted as an
operation and distorts the search results)
It's the string formatting operator:
h
What does this operator do? Specifically in this context
test.log( "[[Log level %d: %s]]" % ( level, msg ), description )
(Tried googling and searching, but the "%" gets interpreted as an
operation and distorts the search results)
--
http://mail.python.org/mailman/listinfo/python-list
Stef Mientki gmail.com> writes:
> Although it works functionally,
> it can take lots of time waiting for the translation.
>
> What I basically do is, after selecting a new string to be translated:
>
> kwds = { 'trtext' : line_to_be_translated, 'lp' :'en_nl'}
> soup = BeautifulSoup (urlop
I'd say that PyGame could be a solution.
Or otherwise you could do your own audio/graphics programming (you don't
tell us which OS you use, but there exist python modules that allow you
to do barebones graphics & sound programming on linux...).
After some more reading I've stumbled over pygle
Calvin Spealman wrote:
To your actual problem... Why do you wanna do this anyway? If you want
to change the function in the dictionary, why don't you simply define
the functions you'll want to use, and change the one you have bound to
the key in the dictionary when you want to change it? In other
1 - 100 of 158 matches
Mail list logo