PDB scope problem

2007-10-22 Thread Dale Strickland-Clark
with it if entered directly: lstValues [[Decimal(1), Decimal(47.0)]] agg = [0,1] print list([sum(v[i] for i in range(len(agg))) for v in lstValues]) [Decimal(48.0)] There seems to be some sort of scope problem in PDB. -- Dale Strickland-Clark -- http://mail.python.org/mailman/listinfo

Re: MIMEText breaking the rules?

2007-08-05 Thread Dale Strickland-Clark
Tim Roberts wrote: Dale Strickland-Clark [EMAIL PROTECTED] wrote: The email module's mimetext handling isn't what you might expect from something that appears to behave like a dictionary. ... Having apparently REPLACED my recipient, what I've ended up with is both of them. This behavior

MIMEText breaking the rules?

2007-08-01 Thread Dale Strickland-Clark
Having apparently REPLACED my recipient, what I've ended up with is both of them. -- Dale Strickland-Clark Riverhall Systems - www.riverhall.co.uk -- http://mail.python.org/mailman/listinfo/python-list

Re: list of range of floats

2007-02-14 Thread Dale Strickland-Clark
Steve wrote: I'm trying to create a list range of floats and running into problems. I've been trying something like: a = 0.0 b = 10.0 flts = range(a, b) fltlst.append(flts) When I run it I get the following DeprecationWarning: integer argument expected, got float. How can I store

Re: What's going on here?

2006-11-23 Thread Dale Strickland-Clark
Thanks for the answers. I am informed but I don't feel enlightened. It does strike me as odd that an apparently empty subclass should add extra function to the base class. Not at all obvious. -- Dale Strickland-Clark We are recruiting Python programmers. Please see the web site. Riverhall

What's going on here?

2006-11-22 Thread Dale Strickland-Clark
no attribute 'spam' class b(object): ...pass ... a = b() a __main__.b object at 0xb7b4dcac a.spam = 1 What is subclassing adding to the class here? Why can't I assign to attributes of an instance of object? -- Dale Strickland-Clark Riverhall Systems - www.riverhall.co.uk -- http

Re: Hooking file open

2006-11-01 Thread Dale Strickland-Clark
C extensions, which is fine. I just want to be able to detect the most common use cases. Any other suggestions are appreciated. -Farshid -- Dale Strickland-Clark Riverhall Systems - www.riverhall.co.uk -- http://mail.python.org/mailman/listinfo/python-list

Re: Providing full interaction with the run time

2006-11-01 Thread Dale Strickland-Clark
Thanks for the info. I didn't know about that module. I'll take a look. Fredrik Lundh wrote: Dale Strickland-Clark wrote: We have a system we're developing which runs as a server. It has an xml-rpc interface which I've extended to provide some debugging facilities. This has already proved

Providing full interaction with the run time

2006-10-29 Thread Dale Strickland-Clark
.) Thanks -- Dale Strickland-Clark Riverhall Systems - www.riverhall.co.uk -- http://mail.python.org/mailman/listinfo/python-list

Re: Python's CRT licensing on Windows

2006-10-25 Thread Dale Strickland-Clark
To paraphrase an applicant for a job vacancy we're currently filling when asked to give an example of their problem solving skills: A client had a problem with Windows XP on his laptop. I reformatted his hard disk and installed Red Hat. Problem solved. -- Dale Strickland-Clark Riverhall Systems

We're recruiting Python programmers

2006-10-17 Thread Dale Strickland-Clark
I'll keep this brief. Please see the web site for details Thanks. -- Dale Strickland-Clark We are recruiting Python programmers. Please see the web site. Riverhall Systems www.riverhall.co.uk -- http://mail.python.org/mailman/listinfo/python-list

PostgreSQL, psycopg2 and OID-less tables

2006-09-15 Thread Dale Strickland-Clark
. -- Dale Strickland-Clark Riverhall Systems - www.riverhall.co.uk -- http://mail.python.org/mailman/listinfo/python-list

Re: PostgreSQL, psycopg2 and OID-less tables

2006-09-15 Thread Dale Strickland-Clark
Hi Harald Thanks for that, somewhat comprehensive, answer. -- Dale Strickland-Clark Riverhall Systems - www.riverhall.co.uk -- http://mail.python.org/mailman/listinfo/python-list

Re: PostgreSQL, psycopg2 and OID-less tables

