[web2py] Re: web2py book and softcron

2010-04-14 Thread AchipA
or... ? On Apr 13, 8:18 pm, mdipierro mdipie...@cs.depaul.edu wrote: This an easier one. @Achipa, want to do this? On Apr 13, 10:49 am, Thadeus Burgess thade...@thadeusb.com wrote: If we are working on cron can I inject a feature request? Support for multiple crontab files in applications

[web2py] Re: web2py book and softcron

2010-04-13 Thread AchipA
, but read quite a bit more as we scale upwards - like on a shared volume or on a busy site with softcron). On Apr 12, 11:27 pm, mdipierro mdipie...@cs.depaul.edu wrote: On Apr 12, 1:19 pm, AchipA attila.cs...@gmail.com wrote: Why do we need the time range ? If the tasks are overlapping it's

[web2py] Re: web2py book and softcron

2010-04-13 Thread AchipA
and detect not only whether a cron task is running but which of past scheduled tasks are running. Bottom line: the part of cron/newcron that runs every 1 minute need to be redesigned completely in my view. Massimo On Apr 13, 6:23 am, AchipA attila.cs...@gmail.com wrote: Hey, I don't have

[web2py] Re: web2py book and softcron

2010-04-12 Thread AchipA
request - as opposed to a simple cached non-locking filesystem call). On Apr 1, 8:20 pm, AchipA attila.cs...@gmail.com wrote: Exactly, hardcron checks once a minute, softcron checks on each page load. The 'check' is calling a function or two and comparing a file's timestamp, so not *that* much more

[web2py] Re: web2py book and softcron

2010-04-12 Thread AchipA
about that) and just stores start_time, stop_time explicitly in a picke. On Apr 12, 8:00 am, AchipA attila.cs...@gmail.com wrote: To correct myself, it seems the cron in web2py no longer uses the filesystem timestamps, but cPickles timestamps from/to the lock file. I'm not sure why Massimo

[web2py] Re: webserver slow, misreported

2010-04-05 Thread AchipA
Can you elaborate how can cron cause database locking issues (apart from such issues being caused by child processes)? The content of the crontab is irrelevant, whether you only have @reboot or more makes no difference. If there would be no check, you could not change cron parameters without

[web2py] Re: web2py book and softcron

2010-04-02 Thread AchipA
, at 11:20 AM, AchipA wrote: Exactly, hardcron checks once a minute, softcron checks on each page load. The 'check' is calling a function or two and comparing a file's timestamp, so not *that* much more expensive. Thanks. In that case, I have a suggestion, perhaps not entirely thought out

[web2py] Re: web2py book and softcron

2010-04-01 Thread AchipA
There is some overhead, but efficiency is a disputable term - there is certainly more overhead than hardcron, but IMO not in a way that would affect overall performance unless you're running it on a site that has hundreds of thousands of hits per day... On Apr 1, 5:40 pm, Jonathan Lundell

[web2py] Re: web2py book and softcron

2010-04-01 Thread AchipA
Exactly, hardcron checks once a minute, softcron checks on each page load. The 'check' is calling a function or two and comparing a file's timestamp, so not *that* much more expensive. On Apr 1, 7:51 pm, Jonathan Lundell jlund...@pobox.com wrote: On Apr 1, 2010, at 10:37 AM, AchipA wrote

[web2py] Re: cron warning...

2010-03-01 Thread AchipA
3 is the correct choice for several reasons. If the jobs should not overlap, it's the scripts reponsibility to provide a check and react accordingly. IMHO Cron should not skip tasks or change the start time voluntarily (it's not a resource manager). Also, 3 is how the 'real' cron works. On Mar 1,

[web2py] Re: web2py site problem ?!

2010-02-12 Thread AchipA
That is not correct. EBS provides permanent storage, but even without that, you have instance level consistency, so if you reboot your instance, your stuff will still be there. You also have monitoring features that make it easy to bring back a service on an another instance. AWS is not built to

[web2py] Re: web2py site problem ?!

2010-02-12 Thread AchipA
When you are creating an EBS volume you can choose a snapshot to prepopulate it with. On Feb 12, 8:32 pm, mdipierro mdipie...@cs.depaul.edu wrote: I have an instance with root mounted on EBS storage and if take snapshots of the latter. If I understand how this works the root filesystem should

[web2py] Re: cron issue

