[web2py:12663] Re: caching of bytecode on GAE

2008-11-29 Thread mdipierro
Not sure any more some of my other tests now take longer than before. I need independent tests and verification. Massimo On Nov 30, 1:15 am, mdipierro <[EMAIL PROTECTED]> wrote: > Done! GAE caching of bytecode compiled code is in trunk and works. > > It makes my test code 3-4 times faster (f

[web2py:12662] Re: ... and you can run *some* SQLALchemy models in web2py

2008-11-29 Thread mdipierro
Hi Vince, You can use sqlalchemy right now (just easy_install and import sqlalchemy). The problem is that you will miss a lot of web2py features. We have no plan to port those feature to sqlalchemy. Moreover we do no like to use third party packages in web2py because of our backward compatibil

[web2py:12661] Re: ... and you can run *some* SQLALchemy models in web2py

2008-11-29 Thread vince
i am a SQLAlchemy user and i think most of us are using its object- relational mapping instead. i've been using pylons but tried of its lack of document and really enjoy the idea of "all in one package" in web2py. will web2py give us an option to use SQLAlchemy instead of its own DAL? -vinc On 1

[web2py:12660] Re: ... and you can run *some* SQLALchemy models in web2py

2008-11-29 Thread vince
i am a sqlalchemy user and i think most of us are using object mapping instead. i've been using pylons but really tried of the lack of document, and i really enjoy the all in one package advantage in web2py. will web2py give us an option to use sqlalchemy instead of web2py's DAL soon? -vinc On

[web2py:12659] Re: caching of bytecode on GAE

2008-11-29 Thread mdipierro
Done! GAE caching of bytecode compiled code is in trunk and works. It makes my test code 3-4 times faster (from 960ms to 270ms). Open question: does GAE clear memcache when I re-upload web2py? It seems so. Please test it. This is still to be considered experimental and there is still room for f

[web2py:12658] Re: caching of bytecode on GAE

2008-11-29 Thread mdipierro
hold on! While it is a good idea to write cache ram on top of gae memcache. I thought of a better way to solve the above problem. Massimo On Nov 29, 11:45 pm, mdipierro <[EMAIL PROTECTED]> wrote: > Hi Robin, > > following your suggestion look into the latest gluon/restricted.py in > trunk. On th

[web2py:12657] caching of bytecode on GAE

2008-11-29 Thread mdipierro
Hi Robin, following your suggestion look into the latest gluon/restricted.py in trunk. On the top you will find ### FIX THIS CACHE_TIME=0 import cache cache_pyc=cache.CacheInRam() ### if CACHE_TIME is set to a large number say 3600 (one hour) all byte code compiled code is cached in RAM using c

[web2py:12656] Re: non-ascii chars URL

2008-11-29 Thread mdipierro
I think this thread has changed subject. Jonathan, I have no objection to your patch (use unicode_to_latin internally). If you send it to me I will include it. Massimo On Nov 29, 10:15 pm, Jonathan Benn <[EMAIL PROTECTED]> wrote: > Hi Achipa, > > On Nov 29, 9:20 pm, achipa <[EMAIL PROTECTED]> wr

[web2py:12655] Re: web2py book in PDF at $12.50

2008-11-29 Thread mdipierro
I did not put any limitation on it and I believe lulu did not either. Please do not redistribute it or post it else I may run into trouble with the editor. Massimo On Nov 29, 10:13 pm, mark <[EMAIL PROTECTED]> wrote: > It's great that there is a PDF version available now. > > Is the PDF limited

[web2py:12654] Re: non-ascii chars URL

2008-11-29 Thread Jonathan Benn
Hi Achipa, On Nov 29, 9:20 pm, achipa <[EMAIL PROTECTED]> wrote: > Storing and validating URI's should be pretty straightforward with the > RFC's, the trouble comes when you have to decide how do you the URI to > *appear* to the user/developer. Obviously looking at a bunch of %XY-s > or xn--es i

[web2py:12653] Re: web2py book in PDF at $12.50

2008-11-29 Thread mark
It's great that there is a PDF version available now. Is the PDF limited in any way like the VitalSource version is? I have really don't like the VitalSource software and want to ditch it completely. For me, it is a frustrating piece of software, so even if the PDF is limited in the same ways (

[web2py:12652] Re: 404 Error Page

2008-11-29 Thread kev
Thx! On Nov 29, 8:55 pm, mdipierro <[EMAIL PROTECTED]> wrote: > look into routes.example.py > > in short. create a file called web2py/routes.py that contains: > > routes_in=[] > routes_out=[] > routes_onerror = [('*/404', '/yourapp/static/404.html')] > > Massimo > > On Nov 29, 6:53 pm, kev <[EMAI

[web2py:12651] Re: web2py on Amazon Cloud (E2, S3)

2008-11-29 Thread mdipierro
I have not used EC2 but hopefully somebody can provide more insight. About exec on GAE. As soon as possible I will add caching of pyc files and the problem will be gone. Robin suggested this. In any case complex apps should have more logic in modules than controllers and modules are imported thu

[web2py:12650] Re: smart(er) helpers ?

2008-11-29 Thread mdipierro
on a second thought. This would break backward compatibility because quoting twice it no longer the equivalent to the original URL. Massimo On Nov 29, 7:13 pm, achipa <[EMAIL PROTECTED]> wrote: > 1) not sure abot GAE, but you can always make a poor man's > urllib.quote with some ord() magic. >

[web2py:12649] web2py on Amazon Cloud (E2, S3)

2008-11-29 Thread 43gm
Are there some good examples of web2py running on Amazon's cloud? Are there any practical tutorials in this matter? ___ Re: Downside / Critique of web2py @ http://bit.ly/web2py-critique That thread prompts me to think that the Amazon cloud deserves more of our attention (relative to GAE Google

[web2py:12648] Re: 404 Error Page

2008-11-29 Thread mdipierro
look into routes.example.py in short. create a file called web2py/routes.py that contains: routes_in=[] routes_out=[] routes_onerror = [('*/404', '/yourapp/static/404.html')] Massimo On Nov 29, 6:53 pm, kev <[EMAIL PROTECTED]> wrote: > Hello, > I am a bit confused on how to route page to 404

[web2py:12647] Re: smart(er) helpers ?

2008-11-29 Thread achipa
1) not sure abot GAE, but you can always make a poor man's urllib.quote with some ord() magic. 2) IIRC per RFC the encoded characters are equivalent with their non- encoded counterparts (as long as they contain legal URI characters), so some#thing is equal to some%27thing (and both IE and FFox wi

[web2py:12646] Re: web2py book in PDF at $12.50

2008-11-29 Thread achipa
... just to avoid confusion, I know it's present on the first page, but it's easy to miss especially if you start to consider buying a book after going through some pages or landing on a page other than the main one. On Nov 30, 1:57 am, achipa <[EMAIL PROTECTED]> wrote: > http://mdp.cti.depaul.ed

[web2py:12645] Re: web2py book in PDF at $12.50

2008-11-29 Thread achipa
http://mdp.cti.depaul.edu/ , resources column on the right, lists the cookbook and the amazon paperback, but not the lulu ebook. On Nov 30, 1:38 am, mdipierro <[EMAIL PROTECTED]> wrote: > Which one is the resource section? > > Massimo > > On Nov 29, 5:19 pm, achipa <[EMAIL PROTECTED]> wrote: > >

[web2py:12644] 404 Error Page

2008-11-29 Thread kev
Hello, I am a bit confused on how to route page to 404 error page instead of displaying "invalid constructor" or "invalid function". How would you route all page not found to 404.html? Thanks, Kevin --~--~-~--~~~---~--~~ You received this message because you are s

[web2py:12643] Re: smart(er) helpers ?

2008-11-29 Thread mdipierro
actually reading your email again I guess you are saying that for _src and _href we should use urllib.quote instead of cgi.escape. something like if self.attributes.has_key('_src'): self.attributes['_src'] =urllib.quote(self.attributes['_src']) problems: 1) GAE does not have urllib. Is ther

