Re: How can I correct an error in an old post?

2006-10-05 Thread Blair P. Houghton
Tim Roberts wrote: > Although it might be mirrored on a web site somewhere, this is a Usenet > newsgroup. It is impossible to "close" a thread. The concept simply does > not exist. Google, the new de facto website of record for Usenet, disagrees. But they do about 10 things totally wrong with

Re: Google breaks Usenet (was Re: How can I correct an error in an old post?)

2006-10-05 Thread Blair P. Houghton
Aahz wrote: > In article <[EMAIL PROTECTED]>, > Blair P. Houghton <[EMAIL PROTECTED]> wrote: > > > >But they do about 10 things totally wrong with Google groups that > >I'd've fixed in my spare time in my first week if they'd hired me back >

Re: Google breaks Usenet (was Re: How can I correct an error in an old post?)

2006-10-06 Thread Blair P. Houghton
Aahz wrote: > In article <[EMAIL PROTECTED]>, > Bryan Olson <[EMAIL PROTECTED]> wrote: > >Blair P. Houghton wrote: > >> > >> But they do about 10 things totally wrong with Google groups that > >> I'd've fixed in my spare time in my fi

Re: Google breaks Usenet (was Re: How can I correct an error in an old post?)

2006-10-08 Thread Blair P. Houghton
Bryan Olson wrote: > Blair P. Houghton wrote: > > Usenet isn't just the "send this message to all leaf nodes via tree" > > behavior, > > it's the "show me the message from 1987 or 1988 written by dickie > > sexton where > > he invents the

Re: Google breaks Usenet (was Re: How can I correct an error in an old post?)

2006-10-08 Thread Blair P. Houghton
Bryan Olson wrote: > Aahz wrote: > > The problem is the network effect. In this case, what Google has that > > can't be replicated is the history of posts. > > There's no magic there. Get them the same way Google and > Dejanews got them, plus you might scrape Google, from some > locality with fav

Re: hundreds of seconds?

2006-10-11 Thread Blair P. Houghton
Tim Peters wrote: > On Windows 98, time.time() typically updates only once per 0.055 > seconds (18.2 Hz), but time.clock() typically updates more than a > million times per second. You do /not/ want to use time.time() for > sub-second time measurement on Windows. Use time.clock() for this > purp

Re: RegEx conditional search and replace

2006-07-06 Thread Blair P. Houghton
mbstevens wrote: > In such a case you may need to make the page > into one string to search if you don't want to use some complex > method of tracking state with variables as you move from > string to string. In general it's a very hard problem to do stateful regexes. I recall something from las

Re: EVIDENCE: 911 was CONTROLLED DEMOLITION to make muslims 2nd class

2006-09-05 Thread Blair P. Houghton
>thermate So the guy found burned aluminum on iron. That doesn't mean there were military-grade incendiary devices anywhere near the WTC. You idiot. --Blair -- http://mail.python.org/mailman/listinfo/python-list

Re: best small database?

2006-09-11 Thread Blair P. Houghton
Larry Bates wrote: > The filesystem is almost always the > most efficient place to store files, not as blobs in a > database. I could get all theoretical about why that's not so in most cases, but there are plenty of cases where it is so (especially when the person doing the DB doesn't get the id

Re: best small database?

