jkn wrote:
> This 'invalid mode: a' error message seems weird to me. Is this a bug
> or am I missimg something?
It depends on the underlying implementation of fopen(), which, on some
platforms, doesn't set the right error code for bad mode strings.
Python uses some simple heuristics to try to g
Ben Finney wrote:
> Really? Where does Python guarantee that the left side *must* be
> evaluated before the right side of a comparison?
in the language reference:
http://docs.python.org/ref/evalorder.html
--
http://mail.python.org/mailman/listinfo/python-list
mkengel wrote:
> Problem: Python window closes immediately after executing a *.py file
> (e.g. containing a "print..." command.
> What do I have to do to keep it open to see the results ?
Simple scripts that print to a console, or read from it, works best if
you run them from a standard Command
EXI-Andrews, Jack wrote:
> > that's a misunderstanding of what a regular expression is, though:
> > conceptually, a RE describes a set of strings, and the RE engine is
> > designed to answer the question "does this string belong to this
> > set".
> if that's so, what is the point of +? and *
"flamesrock" <[EMAIL PROTECTED]> wrote:
8<--
> since the statement itself
> occurs at one time instant..
nothing, but nothing, can occur at one time instant
- Hendrik
--
http://mail.python.org/mailman/listinfo/python-list
"John Machin" <[EMAIL PROTECTED]> wrote:
> Hendrik van Rooyen wrote:
> > "John Machin" <[EMAIL PROTECTED]> WROTE:
> >
> > > Hendrik van Rooyen wrote:
> > > > "Raymond L. Buvel" <[EMAIL PROTECTED]> wrote:
> > > >
> > > >
> > > > > The rpncalc package adds an interactive Reverse Polish Notation (RPN)
>> I wrote:
>>
>> import re;re.match('(a+)(ab)','aaab').groups()
>>> ('aa', 'ab')
>>>
>>> this is the sort of behaviour i'd expect from
>>>'(a+?)(ab)'
>>>
>>> a+ should greedily consume a's at the expense of the string
>>> not matching
>
> Fredrick wrote:
> that's a misunderstanding of w
mkengel wrote:
> Caution: newbie question
If you're pretty sure it's a common newbie question, then begin by
going to the Google repository at:
http://groups.google.com/group/comp.lang.python
Search in the box at upper right, on, say, keep cmd window open, or
keep dos window open.
Like so:
ht
mkengel wrote:
> Caution: newbie question
If you're pretty sure it's a common newbie question, then begin by
going to the Google repository at:
http://groups.google.com/group/comp.lang.python
Search in the box at upper right, on, say, keep cmd window open, or
keep dos window open.
Like so:
h
John wrote:
> Is there an automatic way of filling forms that have been generated
> using javascript?
> I tried to use python+mechanize but am having trouble with javascript
> forms.
>
Yes, it depends on what you're trying to do of course, but usually you
just set the input element's "value" prop
Steven D'Aprano wrote:
[snip]
> def running_sum(dw):
> """Return a list of the running sums of sequence dw"""
> rs = [0]*len(dw)
> for i in range(len(dw)):
> rs[i] = dw[i] + rs[i-1]
Please explain to the newbies why there is no exception raised when
rs[i-1] is executed for i
Is there an automatic way of filling forms that have been generated
using javascript?
I tried to use python+mechanize but am having trouble with javascript
forms.
This is the way the form is created:
Thanks in advance for your help,
--j
--
http://mail.python.org/mailman/listinfo/python-lis
On Tue, 21 Nov 2006 13:19:04 -0800, liam_herron wrote:
>
> Given:
> dw = [ 1, -1.1, +1.2 ]
>
> Suppose I want to create a list 'w' that is defined as
>
> w[0] = dw[0],
> w[1] = w[0] + dw[1],
> w[2] = w[1] + dw[2]
>
> Is there a list comprehension or map expression to do it in one or 2
> lines.
On Tue, 21 Nov 2006 22:39:09 +0100, Mathias Panzenboeck wrote:
> [EMAIL PROTECTED] wrote:
>> There is an interesting skewness in python:
>>
>> class A(object): pass
>>
> a=A()
> setattr(a, '$foo', 17)
> getattr(a, '$foo')
>> 17
>>
>> But I can't write
> a.'$foo'
>>
>
> Yes, t
Hi all:
>From my experience with os's.
Time is updated at intervals- they may be as low as 1mS See . So for that
millisecond multiple readings of the time will always return the same
result. Therefore time.time() < time.time() will be false for most readings.
However the result could be true if
Caution: newbie question
I am using python 2.4.3-11 on Windows XP.
Problem: Python window closes immediately after executing a *.py file
(e.g. containing a "print..." command.
What do I have to do to keep it open to see the results ?
"Interactive window" stays open.
Thank you.
Michael
--
http:
Google indicates that wx.Process.Kill hadn't been implemented some
time ago in wxPython for Win32. Is that still the case? It's kind of
a drag since several sources (including wxPython wiki) strongly advise
(by my reading and intended use) using wxProcess over the built-in
stuff, but it's not ent
Ben Finney wrote:
> Really? Where does Python guarantee that the left side *must* be
> evaluated before the right side of a comparison? (If the right side
> were to be evaluated first, the left might end up with a greater
> value.)
>
http://docs.python.org/ref/evalorder.html
--
http://mail.pytho
Gabriel Genellina <[EMAIL PROTECTED]> writes:
> The only thing Python can guarantee, is that the left expression is
> evaluated before the right one (5.13 Evaluation order, Language
> Reference).
Thanks, that answers my question asked elsewhere.
--
\ "One thing vampire children have t
Ben Finney <[EMAIL PROTECTED]> writes:
> Or, the attributes are added to a specific instance (often in the
> initialisation method) so that each instance has a separate attribute
> with the same name::
The example here should have been::
class Point(object):
spam = 4
def __in
James Stroud wrote:
> walterbyrd wrote:
> > Reading "Think Like a Computer Scientist" I am not sure I understand
> > the way it describes the way objects work with Python.
> >
> > 1) Can attributes can added just anywhere? I create an object called
> > point, then I can add attributes any time, an
"Delaney, Timothy (Tim)" <[EMAIL PROTECTED]> writes:
> So long as the clock on the machine it's running on is not set
> backwards between the two calls, you can guarantee that
>
>time.time() <= time.time()
>
> will always evaluate true.
Really? Where does Python guarantee that the left side *
Danny Colligan wrote:
> On Nov 21, 11:48 am, "Danny Colligan" <[EMAIL PROTECTED]> wrote:
> > Rainy wrote:
> > > Hi, did anyone make a good set of scripts for editing Python in Vim? I
> > > know there is one on vim.org but it isn't very advanced. thx..Here's what
> > > google has to say about
> >
[EMAIL PROTECTED] wrote:
> Im working on an AVL tree
Is this homework?
> that consists of balancing the tree everytime
> you add an object.
That's a peculiar kind of AVL tree. Normally it is *not* necessary to
balance the tree every time a node is added -- it's done only if a
constraint is brea
"walterbyrd" <[EMAIL PROTECTED]> writes:
> Reading "Think Like a Computer Scientist" I am not sure I understand
> the way it describes the way objects work with Python.
Congratulations for taking the effort to figure it out, and for
thinking about the questions you want answered.
> 1) Can attrib
Ben Finney wrote:
> Or, the attributes are added to a specific instance (often in the
> initialisation method) so that each instance has a separate attribute
> with the same name::
>
> class Point(object):
> spam = 4
> def __init__(self):
> eggs = 2
There's a typo
26 matches
Mail list logo