Re: exercise: partition a list by equivalence

2005-02-18 Thread David Eppstein
In article <[EMAIL PROTECTED]>, David Eppstein <[EMAIL PROTECTED]> wrote: > It can be solved by union-find > (e.g. with UnionFind from <http://www.ics.uci.edu/~eppstein/PADS/>): Here's a cleaned up version, after I added a proper iter() method to the UnionFind data

newbie question on python 2.4 and tkinter

2005-02-18 Thread David Joyner
python 2.4 and tkinter. - David Joyner -- http://mail.python.org/mailman/listinfo/python-list

Re: exercise: partition a list by equivalence

2005-02-19 Thread David Eppstein
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: > David Eppstein: > > However it might be easier to treat the input pairs as the edges of a > > graph and apply a depth-first-search based graph connected components > > algorithm. || This would be O(n), thoug

PyEphem on Win32

2005-02-20 Thread David Flory
under Linux. I am running ActivePython 2.3.5 Build 236 on a WinXP SP2 system with Visual Studio 6 patched to sp6. - --- David Flory -BEGIN PGP SIGNATURE- Version: PGP 8.1 iQA/AwUBQhlQ31e2/rcN3lp8EQJElQCgjRVn5alvDdcCUIuPie5XAnyGJV8AoN5Z HXZz9RD02fr1cKf

Re: exercise: partition a list by equivalence

2005-02-22 Thread David Eppstein
-working > versions from SIX people: Reinhold, bear.+, Brian Beck, David Eppstein, > yourself, and me. Only David's uses stuff that's not in the Python 2.4 > off-the-shelf distribution. Where "stuff" means a single 62-line file that I linked to in my post. -

print and str subclass with tab in value

2005-02-23 Thread David Bolen
;>> x = str('testing\t') >>> print x,1 testing[TAB]1 so I'm guessing it's part of some optimization of tab handling in print output, although a quick perusal of the Python source didn't have anything jump out at me. It seems to me that this is p

Re: [perl-python] generic equivalence partition

2005-02-24 Thread David Eppstein
eqv.append([i]) If you really want the ranges to be 1 to n, add one to each number in the returned list-of-lists. -- David Eppstein Computer Science Dept., Univ. of California, Irvine http://www.ics.uci.edu/~eppstein/ -- http://mail.python.org/mailman/listinfo/python-list

Re: [perl-python] generic equivalence partition

2005-02-24 Thread David Eppstein
In article <[EMAIL PROTECTED]>, David Eppstein <[EMAIL PROTECTED]> wrote: > def parti(aList,equalFunc): > eqv = [] > for i in range(len(aList)): > print i,eqv > for L in eqv: > if equalFunc(aList[i],aList[L[0]])

Re: cannot open file in write mode, no such file or directory

2005-03-01 Thread David Bolen
tion several thousand times), a quick check for this condition would be to trap the IOError, delay a few seconds (say 5-10 to be absolutely sure, although in the cases I've run into 2-3 is generally more than enough), and retry the operation. If that succeeds, then this might be the issue you

reuse validation logic with descriptors

2005-03-01 Thread David S.
utes across multiple classes? Thanks, David S. -- http://mail.python.org/mailman/listinfo/python-list

Re: Google Technology

2005-03-01 Thread David Fraser
[EMAIL PROTECTED] wrote: I am just wondering which technologies google is using for gmail and Google Groups??? The short answer: They use computer technology!!! :-) David -- http://mail.python.org/mailman/listinfo/python-list

Re: reuse validation logic with descriptors

