Hello,
snip
>>> import logging
>>> logging.basicConfig(level=logging.DEBUG)
>>> x='\xfe\x9f\xce\xc3\xa1\x00\xff\x01'
>>> x
'\xfe\x9f\xce\xc3\xa1\x00\xff\x01'
>>> print x
���á�
>>> logging.info(x)
Traceback (most recent call last):
File "/usr/lib/python2.6/logging/__init__.py", line 773
Hi,
I'm using a log hierarchy in my application, and sometimes I find myself
wanting to retrieve the latest log message written to the root logger.
(Typical usage might be displaying the latest log message at all times in a
GUI).
The only way I've found how to solve this, is by adding a custom
Hi,
Inspired from http://blog.spikesource.com/mysql_hotbackup.htm:
I restore a database from an SQL dump like this:
(...)
f= open('test.sql', 'r')
sql = f.read()
f.close()
self.query("""%s""" % sql)
(...)
This works fine for dumps made with "mysqldump -uroot -B test > test.sql".
However, if per
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 term
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 d
On Monday 04 February 2008 19:14:13 John Nagle wrote:
>I'm getting some wierd commit-related behavior from MySQLdb. I'm
> using InnoDB, so transactions really matter.
>
> I'm currently doing
>
> cursor = db.cursor()
> cursor.execute(...)
> cursor.close()
> db.commit()
>
Hi,
Im using a MySQLdb connection with a DictCursor, and to me it seems the
wrapping to dictionaries only prepend column names when there is an actual
conflict in the keywords.
I would like the cursor to always prepend table names no matter what. Is this
possible?
Thanks,
-Frank
--
http://ma
probing
activity?
Thanks,
Frank Aune
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
Im using DBUS in my application to detect HW hotplugging and removal, which
works great except for one thing: The code executed when a hotplugging is
detected does not raise exceptions, even if my code contains errors. The
event will just stop silently at the point where the exception occur
On Wednesday 09 January 2008 18:52:02 Dennis Lee Bieber wrote:
> On Wed, 9 Jan 2008 10:11:09 +0100, Frank Aune <[EMAIL PROTECTED]>
>
> declaimed the following in comp.lang.python:
> > The only clue I have so far, is that the cursor in task 1 seems to be
> > unable to &q
Hi,
Explaining this problem is quite tricky, but please bear with me.
Ive got an application which uses MySQL (InnoDB) for two things:
1. Store and retrieve application data (including viewing the application log)
2. Store the application log produced by the python logging module
The connectio
Hello,
I just recently found out that wx.lib.pubsub has finally moved away from wx,
and now lives at:
http://pubsub.wiki.sourceforge.net
I'm trying to use pubsub3, which is the third version and now the default one,
but I'm having a hard time creating topics and messages for sending:
class T
Hello,
I configure the serial connection using:
self.port = serial.Serial(baudrate=57600,
timeout=0.06,
parity=serial.PARITY_EVEN,
stopbits=serial.STOPBITS_TWO,
Hello,
I have a python library package 'Foo', which contains alot of submodules:
Foo/:
__init__.py
module1.py:
class Bar()
class Hmm()
module2.py
class Bee()
class Wax()
module3.py
etc
On Wednesday 31 October 2007 15:19:25 Andrii V. Mishkovskyi wrote:
> You mean something like this:
> >>>import random
> >>>def foo():
>
> ...print '42'
>
> >>>random.randit = foo
> >>>random.randit()
>
> 42
>
> am I right?
> --
I was thinking more of the line:
random.py: (my custom random.py
Hello,
Is it possible writing custom modules named the same as modules in the
standard library, which in turn use the same module from the standard
library?
Say I want my application to have a random.py module, which in turn must
import the standard library random.py module also, to get hold o
On Thursday 18 October 2007 19:26:59 Vinay Sajip wrote:
> The values in the config file are interpreted in the context of the
> logging module's namespace. Hence, one way of achieving what you want
> is putting any custom handlers in
> a module of your own, and providing a binding in the logging mo
On Friday 19 October 2007 03:42:16 Joshua J. Kugler wrote:
>
> Have you taken a look at ConfigObj?
>
> http://www.voidspace.org.uk/python/configobj.html
>
Yes, but as I said I need functionality present in the standard-library, so
sub-classing ConfigParser is the last option really. I was hoping
Hello,
I use ConfigParser and actually quite like it, EXCEPT that it doesnt preserve
the section order of the original config file when writing a new. This
behaviour is hopeless IMO, and I've been looking for alternatives.
I've been reading the interesting discussion on python-dev about improve
On Thursday 18 October 2007 19:26:59 Vinay Sajip wrote:
> The same technique applies to the arguments passed to the constructor.
>
> Hope this helps,
>
Thank you! This seems like exactly what I was looking for.
Very impressive logging framework btw - I use it whenever I can =)
Cheers,
Frank
--
er' is not defined.
Is this possible to archieve somehow?
Best regards,
Frank Aune
--
http://mail.python.org/mailman/listinfo/python-list
_.py? I'm looking for the "official" way of doing
this.
Thank you,
Frank Aune
--
http://mail.python.org/mailman/listinfo/python-list
22 matches
Mail list logo