Is this a bug or a feature?
class mydict(dict):
def __setitem__(self, key, val):
print 'foo'
dict.__setitem__(self, key, val)
>>> d=mydict()
>>> d[1]=2
foo
>>> d.setdefault(2,3)
3
rg
--
http://mail.python.org/mailman/listinfo/python-list
In article <[EMAIL PROTECTED]>,
"Sean Berry" <[EMAIL PROTECTED]> wrote:
> I am using MySQLdb to connect to a database and retrieve a timestamp from a
> table. The problem is I want the timestamp as a long, unformatted and all.
>
> In the table I have a timestamp like this
> 20051019111617
>
>
In article <[EMAIL PROTECTED]>,
"Erik Bethke" <[EMAIL PROTECTED]> wrote:
>
> I have NEVER experienced this kind of programming joy.
Just wait until you discover Lisp!
;-)
rg
--
http://mail.python.org/mailman/listinfo/python-list
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Aahz)
wrote:
> In article <[EMAIL PROTECTED]>,
> Roy Smith <[EMAIL PROTECTED]> wrote:
> >In article <[EMAIL PROTECTED]>,
> > Ron Garret <[EMAIL PROTECTED]> wrote:
> >> In article &l
In article <[EMAIL PROTECTED]>,
Mark McEahern <[EMAIL PROTECTED]> wrote:
> Ron Garret wrote:
>
> > But this topic does bring up a legitimate question: I have a bunch of
> > code that generates HTML using PRINT statements. I need to convert
> > all thi
In article <[EMAIL PROTECTED]>,
Just <[EMAIL PROTECTED]> wrote:
> In article <[EMAIL PROTECTED]>,
> Simo Melenius <[EMAIL PROTECTED]> wrote:
>
> > I've sometimes replaced sys.stdout (and/or sys.stderr) to
> > capture/redirect debugging information in existing code that has
> > unwisely just "pr
In article <[EMAIL PROTECTED]>,
jfj <[EMAIL PROTECTED]> wrote:
> Ron Garret wrote:
> > In article <[EMAIL PROTECTED]>,
> > "Erik Bethke" <[EMAIL PROTECTED]> wrote:
> >
> >
> >>I have NEVER experienced this ki
In article <[EMAIL PROTECTED]>,
Benji York <[EMAIL PROTECTED]> wrote:
> Peter Maas wrote:
> > >>> suffix = 'var'
> > >>> vars()['a%s' % suffix] = 45
> > >>> avar
> > 45
>
> Quoting from http://docs.python.org/lib/built-in-funcs.html#l2h-76 about
> the "vars" built in:
>
> The returned dicti
In article <[EMAIL PROTECTED]>,
Robert Kern <[EMAIL PROTECTED]> wrote:
> In the
> bowels of my modules, I may not know what the contents are at code-time,
Then how do you write your code?
rg
--
http://mail.python.org/mailman/listinfo/python-list
In article <[EMAIL PROTECTED]>,
Steve Holden <[EMAIL PROTECTED]> wrote:
> rafi wrote:
> > Reinhold Birkenfeld wrote:
> >
> >
> exec(eval("'a%s=%s' % (count, value)"))
> >>>
> >>>why using the eval?
> >>>
> >>>exec ('a%s=%s' % (count, value))
> >>>
> >>>should be fine
> >>
> >>And this demo
In article <[EMAIL PROTECTED]>,
Thomas Guettler <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Is there a way to import a file without creating
> a .pyc file?
>
> Of course you can delete the pyc in my script after
> the import statement, but maybe there is a switch
> that I have not found yet.
>
> The
In article <[EMAIL PROTECTED]>,
Leif K-Brooks <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > Why doesn't this work?
> >
> >
> def foo(lst):
> >
> > ... class baz(object):
> > ... def __getitem__(cls, idx): return cls.lst[idx]
> > ... __getitem__=classmethod(__getitem__
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] (Bengt Richter) wrote:
> On 14 Mar 2005 17:43:53 -0800, [EMAIL PROTECTED] wrote:
>
> >
> >Why doesn't this work?
> >
> def foo(lst):
> >... class baz(object):
> >... def __getitem__(cls, idx): return cls.lst[idx]
> >... __getitem__
In article <[EMAIL PROTECTED]>,
Ron Garret <[EMAIL PROTECTED]> wrote:
Wow, this is really cool:
> What I'm really trying to do is to create enumerated types...
And the code I ended up with is:
# Inheriting from type, not object, is the key:
class enum_metaclass(type):
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] (Bengt Richter) wrote:
> >Did you mean type(x).__getitem__(x,y)?
> >
> Not if x is a classmethod,
Oh yeah, right. Duh!
> >And where is this documented?
> Between the lines in my previous post ;-)
I see. I guess I wasn't asking a stupid questi
In article <[EMAIL PROTECTED]>,
Steven Bethard <[EMAIL PROTECTED]> wrote:
> Ron Garret wrote:
> > What I'm really trying to do is to create enumerated types such that if:
> >
> > e1 = enum(lst) and v = e1(x)
> >
> > then
> >
> >
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] (Bengt Richter) wrote:
> On Mon, 14 Mar 2005 23:44:46 -0700, Steven Bethard <[EMAIL PROTECTED]>
> wrote:
>
> >Ron Garret wrote:
> >> What I'm really trying to do is to create enumerated types such that i
In article <[EMAIL PROTECTED]>,
Steven Bethard <[EMAIL PROTECTED]> wrote:
> > Yeah, except I actually left out one thing: I also want type(v)==e1.
>
> Why? In Python usually you rely on duck-typing and not explicit type
> checks. What is it that you're trying to gain by asserting type(v) ==
In article <[EMAIL PROTECTED]>,
Steven Bethard <[EMAIL PROTECTED]> wrote:
> Ron Garret wrote:
> > In article <[EMAIL PROTECTED]>,
> > Steven Bethard <[EMAIL PROTECTED]> wrote:
> >
> >>>Yeah, except I actually left out one thing: I al
Python programmer needed to do web development for an early-stage
entertainment industry startup company. We prefer someone in the
northern LA area (the company offices are in Altadena), but will
consider telecommuters. Please email resumes to me at ron at
flownet.com.
rg
--
http://mail.py
I need to dynamically generate new types at run time. I can do this in
two ways. I can use the "type" constructor, or I can generate a "class"
statement as a string and feed that to the exec function. The former
technique is much cleaner all else being equal, but I want to be able to
specif
In article <[EMAIL PROTECTED]>,
Leif K-Brooks <[EMAIL PROTECTED]> wrote:
> Ron Garret wrote:
> > I need to dynamically generate new types at run time. I can do this in
> > two ways. I can use the "type" constructor, or I can generate a "class"
In article <[EMAIL PROTECTED]>,
Steven Bethard <[EMAIL PROTECTED]> wrote:
> Ron Garret wrote:
> > I need to dynamically generate new types at run time. I can do this in
> > two ways. I can use the "type" constructor, or I can generate a "class"
Why doesn't this work?
>>> from weakref import ref
>>> class C(str): pass
...
>>> ref(C())
Traceback (most recent call last):
File "", line 1, in ?
TypeError: cannot create weak reference to 'C' object
>>>
Note that this does work:
>>> class D(int): pass
...
>>> ref(D())
>>>
Likewise for
In article <[EMAIL PROTECTED]>,
Steven Bethard <[EMAIL PROTECTED]> wrote:
> Ron Garret wrote:
> > Why doesn't this work?
> >
> >>>>from weakref import ref
> >>>>class C(str): pass
> > ...
> >>>>ref(C())
>
In article <[EMAIL PROTECTED]>,
Peter Hansen <[EMAIL PROTECTED]> wrote:
> Steven Bethard wrote:
> > Ron Garret wrote:
> >> None of the native types (int, float, list, tuple, etc.) can have weak
> >> references, but wrapping them in a class is supposed
In article <[EMAIL PROTECTED]>,
Peter Hansen <[EMAIL PROTECTED]> wrote:
> Ron Garret wrote:
> >>>>foo(int)
> >>>>foo(float)
> >>>>foo(dict)
> >>>>foo(list)
> >>>>foo(str)
> > TypeError: cannot create
In article <[EMAIL PROTECTED]>,
"Raymond Hettinger" <[EMAIL PROTECTED]> wrote:
> [Ron Garret]
> > Why doesn't this work?
> >
> > >>> from weakref import ref
> > >>> class C(str): pass
> > ...
> > >>&
In article <[EMAIL PROTECTED]>,
"Raymond Hettinger" <[EMAIL PROTECTED]> wrote:
> [Ron Garret]
> > Thanks for the detailed explanation. I understand now why you can't
> > create weakrefs to these types. What I don't understand still is why
> &
In article <[EMAIL PROTECTED]>,
Roy Smith <[EMAIL PROTECTED]> wrote:
> In article <[EMAIL PROTECTED]>,
> "Sam Pointon" <[EMAIL PROTECTED]> wrote:
>
> > Would this particular inconsistency be candidate for change in Py3k?
> > Seems to me the pos and endpos arguments are redundant with slicing,
>
Python 2.3.5 (#1, Jan 30 2006, 13:30:29)
[GCC 3.3 20030304 (Apple Computer, Inc. build 1819)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from datetime import datetime
>>> class ts(datetime):
... def __init__(self): pass
...
>>> ts()
Traceback (most rece
In article <[EMAIL PROTECTED]>,
Larry Bates <[EMAIL PROTECTED]> wrote:
> Because datetime is a new-style class:
Ah.
> The Constructor __new__
>
> If you are like me, then you probably always thought of the __init__ method
> as
> the Python equivalent of what is called a constructor in C++. Th
In article <[EMAIL PROTECTED]>,
"Marshall" <[EMAIL PROTECTED]> wrote:
> The conversation I would *really* like to have is the one where we
> discuss what all the differences are, functionally, between the two,
> and what the implications of those differences are, without trying
> to address which
I'm write a web server using BaseHTTPServer. It can't be a CGI because
it has to do some weird server-push stuff as database updates come in.
But I still need to process form inputs as if it were a CGI. But the
cgi module only works in a CGI environment. Is there something with the
equivale
I'm trying to figure out how to use BaseHTTPServer. Here's my little
test app:
=
#!/usr/bin/python
from BaseHTTPServer import *
import cgi
class myHandler(BaseHTTPRequestHandler):
def do_GET(r):
s = ''
try:
s = cgi.parse_qs(r.rfile.read(int(r.
In article <[EMAIL PROTECTED]>,
Steve Holden <[EMAIL PROTECTED]> wrote:
> The normal way is
>
> s = cgi.parse()
>
> since the CGI script sees the client network socket (after consumption
> of HTTP headers) as its standard input.
Doesn't work. (I even tried sys.stdin=r.rfile; s=cgi.parse())
In article <[EMAIL PROTECTED]>,
Steve Holden <[EMAIL PROTECTED]> wrote:
> But basically, you aren't providing a CGI environment, and that's why
> cgi.parse() isn't working.
Clearly. So what should I be doing? Surely I'm not the first person to
have this problem?
I have managed to work aroun
In article <[EMAIL PROTECTED]>,
Steve Holden <[EMAIL PROTECTED]> wrote:
> Ron Garret wrote:
> > In article <[EMAIL PROTECTED]>,
> > Steve Holden <[EMAIL PROTECTED]> wrote:
> >
> >
> >>But basically, you aren't providing
In article <[EMAIL PROTECTED]>,
Kent Johnson <[EMAIL PROTECTED]> wrote:
> Steve Holden wrote:
> > Ron Garret wrote:
> >> In article <[EMAIL PROTECTED]>,
> >> Steve Holden <[EMAIL PROTECTED]> wrote:
> >>
> >>
> &
In article <[EMAIL PROTECTED]>,
Damjan <[EMAIL PROTECTED]> wrote:
> >> But basically, you aren't providing a CGI environment, and that's why
> >> cgi.parse() isn't working.
> >
> > Clearly. So what should I be doing?
>
> Probably you'll need to read the source of cgi.parse_qs (like Steve did)
In article <[EMAIL PROTECTED]>,
Steve Holden <[EMAIL PROTECTED]> wrote:
> I wouldn't necessarily say you are wrong here, It's just that the cgi
> module has sort of "just growed", so it isn't conveniently factyored for
> reusability in other contexts. Several people (including me) have taken
>
One of the things I find annoying about Python is that when you make a
change to a method definition that change is not reflected in existing
instances of a class (because you're really defining a new class when
you reload a class definition, not actually redefining it). So I came
up with thi
In article <[EMAIL PROTECTED]>,
"Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> Ron Garret schrieb:
> > One of the things I find annoying about Python is that when you make a
> > change to a method definition that change is not reflected in existing
>
In article <[EMAIL PROTECTED]>,
"Hendrik van Rooyen" <[EMAIL PROTECTED]> wrote:
> "Ron Garret" <[EMAIL PROTECTED]> wrote:
>
>
> >
> > One of the things I find annoying about Python is that when you make a
> > change to a method
In article <[EMAIL PROTECTED]>,
Ron Garret <[EMAIL PROTECTED]> wrote:
> In article <[EMAIL PROTECTED]>,
> "Hendrik van Rooyen" <[EMAIL PROTECTED]> wrote:
>
> > "Ron Garret" <[EMAIL PROTECTED]> wrote:
> >
> >
>
In article <[EMAIL PROTECTED]>,
"Paul McGuire" <[EMAIL PROTECTED]> wrote:
> "Carl Banks" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> >
> > A straightforward, Pythonic way to do it would be to create an
> > intermediate representation that understands both the existing class
>
If I do this:
def f(self): print self
class c1: pass
setattr(c1, 'm1', f)
Then f is automagically transmogrified into the appropriate sort of
method depending on how it is used:
>>> c1.m1
>>> c1().m1
>
>>> c1().m1()
<__main__.c1 instance at 0x51ec60>
Note that m1 gets passed a self argument
In article <[EMAIL PROTECTED]>,
Kent Johnson <[EMAIL PROTECTED]> wrote:
> Ron Garret wrote:
> > The reason I want to do this is that I want to implement a trace
> > facility that traces only specific class methods. I want to say:
> >
> > trace(c1.m1)
>
In article <[EMAIL PROTECTED]>,
"Michele Simionato" <[EMAIL PROTECTED]> wrote:
> Duncan Booth wrote:
> > Ron Garret <[EMAIL PROTECTED]> wrote:
> >
> > > I want to say:
> > >
> > > trace(c1.m1)
> > >
> > > an
In article <[EMAIL PROTECTED]>,
"Carl Banks" <[EMAIL PROTECTED]> wrote:
> The principle behind this is pretty much "it was just a language design
> decision".
Yes, and I'm not taking issue with the decision, just pointing out that
the desire to do things differently is not necessarily perverse.
In article <[EMAIL PROTECTED]>,
"Michele Simionato" <[EMAIL PROTECTED]> wrote:
> Ron Garret wrote:
> > One of the things I find annoying about Python is that when you make a
> > change to a method definition that change is not reflected in existing
> >
Here's my code. It's a teeny weeny little HTTP server. (I'm not really
trying to reinvent the wheel here. What I'm really doing is writing a
dispatching proxy server, but this is the shortest way to illustrate the
problem I'm having):
from SocketServer import *
from socket import *
from sele
In article <[EMAIL PROTECTED]>,
Bjoern Schliessmann <[EMAIL PROTECTED]>
wrote:
> > The only difference I can discern is that the browser send \r\n
> > for end-of-line while telnet just sends \n.
...
> > But I don't see why that should make any difference.
>
> Easy. If you only accept "\r\n
In article <[EMAIL PROTECTED]>,
Irmen de Jong <[EMAIL PROTECTED]> wrote:
> Ron Garret wrote:
> > Here's my code. It's a teeny weeny little HTTP server. (I'm not really
> > trying to reinvent the wheel here. What I'm really doing is writing a
In article <[EMAIL PROTECTED]>,
Ron Garret <[EMAIL PROTECTED]> wrote:
> Here's my code. It's a teeny weeny little HTTP server. (I'm not really
> trying to reinvent the wheel here. What I'm really doing is writing a
> dispatching proxy server, but t
I think I've figured out what's going on.
First, here's the smoking gun: I changed the code as follows:
class myHandler(StreamRequestHandler):
def handle(self):
print '>>>'
while 1:
sl = select([self.rfile],[],[],1)[0]
print sl
l = self.rfile.readline()
i
In article <[EMAIL PROTECTED]>,
Ron Garret <[EMAIL PROTECTED]> wrote:
> The answer is obvious: select is looking only at the underlying socket,
> and not at the rfile buffers.
Here is conclusive proof that there's a bug in select:
from socket import *
from select
In article <[EMAIL PROTECTED]>,
Erik Max Francis <[EMAIL PROTECTED]> wrote:
> Ron Garret wrote:
>
> > So this is clearly a bug, but surely I'm not the first person to have
> > encountered this? Is there a known workaround?
>
> It's hard to see
In article <[EMAIL PROTECTED]>,
Erik Max Francis <[EMAIL PROTECTED]> wrote:
> Ron Garret wrote:
>
> > Geez you people are picky. Since I ran this several times I ran into
> > the TIM_WAIT problem. Here's the actual transcript:
>
> It's not abou
In article <[EMAIL PROTECTED]>,
Dennis Lee Bieber <[EMAIL PROTECTED]> wrote:
> Well, on WinXP, Python 2.4, with
I should have specified: I'm running 2.5 on unix. (I've reproduced the
problem on both Linux and OS X.)
rg
--
http://mail.python.org/mailman/listinfo/python-list
In article <[EMAIL PROTECTED]>,
Irmen de Jong <[EMAIL PROTECTED]> wrote:
> Ron Garret wrote:
> > I don't understand why socketserver calling select should matter. (And
> > BTW, there are no calls to select in SocketServer.py. I'm using
> > Python
In article <[EMAIL PROTECTED]>,
"Gabriel Genellina" <[EMAIL PROTECTED]> wrote:
> En Mon, 23 Apr 2007 04:33:22 -0300, Ron Garret <[EMAIL PROTECTED]>
> escribió:
>
> > I have not been able to find a proxy server that can proxy to unix
> > socket
In article <[EMAIL PROTECTED]>,
Jean-Paul Calderone <[EMAIL PROTECTED]> wrote:
> Twisted does this out of the box, for what it's worth.
Thanks. I will look at that.
rg
--
http://mail.python.org/mailman/listinfo/python-list
In article <[EMAIL PROTECTED]>,
Donn Cave <[EMAIL PROTECTED]> wrote:
> In article <[EMAIL PROTECTED]>,
> Ron Garret <[EMAIL PROTECTED]> wrote:
>
> > The answer is obvious: select is looking only at the underlying socket,
> > and not at the rfile bu
The wsgiref module in Python 2.5 seems to be empty:
[EMAIL PROTECTED]:~/Sites/modpy]$ python
Python 2.5 (r25:51908, Mar 1 2007, 10:09:05)
[GCC 4.0.1 (Apple Computer, Inc. build 5367)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import wsgiref
>>> dir(wsgi
In article <[EMAIL PROTECTED]>,
Stargaming <[EMAIL PROTECTED]> wrote:
> Ron Garret wrote:
> > The wsgiref module in Python 2.5 seems to be empty:
> >
> > [EMAIL PROTECTED]:~/Sites/modpy]$ python
> > Python 2.5 (r25:51908, Mar 1 2007, 10:09:05)
> >
Is there a way to change the default string encoding used by the
string.encode() method? My default environment is utf-8 but I need it
to be latin-1 to avoid errors like this:
>>> 'Andr\xe9 Ramel'.decode()
Traceback (most recent call last):
File "", line 1, in
UnicodeDecodeError: 'a
In article <[EMAIL PROTECTED]>,
Peter Otten <[EMAIL PROTECTED]> wrote:
> If all else fails there's
>
> >>> sys.setdefaultencoding("latin1")
> >>> "Andre\xe9 Ramel".decode()
> u'Andre\xe9 Ramel'
>
> but that's an evil hack, you should rather talk to the maintainer of the
> offending code to upda
I have a fairly large web app written in Python as a CGI fairly
elaborate CGI. All of the requests go through a single CGI script which
does authentication and session management and then dispatches to one of
a number of handlers that generate the various pages.
There is one page that is a per
In article <[EMAIL PROTECTED]>,
Ron Garret <[EMAIL PROTECTED]> wrote:
> Does
> anyone know of a straightforward way to get Apache to "forward" requests
> to a given path to another HTTP server running on a different port?
Never mind, I think I figured it out.
In article <[EMAIL PROTECTED]>,
"Luis M. González" <[EMAIL PROTECTED]> wrote:
> On Apr 13, 8:44 pm, Ron Garret <[EMAIL PROTECTED]> wrote:
> > In article <[EMAIL PROTECTED]>,
> > Ron Garret <[EMAIL PROTECTED]> wrote:
> >
> >
I have installed Python 2.5 on my new Intel Mac but I can't for the life
of me get readline to work. I have libreadline installed, I've tried
copying readline.so from my Python 2.3 installation into 2.5, I've
searched the web, and no joy. Could someone please give me a clue?
rg
--
http://mai
In article <[EMAIL PROTECTED]>,
Irmen de Jong <[EMAIL PROTECTED]> wrote:
> Ron Garret wrote:
> > I have installed Python 2.5 on my new Intel Mac but I can't for the life
> > of me get readline to work. I have libreadline installed, I've tried
>
In article <[EMAIL PROTECTED]>,
James Stroud <[EMAIL PROTECTED]> wrote:
> Ron Garret wrote:
> > I have installed Python 2.5 on my new Intel Mac but I can't for the life
> > of me get readline to work. I have libreadline installed, I've tried
>
In article <[EMAIL PROTECTED]>,
James Stroud <[EMAIL PROTECTED]> wrote:
> Ron Garret wrote:
> > In article <[EMAIL PROTECTED]>,
> > James Stroud <[EMAIL PROTECTED]> wrote:
> >
> >>Is LD_LIBRARY_PATH pointing to the directory libreadline.dyl
I'm trying to run the Python examples distributed with XCode and they
all give me the same error:
Traceback (most recent call last):
File "checktext.py", line 35, in
main()
File "checktext.py", line 8, in main
pathname = EasyDialogs.AskFileForOpen(message='File to check
end-of-lines
In article <[EMAIL PROTECTED]>,
Robert Kern <[EMAIL PROTECTED]> wrote:
> Ron Garret wrote:
> > I'm trying to run the Python examples distributed with XCode and they
> > all give me the same error:
> >
> > Traceback (most recent call last):
> >
In article <[EMAIL PROTECTED]>,
Robert Kern <[EMAIL PROTECTED]> wrote:
> Ron Garret wrote:
> > In article <[EMAIL PROTECTED]>,
> > Robert Kern <[EMAIL PROTECTED]> wrote:
>
> >> Note that in recent versions of Python, I believe that the pythonw
>>> u'\xbd'
u'\xbd'
>>> print _
Traceback (most recent call last):
File "", line 1, in ?
UnicodeEncodeError: 'ascii' codec can't encode character u'\xbd' in
position 0: ordinal not in range(128)
>>>
--
http://mail.python.org/mailman/listinfo/python-list
In article <[EMAIL PROTECTED]>,
Fredrik Lundh <[EMAIL PROTECTED]> wrote:
> Ron Garret wrote:
>
> >>>> u'\xbd'
> > u'\xbd'
> >>>> print _
> > Traceback (most recent call last):
> > File "", line
In article <[EMAIL PROTECTED]>,
Robert Kern <[EMAIL PROTECTED]> wrote:
> Ron Garret wrote:
>
> > I forgot to mention:
> >
> >>>>sys.getdefaultencoding()
> >
> > 'utf-8'
>
> A) You shouldn't be able to do that.
Wha
In article <[EMAIL PROTECTED]>,
"Serge Orlov" <[EMAIL PROTECTED]> wrote:
> Ron Garret wrote:
> > In article <[EMAIL PROTECTED]>,
> > Robert Kern <[EMAIL PROTECTED]> wrote:
> >
> > > Ron Garret wrote:
> > &
In article <[EMAIL PROTECTED]>,
Robert Kern <[EMAIL PROTECTED]> wrote:
> Ron Garret wrote:
>
> > I'm using an OS X terminal to ssh to a Linux machine.
>
> Click on the "Terminal" menu, then "Window Settings...". Choose "Display&qu
In article <[EMAIL PROTECTED]>,
"Serge Orlov" <[EMAIL PROTECTED]> wrote:
> Ron Garret wrote:
> > In article <[EMAIL PROTECTED]>,
> > "Serge Orlov" <[EMAIL PROTECTED]> wrote:
> >
> > > Ron Garret wrote:
> > &g
In article <[EMAIL PROTECTED]>,
"Serge Orlov" <[EMAIL PROTECTED]> wrote:
> Ron Garret wrote:
> > > > I'm using an OS X terminal to ssh to a Linux machine.
> > >
> > > In theory it should work out of the box. OS X terminal should set
&
In article <[EMAIL PROTECTED]>,
"Serge Orlov" <[EMAIL PROTECTED]> wrote:
> Ron Garret wrote:
> > In article <[EMAIL PROTECTED]>,
> > "Serge Orlov" <[EMAIL PROTECTED]> wrote:
> >
> > > Ron Garret wrote:
> > >
In article <[EMAIL PROTECTED]>,
"Serge Orlov" <[EMAIL PROTECTED]> wrote:
> Serge Orlov wrote:
> > Ron Garret wrote:
> > > In article <[EMAIL PROTECTED]>,
> > > "Serge Orlov" <[EMAIL PROTECTED]> wrote:
> > >
>
I'm writing a WSGI application and I would like to check the content-
length header before reading the content to make sure that the content
is not too big in order to prevent denial-of-service attacks. So I do
something like this:
def application(environ, start_response):
status = "200 OK"
On Jan 18, 11:29 am, "Diez B. Roggisch" wrote:
> Ron Garret schrieb:
>
>
>
> > I'm writing a WSGI application and I would like to check the content-
> > length header before reading the content to make sure that the content
> > is not too big in orde
On Jan 18, 11:43 am, Petite Abeille wrote:
> On Jan 18, 2009, at 8:01 PM, Ron Garret wrote:
>
> > def application(environ, start_response):
> > status = "200 OK"
> > headers = [('Content-Type', 'text/html'), ]
> > start_res
On Jan 18, 12:40 pm, "Diez B. Roggisch" wrote:
> Ron Garret schrieb:
>
>
>
> > On Jan 18, 11:29 am, "Diez B. Roggisch" wrote:
> >> Ron Garret schrieb:
>
> >>> I'm writing a WSGI application and I would like to check the conten
On Jan 18, 1:21 pm, Graham Dumpleton
wrote:
> On Jan 19, 6:01 am, Ron Garret wrote:
>
> > I'm writing a WSGI application and I would like to check the content-
> > length header before reading the content to make sure that the content
> > is not too big in order
I'm selecting infrastructure for a web development and I've found two
lightweight frameworks that seem to offer a lot of bang-for-the-byte:
Yaro and WebOb. I'm wondering if anyone here has used either or both
and has opinions about them. What has been your experience with them?
Which do you
Consider the following wsgi app:
def application(env, start_response):
start_response('200 OK',[('Content-type','text/plain')])
yield "hello"
x=1/0
yield "world"
The result of this is that the web browser displays "hello" and an error
message ends up in the web log. But there is no othe
I'm running a WSGI app under apache/mod_wsgi and I've noticed that
whenever I restart the server after making a code change it takes a very
long time (like a minute) before the script is active again. In other
words, I do an apachectl restart, reload the page in my browser, and one
minute late
In article ,
Aleksandar Radulovic wrote:
> Hi there,
>
> On Wed, Jan 28, 2009 at 9:35 PM, Ron Garret wrote:
> > I'm running a WSGI app under apache/mod_wsgi and I've noticed that
>
> Off the bat, there's no reason to run an app under apache/mod_wsgi
&
In article ,
Jean-Paul Calderone wrote:
> On Wed, 28 Jan 2009 13:35:56 -0800, Ron Garret wrote:
> >I'm running a WSGI app under apache/mod_wsgi and I've noticed that
> >whenever I restart the server after making a code change it takes a very
> >long time (like
In article
<4cd232ff-ba8b-47aa-8ee6-d8d9712db...@s1g2000prg.googlegroups.com>,
Graham Dumpleton wrote:
> On Jan 29, 8:35 am, Ron Garret wrote:
> > I'm running a WSGI app under apache/mod_wsgiand I've noticed that
> > whenever I restart the server after makin
In article <498171a5$0$3681$426a7...@news.free.fr>,
Bruno Desthuilliers
wrote:
> Ron Garret a écrit :
> > In article ,
> > Aleksandar Radulovic wrote:
> (snip)
> >> Secondly, why are you restarting apache after code changes? In normal
> >> ci
In article <498170d4$0$23718$426a7...@news.free.fr>,
Bruno Desthuilliers
wrote:
> Ron Garret a écrit :
> > I'm running a WSGI app under apache/mod_wsgi and I've noticed that
> > whenever I restart the server after making a code change it takes a very
> >
1 - 100 of 139 matches
Mail list logo