2005-03-01 Thread David S.
Steven Bethard gmail.com> writes: > > David S. wrote: > > I am looking for a way to implement the same simple validation on many > > instance attributes and I thought descriptors > > (http://users.rcn.com/python/download/Descriptor.htm) looked like the > >

Re: yield_all needed in Python

2005-03-01 Thread David Eppstein
ple generators could have yield_all's to the same iterator) but I think it could be made nearly constant time in most situations. On the other hand, I'm not convinced that this would be needed frequently enough to warrant the complexity of trying to optimize it. -- David Epps

Re: reuse validation logic with descriptors

2005-03-01 Thread David S.
taken reading http://users.rcn.com/python/download/Descriptor.htm about 4 times along with your help to get this straight. Peace, David S. -- http://mail.python.org/mailman/listinfo/python-list

Re: reuse validation logic with descriptors

2005-03-02 Thread David S.
re a little confused about properties and descriptors. > > regards > Steve Quite confused, actually, which was the reason for my original post. Thanks again to those who helped me and any other confused folks understand this bit of Python that much better. Peace, David S. -- http://mail

winnt win32process.createProcess with stdout to file ?

2005-03-03 Thread david . humpherys
os:winnt python2.3.2 I have a exe that dumps info to the command line. I want to run this process and capture the stdout into a file. I think i'm close... any help appreciated. dh -- import win32process, win32file, win32se

Re: winnt win32process.createProcess with stdout to file ?

2005-03-03 Thread david . humpherys
, startInfo) ERROR: pywintypes.error:(2, 'createProcess', ' the system cannot find the file specified.;) it's strange that it gets this error even though i have the win32file.OPEN_ALWAYS flag set.. any suggestions... (soo... close!! ) thanks, thanks! david -- http://mail.python.org/mailman/listinfo/python-list

Re: winnt win32process.createProcess with stdout to file ?

2005-03-04 Thread david . humpherys
Aweseome! Many many thanks Roger ! You've made my day. The last thing that you may be able to help with... I'm using win32api.TerminateProcess(hProcess,3) to kill this process if it gets outta hand... but when i do so.. it seems that the stdout/stderr don't capture the output. here's my last chun

Re: Gordon McMillan installer and Python 2.4

2005-03-04 Thread David Bolen
uto-convert the .dsw/.dsp files but there's at least one dependency (zlib) that you might have to build separately and handle manually (e.g., update the project to locate your particular zlib library). -- David -- http://mail.python.org/mailman/listinfo/python-list

Re: global variables

2005-03-07 Thread David S.
M.N.A.Smadi grads.ece.mcmaster.ca> writes: > I need to have a varaible that will contain a value that will be > modified in one file, and when coming back to the same file it > should retain the same value. You must import the module in which the variable lives and qualify it appropriately.

Secondary list sorting comparison expression

2005-03-08 Thread David Pratt
hant', 'written_number': 'two'}] What I am looking for would sort on more than one key so, say 'price' and 'animal' so that the list would be ordered with the three items at 1.50 each but records would be giraffe, hippopotamus and zebra. If I wanted to sort on three indexes, say 'price', 'animal' and 'written number' and say last two animals were both zebras that it would put this in the correct order also. I am have to say I have read a good deal about sorting today but have not come across a solution and have seen only limited comparison expressions to know what could work. Regards, David -- http://mail.python.org/mailman/listinfo/python-list

Re: Secondary list sorting comparison expression

2005-03-08 Thread David Pratt
Hi Raymond. I appreciate your reply. Yes, this is exactly what I was looking for. The syntax I had been trying to work out myself was not correct and not giving me the right thing. Many thanks for your help - this works just the way I wanted. David On Tuesday, March 8, 2005, at 03:46 PM

Re: How to upgrade python on Redhat?

2005-03-09 Thread David Fraser
[EMAIL PROTECTED] wrote: This question applies specifically to RHEL 3.0 (actually Whitebox), but also generally to Redhat and probably pretty much every distribution that uses python for distribution-related tasks (configuration managers, rpm package management, yum, etc). So I want to upgrade to p

email.Message.set_charset and Content-Transfer-Encoding

2005-03-09 Thread David Bolen
nyone aware of a reason why the encoding shouldn't adjust in response to a set_charset call similar to how a supplied charset initially establishes it at message creation time? -- David -- http://mail.python.org/mailman/listinfo/python-list

Re: [perl-python] a program to delete duplicate files

2005-03-10 Thread David Eppstein
strong hash algorithm (SHA-256 maybe?) and compare the hashes. -- David Eppstein Computer Science Dept., Univ. of California, Irvine http://www.ics.uci.edu/~eppstein/ -- http://mail.python.org/mailman/listinfo/python-list

pythonwx with database starting point

2005-03-11 Thread David Pratt
be run as an exe from a local Windows machine. I would appreciate links to any existing material that could assist me in getting started with some code. Many thanks. Regards, David -- http://mail.python.org/mailman/listinfo/python-list

Re: [perl-python] a program to delete duplicate files

2005-03-11 Thread David Eppstein
of the files exist in only one copy, it's clear that the cheap hash will find them more cheaply than the expensive hash. In that case you could combine the (file size, cheap hash) filtering with the expensive hash and get only two reads per copy rather than three. -- David Eppstein Comput

Re: [perl-python] a program to delete duplicate files

2005-03-11 Thread David Eppstein
're doing any comparisons at all, you're not minimizing the number of comparisons. -- David Eppstein Computer Science Dept., Univ. of California, Irvine http://www.ics.uci.edu/~eppstein/ -- http://mail.python.org/mailman/listinfo/python-list

Re: a program to delete duplicate files

2005-03-14 Thread David Eppstein
s 2(m-1) reads and very little computation better than m reads and a strong hash computation? I haven't yet seen an answer to this, but it's a question for experimentation rather than theory. -- David Eppstein Computer Science Dept., Univ. of California, Irvine http://www.ics.uci.edu/~eppstein/ -- http://mail.python.org/mailman/listinfo/python-list

Re: a program to delete duplicate files

2005-03-14 Thread David Eppstein
suming very strong cryptographic hashes, good enough that you can trust equal results to really be equal without having to verify by a comparison. -- David Eppstein Computer Science Dept., Univ. of California, Irvine http://www.ics.uci.edu/~eppstein/ -- http://mail.python.org/mailman/listinfo/python-list

Re: a program to delete duplicate files

2005-03-14 Thread David Eppstein
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (John J. Lee) wrote: > > If you read them in parallel, it's _at most_ m (m is the worst case > > here), not 2(m-1). In my tests, it has always significantly less than > > m. > > Hmm, Patrick's right, David

Re: compiled open source Windows lisp (was Re: Python becoming less Lisp-like)

2005-03-15 Thread David Golden
James Graves wrote: > > But coverage in this area (compiled CL) is a bit thin, I'll admit. > But who really cares? After all, there are the mature commercial proprietary lisp compilers for those people who insist on using closedware OSes, and they've already proven they're willing to use close

Re: Pre-PEP: Dictionary accumulator methods

2005-03-19 Thread David Eppstein
but if you were to take that minimalist philosophy to an extreme you wouldn't need count either, you could just appendlist then use len. -- David Eppstein Computer Science Dept., Univ. of California, Irvine http://www.ics.uci.edu/~eppstein/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Pre-PEP: Dictionary accumulator methods

2005-03-19 Thread David Eppstein
In article <[EMAIL PROTECTED]>, "Raymond Hettinger" <[EMAIL PROTECTED]> wrote: > Also, in all of my code base, I've not run across a single opportunity to use > something like unionset(). In my code, this would be roughly tied with appendlist for frequency of

Re: Number of colors in an image

2004-11-29 Thread David Bolen
elements in the histogram; I believe the > length of the resulting list will be constant (ie 256). Oops, definitely yes. -- David -- http://mail.python.org/mailman/listinfo/python-list

Re: subclassing extension type and assignment to __class__

2004-11-29 Thread David Bolen
ntion fully automated with 2-3 lines of code? In particular, __getattr__ would seem good for your use since it is only called for attributes that couldn't already be located. I've had code that wrapped underlying objects in a number of cases, and always found that to be a pretty robus

Restricted Execution on the cheap

2004-11-30 Thread David Pokorny
ion a watcher daemon that kills and restarts the email-python-runner under any of the following conditions: stdout > 50 MB email-python-runner's heap is > 50 MB email-python-runner gets stuck on a single program for more than 5 minutes If you're interested in hacking such a devic

recombination variations

2004-11-30 Thread David Siedband
aces the set of things it's working on with the output from the unambiguate_bp. It's a bit confusing. I'd like it to be clearer. Is there a better way to do this? -- David Siedband generation-xml.com def unambiguate_bp(seq, bp): seq_set = [] for i in alphabet[seq[b

Re: Help on creating a HTML by python

2004-11-30 Thread David Fraser
sting thumbnails stored inside JPEG or TIFF files without generating them yourself, which is much faster. Most digital cameras nowadays generate these thumbnails... David -- http://mail.python.org/mailman/listinfo/python-list

Re: module imports and memory usage

2004-11-30 Thread David Bolen
but there's no guarantee that the memory will actually be released (either by Python or the OS). Unless you're working under very specific external resources, I'd generally leave this to the OS. It will figure out when some of your working set is unused for extended periods and generally it should end up in swap space if you actually need the memory for something else. -- David -- http://mail.python.org/mailman/listinfo/python-list

Re: non blocking read()

2004-12-01 Thread David Bolen
urn ''.join(bytes) Wouldn't this still block if the input just happened to end at a multiple of the read size (1024)? -- David -- http://mail.python.org/mailman/listinfo/python-list

Re: Time zones

2004-12-01 Thread David Bolen
rmation. >>> import time >>> print time.tzname ('UTC', '') >>> print time.ctime() Wed Dec 01 22:42:21 2004 (I've used 2.4 here, but the same results work back until 1.5.2) -- David -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Win32 Silent Install

2004-12-01 Thread David Ascher
stributions as part of a more complex contract (we also maintain a repository of Perl modules for easy installation of binary packages, etc.). -- David Ascher Managing Director & Chief Technologist ActiveState -- Dynamic Tools for Dynamic Languages [*] That expression is fun, but reminds m

Re: Python Win32 Silent Install

2004-12-02 Thread David Fraser
've often done is combine other people's extensions into my package by importing stuff from their distutils setup scripts. Now that pywin32 is using distutils this should be possible too :-) David -- http://mail.python.org/mailman/listinfo/python-list

Re: date diff calc

2004-12-02 Thread David Fraser
Peter Hansen wrote: Tim Peters wrote: [Peter Hansen] I think Skip was intending that the format string be mandatory, to avoid such ambiguity. It's still a bottomless pit -- ask Brett, who implemented the Python strptime . True, I did overlook timezones at the time. On the other hand, that's b

Re: Dr. Dobb's Python-URL! - weekly Python news and links (Dec 2)

2004-12-02 Thread David Fraser
e "upgrade" See the slashdot story: http://slashdot.org/article.pl?sid=04/12/02/149210&tid=217&tid=95 The important thing is that you (or I) can still access them at groups.google.co.uk: http://groups.google.co.uk/groups?frame=right&th=e562a771d1c827c9 etc Maybe the URLs on the web pa

Re: installing 2.4

2004-12-02 Thread David Bolen
;t disable the option, should re-establish file associations and what not back to a 2.3 installation. -- David -- http://mail.python.org/mailman/listinfo/python-list

Re: Dr. Dobb's Python-URL! - weekly Python news and links (Dec 2)

2004-12-03 Thread David Fraser
adid/$messageid#$messageid At least for me, these URLs are transferable between computers / browsers You can also access the message directly: http://groups-beta.google.com/group/comp.lang.python/msg/2c1679d365ffe9dd David -- http://mail.python.org/mailman/listinfo/python-list

Re: inheritance problem with 2 cooperative methods

2004-12-03 Thread David Fraser
Dan Perl wrote: Here is a problem I am having trouble with and I hope someone in this group will suggest a solution. First, some code that works. 3 classes that are derived from each other (A->B->C), each one implementing only 2 methods, __init__ and setConfig.

Re: We what judge the language using which question?

2004-12-03 Thread David Fraser
hlddn wrote: unicode or other? we what judge? thank all You need to usually know the encoding from the context, otherwise you'll have to guess. In this regard I find http://www.eki.ee/letter/ helpful But if you want more details, you'll need to provide a clearer question ... Dav

Processes/pipes cross platform issue - popen*() hangs using "rsh/rlogin" (not working in Windows vs. Linux)

2004-12-03 Thread David H
Background. I'm running on WinXP w/ MS Services for Unix installed (to give rsh/rlogin ability), both Python 2.3 and 2.4 version. In linux, I'm running RHEE with python2.3 version. The code below works fine for me in linux, but in WinXP the popen*() command "hangs". More specifically, I get an

Re: pythonwin broke

2004-12-03 Thread David Bolen
for all users and this is under 2K (my NT box has everything but 2.4). -- David -- http://mail.python.org/mailman/listinfo/python-list

Re: Help with generators outside of loops.

2004-12-07 Thread David Eppstein
l terminate without any error messages and the cause of its termination can be very difficult to track down. -- David Eppstein Computer Science Dept., Univ. of California, Irvine http://www.ics.uci.edu/~eppstein/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Help with generators outside of loops.

2004-12-08 Thread David Eppstein
her back in the call chain is looking for StopIteration. Which could be the case if the call chain includes a for-loop that is calling the next() method of another generator. -- David Eppstein Computer Science Dept., Univ. of California, Irvine http://www.ics.uci.edu/~eppstein/ -- http://mail.p

Re: guarding for StopIteration (WAS: Help with generators outside of loops.)

2004-12-08 Thread David Eppstein
In article <[EMAIL PROTECTED]>, Steven Bethard <[EMAIL PROTECTED]> wrote: > David Eppstein wrote: > > I've made it a policy in my own code to always surround explicit calls > > to next() with try ... except StopIteration ... guards. > > > > Otherwis

Re: VC++ 6.0 and 2.4

2004-12-09 Thread David Fraser
Jive wrote: Theoretically, if I messed around with the 2.4 project until I got it to build under MS VC++ 6.0, would the python.exe play correctly with version 2.4 .pyd extensions? It should play correctly with version 2.4 .pyd extensions that have been built with MS VC++ 6.0. David -- http

Re: Fun with Outlook and MAPI

2004-12-10 Thread David Fraser
win32 somehow but I can't remember where and its late. Should also be a cookbook entry. Maybe Google can help :-) David -- http://mail.python.org/mailman/listinfo/python-list

Re: building python extensions with .net sdk compiler?

2004-12-11 Thread David Fraser
t you either need to hack distutils/msvccompiler.py, or your registry. So using MinGW seems like the better option ... is it working for Python 2.4? David -- http://mail.python.org/mailman/listinfo/python-list

Re: New versions breaking extensions, etc.

2004-12-15 Thread David Bolen
., permitting local versions), even with that operation, if a named DLL was available loaded into memory, it would be used by a subsequent process attempting to reference it regardless of the state of the filesystem. -- David -- http://mail.python.org/mailman/listinfo/python-list

