Re: Weird expression result

2008-08-18 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: 3 in [3] == True http://docs.python.org/ref[3/summary.html that page is broken, as recently mentioned; in, not in, is, and is not are comparison operators too, chains in the same way as the others. for details, see:

Re: Weird expression result

2008-08-18 Thread Dan Lenski
On Mon, 18 Aug 2008 18:27:53 +0200, Peter Otten wrote: Dan Lenski wrote: How does this play with standard precedence rules? Simple, all comparisons have the same priority: http://docs.python.org/ref/comparisons.html Peter I see. So, since the comparison operators have lower

Re: Weird Python startup behavior between different drives on PowerPC platform

2008-07-21 Thread jwahlmann
Bump. Anyone have any ideas on this? My next step is to either link together a static version of the compiler or create a debug version. Thanks, Jon On Jul 18, 11:43 am, [EMAIL PROTECTED] wrote: I'm experiencing some strange behavior when starting up python on a Debian-based PowerPC

Weird Python startup behavior between different drives on PowerPC platform

2008-07-18 Thread jwahlmann
I'm experiencing some strange behavior when starting up python on a Debian-based PowerPC platform. Normally, I operate from this platform with a root file system on an IDE flash drive (/dev/hda1). However, I'm trying to get my system to run with root on a mechanical SATA drive (/dev/sda1). Both

python's YENC.DECODE - weird output

2008-07-16 Thread John Savage
I save posts from a midi music newsgroup, some are encoded with yenc encoding. This gave me an opportunity to try out the decoders in Python. The UU decoder works okay, but my YENC effort gives results unexpected: import yenc, sys fd1=open(sys.argv[1],'r')

Re: python's YENC.DECODE - weird output

2008-07-16 Thread John Machin
On Jul 16, 11:33 pm, John Savage [EMAIL PROTECTED] wrote: I save posts from a midi music newsgroup, some are encoded with yenc encoding. This gave me an opportunity to try out the decoders in Python. The UU decoder works okay, but my YENC effort gives results unexpected: import yenc, sys

Re: python's YENC.DECODE - weird output

2008-07-16 Thread Terry Reedy
John Savage wrote: I save posts from a midi music newsgroup, some are encoded with yenc encoding. This gave me an opportunity to try out the decoders in Python. The UU decoder works okay, but my YENC effort gives results unexpected: import yenc, sys fd1=open(sys.argv[1],'r')

Re: Weird lambda rebinding/reassignment without me doing it

2008-07-13 Thread Steven D'Aprano
On Sat, 12 Jul 2008 16:32:25 -0400, Terry Reedy wrote: Steven D'Aprano wrote: On Thu, 10 Jul 2008 14:09:16 -0400, Terry Reedy wrote: g = lambda x:validate(x) This is doubly diseased. First, never write a 'name = lambda...' statement since it is equivalent to a def statement except that

Re: Weird lambda rebinding/reassignment without me doing it

2008-07-12 Thread Steven D'Aprano
On Thu, 10 Jul 2008 14:09:16 -0400, Terry Reedy wrote: g = lambda x:validate(x) This is doubly diseased. First, never write a 'name = lambda...' statement since it is equivalent to a def statement except that the resulting function object lacks a proper .funcname attribute. Using lambda

Re: Weird lambda rebinding/reassignment without me doing it

2008-07-12 Thread Terry Reedy
Steven D'Aprano wrote: On Thu, 10 Jul 2008 14:09:16 -0400, Terry Reedy wrote: g = lambda x:validate(x) This is doubly diseased. First, never write a 'name = lambda...' statement since it is equivalent to a def statement except that the resulting function object lacks a proper .funcname

Re: Weird lambda rebinding/reassignment without me doing it

2008-07-11 Thread David C. Ullrich
In article [EMAIL PROTECTED], Terry Reedy [EMAIL PROTECTED] wrote: David C. Ullrich wrote: In article [EMAIL PROTECTED], ssecorp [EMAIL PROTECTED] wrote: I am never redefining the or reassigning the list when using validate but since it spits the modified list back out that

Re: Weird lambda rebinding/reassignment without me doing it

