Re: Can .py be complied?

2005-04-29 Thread John J. Lee
jfj <[EMAIL PROTECTED]> writes: [...] > /* small program in C in self extracting archive > */ > if (have_application ("Python")) { >have_python: >system ("python.exe my_application.py") > } else { >printf ("This software requires python. Wait until all the > necessary components are b

Re: How does Scons compare to distutils?

2005-12-12 Thread John J. Lee
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > How does Scons compare to distutils? Should I ignore > it or move to it? [...] Yes. Seriously, what are you doing? distutils seems pretty ubiquitous when building Python extensions, since it has special knowledge of the Python with which it is

Re: Another newbie question

2005-12-12 Thread John J. Lee
Steve Holden <[EMAIL PROTECTED]> writes: [...] > The "Law" of Demeter isn't about *how* you access objects, it's about > what interfaces to objects you can "legally" manipulate without undue > instability across refactoring. In other words, it's about semantics, > not syntax. And it's led a lot

Merging Subway and TurboGears (was: Re: Which Python web framework is most ...)

2005-12-18 Thread John J. Lee
[EMAIL PROTECTED] writes: > I'm the founder and lead developer of Subway. > > I am all for it. TG would have to change a couple of things IMHO, but I > think it would be a great idea. +100 > If we were to merge projects, we would have to get a serious > TurbowaySubgears blogging hype train goi

Re: Faster copying of composite new-class objects

2005-12-22 Thread John J. Lee
"Alex" <[EMAIL PROTECTED]> writes: > My program requires copying thousands of composite new-class objects. I > found that the following: objCopy=cPickle.loads(cPickle.dumps(obj, > protocol=2)) works about 4 times faster than > copyObj=copy.deepcopy(obj). Is there any way to do it even faster? > >

Re: Socket programming design problem

2005-12-22 Thread John J. Lee
David <[EMAIL PROTECTED]> writes: [...] > a) Big problem, I can't see how to receive from more than one socket at > once. I need to do this so that data from the TCP connection can be sent > out on the UDP one and vice versa. Do I need a thread for each, or is > there some other way I can listen

Re: PyHtmlGUI Project is looking for developers

2005-12-28 Thread John J. Lee
[EMAIL PROTECTED] writes: > the PyHtmlGUI Project (http://www.sourceforge.net/projects/pyhtmlgui) > is looking for developers that want to join. > > The aim of the project is to create a web application framework. The > API of PyHtmlGUI wants to be close to Trolltechs famous Qt API but > incooper

Re: Beautiful Python

2005-12-28 Thread John J. Lee
[EMAIL PROTECTED] writes: [...] > > Sometimes putting import statements at the beginning is not feasible > > (i.e. only when some condition has been met), as importing has some > > impact on program execution (importing executes code in imported > > module). This does not resemble Java imports (I d

Re: - E04 - Leadership! Google, Guido van Rossum, PSF

2005-12-28 Thread John J. Lee
"Harald Armin Massa" <[EMAIL PROTECTED]> writes: [...] > Allow me to quote Greg Stein: > "Ha! Guido would quit in a heartbeat if you tried to make him manage > people. That just isn't where he's at. He's absolutely brilliant and > loves to write excellent code. Great. We're gonna let him do just t

Re: any Adobe Reader like apps written in python, for examination?

2005-12-28 Thread John J. Lee
Alex Gittens <[EMAIL PROTECTED]> writes: > Yeah, pygame is not what I'm looking for. I'm looking for a good > example of cross platform non-trivial page-layout and font handling. > The project I'm working on-- a typographically correct interface to a > CAS-- requires pixel-perfect font handling. >

Re: getting the status codes from the ftplib module

2005-12-29 Thread John J. Lee
"Alvin A. Delagon" <[EMAIL PROTECTED]> writes: > I'm writing a simple python code that will upload files onto a ftp > server. Everything's fine and working great except that the script I > wrote don't know is an upload is successful or not. Is there a way to > obtain the ftp status codes with t

Re: Guido at Google

2005-12-30 Thread John J. Lee
Robert Kern <[EMAIL PROTECTED]> writes: [...] > No, it's not a silly idea. Dean Baker, the Co-Director the Center for Economic > and Policy Research, has proposed for the U.S. government to establish a > Software Developer's Corps. For $2 billion per year, it could fund about > 20,000 > developers

Re: PyHtmlGUI Project is looking for developers

2006-01-02 Thread John J. Lee
Sybren Stuvel <[EMAIL PROTECTED]> writes: > [EMAIL PROTECTED] enlightened us with: > > At the moment we don't work with javascript. But it should not be to > > hard to create a JavaScript Renderer similar to the css one we already > > have. > > Isn't CSS for rendering, and JavaScript for client-s

Re: use browser setting for internet

2006-01-08 Thread John J. Lee
"Wish" <[EMAIL PROTECTED]> writes: > Hi > I have a problem with my script in python which uses xmlrpc. The script > loses internet connection when it is used behind a firewall. I realize > that the firewall is specified by using the http_proxy environment > variable. However, the proxy server is a

Re: PyHtmlGUI Project is looking for developers

2006-01-08 Thread John J. Lee
"Paul Boddie" <[EMAIL PROTECTED]> writes: [...] > many would advocate using "AJAX" techniques and dropping support for > conventional Web interactions, but I think that such advocacy and the > resulting applications threaten the usability of the Web for fairly > large groups of people. That may we

Re: Getting and Setting Cookies

2006-07-18 Thread John J. Lee
"Vlad Dogaru" <[EMAIL PROTECTED]> writes: > I am trying to use cookies and Python to create a simple login example. > But I am very disoriented at the existence of two cookie libraries, > namely Cookie and cookielib. I have seen examples of setting cookies [...] >From the cookielib docs: http://

Re: how to know if socket is still connected

2006-07-18 Thread John J. Lee
Grant Edwards <[EMAIL PROTECTED]> writes: [...] > > Often normal send() and recv() semantics have been mistaught. > > An alert alien, looking at other common APIs in isolation, > > might reasonably wonder whether there is some sort of > > still_ok_to_use() sort of check as part of TCP. As it hap

Re: Getting and Setting Cookies

2006-07-19 Thread John J. Lee
"Vlad Dogaru" <[EMAIL PROTECTED]> writes: [...] > I am trying to write a simple login script. I understand (or rather I > think I understand) how to set a cookie with the Cookie module. My > problem is getting the cookies that are currently set. How can I do > that? You still haven't explicitly sa

Re: Converting a web to pdf or ..‍

2006-07-19 Thread John J. Lee
"Bayazee" <[EMAIL PROTECTED]> writes: > Hi , > I have a web site and i want to write a perogram with python that my > users can convert custom web page of site to pdf (or other type :jpeg, > doc,odt,or...) and download it . i dont want only convert text . it is > be very good to i can don it for b

Re: Python linker

2006-07-19 Thread John J. Lee
Sion Arrowsmith <[EMAIL PROTECTED]> writes: [...] > Who's going to notice if your executable is a couple of M slimmer? Anybody with a modem. John -- http://mail.python.org/mailman/listinfo/python-list

Re: Python linker

2006-07-19 Thread John J. Lee
Larry Bates <[EMAIL PROTECTED]> writes: [...] > That said, I disagree that 3.5Mb is too much to download. It > only takes about 7 seconds on my machine (cable modem). If your > users won't wait that long, they weren't very interested in your > application. [...] For some markets (very far from a

Re: An optparse question

2006-07-21 Thread John J. Lee
"T" <[EMAIL PROTECTED]> writes: [...] > What I would like to do is insert some string *before* the "usage = " > string, which is right after the command I type at the command prompt. > So I would like to make it look like this: > > % myprog.py -h > THIS IS NEWLY INSERTED STRING *

Re: Isn't there a better way?

2006-07-21 Thread John J. Lee
Peter Otten <[EMAIL PROTECTED]> writes: [...] > Not sure if this is better, but you can use OptionParser to set attributes > on arbitrary objects, including your Processor instance: [...] I'd guess it's not worth the mental overhead required when you discover the next argument no longer fits this

Re: How to recognise "generator functions" ?

2006-07-21 Thread John J. Lee
imho <[EMAIL PROTECTED]> writes: > Georg Brandl ha scritto: > > f.func_code.co_flags > > 67 > g.func_code.co_flags > > 99 > > => 32 (CO_GENERATOR in compiler.consts) is the flag that indicates a > > generator code object. > > Georg > > What a fast reply! > Thank You very much! :-) Geo

Re: Need a compelling argument to use Django instead of Rails

2006-07-25 Thread John J. Lee
Sybren Stuvel <[EMAIL PROTECTED]> writes: [...] > - What I was told from a professor in formal languages, which is > that there is no formal definition of the Ruby language. That's > enough for me to not use it. [...] So you're not using Python either? Probably I don't understand

Re: Need a compelling argument to use Django instead of Rails

2006-07-25 Thread John J. Lee
Steve Holden <[EMAIL PROTECTED]> writes: [...] > Well, my view is that both are frameworks, and so you will inevitably > "run out of steam" at some point if your implementation plans become too > ambitious. The impression I get is that Rails is relatively inflexible > on database schemas, and on

Re: Need a compelling argument to use Django instead of Rails

2006-07-25 Thread John J. Lee
"Ray" <[EMAIL PROTECTED]> writes: > I just moved to another company that's mainly a Java/.NET shop. I was > happy to find out that there's a movement from the grassroot to try to > convince the boss to use a dynamic language for our development! > > Two of the senior developers, however, are alre

Re: Need a compelling argument to use Django instead of Rails

2006-07-26 Thread John J. Lee
Joe Knapka <[EMAIL PROTECTED]> writes: > John J. Lee wrote: > > > The fact that "open classes" are apparently thought to be a good thing > > in Ruby puzzles (and worries) me. > > This objection strikes me as having the same > nature as, "Python

Re: Need a compelling argument to use Django instead of Rails

2006-07-26 Thread John J. Lee
Jaroslaw Zabiello <[EMAIL PROTECTED]> writes: > On Mon, 24 Jul 2006 14:23:21 +0200, Sybren Stuvel wrote: > > > Another reason for me not to use Ruby, is that there is no distinction > > between those two lines of code: > > > > x = somefunc > > x = somefunc() > > It has no meaning. Just use alwa

Re: Automate Mozilla Firefox

2006-07-27 Thread John J. Lee
"Paul Boddie" <[EMAIL PROTECTED]> writes: [...] > Well, PyXPCOM didn't support out-of-process automation last time I > checked, and I haven't read anything on the PyXPCOM list [1] that would > suggest otherwise. Meanwhile, there is support for automation of [...] http://groups.google.co.uk/group/m

Re: Urllib.encode() - How does it Treat a List?

2006-07-28 Thread John J. Lee
"Gregory Piñero" <[EMAIL PROTECTED]> writes: > Hi Wise Python Folk, > > Here's my code: > >>> p={'type':'bar','title':'Gregs Chart 1','values':[1,2,3],'labels':[1,2,3]} > >>> urllib.urlencode(p) > 'values=%5B1%2C+2%2C+3%5D&labels=%5B1%2C+2%2C+3%5D&type=bar&title=Gregs+Chart+1' > > Now I just can

Re: Automate Mozilla Firefox

2006-07-28 Thread John J. Lee
"david brochu jr" <[EMAIL PROTECTED]> writes: > want to take a text file (which has a list of urls) and have my script go > through them 1 by one using Firefox. Try Selenium. http://www.openqa.org/selenium/ John -- http://mail.python.org/mailman/listinfo/python-list

Re: Announcing Switch, the CSS Preprocessor!

2006-08-10 Thread John J. Lee
"Dave" <[EMAIL PROTECTED]> writes: > It's not tied deeply to mod_python. > > The processor works like this: > > You create an "sss" file, using Switch specific features. Then, you > place the file under Apache/mod_python OR you can use the command-line > Switch tool to process the SSS file and o

Re: ALLAH

2006-08-10 Thread John J. Lee
Wildemar Wildenburger <[EMAIL PROTECTED]> writes: [...] > Although the subject sort of makes me suspect that this text has > little if anything to do with programming. Programming computers, that > is. :-)) John -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: xtopdf: PDF creation / conversion toolkit: alpha release of v1.3

2006-08-10 Thread John J. Lee
[EMAIL PROTECTED] writes: > I'll be out of the office until approximately August 20th. If you have any > questions, please email [EMAIL PROTECTED] I'm sure all c.l.py readers eagerly await your return ;-) John -- http://mail.python.org/mailman/listinfo/python-list