Re: Winge IDE Issue - an suggestions?

2004-12-16 Thread David Bolen
ur project so it won't bother you again. This was discussed a bit more in depth recently in the "False Exceptions" thread on this group. See: http://groups-beta.google.com/group/comp.lang.python/browse_frm/thread/f996d6554334e350/e581bea434d3d248 -- David -- http://mail.python.org/mailman/listinfo/python-list

Re: Socket being garbage collected too early

2004-12-16 Thread David Bolen
l be removed when the function/method returns, at which point there will be no references to the socket object, and yes, it will be destroyed. But if sock_list is global, and continues to exist when do_stuff completes, then the reference it contains to the socket will keep the socket object ali

Re: A completely silly question

2004-12-17 Thread David Bolen
rses package, and maybe wrap it If you want to guarantee you'll get the next console character without any waiting under Windows there's an msvcrt module that contains functions like kbhit() and getch[e] that would probably serve. -- David -- http://mail.python.org/mailman/listinfo/python-list

Re: uptime for Win XP?

2004-12-13 Thread David Bolen
articular, a general rule (as has already been posted) is that any out parameters are aggregated along with the overall result code into a result tuple. -- David -- http://mail.python.org/mailman/listinfo/python-list

newbie question

2004-12-19 Thread David Wurmfeld
ave to manually interrogate each iteration for the proper type before I test? Think about it; the interpreter has to evaluate disparate types for equality. How exactly does the it "know" that for this iteration, x is an integer, and the evaluation (if x == 'spam') is False, and doesn't throw an exception for a type mismatch? Thanks in advance for your insight, David, Melbourne, Florida. -- http://mail.python.org/mailman/listinfo/python-list

