Re: Custom help format for a choice argparse argument

2023-01-27 Thread Ivan "Rambius" Ivanov
Hello Cameron, On Fri, Jan 27, 2023 at 4:45 PM Cameron Simpson wrote: > > On 27Jan2023 15:31, Ivan "Rambius" Ivanov > wrote: > >I am developing a script that accepts a time zone as an option. The > >time zone can be any from pytz.all_timezones. I have &

Question about logging.config.dictConfig

2023-02-07 Thread Ivan "Rambius" Ivanov
Hello, I am trying to configure my loggers using dictConfig, but they do not print anything. Here are more details. I have several python scripts that use a similar logging setup. I put the common configuration in a separate module myloggingconf.py: # myloggingconf.py import logging def configu

Re: Question about logging.config.dictConfig

2023-02-08 Thread Ivan "Rambius" Ivanov
On Tue, Feb 7, 2023 at 7:35 PM Peter J. Holzer wrote: > > On 2023-02-07 17:58:26 -0500, Ivan "Rambius" Ivanov wrote: > > I am trying to configure my loggers using dictConfig, but they do not > > print anything. Here are more details. > [...] > > from m

Re: System Beep?

2019-03-08 Thread Ivan "Rambius" Ivanov
Hello, On Fri, Mar 8, 2019, 3:19 PM Steve wrote: > = RESTART: C:\Gork\Med Insulin codes\MedReminder 127.py > = > Traceback (most recent call last): > File "C:\Gork\Med Insulin codes\MedReminder 127.py", line 13, in > > windsound.Beep #(frequency, duration) > NameE

Re: answer not correct

2020-11-08 Thread Ivan "Rambius" Ivanov
Hello, First of all, remove the asterisks around the snippet, it makes it so hard to copy and paste your code. My answer is inlined. On Sun, Nov 8, 2020 at 2:28 PM Quentin Bock wrote: > > *def add(numbers):* > * total = 1* If this is your sum, you need to initialize it to zero: total = 0 > *

Re: EnvironmentError

2020-11-20 Thread Ivan "Rambius" Ivanov
Hello, On Thu, Nov 19, 2020 at 1:56 PM Usman Musa wrote: > > When I try to install a package or upgrade pip, using pip install I got > this error massage. > WARNING: Retrying (Retry(total=4, connect=None, read=None, > redirect=None, status=None)) after connection broken by > 'SSLError(SSLCe

Concatenating a Hash to a String

2020-11-30 Thread Ivan "Rambius" Ivanov
Hello, I want to store the hashes of strings in a database and I have problems generating the sql statements. I generate the hashes using hashlib and then convert it to base64 and I put the base64 representation in the sql. Here is the code: #!/usr/bin/env python3.8 import base64 import hashlib

Re: Concatenating a Hash to a String

2020-11-30 Thread Ivan "Rambius" Ivanov
On Tue, Dec 1, 2020 at 12:39 AM Chris Angelico wrote: > Don't do this! DO NOT do this! Even if it might happen to work with a > base 64 encoded value, this is a terrible terrible bug just waiting to > happen. Instead, use *parameterized queries* and keep your SQL safe. OK. What are parameterized

Re: Concatenating a Hash to a String

2020-12-01 Thread Ivan "Rambius" Ivanov
Hello, Thank you all for your help. On Tue, Dec 1, 2020 at 1:38 PM MRAB wrote: > The bytes are all in the ASCII range, so you can convert it into a > string using .decode('ascii'). I utilized encode and decode string methods to convert from bytes to strings > And, of course, use parametrised qu

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

2005-06-22 Thread Ivan Van Laningham
mz, mz) > -3.1415926535897931 > Never fails. Tim, you gave me the best laugh of the day. Metta, Ivan -- Ivan Van Laningham God N Locomotive Works http://www.andi-holmes.com/ http://www.foretec.com/python/workshops/1998-11/proceedings.html Army

Re: PEP ? os.listdir enhancement

