Re: python bug when subclassing list?

2008-11-11 Thread Ethan Furman
File "", line 1, in File "vector.py", line 15, in __init__ return list.__new__(cls, list(a)) TypeError: list.__new__(X): X is not a type object (Vector) Good luck in your journey! ~ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: Python IF THEN chain equivalence

2008-11-13 Thread Ethan Furman
a continue. if x1 < limit: do a if x2 < limit: do b if x3 < limit: do c . . . etc On the plus side, it's easy to read and understand -- on the minus side, it doesn't jump to the end once the tests start failing. Hope this helps. ~ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: Little direction please Python MySQL

2008-11-13 Thread Ethan Furman
] Thanks Len I've never had the (mis?)fortune to work with COBOL -- what are the files like? Fixed format, or something like a dBase III style? I presume also that you only need access to them in COBOL format long enough to transfer them into MySQL -- true? ~ethan~ -- http://mail.pyt

Re: Python IF THEN chain equivalence

2008-11-13 Thread Ethan Furman
Grant Edwards wrote: On 2008-11-14, Ethan Furman <[EMAIL PROTECTED]> wrote: jzakiya wrote: I'm translating a program in Python that has this IF Then chain IF x1 < limit: --- do a --- IF x2 < limit: --- do b --- IF x3 &

Re: Little direction please Python MySQL

2008-11-15 Thread Ethan Furman
len wrote: On Nov 13, 7:32 pm, Ethan Furman <[EMAIL PROTECTED]> wrote: len wrote: Hi all; [snip] Here is my problem. I need to start doing this in the really world at my company converting some older cobol system and data to python programs and MySQL. I have gotten past packed d

ANN: Python dBase 0.84.18 released!

2009-02-23 Thread Ethan Furman
. Documentation will be improved as time permits. Current web location is http://groups.google.com/group/python-dbase. My apologies for the extremely bare-bones web site. -- ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: pep 8 constants

2009-02-24 Thread Ethan Furman
make this work. regards Steve --> class tester(object): ... @property ... def pi(self): ... return 3.141596 ... --> testee = tester() --> testee.pi 3.14159598 Looks like that's how property works, so the same behavior on a module level would do as Brian

Re: why cannot assign to function call

2009-02-27 Thread Ethan Furman
w name (pbr) different, in Python, from a new name initialized as if by assignment (pbv)? It seems to me than you end up with the same thing in either case (in Python, at least), making the distinction non-existent. def func(bar): bar.pop() Pass-by-reference: foo = ['

Re: pep 8 constants

2009-02-27 Thread Ethan Furman
Steve Holden wrote: Gabriel Genellina wrote: En Tue, 24 Feb 2009 22:52:20 -0200, Ethan Furman escribió: Steve Holden wrote: Brian Allen Vanderburg II wrote: One idea to make constants possible would be to extend properties to be able to exist at the module level as well as the class

Re: Python alternatives to Text::SimpleTable?

2009-03-03 Thread Ethan Furman
paper... should rows wrap at 80 columns, etc, etc. My quick (dare I say lazy? ;) ) perusal of the links did not reveal those behavior traits to me. ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: dbfpy - cannot store new record