Re: threading priority

2004-12-20 Thread David Bolen
ally releasing the GIL in the code I've written for the thread's run() (maybe during the I/O) which opens up an opportunity, or it may be that Windows is boosting the other thread occasionally to avoid starvation. So I expect the normal thread is getting occasional bursts of bytecode execution (the syscheckinterval). But clearly the OS level prioritization is largely driving things. -- David -- http://mail.python.org/mailman/listinfo/python-list

Re: A completely silly question

2004-12-20 Thread David Bolen
lausible to me, and his example was using it in a while loop which I took to represent processing some input one character at a time. In any event - I also gave a way (Windows-specific) to truly obtain the single next character without any buffering, so just ignore any controversy in the first part of the response if desired. -- David -- http://mail.python.org/mailman/listinfo/python-list

Installing new version, erasing previous versions of Python

2004-12-21 Thread David Smith
nd the hard link, and 2) that previous versions of python are not deleted. Therefore I should be able to install 2.4 without deleting 2.2.2. If I wish to delete 2.3.4, I have to rm -r the appropriate directories. Any caveats? Is there any crosstalk between 2.2.2 and 2.4 modules? Thank you. -- David Smith 1845 Purdue Ave #3 Los Angeles Calif 90025-5592 (310) 478-8050 -- http://mail.python.org/mailman/listinfo/python-list