2005-06-23 Thread Ivan Van Laningham
yield file print list(mylistdir(sys.argv[1])) or print list(mylistdir(sys.argv[1],os.path.join)) That way I could def my own join and call it as print list(mylistdir(sys.argv[1],myjoin)) (Note that in your version the join argument isn't used at all.) Metta, Ivan ---

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

2005-06-23 Thread Ivan Van Laningham
Hi All-- Tim Peters wrote: > Fortran is so > eager to allow optimizations that failure due to numeric differences > in conformance tests rarely withstood challenge. +1 QOTW Metta, Ivan -- Ivan Van Laningham God N Locomotive Works http:/

Re: key - key pairs

2005-06-23 Thread Ivan Van Laningham
/set that always insert the value as a key. So that dict["string"]=time also means dict[time]="string". Only one dict required then. Or am I missing something? Metta, Ivan -- Ivan Van Laningham God N Locomotive Works http://www.and

Re: A World Beyond Capitalism 2005,

2005-06-23 Thread Ivan Van Laningham
work people worldwide. > So, uh, what skills do "python activists" have? Why are their skills able to network people when the people who have the skills can't? And what defines a "python activist" anyway? Blowing up Perl installations worldwide? That takes skill?

Re: Thoughts on Guido's ITC audio interview

2005-06-27 Thread Ivan Van Laningham
sn't support crucial APIs? I'm very curious. > f u cn rd ths, u cn gt a gd jb n nx prgrmmng. > l tk t. Metta, Ivan -- Ivan Van Laningham God N Locomotive Works http://www.andi-holmes.com/ http://www.foretec.com/python/workshops/1998-11/p

Re: Which kid's beginners programming - Python or Forth?

2005-06-27 Thread Ivan Van Laningham
to learn than Forth, and more directly useful. Since the rewards are so immediate, a kid's attention could be gained and kept pretty easily. But I'd still recommend Python as a first programming language. Keep to the standard stuff--ignore list comprehensions and so on--until he

Re: Favorite non-python language trick?

2005-06-28 Thread Ivan Van Laningham
Hi All-- Mike Meyer wrote: > > Since the user is the one bound with B&D languages, they are clearly > tops. Which makes Python a bottom. > Well, we certainly hope Python has a safe word. Metta, Ivan ------ Ivan Van Laningham God N Locom

Re: Python for everything?

2005-06-30 Thread Ivan Van Laningham
till hugely flexible, highly adaptable, and very powerful. For about 10 or 15 years there, knowing C was pretty much a guarantee of a good job. That changed when C++ compilers became common and good and not merely preprocessors that wrote really, really ugly C. Metta, -ly y'rs, Ivan;-) -

Re: Modules for inclusion in standard library?

2005-07-01 Thread Ivan Van Laningham
site.py to change the default encoding if you want to use non-ASCII. It might work beautifully, but I won't use it, at least not until it's fixed to understand encodings. Metta, Ivan ------ Ivan Van Laningham God N Locomotive Works http

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

2005-07-01 Thread Ivan Van Laningham
erivatives put your head in a very weird place. Even weirder than PostScript/Forth/RPN, when you come right down to it. I won't miss them, but since I don't use them now, that doesn't mean a whole lot. Metta, Ivan -- Ivan Van Laningham God

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

2005-07-05 Thread Ivan Van Laningham
tient C programmers. I think scaring C programmers, like giving engineers too much information, is really hard to do. Live by the sword, die by the sword. Metta, -ly y'rs, Ivan ------ Ivan Van Laningham God N Locomotive Works http://www.andi-holmes.com/ htt

Codecs

2005-07-08 Thread Ivan Van Laningham
that if I want to try to read an unknown file using an exhaustive list of possible encodings, the best place to keep the most current list is the codec registry itself, not in the documentation for the codec module. Metta, Ivan -- Ivan Van Laningham God N

Re: Image orientation and color information with PIL?

2005-07-18 Thread Ivan Van Laningham
r image mode. Check the PIL documentation. If you have only searched the newsgroup then you might have overlooked the docs. Metta, Ivan -- Ivan Van Laningham God N Locomotive Works http://www.andi-holmes.com/ http://www.foretec.com/python/workshops/1998-

Re: Earthquake Forecasting Program July 11, 2005

2005-07-18 Thread Ivan Van Laningham
th a > demand that public monies be giving to him to support his "research". > Well, I guess this is in line with how I persist in seeing the Subject: header. _Every_ time I look at it, my brain sees "Re: Earthquake Fornicating Program". Brings a whole new

Re: [path-PEP] Path inherits from basestring again

2005-07-24 Thread Ivan Van Laningham
c:"], other than the index. n=path["c:"] = 0 ? > > What about path * 4? This one makes my brain hurt, I admit;-) Metta, Ivan -- Ivan Van Laningham God N Locomotive Works http://www.andi-holmes.com/ http://www.foretec.com/python/works

Re: [path-PEP] Path inherits from basestring again

2005-07-29 Thread Ivan Van Laningham
inwith, so if I read code that used path, I would > understand it - it's too late for me to try reading code as a 'fresh' user > and see if it confuses me or not. > Then that's your right, but don't try to take / away from people who use it and like it. Metta, I

Re: [path-PEP] Path inherits from basestring again

2005-07-30 Thread Ivan Van Laningham
d) and easy to type. Requiring users who want / to mean what it has always meant in the path module is neither easy nor intuitive. On the face of it, Jason would seem to agree, since he created / as a synonym for joinpath(). However, if the intention here is to create something different from