2006-09-12 Thread Blair P. Houghton
Larry Bates wrote: > As far as "rational extension" is concerned, I think I can relate. > As a developer of imaging systems that store multiple-millions of > scanned pieces of paper online for customers, I can promise you > the file system is quite efficient at storing files (and that is > what th

Re: best small database?

2006-09-13 Thread Blair P. Houghton
Fredrik Lundh wrote: > Blair P. Houghton wrote: > > > Can't be any harder than switching between incompatible filesystems, > > unless you assume it should "just work...". > > so what file systems are you using that don't support file names and >

Re: best small database?

2006-09-14 Thread Blair P. Houghton
Fredrik Lundh wrote: > Blair P. Houghton wrote: > > I'm saying that the change from Oracle 9 to Oracle 10 is like changing > > from ffs to fat32. > > well, I'm quite sure that the people I know who's spending a lot of > their time moving stuff from Oracle N

Re: Timeline for Python?

2006-09-23 Thread Blair P. Houghton
wesley chun wrote: > > 1. never write against older versions of Python... you will only > obsolete your book even faster (well, "sooner") I believe there is some market for documentation of older versions of software. Many installations are constrained by the cost of upgrading and can not mi

Re: Timeline for Python?

2006-09-24 Thread Blair P. Houghton
Lawrence D'Oliveiro wrote: > In message <[EMAIL PROTECTED]>, Blair P. > Houghton wrote: > > > wesley chun wrote: > >> > >> 1. never write against older versions of Python... you will only > >> obsolete your book even faster (well,

Re: Timeline for Python?

2006-09-25 Thread Blair P. Houghton
Aahz wrote: > You did see my advice, seconded by Wes, that any book should cover the > version differences? How is that sufficiently inadequate that new books > should specifically target older versions? I think it's a good idea, but I also think that it may cause authors to rely on the old docu

Re: does anybody earn a living programming in python?

2006-09-27 Thread Blair P. Houghton
walterbyrd wrote: > If so, I doubt there are many. > > I wonder why that is? Because Java has Sun's crazy-money behind it, and that pisses Microsoft off, so C# has MS's crazy-money behind it. And long before that, C was /the/ language because it was the only one that would allow you to actually

Re: How can I correct an error in an old post?

2006-10-01 Thread Blair P. Houghton
[EMAIL PROTECTED] wrote: > Hi. > I was searching for some information regarding a problem and found an > interesting post that includes an answer to the problem; thought the > post is very helpful it is based on a wrong assumption and thus the > solution it suggests is incorrect. It took me some t

Re: How can I correct an error in an old post?

2006-10-02 Thread Blair P. Houghton
Steve Holden wrote: > Since this message was never on topic, I'd appreciate it if all > concerned would close this thread now. I already did. How did you get in here? --Blair -- http://mail.python.org/mailman/listinfo/python-list

Re: merits of Lisp vs Python

2006-12-09 Thread Blair P. Houghton
Python doesn't annoyingly rip you out of the real world to code in it. Anyone looking at a python script can get a sense of where it's going. --Blair -- http://mail.python.org/mailman/listinfo/python-list

webbrowser module + urls ending in .py = a security hole?

2006-01-29 Thread Blair P. Houghton
I'm just learning Python, so bear with. I was messing around with the webbrowser module and decided it was pretty cool to have the browser open a URL from within a python script, so I wrote a short script to open a local file the same way, using the script file as an example target: # browser-tes

Re: webbrowser module + urls ending in .py = a security hole?

2006-01-29 Thread Blair P. Houghton
Oh, uh, Python version 2.4.2, in case you're wondering. --Blair -- http://mail.python.org/mailman/listinfo/python-list

Re: webbrowser module + urls ending in .py = a security hole?

2006-01-30 Thread Blair P. Houghton
I'm going to try it out on a remote server later today. I did use this script to fetch remote HTML (url='http://www.python.org') before I tired the remote file, and it opened the webpage in Firefox. I may also try to poke around in webbrowser.py, if possible, to see if I can see whether it's sele

Re: Find directory name of file?

2006-01-30 Thread Blair P. Houghton
Grant Edwards wrote: > Try something like this at the beginning of your program and > see if it does what you want: > > print os.path.abspath(sys.argv[0]) Wanna see something freaky? In IDLE, I type the following: >>> import sys >>> import os.path >>> os.path.abspath(sys.argv[0])

Re: webbrowser module + urls ending in .py = a security hole?

2006-01-30 Thread Blair P. Houghton
Sorry...should read: "I did use the script to fetch remote HTML (url='http://www.python.org') before I tried the local file, and it opened the webpage in Firefox." Too many chars, too few fingers. --Blair -- http://mail.python.org/mailman/listinfo/python-list

Re: webbrowser module + urls ending in .py = a security hole?

2006-02-01 Thread Blair P. Houghton
>Would it be sufficient in your case merely to allow only .html files to >be loaded? Or URLs without .extensions? Or even just permit only the >http: protocol? Personally, I'm just noodling around with this right now. So "my case" is the abstract case. I think the solution if one was needed wou

Re: webbrowser module + urls ending in .py = a security hole?

2006-02-02 Thread Blair P. Houghton
Peter Hansen wrote: > It appears the correct approach might be something along the lines of > reading the registry to find what application is configured for the > "HTTP" protocol (HKCR->HTTP->shell->open->command) and run that, passing > it the URL. I think that would do what most people expect,

Re: webbrowser module + urls ending in .py = a security hole?

2006-02-02 Thread Blair P. Houghton
Blair P. Houghton wrote: > Which makes it no security hole at > all, it would seem... Well, no, that's a little strong. No *new* security hole, maybe. It would be on the order of having ./ in the PATH for root, and getting trapped by a hacker who named his rootkit "ls" or

Re: OO conventions

2006-02-02 Thread Blair P. Houghton
Image would be a superclass to JPGImage, BMPImage, PNGImage, etc... But which to use could only be determined AFTER opening the file, because "file.jpg" doesn't have type JPG, it has type string and semantic value "maybe a jpeg file or maybe something misnamed as a jpeg file". So Image.open(filen

Re: OO conventions

2006-02-03 Thread Blair P. Houghton
bruno at modulix wrote: > Blair P. Houghton wrote: > > So Image.open(filename) seems right as a factory function that opens > > the file, figures out what it really is, constructs the appropriate > > subclass object (likely by passing a string to the constructor, e.g.,

Re: Does Python support a peek like method for its file objects?

2006-02-05 Thread Blair P. Houghton
Avi Kak wrote: > Hello: > > Does Python support a peek like method for its file objects? > > I'd like to be able to look at the next byte in a disk file before > deciding whether I should read it with, say, the read() method. > Is it possible to do so in Python? > > Your answer would be m

Re: Does Python support a peek like method for its file objects?

2006-02-05 Thread Blair P. Houghton
Here's a version that should work in text mode as well: fp = file("some file on disk", "r") b = "" while 1: p = fp.tell() # peek at the next byte; moves file position only if a byte is read c = fp.read(1) # decide whether to read it if c == "?": # pretend we never read

Re: OO conventions

2006-02-05 Thread Blair P. Houghton
Alex Martelli wrote: > As you see, static methods have a small extra lookup cost (a couple > hundred nanoseconds on my oldish laptop); I would've expected the opposite effect...I guess the runtime considers instances more active than the static portion of a class. > "Premature > optimization is

Re: Learning Python

2006-02-05 Thread Blair P. Houghton
Xavier Morel wrote: > Where the hell did you get the idea of stacking input on a raw_input in > the first place? I'm guessing it goes something like: "input is a verb, but raw_input is a noun, so raw_input looks like a cast or conversion or stream constructor, and input looks like an action..."

Re: numeric expression from string?

2006-02-06 Thread Blair P. Houghton
Steven wrote: >Do you think your users might enter something Evil and break their own system? That's not usually how it works. How it usually works is: 1. Innocent code-monkey writes nifty applet, posts on usenet. 2. Innocent but dull-witted framework manufacturer includes nifty applet in Next

Re: in over my head ascii

2006-02-06 Thread Blair P. Houghton
[EMAIL PROTECTED] wrote: > What do you bet the server software was written by someone > who thought ASCII STX meant literally the characters "STX"? Wouldn't explain the "ENX" instead of "ETX". > I've seen stupider things. I give it 25% probability of being what you said, and 75% probability that

Re: numeric expression from string?

2006-02-06 Thread Blair P. Houghton
Steven wrote: >Do you think your users might enter something Evil and break their own system? That's not usually how it works. How it usually works is: 1. Innocent code-monkey writes nifty applet, posts on usenet. 2. Innocent but dull-witted framework manufacturer includes nifty applet in Next

Re: in over my head ascii

2006-02-10 Thread Blair P. Houghton
[EMAIL PROTECTED] wrote: > so. how do i make 200 occupy 4 bytes ? Did you double-check that they didn't want "0200" in ascii in the message? As in: STX0200ENX Because that's always possible. And, if you're _lucky_, they designed the innards of the message so that "ENX" ca

Re: Python - Web Display Technology

2006-05-22 Thread Blair P. Houghton
Sybren Stuvel wrote: > Heiko Wundram enlightened us with: > > And: the web is a platform to offer _information_. Not to offer > > shiny graphics/sound [...] > > Many would disagree... > > Not me, but I know a lot of people that would. I would. Most people would, once they realize that shiny/flas

Re: Python - Web Display Technology

2006-05-23 Thread Blair P. Houghton
[EMAIL PROTECTED] wrote: > SamFeltus wrote: > > Here is a visual argument, > > http://samfeltus.com/swf/contact_globes.swf > > Here's a text-based argument. > > If I search Golge for "gardener, Athens, GA" then Google's spiders > won't have recorded your contact page. So I don't find you as a loca