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
ies list or the knowbies
list.
Maybe just ask us to post *everything* to the .tutor list and let
the question bubble up to this list if it doesn't get answered there? Or
ask us to post to the .tutor list until we've responded to someone else's
post a few times (proven ourselve
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
gif, and it got even bigger (6 - 8
x) -- am I using PIL wrong, or is PIL the wrong tool? If so, how
should I use PIL so it best compresses the outfile? Or, what tool should I
use?
Ron
--
http://mail.python.org/mailman/listinfo/python-list
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
> &
did to solve it. :-(
It is fixable though. I know that's not much help. I'll look at how I
use it in my program and see if that rings any bells.
Ron Adam
--
http://mail.python.org/mailman/listinfo/python-list
ly using the free version of EditPad Pro, the full version
has a spelling checker built in. It's loads up fast and can run
external programs on the current document and capture the results and
the errors in separate panels. It also supports syntax highlighting for
pthon (and a dozen other languages).
Cheers,
Ron Adam
--
http://mail.python.org/mailman/listinfo/python-list
anguage designers preference at that time.
But still, I think the whole braces are good/evil is over stated. There
are lots of more important things in languages to consider.
Cheers,
Ron
--
https://mail.python.org/mailman/listinfo/python-list
by people in safe conditions.
Percentage of incorrect judgements of people in dangerous conditions.
Percentage of incorrect judgements of people in safe, but perceived
dangerousness conditions.. etc...
Would be possible to calculate a norm or average from that kind of info?
It
needed is already in a text editor.
The token file format becomes the bridge that spans the gap between the
user/editor and the compiler/interpreter.
Then your compiler/interpreter is all implementation details that work on a
single standardised token file format rather than unforma
ome
form. Possibly as a script language that can be used in projects.
There is lots of opportunities to make improvements and additions as there
are zero users currently.
It's still very early in it's development, so don't expect too much at this
time.
Cheers,
Ron
--
https://mail.python.org/mailman/listinfo/python-list
z is resolved in y's scope.
Which is why you can implement objects with closures, but you need to delay
name resolution to do that. Which is what the "." does.
Pythons attribute lookup is a bit more complex than this of course.
https://docs.python.org/3.4/howto/descriptor.h
On 05/19/2015 02:25 AM, Chris Angelico wrote:
On Tue, May 19, 2015 at 12:43 PM, Ron Adam wrote:
>Having just implementing something similar for nested scopes, it turns out
>it can't be operators because if it was, then the names y and z would be
>resolved in the wrong scope.
his is interactive, I'd advise going for the absolute simplest, which
this would be. Go for the function attribute IMO.
Another way is to make it an object with a __call__ method.
The the attribute can be accessed from both outside and inside dependably.
Cheers,
Ron
--
https://mail.python.org/mailman/listinfo/python-list
On 06/16/2015 05:15 AM, Steven D'Aprano wrote:
On Tuesday 16 June 2015 10:24, Ron Adam wrote:
>Another way is to make it an object with a __call__ method.
>
>The the attribute can be accessed from both outside and inside dependably.
That's what functions are, objects wit
mutated would be a good
initial step. Have it turned off by default.
I think it will be needed to test how any of the above is working.
It may also allow some multiprocessing just by avoiding raising any
MutatedObject exceptions.
Cheers,
Ron
--
https://mail.python.org/mailman/listinfo/python-list
expressions?
Variables that are changed from an outside environment are "Volatile".
https://en.wikipedia.org/wiki/Volatile_%28computer_programming%29
It isn't used in python, though I think maybe it should be.
Cheers,
Ron
--
https://mail.python.org/mailman/listinfo/python-list
ue
>>> Booltype.__class__ == var.__class__
False
Ron Griswold
Character TD
R!OT Pictures
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
First let me apologize if this post offends, I am a real newbie to
Python having only used it for about
2 days. If this is the wrong place to post newbie questions, please
be polite.
I have the O'Reily Learning Python book and I am reading it.
Here's what I am working on..
I am trying to cre
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,
>
How 'bout:
X = "132.00";
Y = int(float(X));
Ron Griswold
Character TD
R!OT Pictures
[EMAIL PROTECTED]
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf
Of Mel Wilson
Sent: Wednesday, January 11, 2006 1:08 PM
To: python-list@python.org
Subj
Does this do what you are looking for?
>>> s = 'abcdefg';
>>> a = [];
>>> a += s;
>>> a;
['a', 'b', 'c', 'd', 'e', 'f', 'g']
Ron Griswold
Character TD
R!OT Pictures
[EMAIL P
Hi Folks,
Is it possible to create a shortcut to a file in Python? I need to do
this in both win32 and OSX. I've already got it covered in Linux by
system(ln...).
Thanks,
Ron Griswold
Character TD
R!OT Pictures
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
appear in a windows directory listing,
not that I really want it to.
As for os.link and os.symlink, these appear to be unix specific. It
would be nice if os.symlink, when run on windows, would create a
shortcut.
Thanks,
Ron Griswold
Character TD
R!OT Pictures
[EMAIL PROTECTED]
-Original Message
Hi Roger,
Thank you, I will look into this.
Ron Griswold
Character TD
R!OT Pictures
[EMAIL PROTECTED]
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf
Of Roger Upole
Sent: Friday, January 13, 2006 4:59 AM
To: python-list@python.org
Subject: Re: Creating
with python code, or third party software, I’d love to hear about it.
Thanks,
Ron Griswold
Character TD
R!OT Pictures
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
aying that the socket the server is
opening is already in use (even on the first try).
Does anyone know of a nice reliable app that already does this for you?
Open source preferably.
Ron Griswold
Character TD
R!OT Pictures
[EMAIL PROTECTED]
-Original Message-
From: [EMAIL PROTECTED]
[ma
go the other way ;)
Thanks,
Ron Griswold
Character TD
R!OT Pictures
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
Hi Cliff,
Looks like xist is exactly what I'm looking for.
Thank you,
Ron Griswold
Character TD
R!OT Pictures
[EMAIL PROTECTED]
-Original Message-
From: Cliff Wells [mailto:[EMAIL PROTECTED]
Sent: Tuesday, January 17, 2006 9:33 AM
To: Ron Griswold
Cc: python-list@python.org
Su
HTML();
It gives the same complaint if I’ve got openDocument
and/or openHead uncommented. The script is executing otherwise the error wouldn’t
show up in the error_log with specific text from the script. Also, I’ve
run the script and redirected it’s output to an
.html file and the server loads it with no problems.
Any ideas are appreciated.
Thanks,
Ron Griswold
Character TD
R!OT Pictures
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
ed to
look at an image library that uses compiled C (or assembly) code to do
the brute force work. It may also be possible to access your platforms
directX or opengl library routines directly to do it.
Cheers,
Ron
--
http://mail.python.org/mailman/listinfo/python-list
ctions.
It probably should be an attribute of the class.
These are just guide lines of course, but by keeping them in mind, I do
think it has helped me to abstain from writing cluttered class's.
Maybe there are other guidelines like these that are helpful?
Cheers,
Ron
--
http://mail.python.org/mailman/listinfo/python-list
xamples at the end)
Cheers,
Ron
# - Some Simple Validators.
def Any(arg): pass
def IsNumber(arg):
assert type(arg) in (int, long, float), \
"%r is not a number" % arg
def IsInt(arg):
assert type(arg) in (int, long), \
"%r
Peter Beattie wrote:
> Hey folks,
>
> I need to do the following relatively simple 3D programming:
>
> I want to convert data from four-item tuples into 3D co-ordinates in a
> regular tetrahedron. Co-ordinates come in sequences of 10 to 20, and the
> individual dots in the tetrahedron need to be
way to have the display show a wire frame image instead of shaded
shapes? And with or without hidden line removal?
Is there an easy way to convert a display to something that can be printed?
Cheers,
Ron
--
http://mail.python.org/mailman/listinfo/python-list
Scott David Daniels wrote:
> Ron Adam wrote:
>> Scott David Daniels wrote:
>>> James Stroud wrote:
>>>>> I'm looking for a program to do line-drawings in 3d, with output to
>>>>> postscript or svg or pdf, etc. I would like to describe a scene
I have several applications where I want to sort lists in alphabetical order.
Most examples of sorting usually sort on the ord() order of the character set
as
an approximation. But that is not always what you want.
The solution of converting everything to lowercase or uppercase is closer, but
Neil Cerutti wrote:
> On 2006-10-16, Ron Adam <[EMAIL PROTECTED]> wrote:
>> I have several applications where I want to sort lists in
>> alphabetical order. Most examples of sorting usually sort on
>> the ord() order of the character set as an approximation. But
>
Neil Cerutti wrote:
> On 2006-10-17, Ron Adam <[EMAIL PROTECTED]> wrote:
>> Neil Cerutti wrote:
>>> On 2006-10-16, Ron Adam <[EMAIL PROTECTED]> wrote:
>>>> I have several applications where I want to sort lists in
>>>> alphabetical order.
sequence as a list.
"""
def iterinner(seq):
for s in seq:
if hasattr(s, '__iter__'):
for i in iterinner(s):
yield i
else:
yield s
return list(iterinner(sequence))
Cheers,
Ron Adam
--
http://mail.python.org/mailman/listinfo/python-list
Ron Adam wrote:
> Neil Cerutti wrote:
>> On 2006-10-16, Tim Chase <[EMAIL PROTECTED]> wrote:
>>> If you need it in a flat list, rather than as a list of
>>> chunk_size lists (which are handy for iterating over in many
>>> cases), there are ways of obtain
ed this in *anything* yet, so don't plug it into production code
of any type. I also haven't done any performance testing.
See the doc tests below for examples of how it's used.
Cheers,
Ron Adam
"""
Collate.py
A general purpose configurable collate
always find a few obvious glitches right after I post something. ;-)
Cheers,
Ron
--
http://mail.python.org/mailman/listinfo/python-list
hem in the correct order) That way it will
skip the more general filter and not increment cnt twice.
It's not exactly clear on what output you are seeking. If you want 0 for not
filtered and 1 for filtered, then look to Freds Hint.
Or are you writing a test at the moment, a
anks
Just to be different from the other suggestions...
>>> a = [1, 2, 3]
>>> str(a[1:]).strip('[]').replace(',', '')
'2 3'
By the way. It's a good idea to try not to use 'list' or other built-in names
for your own objects. Best to start with good habits so that you avoid odd
hard
to find bugs later.
Cheers,
Ron
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
>
> On Oct 18, 2:42 am, Ron Adam <[EMAIL PROTECTED]> wrote:
>> I put together the following module today and would like some feedback on any
>> obvious problems. Or even opinions of weather or not it is a good approach.
> ,,,
>
rings and tests were made.
Any feedback is welcome.
Cheers,
Ron
"""
Collate.py
A general purpose configurable collate module.
Collation can be modified with the following keywords:
CAPS_FIRST -> Aaa, aaa, Bbb, bbb
HYPHEN_AS
ntage of the list is it can be iterated without splitting first. But
that's a minor thing. self.options = options.lower().split(' ') fixes that
easily.
Once I'm sure it's not going to get any major changes I'll post this as a
recipe. I think it's almost ther
This is how I changed it...
(I edited out the test and imports for posting here.)
locale.setlocale(locale.LC_ALL, '') # use current locale settings
class Collate(object):
""" A general purpose and configurable collator class.
"""
options = [ 'CAPS_FIRST', 'NUMERICAL', 'HYPHEN
Gabriel Genellina wrote:
> At Wednesday 18/10/2006 03:42, Ron Adam wrote:
>
>> I put together the following module today and would like some feedback
>> on any
>> obvious problems. Or even opinions of weather or not it is a good
>> approach.
>>
Leo Kislov wrote:
> Ron Adam wrote:
>
>> locale.setlocale(locale.LC_ALL, '') # use current locale settings
>
> It's not current locale settings, it's user's locale settings.
> Application can actually use something else and you will overwrite
&g
[EMAIL PROTECTED] wrote:
> Ron Adam:
>
> Insted of:
>
> def __init__(self, flags=[]):
> self.flags = flags
> self.numrex = re.compile(r'([\d\.]*|\D*)', re.LOCALE)
> self.txtable = []
> if HYPHEN_AS_SPACE in flag
Gabriel Genellina wrote:
> At Wednesday 18/10/2006 21:36, Ron Adam wrote:
>> Maybe changing the CAPS_FIRST to REVERSE_CAPS_ORDER would do?
>
> At least it's a more accurate name.
> There is an indirect way: test locale.strcoll("A","a") and see
Fulvio wrote:
> ***
> Your mail has been scanned by InterScan MSS.
> ***
>
>
> On Wednesday 18 October 2006 15:32, Ron Adam wrote:
>
>> |Instead of using two separate if's, Use an if - elif and be sure to test
>
> T
>>> reverser = slice(None, None, -1)
>>>
>>> 'abcdefg'[reverser]
'gfedcba'
Ron
--
http://mail.python.org/mailman/listinfo/python-list
Leo Kislov wrote:
> Ron Adam wrote:
>> Leo Kislov wrote:
>>> Ron Adam wrote:
>>>
>>>> locale.setlocale(locale.LC_ALL, '') # use current locale settings
>>> It's not current locale settings, it's user's locale setting
to account some newer 2.5
features and the tests will need to be updated so they retrieve dis's output
instead of redirecting stdout. If you'd like to finish it up and submit it as
a
patch, I can forward it to you. It would be good to have a second set of eyes
look at it also.
Cheers,
Ron
--
http://mail.python.org/mailman/listinfo/python-list
Steven D'Aprano wrote:
> On Sat, 21 Oct 2006 01:58:33 -0500, Ron Adam wrote:
>
>> [You said from an earlier post...]
>>
>>> (That's a complaint I have about the dis module -- it prints its results,
>>> instead of returning them as a string. That makes
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
t. This is probably the more
common situation.
But not as common as the viewpoint you've stated above unfortunately.
Cheers,
Ron
> Never thought having a small philosophical conversion with Margaret
> Mead beyond time and space. So many thanks to great Google and its
> devotees.
>
> Kay
--
http://mail.python.org/mailman/listinfo/python-list
ll be appreciated.
Any minor improvements to wording, spelling, etc.. are also welcome.
Many thanks for all the terrific feed back and suggestions!
Cheers,
Ron
---start---
"""
Collate.py - Sorts lists of strings in various ways depending
options and locale.
rted or initialized.
It avoids having to type namespace prefixes such as thismod.textmode, or
myclass.textmode or importing a bunch of values into global name space.
Strings comparisons in python are very fast.
The disadvantage is an invalid flag may pass silently unless you do some sort
of
validation which may slow things down a bit.
Ron
--
http://mail.python.org/mailman/listinfo/python-list
re
reliable python parser means development time can be spent improving the
language in other areas instead of fixing parsing problems every time a new
feature is added that might be used in a conditional expression.
Cheers,
Ron
--
http://mail.python.org/mailman/listinfo/python-list
Michael Hobbs wrote:
> Ron Adam wrote:
>> The faq also pointed out a technical reason for requiring the colon. It
>> makes
>> the underlying parser much easier to write and maintain. This shouldn't be
>> taken to lightly in my opinion, because a simpler easer t
Michael Hobbs wrote:
> Ron Adam wrote:
>> It is also an outline form that frequently used in written languages.
>> Something
>> python tries to do, is to be readable as if it were written in plain
>> language
>> where it is practical to do so. So the c
t; x == blue or x == red or x == yellow
Maybe it should have been expressed as:
x == (blue or red or yellow)
Cheers,
Ron
--
http://mail.python.org/mailman/listinfo/python-list
Paul Boddie wrote:
> Ron Adam wrote:
>> PS. Rather than shav of on character her and ther in pythons programing
>> languag, Lets remov all the silent leters from the english languag. That will
>> sav thousands mor kestroks over a few yers.
>
> How about changing Pyt
Steven D'Aprano wrote:
> On Sat, 11 Nov 2006 01:13:03 -0600, Ron Adam wrote:
>
>> Steven D'Aprano wrote:
>>> On Fri, 10 Nov 2006 21:24:50 +0100, Bjoern Schliessmann wrote:
>>>
>>>> Marc 'BlackJack' Rintsch wrote:
>>>>
>&
Georg Brandl wrote:
> Ron Adam wrote:
>> Michael Hobbs wrote:
>>
>>> The same problem that is solved by not having to type parens around the
>>> 'if' conditional, a la C and its derivatives. That is, it's unnecessary
>>> typing to
Georg Brandl wrote:
> Ron Adam wrote:
>> Georg Brandl wrote:
>>> Ron Adam wrote:
>>>> Michael Hobbs wrote:
>>>>
>>>>> The same problem that is solved by not having to type parens around the
>>>>> 'if' condition
>>> A bit of a circular answer.
> >>>
> >>> Why the rule? -> So not to break the rule?
> >>
> >> You proposed to allow leaving off line continuation '\' only in the
> >> "if", "for&qu
Michael Hobbs wrote:
> Ron Adam wrote:
>> LOL, of course it would. I would expect that too after a suitable amount
>> of
>> 'brain washing', oops, I mean training and conditioning. ;-)
>>
> Trust me, my brain is quite filthy and doesn't wash ea
Michael Hobbs wrote:
> Ron Adam wrote:
>> [EMAIL PROTECTED] wrote:
>>
>>> >>>>> I'm not sure why '\'s are required to do multi-line before the
>>> colon.
>>> >>>> Special cases aren't special en
Michael Hobbs wrote:
> Ron Adam wrote:
>> Michael Hobbs wrote:
>>
>>> Ron Adam wrote:
>>>
>>>> LOL, of course it would. I would expect that too after a suitable amount
>>>> of
>>>> 'brain washing', oops, I
o change anything as it is an effort
to explore and understand why things where made the way they are. To those who
already know, this seems silly, but to those who are still learning, it seems
important.
This could be broken down a bit more, but then we would get into long debates
o
Steve, thanks for the note. The name Python411 comes from me copying my
good friend Rob Walch, who named his podcast Podcast411, which is a
popular show on which he interviews other podcasters like Adam Curry
etc. He also has a book just published about podcasting.
Ron Stephens
--
http
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
and not a simulation where you would use OO to
actually model the objects which can also work, but is much harder to do.
Cheers,
Ron
--
http://mail.python.org/mailman/listinfo/python-list
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
>
ng into account the larger error, by rounding your results
to a proper number of significant digits, then you may have a much bigger
problem, and a much larger real error than you realize.
So, you first need to manage the errors introduced when the data is created.
By
doing that, you will proba
301 - 400 of 772 matches
Mail list logo