Re: OT: World's largest Python caught!:)

2005-08-08 Thread Ivan Van Laningham
largest: http://www.reptilia.org/NEWS.htm And this one offers a better picture: http://www.clubavalanche.com/forums/index.php?showtopic=2837&; Metta, Ivan > James > > On Sunday 07 August 2005 09:15 pm, Ashok Rajasingh wrote: > > Hi > > > > > > > > Ca

Re: Jargons of Info Tech industry

2005-08-11 Thread Ivan Van Laningham
r Tourette's kicked in. > You made it that far? Congratulations. I barely got past the name of the troll. Metta, Ivan -- Ivan Van Laningham God N Locomotive Works http://www.pauahtun.org/ http://www.foretec.com/python/workshops/1998-11/proceedings.html

Re: Pre-PEP: Dictionary accumulator methods

2005-03-18 Thread Ivan Van Laningham
ef count(self, value, qty=1): > try: > self[key] += qty > except KeyError: > self[key] = qty > There is no existing add() method for dictionaries. Given the name change, I'd like to see it. Metta, Ivan

Re: Pre-PEP: Dictionary accumulator methods

2005-03-19 Thread Ivan Van Laningham
s was suggested by Michael Spencer seems non-intuitive to me. > > Just my 2 Eurocents, > > I raise you by a ruble and a pound ;-) > -ly y'rs, Ivan -- Ivan Van Laningham God N Locomotive Works http://www.andi-holmes.com/ h

Re: Pre-PEP: Dictionary accumulator methods

2005-03-19 Thread Ivan Van Laningham
ing. What about adding another method, "setincrement()"? d={} d.setincrement(-1) for word in text.split(): d.tally(word,1) if word.lower() in ["a","an","the"]: d.tally(word) Not that there's any real utility in that. Metta, Ivan --

Re: Python scope is too complicated

2005-03-20 Thread Ivan Van Laningham
o its containing scope is going away soon. Will that be another scope? Or are generator and list comprehensions only one scope? Metta, Ivan -- Ivan Van Laningham God N Locomotive Works http://www.andi-holmes.com/ http://www.foretec.com/python/workshops/1998-11/pr

Re: C type buffer copy

2005-03-22 Thread Ivan Van Laningham
gt; } > .... > } > > What's the best way to deal with this in python? > Metta, Ivan -- Ivan Van Laningham God N Locomotive Works http://www.andi-holmes.com/ http://www.foretec.com/python/workshops/1998-11/proceedings.html Ar

Re: Grouping code by indentation - feature or ******?

2005-03-25 Thread Ivan Van Laningham
nctions/methods than you would have any right to expect otherwise. As far as grouping by indentation goes, it's why I fell in love with Python in the first place. Braces and so on are just extraneous cruft as far as I'm concerned. It's the diff

Re: Max files in unix folder from PIL process

2005-03-29 Thread Ivan Van Laningham
each and every file in the directory. Standard ls with no options (or old SysV/BSD ls that came with no options) works nearly as fast as os.listdir() in Python, because it doesn't require a stat(). The only thing faster, from a shell user's viewpoint, is 'echo *'. That may n

Re: [ANN]: Last Chance 2005 IORCC Entries

2005-03-30 Thread Ivan Van Laningham
think of us, and why should we enter a contest where we are dissed by being shoehorned into someone else's categories? Metta, Ivan -- Ivan Van Laningham God N Locomotive Works http://www.andi-holmes.com/ http://www.foretec.com/python/workshops/1998-1

Re: Using something other than ';' to separate statements

