Re: urlopen returns forbidden

2011-02-27 Thread Chris Rebert
On Sun, Feb 27, 2011 at 9:38 PM, monkeys paw wrote: > I have a working urlopen routine which opens > a url, parses it for tags and prints out > the links in the page. On some sites, wikipedia for > instance, i get a > > HTTP error 403, forbidden. > > What is the difference in accessing the site t

urlopen returns forbidden

2011-02-27 Thread monkeys paw
I have a working urlopen routine which opens a url, parses it for tags and prints out the links in the page. On some sites, wikipedia for instance, i get a HTTP error 403, forbidden. What is the difference in accessing the site through a web browser and opening/reading the URL with python urlli

Re: Executing js/ajax in a sandboxed environment

2011-02-27 Thread Amit Sethi
On Sun, Feb 27, 2011 at 10:26 AM, Rohan Malhotra wrote: > BeautifulSoup library only fetches source of page. I need the access > to DOM after js execution with url as input parameter. > > Any pointers? > I am not sure but in case you need to make some ajax requests mechanize might help. http://

Re: [ANN]VTD-XML 2.10

2011-02-27 Thread Dinh
It is advertised as fastest tool. Have anyone done homework with it yet? On Sun, Feb 27, 2011 at 7:52 PM, wrote: > Jimmy, > > How does VTD-XML compare to XML tools in the stdlib or to 3rd party > alternatives like lxml? > > Thank you, > Malcolm > -- > http://mail.python.org/mailman/listinfo/pyth

Re: nntplib encoding problem

2011-02-27 Thread Thomas L. Shinnick
At 08:12 PM 2/27/2011, you wrote: On 28/02/2011 01:31, Laurent Duchesne wrote: Hi, I'm using python 3.2 and got the following error: nntpClient = nntplib.NNTP_SSL(...) nntpClient.group("alt.binaries.cd.lossless") nntpClient.over((534157,534157)) ... 'subject': 'Myl\udce8ne Farmer - Anamorpho

Re: nntplib encoding problem

2011-02-27 Thread MRAB
On 28/02/2011 01:31, Laurent Duchesne wrote: Hi, I'm using python 3.2 and got the following error: nntpClient = nntplib.NNTP_SSL(...) nntpClient.group("alt.binaries.cd.lossless") nntpClient.over((534157,534157)) ... 'subject': 'Myl\udce8ne Farmer - Anamorphosee (Japan Edition) 1995 [02/41] "B

Re: Various behaviors of doctest

2011-02-27 Thread Gnarlodious
Yeah, I just spent about 2 hours trying everything I could think of... without success. Including your suggestions. Guess I'll have to skip it. But thanks for the ideas. -- Gnarlie -- http://mail.python.org/mailman/listinfo/python-list

nntplib encoding problem

2011-02-27 Thread Laurent Duchesne
Hi, I'm using python 3.2 and got the following error: nntpClient = nntplib.NNTP_SSL(...) nntpClient.group("alt.binaries.cd.lossless") nntpClient.over((534157,534157)) ... 'subject': 'Myl\udce8ne Farmer - Anamorphosee (Japan Edition) 1995 [02/41] "Back.jpg" yEnc (1/3)' ... overview = nntpClien

Re: Various behaviors of doctest

2011-02-27 Thread Steven D'Aprano
On Sun, 27 Feb 2011 08:55:10 -0800, Gnarlodious wrote: > Using the doctest module, I get three different outputs: > > 1) From the Terminal shell, I see a full report: > python ~/Sites/Sectrum/Filter.py -v Can we assume that Filter.py, whatever that is, runs doctest.testmod()? > 2) From the

Re: python3.2m installed as (additional) binary

2011-02-27 Thread andrew cooke
[Sorry I clicked the wrong button so I think my prev reply went only to Tom] Thanks. Yes, they're hard linked. And the bug report mentions PEP 3149 which says that "m" means --with-pymalloc was used http://www.python.org/dev/peps/pep-3149/ Cheers, Andrew -- http://mail.python.org/mailman/lis

Re: python3.2m installed as (additional) binary

