Re: An Ode To My Two Loves

2005-02-08 Thread Mike Meyer
bindings for sh. It can probably be done with XMLRPC, but it would be ugly. The problem is that this requires fundamental changes in the underlying OS (by adding per-process mount points), but there's mention of experiments with that for Linux. mike -- Mike Meyer [EMAIL PROTECTED

Re: An Ode To My Two Loves

2005-02-08 Thread Mike Meyer
[EMAIL PROTECTED] (Aahz) writes: In article [EMAIL PROTECTED], Mike Meyer [EMAIL PROTECTED] wrote: COM is dominant on Windows because MS pushes it. CORBA isn't dominant on Unix because there are a slew of extensible/embeddable languages to pick from instead - assuming the apps in question came

Re: negative integer division

2005-02-08 Thread Mike Meyer
to argue that some machines do negative integer division in stupifyingly horrible ways. mike -- Mike Meyer [EMAIL PROTECTED] http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. -- http://mail.python.org/mailman

Re: negative integer division

2005-02-10 Thread Mike Meyer
Jive Dadson [EMAIL PROTECTED] writes: Mike Meyer wrote: [C] isn't - it's a portable assembler. I've heard that many times, but it makes no sense to me. By definition, the syntax of an assembly language closely resembles the format of individual hardware instructions for a particular

Re: goto, cls, wait commands

2005-02-12 Thread Mike Meyer
you are using. D: Whether or not you have a display device at all. I run Python scripts from Cron whose sole output functionality is via email. I run Python scripts as daemons whose sole output functionality is syslog. Clear screen doesn't make sense in thsoe two contexts. mike -- Mike

Re: Text files read multiple files into single file, and then recreate the multiple files

2005-02-12 Thread Mike Meyer
information to extract the file. Be sure to open all files [rw]b, though. mike -- Mike Meyer [EMAIL PROTECTED] http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. -- http://mail.python.org/mailman/listinfo/python-list

Re: Kill GIL

2005-02-12 Thread Mike Meyer
such a problem (like, nearly all of them). Here here. I find that threading typically introduces worse problems than it purports to solve. mike -- Mike Meyer [EMAIL PROTECTED] http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information

Re: SCons build tool speed

2005-02-12 Thread Mike Meyer
behavior. In fact, one major advantage that ant/scons/jam/etc. have over Make is that they avoid the defacto standard recursive make build system. See URL: http://www.pcug.org.au/~millerp/rmch/recu-make-cons-harm.html for details on that. mike -- Mike Meyer [EMAIL PROTECTED

Re: For American numbers

2005-02-13 Thread Mike Meyer
you have better references? mike -- Mike Meyer [EMAIL PROTECTED] http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. -- http://mail.python.org/mailman/listinfo/python-list

Re: Kill GIL

2005-02-14 Thread Mike Meyer
[EMAIL PROTECTED] (Aahz) writes: (Have you actually written any threaded applications in Python?) Yes. Have you ever asked a polite question? mike -- Mike Meyer [EMAIL PROTECTED] http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email

Re: [EVALUATION] - E02 - Support for MinGW Open Source Compiler

2005-02-14 Thread Mike Meyer
open-source environment, or live with the closed-source tools/environment that someone is willing to support. Or, of course, support the environment you want yourself. mike -- Mike Meyer [EMAIL PROTECTED] http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix

Re: [EVALUATION] - E02 - Support for MinGW Open Source Compiler