2009-05-27 Thread Ethan Furman
groups.google.com/group/python-dbase At this point, the only data types allowed to be Null are dates and times, everything else is coerced to Pythons idea of nothing if not set (strings are '', numerics are 0, etc -- again, the only exception being dates and times which, IIRC, defaul

looking for a pdf module

2008-05-13 Thread Ethan Furman
Greetings! I'm hoping to be able to generate pdf files on the fly -- are there any python modules out there to do that? All help appreciated! -- Ethan -- http://mail.python.org/mailman/listinfo/python-list

Re: looking for a pdf module

2008-05-13 Thread Ethan Furman
Gary Herron wrote: Ethan Furman wrote: Greetings! I'm hoping to be able to generate pdf files on the fly -- are there any python modules out there to do that? All help appreciated! -- Ethan -- http://mail.pytho

Re: cgitb performance issue

2008-05-14 Thread Ethan Furman
Gabriel Genellina wrote: En Mon, 05 May 2008 15:56:26 -0300, Ethan Furman <[EMAIL PROTECTED]> escribió: I tried adding a form to our website for uploading large files. Personally, I dislike the forms that tell you you did something wrong and make you re-enter *all* your data aga

Re: built in list generator?

2008-05-14 Thread Ethan Furman
iterate. Until Python 3.0, where 'range' returns an iterable. Is there a thread somewhere of the discussion for this change? I'm presuming range is used almost exclusively in loops where a change in the return type would have no negative effect. -- Ethan -- http://mail.python.org/mailman/listinfo/python-list

Re: cgitb performance issue

2008-05-15 Thread Ethan Furman
Gabriel Genellina wrote: En Wed, 14 May 2008 13:51:40 -0300, Ethan Furman <[EMAIL PROTECTED]> escribió: Gabriel Genellina wrote: En Mon, 05 May 2008 15:56:26 -0300, Ethan Furman <[EMAIL PROTECTED]> escribió: I tried adding a form to our website for uploading large files

Re: Dbase / foxpro files

2008-05-16 Thread Ethan Furman
3 Record length: 24 --Fields-- name C(10) age N(3.0) wisdom M(10) >>> table.Append() >>> table.name = 'Ethan' >>> table.age = 37 >>> table.wisdom = 'Python rules!' >>> table.Scatter() {'age': 3

Re: Dbase / foxpro files

2008-05-19 Thread Ethan Furman
o I needed :). Hope this helps. -- Ethan -- http://mail.python.org/mailman/listinfo/python-list

Struct usage and varying sizes of h, l, etc

2008-05-20 Thread Ethan Furman
chine, and four bytes on the next. Can any C programmers verify this? If it is true, does that mean that struct.pack('h', 8001) might give me different results depending on the machine it's running on? Thanks for any help! -- Ethan -- http://mail.python.org/mailman/listinfo/python-list

Re: Struct usage and varying sizes of h, l, etc

2008-05-21 Thread Ethan Furman
John Machin wrote: Robert Kern wrote: Ethan Furman wrote: Greetings, I'm looking at the struct module for binary packing of ints and floats. The documentation refers to C datatypes. It's been many years since I looked at C, but I seem to remember that the data type size

Re: Struct usage and varying sizes of h, l, etc

2008-05-22 Thread Ethan Furman
John Machin wrote: Robert Kern wrote: Ethan Furman wrote: Greetings, I'm looking at the struct module for binary packing of ints and floats. The documentation refers to C datatypes. It's been many years since I looked at C, but I seem to remember that the data type size

Re: csv iterator question

2008-05-23 Thread Ethan Furman
;>> len(contents) 381 You still get a list that you can easily use, that has gone through the csv routines. Hope this helps. -- Ethan -- http://mail.python.org/mailman/listinfo/python-list

Re: php vs python

2008-05-30 Thread Ethan Furman
on of a good programmer is someone who can write good code in a computer language. I would use the word 'versatile' or even 'multi-lingual' to broaden the scope to more than one language. -- Ethan P.S. My apologies, Jerry, for writing back to you directly -- I haven't y

Re: can python do some kernel stuff?

2008-06-03 Thread Ethan Furman
he routines that are to be called, and that constitute the kernel itself, *is* kernel coding. And as wonderful as Python is, it is *not* for kernel coding. Having just looked at Py-PF, it is *managing* the firewall, not implementing it. Again, not kernel coding. -- Ethan -- http://mail.python.org/mailman/listinfo/python-list

Re: Why does python not have a mechanism for data hiding?

2008-06-04 Thread Ethan Furman
hould be tested to ensure proper results. It's my understanding that unit testing (a.k.a. PyUnit) is designed for just such a purpose. So is this argument simply over *who* should be (unit) testing the internals? I.e. The fellow that wrote the code library vs. the other fellow that wants to use the library? Or is it actually, as it seems, over the internals being tested at all? -- Ethan -- http://mail.python.org/mailman/listinfo/python-list

Re: Q about object identity

2008-06-06 Thread Ethan Furman
[EMAIL PROTECTED] wrote: Hello, I am testing object identity. If I do it from the interpreter, I get strange results. *print [] is []* *False* print id([]), id([]) 3083942700 3083942700 Why is that? Isn't this an error? If I test it in a script, all is OK. #!/usr/bin/python a =

Re: Q re documentation Python style

2008-06-09 Thread Ethan Furman
u only need open them when you want to read/edit them; the rest of the time, only one line is visible between the function header and the function. I like Vim. :) -- Ethan -- http://mail.python.org/mailman/listinfo/python-list

