Re: Python-list Digest, Vol 17, Issue 54

2005-02-03 Thread Andrew James
d access at all levels of code (unless req is a global variable?). Do you have any other suggestions as to how this might be implemented? Many thanks, Andrew Hi all, I'm writing an application which runs within Apache and uses mod_python to provide basic authentication and return content to the u

Re: case/switch statement?

2005-06-19 Thread Andrew Durdin
On 6/18/05, D H <[EMAIL PROTECTED]> wrote: > I would hardly call using a > dictionary as a switch statement, the "equivalent". The fact that > people use a dictionary as a conditional is a python wart. Not at all. A case statement is nothing more than a literal mapping of constant values to the e

Re: Acceptance test spike example

2005-06-26 Thread Andrew McDonagh
ss to use. You can use reflection to dynamically create the Command instances or the name can be used by a factory as an id. The Commands themselves know what they are supposed to do, not the Script parsing engine. The second approach is using FIT/Fitnesse - google these for exact descripti

Using MSMQ on Windows (and Navision)

2005-06-26 Thread Andrew Gordon
I'm investigating getting Microsoft Navision to do stuff from a Python script. The recommended way seems to be to use message queues (MSMQ). I can get Navision to send a message to itself fine. I found a couple of code example in an ancient message in this newsgroup. The send.py one I change

Re: Which kid's beginners programming - Python or Forth?

2005-06-28 Thread Andrew Durdin
On 6/29/05, Rocco Moretti <[EMAIL PROTECTED]> wrote: > > Sorry, thought of one more thing Python has going for it vs. Forth - > reference material. Check the catalog of your local library. I'd guess > that there is more choice for Python programming books vs. Forth > programming books. I just che

Re: Is there something similar to ?: operator (C/C++) in Python?

