[web2py:10652] pycon 2009

2008-10-26 Thread Massimo Di Pierro
Hello everybody, I just wanted to let you know that I have submitted a talk proposal about web2py for PyCon 2009. Let's hope to have more luck than last year (it was rejected). Notice that anybody can register, submit proposals and review other submitted proposals. Massimo --~--~

[web2py:10651] Re: Multiple Threading

2008-10-26 Thread mdipierro
SQLite locks the database. Only one thread can safely access it. On Oct 26, 10:50 pm, tommy <[EMAIL PROTECTED]> wrote: > Archipa, when you use the different thread to access same SQLITE > database, do you have any problem? It looks like SQLITE database can > be only accessed by one thread. How d

[web2py:10650] Re: Multiple Threading

2008-10-26 Thread tommy
Archipa, when you use the different thread to access same SQLITE database, do you have any problem? It looks like SQLITE database can be only accessed by one thread. How do you walk around it? To all, thanks for your replies, I think my design has some issue. Massimo's example code and Bill's sug

[web2py:10649] pending patches

2008-10-26 Thread mdipierro
I have about 3-4 patches in the queue. I apologize if I did not get back to you yet. It is simply because I am thinking about the implications and I did not have enough time to look into them in sufficient detail. I can promise a reply by Nov 15. Meanwhile I do not mind if you send me reminders.

[web2py:10648] Re: Multiple Threading

2008-10-26 Thread mdipierro
I am sorry. I have a work deadline in two weeks and there are a few patches from Bill that are complex and I need the time to study them in some detail. They are not lost. Anyway, feel free to send me periodic reminders using my personal email. Massimo On Oct 26, 4:31 pm, achipa <[EMAIL PROTECTE

[web2py:10647] Re: Best Python book?

2008-10-26 Thread noobpythoncoder
Bill, here's a Python/web2py resource list: http://groups.google.com/group/web2py/browse_thread/thread/6e6896e718716264/eacfb19e929c50df?lnk=gst&q=python+book#eacfb19e929c50df I hope that helps too! --~--~-~--~~~---~--~~ You received this message because you are

[web2py:10646] Re: web2py benchmarks

2008-10-26 Thread achipa
It's hard, if not impossible to do meaningful comparison of php and python _framework_ speed since the simpler the app (and hello world is as simple as it gets), the more the web server/interface tech will influence the result. So, even with web2py on it's own, you will see drastic differences dep

[web2py:10645] Re: Multiple Threading

2008-10-26 Thread achipa
Actually, I made a patch that allows execution of code in a parallel thread after the page has been served. It can be scheduled (e.g. cron), or just launched in a fire and forget fashion without affecting the main app and the user (e.g. session cleaning, a long(er) conversion task, etc). It runs o

[web2py:10644] Re: Multiple Threading

2008-10-26 Thread billf
Assuming an event causes the data in the "other" application to change wouldn't it be easier for the "other" application to post the changes to your web2py app when the event occurs? Having said that, I can envisage a case where there are hundreds or thousands of updates per couple of minutes an

[web2py:10643] Re: need help tracing an error

2008-10-26 Thread pedro
mmm... ok, I see. Thank you. On 26 Okt, 16:14, mdipierro <[EMAIL PROTECTED]> wrote: > You cannot store a any SQLxx object in the session. For example a user > object. The reason is that user has a method user.update_record which > requires a db connection and it is not serializable. > > On Oct 26

[web2py:10642] Re: Multiple Threading

2008-10-26 Thread Tito Garrido
Hi tommy, I don't know if it's a good ideia to put this verification (session.enginestarted=True) in a session var. Because the client can close the browser, open the link again and start another thread... I have here a small example where the client can start just one thread. *In a model:* db.d

[web2py:10641] Re: Multiple Threading

2008-10-26 Thread tommy
Massimo, Here is my code, I use GUI button to start my service (StartEngine, in the background, I want to retrieve the infomation from another application and save it in my database for every couple of munites. after I starting my start engine service, I can go to other screen. and the backgrou

[web2py:10640] Re: Multiple Threading

2008-10-26 Thread mdipierro
This app does that. You upload a video and it is converted in background (like at youtube) in a separate process (not a thread, a process although the process my have threads). The visitor can later check the conversion was completed. It includes documentation: http://mdp.cti.depaul.edu/appliance

[web2py:10639] Re: Multiple Threading

2008-10-26 Thread Jose de Oliveira Filho
Hi Bill, How about COMET ("reverse ajax") applications, like they use in chat clients such as meebo.com ? I guess those need background tasks by nature. Deodoro Filho Em 26/10/2008, às 16:55, billf escreveu: > > I started to write a post saying "ok - can't start a new thread - so > how ca

[web2py:10638] Re: Multiple Threading

2008-10-26 Thread Keith Edmunds
On Sun, 26 Oct 2008 11:55:08 -0700 (PDT), [EMAIL PROTECTED] said: > 1) what other background tasks do people envisage? A regular display update via Ajax (but that could probably be demanded by the client rather than pushed) > 2) how should you do it in web2py? Pass. -- Keith Edmunds --~--~-