Re: How to fill a form

2006-08-17 Thread John J. Lee
Sulsa <[EMAIL PROTECTED]> writes: > On Tue, 15 Aug 2006 03:37:02 - > Grant Edwards <[EMAIL PROTECTED]> wrote: > > > On 2006-08-15, Sulsa <[EMAIL PROTECTED]> wrote: > > > > > I want to fill only one smiple form so i would like not to use > > > any non standard libraries. > > > > Then just se

Re: urllib2, proxies and https

2006-08-20 Thread John J. Lee
Astan Chee <[EMAIL PROTECTED]> writes: > Hi again, > According to > https://demo.launchpad.net/products/python/+bug/56872 > or more specifically, the example of its working code: > http://librarian.demo.launchpad.net/3507227/urllib2_proxy_auth.py > I can use urllib2 via proxy to access a https sit

Re: Python Editor with Autocorrection

2006-08-21 Thread John J. Lee
Laurentiu <[EMAIL PROTECTED]> writes: > i am searching for a free python editor with > autocorrection capabillities. > > for example:" the wrong setfocus() call to become > SetFocus(), etc." Perhaps not quite what you were looking for, but emacs' dabbrev-expand works well for avoiding mistyped P

Re: The decentralized nature of the Python community is driving me crazy

2006-08-21 Thread John J. Lee
"Mike Orr" <[EMAIL PROTECTED]> writes: [...] > several attempts to build a Python one or a multilingual one. The > Cheeseshop and easy_install are the most successful attempts. There's > a project aimed at integrating easy_install into Python itself, but > with the technical and compatibility iss

