Re: naive doc question

2005-01-29 Thread Michael Hartl
i.e., http://docs.python.org/lib/typesmapping.html -- http://mail.python.org/mailman/listinfo/python-list

Re: naive doc question

2005-01-29 Thread Michael Tobis
I wouldn't call the responses here helpful; they seem overspecific. I had a similar problem which led to the follwing code. After I came up with this I saw a very similar utility was derived in Dive into Python. see http://diveintopython.org/power_of_introspection/index.html#apihelper.divein Any

Re: Coding style article with interesting section on white space

2005-01-29 Thread Michael Tobis
(unwisely taking the bait...) If you like your language to look like this http://www.cs.rpi.edu/~szymansk/OOF90/bugs.html then more power to you. I prefer my languages to be portable, terse and expressive. That's why I like Python. If you want your language to be obscure, ill-defined and inconsis

Re: Coding style article with interesting section on white space

2005-01-30 Thread Michael Tobis
[EMAIL PROTECTED] wrote: > Michael Tobis wrote: > > (unwisely taking the bait...) > > > > If you like your language to look like this > > http://www.cs.rpi.edu/~szymansk/OOF90/bugs.html > > then more power to you. > > Thanks for pointing out that interesting

Re: Coding style article with interesting section on white space

2005-01-30 Thread Michael Sparks
On 30 Jan 2005 [EMAIL PROTECTED] wrote: > Sparring > with Alex Martelli is like boxing Mike Tyson, except that one > experiences brain enhancement rather than brain damage :). +1 QOTW :-) Michael. -- http://mail.python.org/mailman/listinfo/python-list

Re: Fortran pros and cons (was Re: Coding style article with interesting section on white space)

2005-01-30 Thread Michael Tobis
[EMAIL PROTECTED] wrote: > Michael Tobis wrote: > Fortran 90/95 is more expressive than Fortran 77 in many ways, as > described in ... > http://www.nr.com/CiP97.pdf . > > ... expresses more science per > line of code and per programming workday. The example shown on p 10

Re: variable declaration

2005-01-31 Thread Michael Tobis
With all due respect, I think "so go away if you don't like it" is excessive, and "so go away if you don't like it and you obviously don't like it so definitely go away" is more so. The writer is obviously neither a native speaker of English nor an accomplished user of Python, so there are two lang

Re: variable declaration

2005-01-31 Thread Michael Tobis
> that's a nice theory, but since the decorator line is executed by the inter- > preter, it's a little weak. Well, uh, who else would process it? "use strict' and 'my epsilon' in perl are executed by the perl interpreter as well, but they have a declarative flavor. A decorator is a modifier to a

Anyone else experience Thread.join() returning early?

2005-01-31 Thread Michael Hobbs
I just wanted to see if anyone else experienced a problem with the Thread.join() method in Python 2.4. Unfortunately, I did not debug this problem fully before re-writing my code to avoid Thread.join(). My specific situation was that I called subprocess.Popen() to spawn a separate process with th

Re: variable declaration

2005-01-31 Thread Michael Tobis
This is definitely a wart: ... z = 42.3 ... ... def f(): ...if False: ... global z ...z = -666 ... ... f() ... print z -- http://mail.python.org/mailman/listinfo/python-list

Re: variable declaration

2005-01-31 Thread Michael Tobis
Alex Martelli wrote: > Michael Tobis <[EMAIL PROTECTED]> wrote: > he can perfectly > well correct his misexpression if he cares to -- not my job to try to > read his mind and perform exegesis on his words. Well, I hate to try to tell you your job, but it doesn't seem to

Re: variable declaration

2005-02-01 Thread Michael Tobis
Given the behavior, the documentation is gratifyingly correct. Given that the syntax is legal, though, the behavior is not what one would intuitively expect, and is therefore unPythonic by (rather dramatically) violating the principle of least surprise. It's also, to me, understandable why it's d

Re: variable declaration

2005-02-01 Thread Michael Tobis
> How common is it for a local variable to be bound in > more than one place within a function? It's more natural for a beginner to read or write .mystr = "" .for snippet in snippets: . if ilike(snippet): . mystr = mystr + snippet than .mylist = [] .for snippet in snippets: . if ilike(

