Re: Filename case-insensitivity on OS X

2006-01-03 Thread Tom Anderson
FOO" will >> create two files. > > You may also find some native Mac OS X applications failing in strange > ways. Oh, that's why. :( tom -- It involves police, bailiffs, vampires and a portal to hell under a tower block in Hackney. -- http://mail.python.org/mailman/listinfo/python-list

Re: itertools.izip brokeness

2006-01-04 Thread Tom Anderson
yield tuple(map(getnext, xiters)) else: raise StopIteration def hasnext(xit): return xit.hasNext() def getnext(it): return it.next() def izip_peek(*xiters): xiters = map(xiter, xiters) while True: z = t

Re: Calling GPL code from a Python application

2006-01-04 Thread Tom Anderson
the use of the library, without sharing its address space! On the flip side, we could argue that an application which uses a dynamic library *is* a derivative work, since we need a header file from the library to compile it, and that header file is covered by the GPL. What happpens when you compile with a non-GPL but compatible header (say, one you've clean-roomed) but link to a GPL library at runtime, though? tom -- I am the best at what i do. -- http://mail.python.org/mailman/listinfo/python-list

Re: Memoization and encapsulation

2006-01-04 Thread Tom Anderson
(and mutable objects generally) being unhashable is brokenness. I do think there's room for a range of opinion, though, and i'm not sure what i think is right. tom -- Rapid oxidation is the new black. -- some Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: Help wanted with md2 hash algorithm

2006-01-07 Thread Tom Anderson
py I guess the thing to do is extract the C code from the RFC and compile it, verify that it works, then stick loads of print statements in the C and the python, to see where the states of the checksum engines diverge. tom -- Death to all vowels! The Ministry of Truth says vowels are plus un

Re: Help wanted with md2 hash algorithm

2006-01-10 Thread Tom Anderson
On Sun, 8 Jan 2006, Tom Anderson wrote: > On Fri, 6 Jan 2006 [EMAIL PROTECTED] wrote: > >> below you find my simple python version of MD2 algorithm as described >> in RFC1319 (http://rfc1319.x42.com/MD2). It produces correct results >> for strings shorter than 16 Byt

Re: try: except :

2006-01-10 Thread Tom Anderson
;s happened. Or ... class ImpossibleException(Exception): def __init__(self, *args): raise ImpossibleException, args Although crashing the interpreter is probably overkill. tom -- Like Kurosawa i make mad films; okay, i don't make films, but if i did they'd have a samurai. -- http://mail.python.org/mailman/listinfo/python-list

Re: how do "real" python programmers work?

2006-01-13 Thread Tom Anderson
enter "testcompressor()" (or, in most cases, hit up-arrow and return) to reload and test. You can obviously extend this a bit to make the test routine take parameters which control the nature of the test, so you can easily test a range of things, and you can have multiple different tes

Re: how do "real" python programmers work?

2006-01-13 Thread Tom Anderson
On Thu, 12 Jan 2006, Mike Meyer wrote: > well, we need a term for development environment built out of Unix > tools Disintegrated development environment? Differentiated development environment? How about just a development environment? tom -- NOW ALL ASS-KICKING UNTIL THE END --

Re: how do "real" python programmers work?

2006-01-13 Thread Tom Anderson
ndalone program. Ah, of course - to an true believer, emacs *is* the unix toolset. :) tom -- NOW ALL ASS-KICKING UNTIL THE END -- http://mail.python.org/mailman/listinfo/python-list

Re: On Numbers

2006-01-16 Thread Tom Anderson
of making ints and floats do the right thing when the answer would be complex, but as a pragmatic decision, it might not be the right thing to do. It evidently wasn't thought it was when python's current number system was designed. I think Tim Peters has an opinion on this. tom -- Socialism - straight in the mainline! -- http://mail.python.org/mailman/listinfo/python-list

Re: Arithmetic sequences in Python

2006-01-16 Thread Tom Anderson
On Mon, 16 Jan 2006, it was written: > There's something to be said for that. Should ['a'..'z'] be a list or a > string? And while we're there, what should ['aa'..'zyzzogeton'] be? tom -- Socialism - straight in the mainline! -- http://mail.python.org/mailman/listinfo/python-list

Re: Arithmetic sequences in Python

2006-01-16 Thread Tom Anderson
ke to see lazy lists used here - these look like lists, and can be used exactly like a list, but if all you want to do is iterate over them, they don't need to instantiate themselves in memory, so they're as efficient as an iterator. The best of both worlds! I've written a sketch of a

Re: Arithmetic sequences in Python

2006-01-16 Thread Tom Anderson
*IF* we truly needed an occasional "up to X *INCLUDED*" > sequence, it should be in a syntax that can't FAIL to be noticed, such > as range(X, endincluded=True). How about first,,last? Harder to do by mistake, but pretty horrible in its own way. tom -- Socialism - straight in the mainline! -- http://mail.python.org/mailman/listinfo/python-list

Re: On Numbers

2006-01-17 Thread Tom Anderson
;t change the fact that x**0.5 as is meant here is > the principal (positive) real square root, and that can be true whether > your hierarchy of numeric types includes a complex type or not. Er, actually, i meant to write -1, but evidently missed a key, and failed to check what

Re: Web application design question (long)

2006-01-17 Thread Tom Anderson
m Generator: http://www.elsewhere.org/pomo tom -- Taking care of business -- http://mail.python.org/mailman/listinfo/python-list

Re: Arithmetic sequences in Python

2006-01-17 Thread Tom Anderson
On Tue, 16 Jan 2006, it was written: > Tom Anderson <[EMAIL PROTECTED]> writes: > >> The natural way to implement this would be to make .. a normal >> operator, rather than magic, and add a __range__ special method to >> handle it. "a .. b" would tr

Re: Arithmetic sequences in Python

2006-01-17 Thread Tom Anderson
> > which would be equivallent to > > for i in sequence.range() & (::2): Oh, that is nice. Still, you could also extend enumerate to take a range as an optional second parameter and do this with it. Six of one, half a dozen of the other, i suppose. tom -- Taking care of business -- http://mail.python.org/mailman/listinfo/python-list

Re: On Numbers

2006-01-18 Thread Tom Anderson
On Wed, 18 Jan 2006, Steven D'Aprano wrote: > On Tue, 17 Jan 2006 23:34:40 +0000, Tom Anderson wrote: > >>>> So I don't really know what point you are making. What solution(s) for >>>> 1**0.5 were you expecting? >>> >>> He's p

Re: Returning a tuple-struct

2006-01-21 Thread Tom Anderson
style. Changing the constructor to take *values rather than values, and to validate the length of the value tuple against the length of the index tuple, would be good, but, since i'm lazy, is left as an exercise to the reader. tom -- Throwin' Lyle's liquor away is like pickin' a fight with a meat packing plant! -- Ray Smuckles -- http://mail.python.org/mailman/listinfo/python-list

Re: Arithmetic sequences in Python

2006-01-21 Thread Tom Anderson
return f(*args) return starred_f Which lets us write: mysecondtable = map(star(list), mytable) While we're here, we should also have the natural complement of star, its evil mirror universe twin: def bearded_star(f): def bearded_starred_f(*args): ret

Re: Arithmetic sequences in Python

2006-01-21 Thread Tom Anderson
On Sat, 21 Jan 2006, it was written: > Tom Anderson <[EMAIL PROTECTED]> writes: > >>> listx/dictx/setx would be the display forms as well as the constructor >>> forms. >> >> Could these even replace the current forms? If you want the equivalent &g

Re: Numarray, numeric, NumPy, scpy_core ??!!

2006-01-21 Thread Tom Anderson
LAS compiled in). I would wait for it. Pardon my failure to RTFM, but does NumPy pick up the vecLib BLAS on Macs? tom -- It's the 21st century, man - we rue _minutes_. -- Benjamin Rosenbaum -- http://mail.python.org/mailman/listinfo/python-list