[web2py:12642] Re: web2py book in PDF at $12.50

2008-11-29 Thread mdipierro
Which one is the resource section? Massimo On Nov 29, 5:19 pm, achipa <[EMAIL PROTECTED]> wrote: > Actually that would be pretty cool as it would give us a good chance > that martian sites would soon be convert to web2py :) To stay on > topic, you could add the Lulu link to the resources section

[web2py:12641] Re: smart(er) helpers ?

2008-11-29 Thread mdipierro
anctually helpers already automatically cgi.escape all tag attributes. Massimo On Nov 29, 5:15 pm, achipa <[EMAIL PROTECTED]> wrote: > Inspired by the URL talk in the other thread, I'm wordering if would > make sense to make helpers a bit smarter to make conversions and some > defaults easier (

[web2py:12640] Re: web2py book in PDF at $12.50

2008-11-29 Thread achipa
Actually that would be pretty cool as it would give us a good chance that martian sites would soon be convert to web2py :) To stay on topic, you could add the Lulu link to the resources section so people have something to chew on while you return from Mars... err, relatives :) On Nov 29, 11:22 pm

[web2py:12639] smart(er) helpers ?

2008-11-29 Thread achipa
Inspired by the URL talk in the other thread, I'm wordering if would make sense to make helpers a bit smarter to make conversions and some defaults easier (not to mention standards compliance enforcing !). The URL() helper is actually already moving in this direction as it transparently urlencodes

