Pre-appload test setup

2010-05-04 Thread ram
I test with some mock SQLite databases and simply throw them away after testing runs -- it's a much faster setup than building setup data in setup() methods. Right now I use a shell script to unzip the mock DB's before the test run, run the test suite (using nose with a --with-pylons that

WebHelpers homepage link is broken

2009-07-08 Thread Ram
The WebHelpers package homepage link (http://pylonshq.com/WebHelpers/) is broken. This link is shown on the package page at: http://pypi.python.org/pypi/WebHelpers --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

globals - thread mapping

2008-01-23 Thread ram
I'm running into a strange issue where occasionally references to global objects (i.e. items stored in the Pylons 'g' variable) mysteriously vanish after some time. This seems to happen sporadically, but especially after Paste has made a hung thread check. Has anyone seem something similar to

Re: launching bg subproc from Pylons

2007-10-04 Thread ram
that's interesting. Just out of interest, what program were you spawing ? and what does it do ? how long does it run for ? It's a long running batch job, database updates, GL file generation, month-end stuff.. A python script, using SQLAlchemy. Runs for maybe 1/2 hour or so.

Re: launching bg subproc from Pylons

2007-10-03 Thread ram
you can try os.system(mycmd ) huy Thanks Huy, Tried that one, and other varations - that one hangs too. When I trace into the controller return, it hangs in Paste on a return from worker_thread_callback(). Could the child process somehow be inheriting a thread lock being held by the parent

Re: launching bg subproc from Pylons

2007-10-03 Thread ram
Yeah, it was the open socket. Use close_fds=True for subprocesses launched from a controller. On Oct 3, 12:52 pm, ram [EMAIL PROTECTED] wrote: you can try os.system(mycmd ) huy Thanks Huy, Tried that one, and other varations - that one hangs too. When I trace into the controller

Re: launching bg subproc from Pylons

2007-10-03 Thread ram
It does. So does 'nohup' and that hung too. I guess the socket handle is inherited all the way down the chain. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email

launching bg subproc from Pylons

2007-10-01 Thread ram
stupid question: I'm trying to launch a background process from a Pylons controller, using the Python subprocess module in response to a hit from a browser. Funny thing is that Pylons seems to hold the browser connection open until the subprocess has completed - even though I'm running the

authkit + user_data

2007-05-17 Thread ram
Does anyone have an example of using the auth_data parm with Authkit? I'm using the 'forward' method, and I'm trying to set the value as follows: request.environ['paste.auth_tkt.set_user'](uid, user_data = 'myuserdata') Setting the cookie works, but Authkit then immediately logs the user

Re: authkit + user_data

2007-05-17 Thread ram
Ignore this: it was a problem with the format of the user data. Base-64 encoding the user_data takes care of the issue. On May 17, 11:32 am, ram [EMAIL PROTECTED] wrote: Does anyone have an example of using the auth_data parm with Authkit? I'm using the 'forward' method, and I'm trying

Re: Proxy helper

2007-03-28 Thread ram
] wrote: On 3/25/07, ram [EMAIL PROTECTED] wrote: I've got a requirement to have our Pylons app act as an occasional proxy to a different web service. In one case, we're going to proxy to an instance of Microsoft report server to fetch the results of report runs. The service has

Proxy helper

2007-03-25 Thread ram
I've got a requirement to have our Pylons app act as an occasional proxy to a different web service. In one case, we're going to proxy to an instance of Microsoft report server to fetch the results of report runs. The service has a straightforward URL request mechanism that simply streams the

Re: Paramatizing @jsonify

2006-12-14 Thread ram
where this decorator is defined and the controller module itself seem to import fine. Can anybody see where I've gone astray? Thanks much, Rick On Dec 14, 5:59 pm, ram [EMAIL PROTECTED] wrote: I'd like to modify the @jsonify decorator to be able to: a) override the default simplejson serializer

Re: Pylons dojo helpers

2006-11-08 Thread ram
OK then, is there a way to add my own functions to Webhelpers without having to re-build it and/or Pylons? Thanks, Rick --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group,

Re: Pylons dojo helpers

2006-11-08 Thread ram
Robert Leftwich wrote: ram wrote: OK then, is there a way to add my own functions to Webhelpers without having to re-build it and/or Pylons? Not explicitly WebHelpers, but you can add helpers to the Pylons h object simply by adding them to the helpers.py file that is created for each