2008-07-11 Thread David C. Ullrich
In article [EMAIL PROTECTED], ssecorp [EMAIL PROTECTED] wrote: def mod(x,y): return x.append(y) mod([1,2],3) k=[1,2,3] k [1, 2, 3] l = mod(k,4) l k [1, 2, 3, 4] l k==l False mod(k,5) k [1, 2, 3, 4, 5] mod(l,4) Traceback (most recent call last): File

Weird lambda rebinding/reassignment without me doing it

2008-07-10 Thread ssecorp
I am never redefining the or reassigning the list when using validate but since it spits the modified list back out that somehow means that the modified list is part of the environment and not the old one. i thought what happend inside a function stays inside a function meaning what comes out is

Re: Weird lambda rebinding/reassignment without me doing it

2008-07-10 Thread A.T.Hofkamp
Python doesn't use value semantics for variables but reference semantics: a = [1] b = a In many languages, you'd now have 2 lists. In Python you still have one list, and both a and b refer to it. Now if you modify the data (the list), both variables will change a.append(2) # in-place

Re: Weird lambda rebinding/reassignment without me doing it

2008-07-10 Thread David C. Ullrich
In article [EMAIL PROTECTED], ssecorp [EMAIL PROTECTED] wrote: I am never redefining the or reassigning the list when using validate but since it spits the modified list back out that somehow means that the modified list is part of the environment and not the old one. i thought what happend

Re: Weird lambda rebinding/reassignment without me doing it

2008-07-10 Thread Terry Reedy
David C. Ullrich wrote: In article [EMAIL PROTECTED], ssecorp [EMAIL PROTECTED] wrote: I am never redefining the or reassigning the list when using validate but since it spits the modified list back out that somehow means that the modified list is part of the environment and not the old

Re: Weird lambda rebinding/reassignment without me doing it

2008-07-10 Thread ssecorp
ty very good answer. i know i shouldn't use lambda like that, i never do i was just playing around there and then this happened which i thought was weird. On Jul 10, 8:09 pm, Terry Reedy [EMAIL PROTECTED] wrote: David C. Ullrich wrote: In article [EMAIL PROTECTED],  ssecorp [EMAIL

Re: Weird lambda rebinding/reassignment without me doing it

2008-07-10 Thread ssecorp
def mod(x,y): return x.append(y) mod([1,2],3) k=[1,2,3] k [1, 2, 3] l = mod(k,4) l k [1, 2, 3, 4] l k==l False mod(k,5) k [1, 2, 3, 4, 5] mod(l,4) Traceback (most recent call last): File pyshell#29, line 1, in module mod(l,4) File pyshell#18, line 2, in mod return

Re: Weird lambda rebinding/reassignment without me doing it

2008-07-10 Thread MRAB
On Jul 10, 9:46 pm, ssecorp [EMAIL PROTECTED] wrote: def mod(x,y):         return x.append(y) append adds y to list x and returns None, which is then returned by mod. mod([1,2],3) k=[1,2,3] k [1, 2, 3] l = mod(k,4) 4 has been appended to list k and mod has returned None, so l is

Re: Very weird bug!

2008-07-08 Thread Jorgen Bodde
Maybe the interpreter remembered the values of some objects you used? If you type in the interpreter, the objects you create have a lifetime as long as the interpreter is active, which means it can get a state behaviour that otherwise is not present if you start a new interpreter instance. To be

Re: Very weird bug!

2008-07-07 Thread ssecorp
i know, idid try it again and it works as expected. but how the h*** did it not work that one time? -- http://mail.python.org/mailman/listinfo/python-list

Very weird bug!

2008-07-06 Thread ssecorp
I was looking into currying and Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)] on win32 Type copyright, credits or license() for more information. Personal firewall software may warn about the

Re: Very weird bug!

2008-07-06 Thread Terry Reedy
ssecorp wrote: Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit wtf was this in the middle!? def build(a,b): return a+b build(5,4) (5, 4) I have exactly the same build on Windows and get the expected 9. Try it again. --

Re: pydev and psycopg2 - weird behaviour

2008-07-05 Thread Fabio Zadrozny
psycopg2 in a non-Django program, I'm seeing some weird behaviour My import psycopg2 is tagged in pyDev (eclipse) as Unresolved Import: psycopg2 But when I run my code anyway, I seem to connect to the postgresql DB okay. If I remove the import, and try it, it fails. So it seems to use

pydev and psycopg2 - weird behaviour