2005-02-15 Thread Mike Meyer
Ilias Lazaridis [EMAIL PROTECTED] writes: MinGW compatibility is not my need. Then why do you waste so much effort whining about it not being given to you? It is an community need. Based on the evidence at hand, this is a false statement. mike -- Mike Meyer [EMAIL PROTECTED

Re: [EVALUATION] - E02 - Support for MinGW Open Source Compiler

2005-02-15 Thread Mike Meyer
Ilias Lazaridis [EMAIL PROTECTED] writes: Mike Meyer wrote: It is an community need. Based on the evidence at hand, this is a false statement. It is an community need [at least partially] Repeating a falsehood will not make it true. Can you offer anything besides your own whining to back

Re: [EVALUATION] - E02 - Support for MinGW Open Source Compiler

2005-02-15 Thread Mike Meyer
. mike -- Mike Meyer [EMAIL PROTECTED] http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. -- http://mail.python.org/mailman/listinfo/python-list

Re: [EVALUATION] - E02 - Support for MinGW Open Source Compiler

2005-02-15 Thread Mike Meyer
Ilias Lazaridis [EMAIL PROTECTED] writes: Mike Meyer wrote: Ilias Lazaridis [EMAIL PROTECTED] writes: Mike Meyer wrote: It is an community need. Based on the evidence at hand, this is a false statement. It is an community need [at least partially] Repeating a falsehood will not make

Re: How to extract a part of html file

2005-10-20 Thread Mike Meyer
/TR/TABLE', start) s[start:stop] ' and ends with ' Not a lot to choose between them. mike -- Mike Meyer [EMAIL PROTECTED] http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. -- http://mail.python.org/mailman

Re: Set an environment variable

2005-10-20 Thread Mike Meyer
to use eval and command substitution: eval $(python myScript.py) mike -- Mike Meyer [EMAIL PROTECTED] http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. -- http://mail.python.org/mailman/listinfo/python-list

Re: best way to replace first word in string?

2005-10-20 Thread Mike Meyer
realy efficient one Assuming you know the whitespace will be spaces, I like find: new = /aa/ + old[old.find(' '):] As for efficiency - I suggest you investigate the timeit module, and do some tests on data representative of what you're actaully going to be using. mike -- Mike Meyer [EMAIL

Re: Searching for txt file and importing to ms access

2005-10-20 Thread Mike Meyer
?! Can't help with that. The phrase win32com comes to mind, but I'm not a windows person. mike -- Mike Meyer [EMAIL PROTECTED] http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. -- http://mail.python.org/mailman/listinfo/python

Re: Python vs Ruby

2005-10-20 Thread Mike Meyer
*not* carry over into Python - but you'll understand why people ask for macros in Python :-). If you know of some book/language pair that you think everyone would benefit from reading, I'd be interested in hearing about them. mike -- Mike Meyer [EMAIL PROTECTED] http

Re: fun with lambdas

2005-10-20 Thread Mike Meyer
mike -- Mike Meyer [EMAIL PROTECTED] http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. -- http://mail.python.org/mailman/listinfo/python-list

Re: Set an environment variable

2005-10-21 Thread Mike Meyer
. The Windows version carries this a step further by wrapping it all up in a script to make it easy to run, but that's the only real difference. Maybe the results order has changed since you looked? Watch the recipe - I may add a Unix/sh solution. mike -- Mike Meyer [EMAIL PROTECTED

Re: Binding a variable?

2005-10-21 Thread Mike Meyer
the value, looks it up in the appropriate namespace, and returns that value. mike -- Mike Meyer [EMAIL PROTECTED] http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. -- http://mail.python.org/mailman/listinfo/python

Re: how to modify text in html form from python

2005-10-21 Thread Mike Meyer
INPUT type=text NAME=tosrv value=TO size=60 BR FROM SERVERBR INPUT type=text name=fromsrv value=FROM size=60 P INPUT TYPE=SUBMIT VALUE=START /TD/TR/table /FORM /body /html -- Mike Meyer [EMAIL PROTECTED] http://www.mired.org

Re: Set an environment variable

2005-10-21 Thread Mike Meyer
process. He said he wanted to know how to do the equivalent of export SYMBOL=value, which got intreprted as setting a variable in the parent shell. mike -- Mike Meyer [EMAIL PROTECTED] http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email

Re: how to modify text in html form from python

2005-10-21 Thread Mike Meyer
and three network connections. How much is working, and which parts are you trying to do in Python? mike -- Mike Meyer [EMAIL PROTECTED] http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. -- http://mail.python.org/mailman

Re: A question about searching with multiple strings

2005-10-21 Thread Mike Meyer
in filter(filter1, ifilter(filter2, ifilter(filter3, all_items))): ... mike -- Mike Meyer [EMAIL PROTECTED] http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. -- http://mail.python.org/mailman/listinfo

Re: how to modify text in html form from python

2005-10-21 Thread Mike Meyer
carefully about what happens when the user pulls one of your forms out of the browser history, or bookmarks a page. Then make sure you get a thorough audit of the resulting system/protocol done by people who know what they're doing. mike -- Mike Meyer [EMAIL PROTECTED] http

Re: Python cgi

2005-10-21 Thread Mike Meyer
use flags your code knows about. Of course, that's also an *upside*. mike -- Mike Meyer [EMAIL PROTECTED] http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. -- http://mail.python.org/mailman/listinfo/python-list

Re: how to modify text in html form from python

2005-10-21 Thread Mike Meyer
as far as we can. Launch code objects that we loaded. mike -- Mike Meyer [EMAIL PROTECTED] http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. -- http://mail.python.org/mailman/listinfo/python-list

Re: how to modify text in html form from python

2005-10-21 Thread Mike Meyer
Philippe C. Martin [EMAIL PROTECTED] writes: Mike Meyer wrote: I don't know much about plugins. I believe they get started when the page loads, which gives you a chance to do the authentication when you want it done. Well not in this case actually: the user triggers the plugin which in turn

Re: best way to replace first word in string?

2005-10-22 Thread Mike Meyer
idiom being closer to a factor of four instead of two slower. The .joim idiom is still nearly identical. mike -- Mike Meyer [EMAIL PROTECTED] http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. -- http

Re: Question about inheritance...

2005-10-22 Thread Mike Meyer
by calling Circle.draw(self). The latter is ugly - you should use self.draw() to invoke the draw routine that's correct for self. mike -- Mike Meyer [EMAIL PROTECTED] http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information

Re: High Order Messages in Python

2005-10-22 Thread Mike Meyer
- and my discussion of them - cover just one very broad use case. There may be others where they are a better fit with Python. Having examples of how to do these kinds of things around is probably worthwhile. mike -- Mike Meyer [EMAIL PROTECTED] http://www.mired.org/home/mwm

Re: Microsoft Hatred FAQ

2005-10-22 Thread Mike Meyer
it was. mike -- Mike Meyer [EMAIL PROTECTED] http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python vs Ruby

2005-10-22 Thread Mike Meyer
and money it would take. Then factor in the profits to be reaped from selling the ported OS/compilers :-). mike -- Mike Meyer [EMAIL PROTECTED] http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. -- http://mail.python.org