2005-03-30 Thread Ivan Van Laningham
Hi All-- Michael Hoffman wrote: > > Jaime Wyant wrote: > > > # This won't work > > if a > 5: print "a > 5";else print "Doh" > > This will: > > ["Doh", "a > 5"][a > 5] > > I highly d

Re: string goes away

2005-03-31 Thread Ivan Van Laningham
gt; [i.upper() for i in u] ['A', 'B', 'C'] >>> Works pretty well for me. Better'n map() any day. > I am sure there has been lots of discussion on whether or not to remove > the string module. Maybe you can just direct me to the right place.

Re: Stylistic question about inheritance

2005-03-31 Thread Ivan Van Laningham
] those guys were thinking making 200 twelve-line ASP classes. Ya think there's a hard-wired limit past which your brain melts? > Paraphrasing Occam, I would say "don't multiply base classes without > necessity" ;) > +1 QOTW Metta, Ivan -

Re: string goes away

2005-04-01 Thread Ivan Van Laningham
D more speed, then profiling and testing will show you what to > fix. (Using a better algorithm is a different story... do that > whenever you need it.) > Tim Peters sayeth, "Premature Optimization is the Root of All Evil." And he is not kidding. Ever try to

Re: Pseudocode in the wikipedia

2005-04-01 Thread Ivan Van Laningham
ble machines from Xerox that might make it hard to make > an ass-based identity system resistant to attacks. http://www.jacquelinestallone.com/rumps.html Metta, Ivan PS: I don't think this is an 0401 page; it's been there a while. -- Ivan Van Laningham

Re: Pseudocode in the wikipedia

2005-04-02 Thread Ivan Van Laningham
Hi All-- Cameron Laird wrote: > > Welcome back, Ivan. Your follow-ups make one wonder about the > span of related topics clp has been missing in your absence. > Thanks for the welcome. Absence was more a consequence of working for idiots for four years (at 60-80 hours/week) than a

Re: IronPython 0.7 released!

2005-04-05 Thread Ivan Van Laningham
Hi All-- Tim Peters wrote: > > not-mentioning-that-i-don't-feel-particularly-embraced-yet-ly y'rs - tim > Don't worry, Tim. You will. -ly y'rs, Ivan Meta: <1984-in-what-base-was-that?>-ly y'rs, Ivan ------ I

Re: Best editor?

2005-04-05 Thread Ivan Van Laningham
Hi All-- [EMAIL PROTECTED] wrote: > > Windows: textpad > Linux: vim > Windows: gvim Linux: gvim, or vim if I have to. Other unices: gvim, vim, vi SlickEdit doesn't suck. Emacs doesn't suck, either. Metta, Ivan -- Iv

Re: Best editor?

2005-04-05 Thread Ivan Van Laningham
good book available for vim: http://www.amazon.com/exec/obidos/ASIN/0735710015/qid=1112743931/sr=2-1/ref=pd_bbs_b_2_1/102-7196910-2449750 It's excellent; even the index is useful, which is more than I can say for 80% of the O'Reilly books out there, muc

Re: Lambda: the Ultimate Design Flaw

2005-04-05 Thread Ivan Van Laningham
re, the language didn't change, just the environment around it--includes, libs, where things lived, etc. Metta, Ivan -- Ivan Van Laningham God N Locomotive Works http://www.andi-holmes.com/ http://www.foretec.com/python/workshops/1998-11/proceedi

Re: shebang in cross platform scripts

2005-04-06 Thread Ivan Van Laningham
install a link in /usr/bin to whereever python lives, and expect #!/usr/bin/python to work just fine. Metta, Ivan -- Ivan Van Laningham God N Locomotive Works http://www.andi-holmes.com/ http://www.foretec.com/python/workshops/1998-11/proceedings.html

Re: curious problem with large numbers