Re: pythonic equivalent of Mathematica's FixedPoint function

2005-02-01 Thread Michael Tobis
We apologise for the previous apology. http://arago4.tn.utwente.nl/stonedead/albums-cds/sketches/another-monty-python-record/apologies.html -- mt -- http://mail.python.org/mailman/listinfo/python-list

Re: variable declaration

2005-02-01 Thread Michael Tobis
> All in all, I fail to see what gains would be expected by making Python > into a single-assignment or single-binding language, even on a module by > module basis, to repay this kind of awkwardness. Just to be clear, if anyone was suggesting that, it wasn't me. It would be helpful on occasion in

Re: Go visit Xah Lee's home page

2005-02-02 Thread Michael Goettsche
he box about George Bush on his Homepage.. it shows that he is a well-thinking person. So, don't blame him in general. Michael -- http://mail.python.org/mailman/listinfo/python-list

Re: Basic file operation questions

2005-02-03 Thread Michael . Lang
In article <[EMAIL PROTECTED]>, Peter Nuttall wrote: > On Wed, Feb 02, 2005 at 11:47:41PM -0500, Caleb Hattingh wrote: >> Hi Alex >> >> Assuming you have a file called "data.txt": >> >> *** >> f = open('data.txt','r') >> lines = f.readlines() >> f.close() >> for line in lines: >> print line >

Re: remove duplicates from list *preserving order*

2005-02-03 Thread Michael Spencer
gt;>> list(filterdups3([1,2,2,3,3,3,4,4,4,2,2,5])) [1, 2, 3, 4, 5] >>> Michael -- http://mail.python.org/mailman/listinfo/python-list

Re: List mapping question

2005-02-03 Thread Michael Spencer
tring equal to an integer, which it really didn't like. Marc For your problem as stated: >>> a=b=c="1" >>> for var in ["a","b","c"]: ... exec "%s = int(%s)" % (var,var) ... >>> a,b,c (1, 1, 1) >>> But don't do this, except as a "one-off" data crunching exercise Michael -- http://mail.python.org/mailman/listinfo/python-list

Re: how to generate SQL SELECT pivot table string