Re: Binding a variable?

2005-10-22 Thread Mike Meyer
Steven D'Aprano [EMAIL PROTECTED] writes: On Fri, 21 Oct 2005 13:33:18 -0400, Mike Meyer wrote: Paul Dale [EMAIL PROTECTED] writes: Hi everyone, Is it possible to bind a list member or variable to a variable such that temp = 5 list = [ temp ] Don't use the names of built

Re: Microsoft Hatred FAQ

2005-10-22 Thread Mike Meyer
David Schwartz [EMAIL PROTECTED] writes: Mike Meyer [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Neither I, nor you, nor the government of any nation, should care a monkey's toss specifically for Microsoft's success. Microsoft is one special interest, out of a potentially

Re: Python vs Ruby

2005-10-22 Thread Mike Meyer
[EMAIL PROTECTED] (Alex Martelli) writes: Mike Meyer [EMAIL PROTECTED] wrote: Every line = more labour for the developer = more cost and time. Every line = more places for bugs to exist = more cost and time. There were studies done in the 70s that showed that programmers produced the same

Re: best way to replace first word in string?

2005-10-22 Thread Mike Meyer
Steven D'Aprano [EMAIL PROTECTED] writes: On Sat, 22 Oct 2005 14:54:24 -0400, Mike Meyer wrote: The string formatting is two orders of magnitude faster than the concatenation. The speed difference becomes even more obvious when you increase the number of strings being concatenated: The test

Re: Microsoft Hatred FAQ

2005-10-23 Thread Mike Meyer
entropy [EMAIL PROTECTED] writes: [EMAIL PROTECTED] wrote... [EMAIL PROTECTED] wrote... In comp.lang.perl.misc David Schwartz [EMAIL PROTECTED] wrote: Mike Meyer [EMAIL PROTECTED] wrote in message Sorry, but nobody but the government actually owns property. In most places, you can't

Re: Microsoft Hatred FAQ

2005-10-23 Thread Mike Meyer
aren't interested in constructive intercourse on the question. You're just interesting in knocking down your own arguments. Personally, I'd rather not watch you masterbate. mike -- Mike Meyer [EMAIL PROTECTED] http://www.mired.org/home/mwm/ Independent WWW/Perforce

Re: how to count and extract images

2005-10-23 Thread Mike Meyer
-- Mike Meyer [EMAIL PROTECTED] http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. -- http://mail.python.org/mailman/listinfo/python-list

Re: Syntax across languages

2005-10-23 Thread Mike Meyer
? Hopefully user defined. Rexx has a global control that lets you set the number of digits to be considered significant in doing an FP equality test. mike -- Mike Meyer [EMAIL PROTECTED] http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email

Re: output from external commands

2005-10-23 Thread Mike Meyer
have direct support for it, any more than C++ does. To get that functionality, you want to use either the os.popen function, or - preferable, but only available in newer Pythons - the subprocess module. mike -- Mike Meyer [EMAIL PROTECTED] http://www.mired.org/home/mwm

Re: Syntax across languages

2005-10-23 Thread Mike Meyer
Dennis Lee Bieber [EMAIL PROTECTED] writes: On Sun, 23 Oct 2005 20:59:46 -0400, Mike Meyer [EMAIL PROTECTED] declaimed the following in comp.lang.python: Hopefully user defined. Rexx has a global control that lets you set the number of digits to be considered significant in doing an FP

Re: output from external commands

2005-10-24 Thread Mike Meyer
darren kirby [EMAIL PROTECTED] writes: If all you want is filenames this will work: import glob files = [%s % f for f in glob.glob(*)] What's the point of doing %s % f? How is this different from just file = [f for f in glob.glob(*)]? mike -- Mike Meyer [EMAIL PROTECTED

Re: Importing at runtime

2005-10-24 Thread Mike Meyer
builtin. mike -- Mike Meyer [EMAIL PROTECTED] http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. -- http://mail.python.org/mailman/listinfo/python-list

Re: Read/Write from/to a process

2005-10-25 Thread Mike Meyer
such things. mike -- Mike Meyer [EMAIL PROTECTED] http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. -- http://mail.python.org/mailman/listinfo/python-list

Re: security

2005-10-25 Thread Mike Meyer
in the JVM. Not only was that designed with security in mind, but most browsers come with a JVM already installed. mike -- Mike Meyer [EMAIL PROTECTED] http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. -- http

Re: [OT] Re: output from external commands

2005-10-25 Thread Mike Meyer
Terry Hancock [EMAIL PROTECTED] writes: I think Mr. Lundh's point was only that the output from glob.glob is already guaranteed to be strings, so using either '%s'%f or str(f) is superfluous. Just for the record - this was why I asked what the point was in the first place. mike -- Mike

Re: Newbie question: string replace

2005-10-25 Thread Mike Meyer
, filein) The truly paranoid will replace os.unlink(filein) with os.rename(filein, filein + '.back'). mike -- Mike Meyer [EMAIL PROTECTED] http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. -- http://mail.python.org