Re: Python Editor with Autocorrection

2006-08-22 Thread John J. Lee
"Ravi Teja" <[EMAIL PROTECTED]> writes: [...] > Most good editors (Scintilla based editors, Emacs, Vi etc) have > auto-completion for symbols that have occured in the current file; and What I find really useful in emacs is completion based on *all* open files (usually I have maybe twenty files ope

Re: What do you want in a new web framework?

2006-08-22 Thread John J. Lee
[EMAIL PROTECTED] writes: > hardemr wrote: > > > I've just read all of the answers. Most of yours said that there are > > many web frameworks ,so it is nonsense to make a new web framework in > > python. > > Hardemr, I like Ajacksu's answer, with a twist. Please concnentrate on > writing a Visua

Re: n-body problem at shootout.alioth.debian.org

2006-10-06 Thread John J. Lee
Peter Maas <[EMAIL PROTECTED]> writes: > I have noticed that in the language shootout at shootout.alioth.debian.org > the Python program for the n-body problem is about 50% slower than the Perl > program. This is an unusual big difference. I tried to make the Python program > faster but without su

Re: News on versions modules for Python-2.5?

2006-10-06 Thread John J. Lee
"Méta-MCI" <[EMAIL PROTECTED]> writes: [...] > And who can confirm that these modules are independent of Python version? > > ReportLab [...] Most of the code is pure Python and I don't recall any 2.5-specific bug reports yet. For the (optional) parts that are written in C, there are 2.5 Wind

Re: News on versions modules for Python-2.5?

2006-10-07 Thread John J. Lee
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > Méta-MCI wrote: > > And who can confirm that these modules are independent of Python version? > > > > ReportLab > > I can't confirm it's 100% independent, but I have been using reportlab > on Windows and Linux with Python 2.5. If anything in

Re: Names changed to protect the guilty

2006-10-07 Thread John J. Lee
[EMAIL PROTECTED] (Aahz) writes: > The following line of lightly munged code was found in a publicly > available Python library... > > if schema.elements.has_key(key) is False: > > Sorry, just had to vent. I think I was reading the same code recently (epydoc?) and was also momentarily horri

Re: Names changed to protect the guilty

2006-10-09 Thread John J. Lee
Ben Finney <[EMAIL PROTECTED]> writes: > [EMAIL PROTECTED] (John J. Lee) writes: > > > [EMAIL PROTECTED] (Aahz) writes: > > > if schema.elements.has_key(key) is False: > > > > I think I was reading the same code recently (epydoc?) and was also > &g

Re: Names changed to protect the guilty

2006-10-09 Thread John J. Lee
[EMAIL PROTECTED] (Aahz) writes: [...] > >I think I was reading the same code recently (epydoc?) and was also > >momentarily horrified ;-) until I realized that it was quite > >deliberately using three-valued logic (True, False, None) for some > >presumably-sensible reason. Since None is false, th