2006-09-15 Thread Dale Strickland-Clark
Tim N. van der Leeuw wrote: Hi, select lastval(); Thanks, that was useful. -- Dale Strickland-Clark Riverhall Systems - www.riverhall.co.uk -- http://mail.python.org/mailman/listinfo/python-list

Re: Inter process signalling

2006-09-13 Thread Dale Strickland-Clark
() Thanks. We'll look into those. -- Dale Strickland-Clark Riverhall Systems - www.riverhall.co.uk -- http://mail.python.org/mailman/listinfo/python-list

Re: Inter process signalling

2006-09-13 Thread Dale Strickland-Clark
Duncan Booth wrote: Dale Strickland-Clark [EMAIL PROTECTED] wrote: In Linux this is easy with 'signal' and 'kill' but how can I get one Python process to signal another (possibly running as a service)? All I need is a simple prod with no other data being sent and none being returned

Re: Delete items in nested dictionary based on value.

2006-09-13 Thread Dale Strickland-Clark
don't see that mentioned in the text. If that is so, include the two commented statements. -- Dale Strickland-Clark Riverhall Systems - www.riverhall.co.uk -- http://mail.python.org/mailman/listinfo/python-list

Inter process signalling

2006-09-12 Thread Dale Strickland-Clark
an interrupt. I'm not looking for a solution the involves polling. Thanks -- Dale Strickland-Clark Riverhall Systems www.riverhall.co.uk -- http://mail.python.org/mailman/listinfo/python-list

Re: Inter process signalling

2006-09-12 Thread Dale Strickland-Clark
Dale Strickland-Clark wrote: In Linux this is easy with 'signal' and 'kill' but how can I get one Python process to signal another (possibly running as a service)? All I need is a simple prod with no other data being sent and none being returned - except that the signal was delivered

Re: Design Patterns in Python

2006-08-04 Thread Dale Strickland-Clark
(www.amazon.co.uk) -- Dale Strickland-Clark Riverhall Systems - www.riverhall.co.uk -- http://mail.python.org/mailman/listinfo/python-list

Re: write()

2006-07-27 Thread Dale Strickland-Clark
manuhack wrote: Then is there any way to create a directory under XP using Python? import os os.mkdir(C:\\myosisbroken) -- Dale Strickland-Clark Riverhall Systems www.riverhall.co.uk -- http://mail.python.org/mailman/listinfo/python-list

Re: XML/HTML Encoding problem

2006-05-23 Thread Dale Strickland-Clark
I've missed something): You lose the encoding at the top of the output, but since the output is entirely ascii I don't think that matters. -- Dale Strickland-Clark Riverhall Systems www.riverhall.co.uk -- http://mail.python.org/mailman/listinfo/python-list

XML/HTML Encoding problem

2006-05-22 Thread Dale Strickland-Clark
it to remain as #8364; so that the resulting HTML can render properly in a browser.  Is there a way to make the parser not convert the entity references?  Or is there a convenient post processing function that will do the conversion? -- Dale Strickland-Clark Riverhall Systems www.riverhall.co.uk

Re: Win32: Detecting when system is locked or sleeping

2006-05-22 Thread Dale Strickland-Clark
, rogered type of lock which is not voluntary and rather more frequent. -- Dale Strickland-Clark Riverhall Systems www.riverhall.co.uk We're recruiting. See the web site for details. -- http://mail.python.org/mailman/listinfo/python-list

Re: Import data from Excel

2006-05-09 Thread Dale Strickland-Clark
return GetObject(strFilePath).Sheets(1).UsedRange.Value N/A wrote: Hi, Is it possible to import data from Excel for doing numerical analysis in Python? If so how? Thank u! -- Dale Strickland-Clark Riverhall Systems - www.riverhall.co.uk -- http://mail.python.org/mailman/listinfo/python-list

Re: Enumerating Regular Expressions

2006-05-09 Thread Dale Strickland-Clark
that allows you to enumerate all the strings a particular regular expression describes? Cheers, -Blair -- Dale Strickland-Clark Riverhall Systems - www.riverhall.co.uk -- http://mail.python.org/mailman/listinfo/python-list

Re: Why 3.0/5.0 = 0.59999...

2006-05-09 Thread Dale Strickland-Clark
, Davy -- Dale Strickland-Clark Riverhall Systems - www.riverhall.co.uk -- http://mail.python.org/mailman/listinfo/python-list

Re: Python editor recommendation.