Re: Alternative to Decimal type

2008-06-10 Thread Ethan Furman
e: return 0 def __str__(self): s = str(self.value) if s[0] == '-': minus = '-' s = s[1:].zfill(self.scale+1) else: minus = '' s = s.zfill(self.scale+1) return '%s%

Re: Alternative to Decimal type

2008-06-11 Thread Ethan Furman
h a class already in existence? -- Ethan -- http://mail.python.org/mailman/listinfo/python-list

Re: can't assign to literal

2008-06-11 Thread Ethan Furman
own. http://www.vim.org/ -- Ethan -- http://mail.python.org/mailman/listinfo/python-list

Re: can't assign to literal

2008-06-11 Thread Ethan Furman
TheSaint wrote: On 00:15, giovedì 12 giugno 2008 Ethan Furman wrote: I like Vim (Vi Improved) What about justifying text ? Do you mean indenting, or wrapping? Vim has excellent indenting support, and Python files already included that support proper indenting, syntax coloring, etc. I

Re: basic code of what I am doing [was problems with opening files due to file's path]

2008-06-11 Thread Ethan Furman
Alexnb wrote: > Haha, okay well sorry that I was being so stupid, but I get it now and > I apoligize for causing you all the frustration. But I did get it to > work finally. > -- http://mail.python.org/mailman/listinfo/python-list

Re: can't assign to literal

2008-06-12 Thread Ethan Furman
TheSaint wrote: On 01:37, giovedì 12 giugno 2008 Ethan Furman wrote: Do you mean indenting, or wrapping? I mean fill the line by increasing spaces between words in order to get a paragraph aligned both side, left and right on the page. So if the width is 78 chars it wouldn't have ji

'string'.strip(chars)-like function that removes from the middle?

2008-06-16 Thread Ethan Furman
;cmowz.') 'example' .??? --> --- 'www.example.com'.strip('cmowz.') 'exaple' -- Ethan -- http://mail.python.org/mailman/listinfo/python-list

Re: 'string'.strip(chars)-like function that removes from the middle?

2008-06-17 Thread Ethan Furman
Ethan Furman wrote: Greetings. The strip() method of strings works from both ends towards the middle. Is there a simple, built-in way to remove several characters from a string no matter their location? (besides .replace() ;) For example: .strip --> 'www.example.com'.strip('

Re: Decimals in python

2008-06-17 Thread Ethan Furman
ce to have at least one floating-point number in the calculation. -- Ethan -- http://mail.python.org/mailman/listinfo/python-list

Re: Does '!=' equivelent to 'is not' [drifting a little more]

2008-06-18 Thread Ethan Furman
Gabriel Genellina wrote: (This thread is getting way above 1cp...) What is 1cp? -- Ethan -- http://mail.python.org/mailman/listinfo/python-list

numeric emulation and __pos__

2008-07-07 Thread Ethan Furman
An example would help, too. Thanks for the feedback. -- Ethan -- http://mail.python.org/mailman/listinfo/python-list

Re: numeric emulation and __pos__

2008-07-08 Thread Ethan Furman
Mark Dickinson wrote: On Jul 8, 12:12 am, Ethan Furman <[EMAIL PROTECTED]> wrote: 1) Any reason to support the less common operators? i.e. <<, >>, &, ^, | No reason to support any of these for a nonintegral nonbinary type, as far as I can see. 2) What, exact

Re: numeric emulation and __pos__

2008-07-08 Thread Ethan Furman
Terry Reedy wrote: Ethan Furman wrote: Anybody have an example of when the unary + actually does something? Besides the below Decimal example. I'm curious under what circumstances it would be useful for more than just completeness (although completeness for it's own sake is impo

Re: a simple 'for' question