2010-02-08 Thread AchipA
myscript.py You can also call actions * * * * * root *myscript.py so that models are imported. On Jan 30, 8:36 pm, John Heenan johnmhee...@gmail.com wrote: Hi AchipA Another feature request, if the cron file is a python file, how about a cron option to open the file and do

[web2py] Re: cron issue

2010-02-08 Thread AchipA
(they are executed after ever action for every app). May not be thread safe. On Feb 8, 7:40 am, AchipA attila.cs...@gmail.com wrote: Fiddling with this now, but have a few concerns, so I'd like Massimo to chime is as the exec expert. The main reason for going POpen is to have a clean, thread

[web2py] Re: cron issue

2010-02-08 Thread AchipA
On Feb 8, 8:22 pm, mdipierro mdipie...@cs.depaul.edu wrote: On Feb 8, 11:43 am, AchipA attila.cs...@gmail.com wrote: 1) ok 2) this would be the cron.master file. Sadly, it must be a file as otherwise multiprocess setups (like wsgi) would trip over each other. ok. but there should

[web2py] Re: cron issue

2010-02-08 Thread AchipA
why calling a new web2py process to sort or controller/model issues was a simple way of doing it in a foolproof manner. On Feb 9, 3:14 am, John Heenan johnmhee...@gmail.com wrote: Since AchipA is working on other changes to cron.py and cron.py is his, I think I should wait to see if AchipA

[web2py] Re: Extra cron processes under Ubuntu 9.10 and Snow Leopard after upgrade to 1.74.9

2010-02-02 Thread AchipA
As Massimo says -N will disable cron. The two cron tasks you see should be expiring sessions to avoid piling up of files in the session dir. Note that if you use extcron, the web2py serving the pages is not the parent (so killing it does nothing to those started by the system cron) On Feb 1,

[web2py] Re: has anybody check the the cron in trunk?

2010-01-31 Thread AchipA
I'm also workin on refactoring a few things in cron, let's not trip over each other :) I see people have been busy with my code so there are more things to check than I initially thought, but I'm still on track. I also plan on including a test module which will make regression tests easier. On

[web2py] Re: cron issue

2010-01-30 Thread AchipA
Just to chime in, I'm still alive and preparing an update to cron as quite a few things changed since I last touched it. As for the questions - all cron modes support the * and ** syntax, and yes, cron files can be modified on the fly. On Jan 26, 4:00 pm, mdipierro mdipie...@cs.depaul.edu wrote:

[web2py:36425] Re: web2py users growth

2009-12-03 Thread AchipA
It's not the packaging that is difficult, it's the process of getting the package into a mainstream distribution. On Dec 3, 5:09 pm, mdipierro mdipie...@cs.depaul.edu wrote: It is a good idea. I need somebody to help and take the initiative. On Dec 3, 8:59 am, selecta gr...@delarue-berlin.de

[web2py:36448] Re: web2py users growth

2009-12-03 Thread AchipA
, mdipierro mdipie...@cs.depaul.edu wrote: If we had a script that does the packing I can work out the politics. On Dec 3, 10:42 am, AchipA attila.cs...@gmail.com wrote: It's not the packaging that is difficult, it's the process of getting the package into a mainstream distribution. On Dec

[web2py:36257] Re: Call web page in cron

