here a working
CoreGraphics.py around somewhere? I found a
file somewhere on the net that was the same
as mine except it ended with
from CG import *
Adding that doesn't change anything.)
(Yes, the XCode installation seems to be working
fine.)
???
****
David C. Ullrich
On Thu, 01 Nov 2007 19:39:20 -0500, Robert Kern
<[EMAIL PROTECTED]> wrote:
>David C. Ullrich wrote:
>> [why doesn't CoreGraphics work?]
>
>That's different than the one that is referenced. The one those articles
>reference is only available in the Python tha
On Fri, 02 Nov 2007 14:09:25 -0500, Robert Kern
<[EMAIL PROTECTED]> wrote:
>David C. Ullrich wrote:
>> [...]
>>
>> So CoreGraphics is a builtin in Apple-Python,
>> explaining why I didn't find the relevant
>> CoreGraphics.py anywhere on the hard driv
On Fri, 2 Nov 2007 13:14:16 +0100, Tommy Nordgren
<[EMAIL PROTECTED]> wrote:
>
>On 2 nov 2007, at 02.10, David C. Ullrich wrote:
>
>> [Why doesn't CoreGraphics work?]
>> --
>> http://mail.python.org/mailman/listinfo/python-list
> There are Python
On Fri, 02 Nov 2007 14:09:25 -0500, Robert Kern
<[EMAIL PROTECTED]> wrote:
>David C. Ullrich wrote:
>> [???]
>
>Okay, which version of OS X do you have? In 10.3 and 10.4 it used to be here:
>/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/plat-
On Sun, 04 Nov 2007 15:56:21 -0600, Robert Kern
<[EMAIL PROTECTED]> wrote:
>David C. Ullrich wrote:
>> On Fri, 02 Nov 2007 14:09:25 -0500, Robert Kern
>> <[EMAIL PROTECTED]> wrote:
>>
>>> David C. Ullrich wrote:
>>>> [???]
>>> Okay,
Linux presumably it only works if there
happens to be a speech engine available...)
David C. Ullrich
--
http://mail.python.org/mailman/listinfo/python-list
On Wed, 19 Mar 2008 07:41:29 -0500, David C. Ullrich
<[EMAIL PROTECTED]> wrote:
>Mac OS X has text-to-speech built into the interface.
>So there must be a way to access that from the command
>line as well - in fact the first thing I tried worked:
>
>os.system('say hell
then you get exactly one z**w.
But that's not always the z**w that you need for your problem...
>Ask
>Google for some examples
Thanks.
>Christian
David C. Ullrich
--
http://mail.python.org/mailman/listinfo/python-list
mainmain = double(main) I left off the
final parentheses because I didn't want to call mainmain
just then, I just wanted to set mainmain to the right thing.
> Thanks !
--
David C. Ullrich
--
http://mail.python.org/mailman/listinfo/python-list
27;s a _bold face_ statement
"Default parameter values are evaluated when the function definition is
executed.", followed by an explanation of how that can lead to
the sort of problem above.
So I guess it _is_ awfully dangerous. They should really explain
this aspect of the language's behavior to people who don't read
the formal definition and also don't work through the tutorial.
> Paolo
--
David C. Ullrich
--
http://mail.python.org/mailman/listinfo/python-list
In article <[EMAIL PROTECTED]>,
Bruno Desthuilliers <[EMAIL PROTECTED]>
wrote:
> David C. Ullrich a écrit :
> > In article
> > <[EMAIL PROTECTED]>,
> > kenneth <[EMAIL PROTECTED]> wrote:
> >
> >> On Oct 9, 10:14 am, Christian Heime
In article <[EMAIL PROTECTED]>,
"Aditi Meher" <[EMAIL PROTECTED]> wrote:
> Hello
>
> How to write code to store data into buffer using python?
buffer = data
> Please reply.
--
David C. Ullrich
--
http://mail.python.org/mailman/listinfo/python-list
In article <[EMAIL PROTECTED]>,
Bruno Desthuilliers <[EMAIL PROTECTED]> wrote:
> David C. Ullrich a écrit :
> > In article <[EMAIL PROTECTED]>,
> > Bruno Desthuilliers <[EMAIL PROTECTED]>
> > wrote:
> >
> >> David C. Ullrich a é
In article
<[EMAIL PROTECTED]>,
Paul McGuire <[EMAIL PROTECTED]> wrote:
> On Oct 14, 1:36 pm, "David C. Ullrich" <[EMAIL PROTECTED]> wrote:
> > >[...]
>
> > In particular default parameters should work the way the user
> > expects! The fac
ements
of a given set S.
Writing informally people often omit the "in S" part when the
S in clear from the context. For example, your original
{p | p is prime} should officially be {p in N | p is prime},
where N is the set of natural numbers - the first form is
often written because the &qu
evs, what should I use? CherryPy (seems to be the easiest),
> Django (seems to be the "biggest"/most used), or something else?
>
> Any other suggestions for a possible "wow" reaction from an audience like
> that?
>
> Thanks,
> Paddy
--
David C. Ullrich
--
http://mail.python.org/mailman/listinfo/python-list
In article
<039360fb-a29c-4f43-b6e0-ba97fb598...@z23g2000prd.googlegroups.com>,
Mensanator wrote:
> On Mar 26, 11:42 am, "andrew cooke" wrote:
> > David C. Ullrich wrote:
> > > In article ,
> > > "Paddy O'Loughlin" wrote:
> &
lf, other):
> return type(self)(x - y for x, y in zip(self, other))
> def __repr__(self):
> return '%s(%s)' % (
> type(self).__name__, list.__repr__(self))
>
> x = Vector([1,2])
> x + x + x
>
> --Scott David Daniels
> scott.dani...@acm.org
--
David C. Ullrich
--
http://mail.python.org/mailman/listinfo/python-list
In article ,
"andrew cooke" wrote:
> David C. Ullrich wrote:
> > In article ,
> > Scott David Daniels wrote:
[...]
> >>
> >> class Vector(list):
> >> def __add__(self, other):
> >> return type(self)(x + y
- that would mean nobody even _glanced_
at what was coming out of the press. So I'm curious whether
anyone else has a copy.
(I know it's all online. Some people like _books_...)
DU.
--
David C. Ullrich
--
http://mail.python.org/mailman/listinfo/python-list
mewhere where Google can see it...
DU.
In article ,
"David C. Ullrich" wrote:
> Just curious - has anyone else bought the printed
> Python 3 Reference Manual published by SoHo Books?
>
> Talking about what they call "Part 2" of their Python
> Documentation. I
In article
<[EMAIL PROTECTED]>,
Iain King <[EMAIL PROTECTED]> wrote:
> Hi. I have a modal dialog whcih has a "Browse..." button which pops
> up a file selector. This all works fine, but the first thing the user
> has to do when they open the dialog is select a file, so I would like
> the dialo
self.buffer = ''
def write(self, text):
self.buffer = self.buffer + text
def Show(self):
wx.MessageDialog(None, str(self.buffer),
'Error:',wx.OK).ShowModal()
self.buffer = ''
printer = ErrorDisplay()
sys.stderr = prin
AClass()
for row in range(2):
for col in range(2):
C.cell[row, col] = "row: %s, col: %s" % (row, col)
for row in range(2):
for col in range(2):
print C.cell[row, col]
C.cell[0,0], C.cell[1,1] = C.cell[1,1], C.cell[0,0]
print "After C.cell[0,0], C.cell[1,1] = C.cell[1,1], C.cell[0,0]:"
for row in range(2):
for col in range(2):
print C.cell[row, col]
--
David C. Ullrich
--
http://mail.python.org/mailman/listinfo/python-list
In article <[EMAIL PROTECTED]>,
Jean-Paul Calderone <[EMAIL PROTECTED]> wrote:
> On Wed, 14 May 2008 15:47:18 -0500, "David C. Ullrich" <[EMAIL PROTECTED]>
> wrote:
> > [snip]
> >
> >Came up with a ridiculous hack involving both sys.stderr
On Thu, 15 May 2008 10:59:41 -0300, "Gabriel Genellina"
<[EMAIL PROTECTED]> wrote:
>En Wed, 14 May 2008 18:15:41 -0300, David C. Ullrich <[EMAIL PROTECTED]>
>escribió:
>
>> Having a hard time phrasing this in the form
>> of a question...
>>
&g
On Sat, 17 May 2008 00:27:31 -0300, "Gabriel Genellina"
<[EMAIL PROTECTED]> wrote:
>(warning: it's a rather long message)
>
>En Fri, 16 May 2008 12:58:46 -0300, David C. Ullrich
><[EMAIL PROTECTED]> escribió:
>> On Thu, 15 May 2008 10:59:41 -0
;t see the plus side.
Hmm. It might actually _reduce_ the total amount of code,
since the code to access columns has to exist anyway and
rows could use the same code as columns with different
"start" and "skip". And come to think of it rows and
columns could be obtained just with a slice of the data.
So column access might even be more efficient. But I
expect that row access will happen a lot more often
than column access.
>P.
David C. Ullrich
--
http://mail.python.org/mailman/listinfo/python-list
it is seen as "just funny" in a research
>context. Is Python considered as a good programming language for
>implementing Operations Research algorithms, such as heuristics and
>other soft-computing algorithms?
>
>Maybe this is not the right forum, but maybe you can give me some
>hints or tips...
>
>Thank you in advance.
David C. Ullrich
--
http://mail.python.org/mailman/listinfo/python-list
m.)
Really. In one of the intended applications the matrix
entries are going to be home-made Rationals. Just
adding two of those guys takes a long time. It's
still more than fast enough for the intended application,
but [oh, never mind.
Sorry about the argumentative tone - I _would_ like
to know which "untenable position" you're referring to...
>P.
David C. Ullrich
--
http://mail.python.org/mailman/listinfo/python-list
y(mailItem):
>
>name="\\"+mailItem.Subject+"__"+str(mailItem.ReceivedTime)
>print name
>#global outlook_app
>try:
>mailItem.SaveAs(path+name+".txt",OlSaveAsType['olTXT'])
>except BaseException:
>prin
arious
programs available that would solve his problem
for him - writing a little Python to give the
solution took less time than downloading one
of those programs would have.
>Thanks.
David C. Ullrich
--
http://mail.python.org/mailman/listinfo/python-list
On Mon, 19 May 2008 14:48:03 +0200, pataphor <[EMAIL PROTECTED]>
wrote:
>On Mon, 19 May 2008 06:29:18 -0500
>David C. Ullrich <[EMAIL PROTECTED]> wrote:
>
>> Maybe you could be more specific? Various "positions" I've
>> taken in all this may wel
In article <[EMAIL PROTECTED]>,
pataphor <[EMAIL PROTECTED]> wrote:
> On Tue, 20 May 2008 06:12:01 -0500
> David C. Ullrich <[EMAIL PROTECTED]> wrote:
>
> > Well, ok. Like I said, I never _took_ the position that it _should_
> > be a list of lists, I
On Wed, 21 May 2008 12:47:44 +0200, pataphor <[EMAIL PROTECTED]>
wrote:
>On Tue, 20 May 2008 10:40:17 -0500
>"David C. Ullrich" <[EMAIL PROTECTED]> wrote:
>
>> > > Today's little joke: Long ago I would have solved
>> > > this by st
ainly an issue of terminology, so probably I should just read up on MVC.
>
>> The user interface doesn't need to be graphical. There were games and
>> emails clients and text editors before GUIs existed, you know ?
>
>Of course, but I'm specifically asking about creating a program that has a
>GUI, and even more specifically it would be wxPython.
>
David C. Ullrich
--
http://mail.python.org/mailman/listinfo/python-list
te-code.
>>
>> Which is then interpreted, but you're still technically right, because
>> "compiled" can mean either compiled to bytecode or compiled to native code,
>> despite what it actually did mean. Semantics FTW!!
>
>Yes, semantics. But a bit more than semantics - byte-code interpreters
>are usually way faster than "pure" interpreter, and start to be fast
>enough for quite a lot of practical use.
>
>Ok, I'll stop on this - once again, sorry for the noise, and please
>bear with me, I tend to be a bit too much on the pedantic side
>sometimes. But still, thanks to the pedantics peoples on usenet that
>taught me so much so far and still teach me more and more...
David C. Ullrich
--
http://mail.python.org/mailman/listinfo/python-list
final configuration betore saying anything to the
model. The model should only deal with legal positions.
(Could be that it's not until we start actually playing the game
through the GUI that we find the model can't deal with two
black queens. But that's not an example either, that would just
mean the model is wrong, not allowing every legal position.)
>-M-
David C. Ullrich
--
http://mail.python.org/mailman/listinfo/python-list
;
>> Have fun! And remember, there's a great wxPython mailing list too:
>>
>> http://www.wxpython.org/maillist.php
>>
>> Mike
>
>Thanks!
You should also note
docs.wxwidgets.org
(I tend to find that by googling "wxTreeCtrl" or whatever.)
The descriptions of various components there are more
complete than in the (excellent!) wxPython book - it's
C++ but usually not hard to figure out what the corresponding
wxPython should be.
David C. Ullrich
--
http://mail.python.org/mailman/listinfo/python-list
;""utest.py"""
import __main__
def doit():
print 2*__main__.a
>Cheers,
>
>Ulrich
>
>
David C. Ullrich
--
http://mail.python.org/mailman/listinfo/python-list
7;s actually a problem you're trying to solve
here, try ord instead of int.
> Or probably you yourself should - quote :
> "You probably should go through the tutorial ASAP that is located here:
>
> http://docs.python.org/tut/ "
>
> -
> [Image]
--
David C. Ullrich
--
http://mail.python.org/mailman/listinfo/python-list
st relevant - I'd
> appreciate your guidance on getting Python to run on a Mac with a
> particular focus on these two distributions.
>
> Thank you in advance
>
> Thomas Philips
--
David C. Ullrich
--
http://mail.python.org/mailman/listinfo/python-list
The documentation I got is mostly in Chinese. Is there an
English version somewhere?
> Dick Moores
--
David C. Ullrich
--
http://mail.python.org/mailman/listinfo/python-list
ere should
(or might?) be a way to simply append a \A to the first
[^a-zA-Z] and a \Z to the second.
--
David C. Ullrich
--
http://mail.python.org/mailman/listinfo/python-list
In article <[EMAIL PROTECTED]>,
"Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> David C. Ullrich schrieb:
> > Actually using regular expressions for the first
> > time. Is there something that allows you to take the
> > union of two character sets, o
In article <[EMAIL PROTECTED]>,
"Russell Blau" <[EMAIL PROTECTED]> wrote:
> "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > David C. Ullrich schrieb:
> >> Say I want to replace 'disc' wit
ve pywinauto
And, as I seem to recall someone saying once, win32ui.PyCRichEditCtrl
is not a module so you can't import it. You can say
from win32ui import PyCRichEditCtrl
Or you can say
import win32ui
and then reference win32ui.PyCRichEditCtrl .
--
David C. Ullrich
--
http://mail.python.org/mailman/listinfo/python-list
nd why the first component
> "notewave" is being stripped off, when the import is happening.
Does notewave contain a _module_ named runner.LMTP ?
Probably not, since the error message says there's no
such module.
> Thanks,
--
David C. Ullrich
--
http://mail.python.org/mailman/listinfo/python-list
rch(r"(^|[^\w])(disc)($|[^\w])", t):
> print "success:", t
>
>
>> Also I think you have ^ and $ backwards, and there's
>> a ^ I don't understand. I _think_ that a correct version
>
>Yep, sorry for the confusion.
>
>Diez
David C. Ullrich
--
http://mail.python.org/mailman/listinfo/python-list
l sorts of neat stuff.
> >
> > -Larry Bates
> > --
> > http://mail.python.org/mailman/listinfo/python-list
> >
> >
> A class instance variable, you must mean an instance attribute no? If
> that is so, then with just self.attribute? Maybe there is a concept that
> I don't know about, I've studied class/static attributes and instance
> attributes in my OOP classes.
>
> Gabriel
--
David C. Ullrich
--
http://mail.python.org/mailman/listinfo/python-list
ul__ (in a subclass?)
you won't need to worry about making the
same change to __rmul__.
>house = type_house ()
>large_street = house * 25
>print large_street.front_doors
>small_street = 5 * house
>print small_street.front_doors
David C. Ullrich
--
http://mail.python.org/mailman/listinfo/python-list
ut:: "a string containing '\' followed by 'n' ".)
Practical question: What's a _complete_ list of the
escapes included in the "and so forth" in (**)?
(Or is there a function somewhere that will convert
r"\remark{Hint}" to r"\\remark{Hint}
hat the actual
regexes in programming languages include things which
are not regular expressions in that theoretical sense.
David C. Ullrich
--
http://mail.python.org/mailman/listinfo/python-list
key)
except KeyError:
dd[value] = [key]
Possibly dd is now what you really want; if you really
want what you said you want you could use
[l for l in dd.values() if len(l) > 1]
>I will something as :
>
>d.keys(where their values are the same)
>
>With this statement I c
On Thu, 12 Jun 2008 05:12:55 -0700 (PDT), John Machin
<[EMAIL PROTECTED]> wrote:
>On Jun 12, 8:57 pm, David C. Ullrich <[EMAIL PROTECTED]> wrote:
>> True or False? (no fair looking it up)
>>
>> (*) If repl is a string then re.sub(pattern, repl, s)
>> retur
On Thu, 12 Jun 2008 14:12:31 +0200, Peter Otten <[EMAIL PROTECTED]>
wrote:
>David C. Ullrich wrote:
>
>> (Or is there a function somewhere that will convert
>> r"\remark{Hint}" to r"\\remark{Hint}" for me, and
>> do the same for precisely the es
On 12 Jun 2008 12:32:13 GMT, Duncan Booth
<[EMAIL PROTECTED]> wrote:
>David C. Ullrich <[EMAIL PROTECTED]> wrote:
>
>> Practical question: What's a _complete_ list of the
>> escapes included in the "and so forth" in (**)?
>>
>> (Or is
On Thu, 12 Jun 2008 06:38:16 -0700 (PDT), Paul McGuire
<[EMAIL PROTECTED]> wrote:
>On Jun 12, 6:06 am, David C. Ullrich <[EMAIL PROTECTED]> wrote:
>> There's no regex that detects balanced parentheses,
>> or is there?
>>
>> [...]
>
>Pyparsing i
quot;bad" or whatever. It has
> its own bugs and missing features, of course, but it is one of the
> major GUI player in the arena, together with PyQt and PyGTK.
>
> Andrea.
>
> "Imagination Is The Only Weapon In The War Against Reality."
> http://xoomer.alice.it/infinity77/
--
David C. Ullrich
--
http://mail.python.org/mailman/listinfo/python-list
he subject a while back - try
> googling for "pyparsing tex" for further leads.
>
> -- Paul
--
David C. Ullrich
--
http://mail.python.org/mailman/listinfo/python-list
In article <[EMAIL PROTECTED]>,
Johannes Bauer <[EMAIL PROTECTED]> wrote:
> David C. Ullrich schrieb:
>
> >> -- care to tell us what "a certain re.sub" is, and
> >> false in what way?
> >
> > Read the OP.
>
> Well, aren't y
In article
<[EMAIL PROTECTED]>,
Nader <[EMAIL PROTECTED]> wrote:
> On Jun 12, 1:41 pm, David C. Ullrich <[EMAIL PROTECTED]> wrote:
> > On Thu, 12 Jun 2008 03:58:53 -0700 (PDT), Nader <[EMAIL PROTECTED]>
> > wrote:
> >
> > >Hello,
> >
&
In article
<[EMAIL PROTECTED]>,
Paul McGuire <[EMAIL PROTECTED]> wrote:
> On Jun 12, 6:41 am, David C. Ullrich <[EMAIL PROTECTED]> wrote:
> > On Thu, 12 Jun 2008 03:58:53 -0700 (PDT), Nader <[EMAIL PROTECTED]>
> > wrote:
> >
> > >Hello,
&g
x27;asdf', 'qwertyuip', [0, 1, 2])
>>>> map(lambda *x: x, l1,l2,l3) == map(None, l1,l2,l3)
>True
>>>>
>
>
>On looking up map on Wikipedia there is no mention of this special
>behaviour,
>So my question is why?
>
>Thanks, Paddy.
David C. Ullrich
--
http://mail.python.org/mailman/listinfo/python-list
In article
<[EMAIL PROTECTED]>,
Paddy <[EMAIL PROTECTED]> wrote:
> On Jun 13, 12:49 pm, David C. Ullrich <[EMAIL PROTECTED]> wrote:
> > On Thu, 12 Jun 2008 12:05:02 -0700 (PDT), Paddy
> >
> > <[EMAIL PROTECTED]> wrote:
> >
> > >Iam won
at hard to see that it's just a pseudo code
I would have _thought_ it wasn't hard to see that if a person
says he's totally new to the language, and even explicitly says
that the problem could be syntax errors, then he shouldn't
post pseudo code. How in the world is pseudo code going to
allow people to help him fix his syntax?
--
David C. Ullrich
--
http://mail.python.org/mailman/listinfo/python-list
ble
> (like )
Doesn't work - for example it matches ''
(and in fact if the html contains any number of tables it's going
to match the string starting at the start of the first table and
ending at the end of the last one.)
--
David C. Ullrich
--
http://mail.python.org/mailman/listinfo/python-list
rse nested open/close delimiters?
(ii) The regexes in languages like Python and Perl include
features that are not part of the formal CS notion of
"regular expression". Do they include something that
does allow parsing nested delimiters properly?
--
David C. Ullrich
--
http://mail.python.org/mailman/listinfo/python-list
In article
<[EMAIL PROTECTED]>,
Dan <[EMAIL PROTECTED]> wrote:
> On Jun 27, 1:32 pm, "David C. Ullrich" <[EMAIL PROTECTED]> wrote:
> > In article
> > <[EMAIL PROTECTED]>,
> > Jonathan Gardner <[EMAIL PROTECTED]> wrote:
> >
&g
ules.
Yeah, I tried Python once, found it used "j" this way and
decided that Perl made a lot more sense.
> This is childish.
erm, yes it is, for various values of "this"...
--
David C. Ullrich
--
http://mail.python.org/mailman/listinfo/python-list
ugh I was
confused.
Otooh, I was't confused by it for long, and I quickly decided
that it actually made _that_ code look like it made more sense.
> Thank you!
--
David C. Ullrich
--
http://mail.python.org/mailman/listinfo/python-list
In article
<[EMAIL PROTECTED]>,
Jonathan Gardner <[EMAIL PROTECTED]> wrote:
> On Jun 27, 10:32 am, "David C. Ullrich" <[EMAIL PROTECTED]> wrote:
> > (ii) The regexes in languages like Python and Perl include
> > features that are not part of the forma
ance gives the actual dictionary instead of its internal
> representation.
> Constructing a dictionary and returning from __init__ method did not
> work.
It's not entirely clear to me what you want:
Since this is supposed to be a "caseless" dict,
I imagine that if you say
d['Name'] = 'first value'
d['name'] = 'new value'
then d['Name'] should now be 'new value'. Fine.
Now in that case exactly what do you want to see
when you print d? Do you want to see {'name':'new value'}
or {'name':'new value', 'Name': 'newvalue'}?
> TIA,
> Senthil
--
David C. Ullrich
--
http://mail.python.org/mailman/listinfo/python-list
gt; > HTH
>
> As far as I understood, In the first case, you gave, I need to call
> the function as follows "x.dot(y)". In the second case I need to call
> the function as follows "x*y". But I want to call the function as
> follows "dot(x,y)".
You want to say dot(x,y), but to have the actual behavior
determined by the class of which x and y are instances?
You could do this:
def dot(x,y):
return x.dot(y)
and now give Vector an appropriate dot(self, other) method.
> By the way, "type(self)" returns the name of the class to which the
> "self" belongs?
> Does "instance" return "true" if the first argument belongs to the
> class whose name is given in the second argument?
--
David C. Ullrich
--
http://mail.python.org/mailman/listinfo/python-list
Luckily I tried it before saying no, that's
not how "in" works:
>>> 'ab' in 'abc'
True
>>> [1,2] in [1,2,3]
False
Is there a reason for the inconsistency? I would
have thought "in" would check for elements of a
sequence, regardless o
In article <[EMAIL PROTECTED]>, Mel <[EMAIL PROTECTED]> wrote:
> Ben Finney wrote:
>
> > "David C. Ullrich" <[EMAIL PROTECTED]> writes:
> >
> >> >>> 'ab' in 'abc'
> >> True
> >> >>> [
gt; returns a False. Try "[1,2] in [[1,2],[2,3]]"
Thanks. I understand how it works for lists and why - I was
wondering why it's not the same for strings.
> David C. Ullrich wrote:
> > Luckily I tried it before saying no, that's
> > not how "in"
In article <[EMAIL PROTECTED]>,
Terry Reedy <[EMAIL PROTECTED]> wrote:
> David C. Ullrich wrote:
>
> >>>> 'ab' in 'abc'
> > True
>
> 'a' in 'abc' works according to the standard meaning of o in collecti
In article <[EMAIL PROTECTED]>,
Terry Reedy <[EMAIL PROTECTED]> wrote:
> David C. Ullrich wrote:
> > In article <[EMAIL PROTECTED]>,
> > Terry Reedy <[EMAIL PROTECTED]> wrote:
>
> >>> Is there a reason for the inconsistency? I would
):
> g(l)
>
>
> (141.0, [141.0])
> (19.0, [141.0, 19.0])
> (86.0, [141.0, 19.0, 86.0])
> (120.0, [141.0, 19.0, 86.0, 120.0])
> (76.0, [141.0, 19.0, 86.0, 120.0, 76.0])
> (262.0, [141.0, 19.0, 86.0, 120.0, 76.0, 262.0])
> (234.0, [141.0, 19.0, 86.0, 120.0, 76.0,
In article <[EMAIL PROTECTED]>,
Terry Reedy <[EMAIL PROTECTED]> wrote:
> David C. Ullrich wrote:
> > In article
> > <[EMAIL PROTECTED]>,
> > ssecorp <[EMAIL PROTECTED]> wrote:
> >
> >> I am never redefining the or reassigning the l
ds that do not explicitly contain
a "return" statement return None.
So when you say "return x.append(a)" you're saying
"return None", which explains the rest of it. You
noticed that the second line of
> >>> l = mod(k,4)
> >>> l
didn't print anything? That's because the first line
set l to None. If you'd typed "print l" instead of just "l"
you would have seen
>>> l = mod(k,4)
>>> l
>>> None
--
David C. Ullrich
--
http://mail.python.org/mailman/listinfo/python-list
error when trying to run it from IDLE and I've heard that that can
> happen in other Tkinter-based IDEs.
So I've heard. Just for fun I tried running it in a wxPython-based
shell - it worked fine.
> Try running it from the command
> line and I'll bet you won't get that er
gt;
> Psst. What language do you think the primary implementations of C# is
> written in?
I know, I know, call on me!
Object Pascal, obviously.
--
David C. Ullrich
--
http://mail.python.org/mailman/listinfo/python-list
ot to contain line breaks?
--
David C. Ullrich
--
http://mail.python.org/mailman/listinfo/python-list
In article <[EMAIL PROTECTED]>,
Fredrik Lundh <[EMAIL PROTECTED]> wrote:
> David C. Ullrich wrote:
>
> > I've been saving data in a file with one line per field.
> > Now some of the fields may become multi-line strings...
> >
> > I was about to
In article <[EMAIL PROTECTED]>,
Fredrik Lundh <[EMAIL PROTECTED]> wrote:
> David C. Ullrich skrev:
>
> >> just keep in mind that using eval() on untrusted data isn't a very good
> >> idea.
> >
> > Right. This data comes from me, gets put
In article <[EMAIL PROTECTED]>,
Peter Otten <[EMAIL PROTECTED]> wrote:
> David C. Ullrich wrote:
>
> > In article <[EMAIL PROTECTED]>,
> > Fredrik Lundh <[EMAIL PROTECTED]> wrote:
> >
> >> David C. Ullrich wrote:
> >>
> >
In article
<[EMAIL PROTECTED]>,
MRAB <[EMAIL PROTECTED]> wrote:
> On Jul 23, 4:04 pm, "David C. Ullrich" <[EMAIL PROTECTED]> wrote:
> > I've been saving data in a file with one line per field.
> > Now some of the fields may become multi-line stri
have them
you really can't tell what's going to happen with c.__getattr__
unless you look at all the code in all the subclasses.
> Since A and B are not written by me I can only work on C. The solution that
> comes to my mind is to define a __getattr__ also in C and write somethi
stops there is that a __getattr__
was _found_. In the code below the lookup is not continuing,
there's a _second_ lookup started by the request for super.__getattr__.
> You'd need to
> explicitely call on superclass instead to have B.__getattr__ called, ie:
>
> class A(object):
> def __getattr__(self, name):
> if name == 'a':
> return 1
> return super(A, self).__getattr__(name)
>
> class B(object):
> def __getattr__(self, name):
> if name == 'b':
> return 2
> return super(B, self).__getattr__(name)
>
> class C(A, B):
> pass
>
--
David C. Ullrich
--
http://mail.python.org/mailman/listinfo/python-list
OError: decoder jpeg not available
1 items had failures:
1 of 57 in selftest.testimage
***Test Failed*** 1 failures.
*** 1 tests of 57 failed.
--
David C. Ullrich
--
http://mail.python.org/mailman/listinfo/python-list
hello2', p
def dispatch(self, func, p):
func(self,p)
def dispatch_as_string(self, funcname, p):
getattr(self, funcname)(p)
f = Foo()
f.dispatch_as_string('hello1', 'world')
> Many TIA and apologies if this is a FAQ, I googled and couldn't
> find the answer.
--
David C. Ullrich
--
http://mail.python.org/mailman/listinfo/python-list
In article <[EMAIL PROTECTED]>,
Irmen de Jong <[EMAIL PROTECTED]> wrote:
> David C. Ullrich wrote:
> > Decided to try to install PIL on my Mac (OS X.5).
> >
> > I know nothing about installing programs on Linux,
> > nothing about building C programs,
n a sufficiently
invalid DOS exe could cause physical damage to a hard
drive... that wasn't the only thing I learned that day.
(Probably won't get back to this til Monday, btw, in
case you say something and I don't seem interested.)
DU.
In article <[EMAIL PROTECTED]>,
Kevin W
Thanks for the hand-holding.
DU.
In article <[EMAIL PROTECTED]>,
Kevin Walzer <[EMAIL PROTECTED]> wrote:
> > [more about installing libjpeg...]
--
David C. Ullrich
--
http://mail.python.org/mailman/listinfo/python-list
ature.jpeg = "libjpeg" # alternative name
Not knowing exactly what "find_library_file" does I
couldn't say, but it almost sounds like it's looking
for a file named "jpeg". The summary from the jpeg
install looks like it didn't install any such file.
Maybe "jpeg" should be the name of one of those files
that did get installed?
This _is_ fun. Eech.
DU.
--
David C. Ullrich
--
http://mail.python.org/mailman/listinfo/python-list
In article <[EMAIL PROTECTED]>,
Kevin Walzer <[EMAIL PROTECTED]> wrote:
> David C. Ullrich wrote:
> > Just as well that the message sent earlier today
> > seems to have been lost...
> >
> > Ok. Read your instructions on libjpeg. Read some
> > of t
In article <[EMAIL PROTECTED]>,
Irmen de Jong <[EMAIL PROTECTED]> wrote:
> David C. Ullrich wrote:
> > Just as well that the message sent earlier today
> > seems to have been lost...
> >
> > Ok. Read your instructions on libjpeg. Read some
> > of t
1 - 100 of 164 matches
Mail list logo