Re: Microsoft Hatred FAQ

2005-10-25 Thread Mike Meyer
doing innovative work on desktop systems, and it's taken the desktop software industry two decades to recover from that. I'll accept that as crippling until a better definition comes along. mike -- Mike Meyer [EMAIL PROTECTED] http://www.mired.org/home/mwm/ Independent WWW

Re: Top-quoting defined [was: namespace dictionaries ok?]

2005-10-25 Thread Mike Meyer
, but they are certainly something that we can do without. In light of these arguments, I hereby reserve the right to revert to top-posting if the compulsion overwhelms me. That's your right. Be aware that people will ignore, correct and/or complain about you doing so. mike -- Mike Meyer [EMAIL

Re: Microsoft Hatred FAQ

2005-10-25 Thread Mike Meyer
pissed off about how things could have been done better is a losing proposition. I'm not pissed off about it - I've got better things to do. You asked for prove that desktop software development was crippled by MS. I provided it. mike -- Mike Meyer [EMAIL PROTECTED] http

Re: a Haskell a Day

2005-10-26 Thread Mike Meyer
to his website with the anchor stupider than spam. A typical usage might be: And pointing out that some people are a href=http://xahlee.org/;stupider than spam/a. Thanks, mike -- Mike Meyer [EMAIL PROTECTED] http://www.mired.org/home/mwm/ Independent WWW/Perforce

Re: Double replace or single re.sub?

2005-10-26 Thread Mike Meyer
for the job. If you have well-formed HTML, you can use the htmllib parser in the standard library. If you have the usual crap one finds on the web, I recommend BeautifulSoup. mike -- Mike Meyer [EMAIL PROTECTED] http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix

Re: Set an environment variable