2009-12-01 Thread AchipA
Actually, this is not really a cron question :) The question is rather if you can specify arguments to controllers when invoked on the command line - if you can do that in the command line (I have no idea if that's possible), you will probably be able to do it in cron, too. On Dec 1, 10:50 am,

[web2py:30967] Re: Cron in web2py

2009-09-14 Thread AchipA
Further, is this send_mail.py a web2py controller or a regular python script ? Asking because I see you have it in your controllers dir and if it IS a controller, you should use a different syntax. @anand: the unix crontab should contain the username which executes the command, that's where the

[web2py:28209] Re: Where'd table_newfilename go ?

2009-08-08 Thread AchipA
Yay ! Thanks. On Aug 8, 12:37 pm, mdipierro mdipie...@cs.depaul.edu wrote: it is back, in trunk. On Aug 6, 8:11 pm, AchipA attila.cs...@gmail.com wrote: I might have missed a few classes, but where did thenewfilenamefield go from SQLFORM's accepts/vars and why ? I know I can query

[web2py:28114] Where'd table_newfilename go ?

2009-08-06 Thread AchipA
I might have missed a few classes, but where did the newfilename field go from SQLFORM's accepts/vars and why ? I know I can query it back from the DB but it's kind of awkward, having it returned by sqlform.accepts() was far more natural, especially considering transactions...

[web2py:28008] Re: cron job website communication, find to find port?

2009-08-05 Thread AchipA
Not sure I follow... If you're using web2py cron I'd suggest calling the function directly (see the cron doc page on syntax). If you're using service mode on windows and this does not work out, you can still call the function directly (e.g. python web2py.py -S application/ controller/function in

[web2py:27237] Re: Does CRON work on GAE?

2009-07-23 Thread AchipA
():     if request.env.remote_addr != valid_inner_ip:         redirect(URL(r=request,f=index))     ...     db.note.insert(name=some_new_name)     ... That's all. On Jul 21, 1:16 pm, AchipA attila.cs...@gmail.com wrote: Hm, if I understand correctly, we just need a smart crontab -cron.yaml converter

[web2py:27263] Re: Global setting for domain name?

2009-07-23 Thread AchipA
Yes, obviously, at any serious deployment you'll end up doing things at the level of an external web server. With including the web server in web2py it's a bit of a can of worms, as you theoretically could do a lot of things which are not core web2py.

[web2py:27279] Re: Global setting for domain name?

2009-07-23 Thread AchipA
most non-hobbyist sites only have 1 canonical domain. When I run Web2Py it only uses around 20mb of memory for each instance. On Jul 23, 2:42 am, AchipA attila.cs...@gmail.com wrote: Unreasonable ? Why ? For example, I run several of my hobby projects as separate web2py applications and all

[web2py:27284] Re: Global setting for domain name?

2009-07-23 Thread AchipA
vs. per application. On Thu, Jul 23, 2009 at 4:46 PM, AchipA attila.cs...@gmail.com wrote: Most non-hobbyist sites should not use the built-in server (yes, that's an official recommendation), and with, say, apache+mod_rewrite it doesn't matter anyway, right ? :) Enterprise does not mean one

[web2py:27155] Re: missing cron folder results in ticket

2009-07-22 Thread AchipA
Check the errors directory of the app in question. It should contain the errors (in an almost human readable form) as tracebacks in files. On Jul 22, 8:40 am, Hans Donner hans.don...@pobox.com wrote: I've experienced when I downloaded the openid tar from massimo and installed it as application

[web2py:27033] Re: Does CRON work on GAE?

2009-07-21 Thread AchipA
GAE is not supported at the moment, but only because I don't use it and there was no particular interest in it so far. If GAE has no means of starting cron-style or long running processes, soft cron should stil work, provided someone implements a locking mechanism that works with GAE. The current

[web2py:27036] Re: Does CRON work on GAE?

2009-07-21 Thread AchipA
Hm, if I understand correctly, we just need a smart crontab - cron.yaml converter then, right ? I can imagine other people needing that too, so there might alredy be such things in the open, could someone verify that ? On Jul 21, 11:58 am, Hans Donner hans.don...@pobox.com wrote: gae has its

[web2py:27113] Re: missing cron folder results in ticket

2009-07-21 Thread AchipA
As Massimo said, it should be re-generated if it's missing. Are you using an up to date version and does the web2py process have sufficient privileges to make a cron dir ? On Jul 21, 9:10 pm, Hans Donner hans.don...@pobox.com wrote: When running an app that has no cron folder, a ticket is

[web2py:26887] Re: web2py-users and web2py-developers

2009-07-19 Thread AchipA
Just to chime in... Such a split of lists is perfectly normal and does seem to work pretty well for other projects I'm interested in (the OSGeo projects, Maemo, etc). In fact, the usual layout is a trinity of lists - users, developers and community (the last one encompassing topics that are not

[web2py:26733] Re: Cron not working with Controller Functions

2009-07-17 Thread AchipA
No idea about service, I have not tested it separately. Looking at widget.py, however, I saw an unrelated potential problems though, so I'll test it a bit anyway. Will send the patch to Massimo and/or report back regarding to findings on service mode. On Jul 16, 7:55 pm, Fran

[web2py:26639] Re: Web2Py Foundation?

2009-07-16 Thread AchipA
MapServer and OpenLayers, both under the OSGeo Foundation umbrella. Upside: - clear authority with regard to announcements, project stance, roadmap, etc - clear ownership of copyright, licenses, and source of help for developers/companies interested in that matter - well defined source of

[web2py:26646] Re: Web2Py Foundation?

2009-07-16 Thread AchipA
). On Jul 16, 3:21 pm, mdipierro mdipie...@cs.depaul.edu wrote: Can you elaborate? specifically on the last point. On Jul 16, 5:30 am, AchipA attila.cs...@gmail.com wrote: MapServer and OpenLayers, both under the OSGeo Foundation umbrella. Upside: - clear authority with regard