[web2py:12638] Re: web2py book in PDF at $12.50

2008-11-29 Thread mdipierro
As much as I would like to be abducted by martians it is more likely I will be abducted by my relatives over Christmas. Anyway, web2py is GPLv2 and as you can see in the thank you page, a lot of people have contributed heavily to it. I can think of at least 30 people who proved to be very skilled

[web2py:12636] Re: web2py and Internet Information Server?

2008-11-29 Thread Jon
Hi, I am a new web2py developer. I am coming from Windows technologies. Eventually I would like to run Ubuntu for my host but for now I have to keep using a Windows server. Can I request a tutorial video for how to get web2py to run on IIS 6? I've tried the pyISAPIe and WSGI installation(s) from a

[web2py:12635] IIS 6 hosting of a web2py application

2008-11-29 Thread Jon
I am wondering if anybody is willing to make a tutorial video or article about getting IIS 6 working with web2py? I will make one if I figure it out first, but any more experienced people out there who could help with this would be much appreciated. --~--~-~--~~~---~-

[web2py:12637] Re: web2py book in PDF at $12.50

2008-11-29 Thread MrAngelCruz
I just bought it as well. I am new to python and of course very new to web2py (I have already gone through the examples however, and everything worked flawlessly). Is web2py open source? I already am very inspired by Massimo's generosity, but if Massimo were to be abducted by Martians to have we

[web2py:12634] Re: trying to get multiple db

2008-11-29 Thread mmstud
No problems, typo of mine. What do you suggest, if i want to get all database connection objects listed. Would it be a good solution to collect them to dictionary like: POOL = {'web2py_test': db, 'web2py_test2': db2,...} and using that dictionary on controllers? -Marko On Nov 29, 9:55 pm, mms

[web2py:12633] trying to get multiple db

2008-11-29 Thread mmstud
Im trying to get this working: db=SQLDB('mysql://[EMAIL PROTECTED]/web2py_test') db2=SQLDB('mysql://[EMAIL PROTECTED]/web2py_test2') then i defined tables db... and db2... but found, that all tables were created under one database, the first one (web2py_test). So how this should work? Thanks, -

[web2py:12632] Re: non-ascii chars URL

