Re: is there a bug in urlunparse/urlunsplit

2008-05-19 Thread Nikita the Spider
In article <[EMAIL PROTECTED]>, Alex <[EMAIL PROTECTED]> wrote: > Hi all. > > Is there a bug in the urlunparse/urlunsplit functions? > Look at this fragment (I know is quite silly): > > urlunparse(urlparse('www.example.org','http')) > ---> 'http:///www.example.org' >^ > > Ther

Re: Stripping scripts from HTML with regular expressions

2008-04-10 Thread Nikita the Spider
In article <[EMAIL PROTECTED]>, "Reedick, Andrew" <[EMAIL PROTECTED]> wrote: > > -Original Message- > > From: [EMAIL PROTECTED] [mailto:python- > > [EMAIL PROTECTED] On Behalf Of Michel Bouwmans > > Sent: Wednesday, April 09, 2008 3:38 PM > > To: python-list@python.org > > Subject: Stripp

Re: is Pylons alive?

2008-04-09 Thread Nikita the Spider
In article <[EMAIL PROTECTED]>, Gerhard Häring <[EMAIL PROTECTED]> wrote: > - TurboGears 2.0 (I personally wouldn't bother with TurboGears 1.x at > this point) Having investigated some of this myself recently, I agree with you that the TG 1.x series is a dead end, but there's no TG 2.0 yet. La

Re: urlparse http://site.com/../../../page.html

2008-04-08 Thread Nikita the Spider
In article <[EMAIL PROTECTED]>, "monk.e.boy" <[EMAIL PROTECTED]> wrote: > I figured it out and blogged the answer: > > http://teethgrinder.co.uk/blog/Normalize-URL-path-python/ Thanks for letting us know of a solution. You might also be interested in Fourthought's URI library which contains

Re: developing web spider

2008-04-03 Thread Nikita the Spider
In article <[EMAIL PROTECTED]>, John Nagle <[EMAIL PROTECTED]> wrote: > abeen wrote: > > Hello, > > > > I would want to know which could be the best programming language for > > developing web spider. > > More information about the spider, much better,, > > As someone who actually runs a Py

Re: Multi Threading Problem with Python + Django + PostgreSQL.

2008-03-31 Thread Nikita the Spider
In article <[EMAIL PROTECTED]>, Pradip <[EMAIL PROTECTED]> wrote: > Hello every body. I am new to this forum and also in Python. > Read many things about multi threading in python. But still having > problem. > > I am using Django Framework with Python having PostgreSQL as backend > database wi

Re: zope and python 2.5.1

2008-03-20 Thread Nikita the Spider
In article <[EMAIL PROTECTED]>, hberig <[EMAIL PROTECTED]> wrote: > Hi, > I'm sorry if this is an off-topic message, but I didn't found other > group. > I've read some articles about Zope, and since I like very much python, > I would like to run a webserver application using Zope instead other >

Re: mmap and shared memory

2008-02-14 Thread Nikita the Spider
In article <[EMAIL PROTECTED]>, Jeff Schwab <[EMAIL PROTECTED]> wrote: > Nikita the Spider wrote: > > In article <[EMAIL PROTECTED]>, > > Jeff Schwab <[EMAIL PROTECTED]> wrote: > > > >> greg wrote: > >>> Carl Banks wrote: &g

Re: mmap and shared memory

2008-02-13 Thread Nikita the Spider
In article <[EMAIL PROTECTED]>, Jeff Schwab <[EMAIL PROTECTED]> wrote: > greg wrote: > > Carl Banks wrote: > >> In C you can use the mmap call to request a specific physical location > >> in memory (whence I presume two different processes can mmap anonymous > >> memory block in the same location

Re: Detecting OS platform in Python

2008-01-11 Thread Nikita the Spider
In article <[EMAIL PROTECTED]>, Mike Meyer <[EMAIL PROTECTED]> wrote: > On Thu, 10 Jan 2008 18:37:59 -0800 (PST) Devraj <[EMAIL PROTECTED]> wrote: > > > Hi everyone, > > > > My Python program needs reliably detect which Operating System its > > being run on, infact it even needs to know which d

Re: Inter-process communication, how?

2007-12-22 Thread Nikita the Spider
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: > Hi, > let's say I have two scripts: one does some computations and the other > one is a graphical front end for launching the first one. And both run > in separate processes (front end runs and that it spawns a subprocess > with the comp

Re: documenting excepetions in Python

2007-10-19 Thread Nikita the Spider
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: > In python, how do I know what exceptions a method could raise? Do I > need to look at the source? I don't see this info in the API docs for > any of the APIs I'm using. Hi Dale, Usually the docs for a method will list the likely except

Re: Simple HTML template engine?

2007-10-15 Thread Nikita the Spider
In article <[EMAIL PROTECTED]>, "allen.fowler" <[EMAIL PROTECTED]> wrote: > Hello, > > Can anyone recommend a simple python template engine for generating > HTML that relies only on the Pyhon Core modules? > > No need for caching, template compilation, etc. > > Speed is not a major issue. > >

Re: Why doesn't Python's "robotparser" like Wikipedia's "robots.txt" file?

2007-10-04 Thread Nikita the Spider
In article <[EMAIL PROTECTED]>, John Nagle <[EMAIL PROTECTED]> wrote: > Filip Salomonsson wrote: > > On 02/10/2007, John Nagle <[EMAIL PROTECTED]> wrote: > >> But there's something in there now that robotparser doesn't like. > >> Any ideas? > > > > Wikipedia denies _all_ access for the standard

Re: Generating HTML

2007-09-13 Thread Nikita the Spider
In article <[EMAIL PROTECTED]>, "Sebastian Bassi" <[EMAIL PROTECTED]> wrote: > Hello, > > What are people using these days to generate HTML? I still use > HTMLgen, but I want to know if there are new options. I don't > want/need a web-framework a la Zope, just want to produce valid HTML > from P

Re: LRU cache?

2007-08-12 Thread Nikita the Spider
In article <[EMAIL PROTECTED]>, Paul Rubin wrote: > Anyone got a favorite LRU cache implementation? I see a few in google > but none look all that good. I just want a dictionary indexed by > strings, that remembers the last few thousand entries I put in it. > > It ac

Re: Ipc mechanisms and designs.

2007-08-10 Thread Nikita the Spider
In article <[EMAIL PROTECTED]>, king kikapu <[EMAIL PROTECTED]> wrote: > Hi, > > inspired of the topic "The Future of Python Threading", i started to > realize that the only way to utilize the power of multiple cores using > Python, is spawn processes and "communicate" with them. > > If we have

Re: Problem with Python's "robots.txt" file parser in module robotparser

2007-07-13 Thread Nikita the Spider
In article <[EMAIL PROTECTED]>, John Nagle <[EMAIL PROTECTED]> wrote: >I asked over at Webmaster World, and over there, they recommend against > using redirects on robots.txt files, because they questioned whether all of > the major search engines understand that. Does a redirect for > "foo

Re: Problem with Python's "robots.txt" file parser in module robotparser

2007-07-12 Thread Nikita the Spider
In article <[EMAIL PROTECTED]>, John Nagle <[EMAIL PROTECTED]> wrote: > Nikita the Spider wrote: > > > > > Hi John, > > Are you sure you're not confusing your sites? The robots.txt file at > > www.ibm.com contains the double slashed path. The ro

Re: Problem with Python's "robots.txt" file parser in module robotparser

2007-07-11 Thread Nikita the Spider
In article <[EMAIL PROTECTED]>, John Nagle <[EMAIL PROTECTED]> wrote: >Python's "robots.txt" file parser may be misinterpreting a > special case. Given a robots.txt file like this: > > User-agent: * > Disallow: // > Disallow: /account/registration > Disallow: /accoun

Re: Html parser

2007-06-15 Thread Nikita the Spider
In article <[EMAIL PROTECTED]>, Stephen R Laniel <[EMAIL PROTECTED]> wrote: > On Fri, Jun 15, 2007 at 07:11:56AM -0700, HMS Surprise wrote: > > Could you recommend an html parser that works with python (jython > > 2.2)? > > I'm new here, but I believe BeautifulSoup is the canonical > answer: >

Re: open function fail after running a day

2007-06-07 Thread Nikita the Spider
In article <[EMAIL PROTECTED]>, alexteo21 <[EMAIL PROTECTED]> wrote: > The script is working fine on the day of execution. > It is able to process the data files very hour. However, the > processing fail one day later i.e. the date increment by 1. > > Traceback (most recent call last): > File

Re: calling Postgresql stored procedure (written in plpython)

2007-06-01 Thread Nikita the Spider
In article <[EMAIL PROTECTED]>, Alchemist <[EMAIL PROTECTED]> wrote: > Thanks for your help. > > My stored procedure is written in pythonpl. I noticed that SELECT > queries are executed correctly (results are returned to my script) > whereas UPDATE queries are not being performed as the data is

Re: How to parse usenet urls?

2007-05-31 Thread Nikita the Spider
In article <[EMAIL PROTECTED]>, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > Are you aware of nntplib? > > > > http://docs.python.org/lib/module-nntplib.html > > I am, but I once I got into the article itself, I couldn't figure out > how to "call" a link inside the resulting message text:

Re: How to parse usenet urls?

2007-05-30 Thread Nikita the Spider
In article <[EMAIL PROTECTED]>, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I'm trying to parse newsgroup messages, and I need to follow URLs in > this format: news://some.server. I can past them into a newsreader > with no problem, but I want to do it programatically. > > I can't figure ou

Re: calling Postgresql stored procedure

2007-05-30 Thread Nikita the Spider
In article <[EMAIL PROTECTED]>, Alchemist <[EMAIL PROTECTED]> wrote: > I am using Python 2.4 and Postgresql 8.2 database server. > > On the database I have created a stored function, example, > CREATE OR REPLACE FUNCTION calculateaverage() > > I created a new python script and would like to cal

Re: mmap thoughts

2007-05-12 Thread Nikita the Spider
In article <[EMAIL PROTECTED]>, "James T. Dennis" <[EMAIL PROTECTED]> wrote: >* There don't seem to be any currently maintained SysV IPC > (shm, message, and semaphore) modules for Python. I guess some > people have managed to hack something together using ctypes; > but I have

Re: Python "robots.txt" parser broken since 2003

2007-04-22 Thread Nikita the Spider
In article <[EMAIL PROTECTED]>, John Nagle <[EMAIL PROTECTED]> wrote: > This bug, "[ 813986 ] robotparser interactively prompts for username and > password", has been open since 2003. It killed a big batch job of ours > last night. > > Module "robotparser" naively uses "urlopen" to read "robot

Re: Domain Keys in Python

2007-04-20 Thread Nikita the Spider
In article <[EMAIL PROTECTED]>, Andrew Veitch <[EMAIL PROTECTED]> wrote: > I am trying to implement Domain Keys > (http://domainkeys.sourceforge.net/) in Python. > > In Perl I would just use Crypt:RSA which has a sign > method with an armour option which generates exactly > what I want but I can

Re: Python Feature Request: (?) Group all file-directory-related stdlib functions in one place

2007-04-15 Thread Nikita the Spider
In article <[EMAIL PROTECTED]>, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > > Currently file-directory-related functionality in the Python standard > > library is scattered among various modules such as shutil, os, > > dircache etc. So I request that the functions be gathered and > > consolida

Platform-specific compile flags in setup.py?

2007-03-04 Thread Nikita the Spider
Hi all, I'm a newbie when it comes to distributing C-based Python modules. I'm just now sharing my first with the rest of the world (it's actually V. Marangozov's shared memory module for IPC) and I've learned that the module needs a different set of compile flags for Linux than for my Mac. My

Re: How use XML parsing tools on this one specific URL?

2007-03-04 Thread Nikita the Spider
In article <[EMAIL PROTECTED]>, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I understand that the web is full of ill-formed XHTML web pages but > this is Microsoft: > > http://moneycentral.msn.com/companyreport?Symbol=BBBY > > I can't validate it and xml.minidom.dom.parseString won't work

Re: HTML to dictionary

2007-02-27 Thread Nikita the Spider
In article <[EMAIL PROTECTED]>, Tina I <[EMAIL PROTECTED]> wrote: > Hi everyone, > > I have a small, probably trivial even, problem. I have the following HTML: > > > > METAR: > > > > ENBR 270920Z 0KT FEW018 02/M01 Q1004 NOSIG > > > > > > short-TAF: > > > > ENBR 270800Z 270918 VRB

Re: threading and multicores, pros and cons

2007-02-20 Thread Nikita the Spider
In article <[EMAIL PROTECTED]>, Paul Rubin <http://[EMAIL PROTECTED]> wrote: > Nikita the Spider <[EMAIL PROTECTED]> writes: > > note, there a (sort of) new module available that allows interprocess > > communication via shared memory and semaphores with

Re: Approaches of interprocess communication

2007-02-16 Thread Nikita the Spider
In article <[EMAIL PROTECTED]>, "exhuma.twn" <[EMAIL PROTECTED]> wrote: > Hi all, > > Supposing you have two separate processes running on the same box, > what approach would you suggest to communicate between those two > processes. Hi exhuma, That would depend on what data I was exchanging bet

Re: threading and multicores, pros and cons

2007-02-14 Thread Nikita the Spider
In article <[EMAIL PROTECTED]>, Maric Michaud <[EMAIL PROTECTED]> wrote: > This is a recurrent problem I encounter when I try to sell python solutions > to > my customers. I'm aware that this problem is sometimes overlooked, but here > is the market's law. > > I've heard of a bunch of argumen

Re: postgres backup script and popen2

2007-02-08 Thread Nikita the Spider
In article <[EMAIL PROTECTED]>, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > On 8 feb, 10:27, Maël Benjamin Mettler <[EMAIL PROTECTED]> wrote: > > > flupke schrieb: > > > i made a backup script to backup my postgres database. > > > Problem is that it prompts for a password. It thought i > >

Marangozov's shmmodule (System V shared memory for Python IPC)

2007-02-01 Thread Nikita the Spider
Hi all, In the late 90s Vladimir Marangozov wrote a module that provided an interface to System V shared memory on *nix platforms. I found a copy on the Net, dusted it off, compiled it, plugged a couple of memory leaks, intergrated others' changes, etc. Vlad hasn't posted on Usenet since the su

Re: Help extracting info from HTML source ..

2007-01-26 Thread Nikita the Spider
In article <[EMAIL PROTECTED]>, "Miki" <[EMAIL PROTECTED]> wrote: > Hello Shelton, > > > I am learning Python, and have never worked with HTML. However, I would > > like to write a simple script to audit my 100+ Netware servers via their web > > portal. > Always use the right tool, Beautilful

Re: Regex for URL extracting

2007-01-24 Thread Nikita the Spider
In article <[EMAIL PROTECTED]>, "Johny" <[EMAIL PROTECTED]> wrote: > Does anyone know about a good regular expression for URL extracting? Extracting URLs from what? If it is HTML, then I'd look at some existing HTML parsing modules like Beautiful Soup and Barnes' HTMLData. -- Philip http://

Re: spidering script

2007-01-20 Thread Nikita the Spider
In article <[EMAIL PROTECTED]>, "David Waizer" <[EMAIL PROTECTED]> wrote: > Hello.. > > I'm looking for a script (perl, python, sh...)or program (such as wget) > that will help me get a list of ALL the links on a website. > > For example ./magicscript.pl www.yahoo.com and outputs it to a file

Re: urllib2 and transfer-encoding = chunked

2007-01-20 Thread Nikita the Spider
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: > Haha! My mistake. > > The error is that when a web server is chunking a web page only the > first chunk appears to be acquired by the urllib2.urlopen call. If you > check the headers, there is no 'Content-length' (as expected) and > in

Re: Good script editor for Python on Mac OS 10.3

2006-11-29 Thread Nikita the Spider
In article <[EMAIL PROTECTED]>, Lou Pecora <[EMAIL PROTECTED]> wrote: > In article <[EMAIL PROTECTED]>, > "Scott_Davies" <[EMAIL PROTECTED]> wrote: > > > Hi, > > > > I have an old Mac with OS X Panther installed. I also have the Python > > language download file, but I haven't got a text/scri

Re: Python program that validates an url against w3c markup validator

2006-11-29 Thread Nikita the Spider
In article <[EMAIL PROTECTED]>, "yaru22" <[EMAIL PROTECTED]> wrote: > I'd like to create a program that validates bunch of urls against the > w3c markup validator (http://validator.w3.org/) and store the result in > a file. > > Since I don't know network programming, I have no idea how to start