Re: OT: excellent book on information theory

2006-01-21 Thread Tom Anderson
in the basket *gently*. Your second construction isn't the equivalent of the Rowling sentence, though, where the adverb goes right after the verb; that would make it "Sally, put gently the flower in the basket", which would be completely awful. Or maybe it would be "Sally,

Re: Numarray, numeric, NumPy, scpy_core ??!!

2006-01-22 Thread Tom Anderson
On Sat, 21 Jan 2006, Robert Kern wrote: > Tom Anderson wrote: > >> Pardon my failure to RTFM, but does NumPy pick up the vecLib BLAS on Macs? > > Yes. Excellent, thanks. tom -- forget everything from school -- you are programmer -- http://mail.python.org/mailman/listinfo/python-list

String handling and the percent operator

2006-07-13 Thread Tom Plunket
ht forward (inline-appropriate) way to count the number of '%s'es in the 'boilerplate' strings? ...or maybe a different and more Pythonic way to do this? (Maybe I could somehow use generators?) thx. -tom! -- http://mail.python.org/mailman/listinfo/python-list

Re: String handling and the percent operator

2006-07-13 Thread Tom Plunket
27;fair'] for w in words: yield w message = "%s %s %s %s" print message % SentenceGenerator() (I ask because the above doesn't work)? -tom! -- http://mail.python.org/mailman/listinfo/python-list