[web2py:10637] Re: Multiple Threading

2008-10-26 Thread billf
I started to write a post saying "ok - can't start a new thread - so how can I run a background task?" and then I really struggled to find an example that couldn't be solved some other way. The only example I came up with was a major processing task, maybe some major calculation or db search/anal

[web2py:10636] Re: Migration suggestion

2008-10-26 Thread billf
Voltron I didn't think you came on strong at all, it's just there's a lot I don't know about :-) This is the best (responsive/friendly/useful) forum I have come across - but then I don't get out much :-) On Oct 26, 4:14 pm, voltron <[EMAIL PROTECTED]> wrote: > Hey Bilf, sorry if my suggestioin

[web2py:10635] Re: Multiple Threading

2008-10-26 Thread mdipierro
Not sure I understand the question. Let's say you create a "test" application with a simple "default.py" controller: def index(): return "hello world" This is already a multithreaded application. Every time an http request for "http://localhost:8000/test/default/index"; arrives, a new threa

[web2py:10634] Multiple Threading

2008-10-26 Thread tommy
I tried to run some tasks every certain minutes in the background for my WEB2PY application. I created another thread, but my web page screen was stuck there for ever. Can someone tell me how to write multthreaded GUI application in web2py? --~--~-~--~~~---~--~~ You

[web2py:10633] Re: Migration suggestion

2008-10-26 Thread voltron
Hey Bilf, sorry if my suggestioin came on , erm , "strong" that was not my intention. I really appreciate you taking the time to help me solve this problem. I just wanted to make emphasis on that particular point because I have mentioned problems with migration once, maybe twice before on the foru

[web2py:10632] Re: geocoding on GAE?

2008-10-26 Thread mdipierro
Thank you. That is not fix my problem but it fixes a bug anyway. Massimo On Oct 26, 6:51 am, notabene <[EMAIL PROTECTED]> wrote: > On 24 Okt., 05:19, mdipierro <[EMAIL PROTECTED]> wrote: > > > > > Why does this not work on gae? > > >     def urlopen(url): > >         try: > >             from go

[web2py:10631] Re: geocoding on GAE?

2008-10-26 Thread notabene
On 24 Okt., 05:19, mdipierro <[EMAIL PROTECTED]> wrote: > Why does this not work on gae? > >     def urlopen(url): >         try: >             from google.appengine.api.urlfetch import fetch >             if url.find('?')>=0: >                 url,payload=url.split('?') >                 return f

[web2py:10630] Re: need help tracing an error

2008-10-26 Thread mdipierro
You cannot store a any SQLxx object in the session. For example a user object. The reason is that user has a method user.update_record which requires a db connection and it is not serializable. On Oct 26, 7:20 am, pedro <[EMAIL PROTECTED]> wrote: > Hi there. > I am getting an error whose trace

[web2py:10629] Re: Migration suggestion