2005-04-08 Thread Ivan Van Laningham
Hi All-- Windows XP, uwin running on Athlon XP 3000+: 0 [/c/users/ivanlan][1] python Python 2.4 (#60, Nov 30 2004, 11:49:19) [MSC v.1310 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> 1e100

Re: Interpreter problem

2005-04-08 Thread Ivan Van Laningham
rb")] & re-writing [open(foofile,"wb")] a file will do this if you are not excruciatingly careful. If you don't have dos2unix on your win system, but do have cat, you can use cat -d. #!/bin/sh cat -d $1 > snot mv snot $1 (Prone to error, of course.) -ly

Re: [perl-python] Python documentation moronicities (continued)

2005-04-12 Thread Ivan Van Laningham
pledge $10. > Are there another nine people here who'll do the same? > > Why don't we pay him $100 to re-write the PERL docs? Metta, Ivan -- Ivan Van Laningham God N Locomotive Works http://www.andi-holmes.com/ http://www.foretec.com/pyt

Re: Utah Python Users Group

2005-04-13 Thread Ivan Van Laningham
any groups but I might be interested. > Ditto. Metta, Ivan -- Ivan Van Laningham God N Locomotive Works http://www.andi-holmes.com/ http://www.foretec.com/python/workshops/1998-11/proceedings.html Army Signal Corps: Cu Chi, Class of 

Re: Compute pi to base 12 using Python?

2005-04-13 Thread Ivan Van Laningham
t 3003 digits of pi to the base 12. > > > >Now you've got me curious. Why would an artist want the first 3003 > >digits of pi to the base 12? > > He says, > Do you know how I can get "base12 pi"? > Because th

Re: A little request about spam

2005-04-14 Thread Ivan Van Laningham
easy to decide incorrectly that "Subject: Inelegant" is a spamdunk. Metta, Ivan mark hellewell wrote: > > On 4/14/05, James <[EMAIL PROTECTED]> wrote: > > Yes - it's been like that for the last month or so now and it's quite > > annoying, especially seein

Re: A little request about spam

2005-04-14 Thread Ivan Van Laningham
ily do base decisions on the whole subject line, and I think that's perfectly reasonable. There's nothing else to go on without opening the message, and for HTML-based mail there's no surer way to let spammers know they've found a live email addres than to open it. You know tha

Re: Converting a perl module to a python module would it be worthit?

2005-04-14 Thread Ivan Van Laningham
sion of CPAN, but it's taking a long time. I think they started in 1998 or so? Haven't kept up, so I have no idea what's taking so long. I'm sure someone more knowledgeable than me will come along and set us straight. Metta, Ivan

Slight discrepancy with filecmp.cmp

2005-04-17 Thread Ivan Van Laningham
e's a line going through the picture above which it's normal, and below it either the color has changed (usually to pinkish) or the remaining raster lines are all shifted either right or left? Any ideas? Metta, Ivan ------ Ivan Van Laningham God N L

Re: Slight discrepancy with filecmp.cmp

2005-04-18 Thread Ivan Van Laningham
Hi All-- John Machin wrote: > > On Sun, 17 Apr 2005 22:06:04 -0600, Ivan Van Laningham > <[EMAIL PROTECTED]> wrote: > [snip] > > So I wrote a set of > >programs to both index the disk versions with the cd versions, and to > >compare, using filecmp.cmp(),

Re: Name/ID of removable Media: how?

2005-04-19 Thread Ivan Van Laningham
;letter:\\" or GetVolumeInformation() doesn't always work. There are probably better ways to do these things, but they do work; I've been using them constantly the last few days. Metta, Ivan -- Ivan Van Laningham God N Locomotive Wor

Re: Name/ID of removable Media: how?

2005-04-19 Thread Ivan Van Laningham
ng a long converted to a hex repr string, while win32api is returning an int (type(sn) is ), & converting to hex bears no resemblance to what WMI shows. What am I missing? Metta, Ivan ------ Ivan Van Laningham God N Locomotive Works http://www.an

Re: Name/ID of removable Media: how?

2005-04-19 Thread Ivan Van Laningham
s; now only negative hex numbers > are negative decimals) > Of course I tried that. Did you? Python 2.4 (#60, Nov 30 2004, 11:49:19) [MSC v.1310 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for

Re: Variables variable

2005-04-19 Thread Ivan Van Laningham
way the excess. It usually takes two or three iterations at carving to realize that whatever it is needs a dictionary. I have never seen a case where a dictionary didn't improve the design. +1QOTW. Well. Storing a Mayan number/date as a dic

Re: goto statement

2005-04-21 Thread Ivan Van Laningham
be a good language for him, don't you? Metta, Ivan -- Ivan Van Laningham God N Locomotive Works http://www.andi-holmes.com/ http://www.foretec.com/python/workshops/1998-11/proceedings.html Army Signal Corps: Cu Chi, Class of '70 Author: Teach

Re: trying to read from dying disk

2005-04-23 Thread Ivan Van Laningham
ers trying to interrupt (with ^C) a process that is waiting for a hardware interrupt. Metta, Ivan -- Ivan Van Laningham God N Locomotive Works http://www.andi-holmes.com/ http://www.foretec.com/python/workshops/1998-11/proceedings.html Army Signal Corps:

Re: Rudeness on this list [Re: rudeness was: Python licence again]

2005-04-24 Thread Ivan Van Laningham
tty nice list then, it's a pretty nice list now, so I'm afraid I must disagree with François. Oh, and Gordon. Don't see Gordon around. Where's he? Metta, Ivan -- Ivan Van Laningham God N Locomotive Works http://www.andi-holmes.com/ htt

Re: Multiple tuples for one for statement

2005-04-25 Thread Ivan Van Laningham
Hi All-- "R. C. James Harlow" wrote: > > or just: > > for a,b,c in (tup1, tup2, tup3): > print a > print b > print c > And this works in Python version??? Metta, Ivan -- Ivan Van Laningham God

Re: Multiple tuples for one for statement

2005-04-25 Thread Ivan Van Laningham
Hi All-- "R. C. James Harlow" wrote: > > On Monday 25 April 2005 14:34, Ivan Van Laningham wrote: > > Hi All-- > > > > "R. C. James Harlow" wrote: > > > or just: > > > > > > for a,b,c in (tup1, tup2, tup3): > > >

Re: Multiple tuples for one for statement

2005-04-25 Thread Ivan Van Laningham
> > It's a valid interpretation of the OP's > ambiguously stated requirements, though probably > not the right one. > I can see that now. I had three hours sleep last night and my brain hurts, so I don't get it. I seek enlightenment. Metta, Ivan ---

Re: Multiple tuples for one for statement

2005-04-25 Thread Ivan Van Laningham
Peter Hansen wrote: > > Ivan Van Laningham wrote: > > I can see that now. I had three hours sleep last night and my brain > > hurts, so I don't get it. I seek enlightenment. > > So do I: did you mean you don't even "get" what > my code is doing

Re: Python documentation moronicities (continued)

2005-04-26 Thread Ivan Van Laningham
t;rewrote" documentation. Metta, Ivan -- Ivan Van Laningham God N Locomotive Works http://www.andi-holmes.com/ http://www.foretec.com/python/workshops/1998-11/proceedings.html Army Signal Corps: Cu Chi, Class of '70 Author: Teach Yourself Pyt

Re: Fwd: how to find the drive in python/cygwin?

2005-04-26 Thread Ivan Van Laningham
;ll still get the drive letter, but inf will be None Drives.append([dr,inf]) return Drives if __name__=="__main__": drives=findAllDrives() for i in drives: print i[0],i[1] cut here Metta, Ivan -- I

Re: Fwd: how to find the drive in python/cygwin?

2005-04-30 Thread Ivan Van Laningham
Hi All-- Jason Tishler wrote: > > Ivan, > > On Tue, Apr 26, 2005 at 07:02:48PM -0600, Ivan Van Laningham wrote: > > Use win32api to find drives: > > > > cut here > > #!/usr/bin/python > > # -*- coding: utf-8 -*- > > > > impo

Re: Fwd: how to find the drive in python/cygwin?

2005-04-30 Thread Ivan Van Laningham
Hi All-- Jason Tishler wrote: > > Ivan, > > It depends on your needs. If you are looking for a more Unix-like > Python, then the Cygwin version would probably be better. If > Windows-like, then the native Windows version would probably be better. > > The OP seem to b

Re: Whats the best Python Book for me

2005-05-01 Thread Ivan Van Laningham
dug through the manuals and through Lutz' _Programming Python_ and I asked dumb questions on this list. If I were starting now, in your place, I'd get a copy of the _Python Cookbook_ (2e) and keep that handy. It's a good place to learn idioms, and that's what you're most in

Re: Trouble saving unicode text to file

2005-05-07 Thread Ivan Van Laningham
f forced to communicate with another > Unicode-aware system over an 8-bit wide channel, encode as utf-8, not > cp666)" > +1 QOTW And true, too. -ly y'rs, Ivan -- Ivan Van Laningham God N Locomotive Works http://www.andi-holmes.com/ ht