Deferred imports

2006-07-14 Thread Tom Plunket
global_imports.has_key(module): do_stuff_to_import_module ...then I'm not so worried about putting it into every constructor. Otherwise I'll do this trick, starting myDeferredModule = None and only do the import if not None. Thanks! -tom! -- http://mail.python.org/mailman/listinfo/python-list

Re: String handling and the percent operator

2006-07-14 Thread Tom Plunket
Justin Azoff wrote: > Of course.. > > I should read the python documentation at > http://docs.python.org/lib/typesseq-strings.html Excellent. Thanks. Has this been around long? I "learned" Python in the 1.6 days iirc, but haven't done much except simple scri

Re: String handling and the percent operator

2006-07-14 Thread Tom Plunket
eld v v += 1 NextId = NewId().next BUTTON_OK = NextId() BUTTON_CANCEL = NextId() BUTTON_YAY = NextId() Hence my question being "something like" rather than "something equivalent to". Alas, little did I know that the answer I was looking for was not even up the same path. -tom! -- http://mail.python.org/mailman/listinfo/python-list

PyGTK Classes Problems

2006-07-21 Thread Tom Grove
get_date() self.wTree.get_widget("winCal").destroy() if __name__ == '__main__': app = winCal() A

serial ports, threads and windows

2006-08-02 Thread Tom Brown
ng threads with Qt on Windows is a problem? 3) Threads in python on Windows is a problem? Any ideas? Thanks, Tom -- http://mail.python.org/mailman/listinfo/python-list

Re: serial ports, threads and windows

2006-08-09 Thread Tom Brown
On Wednesday 02 August 2006 16:02, Tom Brown wrote: > I've written a python app that r/w eight serial ports to control eight > devices using eight threads. This all works very nicely in Linux. I even > put a GUI on it using PyQt4. Still works nicely. > > Then I put the app on

Re: How to fill a form

2006-08-14 Thread Tom Brown
for a form, I use wireshark (www.wireshark.org) to capture the POST I do manually the first time. However, I think I'm going to look into mechanize/clientform now that I know about it. Hope this helps, Tom -- http://mail.python.org/mailman/listinfo/python-list

Permission Denied

2006-08-19 Thread Tom Strickland
gram. I switched to the root directory and tried again, but got the same result.I ran a very similar program earlier and it ran fine. What am I doing wrong? The program is: #!/usr/bin/python2.4 i=1 while i<1: print 'step 1',i i+=1 raw_input() print 'step 2'

Unicode strings, struct, and files