2011-02-27 Thread Tom Zych
Tom Zych wrote: > andrew cooke wrote: >> -rwxr-xr-x 2 root root 7368810 2011-02-27 13:03 /usr/local/bin/python3.2 >> -rwxr-xr-x 2 root root 7368810 2011-02-27 13:03 /usr/local/bin/python3.2m > I suspect the "m" name is what gets built and the "no m" is an alias for > backwards-compatibility. Not s

Re: python3.2m installed as (additional) binary

2011-02-27 Thread Tom Zych
andrew cooke wrote: > I just downloaded, built and altinstalled Python3.2 on Linux x64. I noticed > that in /usr/local/bin I have two identical (says diff) binaries called > Python3.2 and Python3.2m. Is this expected? I can find very little > reference to them apart from a short discussion in

mortar_rdb 1.1.0 released!

2011-02-27 Thread Chris Withers
Hi All, I'm pleased to announce a new release of mortar_rdb. This package ties together SQLAlchemy, sqlalchemy-migrate and the component architecture to make it easy to develop projects using SQLAlchemy through their complete lifecycle. This release allows you to register SessionExtensions with

python3.2m installed as (additional) binary

2011-02-27 Thread andrew cooke
Hi, I just downloaded, built and altinstalled Python3.2 on Linux x64. I noticed that in /usr/local/bin I have two identical (says diff) binaries called Python3.2 and Python3.2m. Is this expected? I can find very little reference to them apart from a short discussion in python-dev where some

Re: Python Language Question?

2011-02-27 Thread Paul Symonds
cheers -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Language Question?

2011-02-27 Thread Rotwang
On 27/02/2011 16:45, Paul Symonds wrote: Can someone give and explanation of what is happening with the following: a,b = 0,1 # this assigns a = 0 and b = 1 while b < 10: ... print b ... a, b = b, a+b ... 1 1 2 3 5 8 a=0 b=1 while b < 1000: ... print b ... a = b ... b = a+b ... 1 2 4 8 1

Various behaviors of doctest

2011-02-27 Thread Gnarlodious
Using the doctest module, I get three different outputs: 1) From the Terminal shell, I see a full report: python ~/Sites/Sectrum/Filter.py -v 2) From the Terminal interactive session, I see an abbreviated report of only the failures: from doctest import testmod; testmod(Filter) 3) From a browser

Re: Python Language Question?

2011-02-27 Thread Benjamin Kaplan
On Sun, Feb 27, 2011 at 11:45 AM, Paul Symonds wrote: > Can someone give and explanation of what is happening with the following: > a,b = 0,1                       # this assigns a = 0 and b = 1 > while b < 10: > > ...     print b > ...     a, b = b, a+b > ... > 1 > 1 > 2 > 3 > 5 > 8 > >

Python Language Question?

2011-02-27 Thread Paul Symonds
Can someone give and explanation of what is happening with the following: a,b = 0,1 # this assigns a = 0 and b = 1 while b < 10: ... print b ... a, b = b, a+b ... 1 1 2 3 5 8 a=0 b=1 while b < 1000: ... print b ... a = b ... b = a+b ... 1 2 4 8 1

Re: Python getting stuck

2011-02-27 Thread Emile van Sebille
On 2/26/2011 5:10 PM Dan Stromberg said... Agreed, a more detailed description would greatly help us help you, but if you're in the standard windows terminal emulator widget (command.com , cmd.exe, powershell), then don't click in the window without first turning on "quick edi

Re: I'm happy with Python 2.5

2011-02-27 Thread Bill Allen
On Sun, Feb 27, 2011 at 07:34, n00m wrote: > Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit > (Intel)] on win32 > > and Idon't move neither up nor down from it (the best & the fastest > version) > -- Trolls should also be h

Re: I'm happy with Python 2.5

2011-02-27 Thread Tom Zych
n00m wrote: > Am I turmoiling your wishful thinking? > You may nourish it till the end of time. Let us cease to nourish those fabled ones who dwell under bridges. -- Tom Zych / freethin...@pobox.com Quidquid latine dictum sit, altum viditur. -- http://mail.python.org/mailman/listinfo/python-lis

Re: I'm happy with Python 2.5

2011-02-27 Thread n00m
http://www.spoj.pl/problems/TMUL/ Python's "print a * b" gets Time Limit Exceeded. = PHP's code = fscanf(STDIN, "%d\n", &$tcs); while ($tcs--) { fscanf(STDIN, "%s %s\n", &$n, &$m); echo bcmul($