Out of Office AutoReply: Mail Delivery (failure [email protected])

2004-12-24 Thread David Bate
Title: Out of Office AutoReply: Mail Delivery (failure [EMAIL PROTECTED]) I will be out of the office starting November Dec. 21st  and will return on Jan 5th.  -- http://mail.python.org/mailman/listinfo/python-list

Re: Python To Send Emails Via Outlook Express

2004-12-25 Thread David Fraser
iling list as well, then maybe your changes can be incorporated into pywin32? Happy christmas David -- http://mail.python.org/mailman/listinfo/python-list

Re: Python IDE

2004-12-28 Thread David JH
On the subject can somebody here who uses SPE (or just has some python knowledge) help me out with the installation process? I tried following http://spe.pycs.net/extra/manual/manual.html#windows but end up with the error: python /c/system/python24/Lib/site-packages/_spe/winInstall.py Traceb

Re: Python IDE

2004-12-28 Thread David JH
On the subject can somebody here who uses SPE (or just has some python knowledge) help me out with the installation process? I tried following http://spe.pycs.net/extra/manual/manual.html#windows but end up with the error: python /c/system/python24/Lib/site-packages/_spe/winInstall.py Traceb

Re: where's "import" in the C sources?

2004-12-29 Thread David Bolen
ese files can be found in the dist/src/Python directory in the Python source tree. -- David -- http://mail.python.org/mailman/listinfo/python-list

