[TIP] [google-appengine] Re: How to use Twill
olemis at gmail.com
Fri May 28 08:01:46 PDT 2010
On Fri, May 28, 2010 at 7:59 AM, Alexmipego <alexmipego at gmail.com> wrote:
> Ohh, and the error is on the devel machine, not on GAE servers.
Ok. I suppose that the best place to ask for this should be
testing-in-python at lists.idyll.org
Many people familiar with that module are subscribed to that list, so
you'll probably get the right answer at the right time (that's why I'm
adding it to Cc and fixing top-posting, sorry for cross-posting , it's
a noble cause ;o) .
Please read below
> On 28 Maio, 13:57, Alexmipego <alexmip... at gmail.com> wrote:
>> On 28 Maio, 13:44, Olemis Lang <ole... at gmail.com> wrote:
>> > On Fri, May 28, 2010 at 2:17 AM, Alexmipego <alexmip... at gmail.com> wrote:
>> > > Hi,
>> > :o)
>> > > I'm trying to run some old python code that uses Twill on GAE.
>> > > Unfortunately, it doesn't seem to work. What I did was copy paste the
>> > > code and the source files for the twill library. And then I'm getting
>> > > this error:
>> > > ....\src\twill\utils.py", line 275, in run_tidy
>> > > process = subprocess.Popen(_tidy_cmd, stdin=subprocess.PIPE,
>> > > AttributeError: 'module' object has no attribute 'Popen'
>> > > I'm guessing this is trying to use some function that GAE has locked
>> > > out for some reason, but, is there a working Twill version or anyone
>> > > using it that could help me out?
>> > What are you doing exactly with twill ? If you're using in-process
>> > intercept functionality then it might not work at GAE (I mean in the
>> > cloud ;o), but it should work in development environment . If this is
>> > the case I see no reason for using that feature in a production
>> > environment .
>> > If this is not the case , please specify what are you trying to do ;o)
>> I'm not familiar with that "intercept" feature, perhaps I'm using it
>> without knowing. Anyway, my test case is pretty simple:
>> import twill.commands
>> b = twill.commands.get_browser()
>> It fails on the .go(...) method, always. From the looks of the message
>> and knowing a bit about the "scraping" world, it seems like the code
>> is trying to call html tidy to do from "pretty-print" formatting. I'm
>> not too familiar with python either, but that subprocess.Popen looks a
>> lot like it's trying to run something external like if it was on a
>> bash or cmd.exe shell instead of calling a lib linked in the sources.
>> So, any clues?
What version of Python are you using ? I see no reason for such
behavior if working on your local development machine | environment ,
having the right version of Py .
AFAICR, Jess Noller (talking about another subject ;o) mentioned once
@ TiP ML something related to the possibility of compiling the
interpreter without support for given modules . That's probably what's
happening in your case (but probably not ...) .
Control de usuarios personalizado con Apache y mod_authnz_external -
More information about the testing-in-python