[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:
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
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
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
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')
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
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')
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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.
--
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
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
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
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
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]$
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
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
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
Changes by A.M. Kuchling [EMAIL PROTECTED]:
--
keywords: +easy
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3151
___
___
Python-bugs-list mailing list
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
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
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
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
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:
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
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
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
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
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.
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
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,
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
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!
--
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.
--
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
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
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
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
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
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
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
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
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,
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?
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
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
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
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
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
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
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.
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.
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
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
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
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
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
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
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
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
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
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
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
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
*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
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
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
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
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
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
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
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
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
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 =
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?
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
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
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
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
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
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
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
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
[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
\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
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
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
801 - 900 of 1043 matches
Mail list logo