Re: Advice needed on __del__

2005-05-09 Thread Ivan Van Laningham
Hi All-- Fredrik Lundh wrote: > > Python is not C++. > I dunno if this makes QOTW, but I vote we put this in our list text that goes out with each and every list message. There will still be a lot of people who don't read it, but at least we'll get to say, "We told

Re: Python Documentation (should be better?)

2005-05-11 Thread Ivan Van Laningham
arty module/lib. Or it's what I'm trying to write;-) Metta, Ivan -- Ivan Van Laningham God N Locomotive Works http://www.andi-holmes.com/ http://www.foretec.com/python/workshops/1998-11/proceedings.html Army Signal Corps: Cu Chi, Class of &#

Re: Python Documentation (should be better?)

2005-05-11 Thread Ivan Van Laningham
nt doc. Sorry. No cigar. "There's Only One Way to Do It," except in the Docs, that is. Good as Google is, it is not good for a doc search. We don't have a doc search, we have a doc hurl. BTW, my "tortured method" is quicker than Bruno's, because to use his m

Re: Python Documentation (should be better?)

2005-05-11 Thread Ivan Van Laningham
Hi All-- Steven Bethard wrote: > > Ivan Van Laningham wrote: > > I should be able to type "string methods" into the text box, > > push submit, and IT SHOULD HAND ME THE PAGE. Not "Results 1 - 20 of > > about 9,800 from www.python.org for string methods. (0

