Re: How do I subclass the @property setter method?

2016-05-20 Thread Christopher Reimer
On 5/20/2016 11:50 AM, Christopher Reimer wrote: This code does work, blows up the unit test, and keeps PyCharm happy. @property def position(self): return super().position @position.setter def position(self, position): pass Re-declaring @property and calling

Re: for / while else doesn't make sense

2016-05-20 Thread Christopher Reimer
On 5/20/2016 8:59 AM, Zachary Ware wrote: On Fri, May 20, 2016 at 3:09 AM, Erik wrote: On 20/05/16 00:51, Gregory Ewing wrote: It's not so bad with "else" because you need to look back to find out what condition the "else" refers to anyway. With my tongue only slightly in my cheek, if it wa

Re: for / while else doesn't make sense

2016-05-20 Thread Christopher Reimer
On 5/20/2016 3:43 PM, Steven D'Aprano wrote: But the idea that you should avoid a Python feature while programming in Python because Javascript doesn't have it, or Ruby, or C, is surely the height of muddleheaded thinking. You're not programming Javascript, Ruby or C, you're programming in Pytho

Re: for / while else doesn't make sense

2016-05-20 Thread Christopher Reimer
On 5/20/2016 7:31 PM, Chris Angelico wrote: On Sat, May 21, 2016 at 11:23 AM, Christopher Reimer wrote: On 5/20/2016 3:43 PM, Steven D'Aprano wrote: But the idea that you should avoid a Python feature while programming in Python because Javascript doesn't have it, or Ruby, or C,

Re: How do I subclass the @property setter method?

2016-05-21 Thread Christopher Reimer
On 5/21/2016 1:52 AM, Dirk Bächle wrote: Hi Christopher, On 20.05.2016 20:50, Christopher Reimer wrote: Greetings, My chess engine has a Piece class with the following methods that use the @property decorator to read and write the position value. slightly off topic: is your chess engine