2008-07-09 Thread Ethan Furman
read: folders = ['1', '2', '3'] for x in folders: print x filename = 'Folder/%s/myfile.txt' % x f = open(filename, 'r') Again, in order for that to work, you *must* have a path/file of 'Folder\1\myfile.txt' existing from the same folder that this code is running from. This is O/S related, not Python related. -- Ethan -- http://mail.python.org/mailman/listinfo/python-list

Re: Determining when a file has finished copying

2008-07-09 Thread Ethan Furman
bservations about the two test programs I've described. Any thoughts? Thanks! Doug The solution my team has used is to monitor the file size. If the file has stopped growing for x amount of time (we use 45 seconds) the file is done copying. Not elegant, but it works. -- Ethan -- http://mail

Re: Dynamic HTML from Python Script

2008-07-09 Thread Ethan Furman
r *non-Python* language, get your quotes right. -- Ethan -- http://mail.python.org/mailman/listinfo/python-list

Re: a simple 'for' question

2008-07-10 Thread Ethan Furman
Tim Roberts wrote: Ethan Furman <[EMAIL PROTECTED]> wrote: Ben Keshet wrote: it didn't help. it reads the pathway "as is" (see errors for both tries). It looks like it had the write pathway the first time, but could not find it because it searched in the path/way in

numeric emulation and the rich comparison operators

2008-07-11 Thread Ethan Furman
Greetings, List! Still working on my Measure class, and my next question is... (drum roll please ;) What are the advantages of using __[eq|ne|lt|gt|le|ge]__ vs __cmp__? Thanks in advance! -- Ethan -- http://mail.python.org/mailman/listinfo/python-list

Re: numeric emulation and the rich comparison operators

2008-07-13 Thread Ethan Furman
Gabriel Genellina wrote: En Thu, 10 Jul 2008 17:37:42 -0300, Ethan Furman <[EMAIL PROTECTED]> escribi�: Greetings, List! Still working on my Measure class, and my next question is... (drum roll please ;) What are the advantages of using __[eq|ne|lt|gt|le|ge]__ vs __cmp__? I

Re: Determining when a file has finished copying

2008-07-14 Thread Ethan Furman
Sean DiZazzo wrote: On Jul 9, 5:34 pm, keith <[EMAIL PROTECTED]> wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ethan Furman wrote: writeson wrote: Guys, Thanks for your replies, they are helpful. I should have included in my initial question that I don't have as m

Re: Determining when a file has finished copying

2008-07-14 Thread Ethan Furman
Michiel Overtoom wrote: Ethan wrote: One more option may be to attempt to rename the file -- if it's still open for copying, that will fail; success indicates the copy is done. Caveat -- this is dependent on the operating system! Windows will indeed not allow you to rename or del

Measure class, precision, significant digits, and divmod()

2008-07-15 Thread Ethan Furman
inaccury present in the measured value a? Should I have floordiv preserve inaccuracy, and divmod be exact? Any and all feedback welcome, particularly from anyone who might actually use the Measure class. ;) ~Ethan -- http://mail.python.org/mailman/listinfo/python-list

Re: MySQL Insert

2008-07-15 Thread Ethan Furman
7;10.25') --> n10_25 Decimal("10.25") --> "%d" % n10_25 '10' About the only thing it had even partially right is not using %d, as it will truncate the fractional part of your opening balance. As far as why you are getting that error, I now have no idea, and I apologize for any confusion created by my error. ~Ethan -- http://mail.python.org/mailman/listinfo/python-list

Re: MySQL Insert

2008-07-15 Thread Ethan Furman
d to %f and change dec to float(dec). My experience with the Decimal type is limited, so there may be other options as well. ~Ethan -- http://mail.python.org/mailman/listinfo/python-list

Re: Measure class, precision, significant digits, and divmod()

2008-07-15 Thread Ethan Furman
Ken Starks wrote: Ethan Furman wrote: Hey all. As I have mentioned before, I am making this Measure class for two reasons: experience with unit testing, I like playing with numbers, I am unaware of anything like this having yet been done (okay, three reasons ;). Any and all

Re: Python Written in C?

2008-07-22 Thread Ethan Furman
f a Real Programmer: http://www.pbm.com/~lindahl/mel.html Iain Wow. Awesome story. ~Ethan -- http://mail.python.org/mailman/listinfo/python-list