[web2py:26657] Re: Cron not working with Controller Functions

2009-07-16 Thread AchipA
Depending on the cron mode, you likely won't see the logging.warn as it is executed in a different process when called from cron. When called from the script, the warn is executed in the 'main' process and hence you can see it. So that in itself does not mean anything. When debugging cron

[web2py:26499] Re: 3 Suggestions and a Question

2009-07-14 Thread AchipA
BTW the scribd code is not only slow but wrong, too param name=movievalue=http://d.scribd.com/ScribdViewer.swf? document_id=16085263access_key=key- g0mf8a4za0foxo36f5zpage=1version=1viewMode= Note the lack of space between name and value attribs. Discovered that the other day when experimenting

[web2py:26394] Re: UTf-8 output

2009-07-13 Thread AchipA
Doublecheck that you actually have properly encoded data in the database ('show table X' should tell you the encoding of the table itself). Often 'displaying correctly' is misleading because of the possibility of making the same encoding mistake both ways (=treat mysql as binary storage). The

[web2py:26399] Re: UTf-8 output

2009-07-13 Thread AchipA
That's a utf8 to 8859 conversion right there. The mysql table (or data in it) is not utf8. Whatever else you're using is probably making the same error both while writing and reading the data, that's why it comes out OK (or you have an AddDefaultCharset UTF8 if you're using apache). The bottom

[web2py:26401] Re: UTf-8 output

2009-07-13 Thread AchipA
|         | Yes      |       8 | | utf8_persian_ci    | utf8    | 208 |         | Yes      |       8 | | utf8_esperanto_ci  | utf8    | 209 |         | Yes      |       8 | | utf8_hungarian_ci  | utf8    | 210 |         | Yes      |       8 | On Jul 13, 10:29 am, AchipA attila.cs...@gmail.com wrote

[web2py:26147] Re: web2py based queue

2009-07-10 Thread AchipA
You could try something like this - not too clean but, good for kicking off async tasks in another thread after the page has been served. import gluon.contrib.wsgihooks as wsgihooks class myasynctask(wsgihooks.PostConnectionTask): def __init__(self):

[web2py:26217] Re: Multithreaded and Multicore Programming/Solutions

2009-07-10 Thread AchipA
Whether it's faster depends on the particular problem (in some cases it's faster, in some it isn't), but it's definitely not more scalable (have you heard of Google App Engine ? You don't get much more scalable than that and it's running a version of Python). The GIL plays no role in web

[web2py:25964] Re: web2py via shell account

2009-07-08 Thread AchipA
Actually, cron has a keyword for that. Specify the time of the task as @reboot and itt will be run only once, right after booting. On Jul 8, 4:47 pm, Mr admin mr.netad...@gmail.com wrote: You can use CRON entry like  this to try and run web2py every 15 minuses # cron entry to run web2py every

[web2py:25981] Re: web2py via shell account

2009-07-08 Thread AchipA
@reboot is a cron keyword, in unix context it means right after boot. Web2py cron *also* supports that keyword, and it means right after starting web2py. On Jul 8, 7:51 pm, mdipierro mdipie...@cs.depaul.edu wrote: you talking about web2py cron or unix cron? On Jul 8, 12:07 pm, AchipA

[web2py:25984] Re: Waht is cron for?

2009-07-08 Thread AchipA
It's like linux cron but with the following extras: a) it will work transparently on all platforms (macwin incl) b) you don't need root access or user settable crontabs c) can call web2py controller functions directly d) allows you to call init/preload/precache functions on web2py startup e)

[web2py:26002] Re: web2py via shell account

2009-07-08 Thread AchipA
8, 12:51 pm, mdipierro mdipie...@cs.depaul.edu wrote: you talking about web2py cron or unix cron? On Jul 8, 12:07 pm, AchipA attila.cs...@gmail.com wrote: Actually, cron has a keyword for that. Specify the time of the   task as @reboot and itt will be run only once, right after booting

[web2py:25473] Re: Feature IDEA: Auto Deploy Web2py Apps