2008-07-04 Thread RossGK
I've been using pydev for a short while successfully, and Django with postgresql as well. psycopg2 is part of that behind the scenes I would imagine, to make django work. Now I'm trying to use psycopg2 in a non-Django program, I'm seeing some weird behaviour My import psycopg2 is tagged

Re: Weird local variables behaviors

2008-06-21 Thread Sebastjan Trepca
I see, intuitively one would think it would try to get it from global context as it's not yet bound in the local. Thanks for the explanation. Sebastjan On Sat, Jun 21, 2008 at 5:48 AM, Dan Bishop [EMAIL PROTECTED] wrote: On Jun 20, 7:32 pm, Matt Nordhoff [EMAIL PROTECTED] wrote: Sebastjan

Weird local variables behaviors

2008-06-20 Thread Sebastjan Trepca
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

Re: Weird local variables behaviors

2008-06-20 Thread Matt Nordhoff
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 PROTECTED] ~/dev/tests]$

Re: Weird local variables behaviors

2008-06-20 Thread Dan Bishop
On Jun 20, 7:32 pm, Matt Nordhoff [EMAIL PROTECTED] wrote: 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    

[issue3151] elementtree serialization bug for weird namespace urls

2008-06-20 Thread robert forkel
New submission from robert forkel [EMAIL PROTECTED]: when serializing elementtrees with weird namespaces like {$stuff}, the generated xml is not valid: Python 2.5.1 (r251:54863, Mar 7 2008, 04:10:12) [GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2 IDLE 1.2.1

[issue3151] elementtree serialization bug for weird namespace urls

2008-06-20 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: A one-letter fix :-) (the localname cannot contain special characters) -- assignee: - effbot keywords: +patch nosy: +amaury.forgeotdarc, effbot Added file: http://bugs.python.org/file10678/etree.patch

[issue3151] elementtree serialization bug for weird namespace urls

2008-06-20 Thread A.M. Kuchling
Changes by A.M. Kuchling [EMAIL PROTECTED]: -- keywords: +easy ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3151 ___ ___ Python-bugs-list mailing list

weird iteration/assignment problem

2008-06-13 Thread cirfu
for i in xrange(0, len(texts)): texts[i] = yes for i in texts: i = no why is the first one working but not the second. i mean i see why the firts one works but i dont udnerstand why the second doesnt. -- http://mail.python.org/mailman/listinfo/python-list

Re: weird iteration/assignment problem

2008-06-13 Thread Diez B. Roggisch
cirfu schrieb: for i in xrange(0, len(texts)): texts[i] = yes for i in texts: i = no why is the first one working but not the second. i mean i see why the firts one works but i dont udnerstand why the second doesnt. Because in the second you only bind the contents of texts to a

Re: weird iteration/assignment problem

2008-06-13 Thread Matimus
On Jun 13, 8:07 am, Diez B. Roggisch [EMAIL PROTECTED] wrote: cirfu schrieb: for i in xrange(0, len(texts)): texts[i] = yes for i in texts: i = no why is the first one working but not the second. i mean i see why the firts one works but i dont udnerstand why the second

Re: Weird exception in my, um, exception class constructor