Re: Boolean tests

2008-07-29 Thread Ethan Furman
e there is > no single obvious interpretation of what is means for an object to > evaluate to true. If you are using somebody else's code, and maybe even your own, you should always check the docs if you don't know/can't remember what a function does. ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: Boolean tests [was Re: Attack a sacred Python Cow]

2008-07-30 Thread Ethan Furman
ponsible for his (or her) program. An analogy would be a driver and a car -- if the driver cannot handle the power and speed of a fancy car (python :), then the driver should get a different car better matched to his abilities. It's not up to the car to say "oh, the speed lim

Re: Boolean tests [was Re: Attack a sacred Python Cow]

2008-07-30 Thread Ethan Furman
move the conversation along. In fact, somebody did post some code about a custom matrix class, where __len__ was useless, and still you kept on with... pah. It's late, so before I say something stupid I'll finish this. My last thought on the matter -- up until this thread I had l

Re: Boolean tests [was Re: Attack a sacred Python Cow]

2008-07-30 Thread Ethan Furman
Carl Banks wrote: On Jul 30, 4:49 am, Ethan Furman <[EMAIL PROTECTED]> wrote: Even for those that did realize, and in fact hoped that that is what you were attempting to accomplish, I was not attempting to accomplish what you think I was. I was looking for it, but I didn't want to

Re: Boolean tests [was Re: Attack a sacred Python Cow]

2008-07-30 Thread Ethan Furman
convert it to actual Python. Would be an interesting experiment, anyway. ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: Boolean tests

2008-08-01 Thread Ethan Furman
Anders J. Munch wrote: Ethan Furman wrote: > Even if we find out that C.__nonzero__ is called, what was it that > __nonzero__ did again? reinforce the impression that he is unaware of the double-underscore functions and what they do and how they work. Only if your news

__new__

2008-08-03 Thread Ethan Furman
imals were really immutable, that should not have worked -- so in what sense are they immutable? Does Python treat them as immutable if they are created with __new__ instead of __init__? Any pointers to appropriate docs also greatly appreciated. ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: __new__

2008-08-03 Thread Ethan Furman
Emile van Sebille wrote: Ethan Furman wrote: --> d25._int = (1, 5) Python considers names that start with a leading underscore as internal or private, and that abuse is the burden of the abuser... Is bytecodehacks still around? That was serious abuse :) Emile Good point. What

Re: __new__

2008-08-04 Thread Ethan Furman
Calvin Spealman wrote: [snip] ask if you really feel the need to know. I am. ;) -- http://mail.python.org/mailman/listinfo/python-list

Re: Function editing with Vim throws IndentError

2008-08-04 Thread Ethan Furman
doubt, try doing :retab as well -- it takes any tab characters in the file and converts them to spaces. Very handy. ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: Function editing with Vim throws IndentError

2008-08-04 Thread Ethan Furman
ndentationError exceptions to be raised. I have Emacs configured to show tabs as 4 columns wide, and I've never had such an exception happen in my Python code as a result. I have no Emacs experience -- does it actually put tabs in the file, or spaces? ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: __new__

2008-08-04 Thread Ethan Furman
Mel wrote: Ethan Furman wrote: Emile van Sebille wrote: Ethan Furman wrote: --> d25._int = (1, 5) Python considers names that start with a leading underscore as internal or private, and that abuse is the burden of the abuser... Is bytecodehacks still around? That was serious ab

Re: __new__

2008-08-05 Thread Ethan Furman
Rhamphoryncus wrote: On Aug 4, 11:46 am, Ethan Furman <[EMAIL PROTECTED]> wrote: Mel wrote: Ethan Furman wrote: Emile van Sebille wrote: Ethan Furman wrote: --> d25._int = (1, 5) Python considers names that start with a leading underscore as internal or private, and t

Re: very newbie question

2008-08-07 Thread Ethan Furman
ask_number() print "You guessed it! The number was", the_number print "And it only took you", tries, "tries!\n" raw_input("\n\nPress the enter key to exit.") ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

cgitb performance issue

