[02:58:55] ** hazmat has joined us [04:02:27] [connected at Mon Apr 11 04:02:27 2005] [04:02:27] <> *** Looking up your hostname... [04:02:27] <> *** Checking ident [04:02:29] <> *** Found your hostname [04:02:58] <> *** No identd (auth) response [04:02:58] <> *** Your host is brown.freenode.net[h216-165-191-52.216-165.unk.tds.net/6667], running version dancer-ircd-1.0.35 [04:02:58] [I have joined #peak] [04:02:58] ** brown.freenode.net set the topic to http://dirtsimple.org/2004/11/generic-functions-have-landed.html [04:59:12] ** apoirier has joined us [05:09:26] ** vlado has joined us [06:07:05] ** hazmat has left IRC (Read error: 145 (Connection timed out)) [08:16:15] ** vlado has left IRC (Connection reset by peer) [08:16:23] ** vlado_ has joined us [09:00:30] ** [apoirier] has joined us [09:01:42] ** apoirier has left IRC (Read error: 110 (Connection timed out)) [11:31:13] ** Maniac has joined us [11:35:07] ** Maniac has left IRC (Client Quit) [11:43:03] ** hazmat has joined us [11:53:09] ** [apoirier] has left IRC ("Using KVIrc 3.0.1") [12:22:22] ** hazmat has left IRC (Read error: 110 (Connection timed out)) [12:42:59] vlado_ is now known as vlado|away [13:00:52] ** hazmat has joined us [13:04:26] ** sprout has joined us [13:35:51] Is anyone around? [13:45:50] I'd like information on how to run WSGI application under peak... I know the command is "peak serve WSGI import:x.y" but .. what the heck is x.y? Can someone show me examples or docs? [14:06:29] ** pje has joined us [14:06:50] queuetue, the x.y is the fully qualified name of the callable representing your WSGI application [14:07:07] So if the application object is 'foo' in module 'bar', then it's import:bar.foo [14:08:00] pje, Meaning ... a python file? Can you show me an example of one that will work, bcause I made that assumption, and I recall some errors implying I was wrong. :) (will endeavor to reproduce now, while you are present.) [14:09:01] Sure, try import:peak.tools.local_server.demo_service [14:09:27] Note, it's not a "python file", you need to import an application object from a module. [14:09:54] In this case, the 'demo_service' function from the peak.tools.local_server module [14:10:51] Also, if you use 'peak launch' rather than 'peak serve' it should launch your web browser pointing to the application. [14:11:31] Btw, the mail server for the PEAK list is down at the moment, so if you need to ask questions, please cc: me direct until the problem is resolved. [14:11:38] pje, can it be any module on the pythonpath, or does peak use it's own path? (essentially, can I sue a local module named web, with an index.py inside of it, with an index class defined in it? import:web.index.index isn't working.) [14:12:00] ** pje set the topic to PEAK mailing list is temporarily down; please cc: questions to PJE directly [14:12:21] Yes, it's the regular PYTHONPATH environment variable [14:13:37] Note that if you need to include the current directory on PYTHONPATH you'll need to do so explicitly. [14:14:04] Ah, for some reason I though that was automatic... [14:14:10] Python adds the directory of the start script to the path, but in this case that script is 'peak'. [14:14:20] Right, thanks for that. [14:15:33] Is it working now? [14:16:36] "PYTHONPATH=/me/sandbox/stuff/v4 peak launch WSGI import:web.index.index" isn't working, but I assume I'm messing up the PYTHONPATH somehow. [14:17:47] WHat is it doing instead of working? (The #2 debugging question of all time... ;) [14:18:39] launch does seem to open it's own browser, but does not appear to actually open any usr besides my start page. (instead of working, it reports "WSGI: Name not found: import:web.index.index") [14:18:48] s/usr/url/ [14:19:31] okay, try PYTHONPATH=... python -c "from web.index import index" [14:19:37] And see if you get an error [14:19:38] usingf bnetstat to get the proer port, peak does appear to be serving, when using the demo you gave earlier. [14:20:55] Wow, that was a lot of mistyping. :) Did you get my meaning? [14:21:11] Yes; but what did the -c test do? [14:21:27] The debugging results in an error - "ImportError: No module named WebKit.Page" [14:21:36] Well, there you go. [14:21:52] But this is just another path issue... Would this prevent peak from finding the module in the first place? [14:21:55] If Python can't import it, PEAK surely can't. [14:22:17] PEAK is just using Python's __import__; it doesn't do anything special. [14:23:09] If it results in an ImportError, PEAK considers the name unresolved. Unfortunately Python doesn't distinguish between levels of import error cascading. [14:23:40] So there's no robust way in Python to tell the difference between the web.index module not being found and WebKit.Page not being found. [14:23:50] It's all just ImportError as far as PEAK can tell. [14:24:49] So, once you've fixed up PYTHONPATH to include all the stuff you need, and the -c test works, then you should be ready to go. [14:25:48] pje, Can you show me an example wsgi script that does work, to model this on? (shoudl I root around and find demo_service) [14:26:03] Yes; it's in peak.tools.local_server [14:26:26] My ultimate goal is to get nevow and webware services both running simultaneously under peak. (This is the point behinf wsgi, no?) [14:26:29] Or you can use the demo app from PEP 333. [14:27:04] Yes, but you'll need stuff like WSGIKit's path dispatcher to be able to put them into a single app. [14:38:44] Something makes me think ian either a) hasn't tested in this configuration, or b) did this in a very different way than I am. :) [15:40:24] ** pje_ has joined us [16:07:25] ** pje has left IRC (Read error: 110 (Connection timed out)) [16:09:55] pje_ is now known as pje [16:21:18] ** debugger has joined us [18:33:24] ** hazmat has left IRC (Read error: 104 (Connection reset by peer)) [18:33:48] ** hazmat has joined us [21:01:50] ** debugger has left IRC () [21:11:15] ** pje has left IRC ("Leaving") [21:24:30] ** hazmat has left IRC (Read error: 110 (Connection timed out)) [21:38:25] ** hazmat has joined us [21:55:04] ** sprout has left IRC ("Snak 4.13 IRC For Mac - http://www.snak.com") [22:03:36] ** hazmat has left IRC (Read error: 60 (Operation timed out)) [22:05:24] ** hazmat has joined us [22:27:06] ** hazmat has left IRC (Read error: 110 (Connection timed out))