2009-07-02 Thread AchipA
I would also kind of like more admin functionality available from the command line. Web is cool and all, but if your web2py install has no https (or maybe even http if it's an intranet install) and you only can access it via ssh and lynx which is dead in the water because of JS in web2py... a

[web2py:25493] Re: Feature IDEA: Auto Deploy Web2py Apps

2009-07-02 Thread AchipA
Great tip ! How would you go about handling tickets/errors ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups web2py Web Framework group. To post to this group, send email to web2py@googlegroups.com To unsubscribe

[web2py:25313] Re: maintain dictionary state between requests

2009-06-30 Thread AchipA
Just a note - cache gives you more control of data persistence (do you really need to regenerate when logging in/out ? maybe mid-session ? etc). Perhaps even more importantly it allows for pregeneration of data (e.g. on web2py startup). mdipierro wrote: I agree with has. You cache when multiple

[web2py:25315] Re: Web2py is not too designer friendly?

2009-06-30 Thread AchipA
Just to re-float some old ideas... http://groups.google.com/group/web2py/browse_thread/thread/99afdeb834f39d02/74f564e0fe130ec9?lnk=gstq=formify#74f564e0fe130ec9 This approach was 'invented' to completely separate the view from any helper funk that goes on in the controllers, thereby giving

[web2py:25002] Re: Maemo 2009

2009-06-25 Thread AchipA
Just to report back, both proposals got accepted in some form, so it's first row for web2py people :) @fpp: if you need anything with regard to web2py and/or Maemo, let me know so we could get organized in time On Jun 23, 7:59 pm, fpp fpp@gmail.com wrote: On 23 juin, 02:01, mdipierro

[web2py:24774] Shove as cache backend ?

2009-06-23 Thread AchipA
I was wondering whether there would be interest to extend web2py caching with shove ( http://pypi.python.org/pypi/shove ). Shove probably wouldn't be directly exposed to the user, but wrapped in the current cache module (just like mem, disk or memcache is now). By using shove for caching, we

[web2py:24778] Re: Possible to render view template from db blob/text/string instead of file?

2009-06-23 Thread AchipA
Could response.view also be a handle (or maybe response.viewhandle ?). That way we could throw a (c)StringIO at response view, and StringIO can wrap db fields, python strings or whatever we want. Note that response.stream already works this way so it would be perhaps more consequential, too. On

[web2py:24578] Re: Coming from grails world

2009-06-20 Thread AchipA
You didn't say what web server you used for Django, whether you benchmarked compiled applications or not, etc, etc. The only way it's not apples and oranges if you use the SAME web server and compiled code. You wouldn't be using the bundled servers in a production environment anyway (that's true

[web2py:24415] Re: web2py 1.64.2 is OUT

2009-06-18 Thread AchipA
Wasn't there a policy that new functionality is only included in major releases and not point releases ? If that's still in place it would be perfectly OK to rename it for 1.65 as you shouldn't rely on 1.64.*2* to have this anyway. On Jun 18, 7:37 am, mdipierro mdipie...@cs.depaul.edu wrote:

[web2py:24416] Re: universal data representation/encoding

2009-06-18 Thread AchipA
I think we're forgetting an important lesson from gettext here... What you include in T() is NOT the message. It's an ASCII key. Of course, most people make the key identical to the English message string for convenience as it's the fallback, too. On Jun 17, 1:38 pm, Francisco Gama

[web2py:24423] Re: web2py 1.64.2 is OUT

2009-06-18 Thread AchipA
Why not just (IS_)STRONGPWD (or pwdstrength) ? That's what it is, isn't it ? On Jun 18, 2:49 pm, mr.freeze nat...@freezable.com wrote: Sorry guys, didn't even think about the python complex number object. Perhaps just COMPLEXITY? So you could say:

[web2py:23990] Re: YACI, or how to speed up model loading

2009-06-12 Thread AchipA
On Jun 12, 4:36 am, DenesL denes1...@yahoo.ca wrote: a) if there is no stuff.py in models, we include all models, convenient for development, friendly to newbies If no stuff.py include everything else?. I am against this one. Errr, but that is how it works right now, so you have to keep

[web2py:23899] YACI, or how to speed up model loading

2009-06-11 Thread AchipA
I was wondering of a possibility of speeding up models (especially if you have several different datasources), while keeping backward compatibility and also a convention over configuration approach. We do everything as before, however, if there IS a model with the same base name as a controller,

[web2py:23915] Re: YACI, or how to speed up model loading

2009-06-11 Thread AchipA
in models On Jun 11, 8:03 am, AchipA attila.cs...@gmail.com wrote: I was wondering of a possibility of speeding up models (especially if you have several different datasources), while keeping backward compatibility and also a convention over configuration approach. We do everything as before

[web2py:23917] Re: sqllite web2py gen question

2009-06-11 Thread AchipA
It would be surprising if mysql would manage to keep it's position - from what most blogs/news said, it seems most of the core mysql developers have jumped ship. On Jun 11, 4:23 pm, JohnMc maruadventu...@gmail.com wrote: Might want to keep our eyes on this DB

[web2py:23956] Re: YACI, or how to speed up model loading

2009-06-11 Thread AchipA
On Jun 11, 10:08 pm, DenesL denes1...@yahoo.ca wrote: Using the common code in the controller as a model substitute? There goes the MVC separation. And the other models still get executed. I think AchipA means execute one model only. The problem is that models are executed before

[web2py:23814] Re: getHelperById ?

2009-06-10 Thread AchipA
').find('#whatever') works as well, though slower On Jun 9, 5:48 pm, mdipierro mdipie...@cs.depaul.edu wrote: it returns the actual helper, not a copy. On Jun 9, 4:41 pm, AchipA attila.cs...@gmail.com wrote: Err... I was under the impression div.element only works on direct child

[web2py:23815] Re: web2py perfomance

2009-06-10 Thread AchipA
On Jun 10, 7:01 am, Alexey Nezhdanov snak...@gmail.com wrote: I get these results (best timing):   try-variant: 10.24s   regex: 9.58s So on my laptop try:except: function loses about 5% to regex - probably it depends on hardware/OS. Interesting, which python/platform are you using ? And

[web2py:23820] Re: web2py perfomance

2009-06-10 Thread AchipA
So on my laptop try:except: function loses about 5% to regex - probably it depends on hardware/OS. Interesting, which python/platform are you using ? Python 2.5.2 (r252:60911, Jul 31 2008, 17:28:52) [GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2 Hm, is it perhaps 32bit ? That could be

[web2py:23730] Re: web2py perfomance

2009-06-09 Thread AchipA
Any particular reason not doing is_integer via a 'try: int(i) except: return False' statement ? It should be faster than regexes. On Jun 7, 1:49 pm, Iceberg iceb...@21cn.com wrote: On Jun7, 6:35pm, Alexey Nezhdanov snak...@gmail.com wrote: 2) is_integer is a fast call, but with 1.1k (!)

[web2py:23739] table/sqltable helper post-production

2009-06-09 Thread AchipA
Just been through some TABLE() and SQLTABLE() work and could not find a way (I was satisfied with) to change output results of particular columns. For example, I have an sql column that is a color code and I'd like to put in a css element with that color. The hard way is obviously foregoing the

[web2py:23770] Re: table/sqltable helper post-production

2009-06-09 Thread AchipA
your own SQLTABLE2, or 2) loop over rows explicitly Massimo On Jun 9, 11:50 am, AchipA attila.cs...@gmail.com wrote: Just been through some TABLE() and SQLTABLE() work and could not find a way (I was satisfied with) to change output results of particular columns. For example, I have