2005-02-03 Thread Michael Spencer
2003""".splitlines() >>> step1result ['2000', '2001', '2002', '2003'] >>> step2query = "Prefix " + ",".join(["Case %s" % year for year in step1result]) + " Postfix" >>> step2query 'Prefix Case 2000,Case 2001,Case 2002,Case 2003 Postfix' HTH Michael -- http://mail.python.org/mailman/listinfo/python-list

Re: Popularizing SimpleHTTPServer and CGIHTTPServer

2005-02-04 Thread Michael Spencer
Jorey Bump wrote: > ... Is there a NotSoSimpleHTTPServer? ... Steve Holden wrote: > ... You want ExtremelyBloodyComplicatedHTTPServer :-) Lee Harr wrote: ... I think I would point to twisted for that. Michael :-) -- http://mail.python.org/mailman/listinfo/python-list

Re: returning True, False or None

2005-02-04 Thread Michael Spencer
anyone see a simpler way of writing this? STeVe max(lst) ;-) Michael -- http://mail.python.org/mailman/listinfo/python-list

Converting strings to dates

2005-02-04 Thread Chermside, Michael
> import time, datetime >>> a_date = datetime.date.today() >>> s = str(a_date) >>> print s 2005-02-04 Now I convert it back: >>> new_date = datetime.date.fromtimestamp( ... time.mktime(time.strptime(s, '%Y-%m-%d'))) >>> new_date dateti

Re: changing local namespace of a function

2005-02-04 Thread Michael Spencer
una(**b)) >>> a {'y': 2, 'x': 1, 'z': 3} >>> b {'y': 3, 'x': 3, 'z': 6} >>> Alternatively, you could use exec: >>> a = {'x':1, 'y':2} >>> b = {'x':3, 'y':3} >>> exec "z = x + y" in globals(), a >>> a {'y': 2, 'x': 1, 'z': 3} >>> exec "z = x + y" in globals(), b >>> b {'y': 3, 'x': 3, 'z': 6} >>> Michael -- http://mail.python.org/mailman/listinfo/python-list

Re: changing local namespace of a function

2005-02-04 Thread Michael Spencer
Bo Peng wrote: Michael Spencer wrote: > There are hundreds of items in the dictionary (that will be needed in the calculation) so passing the whole dictionary is a lot better than passing individual items. ... def fun(d): exec 'z = x + y' in globals(), d seems to be more readable

Re: returning True, False or None

2005-02-04 Thread Michael Spencer
bool' Any comments? Fahri TypeError: unsupported operand type(s) for |: 'NoneType' and 'bool' operator.or_ is "|" i.e., bitwise, not logical or Michael -- http://mail.python.org/mailman/listinfo/python-list

Re: changing local namespace of a function

2005-02-04 Thread Michael Spencer
Nick Coghlan wrote: Michael Spencer wrote: def fun(dict): # set dict as local namespace # locals() = dict? z = x + y As you no doubt have discovered from the docs and this group, that isn't doable with CPython. Not entirely impossible: Py> def f(d): ... exec "loca

Re: returning True, False or None

2005-02-04 Thread Michael Spencer
Fahri Basegmez wrote: "Michael Spencer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Fahri Basegmez wrote: reduce(lambda x, y: x or y, lst) works but when I tried import operator reduce(operator.or_, lst) this did not work. It pukes Traceback (most recent c

Re: changing local namespace of a function

2005-02-05 Thread Michael Spencer
d = Model(a) >>> d.z 3 >>> d.z1 4 >>> a {'y': 2, 'x': 1, 'z': 3, 'z1': 4} >>> d= Model(b) >>> d.z1 9 >>> b {'y': 3, 'x': 3, 'z': 6, 'z1': 9} >>> Michael -- http://mail.python.org/mailman/listinfo/python-list

Re: empty classes as c structs?

2005-02-05 Thread Michael Spencer
Alex Martelli wrote: Nick Coghlan <[EMAIL PROTECTED]> wrote: ... Michael Spencer also posted ... Wasted indirection, IMHO. A better implementation: class attr_view(object): def __init__(self, data): self.__dict__ = data Alex Indeed! A complete brain-blip Michael -

Re: empty classes as c structs?

2005-02-05 Thread Michael Spencer
could take an additional keyword argument to set its __dict__ Michael -- http://mail.python.org/mailman/listinfo/python-list

Re: How do I convert arithemtic string (like "2+2") to a number?

2005-02-05 Thread Michael Hartl
Use the eval function: >>> eval("30/(6+9)") 2 Michael -- http://mail.python.org/mailman/listinfo/python-list

Re: How do I convert arithemtic string (like "2+2") to a number?

2005-02-05 Thread Michael Hartl
Adam brings up a good point: eval is a very general function which evaluates an arbitrary Python expression. As a result, it (and its close cousin exec) should be used with caution if security is an issue. Michael -- http://mail.python.org/mailman/listinfo/python-list

Re: regarding popen function

2005-06-19 Thread Michael Hoffman
Peter Hansen wrote: > Michael, tai64nlocal is a program that converts a special "packed" > timestamp to human-readable form. Thanks Peter. I was asking somewhat rhetorically but I have a love of UNIX arcana and now I know. :) -- Michael Hoffman -- http://mail.python.org/

Re: Why is there no instancemethod builtin?

2005-06-19 Thread Michael Hoffman
John Roth wrote: > you need _both_ isinstance and the types module to do a correct > check for any string type: isinstance(fubar, types.StringTypes). > That's because both string and unicode are subtypes of one base. But basestring, their base class is a built-in. -- Michael Ho

Re: Embedded Systems Python?

2005-06-20 Thread Michael Sparks
doubt you'll see major problems. Regards, Michael. -- http://kamaelia.sourceforge.net/ -- http://mail.python.org/mailman/listinfo/python-list

Re: references/addrresses in imperative languages

2005-06-20 Thread Michael Sparks
e's a lot of dodgy governments in the world. (Then again, Xah may just have "net-tourettes" (no offense to anyone intended) :-) However 4 continents rolling their eyes? I'm guessing that you're in the North American continent from your email, I'm in Europe, so that's at least 2 continents... >:-) Michael. -- http://mail.python.org/mailman/listinfo/python-list

Re: Using print with format to stdout generates unwanted space

2005-06-20 Thread Michael Hoffman
Paul Watson wrote: > While printf() does tightly control formatting in C, it does not in > Python. There is no printf() in Python. You should not think of print as being a Python version of printf. -- Michael Hoffman -- http://mail.python.org/mailman/listinfo/python-list

Re: Using print with format to stdout generates unwanted space

2005-06-21 Thread Michael Hoffman
ackspace character. > If you feed this output to another program, chances are it will > not treat as no space at all. > > I prefer building up a list and doing ' '.join(thelist) in these situations. A much better approach. Or you can use sys.stdout.write() as others have

ANN: python-ldap-2.0.8

2005-06-22 Thread Michael Ströder
Find a new release of python-ldap: http://python-ldap.sourceforge.net/ python-ldap provides an object-oriented API to access LDAP directory servers from Python programs. It mainly wraps the OpenLDAP 2.x libs for that purpose. Additionally it contains modules for other LDAP-related stuff (e.g. p

Re: Loop until condition is true

2005-06-22 Thread Michael Hoffman
ggs. You apparently don't know how to do it without getting egg on your face. -- Michael Hoffman -- http://mail.python.org/mailman/listinfo/python-list

Re: how to use more than 1 __init__ constructor in a class ?

2005-06-22 Thread Michael Hoffman
__init__(self, x, y) > self.z = z > #-- Well for the example you used, multiple constructors are not needed. This will get you the same result as what I imagine you wanted the first example to do: class myPointClass: def __init__(self, x=0, y=0, z=0): self.x = x

Re: PEP ? os.listdir enhancement

2005-06-22 Thread Michael Hoffman
Peter Hansen wrote: > Using Jason Orendorff's "path" module, all this code basically collapses > down to this beauty (with your variable "path" renamed to myPath to > avoid a name collision): This has to be the non-stdlib library I use the most. It

Python internals and parser

2005-06-22 Thread Michael Barkholt
like the code to be written in C). Any inputs? Regards, Michael Barkholt -- http://mail.python.org/mailman/listinfo/python-list

Re: Loop until condition is true

2005-06-23 Thread Michael Hoffman
understand why this isn't in 2.4 Because it would break existing code. -- Michael Hoffman -- http://mail.python.org/mailman/listinfo/python-list

Re: Loop until condition is true

2005-06-23 Thread Michael Hoffman
o True or False, mainly as a compatibility measure for the days before they were built-ins. If you try assigning None, CPython will refuse to compile the module, even if the code where None is assigned is unreachable. If there was ever a good reason to assign to None, I don't know it. -- M

Re: Loop until condition is true

2005-06-23 Thread Michael Hoffman
Antoon Pardon wrote: > Op 2005-06-22, Michael Hoffman schreef <[EMAIL PROTECTED]>: > >>Remi Villatel wrote: >> >>>Fredrik Lundh wrote: >>> >>>>checking if a logical expression is true by comparing it to True is bad >>>>style, an

Re: Listening for a Keypress (Console, not GUI)

2005-06-23 Thread Michael Hoffman
.html#how-do-i-check-for-a-keypress-without-blocking -- Michael Hoffman -- http://mail.python.org/mailman/listinfo/python-list

Re: super problem

2005-06-25 Thread Michael Hoffman
avior using a dummy class. If you try to create a self-contained testcase, you will have an easier time figuring where the problem is. -- Michael Hoffman -- http://mail.python.org/mailman/listinfo/python-list

Re: a dictionary from a list

2005-06-25 Thread Michael Hoffman
ing featurism. Is this actually useful in real code? Personally, I use it all the time. It's a much more convenient literal for a dictionary. And before it was introduced I used this utility function: def mkdict(**kwargs): return kwargs -- Michael Hoffman -- http://mail.python.org/mailman/listinfo/python-list

Re: Modules for inclusion in standard library?

2005-06-27 Thread Michael Hoffman
Robert Kern wrote: > I would like to see the setuptools/PythonEggs/EasyInstall trifecta get > more attention and eyeballs. Once it is mature, I think that it will > obviate the desire for stdlibification of most of the packages being > requested here. Looks pretty cool! -- Mic

Re: Set/Get attribute syntatic sugar

2005-06-28 Thread Michael Hoffman
> I think he means something like this: > e = 'i_am_an_attribute' > o.(e) = 10 > o.i_am_an_attribute == 10 I always use the getattr() and setattr() built-ins which could be considered syntactic sugar when compared to the alternatives above. But that's all the syntactic sugar you need--any more will give you cancer of the semicolon. -- Michael Hoffman -- http://mail.python.org/mailman/listinfo/python-list

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-06-28 Thread Michael Hoffman
nsophisticated and dumb? > > Be blunt. We Americans need to know. To be blunt, I have no idea what this has to do with Python. Surely selecting the right forum to use indicates more sophistication and high intelligence than the way one speaks. ;-) -- Michael Hoffman -- http://mail.python.org/mailman/listinfo/python-list

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-06-28 Thread Michael Hoffman
muldoon wrote: > Michael Hoffman wrote: >>muldoon wrote: >> >>>Americans consider having a "British accent" a sign of sophistication >>>and high intelligence. Many companies hire salespersons from Britain to >>>represent their products,etc. Qu

Re: strange __call__

2005-06-29 Thread Michael Hoffman
The original function a(x) will still be stored as a closure in what is returned from b(). If this is of purely academic interest then the answer is I don't know. :) -- Michael Hoffman -- http://mail.python.org/mailman/listinfo/python-list

Re: How to compare two directories?

2005-06-29 Thread Michael Hoffman
may help, but I wonder if there is a ready-to-use function in python > libs? That's a good start. Why doesn't dircmp work for you? -- Michael Hoffman -- http://mail.python.org/mailman/listinfo/python-list

Re: Set/Get attribute syntatic sugar

2005-06-29 Thread Michael Hoffman
n't understand the original question either until Robert Kern guessed what the OP was talking about. -- Michael Hoffman -- http://mail.python.org/mailman/listinfo/python-list

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-06-29 Thread Michael Hoffman
trangely enough there are Brits who pronounce "hotel" without an H at the beginning. And even those who pronounce it with an H sometimes say "an hotel" rather than "a hotel" because it used to be pronounced starting with the vowel! Similarly, the Brits should

Re: How to compare two directories?

2005-06-30 Thread Michael Hoffman
could ildg wrote: > I found dircmp compare only the direct dirs and files, > and it will not do anything to the sub-directories. The documentation for dircmp.report_full_closure() disagrees with you. -- Michael Hoffman -- http://mail.python.org/mailman/listinfo/python-list

Europython 2005 notes online

2005-07-01 Thread Michael Sparks
leave a link behind to the new location. Corrections welcome, and opinions may abound! ObPython (if needed ;) : Notes were taken using a wysiwyg editor of mine written using PyQT :-) Have fun... Michael. -- http://kamaelia.sourceforge.net/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Assigning to None

2005-07-01 Thread Michael Sparks
hat the value is ephemeral, the fact it isn't name emphasises it's unimportance and the repetition (in the above case) really makes it clear. It also _looks_ like the value is thrown away as well. And it doesn't clutter up your namespace... Michael. -- http://mail.python.org/mailman/listinfo/python-list

No sys.ps2 in IDLE (was Re: question)

2005-07-03 Thread Michael Hoffman
; > > where is the problem? The problem is that you are using IDLE (and an old version at that), which doesn't use sys.ps2. -- Michael Hoffman -- http://mail.python.org/mailman/listinfo/python-list

Re: No sys.ps2 in IDLE (was Re: question)

2005-07-03 Thread Michael Hoffman
shisa wrote: > What should I do to correct the errors accordingly? What error? IDLE appears to be behaving as designed. Also, please don't top-post--it makes responding to your message in a way that others can understand more difficult. http://en.wikipedia.org/wiki/Top-posting --

Re: question about raw_input

2005-07-03 Thread Michael Hoffman
with PyScripter, not Python. You'd be better off asking the PyScripter people than asking here. -- Michael Hoffman -- http://mail.python.org/mailman/listinfo/python-list

Re: How do you program in Python?

2005-07-03 Thread Michael Linnemann
ous command (which > is generally the name of my script, or a command like "python > myscript.py"), and hit Enter to execute it. I do the same thing without a command prompt, just pressing F5. SciTE sure is a good editor :-) Regards Michael -- Imagine being in a coma for a year and

Re: Python concurrent tasking frameworks?

2005-07-03 Thread Michael Sparks
d "window manager" (really stretching things there, surface manager might be more appropriate) for components, and audio decode/playback. It isn't as mature as Twisted though, so that should affect your viewpoint! (Had some good chats at Europython though about how we can go about integration with twisted!) I suppose it should be possible to have pools of existing components for wiring into connections on demand though, which might be interesting. Best Regards, Michael. -- http://kamaelia.sourceforge.net/ -- http://mail.python.org/mailman/listinfo/python-list

Re: looping over a big file

2005-07-03 Thread Michael Hoffman
in data: > whatever > finally: > data.close() > > Guido has made a pronouncement on open vs. file. I think he prefers > open for opening files, and file for type testing, but may well be > wrong. I don't think it's critical. He has said tha

Re: "long int..." exception reported with strange traceback location

2005-07-04 Thread Michael Hoffman
h a simpler testcase. Strangely, the exception occurs in the statement *following* the os.utime() call: >>> import os, sys >>> os.utime("foo_test_file", (0, float(sys.maxint+1))) >>> print "hi" OverflowError: long int too large to convert to int Loo

Re: math.nroot [was Re: A brief question.]

2005-07-05 Thread Michael Hudson
Tim Peters <[EMAIL PROTECTED]> writes: > All Python behavior in the presence of infinities, NaNs, and signed > zeroes is a platform-dependent accident, mostly inherited from that > all C89 behavior in the presence of infinities, NaNs, and signed > zeroes is a platform-dependent crapshoot. As you

Re: readline: edit-and-execute-command

2005-07-05 Thread Michael Hoffman
might just be added for bash. That said, this would be very useful. You should submit an RFE on the Sourceforge tracker. -- Michael Hoffman -- http://mail.python.org/mailman/listinfo/python-list

Re: f*cking re module

2005-07-05 Thread Michael Hoffman
Greg Lindstrom wrote: > I hear that Perl 6 is > going to have a rewrite of regular expressions; it will be interesting > to see what their hard work produces. From what I saw a while ago, it didn't look like it would be any simpler or more elegant. But that was a while ag

Re: pickle broken: can't handle NaN or Infinity under win32

2005-07-05 Thread Michael Hudson
"Terry Reedy" <[EMAIL PROTECTED]> writes: > "Grant Edwards" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > I'm working on it. I should have said it's trivial if you have > > access to the platforms to be supported. I've tested a fix > > that supports pickle streams generated

Re: More On - deepcopy, Tkinter

2005-07-05 Thread Michael Hoffman
l the advice applies to you, feel free to ignore it, but you clearly haven't been getting the results from this forum that you expected. -- Michael Hoffman -- http://mail.python.org/mailman/listinfo/python-list

Re: math.nroot [was Re: A brief question.]

2005-07-05 Thread Michael Hudson
and signed > >> zeroes is a platform-dependent crapshoot. > > [Michael Hudson] > > As you may have noticed by now, I'd kind of like to stop you saying > > this :) -- at least on platforms where doubles are good old-fashioned > > 754 8-byte values. > >

Re: frozenset question

2005-07-06 Thread Michael Hudson
Will McGugan <[EMAIL PROTECTED]> writes: > Qiangning Hong wrote: > > On 7/6/05, Will McGugan <[EMAIL PROTECTED]> wrote: > > > >>Hi, > >> > >>Are there any benefits in using a frozenset over a set, other than it > >>being immutable? > > A frozenset can be used as a key of a dict: > > Thanks, but

Re: website catcher

2005-07-06 Thread Michael Ströder
r similar is what you're looking for instead short-lived CGI-BIN programs forked by the web server. Ciao, Michael. -- http://mail.python.org/mailman/listinfo/python-list

PyNSol: Objects as Scaffolding

2005-07-06 Thread Michael Tobis
bout a software project as it is an article using that project to present an alternative way of thinking about how object oriented programming (and Python!) can relate to high performance simulations. I welcome comments. mt -- Michael Tobis Geophysical Sciences University of Chicago -- http://mail.pyt

Re: Strange os.path.exists() behaviour

2005-07-06 Thread Michael Hoffman
Jeff Epler wrote: > Here's the bug. You're using Windows. QOTW (speaking as someone who is using Windows right now). -- Michael Hoffman -- http://mail.python.org/mailman/listinfo/python-list

Re: Inheritance/Late Private Binding

2005-07-06 Thread Michael Hoffman
e you don't seem to have anything callable named ctor. As for the constructor, just call it __init__, it will avoid confusion with __new__. -- Michael Hoffman -- http://mail.python.org/mailman/listinfo/python-list

Re: calling python procedures from tcl using tclpython

2005-07-07 Thread Michael Schlenker
re you expecting to happen? Your call to '$interpreter eval' lets you call arbitrary python code, but you have to provide the python code that loads your function definitions etc. I don't know python, but it should be a trivial code. Michael -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Forum

2005-07-10 Thread Michael Hoffman
Throne Software wrote: > Throne Software has opened up a Python Forum at: > > http://www.thronesoftware.com/forum/ > > Join us! Why shouldn't I just stay here? -- Michael Hoffman -- http://mail.python.org/mailman/listinfo/python-list

Re: Read-only class properties

2005-07-10 Thread Michael Spencer
>>> B.TheAnswer 'The Answer according to __metaclass__ is 42' >>> this means that the getter doesn't automatically get a reference to the class (since it is a method of metaclass), which may or may not matter, depending on the application Michael -- http://mail.python.org/mailman/listinfo/python-list

Re: math.nroot [was Re: A brief question.]

2005-07-11 Thread Michael Hudson
nce of infinities, NaNs, and signed > >>>> zeroes is a platform-dependent crapshoot. > > [Michael Hudson] > >>> As you may have noticed by now, I'd kind of like to stop you saying > >>> this :) -- at least on platforms where doubles are good old-fashi

Re: PPC floating equality vs. byte compilation

2005-07-11 Thread Michael Hudson
"Terry Reedy" <[EMAIL PROTECTED]> writes: > "Tim Peters" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > [Donn Cave] > >> I ran into a phenomenon that seemed odd to me, while testing a > >> build of Python 2.4.1 on BeOS 5.04, on PowerPC 603e. > >> > >> test_builtin.py, for examp

Re: pyo contains absolute paths

2005-07-11 Thread Michael Hudson
David Siroky <[EMAIL PROTECTED]> writes: > Hi! > > When I "compile" my python files with "python -OO " into pyo files > then they still contain absolute paths of the source files which is > undesirable for me. How can I deal with that? Are you trying to save space? In 2.4 and later each cod

Re: math.nroot [was Re: A brief question.]

2005-07-12 Thread Michael Hudson
I doubt anyone else is reading this by now, so I've trimmed quotes fairly ruthlessly :) Tim Peters <[EMAIL PROTECTED]> writes: > > Actually, I think I'm confused about when Underflow is signalled -- is it > > when a denormalized result is about to be returned or when a genuine > > zero is about t

Re: math.nroot [was Re: A brief question.]

2005-07-13 Thread Michael Hudson
Tim Peters <[EMAIL PROTECTED]> writes: > [Michael Hudson] > > I doubt anyone else is reading this by now, so I've trimmed quotes > > fairly ruthlessly :) > > Damn -- there goes my best hope at learning how large a message gmail > can handle before blowing

Re: **kwargs?

2005-07-13 Thread Michael Hoffman
gs *x and **y instead, but they will still act just like *args and **kwargs. The stars are magic, not the names. -- Michael Hoffman -- http://mail.python.org/mailman/listinfo/python-list

String Manipulation

2005-07-13 Thread Michael Jordan
i'll be straight with you and say that this is a homework assignment. ive tried to figure it out on my own but am now out of time. i need to go through a .txt file and get rid of all punctuation. also, every time i see the work "Fruitloops=1" or "Hamburgers=x" where x is ANY number i need to get

String Manipulation

2005-07-13 Thread Michael Jordan
hey, i have this huge text file and i need to go through and remove all punctuation and every instance of the phrase "fruitloops=$" where $ is any number 0-100" um, and yeah this is homework but i've tried to no avail. thanks guys. cheerio :). jen -- http://mail.python.org/mailman/listinfo/py

Re: DNS access

2005-07-13 Thread Michael Ströder
laksh wrote: > > is it possible to give parameters like the IP of a DNS server and the > DNS query to a python program and obtain the response from the DNS > server ? http://pydns.sf.net http://www.dnspython.org/ http://www.google.com/search?hl=en&q=python+dns&btnG=Google+S

Who uses input()? [was Re: question on "input"]

2005-07-14 Thread Michael Hoffman
to get this deprecated but Guido disagreed. -- Michael Hoffman -- http://mail.python.org/mailman/listinfo/python-list

Re: Why does python break IEEE 754 for 1.0/0.0 and 0.0/0.0?

2005-07-15 Thread Michael Hudson
Grant Edwards <[EMAIL PROTECTED]> writes: > I've read over and over that Python leaves floating point > issues up to the underlying platform. Please read the conversation Tim and I are having in the "Re: math.nroot [was Re: A brief question.]" elsewhere in this same newsgroup. Cheers, mwh --

Re: math.nroot [was Re: A brief question.]

2005-07-15 Thread Michael Hudson
module.c were > >> happy to use gcc, they all could have used the older gcc spellings > >> (which are in fpectlmodule.c, BTW, under the __GLIBC__ #ifdef). > > [Michael] > > Um, well, no, not really. The stuff under __GLIBC___ unsurprisingly > > applies to plat

Kamaelia Talk at Open Tech 2005, anyone for sprinting?

2005-07-15 Thread Michael Sparks
ty for the BBC - which has clear benefits for everyone! (Even though the internet is not TV :) Kamaelia is designed to be able to picked up relatively quickly/easily, but having a working knowledge of python is probably a necessity. If you're interested, please let me know! (Either before, or at

Re: HTML expect in python

2005-07-16 Thread Michael Hoffman
D H wrote: > See the mechanize module: http://wwwsearch.sourceforge.net/mechanize/ I second this, a very useful module. I've unfortunately had to change it a little to deal with inevitably bad HTML supplied by web sites. -- Michael Hoffman -- http://mail.python.org/mailman/listinf

Re: beginner question fibonacci

2005-07-17 Thread Michael Hoffman
our existing a and b "a0" and "b0", and the next a and b "a1" and "b1". When you do a, b = b, a+b you are assigning: a1 = b0 b1 = a0 + b0 But when you use separate statements, you are assigning: a1 = b0 b1 = a1 + b0 = b0 + b0 = 2*b0 -- Michael Hoffman -- http://mail.python.org/mailman/listinfo/python-list

Re: What is your favorite Python web framework?

2005-07-18 Thread Michael Maibaum
emplating language looked less nice than the rest of it on first glance, it says you don't have to use it though... Michael -- http://mail.python.org/mailman/listinfo/python-list

Re: Filtering out non-readable characters

2005-07-18 Thread Michael Ströder
(n1,n2)). I'm glad this is forbidden now. Ciao, Michael. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python ldap pointers for a newbie - Actually just trying to decifer the error..

2005-07-18 Thread Michael Ströder
eAttrs) > result_type, result_data = cnx.result(ldap_result_id, 0) You don't need this if you just want to use synchronous search method. Ciao, Michael. -- http://mail.python.org/mailman/listinfo/python-list

<    11   12   13   14   15   16   17   18   19   20   >