Re: build a static executable program with python

2004-12-30 Thread David Fraser
t building a static executable available? Thanks for any hints, Torsten. Just have a look at py2exe, it does basically what you're asking for - see the link to the wiki from the py2exe home page for more information... David -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem in threading

2004-12-30 Thread David Bolen
esources. Threads are first class OS objects at the kernel and scheduler level (waitable and manageable). I can't think of anything offhand specific that OS/2 did with respect to threads that isn't as well supported by current Win32 systems. -- David -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there a better way of listing Windows shares other than using "os.listdir"

2004-12-30 Thread David Bolen
tion and toolkit in use. For wxPython, http://wiki.wxpython.org/index.cgi/LongRunningTasks covers several of the options (and the theory behind them is generally portable to other toolkits although implementation will change). -- David -- http://mail.python.org/mailman/listinfo/python-list

Re: Securing a future for anonymous functions in Python

2004-12-30 Thread David Bolen
made it simpler to handle simple manipulation of callback arguments (e.g., since I often ignore a successful prior result in a callback in order to just move on to the next function in sequence). -- David -- http://mail.python.org/mailman/listinfo/python-list

Re: Event-Driven Woes: making wxPython and Twisted work together

2004-12-30 Thread David Bolen
.runUntilCurrent() reactor.doIteration(0) def __del__(self): self.timer.Stop() reactor.stop() wx.wxApp.__del__(self) and you can try adjusting the timer interval for the best mix of CPU load versus latency. -- David -- http://mail.python.org/mailman/listinfo/python-list

