simpleweb-py-users Mailing List for SimpleWeb
Status: Beta
Brought to you by:
essiene
You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(12) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(15) |
Feb
(4) |
Mar
(4) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2008 |
Jan
|
Feb
|
Mar
(5) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
From: <cod...@go...> - 2008-10-08 14:19:14
|
Author: essiene Date: Wed Oct 8 07:16:23 2008 New Revision: 17 Modified: trunk/src/simpleweb/webserver.py Log: indentation Modified: trunk/src/simpleweb/webserver.py ============================================================================== --- trunk/src/simpleweb/webserver.py (original) +++ trunk/src/simpleweb/webserver.py Wed Oct 8 07:16:23 2008 @@ -1,36 +1,39 @@ -import os, pwd, grp +import os from wsgiref.simple_server import make_server import simpleweb.utils def wsgiserve(wsgiapp, host='127.0.0.1', port=8080, reload=True, user='nobody', group='nobody', infomsg=None, warnmsg=None): - if reload: - reload_status = 'On' - else: - reload_status = 'Off' - - server = make_server(host, port, wsgiapp) - - if os.geteuid() == 0: #only do this if we're root - try: - gid = grp.getgrnam(group)[2] - uid = pwd.getpwnam(user)[3] - except KeyError: - simpleweb.utils.msg_err("Could not find the specified user/group on the system, ignoring and running as '%s'" %(pwd.getpwuid(os.geteuid())[0])) - pass - else: - if os.name == 'posix': - os.setgid(gid) - os.setuid(uid) - - simpleweb.utils.msg_info("simpleweb.webserver - v0.2") - simpleweb.utils.msg_info("Based on wsgiref.simple_server") + if reload: + reload_status = 'On' + else: + reload_status = 'Off' + + server = make_server(host, port, wsgiapp) + + if os.name == 'posix': + import pwd, grp + + if os.geteuid() == 0: #only do this if we're root + try: + gid = grp.getgrnam(group)[2] + uid = pwd.getpwnam(user)[3] + except KeyError: + simpleweb.utils.msg_err("Could not find the specified user/group on the system, ignoring and running as '%s'" %(pwd.getpwuid(os.geteuid())[0])) + pass + else: + if os.name == 'posix': + os.setgid(gid) + os.setuid(uid) + + simpleweb.utils.msg_info("simpleweb.webserver - v0.2") + simpleweb.utils.msg_info("Based on wsgiref.simple_server") - if infomsg: - simpleweb.utils.msg_info(infomsg) + if infomsg: + simpleweb.utils.msg_info(infomsg) - if warnmsg: - simpleweb.utils.msg_warn(warnmsg) + if warnmsg: + simpleweb.utils.msg_warn(warnmsg) - simpleweb.utils.msg_info("Now Serving on %s port %s [reloading = %s]..." % (host, port, reload_status)) - server.serve_forever() + simpleweb.utils.msg_info("Now Serving on %s port %s [reloading = %s]..." % (host, port, reload_status)) + server.serve_forever() |
From: Tim O. <tim...@ho...> - 2008-03-27 06:15:02
|
Hey guys, I'm following the tutorial, and when I get to: " Let's see what we've done so far by pointing to http://localhost:8080/task" When I do, the web page comes up: 404 Not Found The server has not found anything matching the Request-URI. The server CMD window has several error messages: ** Failed to import 'controllers.subtask' . 'subtask' not found in controllers' ** Failed to import 'controllers.import' . 'import' not found in controllers' ** Failed to import 'controllers.export' . 'export' not found in controllers' Any suggestions on what to look at? (Running Windows XP Professional, used ez-install setup, sqlite). --Thanks, Tim * * * * * * * * _________________________________________________________________ How well do you know your celebrity gossip? http://originals.msn.com/thebigdebate?ocid=T002MSN03N0707A |
From: Tim O. <tim...@ho...> - 2008-03-25 15:48:56
|
That did the trick. Thanks! BTW: It came as a std .py file, I just replaced the original webserver.py with the new one. --Tim * * * * * * * * _________________________________________________________________ Watch “Cause Effect,” a show about real people making a real difference. Learn more. http://im.live.com/Messenger/IM/MTV/?source=text_watchcause |
From: Essien I. E. <me...@es...> - 2008-03-25 07:51:59
|
Tim ODell wrote: > Hey, gang! (using WindowsXP Prof:) > > When I run the command: > simpleweb-admin > > it generates a related error with the last line being: > ImportError: No module named pwd arggh!!! This is my fault as I don't use windows. I was trying to ensure we don't run as the UNIX user root and the modules for doing that don't exist for win32. the attached. webserver.py fixes that problem. Use it to replace the one you have. You may need to unpack and pack the egg to get at it though. Not so sure (its a normal zip file). I'll push this up with some other small bug fixes later after work.. > > I think this precedes the error I previously posted, > "No module named mxDateTime" let me know if this problem still occurs after you replace your webserver.py. cheers, Essien > > --Thanks, Tim > > * * * * * * * * > > > ------------------------------------------------------------------------ > How well do you know your celebrity gossip? Talk celebrity smackdowns > here. <http://originals.msn.com/thebigdebate?ocid=T002MSN03N0707A> > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > > > ------------------------------------------------------------------------ > > _______________________________________________ > Simpleweb-py-users mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-py-users |
From: Tim O. <tim...@ho...> - 2008-03-25 00:58:46
|
Hey, gang! (using WindowsXP Prof:) When I run the command: simpleweb-admin it generates a related error with the last line being: ImportError: No module named pwd I think this precedes the error I previously posted, "No module named mxDateTime" --Thanks, Tim * * * * * * * * _________________________________________________________________ How well do you know your celebrity gossip? http://originals.msn.com/thebigdebate?ocid=T002MSN03N0707A |
From: Tim O. <tim...@ho...> - 2008-03-24 23:04:13
|
Hey, gang! Using simple web, get an error message returned when running some commands: *** You don't have the (right) mxDateTime binaries installed ! Any suggestions? --THanks, TIm * * * * * * * * _________________________________________________________________ Windows Live Hotmail is giving away Zunes. http://www.windowslive-hotmail.com/ZuneADay/?locale=en-US&ocid=TXT_TAGLM_Mobile_Zune_V3 |
From: <cod...@go...> - 2007-03-02 14:22:51
|
Author: essiene Date: Fri Mar 2 06:22:19 2007 New Revision: 16 Added: trunk/src/simpleweb/admin/plugins/templates/ trunk/src/simpleweb/admin/plugins/templates/__init__.py trunk/src/simpleweb/admin/plugins/templates/css.py trunk/src/simpleweb/admin/plugins/templates/html.py trunk/src/simpleweb/admin/plugins/templates/js.py trunk/src/simpleweb/admin/plugins/templates/movable.py trunk/src/simpleweb/admin/plugins/templates/python.py Removed: trunk/src/simpleweb/admin/plugins/templates.py Modified: trunk/src/simpleweb/TODO trunk/src/simpleweb/admin/plugins/create_movable.py trunk/src/simpleweb/admin/plugins/create_project.py trunk/src/simpleweb/extlib/selector.py trunk/src/simpleweb/utils.py Log: * Added ajax.js and ajaxRails.js helper library from FORKjs (http://forkjavascript.org) - Yay!!! I've not added the whole kitchen sink from FORKjs, and even then, I'm adding the jsmin'd version, which is only 8.0kb. Neato * Refactored admin/plugins/templates.py into admin/plugins/templates/{python,css,html,movable}.py, making it easier to add more templates, etc. update create_project.py and create_movable.py to use the new templates. * Corrected templates for new projects to reflect plugin command api chages for createtables -> create-tables. * create-movable plugin prompts for packages and modules changed [P|M] -> [package|module] extlib/selector.py * We're no more going to add prototype. Ran into a couple of issues using it on various browsers. Make this hook a bit more generic. |
From: Essien I. E. <me...@es...> - 2007-03-02 11:02:35
|
Essien Ita Essien wrote: > Jack wrote: >> Hello simpleweb-py-users, >> >> I'd like to try out simpleweb. I installed wsgiref and simpleweb >> but I haven't figured out where/how to run this: >> >> simpleweb-admin createproject todolist >> >> What am I missing? >> > > Hi Jack, > > Are you on Windows or on a UNIX based system? > > If you're on UNIX/Linux, the command simpleweb-admin should be installed > into your PATH, and just running it from anywhere will work. On Windows, > it will be installed to your PYTHONPREFIX/Scripts/ folder, so you can > either add that to your Windows Path or you change directory there > before you start running stuff. > > Cheers, > Essien I missed this the first time around, you're calling 'createproject' it has been changed to 'create-project' and similar since version 0.7.3. I've just updated the example tutorial to reflect this. My bad... :( Cheers, Essien > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Simpleweb-py-users mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-py-users > |
From: Essien I. E. <me...@es...> - 2007-03-02 10:46:16
|
Jack wrote: > Hello simpleweb-py-users, > > I'd like to try out simpleweb. I installed wsgiref and simpleweb > but I haven't figured out where/how to run this: > > simpleweb-admin createproject todolist > > What am I missing? > Hi Jack, Are you on Windows or on a UNIX based system? If you're on UNIX/Linux, the command simpleweb-admin should be installed into your PATH, and just running it from anywhere will work. On Windows, it will be installed to your PYTHONPREFIX/Scripts/ folder, so you can either add that to your Windows Path or you change directory there before you start running stuff. Cheers, Essien |
From: Jack <jl...@gm...> - 2007-03-02 07:16:00
|
Hello simpleweb-py-users, I'd like to try out simpleweb. I installed wsgiref and simpleweb but I haven't figured out where/how to run this: simpleweb-admin createproject todolist What am I missing? -- Best regards, Jack |
From: <cod...@go...> - 2007-02-07 16:50:31
|
Author: essiene Date: Wed Feb 7 08:49:56 2007 New Revision: 15 Modified: trunk/src/simpleweb/admin/plugins/create_movable.py trunk/src/simpleweb/app.py Log: admin/plugins/create-movable * impure modules dictionary list, now contains 'P' and 'M' to differentiate modules and packages as values. * modules in impure dict now use actual filename as key to further differentiate modules and packages * skip list printing shows difference b/w modules and packages. * Always 'cleanup' before doing a new 'deploy' * Now delete simpleweb-admin.py on cleanup app.py * change flup sessions storeDir to ./.flup.sessions |
From: <cod...@go...> - 2007-02-07 16:24:45
|
Author: essiene Date: Wed Feb 7 08:24:20 2007 New Revision: 14 Modified: trunk/src/simpleweb/BUGS trunk/src/simpleweb/admin/plugins/create_movable.py trunk/src/simpleweb/admin/plugins/templates.py Log: admin/plugins/create-movable * Default action is now to pack ONLY simpleweb into a local site-packages. To pack other platform independent modules, call with -a * If there are platform independent modules in use... issue message to stdout on that incidentally... Cheetah (our default templating engine is not platform independent :( ) * Create a local simpleweb-admin. To run it do: cd /path/to/deployed-project python simpleweb-admin [the usual options go here] |
From: <cod...@go...> - 2007-02-05 17:59:49
|
Author: essiene Date: Mon Feb 5 09:57:13 2007 New Revision: 13 Modified: trunk/src/simpleweb/plugins/auth.py Log: Forgot to pull this out |
From: <cod...@go...> - 2007-02-05 14:04:17
|
Author: essiene Date: Mon Feb 5 06:03:52 2007 New Revision: 12 Modified: trunk/src/simpleweb/BUGS trunk/src/simpleweb/TODO trunk/src/simpleweb/admin/plugins/create_movable.py trunk/src/simpleweb/middleware.py trunk/src/simpleweb/plugins/auth.py Log: middleware.py/AuthMiddleware/__call__ * API BREAK!!! - Default session user created is None. This is the proper semantic, so now I can do:- <codeblock> if request.session.user: #stuff to happen when there's a user pass else: #stuff to happen when there's no user pass </codeblock> As opposed to the previous:- <codeblock> if request.session.user.username: #this is an unneccessary indirection #stuff to happen when there's a user pass else: #stuff to happen when there's no user pass </codeblock> plugins/auth.py * In require() decorator, now check also check if request.session.user is True, Before proceeding to other checks on auth priviledges admin/plugins/create_movable.py * Final fixes to make create_movable work properly. In this instance, we now copy WHOLE package trees just to make sure that incase some meta package does some meta importing meta-dynamically, we don't start looking for the meta-module it needs when we've already deployed. Also, at this point, after much testing, I realize platform-agnostic create-movable is a pipe-dream :( This is mainly because of C/C++ extentions. The extentions are not platform independent, so any code that uses them (most realworld python code), can't be platform-movable. My solution in the next minor commits, will be to avoid any modules/packages that have C/C++ extensions. Instead, listing them out on the command-prompt and asking the user to manually install those modules on the target platform. Prolly also, generate a message that when we're run, will spit out the same message. *TODOfu *BUGSfu |
From: <cod...@go...> - 2007-01-30 15:59:02
|
Author: essiene Date: Tue Jan 30 07:58:37 2007 New Revision: 11 Modified: trunk/src/simpleweb/TODO trunk/src/simpleweb/extlib/selector.py trunk/src/simpleweb/plugins/dblayer.py Log: plugins/dblayer.py * do_table_function() now catches AttributeError, and ignores it. This is because when we're trying to discover the method to call on the table objects, some valid types are pulled in, but are not the exact subclass we're looking for. Especially with SQLObject. extlib/selector.py * Add optional method dispatch by HTTP_X_PROTOTYPE_METHOD if available, else via REQUEST_METHOD, this is a custom header that i'm using in a patched version of prototype.js, to support PUT and DELETE tunneled thru POST. In preparation for integrating in prototype.js out of the box |
From: <cod...@go...> - 2007-01-23 09:15:44
|
Author: essiene Date: Tue Jan 23 01:15:22 2007 New Revision: 10 Modified: trunk/src/simpleweb/admin/plugins/create_movable.py trunk/src/simpleweb/admin/plugins/create_project.py trunk/src/simpleweb/admin/plugins/templates.py Log: admin/plugins/create_movable * No more using sitecustomize.py, causing some problem in dev environment, since the dev code will want to read from our local site-packages, which could change when we're running simpleweb-admin. * Creating a custom main.py that does the sys.path hack for create_movable to work. * cleanup_site() no more deals with sitecustomize.py, its all gone now. * With these last set of fixes, we've shaken out the remaining logic bugs to create_movable What is now left is to change the implementation of copy_modules(), to copy the toplevel package directories, or eggs, instead of picking up individual files in the package. This (though baroque in approach) will solve the problem of detecting *most* modules that are not loaded till much latter in the application. The perfect solution though, will be to parse every single file in the application, extract their import statements and actually perform them, before going ahead to do the normal copy_modules() logic... hmmm what to do... what to do. meh... i'm going off to watch Desperate Housewives now :P admin/plugins/create_project * create_file() now take **kw also, which is passed to the template subsitution |
From: Essien I. E. <me...@es...> - 2007-01-21 15:04:04
|
Mfoniso Ossom wrote: > I think it would be nice to have a "download" link on the simpleweb > site. I notice the "getstarted" page has the necessary information on > downloading simpleweb and it's dependencies. Having these as a brief > list on a download page would be useful though. Just a thought... thnks for the suggestion. I'll get to it as soon as time lets up... I'm currently focused on getting the create-movable plugin working perfectly, and then integrating an AJAX library. Ofcourse, once those are done, there are tutorials and howto's to write :) Still, there are a few features I still want to add to the site sooner than later: 1. A development info page 2. A status page Also, the site is not very info efficient... since i'm just tacking info onto it as I try not to forget what's floating around my head. I'll tack on a DownLoad Howto or something for now, till I can do a proper reorganization of that home page. thnx again. > > -- > There are 10 kinds of people in the world: > those who understand binary and those who don't! > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > > ------------------------------------------------------------------------ > > _______________________________________________ > Simpleweb-py-users mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-py-users |
From: Mfoniso O. <mf...@gm...> - 2007-01-21 14:32:09
|
I think it would be nice to have a "download" link on the simpleweb site. I notice the "getstarted" page has the necessary information on downloading simpleweb and it's dependencies. Having these as a brief list on a download page would be useful though. Just a thought... -- There are 10 kinds of people in the world: those who understand binary and those who don't! |
From: simpleweb-users <sim...@li...> - 2007-01-21 13:24:57
|
Err.. my apologies for that last entry. That was a mistake. On 1/21/07, simpleweb-users <sim...@li...> wrote: > > Author: essiene > Date: Sun Jan 21 04:55:37 2007 > New Revision: 9 > > Modified: > trunk/setup.py > > Log: > Up setup.py to version 0.7.4 > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share > your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Simpleweb-py-users mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-py-users > -- There are 10 kinds of people in the world: those who understand binary and those who don't! |
From: simpleweb-users <sim...@li...> - 2007-01-21 13:23:43
|
Hey, log into gmail. On 1/21/07, simpleweb-users <sim...@li...> wrote: > > Author: essiene > Date: Sun Jan 21 04:55:37 2007 > New Revision: 9 > > Modified: > trunk/setup.py > > Log: > Up setup.py to version 0.7.4 > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share > your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Simpleweb-py-users mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-py-users > -- There are 10 kinds of people in the world: those who understand binary and those who don't! |
From: simpleweb-users <sim...@li...> - 2007-01-21 12:56:12
|
Author: essiene Date: Sun Jan 21 04:55:37 2007 New Revision: 9 Modified: trunk/setup.py Log: Up setup.py to version 0.7.4 |
From: simpleweb-users <sim...@li...> - 2007-01-21 12:48:33
|
Author: essiene Date: Sun Jan 21 04:48:14 2007 New Revision: 8 Added: trunk/src/simpleweb/admin/plugins/_h.py Modified: trunk/src/simpleweb/BUGS trunk/src/simpleweb/TODO trunk/src/simpleweb/admin/console.py trunk/src/simpleweb/admin/plugins/create_movable.py trunk/src/simpleweb/admin/plugins/create_project.py trunk/src/simpleweb/admin/plugins/create_tables.py trunk/src/simpleweb/admin/plugins/drop_tables.py trunk/src/simpleweb/admin/plugins/help.py trunk/src/simpleweb/admin/plugins/init_db.py trunk/src/simpleweb/admin/plugins/run.py Log: simpleweb-admin * Start using proper option parsing semantics for simpleweb-admin plugins -l,--lib_dir and -c,--cleanup added to create-movable, add usage/help text(s) **INTERNAL API BREAK** * modify the api for the simpleweb-admin plugins. The function declarations now look like: func(name, args, parser) where parser is an optparse.OptionParser() instance. * Updated all inbuilt plugins to the new api * 'help' plugin now only used to show help for simpleweb-admin itself. No more 'simpleweb-admin help [command]' This is replaced by 'simpleweb-admin [command] -h' * Add new plugin '-h' or actually '_h.py' so we can do 'simpleweb-admin -h' to get the same result as 'simpleweb-admin help' :) create-movable plugin * Major refactoring on create-movable plugin again. The create_movable() function is a whole lot cleaner now. * Fix some subtle bugs that showed up after refactoring. Now we always write the lattest version of a module, even if we find it already existing. * There is no need to create a special main.py when using create-movable, the bug fixed in Release 7 properly manipulates sys.path in sitecustomize.py already. * Do not filter out any part of simpleweb, we need the whole package, else things break during testing for one, and may break at other odd times. |
From: simpleweb-users <sim...@li...> - 2007-01-19 16:48:08
|
Author: essiene Date: Fri Jan 19 08:47:38 2007 New Revision: 7 Added: trunk/src/simpleweb/admin/plugins/init_db.py Modified: trunk/src/simpleweb/BUGS trunk/src/simpleweb/TODO trunk/src/simpleweb/admin/plugins/__init__.py trunk/src/simpleweb/admin/plugins/create_movable.py trunk/src/simpleweb/admin/plugins/create_project.py trunk/src/simpleweb/admin/plugins/help.py trunk/src/simpleweb/admin/plugins/templates.py Log: * Add new simpleweb-admin plugin: init-db This plugin runs the models.py file as a program as opposed to importing it as a module Typically used to run code protected by "if __name__ == '__main__':". For instance, if you need to populate a db with some default values, this will be a good place to add them, and you run them with init-db * Fix bug that made help not work for commands like 'create-tables' but work for 'create_tables' * simpleweb-admin help : now shows aphabetical listing of available commands * create-movable now creates replaces main.py with a version that properly manipulates sys.path before calling simpleweb.run(). This should fix make the movable version actually work properly. * once more make create-movable to repackage simpleweb itself, so we can deploy without installing simpleweb * sitecustomize.py now prepends our own lib dir before everyother thing on sys.path * Fix another bug, where the lib dir in sitecustomize.py was hardcoded to the developer's fs path * create-movable plugin works better, and simpleweb doesn't need to be deployed on target machine, but there are still some bugs preventing it from working perfectly... see BUGS |
From: simpleweb-users <sim...@li...> - 2007-01-12 17:24:00
|
Hi Everybody, I'm please to annouce that I've just uploaded simpleweb-0.7.3 to cheeseshop. What Is simpleweb =================== simpleweb is simple python wsgi compliant web framework, inspired by Django, Turbo Gears and Web.py simpleweb is a result of working closely with web.py, TurboGears, Django, and a very hefty dose of opinionation(tm) :) Like TurboGears, it builds on existing python and wsgi components, to keep things simple, and just connects these components in a very easy transparent way. Like web.py its dispatching mechanism is matched strictly to HTTP methods. http://simpleweb.essienitaessien.com for details. Major Changes In This Version ============================= Plugin command readability and consistency and code fixups. ChangeLog: ========= http://simpleweb-py.googlecode.com/svn/tags/0.7.3/src/simpleweb/ChangeLog I'll really appreciate tests and feedback. I'm not rushing to add more features for now, but will spend time to make these more robust. Patches are welcome. Cheers, Essien |
From: simpleweb-users <sim...@li...> - 2007-01-12 14:09:21
|
Author: essiene Date: Fri Jan 12 06:08:55 2007 New Revision: 6 Added: tags/0.7.3/ - copied from r5, /trunk/ Log: Tagging svn/trunk r5 as svn/tags/0.7.3 |