2008-05-05 Thread Ethan Furman
entered data is good. However, the first time the form loads it can take up to 30 seconds... any ideas why? My server is using Apache 2.0.53 and Python 2.4.1 on a FreeBSD 5.4 system. Thanks! -- Ethan -- http://mail.python.org/mailman/listinfo/python-list

os.open and O_EXCL

2008-05-05 Thread Ethan Furman
os.O_EXCL flag? Thanks for any help. -- Ethan -- http://mail.python.org/mailman/listinfo/python-list

Re: #!/usr/bin/env python vs. #!/usr/bin/python

2008-05-06 Thread Ethan Furman
link to it there. So why not put symlink to Python over there on all machines, if we can put one (or env itself) there ? A symlink directly to python (or whatever) would not help when testing version x.y.z, while still leaving version a.b.c in place for the other tools/scripts/programs to keep

Re: Negative integers

2008-08-20 Thread Ethan Furman
tions? Thanks > Hm, > > > It seems my previous reply got lost. > > > if a*b > 0: > print "same sign" > else > print "different sign" > > Looks good at first, but -5 * 0 == +7 * 0. ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: Case-insensitive string compare?

2008-09-05 Thread Ethan Furman
either since the -- *case of the keys is actually valuable* ***later on***. It's only for -- the purposes of this specific comparison operation that the case -- should be ignored. In other words, the key (as a key) is case-insensitive, and the key (as a value) is case-sensitive -- making Clifford's comments and solution perfectly acceptable. ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: print doesn't respect file inheritance?

2008-09-05 Thread Ethan Furman
#x27;: None, '__getattribute__': None, '__iter__': None, 'readline': None, 'fileno': None, 'writelines': None, 'tell': None, '__delattr__': None, '__repr__': None, '__hash__': None} Testing: 1, 2, 3... I tried the code (on Windows, so had to change /dev/stdout to /temp/notafile.txt) and it worked just fine. Perhaps the issue is that n is being set to /dev/stdout instead of some other file so no difference is apparent? In other words, you're assigning stdout to stdout. ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: switch

2009-12-10 Thread Ethan Furman
decent OO language should* ." [emphasis added] Just to be clear. ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

setup.py and PyPI

2009-12-14 Thread Ethan Furman
same folder I'm running setup.py from, into my home folder (USERPROFILE, I think) -- and the really frustrating part is that it worked a couple times (but maybe that was from my home computer) but mostly it does not. Any and all pointers gratefully accepted! ~Ethan~ -- http://mail.

Re: setup.py and PyPI

2009-12-14 Thread Ethan Furman
Philip Semanchuk wrote: On Dec 14, 2009, at 12:04 PM, Ethan Furman wrote: Greetings! I'm using Python 2.5 on Windows XP, and trying to get the upload portion of setup.py to work. According to what I have found, I can put my info into a .pypirc file to have the process pick

Re: setup.py and PyPI

2009-12-14 Thread Ethan Furman
Philip Semanchuk wrote: On Dec 14, 2009, at 1:00 PM, Ethan Furman wrote: Philip Semanchuk wrote: On Dec 14, 2009, at 12:04 PM, Ethan Furman wrote: Greetings! I'm using Python 2.5 on Windows XP, and trying to get the upload portion of setup.py to work. According to what I have

clean data [was: Simple distributed example for learning purposes?]

2009-12-28 Thread Ethan Furman
down what they gave you into something usable. To rephrase, the issue that Shawn is referring to is the huge amount of data *already out there*, not brand new data. ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: Object Relational Mappers are evil (a meditation)

2010-01-06 Thread Ethan Furman
ery well end up in the rocks. To sum up: I agree with your "poor programmer" line of reasoning in the second paragraph above, but not with the "tools influencing the way we think" line of reasoning -- while I am cognizant of Python's shortcomings, I am very much enj

Re: Is python not good enough?

2010-01-12 Thread Ethan Furman
> > Python is great for alot of things but it's not perfect for anything. > s/anything/everything/ ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Python and Tkinter Programming by John Grayson

2010-01-12 Thread Ethan Furman
appreciated! ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: lightweight encryption of text file