Re: Pre-PEP: Dictionary accumulator methods

2005-03-20 Thread David Eppstein
here several times, of changing the dict's behavior so that the setdefault is automatic whenever trying to access a missing key. If this would be in a separate module or separate subclass of dict, so much the better. -- David Eppstein Computer Science Dept., Univ. of California, Irvine

Re: FAQ 1.7.3 : How can I have modules that mutually import each other

2005-03-21 Thread david . tolpin
in current Python are far from being on the level a modern programming language (such as Common Lisp, for example) demands. David Tolpin http://davidashen.net/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Python RegExp

2005-03-22 Thread David Chipping
Jeff, Thanks very much for that, I didn't even consider the option of it finishing, considering I'm using a much slower machine it was running for over 2 minutes when I just killed it! I think I get the rest now. Cheers again, -David On Tue, 22 Mar 2005 17:52:22 -0600, Jeff Epl

Re: Python limericks (was Re: Text-to-speech)

2005-03-23 Thread David Fraser
;t pronounce any other punctuation, and cheat by pronouncing the first string in the last line as "junk" :-) rhymes is for line in rhymes fines fines is print line is eval line for line in rhymes fines print line is eval line whine is junk so print rhymes fines whine whine David -- http://mail.python.org/mailman/listinfo/python-list

Re: MinGW building with Python 2.4

2005-03-23 Thread David Fraser
Next: I tried pymingw: didn't work :( Any ideas? Since the only official way to do this is pymingw, you should at least give feedback of the steps you followed, and what didn't work David -- http://mail.python.org/mailman/listinfo/python-list

embedded python example: PyString_FromString doesnt work?

2005-03-23 Thread David Harris
I'm trying the embedded python example here: http://www.python.org/doc/2.3.2/ext/pure-embedding.html int main(int argc, char *argv[]) { PyObject *pName, *pModule, *pDict, *pFunc; PyObject *pArgs, *pValue; int i; if (argc < 3) { fprintf(stderr,"Usage: call pythonfile funcna

Re: embedded python example: PyString_FromString doesnt work?

2005-03-24 Thread David Harris
On Thu, 24 Mar 2005 06:39:47 -0800, Brano Zarnovican wrote: > Hi David ! > > I cannot see anything wrong on your code. So, I'm posting my working > example. > > Hint: try to determine, why it is returning NULL (the PyErr_Print() > call) > > BranoZ > OK you

Re: embedded python example: PyString_FromString doesnt work?

2005-03-25 Thread David Harris
On Fri, 25 Mar 2005 11:09:35 +0300, Denis S. Otkidach wrote: > DH> Calling the program gives an error; > DH> "[EMAIL PROTECTED]:~/source/python> ./test_String script1.py multiply 4 > DH> 5 import went bang... > DH> ImportError: No module named script1.py" > DH> script1.py exists and it is in the

Max files in unix folder from PIL process

2005-03-28 Thread David Pratt
on the list. Regards, David. -- http://mail.python.org/mailman/listinfo/python-list

Re: itertools to iter transition (WAS: Pre-PEP: Dictionary accumulator methods)