2005-06-28 Thread Andrew Durdin
recent call last): File "", line 1, in ? TypeError: list indices must be integers Corrected version: result = [(lambda: expr0), lambda: expr1][bool(cond)]() Or if using python < 2.3: result = [(lambda: expr0), lambda: expr1][__import__("operator").truth(cond)](

Re: Lost in a sea of documentation...can you point me in the right direction?

2005-06-30 Thread Andrew Durdin
On 30 Jun 2005 14:38:17 -0700, MooMaster <[EMAIL PROTECTED]> wrote: > So I started reading about os, threads, > and the path for the special folders in the archives and in the Python > docs and I'm kind of lost because there aren't many concrete examples > in the documentation. Can anyone point me

Re: Speaking of list-comprehension?

2005-07-01 Thread Andrew Durdin
On 7/1/05, Chinook <[EMAIL PROTECTED]> wrote: > Thank you Andrew, and your elaboration is well taken. I was just > exploring here and the construct you noted is IMHO intuitively readable > - at least for a simple expression and condition. Other than the > choice order [

Re: When someone from Britain speaks, Americans hear a "Britishaccent"...

2005-07-01 Thread Andrew Durdin
some wierd property requiring conservation of > consonants, when speaking Strine you've got to take the r's > removed from words like "carrier" and "order", and add them to > the ends of other words like Amanda. No, you've got it wrong -- we take them and i

Re: Proposal: reducing self.x=x; self.y=y; self.z=z boilerplate code

2005-07-02 Thread Andrew Koenig
"Ralf W. Grosse-Kunstleve" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >class grouping: > >def __init__(self, .x, .y, .z): ># real code right here > Emulation using existing syntax:: >def __init__(self, x, y, z): >self.x = x >

Re: Lisp development with macros faster than Python development?..

2005-07-06 Thread Andrew Durdin
On 6 Jul 2005 00:30:34 -0700, Raymond Hettinger <[EMAIL PROTECTED]> wrote: > > With Lisp or Forth, a master programmer has unlimited power and > expressiveness. With Python, even a regular guy can reach for the > stars. +1 QOTW -- http://mail.python.org/mailman/listinfo/python-list

Python Windows Install Problem (Error #2755)

2005-07-08 Thread Carl, Andrew
Title: Python Windows Install Problem (Error #2755)     Please find attached a PDF file (removed due to size) containing (2) print-screen images of an error (Code # 2755) occuring during attempted installation of python for windows, version 2.4.1 (on PC using MS2000). Any help would be a

Re: PPC floating equality vs. byte compilation

2005-07-09 Thread Andrew MacIntyre
ing something to do with the marshalling of floats (.pyc files contain constants in a marshalled form). Don't think I've ever seen it myself... ----- Andrew I MacIntyre "These thoughts are mi

Re: breaking out of nested loop

2005-07-12 Thread Andrew Koenig
"rbt" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > What is the appropriate way to break out of this while loop if the for > loop finds a match? Make it a function and use a "return" statement to break out. -- http://mail.python.org/mailman/listinfo/python-list

Re: Defending Python

2005-07-12 Thread Andrew Durdin
On 7/13/05, Jorey Bump <[EMAIL PROTECTED]> wrote: > >>> Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > >>> > >>> The larch! > > IT'S A TREE ... not a shrubbery? -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP on path module for standard library

2005-07-22 Thread Andrew Dalke
pe(file) is types.StringType: self.file = open(file, 'r') (hmm, that last one looks buggy. It should have a "else: self.file = file" afterwards.) Used in the std. lib and used by many different people. (I excluded the Biopython libraries in this list, btw, because I may have influenced the use of this sort of type check.) Andrew [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP on path module for standard library

2005-07-22 Thread Andrew Dalke
emphasis of class hierarchies. I think the same is true here. File paths and URIs are sufficiently different that there are only a few bits of commonality between them. Consider 'split' which for files creates (dirname, filename) while for urls it creates (scheme, netloc, path, query, fragment) Andrew [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP on path module for standard library

2005-07-22 Thread Andrew Dalke
API is one that requires less knowledge. I haven't seen an example of how deriving from (unicode) string makes things more complicated than not doing so. Andrew [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Difference between " and '

2005-07-22 Thread Andrew Dalke
an 'single quoted quotes'. Andrew [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Iterators from urllib2

2005-07-22 Thread Andrew Dalke
.readlines = self.fp.readlines if hasattr(self.fp, "fileno"): self.fileno = self.fp.fileno if hasattr(self.fp, "__iter__"): self.__iter__ = self.fp.__iter__ if hasattr(self.fp, "next"): self.next = self.fp.next It looks like the fp for your latter code doesn't have the additional properties. Try adding the following debug code to figure out what's up print dir(ifs) print "fp=", ifs.fp print "dir(fp)", dir(ifs.fp) Odds are you'll get different results. Andrew [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Something that Perl can do that Python can't?

2005-07-22 Thread Andrew Dalke
teed "no more than a line at a time" semantics, try this for line in iter(stdout.readline, ""): print "LINE:", line sys.stdout.flush() Andrew [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP on path module for standard library

2005-07-22 Thread Andrew Dalke
tation of the latter is trivial - put a @property on the line before the "def dirname(self):". I think that the string representation of a path is so important that it *is* the path. The other things you call properties aren't quite properties in my model of a path and are more like computable values. I trust my intuition on this, I just don't know how to justify it, or correct it if I'm wrong. Andrew [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP on path module for standard library

2005-07-23 Thread Andrew Dalke
d a "get the filename" interface then perhaps it wouldn't make a difference. Which means I'm also more guided by practical reasons than conceptual. Andrew [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: unit test nested functions

2005-07-23 Thread Andrew Dalke
any Vikings. >>> I've found though that the double-leading-underscore is overkill. Using a single underscore is enough of a hint that the given method shouldn't be called directly. Then again, I don't write enough deep hierarchies where I need

Re: [path-PEP] Path inherits from basestring again

2005-07-24 Thread Andrew Dalke
: - a path can't be compared to "-" - range isn't supported, as "name = name[1:]" note that this example uses __contains__ ("," in name) Is this function brain-dead? Is it reasonable that people might want to pass a path.Path() directly to it? If not, what's the way to convert the path.Path() into the correct string object? Andrew [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: [path-PEP] Path inherits from basestring again

2005-07-25 Thread Andrew Dalke
> Reinhold Birkenfeld wrote: >> Current change: >> >> * Add base() method for converting to str/unicode. Now that [:] slicing works, and returns a string, another way to convert from path.Path to str/unicode is path[:]

Re: how to write a line in a text file

2005-07-26 Thread Andrew Dalke
e, BerkeleyDB, etc.) to maintain your system state and let the library handle transactions for you. Andrew [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: can list comprehensions replace map?

2005-07-27 Thread Andrew Dalke
en(y)) in length - the result has length len(x). As others suggested, if you want to use map, go ahead. It won't disappear for a long time and even if it does it's easy to retrofit if needed. Andrew [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: can list comprehensions replace map?

2005-07-28 Thread Andrew Dalke
ement in term: if element is not sentinel: break else: # All sentinels break yield [replace(element, element) for element in term] (I originally had a "element == tuple([sentinel]*len(seqs))" check but didn't like all the == tests incurred.) Andrew [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: can list comprehensions replace map?

2005-07-28 Thread Andrew Dalke
Hmm, it should probably yield tuple(fields) Andrew [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: can list comprehensions replace map?

2005-07-28 Thread Andrew Dalke
is is code best not widely used, I don't think it's something anyone should look into either. :) Andrew [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: os._exit vs. sys.exit

2005-07-28 Thread Andrew Dalke
s/man2/_exit.2.html and note the statement "can never return". sys.exit() is identical to "raise SystemExit()". It raises a Python exception which may be caught at a higher level in the program stack. Andrew [E

Re: can list comprehensions replace map?

2005-07-29 Thread Andrew Dalke
n izip(*[chain(seq, done_iter()) for seq in seqs]) Now add the performance tweak def done_iter(done=[len(seqs)], forever=forever, table=table) Okay, I'm over it. :) Andrew [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: can list comprehensions replace map?

2005-07-29 Thread Andrew Dalke
chain(seq[-1], > [])] It does work - I tested it. The trick is that izip takes iter() of the terms passed into it. iter([]) -> an empty iterator and iter(repeat(None)) -> the repeat(None) itself. 'Course then the name should be changed. Andrew

Re: can list comprehensions replace map?

2005-07-29 Thread Andrew Dalke
Scott David Daniels wrote: > Can I play too? How about: Sweet! Andrew [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: can list comprehensions replace map?

2005-07-29 Thread Andrew Dalke
Peter Otten wrote: > Seems my description didn't convince you. So here's an example: Got it. In my test case the longest element happened to be the last one, which is why it didn't catch the problem. Thanks. Andrew

Re: PEP on path module for standard library

2005-07-31 Thread Andrew Dalke
e of automated testing techniques and thereby improve > the quality of Python software, including in the standard library. But then what does the constructor for the file object take? I've also heard mention that a future (Py3K era) 'open' may allow URLs and not just

Re: Python's CSV reader

2005-08-04 Thread Andrew McLean
ot; % (len(detail), detail) You could wrap this up into a class which returns (header, detail) pairs and does better error handling, but the above code should illustrate the basics. -- Andrew McLean -- http://mail.python.org/mailman/listinfo/python-list

Re: Python's CSV reader

2005-08-05 Thread Andrew McLean
ines, the first line being a header containing field names specific to that record with the second line containing the corresponding data. It would help of you let us know which (if any) was correct. -- Andrew McLean -- http://mail.python.org/mailman/listinfo/python-list

Re: FTP over SSL (explicit encryption)

2005-08-10 Thread Andrew MacIntyre
g like that. ----- Andrew I MacIntyre "These thoughts are mine alone..." E-mail: [EMAIL PROTECTED] (pref) | Snail: PO Box 370 [EMAIL PROTECTED] (alt) |Belconnen ACT 2616 Web:h

Albatross 1.32 released

2005-08-16 Thread Andrew McNamara
OVERVIEW Albatross is a small toolkit for developing highly stateful web applications. The toolkit has been designed to take a lot of the pain out of constructing intranet applications although you can also use Albatross for deploying publicly accessed web applications. In slightly more than 450

Re: Jargons of Info Tech industry

2005-08-26 Thread Andrew Thompson
amusing! :-) It does raise the question though. Is it mundane sex, ..or riveting email, that causes this phenomenon?;-) [ F'Ups set to c.l.j.p. only ] -- Andrew Thompson physci.org 1point1c.org javasaver.com lensescapes.com athompson.info "You live with apes, man, it's

PyBool_FromLong

2005-09-02 Thread Andrew MacKeith
In the C API Docs, the signature of PyBool from long seems to be incorrect. int PyBool_FromLong(long v) Returns Py_True or Py_False depending on the truth value of v. New in version 2.3. The description would suggest: PyObject* PyBool_FromLong(long v) -- http://mail.python.org/mailman/li

Re: Last mod date

2005-09-06 Thread Andrew McNamara
an't figure out which module I need to import to access it. Look at the "os" module. -- Andrew McNamara, Senior Developer, Object Craft http://www.object-craft.com.au/ -- http://mail.python.org/mailman/listinfo/python-list

Using Python to interact with BMC Patrol

2005-09-07 Thread Andrew Robert
Hi Everyone, Has anyone done any Python coding to manage/interact/customize BMC Patrol? If anyone has, could you please point me to where I can find documentation/guides on this? I checked the Python SIGs and Vault of Parnasus but didn't see anything available. Any insight you might have on thi

Re: python and ARCView GIS desktop

2005-09-09 Thread Andrew MacIntyre
fault). You also might be able to use the InfoZip DLL directly from VBA to package everything (after you've figured out what needs to be packaged). ----- Andrew I MacIntyre "These thoughts are mine

Re: Using Python with COM to communicate with proprietary Windows software

2005-09-10 Thread Andrew MacIntyre
. Regardless, I thank you for what you have released! Cheers, Andrew. ----- Andrew I MacIntyre "These thoughts are mine alone..." E-mail: [EMAIL PROTECTED] (pref) | Snail: PO Box 370

Re: How am I doing?

2005-09-19 Thread Andrew Durdin
> > 3) The hardest thing to 'understand' is the line... > self.hiScores=[(entry[:5],entry[5:]) for entry in hiScores] > > I 'understand' what it's doing, but I don't quite comprehend what the :5 > and 5: do. I know that the :5 is technically saying from the start to > position 5, and likewise the 5: would say from position 5 onwards, but I > just can't get my head around how this works. See my explanation of __init__(). Does that help? Andrew -- http://mail.python.org/mailman/listinfo/python-list

Re: Problems with python and threads under Freebsd

2005-02-08 Thread Andrew MacIntyre
of stack frames for generated calls has increased. If lowering the optimisation to -O or -Os when building Python improves the situation, I'd suggest pursuing this possibility further. ----- Andrew I MacIntyre

Re: Freebsd thread/signal problem

2005-02-10 Thread Andrew MacIntyre
without threads it works). There is old wisdom that signals and threads should not be mixed, as the behaviour is not well defined across platforms. ----- Andrew I MacIntyre "These thoughts are mine alone..."

AES crypto in pure Python?

2005-02-13 Thread andrew . fabbro
I'm looking for an implementation of AES (the Advanced Encryption Standard) in pure Python. I'm aware of pycrypto, but that uses C code. I'm hoping to find something that only uses Python...I'm willing to trade speed for portability, since my application is designed for several different platform

Re: hard_decoding

2005-02-15 Thread Andrew Dalke
;t do the registry hooks that Skip does, and I see I need to learn more about the functions in the codes module. Andrew [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: iterative lambda construction

2005-02-21 Thread Andrew Koenig
"markscottwright" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Just for the hell of it, I've been going through the old Scheme-based > textbook "Structure and Interpretation of Computer Programs" and seeing > what I can and can't do with python. I'm trying to create a function >

Re: python tutorial/projects

2005-02-22 Thread Andrew Thomson
my resume, that I know python, with > out bad karma. > > Danny -- Andrew Thomson <[EMAIL PROTECTED]> -- http://mail.python.org/mailman/listinfo/python-list

Re: accessor/mutator functions

2005-02-28 Thread Andrew Dalke
and press the key: ") for temp in range(51, 81): print "Raising reactor temperature to", temp temp_controller.target = temp time.sleep(60) if abs(temp_controller.current - temp) > 0.1: print "Variance too high!", temp_controller.current print "DONE!&

Re: yield_all needed in Python

2005-02-28 Thread Andrew Dalke
ived* to prove the O() difference. BTW, Python almost never worries about worst-case behavior, and people using Python dicts instead of, e.g., balanced trees, get to carry their shame home with them hours earlier each day . Andrew

Re: accessor/mutator functions

2005-02-28 Thread Andrew Dalke
uses a dispatch table to get the underlying C function which is "dt_getcharge" return dt_getcharge(self.handle) where "handle" is the handle used by the C library. I figured though that this example might be more esoteric than my PID controller example, though in retrospect it looks like it might be a better justification. Andrew [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: How to write python plug-ins for your own python program?

2005-03-03 Thread Andrew Dalke
_(pluginName) plugin.someMethod(state) was useful because it gave the plugin a way to modify the program state, rather than changing global variables. Andrew [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: py2exe

2005-03-03 Thread Andrew Dalke
(like http://thproxy.jinr.ru/file-archive/doc/ftp/ftpsites.lst ), a good memory and lots of free time. Usenet archives. Word of mouth. Andrew [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Appeal for python developers

2005-03-05 Thread Andrew Dalke
terwove two loops and couldn't be easily untangled. Since I just wanted to text it out I used C++ which had both gotos and priority queues built in. Andrew [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: GOTO (was Re: Appeal for python developers)

2005-03-05 Thread Andrew Dalke
e in the > forward direction, to code appearing later. I only found two google hits, both in a Fortran newsgroup. Other posts by you suggest you often program in that language. Fortran doesn't have exceptions, so gotos are the best solution for how to do certain types of error handlin

Re: function with a state

2005-03-06 Thread Andrew Koenig
"Xah Lee" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > globe=0; > def myFun(): > globe=globe+1 > return globe > > apparently it can't be done like that. I thought it can probably be > done by prefixing the variable with some package context... You can do this: globe=0

Re: GOTO (was Re: Appeal for python developers)

2005-03-06 Thread Andrew Dalke
worked at it I think I could come up with an example that wouldn't be so easy to turn into an iterator, but that would be not only be beating it into the ground but doing a clog dance on top. Andrew [EMAIL PROTECTED] -- http://mail

Re: bsddb support for berkeley db 4.3?

2005-03-12 Thread Andrew MacIntyre
you can, I'd suggest posting a bug report on SF against 2.4 to see whether you can encourage the installer builder to upgrade BSD DB - though do be certain to check what's in 2.4.1c1 first. ----- Andrew I MacIntyre

Re: wxPython vs. pyQt

2005-03-20 Thread Andrew E
was the only real option. The key question from my point of view is: can I write commercial sell-if-I-want-to applications using Qt? If it is GPL, then I guess the answer is 'no'? Andrew -- http://mail.python.org/mailman/listinfo/python-list

Re: how to drop all thread ??

2004-11-29 Thread Andrew Koenig
This reply is off topic but I couldn't resist: The best way to get rid of thread is to adopt a kitten. In fact, one of my cats is named Snobol because she is such a good string manipulator. -- http://mail.python.org/mailman/listinfo/python-list

Re: C API PyErr_Clear vs PyObject_HasAttrString

2004-11-29 Thread Andrew MacIntyre
xcept ValueError: > pass > # > > so the tp_getattr slot isn't being used. Referring to the original C code you posted, PyObject_HasAttrString() will call the tp_getattr routine, clearing any exceptions raised as it returns. --

Drawing Cogwheels and Combinatoric diagrams

2004-12-01 Thread Andrew James
ty to return x,y co-ordinates for a shape, as I want to draw an imagemap on top of parts of the shape. Can PIL do this, or do I need to go the way of GnuPlot or Gri? Can anyone give me an example of a complex shape drawn like this? Many thanks, Andrew -- http://mail.python.org/mailman/listinfo/p

Re: Identifying exceptions that can be raised

2004-12-01 Thread Andrew Dalke
ing a small island off the coast of Florida to kill all the insects then watch how they are reintroduced. Geology, unless you count the material science work used to understand how minerals change under pressure and heat, or including mining as part of geology. A

Import Semantics, or 'What's the scope of an import?', and class attribute instantiation

2004-12-04 Thread Andrew James
n-specific advanced features I can use (things like closures, lambda forms, map(), etc. etc.). Could anyone point me towards some good resources? I would much appreciate some assistance in finding some answers to these questions, as the research I've done seems to be inconclusive, if not downr

Error in previous post - Import behaviour

2004-12-04 Thread Andrew James
, its attributes still get created. Regards, Andrew -- http://mail.python.org/mailman/listinfo/python-list

Re: Help With Hiring Python Developers

2004-12-06 Thread Andrew Koenig
"Aahz" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > APL. I've heard programmers making similar comments (including possibly > Michael's nameless acquaintance). Especially programmers who've never used it. To me, grousing about APL's unusual character set sounds a lot like grou

Re: Loading a file only once into an object and being able to access it from other modules

2004-12-07 Thread Andrew James
d to your situation. HTH, Andrew Philippe C. Martin wrote: This is a basic question I'm sure but I do not know wether to use __builtin__, global, or a static method: I have a very large XML file that I load into dictionnaries defined in a class located in a module that is imported in many pla

3D plotting library / OpenGL

2004-12-07 Thread Andrew Dalke
a scene graph that I could render as I wish. Any pointers, ideas, or suggestions? Andrew [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: why python is slower than java?

2004-12-08 Thread Andrew Dalke
to put a monetary micropayment into place because at that level those other factors have at least a comparable impact. Andrew [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: 3D plotting library / OpenGL

2004-12-08 Thread Andrew Dalke
#x27;2.5.3.1' Any ideas? Andrew [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Creating Fixed Length Records

2004-12-09 Thread Andrew James
Greg, Absolutely *perfect* case for a dose of Python string concatenation performance theory or, How To Join Strings Together Fast: http://www.skymind.com/~ocrow/python_string/ HTH, Andrew On Wed, 2004-12-08 at 17:29 -0600, Greg Lindstrom wrote: > Hello- > > I'm creating fixed

Re: Python mascot proposal

2004-12-13 Thread Andrew Robert
What about a dead camel? -- http://mail.python.org/mailman/listinfo/python-list

Re: lies about OOP

2004-12-15 Thread Andrew Dalke
mother, born a Hanson. Scandinavian heritage? Det vet jag inte. :) Sadly, none of them know Python. And my g'grandfather was German in case you were wondering. Andrew Dalke [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: BASIC vs Python

2004-12-16 Thread Andrew Dalke
reek, and Swedish, and Japanese, and all sorts of other interesting languages. Given the hardware constraints of the early 1980s, which language do you think should have been used instead of BASIC? Andrew [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: BASIC vs Python

2004-12-17 Thread Andrew Dalke
[EMAIL PROTECTED] wrote: > Now wait a minute, shouldn't that be... > > PLAY "CGFED>CChttp://mail.python.org/mailman/listinfo/python-list

Re: BASIC vs Python

2004-12-17 Thread Andrew Dalke
easy to debug chunks of code by doing (forgive the typos as it's been a long time since I've done BASIC) 200 input "What is your name?", a$ 210 print "Hi,", $a 220 print "Did you know your name has"; 230 print strlen($a); 240 print " letters in it?"

Re: BASIC vs Python

2004-12-18 Thread Andrew Dalke
256x192 graphics, 3 channels of sound, US$525 in 1981. Worse than just about any mobile phone these days. And there's even an emulator, for people with the old ROMs hanging around. Wonder if my parents still have my old computers . Andrew [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: BASIC vs Python

2004-12-19 Thread Andrew Dalke
er wasn't there. I know about csound and Supercollider. I don't think they are that easy to use. They aim for power not simplicity. Andrew [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Driving win32 GUIs with Python

2004-12-19 Thread Andrew McLean
ed, The "AutoIT Windows Spy" I found here: http://www.hiddensoft.com/AutoIt/ looks like it will be useful. Any pointers gratefully received. Regards, Andrew McLean -- http://mail.python.org/mailman/listinfo/python-list

Re: Driving win32 GUIs with Python

2004-12-19 Thread Andrew McLean
In article <[EMAIL PROTECTED]>, Fredrik Lundh <[EMAIL PROTECTED]> writes Andrew McLean wrote: I have a requirement to drive a Windows GUI program from a Python Script. The program was originally a DOS program written in Turbo Pascal, and was recently translated to Delphi. I do

Re: Language fluency (was Re: BASIC vs Python)

2004-12-20 Thread Andrew Dalke
compile' that I don't have reason to use in my production code. I knew them once but have forgotten how to use in "utter fluency". Andrew [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: BASIC vs Python

2004-12-20 Thread Andrew Dalke
/F > import random, winsound Now if it only worked for my mac ... :) Andrew [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

MIDI library recommendations, please?

2004-12-20 Thread Andrew Koenig
Are there widely used and recommended Python libraries that will let me 1) Interpret and generate MIDI messages easily? 2) Allow me to select and communicate with MIDI devices attached to my computer? I know that (2) is platform-dependent, so if there isn't a multiplatform version of (

Re: Read word tables

2004-12-21 Thread Andrew Henshaw
2com.client.Dispatch('Word.Application') doc = app.Documents[0] tables = [] for word_table in doc.Tables: table = [] for word_row in word_table.Rows: row = [cell.Range.Text for cell in word_row.Cells] table.append(row) tables.append(tabl

Re: BASIC vs Python

2004-12-21 Thread Andrew Dalke
to have started now I would have taken a different course and perhaps one of these newer things would have interested me more. Andrew [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: BASIC vs Python

2004-12-22 Thread Andrew Dalke
, one supported 3D placement of the audio. I hadn't even thought of that ability. Andrew [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Lambda going out of fashion

2004-12-24 Thread Andrew Dalke
File "", line 1, in ? TypeError: len() takes exactly one argument (6 given) >>> Is that difference a bug? Andrew [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Lambda going out of fashion

2004-12-25 Thread Andrew Dalke
long with a couple pens. My new phone has a color screen and a camera. Andrew [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Lambda going out of fashion

2004-12-25 Thread Andrew Dalke
e success behavior: apply does not work: apply() arg 2 expected sequence, found Blah call 4 Andrew [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Lambda going out of fashion

2004-12-25 Thread Andrew Dalke
'm only 1/2 wrong this time. :) Andrew [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: objects as mutable dictionary keys

2004-12-27 Thread Andrew Koenig
"Peter Maas" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > This strikes me because if one can do this with instances of user > defined classes why not with lists? Trying to use lists as dict > keys yields "TypeError: list objects are unhashable". So why are > list objects unhashab

Re: objects as mutable dictionary keys

2004-12-27 Thread Andrew Dalke
Andrew Koenig: > If d is a dict and t1 and t2 are tuples, and t1 == t2, then d[t1] and d[t2] > are the same element. So long as the elements of t1 and t2 are well-behaved. >>> class Spam: ... def __hash__(self): ... return id(self) ... def __eq__(self, other): ...

Re: objects as mutable dictionary keys

2004-12-27 Thread Andrew Koenig
"Peter Maas" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > This leads to the question: > > Why does (t1 == t2 => d[t1] identical to d[t2]) hold for user defined > objects and not for lists? My answer: because the cmp function looks at > id() for user defined objects and at list co

Re: code Generator Help

2004-12-28 Thread Andrew Dalke
k of programming experience. The software mentioned comes from Alachisoft which is a subsidiary of Diyatech which does its software development in "South Asia". Andrew [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

<    2   3   4   5   6   7   8   9   10   11   >