Re: [web2py] Scaling Web2py

2012-09-02 Thread Ricardo Pedroso
On Sat, Sep 1, 2012 at 5:48 PM, Webtechie wrote: > > I would like to use web2py for a web application which has large databases > (really large) , expects high volume of traffic . Are there any ways to make > web2py apps run faster ? (like really faster ) , (looking for solutions > apart from pool

Re: [web2py] Memory leak in standalone DAL (issue #731), can you please help test?

2012-04-19 Thread Ricardo Pedroso
On Wed, Apr 18, 2012 at 11:41 PM, nick name wrote: > Issue reference: 731: Standalone DAL is leaking memory+resources (don't know > whether or not inside web2py) I post a comment on this issue: http://code.google.com/p/web2py/issues/detail?id=731#c4 I think this is not a bug but an incorrect u

Multilingual Web Addresses (Was: Re: [web2py] Re: process args)

2012-04-21 Thread Ricardo Pedroso
>> # my url is looking like that "25-еннщшо ор зьлыв" > I don't think you can have those characters in a URL. And URL's should not > have spaces. I think it's already possible to have those chars in urls, even in the domain part. Does anyone here use chars in urls, outside of the ascii set? Is i

Re: [web2py] Re: Time to move from Google Groups to a web2py or python??

2012-04-24 Thread Ricardo Pedroso
On Mon, Apr 23, 2012 at 2:41 PM, Gour wrote: > On Mon, 23 Apr 2012 08:07:13 +0200 > Tim Michelsen > wrote: > >> What is wrong with Google groups via Gmane? > > Probably nothing wrong except that we're growing old and youngsters > believe everything should be available via (web) forums. :-) I fee

Re: [web2py] Reading web2py tickets on app engine

2012-04-24 Thread Ricardo Pedroso
On Tue, Apr 24, 2012 at 12:57 AM, David Phillips wrote: > I don't know how to read the tickets web2py generates on app engine. On > devserver, the tickets are shown in their entirety, but on the production > server, the datastore viewer only shows the first 1000 or so characters. I > can't figure

[web2py] My home made ide

2012-05-03 Thread Ricardo Pedroso
Hi, Just to let you know that I uploaded to github my ugly home made web2py ide. It was a big hack to let me do web2py development on my own way. Basically is a thin "wrapper" around vim (my editor of choice). I only have linux so I don't know if it works on Mac/Windows (In theory it should work

Re: [web2py] My home made ide

2012-05-03 Thread Ricardo Pedroso
On Fri, May 4, 2012 at 2:41 AM, Bruno Rocha wrote: > Amazing! > > I cloned and I am using it now, the console tabs is a killer feature! I > loved having tracebacks and webserver logs here. > > Can you explain how the "eval shell" works? Wow, you were quick... You must be in debug mode. Then you

Re: [web2py] My home made ide - Screenshots

2012-05-03 Thread Ricardo Pedroso
As requested by Massimo, I've upload some screenshots: https://github.com/rpedroso/gweb2py/raw/master/screenshots/gweb2py00.png https://github.com/rpedroso/gweb2py/raw/master/screenshots/gweb2py01.png https://github.com/rpedroso/gweb2py/raw/master/screenshots/gweb2py02.png https://github.com/rpedr

Re: [web2py] localhost external machine.

2012-05-06 Thread Ricardo Pedroso
On Sun, May 6, 2012 at 9:49 AM, Mchurch wrote: > Good morning to everybody. > I've a web2py application on a windows machine, the public windows ip > machine is 192.168.100.191. > From my mobile cell (nor tablet..) i can't get localhost. > I tried many times with 0.0.0.0, 127.0.0.1, and even if wi

Re: [web2py] Re: My home made ide

2012-05-07 Thread Ricardo Pedroso
On Sun, May 6, 2012 at 9:50 PM, villas wrote: > Thanks for this and I was interested to try it. > > FYI  I got this error:  AttributeError: 'MainPanel' object has no attribute > 'terminal' > > Maybe it was the software I was using. Windows XP SP3, Python 2.7 and wx 2.8 Indeed, I only tested in Li

Re: [web2py] Why the web2py shell returns different results?

2012-05-09 Thread Ricardo Pedroso
On Wed, May 9, 2012 at 7:56 PM, sesenmaister wrote: > When I use web2py 1.99.7 shell  (web2py.exe -S welcome) : > unicode('Äpple','utf-8') > Traceback (most recent call last): >   File "", line 1, in > UnicodeDecodeError: 'utf8' codec can't decode byte 0x8e in position 0: > unexpected code b

Re: [web2py] Re: Reloading modules

2012-05-09 Thread Ricardo Pedroso
On Wed, May 9, 2012 at 8:35 PM, Alex Benfica wrote: > > I'm having a seriuos problem having to stop and start Google App Engine SDK > when I want edit modules, otherwise, they are not reloaded. > The problem is that, doing this, I lose the entire database content on GAE > SDK... You can persist t

Re: [web2py] web2py and service authentication - Please help I am almost there

2012-05-14 Thread Ricardo Pedroso
On Sat, May 12, 2012 at 2:00 PM, david.waldrop wrote: > This is my 2nd attempt at trying to dig in and understand web2py services > and authorization.  I saw posts about various ways (digest, basic auth, > https, etc) fro securing web services, but am not sure which one to use.  In > my case I am

[web2py] gweb2py

2012-05-23 Thread Ricardo Pedroso
Hi, I've made lot's of changes. Lot's of bug fixes and new features, mainly: reload webserver ability to create new application session files viewer cache file viewer error files viewer file/new and file/open better syntax highlight when using StyledTextCtrl On Linux there is possible to u

[web2py] Re: gweb2py

2012-05-23 Thread Ricardo Pedroso
The url, of course: https://github.com/rpedroso/gweb2py On Thu, May 24, 2012 at 1:11 AM, Ricardo Pedroso wrote: > Hi, > > I've made lot's of changes. Lot's of bug fixes and > new features, mainly: >  reload webserver >  ability to create new application >

Re: [web2py] Re: gweb2py

2012-05-24 Thread Ricardo Pedroso
On Thu, May 24, 2012 at 6:04 PM, Mariano Reingart wrote: > Hi Ricardo: > > Great work! > > What did you use for the debugger? I't's just a subclass of bdb.Bdb running in the webserver process and doing the communications with GUI through stdin, stdout, stderr. > The embedded webserver is stable

Re: [web2py] Re: gweb2py

2012-05-24 Thread Ricardo Pedroso
On Thu, May 24, 2012 at 10:43 PM, Ricardo Pedroso wrote: > On Thu, May 24, 2012 at 6:04 PM, Mariano Reingart wrote: >> Hi Ricardo: >> >> The embedded webserver is stable for development environments? > > Yes, I guess... I've developed a simple website (projectgre

Re: [web2py] MailCaptcha

2012-05-24 Thread Ricardo Pedroso
On Thu, May 24, 2012 at 11:00 PM, szimszon wrote: > MailCaptcha > === > > For e-mail address protection with recaptcha for postfix. I'm not understand how this works, but I feel that is an interesting idea. Can you specify a use case? Why and how is tied to postfix? > > If somebody se

Re: [web2py] Re: Why would this happen?

2012-06-02 Thread Ricardo Pedroso
On Sat, Jun 2, 2012 at 4:08 PM, Bruce Wade wrote: > Yeah that fixed that one problem > > I found IF there is a space in the file name it will not work, and if it > doesn't use ascii characters as LighDot said it wont work. Do you know which > part of web2py code handles this or if it is possible t

Re: [web2py] Re: Why would this happen?

2012-06-02 Thread Ricardo Pedroso
On Sun, Jun 3, 2012 at 2:04 AM, Jonathan Lundell wrote: > On Jun 2, 2012, at 5:55 PM, Ricardo Pedroso wrote: >> >> On Sat, Jun 2, 2012 at 4:08 PM, Bruce Wade wrote: >>> Yeah that fixed that one problem >>> >>> I found IF there is a space in the file na

Re: [web2py] Re: Block oversized uploads serverside

2013-02-19 Thread Ricardo Pedroso
On Tue, Feb 19, 2013 at 9:02 AM, Andriy wrote: > Right now I`m trying to host on my own windows server. On Rocket and > CherryPy I have problems with some pages not loading static images and > "hanging" in Opera (other users report problems with Chrome, but at the same > time I have no problems wi

Re: [web2py] Re: Raising HTTP errors as JSON?

2013-03-06 Thread Ricardo Pedroso
On Wed, Mar 6, 2013 at 9:43 AM, Alec Taylor wrote: > Oh, looks like it works on an endpoint level; not sure how to get rid > of the XML style comment though > > Output from curl: > >> GET /arbg/error HTTP/1.1 >> Host: localhost >> Accept: */* >> > > < HTTP/1.1 404 NOT FOUND > < Set-Cookie: sessi

Re: [web2py] How to include headers in gluon.http.HTTP exceptions?

2013-03-08 Thread Ricardo Pedroso
On Thu, Mar 7, 2013 at 2:47 AM, Alec Taylor wrote: > My attempt: > > msg = (403, json.dumps({"state": "", "error_message": None, "error": > "unauthorized_client"}), None, {'Content-Type': 'application/json'}) > If I recall correctly, you are missing a ** Should be: msg = (403, json.dumps({"state

Re: [web2py] Re: Problem with uploading large file web2py version 2.3.2

2013-03-09 Thread Ricardo Pedroso
On Sat, Mar 9, 2013 at 4:27 AM, Massimo Di Pierro wrote: > I cannot reproduce the problem. I was able to reproduce it with web2py Version 2.4.2-stable+timestamp.2013.03.09.00.16.49 I attach a small sample that demonstrate the issue. Just drop the attachment in controllers in an empty application

Re: [web2py] Re: Problem with uploading large file web2py version 2.3.2

2013-03-10 Thread Ricardo Pedroso
On Sun, Mar 10, 2013 at 2:21 PM, Massimo Di Pierro wrote: > This was indeed a problem with grid (not uploaded) as suggested by Roberto. > Can you please check it is fixed in trunk? I did the same test as before and now I don't see the memory and CPU spikes, so it's fixed. Massimo, who is Roberto

Re: [web2py] Re: select() - How to fetch specific fields?

2013-03-10 Thread Ricardo Pedroso
On Sun, Mar 10, 2013 at 9:48 PM, Kenan wrote: > Interesting question, I have a similar problem. Really, why can't we select > only one field with select() ? > > For example, If i have several field in table Detailtip2 and want to select > only top 10 amounts: > rows = db((db.Detailtip2.year==sessi

Re: [web2py] tips from a seasoned practitioner

2013-03-11 Thread Ricardo Pedroso
On Tue, Mar 12, 2013 at 1:00 AM, rh wrote: > I am using {{=response.toolbar()}} at the end of my views while I > work/test. I was also curious about the globals() dict and so I wrote > some code to print out globals(). I got carried away a little and > attempted to recurse that dict and learned th

Re: [web2py] tips from a seasoned practitioner

2013-03-12 Thread Ricardo Pedroso
browser (http://www.netsurf-browser.org/) - just for curiosity, not a requirement - and it doesn't have javascript, they are in their way to add it. Ricardo > Anthony > > On Monday, March 11, 2013 9:16:17 PM UTC-4, Ricardo Pedroso wrote: >> >> On Tue, Mar 12, 2013 at 1:00

Re: [web2py] Why does session get reset every time a page is loaded?

2013-03-13 Thread Ricardo Pedroso
On Wed, Mar 13, 2013 at 1:08 AM, Vixus wrote: > I have defined a Search class in models/search.py and I store this in > session: > > if session.search == None: > session.search = Search() > > But I was wondering why nothing that was being set in the class was being > carried throughout the sessi

Re: [web2py] Bunch/Batch/Bulk insert Re-use db.define_table field definition in SQLFORM.factory() ?

2013-03-13 Thread Ricardo Pedroso
On Wed, Mar 13, 2013 at 7:31 PM, Richard wrote: > Hello, > > I would like to build a bunch insert form and I wouldn't have to duplicate > fields definition for SQLFORM.factory > > I try naively > > > inputs = [] > for i in range(0,10): > inputs.append(db.table1.field1) > i

Re: [web2py] Re: Call a function at the end of every request

2013-03-14 Thread Ricardo Pedroso
If there is nothing in web2py to do it, maybe you can go with a middleware. http://web2py.com/book/default/chapter/04#External-middleware Ricardo On Thu, Mar 14, 2013 at 10:59 AM, Daniel Gonzalez wrote: > But this has two drawbacks: > > the decorator must be added to every controller function

Re: [web2py] DAL field change from integer to string

2013-03-14 Thread Ricardo Pedroso
On Thu, Mar 14, 2013 at 5:56 PM, António Ramos wrote: > hello > i have a table with 3 integer fields. > > I changed the type in db.py from integer to string > i´m using sqlite > My app is still working. Now i can enter text in those fields. > > However using sqlite explorer from firefox i see tha

Re: [web2py] Need to automatically update a SQLFORM grid if new records are inserted in table

2013-03-16 Thread Ricardo Pedroso
On Sat, Mar 16, 2013 at 10:42 PM, Michael Ellis wrote: > I've got an application that accepts JSON test reports from remote systems > and displays them in a SQLFORM grid with the most recent reports first. The > controller and view for what the user sees is essentially the following: > > CONTROLL

Re: [web2py] need help with typeahead widget

2013-03-19 Thread Ricardo Pedroso
On Tue, Mar 19, 2013 at 11:15 PM, Richard wrote: > Hello, > > I wrote a typeahead autocomplete widget and work around many little issues, > but now I have one that I have no clue how to solve... > > You can find the code here : > https://groups.google.com/d/msg/web2py/Fs-tAH75fGY/6VtZ32x6lMAJ > >

Re: [web2py] Joining the relation result of a join with another relation?

2013-03-19 Thread Ricardo Pedroso
On Tue, Mar 19, 2013 at 8:06 PM, Alec Taylor wrote: > # Model [appname/models/far.py] > > db.define_table('far_members', > Field('far_id', db.far, requires=IS_IN_DB(db, 'far.id')), > Field('user_id', db.auth_user, default=auth.user_id, writable=False, > requires=IS_IN_DB(db, 'aut

Re: [web2py] StopForumSpam: new plugin available

2013-04-03 Thread Ricardo Pedroso
On Fri, Mar 29, 2013 at 1:41 AM, Niphlod wrote: > Here https://github.com/niphlod/w2p_SFS_plugin > > Ultra-alpha-Release ... expect bugs, api changes and some other > intricacies > > PS: if someone wants to chime in to figure out an algorithm to calculate > confidence (0-100) based on frequen

Re: [web2py] running a script without the opening lines

2013-04-08 Thread Ricardo Pedroso
On Mon, Apr 8, 2013 at 7:57 AM, guruyaya wrote: > I have some script I'm running via linux cron, using web2py panel, like so > web2py.py -S app -M -R application/app/scripts/myscript.py > When It starts, it shows these lines: > > No handlers could be found for logger "web2py" > web2py Web Framewo

Re: [web2py] OGG ContentType (was: Re: Difference in headers upload/download vs static file, also in auth.wiki)

2013-04-09 Thread Ricardo Pedroso
On Tue, Apr 9, 2013 at 4:36 PM, Alan Etkin wrote: > > changed. > > I'm not sure about the change in the content-type, but I'll open a new > thread because it is not related with the first issue posted by Nico. > > Maybe this: audio/ogg .oga video/ogg .ogv application/ogg .ogg Reference: https:/

Re: [web2py] OGG ContentType (was: Re: Difference in headers upload/download vs static file, also in auth.wiki)

2013-04-09 Thread Ricardo Pedroso
I replied to the other thread too :) On Tue, Apr 9, 2013 at 6:47 PM, Alan Etkin wrote: > Maybe this: >> >> audio/ogg .oga >> video/ogg .ogv >> application/ogg .ogg >> >> Reference: https://developer.**mozilla.org/en-US/docs/** >> Configuring_servers_for_Ogg_**media

Re: [web2py] performance issue time to first byte

2013-04-10 Thread Ricardo Pedroso
As always without knowing nothing about your application is hard to give more precise answers. But, first of all, I would do a test in localhost to have a reference unit. For now let's keep the network variable out. If you have a shell account in your server do: curl -o /dev/null -s -w "Conne

Re: [web2py] performance issue time to first byte

2013-04-10 Thread Ricardo Pedroso
On Wed, Apr 10, 2013 at 4:30 PM, BlueShadow wrote: when I did that test application(welcome app) I got an average about 80 ms > which seems pretty slow too (localhost no db requests...). Did you create empty application or you reuse the welcome application? Either way, your server seems to be s

Re: [web2py] performance issue time to first byte

2013-04-10 Thread Ricardo Pedroso
On Wed, Apr 10, 2013 at 4:41 PM, BlueShadow wrote: > migrations are false and lazy tables are true. > I tried to do something with cache.ram (for another app) which had no > effekt at all perfhaps I did it wrong. > consider moving code to (imported) modules #I started on it when I > realised I wa

Re: [web2py] performance issue time to first byte

2013-04-10 Thread Ricardo Pedroso
On Wed, Apr 10, 2013 at 8:39 PM, BlueShadow wrote: > thanks for all the suggestions I'm trying to work at one after the other: > kompiling it made it a lot worse: > http://www.webpagetest.org/result/130410_9P_14QQ/ > the results now vary a lot from a total of 4 secs to over 11 secs. Very weird...

Re: [web2py] Server performance (cpu/memory)

2013-04-10 Thread Ricardo Pedroso
On Wed, Apr 10, 2013 at 11:33 PM, Marco Túlio Cícero de M. Porto wrote: > one thing that caught up my atention was that recently (after system/web2py > upgrade) I have a higher use of memory and CPU. > > I was using Apache2 and it was going nuts (near 100% CPU/memory usage). > Traded for Nginx an

Re: [web2py] Server performance (cpu/memory)

2013-04-10 Thread Ricardo Pedroso
On Thu, Apr 11, 2013 at 12:32 AM, Marco Túlio Cícero de M. Porto wrote: > > 2013/4/10 Ricardo Pedroso >> >> On Wed, Apr 10, 2013 at 11:33 PM, Marco Túlio Cícero de M. Porto >> wrote: >> >> > one thing that caught up my atention was that recently (after &g

Re: [web2py] gmaps: ugly rendering

2013-04-12 Thread Ricardo Pedroso
Hi hit this issue also and I fixed with: .gmnoprint img {max-width: inherit;} in the end of the Ricardo On Fri, Apr 12, 2013 at 11:47 AM, Jes M wrote: > Hi all: > > I'm testing gmaps.js with the same code Omi published here: > > http://ochiba77.blogspot.com.es/2012/06/how-to-use-gmapsjs-on

Re: [web2py] Re: framework benchmarks - web2py surprisingly slow?

2012-10-01 Thread Ricardo Pedroso
On Sun, Sep 30, 2012 at 6:43 PM, Massimo Di Pierro wrote: > We can only package pure python web servers. Tornado does not meet this > requirement. Tornado is pure Python and very fast - and even much faster with PyPy. It only has an optional C module for those who want to use epoll on Linux/Pyt

Re: [web2py] Re: framework benchmarks - web2py surprisingly slow?

2012-10-02 Thread Ricardo Pedroso
thers systems. I put the results of two ab benchmarks in the README (rocket vs monolithic tornado) of web2py trunk Ricardo > On Monday, 1 October 2012 16:27:11 UTC-5, Ricardo Pedroso wrote: >> >> On Sun, Sep 30, 2012 at 6:43 PM, Massimo Di Pierro >> wrote: >> &

Re: [web2py] Re: framework benchmarks - web2py surprisingly slow?

2012-10-03 Thread Ricardo Pedroso
On Wed, Oct 3, 2012 at 9:40 AM, Niphlod wrote: > Ok, with some modifications can be run on windows with anyserver.py . So, I > remain with one only doubt ... is tornado on Windows fully tested ? > >def motor(app, address, **options): > import motor > app = motor.WSGIContainer(a

Re: [web2py] Re: framework benchmarks - web2py surprisingly slow?

2012-10-03 Thread Ricardo Pedroso
t; Il giorno mercoledì 3 ottobre 2012 06:56:24 UTC+2, Massimo Di Pierro ha > scritto: >> >> Please open a ticket your your proposal and the link. This is a serious >> possibility! >> Can the monolitic build be automated? >> >> On Tuesday, 2 October 2012 20:12:41

Re: [web2py] Re: framework benchmarks - web2py surprisingly slow?

2012-10-03 Thread Ricardo Pedroso
On Wed, Oct 3, 2012 at 5:56 AM, Massimo Di Pierro wrote: > Please open a ticket your your proposal and the link. This is a serious > possibility! > Can the monolitic build be automated? I guess so, but don't know how without enter in the lex/yacc world. Probably not worth it. Suggestions? Ricard

Re: [web2py] Re: framework benchmarks - web2py surprisingly slow?

2012-10-03 Thread Ricardo Pedroso
On Wed, Oct 3, 2012 at 10:35 AM, Niphlod wrote: > Well, seems to work. I'd need to know if there is some way to test if all > web2py framework works on on this, but a normal app seems to do pretty fine. > Windows Vista (aaargh!), PortablePython 2.7.3 32-bit, T8100 2.10Ghz, 3 GB > RAM, adjusted sof

Re: [web2py] Re: framework benchmarks - web2py surprisingly slow?

2012-10-03 Thread Ricardo Pedroso
On Wed, Oct 3, 2012 at 11:31 AM, Niphlod wrote: > me too. The default webserver is not - usually - meant for production > anyway. I started the test with the idea "let's see if tornado on windows > (i.e. without all the goodies of select/epoll) can be at least comparable > with a threaded server".

Re: [web2py] Re: framework benchmarks - web2py surprisingly slow?

2012-10-03 Thread Ricardo Pedroso
On Wed, Oct 3, 2012 at 2:09 PM, Niphlod wrote: > PS: ab -c 1000 -n 1 on tornado-motor fails after ~7000 requests, > cherrypy finishes without issues (both with 1-1 (89 rps) and 10-20 > threads(18 rps)). tornado fails because on Windows it's using select() and select doesn't scale well. That

Re: [web2py] 'DAL' object has no attribute '_lazy_tables'

2012-10-15 Thread Ricardo Pedroso
On Mon, Oct 15, 2012 at 7:56 PM, Martin Weissenboeck wrote: > Upgraded to 2.1.1. > I get: > > Traceback (most recent call last): (...) > File "D:\web2py\gluon\dal.py", line 7146, in __getattr__ > > > if ogetattr(self,'_lazy_tables') and \ > > > AttributeError: 'DAL' object has no attribute

Re: [web2py] 'DAL' object has no attribute '_lazy_tables'

2012-10-15 Thread Ricardo Pedroso
On Mon, Oct 15, 2012 at 9:01 PM, Ricardo Pedroso wrote: > On Mon, Oct 15, 2012 at 7:56 PM, Martin Weissenboeck > wrote: >> Upgraded to 2.1.1. >> I get: >> >> Traceback (most recent call last): > > (...) > >> File "D:\web2py\gluon\dal.py&qu

Re: [web2py] 'DAL' object has no attribute '_lazy_tables'

2012-10-15 Thread Ricardo Pedroso
# -*- coding: utf-8 -*- def index(): session.person = db(db.person).select().first() return 'ok' Ricardo > On Monday, 15 October 2012 15:05:23 UTC-5, Ricardo Pedroso wrote: >> >> On Mon, Oct 15, 2012 at 9:01 PM, Ricardo Pedroso >> wrote: >> > On Mon, O

Re: [web2py] 'DAL' object has no attribute '_lazy_tables'

2012-10-15 Thread Ricardo Pedroso
Forget to mention that you must make two requests, the first one will save the session and the second one will read from session and will fail Ricardo On Tue, Oct 16, 2012 at 1:10 AM, Ricardo Pedroso wrote: > On Mon, Oct 15, 2012 at 9:37 PM, Massimo Di Pierro > wrote: >> Thi

Re: [web2py] 'DAL' object has no attribute '_lazy_tables'

2012-10-16 Thread Ricardo Pedroso
an post 2.1.2 later tonight. >> >> >> On Monday, 15 October 2012 19:18:09 UTC-5, Ricardo Pedroso wrote: >>> >>> Forget to mention that you must make two requests, the first one will >>> save the >>> session and the second one will read from sessi

Re: [web2py] Re: auth.impersonate(0)

2012-10-16 Thread Ricardo Pedroso
The fix in trunk worked for me. Martin are you calling impersonate(0) via GET or POST. Now I'm going to guessing mode I guest it is via GET, right? And probably when you call it you were not an impersonator any more. Massimo, maybe it is a condition missing: we have in gluon/tools.py:

Re: [web2py] help with js issue

2012-01-29 Thread Ricardo Pedroso
On Sun, Jan 29, 2012 at 4:27 PM, Massimo Di Pierro wrote: > I used to be able to stop the server with CRTL+C but it does not work > anymore on my mac. I now have to kill it. Why? I'm new to web2py, but I already see this happened in other scripts when working with sockets and threads. Probably

CTRL-C webpy hangs (was: Re: [web2py] help with js issue)

2012-01-30 Thread Ricardo Pedroso
On Sun, Jan 29, 2012 at 5:28 PM, Ricardo Pedroso wrote: > On Sun, Jan 29, 2012 at 4:27 PM, Massimo Di Pierro > wrote: > >> I used to be able to stop the server with CRTL+C but it does not work >> anymore on my mac. I now have to kill it. Why? > > I'm new t

Re: CTRL-C webpy hangs (was: Re: [web2py] help with js issue)

2012-01-31 Thread Ricardo Pedroso
On Tue, Jan 31, 2012 at 3:14 AM, Massimo Di Pierro wrote: > Specifically it waits for the socket timeout of 60 seconds here: > > rocket.py line 1063: >        # Wait until they pull the > trigger >        for t in self.threads: >            if t.isAlive(): >                t.join() > > I feel it i

[web2py] One issues (I guess) with auth form login+janrain

2012-02-07 Thread Ricardo Pedroso
I'm evaluatind multiple logins using the normal auth form + janrain in web2py 1.99.4 It's working almost as I was expecting, but when I do the following steps: 1) login with janrain (in my case using google) 2) I'm sucessfully logged in my app. I go to /myap/default/user/change_password and ca

Re: [web2py] Re: [w2py-dev] Re: Movuca - Social CMS beta 0.1

2012-02-07 Thread Ricardo Pedroso
On Tue, Feb 7, 2012 at 8:29 PM, Bruno Rocha wrote: > That is exactly what I had in mind, now I dont know if I stay with AGPL or > change to LGPL.. > > I chosen AGPL because I saw another related projetct using it > (http://noosfero.org/Site/About) Hi Bruno, I'm completely ignorant about this lic

Re: [web2py] login next doesn't work Version 1.99.4 (2011-12-14 14:46:14) stable

2012-02-08 Thread Ricardo Pedroso
Hi, Try this: 1. Logout from you app. 2. delete all your sessions files in sessions folder. (if your are in a development environment) 3. Login again and see how the redirect behave. Ricardo On Wed, Feb 8, 2012 at 8:57 PM, Tito Garrido wrote: > I don't know how I can debug it :-/ > > On Wed,

Re: [web2py] redirect doesn't redirect.

2012-02-13 Thread Ricardo Pedroso
On Mon, Feb 13, 2012 at 10:58 AM, Annet wrote: >    elif request.args(0)==1: This one above is always False. Should be at least: elif request.args(0)=="1": request.args returns each arg as string. Ricardo

Re: [web2py] Erroneous code in gluon/*

2012-02-14 Thread Ricardo Pedroso
On Tue, Feb 14, 2012 at 9:33 AM, Marin Pranjić wrote: > Hi, > > I want to compile gluon/* files using Cython and test performance gain > vs non-compiled code. > I am using trunk. > > There are some issues which I will report here. > These are not all issues, only those that I think are web2py bugs

Re: [web2py] Erroneous code in gluon/*

2012-02-14 Thread Ricardo Pedroso
On Tue, Feb 14, 2012 at 12:48 PM, Ricardo Pedroso wrote: > On Tue, Feb 14, 2012 at 9:33 AM, Marin Pranjić > wrote: >> Hi, >> >> I want to compile gluon/* files using Cython and test performance gain >> vs non-compiled code. >> I am using trunk. >> &g

Re: [web2py] Re: Erroneous code in gluon/*

2012-02-14 Thread Ricardo Pedroso
On Tue, Feb 14, 2012 at 2:42 PM, Massimo Di Pierro wrote: > This is veyr useful feedback. I think I fixed them all in trunk. > Please check and report more! Yep, they are all almost fixed but there are at least 2 more that should be fixed right now: 1. contrib/generics.py:19:28: undeclared name

Re: [web2py] Re: Erroneous code in gluon/*

2012-02-14 Thread Ricardo Pedroso
No problem :) On Tue, Feb 14, 2012 at 4:55 PM, Marin Pranjić wrote: > Hi Ricardo, > Sorry I did not see your post. :-) > > On Feb 14, 5:18 pm, Ricardo Pedroso wrote: >> On Tue, Feb 14, 2012 at 2:42 PM, Massimo Di Pierro >> >> wrote: >> > This is veyr us

Re: [web2py] What's the best way to throttle a web2py thread?

2012-03-02 Thread Ricardo Pedroso
On Fri, Mar 2, 2012 at 4:33 AM, Chris wrote: > I've got a web2py app that processes an uploaded file. When I upload a big > file, it pushes the CPU to 100% and blocks out all other processes. > > How do I limit this thread so that other things can go through? Any ideas > would be great. The info

Re: [web2py] Re: What's the best way to throttle a web2py thread?

2012-03-04 Thread Ricardo Pedroso
On Sat, Mar 3, 2012 at 5:54 AM, Massimo Di Pierro wrote: > Not sure I understand the issue but you should not have time.sleep in code. > It causes the threads to live longer then necessary and make you vulnerable > to DoS attacks. Of course, sleep is more like a simple hack. If the app is for int

Re: [web2py] web2py[:]

2012-03-04 Thread Ricardo Pedroso
Bruno, it's simple awesome. I will be learning a lot reading the code. Thank you, Ricardo On Sat, Mar 3, 2012 at 11:27 PM, Bruno Rocha wrote: > > Hi, > > The new web2py[:] is alive! > > There are still some minor css issues and content organization to solve, I > hope to have it all done by the

Re: [web2py] Error in installing web2py 1.99.4 in ubuntu 11.10

2012-03-16 Thread Ricardo Pedroso
On Fri, Mar 16, 2012 at 9:46 AM, praveen krishna wrote: > Hi, > I have installed web2py 1.99.4 in ubuntu 11.10 but it is generating > ticket(internal error ) while connecting to the server and by clicking the > link link it is says the following trace back error > Traceback > > 1. > 2. > 3. > 4.

Re: [web2py] Re: Async Web3Py ?

2013-04-17 Thread Ricardo Pedroso
I'm didn't follow this discussion closed enough, probably what I have to say was already said, but ... > So essentially, if you run web2py on-top of tornado's I/O-loop, you should > be able to use these YieldPoint classes within the controller-actions. I guess not, but I may be wrong. Using web2p

Re: [web2py] Re: Python Redis Queue

2013-04-17 Thread Ricardo Pedroso
On Tue, Apr 16, 2013 at 12:26 AM, Tito Garrido wrote: > Nice! Is it working? Is there an example of application? I just put on github one example (https://github.com/rpedroso/rqdboard). It has the rq-dashboard (https://github.com/nvie/rq-dashboard) "ported" to web2py. Ricardo -- --- You rec

Re: [web2py] Re: Python Redis Queue

2013-04-18 Thread Ricardo Pedroso
aybe Still true. > the method used to implement the same thing with celery can be used for > that. What is this method? Ricardo > On Wednesday, April 17, 2013 6:03:40 PM UTC+2, Ricardo Pedroso wrote: >> >> On Tue, Apr 16, 2013 at 12:26 AM, Tito Garrido wrote: >>

Re: [web2py] Re: Python Redis Queue

2013-04-18 Thread Ricardo Pedroso
Now I remember seeing that thread, at the time I was with other things and end up forget it. I will see, later tonight or maybe this afternoon, what I can do about queueing functions in models. On Thu, Apr 18, 2013 at 10:03 AM, Niphlod wrote: > here ... https://groups.google.com/d/msg/web2py/

Re: [web2py] Re: Python Redis Queue

2013-04-18 Thread Ricardo Pedroso
On Thu, Apr 18, 2013 at 10:20 AM, Ricardo Pedroso wrote: > Now I remember seeing that thread, at the time I was with other things > and end up forget it. > > I will see, later tonight or maybe this afternoon, what I can do about > queueing functions in models. I pushed it to g

Re: [web2py] Re: Cannot import module 'guppy', appadmin cache

2013-04-19 Thread Ricardo Pedroso
On Fri, Apr 19, 2013 at 10:01 AM, BlueShadow wrote: > I did now and I can't import it in python: > ImportError: No module named gubby > Dont know if is a copy paste typo, but is guppy not gubby Anyway: Since you are using cache.disk, the cache file is simply a shelve file you can inspect it wit

Re: [web2py] Re: Python Redis Queue

2013-04-19 Thread Ricardo Pedroso
On Thu, Apr 18, 2013 at 10:02 PM, Niphlod wrote: > PS: on the web2py process side, it seems that at most 10 connections are > istantiated with Redis: is there a connection pool? I guess, because you are running the web server with 10 threads. python redis by default use a connection pool... see b

Re: [web2py] Returning gzipped content, generic.json.gz ?

2013-04-21 Thread Ricardo Pedroso
You can not "blindly" gzip your data unless you control the clients. It's the client that tells if it can accept gzip content or not, and the web server will choose to gzip it or not. I will advice you to let this to the web server. But if you really want to gzip yourself, than you should take c

Re: [web2py] THUMB function in contrib - bug

2013-04-21 Thread Ricardo Pedroso
On Sun, Apr 21, 2013 at 10:35 PM, Tito Garrido wrote: > Hi Folks, > > I was trying to use THUMB function following Bruno's tutorial for python RQ > and I got: > > File "/root/web2py/gluon/contrib/imageutils.py", line 54, in THUMB > img = Image.open(request.folder + 'uploads/' + image) > Fi

Re: [web2py] app behaves radically diffrent on home PC (Windows) than on server(linux)

2013-04-21 Thread Ricardo Pedroso
On Sun, Apr 21, 2013 at 10:56 PM, BlueShadow wrote: > Hi, > I was developping my app for the last couple weeks directly on my server. > now for my new functions I wanted some easy tests like using the print > command and see it directly^^ > So I package the app and put it on my windows PC (web2py

[web2py] web2py chat example

2013-04-21 Thread Ricardo Pedroso
Due to a recent discussion about async in web2py I made an example web2py app based on tornado long polling chat example. The only requirement is to run it with gevent. Can be done with anyserver.py shipped with web2py. You can grab it here: https://github.com/rpedroso/w2pchat Ricardo -- ---

Re: [web2py] Re: app behaves radically diffrent on home PC (Windows) than on server(linux)

2013-04-22 Thread Ricardo Pedroso
On Mon, Apr 22, 2013 at 2:23 PM, Anthony wrote: > On Monday, April 22, 2013 8:53:39 AM UTC-4, BlueShadow wrote: >> So I changed that. Now I get the next error: >> >> file is encrypted or is not a database I think this may be a problem with sqlite versions. On both system, in a python shell do:

Re: [web2py] Returning gzipped content, generic.json.gz ?

2013-04-22 Thread Ricardo Pedroso
On Mon, Apr 22, 2013 at 1:28 AM, Vincent wrote: > Hi Ricardo, > > in this case I do control the clients. The scientific data would be on an > intranet and would only really make sense to the a specialized client. > > So apart from having appropriate headers I just need to write the json.dumps > an

Re: [web2py] web2py chat example

2013-04-22 Thread Ricardo Pedroso
es(finder, >>>> force_root_egg_info=self.bundle, bundle=self.bundle) >>>> File "C:\python27\lib\site-packages\pip-1.3.1-py2.7.egg\pip\req.py", >>>> line 1057, in prepare_files >>>> req_to_install.run_egg_info() >>>> File "

Re: [web2py] web2py chat example

2013-04-22 Thread Ricardo Pedroso
I put a demo here: http://78.46.172.53:8000/w2pchat/default/index users/pass us...@demo.com / 1234 us...@demo.com / 1234 You can create other users to. Later tonight I will put it down. Ricardo On Mon, Apr 22, 2013 at 5:47 PM, Ricardo Pedroso wrote: > Do you managed to get it work

Re: [web2py] Re: app behaves radically diffrent on home PC (Windows) than on server(linux)

2013-04-22 Thread Ricardo Pedroso
On Mon, Apr 22, 2013 at 6:49 PM, BlueShadow wrote: > windows pc: > > import sqlite3 > In [2] : print sqlite3.version > 2.6.0 > In [3] : print sqlite3.sqlite_version > 3.6.21 > > Linux > > import sqlite3 > In [5] : print sqlite3.version > 2.6.0 > In [6] : print sqlite3.sqlite_version > 3.7.9 if y

Re: [web2py] Re: app behaves radically diffrent on home PC (Windows) than on server(linux)

2013-04-22 Thread Ricardo Pedroso
On Mon, Apr 22, 2013 at 7:04 PM, BlueShadow wrote: > now I got pysqlite (on my windows maschine) which has following versions > In [6] : import pysqlite2.dbapi2 > In [7] : print pysqlite2.dbapi2.version > 2.6.3 > In [8] : print pysqlite2.dbapi2.sqlite_version > 3.7.6.2 > > but I don't know how to

Re: [web2py] web2py chat example

2013-04-24 Thread Ricardo Pedroso
On Tue, Apr 23, 2013 at 11:37 PM, Arnon Marcus wrote: > How is this architected? I'm not sure I understand what you want to know but I suppose you are referring to the chat example and how it works: 1. You open the chat with your browser and it sends the last messages, this is a "normal" re

Re: [web2py] web2py chat example

2013-04-24 Thread Ricardo Pedroso
Hi Arnon, On Wed, Apr 24, 2013 at 1:13 PM, Arnon Marcus wrote: > First of all, by "architecture" I was referring to the server-side, not the > client-side. the demo chat was running with: $ cd $ nohup python anyserver.pt -s gevent was running with gevent httpserver, no tornado involved in any

Re: [web2py] Re: response.download

2013-04-29 Thread Ricardo Pedroso
On Mon, Apr 29, 2013 at 9:54 AM, Domagoj Kovač wrote: > Where can i open a ticket about this? > > I am not sure now. I have an image, lets say logo. I want to display this > image via: > {{=IMG(_src=URL("default", "download", args="logo.png"), _width="170px")}} > > I thought if i move my image to

Re: [web2py] Is there a way how to use a viewScope on conversationScope like variable?

2013-04-29 Thread Ricardo Pedroso
On Mon, Apr 29, 2013 at 10:13 AM, David Marko wrote: > Is there a way how to use/crrate a viewScope on conversationScope like > variable in web2py? In JAVA based frameworks (e.g. JSF, Spring Framework) > there are scoped environments available. In web2py we have requestScope, and > sessionScope (i

Re: [web2py] Is there a way how to use a viewScope on conversationScope like variable?

2013-04-29 Thread Ricardo Pedroso
On Mon, Apr 29, 2013 at 5:26 PM, David Marko wrote: > Such a great piece of code!! Thanks. Its very close but page scope should be > bound to specific instance of page so it works also in situation when you > open the same page in several browser tabs. It must be independent. Didn't understand

Re: [web2py] Re: New Relic module causing import error

2013-04-29 Thread Ricardo Pedroso
On Mon, Apr 29, 2013 at 9:30 PM, Yarin Kessler wrote: > Yes, we have httplib2 installed in our modules folder, and the python-oauth2 > lib runs fine if we don't import the new relic agent first. Likewise, the > new relic works fine and we get no errors if we never call import oauth2. > It's only w

Re: [web2py] Re: New Relic module causing import error

2013-04-29 Thread Ricardo Pedroso
On Tue, Apr 30, 2013 at 12:41 AM, Yarin wrote: > Ricardo- yes, importing httplib2 throws the same error, even without > importing oauth. > > We've noticed that the problem does not arise with the new relic import > statment on the first line, > but only on the second line, when the new relic agent

Re: [web2py] @make_member_of() decorator

2013-05-02 Thread Ricardo Pedroso
On Wed, May 1, 2013 at 10:34 PM, Vinicius Assef wrote: > I created a decorator to allow binding a function to a Table instance. > > IMHO, this helps organizing models, creating something similar to > Django's managers. > > To an example, see: https://gist.github.com/viniciusban/5497532 > > To get

  1   2   >