2010-01-12 Thread Ethan Furman
Anthra Norell wrote: > I consider the encryption unbreakable [...] (from previous thread) I am not a cryptographer. (from this thread) Then you shouldn't be making claims about your encryption algorithms. ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: Simple distributed example for learning purposes?

2010-01-14 Thread Ethan Furman
d you want to make sure you don't mail twice to the same person? yes. We have one customer who gives us *everything* they have -- about 20,000 records, and after the duplicate purge process they mail to about 3,000. In other cases we'll be combining different data sets from the same customer, and again we don't want duplicate mailings. ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: dict's as dict's key.

2010-01-16 Thread Ethan Furman
Lie Ryan wrote: On 01/14/10 05:33, Albert van der Horst wrote: (I encountered this before. A dictionary is a natural for a boardgame position, i.e. chess. Now we want to look up chess positions.) or use collections.namedtuple Which is great until you want to make a move. ;) ~Ethan

Re: Python and Tkinter Programming by John Grayson

2010-01-21 Thread Ethan Furman
I'll start by going over that again, and we'll see how confident I feel afterwards. ;) ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: list.pop(0) vs. collections.dequeue

2010-01-25 Thread Ethan Furman
h is fine. Instead of waiting for the (hundreds of?) posts wondering why making a FIFO queue from a list is so slow, and what's wrong with Python, etc, etc, it points out up front that yes you can, and here's why you don't want to. This does not strike me as too much knowledge. ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: myths about python 3

2010-01-27 Thread Ethan Furman
incompatibility (which surely exists) between 2.6 and 3.x he/she has to look elsewhere. Cheers, Daniel I think what Andre is saying is that you can't get 2.x behavior in 3.x, only the other way 'round. In the integer division instance, the 2.x behavior of 6/5 = 1 is not going to happen in 3.x. ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: myths about python 3

2010-01-28 Thread Ethan Furman
Steven D'Aprano wrote: 4. Python 3 will make you irresistible to women. FALSE What?!? Drat!!! Guess I'll have to learn Lisp... ;) ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: variable scope

2009-09-25 Thread Ethan Furman
in 5.2.1 Identifiers Hope this helps! ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: Using String for new List name

2009-09-28 Thread Ethan Furman
mes: for var in new_names: item = new_names[var] do_something_with(item) Hope this helps! ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: Using String for new List name

2009-09-28 Thread Ethan Furman
ce the quotes around line42. Good luck! Python is a fine language, I hope you like it. ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: Multidimensional arrays/lists

2009-09-28 Thread Ethan Furman
board) O | O | O X | O | O O | O | O You might not want to start out with 'O' already being everywhere, though. ;-) ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: Simple if-else question

2009-09-29 Thread Ethan Furman
print i ...: if i == 1: ...: break ...: else: ...: print i ...: 0 1 Hope this helps! ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: Q: sort's key and cmp parameters

2009-10-01 Thread Ethan Furman
it is, it's one he's contemplating giving his students. :-D ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: Multiple Select

2009-10-02 Thread Ethan Furman
associated with form field name. The method returns an empty list if no such form field or value exists for name. It returns a list consisting of one item if only one such value exists. Hope this helps. ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

package import dangers

2009-10-06 Thread Ethan Furman
es of such failing code. My google search was fruitless (although still educational !-), so if anyone could point me in the right direction I would greatly appreciate it. ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there a better way to code variable number of return arguments?

2009-10-08 Thread Ethan Furman
of return names to match the unpacking you'll get the normal errors from that. Hope this helps! ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there a better way to code variable number of return arguments?

2009-10-08 Thread Ethan Furman
Paul Rubin wrote: Ethan Furman writes: some_list = [1, 2] this, that = func(alist) At least, in 2.5.4 this works. :-) But that fails if there are fewer than two elements in the list. It's better to just make the logic either expect a list, or if it's implementing somethi

Re: package import dangers

2009-10-09 Thread Ethan Furman
Thanks to all for the answers! :) -- http://mail.python.org/mailman/listinfo/python-list

easy install

2009-10-09 Thread Ethan Furman
wt-0.7.2-py2.5-win32.egg.tmp\xlwt\Workbook.py", line 615, in get_biff_data IndexError: list index out of range --> Anyone know why that is? ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

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