2008-11-29 Thread achipa
Storing and validating URI's should be pretty straightforward with the RFC's, the trouble comes when you have to decide how do you the URI to *appear* to the user/developer. Obviously looking at a bunch of %XY-s or xn--es is not a pretty sight, and in case the language uses a non- latin alphabet,

[web2py:12631] Re: Calling Oracle stored procedures

2008-11-29 Thread Telman Yusupov
Thank you very much, Massimo! It worked with this syntax: db._cursor.execute("begin my_proc_name('arg1', 'arg2'); end;") - it did require a trailing semicolon. Thanks again, Telman On Nov 29, 3:16 am, mdipierro <[EMAIL PROTECTED]> wrote: > You can use > >    db._connection # the raw cx_oracle

[web2py:12630] Re: Search by date bug?

2008-11-29 Thread mdipierro
actually a_date should be datetime.date(2007,1,1). it will also accept the ISO string. On Nov 29, 7:59 am, SergeyPo <[EMAIL PROTECTED]> wrote: > Hi guys! > > My code: > db(db.data_storage.ca_date==a_date).select(limitby=(limit, offset)) > > If I use a_date='2007-01-01' I get a result set (that I

[web2py:12629] Re: web2py slashdotted

2008-11-29 Thread mdipierro
I think it is an interesting idea. Need to study it carefully next week. Massimo On Nov 29, 6:40 am, Baron <[EMAIL PROTECTED]> wrote: > ...almost... > > This slashdot page (http://developers.slashdot.org/developers/ > 08/11/28/1335248.shtml) discusses an article (http://advogato.org/ > article/9

[web2py:12628] Re: non-ascii chars URL

2008-11-29 Thread Jonathan Benn
Here's a quote from section 1.5 of RFC 2396: "The URI syntax was designed with global transcribability as one of its main concerns. A URI is a sequence of characters from a very limited set, i.e. the letters of the basic Latin alphabet, digits, and a few special characters." Here are the releva

[web2py:12627] Re: one to many relations

2008-11-29 Thread pmate
yes Denesi, that's the point. Usually indexes in a table can be more than one. And they are useful for the speed of queries and for foreign relationship, i think --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py

[web2py:12626] Search by date bug?

2008-11-29 Thread SergeyPo
Hi guys! My code: db(db.data_storage.ca_date==a_date).select(limitby=(limit, offset)) If I use a_date='2007-01-01' I get a result set (that I actually have in database) but if a_date='2007-1-1'or a_date='2007-01-1'or etc. - it can not find the records dated 1st January 2007. --~--~-

[web2py:12625] web2py slashdotted

2008-11-29 Thread Baron
...almost... This slashdot page (http://developers.slashdot.org/developers/ 08/11/28/1335248.shtml) discusses an article (http://advogato.org/ article/993.html) about integrating Pyjamas (Python GWT) with web2py. Is that a sensible idea? My understanding of GWT is that it is a complete client/ser

[web2py:12624] Is there a best way to do doctest for models?

2008-11-29 Thread Iceberg
Hi everyone, Is there a best way to do doctest for models? Currently "web2py.py -T app" only runs doctests in controllers, but not doctests in model. You might say that generally a model should not contain logic at all. I understand that but sometimes you just feel convenient to define several wr

[web2py:12623] Re: Calling Oracle stored procedures

2008-11-29 Thread mdipierro
You can use db._connection # the raw cx_oracle connection or db._cursor # the raw cx_oracle cursor as in db._cursor.execute("your raw sql") Mind that I believe cx_oracle does not like the terminating ";". You need to try with and without that. Massimo On Nov 29, 1:48 am, Telman Y

[web2py:12622] Calling Oracle stored procedures

2008-11-29 Thread Telman Yusupov
Hi everyone, I'm developing a web2py application on top of a legacy Oracle database and need to call some existing stored procedures that mplement some complex transactional computations that would be impractical to perform in application layer. I have cx-oracle driver installed and properly wor