[web2py:23766] Re: web2py perfomance

2009-06-09 Thread AchipA
is no longer called as often as Alexey originally pointed out, so it would make a negligible difference. I will change it though. Massimo On Jun 9, 11:24 am, AchipA attila.cs...@gmail.com wrote: Any particular reason not doing is_integer via a 'try: int(i) except: return False'  statement

[web2py:23771] getHelperById ?

2009-06-09 Thread AchipA
Another idea while I wait for some of my computations to finish. Javascript can access HTML elements in different ways. With web2py helpers, this can get a bit cumbersome. How about a generic getHelperById method for the base helper class so it goes through it's components and fetches the helper

[web2py:23780] Re: getHelperById ?

2009-06-09 Thread AchipA
...@cs.depaul.edu wrote: It is there already: form.element(_id='something')['_class']='red' On Jun 9, 2:58 pm, AchipA attila.cs...@gmail.com wrote: Another idea while I wait for some of my computations to finish. Javascript can access HTML elements in different ways. With web2py helpers, this can get

[web2py:22887] Re: Spatial???

2009-05-29 Thread AchipA
Well, it would be good to know in which direction you are moving... :) Spatial databases have spatial columns and spatial functions. So, how would we go about making the following postgis examples into a DAL- able form without slipping to _execute ? How do we insert a geometry ? How do we use