2008-05-28 Thread Arnaud Delobelle
Joel Koltner [EMAIL PROTECTED] writes: Paul Hankin [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Did you actually write self,args = args? (looks at source code) [EMAIL PROTECTED] Why, yes, yes I did! Thanks for catching that... This is odd, because you should get this error

Weird exception in my, um, exception class constructor

2008-05-27 Thread Joel Koltner
I have a generic (do nothing) exception class that's coded like this: class MyError(exceptions.Exception): def __init__(self,args=None): self.args = args When I attempt to raise this exception via 'raise MyError' I get an exception within the MyError constructor __init__ as follows:

Re: Weird exception in my, um, exception class constructor

2008-05-27 Thread Arnaud Delobelle
Joel Koltner [EMAIL PROTECTED] writes: I have a generic (do nothing) exception class that's coded like this: class MyError(exceptions.Exception): def __init__(self,args=None): self.args = args When I attempt to raise this exception via 'raise MyError' I get an exception within

Re: Weird exception in my, um, exception class constructor

2008-05-27 Thread Paul Hankin
On May 27, 9:21 pm, Joel Koltner [EMAIL PROTECTED] wrote: I have a generic (do nothing) exception class that's coded like this: class MyError(exceptions.Exception):     def __init__(self,args=None):         self.args = args When I attempt to raise this exception via 'raise MyError' I get an

Re: Weird exception in my, um, exception class constructor

2008-05-27 Thread Joel Koltner
Hi Arnaud, Arnaud Delobelle [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] That's because the class 'Exception' defines a descriptor 'args' which has to be a sequence. Ah, thanks. I was following the example in Beazley's book and should have dug into the actual documentation a

Re: Weird exception in my, um, exception class constructor

2008-05-27 Thread Joel Koltner
Paul Hankin [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Did you actually write self,args = args? (looks at source code) [EMAIL PROTECTED] Why, yes, yes I did! Thanks for catching that... -- http://mail.python.org/mailman/listinfo/python-list

Re: Weird exception in my, um, exception class constructor

2008-05-27 Thread Terry Reedy
Joel Koltner [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] | Sounds good to me. I take it that, if I don't inherit from Exception, various | expected behaviors will break? (This is what Beazley suggests...) All builtin exceptions have been in the builtin namespace for a while.

Weird bug with an integer

2008-05-08 Thread David Anderson
Look this slice of code: rowN = int(0) for row in rows: success = self.resultGrid.AppendRows(); colN = int(0) for col in row: self.resultGrid.SetReadOnly(self.resultGrid.GetNumberRows() - 1,colN,isReadOnly = True) print

Re: Weird bug with an integer

2008-05-08 Thread David Anderson
Ps: When I go to shell and type:rowN = int(0) rows = [[1223, 11/23/08, Purchase, To be shipped, Gallery Name, Art Title[22 of 300], $10,000],#1st row [1223, 11/23/08, Purchase, To be shipped, Gallery Name, Art Title[22 of 300], $10,000],#2nd row [1223, 11/23/08,

Re: Weird bug with an integer

2008-05-08 Thread Gabriel Genellina
En Thu, 08 May 2008 22:47:59 -0300, David Anderson [EMAIL PROTECTED] escribió: Ps: When I go to shell and type:rowN = int(0) Why int(0)? Why not just 0??? Look this slice of code: rowN = int(0) for row in rows: success = self.resultGrid.AppendRows(); colN

Re: Weird import problem

2008-05-05 Thread Anton81
NS/dir1/file1.py NS/dir2/file2.py This *must* be wrong or at least not the full directory listing - please read It is the directory structure in one of the python paths. Missing __init__.py in the dir2? Oh right. I forgot about this. Thank you! --

Weird import problem

2008-05-04 Thread Anton81
I have a directory structure like NS/dir1/file1.py NS/dir2/file2.py if in the python shell I type import NS.dir1.file1 it works, however typing import NS.dir2.file2 fails with ImportError: No module named dir2.file2 Any ideas what could go wrong? Directory permissions seem to be OK. --

Re: Weird import problem

2008-05-04 Thread Diez B. Roggisch
Anton81 schrieb: I have a directory structure like NS/dir1/file1.py NS/dir2/file2.py This *must* be wrong or at least not the full directory listing - please read http://docs.python.org/tut/node8.html if in the python shell I type import NS.dir1.file1 it works, however typing import

Re: Weird scope error[SOLVED?]

2008-04-06 Thread Rory McKinley
Kay Schluehr wrote: On 5 Apr., 23:08, Michael Torrie [EMAIL PROTECTED] wrote: You need to either fix all these imports in these other modules (that are probably in the site_packages folder), or modify the python import path so that it can find ElementTree directly. I'd prefer to set an

Weird scope error

2008-04-05 Thread Rory McKinley
Hi I am trying to use the TidyHTMLTreeBuilder module which is part of elementtidy, but I am getting what appears to be some sort of scope error and it is scrambling my n00b brain. The module file (TidyHTMLTreeBuilder.py) tried to import ElementTree by doing the following: from elementtree

Re: Weird scope error

2008-04-05 Thread Kay Schluehr
On 5 Apr., 17:27, Rory McKinley [EMAIL PROTECTED] wrote: Hi I am trying to use the TidyHTMLTreeBuilder module which is part of elementtidy, but I am getting what appears to be some sort of scope error and it is scrambling my n00b brain. The module file (TidyHTMLTreeBuilder.py) tried to

Re: Weird scope error

2008-04-05 Thread Gary Herron
Rory McKinley wrote: Hi I am trying to use the TidyHTMLTreeBuilder module which is part of elementtidy, but I am getting what appears to be some sort of scope error and it is scrambling my n00b brain. The module file (TidyHTMLTreeBuilder.py) tried to import ElementTree by doing the

Re: Weird scope error

2008-04-05 Thread Rory McKinley
Gary Herron wrote: snip Python has no such thing as this kind of a global scope. (True, each module has its own global scope, but that's not what you are talking about.) So you'll have to fix the import for *every* module that needs access to ElementTree.You might make the change as

Re: Weird scope error

2008-04-05 Thread Michael Torrie
Rory McKinley wrote: Gary Herron wrote: snip Python has no such thing as this kind of a global scope. (True, each module has its own global scope, but that's not what you are talking about.) So you'll have to fix the import for *every* module that needs access to ElementTree.You

Re: Weird scope error

2008-04-05 Thread Kay Schluehr
On 5 Apr., 23:08, Michael Torrie [EMAIL PROTECTED] wrote: You need to either fix all these imports in these other modules (that are probably in the site_packages folder), or modify the python import path so that it can find ElementTree directly. I'd prefer to set an alias in the module

Re: Weird cgi error

2008-02-25 Thread marti john
GET YOUR SITE LISTET AT GOOGLE YAHOO NR.1 SEARCH RESULT for FREE Now BEST CHANCE EVER 2 GET TONZ OF SIGN UPS IN UR DOWNLINE !!! CLICK IT DON'T MISS MAKE 16.000 Dollars Every Fcuckng Month ! Click Don't Miss it !! Jesse Aldridge [EMAIL PROTECTED] wrote: I uploaded the following script,

Re: Weird cgi error

2008-02-25 Thread Gerardo Herzig
Jesse Aldridge wrote: I uploaded the following script, called test.py, to my webhost. It works find except when I input the string python . Note that's the word python followed by a space. If I submit that I get a 403 error. It seems to work fine with any other string. What's going on here?

Re: Weird cgi error

2008-02-25 Thread Jesse Aldridge
If you cant have access to the apache (?) error_log, you can put this in your code: import cgitb cgitb.enable() Which should trap what is being writed on the error stream and put it on the cgi output. Gerardo I added that. I get no errors. It still doesn't work. Well, I do get

Re: Weird cgi error

2008-02-25 Thread Jesse Aldridge
On Feb 25, 11:42 am, Jesse Aldridge [EMAIL PROTECTED] wrote: If you cant have access to the apache (?) error_log, you can put this in your code: import cgitb cgitb.enable() Which should trap what is being writed on the error stream and put it on the cgi output. Gerardo I added

Re: Weird cgi error

2008-02-25 Thread Steve Holden
Jesse Aldridge wrote: I uploaded the following script, called test.py, to my webhost. It works find except when I input the string python . Note that's the word python followed by a space. If I submit that I get a 403 error. It seems to work fine with any other string. What's going on

Re: Weird cgi error

2008-02-25 Thread Jesse Aldridge
This is some kind of crooked game, right? Your code works fine on a local server, and there's no reason why it shouldn't work just fine on yours either. All you are changing is the standard input to the process. Since you claim to have spotted this specific error, perhaps you'd like to

Re: Weird cgi error

2008-02-25 Thread gherzig
This is some kind of crooked game, right? Your code works fine on a local server, and there's no reason why it shouldn't work just fine on yours either. All you are changing is the standard input to the process. Since you claim to have spotted this specific error, perhaps you'd like to

Weird cgi error

2008-02-24 Thread Jesse Aldridge
I uploaded the following script, called test.py, to my webhost. It works find except when I input the string python . Note that's the word python followed by a space. If I submit that I get a 403 error. It seems to work fine with any other string. What's going on here? Here's the script in

Re: Must COMMIT after SELECT (was: Very weird behavior in MySQLdb execute)

2008-02-07 Thread Paul Boddie
On 7 Feb, 08:52, Frank Aune [EMAIL PROTECTED] wrote: On Wednesday 06 February 2008 16:16:45 Paul Boddie wrote: Really, the rule is this: always (where the circumstances described above apply) make sure that you terminate a transaction before attempting to read committed, updated data.

Re: Must COMMIT after SELECT (was: Very weird behavior in MySQLdb execute)

2008-02-06 Thread Frank Aune
On Tuesday 05 February 2008 18:58:49 John Nagle wrote: So you really do have to COMMIT after a SELECT, if you are reusing the database connection. CGI programs usually don't have this issue, because their connections don't live long, but long-running FCGI (and maybe Twisted) programs do.

Re: Must COMMIT after SELECT (was: Very weird behavior in MySQLdb execute)

2008-02-06 Thread Paul Boddie
On 6 Feb, 16:04, Frank Aune [EMAIL PROTECTED] wrote: Whenever I did a SELECT() on the first connection, the cursor would stop seeing new entries commited in the log table by the other connection. I always assumed you needed COMMIT() after adding new content to the database, not after every

Re: Must COMMIT after SELECT (was: Very weird behavior in MySQLdb execute)

2008-02-06 Thread Frank Aune
On Wednesday 06 February 2008 16:16:45 Paul Boddie wrote: Really, the rule is this: always (where the circumstances described above apply) make sure that you terminate a transaction before attempting to read committed, updated data. How exactly do you terminate a transaction then?Do you

Must COMMIT after SELECT (was: Very weird behavior in MySQLdb execute)

2008-02-05 Thread John Nagle
Steve Holden wrote: John Nagle wrote: Carsten Haese wrote: On Mon, 2008-02-04 at 11:30 -0800, John Nagle wrote: Restarting the MySQL instance changes the database. The entry google.com disappears, and is replaced by www.google.com. This must indicate a hanging transaction that wasn't

Re: Very weird behavior in MySQLdb execute

2008-02-05 Thread John Nagle
Paul Boddie wrote: On 4 Feb, 20:30, John Nagle [EMAIL PROTECTED] wrote: This has me completely mystified. Some SELECT operations performed through MySQLdb produce different results than with the MySQL graphical client. This failed on a Linux server running Python 2.5, and I can reproduce

Re: Very weird behavior in MySQLdb execute

2008-02-04 Thread Carsten Haese
will be visible to the database clients. Unless you are *absolutely certain* that both clients should have seen the exact same snapshot, it's really not all that weird that you are seeing discrepancies, especially in light of the fact that you had an uncommitted transaction hanging around somewhere. Hope

Very weird behavior in MySQLdb execute

2008-02-04 Thread John Nagle
This has me completely mystified. Some SELECT operations performed through MySQLdb produce different results than with the MySQL graphical client. This failed on a Linux server running Python 2.5, and I can reproduce it on a Windows client running Python 2.4. Both are running MySQL 2.5. The

Re: Very weird behavior in MySQLdb execute

2008-02-04 Thread John Nagle
Carsten Haese wrote: On Mon, 2008-02-04 at 11:30 -0800, John Nagle wrote: Restarting the MySQL instance changes the database. The entry google.com disappears, and is replaced by www.google.com. This must indicate a hanging transaction that wasn't committed. But that transaction didn't

Re: Very weird behavior in MySQLdb execute

2008-02-04 Thread Steve Holden
John Nagle wrote: Carsten Haese wrote: On Mon, 2008-02-04 at 11:30 -0800, John Nagle wrote: Restarting the MySQL instance changes the database. The entry google.com disappears, and is replaced by www.google.com. This must indicate a hanging transaction that wasn't committed. But that

Re: Very weird behavior in MySQLdb execute

2008-02-04 Thread Gabriel Genellina
On 5 feb, 01:42, Steve Holden [EMAIL PROTECTED] wrote: John Nagle wrote: Carsten Haese wrote: On Mon, 2008-02-04 at 11:30 -0800, John Nagle wrote: Restarting the MySQL instance changes the database.  The entry google.com disappears, and is replaced by www.google.com.  This must

PyOpenGL, wxPython weird behaviour

2008-01-03 Thread Adeola Bannis
Hi everyone, I'm doing a project using wxPython and pyopengl, and I seem to have a problem rendering textures. This is code that worked before my hard drive had a meltdown, but not since I re-installed everything. I've determined the problem is in the OpenGL part of my program. I do some

Re: PyOpenGL, wxPython weird behaviour

2008-01-03 Thread kyosohma
On Jan 3, 11:50 am, Adeola Bannis [EMAIL PROTECTED] wrote: Hi everyone, I'm doing a project using wxPython and pyopengl, and I seem to have a problem rendering textures. This is code that worked before my hard drive had a meltdown, but not since I re-installed everything. I've determined

Re: PyOpenGL, wxPython weird behaviour

2008-01-03 Thread Adeola Bannis
Thanks, will do... On Jan 3, 2:07 pm, [EMAIL PROTECTED] wrote: On Jan 3, 11:50 am, Adeola Bannis [EMAIL PROTECTED] wrote: Hi everyone, I'm doing a project using wxPython and pyopengl, and I seem to have a problem rendering textures. This is code that worked before my hard drive had a

Tkinter weird (and randomly inconsistant) crashes

2007-12-09 Thread wolfonenet
*or* run it straight from Python the Tkinter module starts throwing exceptions. The weird part is, the exceptions occur in different parts of the Tkinter module at different times. I can run the program 5 times and no problem then I can have a dozen attempts where it never finishes printing

Re: weird embedding problem

2007-12-08 Thread Graham Dumpleton
On Dec 7, 11:44 pm, DavidM [EMAIL PROTECTED] wrote: On Fri, 07 Dec 2007 00:53:15 -0800, Graham Dumpleton wrote: Are you actually linking your C program against the Python library? Yes. Refer OP: I'm embedding python in a C prog which is built as a linux shared lib. The prog is linked

Re: weird embedding problem

2007-12-07 Thread grbgooglefan
On Dec 7, 2:01 pm, DavidM [EMAIL PROTECTED] wrote: Hi all, I'm embedding python in a C prog which is built as a linux shared lib. The prog is linked against libpython, and on startup, it calls Py_Initialize(). The prog imports a pure-python script. The script starts up ok, but when it

Re: weird embedding problem

2007-12-07 Thread Graham Dumpleton
On Dec 7, 5:01 pm, DavidM [EMAIL PROTECTED] wrote: Hi all, I'm embedding python in a C prog which is built as a linux shared lib. The prog is linked against libpython, and on startup, it calls Py_Initialize(). The prog imports a pure-python script. The script starts up ok, but when it

Re: weird embedding problem

2007-12-07 Thread DavidM
On Fri, 07 Dec 2007 00:53:15 -0800, Graham Dumpleton wrote: Are you actually linking your C program against the Python library? Yes. Refer OP: I'm embedding python in a C prog which is built as a linux shared lib. The prog is linked against libpython, and on startup, it calls

weird embedding problem

2007-12-06 Thread DavidM
Hi all, I'm embedding python in a C prog which is built as a linux shared lib. The prog is linked against libpython, and on startup, it calls Py_Initialize(). The prog imports a pure-python script. The script starts up ok, but when it imports the 'math' module, the import fails with: Traceback

SQLite3; weird error

2007-10-29 Thread TYR
Has anyone else experienced a weird SQLite3 problem? Going by the documentation at docs.python.org, the syntax is as follows: foo = sqlite3.connect(dbname) creates a connection object representing the state of dbname and assigns it to variable foo. If dbname doesn't exist, a file of that name

Re: SQLite3; weird error

2007-10-29 Thread Duncan Booth
TYR [EMAIL PROTECTED] wrote: To do anything with it, you then need to create a cursor object by calling foo's method cursor (bar = foo.cursor). Perhaps this would work better if you actually try calling foo's method? bar = foo.cursor() Without the parentheses all you are doing is

Re: SQLite3; weird error

2007-10-29 Thread Diez B. Roggisch
TYR wrote: Has anyone else experienced a weird SQLite3 problem? Going by the documentation at docs.python.org, the syntax is as follows: foo = sqlite3.connect(dbname) creates a connection object representing the state of dbname and assigns it to variable foo. If dbname doesn't exist

Re: SQLite3; weird error

2007-10-29 Thread TYR
On Oct 29, 11:51 am, Duncan Booth [EMAIL PROTECTED] wrote: TYR [EMAIL PROTECTED] wrote: To do anything with it, you then need to create a cursor object by calling foo's method cursor (bar = foo.cursor). Perhaps this would work better if you actually try calling foo's method? bar =

Re: SQLite3; weird error

2007-10-29 Thread Bruno Desthuilliers
TYR a écrit : On Oct 29, 11:51 am, Duncan Booth [EMAIL PROTECTED] wrote: TYR [EMAIL PROTECTED] wrote: To do anything with it, you then need to create a cursor object by calling foo's method cursor (bar = foo.cursor). Perhaps this would work better if you actually try calling foo's method?

Re: SQLite3; weird error

2007-10-29 Thread Bruno Desthuilliers
TYR a écrit : Has anyone else experienced a weird SQLite3 problem? Going by the documentation at docs.python.org, the syntax is as follows: foo = sqlite3.connect(dbname) creates a connection object representing the state of dbname and assigns it to variable foo. If dbname doesn't exist

Weird AttributeError With Imports

2007-10-28 Thread Juha S.
I'm getting a AttributeError: 'module' object has no attribute 'clock' when importing a module from within two packages related to the line: self.lastTime = time.clock() in the __init__() of the class Time in the target module. The module (mytime.py) sits in a package hierarchy such as the

Re: Weird AttributeError With Imports

2007-10-28 Thread Peter Otten
Juha S. wrote: I'm getting a AttributeError: 'module' object has no attribute 'clock' when importing a module from within two packages related to the line: self.lastTime = time.clock() in the __init__() of the class Time in the target module. You probably have a time module that you wrote

Re: Weird AttributeError With Imports

2007-10-28 Thread Juha S.
Peter Otten wrote: Juha S. wrote: I'm getting a AttributeError: 'module' object has no attribute 'clock' when importing a module from within two packages related to the line: self.lastTime = time.clock() in the __init__() of the class Time in the target module. You probably

Re: Weird AttributeError With Imports

2007-10-28 Thread Gabriel Genellina
En Sun, 28 Oct 2007 14:50:24 -0300, Juha S. [EMAIL PROTECTED] escribi�: Peter Otten wrote: You probably have a time module that you wrote yourself and which is now hiding the one in python's standard library. Was your mytime.py formerly named time.py, and if so, did you remove the

Re: Weird gcc errors while installing MySQL-python module

2007-09-03 Thread Diez B. Roggisch
Jonas Schneider wrote: Hi guys, I´m experiencing weird error messages while installing MySQL-python with easy_install... I have no idea where the errors come from. Read the whole output at http://pastebin.com/m3859cf40 It´s really a lot... Someone got ideas? The pastebin errormessage

Weird gcc errors while installing MySQL-python module

2007-09-02 Thread Jonas Schneider
Hi guys, I´m experiencing weird error messages while installing MySQL-python with easy_install... I have no idea where the errors come from. Read the whole output at http://pastebin.com/m3859cf40 It´s really a lot... Someone got ideas? Greets Jonas -- http://mail.python.org/mailman/listinfo

weird edgecolumn behavior in scintilla

2007-08-27 Thread SHY
to a weird problem with the scintilla's edgemodes. when i set it up to edgeline mode and the edgecolumn is set to 80, the edgeline is drawn (assuming the default scintilla settings) at approximately 50th character from the left (and 30th character when the lexer is off - aka txt files), instead

Re: Weird errors when trying to access a dictionary key

2007-07-21 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : I have a data structure that looks like this: (snip) I get the following error: (snip) AttributeError: 'list' object has no attribute 'keys' Already answered. Here is where it gets weird: type(song) (snip) TypeError: 'str' object is not callable You code

Weird errors when trying to access a dictionary key

2007-07-20 Thread robinsiebler
\python\Songs\song_report.py, line 107, in print_rpt + '\t' + [song].values() + '\n') AttributeError: 'list' object has no attribute 'keys' Here is where it gets weird: type(song) Traceback (most recent call last): File C:\Program Files\ActiveState Komodo 3.5\lib\support\dbgp \pythonlib\dbgp

Re: Weird errors when trying to access a dictionary key

2007-07-20 Thread Zentrader
rpt_file.writelines('\t' + [song].keys() \ + '\t' + I get the following error: Traceback (most recent call last): AttributeError: 'list' object has no attribute 'keys' All of these messages are correct. The first

Re: Weird errors when trying to access a dictionary key

2007-07-20 Thread robinsiebler
You are converting the dictionary to a list on this line, and lists do not have keys rpt_file.writelines('\t' + [song].keys() \ How am I converting it to a list? Note the first line has braces, not brackets so it is a dictionary. Braces? What 1st line are

<    4   5   6   7   8   9   10   11   >