2005-03-28 Thread David Eppstein
hat happens with any class name) iter(x) is almost never going to return an object of that type. -- David Eppstein Computer Science Dept., Univ. of California, Irvine http://www.ics.uci.edu/~eppstein/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Max files in unix folder from PIL process

2005-03-28 Thread David Pratt
whether it will work. Regards, David On Monday, March 28, 2005, at 07:18 PM, Kane wrote: I ran into a similar situation with a massive directory of PIL generated images (around 10k). No problems on the filesystem/Python side of things but other tools (most noteably 'ls') don't cope ve

Re: distutils: package data

2005-03-30 Thread David Fraser
of course. Any hints? Actually you probably want to look at describing the .pyd as an Extension. Then you can even give distutils the instructions to build it, and as a side effect you can install it to the right location This may not be what you want though David -- http://mail.python.org/mailman/listinfo/python-list

return the last item in a list

2005-03-30 Thread David Bear
I've googled for the above and get way too many hits.. I'm looking for an 'easy' way to have the last item in a list returned. I've thought about list[len(list)-1] but thought there would be a more gracefull way. -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem with national characters

2005-03-31 Thread david . tolpin
> Is there a way around this problem? put import sys sys.setdefaultencoding('UTF-8') into sitecustomize.py in the top level of your PYTHONPATH . -- http://mail.python.org/mailman/listinfo/python-list

mod_python and zope

2005-03-31 Thread David Bear
m not really good at experimenting without destroying things. -- David Bear phone: 480-965-8257 fax:480-965-9189 College of Public Programs/ASU Wilson Hall 232 Tempe, AZ 85287-0803 "Beware the IP portfolio, everyone will be suspect of trespassing" -- http://mail.python.org/mailman/listinfo/python-list

Re: Queue.Queue-like class without the busy-wait

2005-04-01 Thread David Bolen
signalable construct) to be most efficient for these operations - which is what I use the Win32 Event for. -- David - - - - - - - - - - - - - - - - - - - - - - - - - import thread import win32event as we class Buffer: """A thread safe unidirectional data buffer

Re: Silly question re: 'for i in sys.stdin'?

2005-04-03 Thread David Trudgett
d work-around on the man page was? Use sys.stdin.readline() in a "while 1:" loop, as you have below: > >while True: > line = sys.stdin.readline() > if line == '': break > doSomethingWith(line) David -- David Trudgett http://www.zeta.org

checkbook manager

2005-04-03 Thread David Isaac
I'd like to try personal financial management using Python. I just found PyCheckbook, but it does not support check printing. Is there a Python check printing application kicking around? Thanks, Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: checkbook manager -> cross platform printing

2005-04-04 Thread David Isaac
"Alan Isaac" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I'd like to try personal financial management using Python. > I just found PyCheckbook, but it does not support check printing. > Is there a Python check printing application kicking around? OK, I'll assume silence means "

Re: change extensions

2005-04-04 Thread David Wilson
ame) new_pathname = old_pathname[:-len(suffix)] + new_suffix os.rename(old_pathname, new_pathname) David. -- http://mail.python.org/mailman/listinfo/python-list

Unexpected result when comparing method with variable

2005-04-04 Thread David Handy
name of c.f, then the comparison fails. So, is this a bug or expected? If I complain about this, would I get any sympathy? ;) regards, David H. -- http://mail.python.org/mailman/listinfo/python-list

Re: Unexpected result when comparing method with variable

2005-04-04 Thread David Handy
On Tue, Apr 05, 2005 at 03:38:09PM +1200, Tony Meyer wrote: > [David Handy] > > I had a program fail on me today because the following didn't > > work as I expected: > > > > >>> class C: > > ... def f(self): > > ... pass >

cross platform printing

2005-04-05 Thread David Isaac
"Alan Isaac" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I'd like to try personal financial management using Python. > I just found PyCheckbook, but it does not support check printing. > Is there a Python check printing application kicking around? OK, I'll assume silence means "

<    7   8   9   10   11   12   13   14   15   16   >