[web2py:22832] Re: web2py and Debian

2009-05-28 Thread AchipA
Christopher, are you a registered Debian developer ? I have packaged web2py for debian and Ubuntu but don't have a registered status so can't push them into official repositories. On May 28, 7:02 pm, cesmiga cesm...@gmail.com wrote: Massimo, It sure would be fun. My heaping plate of

[web2py:22492] Re: new in trunk args[i] == None

2009-05-23 Thread AchipA
Tt does break existing properly written python code (and is very non- pythonesque). Think: try: target = request.args[0] except: response.flash = 'No target specified' return do_something(target) If this is an issue for people, I think they should improve their python skills (learn

[web2py:22495] Re: new in trunk args[i] == None

2009-05-23 Thread AchipA
: On Saturday 23 May 2009 18:42:58 AchipA wrote: Tt does break existing properly written python code (and is very non- pythonesque). +1 except for harshness. Masking exceptions is a BAD THING (TM) Think: try: target = request.args[0] except:    response.flash = 'No target specified

[web2py:22142] Re: how to create index on a database table

2009-05-19 Thread AchipA
Explicitly, no, but web2py will implicitly create indexes on id's and columns containing foreign keys (=referencing other tables). On May 19, 10:20 am, benqktc zxzwin...@gmail.com wrote: hi everybody, i am new to web2py. my question is : is there any means to create index on a database table

[web2py:22164] Re: Of use to someone?

2009-05-19 Thread AchipA
Forgot to add - you could probably make softcron work on GAE. I don't use GAE at the moment, so I'm unable to verify, but in general it certainly is a possibility. On May 19, 6:33 pm, JohnMc maruadventu...@gmail.com wrote: A cron like set of functions for use on GAE. Might be of use to someone

[web2py:22163] Re: Of use to someone?

2009-05-19 Thread AchipA
I'm very much keen on extending web2py cron to GAE, but the proposed solution in the link above does not seem reliable to me at all. I'd say you're probably better off by external triggering from cron-sites. On May 19, 6:33 pm, JohnMc maruadventu...@gmail.com wrote: A cron like set of functions

[web2py:21954] Re: Feature request: Select browser

2009-05-16 Thread AchipA
You don't need make it a binary, python has perfectly good gtk bindings. It can always do a fallback. A bigger problem is consistency/ maintenance of a larger number of front-ends. I actually made one for me in Qt (my weapon of choice in the GUI arena), but for everyday use that would be an

[web2py:21970] Re: Feature request: Select browser

2009-05-16 Thread AchipA
, Jason On Sat, 2009-05-16 at 07:14 -0700, AchipA wrote: You don't need make it a binary, python has perfectly good gtk bindings. It can always do a fallback. A bigger problem is consistency/ maintenance of a larger number of front-ends. I actually made one for me in Qt (my weapon

[web2py:21929] Re: gzip response.

2009-05-15 Thread AchipA
I did a fair amount of testing on a couple of systems and the numbers say that in real life, it's quite a significant gain except for some very specific cases. I'd say the article you quoted concludes the same. Even if the latency does not improve for ONE client, the next one will benefit as the

[web2py:21737] Re: broken shell with -M ?

2009-05-13 Thread AchipA
can choose its own behavior). You tell me that with the default web2py apps, only admin has this problem but admin is not meant to be accessed with -M since it does not have a database at all. Massimo On May 12, 6:47 pm, AchipA attila.cs...@gmail.com wrote: Close, but not quite. Examples

[web2py:21738] Re: broken shell with -M ?