2006-05-09 Thread Dale Strickland-Clark
Vim. Everything else is Notepad. DeepBlue wrote: Hi all, Can any one please recommend me an editor for coding Python. Thank u. I have Komodo (www.activestate.com) in my mind. Is the editor any good? regards. -- Dale Strickland-Clark Riverhall Systems www.riverhall.co.uk We're

Re: extracting a substring

2006-04-18 Thread Dale Strickland-Clark
or idioms to use. Thanks a lot! -- Dale Strickland-Clark Riverhall Systems - www.riverhall.co.uk -- http://mail.python.org/mailman/listinfo/python-list

Re: scanning for numerals / letters

2006-04-18 Thread Dale Strickland-Clark
how to scan to see if their entry has numerals and print 'please do not use numbers' if they did. Thanks for your help. -- Dale Strickland-Clark Riverhall Systems - www.riverhall.co.uk We're recruiting programmers. Please see the web site. -- http://mail.python.org/mailman/listinfo/python

Re: sending ctrl C to a program

2006-03-29 Thread Dale Strickland-Clark
to terminate it in python? thanks Isn't SIGINT the same as ctrl-c? So something like import os os.kill(1234, 2) would send ctrl-c to process 1234. If you just want the process to quit, you could probably just send it a SIGTERM, which is signal 15. -- Dale Strickland-Clark Riverhall Systems

Re: Python Evangelism

2006-03-09 Thread Dale Strickland-Clark
rtilley wrote: Psychology is important. Just as important as good design. I think this fact doesn't sink in to the Python community. You speak of fluff and ribbons and glitter. I think most people here are less concerned with psychology and more interested in pychology. -- Dale Strickland

Re: Python Evangelism

2006-03-09 Thread Dale Strickland-Clark
Steve Holden wrote: Any suggestions for improvement? regards Steve Get rid of the scarey face? :-) -- Dale Strickland-Clark Riverhall Systems www.riverhall.co.uk We're recruiting. See the web site for details. -- http://mail.python.org/mailman/listinfo/python-list

Re: beta.python.org content

2006-01-27 Thread Dale Strickland-Clark
Sutra. The new site, however is very nice. Top marks for that. -- Dale Strickland-Clark Riverhall Systems www.riverhall.co.uk -- http://mail.python.org/mailman/listinfo/python-list

Re: Are there anybody using python as the script engine for ASP?

2006-01-08 Thread Dale Strickland-Clark
away after an upgrade. I'm not sure. But we're running live web sites with it right now, as far as I know. -- Dale Strickland-Clark Riverhall Systems - www.riverhall.co.uk -- http://mail.python.org/mailman/listinfo/python-list

Re: How to get the extension of a filename from the path

2005-12-08 Thread Dale Strickland-Clark
for help L. Like this, you mean? import os.path os.path.splitext(c:\\pictures\\mydocs\\test.txt) ('c:\\pictures\\mydocs\\test', '.txt') -- Dale Strickland-Clark Riverhall Systems www.riverhall.co.uk -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem printing in Win98

2005-11-21 Thread Dale Strickland-Clark
like this: win32api.ShellExecute(0, copy, file.ps prn, None, ., 0) It has been a long time since I used Windows, especially 98, but if 'prn' doesn't work, you might try one of: 'lpt', 'lpt1', 'lpt:', 'lpt1:'. -- Dale Strickland-Clark Riverhall Systems - www.riverhall.co.uk -- http

Re: creating/altering the OpenOffice spredsheet docs

2005-10-27 Thread Dale Strickland-Clark
Andy Leszczynski leszczynscyATnospam.yahoo.com.nospam wrote: Any idea how to do that the way ActiveX would be used on M$? A. http://udk.openoffice.org/python/python-bridge.html -- Dale Strickland-Clark Riverhall Systems - www.riverhall.co.uk -- http://mail.python.org/mailman/listinfo

Re: Config parser module

2005-09-23 Thread Dale Strickland-Clark
changing them to python. (I feel perl regex combination is very easy to learn and very powerfull) Any information will be appreciated. -jiro -- Dale Strickland-Clark Riverhall Systems www.riverhall.co.uk We're recruiting Python programmers. See web site. -- http://mail.python.org/mailman

Validating XML parsers

2005-09-19 Thread Dale Strickland-Clark
there are a few DTD validating parsers but that's all. I'm not concerned about speed so much as a reasonably sound implementation. What's out there? Have I missed something? Thanks. -- Dale Strickland-Clark Riverhall Systems - www.riverhall.co.uk -- http://mail.python.org/mailman/listinfo/python-list