Re: Python Documentation (should be better?)

2005-05-11 Thread Ivan Van Laningham
Hi All-- Robert Kern wrote: > > Ivan Van Laningham wrote: > > > http://www.python.org/doc/ > > > Searching on docs.python.org goes through just the stuff that's on > docs.python.org, which is pretty much just documentation. Google's magic > points to the

Re: Python Documentation (should be better?)

2005-05-11 Thread Ivan Van Laningham
Hi All-- John Bokma wrote: > > Ivan Van Laningham wrote: > > > Python docs are not as good as PHP docs. > > Oh my. I hope you are just making that up. PHP documentation is > guesstimated on how PHP works on average. Add the online comments clutter > and you probably

Re: Python Documentation (vs PHP stuff)

2005-05-11 Thread Ivan Van Laningham
not a 'How to find "string methods"' page, but "Tips & Tricks for Interrogating the Python Docs" page. Metta, Ivan -- Ivan Van Laningham God N Locomotive Works http://www.andi-holmes.com/ http://www.foretec.com/python/w

Re: Representing ambiguity in datetime?

2005-05-17 Thread Ivan Van Laningham
ates" button) The paper describing the incomplete Mayan date tool is at: http://www.pauahtun.org/python_vuh.html Metta, Ivan -- Ivan Van Laningham God N Locomotive Works http://www.andi-holmes.com/ http://www.foretec.com/python/workshops/1998-11/procee

Re: Python forum

2005-05-18 Thread Ivan Van Laningham
Hi All-- Robert Kern wrote: > > Skip Montanaro wrote: > > > (Is "forums" okay as a plural of "forum" or should I have used "fora"?) > > dict.org says _forums_. I used _fora_, but I'm silly. > It also sa

Re: Is Python suitable for a huge, enterprise size app?

2005-05-18 Thread Ivan Van Laningham
ping? ... Hmm, trust the developers out there not to peek? Oh, sure, let's use it." (True, there are ways around the second, but you're going to have to talk _very_ fast and have ALL the answers before the management type gets to his/her office and shuts the door in your face and o

Re: NaN support etc.

2005-05-18 Thread Ivan Van Laningham
to probe the limits of the IEEE-754 support on a system. It's not set up to show you NaN, but by studying the docs on your particular system you could modify the code to print stuff like that out, I'd think. Metta, Ivan -- Ivan Van Laningham God N Lo

Re: Is Python suitable for a huge, enterprise size app?

2005-05-18 Thread Ivan Van Laningham
Hi All-- George Sakkis wrote: > > "Ivan Van Laningham" wrote: > > An idea that perhaps takes the best of both worlds is use java for the > high level architecture and static type interfaces, and write the bulk > of the implementation in jython. PSF has awarded a gra

Re: Python forum

2005-05-19 Thread Ivan Van Laningham
Hi All-- Peter Hansen wrote: > > Ivan Van Laningham wrote: > > Robert Kern wrote: > >>dict.org says _forums_. I used _fora_, but I'm silly. > >> > > It also says "appendixes" and "indexes" are OK. Yahoos. > > Should that

