Re: Python, Forms, Databases

2006-02-15 Thread Tim Parkin
e is some sample code: http://divmod.org/trac/attachment/wiki/DivmodNevow/FormHandling/Example1.2.tac.py Tim Parkin -- http://mail.python.org/mailman/listinfo/python-list

RE: Determing whether two ranges overlap

2006-02-16 Thread Tim Golden
[Robin Haswell] | I was wondering if you could give me a hand with something. | If I have two | tuples that define a range, eg: (10, 20), (15, 30), I need to | determine | whether the ranges overlap each other. The algo needs to catch: | | (10, 20) (15, 25) | (15, 25) (10, 20) | (10, 25) (15, 2

Re: looping over more than one list

2006-02-16 Thread Tim Chase
> def lowest(s1,s2): > s = "" > for i in xrange(len(s1)): > s += lowerChar(s1[i],s2[i]) > return s > > this seems unpythonic, compared to something like: > > def lowest(s1,s2): > s = "" > for c1,c2 in s1,s2: > s += lowerChar(c1,c2) > return s If I understa

RE: Win32_Process.Create -- not starting process

2006-02-17 Thread Tim Golden
[abcd] | Tim, | I am skipping using the batch file and only executing the python | script directly...and so far it works fine. | | So now I have: | pid, retVal = | wmi.WMI("1.2.3.4").new("Win32_Process").Create(CommandLine="c: | \python\python.exe | c:\some_scri

Re: Queue.Queue()

2006-02-17 Thread Tim Peters
[john peter] > what happens behind the scenes when i create a Queue.Queue() without > specifying a maxsize? does a block of space gets allocated initially then > dynamically "expanded" as needed? Yes. > if so, what is the default size of the initial space? It's initially empty. > is it always

Re: number ranges (was Re: Matlab page on scipy wiki)

2006-02-19 Thread Tim Hochberg
its successors Numarray and Numpy. Since this was originally posted to the numpy list I assume you are familiar with multidimensional indexing of arrays -- that is extended slicing in action. If you really want to learn about it, and for most people it's unnecessary although perhaps enter

Re: editor for Python on Linux

2006-02-20 Thread Tim Parkin
you want flexible debugging in a gui environment it's hard to beat. Tim Parkin -- http://mail.python.org/mailman/listinfo/python-list

Re: number ranges (was Re: Matlab page on scipy wiki)

2006-02-20 Thread Tim Hochberg
[EMAIL PROTECTED] wrote: > Tim Hochberg wrote: > >>Colin J. Williams wrote: >> >> >>>>It would be good if the range and slice could be merged in some way, >>>>although the extended slice is rather complicated - I don't understand it. >>&g

Re: Changing values of 1st column of a matrix using take(mymatrix, (0, ), axis=1)

2006-02-20 Thread Tim Hochberg
Anthony Liu wrote: > I am talking about the 'take' method of numarray. > > See here for more info: > > http://stsdas.stsci.edu/numarray/Doc/node33.html > > If I initialize a matrix 'mymatrix' by zeros((3,3), > type="Float64"), I get a 3*3 matrix of all zeros. > > Look: > > from numarray i

Re: Multiplication optimization

2006-02-20 Thread Tim Roberts
plication operations as in: Integer multiplication is a 1-cycle operation in Intel processors. Even multiple-precision multiplication is very efficient -- probably more so than multiple comparisons and jumps. -- - Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: html parser , unexpected '<' char in declaration

2006-02-21 Thread Tim Roberts
e rest If this is happening with more than one message, you could check for it rather easily with a regular expression, or even just ''.find, and then either insert a closing '>' or delete everything up to the before parsing it. -- - Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

RE: Print a PDF transparently

2006-02-21 Thread Tim Golden
[Daniel Crespo] | | > Have you seen this? | > http://tgolden.sc.sabren.com/python/win32_how_do_i/print.html | > In particular, the section on using win32print directly. | | Yes, I have. The problems is that an external program is launched for | handling the file and print it. [sorry, bit lo

Re: Zope/Plone - Is it the right solution?

2006-02-21 Thread Tim Parkin
lenge you more and you'd have a chance to learn some different approaches to common cs problems. If I were to recommend based on you wanting a project, I'd say zope3. If it's based on getting some content up and editable quickly then I'd say wiki. If you're aiming for a str

Re: number ranges

2006-02-21 Thread Tim Hochberg
that if there were to be one, one that fit together with the existing syntax would be better than making up something new. -tim -- http://mail.python.org/mailman/listinfo/python-list

RE: event/job scheduling

2006-02-23 Thread Tim Golden
| i'd like to do the following kind of event/job scheduling: | run some task(s) (python code) everyday at (say) 8am for (say) a week. | | i need to do this for both windows xp and suse linux | machines. although i know | that i can use cron or its equivalent in windows to kick off | the python i

Re: Detec nonascii in a string

2006-02-23 Thread Tim Chase
> How do I detect non-ascii letters in a string? I want to detect the > condition that a string have a letter that is not here: > string.ascii_letters I don't know how efficient it is, but it's fairly clean: clean_string = ''.join([c for c in some_string if c in string.ascii_letters]) If you

Re: spaces at ends of filenames or directory names on Win32

2006-02-24 Thread Tim Roberts
. 02/24/2006 11:49 PM .. 02/22/2006 10:49 PM 539 x.c 1 File(s)539 bytes 2 Dir(s) 50,937,999,360 bytes free C:\tmp\x> -- - Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: unicode question

2006-02-25 Thread Tim Roberts
x27;ascii', 'backslashreplace') >.decode('ascii')) > >Surely there's a better way than converting back and forth 3 times? I didn't check whether this was faster, although I rather suspect it is not: cvt = lambda x: ord(x)<0x80

wxPython: help(wx) causes segfaulting?

2006-02-26 Thread Tim Chase
Trying to get my feet wet with wxPython (moving from just command-line apps), I tried the obvious (or, at least to me was obvious): Start python, "import wx" and then do a "help(wx)" to see what it can tell me. Unfortunately, it spewed back a handful of errors, gasped, wheezed and died semi-h

Re: spaces at ends of filenames or directory names on Win32

2006-02-26 Thread Tim Roberts
' XXX ' does indeed exist. > >Can anyone rescue me from this madness :( Use double-quotes on Windows, not single-quotes. Single-quotes are taken as just another filename character. -- - Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: SyntaxError: can't assign to a function call

2006-02-26 Thread Tim Roberts
emantics, use for example >> >> f().extend([4]) >> > >Cool, thanks. That's what I did, it's just not an error I'd seen >before. Everywhere else Python evaluates the function call and then >does it's stuff with the result. One thing that can be help

Re: How to do an 'inner join' with dictionaries

2006-02-27 Thread Tim Chase
> Let's say I have two dictionaries: > dict1 is 1:23, 2:76, 4:56 > dict2 is 23:A, 76:B, 56:C > > How do I get a dictionary that is > 1:A, 2:B, 4:C >>> d1={1:23,2:76,4:56} >>> d2={23:"a", 76:"b", 56:"c"} >>> result = dict([(d1k,d2[d1v]) for (d1k, d1v) in d1.items()]) >>> result {1: 'a', 2

Re: PEP 354: Enumerations in Python

2006-02-27 Thread Tim Chase
>>Why are empty enumerations not allowed? Empty sets, empty lists, >>empty dictionaries are all allowed. I don't see any obvious benefits >>to not allowing empty enumerations. > > What is an empty enum? How and when would you use it? It's a Zen thing :) (agh! not the zen thread!) >>> roundS

Re: PEP 354: Enumerations in Python

2006-02-27 Thread Tim Chase
Just a couple thoughts: > An enumeration is an exclusive set of symbolic names bound > to arbitrary unique values. Uniqueness imposes an odd constraint that you can't have synonyms in the set: >>> shades = enum({white:100, grey:50, gray:50, black:0}) Not a bad thing, as it would then have i

Re: PEP 354: Enumerations in Python

2006-02-27 Thread Tim Chase
> Uniqueness imposes an odd constraint that you can't have > synonyms in the set: > > >>> shades = enum({white:100, grey:50, gray:50, black:0}) Blast, I hate responding to my own posts, but as soon as I hit Send, I noticed the syntax here was biffed. Should have been something like >>> sha

Re: how do I factor a number down to one digit?

2006-03-01 Thread Tim Roberts
number to a single digit. Like 123 would >be 1+2+3 returning a 5. Hmm, in most of the rational mathematical universes I've visited, 1+2+3 returns 6, not 5. On the other hand, numerology doesn't really have much of a place in a rational mathematical universe. -- - Tim Roberts, [EMAI

RE: pysqlite problem

2006-03-01 Thread Tim Golden
[EMAIL PROTECTED] | I'm getting the following error: | | pysqlite2.dbapi2.OperationalError: no such table: tbl1 | | Here's my code: | | from pysqlite2 import dbapi2 as sqlite | con = sqlite.connect(":memory:", detect_types=sqlite.PARSE_COLNAMES) | cur = con.cursor() | cur.execute("select * from

RE: pysqlite problem

2006-03-01 Thread Tim Golden
[EMAIL PROTECTED] | my bad. that was the wrong code, here is my code: | | from pysqlite2 import dbapi2 as sqlite | con = sqlite.connect("ex1") | cur = con.cursor() | cur.execute("select * from tbl1") | print cur.fetchall() Just a thought... is the file containing your database called -- exactly

Re: PEP 354: Enumerations in Python

2006-03-01 Thread Tim Chase
>> Do you anticipate having parameters like socket.AF_INET >> that are currently integers, become enumeration members >> in future releases? > > Since these are derived from values defined as integers > in C, it's probably better to leave them that way. There > may be code that relies on them bein

RE: why? [win32com/WMI]

2006-03-01 Thread Tim Golden
[Sergey] | import win32com.client | | loc = win32com.client.Dispatch("WbemScripting.SWbemLocator") | svc = loc.ConnectServer("srv", "root/cimv2", "[EMAIL PROTECTED]", "**") | sys = svc.get("Win32_Process") | sys.create("notepad.exe") | | => | | Traceback (most recent call last): | File "rem

RE: why? [win32com/WMI]

2006-03-02 Thread Tim Golden
[Sergey] | "Tim Golden" <[EMAIL PROTECTED]> wrote in | message news:[EMAIL PROTECTED] | [Sergey] | | >import wmi | >c = wmi.WMI (computer="srv", user="[EMAIL PROTECTED]", password="") | >pid, retval = c.Win32_Process.Create (CommandLin

RE: why? [win32com/WMI]

2006-03-02 Thread Tim Golden
[Sergey] | "Tim Golden" <[EMAIL PROTECTED]> wrote in | message news:[EMAIL PROTECTED] | [Sergey] | | >import wmi | >c = wmi.WMI (computer="srv", user="[EMAIL PROTECTED]", password="") | >pid, retval = c.Win32_Process.Create (CommandLi

RE: why? [win32com/WMI]

2006-03-02 Thread Tim Golden
[Sergey] | Yes, I had run it. | | And, just now I updated python, pythonwin and wmi.py to | latest version. And got: | | >>> a=wmi.WMI() | >>> a.Win32_Process.Create(CommandLine="notepad.exe")# | --- it works | >>> a.Win32_Process.new().Create(CommandLine="notepad.exe") | # it still fail

Re: how do you move to a new line in your text editor?

2006-03-02 Thread Tim Chase
> I use Vim, use spaces, and have no problems. It has a > shorttabstop option, which causes backspace to backspace > to the preceding multiple of spaces when the > curser is after a set of spaces at the beginning of the > line. It feels like I'm using tabs, but I'm not. In addition, within in

Re: newbie question

2006-03-02 Thread Tim Roberts
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.PY;.PYW;.tcl If you give a lone file name without an extension, it will try all of those extensions, in that order, to find an executable. Just add .PY to the end. There is a bug in NT's CMD.EXE that screws up redirection of stdin,

Re: Incorrect Decimal-Float behaviour in comparison tests

2006-03-03 Thread Tim Hochberg
ability to sort lists of heterogeneous objects. One approach would be keep cmp(x,y) permissive in its arguments while making __gt__ and friends strict. Sorting would need to fall back __cmp__, if __lt__ either raised a type error or returned a non int (e.g., numpy arrays). This could probably be done by munging PyObject_RichCompareBool, but I haven't looked into it in any detail. My $0.02 -tim [SNIP] -- http://mail.python.org/mailman/listinfo/python-list

Re: stripping spaces in front of line

2006-03-03 Thread Tim Chase
> wish to ask a qns on strip > i wish to strip all spaces in front of a line (in text file) > > f = open("textfile","rU") > while (1): > line = f.readline().strip() > if line == '': > break > print line > f.close() Yes, that would be a way to do it. > in "

Re: Python advocacy in scientific computation

2006-03-06 Thread Tim Hochberg
lly is released, I can't say -- never having been blessed/cursed with a multiproccessing box, I haven't looked into it. [SNIP] -tim -- http://mail.python.org/mailman/listinfo/python-list

Re: help with loops

2006-03-06 Thread Tim Chase
> I have two files and I want to pull out lines from file 2 > if certain conditions are found if file 1. Well, I'm not quite sure from your description of the problem if you want to compare every line in file1 against every line in file2, or if you just want to compare line1 of file1 with line

Inspect Python Classes for instance data information

2005-05-02 Thread Tim Henderson
inspection part of this little problem. I could just have each class define its own meathod to convert to this format, but that would be a lot of work when i could just make one class that solves the problem for all classes. Is there a way to do this? cheers --- Tim Henderson mail m

Re: Inspect Python Classes for instance data information

2005-05-02 Thread Tim Henderson
posted. cheers Tim Henderson -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Challenge ahead [NEW] for riddle lovers

2005-05-03 Thread Tim Peters
[Chris McAloney] > Okay, so I've been working on level seven for a LONG time now. Hmm. I've been staring at that one 18 hours a day since last Friday, and still don't have the foggiest idea. I've counted boxes, counted pixels, broken it apart and rearranged it like a jigsaw puzzle, ran "strings"

Re: Python Challenge ahead [NEW] for riddle lovers

2005-05-03 Thread Tim Peters
[Tiziano Bettio] > PLEASE HELP... > > What the hell do i have to pronounce in puzzle 5 > > Some useful hints would be awesome That's a funny one: I didn't understand the "pronounce it" hint until long after I solved that one. Then again, Guido & I implemented PEP 307, so I knew what to do th

Re: Python Challenge ahead [NEW] for riddle lovers

2005-05-03 Thread Tim Peters
[Tim Peters, whines about level 7] [Dan Christensen, gives a huge hint] The first time I looked at it, I thought "hmm, I should use PIL for this". I kept thinking that too -- but for some reason wanted to see if there was a clear way to do it without something that "fancy"

Re: Regular Expression tools?

2005-05-03 Thread Tim Henderson
I am not quite sure what you want. However if you are looking for Python's regular expression module it is the re module. Just go to interactive help and view the api for it. cheers Tim Henderson -- http://mail.python.org/mailman/listinfo/python-list

Re: If you use PayPal you might consider an alternative

2005-05-04 Thread Tim Roberts
s: > >www.greenzap.com/benefits That web zite iz juzt too cutezy. I could never truzt it, even if I hadn't learned about it through a newzgroup zpam. -- - Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

RE: Active Directory Modules?

2005-05-09 Thread Tim Golden
[Harlin Seritt] | Does anyone know if there are any Python Active Directory Modules out | there? I looked at LDAP module but there is no version for Python 2.4 | and it's support for Active Directory seems to be lacking a bit. Far from perfect, but functional. Uses pywin32. http://tgolden.sc.sab

Re: Inverse confusion about floating point precision

2005-05-09 Thread Tim Peters
[Skip Montanaro] > I understand why the repr() of float("95.895") is "95.8949996". > What I don't understand is why if I multiply the best approximation to > 95.895 that the machine has by 1 I magically seem to get the lost > precision back. To wit: > >% python >Python 2.3.4 (#

Re: Inverse confusion about floating point precision

2005-05-09 Thread Tim Peters
[Dan] >Dan> The floating-point representation of 95.895 is exactly >Dan> 6748010722917089 * 2**-46. [Skip Montanaro] > I seem to recall seeing some way to extract/calculate fp representation from > Python but can't find it now. I didn't see anything obvious in the > distribution. For Da

RE: windows directories for curr user

2005-05-11 Thread Tim Golden
[Dan Bishop] | flamesrock wrote: | > Hi, | > | > Short, maybe newbish question: Is there a python method for finding | out | > who the current user is in the OS module? | > | > On older windows machines the directory I'm interested in is just | > "c://my documents", but how do I walk to the current

RE: Interactive shell for demonstration purposes

2005-05-11 Thread Tim Golden
[Brian Quinlan] | | Can anyone recommend a Python interactive shell for use in | presentations? | | Ideal characteristics (priority order): | o configurable font size | o full screen mode | o readline support | o syntax coloring | | I've tried ipython but, since it runs inside a console | wind

Re: HELP Printing with wxPython

2005-05-11 Thread Tim G
> Hello all, I'm trying hard to make possible to print some simple text from > python to the default printer using wxPython, after days of internet > searches I found this page: http://wiki.wxpython.org/index.cgi/Printing but > is impossible to use this script even if I do exactly as said there. I

RE: Interactive shell for demonstration purposes

2005-05-11 Thread Tim Golden
[Jp Calderone] | | [Tim Golden ] | | >[Brian Quinlan] | >| | >| Can anyone recommend a Python interactive shell for use in | >| presentations? | | > I Googled and came across this: | > | >http://codespeak.net/py/current/doc/execnet.html | > | >which might get you start

Re: reg mail sending without smtp module

2005-05-11 Thread Tim Williams
- Original Message - From: "John Abel" <[EMAIL PROTECTED]> > praba kar wrote: > > >Dear All, > > > > Is it possible to send a message as a mail > >with out smtplib module? If you find out any module > >for mail sending(without smtplib) kindly mail me. > > > >regards > >Prabahar

Re: Regarding Mail sending smtplib Module

2005-05-11 Thread Tim Williams
praba kar <[EMAIL PROTECTED]> wrote: >Here I want to avoid this line "Received: from unknown >(HELO prabahar.enmail.com) (59.92.13.47) by >mailserver with SMTP; 11 May 2005 10:09:11 - " How >can I do this? . Why python give this line? . Mail >sending Module in php will not give this type

RE: windows directories for curr user

2005-05-12 Thread Tim Golden
[flamesrock] | | Thanks for the code Tom. | | Unforunately, I get the following error message when trying to import | win32com in idle: | | >>> from win32com.shell import shell, shellcon | | Traceback (most recent call last): | File "", line 1, in -toplevel- | from win32com.shell import s

RE: Finding startup files

2005-05-12 Thread Tim Golden
[Mike Meyer] [... snip discussions of where to put config files ...] | Yes, but Windows these days supports multiple users. Are you sure that | you want to restrict your users to one configuration file per | installed version of the program? | | I'm not sure Windows has a good solution to this p

Re: How "return" no return ?

2005-05-12 Thread Tim Williams
"Ximo" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hello, I want that the return sentence don't return anything, how can I do > it?. If i do only return it returns None, and pass don't run too. > > Can anyone help me?, thanks. > XIMO > Just don't use a return statement at all, o

Re: How "return" no return ?

2005-05-12 Thread Tim Williams
- Original Message - From: "Corrado Gioannini" <[EMAIL PROTECTED]> > On Thu, May 12, 2005 at 04:42:34PM +0100, Tim Williams wrote: > > Just don't use a return statement at all, or do something like > > > > [function body] > > if not val

RE: python and printers

2005-05-13 Thread Tim Golden
[Alex Moreno] | | i´m writing an applications under wxphython and i need to print some | data in an external printer (usb, parallel, i suppose that it doesn´t | mind. Excuse me for the (maybe) stupid question but, how can i do it? | where can i found information about it? Seems to be a popular su

RE: newbie - insert variable in pathname

2005-05-13 Thread Tim Golden
[EMAIL PROTECTED] | | Hello all, | I have a username variable luser: | | luser = win32api.GetUserName | | I need to insert it into the following to replace the hardcoded | "johndoe" in the pathname of GIS.GIS.Parcels: | | GIS_GIS_Parcels = "Database | [EMAIL PROTECTED] | .GIS.Parcels" Just in

Re: Problems with csv module

2005-05-14 Thread Tim Roberts
he canonical csv application. It can read a UCS-16 csv file, but it mishandles it. It doesn't split at the commas. It treats each line as a single cell. -- - Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: reg mail sending without smtp module

2005-05-14 Thread Tim Roberts
o out in a very small number of ways. On a Unix system, you can use SMTP, or you can call /usr/sbin/sendmail directly. On Windows, you can use SMTP, or you can use MAPI. There is no "magic" sink into which you can pour e-mail. -- - Tim Roberts, [EMAIL PROTECTED] Providenza & Bo

RE: Problem listing services with wmi

2005-05-17 Thread Tim Golden
[Jean-Sébastien Guay] | | I installed Tim Golden's wmi module | (http://tgolden.sc.sabren.com/python/wmi.html), in the hopes it would | help me list and work with services on my Win32 machine. Now, | everything seems fine except for one thing : Listing services! | | import wmi |

RE: Problem listing services with wmi

2005-05-17 Thread Tim Golden
[Jean-Sébastien Guay] [... snip Larry Bates' suggestion of removing whitespace ...] | Out of curiosity, is there any reason why whitespace between | the method | name and parameter list parentheses isn't good? Because the code I | posted before was copy-pasted from Tim Golden'

RE: Problem listing services with wmi

2005-05-17 Thread Tim Golden
[... snip results ...] | So it would seem that the 3 methods give the same result. As to which | service it has gotten to when it gets to position 88 in the list, | obviously I can't find out with a script, and it seems that the list | isn't in any order I can see, so I couldn't even venture a

Re: processing a Very Large file

2005-05-17 Thread Tim Peters
[DJTB] > I'm trying to manually parse a dataset stored in a file. The data should be > converted into Python objects. > > Here is an example of a single line of a (small) dataset: > > 3 13 17 19 -626177023 -1688330994 -834622062 -409108332 297174549 955187488 > 589884464 -1547848504 857311165 585

RE: Problem listing services with wmi

2005-05-18 Thread Tim Golden
[... snip my comparison of win32service & WMI ...] | Seems like your hunch was right, the first loop completes correctly. | Adding a counter to both loops shows that getting services from | win32service.EnumServicesStatus() gets 108 services, and getting them | through WMI gets to 87 and then h

RE: Problem listing services with wmi

2005-05-18 Thread Tim Golden
[Jean-Sébastien Guay] | Hi again Tim, Nice to hear back from you. | Any reason I should know about that you haven't updated to | 2.4? I just got into Python, so I got the latest version, but if there's | something wrong with 2.4 I'd like to know... No; there's no prob

RE: [ZODB-Dev] ZODB memory problems (was: processing a Very Largefile)

2005-05-22 Thread Tim Peters
[Jeremy Hylton] > ... > The ObjectInterning instance is another source of problem, because it's > a dictionary that has an entry for every object you touch. Some vital context was missing in this post. Originally, on c.l.py, DJTB wasn't using ZODB at all. In effect, he had about 5000 lists each

Re: how to config a comserver in a customize dll?

2005-05-22 Thread Tim Roberts
'SplitString' ] >_reg_progid_ = "TestPythonCom.Application" ># NEVER copy the following ID ># Use "print pythoncom.CreateGuid()" to make a new one. >_reg_clsid_ = "{93D78ABA-1F6C-4B1C-97C7-C3700511415A}" > >def SplitString(self, val): >

RE: py2exe for WMI

2005-05-24 Thread Tim Golden
| Hello All. | I'm trying to 'compile-to-EXE' a python program which uses | Win32 & WMI to | pull system info. from the PC such as serial number, CPU | speed, etc. I'm | having problems with py2exe -- with regard to Win2000 & WinXP | platforms. It | seems that the program only works if I hav

RE: [ZODB-Dev] ZODB memory problems (was: processing a Very Largefile)

2005-05-24 Thread Tim Peters
[Jeremy Hylton] > ... > It looks like your application has a single persistent instance -- the > root ExtendedTupleTable -- so there's no way for ZODB to manage the > memory. That object and everything reachable from it must be in memory > at all times. Indeed, I tried running this program under

RE: py2exe for WMI

2005-05-24 Thread Tim Golden
[Thomas Heller] [... snip problems with py2exe & WMI ...] | The OP of the thread Tim mentions here already had a solution, if I | understood him correctly, and the other things that were suggested | didn't work. Basically, IIUC, he did add the typelib | wrappers from the | '

RE: py2exe for WMI

2005-05-25 Thread Tim Golden
[Thomas Heller] | | Tim Golden schrieb: | > [Thomas Heller] | > | > [... snip problems with py2exe & WMI ...] | > | > | The OP of the thread Tim mentions here already had a | solution, if I | > | understood him correctly, and the other things that were | sugges

Re: __init__() not called automatically

2005-05-25 Thread Tim Leslie
is looks like __init__ being called automatically to me. Are you doing something different? > Similarly, why do we have to explicitly use the 'self' keyword > everytime? http://www.python.org/doc/faq/general.html#why-must-self-be-used-explicitly-in-method-definitions-and-calls

Re: Trouble with regexes

2005-05-26 Thread Tim Roberts
e.compile(r'(\r)[^\n]', re.IGNORECASE) > >it still matches a string such as r'\r\n' Hint: the string r'\r\n' contains four characters. It contains neither carriage return nor newline. Bigger hint: the string '\r\n' contains two characters. -- - Tim Rob

Re: Python Challenge 10?

2005-05-26 Thread Tim Peters
[Greg Ewing] > Can someone give me a hint for No. 10? My MindBlaster > card must be acting up -- I can't seem to tune into > the author's brain waves on this one. There are hints on the site; for level 10, http://www.pythonchallenge.com/forums/viewtopic.php?t=20 > I came up with what I thoug

Re: prime number

2005-05-29 Thread Tim Leslie
s it getting the loop to run through correctly? Is it some other problem? Tim > > -- > http://mail.python.org/mailman/listinfo/python-list > -- http://mail.python.org/mailman/listinfo/python-list

Re: How do you drive-by-wire a car using Python ?

2005-05-30 Thread Tim Churches
onomous vehicle pausing to do garbage collection: http://www.shoalhaven.nsw.gov.au/council/sections/waste/images/garbage_truck_lifting_bin_1.jpg Tim C -- http://mail.python.org/mailman/listinfo/python-list

Re: Generalized Linear Least Squares Problems

2005-05-31 Thread Tim Leslie
scipy, in particular the linear algebra package. http://www.scipy.org/documentation/apidocs/scipy/scipy.linalg.html Cheers, Tim > TIA, > venkat. > > -- > http://mail.python.org/mailman/listinfo/python-list > -- http://mail.python.org/mailman/listinfo/python-list

RE: Monitoring a USB-drive / Card-reader using python?

2005-06-01 Thread Tim Golden
[Thomas W] | I want to monitor a given USB-device, like a Memory Card-reader, and | when a memory card is inserted I want to move the data on the | card to a | different location on the filesystem ( or do something else with the | files). | | Does anybody know how to do this ( on Linux and/or win

Re: Pressing A Webpage Button

2005-06-01 Thread Tim Roberts
you send the encoded parameters as the body of the HTTP request. You probably need to do some reading on HTTP, and the GET and POST methods of transmitting parameters. -- - Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: BUG pythonw vs subprocess

2005-06-01 Thread Tim Roberts
or message is quite accurate: non-console Win32 apps don't have stdin and stdout. The handles are invalid. -- - Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Strange KeyError using cPickle

2005-06-01 Thread Tim Peters
[Rune Strand] > I'm experiencing strange errors both with pickle and cPickle in the > below code: > > > import cPickle as pickle > #import pickle > from string import ascii_uppercase > from string import ascii_lowercase > > def createData(): >d1 = list("Something's rotten") >d2 = tuple('in

Re: Strange KeyError using cPickle

2005-06-01 Thread Tim Peters
[Tim Peters] >> What is "XWwz"? Assuming it's a bizarre typo for "open", change the >> 'w' there to 'wb'. Pickles are binary data, and files holding pickles >> must be opened in binary mode, especially since: >> >>&

viewing generated images

2005-06-01 Thread Tim Flynn
pplication. Otherwise I'm also interested if anyone has any ideas about the root cause of this problem because if I don't find some work around I intend to try to fix it in Tkinter. Thanks, Tim -- http://mail.python.org/mailman/listinfo/python-list

Re: dictionaries and threads

2005-06-01 Thread Tim Peters
[Gary Robinson] > I know the Global Interpreter Lock ensures that only one python thread > has access to the interpreter at a time, which prevents a lot of > situations where one thread might step on another's toes. Not really. The CPython implementation's C code relies on the GIL in many ways t

Re: viewing generated images

2005-06-02 Thread Tim Flynn
Fredrik Lundh wrote: > Tim Flynn wrote: > >>def createWidgets(self): >>self.image_size = (50,50) >>self.pilim = Image.new( "1", self.image_size ) >> >># Generate a blank image >>f = lambda(x): 0 >>

RE: tempfile.gettempdir() result on Windows

2005-06-03 Thread Tim Golden
[Leo Breebaart] | | On MS Windows, I am trying to find out a good default location to | save some temporary files. | | The tempfile module seemed to have exactly what I wanted: | | >>> import tempfile | >>> tempfile.gettempdir() | 'c:\\docume~1\\admini~1\\locals~1\\temp' | >>> | | My problem (e

RE: tempfile.gettempdir() result on Windows

2005-06-03 Thread Tim Golden
| Does anybody know how I can obtain a temp directory in 'verbose' | | format (or somehow convert the gettempdir() result to that)? | [Tim Golden] | Have a look at win32api.GetLongPathName | (from the pywin32 extensions, in case it wasn't | obvious). So something like this:

Re: Python interest group software

2005-06-03 Thread Tim Churches
could be used effectively for such purposes, since it provides both Web and email interfaces for ad hoc interest groups. Not good for weedy types, though. Tim C -- http://mail.python.org/mailman/listinfo/python-list

Re: Python interest group software

2005-06-03 Thread Tim Churches
air number of people now suspect meetup.com of taking advantage of them, by introducing completely unreasonable fees (in relation to what is offered in return) - see http://slashdot.org/article.pl?sid=05/04/13/0359253&tid=187&tid=215&tid=98 Tim C -- http://mail.python.org/mailman/listinfo/python-list

Re: BUG pythonw vs subprocess

2005-06-04 Thread Tim Roberts
x27;s not connected to anything... >> >So then it's not possible to get pythonw apps eg tkinter guis to use >subprocess properly? Seems a bit daft to me. There's no absolute requirement that a tkinter app use pythonw. If you call them with python.exe, they'll get a stdin and stdout. -- - Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Help with pythonpath

2005-06-04 Thread Tim Roberts
u either need to use different names for the two packages (pkg1, pkg2), or use a symbolic link to link spkg2 into the src directory. -- - Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Requirements for Software Coding Standards?

2005-06-06 Thread Tim Couper
Does anyone have any knowledge of where to find details of docs like "Requirements for Software Coding Standards", etc applicable for work within the US govt (preferably non-military). Thanks in advance Dr Tim Couper UK -- No virus found in this outgoing message. Checked by AVG

Re: SMTP help please

2005-06-07 Thread Tim Williams
- Original Message - From: "Martin Franklin" <[EMAIL PROTECTED]> > server.sendmail(fromaddr, toaddrs, msg) You can use this if you don't need to worry about whether the email was successfully sent to all recipients. Otherwise, you need something like this (untested and partly copied

Re: SMTP help please

2005-06-07 Thread Tim Williams
- Original Message - From: "Tim Williams" <[EMAIL PROTECTED]> > > try: > s.close() > except > pass Typo!! That should be s.quit() not s.close() :) -- http://mail.python.org/mailman/listinfo/python-list

RE: Dr. Dobb's Python-URL! - weekly Python news and links (Jun 7)

2005-06-07 Thread Tim Golden
[Simon Brunning] | Subject: Dr. Dobb's Python-URL! - weekly Python news and links (Jun 7) [... snipped whole thing ...] Just wanted to say thank you to Simon and all the other people who have edited the Python-URL! weekly digest over the years. Despite my being a pretty much constant reader of c.

Re: anygui,anydb, any opinions?

2005-06-08 Thread Tim Roberts
tarting to consider the version mess: try to >install xCHM, Boa Constructor, aMule, VLC and some other app together... >instant madness. They why would you do it? gvim and wxPython do the job for me. No mess. -- - Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

<    34   35   36   37   38   39   40   41   42   43   >