2008-10-26 Thread billf
Voltron I am not agreeing/disagreeing re migrate switch - you may well be right - I don't know. Re your procedure: my tests proved to me that running "upload application" when the application already exists DOES NOTHING. The models, controllers, etc are unchanged. Therefore to change the applic

[web2py:10628] Re: Migration suggestion

2008-10-26 Thread voltron
I still insist, unless convinced otherwise, that the migrate switch at the moment logically wrong if it takes a string for the table files, there should be a separate variable that controls the creation of .table files because one would not want to migrate a database( migrate = False) but just mo

[web2py:10627] Re: Migration suggestion

2008-10-26 Thread billf
Voltron You weren't absolutely specific, so just to clarify, when you say "upload" do you mean using the web2py admin "upload application" function? Let's assume for the time being that the answer is "yes" both on the initial upload and the "weeks after" scenario. As you say, on the initial upl

[web2py:10626] need help tracing an error

2008-10-26 Thread pedro
Hi there. I am getting an error whose trace has no reference to any point of my code... Here's the trace: Traceback (most recent call last): File "/home/p/Desktop/web2py/gluon/main.py", line 210, in wsgibase File "/home/p/Desktop/web2py/gluon/globals.py", line 203, in _try_store_on_disk Fi

[web2py:10625] Re: Migration suggestion

2008-10-26 Thread voltron
Hi Billf Thanks for taking time on this. The first upload of the appliance was done by uploading a packed(tarred) application from my loacl workstation to the BETA server, the beta server is the checked by the project managers and QA. When they gave the go ahead, the site was uploaded to its LIVE

[web2py:10624] Re: Migration suggestion

2008-10-26 Thread billf
Voltron I apologise but I am a bit confused by your last reply. So going back to basics a bit, in your original post you said: "I made changes to the local version of the site on my workstation and uploaded to my "BETA" server." How exactly did you do the upload? For example: Did you use "pac

[web2py:10623] Re: Migration suggestion

2008-10-26 Thread voltron
ok, it seems as if the steps are not clear to me then. I have .table files on the live appliance and some on the local identical appliance, why should I force the re-creation of .table files on the altered .table files? They are okay, I just want the database on the live server to be altered, wi

[web2py:10622] Re: Migration suggestion

2008-10-26 Thread mdipierro
What is wrong with the second solution? $ python web2py.py -S atest >>> db=SQLDB(None) >>> db['_dbname']='mysql' >>> db.define_table('person',SQLField('name'))._create(migrate='person.table') Massimo On Oct 26, 6:02 am, voltron <[EMAIL PROTECTED]> wrote: > Thanks Bill and Mass

[web2py:10621] Re: google checkout level 1 and 2 on google app engine

2008-10-26 Thread voltron
Hi Billf it seems you might need to use some client side validation code to make up for the missing usability problems. The Jquery validation plugin might help On 26 Okt., 10:53, mdipierro <[EMAIL PROTECTED]> wrote: > You are right but the form is generated by Google so there is nothing > I can

[web2py:10620] Re: Migration suggestion

2008-10-26 Thread voltron
Thanks Bill and Massimo for your tests and suggestions. From what has been posted: Problem: Updating and altering the database of a remote(live) appliance and its tables form an identical local appliance Solutions: 1. Upload and rename the local copy, delete the remote appliance, rename the u

[web2py:10619] Re: google checkout level 1 and 2 on google app engine

2008-10-26 Thread mdipierro
You are right but the form is generated by Google so there is nothing I can do about it. Massimo On Oct 25, 2:39 am, billf <[EMAIL PROTECTED]> wrote: > Massimo > > It all seems to work fine. My only comment is that the form doesn't > indicate which fields are required fields and the error messa

[web2py:10618] Re: Migration suggestion

2008-10-26 Thread mdipierro
Hi Voltron, > Would it not be better to have a varibare that notifies web2py to > generate the databse files or not and a separate one that toggles > migration? Let's consider the 4 cases Create/Migrate=TT, TF, FT, FF: TT: corresponds to migrate=True or migrate='filename' FF: corresponds to mi