Re: Python getting stuck

2011-02-27 Thread Tom Zych
Colin J. Williams wrote: > On 26-Feb-11 18:55 PM, Shanush Premathasarathan wrote: >> When I use cut, copy, paste, and any keyboard shortcuts, Python >> freezes and I am unable to use Python. Please Help as quick as >> possible!!! > What operating system are you using? If it's some kind of Unix, a

Re: Problem with python 3.2 and circular imports

2011-02-27 Thread Frank Millman
"Steven D'Aprano" wrote in message news:4d6a56aa$0$29972$c3e8da3$54964...@news.astraweb.com... On Sun, 27 Feb 2011 12:08:12 +0200, Frank Millman wrote: Assume the following structure - main.py /pkg __init__.py mod1.py mod2.py main.py from pkg import mod1 mod1.py import

Re: I'm happy with Python 2.5

2011-02-27 Thread n00m
On Feb 27, 3:58 pm, Grigory Javadyan wrote: > what the hell does that have to do with anything > > On Sun, Feb 27, 2011 at 5:34 PM, n00m wrote: > > Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit > > (Intel)] on win32 > > > and Idon't move neither up nor down from it (the best &

Re: issue on internal import in a package

2011-02-27 Thread Frank Millman
"人言落日是天涯,望极天涯不见家" wrote in message news:9529d52b-01b2-402c-a0a0-1e9240038...@l14g2000pre.googlegroups.com... On Feb 27, 9:38 pm, "Frank Millman" wrote: "人言落日是天涯,望极天涯不见家" wrote in message news:fa94323b-d859-4599-b236-c78a22b3d...@t19g2000prd.googlegroups.com... > On Feb 27, 9:22 pm, "Frank

Re: I'm happy with Python 2.5

2011-02-27 Thread n00m
Steve, see a list of accepted langs there, in bottom dropdown: http://www.spoj.pl/submit/ There *was* Python 2.6. Then admins shifted back to 2.5. People vote by their legs. -- http://mail.python.org/mailman/listinfo/python-list

Re: I'm happy with Python 2.5

2011-02-27 Thread Grigory Javadyan
what the hell does that have to do with anything On Sun, Feb 27, 2011 at 5:34 PM, n00m wrote: > Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit > (Intel)] on win32 > > and Idon't move neither up nor down from it (the best & the fastest > version) > -- > http://mail.python.org/mai

Re: Problem with python 3.2 and circular imports

2011-02-27 Thread Steven D'Aprano
On Sun, 27 Feb 2011 12:08:12 +0200, Frank Millman wrote: > Assume the following structure - > > main.py > /pkg > __init__.py > mod1.py > mod2.py > > main.py > from pkg import mod1 > > mod1.py > import mod2 > > mod2.py > import mod1 If you change the "import mod*" lines

Re: issue on internal import in a package

2011-02-27 Thread 人言落日是天涯,望极天涯不见家
On Feb 27, 9:38 pm, "Frank Millman" wrote: > "人言落日是天涯,望极天涯不见家" wrote in message > > news:fa94323b-d859-4599-b236-c78a22b3d...@t19g2000prd.googlegroups.com... > > > On Feb 27, 9:22 pm, "Frank Millman" wrote: > > > This behavior is by design or just a bug for Python3.x ? > > Definitely by design.

Re: I'm happy with Python 2.5

2011-02-27 Thread Steven D'Aprano
On Sun, 27 Feb 2011 05:34:44 -0800, n00m wrote: > Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit > (Intel)] on win32 > > and Idon't move neither up nor down from it (the best & the fastest > version) Congratulations. -- Steven -- http://mail.python.org/mailman/listinfo/pyth

Re: issue on internal import in a package

2011-02-27 Thread Frank Millman
"人言落日是天涯,望极天涯不见家" wrote in message news:fa94323b-d859-4599-b236-c78a22b3d...@t19g2000prd.googlegroups.com... On Feb 27, 9:22 pm, "Frank Millman" wrote: This behavior is by design or just a bug for Python3.x ? Definitely by design. Have a look at PEP 328 - http://www.python.org/dev/peps/pe

Re: I'm happy with Python 2.5