Re: the problem with cgi

2005-05-29 Thread Ivan Van Laningham
Oh, that's reassuring. Does he have his tinfoil hat on? Metta, Ivan PS: Sorry, I meant, "Does he have his fucking tinfoil hat on?" -- Ivan Van Laningham God N Locomotive Works http://www.andi-holmes.com/ http://www.foretec.com/python/w

Re: working with pointers

2005-05-31 Thread Ivan Van Laningham
ys. > > > and when does it mean make a copy of the object?? > > Never. > To which I would add (without attempting to preserve Dave's admirable brevity): a=[3,5,6] b=a "b" is a reference to a; both b and a are names bou

PySol not working on WinXP, SP2

2005-06-01 Thread Ivan Van Laningham
27;s put together a version for 2.3--and of course, I'm running Python 2.4. My wife's going to be force to upgrade to SP2 some of these days, and she won't be happy if her solitaire doesn't work. Does anyone have a working version? Anyone know what happened to Markus ... Ober

Re: PySol not working on WinXP, SP2

2005-06-01 Thread Ivan Van Laningham
Hi All-- Robert Kern wrote: > > Skip Montanaro wrote: > > Ivan> I can't find any later version on google... > > > > It may not help you much, but I was able to get it working on MacOSX by > > grabbing the latest available source and tracking down the

Re: PySol not working on WinXP, SP2

2005-06-01 Thread Ivan Van Laningham
ing eventually, I suppose, but I was really hoping someone else had done the work already, or at least had pointers to docs on how to get it working. Metta, Ivan > -Jim > > On 6/1/05, Ivan Van Laningham <[EMAIL PROTECTED]> wrote: > > Hi All-- > > I've been using PyS

Re: REQ: Small Perl to Python conversion needed

2005-06-02 Thread Ivan Van Laningham
Hi All-- John Machin wrote: > > > how to duplicate the following bit of code using Python dictionaries. > > > > [expletives deleted] > +1 QOTW Metta, Ivan ------ Ivan Van Laningham God N Locomotive Works http://w

Re: maybe a bug in python: NOW Pythonic Gotchas

2005-06-05 Thread Ivan Van Laningham
into shape and make a doc page. The gods of documentation (as opposed to the gods _in_ documentation) can transfer it to the Official Documentation Homeland, or not, as they see fit. Metta, Ivan Tiago Stürmer Daitx wrote: > > Just as everyone said, use ('a',) instead of

Re: file permissions on windows XP (home)

2005-06-08 Thread Ivan Van Laningham
o obsessive about it. Now that I think about it, the times that I've had permission trouble it's always been with thumbs. Not definitive, but worth looking out for. Metta, Ivan ------ Ivan Van Laningham God N Locomotive Works http://www.andi-holme

Re: functions with unlimeted variable arguments...

2005-06-18 Thread Ivan Van Laningham
Hi All-- Paul Rubin wrote: > > "Xah Lee" <[EMAIL PROTECTED]> writes: > > but are there other solutions? > > > > Xah > > Geez man, haven't you been around long enough to read the manual? > > def f(*a): return a > He's been

Problem with Tkinter scrollbar callback

2008-01-24 Thread Ivan Van Laningham
clicking one of the arrow buttons produces one callback. On Linux, in the real application, if I click an arrow button once, the callback continues to be called until I kill the app. That doesn't happen in the small program I've provided above, so I'm at a bit of a loss where to start

Re: Problem with Tkinter scrollbar callback

2008-01-24 Thread Ivan Van Laningham
s are all I want. They act like they've been set to a keybounce timeout of about a millisecond. ... The arrow click increments the number of cells in a table row (effectively), and it shoots up from 5 to 26 columns almost instantly (that's the internal max I set). Metta, Ivan On Jan 2

Re: Problem with Tkinter scrollbar callback

2008-01-29 Thread Ivan Van Laningham
#x27;, '1000'), And when I try it with the new repeatdelay (1000), the only thing that has changed is that it waits 1000 milliseconds before exhibiting the same uncontrolled growth as before. Metta, Ivan On Jan 25, 2008 5:49 PM, Russell E. Owen <[EMAIL PROTECTED]> wrote: > In

<    1   2   3   4   5   6   >