Re: Ancient projectiles (was: Muzzle Velocity (was: High resolution sleep (Linux))

2007-05-28 Thread John J. Lee
Roy Smith <[EMAIL PROTECTED]> writes: > In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Cameron Laird) > wrote: > > > Hmmm; now you've got me curious. What *were* the first > > composite projectiles? > > Fetchez la Vache! :-) -- http://mail.python.org/mailman/listinfo/python-list

Re: Is PEP-8 a Code or More of a Guideline?

2007-05-30 Thread John J. Lee
Steven Bethard <[EMAIL PROTECTED]> writes: > John J. Lee wrote: [...] > > Even as a native English speaker, some of these are tricky -- > > e.g. urllib has a private class named "addinfourl". "What's this > > 'fourl' we're adding in?&q

Re: Singleton in Python Cookbook

2007-07-25 Thread John J. Lee
Alex Popescu <[EMAIL PROTECTED]> writes: > Hi all! > > I was reading through Python Cookbook the Singleton recipe. At this moment > I am a bit puzzled as the example in the book is not working resulting in: > > TypeError: type.__new__(SingleSpam): SingleSpam is not a subtype of type Haven't look

Re: ANN: Snobol 1.0

2007-07-26 Thread John J. Lee
(Sorry if this appears twice, accidentally included c.l.py.announce the first time where it was (correctly) rejected, not sure if that means it didn't get through to c.l.py either). greg <[EMAIL PROTECTED]> writes: > Aahz wrote: >> So adding >> SNOBOL patterns to another library would be a wonder

Re: Singleton in Python Cookbook

2007-07-25 Thread John J. Lee
"Diez B. Roggisch" <[EMAIL PROTECTED]> writes: [...] > AFAIK the cookbook is completely found online at ASPN. So no sweat > publishing it here. [...] No: the book-form cookbook is edited, and has extra text. I believe the recipes are under a BSD-style license, though. John -- http://mail.pytho

Re: slow emails

2007-07-28 Thread John J. Lee
Gabriel Dragffy <[EMAIL PROTECTED]> writes: > Whenever I post to this list my email invariably takes ages to show > up - perhaps two days or so. Often times not at all. Why is this? > > I am subscribed to Ubuntu mail list which is also high traffic, and > my posts show up there within minutes. N

Re: Pythonic way for missing dict keys

2007-07-28 Thread John J. Lee
Alex Popescu <[EMAIL PROTECTED]> writes: > Zentrader <[EMAIL PROTECTED]> wrote in news:1185041243.323915.161230 > @x40g2000prg.googlegroups.com: > >> On Jul 21, 7:48 am, Duncan Booth <[EMAIL PROTECTED]> wrote: >> >> [snip...] >> >> >>>From the 2.6 PEP #361 (looks like dict.has_key is deprecated)

Re: Pythonic way for missing dict keys

2007-08-01 Thread John J. Lee
Steve Holden <[EMAIL PROTECTED]> writes: [...] > Yup. Anyway there's a trivial translation for uses of apply. > > apply(f, *args, **kw) => f(*args, **kw) [...] Steve means: apply(f, args, kw) => f(*args, **kw) John -- http://mail.python.org/mailman/listinfo/python-list

Re: UK Ordnance survey coordinates and Geocoding anyone ?

2007-08-01 Thread John J. Lee
Ken Starks <[EMAIL PROTECTED]> writes: [...] > http://www.magic.gov.uk/ [snip rest of URL...] Cool, I had no idea we still had a department of magic! I'll keep my eyes peeled for Mr. Norrell... John -- http://mail.python.org/mailman/listinfo/python-list

Re: A question on plugin design

2007-08-05 Thread John J. Lee
Grzegorz Słodkowicz <[EMAIL PROTECTED]> writes: [...] > I'd also be grateful for pointers to a well designed Pythonic plugin > architecture but I'd much prefer a small project with a simple API. Google for setuptools and Python eggs. Search for "entry point" on the setuptools page. John -- htt

Misleading wikipedia article on Python 3?

2007-08-05 Thread John J. Lee
I'm surprised to read this: http://en.wikipedia.org/wiki/Python_3 """Note that while there is no explicit requirement that code be able to run unmodified in both versions, in practice it is quite likely for most code. As of January 2007, it looks like most reasonable code should run quite well un

Re: Misleading wikipedia article on Python 3?

2007-08-05 Thread John J. Lee
"Martin v. Löwis" <[EMAIL PROTECTED]> writes: >> I'm surprised to read this: >> >> http://en.wikipedia.org/wiki/Python_3 >> >> """Note that while there is no explicit requirement that code be able >> to run unmodified in both versions, in practice it is quite likely for >> most code. As of Janua

Re: A question on plugin design

2007-08-05 Thread John J. Lee
[EMAIL PROTECTED] (John J. Lee) writes: > Grzegorz Słodkowicz <[EMAIL PROTECTED]> writes: > [...] >> I'd also be grateful for pointers to a well designed Pythonic plugin >> architecture but I'd much prefer a small project with a simple API. > > Google for

Re: Misleading wikipedia article on Python 3?

2007-08-05 Thread John J. Lee
"Martin v. Löwis" <[EMAIL PROTECTED]> writes: [... snip stuff I don't follow ...] > However, it *is* a design goal to make 2.6 so that transition to > 3k becomes simpler. That's not a 3k feature, but a 2.6 one. Not sure I care about this sort of thing for the purpses of my question. I just wanted

re: mmm-mode, python-mode and doctest-mode?

2007-08-07 Thread John J Lee
On Tue, 7 Aug 2007, Edward Loper wrote: > [John J Lee] >> Is it possible to get doctest-mode to work with mmm-mode and python-mode >> nicely so that docstrings containing doctests are editable in doctest-mode? > > I recently released a new version of doctest-mode [1], a

Re: Misleading wikipedia article on Python 3?

2007-08-07 Thread John J. Lee
Carsten Haese <[EMAIL PROTECTED]> writes: > On Sun, 2007-08-05 at 23:09 +0000, John J. Lee wrote: >> I just wanted to know: is it easy to make my code so it >> runs on 2.6 and 3.0, without funny stuff like a code translator? > > That depends on your definitions of &q

Re: ensuring GNU readline isn't used

2007-08-07 Thread John J. Lee
Duncan Booth <[EMAIL PROTECTED]> writes: > Josh Paetzel <[EMAIL PROTECTED]> wrote: > >> Is there a way to ensure that GNU readline isn't used (even though >> support may have been compiled in?). I'm experiencing a licensing >> problem, I'd like to use the "cmd" module, for example, but my code is

Re: Misleading wikipedia article on Python 3?

2007-08-07 Thread John J. Lee
"Martin v. Löwis" <[EMAIL PROTECTED]> writes: >> Do you *really* think that projects will fall 50-50 into the "yes" and >> "no" camps, as you seem to imply -- after all, if you thought that one >> case was more common, why wouldn't you mention which it was? > > I know you didn't ask me this time,

Re: Screenscraping, in python, a web page that requires javascript?

2007-08-09 Thread John J. Lee
Dan Stromberg - Datallegro <[EMAIL PROTECTED]> writes: > Is there a method, with python, of screenscraping a web page, if that web > page uses javascript? Not pure CPython, no. > I know about BeautifulSoup, but AFAIK at this time, BeautifulSoup is for > HTML that doesn't have embedded javascrip

Re: cookielib

2007-08-11 Thread John J. Lee
Boris Ozegovic <[EMAIL PROTECTED]> writes: > Hi > > I have HTTP client which accepts cookies. If client allready has cookie, > but that cookie has expired, server sends him new cookie, and in response > object Set-Cookie: header everything is fine, but if I reload request, > client sends expired

Re: Seek the one billionth line in a file containing 3 billion lines.

2007-08-12 Thread John J. Lee
"Chris Mellon" <[EMAIL PROTECTED]> writes: [...] > The minimum bounds for a line is at least one byte (the newline) and > maybe more, depending on your data. You can seek() forward the minimum > amount of bytes that (1 billion -1) lines will consume and save > yourself some wasted IO. But how do y

Re: urllib2.urlopen(url) pulling something other than HTML

2007-08-20 Thread John J. Lee
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: [...] > -- > f = formatter.AbstractFormatter(formatter.DumbWriter(StringIO())) > parser = htmllib.HTMLParser(f) > parser.feed(html) > parser.close() > return parser.anchorlist > -

Re: desperately in need of a tool

2007-08-20 Thread John J. Lee
yagyala <[EMAIL PROTECTED]> writes: > I recently started working for a company that has just implemented its > first set of software standards. So far, so good. Here's the problem: > one of those standards is that the comments for each routine must > indicate every other routine that it calls. As

Re: desperately in need of a tool

2007-08-20 Thread John J. Lee
yagyala <[EMAIL PROTECTED]> writes: > I recently started working for a company that has just implemented its > first set of software standards. So far, so good. Here's the problem: > one of those standards is that the comments for each routine must > indicate every other routine that it calls. As

Re: urllib2.urlopen(url) pulling something other than HTML

2007-08-21 Thread John J. Lee
Gabriel Genellina <[EMAIL PROTECTED]> writes: [...] > Don't even try to understand it - it's a mess. Use the HTMLParser > module instead. [...] Module sgmllib (and therefore module htmllib also) is more tolerant of bad HTML than module HTMLParser. John -- http://mail.python.org/mailman/listinfo

Re: Car-ac-systems

2007-09-11 Thread John J. Lee
"John Timney (MVP)" <[EMAIL PROTECTED]> writes: [...] > I like top posted threads, its my preferred response method - and actually [...] http://en.wikipedia.org/wiki/Apostrophe#English_language_usage John -- http://mail.python.org/mailman/listinfo/python-list

Re: clientcookie/clientform and checking to see if a website accepted my login details

2007-03-08 Thread John J. Lee
[EMAIL PROTECTED] writes: > alright, i'm coding a program that will log me into yahoo.com (so > far), now, the problem i have is that once i've submitted by login & > password, the program doesn't know whether yahoo.com accepted it. > " > response = ClientCookie.urlopen(form.click()) > " > > now,

Re: IronPython with Apache

2007-03-10 Thread John J. Lee
"edfialk" <[EMAIL PROTECTED]> writes: [...] > So, I'm told I need IronPython, which I get, and I replace the #!c: > \Python25\python.exe with the IronPython executable (#!c: > \IronPython-1.0.1\ipy.exe), but I get a 500 Internal Server error and: > > "[Wed Mar 07 17:02:21 2007] [error] [client 127

Re: merits of Lisp vs Python

2007-03-10 Thread John J. Lee
"Gabriel Genellina" <[EMAIL PROTECTED]> writes: > En Fri, 09 Mar 2007 16:10:51 -0300, Tim Bradshaw <[EMAIL PROTECTED]> > escribi�: [...] > > ill-conceived idea (not because of Python, note!). The electronic > > gadget people need in the developing world is a mobile phone not a > > computer. >

Re: merits of Lisp vs Python

2007-03-10 Thread John J. Lee
John Nagle <[EMAIL PROTECTED]> writes: [...] > Python, on the other hand, is uphill all the way. Constant trouble > with version issues, especially with C components called from Python. > MySQLdb, M2Crypto, SSL - they all have platform/version > incompatibility problems. I just spent three da

Re: Python 2.5 incompatible with Fedora Core 6 - packaging problems again

2007-03-10 Thread John J. Lee
John Nagle <[EMAIL PROTECTED]> writes: > [EMAIL PROTECTED] wrote: > > The distutils setup.py script checks for ncurses bits > > No, it just plows on after compiler errors. > > > As another person pointed out, you're conflating Python proper with a > > specific Linux distribution's packaging

Re: Python 2.5 incompatible with Fedora Core 6 - packaging problems again

2007-03-10 Thread John J. Lee
John Nagle <[EMAIL PROTECTED]> writes: [...] > Perl, PHP, C, C++, and Java don't have this particular > problem. Python stands alone, out in the cold. [...] I guess different people's experiences differ. I remember trying to install Java on a FreeBSD server a few years back. I recall no sin

Re: Python 2.5 incompatible with Fedora Core 6 - packaging problems again

2007-03-10 Thread John J. Lee
John Nagle <[EMAIL PROTECTED]> writes: [...] > This kind of nonsense is why hosting companies don't want to support Python. There seems a more obvious reason... > Perl and PHP may be dumb, but they just work. Java has a company behind it. > Python just isn't ready. Which is embarassing, ten

Re: Python 2.5 incompatible with Fedora Core 6 - packaging problems again

2007-03-10 Thread John J. Lee
John Nagle <[EMAIL PROTECTED]> writes: > John J. Lee wrote: > > John Nagle <[EMAIL PROTECTED]> writes: > > > >>[EMAIL PROTECTED] wrote: > > Traditionally, in the open source world, one does something about it, > > or shuts up after having made on

Re: merits of Lisp vs Python

2007-03-10 Thread John J. Lee
John Nagle <[EMAIL PROTECTED]> writes: > John J. Lee wrote: > > John Nagle <[EMAIL PROTECTED]> writes: > > [...] > > > >>Python, on the other hand, is uphill all the way. Constant trouble > >>with version issues, especially with C compon

Re: merits of Lisp vs Python

2007-03-14 Thread John J. Lee
"Graham Dumpleton" <[EMAIL PROTECTED]> writes: > On Mar 11, 12:31 pm, [EMAIL PROTECTED] (John J. Lee) wrote: [...] > > mod_python relies on an unsupported feature of Python, namely > > multiple interpreters --> risk of more pain with C extensions. > > As us

Re: merits of Lisp vs Python

2007-03-14 Thread John J. Lee
John Nagle <[EMAIL PROTECTED]> writes: > John J. Lee wrote: > > "Graham Dumpleton" <[EMAIL PROTECTED]> writes: > > > >>On Mar 11, 12:31 pm, [EMAIL PROTECTED] (John J. Lee) wrote: > > > Is it possible to ask mod_python to start separate

Re: merits of Lisp vs Python

2007-03-15 Thread John J. Lee
Jorge Godoy <[EMAIL PROTECTED]> writes: > [EMAIL PROTECTED] (John J. Lee) writes: > > > John Nagle <[EMAIL PROTECTED]> writes: > > > >> John J. Lee wrote: > >> > "Graham Dumpleton" <[EMAIL PROTECTED]> writes: >

Re: Wikipedia and a little piece of Python History

2007-03-21 Thread John J. Lee
"Paddy" <[EMAIL PROTECTED]> writes: > I just had a link to Tim peters first post on doctest: > http://groups.google.com/group/comp.lang.python/msg/1c57cfb7b3772763 > removed from http://en.wikipedia.org/wiki/Doctest as it doesn't fit > their guidelines for external links. > I wonder, could maybe t

Re: When is List Comprehension inappropriate?

2007-03-21 Thread John J. Lee
Steve Holden <[EMAIL PROTECTED]> writes: > Alex Martelli wrote: > > BJörn Lindqvist <[EMAIL PROTECTED]> wrote: > >... > >> even2 = [(pos, col) for pos, col in iterimage(im, width, height, 2)] > > list(iterimage(etc etc)) > > is surely a better way to express identical semantics. More > > gene

Re: Wikipedia and a little piece of Python History

2007-03-21 Thread John J. Lee
"Paddy" <[EMAIL PROTECTED]> writes: > On Mar 21, 8:20 pm, [EMAIL PROTECTED] (John J. Lee) wrote: > > "Paddy" <[EMAIL PROTECTED]> writes: > > > I just had a link to Tim peters first post on doctest: > > >http://groups.google.com/group/c

Re: [JOB] Sr. Python Developer, Northern VA

2007-03-22 Thread John J. Lee
> > Michael Bentley wrote: > > > Perhaps it is different where you live, but here you can put on your > > resume relevant things that aren't paying jobs. Otherwise nobody > > would ever get their first job, right? > > Sure you can. But around here if one has been unemployed for a while > it's near

Re: [JOB] Sr. Python Developer, Northern VA

2007-03-24 Thread John J. Lee
Chuck Rhode <[EMAIL PROTECTED]> writes: > John J. Lee wrote this on Thu, 22 Mar 2007 21:16:13 +. My reply is > below. > > > I sympathise but conventional wisdom (which surely has a lot of > > truth in it) is that employers are not faced with the problem of >

Re: [JOB] Sr. Python Developer, Northern VA

2007-03-24 Thread John J. Lee
Anton Vredegoor <[EMAIL PROTECTED]> writes: > John J. Lee wrote: [...] > > but I'm sure you appreciate the point -- if you're hiring employees, > > being fairly risk-averse is probably quite rational. > > So when we really mean business, you're back to

Re: A better webpage filter

2007-03-25 Thread John J. Lee
Anton Vredegoor <[EMAIL PROTECTED]> writes: [...] > Most web pages I visit lately are taking so much room for ads (even > with adblocker installed) that the mere 20 columns of text that are > available for reading are slowing me down unacceptably. I have tried [...] http://webcleaner.sourceforge.n

Re: Question about using cookielib in python 2.4

2007-03-30 Thread John J. Lee
[EMAIL PROTECTED] writes: > Hi, > I am following the example of Python cookbook (14.7) about using > cookielib in python2.4 > > cj = cookielib.LWPCookieJar() > // code to send out the request > print "Coookie-" > if cj is not None: > fo

Re: very strange syntax errors

2007-03-30 Thread John J. Lee
hg <[EMAIL PROTECTED]> writes: > Hi, > > I'v been facing some very strange errors lately: > > one example: > > def __init__(self): > > import my_info > some_text = my_info.T_SOME_TEXT > ^ syntax error > > > I manage to get rid of that

Re: how to remove specified cookie in cookie jar?

2007-04-01 Thread John J. Lee
"ken" <[EMAIL PROTECTED]> writes: > How to remove specified cookie (via a given name) in cookie jar? > > I have the following code, but how can I remove a specified cookie in > the cookie jar? > cj = cookielib.LWPCookieJar() > > if cj is not None: > if os.path.isfile(COOKIEFILE): >

Re: Cheeseshop needs mirrors

2007-04-01 Thread John J. Lee
Richard Jones <[EMAIL PROTECTED]> writes: [...] > And of course I'll reiterate the same line I always do: the Cheese Shop was > set up by a volunteer, enhanced by some other volunteers and exactly > nothing more will get done unless more volunteers offer their time. PyPI has "just worked" for me,

Re: Does Numpy work on QNX 4.25 with Python 2.2?

2007-04-01 Thread John J. Lee
Robert Kern <[EMAIL PROTECTED]> writes: > ZMY wrote: > > I am trying to convert some old Fortran code into Python program and > > get them work on a QNX 4.25 system. Since the program requires speed, > > I think using Numpy is really necessary. But I haven't found anything > > on web about using n

Re: Question about using urllib2 to load a url

2007-04-04 Thread John J. Lee
"Kushal Kumaran" <[EMAIL PROTECTED]> writes: [...] > If, at any time, an error response fails to reach your machine, the > code will have to wait for a timeout. It should not have to wait > forever. [...] ...but it might have to wait a long time. Even if you use socket.setdefaulttimeout(), DNS l

Re: shelve error

2007-04-11 Thread John J. Lee
"7stud" <[EMAIL PROTECTED]> writes: [...] > Also, the book is brand new, yet the cover has completely separated > from the spine of the book, and now the cover is only attached to the > first and last pages with a bit of glue. I think they used to advertise that as a feature -- "stay-flat binding"

Re: Calling Python from Javascript?

2007-04-11 Thread John J. Lee
Kenneth McDonald <[EMAIL PROTECTED]> writes: > I know that there's some work out there to let Python make use of > Javascript (Spidermonkey) via (I assume) some sort of bridging C/C++ > code. Anyone know of efforts to allow the reverse? I'd really like to > make use of Python when doing Mozilla DO

Re: Getting Stack Trace on segfault

2007-04-11 Thread John J. Lee
James Stroud <[EMAIL PROTECTED]> writes: > Hello All, > > The built-in mac osx vecLib is segfaulting in some cases--A very fun > fact to find out the hard way over two nights of work. I also spent an > embarrassing amount of time figuring out just where. Although I'm in > quite a self-congratulat

Re: Support SSL for Solaris 10

2007-04-11 Thread John J. Lee
"campos" <[EMAIL PROTECTED]> writes: > Hi all, > > Last time I installed Python 2.5 by default, it didn't support SSL. > When I tried to use HTTPS, the following error occured: > AttributeError: 'module' object has no attribute 'ssl' ISTR that the sunfreeware.com 2.5 build supports that, if you

Re: Calling Python from Javascript?

2007-04-11 Thread John J. Lee
[EMAIL PROTECTED] (John J. Lee) writes: > Kenneth McDonald <[EMAIL PROTECTED]> writes: > > > I know that there's some work out there to let Python make use of > > Javascript (Spidermonkey) via (I assume) some sort of bridging C/C++ > > code. Anyone know o

Re: "HTTP error -1" from urllib2

2007-04-14 Thread John J. Lee
John Nagle <[EMAIL PROTECTED]> writes: > I'm getting a wierd error from urllib2 when opening certain > URLs. The code works for most sites, but not all of them. > Here's the traceback: [...] > InfoException: Problem with page "http://www.fourmilab.ch": HTTP error -1 - .. > > This fails ident

Re: Double backslash in filepaths ?

2007-04-14 Thread John J. Lee
Stef Mientki <[EMAIL PROTECTED]> writes: > It looks like sometimes a single backslash is replaced by a double backslash, > but sometimes it's not ??? > See the error message below, > the first backslash is somewhere (not explicitly in my code) replaced, > but the second is not ??? > Is it in gener

Re: how to check the 'content/type' using urlopen

2007-04-16 Thread John J. Lee
Michael Bentley <[EMAIL PROTECTED]> writes: > On Apr 15, 2007, at 6:25 PM, John wrote: > > > > > i have the following code to open a URL address, but can you please > > tell me how can I check the content type of the url response? > > > > Thank you. > > > > try: > > req = Request(url, t

Re: Odd files; just left behind?

2007-09-19 Thread John J. Lee
Robin Becker <[EMAIL PROTECTED]> writes: > I see a folder .python-eggs in my home directory on one of our servers > with various .so files > > ~/.python-eggs/MySQL_python-1.2.2-py2.3-freebsd-6.1-SECURITY-i386.egg-tmp/_mysql.so > > are these just left behind from some install process? Ah, it's abo

Re: frange() question

2007-09-20 Thread John J. Lee
George Trojan <[EMAIL PROTECTED]> writes: > A while ago I found somewhere the following implementation of frange(): > > def frange(limit1, limit2 = None, increment = 1.): > """ > Range function that accepts floats (and integers). > Usage: > frange(-2, 2, 0.1) > frange(10) >

Re: An Editor that Skips to the End of a Def

2007-09-20 Thread John J. Lee
"W. Watson" <[EMAIL PROTECTED]> writes: > Thanks, but no thanks. The learning curve is way too steep. [...] Eclipse must be able to do this. Eclipse is emacs for stupid people ;-) Seriously for a moment, I read something recently (maybe here?) about an Apple study that claimed to show that peop

Re: Python tickets summary

2007-09-20 Thread John J. Lee
"Facundo Batista" <[EMAIL PROTECTED]> writes: [...] > Based on an idea from Dennis Benzinger, now the temporal bars show the > moments where each comment was made, so it's easy to see the "rhythm" > of the ticket activity: > > http://www.taniquetil.com.ar/facundo/py_tickets.html I like that. I'

Re: cannot create my own dict

2007-09-20 Thread John J. Lee
"A.T.Hofkamp" <[EMAIL PROTECTED]> writes: [...] > I can derive from dict, but the problem with that is that I start with a > read/write dictionary, and I can only hope to plug all holes to prevent my > data > from leaking out. > By starting from 'object', I certainly don't have that problem, I sta

Re: UTF-8 characters in doctest

2007-09-20 Thread John J. Lee
Peter Otten <[EMAIL PROTECTED]> writes: [...] > # -*- coding: utf8 -*- > r""" f("äöü".decode("utf8")) > (u'\xe4\xf6\xfc',) > """ > def f(s): > return (s,) Forgive me if this is a stupid question, but: What purpose does function f serve? John -- http://mail.python.org/mailman/listinfo/p

Re: UTF-8 characters in doctest

2007-09-22 Thread John J. Lee
Peter Otten <[EMAIL PROTECTED]> writes: [...] >> Forgive me if this is a stupid question, but: What purpose does >> function f serve? > > Like the OP's get_inventary_number() it takes a unicode string and > returns a tuple of unicode strings. I'ts pointless otherwise. I hoped I > had stripped down

Re: Odd files; just left behind?

2007-09-22 Thread John J. Lee
Robin Becker <[EMAIL PROTECTED]> writes: > Bruno Desthuilliers wrote: > >>> >>> >>> >>> it would seem simpler to have the .so files inside the >>> site-packages and there's the question of why this folder has to be >>> obfuscated (name starts with .). Even if these files are >>> "resourc

Re: An Editor that Skips to the End of a Def

2007-09-22 Thread John J. Lee
Paul Rubin <http://[EMAIL PROTECTED]> writes: > [EMAIL PROTECTED] (John J. Lee) writes: >> Seriously for a moment, I read something recently (maybe here?) about >> an Apple study that claimed to show that people who perceived keyboard >> bindings as being much faste

Re: An Editor that Skips to the End of a Def

2007-09-22 Thread John J. Lee
Gary Coulbourne <[EMAIL PROTECTED]> writes: > John J. Lee wrote: >> Eclipse must be able to do this. > > Not by default... but I am certain there are plugins that provide python > integration. (And jython integration) Well yes, obviously (?) I meant Eclipse with pydev in

Re: frange() question

2007-09-22 Thread John J. Lee
Carsten Haese <[EMAIL PROTECTED]> writes: > On Thu, 2007-09-20 at 18:55 +0000, John J. Lee wrote: >> Functions are never generators, senso stricto. There are "generator >> functions", which *return* (or yield) generators when you call them. > > Actually, a

Re: frange() question

2007-09-22 Thread John J. Lee
Carsten Haese <[EMAIL PROTECTED]> writes: > On Sat, 2007-09-22 at 07:27 +0000, John J. Lee wrote: >> Carsten Haese <[EMAIL PROTECTED]> writes: >> >> > On Thu, 2007-09-20 at 18:55 +, John J. Lee wrote: >> >> Functions are never generators, sens

Re: An Editor that Skips to the End of a Def

2007-09-23 Thread John J. Lee
Paul Rubin <http://[EMAIL PROTECTED]> writes: > [EMAIL PROTECTED] (John J. Lee) writes: >> > I think mousing takes more mental work than typing, >> I'm not sure this is a matter for debate, as much as physical >> measurement. > > I don't know of any w

Re: Python and SSL

2007-10-03 Thread John J. Lee
Johny <[EMAIL PROTECTED]> writes: > On Oct 3, 2:17 pm, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: >> > It looks like this >> >> > MyPythonProgram --->Proxy>Server You want MyPythonProgram being to be proxied by Proxy, using the HTTP CONNECT method? (CONNECT is a way of asking the proxy to j

Re: How do I make urllib2 preserve case in HTTP header names?

2007-10-11 Thread John J. Lee
[EMAIL PROTECTED] writes: > The HTTP specification, RFC 2616, states that field names in HTTP > headers are case insensitive. But I'm trying to use Python 2.5.1's > urllib2 to interact with a web service offered by Amazon.com, which > deviates from the HTTP spec in that it requires use of case-se

Re: urllib.ProxyHandler HTTPS issues

2007-10-11 Thread John J. Lee
Devraj <[EMAIL PROTECTED]> writes: > Hi everyone, > > I have been reading various documents/posts on the web about handling > proxy options in urllib2. Some of them suggest that urllib2 doesn't > handle HTTPS and others say it does. I have successfully written code > that relays HTTP connections v

Re: Finding Peoples' Names in Files

2007-10-11 Thread John J. Lee
brad <[EMAIL PROTECTED]> writes: > Crazy question, but has anyone attempted this or seen Python code that > does? For example, if a text file contained 'Guido' and or 'Robert' > and or 'Susan', then we should return True, otherwise return False. A few ideas: 1. If you don't have a list of names,

Re: urllib.ProxyHandler HTTPS issues

2007-10-13 Thread John J. Lee
Devraj <[EMAIL PROTECTED]> writes: > Thanks John. Will investigate sending the CONNECT command to handle > proxies. > > Do you recommend doing this for HTTP proxies as well No. > or should I just use the ProxyHandler for HTTP proxies? Yes. John -- http://mail.python.org/mailman/listinfo/pyt

Re: Setting a timeout for a cookie

2007-10-16 Thread John J. Lee
Peter Bengtsson <[EMAIL PROTECTED]> writes: > On Oct 15, 4:09 pm, sophie_newbie <[EMAIL PROTECTED]> wrote: >> Hi, >> >> I'm wondering how do you set a 'timeout' or expiry date/time for a >> cookie set using a python cgi script. I can set a cookie ok but I >> dunno how to set the expiry time so it

Re: urlgrabber cookie handling?

2007-10-17 Thread John J. Lee
Devraj <[EMAIL PROTECTED]> writes: > Hi everyone, > > I have been battling to make my code work with a HTTPS proxy, current > my code uses urllib2 to to most things and works well, except that > urllib2 doesn't handle HTTPS proxies. > > Urlgrabber (http://linux.duke.edu/projects/urlgrabber/help/ >

Re: negative base raised to fractional exponent

2007-10-17 Thread John J. Lee
[EMAIL PROTECTED] writes: [...] > Thank you for this. Now I need to somehow express this as a real > number. For example, I can transform the real and imaginary parts into > a polar coordinate giving me the value I want: > > z = sqrt( real_part**2 + imaj_part**2 ) > > but this is an absolute terms.

Re: CGI Server that supports redirects

2007-10-22 Thread John J. Lee
Thomas Guettler <[EMAIL PROTECTED]> writes: > Hi, > > CGIHTTPServer does not support redirects[1] > > Is there an other python-only way to get a web server > running wich can execute python code? > > Since I already use flup[2]. I think there is not much > missing to get it serving as http server.

Re: I can't get minimock and nosetests to play nice

2007-10-22 Thread John J. Lee
Matthew Wilson <[EMAIL PROTECTED]> writes: > I'm curious if anyone has ever tried using nosetests along with > minimock. This has nothing to do with nose. > I'm trying to get the two to play nice and not making progress. I > also wonder if I'm using minimock incorrectly. > > Here's the code I

Re: urllib2 weirdness when https_proxy environment variable is exported

2007-10-27 Thread John J. Lee
Devraj <[EMAIL PROTECTED]> writes: > I have been extensively using Python's urllib2 while developing a > project with the Google Data API. The Google Data API uses httplib to > place all of its requests. However I have been using urllib2 and some > handlers that I discovered in an ASPN article to

Re: urllib2 hangs "forever" where there is no network interface

2007-02-01 Thread John J. Lee
"dumbkiwi" <[EMAIL PROTECTED]> writes: > I have written a script that uses the urllib2 module to download web > pages for parsing. > > If there is no network interface, urllib2 hangs for a very long time > before it raises an exception. I have set the socket timeout with > socket.setdefaulttimeo

Re: urllib2 hangs "forever" where there is no network interface

2007-02-03 Thread John J. Lee
(I'm having news trouble, sorry if anybody sees a similar reply three times...) "dumbkiwi" <[EMAIL PROTECTED]> writes: > On Feb 2, 5:02 am, [EMAIL PROTECTED] (John J. Lee) wrote: > > "dumbkiwi" <[EMAIL PROTECTED]> writes: [...] > > > If there

Re: Create a cookie with cookielib

2007-02-04 Thread John J. Lee
"Matthew Franz" <[EMAIL PROTECTED]> writes: > I'm not sure what you mean be forge, but if you mean set an arbitrary > cookie manually (vs. one that was provided by the server). just use > add_header() in http://docs.python.org/lib/request-objects.html > > It may be possible to use CookieJar for

Re: Create a cookie with cookielib

2007-02-04 Thread John J. Lee
Alessandro Fachin <[EMAIL PROTECTED]> writes: > Matthew Franz wrote: > > > I'm not sure what you mean be forge, but if you mean set an arbitrary > > cookie manually (vs. one that was provided by the server). just use > > add_header() in http://docs.python.org/lib/request-objects.html > > Yes is

Re: Create a cookie with cookielib

2007-02-10 Thread John J. Lee
I'm going to post this if it kills me (this was my first response in this thread, my normal newsfeed has gone bad so can't post reliably...) Alessandro Fachin <[EMAIL PROTECTED]> writes: > Hi, i am trying to forge a new cookie by own with cookielib. But i don't > still have success. This a simply

Re: urllib2 hangs "forever" where there is no network interface

2007-02-10 Thread John J. Lee
[EMAIL PROTECTED] (John J. Lee) writes: > (I'm having news trouble, sorry if anybody sees a similar reply three > times...) > > "dumbkiwi" <[EMAIL PROTECTED]> writes: > > On Feb 2, 5:02 am, [EMAIL PROTECTED] (John J. Lee) wrote: > > > "dum

Re: urllib2 request htaccess page through proxy

2007-02-11 Thread John J. Lee
Alessandro Fachin <[EMAIL PROTECTED]> writes: > I write this simply code that should give me the access to private page with > htaccess using a proxy, i don't known because it's wrong... [...] > i get no access on access.log from apache2 and nothing from the proxy in > tcpdump log. If i use only

MySQLdb binaries (was Re: huge amounts of pure...)

2007-02-11 Thread John J. Lee
Robin Becker <[EMAIL PROTECTED]> writes: > [EMAIL PROTECTED] wrote: > > John> MySQLdb isn't fully supported for Python 2.5 yet, and there's no > > John> tested Windows executable available, although there's an untested > > John> version from a World of Warcraft guild available. > > As

Re: Looking for contract developer(s) - where can I find them?

2007-02-23 Thread John J. Lee
[EMAIL PROTECTED] writes: > On Feb 21, 9:51 pm, Scott SA <[EMAIL PROTECTED]> wrote: > > > > I've just sent a job listing to python.org and posted this message on > > comp.lang.python, > > Interesting, so Python-list@python.org and comp.lang.python are > _related_. I guess that means I'm the new g

Re: BDFL in wikipedia

2007-02-23 Thread John J. Lee
Robin Becker <[EMAIL PROTECTED]> writes: > Carl Banks wrote: > .. > > Since when is Larry Wall benevolent? He should be called the SDFL. > > > . > > even the great leader has been referred to as the MDFL :) [...] By you?-) John -- http://mail.python.org/mailman/listinfo/python-list

Re: timeout in urllib.open()

2007-02-23 Thread John J. Lee
Steve Holden <[EMAIL PROTECTED]> writes: [...] > This has recently been discussed on python-dev. It's likely that > certain libraries will acquire a timeout keyword argument in the next > release, but only if someone is concerned enough to develop the > appropriate patches - the principle appears t

Re: timeout in urllib.open()

2007-02-23 Thread John J. Lee
Paul Rubin writes: > Stefan Palme <[EMAIL PROTECTED]> writes: > > is there a way to modify the time a call of > > > > urllib.open(...) > > > > waits for an answer from the other side? Have a tool which > > automatically checks a list of websites for certain content.

Re: timeout in urllib.open()

2007-02-25 Thread John J. Lee
[EMAIL PROTECTED] writes: > >> I believe this can only be set globally: > >> > >> import socket > >> socket.setdefaulttimeout(seconds) > > Stefan> Uuuh this is no solution for me, because the website-checking > Stefan> tool is part of a very very big application running i

Job Ad: Full-time Python software developer, Wimbledon, London, England

2007-02-27 Thread John J. Lee
`ReportLab `_ (Wimbledon, London, England) **Job Description**: ReportLab develop enterprise reporting and document generation solutions using cutting-edge Python technology, and have a growing business

Re: Is there a technic to avoid this bug

2007-02-27 Thread John J. Lee
"Diez B. Roggisch" <[EMAIL PROTECTED]> writes: > hg wrote: [...] > > In a relatively similar domain, I spent a few hours find this bug: > > > > value == self.Get_Value() > > if value == WHATEVER: > >do this > > > > instead of > > value = self.Get_Value() > > if value == WHATEVER: > >do t

Re: How can i find the form name without "nr=0"

2007-11-07 Thread John J. Lee
alex23 <[EMAIL PROTECTED]> writes: > On Nov 6, 8:56 am, scripteaze <[EMAIL PROTECTED]> wrote: >> Is it possible then to have a form with no name and if so, how can i >> access this form > > Hey scripteaze, > > I'm not sure about mechanize, but you might have more success using > another one of the

Re: Python too complex ?!?!?!

2007-11-20 Thread John J. Lee
"Chris Mellon" <[EMAIL PROTECTED]> writes: [...] > These modules exist, but aren't that common. Certainly anything you're > likely to be using in an introductory compsci course is well packaged. > And even if it's not, it's really not that hard to create packages or > installers - a days work of co

<    1   2   3   4   5   >