Re: Education [was Re: for / while else doesn't make sense]

2016-05-21 Thread Christopher Reimer
On 5/21/2016 3:05 AM, Steven D'Aprano wrote: On Sat, 21 May 2016 03:18 pm, Rustom Mody wrote: Given that for the most part, most of us are horribly uneducated [ http://www.creativitypost.com/education/9_elephants_in_the_classroom_that_should_unsettle_us ] how do we go about correcting our wr

Re: for / while else doesn't make sense

2016-05-23 Thread Christopher Reimer
> On May 23, 2016, at 1:22 PM, Grant Edwards wrote: > >> On 2016-05-23, Ian Kelly wrote: >>> On Mon, May 23, 2016 at 9:53 AM, Ian Kelly wrote: >>> I'm not sure where ℝ comes into this in the first place. Existing >>> Python numeric types only represent various subsets of ℚ (in the case >>> of f

Re: for / while else doesn't make sense

2016-05-24 Thread Christopher Reimer
On May 24, 2016, at 7:23 AM, Grant Edwards wrote: > >> On 2016-05-24, Steven D'Aprano wrote: >>> On Tue, 24 May 2016 08:36 am, Christopher Reimer wrote: >>> >>> Those symbols are blowing my 8-bit ASCII brain. :) >> >> That's cer

Re: for / while else doesn't make sense

2016-05-25 Thread Christopher Reimer
> On May 24, 2016, at 11:38 PM, Gregory Ewing > wrote: > > Christopher Reimer wrote: >> Nope. I meant 8-bit ASCII (0-255). >> http://www.ascii-code.com > > That page is talking about latin-1, which is just one of many > possible 8-bit extensions of ascii. Ba

Re: for / while else doesn't make sense

2016-05-25 Thread Christopher Reimer
> On May 25, 2016, at 3:47 AM, Marko Rauhamaa wrote: > > Christopher Reimer : > >> Back in the early 1980's, I grew up on 8-bit processors and latin-1 was >> all we had for ASCII. > > You really were very advanced. According to https://en.wikipedia.org/wiki/

Re: I'm wrong or Will we fix the ducks limp?

2016-06-03 Thread Christopher Reimer
On 6/3/2016 7:31 PM, Steven D'Aprano wrote: On Sat, 4 Jun 2016 09:06 am, Sayth Renshaw wrote: I cant create a list with an append method pf.append(thing) in one go . Correct. You cannot append to a list until the list exists. Nor can you uppercase a string until the string exists: s = "hell

Re: i'm a python newbie & wrote my first script, can someone critique it?

2016-06-10 Thread Christopher Reimer
Sent from my iPhone > On Jun 10, 2016, at 3:52 PM, mad scientist jr > wrote: > . > Now that it's done, I am wondering what kind of things I could do better. This is Python, not BASIC. Lay off on the CAP LOCK key and delete all the comments and separation blocks. No one is going to find your

Re: Is signed zero always available?

2016-06-22 Thread Christopher Reimer
> On Jun 22, 2016, at 7:59 AM, Grant Edwards wrote: > >> On 2016-06-22, Random832 wrote: >>> On Wed, Jun 22, 2016, at 10:19, Grant Edwards wrote: >>> >>> Is that guaranteed by Python, or just a side-effect of the >>> implementation? Back in the days when Python used native C >>> integers I thi

Re: Assignment Versus Equality

2016-06-26 Thread Christopher Reimer
On 6/26/2016 6:21 AM, Steven D'Aprano wrote: On Sun, 26 Jun 2016 08:48 pm, BartC wrote: On 26/06/2016 08:36, Lawrence D’Oliveiro wrote: One of Python’s few mistakes was that it copied the C convention of using “=” for assignment and “==” for equality comparison. One of C's many mistakes. Unf

Re: Assignment Versus Equality

2016-06-26 Thread Christopher Reimer
On 6/26/2016 8:41 AM, MRAB wrote: On 2016-06-26 11:48, BartC wrote: On 26/06/2016 08:36, Lawrence D’Oliveiro wrote: One of Python’s few mistakes was that it copied the C convention of using “=” for assignment and “==” for equality comparison. One of C's many mistakes. Unfortunately C has bee

Re: Empty List

2016-06-26 Thread Christopher Reimer
On 6/26/2016 8:13 PM, Elizabeth Weiss wrote: Hi There, What is the point of this code?: word=[] print(word) The result is [] When would I need to use something like this? Thank you! Sometimes you need to assign an empty list to a variable prior to using it in a looping structure. Here'

Re: Creating a calculator

2016-07-01 Thread Christopher Reimer
> On Jun 30, 2016, at 11:42 PM, Jussi Piitulainen > wrote: > > DFS writes: > >> Here's a related program that doesn't require you to tell it what type >> of operation to perform. Just enter 'num1 operator num2' and hit >> Enter, and it will parse the entry and do the math. >> >> -

Re: Creating a calculator

2016-07-01 Thread Christopher Reimer
> On Jul 1, 2016, at 5:46 AM, Jussi Piitulainen > wrote: > > Christopher Reimer writes: > >> For my BASIC interpreter, each line of BASIC is broken this way into >> tokens. >> >> line_number, keyword, *expression = line.split(' ', 2) >>

Re: Creating a calculator

2016-07-01 Thread Christopher Reimer
> On Jul 1, 2016, at 6:52 AM, Steven D'Aprano wrote: > >> On Fri, 1 Jul 2016 10:25 pm, Christopher Reimer wrote: >> >> For my BASIC interpreter, each line of BASIC is broken this way into >> tokens. > [...] >> By using * to unpack the split line

Re: The Mailing List Digest Project

2019-03-26 Thread Christopher Barker
bute an article, just follow existing .md format and > put it in the .md folder > > planning to go across ideas, list and dev > > i can tell you, it's a really enjoyable experience. > > psst. we can enhance some html later > > -- > Abdur-Rahmaan Janhangeer

Re: The Mailing List Digest Project

2019-03-26 Thread Christopher Barker
> Abdur-Rahmaan Janhangeer > Mauritius > -- Christopher Barker, PhD Python Language Consulting - Teaching - Scientific Software Development - Desktop GUI and Web Development - wxPython, numpy, scipy, Cython -- https://mail.python.org/mailman/listinfo/python-list

Re: [Python-ideas] Re: Enhancing Zipapp

2020-01-06 Thread Christopher Barker
il to python-ideas-le...@python.org > https://mail.python.org/mailman3/lists/python-ideas.python.org/ > Message archived at > https://mail.python.org/archives/list/python-id...@python.org/message/RVGFMDP3PG6TXFQGH7ISRLYM4FS5CO64/ > Code of Conduct: http://python.org/psf/codeofconduct/ > -- Christopher B

Re: [Python-ideas] Re: Enhancing Zipapp

2020-01-07 Thread Christopher Barker
There you go -- you've got half the job done already :-) But: "Unlike “conventional” zipapps, shiv packs a site-packages style directory of your tool’s dependencies into the resulting binary, and then at bootstrap time extracts it into a ~/.shiv cache directory." which is h

Re: [Python-ideas] Re: Enhancing Zipapp

2020-01-08 Thread Christopher Barker
n a pain point at work. >> > I'm pretty sure this is a non-issue for this use-case. If you need to open sip files created by arbitrary other systems, or create zip files that can be opened by arbitrary other systems, then it's a big mess. But that isn't the case here.

Re: [Python-ideas] Re: Enhancing Zipapp

2020-01-08 Thread Christopher Barker
for each app are extracted then it's not > a global dump but more specific > I'm not sure how that differs from a .shiv directory, which is not global. But a way to share packages in the "central place for packages" would be nice. -- maybe how conda does it with hard links? -

I need to create .odt or .rtf documents in Python3. what is the best tool to do this....

2020-01-12 Thread christopher rehm
hi all im new here. i need to create .odt or rtf documents from a python 3 program. i need a package or library that actually has real documentation and examples, using python3 and the tool ( sorry PyRTF3 is a major failure here) does anyone have any suggestions? chris -- https://mail.python.or

Re: Single type for __builtins__ in Py3.0

2005-09-23 Thread Christopher Subich
Collin Winter wrote: > Hallo all, > I'd like to propose that in Py3.0 (if not earlier), __builtins__ will > be the same type regardless of which namespace you're in. Tim Peters > has said [1] that the reason __builtins__ in __main__ is a module so > that "the curious don't get flooded with output w

Re: Overloading __init__ & Function overloading

2005-09-30 Thread Christopher Subich
Iyer, Prasad C wrote: > Thanks a lot for the reply. > But I want to do something like this > > class BaseClass: > def __init__(self): > # Some code over here > def __init__(self, a, b): > # Some code over here > def __init__(self, a, b, c): >

Re: Can't extend function type

2005-10-07 Thread Christopher Subich
Diez B. Roggisch wrote: > Paul Rubin wrote: > >> Oh well. I had wanted to be able to define two functions f and g, and >> have f*g be the composition of f and g. >> >> >>> func_type = type(lambda: None) >> >>> class composable_function(func_type): >> ... def __mult__(f,g): >> ..

Re: Python interpreter bug

2005-10-07 Thread Christopher Subich
[EMAIL PROTECTED] wrote: > No doubt you're right but common sense dictates that membership testing > would test identity not equality. > This is one of the rare occasions where Python defeats my common sense But object identity is almost always a fairly ill-defined concept. Consider this (Python

Re: socketServer questions

2005-10-07 Thread Christopher Subich
Paul Rubin wrote: > rbt <[EMAIL PROTECTED]> writes: > >>1. Do I need to use threads to handle requests, if so, how would I >>incorporate them? The clients are light and fast never sending more >>than 270 bytes of data and never connecting for more than 10 seconds >>at a time. There are currently

Re: Yes, this is a python question, and a serious one at that (moving to Win XP)

2005-10-19 Thread Christopher Subich
Chris Lambacher wrote: > The shell that comes with MSys (from the MinGW guys). Is pretty good, although > it does have a bit of a problem with stdout output before a process exits, ie > it will hold back output until the process exits. > > As a bonus, the file system is a little more sane, and if

Re: Would there be support for a more general cmp/__cmp__

2005-10-21 Thread Christopher Subich
Antoon Pardon wrote: > It would be better if cmp would give an indication it > can't compare two objects instead of giving incorrect > and inconsistent results. If two objects aren't totally comparable, then using 'cmp' on them is ill-defined to begin with. The Standard Thing To Do is throw an

Re: Would there be support for a more general cmp/__cmp__

2005-10-25 Thread Christopher Subich
Antoon Pardon wrote: > It *is* a definition of an ordering. > > For something to be an ordering it has to be anti symmetric and transitive. > > The subset relationships on sets conform to these conditions so it is a > (partial) > ordering. Check your mathematic books, Why you would think this is

Re: Would there be support for a more general cmp/__cmp__

2005-10-25 Thread Christopher Subich
Antoon Pardon wrote: > I also think there is the problem that people aren't used to partial > ordering. There is an ordering over sets, it is just not a total > ordering. But that some pairs are uncomparable (meaning that neither > one is smaller or greater) doesn't imply that comparing them is >

Re: Would there be support for a more general cmp/__cmp__

2005-10-25 Thread Christopher Subich
Antoon Pardon wrote: > Op 2005-10-25, Christopher Subich schreef <[EMAIL PROTECTED]>: > >>Which is exactly why a < b on sets returns True xor False, but cmp(a,b) >>throws an exception. > > > I don't see the conection. > > The documentation state

Re: Would there be support for a more general cmp/__cmp__

2005-10-26 Thread Christopher Subich
Antoon Pardon wrote: > Op 2005-10-25, Christopher Subich schreef <[EMAIL PROTECTED]>: >> >>My biggest complaint here is about returning None or IncomparableValue; >>if that happens, then all code that relies on cmp returning a numeric >>result will have to b

Re: textwidget.tag_bind("name", "", self.donothing) not working

2005-10-26 Thread Christopher Subich
shannonl wrote: > Hi all, > > For some reason this bind is calling the donothing function, like it > should, but is then allowing the text to be inserted into the Text > widget. [...] > This bind does work on the text widget as a whole, but on a individual > tag, it does not. You're trying to pre

Re: Would there be support for a more general cmp/__cmp__

2005-10-28 Thread Christopher Subich
Antoon Pardon wrote: > If you are concerned about sorting times, I think you should > be more concerned about Guido's idea of doing away with __cmp__. > Sure __lt__ is faster. But in a number of cases writing __cmp__ > is of the same complexity as writing __lt__. So if you then > need a __lt__, __l

Re: syntax question - if 1:print 'a';else:print 'b'

2005-10-28 Thread Christopher Subich
Steve Holden wrote: >> On Thu, 2005-10-27 at 14:00, Gregory Piñero wrote: >> >>> Not quite because if something(3) fails, I still want something(4) to >>> run. > Then the obvious extension: > > for i in range(20): >... > > but I get the idea that Gregory was thinking of different statement

Re: Class Variable Access and Assignment

2005-11-04 Thread Christopher Subich
Antoon Pardon wrote: > Op 2005-11-03, Stefan Arentz schreef <[EMAIL PROTECTED]>: >>The model makes sense in my opinion. If you don't like it then there are >>plenty of other languages to choose from that have decided to implement >>things differently. > > > And again this argument. Like it or lea

Re: Class Variable Access and Assignment

2005-11-04 Thread Christopher Subich
Steven D'Aprano wrote: > On Thu, 03 Nov 2005 14:13:13 +, Antoon Pardon wrote: > > >>Fine, we have the code: >> >> b.a += 2 >> >>We found the class variable, because there is no instance variable, >>then why is the class variable not incremented by two now? > > > Because b.a += 2 expands to

Re: Class Variable Access and Assignment

2005-11-04 Thread Christopher Subich
Antoon Pardon wrote: >>Since ints are immutable objects, you shouldn't expect the value of b.a >>to be modified in place, and so there is an assignment to b.a, not A.a. > > > You are now talking implementation details. I don't care about whatever > explanation you give in terms of implementation

Re: Class Variable Access and Assignment

2005-11-04 Thread Christopher Subich
Antoon Pardon wrote: > Well I wonder. Would the following code be considered a name binding > operation: > > b.a = 5 Try it, it's not. Python 2.2.3 (#1, Nov 12 2004, 13:02:04) [GCC 3.2.3 20030502 (Red Hat Linux 3.2.3-42)] on linux2 Type "help", "copyright", "credits" or "license" for more info

Re: Class Variable Access and Assignment

2005-11-04 Thread Christopher Subich
Antoon Pardon wrote: > Except when your default is a list > > class foo: > x = [] # default > > a = foo() > a.x += [3] > > b = foo() > b.x > > This results in [3]. So in this case using a class variable x to > provide a default empty list doesn't work out in combination > with augmented oper

Re: Class Variable Access and Assignment

2005-11-04 Thread Christopher Subich
Antoon Pardon wrote: > Well maybe because as far as I understand the same kind of logic > can be applied to something like > > lst[f()] += foo > > In order to decide that this should be equivallent to > > lst[f()] = lst[f()] + foo. > > But that isn't the case. Because, surprisingly enough, Pyt

Re: Class Variable Access and Assignment

2005-11-04 Thread Christopher Subich
Bengt Richter wrote: > > It might be interesting to have a means to push and pop objects > onto/off-of a name-space-shadowing stack (__nsstack__), such that the first > place > to look up a bare name would be as an attribute of the top stack object, i.e., > > name = name + 1 > Don't be

Re: Class Variable Access and Assignment

2005-11-06 Thread Christopher Subich
Bengt Richter wrote: > On Fri, 04 Nov 2005 10:28:52 -0500, Christopher Subich <[EMAIL PROTECTED]> > wrote: >>is very much within the language specification. Indeed, the language >>specification dictates that an instance variable b.a is created if one >>didn&#

Re: Class Variable Access and Assignment

2005-11-07 Thread Christopher Subich
Antoon Pardon wrote: > Op 2005-11-04, Christopher Subich schreef <[EMAIL PROTECTED]>: >>it's the Python >>idiosyncracy about operations on mutable types. In this case, += >>mutates an object, while + returns a new one -- as by definition, for >>mutables

Unifying Attributes and Names (was: Re: Death to tuples!)

2005-11-29 Thread Christopher Subich
Bengt Richter wrote: > If we had a way to effect an override of a specific instance's attribute > accesses > to make certain attribute names act as if they were defined in > type(instance), and > if we could do this with function instances, and if function local accesses > would > check if name

Unifying Attributes and Names (was: Re: Death to tuples!)

2005-11-29 Thread Christopher Subich
Bengt Richter wrote: > If we had a way to effect an override of a specific instance's attribute accesses > to make certain attribute names act as if they were defined in type(instance), and > if we could do this with function instances, and if function local accesses would > check if names were on

Re: ncurses' Dark Devilry

2005-11-29 Thread Christopher Subich
Jeremy Moles wrote: >>In article <[EMAIL PROTECTED]>, >> Jeremy Moles <[EMAIL PROTECTED]> wrote: >>>I have a focus "wheel" of sorts that allows the user to do input on >>>various wigets and windows and whatnot. However, if I want to quickly >>>call addstr somewhere else in the application I have to

Re: Is there no compression support for large sized strings in Python?

2005-12-02 Thread Christopher Subich
Fredrik Lundh wrote: > Harald Karner wrote: >>>python -c "print len('m' * ((2048*1024*1024)-1))" >> >>2147483647 > > > the string type uses the ob_size field to hold the string length, and > ob_size is an integer: > > $ more Include/object.h > ... > int ob_size; /* Number of items in va

Re: Is there no compression support for large sized strings in Python?

2005-12-05 Thread Christopher Subich
Fredrik Lundh wrote: > Christopher Subich wrote: >> >>I have access to an itanium system with a metric ton of memory. I >>-think- that the Python version is still only a 32-bit python > > > an ILP64 system is a system where int, long, and pointer are all 64 bits

Re: ANN: Dao Language v.0.9.6-beta is release!

2005-12-05 Thread Christopher Subich
Paul McNett wrote: > Having .NET and Java in the world makes me into more of a hero when I > can swoop in and get the real business problem solved using Python. +1QOTW -- http://mail.python.org/mailman/listinfo/python-list

Re: hash()

2005-12-05 Thread Christopher Subich
John Marshall wrote: > I was actually interested in the mathematical/probability > side rather than the empirical w/r to the current > hash function in python. Although I imagine I could do > a brute force test for x-character strings. Hah. No. At least on the version I have handy (Py 2.2.3 on

Re: ANN: Dao Language v.0.9.6-beta is release!

2005-12-05 Thread Christopher Subich
[EMAIL PROTECTED] wrote: > >>From "The Design of Everyday Things", docs are a sign of poor design. > Even a single word, such as the word "Push" on the face of a door, is > an indication that the design can be improved. Please, rethink the > design instead of trying to compensate with more docume

Re: Bitching about the documentation...

2005-12-07 Thread Christopher Subich
Fredrik Lundh wrote: > Steven D'Aprano wrote: > > >>"Buffalo buffalo Buffalo buffalo buffalo buffalo Buffalo buffalo." > > > Did you mean: Badger badger Badger badger badger badger Badger badger > Mushroom! Mushroom! Thank you, I really needed that stuck in my head. :) -- http://mail.python.

Re: Calculating Elapsed Time

2005-12-07 Thread Christopher Subich
Peter Hansen wrote: > A few things. > > 1. "Precision" is probably the wrong word there. "Resolution" seems > more correct. > > 2. If your system returns figures after the decimal point, it probably > has better resolution than one second (go figure). Depending on what > system it is, your b

Re: Calculating Elapsed Time

2005-12-07 Thread Christopher Subich
Fredrik Lundh wrote: > if I run this on the Windows 2K box I'm sitting at right now, it settles > at 100 for time.time, and 1789772 for time.clock. on linux, I get 100 > for time.clock instead, and 262144 for time.time. Aren't the time.clock semantics different on 'nix? I thought, at least on

Re: Bitching about the documentation...

2005-12-07 Thread Christopher Subich
Steven D'Aprano wrote: > S > P > O > I > L > E > R > > S > P > A > C > E > > > > "Buffalo buffalo Buffalo buffalo buffalo buffalo Buffalo buffalo." > > Buffalo from the city of Buffalo, which are intimidated by buffalo > from Buffalo, also intimidate buffalo from Buffalo. And to do a small

Re: Bitching about the documentation...

2005-12-07 Thread Christopher Subich
Steven D'Aprano wrote: > On Wed, 07 Dec 2005 11:45:04 +0100, Fredrik Lundh wrote: > >>Did you mean: Badger badger Badger badger badger badger Badger badger >>Mushroom! Mushroom! > > > Er... no, I can't parse that. I suffered a Too Much Recursion error about > the third Badger (I only have a lim

Re: Overloading

2005-12-09 Thread Christopher Subich
Johannes Reichel wrote: > Hi! > > In C++ you can overload functions and constructors. For example if I have a > class that represents a complex number, than it would be nice if I can > write two seperate constructors > > class Complex: Please do note, if you want this for the exact use of a Comp

Re: Python! Is! Truly! Amazing!

2005-01-03 Thread Christopher Koppler
amewar > quota yet. Lisp will strike back! Someday, it will be popular again! When all else is dust, Lisp will rule the skies! In the meantime, let's do Python. -- Christopher [EMAIL PROTECTED] # python Python inf (day 1) [PyPy inf (Pythonix inf)] on pynuxinf Type "help", &quo

Re: Bad Interpreter

2005-01-03 Thread Christopher Koppler
#!/usr/bin/env python which doesn't explicitly set the path to the interpreter, but checks the environment variable called python for that path. If your python executable lives somewhere the first line or the environment variable doesn't point to, you'll need to correct that. -- Chr

Re: How can engineers not understand source-code control?

2005-01-04 Thread Christopher Koppler
I seen that before? > I'm thinking that the I-Ching is a vast untapped resource for > programming wisdom, plus it makes it funny. Or haikus, maybe they'd be > good. If only all error messages were like that: Through winter's freezing Nature dies to live again You ne

Re: % operation

2005-01-04 Thread Christopher Koppler
here's nothing wrong with the operation, but it looks like you forgot to indent your loop body (which the interactive shell doesn't automagically do for you): >>> for z in range(44): ... z%9 ... [result snipped] -- Christopher raise OutofSigError -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Operating System???

2005-01-06 Thread Christopher Koppler
27;t even get "complicated is better than convoluted" right. There's > are a ton of flaws in C++ not found in Java. Still, Java feels like C++ done right, while being more wrong >:-[ -- Christopher If there was a scheme for Lisp world domination... -- http://mail.python.org/mailman/listinfo/python-list

Re: Text() tags and delete()

2005-06-27 Thread Christopher Subich
Bob Greschke wrote: > Does Text.delete(0.0, END) delete all of the tags too? Everything says it > does not delete marks, but nothing about tags. Note to everyone else: this is a TKinter question. Tags are attached to text ranges, in the Text widget. If you delete all of the text in the widget

DParser binaries on Win32 with Python 2.4?

2005-06-27 Thread Christopher Subich
From the documentation, it looks like DParser-python will do what I need, but I'm having trouble getting it installed properly. I'm using a win32 environment, with official 2.4 Python binaries. The official DParser for Python win32 binaries (staff.washington.edu/sabbey/dy_parser) fail, saying

Re: DParser binaries on Win32 with Python 2.4?

2005-06-28 Thread Christopher Subich
[EMAIL PROTECTED] wrote: > 1) http://mingw.org > 2) python setup.py build --compiler=mingw32 > 3) python setup.py install Thank you very much, it looks like this worked perfectly; it even picked up on the cygwin-mingw32 libraries and compiled with the cygwin compiler and -mno-cygwin. -- http

Re: Modules for inclusion in standard library?

2005-06-29 Thread Christopher Arndt
Reinhold Birkenfeld schrieb: > Do you have any other good and valued Python modules that you would think are > bug-free, mature (that includes a long release distance) and useful enough to > be granted a place in the stdlib? Hmmm, let's look into /site-packackes, That's what I always have install

Re: Debugger Confusion

2005-06-29 Thread Christopher Arndt
Rex Eastbourne schrieb: > Also, when I try running pdb in my Emacs shell, I get very weird > behavior: for instance, I'll hit 'h' and enter twenty times with no > output. Then, all of a sudden, twenty output messages will pop up. That may be due to output buffering. Try running your script with "p

twisted: not doing DNS resolutions?

2005-06-30 Thread Christopher Subich
I'm building an application that makes several user-specified internet connections; twisted meets my needs more or less perfectly. I'm running into a problem, however, in that twisted is not allowing connections (reactor.connectTCP) by hostname, only IP address. [read: connections to IP address

Re: twisted: not doing DNS resolutions?

2005-06-30 Thread Christopher Subich
Christopher Subich wrote: > From what I can tell, the problem lies in that Twisted simply isn't > performing the DNS resolutions. From the connection factory's > startedConnecting method, print connector.getDestination() results in: > > IPv4Address(TCP, 'hostnam

Re: twisted: not doing DNS resolutions?

2005-06-30 Thread Christopher Subich
Christopher Subich wrote: > Christopher Subich wrote: > >> From what I can tell, the problem lies in that Twisted simply isn't >> performing the DNS resolutions. From the connection factory's ... right, finally figured it out after a very long time at de

Re: Modules for inclusion in standard library?

2005-06-30 Thread Christopher Arndt
Simon Brunning schrieb: > On 6/29/05, Christopher Arndt <[EMAIL PROTECTED]> wrote: > > > Adding sqllite to the standard library has been discussed before: > http://groups-beta.google.com/group/comp.lang.python/browse_thread/thread/fd150297c201f814 Yeah, but they didn

Re: Scket connection to server

2005-06-30 Thread Christopher Subich
Steve Horsley wrote: > There is a higher level socket framework called twisted that everyone > seems to like. It may be worth looking at that too - haven't got round > to it myself yet. I wouldn't say 'like,' exactly. I've cursed it an awful lot (mostly for being nonobvious), but it does a da

Python, mysql, floating point values question

2005-07-01 Thread Christopher Kang
I had a question about python and mysql, but I want to first thank those who taught me about the factory method, it was exactly what I needed. Anyway, I have a problem where I am pulling floating point values out of mysql and into python using the MYSQLdb module. However, the values seem to be al

Re: Splitting string into dictionary

2005-07-02 Thread Christopher Subich
Robert Kern wrote: > David Pratt wrote: > >> I have string text with language text records that looks like this: >> >> 'en' | 'the brown cow' | 'fr' | 'la vache brun' > translations = [x.strip(" '") for x in line.split('|')] > d = dict(zip(translations[::2], translations[1::2])) One caevat is th

Re: Python, mysql, floating point values question

2005-07-02 Thread Christopher Kang
Thanx all for responding. I've been doing the epsilon comparisons, i had just hoped that to be a temporary solution. anyway, thanx for the responses -- http://mail.python.org/mailman/listinfo/python-list

Re: Favorite non-python language trick?

2005-07-02 Thread Christopher Subich
Steven D'Aprano wrote: > On Fri, 01 Jul 2005 12:24:44 -0700, Devan L wrote: > > >>With the exception of reduce(lambda x,y:x*y, sequence), reduce can be >>replaced with sum, and Guido wants to add a product function. > > > How do you replace: > > reduce(lambda x,y: x*y-1/y, sequence) > > with

Re: Favorite non-python language trick?

2005-07-02 Thread Christopher Subich
Devan L wrote: > sum(sequence[0] + [1/element for element in sequence[1:]]) > > I think that should work. That won't work, because it misses the x*y part of the expression (x[n]*x[n+1] + 1/x[n+1], for people who haven't immediately read the grandparent). Personally, I think demanding that it b

Re: map/filter/reduce/lambda opinions and background unscientific mini-survey

2005-07-02 Thread Christopher Subich
Steven D'Aprano wrote: > comps. But reduce can't be written as a list comp, only as a relatively > complex for loop at a HUGE loss of readability -- and I've never used > Lisp or Scheme in my life. I'm surely not the only one. See my reply to your other post for a more detailed explanation, but I

Re: What are the other options against Zope?

2005-07-02 Thread Christopher Subich
Dennis Lee Bieber wrote: > The Windows registry is "a maze of twisty little passages, all > alike" ITYM "a maze of twisty little passeges, {058C1536-2201-11D2-BFC1-00805F858323}" > The registry a cryptic, bloated, system by which M$ can hide > details about anything they want... In

Re: Favorite non-python language trick?

2005-07-03 Thread Christopher Subich
Steven D'Aprano wrote: > On Sun, 03 Jul 2005 00:39:19 -0400, Christopher Subich wrote: >>Personally, I think demanding that it be writable as a sum (or product, >>or any, or all) is a false standard -- nobody's claimed that these would >>replace all cases of re

Re: map/filter/reduce/lambda opinions and background unscientificmini-survey

2005-07-03 Thread Christopher Subich
Carl Banks wrote: > Listcomps et al. cannot do everything map, lambda, filter, and reduce > did. Listcomps are inferior for functional programming. But, you see, > functional is not the point. Streamlining procedural programs is the > point, and I'd say listcomps do that far better, and without

Re: map/filter/reduce/lambda opinions and background unscientificmini-survey

2005-07-03 Thread Christopher Subich
Scott David Daniels wrote: > egbert wrote: >> How do you replace >> map(f1,sequence1, sequence2) >> especially if the sequences are of unequal length ? >> >> I didn't see it mentioned yet as a candidate for limbo, >> but the same question goes for: >> zip(sequence1,sequence2) > > OK, you guys are

Re: map/filter/reduce/lambda opinions and background unscientificmini-survey

2005-07-03 Thread Christopher Subich
Carl Banks wrote: > > Christopher Subich wrote: >>I've heard this said a couple times now -- how can listcomps not >>completely replace map and filter? > If you're doing heavy functional programming, listcomps are > tremendously unwieldy compared to map et a

Re: map/filter/reduce/lambda opinions and background unscientificmini-survey

2005-07-04 Thread Christopher Subich
Peter Hansen wrote: > [str(parrot) for parrot in sequence], for example, tells you much more > about what is going on than str(x) does. > > Exactly what, I have no idea... but it says _so_ much more. ;-) Yarr! Avast! Etc! -- http://mail.python.org/mailman/listinfo/python-list

Re: map/filter/reduce/lambda opinions and background unscientificmini-survey

2005-07-04 Thread Christopher Subich
Carl Banks wrote: > I suspect you're misunderstanding what I mean by heavily functional. > Heavily functional programming is a different mindset altogether. In > heavily functional programming, things like maps and filters and > function applications are actually what you're thinking about. map

Re: map/filter/reduce/lambda opinions and background unscientific mini-survey

2005-07-05 Thread Christopher Subich
[EMAIL PROTECTED] wrote: > concept quickly familiar. But "lambda" has a very clear meaning... it's > a letter of the greek alphabet. The connection between that letter and > anonymous functions is tenuous at best, and fails the test of making > Python read like "executable pseudocode". But 'lambda

Re: (Win32 API) callback to Python, threading hiccups

2005-07-05 Thread Christopher Subich
Francois De Serres wrote: > - so, on callback, I create a new thread, after checking that the > previous one has returned already (WaitOnSingleObject(mythread)) so we > only have one thread involved. Uh... to me, this looks like a frighteningly inefficient way of doing things. How about using

Re: map/filter/reduce/lambda opinions and background unscientific mini-survey

2005-07-07 Thread Christopher Subich
Terry Hancock wrote: > With list comprehensions and generators becoming so integral, I'm > not sure about "unpythonic". And a syntax just occured to me -- > what about this: > > [y*x for x,y] > > ? > > (that is: > > [ for ] > > It's just like the beginning of a list comprehension or generator

Re: Tkinter grid layout

2005-07-07 Thread Christopher Subich
Eric Brunel wrote: > So you should either make your MainWindow class inherit from Tk, which > eliminates the unneeded container and the problems it may cause, or make > sure the pack or grid on your MainWindow instance actually tells the > container to grow with its container. With pack, it's q

Re: map/filter/reduce/lambda opinions and background unscientific mini-survey

2005-07-07 Thread Christopher Subich
Ron Adam wrote: > Christopher Subich wrote: > >> As others have mentioned, this looks too much like a list >> comprehension to be elegant, which also rules out () and {}... but I >> really do like the infix syntax. > > > Why would it rule out ()? Generator e

Re: Legacy data parsing

2005-07-08 Thread Christopher Subich
gov wrote: > Hi, > > I've just started to learn programming and was told this was a good > place to ask questions :) > > Where I work, we receive large quantities of data which is currently > all printed on large, obsolete, dot matrix printers. This is a problem > because the replacement parts w

pylize 1.2b released

2005-07-08 Thread Christopher Arndt
arndt.de/en/software/pylize/> Author: Christopher Arndt <[EMAIL PROTECTED]> -- http://mail.python.org/mailman/listinfo/python-list

Re: decorators as generalized pre-binding hooks

2005-07-11 Thread Christopher Subich
Kay Schluehr wrote: > I think it would be a good idea to pronounce the similarity between > function decorators and metaclasses. Metaclasses were once introduced > as an arcane art of fuzzy bearded hackers or supersmart 'enterprise > architects' that plan at least products of Zope size but not as a

Re: ftputil - uploading many files too long

2005-07-11 Thread Christopher Arndt
geon schrieb: > Hi, > > When I try to upload many files I get such a error message: > > [...] traceback deleted > > ftputil.ftp_error.TemporaryError: 421 Login Timeout (25 seconds): closing > contro > l connection. > > I think its not about many files but because of it takes too long for my ft

<    1   2   3   4   5   6   >