2009-05-13 Thread AchipA
that with the default web2py apps, only admin has this problem but admin is not meant to be accessed with -M since it does not have a database at all. Massimo On May 12, 6:47 pm, AchipA attila.cs...@gmail.com wrote: Close, but not quite. Examples is OK, admin still chokes. Traceback (most

[web2py:21661] broken shell with -M ?

2009-05-12 Thread AchipA
There seems to be the problem when trying to invoke shells with models (checked with latest from launchpad). For example, admin and examples both fail miserably, welcome works. The actual error seems to be referencing things like request.env in some of the models. This behaviour also happens to

[web2py:21708] Re: broken shell with -M ?

2009-05-12 Thread AchipA
(request.env.server_port) TypeError: int() argument must be a string or a number, not 'NoneType' On May 12, 5:00 pm, mdipierro mdipie...@cs.depaul.edu wrote: fixed in trunk. Please try it and let me know if it is ok. On May 12, 6:47 am, AchipA attila.cs...@gmail.com wrote: There seems to be the problem when

[web2py:21458] Re: cron function in controller problem

2009-05-08 Thread AchipA
yes, you should be able to call controllers. there is one problem in your example - you are not supposed to write the application name there just *controller/func Another important thing not yet in the doc is that you need to call db.commit() manually at the end of the function if you intend

[web2py:20799] Re: experimental version control of web2py apps

2009-04-29 Thread AchipA
for (no small task). Just out of curiosity, have you looked at https://code.launchpad.net/~achipa/web2py/versioncontrol ? It's a bit broader approach, still rough around the edges, but does work for the most common workflow use cases. Don't let the default subversion module fool you, this is fully

[web2py:20800] Re: temporary file management

2009-04-29 Thread AchipA
http://docs.python.org/library/tempfile.html might be of help On Apr 29, 10:26 am, Timmie timmichel...@gmx-topmail.de wrote: Hello, how does web2py handle temporary files? I would like to create some functionality for users like 1) uplaod a file (not into database) 2) perform actions

[web2py:20801] formify ?

2009-04-29 Thread AchipA
I've been customizing some forms that needed to be editable by a designer - we ended up having something I would call 'formify', at least for the time of the development cycle. What's the idea here you ask ? Imagine the following: form=FORM(SELECT(...), INPUT(..), INPUT(...)) Now, this all nice

[web2py:20847] Re: formify ?

2009-04-29 Thread AchipA
customize form markup. It has already been suggested that form can be used for validation and its values can be used in a view with helpers to create custom markup. Yes, that would be addressing form list elements from python. Mighty ugly IMHO when you take into account all you need to do to

[web2py:20712] Re: gzip apps by default

2009-04-28 Thread AchipA
can open it with the proper module (e.g. tarfile, zipfile, etc) and it will handle compression on it's own. On Apr 27, 11:40 pm, mdipierro mdipie...@cs.depaul.edu wrote: http://henry.precheur.org/2009/4/23/GZIP_encoding_%3D_happier_users%3... On Apr 27, 2:45 pm, AchipA attila.cs...@gmail.com

[web2py:20618] Re: gzip apps by default

2009-04-27 Thread AchipA
I don't know how hard/easy it would be to convince cherrypy to gzip content on the http level. It would actually make sense to have that option for ALL text content, too, to minimize bandwidth use (this is a web server level option, completely transparent to clients, and since it relies on

[web2py:20667] Re: gzip apps by default

2009-04-27 Thread AchipA
that there is a real benefit since it takes time to zip/unzip. Massimo On 27 Apr, 08:27, AchipA attila.cs...@gmail.com wrote: I don't know how hard/easy it would be to convince cherrypy to gzip content on the http level. It would actually make sense to have that option for ALL text content

[web2py:20341] Re: Integrated Development Environment with web2py

2009-04-23 Thread AchipA
Another unorthodox but very interesting feature of WingIDE is remote debugging. While not as easy to set up, it potentially allows you to hook/step/inspect a deployed appliance that goes wonky. That's quite a big plus in my book :) On Apr 23, 10:11 am, Iceberg iceb...@21cn.com wrote: I bet that

[web2py:20373] Re: web2py team Geo/GIS project created at Launchpad

2009-04-23 Thread AchipA
Well, there *is* a definition. A geographic information system (GIS), or geographical information system, captures, stores, analyzes, manages, and presents data that is linked to location. In the context of web2py, it sure can make for a darn good interface to other GIS related tools, but has no

[web2py:20390] Re: web2py team Geo/GIS project created at Launchpad

2009-04-23 Thread AchipA
Let's say http://watch.tampabay.com/homes/pinellas/neighborhood/allendale/ and http://houstoncrimemaps.com/neighborhood/university-place/ as examples. The key aspect here is that you extract attribute data with *spatial* operations (like operation on values belonging to a point within a

[web2py:20237] Re: Issues about cron

2009-04-22 Thread AchipA
...@21cn.com wrote: On Apr17, 3:44am, AchipA attila.cs...@gmail.com wrote: Linux definitely works, all crom modes, I have it in production in all three modes. Had no Mac reports so don't know about those. Achipa, to upset you again, today I deploy my app on Linux for my first time, and find

  1   2   3   4   >