Is there any value in this article for your case?
http://code.activestate.com/recipes/519621-object-finalization-without-__del__-and-without-ha/
Ron
On Jan 7, 10:20 pm, puercoespin jzaragoza.puercoes...@gmail.com
wrote:
Is there an errata file of the printed book? Because Lulu's book has
many errors, and I have to be in comparison to the online version of
it.
Not an official one, as far as I know, but there are community
members who keep
On Jan 7, 11:45 pm, Michele Comitini michele.comit...@gmail.com
wrote:
I think the most misunderstood fact with web2py is that web2py
implementation is improving every day,
Do you really think the designers of other web frameworks do not
understand how web2py works? They definitely understand,
I had another idea which is a simplification on my first one : an
action acting like a proxy on the php server.
I just wrote a little POC that seems to work. Here are the few lines
to put in a controller:
import urllib
def make_get_stuff(an_url):
def get_stuff():
+1
On Saturday, January 8, 2011 7:31:38 AM UTC-5, cjrh wrote:
On Jan 7, 11:45 pm, Michele Comitini michele@gmail.com
wrote:
I think the most misunderstood fact with web2py is that web2py
implementation is improving every day,
Do you really think the designers of other web
On Saturday, January 8, 2011 9:12:55 AM UTC-5, Anthony wrote:
+1
On Saturday, January 8, 2011 7:31:38 AM UTC-5, cjrh wrote:
On Jan 7, 11:45 pm, Michele Comitini miche...@gmail.com
wrote:
I think the most misunderstood fact with web2py is that web2py
implementation is improving every
I think we could do ourselves a favor by taking the feedback seriously and
not being so dismissive of criticism. There are pros and cons of the various
approaches and we happen to think Web2py's design decisions have good merit.
Hiding behind DRY for the importing situation is not productive.
On Saturday, January 8, 2011 9:53:18 AM UTC-5, pbreit wrote:
I think we could do ourselves a favor by taking the feedback seriously and
not being so dismissive of criticism. There are pros and cons of the various
approaches and we happen to think Web2py's design decisions have good merit.
The change in trunk fixes the problem for every class that does not
have a __del__ attribute. Classes that have a __del__ attribute may
cause a memory leak (on cpython, not on jython).
On Jan 7, 11:41 pm, Anthony abasta...@gmail.com wrote:
As far as I can tell, the change in trunk didn't have
web2py Shell Version 1.91.6 (2011-01-03 17:55:14)
In [1] : a = []
In [2] : a.append(1)
In [3] : a
[]
fix pls
Hi,
I think I've narrowed down the problem - web2py doesn't escape
backslashes
in its SQL strings. Everything I found on the web said that
backslashes had
to be escaped for SQL (though I couldn't confirm this with an official
document).
My solution is to add escaping of backslashes to the last
Hi,
I'm using web2py for a modest project but can't understand how web2py
protects
against trivial SQL injection attacks. I'm using a postgresql
backend.
I was trying (for legitimate reasons) to store a backslash in a text
field.
It appears that web2py does nothing at all with backslashes and
This is what I get from shell:
db=DAL()
db.define_table('x',Field('y'))
db.x.insert(y='hello\world')
1
print db.x[1]
Row {'update_record': function lambda at 0x17279b0, 'y': 'hello\
\world', 'id': 1, 'delete_record': function lambda at 0x17279f0}
Which version of postgresql are you using?
In 1.91.1 we moved from our own shell to the google shell:
http://shell.appspot.com/
this is because the google shell works on google app engine. The
problem is that the bug is in the google shell which we use (you can
reproduce the problem there). I have submitted a bug report to the
authors a
On Jan 8, 2011, at 5:43 AM, jeff wrote:
And I have obviously to write some lines in routes.py like (the proxy
action is in the w.py controller of the poc app):
(r'.*:http://.*:.* /(?Pany(?:admin/|poc/).*)',
r'/\gany'),
(r'.*:http://.*:.* /(?Pany.*)',
r'/poc/w/proxy/vars=\gany'), # I
Without actually trying it, but it still seems the cause for memory
leak of (A) and (B) is different. (B) is a case of circular reference,
and as such reference counting garbage collection (cpython) will fail
to work properly.
But (A), which is the leak in web2py, does not seem to related to
thx ;)
On 8 янв, 20:59, Massimo Di Pierro massimo.dipie...@gmail.com wrote:
In 1.91.1 we moved from our own shell to the google shell:
http://shell.appspot.com/
this is because the google shell works on google app engine. The
problem is that the bug is in the google shell which we use (you
On Jan 7, 2011, at 1:56 PM, VP wrote:
Thanks.
What if I have something like this:
example1.com /app1/controller1
example1.net /app1/controller2
How would this translate into this new syntax?
I've been thinking about this one a little more, and I see a problem. When we
rewrite
I don't get why there is a problem. I did a scan of the latest trunk and did
not find a __del__ function anywhere.
If the sample code is run with the __del__ it accumulates memory rapidly.
Comment out the __del__ method which does nothing in this example and the
memory accumulation is no
Let's say i have a table like:
db.define_table('item_quantity',
Field('item', db.item,
requires=IS_IN_DB(db, db.item.id,'%(name)s'),
represent=lambda x: x.name),
Field('quantity', 'double', notnull=True, default=0.0,
comment=in ounces),
Field('name', length=500,
Hi,
would anyone have a suggestion with the following.
CONTEXT:
For most remote employees, visibility and easy communication can be a
challenge. Showing status on work items, requests and work load
(items queued up) is essential (someone had referred to this as
optics). SInce this is my case,
Hi, I'm working (much slower than what I'd like because of Real World
issues) in the packaging of web2py.
Most of the work is done, excepting for a recurrent problem:
permissions
Trying to fullfil the FHS (
http://wiki.debian.org/FilesystemHierarchyStandard ) , I've moved the gluon
libraries to
On Jan 8, 2011, at 11:29 AM, Jos? L. wrote:
Anyway I know I'll have to patch the admin application in order to remove
the remote upgrade of web2py as this option is not allowed in Debian packages
(it's removed from firefox or openoffice too).
Perhaps this should be a configuration option of
We occasionally got an Apache error so the page didn't get displayed.
So I decided to stress test using Apache Bench (ab). It seems the
site suffered failure up to 50-100 concurrent connection.
Apache error log showed this error:
Premature end of script headers: wsgihandler.py
After digging
Hi,
I've defined my table with certain restrictions and default values. For
example set some fields as required, and some have default values.
When I look at the table schema that it created, the default values and
restrictions aren't set at the database level. Is there a way to do this
with
All I know is that tables are issued as lowercase, but you can still access
your table as an uppercase attribute.
There is an inconsistency in the DAL somewhere because of this... Somewhere
it is forgetting to convert to lower case. I don't know why converting table
names to lower case is forced
Sorry, I wasn't paying attention -- I had put the code in there prior to the
issue about __del__ being raised. The leak is now gone in my testing.
Thanks.
Anthony
On Saturday, January 8, 2011 10:43:13 AM UTC-5, Massimo Di Pierro wrote:
The change in trunk fixes the problem for every class
Looks like there's a lot of dissatisfaction with Blackboard (and Moodle):
http://www.reddit.com/r/programming/comments/eye4y/shame_on_you_blackboard/
i have some tables to rate files by week, month, year etc..
i have some function like this:
def index():
if request.args(0) == 'all':
rolics =
db(db.rolic.id==db.rating_all.rolic_id).select(db.rolic.all,
db.rating_all.rating, orderby=~db.rating_all.rating)
elif request.args(0) ==
Wouldn't this be misleading because the computed field depends on the
value of fields that may have been edited?
On Jan 8, 12:25 pm, howesc how...@umich.edu wrote:
Let's say i have a table like:
db.define_table('item_quantity',
Field('item', db.item,
requires=IS_IN_DB(db,
I will add it.
On Jan 8, 1:38 pm, Jonathan Lundell jlund...@pobox.com wrote:
On Jan 8, 2011, at 11:29 AM, Jos? L. wrote:
Anyway I know I'll have to patch the admin application in order to remove
the remote upgrade of web2py as this option is not allowed in Debian
packages (it's removed
what db engine? varchar should be the default.
You can use
Field('modified_on''datetime',update=request.now,writable=False) to
timestamp on update.
On Jan 8, 2:54 pm, Martin H helpmh...@gmail.com wrote:
Hi,
I've defined my table with certain restrictions and default values. For
example set
We should have a flag to change this behavior DAL(...,lowercase=True).
I would take a patch.
On Jan 8, 2:58 pm, Thadeus Burgess thade...@thadeusb.com wrote:
All I know is that tables are issued as lowercase, but you can still access
your table as an uppercase attribute.
There is an
i have one solution like this:
d = dict(rolics=rolics)
for row in d['rolics']:
row['rating']=row['rating_all']
return response.render('default/main.html', d)
but it seems some stupid :)
Two ingredients case a memory leak in ANY python program: __del__ and
circular references. You need them both.
In the case of web2py exec code in {} creates the circular reference
for objects defined in the code. This does not mean web2py has a
memory leak. In fact, as pointed out, no web2py
I am using sqlite right now. My app will eventually be running in MySQL and
sqlite.
On mysql, web2py uses varchar. On sqlite there is no difference
(sqlite does not enforce field types anyway).
Massimo
On Jan 8, 4:55 pm, Martin H helpmh...@gmail.com wrote:
I am using sqlite right now. My app will eventually be running in MySQL and
sqlite.
What about the restrictions and default values? I would like to have default
values and restrictions like required and unique be set at the database
level so that when working on it by hand, defaults are there are well as
restrictions. Is there a way to set those in web2py so that it creates
On Saturday, January 8, 2011 5:48:06 PM UTC-5, Massimo Di Pierro wrote:
Two ingredients case a memory leak in ANY python program: __del__ and
circular references. You need them both.
In the case of web2py exec code in {} creates the circular reference
for objects defined in the code.
On Jan 8, 2011, at 2:48 PM, Massimo Di Pierro wrote:
In the case of web2py exec code in {} creates the circular reference
for objects defined in the code.
What is the circular reference?
def f(): pass
...
f.func_globals
{'A': class __main__.A at 0x465d20, 'a': __main__.A instance at
0x470260, 'f': function f at 0x46a630, '__builtins__': module
'__builtin__' (built-in), '__name__': '__main__', '__doc__': None}
globals()
{'A': class __main__.A at 0x465d20, 'a': __main__.A
From your original message, I was assuming you did not wish to run a PHP
server at all. If running a PHP server is allowed, it is possible to run
Web2Py and PHP side-by-side, in parallel:
- http://web2py.relevantmatter.com/welcome/
- http://web2py.relevantmatter.com/presite/phpinfo.php3
I have a componentized system with an upload field which I load into
an iframe. When I fill in the form component and click submit, the
file gets uploaded properly. However, I also have an ajax function
that is supposed to trigger the updating of other parts of the screen,
but it doesn't work. I
You were possibly using a an old version of sqlite which isn't safe to use
in a multithreaded configuration.
The MPM settings are not going to help in this case as that error could only
come about because you are using mod_wsgi daemon mode and so application is
running in distinct process and
I should also note that the divs I'm trying to update are outside the
iframe.
Graham, welcome. Careful, though -- we might
converthttp://twitter.com/GrahamDumpleton/status/23120780938190848you. ;-)
http://twitter.com/GrahamDumpleton/status/23120780938190848
On Saturday, January 8, 2011 10:59:37 PM UTC-5, Graham Dumpleton wrote:
You were possibly using a an old
This is beautiful.
@Massimo check this out it has a potential for a huge effect on the
request latency if the database supports async requests. Postgres
does. Imagine your views if the supported futures and rendered the
template as results from the database and tasklets became available.
You can
Thanks for the extra explanation.
You have to have a __del__ method in the class to get the leak
Let me second the Plone for CMS/Web2py for rapid apps meme.
I'm also a regular user of Plone and Plone 4 is excellent. Point of
trivia, while Plone latest release has gotten faster, Drupal's latest
release has gotten slower.
Anyway I've had to dive into web2py because it was the best choice for
To get the leak the __del__method has to be in the class. The gc.collect()
as suggested by Massimo cured the leak for the exec code case I believe
because gc.collect() runs a test on the objects to see if there are any
external references, finds none, and therefore allows them to be removed
On Sunday, January 9, 2011 3:54:37 PM UTC+11, Anthony wrote:
Graham, welcome. Careful, though -- we might
converthttp://twitter.com/GrahamDumpleton/status/23120780938190848you. ;-)
http://twitter.com/GrahamDumpleton/status/23120780938190848
I have been posting here for quite a long
Currently the DAL does not support async but I guess we can add
support for it. I will take a closer look in the next few days.
On Jan 8, 11:25 pm, dspiteself dspites...@gmail.com wrote:
This is beautiful.
@Massimo check this out it has a potential for a huge effect on the
request latency if
Graham. We all appreciate your expertise here and appreciate people
who say what they think. Perhaps diplomacy is not our strength. You do
not need to justify your tweet. I though it was funny because - in my
view - it would apply equally well to some of the other frameworks.
On Jan 9, 12:24 am,
Hi,
I am creating a form for adding user accounts. My model has a password
field. In the form, I would like to add a 'repeat password' field, but I
don't want to store that in the database. I can't seem to find a way to add
a form field in crud or SQLFORM.
Is my only option to manually create
On Sunday, January 9, 2011 6:05:16 PM UTC+11, Massimo Di Pierro wrote:
Graham. We all appreciate your expertise here and appreciate people
who say what they think. Perhaps diplomacy is not our strength. You do
not need to justify your tweet. I though it was funny because - in my
view -
Hello,
I´m creating a form with SQLFORM(db.t_order, order_id)
so I get a form with values.
As the data has been queried from the database I´d like to get a value
from one of the fields a do some customization based on it. But how do I
get the value of field f_sum from the form?
Kenneth
57 matches
Mail list logo