Pylons dojo helpers

2006-11-07 Thread ram
Hi there again Pylonistas, Anyone else out there using dojo with Pylons? Would love to see some Webhelpers like a dojo-flavored version of 'link_to_remote()'. Anyone started something like this, or know of something? Thx, Rick --~--~-~--~~~---~--~~ You

Re: Pylons + json-rpc - Help Needed

2006-09-25 Thread ram
Most of that post seems to be concerned with the appropriate file layout and setup of jsolait, a client-side Javascript library that implements JSON-RPC v1. If you want to use jsolait, most of those instructions are still valid for Pylons. It's hard to give a lot of direction on where and how to

Re: 0.9: Can't get POST body

2006-08-23 Thread ram
It's required by the JSON-RPC spec as well, so I suppose it would be just as well to reject all requests that may get though without the header being set. I'll just do that. I was pretty surprised by wsgi.input being a blocking read, though. I initially thought that it was deliberately set that

Re: 0.9: Can't get POST body

2006-08-07 Thread ram
This will work fine for my needs, as I'm using dojo on the client side, which does a nice job of setting the content-length header. But what about buggy clients that don't properly set that header? I'm planning on contributing the JSON-RPC code to Pylons once it is stable, and I'd like it to be

Re: Paste.fixture errors

2006-08-07 Thread ram
Upgraded to 0.9, and I still get this. Should I be posting this in the paste list? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to

0.9: Paster create problems

2006-08-04 Thread ram
And the 0.9 fun continues for me. I've customized my lib.base.py a bit for my JSON-RPC controller. It most likely needs to be updated for 0.9, since it imports pylons.m and other non 0.9 things. Most importantly, it needs to be updated because it seems to know nothing about the Respond() class.

Re: 0.9: Paster create problems

2006-08-04 Thread ram
Thanks much Ben, A better approach might be to update your project template directly to 0.9. If you run the paster create --template=pylons proj Where proj is the existing dir (make sure to have no / afterwards) Ah, that would be nice if paster create was working...see the OP

Paste.fixture errors

2006-08-03 Thread ram
recent call last): File /home/ram/Projects/SealedAir/sasda/trunk/sasda/tests/functional/test_sasjson.py, line 7, in test_registeredCounters headers={'content-type':'application/json-rpc'}) File /usr/local/lib/python2.4/site-packages/Paste-0.9.3-py2.4.egg/paste/fixture.py, line 230, in post

Re: Cooked POST params?

2006-07-13 Thread ram
Ben Bangert wrote: On Jul 12, 2006, at 3:29 PM, ram wrote: ...and while we're on the subject, any thought as to how interactive debugging might work with such a beast? In 0.9, and I believe in 0.8.2 if you're running the latest Paste, when an exception occurs, Paste will drop a bit

Re: Cooked POST params?

2006-07-13 Thread ram
Ben Bangert wrote: On Jul 13, 2006, at 6:09 AM, ram wrote: The debug line should pop up when any request triggers an exception, even a JSON-RPC one. While the original HTML output would have been seen by the client-side JSON parser, it isn't consumed. You can still plug in the URL given

Cooked POST params?

2006-07-12 Thread ram
Just starting off with Pylons, and I have a few basic questions (all on 0.8.2) a) With the standard Controller base, the keyword argument passed to a controller method == the global params, correct? b) With an HTTP GET, params is a dictionary of GET parameters, all strings (or for dup parameter

Re: Cooked POST params?

2006-07-12 Thread ram
Ah OK, thanks. Actually, I'm not using forms, I'm using dojo on the client side, and trying to put together a JSON-RPC scheme. Dojo is sending an HTTP POST using the browser's XmlHttp object. I was using a regular Controller to experiment with how Pylons would see the request. In the

Globals()

2006-07-12 Thread ram
Sorry for so many newbie messages. Is there any way to trace execution of a Pylons app? I've recently moved development to a different side-by-side copy of Python on the same machine, and suddenly the controllers see g objects that don't have any of the attributes I've assigned in

Twisted -- Pylons?

2006-05-18 Thread ram
We've got a commercial project we're developing that currently uses Twisted + SQLAlchemy that we're thinking of moving to Pylons + SQLAlchemy. The UI of the program is very AJAX-heavy, and consists of many small requests that each hit the database, then return JSON formatted data to the