2006-10-08 Thread Tom Plunket
sage: myFile.write(struct.pack('>H', ord(unicode(c ? Thanks from a unicode n00b, -tom! -- http://mail.python.org/mailman/listinfo/python-list

Re: Unicode strings, struct, and files

2006-10-09 Thread Tom Plunket
cked that you don't have more than 32 > characters in each "line" (2) padding with unichr(0) is acceptable. This works frighteningly well. ;) -tom! -- http://mail.python.org/mailman/listinfo/python-list

Re: C++ to Python?

2006-10-10 Thread Tom Plunket
print '\n', '\t'*indent, stripped files = glob.glob('*.cpp') for f in files: ConvertBraces(f) ...that may well get you started. ;) For fancy stuff like comment matching I'll suggest the re library. -tom! -- http://mail.python.org/mailman/listinfo/python-list

Re: Is a list static when it's a class member?

2006-10-10 Thread Tom Plunket
class scope like the OP has done: > > class A: > > name = "" > > data = [] You define them when you attach them to an instance, e.g. class A: def __init__(self): self.member1 = 'a' def ThisWorksToo(self): self.member2 =

Re: Is a list static when it's a class member?

2006-10-12 Thread Tom Plunket
understand that pulling the trigger will yield a large hole in the back of your skull." My reading of the OP's post was that shared attributes were not desired. -tom! -- http://mail.python.org/mailman/listinfo/python-list

Re: Adding Worksheets to an Excel Workbook

2006-10-17 Thread Tom Plunket
#x27;t save > xl.Application.Quit() # quit Excel You've got a lot of sleep calls in there- did you find that things behaved erratically without them? I haven't done any Office automation with Python, but my DevStudio stuff has always worked a treat without the sleep calls. -tom! -- http://mail.python.org/mailman/listinfo/python-list

cross-linked version of the python documentation

2006-10-20 Thread tom arnall
Is there a cross-linked version of the python documentation available? Is anyone interested in starting a project for such? tom arnall north spit, ca usa -- Posted via a free Usenet account from http://www.teranews.com -- http://mail.python.org/mailman/listinfo/python-list

Re: cross-linked version of the python documentation

2006-10-20 Thread tom arnall
Simon Brunning wrote: > On 10/20/06, tom arnall <[EMAIL PROTECTED]> wrote: >> Is there a cross-linked version of the python documentation available? Is >> anyone interested in starting a project for such? > > What do you mean by cross-linked? If the term e.g. 'sp

Re: What's the best IDE?

2006-10-25 Thread tom arnall
r going the unit-testing/'live code' route, which obviates the need for a debugger and other clutter found in all of the IDEs i've seen. Also, you might think about writing your own unit-tester. It's not difficult in python and will give you a setup tailored to your own tastes.

Win32 COM

2006-11-01 Thread Tom Plunket
on every machine before it'll work, but if that's what I need to do, well, so be it. However, at this time I'm stumped as to what to try except that I can have a dirty-feeling try/except bit to "enable" that call... thx, -tom! -- http://mail.python.org/mailman/listinfo/python-list

Re: CSV module, DictReader problem (bug?)

2006-11-01 Thread Tom Plunket
uble backslashing 'C:\\Temp\\Book1.csv' but it's > uglier. ...alternatively you can just use 'unix slashes', e.g. 'c:/temp/book1.csv', since those work just fine 'cause the Windows APIs deal with them properly. -tom! -- http://mail.python.org/mailman/listinfo/python-list

Re: Win32 COM

2006-11-02 Thread Tom Plunket
Tom Plunket wrote: > I don't know anything about COM beyond the fact that I can look in the > OLE/COM browser to maybe figure out the API that an object has that I > need to operate on. I'm still not entirely sure what's going on, because there are some methods and prope

object data member dumper?

2006-11-07 Thread tom arnall
does anyone know of a utility to do a recursive dump of object data members? -- Posted via a free Usenet account from http://www.teranews.com -- http://mail.python.org/mailman/listinfo/python-list

Re: object data member dumper?

2006-11-07 Thread tom arnall
Bruno Desthuilliers wrote: > tom arnall a écrit : >> does anyone know of a utility to do a recursive dump of object data >> members? >> > > What are "object data members" ? (hint: in Python, everything is an > object - even functions and methods). >

Re: object data member dumper?

2006-11-07 Thread tom arnall
Steve Holden wrote: > Bruno Desthuilliers wrote: >> tom arnall a écrit : >> >>>does anyone know of a utility to do a recursive dump of object data >>>members? >>> >> >> >> What are "object data members" ? (hint: in Python,

Re: object data member dumper?

2006-11-09 Thread tom arnall
Steve Holden wrote: > tom arnall wrote: >> Steve Holden wrote: >> >> >>>Bruno Desthuilliers wrote: >>> >>>>tom arnall a écrit : >>>> >>>> >>>>>does anyone know of a utility to do a recursive dump of objec

Re: to py or not to py ?

2006-06-28 Thread Tom Plunket
d from the other thread... def RequestFile(self, name): self.fileQueue.append(name) # called during the IO thread def GetNextFile(self); next = self.fileQueue[0] self.fileQueue.pop(0) return next ? -tom! -- http://mail.python.org/mailman/listinfo/python-list

Chapter 9 Tutorial for Classes Not Working

2006-06-30 Thread Tom Grove
() must be called with MyClass instance as first argument (got nothing instead) Please help...this is killing me! -Tom -- http://mail.python.org/mailman/listinfo/python-list

2006 ICFP Programming Contest registration opens

2006-07-03 Thread Tom 7
Language lovers: Registration is now open for the 9th Annual ICFP Programming Contest! http://icfpcontest.org/ The contest, associated with the International Conference on Functional Programming, will be held on the weekend of July 21-24. The contest task will be released at noon EDT on Frid

Perl Dictionary Convert

2006-07-05 Thread Tom Grove
; Messages = 0; Size = 0; UIDNext = 1; UIDValidity = 287898056; Unseen = 0; }; Contacts = { Class = IPF.Contact; Messages = 0; Size = 0; UIDNext = 1; UIDValidity = 287898056; Unseen = 0; }; } -Tom -- http://mail.python.org/mailman/listinfo

Re: A Sort Optimization Technique: decorate-sort-dedecorate

2006-08-27 Thread Tom Cole
Well you cross-posted this enough, including a Java group, and didn't even ask about us... What a pity. In Java, classes can implement the Comparable interface. This interface contains only one method, a compareTo(Object o) method, and it is defined to return a value < 0 if the Object is considere

HTTPS Login

2006-08-31 Thread Tom Grove
This just doesn't seem to work. It just brings me back to a login screen. If you can lend a hand it would be much appreciated. -Tom -- http://mail.python.org/mailman/listinfo/python-list

wx.Process.Kill on Win32

2006-11-21 Thread Tom Plunket
y with it all until I tried to implement the 'Cancel' button. Any more info, now several years after those threads I turned up? thx, -tom! -- http://mail.python.org/mailman/listinfo/python-list

Re: Programmatically replacing an API for another module

2006-11-22 Thread Tom Plunket
tp://python-mock.sourceforge.net/ > > Oh yeah, and the download link for python-mock is: > http://sourceforge.net/project/showfiles.php?group_id=138804 Heh, yeah I'm sure that's what I got when I went to sf.net and typed in the project name, then submitted a bug for the homepag

type(foo) == function ?

2006-11-29 Thread Tom Plunket
, line 1, in ? NameError: name 'function' is not defined Is there a way I can know if 'foo' is a function? thanks, -tom! -- http://mail.python.org/mailman/listinfo/python-list

Re: type(foo) == function ?

2006-11-29 Thread Tom Plunket
s "check box" if the value is a function ...I've still gotta figure out the exact API, this is for a plugin sort of system that'll be used by the manually-driven version of the build process and this data is explicitly to build the UI for the various tools that are available. thanks, -tom! -- http://mail.python.org/mailman/listinfo/python-list

Re: object data member dumper?

2006-12-12 Thread tom arnall
George Sakkis wrote: > tom arnall wrote: >> >object data member dumper? >> >George Sakkis george.sakkis at gmail.com >> >Wed Nov 8 03:42:47 CET 2006 >> >> > tom arnall wrote: >> > >> > > Bruno Desthuilliers wrote: >> > &g

Problem understanding how closures work

2006-12-12 Thread Tom Plunket
the locals given by that function (is this a closure?) are changed each iteration of the loop, whereas if the function definition is isn't looped over, I get the behavior I desire. Can anyone provide any insight for me? thanks, -tom! First, the output: Test 1 doesn't work the way I would

Re: Problem understanding how closures work

2006-12-12 Thread Tom Plunket
replaced by (count - 1). Ah, I got it. Thanks. Thanks too to Gabriel. -tom! -- http://mail.python.org/mailman/listinfo/python-list

textwrap.dedent replaces tabs?

2006-12-16 Thread Tom Plunket
cially considering there's no way to turn off the undesired changes, but were the changes /not/ made, the same text could just be passed through TextWrapper and have them removed... thx, -tom! -- -- http://mail.python.org/mailman/listinfo/python-list

Re: textwrap.dedent replaces tabs?

2006-12-16 Thread Tom Plunket
s this so you can mix tabs and spaces in Python source. Why anyone would intentionally do that, though, I'm not sure. ;) -tom! -- -- http://mail.python.org/mailman/listinfo/python-list

Re: textwrap.dedent replaces tabs?

2006-12-18 Thread Tom Plunket
eplacement though, that started with textwrap.dedent(), removed the expandtabs() call, and Does The Right Thing with tabs vs. spaces (e.g. it doesn't treat a tab at the beginning of a line as the same as eight spaces). -tom! -- -- http://mail.python.org/mailman/listinfo/python-list

Re: textwrap.dedent replaces tabs?

2006-12-18 Thread Tom Plunket
it not useful. Stripping all leading spaces from text is as easy as calling lstrip() on each line: text = '\n'.join([line.lstrip() for line in text.split('\n')]) alas, that isn't what I am looking for, nor is that what textwrap.dedent() is intended to do. -tom! -- -- http://mail.python.org/mailman/listinfo/python-list

Re: textwrap.dedent replaces tabs?

2006-12-23 Thread Tom Plunket
o\n\tWorld" expected = "\tHello\nWorld" self.failUnlessEqual(expected, dedent(input, False)) def testFirstLineNotIndented(self): input = "Hello\n\tWorld" expected = input self.failUnlessEqual(expected, dedent(input, False)) def testMixedTabsAndSpaces(self): input = " \t Hello\n \tWorld" expected = "\t Hello\n \tWorld" self.failUnlessEqual(expected, dedent(input, False)) if __name__ == '__main__': unittest.main() -tom! -- -- http://mail.python.org/mailman/listinfo/python-list

Re: textwrap.dedent replaces tabs?

2006-12-25 Thread Tom Plunket
of thing in not-many-more- lines-than-the-original-code-that-does-not-operate-to-its-published- specification. -tom! -- -- http://mail.python.org/mailman/listinfo/python-list

Installing python.org distro over ActivePython?

2006-12-26 Thread Tom Plunket
has what appears to be a considerably newer release than ActiveState in the first place, so I was wondering if I could just install this entire package right over the ActiveState installation, and everything would Just Work? thanks, -tom! -- -- http://mail.python.org/mailman/listinfo/python-list

Re: getting a process's PID

2006-12-28 Thread Tom Plunket
; >>> I understand you're probably set, but instead of using readlines() you could also do this: g = os h = g.read().split('\n') and then your 'h' list would not have newlines. -tom! -- -- http://mail.python.org/mailman/listinfo/python-list

Re: DOS, UNIX and tabs

2006-12-28 Thread Tom Plunket
can have their preferred tabstop width, be it 8, 4, or 2 spaces. Ironically, it has always seemed to me then that tabs are superior for python editing, since mixing tabs and spaces in an environment like this means that stuff won't run, whereas in C it'll still compile even if the code loo

Re: textwrap.dedent replaces tabs?

2006-12-28 Thread Tom Plunket
h is as much a statement about the lack of statement about how you actually tested it as it is that an implementation was made apparently without understanding of the requirements. -tom! -- -- http://mail.python.org/mailman/listinfo/python-list

Re: how to serve image files without disk use?

2006-12-29 Thread Tom Plunket
t it's where I'd start looking. Good luck, -tom! -- -- http://mail.python.org/mailman/listinfo/python-list

Re: A stupid question

2006-12-29 Thread Tom Plunket
something on this machine, but it was slow as death and only had dialup and I really didn't want to deal with downloading and installing that stuff myself. ...of course your first problem is buying a machine with a ton of shovelware on it. Second problem is uninstalling stuff without k

Re: Starting a child process and getting its stdout?

2006-12-29 Thread Tom Plunket
indows, that is required if you want to prevent a console window from popping up if you're running in a GUI app. -tom! -- import subprocess import sys import time if len(sys.argv) == 1: # no command line arg means, "we're the parent process."

Re: Starting a child process and getting its stdout?

2006-12-29 Thread Tom Plunket
Tom Plunket wrote: > while p.poll() == None: > data = p.stdout.readline() > if data: > print data, If you change that print to something more decorated, like, print 'process said:', data, Then it might be more

Re: Starting a child process and getting its stdout?

2006-12-29 Thread Tom Plunket
ubprocess.Popen(["python", "tobeforked.py"], ... By default, python will execute in buffered mode if it's attached to a pipe. Start it with the '-u' command line option and you may be good to go. (`python -h` for more info on this, man pages may also discuss i

Re: textwrap.dedent replaces tabs?

2006-12-29 Thread Tom Plunket
ding". Right, but 'common leading whitespace' is a broader term but similarly unambiguous. != , but there are two tabs of common leading whitespace in '\t\t ' and '\t\t\t'. -tom! -- -- http://mail.python.org/mailman/listinfo/python-list

Re: Starting a child process and getting its stdout?

2006-12-29 Thread Tom Plunket
Gabriel Genellina wrote: > Did you *actually* tried what Tom Plunket posted? Two tiny chars make > a difference. The sad irony is that before taking off for vacation I was struggling at work with the same problem in some sense. I couldn't figure out why for some processes I got

Re: Managing a queue of subprocesses?

2006-12-29 Thread Tom Plunket
t its output to a different window in your GUI. You could even make that window pop open on demand, if errors occur. good luck, -tom! -- -- http://mail.python.org/mailman/listinfo/python-list

Re: Easiest way to print from XP/DOS.

2006-12-29 Thread Tom Plunket
and pasting the clipboard into an email. Alternatively, they paste into MS Paint, save the bitmap somewhere, and mail that to you. Good luck, -tom! -- -- http://mail.python.org/mailman/listinfo/python-list

Re: DOS, UNIX and tabs

2006-12-31 Thread Tom Plunket
r set to show tabs as fairly short, but my diff program shows them as eight characters. I find that makes indentation changes easier to spot in the diffs. -tom! -- -- http://mail.python.org/mailman/listinfo/python-list

Re: Managing a queue of subprocesses?

2006-12-31 Thread Tom Plunket
f you don't want to start all of your commands at once, you need to not start all your commands at once. ;) -tom! -- -- http://mail.python.org/mailman/listinfo/python-list

Re: Help with small program

2006-12-31 Thread Tom Plunket
actually two, but the provided algorithm yields four. -tom! -- -- http://mail.python.org/mailman/listinfo/python-list

Re: Why does Python never add itself to the Windows path?

2006-12-31 Thread Tom Plunket
ult as it is today ("don't edit PATH"), though, right? Doesn't make a whole lot of sense to add a new option and default it to something completely different from the old behavior, does it? -tom! -- -- http://mail.python.org/mailman/listinfo/python-list

Re: I want to see all the variables

2006-12-31 Thread Tom Plunket
iginal author deemed it important to make those attributes private in the first place. -tom! -- -- http://mail.python.org/mailman/listinfo/python-list

Re: DOS, UNIX and tabs

2007-01-01 Thread Tom Plunket
y isn't useful to me. My setup is, "tab equals this much space". -tom! -- -- http://mail.python.org/mailman/listinfo/python-list

Re: DOS, UNIX and tabs

2007-01-02 Thread Tom Plunket
d it! Yep, I had a similar experience although a bit more forced. The editor that I was using was configured out-of-the-box with variable-pitch, and I didn't want to bother figuring out how to change it for the quickie stuff I was writing, then eventually I found that it no longer bothered me... -tom! -- -- http://mail.python.org/mailman/listinfo/python-list

Re: list/dictionary as case statement ?

2007-01-03 Thread Tom Plunket
word size of the machine. E.g. the MIPS 3000 and 4000 were 32 bits for every instruction, and PC was always a multiple of four. ...which means the parsing is pretty straight forward, but as you say, simulating the rest of the machine is the hard part. -tom! -- -- http://mail.python.org/mailma

Re: list/dictionary as case statement ?

2007-01-03 Thread Tom Plunket
Bjoern Schliessmann wrote: > Intels aren't RISC, are they? Not the ones in PCs. The OP didn't specify the CPU that's being used, however. -tom! -- -- http://mail.python.org/mailman/listinfo/python-list

Re: A python library to convert RTF into PDF ?

2007-01-03 Thread Tom Plunket
[EMAIL PROTECTED] wrote: > So, what library can I use to convert from RTF to PDF ? GPL / BSD > Libraries are welcome. If you could write to LaTeX files instead, you could then just use pdflatex that comes with all of the LaTeX distributions. -tom! -- -- http://mail.python.org/m

Re: A python library to convert RTF into PDF ?

2007-01-05 Thread Tom Plunket
I've used PDFfactory before, but there are a number of free ones on SourceForge that may be worth a shot), and just using MSWord via COM to print to that printer? (This line of answers merely because nobody seems to know of a directly-Python solution.) -tom! -- -- http://mail.python.org/mailman/l

Non-blocking pipes during subprocess handling

2007-01-08 Thread Tom Plunket
n... line is enclosed in a try and then in an if block. The documentation on file.read() indicate that there's an option for "non-blocking" mode, but I'm stumped as to how to even look for how to enable and use that. thanks, -tom! -- -- http://mail.python.org/mailman/listinfo/python-list

Re: simple perl program in python gives errors

2006-01-30 Thread Tom Anderson
e > language's author thought I might have meant. Especially when that's Larry Wall ... :) tom -- Don't trust the laws of men. Trust the laws of mathematics. -- http://mail.python.org/mailman/listinfo/python-list

Re: StringIO proposal: add __iadd__

2006-01-30 Thread Tom Anderson
e only serious issue to me. >> But with CPython I think we need the C versions. Unless we use Shed Skin to translate the RPython into C++. Or maybe we could write the code in Pyrex, generate C from that for CPython, then have a python script which strips out the type definitions to genera

Re: Why checksum? [was Re: Fuzzy Lookups]

2006-02-01 Thread Tom Anderson
this is the wrong approach - if you have a collection of serialised sparse matrices, for example, which consist of identically-sized blocks of zeroes with a scattering of ones throughout, then lengths and prefixes will be useless, whereas hashes will work perfectly. However, here, we&

Re: Why checksum? [was Re: Fuzzy Lookups]

2006-02-02 Thread Tom Anderson
On Thu, 1 Feb 2006, it was written: > Tom Anderson <[EMAIL PROTECTED]> writes: > >>> The obvious way is make a list of hashes, and sort the list. >> >> Obvious, perhaps, prudent, no. To make the list of hashes, you have to >> read all of every single file f

Re: learning python, using string help

2006-02-02 Thread Tom Anderson
table displaying the information. It's probably neither the shortest nor the cleanest bit of code in the universe, but it does the job and should, i hope, be reasonably clear. tom [1] http://docs.hp.com/en/B2355-90743/ch06s02.html -- Science Never Sleeps -- http://mail.python.org/mailman/listinfo/python-list

<    1   2   3   4   5   6   7   >