2005-10-26 Thread Mike Meyer
environment with file commands. The posix calls checked the local then global variables. Of course, this is now 10+ year old memory, and I may not RC. mike -- Mike Meyer [EMAIL PROTECTED] http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email

Re: how do i run another script from my python script

2005-10-27 Thread Mike Meyer
bugs lurking there that cause things like your import never finishing. If you need to start a thread in a module, the approach outlined above avoids those bugs. mike -- Mike Meyer [EMAIL PROTECTED] http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix

Re: How to replace all None values with the string Null in a dictionary

2005-10-27 Thread Mike Meyer
dcrespo [EMAIL PROTECTED] writes: Hi all, How can I replace all None values with the string 'Null' in a dictionary? Iterate over everything in the dictionary: for key, item in mydict.items(): if item is None: mydict[key] = 'Null' mike -- Mike Meyer [EMAIL PROTECTED

Re: Microsoft Hatred FAQ

2005-10-27 Thread Mike Meyer
with guns pointed out [MS officers] heads. It seems like he's trying to avoid (further) tarnishing MS's reputation by avoiding having MS associated with other criminals. You have to wonder what could caause that kinnd of behavior. mike -- Mike Meyer [EMAIL PROTECTED] http

Re: Microsoft Hatred FAQ

2005-10-27 Thread Mike Meyer
David Schwartz [EMAIL PROTECTED] writes: Mike Meyer [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I've noticed something strange that makes me wonder the same thing. Everytime someone compares MS's behavior with that of any other criminals, he responds about MS's activity being

Re: specify arbitrary library directory directly in code?

2005-10-27 Thread Mike Meyer
) will search it after other directories. Docs here: http://www.python.org/doc/2.2.3/tut/node8.html#SECTION00820 mike -- Mike Meyer [EMAIL PROTECTED] http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information

Re: Microsoft Hatred FAQ

2005-10-27 Thread Mike Meyer
David Schwartz [EMAIL PROTECTED] writes: Mike Meyer [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Ironically, while no one else has so much as compared MS to criminals with guns. I defy you to find *one* place where I complain that MS behavior is equated to the actual use

Re: Scanning a file

2005-10-28 Thread Mike Meyer
be able to mmap it either. To deal with huge files, the only option is to read the file in in chunks, count the occurences in each chunk, and then do some fiddling to deal with the pattern landing on a boundary. mike -- Mike Meyer [EMAIL PROTECTED] http://www.mired.org

Re: Typing tutor help script needed, please

2005-10-28 Thread Mike Meyer
with 'and' and 'or'. But without a UI, that's pretty much useless - and you haven't said what you want the UI to be. mike -- Mike Meyer [EMAIL PROTECTED] http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. -- http://mail.python.org/mailman

Re: Newbie question: string replace

2005-10-28 Thread Mike Meyer
by this. I would have expected this change to solve the problem. Where do you get two extra newlines? mike -- Mike Meyer [EMAIL PROTECTED] http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. -- http://mail.python.org

Re: Microsoft Hatred FAQ

2005-10-28 Thread Mike Meyer
David Schwartz [EMAIL PROTECTED] writes: Mike Meyer [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] The quote about the mafia doesn't compare MS's actions to actual use of force. I'm sorry, that's just absurd. I won't speculate on what motivates you to engage in such crazy

Re: Automatic binding of **kwargs to variables

2005-10-28 Thread Mike Meyer
: for name, value in kwargs.items(): if name in ('a', 'list', 'of', 'valid', 'keywords'): exec %s = %s % (name, value) else: raise ValueError, Unrecognized keyword + name Others will probably tell you that you really shouldn't be using exec. mike -- Mike

Re: Microsoft Hatred FAQ

2005-10-28 Thread Mike Meyer
David Schwartz [EMAIL PROTECTED] writes: Mike Meyer [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] David Schwartz [EMAIL PROTECTED] writes: Mike Meyer [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Maybe true, maybe not - but it doesn't matter. The point is that you

Re: Scanning a file

2005-10-28 Thread Mike Meyer
() print count sys.exit(0) Did you do timings on it vs. mmap? Having to copy the data multiple times to deal with the overlap - thanks to strings being immutable - would seem to be a lose, and makes me wonder how it could be faster than mmap in general. Thanks, mike -- Mike Meyer

Re: Expanding Python as a macro language

2005-10-29 Thread Mike Meyer
. mike -- Mike Meyer [EMAIL PROTECTED] http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. -- http://mail.python.org/mailman/listinfo/python-list

Re: Automatic binding of **kwargs to variables

2005-10-29 Thread Mike Meyer
[EMAIL PROTECTED] [EMAIL PROTECTED] writes: Mike Meyer wrote: [snip] for name, value in kwargs.items(): if name in ('a', 'list', 'of', 'valid', 'keywords'): exec %s = %s % (name, value) else: raise ValueError, Unrecognized keyword + name Others

Re: Scanning a file

2005-10-29 Thread Mike Meyer
Paul Watson [EMAIL PROTECTED] writes: Mike Meyer [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Paul Watson [EMAIL PROTECTED] writes: ... Did you do timings on it vs. mmap? Having to copy the data multiple times to deal with the overlap - thanks to strings being immutable

Re: Recursive generators and backtracking search

2005-10-29 Thread Mike Meyer
the variable pos here? Yeah, it works, but this strikes me as very confusing. I'm not sure that it might not be implementation dependent. mike -- Mike Meyer [EMAIL PROTECTED] http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more

Re: Expanding Python as a macro language

2005-10-29 Thread Mike Meyer
in this case... In any case a macro language like AutoIt is a general purpose application. At last I must thank Mike Meyer for his suggestion to use python-xlib to avoid low level programming... Just to clarify - python-xlib will let you avoid the need for C functions to do things like send X

Re: Automatic binding of **kwargs to variables

2005-10-30 Thread Mike Meyer
**kwargs with your list could serve as a custom preprocessor. To be particulary perverse, you could try using a Cheetah template to generate your code - I've not tried generating Python with it, but it creates Makefiles quite nicely. mike -- Mike Meyer [EMAIL PROTECTED

Re: Controlling output using print with format string

2005-10-30 Thread Mike Meyer
putting a space between all the objects it prints. So you have to convert all the objects into a single string before printing that string. mike -- Mike Meyer [EMAIL PROTECTED] http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more

Re: need start point for getting html info from web

2005-10-30 Thread Mike Meyer
thereof - of the HTML you're scraping. If they change it, your code breaks. mike -- Mike Meyer [EMAIL PROTECTED] http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. -- http://mail.python.org/mailman/listinfo

Re: Arguments for button command via Tkinter?

2005-10-31 Thread Mike Meyer
time optional arguments to the lambda, bound to the correct value then. So you'd do: button['command'] = lambda b = button: self.fill(b) The version you used will look up the name button when the lambda is invoked. My version will look it up when the lambda is defined. mike -- Mike

Re: Expanding Python as a macro language

2005-10-31 Thread Mike Meyer
. mike -- Mike Meyer [EMAIL PROTECTED] http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. -- http://mail.python.org/mailman/listinfo/python-list

Re: Microsoft Hatred FAQ

2005-10-31 Thread Mike Meyer
David Schwartz [EMAIL PROTECTED] writes: Mike Meyer [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Microsoft's behavior consisted of arguments, that is, did not involve force, the threat of force, fraud, or the threat of fraud. This is perhaps the most vital distinction

Re: Microsoft Hatred FAQ

2005-10-31 Thread Mike Meyer
David Schwartz [EMAIL PROTECTED] writes: Mike Meyer [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Of course, you've dropped the real point, which is your own inabillity to distinguish between, as you put it, guns and arguments. You always act as if every mention of a crime

Re: Microsoft Hatred FAQ

2005-10-31 Thread Mike Meyer
way out of it, and come up with a reason for this behavior other than doing so at MS's orders. mike -- Mike Meyer [EMAIL PROTECTED] http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. -- http://mail.python.org/mailman

Re: Microsoft Hatred FAQ

2005-10-31 Thread Mike Meyer
David Schwartz [EMAIL PROTECTED] writes: Mike Meyer [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] David Schwartz [EMAIL PROTECTED] writes: I'm trying to find out why you regularly ignore that difference for everyone but MS. To substantiate that claim, you'd have to point

Re: Xah's edu corner: the Journey of Foreign Characters thru Internet

2005-11-01 Thread Mike Meyer
, and there's no easy way to distinguish those from his usual work. He has been accurately described as stupider than spam. Please help Google find him that way by adding an appropriater link to your web site: a href=http://xahlee.org/;stupider than spam/a mike -- Mike Meyer [EMAIL PROTECTED

Re: extracting numbers from a file, excluding words

2005-11-01 Thread Mike Meyer
()) mike -- Mike Meyer [EMAIL PROTECTED] http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. -- http://mail.python.org/mailman/listinfo/python-list

Re: If Statement Error (Tic Tac Toe)

2005-11-01 Thread Mike Meyer
')\ or ((gameboard[0] and gameboard[4] and gameboard[8]) == 'X') or ((gameboard[2] and gameboard[4] and gameboard[6]) == 'X')): print Player 2 wins! win = 1 -- Mike Meyer [EMAIL PROTECTED] http://www.mired.org/home/mwm/ Independent WWW

Re: Python's website does a great disservice to the language

2005-11-01 Thread Mike Meyer
browser pick them, anyway. In the latter case, the fault is yours, not theirs. mike -- Mike Meyer [EMAIL PROTECTED] http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. -- http://mail.python.org/mailman/listinfo/python

Re: If Statement Error (Tic Tac Toe)

2005-11-01 Thread Mike Meyer
. The only difference is what you have to do to get a single (double) quote in the string. mike -- Mike Meyer [EMAIL PROTECTED] http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. -- http://mail.python.org/mailman

Re: If Statement Error (Tic Tac Toe)

2005-11-02 Thread Mike Meyer
to change regarding 'OX' or something else? Make sure you're setting cell properly - you didn't show that. Also, the above code is a syntax error; I assume your running code has the correct indentation. mike -- Mike Meyer [EMAIL PROTECTED] http://www.mired.org/home/mwm

Re: Xah's edu corner: the Journey of Foreign Characters thru Internet

2005-11-02 Thread Mike Meyer
Peter Hansen [EMAIL PROTECTED] writes: Mike Meyer wrote: Xah Leh is incompetent, but apparently well-intentioned. In your view is that (well-intentioned) an established fact at this point? I was still waiting for conclusive evidence. No, it's not an established fact, which is why I said

Re: If Statement Error (Tic Tac Toe)

2005-11-02 Thread Mike Meyer
should be 0 and 9, so that gameboard[:] is the same thing yet again. But since you're not changing the board but reading it, there's no need to make a copy, which is what the sliced versions do. mike -- Mike Meyer [EMAIL PROTECTED] http://www.mired.org/home/mwm/ Independent WWW

Re: dictionary that have functions with arguments

2005-11-02 Thread Mike Meyer
to both these examples. mike -- Mike Meyer [EMAIL PROTECTED] http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. -- http://mail.python.org/mailman/listinfo/python-list

Re: how to check for unix password

2005-11-02 Thread Mike Meyer
the returned value to the password from the password file. mike -- Mike Meyer [EMAIL PROTECTED] http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. -- http://mail.python.org/mailman/listinfo/python-list

Re: Most efficient way of storing 1024*1024 bits

2005-11-02 Thread Mike Meyer
the things as a string of 0 and 1, and then use .find (or maybe the in keyword) for doing the searches. This doesn't work very well if you're going to mutate the string, though. mike -- Mike Meyer [EMAIL PROTECTED] http://www.mired.org/home/mwm/ Independent WWW/Perforce

Re: How to print random strings

2005-11-02 Thread Mike Meyer
he may have forgot to cover something? Well, randrange can be used to do this, but random.choice is more pythonic. mike -- Mike Meyer [EMAIL PROTECTED] http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. -- http

Re: another beginner sort of question

2005-11-02 Thread Mike Meyer
is easier than the shell script. mike -- Mike Meyer [EMAIL PROTECTED] http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. -- http://mail.python.org/mailman/listinfo/python-list

Re: Pychecker Re: Nested List Question

2005-11-02 Thread Mike Meyer
to avoid spurious warnings, pychecker would have to know whether the objects in the list were immutable or not. It could guess that if the objects are builtin types, but not for other types. mike -- Mike Meyer [EMAIL PROTECTED] http://www.mired.org/home/mwm/ Independent WWW/Perforce

Re: Getting a function name from string

2005-11-03 Thread Mike Meyer
. This works ilke a charm. If you don't want to deal with entire files, you can use exec, or even eval if you just want to get a value back. mike -- Mike Meyer [EMAIL PROTECTED] http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information

  1   2   3   4   5   6   7   8   9   10   >