Re: People's names (was Re: sqlite3 error)

2006-10-09 Thread John J. Lee
Steve Holden <[EMAIL PROTECTED]> writes: [...] > > There would also need to be a flag field to indicate the canonical > > ordering > > for writing out the full name: e.g. family-name-first, given-names-first. > > Do we need something else for the Vietnamese case? > > You'd think some standards bod

Re: People's names (was Re: sqlite3 error)

2006-10-09 Thread John J. Lee
"John Machin" <[EMAIL PROTECTED]> writes: [...] > This is all a bit OT. Before we close the thread down Do you have a warrant for that? > , let me leave > you with one warning: > Beware of enthusiastic maintenance programmers on a mission to clean up > the dirty names in your database: > E.g. (1

Re: Names changed to protect the guilty

2006-10-10 Thread John J. Lee
[EMAIL PROTECTED] (John J. Lee) writes: [...] > Yes, that's true, I didn't really take in this particular example, > just the use of "is ". That's not the way it was used > in docutils, though (do I mean docutils?). No, I meant epydoc (I think...) John

Re: How to share session with IE

2006-10-10 Thread John J. Lee
"Bernard" <[EMAIL PROTECTED]> writes: > zdp wrote: [...] > > However, now I need to process some pages by a python program. When I > > use urllib.urlopen(theurl), I can only get a page which told me I need > > login. I think It's reasonable, becuase I wasn't in a loggined session > > which as IE di

Re: How to share session with IE

2006-10-14 Thread John J. Lee
Cameron Walsh <[EMAIL PROTECTED]> writes: [...] > Another option instead of making your program run through a series of > clicks and text inputs, which is difficult to program, is to browse > the html source until you find the name of the script that processes > the login, and use python to request

Re: How to share session with IE

2006-10-14 Thread John J. Lee
"zdp" <[EMAIL PROTECTED]> writes: [...] > 1. Use the cookie of IE, so I don't need to code to logon. That means I > must use ClientCookie. I found some example in the docs and the > newsgroup. Below is some code based on the docs of ClientCookie. But > the page I get is still the page told me must

Re: PyDoc and mod_python

2006-10-14 Thread John J. Lee
Fredrik Lundh <[EMAIL PROTECTED]> writes: > durumdara wrote: > > > I need to write documentation for my mod_python website, for the > > base classes, functions, modules. > > The problem, that mod_python is imported "apache" that not existing > > in the normal, pythonic way (only in Apache). > >

Finding a lost PYTHONPATH with find

2006-05-28 Thread John J. Lee
OK, this is really a reminder to myself next time I forget where I set my PYTHONPATH and forget exactly how to invoke the GNU "find" command ;-) Hope somebody else finds it useful too find / -maxdepth 3 -size -100k -type f -exec grep -sli pythonpath '{}' \; The minus in '-100k' (meaning "less t

Re: Finding a lost PYTHONPATH with find

2006-06-01 Thread John J. Lee
Edward Elliott <[EMAIL PROTECTED]> writes: > John J. Lee wrote: > > > find / -maxdepth 3 -size -100k -type f -exec grep -sli pythonpath '{}' \; > > > > > > The minus in '-100k' (meaning "less than 100k") seems to be > > un

Re: urllib2 and HTTP 302

2006-06-01 Thread John J. Lee
Laszlo Nagy <[EMAIL PROTECTED]> writes: [...] > how can I return the redirection URL? > I tried to get this information from the exception but I could not. Is > it possible to read it from the openerdirector? > Any suggestions? > > > try: >self.post_multipart( >

ANN: ReportLab PDF Library version 2.0 and 1.21 released

2006-06-02 Thread John J. Lee
ReportLab are proud to announce not one but two major releases of our PDF document generation framework. The ReportLab PDF Toolkit lets you generate rich flowing documents in PDF from dynamic data, complete with multiple columns, tables and charts, at extremely high speeds; and to generate charts

Re: urllib2 and HTTP 302

2006-06-05 Thread John J. Lee
[EMAIL PROTECTED] (John J. Lee) writes: > Laszlo Nagy <[EMAIL PROTECTED]> writes: > [...] > > how can I return the redirection URL? > > I tried to get this information from the exception but I could not. Is > > it possible to read it from the opene

Re: strategy pattern and non-public virtual functions

2006-06-05 Thread John J. Lee
[EMAIL PROTECTED] writes: > Hi python experts > > In C++ I can do something like this: > class Base { > public: > void f() { this->f_(); } > private: > virtual void f_() = 0; > }; > > class Derived : public Base { > private: > void f_() { // Do something } > }; > > int main()

Re: 10GB XML Blows out Memory, Suggestions?

2006-06-06 Thread John J. Lee
"K.S.Sreeram" <[EMAIL PROTECTED]> writes: [...] > There's just NO WAY that the 10gb xml file can be loaded into memory as > a tree on any normal machine, irrespective of whether we use C or > Python. Yes. > So the *only* way is to perform some kind of 'stream' processing > on the file. Perhaps us

Re: how not to run out of memory in cursor.execute

2006-06-06 Thread John J. Lee
Jack Diederich <[EMAIL PROTECTED]> writes: [...] > MySQL will keep table locks until the results are all fetched so even though > the DB API allows fetchone() or fetchmany() using those with MySQLdb is > dangerous. [...] That's not true of InnoDB tables. John -- http://mail.python.org/mailman/l

Re: Need pixie dust for building Python 2.4 curses module on Solaris 8

2006-06-06 Thread John J. Lee
[EMAIL PROTECTED] writes: > I'm having no success building the curses module on Solaris 8 (yes, I know > it's ancient - advancing the state-of-the-art is not yet an option) for > Python 2.4. Sun provides an apparently ancient version of curses in > /usr/lib, so I downloaded and installed ncurses

Re: what are you using python language for?

2006-06-12 Thread John J. Lee
[EMAIL PROTECTED] writes: > I am using Python to assemble a biomedical literature analysis pipeline > as part of my PhD thesis. (http://ib-dwb.sf.net/Muscorian.html) What's a literature analysis pipeline? (mental picture: fat pressurised pipe leading to big noisy wood chipper-style machine spewi

Re: urllib behaves strangely

2006-06-12 Thread John J. Lee
Duncan Booth <[EMAIL PROTECTED]> writes: > Gabriel Zachmann wrote: > > > Here is a very simple Python script utilizing urllib: [...] > > "http://commons.wikimedia.org/wiki/Commons:Featured_pictures/chronologi > > cal" > > print url > > print > > file = urllib.urlopen( url ) [...]

Re: urllib2 OpenerDirector question on usage.

2006-06-23 Thread John J. Lee
"Ant" <[EMAIL PROTECTED]> writes: > I am using urllib2 as a part of a web testing tool. One of the things I > am testing is the effect of two different people perforing the same > actions on the website - do they interfer with each other or not. > > So to emulate this, I essentially have the foll

Re: Python to PHP Login System (HTTP Post)

2006-06-23 Thread John J. Lee
[EMAIL PROTECTED] writes: > On 22 Jun 2006 16:19:50 -0700, "Justin Azoff" > <[EMAIL PROTECTED]> wrote: > > >Jeethu Rao wrote: > >> You need to use httplib. > >> http://docs.python.org/lib/httplib-examples.html > >> > >> Jeethu Rao > > > >Not at all. They need to read the documentation for urrli

Re: Python to PHP Login System (HTTP Post)

2006-06-24 Thread John J. Lee
[EMAIL PROTECTED] (John J. Lee) writes: [...] > #--- > import mechanize > > SHOW_COOKIES = True > > br = mechanize.Browser() > if SHOW_COOKIES: > cj = mechanize.CookieJar() > br.set_cookiejar(cj) > br.open("

Re: Passing a Cookie with httplib

2006-06-29 Thread John J. Lee
Grant Edwards <[EMAIL PROTECTED]> writes: > On 2006-06-28, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > From a shell script, I have used /usr/bin/curl to access a web site > > and pass a cookie > > I use ClientCookie for that. > > http://wwwsearch.sourceforge.net/ClientCookie/ Note that

Re: built in zip function speed

2006-07-04 Thread John J. Lee
[EMAIL PROTECTED] writes: [...] > (Instead of numarray you can use ScyPy, numerics, etc.) > If your data in on disk you can avoid the list=>array conversion, and > load the data from the numerical library itself, this is probably > almost as fast as doing the same thing in C. Apparently if you're

Re: python/xpath question...

2006-07-09 Thread John J. Lee
(Damn gmane's authorizor, I think I lost four postings because the auth messages went to my work email address (and I thought the authorization was supposed to be one-time only per group anyway??). I deleted them as spam since I hadn't posted from there for days :-( Grrr. At least I could reconst

Re: python/xpath question...

2006-07-09 Thread John J. Lee
Stefan Behnel <[EMAIL PROTECTED]> writes: [...] > I'm not quite sure how this is supposed to be related to Python, but if you're > trying to find a sibling, what about using the "sibling" axis in XPath? There's no "sibling" axis in XPath. I'm sure you meant "following-sibling" and/or "preceding-

Re: xpath question...

2006-07-09 Thread John J. Lee
"bruce" <[EMAIL PROTECTED]> writes: > i have the following section of test code where i'm trying to get the > attribute of a frame > > > i'm trying to print/get the src value. the xpath query that i have displays > the "src" attribute in the Xpather/Firefox plugin. however, i can't quite > fi

Re: python guru for urllib/mechanize

2006-07-09 Thread John J. Lee
"bruce" <[EMAIL PROTECTED]> writes: > i'm trying to get the pages from a site "axess.stanford.edu", and i'm > running into problems. i've got some test code that allows me to get the 1st > few pages. i'm having an issue when i run into a page that somehow > interprets a url from a src of a framese

Re: Module for creating a screenshot of a web page given a URL?

2006-07-09 Thread John J. Lee
[EMAIL PROTECTED] writes: > > Untestetd, but I'm pretty sure something like this will do. > > If you need more control, and on windows, try pywinauto > > I do need it to run on Windows. I'll check out pywinauto. Thanks. Note he didn't say you *need* pywinauto to run on Windows. John -- http:/

Re: cookielib incorrectly escapes cookie

2006-07-09 Thread John J. Lee
"BJörn Lindqvist" <[EMAIL PROTECTED]> writes: > I have some very serious trouble getting cookes to work. After a lot > of work (urllib2 is severly underdocumented, arcane and overengineerd > btw) I'm finally able to accept cookes from a server. But I'm still And a good day to you too ;-) In pass

Re: HTTPBasicAuthHandler doesn't work

2006-07-09 Thread John J. Lee
[EMAIL PROTECTED] writes: > Hi ! > I'm trying to add the HTTP basic authentification to my web spider but > it doesn't work... > The HTTPBasicAuthHandler don't send the headers for authentification > :-( Hi Several bugs were fixed with Basic auth in Python 2.5. I'd be most grateful if you can v

RE: [wwwsearch-general] ClientForm request re ParseErrors

2006-07-10 Thread John J Lee
On Sun, 9 Jul 2006, bruce wrote: [...] > sgmllib.SGMLParseError: expected name token at ' > > partial html > --- > > > Action="/servlets/iclientservlet/a2k_prd/?ICType=Panel&Menu=SA_LEARNER_SERVI > CES&Market=GBL&PanelGroupName=CLASS_SEARCH" autocomplete=off> >

Re: [wwwsearch-general] ClientForm request re ParseErrors

2006-07-10 Thread John J. Lee
"bruce" <[EMAIL PROTECTED]> writes: > hi john... [...] I'll be answering all these posts of bruce's on [EMAIL PROTECTED] -- I don't think c.l.py is the right place. John -- http://mail.python.org/mailman/listinfo/python-list

Re: Mechanize/Browser question

2006-07-10 Thread John J. Lee
"Diez B. Roggisch" <[EMAIL PROTECTED]> writes: > bruce schrieb: > > hi... > > i can do the following > > br = Browser > > br.open("www.yahoo.com") > > br.open("file:///foo") > > but can i do > > s = "..." qualified html text > > br.open(s) > > i'm curious, if i have html from some

Re: unistall python mechanize

2006-07-10 Thread John J. Lee
"bruce" <[EMAIL PROTECTED]> writes: > hi.. > > i'm trying to figure out how to uninstall "mechanize". i don't see an > "unistall" from the "python --help-commands" function... > > i'm looking to rebuild/reinstall mechanize from the svn repos to try to see > if an apparent parsing issue that i me

Re: Howto or Tutorial for tokenize module for a newbie?

2006-07-10 Thread John J. Lee
"TY" <[EMAIL PROTECTED]> writes: > Can someone point me to a Howto or Tutorial for tokenize module for a > newbie? I read the documentation but it doesn't have a lot of info... Here's a simple example: http://groups.google.com/group/comp.lang.python/msg/e84e36ad10d78303 John -- http://mail.p

Re: Automate Web Configuration

2006-09-07 Thread John J. Lee
Steve Holden <[EMAIL PROTECTED]> writes: > D wrote: > > I would like to write a program that will automate the configuation of > > a firewall or router via HTTPS. So, I need to import the applicable > > certificate, and be able to configure the unit as if I was > > typing/selecting the appropriat

Re: [ANN] IronPython 1.0 released today!

2006-09-07 Thread John J. Lee
"Diez B. Roggisch" <[EMAIL PROTECTED]> writes: [...re Scipy on IronPython...] > No, you can't. I'm not sure if there are any bridging attempts being made, > but in this respect IronPython is the same as Jython - a completely > different runtime which executes its own byte-code. Haven't heard re S

Re: Testing a website with HTTPS login and cookies

2006-09-07 Thread John J. Lee
"Sandra-24" <[EMAIL PROTECTED]> writes: > Hari Sekhon wrote: > > If anybody knows how to do this could they please give me a quick > > pointer and tell me what libraries I need to go read up on? > > > > One word. Selenium. Didn't sound like a good fit for Selenium to me. Selenium's great, but

Re: Testing a website with HTTPS login and cookies

2006-09-07 Thread John J. Lee
Hari Sekhon <[EMAIL PROTECTED]> writes: > I want to create a test that will do a proper login test to a web site > but I need some pointers. > > I need to login to the website by accessing an https url and posting > to that, which should return a very small 302 reply with the address > of the int

Re: Add NTLM proxy authentication to urllib2

2006-09-07 Thread John J. Lee
Jarek Zgoda <[EMAIL PROTECTED]> writes: > looping napisał(a): > > > I have to make internet connections through an ISA proxy server that > > use NTLM or Kerberos authorization method. > > I've found a program in python called ntlmaps that act like a proxy and > > could make the NTLM authenticatio

Re: Add NTLM proxy authentication to urllib2

2006-09-08 Thread John J. Lee
"looping" <[EMAIL PROTECTED]> writes: > I've done some tests with urllib2 and pywin32 and managed to partialy > implement the NTLM authentication, but it look like you need a > persistent connection (http 1.1 or 'Keep-Alive') to complete the > authentication. > Unfortunatly, urllib2 use a new conn

Re: should urlparse return user and pass in separate components?

2006-09-08 Thread John J. Lee
"metaperl" <[EMAIL PROTECTED]> writes: > The urlparse with Python 2.4.3 includes the user and pass in the site > aspect of its parse: > > >>> scheme, site, path, parms, query, fid = > >>> urlparse.urlparse("http://bill:[EMAIL > >>> PROTECTED]/lib/module-urlparse.html") > > >>> site > 'bill:[EM

Re: Javadoc style python manual?

2006-09-08 Thread John J. Lee
[EMAIL PROTECTED] writes: > Hi there, > > I'm new to python and I'm from the java world. > Though I love to learn python, I'm not very comfortable with the python > documentation. > Because when i read jdk doc, i can see the class hierachy, class > member, class methods etc in html docs. It's ver

Re: Javadoc style python manual?

2006-09-08 Thread John J. Lee
"Paul Boddie" <[EMAIL PROTECTED]> writes: [...] > Better usage of the find command could be made, and the resulting > process occupied over 0.5GB before producing 581MB of API documents on > disk. The resulting output reveals some major differences between some > modules and in the quality of the d

Re: urllib en https

2006-09-16 Thread John J. Lee
Dennis Lee Bieber <[EMAIL PROTECTED]> writes: > On Wed, 13 Sep 2006 23:03:08 +0200, Cecil Westerhof <[EMAIL PROTECTED]> > declaimed the following in comp.lang.python: > > > > > I found the problem. The first Python was compiled with ssl support enabled > > and the second without ssl support enab

Re: urllib en https

2006-09-16 Thread John J. Lee
[EMAIL PROTECTED] (John J. Lee) writes: [...] > Does ActiveState do a unix distribution of Python now? > > (The OP seemed to have a Unix-like system -- so probably he didn't > install have the right rpm or whatever installed -- a very common > problem with people trying

Re: Mechanoid Web Browser - Recording Capability

2006-09-16 Thread John J. Lee
"Seymour" <[EMAIL PROTECTED]> writes: > I am trying to find a way to sign onto my Wall Street Journal account > (http://online.wsj.com/public/us) and automatically download various > financial pages on stocks and mutual funds that I am interested in > tracking. I have a subscription to this site

Re: Mechanoid Web Browser - Recording Capability

2006-09-16 Thread John J. Lee
"Seymour" <[EMAIL PROTECTED]> writes: [...] > struggling otherwise and have been trying to learn how to program the > Mechanoid module (http://cheeseshop.python.org/pypi/mechanoid) to get > past the password protected site hurdle. > > My questions are: > 1. Is there an easier way to grab these pag

Re: Mechanoid Web Browser - Recording Capability

2006-09-16 Thread John J. Lee
"Seymour" <[EMAIL PROTECTED]> writes: > I am trying to find a way to sign onto my Wall Street Journal account > (http://online.wsj.com/public/us) and automatically download various > financial pages on stocks and mutual funds that I am interested in > tracking. I have a subscription to this site

Re: high level, fast XML package for Python?

2006-09-16 Thread John J. Lee
Steven Bethard <[EMAIL PROTECTED]> writes: [...] > In Python 2.5, cElementTree and ElementTree will be available in the > standard library as xml.etree.cElementTree and > xml.etree.ElementTree. So learning them now is a great idea. Only some of the original ElementTree software is going into 2.5,

Re: UDP packets to PC behind NAT

2006-09-16 Thread John J. Lee
"Janto Dreijer" <[EMAIL PROTECTED]> writes: > Steve Holden wrote: > > Note that TCP and UDP port spaces are disjoint, so there's no way for > > TCP and UDP to use "the same port" - they can, however, use the same > > port number. Basically the TCP and UDP spaces have nothing to do with > > each ot

Re: RegexBuddy (anyone use this?)

2006-09-17 Thread John J. Lee
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: [...] > kodos does look good but I do not have the pyqt (maybe I am slightly > off) interface to use it on my system.. with another graphic interface [...] So... why not just install pyqt? http://www.diotavelli.net/PyQtWiki/FrequentlyAskedQuestions

Re: Mechanoid Web Browser - Recording Capability

2006-09-19 Thread John J. Lee
"Seymour" <[EMAIL PROTECTED]> writes: > Somehow I had the notion that Mechanize was a Pearl script. mechanize the Python module started as a port of Andy Lester's Perl module WWW::Mechanize (in turn based on Gisle Aas' libwww-perl), and on some very high level has "the same" conceptual interface,

<    1   2   3   4   5   >