2011-02-27 Thread n00m
Python 3 is a tempor. lapse of reason. Just my an intuitive sensation, nothing objective in it. -- http://mail.python.org/mailman/listinfo/python-list

I'm happy with Python 2.5

2011-02-27 Thread n00m
Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit (Intel)] on win32 and Idon't move neither up nor down from it (the best & the fastest version) -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem with python 3.2 and circular imports

2011-02-27 Thread Frank Millman
"Ben Finney" wrote in message news:87aahh6401@benfinney.id.au... "Frank Millman" writes: Assume the following structure - main.py /pkg __init__.py mod1.py mod2.py main.py from pkg import mod1 mod1.py import mod2 mod2.py import mod1 What are you expecting the result

Re: issue on internal import in a package

2011-02-27 Thread 人言落日是天涯,望极天涯不见家
On Feb 27, 9:22 pm, "Frank Millman" wrote: > "Ben Finney" wrote in message > > news:87ei6t646h@benfinney.id.au... > > > > > 人言落日是天涯,望极天涯不见家 writes: > > >> Here is a simple example: > >> [app] > >>       [module] > >>             __init__.py   --> empty > >>             a.py   --> import b >

Re: issue on internal import in a package

2011-02-27 Thread Frank Millman
"Ben Finney" wrote in message news:87ei6t646h@benfinney.id.au... 人言落日是天涯,望极天涯不见家 writes: Here is a simple example: [app] [module] __init__.py --> empty a.py --> import b b.py --> defined a function foo() test.py In the test.py, conta

Re: Python getting stuck

2011-02-27 Thread Colin J. Williams
On 26-Feb-11 18:55 PM, Shanush Premathasarathan wrote: Hi All, When I use cut, copy, paste, and any keyboard shortcuts, Python freezes and I am unable to use Python. Please Help as quick as possible!!! Thanks a lot. Kind Regards Big Python fan! Shanush What operating system are you using?

Re: issue on internal import in a package

2011-02-27 Thread 人言落日是天涯,望极天涯不见家
On Feb 27, 8:40 pm, Ben Finney wrote: > 人言落日是天涯,望极天涯不见家 writes: > > Here is a simple example: > > [app] > >       [module] > >             __init__.py   --> empty > >             a.py   --> import b > >             b.py  --> defined a function foo() > >       test.py > > > In the test.py, contain

Re: [ANN]VTD-XML 2.10

2011-02-27 Thread python
Jimmy, How does VTD-XML compare to XML tools in the stdlib or to 3rd party alternatives like lxml? Thank you, Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem with python 3.2 and circular imports

2011-02-27 Thread Ben Finney
"Frank Millman" writes: > Assume the following structure - > > main.py > /pkg >__init__.py >mod1.py >mod2.py > > main.py >from pkg import mod1 > > mod1.py >import mod2 > > mod2.py > import mod1 What are you expecting the result to be? If it's about sharing objects between t

Re: issue on internal import in a package

2011-02-27 Thread Ben Finney
人言落日是天涯,望极天涯不见家 writes: > Here is a simple example: > [app] > [module] > __init__.py --> empty > a.py --> import b > b.py --> defined a function foo() > test.py > > In the test.py, contains the below statement: > from module import a > Execute

Re: issue on internal import in a package

2011-02-27 Thread 人言落日是天涯,望极天涯不见家
On Feb 27, 8:11 pm, 人言落日是天涯,望极天涯不见家 wrote: > Here is a simple example: > [app] >       [module] >             __init__.py   --> empty >             a.py   --> import b >             b.py  --> defined a function foo() >       test.py > > In the test.py, contains the below statement: > from module i

issue on internal import in a package

2011-02-27 Thread 人言落日是天涯,望极天涯不见家
Here is a simple example: [app] [module] __init__.py --> empty a.py --> import b b.py --> defined a function foo() test.py In the test.py, contains the below statement: from module import a Execute the test.py will get error: Traceback (most rec

Problem with python 3.2 and circular imports

2011-02-27 Thread Frank Millman
Hi all I thought I was getting the hang of circular imports, but after upgrading to python 3.2 I am stumped again. I know some people think that circular imports are always bad, but others suggest that, provided you understand the potential problems, they can be acceptable. Assume the follow