Hello folks :
i have a string "-bin-ulockmgr_server:0.99[&&NHX:C=0.195.0]" from which i
want to delete [&&NHX:C=0.195.0] .
I wrote a regular expression for [&&NHX:C=0.195.0] as
\[&&(\w)+:\w=((-)?(\d|\d\d|\d\d\d)\.)+\d\]
now when i do
p = re.compile('\[&&(\w)+:\w=((-)?(\d|\d\d|\d\d\d)\.)+\d\]')
m
Mark Dickinson wrote:
Option (2) appeals to me, but I can't see how to
implement it.
It could be implemented for the special case of floats
and Decimals by keeping flags in each set indicating
whether any elements of those types have been added.
But doing this just for those two types would b
David Pratt wrote:
> Hi, just want to conditionally base a class on another if it can be
> imported, otherwise base it on object. Does the following look ok
> for this?
>
> try:
> import foo.bar
> except ImportError:
> MyBase = foo.bar.Baz
> else:
> MyBase = object
>
> class Somethin
Terry Reedy wrote:
Documenting the problem properly would mean changing the set
documentation ... from their current
math set based definitions to implementation based definitions
It could be documented that the mathematical definitions
hold only if the equality relations between all the elem
Gabriel Genellina wrote:
Had Python used the more generic size and __size__ from the beginning,
we'd be all happy now :)
Not necessarily -- len is slightly shorter, and more
comfortable to type on a qwerty keyboard.
But in any case, size-likers have an easy solution:
size = len
:-)
(BTW
Aaron "Castironpi" Brady wrote:
How do you have a yellow dog,
It's not a yellow dog, it's a dog yellow. Attention pay! :-)
--
Ewing Gregory
--
http://mail.python.org/mailman/listinfo/python-list
On Oct 2, 6:20 pm, Larry Bates <[EMAIL PROTECTED]> wrote:
> You can do the following:
>
> a = [1,2,3,4,5]
> del a[0]
>
> and
>
> a = {1:'1', 2: '2', 3: '3', 4:'4', 5:'5'}
> del a[1]
>
> why doesn't it work the same for sets (particularly since sets are based on a
> dictionary)?
>
> a = set([1,2,3,
En Thu, 02 Oct 2008 10:17:01 -0300, <[EMAIL PROTECTED]> escribió:
Im facing a strange problem with ctypes module on windows 2000. I did not
face this problem with the windows Xp.
The problem is this code and specifically "c_long" which behave
differently
on win2000 and winxp
from ctypes im
On 10/2/08, Phillip B Oldham <[EMAIL PROTECTED]> wrote:
> On Oct 2, 1:32 am, "James Mills" <[EMAIL PROTECTED]> wrote:
> > http://hg.shortcircuit.net.au/index.wsgi/pymills/file/b7498cd4c6a4/ex...
>
> Thanks for the example, but its not loading.
Sorry my VPS has been down for quite
some time today
Bruno Desthuilliers wrote:
OTHO, 'one class per file' is a standard idiom in Java and IIRC in C++
(which both have namespaces one way or another)
In Java you don't get a choice, because the compiler
assumes a class can be found in the correspondingly
named file.
While C++ has namespaces, they
En Thu, 02 Oct 2008 18:14:07 -0300, Aaron "Castironpi" Brady
<[EMAIL PROTECTED]> escribió:
I'm trying to step through a subprocess I launch with
multiprocessing. Does anyone know what hack to add? The actual call
comes in forking.Popen.__init__, Windows version, forking.py, line
222:
On Oct 2, 11:56 am, [EMAIL PROTECTED] wrote:
> Terrence Brannon, I suggest you to shorten a lot some of those very
> long lines.
yes, I wanted to, but was not sure how to continue a line on the next
line in Python.
--
http://mail.python.org/mailman/listinfo/python-list
Steven D'Aprano wrote:
"Side-effect" has the technical meaning in functional languages of any
change of state that isn't the creation and return of a function result.
Actually, the term has that meaning for all programming
languages. The main distinguishing feature of functional
languages is t
robean a écrit :
I have been learning Python for the last 3 months or so and I have a
working (but somewhat patchy) sense of the the language. I've been
using a couple of the more popular Python books as well as online
resources.
A question for experienced Python programmers: can you recommend
r
On Thu, 02 Oct 2008 21:57:01 +0200, kib2 <[EMAIL PROTECTED]> wrote:
Hi,
In a tkinter TextWidget I would like to retrieve the last typed word.
I've tried this with the 'wordstart' Expression [From the effbot site,
"wordstart" and "wordend" moves the index to the beginning (end) of the
curren
On Thu, 02 Oct 2008 22:27:04 -0500, Larry Bates wrote:
> Maybe dictionaries should have had a .remove method then things would be
> more consistent?
But why should sets be consistent with dictionaries? There are a few
similarities, but also differences.
Personally, I'd rather see dictionaries g
En Fri, 03 Oct 2008 05:07:41 -0300, Terrence Brannon <[EMAIL PROTECTED]>
escribió:
On Oct 2, 11:56 am, [EMAIL PROTECTED] wrote:
Terrence Brannon, I suggest you to shorten a lot some of those very
long lines.
yes, I wanted to, but was not sure how to continue a line on the next
line in Pytho
jhermann wrote:
I didn't see this mentioned in the thread yet: the double-lambda is
unnecessary (and a hack).
Well, the alternative -- abusing default argument values --
is seen by many to be a hack as well, possibly a worse one.
It doesn't work in general, e.g. it fails if the function
needs
On Oct 2, 7:42 pm, Bruno Desthuilliers
<[EMAIL PROTECTED]> wrote:
> lkcl a écrit :
>
>
>
> > On Oct 2, 5:54 pm, Joe Hrbek <[EMAIL PROTECTED]> wrote:
> >> Could someone help me translate to something that would close to it in
> >> python? The anonymous functions are giving me problems.
>
> > class
En Fri, 03 Oct 2008 03:59:18 -0300, aditya shukla
<[EMAIL PROTECTED]> escribió:
Hello folks :
i have a string "-bin-ulockmgr_server:0.99[&&NHX:C=0.195.0]" from which i
want to delete [&&NHX:C=0.195.0] .
I wrote a regular expression for [&&NHX:C=0.195.0] as
\[&&(\w)+:\w=((-)?(\d|\d\d|\d\d\d)\.
On Fri, 03 Oct 2008 19:10:27 +1200, greg wrote:
> But in any case, size-likers have an easy solution:
>
>size = len
>
> :-)
>
> (BTW, try doing that with the x.len() notation!)
def size(obj):
return obj.len()
or
size = operator.methodcaller('len')
in Python 2.6 and up.
:-)
Ciao,
On Oct 2, 8:02 pm, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
> On Thu, 02 Oct 2008 15:39:55 -0700, Chris Rebert wrote:
> > On Thu, Oct 2, 2008 at 3:20 PM, Larry Bates <[EMAIL PROTECTED]>
> > wrote:
> >> a = set([1,2,3,4,5])
> >> del a[1]
>
> > Sets don't support subscripting, so if you ca
I'm not sure if our views are moving closer together or further apart,
but here goes...
On Thu, 02 Oct 2008 23:49:16 +, Marc 'BlackJack' Rintsch wrote:
> On Thu, 02 Oct 2008 14:51:29 +, Steven D'Aprano wrote:
>
>> On Wed, 01 Oct 2008 10:38:12 +, Marc 'BlackJack' Rintsch wrote:
>>
On Oct 3, 10:44 am, greg <[EMAIL PROTECTED]> wrote:
> So if anything were to be done to the language to
> fix this, it really should be focused on fixing the
> semantics of the for-loop. Unfortunately, the
> fact that the loop variable leaks out of the scope
> of the loop is regarded as a feature,
On Oct 2, 11:09 am, Steven D'Aprano <[EMAIL PROTECTED]
cybersource.com.au> wrote:
> On Thu, 02 Oct 2008 07:51:30 -0700, Terrence Brannon wrote:
>
> > Basically, using non-strict dictionary keys can lead to bugs, so that
> > worried me.
>
> What's a "non-strict dictionary key"?
>
In Perl, you can
On Fri, 03 Oct 2008 02:18:53 -0700, Carl Banks wrote:
> On Oct 2, 11:27 pm, Larry Bates <[EMAIL PROTECTED]> wrote:
>> I didn't mean to imply that del a[1] would delete the first thing in
>> the set, but rather the item with a value of 1. Just as when we use it
>> on a dictionary:
>>
>> del a[1]
>
Boris Borcic a écrit :
42, for instance.
Proof :
>>> 42 is not object
True
QED
Lol.
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
class Mask(object):
def m3(self): raise NotImplementedError
def m4(self): raise NotImplementedError
What's the name of this python design pattern? :-)
Don't know. Perhaps we could call it the FigLeaf pattern
(covering up what you don't want seen)?
There's a
greg <[EMAIL PROTECTED]> writes:
> The root of the problem actually has nothing to do with lambdas or
> static vs. non-static scoping. It's the fact that Python's for-loop
> doesn't create a new environment for the loop variable each time
> around, but re-uses a slot in the containing environment.
greg wrote:
>> class Mask(object):
>> def m3(self): raise NotImplementedError
>> def m4(self): raise NotImplementedError
>
>> What's the name of this python design pattern? :-)
>
> Don't know. Perhaps we could call it the FigLeaf pattern
> (covering up what you don't want seen)?
Braghettone ;)
On Thu, 02 Oct 2008 18:15:59 -0700, bearophileHUGS wrote:
> What's a range(n)? A function that returns a list of n items, from 0 to
> n. This is easy to understand, while xrange(n) is a bit less easy to
> understand (a generator or generators).
`xrange()` doesn't return a generator or iterator
On Fri, 03 Oct 2008 17:09:07 +1200, greg wrote:
> Lawrence D'Oliveiro wrote:
>> In message <[EMAIL PROTECTED]>, Steven
>> D'Aprano wrote:
>>
>> > (2) Even when the source is available, it is sometimes a legal trap
>> > to read it with respect to patents and copyright.
>>
>> That's not how patent
On Oct 2, 11:27 pm, Larry Bates <[EMAIL PROTECTED]> wrote:
> I didn't mean to imply that del a[1] would delete the first thing in the set,
> but rather the item with a value of 1. Just as when we use it on a
> dictionary:
>
> del a[1]
>
> doesn't mean delete the first dictionary entry but rather
2008/9/30 Lie Ryan <[EMAIL PROTECTED]>:
> Actually str.len and len(str) is just like saying "the string's length"
> and "the length of the string". There is no difference between the two
> except for personal preference. (I am no linguist-- not even a native
> speaker of English --but I think ther
lkcl a écrit :
On Oct 2, 7:42 pm, Bruno Desthuilliers
<[EMAIL PROTECTED]> wrote:
lkcl a écrit :
(snip)
for fits and giggles, compile the above python using
pyjs.py, the python-to-javascript compiler
(seehttp://pyjamas.sf.net) and compare the
resultant javascript to your original code-fragment
Marc 'BlackJack' Rintsch:
> bearophile
> while xrange(n) is a bit less easy to
> > understand (a generator or generators).
I meant "a generator of generators", a typo, sorry. -.-
Bye,
bearophile
--
http://mail.python.org/mailman/listinfo/python-list
Chris Rebert:
> So the improved code is:
> your_list.sort(key=lambda elem: (elem[3], elem[2]), reverse=True)
Better (untested):
from operator import itemgetter
...
your_list.sort(key=itemgetter(3, 2), reverse=True)
Bye,
bearophile
--
http://mail.python.org/mailman/listinfo/python-list
On Oct 2, 10:16 pm, process <[EMAIL PROTECTED]> wrote:
> Let's say I have a class X which has 10 methods.
>
> I want class Y to inherit 5 of them.
>
> Can I do that? Can I do something along the lines of super(Y, exclude
> method 3 4 7 9 10) ?
Don't use inheritance, use delegation or just copy the
Steven D'Aprano:
> Personally, I'd rather see dictionaries grow methods like
> symmetric_difference, union, etc. than worry about whether you use del or
> remove to remove elements from a set.
I have functions for all those operations, so I think they can be
useful, but in practice I don't use the
On Oct 3, 10:29 am, Bruno Desthuilliers wrote:
> lkcl a écrit :> On Oct 2, 7:42 pm, Bruno Desthuilliers
> > <[EMAIL PROTECTED]> wrote:
> >> lkcl a écrit :
> Not 'mine' - I'm not the OP.
whoops, yes - i missed that. sorry!
> And as far as I'm concerned, the point is
> exactly here : it's doing
2008/10/2 process <[EMAIL PROTECTED]>:
> Let's say I have a class X which has 10 methods.
>
> I want class Y to inherit 5 of them.
>
> Can I do that?
As others have said, no. What nobody seems to have said yet is why. If
Y descends from X, you are saying that Y is an X; that a Y can be used
anywhe
Hi
I am validating a xmlfile against a xsd (My.xsd) but i notice that the xsd has
a include which includes another xsd (My1.xsd)
I have written a simple program that to validate this
from lxml import etree
xmlschemadoc=etree.parse("My.xsd")
xmlschema=etree.XMLSchema(xmlschemadoc)
xmldoc=etree.p
Martin v. Löwis wrote:
1. how can I launch the windows help file (CHM), from python with a
keyword as argument ?
Run hh.exe. If you want it to navigate to specific page, also pass that
page on the command line (finding out the exact syntax is left as an
exercise)
That's one way,
in t
Hi,
This is probably trivial, but I cannot find a solution right now.
With MySQLdb, I could test the success of a deleting action like this:
sql = "DELETE FROM table WHERE name='xxx'"
res = cur.execute(sql)
if res == 1:
print 'Okay'
else:
print 'nothing deleted'
This seems not to wor
Hello.
I'm using SimpleHTTPServer (work well) but it always sends "Server"
header in response:
"Server: SimpleHTTP/0.6 Python/2.5.1"
How can I remove that ?
I tried:
self.server_version = ""
self.sys_version = ""
but the header is still sent, empty.
I there a way to remove the "Server:" head
2008/10/3 Tim Rowe <[EMAIL PROTECTED]>:
> As others have said, no. What nobody seems to have said yet is why. If
> Y descends from X, you are saying that Y is an X; that a Y can be used
> anywhere an X can. If Y doesn't support some methods of X then it is
> *not* an X, and *can't* be used anywher
Howdy Matthias!
The delete operation will set the rowcount member of your cursor.
Let's assume you have an sqlite3 database with a table called 'test'
with an id column. It does have a record with id=1. It does not have
a record with id=2.
>>> import sqlite3
>>> connection = sqlite3.connect('te
I saw this (close to this anyway) lieing around on the internet and
was wanting to use it to define a start point exc but I need the
graphics to stay within a set y coords and I am not realy sure how to
do that. I have no idea on how to bind a min/max y to it. (the
concept is inspired by the java
On Fri, 03 Oct 2008 02:09:09 -0700, Carl Banks wrote:
> On Oct 2, 8:02 pm, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
>> Then add subscription access too. By aliasing `__getitem__()` to
>> `__contains__()`. And `__setitem__()` could be implemented to add or
>> remove objects by assignin
I work for a financial company where we run Windows XP and read email
using Microsoft Outlook 2003. I get daily files that come as email
attachments from various counterparties. I save them as h:\firm_name
\mmdd.csv . Would Python be a good tool to automate the process of
saving reports, or wou
> so, if i do this:
>
> d = dataListener()
> e = dataListener()
>
> d.data = "fred"
>
> print f.data
duh, duh - that should be print e.data :)
--
http://mail.python.org/mailman/listinfo/python-list
Hi everybody,
I would like to be able to specialize an existing class A, so as to obtain a
class B(A), with all methods of B being the methods of A preceded by a
special method of B called _before_any_method_of_A( self ), and followed by
a special method of B called _after_any_method_of_A( self ).
you've got ?self.send_header('Server', self.version_string()) in the
send_response method of the BaseHTTPRequestHandler class in the
BaseHTTPServer module. Long story, short, it's going to be a lot of work
to get rid of.
[EMAIL PROTECTED] wrote:
Hello.
I'm using SimpleHTTPServer (work well)
On 2008-10-03, greg <[EMAIL PROTECTED]> wrote:
> Lawrence D'Oliveiro wrote:
>> In message <[EMAIL PROTECTED]>, Steven D'Aprano
>> wrote:
>>
>> > (2) Even when the source is available, it is sometimes a legal trap to
>> > read it with respect to patents and copyright.
>>
>> That's not how patents
In message <[EMAIL PROTECTED]>, Lie Ryan
wrote:
> ...python's docstring viewer has a less-like pager (or was it less) in
> Linux ...
It invokes whatever you define in $PAGER.
--
http://mail.python.org/mailman/listinfo/python-list
On Fri, 2008-10-03 at 09:15 -0500, Grant Edwards wrote:
> On 2008-10-03, greg <[EMAIL PROTECTED]> wrote:
> > Lawrence D'Oliveiro wrote:
> >> In message <[EMAIL PROTECTED]>, Steven D'Aprano
> >> wrote:
> >>
> >> > (2) Even when the source is available, it is sometimes a legal trap to
> >> > read i
Maybe you can use __getattribute__.
I tried it, but got stuck trying to let __getattribute__
work normal without calling itself.
class A(object):
def foo(self):
print "hi"
class B(A):
def __getattribute__(self,name):
try:
fun = A.__dict__[name]
except K
On 2008-10-03, J. Cliff Dyer <[EMAIL PROTECTED]> wrote:
>
> On Fri, 2008-10-03 at 09:15 -0500, Grant Edwards wrote:
>> On 2008-10-03, greg <[EMAIL PROTECTED]> wrote:
>> > Lawrence D'Oliveiro wrote:
>> >> In message <[EMAIL PROTECTED]>, Steven D'Aprano
>> >> wrote:
>> >>
>> >> > (2) Even when the s
Tk/Tkinter apparently considers the position 1.13 to be after the last
word in the text. You get the same problem if you set the insertion
point just after the word 'two' for example: text.index('insert')
returns 1.7 and text.index('insert wordstart') returns 1.7 too...
Exactly.
My solution w
Given the ABC innovation, maybe an infix syntax for isinstance() would be good.
Possibilities :
- stealing "is" away from object identity. As a motivation, true use cases for
testing object identity are rare; forcing the usage of a function or method to
test it, would dissuade abuse.
- allow
Made a simple little test program as im learning to embed python, have a
simple script that just sets x=10.0 in test.py and prints type(x). Python
prints that x is a float but PyFloat_Check() returns false. If i removed the
check and just force it to print the double value, its correct. Any ideas
w
Boris Borcic:
> - combining both keywords to create a third one, eg "is in"
A note only on syntax: "isa" seems better for Python. I don't comment
how useful it can be.
Bye,
bearophile
--
http://mail.python.org/mailman/listinfo/python-list
hrishy wrote:
> I am validating a xmlfile against a xsd (My.xsd) but i notice that the xsd
> has a include which includes another xsd (My1.xsd)
>
> I have written a simple program that to validate this
>
> from lxml import etree
> xmlschemadoc=etree.parse("My.xsd")
> xmlschema=etree.XMLSchema(xm
Sean Davis wrote:
> I have an xml document and simply need to add an xml-stylesheet to
> it. I am using lxml to parse the xml document and then would like to
> insert the xml-stylesheet tag using the etree api. Any suggestions?
I assume you are talking about a processing instruction here, not a
Uwe Schmitt wrote:
> I have to parse some text which pretends to be XML. lxml does not want
> to parse it, because it lacks a root element.
> I think that this situation is not unusual, so: is there a way to
> force lxml to parse it ?
>
> My work around is wrapping the text with "..." before
> fee
On Oct 3, 3:44 am, greg <[EMAIL PROTECTED]> wrote:
> jhermann wrote:
> > I didn't see this mentioned in the thread yet: the double-lambda is
> > unnecessary (and a hack).
>
> Well, the alternative -- abusing default argument values --
> is seen by many to be a hack as well, possibly a worse one.
>
On Oct 3, 5:10 am, "Tim Rowe" <[EMAIL PROTECTED]> wrote:
> 2008/9/30 Lie Ryan <[EMAIL PROTECTED]>:
>
> > Actually str.len and len(str) is just like saying "the string's length"
> > and "the length of the string". There is no difference between the two
> > except for personal preference. (I am no li
range(1,101), no?
On Tue, May 20, 2008 at 4:46 PM, Sells, Fred
<[EMAIL PROTECTED]> wrote:
> or
> for i in range(1,100):
> print ('fizz','','')[i%3] + ('buzz','','','','')[i%5] or i
>
>> >
>> > "Write a program that prints the numbers from 1 to 100. But for
>> > multiples of three print "Fizz" ins
On Oct 3, 9:03 am, TP <[EMAIL PROTECTED]> wrote:
> Hi everybody,
>
> I would like to be able to specialize an existing class A, so as to obtain a
> class B(A), with all methods of B being the methods of A preceded by a
> special method of B called _before_any_method_of_A( self ), and followed by
>
On Oct 3, 2008, at 2:33 PM, Matthias Huening wrote:
This seems not to work with sqlite3.
Before going any further... make sure that SQLite's count_change is
enabled:
PRAGMA count_changes
PRAGMA count_changes = 0 | 1
"Query or change the count-changes flag. Normally, when the count-
chan
hi all,
I have a code
z = MyClass(some_args)
can I somehow get info in MyClass __init__ function that user uses "z"
as name of the variable?
I.e. to have __init__ function that creates field z.name with value
"z".
Thank you in advance, D.
--
http://mail.python.org/mailman/listinfo/python-list
So Python can have unicode variable names but you can't
"explode" (**myvariable) a dict with unicode keys? WTF?
-Devin
--
http://mail.python.org/mailman/listinfo/python-list
En Fri, 03 Oct 2008 09:07:21 -0300, Stef Mientki <[EMAIL PROTECTED]>
escribió:
Martin v. Löwis wrote:
1. how can I launch the windows help file (CHM), from python with a
keyword as argument ?
Run hh.exe. If you want it to navigate to specific page, also pass that
page on the command line (
[EMAIL PROTECTED] wrote:
I'm using SimpleHTTPServer (work well) but it always sends "Server"
header in response:
How can I remove that ?
En Fri, 03 Oct 2008 11:11:34 -0300, Gary M. Josack <[EMAIL PROTECTED]>
escribió:
you've got ?self.send_header('Server', self.version_string()) in the
send
Vinay Sajip <[EMAIL PROTECTED]> wrote:
> Did you try setting logRequests to false?
Perfect, that's just what I needed.
Thanks Vinay!!
Mark
--
Mark Harrison
Pixar Animation Studios
--
http://mail.python.org/mailman/listinfo/python-list
Devin wrote:
> So Python can have unicode variable names but you can't
> "explode" (**myvariable) a dict with unicode keys? WTF?
That works fine for me.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
"Martin v. Löwis" wrote:
> Devin wrote:
>> So Python can have unicode variable names but you can't
>> "explode" (**myvariable) a dict with unicode keys? WTF?
>
> That works fine for me.
The OP probably means
>>> def f(a=1): return a
...
>>> f(**{"a": 42})
42
>>> f(**{u"a": 42})
Traceback (most
On Oct 3, 1:57 pm, Peter Otten <[EMAIL PROTECTED]> wrote:
> "Martin v. Löwis" wrote:
> > Devin wrote:
> >> So Python can have unicode variable names but you can't
> >> "explode" (**myvariable) a dict with unicode keys? WTF?
>
> > That works fine for me.
>
> The OP probably means
>
> >>> def f(a=1):
En Fri, 03 Oct 2008 11:03:22 -0300, TP <[EMAIL PROTECTED]>
escribió:
I would like to be able to specialize an existing class A, so as to
obtain a
class B(A), with all methods of B being the methods of A preceded by a
special method of B called _before_any_method_of_A( self ), and followed
Devin wrote:
> On Oct 3, 1:57 pm, Peter Otten <[EMAIL PROTECTED]> wrote:
>> "Martin v. Löwis" wrote:
>>> Devin wrote:
So Python can have unicode variable names but you can't
"explode" (**myvariable) a dict with unicode keys? WTF?
>>> That works fine for me.
>> The OP probably means
>>
>>>
generic tramadol
.
.
.
Enough to seek generic tramadol! You've already found the best site
where you can buy generic tramadol online for lowest price!
Just click our link below and buy cheap generic tramadol.
To order generic tramadol without prescription visit link below!
*
greg wrote:
Steven D'Aprano wrote:
We agree that the restriction is artificial, and I think irrational
I think it's irrational for another reason, too -- it's
actually vacuous. There's nothing to prevent you creating
a set of patches that simply say "Delete all of the original
source and repl
Announcing PyYAML-3.06
A new bug fix release of PyYAML is now available:
http://pyyaml.org/wiki/PyYAML
Changes
===
* setup.py checks whether LibYAML is installed and if so, builds
and installs LibYAML bindings. To force or disable
Thanks!
cursor.rowcount does exactly what I need.
Before going any further... make sure that SQLite's count_change is
enabled:
PRAGMA count_changes
PRAGMA count_changes = 0 | 1
"Query or change the count-changes flag. Normally, when the
count-changes flag is not set, INSERT, UPDATE and DELET
En Fri, 03 Oct 2008 12:27:50 -0300, Rich Henry <[EMAIL PROTECTED]>
escribió:
Made a simple little test program as im learning to embed python, have a
simple script that just sets x=10.0 in test.py and prints type(x). Python
prints that x is a float but PyFloat_Check() returns false. If i remov
I'm trying to make a Tkinter/Python port of the demo at http://wiki.tcl.tk/10515
, which has adjustable alpha under Windows and (I think) MacOS.
I'm not quite sure how to port:
wm attributes . -alpha [expr {$alphaLevel + 0.05} ]
set AlphaLevel [wm attributes . -alpha]
The goal is to have
En Fri, 03 Oct 2008 15:04:01 -0300, dmitrey <[EMAIL PROTECTED]>
escribió:
I have a code
z = MyClass(some_args)
can I somehow get info in MyClass __init__ function that user uses "z"
as name of the variable?
I.e. to have __init__ function that creates field z.name with value
"z".
No. I'd jus
On Oct 3, 2:29 pm, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote:
> Devin wrote:
> > On Oct 3, 1:57 pm, Peter Otten <[EMAIL PROTECTED]> wrote:
> >> "Martin v. Löwis" wrote:
> >>> Devin wrote:
> So Python can have unicode variable names but you can't
> "explode" (**myvariable) a dict with un
lkcl a écrit :
On Oct 3, 10:29 am, Bruno Desthuilliers wrote:
lkcl a écrit :> On Oct 2, 7:42 pm, Bruno Desthuilliers
<[EMAIL PROTECTED]> wrote:
lkcl a écrit :
And as far as I'm concerned, the point is
exactly here : it's doing "a little bit more" than the original code.
yeah, i know. a
Boris Borcic a écrit :
Given the ABC innovation, maybe an infix syntax for isinstance() would
be good.
Possibilities :
- stealing "is" away from object identity. As a motivation, true use
cases for testing object identity are rare;
"x is None" is a *very* common test. Using a _marker objec
Hi Todd,
Thanks for your suggestions on using the Event condition methods on
this thread.
Here is my updated code :
import time
import datetime
import threading
def log(message):
now = datetime.datetime.now().strftime("%H:%M:%S")
print "%s : %s" % (now, message)
class StoppableThrea
greg wrote:
jhermann wrote:
I didn't see this mentioned in the thread yet: the double-lambda is
unnecessary (and a hack).
Well, the alternative -- abusing default argument values --
is seen by many to be a hack as well, possibly a worse one.
I disagree. It is one way to evaluate an express
dmitrey a écrit :
hi all,
I have a code
z = MyClass(some_args)
can I somehow get info in MyClass __init__ function that user uses "z"
as name of the variable?
I.e. to have __init__ function that creates field z.name with value
"z".
This has been debated to hell and back. To make a long story s
On 3 oct, 20:17, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote:
> > [EMAIL PROTECTED] wrote:
> >> I'm using SimpleHTTPServer (work well) but it always sends "Server"
> >> header in response:
> >> How can I remove that ?
>
> En Fri, 03 Oct 2008 11:11:34 -0300, Gary M. Josack <[EMAIL PROTECTED]>
>
tramadol on line
.
.
.
Enough to seek Tramadol! You've already found the best site where you
can purchase tramadol online for lowest price!
Just click our link below and buy cheap tramadol
To order tramadol without prescription visit link below!
http://med247.us
greg a écrit :
Bruno Desthuilliers wrote:
OTHO, 'one class per file' is a standard idiom in Java and IIRC in C++
(which both have namespaces one way or another)
In Java you don't get a choice, because the compiler
assumes a class can be found in the correspondingly
named file.
For public cl
On Oct 3, 9:01 am, Beliavsky <[EMAIL PROTECTED]> wrote:
> I work for a financial company where we run Windows XP and read email
> using Microsoft Outlook 2003. I get daily files that come as email
> attachments from various counterparties. I save them as h:\firm_name
> \mmdd.csv . Would Python
I've been experiencing an intermittent crash where no python
stacktrace is provided. It happens for a url downloading process that
can last up to 12 hours and crawls about 50,000 urls.
I'm using urllib2 for the downloads. There are 5-10 downloading
threads, and some custom website exploration co
I've been experiencing an intermittent crash where no python
stacktrace is provided. It happens for a url downloading process that
can last up to 12 hours and crawls about 50,000 urls.
I'm using urllib2 for the downloads. There are 5-10 downloading
threads, and some custom website exploration co
Beliavsky wrote in news:d579f554-be4b-4066-acec-49a7bafb1046
@t41g2000hsc.googlegroups.com in comp.lang.python:
> I work for a financial company where we run Windows XP and read email
> using Microsoft Outlook 2003. I get daily files that come as email
> attachments from various counterparties. I
1 - 100 of 127 matches
Mail list logo