diff --git a/Cargo.lock b/Cargo.lock index b4f6c07c..b744b64d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1015,11 +1015,12 @@ checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" [[package]] name = "miniz_oxide" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d7559a8a40d0f97e1edea3220f698f78b1c5ab67532e49f68fde3910323b722" +checksum = "c60c0dfe32c10b43a144bad8fc83538c52f58302c92300ea7ec7bf7b38d5a7b9" dependencies = [ "adler", + "autocfg", ] [[package]] diff --git a/demo/ermis-f/python_m/cur/0001 b/demo/ermis-f/python_m/cur/0001 new file mode 100644 index 00000000..9257ec00 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0001 @@ -0,0 +1,79 @@ +From: jepler at inetnebr.com (Jeff Epler) +Date: 21 Feb 1999 18:21:29 GMT +Subject: New (?) suggestion to solve "assignment-in-while" desire +Message-ID: +X-IMAPbase: 1567524838 0000742335 +X-UID: 1 +Content-Length: 2202 + +We all know what the problem looks like: + + while 1: + x=sys.stdin.readline() + if not x: break + .... + +well, someone can write an "xreadlines" which permits + for i in xreadlines(sys.stdin): + .... + +but next, who knows what "x"-function we will need. + +And, at the same time, "for" embodies a test (for IndexError) and an +assignment (to the loop variable). So what we need is a nice, generic +class to embody this sort of functionality, with the ability to use an +arbitrary test on the assigned value, as well as accept an arbitrary +exception as an "end of loop" marker. + +This is an implementation of the "lazy" class, which does what I've +discussed: + +-------------------------------------------------------------------------- +class lazy: + def __init__(self, function, test=lambda x: not x, exception=None, + index=0): + self.f=function + self.t=test + self.e=exception + self.i=index + + def __getitem__(self, i): + try: + if self.i: ret=self.f(i) + else: ret=self.f() + except self.e: + raise IndexError + if self.t(ret): + raise IndexError + return ret +-------------------------------------------------------------------------- +here are some uses of it: xreadlines, and "xrange1" a limited +reimplementation of xrange. + +-------------------------------------------------------------------------- +xreadlines=lambda x: lazy(x.readline, exception=EOFError) +xrange1=lambda min, max, inc: lazy(lambda x, min=min, inc=inc: min+inc*x, + lambda y, max=max: y>=max, index=1) +-------------------------------------------------------------------------- + +the basic + for i in lazy(f): + body +is the same as: + while 1: + i=f() + if not i: break + body + +but you can embellish with more complicated tests, exception tests, or +whatever. + +The class assumes it will be called in a "for-like way" so please refrain +from taunting it. + +Jeff + + + + + diff --git a/demo/ermis-f/python_m/cur/0002 b/demo/ermis-f/python_m/cur/0002 new file mode 100644 index 00000000..9570fc28 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0002 @@ -0,0 +1,77 @@ +From: jepler at inetnebr.com (Jeff Epler) +Date: 21 Feb 1999 18:21:29 GMT +Subject: New (?) suggestion to solve "assignment-in-while" desire +Message-ID: +X-UID: 2 +Content-Length: 2201 + +We all know what the problem looks like: + + while 1: + x=sys.stdin.readline() + if not x: break + .... + +well, someone can write an "xreadlines" which permits + for i in xreadlines(sys.stdin): + .... + +but next, who knows what "x"-function we will need. + +And, at the same time, "for" embodies a test (for IndexError) and an +assignment (to the loop variable). So what we need is a nice, generic +class to embody this sort of functionality, with the ability to use an +arbitrary test on the assigned value, as well as accept an arbitrary +exception as an "end of loop" marker. + +This is an implementation of the "lazy" class, which does what I've +discussed: + +-------------------------------------------------------------------------- +class lazy: + def __init__(self, function, test=lambda x: not x, exception=None, + index=0): + self.f=function + self.t=test + self.e=exception + self.i=index + + def __getitem__(self, i): + try: + if self.i: ret=self.f(i) + else: ret=self.f() + except self.e: + raise IndexError + if self.t(ret): + raise IndexError + return ret +-------------------------------------------------------------------------- +here are some uses of it: xreadlines, and "xrange1" a limited +reimplementation of xrange. + +-------------------------------------------------------------------------- +xreadlines=lambda x: lazy(x.readline, exception=EOFError) +xrange1=lambda min, max, inc: lazy(lambda x, min=min, inc=inc: min+inc*x, + lambda y, max=max: y>=max, index=1) +-------------------------------------------------------------------------- + +the basic + for i in lazy(f): + body +is the same as: + while 1: + i=f() + if not i: break + body + +but you can embellish with more complicated tests, exception tests, or +whatever. + +The class assumes it will be called in a "for-like way" so please refrain +from taunting it. + +Jeff + + + + diff --git a/demo/ermis-f/python_m/cur/0003 b/demo/ermis-f/python_m/cur/0003 new file mode 100644 index 00000000..44ef320e --- /dev/null +++ b/demo/ermis-f/python_m/cur/0003 @@ -0,0 +1,34 @@ +From: wavers at mail.pt (waver) +Date: Sat, 27 Mar 1999 15:25:30 +0000 +Subject: help-me please +Message-ID: <000801be7866$0d4d0020$6d0f1ed5@wavers> +Content-Length: 1106 +X-UID: 3 + +Hi! +i am a portuguese guy that heve some questions about Python. +I read some tuturials but all only talk about how to program with Python + and +that is very important) but i want to know some other things: +1-What do we do with Python? +2-Can Python do some programs ? +3-Python is a language only to Internet or can do some programs ? +4-Explain how do i write my things in Python , i know that in the Python +Shell we can write some commands but if i want to build some thing in Python +i write in notepad and then how do i test it ?? +5-Does any Web Hosting Server support Python? + +I know that are some lhamme questions but i want to learn Python so first i +nedd to know how does Python word and what does it do. +So please try to answear my questions , and for that email-me wavers at mail.pt +because i don`t know how to work with newsgroup. +Thank very much AND PELASE ANSWER MY QUESTION WITH ANY EMAIL TO +WAVERS at MAIL.PT . + +Byeeeeee + +-------------- next part -------------- +An HTML attachment was scrubbed... +URL: + + diff --git a/demo/ermis-f/python_m/cur/0004 b/demo/ermis-f/python_m/cur/0004 new file mode 100644 index 00000000..b5c2be4d --- /dev/null +++ b/demo/ermis-f/python_m/cur/0004 @@ -0,0 +1,35 @@ +From: python at rose164.wuh.wustl.edu (David Fisher) +Date: Sat, 20 Mar 1999 19:48:27 -0600 +Subject: Simple tuple question +Message-ID: <021001be7343$35563dc0$8f3dfc80@spkydomain> +Content-Length: 1251 +X-UID: 4 + +Spam detection software, running on the system "albatross.python.org", has +identified this incoming email as possible spam. The original message +has been attached to this so you can view it (if it isn't spam) or label +similar future email. If you have any questions, see +the administrator of that system for details. + +Content preview: ----- Original Message ----- From: "Jeff Shipman" + Newsgroups: comp.lang.python To: Sent: Monday, March + 20, 2000 11:54 AM Subject: Re: Simple tuple question [...] + +Content analysis details: (5.7 points, 5.0 required) + + pts rule name description +---- ---------------------- -------------------------------------------------- + 2.0 FH_DATE_IS_19XX The date is not 19xx. + 1.4 NO_DNS_FOR_FROM DNS: Envelope sender has no MX or A DNS records + 2.3 DATE_IN_PAST_96_XX Date: is 96 hours or more before Received: date + + +-------------- next part -------------- +An embedded message was scrubbed... +From: "David Fisher" +Subject: Re: Simple tuple question +Date: Sat, 20 Mar 1999 19:48:27 -0600 +Size: 1894 +URL: + + diff --git a/demo/ermis-f/python_m/cur/0005 b/demo/ermis-f/python_m/cur/0005 new file mode 100644 index 00000000..fed15556 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0005 @@ -0,0 +1,36 @@ +From: python at rose164.wuh.wustl.edu (David Fisher) +Date: Sun, 21 Mar 1999 11:37:38 -0600 +Subject: making py modules with C +Message-ID: <012701be73c1$a2872200$573dfc80@spkydomain> +Content-Length: 1284 +X-UID: 5 + +Spam detection software, running on the system "albatross.python.org", has +identified this incoming email as possible spam. The original message +has been attached to this so you can view it (if it isn't spam) or label +similar future email. If you have any questions, see +the administrator of that system for details. + +Content preview: ----- Original Message ----- From: "Gordon McMillan" + To: "David Fisher" ; + Sent: Tuesday, March 21, 2000 6:49 AM Subject: Re: making py modules with + C [...] + +Content analysis details: (5.7 points, 5.0 required) + + pts rule name description +---- ---------------------- -------------------------------------------------- + 1.4 NO_DNS_FOR_FROM DNS: Envelope sender has no MX or A DNS records + 2.0 FH_DATE_IS_19XX The date is not 19xx. + 2.3 DATE_IN_PAST_96_XX Date: is 96 hours or more before Received: date + + +-------------- next part -------------- +An embedded message was scrubbed... +From: "David Fisher" +Subject: Re: making py modules with C +Date: Sun, 21 Mar 1999 11:37:38 -0600 +Size: 2969 +URL: + + diff --git a/demo/ermis-f/python_m/cur/0006 b/demo/ermis-f/python_m/cur/0006 new file mode 100644 index 00000000..e843ef2d --- /dev/null +++ b/demo/ermis-f/python_m/cur/0006 @@ -0,0 +1,36 @@ +From: python at rose164.wuh.wustl.edu (David Fisher) +Date: Sat, 20 Mar 1999 20:32:35 -0600 +Subject: making py modules with C +Message-ID: <021101be7343$36381240$8f3dfc80@spkydomain> +Content-Length: 1294 +X-UID: 6 + +Spam detection software, running on the system "albatross.python.org", has +identified this incoming email as possible spam. The original message +has been attached to this so you can view it (if it isn't spam) or label +similar future email. If you have any questions, see +the administrator of that system for details. + +Content preview: I don't know about the make but I can point out a few syntax + errors. ----- Original Message ----- From: "Shaun Hogan" + To: "python" Sent: Monday, March 20, 2000 4:56 AM Subject: + making py modules with C [...] + +Content analysis details: (5.7 points, 5.0 required) + + pts rule name description +---- ---------------------- -------------------------------------------------- + 1.4 NO_DNS_FOR_FROM DNS: Envelope sender has no MX or A DNS records + 2.0 FH_DATE_IS_19XX The date is not 19xx. + 2.3 DATE_IN_PAST_96_XX Date: is 96 hours or more before Received: date + + +-------------- next part -------------- +An embedded message was scrubbed... +From: "David Fisher" +Subject: Re: making py modules with C +Date: Sat, 20 Mar 1999 20:32:35 -0600 +Size: 3327 +URL: + + diff --git a/demo/ermis-f/python_m/cur/0007 b/demo/ermis-f/python_m/cur/0007 new file mode 100644 index 00000000..a5188cf3 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0007 @@ -0,0 +1,37 @@ +From: python at rose164.wuh.wustl.edu (David Fisher) +Date: Sun, 21 Mar 1999 10:37:41 -0600 +Subject: Importing "Modules" +Message-ID: <007d01be73b9$38fb7460$573dfc80@spkydomain> +Content-Length: 1353 +X-UID: 7 + +Spam detection software, running on the system "albatross.python.org", has +identified this incoming email as possible spam. The original message +has been attached to this so you can view it (if it isn't spam) or label +similar future email. If you have any questions, see +the administrator of that system for details. + +Content preview: ----- Original Message ----- From: "Adrian Eyre" + To: "JJ" ; Sent: Tuesday, March + 21, 2000 5:45 AM Subject: RE: Importing "Modules" > > Constants.pyc > > [snip] + > > Call this file "Constants.py". The .pyc will be generated for you. > + [...] + +Content analysis details: (5.7 points, 5.0 required) + + pts rule name description +---- ---------------------- -------------------------------------------------- + 1.4 NO_DNS_FOR_FROM DNS: Envelope sender has no MX or A DNS records + 2.0 FH_DATE_IS_19XX The date is not 19xx. + 2.3 DATE_IN_PAST_96_XX Date: is 96 hours or more before Received: date + + +-------------- next part -------------- +An embedded message was scrubbed... +From: "David Fisher" +Subject: Re: Importing "Modules" +Date: Sun, 21 Mar 1999 10:37:41 -0600 +Size: 3255 +URL: + + diff --git a/demo/ermis-f/python_m/cur/0008 b/demo/ermis-f/python_m/cur/0008 new file mode 100644 index 00000000..dca1dd17 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0008 @@ -0,0 +1,37 @@ +From: python at rose164.wuh.wustl.edu (David Fisher) +Date: Wed, 17 Mar 1999 09:31:02 -0600 +Subject: Code basics +Message-ID: <011901be708b$41ebf3a0$3f3dfc80@spkydomain> +Content-Length: 1432 +X-UID: 8 + +Spam detection software, running on the system "albatross.python.org", has +identified this incoming email as possible spam. The original message +has been attached to this so you can view it (if it isn't spam) or label +similar future email. If you have any questions, see +the administrator of that system for details. + +Content preview: Hi JJ, You indicate a block with indentation. Like so: while + notDone: chip = self.getNumberOfSomething() if chip == 10: print "Tjohoo" + else: print "Oh no!" I changed the this to self because thats the usual way + of calling an instance method. Just pretend there's a class floating just + off screen that this is inside of. [...] + +Content analysis details: (5.3 points, 5.0 required) + + pts rule name description +---- ---------------------- -------------------------------------------------- + 1.4 NO_DNS_FOR_FROM DNS: Envelope sender has no MX or A DNS records + 2.0 FH_DATE_IS_19XX The date is not 19xx. + 2.3 DATE_IN_PAST_96_XX Date: is 96 hours or more before Received: date +-0.4 AWL AWL: From: address is in the auto white-list + + +-------------- next part -------------- +An embedded message was scrubbed... +From: "David Fisher" +Subject: Re: Code basics +Date: Wed, 17 Mar 1999 09:31:02 -0600 +Size: 2336 +URL: + diff --git a/demo/ermis-f/python_m/cur/0009 b/demo/ermis-f/python_m/cur/0009 new file mode 100644 index 00000000..d489648c --- /dev/null +++ b/demo/ermis-f/python_m/cur/0009 @@ -0,0 +1,29 @@ +From: mail at to.me (Usenet User) +Date: 28 Apr 1999 05:53:36 GMT +Subject: GUI other than Tkinter (TVision?) +References: <3721567f.1748033@news> <7g1a8h$fae$1@Starbase.NeoSoft.COM> +Message-ID: <8DB68CFE2HolyMama@bbinews.netvigator.com> +X-UID: 9 + +Anyone interested in wrap this TVision with python? +http://www.geocities.com/SiliconValley/Vista/6552/tvision.html + +Turbo Vision is the good old TUI (Text User Interface) we +used in Turbo C++ and it is GPLed. It is written in C++ and maybe someone +want to wrap it with python. + +========== +What's Turbo Vision? + +Turbo Vision (TVision for short) is a TUI (Text User Interface) that +implements the well known CUA widgets. With TVision you can create an +intuitive text mode application, intuitive means it will have CUA like +interface (check boxes, radio buttons, push buttons, input lines, pull +-down menues, status bars, etc.). All the people acustomed to the +Windows, MacOS, OS/2, Motif, GTK, etc. interfaces will understand the +interface at first sight. +=========== + + + + diff --git a/demo/ermis-f/python_m/cur/0010 b/demo/ermis-f/python_m/cur/0010 new file mode 100644 index 00000000..b685f3e5 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0010 @@ -0,0 +1,51 @@ +From: mcannon at 21stcentury.net (Michael J. Cannon) +Date: Mon, 12 Apr 1999 23:40:19 -0500 +Subject: Python and Nutcracker +References: <370B62F2.93D76301@oi42.kwu.siemens.de> +Message-ID: <3712CAB2.77A5AF2B@21stcentury.net> +Content-Length: 1650 +X-UID: 10 + +Dr Tschammer: + +Speaking from experience, both in supporting (independently of +DataFocus) and porting, all I can say is be careful of the I/O and +exception handling in the Nutcracker, especially when addressing issues +involved in Winsock and calls to any messaging .dll's or libraries. +Also, your users will have to disable the Nutcracker service manually +when doing backups from NT databases on the server (especially SQL +server and Oracle) and then manually restart, as cron and at -type calls +are problematic with the Nutcracker services running. Finally, license +WinBatch for your customers/users as they will need it. + +Personally, I have given up on Nutcracker as support is both expensive +and a nightmare of frustrated users. My preferred platform is now Java +(via javat) or a mix of c (GNU C or C+/++) and python. + +For a taste of what you're in for as far as support, check out the EDI-L +mailing list and watch for messages on Harbinger's TLE product (formerly +UNIX PREMENOS), or see if you can't get in contact with someone who will +honestly critique NUWC's efforts (prominently featured on the DataFocus +site). + +My feeling is that Nutcracker was a good idea with a rushed +implementation. With all the faults of NT, to depend on a set of +libraries existing as a service, poorly implemented, is asking for +trouble. + +"Dr. Armin Tschammer" wrote: + +> Hi, +> Has anyone experience with Python and Nutcracker ? +> We are using embedded Python in our application which +> is developed under HPUX. +> We are now porting our application to Windows NT +> with the help of the Nutcracker library. +> Has anyone already done such stuff ? +> +> Armin + + + + + diff --git a/demo/ermis-f/python_m/cur/0011 b/demo/ermis-f/python_m/cur/0011 new file mode 100644 index 00000000..a6a1aa29 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0011 @@ -0,0 +1,108 @@ +From: faassen at pop.vet.uu.nl (Martijn Faassen) +Date: Thu, 22 Apr 1999 19:49:24 +0200 +Subject: Pointers to variables +References: <19990422121403.A279051@vislab.epa.gov> +Message-ID: <371F6124.48EA9794@pop.vet.uu.nl> +Content-Length: 3214 +X-UID: 11 + +Randall Hopper wrote: +> +> This doesn't work: +> +> for ( var, str ) in [( self.min, 'min_units' ), +> ( self.max, 'max_units' )]: +> if cnf.has_key( str ): +> var = cnf[ str ] +> del cnf[ str ] +> +> It doesn't assign values to self.min, self.max (both integers). The values +> of these variables are inserted into the tuples and not references to the +> variables themselves, which is the problem. +> +> How can I cause a reference to the variables to be stored in the tuples +> instead of their values? + +Hi there, + +I've been trying to understand the purpose of the code in your fragment +and your question for a minute or so, but I'm not entirely sure I get it +yet. + +I'm assuming what you want is to get 'cnf[str]' assigned to self.min or +self.max. + +What you could do is something like this: + + for str in ('min_units', 'max_units'): + if cnf.has_key(str): + setattr(self, str, cnf[str]) + del cnf[str] + +Tuples, by the way are immutable, so you can't change what values their +elements point to after they've been created (though if these values +point to other things themselves you can change that). That is, you +can't do this: + + foo = (value1, value2) + foo[0] = "hey" + +But, if you'd use a mutable list, you still run into trouble. If you say +this: + + mylist = [None] # list with a single element +None + variable_i_want_to_change = "Foo" # a variable I want to +change + mylist[0] = variable_i_want_to_change # okay, mylist[0] points to +same data + mylist[0] = "Bar" # now mylist[0] points to +different data + +then 'variable_i_want_to_change' won't change. You've simply changed +what value mylist[0] points at. This is because a string (and integers +etc) are immutable values in Python. If you use a mutable value such as +a dictionary, you get this: + + mylist = [None] + variable_i_want_to_change = {} + mylist[0] = variable_i_want_to_change + mylist[0]["some key"] = "bar" # indeed changes +variable_i_want_to_change! + # mylist[0] = "Bar" -- doesn't work, makes mylist[0] point elsewhere + +I suspect I'm making things sound horribly complicated when they aren't +really. I can keep all this in my head easily, it's just hard +communicating it. I can understand the confusion with pointers from C, +but note that this is the actual semi-equivalent C code (of the first +fragment, not the dict one, and using ints instead of strings): + +/* Initialize the variables, assume easy allocate functions which do all +the + malloc() calls I don't want to figure out right now */ +int** mylist = allocate_list(); +*mylist[0] = 0; +/* now we have a list with a pointer to an int value, which is 0 */ + +int* variable_i_want_to_change = allocate_int(); +*variable_i_want_to_change = 1; +/* now we have a variable which points to an int value, which is 1 */ + +*mylist[0] = *variable_i_want_to_change; +/* now the data mylist[0] points at becomes 1 too */ + +*mylist[0] = 2; +/* now the data mylist[0] points at becomes 2 */ + +/* has the data *variable_i_want_to_change changed? no. I hope! :)*/ + +I don't expect this explained a lot. I feel like Tim Peters somehow... +:) + +Regards, + +Martijn + + + + diff --git a/demo/ermis-f/python_m/cur/0012 b/demo/ermis-f/python_m/cur/0012 new file mode 100644 index 00000000..b1e939fa --- /dev/null +++ b/demo/ermis-f/python_m/cur/0012 @@ -0,0 +1,14 @@ +From: tville at earthlink.net (susan e paolini) +Date: Wed, 14 Apr 1999 13:01:30 -0400 +Subject: what do you do with Python +Message-ID: <3714C9EA.86C0A4E@earthlink.net> +X-UID: 12 + +I never see jobs with Python advertised so what is it that Python does? +Thanks for the advice + + + + + + diff --git a/demo/ermis-f/python_m/cur/0013 b/demo/ermis-f/python_m/cur/0013 new file mode 100644 index 00000000..d0bf7361 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0013 @@ -0,0 +1,20 @@ +From: roy at popmail.med.nyu.edu (Roy Smith) +Date: Thu, 29 Apr 1999 14:02:40 -0400 +Subject: padding strings +Message-ID: +X-UID: 13 + +Given a string, I want to generate another string which is exactly N +characters long. If the first string is less than N, I want to blank-pad +it. If the first string is greater than N, I want to truncate it. + +What's the most straight-forward way to do that? + +-- +Roy Smith +New York University School of Medicine + + + + + diff --git a/demo/ermis-f/python_m/cur/0014 b/demo/ermis-f/python_m/cur/0014 new file mode 100644 index 00000000..33cfd65b --- /dev/null +++ b/demo/ermis-f/python_m/cur/0014 @@ -0,0 +1,23 @@ +From: larsga at ifi.uio.no (Lars Marius Garshol) +Date: 06 Apr 1999 07:33:09 +0200 +Subject: SNMPy update +References: <7e1hiq$a71$1@Starbase.NeoSoft.COM> <7ear25$ksf$1@news-sj-3.cisco.com> <14089.11820.416453.80124@bitdiddle.cnri.reston.va.us> +Message-ID: +X-UID: 14 + +* Jeremy Hylton +| +| expect that I'd want to release it given the export control hassles. +| However, it seemed clear to me that an ASN.1 compiler could be +| written to generate the encode/decode routines. If someone is +| interested in that, I've got some design notes and rough code on how +| to do the encode/decode and on how to build a backend for SNACC. + +I'd be interested in that. I've been thinking of doing a pure-Python +LDAP client. + +--Lars M. + + + + diff --git a/demo/ermis-f/python_m/cur/0015 b/demo/ermis-f/python_m/cur/0015 new file mode 100644 index 00000000..fbb0da52 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0015 @@ -0,0 +1,105 @@ +From: sweeting at neuronet.com.my (sweeting at neuronet.com.my) +Date: Sun, 25 Apr 1999 20:11:31 GMT +Subject: converting perl to python - simple questions. +References: <000001be8f3e$eea9c3c0$d39e2299@tim> +Message-ID: <7fvstg$nqo$1@nnrp1.dejanews.com> +Content-Length: 3248 +X-UID: 15 + + +> > Anyway, since I know that there are a few ex-perlmongers on the list, +> > would somebody be so kind as to confirm whether I've translated +> > the following code snippets correctly : +> > +> > a) Perl's "defined". +> > [perl] +> > if (defined($x{$token}) +> > +> > [python] +> > if (x.has_key(token) and x[token]!=None) : +> +> If should be enough to do +> +> if x.has_key(token): +> +> under the probably-correct theory that the Perl is just asking "does hash +> 'x' have key 'token'?" "None" is a specific valid value, not at all +> "undefined", so checking x[token] against None doesn't make sense unless +> you've established your own consistent program-wide convention of using None +> to *mean* something like undefined. Which is dicey. After e.g. "del +> x[token]", a reference to x[token] doesn't yield None, it raises the +> KeyError exception. + +For years, I've been thinking of "None" in Python as "null" in javascript, +meaning "no value set" and so it was actually quite interesting to see that +Perl has "exists" and "defined" functions for dictionaries.... I had +translated "exists($dictionary{$token})" into "dictionary.has_key(token)" +and hence went overboard when I translated "defined(...)" + +Anyway, from testing it does appear that both defined() and exists() +can be simply replaced with dico.has_key(token) in my scripts. + + +> > b) RE's. +> > [perl] +> > if ($mytext !~ /^\s$/) +> > +> > [python] +> > if not (re.match('^\s$'), mytext) +> +> Hmm. The Perl says "if mytext isn't a single whitespace character", which +> is an odd thing to check! If that's the intent, fine. + +Yes, loads of double-byte character processing ... + +> Python's "match" +> already constrains the search to begin at the start of the string, so the +> leading "^" isn't needed (use Python's "search" if don't want that +> constraint). + +aaaah - subtle. Thanks. + +>So: +> +> if not re.match(r"\s$", mytext): +> +> Get in the habit of using r-strings for writing regexps; they'll make your +> backslash life much easier. + +Thank you for pointing that out - the perl stuff's been screwing +with my head and making me confused, \s being ok in that language. + +> Another thing to note is that high-use regexps can be compiled, and if +> they're always used in the same way (match vs search) you can capture that +> choice too. So this may be more appropriate: +> +> is_single_whitespace = re.compile(r"\s$").match +> +> while whatever: +> ... +> if not is_single_whitespace(mytext): +> ... +> ... + +Thank you very much - I'd read the excellent howto on python.org and that +described this too. I chose not to compile just for clarity since I'm still +trying to work out if I've translated the code from perl to python +correctly. But I will optimise later... + +> Hoisting the regexp compilation out of the loop can be a substantial win. +> +> > Since I know neither perl nor chinese, it would be nice if somebody +> > could help me remove one of the variables in my debugging. +> +> native-speakers-of-both-say-chinese-is-easier-to-read-ly y'rs - tim + +after today, i'd be inclined to agree :) + +chas + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/0016 b/demo/ermis-f/python_m/cur/0016 new file mode 100644 index 00000000..6b11058d --- /dev/null +++ b/demo/ermis-f/python_m/cur/0016 @@ -0,0 +1,110 @@ +From: parkw at better.net (William Park) +Date: Wed, 28 Apr 1999 15:20:42 -0400 +Subject: HTML "sanitizer" in Python +In-Reply-To: ; from Scott Stirling on Wed, Apr 28, 1999 at 12:49:55PM -0400 +References: +Message-ID: <19990428152042.A708@better.net> +Content-Length: 4007 +X-UID: 16 + +On Wed, Apr 28, 1999 at 12:49:55PM -0400, Scott Stirling wrote: +> Hi, +> +> I am new to Python. I have an idea of a work-related project I want +> to do, and I was hoping some folks on this list might be able to +> help me realize it. I have Mark Lutz' _Programming Python_ book, +> and that has been a helpful orientation. I like his basic packer +> and unpacker scripts, but what I want to do is something in between +> that basic program and its later, more complex manifestations. +> +> I am on a Y2K project with 14 manufacturing plants, each of which +> has an inventory of plant process components that need to be tested +> and/or replaced. I want to put each plant's current inventory on +> the corporate intranet on a weekly or biweekly basis. All the plant +> data is in an Access database. We are querying the data we need and +> importing into 14 MS Excel 97 spreadsheets. Then we are saving the +> Excel sheets as HTML. The HTML files bloat out with a near 100% +> increase in file size over the original Excel files. This is +> because the HTML converter in Excel adds all kinds of unnecessary +> HTML code, such as for every single +> cell in the table. Many of these tables have over 1000 cells, and +> this code, along with its accompanying closing FONT tag, add up +> quick. The other main, unnecessary code is the ALIGN="left" +> attribute in tags (the default alignment _is_ left). The +> unnecessary tags are consistent and easy to identify, and a routine +> sh! +> ould be writable that will automate the removal of them. +> +> I created a Macro in Visual SlickEdit that automatically opens all +> these HTML files, finds and deletes all the tags that can be +> deleted, saves the changes and closes them. I originally wanted to +> do this in Python, and I would still like to know how, but time +> constraints prevented it at the time. Now I want to work on how to +> create a Python program that will do this. Can anyone help? Has +> anyone written anything like this in Python already that they can +> point me too? I would really appreciate it. +> +> Again, the main flow of the program is: +> +> >> Open 14 HTML files, all in the same folder and all with the .html +> >> extension. Find certain character strings and delete them from +> >> the files. In one case (the tags) it is easier to find the +> >> whole tag with attributes and then _replace_ the original tag +> >> with a plain . Save the files. Close the files. Exit the +> >> program. + +Hi Scott, + +I shall assume that a tag occurs in one line. Try 'sed', + for i in *.html + do sed -e 's///g" $i > /tmp/$i && mv /tmp/$i $i + done +or, in Python, + for s in open('...', 'r').readlines(): + s = string.replace('', '', s) + print string.strip(s) + +If tag spans over more than one line, then read the file in +whole, like + for s in open('...', 'r').read(): + +If the tag is not consistent, then you may have to use regular +expression with 're' module. + +Hopes this helps. +William + + +> +> More advanced options would be the ability for the user to set +> parameters for the program upon running it, to keep from hard-coding +> the find and replace parms. + +To use command line parameters, like + $ cleantd 'ALIGN="left"' +change to + s = string.replace('' % sys.argv[1], '', s) + +> +> OK, thanks to any help you can provide. I partly was turned on to +> Python by Eric Raymond's article, "How to Become a Hacker" (featured +> on /.). I use Linux at home, but this program would be for use on a +> Windows 95 platform at work, if that makes any difference. I do +> have the latest Python interpreter and editor for Windows here at +> work. +> +> Yours truly, +> Scott +> +> Scott M. Stirling +> Visit the HOLNAM Year 2000 Web Site: http://web/y2k +> Keane - Holnam Year 2000 Project +> Office: 734/529-2411 ext. 2327 fax: 734/529-5066 email: sstirlin at holnam.com +> +> +> -- +> http://www.python.org/mailman/listinfo/python-list + + + + diff --git a/demo/ermis-f/python_m/cur/0017 b/demo/ermis-f/python_m/cur/0017 new file mode 100644 index 00000000..5f251411 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0017 @@ -0,0 +1,43 @@ +From: aa8vb at vislab.epa.gov (Randall Hopper) +Date: Sat, 17 Apr 1999 15:23:44 GMT +Subject: Bug with makesetup on FreeBSD +In-Reply-To: <19990416215633.C2020@ipass.net>; from Randall Hopper on Fri, Apr 16, 1999 at 09:56:33PM -0400 +References: <19990416143607.B1546743@vislab.epa.gov> <19990416215633.C2020@ipass.net> +Message-ID: <19990417112344.A1624668@vislab.epa.gov> +X-UID: 17 + +Andrew Csillag: +|Randall Hopper wrote: +|> Andrew Csillag: +|> |makesetup in Python 1.5.1 and 1.5.2 bombs on lines in the Setup file +|> |that use backslash continuation to break a module spec across lines on +|> |FreeBSD. +|> +|> BTW FWIW, I just built 1.5.2 last night on 3.0-RELEASE using the 1.5.2c1 +|> port. Worked fine. But it may not invoke makesetup under the hood. +| +|It does invoke makesetup (that's how the Makefile in Modules gets +|written). I'm also running FreeBSD 2.2.8, so it may be a bug in /bin/sh +|that has been subsequently fixed... The quick test is to try this on +|your 3.0 machine +| +|$ read line +|some text here\ +| +|On my 2.2.8 machine after I hit return after the \, I get a command line +|prompt, not a "blank prompt" that would mean that the read wasn't done. + +It must be something else then, because here with stock Bourne shell: + + |$ read line + |some text here\ + |$ echo $line + |some text here\ + +I get the same behavior you describe, but no build breakage. + +Randall + + + + diff --git a/demo/ermis-f/python_m/cur/0018 b/demo/ermis-f/python_m/cur/0018 new file mode 100644 index 00000000..cecee647 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0018 @@ -0,0 +1,55 @@ +From: wdrake at my-dejanews.com (wdrake at my-dejanews.com) +Date: Fri, 30 Apr 1999 18:54:25 GMT +Subject: Oracle Call Interface +References: <7gb3hn$lse$1@nnrp1.dejanews.com> <3729ADDA.8E51C1D0@palladion.com> +Message-ID: <7gcu8v$8gp$1@nnrp1.dejanews.com> +Content-Length: 1854 +X-UID: 18 + +I was interested in using Oracle's Advanced Queuing (AQ), specifically the +asynchronous event notification features. + +Thanks + +In article <3729ADDA.8E51C1D0 at palladion.com>, + Tres Seaver wrote: +> Jeffrey Chang wrote: +> > +> > > If anyone has experience writing applications directly to the Oracle Call +> > > Interface (OCI), in Python or JPython please send me examples or +references on +> > > how to do it. +> > +> > Yuck! What are you planning to do? Do you really really need to write +> > directly to the OCI or can you use one of the available Oracle extension +> > modules? +> > +> > About a year ago, I used the oracledb module from Digital Creations with +> > Oracle7. It's very nice, but not optimized, and thus slow for large +> > queries. Since then, Digital Creations has made DCOracle +> > (http://www.digicool.com/DCOracle/; their commercial extension module) +> > open source, so I guess that will replace oracledb. I haven't looked at +> > it, but according to the FAQ, it's "much faster." +> > +> > I strongly advise you to use an extension module or JDBC if at all +> > possible. Writing to the OCI is extremely ugly -- all the stuff we try to +> > avoid by using python! +> +> ODBC/JDBC solutions suffer from "least-common-denominator" symptom; one can't +> easily exploit Oracleisms. I haven't played with DCOracle yet, but wrapping +OCI +> into a nice Pythonic package would be a big win in some situations (passing +> array parameters to stored procedures is the one I most often want). +> +> -- +> ========================================================= +> Tres Seaver tseaver at palladion.com 713-523-6582 +> Palladion Software http://www.palladion.com +> + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/0019 b/demo/ermis-f/python_m/cur/0019 new file mode 100644 index 00000000..fbe10858 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0019 @@ -0,0 +1,54 @@ +From: tim_one at email.msn.com (Tim Peters) +Date: Sun, 11 Apr 1999 02:15:54 GMT +Subject: Python 2.0 compatibility +In-Reply-To: +References: +Message-ID: <000401be83c1$3a66e060$7fa22299@tim> +Content-Length: 1985 +X-UID: 19 + +[Paranoid User] +> We have selected Python as the scripting language for the next +> generation of one of our embedded systems. + +Good choice! Take the opportunity to expand it to all of your systems. + +> This is a very fast-track project scheduled to ship near the end of +> the first quarter of 2000. + +In Internet time, that's about a century from now; but in Python time, it's +just the early part of next year . + +> I ran across a quote that said something to the effect that Python 2 will +> be incompatible with Python 1. Before I make a decision as to whether we +> freeze with Python 1.5.2, or migrate to Python 2 when it is released, I +> need to find out the extent of truthfulness in the "quote". +> +> So, if anyone in-the-know about Python 2 could let me know the proposed +> extent of its compatibility with 1.5.2 I would really appreciate it. + +If anything concrete is known about Python2, it's inside Guido's inscrutable +head. Don't worry about it. Since it doesn't yet exist (nor even a wisp of +a sketch of an outline of a design document), it's all speculation. + +My guess is it will end up being more compatible than most dare to hope -- +or to fear <0.7 wink>. By and large, the only suggestions Guido has seemed +especially keen about are considered by many to be legitimate design errors +in Python1 (the rift between types and classes is a clear example of that; +that e.g. 3/2 returns 1 instead of 1.5 is a controversial example). + +It doesn't much matter for you, though, since Python 1.6 will still be part +of the 1.x line, and won't come out before the end of this year. If the +much-later-still Python2 does turn out to be wildly incompatible, there are +enough people using the Python1 line that someone other than Guido is likely +to take over its maintenance (even if not active future development) -- and +*certain* to take it over if enough companies care enough to pay for that +service. + +speaking-for-the-professional-prostitutes-of-the-world-ly y'rs - tim + + + + + + diff --git a/demo/ermis-f/python_m/cur/0020 b/demo/ermis-f/python_m/cur/0020 new file mode 100644 index 00000000..9e5b9155 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0020 @@ -0,0 +1,33 @@ +From: paul at prescod.net (Paul Prescod) +Date: Thu, 29 Apr 1999 19:00:33 GMT +Subject: padding strings +References: +Message-ID: <3728AC50.9085F2C0@prescod.net> +X-UID: 20 + +Roy Smith wrote: +> +> Given a string, I want to generate another string which is exactly N +> characters long. If the first string is less than N, I want to blank-pad +> it. If the first string is greater than N, I want to truncate it. +> +> What's the most straight-forward way to do that? + +How about this: + +def mypad( s, num ): + return string.ljust( s, num )[:num] + +-- + Paul Prescod - ISOGEN Consulting Engineer speaking for only himself + http://itrc.uwaterloo.ca/~papresco + +"Microsoft spokesman Ian Hatton admits that the Linux system would have +performed better had it been tuned." +"Future press releases on the issue will clearly state that the research +was sponsored by Microsoft." + http://www.itweb.co.za/sections/enterprise/1999/9904221410.asp + + + + diff --git a/demo/ermis-f/python_m/cur/0021 b/demo/ermis-f/python_m/cur/0021 new file mode 100644 index 00000000..9af12907 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0021 @@ -0,0 +1,18 @@ +From: janssen at parc.xerox.com (Bill Janssen) +Date: Wed, 21 Apr 1999 21:33:08 GMT +Subject: HTTP-NG Support? +In-Reply-To: <002201be8c08$1969e570$8b7125a6@cpda6686.mcit.com> +References: <002201be8c08$1969e570$8b7125a6@cpda6686.mcit.com> +Message-ID: +X-UID: 21 + +I've been using Python with HTTP-NG a lot, via ILU. ILU Python +implements the w3ng wire protocol and the w3mux protocol and most of the +type system -- the only thing missing is local objects, and I'm working +on them now. + +Bill + + + + diff --git a/demo/ermis-f/python_m/cur/0022 b/demo/ermis-f/python_m/cur/0022 new file mode 100644 index 00000000..47f5374f --- /dev/null +++ b/demo/ermis-f/python_m/cur/0022 @@ -0,0 +1,52 @@ +From: donn at u.washington.edu (Donn Cave) +Date: 26 Apr 1999 16:40:25 GMT +Subject: Emulating C++ coding style +References: <371F8FB7.92CE674F@pk.highway.ne.jp> <371F9D0C.4F1205BB@pop.vet.uu.nl> <7foe7r$15mi$1@nntp6.u.washington.edu> <37245184.3AADF34D@pop.vet.uu.nl> +Message-ID: <7g24tp$raa$1@nntp6.u.washington.edu> +Content-Length: 1536 +X-UID: 22 + +Martijn Faassen writes: +| Donn Cave wrote: +... +|> It's not much like C++ here, but it's uncanny how it reeks of Python! +|> Namespaces, references! +| +| Indeed. Not having used that class attribute trick often myself, I +| wasn't aware of this surprising behavior. I suppose in order to get the +| C++ behavior it's best to use a module global variable. + +Not at all, either way is fine - the class scope is just as good a place +as the module scope, for me it's the perfect place for things that are +specific to the class. + +It's the usage that you have to watch out for, and while there are some +perils for the unwary, in the long run it's also an opportunity to gain +a deeper understanding of how simple Python is. Same for module attributes - +common problem, someone imports a module attribute like + + from foo import shared + shared = 5 + +and then wonders, how come no change to the attribute as seen from other +modules. The right way to set to a module attribute - if you must do this +at all - is + + foo.shared = 5 + +and just the same for a class attribute (of class Foo): + + from foo import Foo + Foo.shared = 5 + +In general, you have the problem only when your usage doesn't reflect the +design. If it's really a class attribute, but you set it in the instance +scope, if it's really an external module attribute but you bind it into +the present module's scope during import. Python bites if you trick it. + + Donn Cave, University Computing Services, University of Washington + donn at u.washington.edu + + + + diff --git a/demo/ermis-f/python_m/cur/0023 b/demo/ermis-f/python_m/cur/0023 new file mode 100644 index 00000000..4374d73f --- /dev/null +++ b/demo/ermis-f/python_m/cur/0023 @@ -0,0 +1,31 @@ +From: xx_nospam at delorges.in-berlin.de (Jo Meder) +Date: 16 Apr 1999 17:07:59 +0200 +Subject: HTML Authentication with Python +References: <7f5iru$rlm@news.acns.nwu.edu> <14102.27498.772779.5941@bitdiddle.cnri.reston.va.us> <7f6577$8kp@news.acns.nwu.edu> <37171EDE.9DFD027A@quantisci.co.uk> +Message-ID: +X-UID: 23 + + +Stephen Crompton writes: + +[Excellent explanation of HTTP-Authentication snipped] + +If you still need to do the authentication yourself, e.g. because the +username/password combinations are held in a database that is not +supported by your Webserver: It can be done and how you do it depends +on the type of server you use. I have a working solution for Apache +(which works by (ab)using the rewrite-module) and a solution for Roxen +Challenger that I'll test in Real Life(tm) soon. + + + + Jo. + + +-- +xx_nospam at delorges.in-berlin.de +is a valid address - ist eine gueltige Adresse. + + + + diff --git a/demo/ermis-f/python_m/cur/0024 b/demo/ermis-f/python_m/cur/0024 new file mode 100644 index 00000000..da2a2908 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0024 @@ -0,0 +1,33 @@ +From: fredrik at pythonware.com (Fredrik Lundh) +Date: Tue, 13 Apr 1999 14:49:08 GMT +Subject: CVS module +References: <7evbjf$85f$1@anguish.transas.com> +Message-ID: <001d01be85bc$cd9e92e0$f29b12c2@pythonware.com> +X-UID: 24 + +Michael Sobolev wrote: +> My quick attempt to find something that would help me to cope with CVS files +> failed. Could anybody advise me whether such a module exist? Under "such a +> module" I mean something that permits to get the complete information about the +> given file: +> +> cvsfile = CVSFile () +> +> from pprint import pprint +> +> pprint (cvsfile.revisions) +> +> or something alike. + +maybe + + Demo/pdist/cvslib.py + +(in the Python source distribution) could be a start? + + + + + + + diff --git a/demo/ermis-f/python_m/cur/0025 b/demo/ermis-f/python_m/cur/0025 new file mode 100644 index 00000000..6d1a3901 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0025 @@ -0,0 +1,95 @@ +From: tim_one at email.msn.com (Tim Peters) +Date: Sat, 3 Apr 1999 06:26:17 GMT +Subject: disenchanted java user mumbles newbie questions +In-Reply-To: <3705980A.1C7E9512@swcp.com> +References: <3705980A.1C7E9512@swcp.com> +Message-ID: <000101be7d9a$e1ae88a0$879e2299@tim> +Content-Length: 3142 +X-UID: 25 + +[Alex Rice] +> 1) In the Python 1.5 Tutorial, sec. 9.2 "Python Scopes and Name Spaces" +> there is the following passage: + +> ... +> -- however, the language definition is evolving towards static name +> resolution, at ``compile'' time, so don't rely on dynamic name +> resolution! +> ... + +> Where can I read more about this move towards for compile time, static +> name resolution and the reasons for it. + +Best I can suggest is scouring years' worth of DejaNews. Most of it is +summarized in early postings to the Python Types-SIG, though +(http://www.python.org/, and follow the SIGS link at the top ...). + +"The reasons" are the same as everyone else's: a mix of efficiency and +compile-time-checked type safety. I'd say the Python thrust these days may +be more toward adding *optional* type decls, though. OTOH, nothing has +changed in this area of Python for > 5 years, so don't panic prematurely +. + +> For some reason I was envisioning Python as being less like Java and +> more like Objective-C or Smalltalk in terms of dynamic binding. + +Yes, it is. It's extreme, though. For example, in + +def sumlen(a, b, c): + return len(a) + len(b) + len(c) + +Python can't assume that "len" refers to the builtin function "len", or even +that all three instances of "len" refer to the same thing within a single +call (let alone across calls). As to what "+" may mean here, it's even +hairier. In effect, the current semantics require that Python look up every +non-local name and access path from scratch every time it (dynamically) hits +one. + +This leads to some pretty disgusting convolutions for speeding "inner +loops", in support of a generality that's wonderful to have but actually +*needed* by very little code. Because of a professional background in +compiler optimization, I'm supposed to be appalled by this . + +> 2) Which reminds me: does anyone have a URL for that Ousterhut (sp?) +> article at Sunlabs about Scripting languages and why scripting rulz and +> where he has a taxonomy of programming languages along 2 dimensions? +> Lost that bookmark and cannot find it again. + +It's one of the White Papers at: + + http://www.scriptics.com/scripting/white.html + + +> 3) What's the Python equivalent of depends.exe? --something to find what +> modules your script is depending upon? + +Suggest searching python.org and DejaNews and Starship for "freeze" and +"squeeze". + +> It seems like one would be able to create a very slim distribution if one +> needed an .exe, couple of .dll only a handful of .py files. + +Why do I suspect you're a Windows programmer ? The most advanced +Python distribution system for Win32 is likely Gordon McMillan's, available +for free at + + http://www.mcmillan-inc.com/install.html + +May also want to visit the Python DistUtils SIG. + +> A Java+Swing application can be 1-2 MB not including the VM! bloat--ed. + +Doubt you're going to get off much cheaper with Python + Tcl/Tk, although it +includes two complete language implementations. + +> What's a typical size of a bare-bones Python distribution? + +Download one, unpack it, and do "dir" . + +soon-even-light-bulbs-will-have-20Gb-hard-drives-ly y'rs - tim + + + + + + diff --git a/demo/ermis-f/python_m/cur/0026 b/demo/ermis-f/python_m/cur/0026 new file mode 100644 index 00000000..01c8416e --- /dev/null +++ b/demo/ermis-f/python_m/cur/0026 @@ -0,0 +1,26 @@ +From: boud at rempt.xs4all.nl (boud at rempt.xs4all.nl) +Date: Sun, 25 Apr 1999 19:03:05 GMT +Subject: GUI other than Tkinter +References: <3721567f.1748033@news> +Message-ID: +X-UID: 26 + +Russell Nelson wrote: +: mrfusion at bigfoot.com writes: +: +:> Well, I've just about given up on EVER getting Tkinter to work on my +:> Win98 machine. Is there any other GUI module that I can get that +:> doesn't require TCL/TK to be installed on my machine? Isn't there +:> something called GD? +: +: There's pygtk, which uses the gtk toolkit. +: + +On Windows 98? +-- + +Boudewijn Rempt | www.xs4all.nl/~bsarempt + + + + diff --git a/demo/ermis-f/python_m/cur/0027 b/demo/ermis-f/python_m/cur/0027 new file mode 100644 index 00000000..73cb1920 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0027 @@ -0,0 +1,29 @@ +From: justin at linus.mitre.org (Justin Sheehy) +Date: 23 Apr 1999 22:09:54 -0400 +Subject: Python too slow for real world +References: <372068E6.16A4A90@icrf.icnet.uk> <3720A21B.9C62DDB9@icrf.icnet.uk> <3720C4DB.7FCF2AE@appliedbiometrics.com> <3720C6EE.33CA6494@appliedbiometrics.com> +Message-ID: +X-UID: 27 + +mlh at idt.ntnu.no (Magnus L. Hetland) writes: + +> (And... How about builtin regexes in P2?) + +Um, why? I don't see any need at all for them to move from +module-status to core-language-status. + +The only way that I could understand the desire for it would be if one +wanted to write little scripts that were basically just some control +flow around regexes and string substitution. That is, something that +looked like most of the programs written in that other P language. ;-) + +In all seriousness, what reason do you have for making that +suggestion? I am willing to believe that there might be a good reason +to do so, but it certainly isn't immediately obvious. + +-Justin + + + + + diff --git a/demo/ermis-f/python_m/cur/0028 b/demo/ermis-f/python_m/cur/0028 new file mode 100644 index 00000000..dd7619bb --- /dev/null +++ b/demo/ermis-f/python_m/cur/0028 @@ -0,0 +1,39 @@ +From: tim_one at email.msn.com (Tim Peters) +Date: Thu, 8 Apr 1999 06:26:21 GMT +Subject: Crappy Software was Re: [OffTopic: Netscape] Re: How should +In-Reply-To: <1288614834-78399188@hypernet.com> +References: <1288614834-78399188@hypernet.com> +Message-ID: <000a01be8188$b7f56280$749e2299@tim> +Content-Length: 1037 +X-UID: 28 + +[Gordon McMillan, among others with Netscape vs IE experience] +> ... +> Having recently ported a sophisticated applet using JNI (Sun's new +> native interface) to JRI (older Netscape) and RNI (older IE), I too +> can kick and scream. +> [guess the outcome ] + +I'm no browser wizard -- just took a few stabs over the past year & a half +at writing some relatively simple Java applets, JavaScript and HTML for the +amusement of my family. No CSS, no frames, nothing at all even remotely +cutting-edge. One Netscape-using sister had dozens of problems with *all* +of these, most eventually determined to be cases of NS not meeting the +appropriate std, and-- far too often --crashing her machine. + +Fact is NS dropped the browser ball a couple years ago, then poked holes in +it, then attached industrial-strength vacuum cleaners on the off chance any +air remained. + +> ... +> When's the last time you closed a GUI from the file menu?? + +Hey, I'll close a stinking GUI any way I can . + +right-next-to-my-reboot-foot-pedal-ly y'rs - tim + + + + + + diff --git a/demo/ermis-f/python_m/cur/0029 b/demo/ermis-f/python_m/cur/0029 new file mode 100644 index 00000000..7b9cafce --- /dev/null +++ b/demo/ermis-f/python_m/cur/0029 @@ -0,0 +1,50 @@ +From: mwh21 at cam.ac.uk (Michael Hudson) +Date: 18 Apr 1999 01:09:48 +0100 +Subject: Plugins, or selecting modules to import at runtime +References: <924379180.825429211@news.intergate.bc.ca> <924385178.948235039@news.intergate.bc.ca> +Message-ID: +Content-Length: 1063 +X-UID: 29 + +Gerald Gutierrez writes: +> Never mind. I just found the module "imp". + +That's waay overkill for what you need; the builtin function +__import__ will do nicely: + +Python 1.5.2 (#2, Apr 14 1999, 13:02:03) \ + [GCC egcs-2.91.66 19990314 (egcs-1.1.2 on linux2 +Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam +>>> __import__("sys") + +>>> s=__import__("sys") +>>> s + +>>> + +HTH + +Michael + +> Thanks. +> +> On Sat, 17 Apr 1999, Gerald Gutierrez wrote: +> >Hi all. +> > +> >I'd like to write a program in Python in which the user can select one of +> >several modules to execute through a function that has the same name in all the +> >modules. I don't believe "import" lets me pass it a string. There is also +> >reload(), but the module to reload must be previously imported. +> > +> >This is very similar to plugins like that used in Netscape, Photoshop and the +> >GIMP. +> > +> >Can someone please give me a hint? +> > +> >Thanks. +> > +> >Please forward replies to gutier at intergate.bc.ca. + + + + diff --git a/demo/ermis-f/python_m/cur/0030 b/demo/ermis-f/python_m/cur/0030 new file mode 100644 index 00000000..d92fb096 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0030 @@ -0,0 +1,45 @@ +From: tavares at connix.com (Chris Tavares) +Date: Sat, 10 Apr 1999 12:14:26 -0400 +Subject: pythonwin COM Update link out of date +References: <7em639$fto$1@m2.c2.telstra-mm.net.au> +Message-ID: <370F78E2.8EA7433E@connix.com> +Content-Length: 1039 +X-UID: 30 + +Mark Hammond wrote: + +> Bernhard Reiter wrote in message ... +> >http://www.python.org/ftp/python/pythonwin/pwindex.html#oadist +> > +> >Gives a bad link to the MS Microsoft Knowledge Base article Q164529. +> >The link is bad and I cannot relocate the article with the search +> >engine on that site and other methods... :( +> > +> >The closest I could get was: +> > http://support.microsoft.com/support/kb/articles/Q139/4/32.asp +> >from +> > http://support.microsoft.com/support/downloads/LNP195.asp +> > +> >Hmmmm.... is there a potential danger in installing oadist.exe? +> +> There _shouldnt_ be any danger! +> +> These days it is getting quite unnecessary. If you have (I believe) IE4 or +> Office 97, you are pretty up-to-date, and that includes many PCs these days. +> +> You could try installing the Python stuff, and see if it works. Also, see +> my other post this morning as to why the install may fail - try this out +> first. +> +> Mark. + +Another option is to download DCOM for Win95 - that'll get the user up to date +and then some! + +-Chris + + + + + + diff --git a/demo/ermis-f/python_m/cur/0031 b/demo/ermis-f/python_m/cur/0031 new file mode 100644 index 00000000..ea9e2600 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0031 @@ -0,0 +1,52 @@ +From: bernhard at alpha1.csd.uwm.edu (Bernhard Reiter) +Date: 18 Apr 1999 04:31:27 GMT +Subject: NT: win32api and win32ui import error +References: <7fbcpq$2jb$1@nnrp1.dejanews.com> +Message-ID: +Content-Length: 1230 +X-UID: 31 + +On Sun, 18 Apr 1999 01:33:46 GMT, hj_ka at my-dejanews.com wrote: +>I don't know whether this is also related: when I installed +>win32all-124.exe, I got a few warnings: +> +>"Registration of the (AXScript/Python Interpreter/Python Dictionary) +>failed. Installation will continue, but this server will require +>manual registration before it will function." + +I had the same warnung and also cannot run the win32 extentions. +(import win32com.client e.g. fails for me.) + +Mark Hammond suggested to update some DLLs and it might +very well be a problem related to old DLL version. +(I didn't manage for some reasons to update my DLLs here on my +Windows95 system, so I finally gave up. Any Windows Hacker with +experience in this speak up and offer help! ;-) ) + + Mark said, that the following dll and their versions might +be relevant: + +ole32.dll +oleaut32.dll +msvcrt.dll + +The following are used, but should be fine: +pywintypes15.dll +python15.dll +kernel32.dll +user32.dll + +You can check the version number in the explorer im C:windows/system +with properties. + +Maybe an upgrade package including these .DLLs from support.microsoft.com +can help. + + +Please report back, If you found a solution... + + Bernhard + + + + diff --git a/demo/ermis-f/python_m/cur/0032 b/demo/ermis-f/python_m/cur/0032 new file mode 100644 index 00000000..190387cb --- /dev/null +++ b/demo/ermis-f/python_m/cur/0032 @@ -0,0 +1,51 @@ +From: bill_seitz at my-dejanews.com (bill_seitz at my-dejanews.com) +Date: Thu, 15 Apr 1999 15:02:28 GMT +Subject: stupid Win-CGI getting started question +References: <7f0f0h$pfb$1@nnrp1.dejanews.com> <8DA86302Bduncanrcpcouk@news.rmplc.co.uk> <7f2no0$n80$1@nnrp1.dejanews.com> <8DA9637FEduncanrcpcouk@news.rmplc.co.uk> +Message-ID: <7f4v1u$jpd$1@nnrp1.dejanews.com> +Content-Length: 2001 +X-UID: 32 + +In article <8DA9637FEduncanrcpcouk at news.rmplc.co.uk>, + Duncan Booth wrote: + +> I didn't say it was impossible to run .py files as CGI, simply that I had +> problems getting it to work. Since my number one priority was not to take +> the web server off-line at all, there were limits to how far I could play +> around with it. I'm sure there must be some way to get it to work, but I +> got enough for my purposes. + +Gotcha. + +I did some more playing around. No success, but here's what I did/found: When +I try to call a .py file I get the "This server has encountered an internal +error which prevents it from fulfilling your request" message. The NES error +log shows: [15/Apr/1999:10:35:53] failure: for host 192.246.193.43 trying to +GET /pcgi/dntest.py, send-cgi reports: could not send new process (File Not +Found Error) [15/Apr/1999:10:35:53] failure: cgi_send:cgi_start_exec +d:\program files\python\lib\dntest.py failed + +If I rename the .py file to .cmd and call it with that name, it works fine. + +I'm defining a /pcgi/ path to point to the location of the python files, so +I'm not counting on the suffix to mean anything. All the various CGI folders +get mapped to object name="cgi", but again, since suffix is irrelevant, that +shouldn't be the problem. + +I went into mime.types and added the py extension to the cgi reference (note +that cmd is not in that extension list). Still get an error, but the log +changes to [15/Apr/1999:10:52:57] failure: for host 192.246.193.43 trying to +GET /pcgi/dntest.py, send-cgi reports: could not send new process (Error +Number is unknown) [15/Apr/1999:10:52:57] failure: cgi_send:cgi_start_exec +d:\program files\python\lib\dntest.py failed + +Does this suggest any clues? I've asked a friend who doesn't know Python but +knows Netscape pretty well. Will report back if he has any suggestions. + + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/0033 b/demo/ermis-f/python_m/cur/0033 new file mode 100644 index 00000000..1c8fd903 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0033 @@ -0,0 +1,30 @@ +From: garryh at att.com (Garry Hodgson) +Date: Fri, 9 Apr 1999 17:37:27 GMT +Subject: Is Python dying? +References: <7dos4m$usi$1@nnrp1.dejanews.com> <7e30fp$8vf$1@news1.rmi.net> <14085.18282.936883.727575@bitdiddle.cnri.reston.va.us> <7ectjd$516$1@srv38s4u.cas.org> <19990408075544.B983383@vislab.epa.gov> +Message-ID: <370E3AD7.16C48C5F@att.com> +X-UID: 33 + +Randall Hopper wrote: + +> I believe that was Fredrik Lundh . +> +> In shopping for Python books late last month, I happened upon his announced +> plan to write a Tkinter book. So I slipped him an e-mail query asking how +> the book was going and if he had an estimated timeframe (in case it was +> close to market), but I haven't received a response. I assume he's just +> busy like the rest of us. + +for what it's worth, fredrik has never replied to any of the mail i've +sent him. +your mileage may vary. + +-- +Garry Hodgson seven times down +garry at sage.att.com eight times up +Software Innovation Services +AT&T Labs - zen proverb + + + + diff --git a/demo/ermis-f/python_m/cur/0034 b/demo/ermis-f/python_m/cur/0034 new file mode 100644 index 00000000..e6bd05cf --- /dev/null +++ b/demo/ermis-f/python_m/cur/0034 @@ -0,0 +1,35 @@ +From: fdrake at cnri.reston.va.us (Fred L. Drake) +Date: Tue, 20 Apr 1999 13:18:38 GMT +Subject: Can't work this XDR out +In-Reply-To: <371C0CF7.2D1260D7@hons.cs.usyd.edu.au> +References: <371C0CF7.2D1260D7@hons.cs.usyd.edu.au> +Message-ID: <14108.32430.842541.785124@weyr.cnri.reston.va.us> +X-UID: 34 + +Matthew Robert Gallagher writes: + > Whilst trying to pack a list xdr packer asks for + > + > (list, pack_item) + > + > what is the pack_item can't work this out as there are no examples + +Matthew, + pack_item will typically be another method from the same packer +object. For example, to pack a list of ints, use this: + + import xdrlib + p = xdrlib.Packer() + p.pack_list([1, 2, 3], p.pack_int) + + I hope this helps. I'll add an example to the documentation. + + + -Fred + +-- +Fred L. Drake, Jr. +Corporation for National Research Initiatives + + + + diff --git a/demo/ermis-f/python_m/cur/0035 b/demo/ermis-f/python_m/cur/0035 new file mode 100644 index 00000000..a1cd1041 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0035 @@ -0,0 +1,35 @@ +From: holger at phoenix-edv.netzservice.de (Holger Jannsen) +Date: Thu, 22 Apr 1999 13:48:58 GMT +Subject: sort of multiple dictonaries +Message-ID: <371F28CA.2240BB7B@phoenix-edv.netzservice.de> +X-UID: 35 + +Hi there, + +perhaps a typical newbie-question: + +I've got a list of dictonaries like that: + +mydics=[{'sortit': 'no412', 'mode': 'nothing'}, +{'sortit': 'no112', 'mode': 'something'}, +{'sortit': 'no02', 'mode': 'something else'}] + +Is there an easy way to get that list sorted like that: + +def sortDictonary(aDictonary, theSortKey="sortit"): + .... + +Result have to be: + +mydics=[{'sortit': 'no02', 'mode': 'something else'}, +{'sortit': 'no112', 'mode': 'something'}, +{'sortit': 'no412', 'mode': 'nothing'}] + +Any hints? + +Ciao, +Holger + + + + diff --git a/demo/ermis-f/python_m/cur/0036 b/demo/ermis-f/python_m/cur/0036 new file mode 100644 index 00000000..35de19af --- /dev/null +++ b/demo/ermis-f/python_m/cur/0036 @@ -0,0 +1,38 @@ +From: justin at linus.mitre.org (Justin Sheehy) +Date: 29 Apr 1999 11:45:50 -0400 +Subject: Designing Large Systems with Python +References: <372599D6.C156C996@pop.vet.uu.nl> <7g4a3l$atk$1@news.worldonline.nl> +Message-ID: +X-UID: 36 + +David Steuber writes: + +> I would like better python support in XEmacs. There is a python +> mode, but I haven't seen anything about evaluating Python code +> ineteractivly the way you can with Lisp and elisp. + +The support for Python in XEmacs will obviously never be as good as +the support for emacs lisp. However, it is already about as good as +it is for other lispy things like clisp, scheme, etc. + +One can run a python interpreter in an emacs window. This can be +interacted with directly, or you can send code to it from a +python-mode buffer. It has served my needs fairly well. + +> -> ehh, Python? +> +> It looks interesting. It is more C like than Lisp like. + +Well, in the obvious syntactical sense, sure. + +I am comfortable in several dialects of Lisp, but find C to be No Fun. +I am rapidly becoming at home with Python. In many of the +less-immediately-obvious but very important ways, I find that Python +doesn't feel much like C at all. + +-Justin + + + + + diff --git a/demo/ermis-f/python_m/cur/0037 b/demo/ermis-f/python_m/cur/0037 new file mode 100644 index 00000000..493d43b6 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0037 @@ -0,0 +1,26 @@ +From: ruebe at aachen.heimat.de (Christian Scholz) +Date: Mon, 26 Apr 1999 20:12:12 +0000 +Subject: tzname problem +Message-ID: <3724C89C.256703D0@aachen.heimat.de> +X-UID: 37 + +Hi! + +I compiled and installed Python 1.5.2 on my Linux box. +But I have a problem when using tzname (well, actually Zope has): + +>>> from time import tzname +Traceback (innermost last): + File "", line 1, in ? +ImportError: cannot import name tzname +>>> + +Does anybody know why this happens? timemodule is included +of course.. + +best, + Christian + + + + diff --git a/demo/ermis-f/python_m/cur/0038 b/demo/ermis-f/python_m/cur/0038 new file mode 100644 index 00000000..53728a51 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0038 @@ -0,0 +1,127 @@ +From: gjohnson at showmaster.com (Tony Johnson) +Date: Fri, 23 Apr 1999 16:03:57 GMT +Subject: Python too slow for real world +In-Reply-To: <372068E6.16A4A90@icrf.icnet.uk> +References: <372068E6.16A4A90@icrf.icnet.uk> +Message-ID: <000401be8da2$e5172430$7153cccf@showmaster.com> +Content-Length: 3295 +X-UID: 38 + +I find python syntax less taxing then perl's (IE less lines) You may need +to check your python code and see how you can optimize it further... + +Tony Johnson +System Administrator +Demand Publishing Inc. + + +-----Original Message----- +From: python-list-request at cwi.nl [mailto:python-list-request at cwi.nl]On +Behalf Of Arne Mueller +Sent: Friday, April 23, 1999 7:35 AM +To: python-list at cwi.nl +Subject: Python too slow for real world + + +Hi All, + +first off all: Sorry for that slightly provoking subject ;-) ... + +I just switched from perl to python because I think python makes live +easyer in bigger software projects. However I found out that perl is +more then 10 times faster then python in solving the following probelm: + +I've got a file (130 MB) with ~ 300000 datasets of the form: + +>px0034 hypothetical protein or whatever description +LSADQISTVQASFDKVKGDPVGILYAVFKADPSIMAKFTQFAGKDLESIKGTAPFETHAN +RIVGFFSKIIGELPNIEADVNTFVASHKPRGVTHDQLNNFRAGFVSYMKAHTDFAGAEAA +WGATLDTFFGMIFSKM + +The word floowing the '>' is an identifier, the uppercase letters in the +lines following the identifier are the data. Now I want to read and +write the contens of that file excluding some entries (given by a +dictionary with identifiers, e.g. 'px0034'). + +The following python code does the job: + +from re import * +from sys import * + +def read_write(i, o, exclude): + name = compile('^>(\S+)') # regex to fetch the identifier + l = i.readline() + while l: + if l[0] == '>': # are we in new dataset? + m = name.search(l) + if m and exclude.has_key(m.group(1)): # excluding current +dataset? + l = i.readline() + while l and l[0] != '>': # skip this dataset + l = i.readline() + pass + o.write(l) + l = i.readline() + +f = open('my_very_big_data_file','r') # datafile with ~300000 records +read_write(f, stdout, {}) # for a simple test I don't exclude anything! + +It took 503.90 sec on a SGI Power Challange (R10000 CPU). An appropiate +perl script does the same job in 32 sec (Same method, same loop +structure)! + +Since I've to call this routine about 1500 times it's a very big +difference in time and not realy accaptable. + +I'd realy like to know why python is so slow (or perl is so fast?) and +what I can do to improove speed of that routine. + +I don't want to switch back to perl - but honestly, is python the right +language to process souch huge amount of data? + +If you want to generate a test set you could use the following lines to +print 10000 datasets to stdout: + +for i in xrange(1, 10001): + print +'>px%05d\nLSADQISTVQASFDKVKGDPVGILYAVFKADPSIMAKFTQFAGKDLESIKGTAPFETHAN\n\ +RIVGFFSKIIGELPNIEADVNTFVASHKPRGVTHDQLNNFRAGFVSYMKAHTDFAGAEAA\n\ +WGATLDTFFGMIFSKM\n' % i + +And if you don't believe me that perl does the job quicker you can try +the perl code below: + +#!/usr/local/bin/perl -w +open(IN,"test.dat"); +my %ex = (); +read_write(%ex); + +sub read_write{ + + $l = ; + OUTER: while( defined $l ){ + if( (($x) = $l =~ /^>(\S+)/) ){ + if( exists $ex{$x} ){ + $l = ; + while( defined $l && !($l =~ /^>(\S+)/) ){ + $l = ; + } + next OUTER; + } + } + print $l; + $l = ; + } +} + +Please do convince me being a python programmer does not mean being slow +;-) + + Thanks very much for any help, + + Arne + + + + + diff --git a/demo/ermis-f/python_m/cur/0039 b/demo/ermis-f/python_m/cur/0039 new file mode 100644 index 00000000..d38b5a3d --- /dev/null +++ b/demo/ermis-f/python_m/cur/0039 @@ -0,0 +1,35 @@ +From: akuchlin at cnri.reston.va.us (Andrew M. Kuchling) +Date: Fri, 23 Apr 1999 14:04:16 -0400 (EDT) +Subject: millisecond time accuracy +In-Reply-To: <3720A4A6.125DA1C7@OMIT_THIS.us.ibm.com> +References: <3720A4A6.125DA1C7@OMIT_THIS.us.ibm.com> +Message-ID: <14112.46141.974182.785300@amarok.cnri.reston.va.us> +X-UID: 39 + +Kevin F. Smith writes: +>Is there a way to measure time accurate to milliseconds? +> +>For example, by calling the time.time() function I get seconds. Is +>there a comparable function that I could use to measure interval times +>down to at least millisecond accuracy? + + Nothing portable. However, time.time() actually returns a +floating point number, and the Python implementation tries to use the +most precise function available in the C library. If your system +supports gettimeofday(), which has microsecond resolution, then +time.time() will return a floating point number with microsecond +precision. + + Note that precision is not the same as accuracy! Python just +uses the C library, so the accuracy or lack thereof is up to the +library implementation. + +-- +A.M. Kuchling http://starship.python.net/crew/amk/ +They dreamed the world so it always was the way it is now, little one. There +never was a world of high cat-ladies and cat-lords. + -- Dream, in SANDMAN #18: "A Dream of a Thousand Cats" + + + + diff --git a/demo/ermis-f/python_m/cur/0040 b/demo/ermis-f/python_m/cur/0040 new file mode 100644 index 00000000..2dc53b70 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0040 @@ -0,0 +1,47 @@ +From: ajung at sz-sb.de (Andreas Jung) +Date: Sun, 4 Apr 1999 14:35:47 GMT +Subject: Python on Apache and traceback +In-Reply-To: <7e4bta$ild$1@paperboy.owt.com>; from kj7ny@email.com on Sat, Apr 03, 1999 at 12:05:16AM -0800 +References: <7e4bta$ild$1@paperboy.owt.com> +Message-ID: <19990404163546.A3249@sz-sb.de> +Content-Length: 1344 +X-UID: 40 + +On Sat, Apr 03, 1999 at 12:05:16AM -0800, kj7ny at email.com wrote: +> Before you flame my socks off, I know this is NOT the right place to +> probably ask this question, but I guarantee you there is no where better to +> get the right answer. +> +> I am using Python on Apache on Win98. +> +> Has anyone figured out how to get at the traceback errors when using Python +> on Apache? They are not automatically returned to the browser as they are on +> IIS and PWS. + + +Around your code with a try/except clause and catch the +traceback in the except clause. You can get the traceback +by using the traceback module. Logging can be achieved by +writing the traceback to a file. + +I not sure if this is really neccessary because the traceback +of Python CGI scripts should be logged to the script or +error logfile of Apache. + +Happy Easter, +Andreas + +-- + _\\|//_ + (' O-O ') +------------------------------ooO-(_)-Ooo-------------------------------------- + Andreas Jung, Saarbr?cker Zeitung Verlag und Druckerei GmbH + Saarbr?cker Daten-Innovations-Center + Gutenbergstr. 11-23, D-66103 Saarbr?cken, Germany + Phone: +49-(0)681-502-1528, Fax: +49-(0)681-502-1509 + Email: ajung at sz-sb.de (PGP key available) +------------------------------------------------------------------------------- + + + + diff --git a/demo/ermis-f/python_m/cur/0041 b/demo/ermis-f/python_m/cur/0041 new file mode 100644 index 00000000..728a36b7 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0041 @@ -0,0 +1,28 @@ +From: spamfranke at bigfoot.de (Stefan Franke) +Date: Tue, 20 Apr 1999 17:29:43 GMT +Subject: unpickling an NT object in Solaris? +References: +Message-ID: <371cb8f0.64496430@news.omnilink.de> +X-UID: 41 + +On Tue, 20 Apr 1999 10:57:49 -0400, dozier at bellatlantic.net (Bill Dozier) wrote: + +>Hi, +> +>I created an object running python on NT and pickled it. I have no problem +>unpickling on NT, but when I ftp'd the file over to Solaris, I get an +>ImportError exception ("No module named __main__^M") when I try to +>unpickle it. +> + +Pickling uses a text format which should be platform independent. + +My guess: Did you transfer via FTP in text mode? In that case, line +endings get converted. "__main__^M" seems to point at this. + +Stefan + + + + + diff --git a/demo/ermis-f/python_m/cur/0042 b/demo/ermis-f/python_m/cur/0042 new file mode 100644 index 00000000..783c8fa3 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0042 @@ -0,0 +1,37 @@ +From: mwh21 at cam.ac.uk (Michael Hudson) +Date: 14 Apr 1999 16:58:00 +0100 +Subject: forking + stdout = confusion +References: <87n20caldg.fsf@spock.localnet.de> +Message-ID: +X-UID: 42 + +clarence at silcom.com (Clarence Gardner) writes: +> Clarence Gardner (clarence at silcom.com) wrote: +> : However, your first thought also works, with the same caveat about stderr. +> : stdin, stdout, and stderr all have the __xxx__ copy in the sys module +> : (which I was not aware of). +> +> Mea culpa. The os.close() *is* still necessary. Is there yet another +> copy of these file objects? I tried to find that function that returns +> the reference count, but don't see it in the manual. + +It's sys.refcount: + +Python 1.5.2 (#2, Apr 14 1999, 13:02:03) [GCC egcs-2.91.66 19990314 (egcs-1.1.2 on linux2 +Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam +>>> import sys +>>> sys.getrefcount (sys.stdout ) +5 + +Five! I don't know where all of those are... + +> -- +> -=-=-=-=-=-=-=-= +> Clarence Gardner +> AvTel Communications +> Software Products and Services Division +> clarence at avtel.com + + + + diff --git a/demo/ermis-f/python_m/cur/0043 b/demo/ermis-f/python_m/cur/0043 new file mode 100644 index 00000000..ef20a468 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0043 @@ -0,0 +1,22 @@ +From: zigron at jps.net (Zigron) +Date: Fri, 23 Apr 1999 12:54:57 -0700 +Subject: PythonWin/ActiveX-Script Question +Message-ID: <37214562@news1.jps.net> +X-UID: 43 + + I recently installed PythonWin/et al, and went into the +win32comext/axscript/demos/client/ie directory, and found that basically +none of the demos worked at alllllll. + After fiddling with 'foo2.html', I found that all the references to +'MyForm.whatever' or 'Form2.whatever' were resulting in NameErrors..and that +if I put 'window.' onto the front of all the references they then worked. + + I'm just wondering if that's how it's susposed to be? + +--Stephen + + + + + + diff --git a/demo/ermis-f/python_m/cur/0044 b/demo/ermis-f/python_m/cur/0044 new file mode 100644 index 00000000..774ca2ac --- /dev/null +++ b/demo/ermis-f/python_m/cur/0044 @@ -0,0 +1,41 @@ +From: phd at sun.med.ru (Oleg Broytmann) +Date: Fri, 9 Apr 1999 10:15:26 GMT +Subject: two questions +In-Reply-To: <370dbbe7.71248459@scout> +References: <370dbbe7.71248459@scout> +Message-ID: +X-UID: 44 + +On Fri, 9 Apr 1999, Chris... wrote: +> Since I am new to python (ver 1.5 under NT), these may be silly, +> anyhow: +> +> 1) How can I copy files with python? At first I planned to run the +> DOS-command "copy" from python, but couldn't find the right function. +> Second, I thought, there might be a python command to do it. Until +> now, I didn't succeed. + + Look into shutil.py module. You need copy2() function. + +> 2) Is there an way to mimic Perls +> perl -p -e s/pattern1/pattern2/ +> command line? + + Although you can run python -c "script", python usually intended for +scripts, not for perl-like one-liners. + +> Thanks a lot in advance +> +> bye +> Chris... +> + +Oleg. +---- + Oleg Broytmann National Research Surgery Centre http://sun.med.ru/~phd/ + Programmers don't die, they just GOSUB without RETURN. + + + + + diff --git a/demo/ermis-f/python_m/cur/0045 b/demo/ermis-f/python_m/cur/0045 new file mode 100644 index 00000000..98226c24 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0045 @@ -0,0 +1,198 @@ +From: morse at harborcom.net (Kevin Dahlhausen) +Date: Thu, 15 Apr 1999 14:07:53 GMT +Subject: overloading ( was Different methods with same name but different signature? ) - overloadinginpython.tar.gz (1/1) +References: <3716909C.D8D1B372@fedex.com> +Message-ID: <3715f2b9.74013415@mail.oh.verio.com> +Content-Length: 11579 +X-UID: 45 + +begin 644 overloadinginpython.tar.gz +M'XL(`##R%3<``^P\_7/;-K+]5?PK4+=I1)F2)?DCK15[)G&#2M_\1GTMW88V]D9;@_ZSW:V!MBRN;GS'>M_3:+T +M,\^%ES'VW54:W`OW4/__T>?LX]&;O?PFG`YZ0PM?CH]>[G6/-^9YMA$EOA=M +M1.%X0P-87A3MLB1B at N?"LN(DF^U:K1_;.-!FW>!2S"+6]=?763>_](+DAG73 +MA;A,8M9-V`<8>[>9%[:\].T;.J%5FL*PWYL'[P^?O'FS"8$&0_8/ZU6 +MJWO48_"O1R]R-B#35GU$:QC[T3S@&W*Z06];=JJ%P!**C at T_B2?A5/7W>M at K +M7PP2_5[^`,'X1J,B9$ZZL*P$6(,;L`XT +M^O`):U,H.W)IG3J)K,>S+,G0,EA6R_I/2^FWYVL]%8'^2G,\8/_9L\%`V__M +MS9TAV/_!<&?SF_W_*YX?E.%DSW,1A$GO-W=+;ZVKY,P +ML-DN"]I]V_K$TBR,Q:2]MAKVG_&:/6)W*]#!:!9*?.&#^)X0-@<&$$)$SPS` +M:R^:)[( +M3,.P`-:33ZM"@"?H:;[08C2I>JOU)/9FO)US\3NVVXWVHPJ3+P&9]N2;\?B3 +MCYE1?JTY'JK_;.ZH^L]FOS^0\?]@^YO__TN>29;,*LD_"V=ID at G6L:@K%Q"1 +M3LM&]27CEB46*5?=>]#0\Y-9&D:\G:VYY__M7JR[;?ICN[W.F at TQ<,`G;,K% +M>^Y%+[)IWO;@P]ZU4`0(%6`YOZ#7#$"PMVRACTF2,0]TGF'?KM42V0(^:3Q` +M>CUQ&>;J'?'UO#3E<=`NZ>S-/.%?MCV[-\V2>=H>V+:$UQ,60Z"=W_H\%;LK +M$`*2%6,]VU*+H`1`S%/@"8VW'?6FAP#D.'?+,A,9MR#T<3F?"(F<:]MV,"4R +MJE/E&&T?'0D/<(U at UP:,QJG^L@=QYXX%EA_W;YE<,-#1Q&&=^FXZYBXN;;O< +MSQBZFAEP3C at N3$8">Z-%&P8YC.:D[7;L=8.9!:)3D?4(5^,$?SI9^G_X+-];%8A[T^.CXT+4HA6=")_1]` +M;QE6EMF-ES-O+A(PRZ'O1=$"#$7,,PCC`C9>L%V$/@./$X63$)H^9FABP0?$ +M`3N*!<\FGL_9&SD$?(,\AL!!O_,L#Y.8#7I#UGXY#Z,`8 at J'O@HD3X"$'8SGS0E@!A,">+V@: +M_/2\21CS_^RKV`9[MLP[_.LR01&T at 0G8^YY2F3^M/+;Z;.-0 at A_4>2MC'H +M;PQ!^C9W!\]V!SO`:.^/B"_8X6W*?L0)5F#R)],E[?$3X!3NM9^`(+"8\T"* +MCQ=@GI2%WAB at HC"^PA"-=IN3V,E#HA`U"`(^^.R!&3XHAH!.0A@(2``;*BA@ +MOF&`(T`1EH,13>#!/H&7[BG"7D1Y4M*4SU,,%'%F)(]BMS$J(K:H8ZIY#*QD +M'P%S:RT`%8&)238*VZWX\.MD,;:`EX'Z4I]QO!U$DY[!!$,:$BTW_\XN35`T#:7)WE_# +MG7X\?BZQDPZF%#]/\3M+YH)!S*8CG6F5(H:BFS\::TW.PN16`VV-/'5D--J9 +MI+)8.(D\S!0_64I(0^!V'[E-'?!"?ZE!'<7!R+4ZM]DGMD:*=W.)CKA]W=U' +M*3\/+VR5MYNCG^1K#BM!NOO(&AH.-*ROJR^3*AH3@:-FNZN1Q>[HI+&4E?YC +MRL"2"(#A0?-B43%&AB%:L:`K)RF023>(A%=*`GIU22"$I8)""I(BI2`8?!S% +M($X9\[V<.^R&/]4A:$*ABR<(MPXX$"$B@%@#8FMR?L"2!`.5^6P,$05HN8P( +M'TO\/D>O%7=6B2$9]$XL=;PB>=0C^"P]'PQ_OAA9]XD52 at DLS9^E[;I`.;'- +M]@"E!BV$HMTQ04OOH23PSI1#?,F5A"%)SMK!DF(_H5P#;"F$;SV0S=B6'NHP +MR]PS+I2)@O=;WST!P@[Q(I&#V$Q1/?GM^/@1I75)6'.U'=)B5:4UOT=:>X\D +M,_<:K/RS9,4Q9"V5 at E.7E9HH?46Y*8.+]#\K.`.2&LG92PZ)RNGB`Q@%Q2C% +M3#(36$,%Z:K&,>[1R=&']D]RD(L?-F,G"63:NU)*@H3G\5/!;I+LBJ&P)#,. +M88P/:0D8?MC51H3`OLH#4'VLMJXI at F"Y*Q^@$>D at CXGO-$<>_L&328.$V(XY +M\*67 at X`AL![8OVMD-08.C1\JP +M03TT95L9S8:AJL?!@?"=X8LQ,%\Y,#<&GBT-_,Q%BM3%TPS, at _6,&+8 at XQYHA+=< +M15!6"@/I>0[-`$:D6D9V8WA(RKEB?J.XI>]/6:PIY^AD/)]'0ANSXNUT\9;/ +MW)/#CPW:X`S(-AAJWTO&KE)_4\M':L6G>`)4,1,J=I"PDNURZNZ^@R174.RIFJ +M:^[NJ[0)FG>VS';5V%Y*Q6PP4:B6[9VMCFDZ#!C;KF,Z[U_4)X859WSBQ\4N +MP!K_?G1R\/[P==M,*YE>:VF8RWZS^ZXB&KC_4BB\(-!"87BYPO>A8Z+CM7LR +M7^>>O#>U5XL995?7FHNU3INE(ZME%0&YW)[]/0S@]:YT!]I97IM;->R4KR/= +M?<^.9=*2:H_LE*/OW\)*LH"^&V.ITGWK#"$7`<\R9PW9#<[M-43/$:-;W5A* +MII*2%X5_H%:KBJ"\"M+3204^_#84[8'A\?&?C at LT>RZ:%EA(9.-:Y$J6$,F0 +M!-%).2B1B"SB<9LRIW5)#\8SZ:*]`H=3)%D-`%J0Y,DD?5T!F9>0>162(&3P +MT\0/F8I9CU9\EL_GE*#IYP at B>[#XO+54?-;U9S5Z=<&YJ;B+\32)6C:/NR*$ +M7233"3&:?T6I6(?-.!XRA/FLQ^BL9)+`WMX@%AV:J]+SM1=&Y'9V%0UD,M[S +M:9B#OWDK_9P2D20+ISA383KXC7REZT)@-2"I%-)B*`4BC/1HC+K(C0.[RHVR +MFU!QJ!C9I[*%#D([,6,_WL>0M+!P6Z1KV*8 +M\@KL3%)Q1MN at BA$2&9BU2= +MKX'3#NI(8'?QI@?(5'@-O72_2QX/C2$?+][!:!RLK]L%WF)?WGI7_!2R&LYH at J:9D4%B6,H"T8L3BZ at E)@]&@JSS>X)8]X +M`-+GM)-*Q-Y!$C/W,?@HL)#+4.M#C/](YB`2,9T>IH@$]KW4R3&>.LI*C#($ +M($N`?\TP%FO`;,2TP#H.4I&C(0]"(`8RA056?;`U+(YM"1%`D\;C"3$J7:^P +M.54*$`9_6D4RC&<3]-,PF00ZL,?"."?%=8Q)+>4W*?-X>LIFL*MA5]UXY/%U +MF"4QGC?B"C-.=7KB(Y*_F(V32,NX#%]ZCWP<2N=&R^>5__L/+#!'(%MOJ.O< +M!\FB^+E^O'`&4@)*0^%U>;91>>1!QW)^\DJ;4IT;UX9MF&<-Q@,6MHX-T1WS +M>`I&O4T2@.TTO9E+7P`-P4;>B8;'' +M$(8"75%HV/?J8N],/#)5*VGP46KOVX=/*YB%F]M`SADTS\&9@*W"7_B,P^I( +M6IVY+-TNTB76F\Q"(X7@):DEN@;)H)T_'V[O7(PJZ-Z`A8M+5UN7CY7HT+OS +MH(H0T!V6CKE)U`K>'R";2^Z?87&H/!:H%?TT>]YZMTRF2#I*-P"X`&012J4(_B].&%@)NH" +M4>"406F:Y.K`'`^G*":JXC0U1U"D64Y4457]0C!R&E7AL)Q0XBKB.U]+ +M`[(/92;0H5K],HM[\.+ at U\.SH_\Z9.SGAIZW+\[^QEC_]IE)7R&&Y=MY%1ER +MI\XZ at CL"H0JLX=#%0B&`R+$S=Y +MW/`2HG2(2,ZXET%,>,^2$(U)_A5?+*_'+GU:Y\K,7`%Z5#.1G6`%^489!(K)]`+Z.Z#1!7DZZ1%Y2R%"6S,5^JU.?E#Q,=+IUAYDKJT6-)[IR,&=*:U +M at 3>$J'#,B?0[8N"15"9,([G[$: +M.B+&JY#R3(B%['FQOA$>UMCU\R!SAO/PHD%*4?/7?1#L*/Y1=9`1*5XW-XHTQ6[9Q$`]%5V:"GT<=4 +MNH<32$S#]$TUX2N,DGU4'PJ&86PI"D&B?A',TLJ +MNWF0AA!J0KV1DM83$,,TPI1)DM at .8W*3X%*2#))V6Q$MFJQHM0:W)"YB4+!= +MK42W5ID^,+B.+[454;]FN^EJ+7-'P!!4N^HA at C)P6`M8RI55BKO:G%6K$*Y? +MM=1N/3FGG5+VGIK=2WY[/MBY8'O0\>EI_ZG#G@[P8X@?F_BQA1_;^+&#'\_P +MXV?\^.4I_;+BJ8R4C+;J8ZOE7-UX6Y#+6$>$XC/#*MAFKN51 at Q0O4N%ZT+(;4 +M,<)8N6:.6X;]=X<`R,3;2"_W>L*MJ_8S] +MF^)S';=5XXK"23JLP5$X17AOCYA$5H\P0-1D<*%G8T:J%N)Q2!&#R/Z[&A[= +MW1T at PGV)&-2^"1_^^-=FC7'+^>#"OJ#_ at T?S-,/M;85_4,>O(SM%]QC[#8OW$3ILV2L5Q\NE7A;9*VI/BRD8%:RIQ-+,#>4R/VL= +MBKN4."KX91= +M'CP$1_LBTAJ8KL;5&AK, at EXI5B:X6`XJ'[)W38;NRRQ<2RVA)EJ%[3-4A\C\ +M=3:;]=BK,,#KE"1VH3(,=#U`B]F=:;-,:/RU(]6#DTE=F5!6>X6C1'Z8)27E +MX8IKY\NGHFKR1GY5Q;E(.I2SQUY:+8*N^]T +M[%?,3HF at .CE)N4\_B(7IWB0)Y`!ST&A_^GO6/M:>,(]BO^%=>+TKT+)^,S+\D82T!H at PJ!4M*JW8607E!MI59>UV at 8@E`;K\G&0132K[3C"_R8^!E(:)5:OCRY,/7+F:E$GC!-Y(N,I8B$/# +M!"YDP'1^INS'@N\/[C:N_TH.CJ_3WA$YI4#>D=_(9-6'A84M,+;:QXA$FV<& +M5FY"IX;D'IR]/\.YBXS"2$J1;[EIN%(6:*;D9`B:T%UN\DD1^*D?,3$)JY3* +MJBPTP5+"<_U6D#X!%$RX]70G,M>(<4APBE)%,S:H8NCA;:958\O(8:2$IK?ZZFHVRB8< +MT1LLV3W4LP_J:5G)/D`_E=L5K981?2&^.78L56_^N3U'1\S0]=56=/^K/0N/31U3YU-;YB.MLRIJO +M]7*/KI*_[EEE/.6XM-VAJVAS>&LX5[I>H3)'4&U?HR+4,9CYB#<%6#332-_#"I;X\9<\*F-A +M-*5"7AK=99H/-09&LLBRS(,H3+>4QD_(6ZS0SW;9P+;G2D<\&= +MQP[0W"-;X\!>94:C/01A=?FJ&S_\`'WTZ_[I,+B0'9-M]\,&;87F/E1GIM=7 +MICD<[(W[3$OK=ZK40O7>O=WWYMH+Y:)'N53KH]'4[D<[;=_M-UJ8TEX#G1YW=`W;^S51:>"1`'=8%4L%G(OJHC\7H^, +M@`QI6I%,H*F7 at _W[T^4K$?G)'<\"JB\>&3SV24W(]^&5&F81;70]B&/JL&02X_ at FY)Q$ +MBL-B)D']YI8U//5A\#H>G/9:OBOCP)9V6"#MT,N7M%4DY["H2/ZQ]!#[PO&P +M]..[MUM'._MOO=\/-PX.M@]_S?';E(?WV\;ASL;F[O9XO*=NF#,*TN?#XSW^ +M\-T]YO^K^OVG^DJ=WO]$QZ +M_VNE5E/]_V*=WO^*%\OW?V83RO=_GG8(>&KYZR>HN\/CQ^(Q\?W/Y56S_H]7 +M^?VO4E:_]OB=I_;:7<_YM)F.X at 7X$)Q%D?+S2(DU2HMT+W/PVO/@V+]HE at A*6E +MP+6:`4B3\HJ&'QZ?R!7*`*'15T1#C;TTQ at KX>^4%@U=+.&Z?ISTG61A:GZ_[ +M0[7>26W>:OB&05E[$H$D!_-\,`[72[UY3_PY$%X1$;H^=-X?J"P,"BG1Z@@* +M/L"[HFDAP6^AQ7DLHC at X'Y&+HC0.+4E`32R92J`/E_W!6;]WWI6[E=>XJA1` +M12N'[(!ZUT7;QK0YO2[LF8K0N<.;:.M2PX)P1)6ZY$UKW>O!*!-<0B$")`8Y +MN!8A@!UWT=1[#B>6Y"*.P*7R$*7C;I=M-()N:$5G:A<=N2M]I3L:]%50U2`.)-[2A6INO@*B%2-?@?KF +M"J&=+%ZFPO=>>K<5G3=!*"_34'"\RM7%1\P43VLY9P at XO#J/:)7/,XB(3U,! +M'C,'B7QUC5Q+,#244\NS:MHH_43-I9DZ%E?BKGNU1K:F)98G$&F#O/(,0 +M%R*(>8Y4-2SSU*YUH+T(VGV1!'7/DD/$T^L!I7QJS3)$U9)$N9I-;Y/A&X:5 +M?/*D&:P4$5T>%Y[*E5MOT$/)6D>PJH#_JO(Q(L&(LP%^C1!=+ZXPW6@[B[*+ +MXF(M5DR`W]G at +=](E)V]HMIMRUEAQXZB:26VQ/[I4.))`@"$D=`Y(X\J]60U +M8*H`L93KWA+8)SBY,.:`2F0;5Q[4 +MO;)>("TC:2!QE@/!G+BD$ +FXF@=\Z]O<64H0QG*4(8RE*$,92A#&0"@```` +` +end + + + + diff --git a/demo/ermis-f/python_m/cur/0046 b/demo/ermis-f/python_m/cur/0046 new file mode 100644 index 00000000..5d087b2a --- /dev/null +++ b/demo/ermis-f/python_m/cur/0046 @@ -0,0 +1,13 @@ +From: tjreedy at udel.edu (Terry Reedy) +Date: 8 Apr 1999 01:49:00 GMT +Subject: Xbase++ preprocessor implementation in Python +References: <37097A3A.F772205@magna.com.au> <7eehg9$3at$1@news.udel.edu> +Message-ID: <7eh1uc$b9e$1@news.udel.edu> +X-UID: 46 + +Sorry for the repetition. Glitch with newssite. TJR + + + + + diff --git a/demo/ermis-f/python_m/cur/0047 b/demo/ermis-f/python_m/cur/0047 new file mode 100644 index 00000000..93b080ed --- /dev/null +++ b/demo/ermis-f/python_m/cur/0047 @@ -0,0 +1,63 @@ +From: jkraai at polytopic.com (jkraai) +Date: Thu, 29 Apr 1999 05:01:38 GMT +Subject: Maximize Benefit when Purchasing Learning Python +References: <199904290028.SAA20624@shell.rmi.net> +Message-ID: <3727E7B2.616A87F0@polytopic.com> +Content-Length: 1633 +X-UID: 47 + +Mark, + +I'll make the check out to your wife if you promise not +to tell mine. + +All fun aside, can somebody give me a substantive answer? + +I'd really like to make sure that somebody I 'know' is the +middele man--or middle wife. I really was actually looking +for an answer to my question. + +I'll gladly send you a check, but I'd rather not do it +explicitly, rather as a part of a purchase of three copies +of this book to evangelize my coworkers. + +Help me do somebody a favor & let others know how we +collectively can do _you_ a bigger favor than merely +buying the book. + +I tell you what, if you've got the stones to send me your +address off-list, you'll get a check. If you think Mr. +Ascher is worth it--and I don't doubt it for a moment--if +he'll provide me with the same, I'll send him one, too. + +If Chris or Tim'd ever write a book ... Guido? c'mon. +Does anybody know what Guido desires most in life? I +probably can't buy it today, but it'd be nice to know so +I could taunt him with little plastic replicas. + +somebody-stop-me'ly y'rs, + +--jim + +P.S. I _like_ the cover. + +Mark Lutz wrote: +> +> David Ascher wrote: +> > On Wed, 28 Apr 1999 jkraai at murl.com wrote: +> > +> > How can I help whom when purchasing Python books? +> > +> > I'll dare to speak for Mark, and say that you should feel free to send +> > either Mark or I (or both) checks for any amount whatsoever. Skip the +> > middleman. Save trees -- don't buy the book, just send us cash. Don't +> > hesitate for a minute. +> +> What he said. (Though you could save another +> middleman by making the check out to my wife.) +> +> --Mark Lutz (http://rmi.net/~lutz) + + + + diff --git a/demo/ermis-f/python_m/cur/0048 b/demo/ermis-f/python_m/cur/0048 new file mode 100644 index 00000000..8e03c1f6 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0048 @@ -0,0 +1,63 @@ +From: donn at u.washington.edu (Donn Cave) +Date: 23 Apr 1999 00:18:03 GMT +Subject: Emulating C++ coding style +References: <371F8FB7.92CE674F@pk.highway.ne.jp> <371F9D0C.4F1205BB@pop.vet.uu.nl> +Message-ID: <7foe7r$15mi$1@nntp6.u.washington.edu> +Content-Length: 1458 +X-UID: 48 + +Martijn Faassen writes: +... +|> 4. access to class's members using "::" +|> e.g. some_class::static_value +|> e.g. some_class::static_func(x) +| +| Python does not support static methods (or 'class methods'). Usually a +| module level global function suffices for this purpose. +| +| A static value can be created like this (besides using a global variable +| in a module): +| +| class Foo: +| self.shared = 1 +| +| def __init__(self): +| print self.shared + +Just a nit-pick on this particular item - I tried that already, a +couple of days ago, so I know it won't work! You meant to say, + + class Foo: + shared = 1 + +Now a couple of further observations. Per the question, yes, that +variable ("attribute") is accessible in the class scope: + + print Foo.shared + +As well as in the instance scope, as shown in Martijn's example. +However, it may come as a surprise that if you assign to that attribute +in the instance scope, for example through "self" in a method, what +you get is a new reference bound in the instance scope, and other +instances still see the original class value. + + ... + def privatize(self): + self.shared = 0 + + f1 = Foo() + f2 = Foo() + f1.privatize() + + print Foo.shared, f1.shared, f2.shared + 1 0 1 + +It's not much like C++ here, but it's uncanny how it reeks of Python! +Namespaces, references! + + Donn Cave, University Computing Services, University of Washington + donn at u.washington.edu + + + + diff --git a/demo/ermis-f/python_m/cur/0049 b/demo/ermis-f/python_m/cur/0049 new file mode 100644 index 00000000..14b314c3 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0049 @@ -0,0 +1,27 @@ +From: dwelton at cnet.com (David N. Welton) +Date: 15 Apr 1999 11:12:22 -0700 +Subject: REPOST:pretty please - Help re libpython1.5.so +References: <3714B9F9.30285D74@earth.ox.ac.uk> +Message-ID: <87btgpah2x.fsf@padova.cnet.com> +X-UID: 49 + +I think it would be really cool if the default distribution had a nice +libpython*.so included, as Tcl does. I'm not quite sure Python will +ever be quite so simple to use as an embedded language as Tcl, given +that it is a bit more complex (and more powerful!), but being able to +do: + +gcc -o foo foo.c -lpython1.5 + +would be a nice step... + +Ciao, +-- +David Welton +dwelton at cnet.com +415-395-7805 x4150 + + + + + diff --git a/demo/ermis-f/python_m/cur/0050 b/demo/ermis-f/python_m/cur/0050 new file mode 100644 index 00000000..42844c1b --- /dev/null +++ b/demo/ermis-f/python_m/cur/0050 @@ -0,0 +1,40 @@ +From: phd at sun.med.ru (Oleg Broytmann) +Date: Tue, 6 Apr 1999 12:15:32 GMT +Subject: mxDateTime in Python distribution +In-Reply-To: <19990406070255.A867135@vislab.epa.gov> +References: <19990406070255.A867135@vislab.epa.gov> +Message-ID: +X-UID: 50 + +Hi! + +On Tue, 6 Apr 1999, Randall Hopper wrote: +> I'd like to add my vote toward integrating Marc Lemburg's mxDateTime +> functionality into the next Python release. + + I vote against it. Not that I am against mxTools - it is perfect +library, really. + +> I needed to do some date/time arithmetic recently and found that core +> Python didn't have this functionality. I was a little skeptical about +> using a seperate extension for portability reasons. + + There is always some need for something more. Do you really want to +include every bit of code into the Library? It would take infinite time to +download and compile Python distribution if all possible modules and +extensions come in. + + I want to keep the Library as little as possible. Download, compile and +install only those extensions you need. + +> Randall + +Oleg. +---- + Oleg Broytmann National Research Surgery Centre phd2 at email.com + Programmers don't die, they just GOSUB without RETURN. + + + + + diff --git a/demo/ermis-f/python_m/cur/0051 b/demo/ermis-f/python_m/cur/0051 new file mode 100644 index 00000000..a0930ec1 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0051 @@ -0,0 +1,43 @@ +From: jefftc at leland.Stanford.EDU (Jeffrey Chang) +Date: Tue, 27 Apr 1999 14:54:03 -0700 +Subject: JPython 64K limit on source-code size? +In-Reply-To: <7g4mgd$uo7$1@nnrp1.dejanews.com> +References: <7g4mgd$uo7$1@nnrp1.dejanews.com> +Message-ID: +Content-Length: 1206 +X-UID: 51 + +[Monty] +> I have a JPython program I'm using as a test suite. It's generated code and +> around 74K long. When I try to run it with JPython I get this message: +> +> Traceback (innermost last): +> (no code object) at line 0 +> java.lang.ClassFormatError: org/python/pycode/_pyx0 (Code of a method longer +> than 65535 bytes) + +[...] + +> If this 64K ceiling is indeed a basic limitation of JPython because of Java, +> I'm wondering if there is an easy way to split the file into pieces in a +> chain-like fashion. Any ideas? + +Yep, this is a java thingy. From the stack trace, it looks like you have +a method that is >64K long. According to Sun's JVM specification, the +maximum code allowed for any individual method is 65536 bytes: +http://www.javasoft.com/docs/books/vmspec/2nd-edition/html/ClassFile.doc.html#88659 + +That limit includes any code that it may have generated to initialize +variables that you declared. For example, initializing a large array of +strings as a class or instance variable could get you up to that limit, if +you're not careful. + +It doesn't look like you will need to split up your file, but you will +need to either split up your method or load your variables at run time. + +Jeff + + + + + diff --git a/demo/ermis-f/python_m/cur/0052 b/demo/ermis-f/python_m/cur/0052 new file mode 100644 index 00000000..26ed1155 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0052 @@ -0,0 +1,32 @@ +From: jeffp at crusoe.net (evil Japh) +Date: Fri, 16 Apr 1999 21:12:22 -0400 +Subject: OrderedDict.py v1.00 +Message-ID: +X-UID: 52 + +I have attached version 1.00 of OrderedDict.py. + +I have not yet finished the more extensive documentation of it, but I have +the module with pretty good __doc__ strings, and a test.py program to make +sure it works. + +Let me know how you like it, what you think should be changed, etc. + +This module has potential to be useful. :) + +-- +Jeff Pinyan (jeffp at crusoe.net) +www.crusoe.net/~jeffp + +Crusoe Communications, Inc. +732-728-9800 +www.crusoe.net +-------------- next part -------------- +A non-text attachment was scrubbed... +Name: OrderedDict-1.00.tar.gz +Type: application/octet-stream +Size: 2020 bytes +Desc: +URL: + + diff --git a/demo/ermis-f/python_m/cur/0053 b/demo/ermis-f/python_m/cur/0053 new file mode 100644 index 00000000..270d5bea --- /dev/null +++ b/demo/ermis-f/python_m/cur/0053 @@ -0,0 +1,36 @@ +From: ajung at sz-sb.de (Andreas Jung) +Date: Fri, 23 Apr 1999 16:24:34 GMT +Subject: Python too slow for real world +In-Reply-To: <37207E20.21D3CCDD@appliedbiometrics.com>; from Christian Tismer on Fri, Apr 23, 1999 at 04:05:20PM +0200 +References: <372068E6.16A4A90@icrf.icnet.uk> <37207E20.21D3CCDD@appliedbiometrics.com> +Message-ID: <19990423182434.A9539@sz-sb.de> +X-UID: 53 + +On Fri, Apr 23, 1999 at 04:05:20PM +0200, Christian Tismer wrote: +> +> Summarizing: Stay with the Perl code, if you need it so fast. +> Perl is made for this real world low-level stuff. +> Python is for the real world high level stuff. + +There's nothing more to add - just some remarks. +We are running several production processes that are mainly +based on Python in several ways - we use use Python +as middleware component for combining databases like Oracle, +workflow systems like staffeware, Corba components .... +Are systems consiss of several thousands lines of code and +the code is still manageable. Have you ever seen a Perl +script with a thousand lines that has been readable and +understandable ? And speed has never been a real problem +for Python. Ok - Perl's regex engine seems to be faster +but not the whole world consists of regular expressions. +Python is in every case more open and flexible for building +large systems - take Perl to hack your scrips and build +real systems with Python :-) + +Cheers, +Andreas + + + + + diff --git a/demo/ermis-f/python_m/cur/0054 b/demo/ermis-f/python_m/cur/0054 new file mode 100644 index 00000000..60e0cf57 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0054 @@ -0,0 +1,60 @@ +From: trashcan at david-steuber.com (David Steuber) +Date: 10 Apr 1999 19:53:18 -0500 +Subject: Internet Robot +References: <7ehe9m$hbs$1@nnrp1.dejanews.com> <7emldl$rh9$1@nnrp1.dejanews.com> +Message-ID: +Content-Length: 1748 +X-UID: 54 + +gscot at my-dejanews.com writes: + +-> David Steuber: Thank you for the reply (and Thanks to every one that +-> replied). It was a big help to read over the rfc 1945 and rfc 2068. It is the +-> first time that I have every looked at one and they are pretty informative. +-> I can now POST my request but the server is asking for authentication. + +Hmm. You are posting to a URL that requires authentication? + +The way the server requests authentication is by sending down the +following headers (for basic authentication): + +401 Unauthorized HTTP/1.0 +WWW-Authenticate: Basic realm="WallyWorld" + +To deal with that, you have to send up proper credentials. The header +looks something like this: + +Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ== + +Where the last string is a Base64 encoded userid:password. + +See section 11 in RFC-1945 for details. + +-> You mentioned that it might be helpful to capture and look at the client's +-> out put. How do I do that. + +This can be tricky. Idealy, when talking to the server, you want an +HTTP client that will show you all the headers. When talking to the +client, you want the server to display all the headers (or send them +back to the client). I've always done this the hardway. You can +actually talk to an HTTP server with telnet if you are desperate +enough. I don't recomend it because one typo and you have to do the +request over again. + +Other people responding mentioned a url package for python. I would +take a look at that to see just what it can do. It may make the job a +lot easier. + +-- +David Steuber +http://www.david-steuber.com + +s/trashcan/david/ to reply by mail +If you don't, I won't see it. + +"The way to make a small fortune in the commodities market is to start +with a large fortune." + + + + diff --git a/demo/ermis-f/python_m/cur/0055 b/demo/ermis-f/python_m/cur/0055 new file mode 100644 index 00000000..0b3c54f3 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0055 @@ -0,0 +1,26 @@ +From: faassen at pop.vet.uu.nl (Martijn Faassen) +Date: Thu, 15 Apr 1999 19:35:24 +0200 +Subject: Is there a 'make' replacement written in python ? +References: +Message-ID: <3716235C.221B9F11@pop.vet.uu.nl> +X-UID: 55 + +Markus Kohler wrote: +> +> I'm looking for a replacement for the 'make' command + +While the Python distutils don't fully intend to replace 'make', the +distutils do have code for platform independent building of C +extensions, so some basic make facilities are included. + +I'm sure that code can use more work, so you're very welcome to join the +distutils SIG if you're interested. :) Inspiration from other make +replacements like 'Cons' is of course very welcome. + +Regards, + +Martijn + + + + diff --git a/demo/ermis-f/python_m/cur/0056 b/demo/ermis-f/python_m/cur/0056 new file mode 100644 index 00000000..e502639d --- /dev/null +++ b/demo/ermis-f/python_m/cur/0056 @@ -0,0 +1,23 @@ +From: fredrik at pythonware.com (Fredrik Lundh) +Date: Thu, 29 Apr 1999 15:36:04 GMT +Subject: python and SOCKS firewall +References: +Message-ID: <013301be9256$07e03710$f29b12c2@pythonware.com> +X-UID: 56 + +David Steuber wrote: +> I sympathize with the fact that you are stuck using Novell GroupWise +> for USENET. However, could you please find a way to limit you line +> lengths? + +and we all sympathize with the fact that you're using a +newsreader that is smart enough to understand quoted- +printable encoding, but not smart enough to break long +lines... + + + + + + + diff --git a/demo/ermis-f/python_m/cur/0057 b/demo/ermis-f/python_m/cur/0057 new file mode 100644 index 00000000..19c12c03 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0057 @@ -0,0 +1,107 @@ +From: tismer at appliedbiometrics.com (Christian Tismer) +Date: Wed, 21 Apr 1999 10:51:24 GMT +Subject: WINNT/9X patch for errors.c +References: <371CF528.532DB5C@appliedbiometrics.com> <199904202239.SAA11014@eric.cnri.reston.va.us> +Message-ID: <371DADAC.AF549EC0@appliedbiometrics.com> +Content-Length: 2797 +X-UID: 57 + +This is a patch to errors.c which gives the correct POSIX +error messages for WinNT/9X. + +Reason: os.listdir("nonexistent") gave +OSError: [Errno 3] No such process + +Problem caused by: +The standard function strerror is supposed to give an error message for +a system error. Under Windows, these are DOS messages, not POSIX. +They don't match completely. + +Solution: +Instead of strerror, FormatMessage is used. This function +has an option to return standard system messages. + +This will now give the correct message. +The messages are those which appear to be natural under +Windows: kernel32.dll defines them all in the default +language of your operating system + +Guido van Rossum wrote: +> +> Christian, +> +> I just tried your code on Windows, and I noticed a missing feature. +> Python now adds the filename (when it is known) to the error message; +> your code doesn't do this. + +Solved this, too. My code was ok, but the filename moved into +the next line. The returned message contains a CR/LF sequence +and also a dot. I'm removing this now, and it looks good. + +ciao - chris + +-- +Christian Tismer :^) +Applied Biometrics GmbH : Have a break! Take a ride on Python's +Kaiserin-Augusta-Allee 101 : *Starship* http://starship.python.net +10553 Berlin : PGP key -> http://wwwkeys.pgp.net +PGP Fingerprint E182 71C7 1A9D 66E9 9D15 D3CC D4D7 93E2 1FAE F6DF + we're tired of banana software - shipped green, ripens at home +-------------- next part -------------- +*** /w/orion/install/cvsroot/python/dist/src/python/errors.c Mon Dec 21 19:33:30 1998 +--- /w/orion/install/python1.5/errors.c Wed Apr 21 12:13:40 1999 +*************** +*** 49,54 **** +--- 49,59 ---- + #endif + #endif + ++ #ifdef _WIN32 ++ #include "windows.h" ++ #include "winbase.h" ++ #endif ++ + void + PyErr_Restore(type, value, traceback) + PyObject *type; +*************** +*** 291,297 **** +--- 296,319 ---- + if (i == 0) + s = "Error"; /* Sometimes errno didn't get set */ + else ++ #ifndef _WIN32 + s = strerror(i); ++ #else ++ { ++ int len = FormatMessage( ++ FORMAT_MESSAGE_ALLOCATE_BUFFER | ++ FORMAT_MESSAGE_FROM_SYSTEM | ++ FORMAT_MESSAGE_IGNORE_INSERTS, ++ NULL, // no message source ++ i, ++ MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language ++ (LPTSTR) &s, ++ 0, // size not used ++ NULL ); // no args ++ // remove trailing cr/lf and dots ++ while(len && s[len-1] <= '.') s[--len] = '\0' ; ++ } ++ #endif + if (filename != NULL && Py_UseClassExceptionsFlag) + v = Py_BuildValue("(iss)", i, s, filename); + else +*************** +*** 300,305 **** +--- 322,330 ---- + PyErr_SetObject(exc, v); + Py_DECREF(v); + } ++ #ifdef _WIN32 ++ LocalFree(s); ++ #endif + return NULL; + } + + + diff --git a/demo/ermis-f/python_m/cur/0058 b/demo/ermis-f/python_m/cur/0058 new file mode 100644 index 00000000..c92cc7aa --- /dev/null +++ b/demo/ermis-f/python_m/cur/0058 @@ -0,0 +1,33 @@ +From: aahz at netcom.com (Aahz Maruch) +Date: Sat, 24 Apr 1999 16:01:17 GMT +Subject: Python too slow for real world +References: <372068E6.16A4A90@icrf.icnet.uk> <37215EFB.433AFCA6@prescod.net> +Message-ID: +X-UID: 58 + +In article <37215EFB.433AFCA6 at prescod.net>, +Paul Prescod wrote: +>Justin Sheehy wrote: +>> +>>> (And... How about builtin regexes in P2?) +>> +>> In all seriousness, what reason do you have for making that +>> suggestion? I am willing to believe that there might be a good reason +>> to do so, but it certainly isn't immediately obvious. +> +>One benefit would be that the compiler could compile regexps at the same +>time everything else is being compiled. + + If you really care and if you're going to run the same program +multiple times, just use pickle. +-- + --- Aahz (@netcom.com) + +Hugs and backrubs -- I break Rule 6 <*> http://www.rahul.net/aahz/ +Androgynous poly kinky vanilla queer het + +Hi! I'm a beta for SigVirus 2000! Copy me into your .sigfile! + + + + diff --git a/demo/ermis-f/python_m/cur/0059 b/demo/ermis-f/python_m/cur/0059 new file mode 100644 index 00000000..fbf2c5e5 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0059 @@ -0,0 +1,46 @@ +From: tismer at appliedbiometrics.com (Christian Tismer) +Date: Fri, 30 Apr 1999 07:57:03 GMT +Subject: Read MS Access 97 *.mdb files with python?? +References: <37287369.D6E67313@t-online.de> + <3728867D.94B5BBF9@appliedbiometrics.com> + <3728A903.CF75B41A@pop.vet.uu.nl> + <3728B7DF.80E23481@t-online.de> <3728D832.AA4B72A@lemburg.com> +Message-ID: <3729624F.CFF4E6AF@appliedbiometrics.com> +Content-Length: 1136 +X-UID: 59 + + +"M.-A. Lemburg" wrote: +... +> For the file format try: +> +> http://www.wotsit.org/ +> +> Don't know whether they list it, but if they don't it's likely +> that it's not published anywhere. + +Just a note: + +They give info about the .ldb format which is ridiculous, +just the format of the locking files, half an hour of +work to find out. The .mdb format is to my knowledge +documented nowhere. I know of exactly two companies +in the world which have tracked down this format to +an extreme extent, and who are able to recover a broken +database file. I once tried this for myself, but this +needs hundreds of hours, creating thousands of databases, +modifying data and comparing files. + +ciao - chris + +-- +Christian Tismer :^) +Applied Biometrics GmbH : Have a break! Take a ride on Python's +Kaiserin-Augusta-Allee 101 : *Starship* http://starship.python.net +10553 Berlin : PGP key -> http://wwwkeys.pgp.net +PGP Fingerprint E182 71C7 1A9D 66E9 9D15 D3CC D4D7 93E2 1FAE F6DF + we're tired of banana software - shipped green, ripens at home + + + + diff --git a/demo/ermis-f/python_m/cur/0060 b/demo/ermis-f/python_m/cur/0060 new file mode 100644 index 00000000..9753ffa9 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0060 @@ -0,0 +1,18 @@ +From: jeremy at cnri.reston.va.us (Jeremy Hylton) +Date: Thu, 15 Apr 1999 18:44:31 -0400 (EDT) +Subject: HTML Authentication with Python +In-Reply-To: <7f5iru$rlm@news.acns.nwu.edu> +References: <7f5iru$rlm@news.acns.nwu.edu> +Message-ID: <14102.27498.772779.5941@bitdiddle.cnri.reston.va.us> +X-UID: 60 + +I don't think you want to do the authentication in Python at all. +Instead, you need to configure the Web server to do authentication. +If you configure the server properly, users won't be able to run your +CGI scripts until the server has checked their username and password. + +Jeremy + + + + diff --git a/demo/ermis-f/python_m/cur/0061 b/demo/ermis-f/python_m/cur/0061 new file mode 100644 index 00000000..0238c344 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0061 @@ -0,0 +1,53 @@ +From: guido at CNRI.Reston.VA.US (Guido van Rossum) +Date: Sat, 10 Apr 1999 00:07:16 -0400 +Subject: Possible problem with timemodule.c [1.5.2c1] +In-Reply-To: Your message of "Fri, 09 Apr 1999 21:40:18 EDT." + <199904100140.VAA11860@python.org> +References: <199904100140.VAA11860@python.org> +Message-ID: <199904100407.AAA02004@eric.cnri.reston.va.us> +Content-Length: 1567 +X-UID: 61 + +[Andy Dustman wrote] + +> [I decided not to bug Guido directly with this...] + +Hehe, I scan the newsgroup digests for the string "1.5.2" so I found +your post anyway :-) + +> My compile is completely clean except for Modules/timemodule.c: +> +> ./timemodule.c: In function `time_strptime': +> ./timemodule.c:429: warning: assignment makes pointer from integer without +> a cast +> +> This is in time_strptime(), naturally. The code immediately before this +> is: +> +> #ifdef HAVE_STRPTIME +> /* extern char *strptime(); /* Enable this if it's not declared in */ +> +> On Linux, strptime() IS declared in . However, I find nothing in +> timemodule.c that would cause to be included for Linux. configure +> does find strptime and does cause HAVE_STRPTIME to be defined in config.h. + +Rest assured, is included, indirectly, by mytime.h or myselect.h. + +> This is unlikely to be a "showstopper", but I thought I would point it +> out. This may simply be a Linux (RedHat 5.2) problem. The more I look at +> , the more I lean towards thie conclusion. The prototype for +> strptime() is not defined unless __USE_XOPEN is defined. The solution, +> however, is not obvious. + +This analysis sounds right to me. (Can't test it -- the only Linux +box we have here on the network was powered down because it was +overheating. Too much press attention for Open Source I guess :-) + +Perhaps __USE_XOPEN could be defined somewhere by the configure +script? Anybody suggest a good spot to do this? + +--Guido van Rossum (home page: http://www.python.org/~guido/) + + + + diff --git a/demo/ermis-f/python_m/cur/0062 b/demo/ermis-f/python_m/cur/0062 new file mode 100644 index 00000000..1e381efb --- /dev/null +++ b/demo/ermis-f/python_m/cur/0062 @@ -0,0 +1,84 @@ +From: news at dorb.com (Darrell) +Date: Thu, 29 Apr 1999 10:45:41 -0400 +Subject: Fatal Python error: PyThreadState_Get: no current thread +References: +Message-ID: +Content-Length: 2310 +X-UID: 62 + +I was just trouble shooting a problem like this. I was using python.exe and +a xxx.pyd. The xxx.pyd had debug turned on and should have been named +xxx_d.pyd. When I ran with python_d.exe the "no current thread" error +cleared up. + +If your lucky the Windows and Unix ports have this in common. + +--Darrell + + +Timothy Docker wrote in message +news:m4izp3rc21l.fsf at macquarie.com.au... +> +> +> I've seen questions related to this error in dejanews, but no +> definitive answer. It seems that this error can indicate a variety of +> misconfigurations. Here's my situation: +> +> I have a program written a while ago under python 1.4 that I am trying +> to run under python 1.5.1. This program uses Tkinter, and makes no +> reference to Threads. On my Solaris 2.6 machine here I have +> +> python1.4 - compiled without threads +> python1.5.1 - compiled with threads +> python1.5.2 - compiled with threads +> +> After a lot of reduction, I ended up with the 10 or so lines shown +> below. If I run it each of the installed versions and press the +> displayed quit button, I see the following +> +> | qad16:tools $ /opt/python/python1.4/sunos5/bin/python test.py +> | qad16:tools $ /opt/python/python1.5.1/bin/python test.py +> | Fatal Python error: PyThreadState_Get: no current thread +> | Abort +> | qad16:tools $ /opt/python/python1.5.2/bin/python test.py +> | qad16:tools $ +> +> So... what's wrong with my 1.5.1 installation? Have I misconfigured +> the thread stuff, or is a bug that has been fixed in 1.5.2? There is a +> note in the Misc/NEWS of 1.5.2 that says that PyThreadState_Get has +> been replaced by a macro that doesn't do error checking. Does this +> mean that the problem is still lurking in my 1.5.2 installation? +> +> Thanks for any pointers! +> +> Tim +> +> -------------------- test.py -------------------- +> import sys +> from Tkinter import * +> +> def cancel(): +> sys.exit(0) +> +> def quitFromWM(event): +> pass +> +> mf = Frame() +> mf.bind("", quitFromWM ) +> f = Frame(mf).pack(side=BOTTOM,fill=BOTH) +> Button( f, text = 'Quit', command = cancel ).pack() +> mf.mainloop() +> +> +> +> +> -------------------------------------------------------------- +> Tim Docker timd at macquarie.com.au +> Quantative Applications Division +> Macquarie Bank + + + + + + diff --git a/demo/ermis-f/python_m/cur/0063 b/demo/ermis-f/python_m/cur/0063 new file mode 100644 index 00000000..8746214a --- /dev/null +++ b/demo/ermis-f/python_m/cur/0063 @@ -0,0 +1,50 @@ +From: downstairs at home.com (TM) +Date: Mon, 26 Apr 1999 03:04:16 GMT +Subject: [SOLVED] Re: Can't get wish80 working on tcl\tk 8.0.5 +References: <3722974b.17318321@news> +Message-ID: +Content-Length: 1278 +X-UID: 63 + +I've figured out the problem and I'm passing it on to the groups in case it +might help someone else. + +I had a program called Window Blinds running that was causing the hanging. +When I +shut this accessory off, the wish80 and Tkinter stuff started working again. + +Tom + + + + wrote in message news:3722974b.17318321 at news... +> I can't seem to get the graphical wish80 shell working on my win98 +> machine. Can anyone PLEASE help me to get this working??? +> +> Here's the story: +> Installed the latest version (8.0.5) as it came with the +> latest version of Python. I could not get any python programs that +> accessed Tkinter to work. I tracked the problem back to the tcl +> installation by trying first the command line tcl shell which worked, +> then the wish80 shell which does not work. I can see a process in +> my task window, but the program's window never opens up. I've made +> sure I've got the proper path set up and I still get nothing. +> +> I tried installing a previous release (tcl 7.4(?) and tk 4.2) and that +> wish shell came up just fine. I uninstalled that and reinstalled +> version 8.0.5 and I get nothing. +> +> Please can someone help me fix this?? What could I be missing or +> doing wrong?? +> +> +> Thank you for ANY help. +> +> Tom +> + + + + + + diff --git a/demo/ermis-f/python_m/cur/0064 b/demo/ermis-f/python_m/cur/0064 new file mode 100644 index 00000000..fa2ca83a --- /dev/null +++ b/demo/ermis-f/python_m/cur/0064 @@ -0,0 +1,38 @@ +From: moshez at math.huji.ac.il (Moshe Zadka) +Date: Mon, 26 Apr 1999 01:17:48 +0300 +Subject: Time complexity of dictionary insertions +In-Reply-To: <000901be8e11$b4842560$f09e2299@tim> +References: <000901be8e11$b4842560$f09e2299@tim> +Message-ID: +X-UID: 64 + +On Sat, 24 Apr 1999, Tim Peters wrote: + +> [someone asks about the time complexity of Python dict insertions] +> +> [Tim replies] +> > Min O(1), Max O(N), Ave O(1). If the hash function is doing +> > a terrible job (e.g. maps every key to the same hash value), make +> > those all O(N). + + + +> This one-ups-man-ship would be a lot cuter if Python's dict insertion were +> in fact amortized constant time <0.9 wink>. It's not, and the answer I gave +> doesn't imply that it is. Insertion in STL hashed associative containers +> isn't ACT either. + +This is interesting. What is the WCS behaviour of Python dicts? + +but-it-doesn't-really-matter-'cause-it-takes-finite-time-anyway-ly y'rs, +Z. + +-- +Moshe Zadka . +QOTD: What fun to me! I'm not signing permanent. + + + + + diff --git a/demo/ermis-f/python_m/cur/0065 b/demo/ermis-f/python_m/cur/0065 new file mode 100644 index 00000000..29c24645 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0065 @@ -0,0 +1,25 @@ +From: alex at somewhere.round.here (Alex) +Date: 29 Apr 1999 10:53:33 -0400 +Subject: Designing Large Systems with Python +References: <372599D6.C156C996@pop.vet.uu.nl> <7g4a3l$atk$1@news.worldonline.nl> +Message-ID: +X-UID: 65 + +> I would like better python support in XEmacs. There is a python mode, +> but I haven't seen anything about evaluating Python code ineteractivly +> the way you can with Lisp and elisp. + +Is this the sort of thing you want? + +Try C-c ! to create a python shell, C-c C-c to evaluate a buffer in that +shell, or C-c | to evaluate a marked region. Then you can execute +commands interactively in that shell. + +This works for python-mode in emacs. I would guess it would be the same +in xemacs. Unless these are customizations I did and forgot about... :) + +Alex. + + + + diff --git a/demo/ermis-f/python_m/cur/0066 b/demo/ermis-f/python_m/cur/0066 new file mode 100644 index 00000000..704cbcd4 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0066 @@ -0,0 +1,64 @@ +From: skip at mojam.com (Skip Montanaro) +Date: Sat, 17 Apr 1999 13:08:39 GMT +Subject: Need someone to try some rarely used bsddb methods +Message-ID: <7fa14m$vfm$1@nnrp1.dejanews.com> +Content-Length: 1971 +X-UID: 66 + + + + +I noticed today that there is apparently still no documentation for the bsddb +module, so I started working on some. While trying out the bsddb hash object +methods, I noticed a few didn't seem to work. I tested this under Red Hat +Linux 5.0 (PC hardware) and Python 1.5.1. I used Berkeley DB v 2.3.16 with +the backwards compatibility interface, so that might be causing my problems. +I see no functional changes in the 1.5.2 version of the bsddb module, so I +doubt it's causing problems. + +If you have the time, please try executing the following Python statements +and let me know what methods, if any, generate tracebacks. I will need to +know what version of Python you used, what version of Berkeley DB you used, +and for completeness, what OS platform and version you used. (If you use +version 2 of the DB library you will have to modify the bsddbmodule.c source +to include db_185.h instead of db.h.) + + import bsddb + db = bsddb.hashopen("/tmp/spam.db", "c") + for i in range(10): db["%d"%i] = "%d"% (i*i) + db.keys() + db.first() + db.next() + db.last() + db.set_location('2') + db.previous() + db.sync() + +The btree object (the one I use regularly) didn't have any problems. The keys +returned with the record object seem to be screwed up: + + >>> db = bsddb.rnopen("/tmp/spamr.db", "c") + >>> for i in range(10): db["%d"%i] = "%d"% (i*i) + ... + >>> db.keys() + ['0\000\000\000', '1\000\000\000', '2\000\000\000', '3\000\000\000', + '4\000\000\000', '5\000\000\000', '6\000\000\000', '7\000\000\000', + '8\000\000\000', '9\000\000\000'] + +Can anyone confirm this rather odd behavior as well? + +Private replies appreciated. + +Thanks, + +-- +Skip Montanaro (skip at mojam.com, 518-372-5583) +Mojam: "Uniting the World of Music" http://www.mojam.com/ +Musi-Cal: http://www.musi-cal.com/ + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/0067 b/demo/ermis-f/python_m/cur/0067 new file mode 100644 index 00000000..f1248d98 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0067 @@ -0,0 +1,67 @@ +From: tismer at appliedbiometrics.com (Christian Tismer) +Date: Mon, 19 Apr 1999 21:06:06 GMT +Subject: Memory and swapping question +References: <371B5ED8.A9C82170@appliedbiometrics.com> <7fg1ep$t5s$1@nnrp1.dejanews.com> +Message-ID: <371B9ABE.3D2D8543@appliedbiometrics.com> +Content-Length: 2517 +X-UID: 67 + + +aaron_watters at my-dejanews.com wrote: +> +> In article <371B5ED8.A9C82170 at appliedbiometrics.com>, +> Christian Tismer wrote: +> > due to a question which came up in the tutor list, I'd like +> > to ask if somebody can explain the following:.... +> +> timings on making huge lists of integers... +> +> > On my system, creation takes about 10 times as for big/2, +> > this is ok. But the del takes at least three times as long. +> > Besides the fact that integers are never really disposed but +> > build up a freelist, why is deletion so much slower now? +> +> Could be wrong, but this may be a case of a famous database +> problem. The OS (typically) swaps out pages by picking the "least recently +> used" page, but when you are decreffing (scanning) a HUGE list of sequentially +> allocated objects this guarantees that the page you need next will +> be swapped out by the time you get to it. Yikes! Allocation is faster +> because you are really only "paging things out" (the first time) +> and the write to the disk can be buffered until the disk is +> ready, allowing the program to proceed (?I think?). + +Exactly. +In this case, things are even worse: +Iin the de-allocation phase, the internal integer cache +is scanned in order, to return the integers to the +freelist. This treats a stack-like structure as a heap, +making integer deallocation like a list.reverse() on +the cache file. +It also applies to other objects which are created +in-order and referenced by the list. The same disk trashing. +Which means that the malloc routines use a similar, +stack-like freelist, at least on Win98. + +> This is one reason why Oracle and Sybase, etc, like to do their own +> memory and disk management ("gimme them sectors -- don't need no +> g.d. filesystem, thanks!"). Just a guess, but a not completely +> uneducated one. + +Well, I changed the deallocation strategy of lists to free +objects beginning from the end. (1 line in listobject.c) +Now, all my examples run as expected, with del no longer +being more expensive than create. + +cheers - chris + +-- +Christian Tismer :^) +Applied Biometrics GmbH : Have a break! Take a ride on Python's +Kaiserin-Augusta-Allee 101 : *Starship* http://starship.python.net +10553 Berlin : PGP key -> http://wwwkeys.pgp.net +PGP Fingerprint E182 71C7 1A9D 66E9 9D15 D3CC D4D7 93E2 1FAE F6DF + we're tired of banana software - shipped green, ripens at home + + + + diff --git a/demo/ermis-f/python_m/cur/0068 b/demo/ermis-f/python_m/cur/0068 new file mode 100644 index 00000000..98d4e154 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0068 @@ -0,0 +1,42 @@ +From: andrew at starmedia.net (Andrew Csillag) +Date: Fri, 16 Apr 1999 18:35:55 GMT +Subject: Bug with makesetup on FreeBSD +References: <37175E05.4CF3C68@starmedia.net> <19990416141948.B1545732@vislab.epa.gov> +Message-ID: <3717830B.D2ABFBFD@starmedia.net> +Content-Length: 1066 +X-UID: 68 + +Randall Hopper wrote: +> +> Andrew Csillag: +> |makesetup in Python 1.5.1 and 1.5.2 bombs on lines in the Setup file +> |that use backslash continuation to break a module spec across lines on +> |FreeBSD. +> +> BTW FWIW, I just built 1.5.2 last night on 3.0-RELEASE using the 1.5.2c1 +> port. Worked fine. But it may not invoke makesetup under the hood. +> +> Randall +It does invoke makesetup (that's how the Makefile in Modules gets +written). I'm also running FreeBSD 2.2.8, so it may be a bug in /bin/sh +that has been subsequently fixed... The quick test is to try this on +your 3.0 machine + +$ read line +some text here\ + +On my 2.2.8 machine after I hit return after the \, I get a command line +prompt, not a "blank prompt" that would mean that the read wasn't done. + +In either case, I was able to get the thing built without the patch, I +just had to type make -e SHELL=/usr/local/bin/bash, but that sucks. + +Drew Csillag +-- +"There are two major products that come out of Berkeley: +LSD and UNIX. We don't believe this to be a coincidence." +- Jeremy S. Anderson + + + + diff --git a/demo/ermis-f/python_m/cur/0069 b/demo/ermis-f/python_m/cur/0069 new file mode 100644 index 00000000..db193857 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0069 @@ -0,0 +1,20 @@ +From: chwang at olemiss.edu (haibo wang) +Date: Mon, 12 Apr 1999 15:47:05 -0500 +Subject: where can I find the binary code for mSQL or mySQL module in Pyton +Message-ID: <37125BC9.316AE200@olemiss.edu> +X-UID: 69 + +I had installed Python on the Sun workstation running solaris 2.6. I +need to download the module for mSQL and mySQL. Where can I find the +binary code? Who is maintaining the Python mSQL module. +Thanks, + +Haibo Wang +UNIX/NT Consultant +Office of IT +University of Mississippi + + + + + diff --git a/demo/ermis-f/python_m/cur/0070 b/demo/ermis-f/python_m/cur/0070 new file mode 100644 index 00000000..b8a19afe --- /dev/null +++ b/demo/ermis-f/python_m/cur/0070 @@ -0,0 +1,80 @@ +From: dalke at bioreason.com (Andrew Dalke) +Date: Thu, 29 Apr 1999 19:18:15 -0600 +Subject: string.atoi('-') +References: <372894B5.78F68430@embl-heidelberg.de> +Message-ID: <372904D7.1A9FC1AB@bioreason.com> +Content-Length: 1930 +X-UID: 70 + +(cc'ed to Jens Linge , the author of) +> With python 1.51 running on a SGI: +> >>> string.atoi('-') +> Traceback (innermost last): +> File "", line 1, in ? +> ValueError: invalid literal for atoi(): - +> >>> +> +> But with python 1.52 running on a SGI: +> >>> string.atoi('-') +> 0 +> >>> +> +> Does it depend on the compilation? +> Does anyone have the same problem? +> +> WHAT IS THE RULE? + + My 1.5.1 installation on IRIX 6.2 and 6.5 (compiled under 6.2 +with the 7.1 compiler using -o32) says: + +val> python +Python 1.5.1 (#21, Nov 23 1998, 15:04:47) [C] on irix6 +Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam +>>> import string +>>> string.atoi('-') +0 + +so it isn't a 1.5.1 to 1.5.2 difference or a difference in +the -o32 libraries for the OS version. I suspect either the +compiler or the -n32 libs. + + +I compiled 1.5.2c1 with the newer compiler using -n32. The +result is the error you got: + +max> ./python +Python 1.5.2c1 (#5, Apr 29 1999, 19:04:33) [C] on irix646 +Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam +>>> import string +>>> string.atoi('-') +Traceback (innermost last): + File "", line 1, in ? +ValueError: invalid literal for atoi(): - + +I recompiled 152c1 for SGI_ABI = -o32 on the same machine and +compiler. + +max> ./python +Python 1.5.2c1 (#6, Apr 29 1999, 19:12:12) [C] on irix646-o32 +Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam +>>> import string +>>> string.atoi('-') +Traceback (innermost last): + File "", line 1, in ? +ValueError: invalid literal for atoi(): - + + + This suggests that the compiler changed a bit (fixed a bug it +seems) and that you are compiling 1.5.2 on the 7.1 compiler while +you compiled 1.5.1 on the 7.2 compiler. + + Can you try other combinations of machines and compilers? Or +perhaps change the ABI to -n32 (or -o32) to get a different +set of library routines? + + Andrew + dalke at bioreason.com + + + + diff --git a/demo/ermis-f/python_m/cur/0071 b/demo/ermis-f/python_m/cur/0071 new file mode 100644 index 00000000..cc1db287 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0071 @@ -0,0 +1,42 @@ +From: dave at zeus.hud.ac.uk (Dave Dench) +Date: Thu, 8 Apr 1999 09:00:48 GMT +Subject: Extreme Programming ( XP ) in python ? +Message-ID: <199904080900.KAA17021@brahms.scom> +Content-Length: 1447 +X-UID: 71 + +Dear All, +I recently attended the OT99 conference at Oxford University. +One of the highlights was the inspiring keynote speech by Kent Beck +on his experiences with Extreme Programming ( XP ) . +( ref: http://c2.com/cgi/wiki?ExtremeProgrammingRoadmap ) +Unfortunately, he was using Java as his particular language vehicle, +but that is not mandatory. +It would seem to me that XP and python is a marriage made in heaven. +Has anyone on this list had any experiences with XP on their projects? + + David + +PS as a side-note, despite this being primarily a practitioners conference, +there didn't seem to be much awareness of python at the conference, +despite my dropping it into any conversation I could. It would seem that +Java IS making in-roads, despite reservations. + +PPS It would also seem that XML is starting to get linked with CORBA very +productively by passing content-rich strings. ( perhaps this is old news ? ) + + +________________________________________________________________________________ + + ************************************************ + * David Dench * + * The University of Huddersfield , UK * + * Tel: 01484 472083 * + * email: d.j.dench at hud.ac.uk * + ************************************************ +________________________________________________________________________________ + + + + + diff --git a/demo/ermis-f/python_m/cur/0072 b/demo/ermis-f/python_m/cur/0072 new file mode 100644 index 00000000..386faf09 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0072 @@ -0,0 +1,74 @@ +From: news at helen.demon.nl (Ilja Heitlager) +Date: Thu, 29 Apr 1999 11:54:58 +0200 +Subject: Designing Large Systems with Python +References: <372599D6.C156C996@pop.vet.uu.nl> <7g4a3l$atk$1@news.worldonline.nl> +Message-ID: <7g99pj$b1$1@news.worldonline.nl> +Content-Length: 2478 +X-UID: 72 + +David Steuber wrote: + +>I would like better python support in +>XEmacs. There is a python mode, but I haven't seen anything about +>evaluating Python code ineteractivly the way you can with Lisp and +>elisp. +I use windows python, it has debuggers and such. + +>-> Need GUI's? MFC or tcl/tk? +> +>MFC???? I hope to seperate the functionality from the GUI to +>make both orthoganal to each other. If I can pull that off, I suppose +>a Windows version would be possible for what I want to do. I am +>expecting to go straight to XLib and OpenGL. If I need an abstraction +>layer over X, it would probably be xt. + +OK, A UNIX guy (that will change ;-) Take a look at the modules section in +www.python.org +All gui's you mention are supported, there is also a WPY package. It is an +abstract representation and uses MFC on MS or tcl/tk otherwise. + + +> +>-> Networking, Parsers, XML, HTML, regex? + +>I am not sure if I need to use networking. I am hoping to get +>concurrent development via outside tools like CVS. + + +If there's ASCII CVS is never a problem ofcourse, but I just named a few +packages. + +> + +>-> ehh, Python? +> +>It looks interesting. It is more C like than Lisp like. I was +>considering using Lisp, but for various reasons I have abandoned that +>idea. JavaScript is too weak. Perl is a strong scripting language, +>but it is a real bitch to create C++ style classes. The syntax is a +>nightmare. I'll keep it for text munching. + + +Python has very strong regex support, so you will probably start using +python for that as well ;-) +There is a thread at this moment however discussing performance on LARGE +text-processing in Perl and Python. I never was much of a parenthesis +fetisjist, so LISP is out of my league. If you need functional constructs, +python has that as well (lambda's etc) +If you need symbolical stuff, I am working on that. I have experience with +Prolog and Reduce/RLISP (Lisp without () and a month ago I took Python to +do symbolical stuff. +It gave me just what I wanted: OO and strong operator overloading. much +better then simple Lisp-tuples. Tell me if you need this kind of stuff. + +The last year I did a lot of large system stuff in Java (both pure and MS), +which was a great relief from C. Last month I got to learn Python, which I +love even better. Until now there isn't anything I can think of what I could +not do in Python and JPyhton is probably the HOLY GRAIL. +Guido is king, Python is his round table and we are the knights that follow. + + + + + + diff --git a/demo/ermis-f/python_m/cur/0073 b/demo/ermis-f/python_m/cur/0073 new file mode 100644 index 00000000..76e1f6bc --- /dev/null +++ b/demo/ermis-f/python_m/cur/0073 @@ -0,0 +1,38 @@ +From: dkuhlman at netcom.com (G. David Kuhlman) +Date: Thu, 8 Apr 1999 23:02:11 GMT +Subject: infoseek? +References: <7ehcn3$elg$1@newssvr01-int.news.prodigy.com> +Message-ID: +X-UID: 73 + +Daye wrote: +> does anyone know if Infoseek.com still use python for their +> search engine? Thanks. + +There was an article in Python Journal dated about 7/98 in which +Andy Feit of Infoseek says that they still use Python heavily and +that they make Python available to customers who want to customize +there Intranet seek engines. A relevant quote from that article: + +"The other thing that Python gives our product is that, when +customers come to us and ask 'Can you customize it to do such and +such?', we almost alwasy say yes. ... We have patching points in a +language that is flexible enough to do almost anything." + +Feit also makes comments that indicate confidence that his +customers will be able to make the Infoseek engine do anything. +And that just makes me drool with envy. I wish my company's product +could do that. I'm trying to make it so. + +Python Journal is at: + + http://www.pythonjournal.com + +but when I tried a few minutes ago, I was denied access to this +article. + + - Dave + + + + diff --git a/demo/ermis-f/python_m/cur/0074 b/demo/ermis-f/python_m/cur/0074 new file mode 100644 index 00000000..4e71f73a --- /dev/null +++ b/demo/ermis-f/python_m/cur/0074 @@ -0,0 +1,39 @@ +From: jkraai at polytopic.com (jkraai) +Date: Thu, 29 Apr 1999 05:07:01 GMT +Subject: HTML "sanitizer" in Python +References: <19990428152042.A708@better.net> <00e501be91c4$db944f20$0301a8c0@cbd.net.au> +Message-ID: <3727E8F5.7AC7EAB0@polytopic.com> +X-UID: 74 + +Um, a vote of confidence here for tidy. + +I've rewritten tidy to do several different specialized things. + +I am no C hacker, and have been told it's 'awful' code, but I +sure had no problems with it. +, +just-another-2c-in-the-bucket-ly-yours + +--jim + +Mark Nottingham wrote: +> +> There's a better (albeit non-Python) way. +> +> Check out http://www.w3.org/People/Raggett/tidy/ +> +> Tidy will do wonderful things in terms of making HTML compliant with the +> spec (closing tags, cleaning up the crud that Word makes, etc.) As a big +> bonus, it will remove all tags, etc, and replace them with CSS1 style +> sheets. Wow. +> +> It's C, and is also available with a windows GUI (HTML-Kit) that makes a +> pretty good HTML editor as well. On Unix, it's a command line utility, so +> you can use it (clumsily) from a Python program. +> +> I suppose an extension could also be written; will look into this (or if +> anyone does it, please tell me!) + + + + diff --git a/demo/ermis-f/python_m/cur/0075 b/demo/ermis-f/python_m/cur/0075 new file mode 100644 index 00000000..1c575bb6 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0075 @@ -0,0 +1,31 @@ +From: jeremy at cnri.reston.va.us (Jeremy Hylton) +Date: Sat, 10 Apr 1999 14:40:19 -0400 (EDT) +Subject: Internet Robot +In-Reply-To: <7emldl$rh9$1@nnrp1.dejanews.com> +References: <7ehe9m$hbs$1@nnrp1.dejanews.com> + + <7emldl$rh9$1@nnrp1.dejanews.com> +Message-ID: <14095.39355.48967.900033@bitdiddle.cnri.reston.va.us> +X-UID: 75 + +How are you generating your HTTP requests? httplib or urllib? IN +either case, you ought to be able to get Python to print out some +debugging information, which will be much more useful than doing +something with a packet capture tool. There's nothing fancy going on +at the packet level that you need to look at -- just the data that's +coming back over the socket. One of the easiest ways to do that is +with the set_debuglevel method on an HTTP object. + +But your question probably has an even easier answer: What kind of +authentication is the server doing? Python supports HTTP Basic +authentication with urllib, and I've gotting a working implementation +of Digest authentication that should be ready for release any day now. + +The authentication support is not well documented (if it's documented +at all), so you'll have to look at the code. + +Jeremy + + + + diff --git a/demo/ermis-f/python_m/cur/0076 b/demo/ermis-f/python_m/cur/0076 new file mode 100644 index 00000000..c10098a0 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0076 @@ -0,0 +1,18 @@ +From: stadt at cs.utwente.nl (Richard van de Stadt) +Date: Wed, 21 Apr 1999 12:38:58 +0200 +Subject: Kosovo database; Python speed +Message-ID: <371DAAC2.D9046550@cs.utwente.nl> +X-UID: 76 + +Suppose we were going to make a database to help Kosovars locate +their family members. This would probably result in hundreds of +thousands of records (say 1 record (file) per person). + +Would Python be fast enough to manage this data, make queries on +the data, or should compiled programs be used? + +Richard. + + + + diff --git a/demo/ermis-f/python_m/cur/0077 b/demo/ermis-f/python_m/cur/0077 new file mode 100644 index 00000000..1906fe0d --- /dev/null +++ b/demo/ermis-f/python_m/cur/0077 @@ -0,0 +1,47 @@ +From: fw at cygnus.stuttgart.netsurf.de (Florian Weimer) +Date: 25 Apr 1999 19:07:14 +0200 +Subject: converting perl to python - simple questions. +References: <7fvagp$8lm$1@nnrp1.dejanews.com> +Message-ID: +Content-Length: 1150 +X-UID: 77 + +sweeting at neuronet.com.my writes: + +> a) Perl's "defined". +> [perl] +> if (defined($x{$token}) +> +> [python] +> if (x.has_key(token) and x[token]!=None) : + +Depending on the code, you can omit the comparision to `None'. Perl +programmers traditionally uses `defined' to test if a key is in a hash, +so your code is the correct translation if you mimic Perl's undefined +value with Python's `None', but most of the time, this is not required. + +> b) RE's. +> [perl] +> if ($mytext !~ /^\s$/) +> +> [python] +> if not (re.match('^\s$'), mytext) + +Your Python code unconditionally executes the `false' branch of the +`if' statement. I hope this is the correct translation: + + # Execute this once at the beginning of the program. + single_space = re.compile(r'^\s$') # use a r'aw' string + + # Later on, you can try to match this regexp to a string: + if not single_space.match(mytext): + +> Since I know neither perl nor chinese, it would be nice if somebody +> could help me remove one of the variables in my debugging. + +I see. I've tried to install a Chinese text processing environment +for a friend. ;) + + + + diff --git a/demo/ermis-f/python_m/cur/0078 b/demo/ermis-f/python_m/cur/0078 new file mode 100644 index 00000000..198d1bf9 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0078 @@ -0,0 +1,42 @@ +From: MHammond at skippinet.com.au (Mark Hammond) +Date: Tue, 13 Apr 1999 17:41:35 +1000 +Subject: Python without registry entries +References: <370fb711.28093946@news.demon.co.uk> <7eol16$1l2$1@m2.c2.telstra-mm.net.au> <37121820.3758204@news.netmeg.net> +Message-ID: <7eusdh$s3o$1@m2.c2.telstra-mm.net.au> +X-UID: 78 + +Les Schaffer wrote in message <37121820.3758204 at news.netmeg.net>... +>On Sun, 11 Apr 1999 08:57:49 +1000, "Mark Hammond" wrote: +> +>>You can. Python does not _need_ the registry for anything. +> +>a followup question: +> +>I just switched over our windows machine to NT from win98, and did a +>clean install so the registry is fresh spanking new... +> +>is there some way to restore the registry settings for python and the +>win32 extensions without downloading the whole darn thing again? +>pythonwin doesnt run right now because win32ui.pyd is not found. in + +There is a script "regsetup.py" installed in the win32 directory somewhere. +This attempts to resurrect the registry. It hasnt been tested for a while, +but it should work. + +Something like: +python.exe regsetup.py +will setup the core stuff, and + +python.exe regsetup.py --pythonwin +should get Pythonwin running. + +[In fact, you hit a bug anyway - pythonwin _should_ be capable of running +without any special registry too - and now can - as of 124.] + +Mark. + + + + + + diff --git a/demo/ermis-f/python_m/cur/0079 b/demo/ermis-f/python_m/cur/0079 new file mode 100644 index 00000000..3c1018f0 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0079 @@ -0,0 +1,27 @@ +From: garryh at att.com (Garry Hodgson) +Date: Tue, 13 Apr 1999 19:56:40 GMT +Subject: Python for embedded controllers? +References: <370de606.77891472@news.oh.verio.com> +Message-ID: <3713A178.B03F1F1D@att.com> +X-UID: 79 + +Ken McCracken wrote: + +> Neal Bridges in Toronto, Ont. has been developing an onboard Forth +> compliler for the Pilot for a while. People seem pretty well enthused +> about it and it is making converts to the Forth language and reattracting +> programmers who had given up on Forth. + +i have very fond memories of forth, with which i wrote tons +of software on my old atari 800. i can't imagine ever going +back to it, though. + +-- +Garry Hodgson seven times down +garry at sage.att.com eight times up +Software Innovation Services +AT&T Labs - zen proverb + + + + diff --git a/demo/ermis-f/python_m/cur/0080 b/demo/ermis-f/python_m/cur/0080 new file mode 100644 index 00000000..fba10faa --- /dev/null +++ b/demo/ermis-f/python_m/cur/0080 @@ -0,0 +1,35 @@ +From: claird at Starbase.NeoSoft.COM (Cameron Laird) +Date: 27 Apr 1999 15:39:22 -0500 +Subject: WARNING: AIX and dynamic loading. +References: <7g4i77$qif$1@nnrp1.dejanews.com> +Message-ID: <7g579q$cao$1@Starbase.NeoSoft.COM> +X-UID: 80 + +In article <7g4i77$qif$1 at nnrp1.dejanews.com>, +Jakob Schiotz wrote: +> +> +>Hi everybody, +> +>I would like to warn developers using AIX against this trap waiting +>for us to fall into. (I am cross-posting this to the SWIG mailing list +>although it is not strictly a SWIG problems, as SWIG users will be +>doing just the kind of stuff that gets you into trouble). + . + . + . +There are several issues specific to dynamic loading +under AIX that are quite independent of Python. Your +caching example is one I've never heard of before, +but the comp.lang.tcl crowd knowledgeable about the +Stubs project might be able to help you if you run +into more problems. I agree that SWIG is an apt +locus for such discussion. +-- + +Cameron Laird http://starbase.neosoft.com/~claird/home.html +claird at NeoSoft.com +1 281 996 8546 FAX + + + + diff --git a/demo/ermis-f/python_m/cur/0081 b/demo/ermis-f/python_m/cur/0081 new file mode 100644 index 00000000..809cfa18 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0081 @@ -0,0 +1,28 @@ +From: guido at CNRI.Reston.VA.US (Guido van Rossum) +Date: Tue, 13 Apr 1999 20:23:37 -0400 +Subject: Python 1.5.2 -- final version released +Message-ID: <199904140023.UAA24831@eric.cnri.reston.va.us> +X-UID: 81 + +On April 13, the final version of Python 1.5.2 was released. Thanks +to all who reported problems with the release candidate! + +This will conclude the 1.5 development cycle; while I may release some +essential patches later, my main development focus will be on Python +1.6 (with 2.0 on the horizon; 1.6 will probably be the last of the 1.x +versions). + +Go to http://www.python.org/1.5/ for more info, or download directly: + + ftp://ftp.python.org/pub/python/src/py152.tgz (source, 2.5M) + + ftp://ftp.python.org/pub/python/win32/py152.exe (Windows installer, 5.0 M) + +Per tradition, I will disappear from the face of the earth for a few +days -- see you all on Monday! + +--Guido van Rossum (home page: http://www.python.org/~guido/) + + + + diff --git a/demo/ermis-f/python_m/cur/0082 b/demo/ermis-f/python_m/cur/0082 new file mode 100644 index 00000000..8542d86a --- /dev/null +++ b/demo/ermis-f/python_m/cur/0082 @@ -0,0 +1,98 @@ +From: guido at CNRI.Reston.VA.US (Guido van Rossum) +Date: Sat, 10 Apr 1999 14:51:06 -0400 +Subject: 1.5.2c1 will not compile on Windows NT SP4 with VC++ 6.0 SP1 +In-Reply-To: Your message of "Sat, 10 Apr 1999 18:42:10 BST." + <000001be8379$76536190$060110ac@barrynt.private> +References: <000001be8379$76536190$060110ac@barrynt.private> +Message-ID: <199904101851.OAA04654@eric.cnri.reston.va.us> +Content-Length: 2558 +X-UID: 82 + +> I extracted the 1.5.2c1 kit into P:\ + +Where did you get it? + +> python15 error +> -------------------- +> VC++ 6.0 gives this error. +> +> Fatal error C1083: Cannot open source file: +> 'P:\Python-1.5.2c1\Modules\reopmodule.c': No such file or directory +> +> The file reopmodule.c is not in the kit. + +Hm... I just tried this with VC++ 6.0 (not sure which service pack) +and there's no mention of reopmodule.c -- indeed that module was +deleted ages ago. + +Where exactly did you get the project file you used? Perhaps you had +an older project file (e.g. from an earlier alpha or beta release) +lying around? + +> Having removed reopmodule.c from the project I get a link error +> +> LINK : fatal error LNK1104: cannot open file ".\PC\python_nt.def" +> +> This file is also missing. + +This file is no longer distributed. If you use the project files for +VC++ 5.0 that are distributed in the PCbuild directory (VC++ 6.0 will +convert them for you) you will note that it is no longer referenced. + +> Removing python_nt.def from the project reveals files that need to be added +> to the project: +> +> object\bufferobject.c +> pc\initwinsound.c +> modules\_localemodule.c +> +> LINK needs winmm.lib added to it. + +These things have all been corrected in the distributed project files. + +> Now I get a python15 built. +> +> pyhon error +> ---------------- +> The project cannot find python.c +> +> fatal error C1083: Cannot open source file: +> 'P:\Python-1.5.2c1\python\Modules\python.c': No such file or directory +> +> There is a extra "python" directory that is not in the kits layout. +> Fixed by replacing with 'P:\Python-1.5.2c1\Modules\python.c' +> +> Same path problem with python15.lib. +> Fixed by replacing with P:\Python-1.5.2c1\vc40\python15.lib +> +> Now I get a python.exe + +Again, I wonder where you got the kit... + +> _tkinter +> ---------- +> The tk and tcl libs are named tk80.lib and tcl80.lib not tk80vc.lib and +> tcl80vc.lib. + +Ditto -- your kit is not the set of workspace/project files I'm +distributing. (Unless I've accidentally distributed two sets. Which +set are you using?) + +> I used the Tcl/Tk that the 1.5.2c1 installation put on my system. +> +> Now I have _tkinter.dll +> +> How was the kit for Windows built given all the missing or misnamed files? +> Or is this a side effect of using VC++ 6.0? +> +> I also notice that the python.exe was built 8 apr 1999 but report sa dated +> of 12 Mar 1999 +> on the interactive command line. + +Sounds like you have an old Python build lying around. + +--Guido van Rossum (home page: http://www.python.org/~guido/) + + + + diff --git a/demo/ermis-f/python_m/cur/0083 b/demo/ermis-f/python_m/cur/0083 new file mode 100644 index 00000000..ae808c59 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0083 @@ -0,0 +1,39 @@ +From: gmcm at hypernet.com (Gordon McMillan) +Date: Wed, 7 Apr 1999 03:12:31 GMT +Subject: Embedding python question: PyRun_String only returns None no +In-Reply-To: +References: +Message-ID: <1288667549-75228395@hypernet.com> +Content-Length: 1034 +X-UID: 83 + +Dave Kuhlman replies to a query about PyRun_SimpleString... + +> When you embed Python in an application, the application often +> exposes functions that are callable from Python scripts. You could +> provide a function named setReturnValue(value), which when called, +> passed a Python object (the value). The script calls this function, +> and then, when it exits, the embedding application (the caller of +> PyRun_String or PyRun_SimpleString) uses the Python value saved by +> this function. + +With all the error checking and some app specific logic removed, +here's some code that loads a module and calls a specific function in +that module: + + module = PyImport_ImportModule("mymodule"); + moduledict = PyModule_GetDict(module); + func = PyDict_GetItemString(moduledict, "CheckMenu"); + args = Py_BuildValue("(ss)", "spam", "eggs"); + retval = PyEval_CallObjectWithKeywords(func, args, (PyObject + *)NULL) + Py_XINCREF(retval); + rc = PyArg_Parse(retval, "s", &str); + Py_XDECREF(retval); + Py_XDECREF(module); + +- Gordon + + + + diff --git a/demo/ermis-f/python_m/cur/0084 b/demo/ermis-f/python_m/cur/0084 new file mode 100644 index 00000000..2619998a --- /dev/null +++ b/demo/ermis-f/python_m/cur/0084 @@ -0,0 +1,33 @@ +From: jefftc at leland.Stanford.EDU (Jeffrey Chang) +Date: Fri, 30 Apr 1999 00:50:00 -0700 +Subject: Oracle Call Interface +In-Reply-To: <7gb3hn$lse$1@nnrp1.dejanews.com> +References: <7gb3hn$lse$1@nnrp1.dejanews.com> +Message-ID: +X-UID: 84 + +> If anyone has experience writing applications directly to the Oracle Call +> Interface (OCI), in Python or JPython please send me examples or references on +> how to do it. + +Yuck! What are you planning to do? Do you really really need to write +directly to the OCI or can you use one of the available Oracle extension +modules? + +About a year ago, I used the oracledb module from Digital Creations with +Oracle7. It's very nice, but not optimized, and thus slow for large +queries. Since then, Digital Creations has made DCOracle +(http://www.digicool.com/DCOracle/; their commercial extension module) +open source, so I guess that will replace oracledb. I haven't looked at +it, but according to the FAQ, it's "much faster." + +I strongly advise you to use an extension module or JDBC if at all +possible. Writing to the OCI is extremely ugly -- all the stuff we try to +avoid by using python! + +Jeff + + + + + diff --git a/demo/ermis-f/python_m/cur/0085 b/demo/ermis-f/python_m/cur/0085 new file mode 100644 index 00000000..a41e46ff --- /dev/null +++ b/demo/ermis-f/python_m/cur/0085 @@ -0,0 +1,25 @@ +From: MHammond at skippinet.com.au (Mark Hammond) +Date: Sat, 24 Apr 1999 09:53:12 +1000 +Subject: Windows install has problems. Guido asked that I use this newsgroup to discus further +References: <924039873.18221.0.nnrp-12.9e982a40@news.demon.co.uk> <924040766.18823.0.nnrp-12.9e982a40@news.demon.co.uk> <371FAE0F.43B33158@siosistemi.it> <924903282.24080.0.nnrp-10.9e982a40@news.demon.co.uk> +Message-ID: <7fr133$56e$1@m2.c2.telstra-mm.net.au> +X-UID: 85 + +Barry Scott wrote in message +<924903282.24080.0.nnrp-10.9e982a40 at news.demon.co.uk>... +> I think its important that python without add on's can access the +>registry under +> Windows. It is a fundamental requirement on Windows. + +FYI, Guido has basically agreed that the Win32 registry functions (and +likely support for native Windows handles) will move into the core in the +1.6 timeframe. + +Mark. + + + + + + + diff --git a/demo/ermis-f/python_m/cur/0086 b/demo/ermis-f/python_m/cur/0086 new file mode 100644 index 00000000..06a9e4b4 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0086 @@ -0,0 +1,23 @@ +From: bhowes at cssun3.corp.mot.com (Brad Howes) +Date: 29 Apr 1999 10:26:16 -0700 +Subject: Python Powered Car Audio +Message-ID: +X-UID: 86 + +Check out http://www.empeg.com. It describes a cool in-dash MP3 player +running Linux. On the Tech page, I found this: + + The unit's UI is written in Python, + allowing Python-esque users to add + features and giving great flexibility in + the way the unit works. + + +-- +Brad Howes bhowes at motorola.com +Principal Compass Hacker Work: +1 602 446 5219 +Motorola Cell: +1 602 768 0735 + + + + diff --git a/demo/ermis-f/python_m/cur/0087 b/demo/ermis-f/python_m/cur/0087 new file mode 100644 index 00000000..35f087de --- /dev/null +++ b/demo/ermis-f/python_m/cur/0087 @@ -0,0 +1,32 @@ +From: akuchlin at cnri.reston.va.us (Andrew M. Kuchling) +Date: Mon, 19 Apr 1999 13:03:35 GMT +Subject: How to merge data in a existant file +In-Reply-To: <7feqbf$pr6$1@nnrp1.dejanews.com> +References: <7feqbf$pr6$1@nnrp1.dejanews.com> +Message-ID: <14107.10521.542022.542456@amarok.cnri.reston.va.us> +X-UID: 87 + +fquiquet at lemel.fr writes: +>I know how to write data in a new file : +>I don't know what is the function that permit to add data whithout erase +>existing data. + + Open the file in append mode, with a mode string of 'a' (or +'ab' for a binary file) instead of 'w'. + +>>> f = open('test-file', 'w') ; f.write('abc\n') ; f.close() +>>> f = open('test-file', 'a') ; f.write('abc\n') ; f.close() +>>> open('test-file', 'r').read() +'abc\012abc\012' + +-- +A.M. Kuchling http://starship.python.net/crew/amk/ +The NSA regularly lies to people who ask it for advice on export control. They +have no reason not to; accomplishing their goal by any legal means is fine by +them. Lying by government employees is legal. + -- John Gilmore + + + + + diff --git a/demo/ermis-f/python_m/cur/0088 b/demo/ermis-f/python_m/cur/0088 new file mode 100644 index 00000000..ebb56c52 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0088 @@ -0,0 +1,68 @@ +From: call at 83331002.wong (Mr Wong) +Date: 29 Apr 1999 08:59:32 GMT +Subject: make your first $1 million +Message-ID: <7g971k$cje$11125@hfc.pacific.net.hk> +Content-Length: 2497 +X-UID: 88 + + HANG CHEONG INTERNATIONAL + +A new successful marketing tactic to increase your sales : + + Do you always have problems to find channels to increase your sales? +The advertise in newspapers, magazines and doing some Direct Mailing, but +still can not achieve you goal, so why still dumping your money to a media +that could not help your sales and not using the most efficient and modern +way of selling stragies E-MAIL.Now many big companies are using this, +because it is economical, fast and efficient, and the other way is selling +by fax through the internets, and the result are remarkable. + + According to report pointed out that the ratio of internet selling is +1,000:1.5 that is 20,000,000 names x 0.0015 = 30,000. These 30,000 clients +will buy from you and if your net profit is $50 that is to say your total +profit is: + + HK$50 x 30,000 = HK$1,500,000. 1.5 Million Dollars !!! + +How to make your first 1 million in your life, now it is quite possible that +you can make your first 1 million within one month. But the thing is ??Are +you selling the right products, through the right media.?? + +*************************************************************************** +A full set of sales tool with 20 million of client??s names will make you a SUPER SALES. + +A professional mail software (no need to go through any ISP Mail Server,making your computer +as the professional Mail Server, its super speed. Easy to use. + +* 500,000 E-mail addresses in Hong Kong +* 1,000,000 E-mail address in Taiwan +* 20,000,000 E-mail address in the World + (latest revised on 10th March 1999.) + +* A free revision one year (around 100,000 every month) + +* Free of charge of 200,000 names of fax addresses in Hong Kong for 1999. + +* Door to door installation * Technical support * software replacement. + +* Using CD-R dish and CD-AutoRun Menu. + +(Only HK$680 for one full set) for unlimited use. + +HK$680 is very small amount, you may not need it now but you will sure to use it when you +have every thing ready. + +*************************************************************************** +If you need any E-mail address, call us any time!! +*************************************************************************** +Don??t miss this chance, you may make lots of money with this new marketing technique. + +Booking Hotline : (852) 8333 1002 Mr Wong + +2ND FL.FRONT BLOCK HING YIP HOUSE.24,SAI YEE ST,HK +_________________________________________________________________________________________ + + + + + diff --git a/demo/ermis-f/python_m/cur/0089 b/demo/ermis-f/python_m/cur/0089 new file mode 100644 index 00000000..114a7009 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0089 @@ -0,0 +1,54 @@ +From: tim_one at email.msn.com (tim_one at email.msn.com) +Date: Thu, 22 Apr 1999 20:19:48 GMT +Subject: Time complexity of dictionary insertions +References: <371F2125.BEC5F892@fzi.de> +Message-ID: <7fo08u$4j2$1@nnrp1.dejanews.com> +Content-Length: 1417 +X-UID: 89 + +In article <371F2125.BEC5F892 at fzi.de>, + Oliver Ciupke wrote: +> As I understood from the Python documentation, dictionaries are +> implemented as extensible hash tables. + +Yes. + +> What I didn't find either in the references or in the FAQ is: what is +> the actual time complexity for an insertion into a dictionary? + +Min O(1), Max O(N), Ave O(1). If the hash function is doing a terrible job +(e.g. maps every key to the same hash value), make those all O(N). + +> Do the old contents (probably references) + +Yes. + +> have to be copied when extending (doubling?) + +Approximately doubling, yes. + +> the dictionary? + +Right. + +> I guess updates and deletions have constand complexity, right? + +No; see above for insertion. Deletion is O(1) always, because Python doesn't +try to shrink the table by magic (if you stick in a million keys and then +delete them, the table will still contain a million "this entry isn't being +used" markers). + +> If the complexity of insertion is something like n*log(n), does anyone +> know measurements "how linear" the real measured times are? + +In practice, with a non-pathological hash function + key distribution combo, +insertion & deletion act like O(1) on average. + +for-more-details-see-the-source-codely y'rs - tim + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/0090 b/demo/ermis-f/python_m/cur/0090 new file mode 100644 index 00000000..d48c11ae --- /dev/null +++ b/demo/ermis-f/python_m/cur/0090 @@ -0,0 +1,85 @@ +From: jmrober1 at ingr.com (Joseph Robertson) +Date: Fri, 16 Apr 1999 10:37:24 -0500 +Subject: Windows install has problems. +References: <924039873.18221.0.nnrp-12.9e982a40@news.demon.co.uk> +Message-ID: <37175933.5477D57F@ingr.com> +Content-Length: 2637 +X-UID: 90 + +Guido, didn't I write you a hack for this? + +I'll look on my home machine later, but I think I did. Also, why doesn't the +Tcl install do this correctly? We should complain to them about it. + +Anyway, I am sure I can fix this using wise. + +Joe Robertson +jmrobert at ro.com + + + +Barry Scott wrote: + +> THis is Guido's reply to my comments that tcl80.dll is not found +> by IDLE on a default installation. +> +> > > > Running "IDLE (Python GUI)" reports that tcl80.dll is +> > > > not in my path then the shell comes up and I can +> > > > use Tkinter from the shell. +> > > > +> > > > Just in case this might be involved my Windows NT system +> > > > is on G: not C:. +> > > +> > > To solve this one, I think you'll have to edit your autoexec.bat to +> > > add the Tcl directory (containing that DLL) to the PATH variable. For +> > > various reasons I do not believe it is a good idea to copy the Tcl/Tk +> > > DLL files into the Python directory, nor do I think it is possible to +> > > reliably edit autoexec.bat in the installer. Instead, Tkinter.py +> > > imports a hack module, FixTk.py, which searches for tcl80.dll in a few +> > > places and then patches the PATH environment variable of the running +> > > process, but this is not failsafe either. :-( +> > +> > It would be nice if I did not have to edit the path manually. +> > Suggest that the install edits the path or you use the registry +> > to find the tcl80.dll image. +> +> I wish I could. The installer is very stupid. Windows sucks :-( +> +> > 1) The PATH is a registry key on NT. I don't have an autoexec.bat, +> > isn't for MS-DOS compatibility only these days? +> +> No, it's still needed on Windows 98 and 98. +> +> > The machines PATH is in +> > +> > HKEY_LOCAL_MACHINE\CurrentControlSet\Control\Session Manager\Environment +> > +> > 2a) I notice that HKEY_CLASSES_ROOT\TclShell\shell\open\command +> > contains a default value which is how to run wish. e.g. +> > +> > G:\PROGRA~1\Tcl\bin\wish80.exe "%1" +> > +> > tcl80.dll is in the same dir as wish80.exe. +> > +> > 2b) +> HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\SharedDlls +> > lists all the shared files on the system. There is an value +> > "G:\Program Files\Tcl\bin\tcl80.dll" with the date 0x0000001 against it. +> > +> > 2c) HKEY_LOCAL_MACHINE\SOFTWARE\Scriptics\Tcl\8.0 +> > contains the default value field with the data G:\PROGRA~1\Tcl +> > +> > The DLL being in data + "\tcl80.dll". +> > +> > BArry +> Please take it up on the newsgroup -- there are many people with +> similar interests and more understanding of Windows than I have! +> +> --Guido van Rossum (home page: http://www.python.org/~guido/) + + + + + + + diff --git a/demo/ermis-f/python_m/cur/0091 b/demo/ermis-f/python_m/cur/0091 new file mode 100644 index 00000000..b36d3de4 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0091 @@ -0,0 +1,36 @@ +From: mli389 at merle.acns.nwu.edu (Matthew T Lineen) +Date: 15 Apr 1999 20:40:30 GMT +Subject: HTML Authentication with Python +Message-ID: <7f5iru$rlm@news.acns.nwu.edu> +X-UID: 91 + +I am currently running python on an Windows NT Server. We only want certain +pages to be accessed by people with accounts on the server in order to +update a database through python. Using this code: + +def main(): + if not os.environ.has_key("REMOTE_USER"): + print "HTTP/1.0 401 Access Denied" + print "Status: 401 Authenication Required" + print "WWW-authenticate: Basic;" + print "Content-type: text/html\n\n\n" + else: + print "Worked" + +I was able to get an authentication box to pop up in both netscape and ie, +but when a user who is not an administrator tries to authenticate it +doesn't accept the username / password. + +Is this a good way to go about authentication in python or is there another +library to interface with the browsers and the NT user database? +Furthermore, I'm relatively sure that the problem lies in user permissions, +but I have no idea where to begin troubleshooting. Where is the os.environ +'kept'? + +Any help would be appriciated. + +Matthew Lineen + + + + diff --git a/demo/ermis-f/python_m/cur/0092 b/demo/ermis-f/python_m/cur/0092 new file mode 100644 index 00000000..ecb29235 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0092 @@ -0,0 +1,20 @@ +From: richard at folwell.com (Richard Folwell) +Date: Thu, 15 Apr 1999 07:56:58 GMT +Subject: Please unsubscribe me +Message-ID: <01BE871E.C5505F20.richard@folwell.com> +X-UID: 92 + +Thanks, + +Richard Folwell + +Riverside Information Systems Ltd +Tel: +44 958 900 549 +Email: richard at folwell.com +Fax: +44 171 681 3385 + + + + + + diff --git a/demo/ermis-f/python_m/cur/0093 b/demo/ermis-f/python_m/cur/0093 new file mode 100644 index 00000000..ef89ba8a --- /dev/null +++ b/demo/ermis-f/python_m/cur/0093 @@ -0,0 +1,40 @@ +From: gmcm at hypernet.com (Gordon McMillan) +Date: Fri, 23 Apr 1999 01:55:55 GMT +Subject: try vs. has_key() +In-Reply-To: +References: +Message-ID: <1287289735-37704702@hypernet.com> +X-UID: 93 + +Aahz asks: + +> I've seen roughly half the people here doing +> +> try: +> dict[key].append(foo) +> except: +> dict[key]=[foo] +> +> with the other half doing +> +> if dict.has_key(key): +> dict[key].append(foo) +> else: +> dict[key]=[foo] +> +> Can people explain their preferences? + +I have done both. Option 1 requires slightly less typing, but is only +better when you (in practice) have a dict with a small number of keys +and rather longish lists. (In Python, "try" is damned near free, and +"except" is a lot cheaper than, say, C++'s "catch", but still costs a +good deal more than has_key.) + +Conscientious practice of option 2, of course, allows you to look St. +Peter in the eye and demand entrance without fear of contradiction... + +- Gordon + + + + diff --git a/demo/ermis-f/python_m/cur/0094 b/demo/ermis-f/python_m/cur/0094 new file mode 100644 index 00000000..dbaa7c62 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0094 @@ -0,0 +1,44 @@ +From: akuchlin at cnri.reston.va.us (Andrew M. Kuchling) +Date: Wed, 28 Apr 1999 11:11:07 -0400 (EDT) +Subject: try vs. has_key() +In-Reply-To: <37247ea3.494305@news.jpl.nasa.gov> +References: + + + <37247ea3.494305@news.jpl.nasa.gov> +Message-ID: <14119.9202.870049.51888@amarok.cnri.reston.va.us> +X-UID: 94 + +William H. Duquette writes: +>>>> d = {} +>>>> a = 'Foo' +>>>> d[a] = d.get(a, []).append('Bar') +>>>> d +>{'Foo': None} +>I'd have expected to see {'Foo': 'Bar'}, but that's not what I get. + + The .append() method only returns None, not the list you've +just appended to. + +>>> L = [] +>>> print L.append(2) +None +>>> L +[2] + +You'd want something like: + +dummy = d[a] = d.get(a, []) +dummy.append('Bar') + +-- +A.M. Kuchling http://starship.python.net/crew/amk/ +When I originally designed Perl 5's OO, I thought about a lot of this stuff, +and chose the explicit object model of Python as being the least confusing. So +far I haven't seen a good reason to change my mind on that. + -- Larry Wall, 27 Feb 1997 on perl5-porters + + + + + diff --git a/demo/ermis-f/python_m/cur/0095 b/demo/ermis-f/python_m/cur/0095 new file mode 100644 index 00000000..48c9fa91 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0095 @@ -0,0 +1,25 @@ +From: davidcuny at yahoo.fr (davidcuny at yahoo.fr) +Date: Mon, 19 Apr 1999 09:06:07 GMT +Subject: Database search engine +Message-ID: <7ferls$qrj$1@nnrp1.dejanews.com> +X-UID: 95 + +Hello, + +I'm doing an Intranet Web site with a database (Apache, DB2 and NT). +I'd like to realize a quite complex search engine on the database : +- the user enters mutli keywords +- there exists a table of non significant words +- there exists a table of words that have meaning: "kind" and "sort" +Where can I find an algorithm or, the best, Perl code for that kind of work? +Is Perl the good tool to do that (Perl??,java)?? +thanks + +David + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/0096 b/demo/ermis-f/python_m/cur/0096 new file mode 100644 index 00000000..b109798e --- /dev/null +++ b/demo/ermis-f/python_m/cur/0096 @@ -0,0 +1,66 @@ +From: moshez at math.huji.ac.il (Moshe Zadka) +Date: Fri, 23 Apr 1999 14:13:59 +0300 +Subject: try vs. has_key() +In-Reply-To: +References: +Message-ID: +Content-Length: 1457 +X-UID: 96 + +Note: +This article is a non-commercial advertisement for the ``get'' method +of dictionary objects. +Brought to you by the object None and the method .append. + +On Thu, 22 Apr 1999, Darrell wrote: + +> My experience shows that throwing an exception is slower. +> +> Aahz Maruch wrote in message +> news:aahzFAM4oJ.M7M at netcom.com... +> > I've seen roughly half the people here doing +> > + + + +It depends on the expected hit/miss ratio. + +If you have many hits, few misses -- use the first +Few hits, many misses -- use the second. + +Best way is to use +(for example, counting) + +d={} +for word in words: + d[word]=d.get(word, 0)+1 + +Or, for logging: +d={} +for word in words: + first_two=word[:2] + d[first_two]=d.get(first_two, []).append(word) + +Unfortunately, few people seem to know about the ``get'' method, which +is really good. +>From the docs: + + a.get(k[, f]) the item of a with key k (4) + (4) + Never raises an exception if k is not in the map, instead it + returns f. f is optional, when not provided and k is not in the + map, None is returned. + +This makes dictionary types behave in a Perl-hash-like manner, which is +sometimes a good thing. + +Note that this idiom is (I think) more efficient, and shorter. +-- +Moshe Zadka . +QOTD: What fun to me! I'm not signing permanent. + + + + + + diff --git a/demo/ermis-f/python_m/cur/0097 b/demo/ermis-f/python_m/cur/0097 new file mode 100644 index 00000000..b5f20b6b --- /dev/null +++ b/demo/ermis-f/python_m/cur/0097 @@ -0,0 +1,54 @@ +From: bkc at murkworks.com (Brad Clements) +Date: Wed, 21 Apr 1999 18:55:03 -0400 +Subject: interfacing to Dragon from a Python app +References: <000801be89dd$d407a0c0$ed9e2299@tim> +Message-ID: <7fll1r$6kn$1@news.clarkson.edu> +Content-Length: 1430 +X-UID: 97 + +I have used microsoft's iit product. What attracted me was the price.. +(Also, I have T3 access) + +It DOES work, though you need a good headset for dictation to work well. I +guess that's generally true of everything else anyway.. + +I'm planning on using it with Python to "read" imap messages to me via +telephone... + + + +Frank Sergeant wrote in message ... +>In article <000801be89dd$d407a0c0$ed9e2299 at tim>, +>"Tim Peters" wrote: +> +>> FYI, people curious about speech recognition under Windows might want to +>> give Microsoft's implementation a try; see the little-known +>> +>> http://www.microsoft.com/iit/ +> +>Thanks for the pointer. I browsed around the site for awhile. +> +>> This is not for the Windows-ignorant, weak-hearted, or slow-modem'ed +, +> +>I couldn't quite bring myself to start the 21MB download. I'm still +>pondering my approach to the whole Speech Recognition (SR) thing. I'm +>gradually getting some hardware set up that might support it and +>considering the Dragon Preferred product (around $135 somewhere on +>the net) versus saving up for the Dragon developer's kit. Third in +>line, I guess, is Microsoft's 21MB download. Although ... +> +>I'm also thinking of overall priorities -- in that that SR might +>not be able to make a silk purse out of a sow's ear (then again, +>a sow's ear may be better at SR than a silk purse). +> +> +> -- Frank +> frank.sergeant at pobox.com +> + + + + + + diff --git a/demo/ermis-f/python_m/cur/0098 b/demo/ermis-f/python_m/cur/0098 new file mode 100644 index 00000000..ced26f98 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0098 @@ -0,0 +1,84 @@ +From: llwo at dbtech.net.nospam (Karl & Mel) +Date: Mon, 19 Apr 1999 20:39:46 -0500 +Subject: calldll windll instantiation +Message-ID: <371bdcbf.0@news.dbtech.net> +Content-Length: 1735 +X-UID: 98 + +Need some help. +I think?(scarry moment)? that I need to create more that one instance of a +dll. + +1. Can this be done? +2. Is my sample even close? + + + +"""gm_class quick wrapper of dll functions""" + +import windll +import time + +class test: + + def __init__(self): + self.gm=windll.module('GM4S32') + + def load_bde(self, SysDir='c:\\program files\\goldmine', + GoldDir='c:\\program files\\goldmine\\gmbase', + CommonDir='c:\\program files\\goldmine\\demo', + User='PERACLES', + Password=''): + start=time.time() + (SysDir, GoldDir, CommonDir, + User, Password)=map(windll.cstring,(SysDir, GoldDir, CommonDir, + User, Password)) + return (self.gm.GMW_LoadBDE(SysDir, GoldDir, CommonDir, User, +Password), "Startup Time: " + str(time.time()-start)) + + def unload_bde(self): + return self.gm.GMW_UnloadBDE() + +...other defs... + + +>>> import gm_class +>>> a=gm_class.test() +>>> b=gm_class.test() +>>> a + +>>> b + +>>> a.gm + +>>> b.gm + +>>> a.load_bde() # This works +(1, 'Startup Time: 0.490000009537') +>>> a.gm + +>>> b.gm + +>>> b.load_bde() # This fails but should work ;-( +(0, 'Startup Time: 0.0') +>>> a.gm + +>>> b.gm + +>>> a.gm==b.gm # Don't know if this is correct +1 +>>> a==b +0 +>>> +>>> gm_class.windll.dump_module_info() +-------------------- +WINDLL Function Call Stats: +--- --- +2 GMW_LoadBDE +>>> + + + + + + diff --git a/demo/ermis-f/python_m/cur/0099 b/demo/ermis-f/python_m/cur/0099 new file mode 100644 index 00000000..178b6670 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0099 @@ -0,0 +1,22 @@ +From: catlee at globalserve.net (Chris AtLee) +Date: Thu, 22 Apr 1999 08:12:06 -0400 +Subject: stdout in a restricted environment +Message-ID: <7fn3rs$1v9$1@whisper.globalserve.net> +X-UID: 99 + +I'm trying to make a program that will enable users to connect to a server +running a python interpreter and be able to program in a restricted +environment in that interpreter. The rexec object has methods called s_exec +and s_eval which are supposed to use secure forms of the standard I/O +streams, but I can't redefine them to be something else (specifically, an +object that sends the response back to the client) Any pointers on how to +go about redirecting the standard I/O streams from a restricted environment? + +Cheers, +Chris + + + + + + diff --git a/demo/ermis-f/python_m/cur/0100 b/demo/ermis-f/python_m/cur/0100 new file mode 100644 index 00000000..0df1c120 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0100 @@ -0,0 +1,65 @@ +From: tim_one at email.msn.com (Tim Peters) +Date: Sat, 3 Apr 1999 07:54:54 GMT +Subject: W9x "import" case sensitivity +In-Reply-To: <37038658.FEAFF01F@palladion.com> +References: <37038658.FEAFF01F@palladion.com> +Message-ID: <000301be7da7$4277a3e0$879e2299@tim> +Content-Length: 1968 +X-UID: 100 + +[Tim sez he's never had a problem with case-sensitive imports under Win95, + but that people at work do; speculates it may be due to non-Windows things, + like network servers and old source-control systems, that change filename + case seemingly at random +] + +[Tres Seaver] +> On NT 4.0 SP3, with Python installed on NTFS E: drive: +> +> Python 1.5.2b1 (#0, Dec 10 1998, 11:29:56) [MSC 32 bit (Intel)] on win32 +> Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam +> >>> import SYS +> Traceback (innermost last): +> File "", line 1, in ? +> import SYS +> ImportError: No module named SYS +> >>> import sys +> >>> import HTMLLIB +> Traceback (innermost last): +> File "", line 1, in ? +> import HTMLLIB +> NameError: Case mismatch for module name HTMLLIB +> (filename E:\tools\Python\Lib\htmllib.py) +> >>> import htmllib +> >>> +> +> (Note the different error messages.) + +This is not what I mean by having "a problem" -- this is working for you the +same way as it works under e.g. Unix, which is the way it's documented to +work. + +"A problem" would be if Python griped on the + + import htmllib + +line too, where the import-name case *does* match the distributed filename +case. That's what I've seen happen at work, where the distributed filename +case somehow or other "gets changed" by "something", so that the *correct* +import statement doesn't work. That's never happened to me. + +The different error msgs you're getting are due to sys being a builtin +module and not having a *file* named sys.py, Sys.py, SYs.py, sYs.py, sYS.py, +syS.py, or sYs.py on your PYTHONPATH. Create a file with one of those +names, and you'll get NameError instead of an ImportError when doing "import +SYS". Python doesn't check the builtin modules name for case mismatches, +and that's all that's going on here -- it may be seen as inconsistent, but +this too works the same way across all platforms. + +caseclarifyingly y'rs - tim + + + + + + diff --git a/demo/ermis-f/python_m/cur/0101 b/demo/ermis-f/python_m/cur/0101 new file mode 100644 index 00000000..2ab2b56c --- /dev/null +++ b/demo/ermis-f/python_m/cur/0101 @@ -0,0 +1,27 @@ +From: trussarv at cirano.umontreal.ca (Vincent Trussart) +Date: Tue, 06 Apr 1999 20:01:54 -0400 +Subject: is imaplib 8bit clean? +Message-ID: <370AA072.5D116DD2@cirano.umontreal.ca> +X-UID: 101 + +I am trying to fetch headers from messages on a imap4 server +that contains french characters (???). Instead of getting +the correct message I get things like + +=?ISO-8859-1?Q?Soir=E9e?= + + +How should I handle this? + +thanks a lot + +(i would prefer an answer by email) +-------------- next part -------------- +A non-text attachment was scrubbed... +Name: trussarv.vcf +Type: text/x-vcard +Size: 228 bytes +Desc: Card for Vincent Trussart +URL: + + diff --git a/demo/ermis-f/python_m/cur/0102 b/demo/ermis-f/python_m/cur/0102 new file mode 100644 index 00000000..6d0dc847 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0102 @@ -0,0 +1,17 @@ +From: john at oreilly.com (John Dockery) +Date: Mon, 12 Apr 1999 21:56:30 GMT +Subject: Message from O'Reilly - It's Released!!! +Message-ID: <37126b27.79691844@news.shore.net> +X-UID: 102 + +Learning Python was released on 4/9/99. +Bookstores should be seeing it shortly. + +For the two people who read this newsgroup +and don't already have it bookmarked: +http://www.oreilly.com/catalog/lpython + + + + + diff --git a/demo/ermis-f/python_m/cur/0103 b/demo/ermis-f/python_m/cur/0103 new file mode 100644 index 00000000..633bc9f6 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0103 @@ -0,0 +1,52 @@ +From: joe at strout.net (Joe Strout) +Date: Sat, 10 Apr 1999 10:59:09 -0700 +Subject: Idiom for Getting Slices of a List +References: +Message-ID: +Content-Length: 1363 +X-UID: 103 + +[[ This message was both posted and mailed: see + the "To," "Cc," and "Newsgroups" headers for details. ]] + +In article +, + Moshe Zadka wrote: + +> I want a clean, and relatively efficient method to do the following: +> I have an array of length, n*m and I want to make it an array of +> length m, where each member is an array of length n. +> +> Example: n=2, m=3 +> [0, 1, 2, 3, 4, 5] ==> [[0, 1], [2, 3], [4, 5]] + +Well, if you want efficient and clean you should use Numeric... + +>>> import Numeric +>>> a = Numeric.array( [0, 1, 2, 3, 4, 5] ) +>>> a +array([0, 1, 2, 3, 4, 5]) +>>> a.shape = (3,2) +>>> a +array([[0, 1], + [2, 3], + [4, 5]]) + +That last item is equivalent to the nested list-of-lists you asked for. +(Note: to be picky, it's not an array unless you make it an array using +either the array module or the Numeric module. What you illustrated +looked like a list of lists.) + +Cheers, +-- Joe + +-- +,------------------------------------------------------------------. +| Joseph J. Strout Biocomputing -- The Salk Institute | +| joe at strout.net http://www.strout.net | +`------------------------------------------------------------------' +Check out the Mac Web Directory! http://www.strout.net/macweb.cgi + + + + diff --git a/demo/ermis-f/python_m/cur/0104 b/demo/ermis-f/python_m/cur/0104 new file mode 100644 index 00000000..51943b29 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0104 @@ -0,0 +1,41 @@ +From: r.hooft at euromail.net (Rob Hooft) +Date: Mon, 19 Apr 1999 14:07:01 GMT +Subject: Tkinter - the app that wouldn't quit +In-Reply-To: <19990419095013.A62714@vislab.epa.gov> +References: <19990416144831.A1548022@vislab.epa.gov> + + <19990419095013.A62714@vislab.epa.gov> +Message-ID: <14107.14469.908426.160852@octopus.chem.uu.nl> +X-UID: 104 + +>>>>> "RH" == Randall Hopper writes: + + RH> Do I need to add special testing-harness hooks into the dialog + RH> class, or is there a general way to determine when a dialog + RH> destroys/unmaps itself from outside of the dialog code? + +Using Tkinter, you can "wait" for a few specific events. + +"w.wait_window()" will wait for w to be destroyed. But even then, a +destroyed window can not be reused! + +Alternatively wait_visibility() and wait_variable() methods can be used. + +I come back to my advertisement: in the *Dialog() classes in the Pmw +framework this has all been programmed (using a wait_variable in that +case); there is no real reason except "the fun of it" to reinvent this +wheel... + +Regards, + +Rob Hooft. + +-- +===== R.Hooft at EuroMail.net http://www.xs4all.nl/~hooft/rob/ ===== +===== R&D, Nonius BV, Delft http://www.nonius.nl/ ===== +===== PGPid 0xFA19277D ========================== Use Linux! ========= + + + + + diff --git a/demo/ermis-f/python_m/cur/0105 b/demo/ermis-f/python_m/cur/0105 new file mode 100644 index 00000000..99810ced --- /dev/null +++ b/demo/ermis-f/python_m/cur/0105 @@ -0,0 +1,92 @@ +From: tismer at appliedbiometrics.com (Christian Tismer) +Date: Sat, 3 Apr 1999 11:40:24 GMT +Subject: WinDLL CallDLL +References: <370327E3.66047D53@easystreet.com> + <3703CB0C.83AB035E@ingr.com> <370402DE.E6AD7C37@easystreet.com> +Message-ID: <3705FE28.372A3D7A@appliedbiometrics.com> +Content-Length: 3696 +X-UID: 105 + + +Al Christians wrote: +> +> I'm still getting some success running the DLLDemo.Py, but none +> with any of the others. I get addressing exceptions from them. + +Well, I have never tested with NT SP4, so we can't be sure +which piece of software is going nuts here. +I will send you exactly the .pyd files which I use, +and we will try some basic steps together. If that doesn't +work, I would believe you have a problem with you system. + +[other path fiddling stuff which does not address the problem] + +> I've done that, too, and made the change to DynWin\__init__.py given +> by Christian Tismer. + +Whatever you did, there is no reason for the kind of crashes +you get. Dynwin should not work at all since it cannot import +a module, or it should work just fine. + +> I've deleted my \Python directory and done several reinstalls of +> Py152b2.exe. No success. Do I need to install from the source. +> I've also tried re-building CallDLL.Pyd using MSVC++ v5. That +> seemed to succeed. But I get the same run-time results. + +No, you need to use another approach to track this down. +There is a different problem which you will not solve +unless you do smaller steps. I never had the problems +you have, just different ones. We need to step by steps +check out if you can use calldll and npstruct as necessary, +then check the modules which are built upon it. +I will attach some examples which you should try. + +> I don't complain about something given gratis, like all this fine +> python software, but there does seem to be some potential for improving +> the packaging or beefing up the documentation a little here and there. + +Sorry, you are right in the general case but not in this one. +Sam has done some great work. He has a very special minimalistic +approach, and his number of users is relatively small compared +to, say PythonWin. He never claimed that his stuff is ready, +but it is all alpha stuff where he is providing a preview +for the curious. Using DynWin is not using a ready-made package +which has a couple of maintainers, but you are on your own, or +better: You are jumping into the boat to help Sam with improving it. + +> I can offer some time to try to help do that for some of these packages +> that run on NT. If any developers of python code that is licensed as +> some variety of free or open source want to take advantage of the point +> of view of a typically brain-dead potential user for a few hours and +> collaborate on recording what we have to learn to do to get this stuff +> installed, they could contact me. I suppose, however, that in most +> cases it is pure lack of time that prevents production of more +> documentation, and that it would be easier for the developer to write +> it directly than to try to collaborate. + +This case is even worse since at the time Sam was working +on DynWin and LumberJack, having reached his "critical mass", +he was hired away +"""Ack! I have taken a full-time job, so work on lumberjack will +halt for a couple of months. Stay Tuned...""" + +This was from October 17, see +http://www.nightmare.com/~rushing/lumberjack/index.html + +That means he might be in the "gosh I simply got no time" state +which I know very well. Until that becomes better, people +like Gordon McMillan and me might be able to help. + +cheers - chris + +-- +Christian Tismer :^) +Applied Biometrics GmbH : Have a break! Take a ride on Python's +Kaiserin-Augusta-Allee 101 : *Starship* http://starship.python.net +10553 Berlin : PGP key -> http://wwwkeys.pgp.net +PGP Fingerprint E182 71C7 1A9D 66E9 9D15 D3CC D4D7 93E2 1FAE F6DF + we're tired of banana software - shipped green, ripens at home + + + + diff --git a/demo/ermis-f/python_m/cur/0106 b/demo/ermis-f/python_m/cur/0106 new file mode 100644 index 00000000..76cfb9c7 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0106 @@ -0,0 +1,36 @@ +From: gustav at morpheus.demon.co.uk (Paul Moore) +Date: Sat, 10 Apr 1999 21:02:16 GMT +Subject: Python without registry entries +Message-ID: <370fb711.28093946@news.demon.co.uk> +Content-Length: 1099 +X-UID: 106 + +Hi, +I'm trying to set up a Python distribution on CD, for transport to a +number of PCs (possibly at client sites). My first thought is to +install Python on my PC, with whatever optional modules I need, and +copy that installation onto CD. + +That leaves me with a CD installation, which I can use on other PCs - +the only problem is that I won't have any registry entries. + +In the first instance, I can set up registry entries as I need. All I +need then is to know what registry entries Python requires (there's +documentation on python.org for basic Python stuff, but what does +pythonwin and the rest of win32all need?). + +However, it would be nice to be able to run Python, at some level, +without *any* configuration changes (registry entries, environment +variables) at all. (Perl runs fine from a CD binary distribution, with +no registry settings). Can I do this? If so, what (if any) changes are +needed to the basic installed distribution? + +Thanks for any help anyone can give me... +Paul Moore. + +PS Will TCL/Tk (Tkinter) work in this way, too? If so, do I need to do +anything further to set it up? + + + + diff --git a/demo/ermis-f/python_m/cur/0107 b/demo/ermis-f/python_m/cur/0107 new file mode 100644 index 00000000..55bb41c3 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0107 @@ -0,0 +1,42 @@ +From: JamesL at Lugoj.Com (James Logajan) +Date: Wed, 21 Apr 1999 20:21:39 -0700 +Subject: How many of us are there? +References: <371E2648.DED123AE@callware.com> <000301be8c67$08dd6600$959e2299@tim> +Message-ID: <371E95C3.8D3EDE4D@Lugoj.Com> +Content-Length: 1169 +X-UID: 107 + +Tim Peters wrote: +> +> [Ivan Van Laningham] +> > Hello, Pythonistas-- +> > Does anyone out there have some idea how many people subscribe to the +> > mailing list, or read the newsgroup? +> +> Yes, I keep exact daily tallies of both, along with the precise number of +> Python programmers broken down by industry, application, age, gender, +> income, countries of origin and residence, employer and life goals. + +Thank god he doesn't break down the numbers by aberrant food preferences. +And no, I'm not saying. Otherwise I'd be the only Python programmer in the +"Likes butter microwaved over Cheerios as a snack" category. + +> +> While I can't pass this information out for free, it's available for a +> price. How do you think all those spammers got your email address ? +> +> python's-demographics-make-perl's-look-like-cobol's-ly y'rs - tim + +Industry: Telecommunications +Application: Network mismanagement +Age: Over 40. Not saying how much. +Gender: Mail or E-mail? Mail! +Income: Never enough. +Country of origin: U S of A +Country of residence: Califunia; no wait, that doesn't seem right. +Employer: Some unlikely startup. +Life goals: To be able to identify a Larch. + + + + diff --git a/demo/ermis-f/python_m/cur/0108 b/demo/ermis-f/python_m/cur/0108 new file mode 100644 index 00000000..8d6de4bc --- /dev/null +++ b/demo/ermis-f/python_m/cur/0108 @@ -0,0 +1,64 @@ +From: ivnowa at hvision.nl (Hans Nowak) +Date: Fri, 16 Apr 1999 22:03:13 GMT +Subject: Simple module installation +In-Reply-To: <37170674.F77233A6@prescod.net> +References: <37170674.F77233A6@prescod.net> +Message-ID: <199904162101.XAA02559@axil.hvision.nl> +Content-Length: 2142 +X-UID: 108 + +On 16 Apr 99, Ce'Nedra took her magical amulet and heard Paul Prescod say: + +>I was just installing Fnorb and it was as painless an installation as a +>sane person could ask for but I got to thinking...couldn't this be less +>painless? The reason I ask is because I'm thinking of distributing code +>that depends on code that depends on code that depends on Fnorb and I need +>each installation part to be as simple as possible. So this isn't meant to +>pick on Fnorb in particular but to use it as a random sample package with +>binary and Python parts. +> +>The only thing that makes it extremely mildly painful is that it requires +>setting a few environment variables: +> +>FNORB_HOME +>PYTHONPATH +>PATH +> +>The PYTHONPATH and PATH would be unneccessary if Fnorb used the Windows +>registry. Even so, I think that a Python-managed, portable, text +>file-based registry (like JPython's) would be better than depending upon +>the over-centralized Windows registry. + +Yes, please don't use the Windows registry! Using it doesn't actually +*reduce* the "pain". (I never quite understood what good it was, anyway, +aside of a feeble attempt at making copy protection more fool proof.) + +The Python-based registry as you describe it sounds neat. It sounds like it +would be fairly easy to register and unregister programs and things, without +messing up your whole system, unlike a certain other registry. + +>If Python could find scripts in its PYTHONPATH then this wouldn't be +>necessary. So this is a feature request for that feature. I can implement +>it if people agree it would be a good idea: +> +>python -r script: run the script named "script.py" in the PYTHONPATH + +This looks good too. + +>If we put my idea for a Python-managed registry together with the "-r" +>idea then Fnorb could register itself on Windows or Unix like this: +> +>python -r register Fnorb /path/to/fnorb + +Hmm... but how do you *un*register? + +Nice ideas, + ++ Hans Nowak (Zephyr Falcon) ++ Homepage (under construction): http://www.cuci.nl/~hnowak/ ++ You call me a masterless man. You are wrong. I am my own master. ++ May 60 trolls cut your chicken feathers out with your bad self! + + + + diff --git a/demo/ermis-f/python_m/cur/0109 b/demo/ermis-f/python_m/cur/0109 new file mode 100644 index 00000000..d378f69d --- /dev/null +++ b/demo/ermis-f/python_m/cur/0109 @@ -0,0 +1,42 @@ +From: fredrik at pythonware.com (Fredrik Lundh) +Date: Tue, 20 Apr 1999 09:53:46 GMT +Subject: Tkinter Canvas & Fast Scrolling/Dragging +References: <19990416174016.A1559856@vislab.epa.gov> +Message-ID: <00b301be8b13$b0e35300$f29b12c2@pythonware.com> +Content-Length: 1079 +X-UID: 109 + +Randall Hopper wrote: +> Basically, what I want to do is turn off filling of canvas objects +> temporarily while the user is scrolling the canvas or they're dragging one +> of the shapes. When the operation is finished (user releases the mouse), +> I'll turn fill back on. +> +> The idea here being that the canvas seems to be pretty responsive for me +> until it has to draw stipple shapes. Then it's painfully slow. +> +> I know how to do this for dragging, but I don't know where to "hook in" for +> scrolling. + +I think the best way is to add bindings to the scrollbar(s). +something like: + + scrollbar.bind("", my_canvas.no_detail) + scrollbar.bind("", my_canvas.full_detail) + +might do the trick. + +another solution would be to hook into the scrollbar interface; see +http://www.dejanews.com/getdoc.xp?AN=464786051 +for some details. + +but that only allows you to figure out when to switch to less +detail... you could perhaps switch back after a short timeout, +or when the user moves the mouse back into the canvas. + + + + + + + diff --git a/demo/ermis-f/python_m/cur/0110 b/demo/ermis-f/python_m/cur/0110 new file mode 100644 index 00000000..21145408 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0110 @@ -0,0 +1,85 @@ +From: jfarr at real.com (Jonothan Farr) +Date: Fri, 23 Apr 1999 12:01:50 -0700 +Subject: problem with windows sockets +Message-ID: +Content-Length: 1699 +X-UID: 110 + +I'm rather stuck trying to solve a networking problem. I've implemented a +TCP socket server derived from SocketServer.SocketServer and I want it to be +able to restart itself. The problem I'm having is binding a socket to the +same port twice. If I don't call setsockopt() with SO_REUSEADDR, then I get +a winsock error 10048, defined in winsock.h as WSAEADDRINUSE (or 48, +'Address already in use' on Linux). It seems like setting SO_REUSEADDR +should work, which it does on Linux but not on NT. + +Here's some example code to illustrate my point. + +--------------------- + +# Server: + +import socket + +port = 12000 +queue = 5 + +print 'bind 1' +s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) +s.bind(('', port)) +s.listen(queue) +client, addr = s.accept() +client.send('foo') +s.close() + +print 'bind 2' +s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) +s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) +s.bind(('', port)) +s.listen(queue) +client, addr = s.accept() +client.send('foo') +s.close() + +--------------------- + +# Client: + +import socket + +host = 'localhost' +port = 12000 +bufsize = 1024 + +print 'connect 1' +s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) +s.connect((host, port)) +print s.recv(bufsize) +s.close() + +print 'connect 2' +s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) +s.connect((host, port)) +print s.recv(bufsize) +s.close() + +--------------------- + +This works fine on Linux, but on NT I get a winsock error 10061 (defined as +WSAECONNREFUSED) when I try to connect a client after binding the port a +second time. Is this a problem with Winsock, a problem with Python, or a +problem with my code? How can I work around this? Any help would be +appreciated. + +Thanks, +--jfarr + + + + + + + + + + diff --git a/demo/ermis-f/python_m/cur/0111 b/demo/ermis-f/python_m/cur/0111 new file mode 100644 index 00000000..46ad8257 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0111 @@ -0,0 +1,58 @@ +From: aa8vb at vislab.epa.gov (Randall Hopper) +Date: Tue, 13 Apr 1999 11:11:31 GMT +Subject: RPC and XDR with python +In-Reply-To: <37119B99.B3E2633C@hons.cs.usyd.edu.au>; from Matthew Robert Gallagher on Mon, Apr 12, 1999 at 05:07:06PM +1000 +References: <37119B99.B3E2633C@hons.cs.usyd.edu.au> +Message-ID: <19990413071131.A1293592@vislab.epa.gov> +Content-Length: 1225 +X-UID: 111 + + |Does anybody know where these resource are located. + |python.org has a couple of ref but nothing concrete + | + |It would be better find an example thou + +Well, haven't looked for RPC, but XDR is there. Here's a code snip from +something I wrote recently, brutally cut and simplified to highlight how +xdrlib can be used: + + + + + + + +-------------- next part -------------- +import os # popen +import struct # unpack +import xdrlib # Unpacker +import string # join + +# +# Basic example +# +fp = os.popen( "SomeXDRGeneratingTool" ) +buffer = fp.read() +fp.close() +unpacker = xdrlib.Unpacker( buffer ) + +a_double = unpacker.unpack_double() +an_int = unpacker.unpack_int() +a_float = unpacker.unpack_float() + +# +# Utility rtn to read an undelimited array +# +def UnpackString( unpacker, str_len ): + """ Unpack an undelimited XDR string with the characters stored as ints + """ + + str = string.join( + unpacker.unpack_farray( str_len, + lambda unp=unpacker: chr( unp.unpack_uint() ) ), + '' ) + end = string.find( str, "\0" ) + if end < 0: end = len( str ) + return string.rstrip( str[ 0:end ] ) + + diff --git a/demo/ermis-f/python_m/cur/0112 b/demo/ermis-f/python_m/cur/0112 new file mode 100644 index 00000000..a8506011 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0112 @@ -0,0 +1,36 @@ +From: olipt at mayo.edu (Travis Oliphant) +Date: Thu, 29 Apr 1999 19:34:49 -0500 +Subject: Extension Doc bug +In-Reply-To: <14120.52559.376120.364972@weyr.cnri.reston.va.us> +References: <14120.52559.376120.364972@weyr.cnri.reston.va.us> +Message-ID: +X-UID: 112 + +> +> Michael P. Reilly writes: +> > I just spent the morning trying to find a very obscure bug related to +> > the passing keyword arguments to a builtin method/function. +> +> Michael, +> You didn't post your original code that exhibited the bug, so I +> can't be sure of my conclusions. If you can send source for enough of +> your extension module that someone can compile it, that would be +> helpful. +> My first inclination, however, is that you passed in illegal +> arguments to PyArg_ParseTupleAndKeywords(). Passing NULL for the +> keywords dictionary is allowed; I've been looking at the +> implementation and don't see a way for that to be a problem (but I +> might have missed something). +> + +FYI, +I've used PyArg_ParseTupleAndKeywords() in a C-extension and passed it a +NULL pointer with no problems. + +Python 1.5.2b (Redhat 5.2 Linux 2.0.36) + + + + + + diff --git a/demo/ermis-f/python_m/cur/0113 b/demo/ermis-f/python_m/cur/0113 new file mode 100644 index 00000000..d63dd7f5 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0113 @@ -0,0 +1,37 @@ +From: paul at prescod.net (Paul Prescod) +Date: Thu, 22 Apr 1999 21:46:30 GMT +Subject: >>> Down-Translation? <<< +References: <7fo16e$810$1@usenet49.supernews.com> +Message-ID: <371F98B6.66A0515D@prescod.net> +X-UID: 113 + +Nagwa Abdel-Mottaleb wrote: +> +> Greetings: +> +> I am looking for a suitable language that will enable me to +> down-translate XML files into something like LaTeX files. +> Is it easy to use Python for this process? For example, +> how easy it is to write code segments that enable to +> translate + +You want to find out about the Python XML sig. + +http://www.python.org/sigs/xml-sig + +You can use the code from the xml-sig to build a DOM which is an in-memory +tree model of the data. Then you can walk the DOM and output the relevant +LaTeX tags using "sys.stdout.write" or something like it. + +-- + Paul Prescod - ISOGEN Consulting Engineer speaking for only himself + http://itrc.uwaterloo.ca/~papresco + +"The Excursion [Sport Utility Vehicle] is so large that it will come +equipped with adjustable pedals to fit smaller drivers and sensor +devices that warn the driver when he or she is about to back into a +Toyota or some other object." -- Dallas Morning News + + + + diff --git a/demo/ermis-f/python_m/cur/0114 b/demo/ermis-f/python_m/cur/0114 new file mode 100644 index 00000000..626700a7 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0114 @@ -0,0 +1,169 @@ +From: gherman at my-dejanews.com (Dinu C. Gherman) +Date: Thu, 22 Apr 1999 11:52:33 GMT +Subject: Project for newbie +References: <70alf7.qc6.ln@loopback> +Message-ID: <7fn2i0$7ql$1@nnrp1.dejanews.com> +Content-Length: 7024 +X-UID: 114 + + +In article <70alf7.qc6.ln at loopback>, morph at softhome.net wrote: +> +> I've read my way through the tutorial, and am now stuck - where do I go +> from here? I want to learn how to use Python, but don't have any +> pressing projects at the moment - can anyone suggest a program I should +> have a go at writing, to help me learn the language further? + + +What about this little problem, assuming you're +interested in internet programming and keen to get +familiar with the Python XML module...? ;-) + +Have fun, + +Dinu + + + +Context: + +The Altavista babelfish returns the following result +page (see appendix below) after issuing this request: + + "translate 'water' from English to French" + +on that WWW page: + + http://babelfish.altavista.com + +Some quick testing reveales that you can do the same +with just typing the following (wrapped) URL in your +browser: + + http://babelfish.altavista.com/cgi-bin/translate? + doit=done&urltext=water&lp=en_fr + +Exercise 1: + +Write a program babelfish.py calling the Altavista +Babelfish over the WWW (using httplib, say) and parse +its HTML output using your favorite HTML/XML parser +(suggestion: use the XML module written by the Python +XML-SIG) in order to extract the result and print it +nicely in a terminal window like this: + + darwin> python babelfish.py water en_fr + l'eau + darwin> + +Exercise 2: + +Improve your program by allowing multiple words to +be translated in a row, like this (you'll have to +send multiple requests as Babelfish will try to +treat your words as a sentence): + + darwin> python babelfish.py spam eggs en_fr + spam + oeufs + darwin> + +Appendix: Sample Babelfish output + (see context description) + + AltaVista: Translations AltaVista
+Maps AltaVista Home +
AltaVista Translation Help - AltaVista Home +
+ + +

+ + + +
+ +En Fran?ais: +

+ +l'eau +

+ +Use the above text to search the +Web

+ + +
To translate, type plain +text or the address (URL) of a +Web page here:
Translate +from:
+

+Put the power of Babel Fish into IE 5. Get AV Power Tools +(119k)

Download +SYSTRAN Personal and translate your private documents in +seconds.

+
AltaVista Home | Help | Feedback
©1995-98 | Disclaimer | Privacy | Advertising Info
+ +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/0115 b/demo/ermis-f/python_m/cur/0115 new file mode 100644 index 00000000..e0832141 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0115 @@ -0,0 +1,43 @@ +From: arnold at dstc.edu.au (David Arnold) +Date: Mon, 19 Apr 1999 03:17:15 GMT +Subject: Simple module installation +In-Reply-To: Your message of "Fri, 16 Apr 1999 14:53:32 +0200." + <371732CC.201012AF@lemburg.com> +References: <371732CC.201012AF@lemburg.com> +Message-ID: <199904190317.NAA12600@piglet.dstc.edu.au> +Content-Length: 1045 +X-UID: 115 + +-->"Marc-Andre" == M -A Lemburg writes: + Marc-Andre> Paul Prescod wrote: + + >> The PYTHONPATH and PATH would be unneccessary if Fnorb used + >> the Windows registry. + +in previous versions, Fnorb used the windows registry. however, this +has now been removed because it caused endless problems: users would +reinstall python, and all their fnorb code would break (since it used +the previous installation's paths). so then they had to reinstall +fnorb, even though nothing had changed, and then they had two fnorb +installations, and ... + +so now you have a couple of environment variables, and a batch file +which sets them to the "guessed" values. when you python installation +changes, you can edit the batch file (easier and safer than editing +the registry). + + + >> Even so, I think that a Python-managed, portable, text file-based + >> registry (like JPython's) would be better than depending upon the + >> over-centralized Windows registry. + +we're hoping that the distutil-sig will come up with a nice solution +;-) + + + +d + + + + diff --git a/demo/ermis-f/python_m/cur/0116 b/demo/ermis-f/python_m/cur/0116 new file mode 100644 index 00000000..b2f54e1a --- /dev/null +++ b/demo/ermis-f/python_m/cur/0116 @@ -0,0 +1,32 @@ +From: barmar at bbnplanet.com (Barry Margolin) +Date: Thu, 22 Apr 1999 18:01:27 GMT +Subject: The Future of Tk? +References: <371E964F.C531C2A@istar.ca> <371F11C2.3162025@ciril.fr> <4fv$ECA+JyH3EwbN@jessikat.demon.co.uk> +Message-ID: +Content-Length: 1097 +X-UID: 116 + +In article <4fv$ECA+JyH3EwbN at jessikat.demon.co.uk>, +Robin Becker wrote: +>I take this completely differently; least astonishment for me is if +>program X looks and behaves the same way no matter what keyboard, mouse +>and screen I'm using. As a 'user' of the program X it shouldn't matter +>what OS/WM is executing the code. I certainly don't want vi or emacs to +>be different on the mac why should I treat word or excel differently? + +I would be very surprised if Netscape on the Macintosh presented a +Windows-like user interface, rather than adopting the standard Macintosh +user interface. Most end users don't switch between platforms much, so +it's more important that all the programs on their system conform to their +expectations, than that a particular program work the same across different +platforms. + +-- +Barry Margolin, barmar at bbnplanet.com +GTE Internetworking, Powered by BBN, Burlington, MA +*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups. +Please DON'T copy followups to me -- I'll assume it wasn't posted to the group. + + + + diff --git a/demo/ermis-f/python_m/cur/0117 b/demo/ermis-f/python_m/cur/0117 new file mode 100644 index 00000000..59e7b6a7 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0117 @@ -0,0 +1,50 @@ +From: duncan at rcp.co.uk (Duncan Booth) +Date: 15 Apr 1999 08:58:10 GMT +Subject: 1.5.2 install problems on NT +References: <3714D8FF.634655C5@ina.fr> +Message-ID: <8DA968455duncanrcpcouk@news.rmplc.co.uk> +Content-Length: 1555 +X-UID: 117 + +Richard GRUET wrote in <3714D8FF.634655C5 at ina.fr>: + +>cl problems: +>--------------- +>shared by many ! see Hoon Yoon for instance... wish80;exe works (hence I +>conclude that tcl is installed properly) but IDLE or Tkdb don't, with +>insults like: +>C:/PROGRA~1/PYTHON/TCL/lib/tk8.0/tk.tcl: bad event type +>bad event type or keysym "MouseWheel" +> while executing +>"bind Listbox { +> %W yview scroll [expr - (%D / 120) * 4] units +>}" +> (file "C:/PROGRA~1/PYTHON/TCL/lib/tk8.0/listbox.tcl +> invoked from within +>"source [file join $tk_library listbox.tcl]" +> (file "C:/PROGRA~1/PYTHON/TCL/lib/tk8.0/tk.tcl" lin +> invoked from within +>"source C:/PROGRA~1/PYTHON/TCL/lib/tk8.0/tk.tcl" +> ("uplevel" body line 1) +> invoked from within +>"uplevel #0 [list source $tkfile]" +> +>This probably means that Tk wasn't installed properly. +> + +I had exactly that problem. I think it means that you upgraded an old Tcl +system but there are still copies of the old Tcl80.dll files lying around +somewhere and python is finding those in preference to the new ones. +Delete tcl80.dll from the \winnt\system32 directory or wherever they +are, and add the tcl bin directory (e.g. D:\Progra~1\Tcl\Bin) to the end of +your path in the control manager/system/environment settings. + +-- +Duncan Booth duncan at dales.rmplc.co.uk +int month(char *p){return(124864/((p[0]+p[1]-p[2]&0x1f)+1)%12)["\5\x8\3" +"\6\7\xb\1\x9\xa\2\0\4"];} // Who said my code was obscure? +http://dales.rmplc.co.uk/Duncan + + + + diff --git a/demo/ermis-f/python_m/cur/0118 b/demo/ermis-f/python_m/cur/0118 new file mode 100644 index 00000000..b2425c2c --- /dev/null +++ b/demo/ermis-f/python_m/cur/0118 @@ -0,0 +1,22 @@ +From: iam at not.you (Ken Power) +Date: Wed, 28 Apr 1999 18:59:34 GMT +Subject: Thankyou Mr. van Rossum and Python community +Message-ID: <372757ce.23222371@news.mysolution.com> +X-UID: 118 + + Thank you for creating Python. It's simply amazing. After a +brief overview, I was able to create a small script. Big deal? Maybe, +unless you realize it took me 2-3 days to write a similar script in +VBA, using MSWord 97. The Python script is faster to boot and easier +to change and extend. It makes me wonder how I have been able to +program, let alone work, with out this valuable language. Again, thank +you. +-------------------------------- +Ken Power +uncle_wiggly at bigfoot dot com +get that? +-------------------------------- + + + + diff --git a/demo/ermis-f/python_m/cur/0119 b/demo/ermis-f/python_m/cur/0119 new file mode 100644 index 00000000..a8c67445 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0119 @@ -0,0 +1,31 @@ +From: cgw at fnal.gov (Charles G Waldman) +Date: Thu, 15 Apr 1999 20:53:50 GMT +Subject: for in benchmark interested +In-Reply-To: <14102.15523.573321.443195@bitdiddle.cnri.reston.va.us> +References: <37157CE7.EFB470CA@inka.de> + <14102.15523.573321.443195@bitdiddle.cnri.reston.va.us> +Message-ID: <14102.20958.460408.832042@buffalo.fnal.gov> +X-UID: 119 + +But won't this break apart words that happen to span across a +500000-byte blocks boundary? + +Jeremy Hylton writes: + > The Python version would be faster if you used sys.stdin.read instead + > of sys.stdin.readlines. I'm not sure why you need to split the input + > into lines before you split it into words; it seems like an + > unnecessary step. + + > while 1: + > buf = read(500000) + > if buf: + > for key in string_split(buf): + > dict[key] = dict_get(key, 0) + 1 + > else: + > return dict + + + + + + diff --git a/demo/ermis-f/python_m/cur/0120 b/demo/ermis-f/python_m/cur/0120 new file mode 100644 index 00000000..24cc7d12 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0120 @@ -0,0 +1,39 @@ +From: jepler at inetnebr.com (Jeff Epler) +Date: Fri, 30 Apr 1999 01:13:10 GMT +Subject: try vs. has_key() +References: <7g51q6$1pt$1@vvs.superst.iae.nl> <14119.8145.293039.667256@bitdiddle.cnri.reston.va.us> +Message-ID: +X-UID: 120 + +On Wed, 28 Apr 1999 11:13:28 -0400 (EDT), Jeremy Hylton + wrote: +> d={} +> for word in words: +> first_two=word[:2] +> d[first_two]=d.get(first_two, []).append(word) +> +>This second bit doesn't work because the append method on list objects +>returns None. As a result, the first time a new value for first_two +>appears None will be assigned to that key in the dictionary. The +>second time that value of first_two shows up, None will be returned by +>d.get. Then the code will raise an AttributeError, because None +>doesn't have an append method. +> +>The following code would be correct: +> +> d={} +> for word in words: +> first_two=word[:2] +> d[first_two]= temp = d.get(first_two, []) +> temp.append(word) + +what about + d[first_two] = d.get(first_two, [])+[word] +? Or is list construction and addition going to be enough more expensive +than the function call to make this a lose as well? + +Jeff + + + + diff --git a/demo/ermis-f/python_m/cur/0121 b/demo/ermis-f/python_m/cur/0121 new file mode 100644 index 00000000..e4969e7e --- /dev/null +++ b/demo/ermis-f/python_m/cur/0121 @@ -0,0 +1,69 @@ +From: landrum at foreman.ac.rwth-aachen.de (Greg Landrum) +Date: Mon, 19 Apr 1999 17:01:18 +0200 +Subject: Beginner - Tkinter info +References: <371c59e9.2723125@news.tin.it> +Message-ID: <371B453E.C3F83831@foreman.ac.rwth-aachen.de> +Content-Length: 2563 +X-UID: 121 + +Kranio wrote: +> +> I am just starting using python and I would like to learn more. I have +> about all the docs written by guido but I haven't found yet +> documentation about tkinter usage. Can you help me? +> Where I can find some example of both python and tkinter? + +A couple of people have already provided pointers to what +little there is in the way of Tkinter docs, so I'm not actually +going to contribute anything towards answering this question. +What I am going to do is take this wonderful opportunity to bitch +and moan a little bit about the state of the Tkinter documentation. + +The rest of the "base" parts of python seem to be fairly completely +documented. At least I can always find the information I need to +solve whatever problem I happen to be having. This is a great thing +(thanks Guido!) which makes it easy for experienced programmers +who are new to Python to hit the ground running. + +Unfortunately, the same isn't even close to true of Tkinter. +The most useful thing I have so far been able to find is +Fredrik Lundh's "Introduction to Tkinter": +http://www.pythonware.com/library/tkinter/introduction/index.htm +While this contains some useful information, it has a couple of +problems: +1) It's a work in progress (which means: "woefully incomplete"). +2) It isn't available as one download (if it is, I couldn't find + it and I looked pretty hard). I do most of my programming at + home where constant net access is not an option, so I like to + have my docs locally accessible. Not to mention how frustrating + problems with net lag are when trying to read docs. +3) It is woefully incomplete. + +I did my first "reasonable size" program in python the weekend +before last. I really enjoyed the whole process (including +learning more of the language), with the exception of figuring +out how to make Tkinter work. If it hadn't been for Pmw (which +includes copious examples and is almost completely documented), +I would have thrown my hands up in disgust and either abandoned +the project or gone back to straight C and XLib... which would +have been a real shame, because the thrill of having my little +networked game run essentially without modification on NT, linux +and AIX was hard to beat. + +I know full well that writing docs is both boring and a pain in +the ass, but they really are needed by the community and would +(I think) help the growth of python. + +Just my two cents, +-greg + + +-- +--------------------- +Dr. Greg Landrum (landrum.NOSPAM at foreman.ac.rwth-aachen.de) +Institute of Inorganic Chemistry +Aachen University of Technology + + + + diff --git a/demo/ermis-f/python_m/cur/0122 b/demo/ermis-f/python_m/cur/0122 new file mode 100644 index 00000000..63c6c175 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0122 @@ -0,0 +1,32 @@ +From: skip at mojam.com (Skip Montanaro) +Date: Tue, 20 Apr 1999 17:53:10 GMT +Subject: opening more than 1 file +References: <371CB255.5FCAFBAF@solair1.inter.NL.net> +Message-ID: <371CBF75.10FA1EE6@mojam.com> +X-UID: 122 + +martin van nijnatten wrote: +> +> I have a variable, which can have a value in the range from 1 to 20. +> +> If the value is 7, I have to open 7 files. +> +> What could be an elegant way of doing this? + +Well, how about: + + files = [] + for i in range(nfiles): + files.append(open("/tmp/file%03d"%i, "wb")) + +then access the i-th file as files[i]? + +-- +Skip Montanaro | Mojam: "Uniting the World of Music" +http://www.mojam.com/ +skip at mojam.com | Musi-Cal: http://www.musi-cal.com/ +518-372-5583 + + + + diff --git a/demo/ermis-f/python_m/cur/0123 b/demo/ermis-f/python_m/cur/0123 new file mode 100644 index 00000000..cab596ed --- /dev/null +++ b/demo/ermis-f/python_m/cur/0123 @@ -0,0 +1,100 @@ +From: jam at newimage.com (jam) +Date: Mon, 26 Apr 1999 06:19:59 -0400 +Subject: timeout on urllib.urlopen? +In-Reply-To: <7g0r7c$gn9$1@nnrp1.dejanews.com>; from Kevin L on Mon, Apr 26, 1999 at 04:48:44AM +0000 +References: <7g0r7c$gn9$1@nnrp1.dejanews.com> +Message-ID: <19990426061959.A18551@toast.internal> +Content-Length: 2298 +X-UID: 123 + +On Mon, Apr 26, 1999 at 04:48:44AM +0000, Kevin L wrote: +> +> I'm trying to use urllib.urlopen() on a big list of urls, some of which are +> dead (they don't return a 404, just no response). And the function just waits. +> Is there any way to specify a timeout period for this function? thanks, +> +> Kevin +> + +greetings, + +attached, please find a short lightly tested module that might do what you +are looking for.. please let me know if this is what you need. it's a piece +of code I wrote for a larger application, and it seems to get the job done +nicely. suggestions for optimizations, etc, accepted. + +regards, +J +-- +|| visit gfd +|| psa member #293 +|| New Image Systems & Services, Inc. +-------------- next part -------------- +import socket +import string +import select + +from urlparse import urlparse, urlunparse +from httplib import HTTP, HTTP_PORT + +from errno import EINPROGRESS, ETIMEDOUT + +class localHTTP(HTTP): + def __init__(self, host = '', port = 0, timeout = 10.0): + self.connect_timeout = timeout + HTTP.__init__(self, host, port) + + def connect(self, host, port = 0): + if not port: + i = string.find(host, ":") + if i >= 0: + host, port = host[:i], host[i+1:] + try: + port = string.atoi(port) + except string.atoi_error: + raise socket.error, "nonnumeric port" + if not port: + port = HTTP_PORT + + self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + if self.debuglevel > 0: + print "connect:", (host, port) + + self.sock.setblocking(0) + try: + self.sock.connect(host, port) + except socket.error, why: + if why[0] == EINPROGRESS: + pass + else: + raise socket.error, why + + (r, w, e) = select.select([], [self.sock], [], self.connect_timeout) + if w == [self.sock]: + self.sock.setblocking(1) + return + else: + raise socket.error, (ETIMEDOUT, "timeout during connect phase") + +def checkurl(url): + if url == "" or url == None: + return None + + u = urlparse(url) + netloc = u[1] + path = u[2] + + h = localHTTP(netloc) + h.set_debuglevel(0) + h.putrequest("HEAD", path) + h.putheader("accept", "text/html") + h.putheader("accept", "text/plain") + h.endheaders() + + return h.getreply() + +if __name__ == "__main__": + print checkurl("http://quark.newimage.com:8080/") + + + diff --git a/demo/ermis-f/python_m/cur/0124 b/demo/ermis-f/python_m/cur/0124 new file mode 100644 index 00000000..2aa7d688 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0124 @@ -0,0 +1,33 @@ +From: KUNCEJ at mail.conservation.state.mo.us (Jeffrey Kunce) +Date: Mon, 12 Apr 1999 14:52:00 GMT +Subject: Does the standard ftplib module support proxies? +Message-ID: +X-UID: 124 + +The standard urllib.py also supports proxies. I don't think the library manual explains it, and I found the internal docs insufficient. Search dejanews for urllib and proxy to find some help. + +Basically, you set an environment variable that defines the proxy: +(NT example) + SET http_proxy=http://204.71.200.68:8080 +and urllib takes it from there. + +For me it works on a standard proxy, but not with a socks server + +This is just from my [recent] experience with a new firewall that was imposed on me. I'm not an expert on the subject. I hope the urllib documentation can be improved in this area. Maybe a python/firewall HOWTO is in order? + + --Jeff + +>>> Paul Moore 04/11/99 04:26pm >>> +The header says it all... I've looked in the manual, but I can't see +anything about proxy (firewall) support, one way or another. + +Actually, the same question applies to httplib and urllib. + +Thanks, +Paul Moore. + + + + + + diff --git a/demo/ermis-f/python_m/cur/0125 b/demo/ermis-f/python_m/cur/0125 new file mode 100644 index 00000000..b1fd410a --- /dev/null +++ b/demo/ermis-f/python_m/cur/0125 @@ -0,0 +1,46 @@ +From: stephan at pcrm.win.tue.nl (Stephan Houben) +Date: 26 Apr 1999 10:07:35 +0200 +Subject: Bug or Feature? +References: <37208E69.4B022E0C@mediaone.net> <7fr3eg$bqr@world1.bellatlantic.net> +Message-ID: +X-UID: 125 + +"David Cuthbert" writes: + +> Fuming Wang wrote: +> +> Most definitely a feature. You're getting the same reference for all four +> list elements. To break it apart: + +Nevertheless, it makes it difficult to construct multi-dimensional "arrays". + +For this, I would like to propose the following function which I use: +(why isn't something like this in the standard library, or didn't I +just look well enough?) + +# Make a tensor (i.e. list of list of lists...) + +def make_tensor(*args): + if args: + head = args[0] + tail = args[1:] + result = [] + for i in range(head): + result.append(apply(make_tensor, tail)) + return result + else: + return None + +if __name__ == '__main__': + print make_tensor() + print make_tensor(3) + print make_tensor(1,2) + + +Greetings, + +Stephan + + + + diff --git a/demo/ermis-f/python_m/cur/0126 b/demo/ermis-f/python_m/cur/0126 new file mode 100644 index 00000000..46deab1d --- /dev/null +++ b/demo/ermis-f/python_m/cur/0126 @@ -0,0 +1,28 @@ +From: dubois1 at llnl.gov (Paul F. Dubois) +Date: Sat, 03 Apr 1999 01:07:50 GMT +Subject: Numerical Python download site temporarily changed +Message-ID: +X-UID: 126 + +The normal site LLNL site for Numerical Python downloads, xfiles.llnl.gov, +is and will be unavailable for some days. + +Lacking sufficient notice to do anything better, I have copied the last two +releases and the Numerical Python documentation to my own personal web site. +The URL is: + +http://dubois.simplenet.com/python + +I will post to this group when xfiles is again available. + +We regret any inconvenience to the public. + +Paul F. Dubois +Lawrence Livermore National Lab + + + + + + + diff --git a/demo/ermis-f/python_m/cur/0127 b/demo/ermis-f/python_m/cur/0127 new file mode 100644 index 00000000..0491401f --- /dev/null +++ b/demo/ermis-f/python_m/cur/0127 @@ -0,0 +1,78 @@ +From: stephan at pcrm.win.tue.nl (Stephan Houben) +Date: 23 Apr 1999 15:10:50 +0200 +Subject: opening more than 1 file +References: <371CB255.5FCAFBAF@solair1.inter.NL.net> <371CCAE0.7DE87F8A@aw.sgi.com> <7fpteh$cik$1@news1.xs4all.nl> +Message-ID: +Content-Length: 1924 +X-UID: 127 + +"Gornauth" writes: + +> Gary Herron wrote in message <371CCAE0.7DE87F8A at aw.sgi.com>... +> >files = map(lambda i: open("file%02d"%i, 'w'), range(N)) +> +> I'm not completely sure how that one-liner works. To be honest, I have no +> clue whatsoever. + +The above fragment is equivalent to: + + def open_file(i): + filename = "file%02d" % i + file = open(filename, 'w') + return file + + files = map(open_file, range(N)) + +And the last line could be replaced by: + + files = [] + for i in range(N): + file = open(file(i)) + files.append(file) + +Basically, 'lambda' is handy when you need to "def"ine a function but +don't want to define a function, and map is handy when you need to do a +for-loop but you don't want to do a for-loop. This allows one to write +"simple" (as in "short") programs. + +> Could someone more python-literate please be so kind as to give a couple of +> examples on how to use 'map' and 'lamba'? + +To start with map(): map() applies a given function to every element +of a given list. In most cases, the same result could have been had +with a for-loop. It is best for simple functions, especially built-ins, +because in that case it's faster than the resulting for-loop, and for +a simple function I find map often clearer. + +e.g. you have a list with integers and want to convert them all to strings: + + strlist = map(str, intlist) + +as opposed to: + + strlist = [] + for i in intlist: + strlist.append(str(i)) + +I find the first possibility not only shorter, but also more readable. + +Lambda lets you create a simple one-shot function. +It is most useful when you need to pass a function as an argument, and +the function you want to pass is very simple. + +You *can* combine map and lambda to simulate very complex for-loops. +However, I think that in that case it's usually better to write out +the for-loop. + + +> +> Met vriendelijke groeten, +> Hans + +Groeten, + +Stephan + + + + diff --git a/demo/ermis-f/python_m/cur/0128 b/demo/ermis-f/python_m/cur/0128 new file mode 100644 index 00000000..df5baeb9 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0128 @@ -0,0 +1,29 @@ +From: aaron_watters at my-dejanews.com (aaron_watters at my-dejanews.com) +Date: Mon, 12 Apr 1999 19:05:20 GMT +Subject: hey advocates +Message-ID: <7etg59$6mt$1@nnrp1.dejanews.com> +X-UID: 128 + +I don't know whether it really matters or not, but aren't there +any CGI or web applications written in Python? + + http://cgi-resources.com/Programs_and_Scripts/ + +[Actually, my experience has been that sites like this one +don't actually accept submissions they have no exterior interest +in, but it might be worth a try. Let's harass the poor bugger, +shall we?] + + -- Aaron Watters + +==== + +It's humbling to think that when Mozart was my age +he'd been dead for 3 years. -- Tom Lehrer + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/0129 b/demo/ermis-f/python_m/cur/0129 new file mode 100644 index 00000000..560501a0 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0129 @@ -0,0 +1,32 @@ +From: cgw at fnal.gov (Charles G Waldman) +Date: Mon, 12 Apr 1999 22:14:15 GMT +Subject: Converting a string to a tuple +In-Reply-To: <01be8530$65bb7120$52037e81@saints> +References: <01be8530$65bb7120$52037e81@saints> +Message-ID: <14098.28727.245158.616727@buffalo.fnal.gov> +X-UID: 129 + +Bruce Huzyk writes: + > Here is a basic problem that is causing me much stress: + > + > I have a string a = '(1, "abc\\def", 2)' that I would like to convert to a + > tuple. + > + > I have tried eval(), but it interprets the backslashes. + +The cheapest thing to do is this: + +import string +def str_to_tup(s): + return eval(string.replace(s, '\\', '\\\\')) + +If you're concerned about safety (the "eval" could be evaluating any +Python code, possibly a hazard if the string is coming from user +input) then you don't want to use eval at all, you need to actually +process the string, looking for commas, quotes, backslashes, etc. If +you need to do this, you may find some parser generator/lexical +analyzer tools already in existence, if you look around python.org + + + + diff --git a/demo/ermis-f/python_m/cur/0130 b/demo/ermis-f/python_m/cur/0130 new file mode 100644 index 00000000..29a4dd21 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0130 @@ -0,0 +1,55 @@ +From: sca at isogmbh.de (Chris...) +Date: Tue, 27 Apr 1999 12:05:51 GMT +Subject: threading/events questions +Message-ID: <3725a47f.96308574@scout> +Content-Length: 1391 +X-UID: 130 + +Hello... + + After experimenting with the modules thread and threading I have +some open questions. I've written the famous ping-pong program +----------------------------------------------------------------------------------------------------- +from Threading import * +from time import sleep + +Quit = Event() + +def f(t, msg): + print msg + Quit.wait(t) + if Quit.isSet(): + return + f(t, msg) + +def run(): + t1 = Thread(target=f, args=(10, 'ping')) + t2 = Thread(target=f, args=(5, '\tpong')) + t1.start() + t2.start() + sleep(60) + Quit.set() +----------------------------------------------------------------------------------------------------- +With that program, the threads are running for 60 seconds. But, how +can I stop one thread and not both? I don't want to write an +additional function doing exactly the same except dealing with a +different Event. + + My second problem is sending an event with a message. +ChangeOutput = Event() +and send the event ChangeOutput('something different than ping-pong') +to one thread. After receiving this message, the thread should change +the recursive call to f(t, 'something different, than ping-pong'). + + How can I wait for events (more than one)? In the code above, I am +just waiting for one event with a proper timeout. How can I react on +the additional event ChangeOutput? + + Thanks a lot in advance! + +bye + Chris... + + + + diff --git a/demo/ermis-f/python_m/cur/0131 b/demo/ermis-f/python_m/cur/0131 new file mode 100644 index 00000000..75258a3f --- /dev/null +++ b/demo/ermis-f/python_m/cur/0131 @@ -0,0 +1,33 @@ +From: fredrik at pythonware.com (Fredrik Lundh) +Date: Tue, 13 Apr 1999 07:21:15 GMT +Subject: role of semilcolon +References: +Message-ID: <00f401be857f$ff063410$f29b12c2@pythonware.com> +X-UID: 131 + +Andy Dustman wrote: +> a=1;b=2;b=3 +> +> is the same as: +> +> a=1 +> b=2 +> b=3 +> +> But a Pythonism you may want to adapt is: +> +> a,b,c = 1,2,3 + +that's a somewhat dubious pydiom: the semicolon +variant is about twice as fast. + +(and unless you use the -O option, the semicolon +form is also faster the one-assignement-per-line +form...) + + + + + + + diff --git a/demo/ermis-f/python_m/cur/0132 b/demo/ermis-f/python_m/cur/0132 new file mode 100644 index 00000000..8307d5e8 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0132 @@ -0,0 +1,25 @@ +From: cjw at connection.com (Colin J. Williams) +Date: Wed, 14 Apr 1999 22:04:33 -0400 +Subject: Pythonw Tab setting +Message-ID: <37154931.19739780@connection.com> +X-UID: 132 + +The program AutoIndent.py has: + + prefertabs = 0 + spaceindent = 4*" " + +Should spaceindent be changed to 2 if one wishes the tabs to have +that value? + +Currently I use PythonWin which permits the user to change the Tab +value (incidentally, it also provides for breakpoints). + +Any advice would be appreciated. + +Colin W. + + + + + diff --git a/demo/ermis-f/python_m/cur/0133 b/demo/ermis-f/python_m/cur/0133 new file mode 100644 index 00000000..e2c8e113 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0133 @@ -0,0 +1,27 @@ +From: achrist at easystreet.com (Al Christians) +Date: Fri, 02 Apr 1999 23:00:07 -0800 +Subject: string.join() vs % and + operators +References: <37054490.E79ADCC9@easystreet.com> <000001be7d92$ea8da080$879e2299@tim> +Message-ID: <3705BC77.E2C4EA8B@easystreet.com> +X-UID: 133 + +Tim Peters wrote : + +(All kinds of [snipped] insights and outsights) + +Great stuff, Tim. You are right. Your method boosts speed by +a factor of 5 over the fastest of my 3 methods, which already looked +to be fast enough not to worry about. In the applications I'm looking +at, building records from a few dozen fields each and then writing them +out to indexed files, the record building should take much less time +than the I/O and record manager. So, no matter how fast or slow +Python is compared to brand X, the internal processing will be pretty +insignificant as a part of the total run time. + +Does-the-next-Python-book-tell-how-to-finish-a-message-so-that-the-reader's-IQ-equals-their-percentage-of-comprehension? + +Al + + + + diff --git a/demo/ermis-f/python_m/cur/0134 b/demo/ermis-f/python_m/cur/0134 new file mode 100644 index 00000000..35fb2055 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0134 @@ -0,0 +1,77 @@ +From: hyoon at bigfoot.com (Hoon Yoon) +Date: Fri, 16 Apr 1999 14:12:30 -0400 +Subject: restore sources from PYC [Q] +References: <000101be879c$8aed0670$6eba0ac8@kuarajy.infosys.com.ar> +Message-ID: <37177D8E.FF43BF65@bigfoot.com> +Content-Length: 2440 +X-UID: 134 + +Hi, + +What happens if you do NOT want your pyc codes to be reverse engineered? +Can you prevent someone from doing this type of rev eng? +Some members in my IT committee always have a problem with this ability +and often used as excuse to kill any new tech adoption. + +Michael Hudson wrote: +> +> "Bruno Mattarollo" writes: +> > Hi! +> > +> > By mistake I am unable to find the PY files (source) from a project I was +> > working on. I only have the PYC files... Is there a way to recover the +> > sources from the PYC? I only need my sources, I don't give a d... for the +> > comments... +> +> Well.... The pyc files are marshalled code objects (after an eight +> byte header), and there's the standard module dis which can +> disassemble code objects, from which you could have a stab at +> rewriting your code. You certainly wouldn't *want* to do it this way. +> +> It would probably be within the bounds of possibility to write a +> decompiler, though unless you've lost a vast heap of code this is +> going to be a much bigger project than rewriting your code. +> +> Anyway, if it helps, here's a function that'll pull the code out of a +> .pyc file and disassemble that code: +> +> def dis_pyc(pyc_name): +> import marshal,dis +> file=open(pyc_name,'rb') +> file.read(8) +> code=marshal.load(file) +> did.dis(code) +> +> (NB: This isn't much use because defined functions and classes are in +> their own code objects stored as constants - they're still accessible, +> in code.co_consts, but this code doesn't go looking for them) +> +> > TIA +> > +> > /B +> > +> > Bruno Mattarollo +> > ... proud to be a PSA member +> +> Good luck! +> +> Michael + +-- +***************************************************************************** +S. Hoon Yoon (Quant) Merrill Lynch Equity Trading, +yelled at yahoo.com hoon at bigfoot.com(w) +"Miracle is always only few standard deviations away, but so is +catastrophe." +* Expressed opinions are often my own, but NOT my employer's. +"I feel like a fugitive from the law of averages." Mauldin +***************************************************************************** +-------------- next part -------------- +A non-text attachment was scrubbed... +Name: vcard.vcf +Type: text/x-vcard +Size: 202 bytes +Desc: Card for Hoon Yoon +URL: + + diff --git a/demo/ermis-f/python_m/cur/0135 b/demo/ermis-f/python_m/cur/0135 new file mode 100644 index 00000000..a86fe8e3 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0135 @@ -0,0 +1,17 @@ +From: Bjoern.Giesler at stud.uni-karlsruhe.de (Bjoern Giesler) +Date: 21 Apr 1999 11:23:47 GMT +Subject: Tkinter Q +Message-ID: <7fkcg3$61o$1@news.rz.uni-karlsruhe.de> +X-UID: 135 + +Hi, + +whenever I try to construct a slightly more complicated Tkinter test at +the Python console, I get a FloatingPointError. The same program written +to a file works flawlessly. Is that a known bug? + + --Bjoern + + + + diff --git a/demo/ermis-f/python_m/cur/0136 b/demo/ermis-f/python_m/cur/0136 new file mode 100644 index 00000000..05cc04c5 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0136 @@ -0,0 +1,24 @@ +From: samschul at ix.netcom.com (Sam Schulenburg) +Date: Tue, 13 Apr 1999 09:59:57 -0700 +Subject: New Python Book err on Page 265 +Message-ID: <7evt60$2e7@dfw-ixnews9.ix.netcom.com> +X-UID: 136 + +I received the new Programming Python book and found an error on Page 265 in +the get_temperature(country,state,city) function. + +line 13: stop = string.index(data,'°v;F',start-1) +s/b stop = string.index(data,'°F',start-1) + +With this correction the function works as advertised. + +Mark this is a great book. + +Sam Schulenburg + + + + + + + diff --git a/demo/ermis-f/python_m/cur/0137 b/demo/ermis-f/python_m/cur/0137 new file mode 100644 index 00000000..8fdfa65e --- /dev/null +++ b/demo/ermis-f/python_m/cur/0137 @@ -0,0 +1,26 @@ +From: gutier at intergate.bc.ca (Gerald Gutierrez) +Date: Sat, 17 Apr 1999 12:54:30 -0700 +Subject: Plugins, or selecting modules to import at runtime +Message-ID: <924379180.825429211@news.intergate.bc.ca> +X-UID: 137 + +Hi all. + +I'd like to write a program in Python in which the user can select one of +several modules to execute through a function that has the same name in all the +modules. I don't believe "import" lets me pass it a string. There is also +reload(), but the module to reload must be previously imported. + +This is very similar to plugins like that used in Netscape, Photoshop and the +GIMP. + +Can someone please give me a hint? + +Thanks. + +Please forward replies to gutier at intergate.bc.ca. + + + + + diff --git a/demo/ermis-f/python_m/cur/0138 b/demo/ermis-f/python_m/cur/0138 new file mode 100644 index 00000000..9e5d5478 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0138 @@ -0,0 +1,50 @@ +From: sjoerd at oratrix.nl (Sjoerd Mullender) +Date: Wed, 21 Apr 1999 13:44:04 GMT +Subject: Job opening at Oratrix, Amsterdam +Message-ID: <19990421134405.030A1301D04@bireme.oratrix.nl> +Content-Length: 1634 +X-UID: 138 + +Oratrix Development is a newly formed company that originated in the +multimedia group at CWI. The very same group that released both +Python and Guido to the Python community. + +Oratrix Development is located in Amsterdam, The Netherlands. + +We are an IT startup company that develops and markets authoring and +presentation software for multimedia presentations that are going to +be distributed to end-users via the Internet. + +Oratrix markets its products under the name GRiNS. The GRiNS suite +will consist of a GRiNS authoring tool for creating presentations and +a GRiNS player for end-user viewing of presentations. + +GRiNS was designed to support the World-Wide Web Consortium (W3C) +standard language SMIL, the Synchronized Multimedia Interchange +Language (pronounced "smile"). Unlike HTML, SMIL is an XML-based +language that allows users to define temporal relationships among +objects in a presentation. + +The GRiNS suite of programs is almost completely written in Python and +is in fact the oldest extant Python project. Guido himself once +worked on this project (before it was called GRiNS). + +We are working hard on the first GRiNS suite products and are looking +for enthusiastic + +Multimedia Programmers/Developers + +with knowledge and experience in some or all of the following areas: +Python (obviously), Pythonwin, C++, Direct X, Netshow, Windows +95/98/NT APIs. + +If you are interested or want to recommend a friend, please send a +message to Manja Strick van Linschoten or call +her on +31-20-6795306. + +-- Sjoerd Mullender + Jack Jansen + + + + diff --git a/demo/ermis-f/python_m/cur/0139 b/demo/ermis-f/python_m/cur/0139 new file mode 100644 index 00000000..7fff74fe --- /dev/null +++ b/demo/ermis-f/python_m/cur/0139 @@ -0,0 +1,55 @@ +From: guido at eric.cnri.reston.va.us (Guido van Rossum) +Date: 29 Apr 1999 09:08:51 -0400 +Subject: IDLE ! +References: <371ADC8C.54C4CDBE@zipzap.ch> <3728126B.E35F4464@bph.ruhr-uni-bochum.de> <37281303.73BB69A4@bph.ruhr-uni-bochum.de> +Message-ID: <5l3e1jbml8.fsf@eric.cnri.reston.va.us> +Content-Length: 1634 +X-UID: 139 + +Marc Saric writes: + +> Some things I would like to see in an updated version: +> +> Cursor-up-and-down-history in the command shell, like in PTUI. + +It's there, try ESC-p and ESC-n. You can also do something like + + >>> pr + +and then ESC-p will retrieve the previous command starting with 'pr'. + +Also, you can move the cursor to a previous command and simply hit +Return; this will move it to the bottom for further editing or you can +hit Return again to execute it. + +> Some key-bindings seem to be problematic (at least with a german +> keyboard; you cant press "CTRL+ [" for indentation for example). + +I admit that the key bindings are not ideal; there seems to be no +universally accepted set of bindings. In a future version, you will +be able to customize your key bindings more easily; right now, editing +the keydefs file is your only resort. + +(If someone is willing to put some effort in coding up this feature, +it would be greatly appreciated!) + +> On Unix (SuSE 6.0 to be exact) I can't manage to get proper +> Windows-style copy and paste (CTRL+C, CTRL+V) (I don' like the +> Unix-key-bindungs, and therefore changed that to the +> windows-settings). + +How exactly did you change to the windows-settings? Is it ^C or ^V +that doesn't work? (You can verify this using the Edit menu.) ^V is +a Tk default binding for scroll-down; ^C is an IDLE binding in the +Shell window for interrupt; either might cause you problems (I haven't +tried this myself). + +> Maybe it's just me who is too stupid, and someone may help me... + +No, and yes... + +--Guido van Rossum (home page: http://www.python.org/~guido/) + + + + diff --git a/demo/ermis-f/python_m/cur/0140 b/demo/ermis-f/python_m/cur/0140 new file mode 100644 index 00000000..60f45429 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0140 @@ -0,0 +1,27 @@ +From: bbaetz at ug.cs.usyd.edu.au (Bradley Baetz) +Date: Wed, 28 Apr 1999 18:13:54 +1000 +Subject: Q on Tkinter Scrollbar +References: <370CFAC8.32EB0B29@ingr.com> <7g2g0f$km7$1@mlv.mit.edu> +Message-ID: <3726C342.1DF7C6D6@ug.cs.usyd.edu.au> +X-UID: 140 + +> I think you need to, in _vscroll, set the position of the scrollbar. +> I did this exact thing in a tcl app once, so I know it's possible. +> It's a bit of work to figure out where things are supposed to be, but +> you're going to have to tell it what being halfway down means anyway. +> +> Michael + +Is it possible to find out the location of the top and bottom character +of a tkinter text object currently showing? I want to be able to seardch +for a tag on the currently viewable portion, but I can find out the +start and end positions of the text. + +Thanks, + + +Bradley + + + + diff --git a/demo/ermis-f/python_m/cur/0141 b/demo/ermis-f/python_m/cur/0141 new file mode 100644 index 00000000..b8267be3 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0141 @@ -0,0 +1,27 @@ +From: ucvocnmb at somethingfunny.net (ucvocnmb at somethingfunny.net) +Date: Tue, 13 Apr 1999 18:41:32 GMT +Subject: --- No Obligation - Be paid to Surf!! ---- +Message-ID: +X-UID: 141 + +An unregistered copy of Newsgroup AutoPoster 95 was used to post this article! +--- + +http://www.alladvantage.com/go.asp?refid=ATE-943 + +This link will take you to a site of a Company that has launched this promotion only a week ago. + +This will not cost you any money and only a little time. It is not guaranteed to work, but, if this takes off, you'll kick yourself for not trying it. + +Go to the site indicated and read up on it and maybe sign-up. If you don't get involved, at least you learned about something! + +Good luck! + +http://www.alladvantage.com/go.asp?refid=ATE-943 + + + + + + + diff --git a/demo/ermis-f/python_m/cur/0142 b/demo/ermis-f/python_m/cur/0142 new file mode 100644 index 00000000..eb9b5545 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0142 @@ -0,0 +1,47 @@ +From: kelvin_chu at my-dejanews.com (kelvin_chu at my-dejanews.com) +Date: Sun, 25 Apr 1999 19:19:47 GMT +Subject: HELP! NumPy (Graphics) and Linux +Message-ID: <7fvpsh$l8e$1@nnrp1.dejanews.com> +Content-Length: 1361 +X-UID: 142 + +Hi all; + +I've had great success with EZplot and now want to move my code to Linux- +based platforms in my lab. I am having significant difficulties building +the Graphics portion of NumPy. + +0. I am running RedHat linux 5.2 +1. I have installed Yorick in the cannonical place. +2. Instead of libX11.a, I have a shared-object library, locatedin + /usr/X11R6/lib + +When I do the build (python makethis.py), I receive the following error: + +gcc -fpic -I/usr/local/lib/yorick/1.4/h -g -O2 +-I/usr/local/include/python1.5 -I/usr/local/include/python1.5 +-DHAVE_CONFIG_H -c ./Gist/Src/gistCmodule.c +./Gist/Src/gistCmodule.c:75: arrayobject.h: No such file or directory +./Gist/Src/gistCmodule.c:88: warning: `PyFPE_END_PROTECT' redefined +/usr/local/include/python1.5/pyfpe.h:169: warning: this is the location of +the previous definition +make: *** [gistCmodule.o] Error 1 + + +I suspect that I am going to run into multiple problems. There is a cryptic +statement in the README that indicates that I should do import_arrays() before +doing the build...where do I implement this? How much of this problem is +related to the shared object X libs? + +Thanks, I appreciate any light you can shed on this matter! + +Cheers, + +Kelvin + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/0143 b/demo/ermis-f/python_m/cur/0143 new file mode 100644 index 00000000..d6a8aabe --- /dev/null +++ b/demo/ermis-f/python_m/cur/0143 @@ -0,0 +1,32 @@ +From: eugened at istar.ca (Eugene Dragoev) +Date: Wed, 21 Apr 1999 23:23:59 -0400 +Subject: The Future of Tk? +Message-ID: <371E964F.C531C2A@istar.ca> +X-UID: 143 + +For programmers using languages other than Tcl. + +I recently "discovered" the latest stable version of Tcl/Tk (8.05) and +must say that was quite impressed by the simplicity and ease of use of +Tk. + +But I also found that while older versions of Tk were using lightweight +components (Some Java terminology :) the latest version is using native +components for things like scrollbars and buttons. + +I don't want to say that this is bad for Tcl users but what about all +the other languages that use Tk? Isn't writting multiplatform GUI harder +using native components. I think Java made big step forward in +abandoning the native components and using lightweight ones in Swing. + +Is there going to be any Tk implementation that will continue using +lightweight components? + +What do you think? + + +Eugene + + + + diff --git a/demo/ermis-f/python_m/cur/0144 b/demo/ermis-f/python_m/cur/0144 new file mode 100644 index 00000000..bc48d928 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0144 @@ -0,0 +1,54 @@ +From: aaron_watters at my-dejanews.com (aaron_watters at my-dejanews.com) +Date: Thu, 08 Apr 1999 15:15:30 GMT +Subject: GadFly - MemoryError +References: <370B5E83.C796BFF3@palladion.com> +Message-ID: <7eih6b$ck2$1@nnrp1.dejanews.com> +Content-Length: 1636 +X-UID: 144 + +It would be interesting to try this, but my guess is that this would be +slower than the first query since equalities are optimized and "in" is not. +I hope oleg is using gadfly 1.0 too (not beta 0.2 or whatever). -- Aaron +Watters + +In article <370B5E83.C796BFF3 at palladion.com>, + Tres Seaver wrote: +> Oleg Broytmann wrote: +> > +> > Hello! +> > +> > I tried to add yeat another database backend to my project "Bookmarks +> > database". My database contains now about 3000 URLs, not too much, I think. +> > I subclass by BookmarksParser to parse bookmarks.html into gadfly database +> > and got a database of 500 Kbytes - very small database, I hope. +> > Then I tried to find duplicates (there are duplicates). I ran the query: +> > +> > SELECT b1.rec_no, b2.rec_no, b1.URL +> > FROM bookmarks b1, bookmarks b2 +> > WHERE b1.URL = b2.URL +> > AND b1.rec_no < b2.rec_no +> +> How many duplicates are there? Something like +> +> SELECT URL FROM bookmarks GROUP BY URL HAVING COUNT(*) > 1 +> +> will produce the URL's with duplicates; you could then do +> +> SELECT rec_no, URL FROM bookmarks +> WHERE URL IN +> (SELECT URL FROM bookmarks GROUP BY URL HAVING COUNT(*) > 1) +> +> or create a temp table first with the results of the subquery, then join it in a +> separate query. +> -- +> ========================================================= +> Tres Seaver tseaver at palladion.com 713-523-6582 +> Palladion Software http://www.palladion.com +> + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/0145 b/demo/ermis-f/python_m/cur/0145 new file mode 100644 index 00000000..0bff9c60 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0145 @@ -0,0 +1,40 @@ +From: merlyn at stonehenge.com (Randal L. Schwartz) +Date: 29 Apr 1999 07:24:00 -0700 +Subject: converting perl to python - simple questions. +References: <7fvagp$8lm$1@nnrp1.dejanews.com> +Message-ID: +Content-Length: 1392 +X-UID: 145 + +>>>>> "Dan" == Dan Schmidt writes: + +Dan> Four and a half, actually; Perl 5.000 was released in October 1994, +Dan> exactly a week after Python 1.1. In fact, Perl 5 has been the current +Dan> version longer than Perl 4 was (Perl 4 was released in March 1991, so +Dan> it was the newest version for only three and a half years). + +Not to mention that *all* versions of Perl prior to 5.004 have known, +documented buffer-overflow potential problems, so if you use those +scripts in any public-execution environment (like CGI or setuid +programs or daemons), you are setting yourself up for a "non use of +best practices" lawsuit when the bad guys break in. + +I'm told by people in-the-know of a rootkit that targets *any* CGI +script and sends it the right thing to break in, presuming you know +the arch of the box and have a reasonable guess as to the Perl +version. + +Perl 4 is dead. Anything before 5.004 is dangerous. Perl5 *is* Perl. + +Just another Perl (and Python) hacker, + +-- +Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095 +Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying +Email: Snail: (Call) PGP-Key: (finger merlyn at teleport.com) +Web: My Home Page! +Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me + + + + diff --git a/demo/ermis-f/python_m/cur/0146 b/demo/ermis-f/python_m/cur/0146 new file mode 100644 index 00000000..2a1e4a24 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0146 @@ -0,0 +1,50 @@ +From: tim_one at email.msn.com (Tim Peters) +Date: Sat, 3 Apr 1999 07:54:58 GMT +Subject: Python Chip +In-Reply-To: <3703D175.85747FEE@pop.vet.uu.nl> +References: <3703D175.85747FEE@pop.vet.uu.nl> +Message-ID: <000501be7da7$450ddf20$879e2299@tim> +Content-Length: 1613 +X-UID: 146 + +[Martijn Faassen] +> This isn't official, but have you all heard about the Python chip? +> ... [recklessly premature disclosure deleted] ... + +[Chad Netzer] +> April fools, right? + +[Martin] +> No, no, this is as serious as a ten ton weight! Just ask Tim about the +> stress tests if you still don't believe it. :) +> +> Is-it-april-already-ly yours, + +As Martijn reported, the stress tests are going *amazingly* well, modulo a +subtle space/tab screwup in the hardware. I've completed VLSINANNY.py, +which will verify future hardware conformance to generally accepted +international leading whitespace principles, but the Russian part of the +team is refusing to cooperate in protest of Kosovo (although if you ask me, +they're just pissed at the Swedes for sneaking herring into the borscht ... +again). + +Delicate international diplomacy aside, the tests are *so* promising that +the Steering Committee has delayed announcement of the 1999 Pythonic Award, +pending completion of a successful run of GuidoStone.py, a full real-time 3D +simulation of a gawky Dutchman throwing rocks at a Sicilian mobster, from +the back of a galloping camel. This was supposed to complete yesterday, but +was interrupted when Larry Wall ran up from the back of the room and smashed +the chip with his bare hands. Guido-- the very definition of grace under +pressure --quipped "But, Larry, *we've* known for a decade that you've +wasted your life!", and pulled a backup chip out of his sneer. + +The most important thing, though, is that until they say otherwise, I'm +*still* the Only Living Pythonic Award winner! + +no-joking-matter-ly y'rs - tim + + + + + + diff --git a/demo/ermis-f/python_m/cur/0147 b/demo/ermis-f/python_m/cur/0147 new file mode 100644 index 00000000..81aee0be --- /dev/null +++ b/demo/ermis-f/python_m/cur/0147 @@ -0,0 +1,28 @@ +From: nascheme at m67.enme.ucalgary.ca (Neil Schemenauer) +Date: 16 Apr 1999 22:17:32 GMT +Subject: reval builtin +References: <7f36m6$koq@ds2.acs.ucalgary.ca> <001701be86e0$68574a60$589e2299@tim> +Message-ID: <7f8cts$cei@ds2.acs.ucalgary.ca> +X-UID: 147 + +On Thu, 15 Apr 1999 01:36:38 GMT, Tim Peters wrote: +>def reval(string): +> return eval(string, {"__builtins__": {}}) + +Yes, I know that trick. It is much too easy and straight forward +though. ;) + +>If you're determined to allow only literals (I don't see any harm in +>allowing e.g. 1+3), probably easiest to feed the string to the std parser +>module, then crawl over the AST looking for things to complain about. + +I thought of doing that but suspected that it would be pretty slow. I +decided to waste some of my time and hand code a parser. I will +announce it in another post. Since your the compiler guy, you should +able to point out all the errors in my code, right? + + picking-tim-bots-umm-brain?-ly y'rs - Neil + + + + diff --git a/demo/ermis-f/python_m/cur/0148 b/demo/ermis-f/python_m/cur/0148 new file mode 100644 index 00000000..0ff34a50 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0148 @@ -0,0 +1,60 @@ +From: dalke at bioreason.com (Andrew Dalke) +Date: Sun, 25 Apr 1999 19:14:51 -0600 +Subject: Handling backspace chars in a string... +References: <37239c48.594910176@news2.bga.com> +Message-ID: <3723BE0B.EFEC289A@bioreason.com> +Content-Length: 1466 +X-UID: 148 + +bwizard at bga.com (Purple) said: +> I'm in the posistion of having to process strings with arbitrary +> numbers of backspace and newline characters in them. The backspaces +> actually get put in the string, so I have to handle removing the +> characters that are backspaced over. +> +> [one implementation given] +> +> This just looked rather messy to me -- I was curious if anyone know +> a better way? + +Here's one possibility. It uses a regular expression substitution +to replace + with the empty string. +(Note: don't use a raw string for the re; r".\b" will find a character +which is before a word break.) When done, it removes all the +leading backspaces. + + +import re +char_backspace = re.compile(".\b") # Don't use a raw string here +any_backspaces = re.compile("\b+") # or here + +def apply_backspaces(s): + while 1: + t = char_backspace.sub("", s) + if len(s) == len(t): + # remove any backspaces which may start a line + return any_backspaces.sub("", t) + s = t + + +>>> apply_backspaces("\bQ\b\bAndqt\b\brew Dalkt\br\be") +'Andrew Dalke' + + +You mentioned something about containing newlines. By default, the +"." re pattern doesn't match a \n, so the above code acts like a +normal tty, and doesn't remove the \n if followed by a newline. This +is likely the right thing. That's also why I delete any backspace +because + "this\n\bthat" + +should be the same string as + "this +that" + + Andrew Dalke + dalke at acm.org + + + + diff --git a/demo/ermis-f/python_m/cur/0149 b/demo/ermis-f/python_m/cur/0149 new file mode 100644 index 00000000..1b8bf88f --- /dev/null +++ b/demo/ermis-f/python_m/cur/0149 @@ -0,0 +1,42 @@ +From: adustman at comstar.net (Andy Dustman) +Date: Mon, 12 Apr 1999 23:06:08 GMT +Subject: role of semilcolon +In-Reply-To: +References: +Message-ID: +X-UID: 149 + +On 12 Apr 1999, Reuben Sumner wrote: + +> In the python interpreter doing 'a=1;b=2;b=3' does what I would +> expect, three seperate assignments. However ; doesn't seem to appear +> in the language reference except in the list of delimeters. Is the +> above example formally valid python? + +Semicolon is a statement separator. So is the end of line unless you have +open parentheses, brackets, braces, or triple-quotes. So: + + a=1;b=2;b=3 + +is the same as: + + a=1 + b=2 + b=3 + +But a Pythonism you may want to adapt is: + + a,b,c = 1,2,3 + +In practice, semicolon is rarely used in Python, since the end of line +separates statements just as well with one less byte (none vs. one :), and +multiple assignments can be done as above. + +-- +andy dustman | programmer/analyst | comstar communications corporation +telephone: 770.485.6025 / 706.549.7689 | icq: 32922760 | pgp: 0xc72f3f1d + + + + + diff --git a/demo/ermis-f/python_m/cur/0150 b/demo/ermis-f/python_m/cur/0150 new file mode 100644 index 00000000..40909fd5 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0150 @@ -0,0 +1,24 @@ +From: tjreedy at udel.edu (Terry Reedy) +Date: 7 Apr 1999 02:36:02 GMT +Subject: Xbase++ preprocessor implementation in Python +References: <37097A3A.F772205@magna.com.au> +Message-ID: <7eegai$3ak$1@news.udel.edu> +X-UID: 150 + +In article <37097A3A.F772205 at magna.com.au>, garys at magna.com.au says... + +>Attached please find a Python implementation of the Xbase++ preprocessor. +... +>Oh, and it is *dead slow*! - hundreds of times slower I think! +... + +I do not know re's well enough to comment on whether they can be rewritten +to run faster. I believe there is a python profiler which might give +indications on where to start to speed things up. + +Terry J. Reedy + + + + + diff --git a/demo/ermis-f/python_m/cur/0151 b/demo/ermis-f/python_m/cur/0151 new file mode 100644 index 00000000..18eb0536 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0151 @@ -0,0 +1,56 @@ +From: matt at mondoinfo.com (Matthew Dixon Cowles) +Date: Sun, 11 Apr 1999 13:59:56 -0500 +Subject: best way to copy a file [Q] +References: <000201be8441$7965d4d0$6eba0ac8@kuarajy.infosys.com.ar> +Message-ID: +Content-Length: 1370 +X-UID: 151 + +In article <000201be8441$7965d4d0$6eba0ac8 at kuarajy.infosys.com.ar>, "Bruno +Mattarollo" wrote: + +> Hi! +> +> I need to copy a file (can be binary or ascii) from one path to +> another. I +> have tryied to do: +> line = fd.readline() +> while line: +> fd2.write(line) +> line = fd.readline() +> fd.close() +> fd2.close() +> +> It only works for ascii files ... How can I do a 'copy' ...? I +need to +> run +> this on NT ...:( And I don't want to open a shell to do a copy from +> there... I also tryied fd.read() ... No success neither. I have looked +> unsuccesfully throughout the documentation and didn't find a 'filecopy' +> method. The files can range from 1KB to 600MB+ ... + +Bruno, +You need to open the files in "binary" mode since Windows makes a +distinction between text and binary files. I understand that something +like + +in=open("file","rb") +out=open("file2","wb") + +should work. Also, you might want to reconsider using readline() for +binary files. If a large binary file happened not to contain \r\n, +readline() might try to grab an unreasonably large piece of the file: + +>>> foo=open("/dev/zero") +>>> foo.readline() +Bus error + +The function copyfile() in the standard module shutil would probably work +well for you. But now you know why . + +Regards, +Matt + + + + diff --git a/demo/ermis-f/python_m/cur/0152 b/demo/ermis-f/python_m/cur/0152 new file mode 100644 index 00000000..01d0569b --- /dev/null +++ b/demo/ermis-f/python_m/cur/0152 @@ -0,0 +1,40 @@ +From: dacut at kanga.org (David Cuthbert) +Date: Fri, 23 Apr 1999 20:32:41 -0400 +Subject: Bug or Feature? +References: <37208E69.4B022E0C@mediaone.net> +Message-ID: <7fr3eg$bqr@world1.bellatlantic.net> +X-UID: 152 + +Fuming Wang wrote: +> I found this little surprise with Python 1.5.1: +> >list = [[0]*2]*4 +> >list +> [[0, 0], [0, 0], [0, 0], [0, 0]] +> >list[0][1] = 9 +> >list +> [[0, 9], [0, 9], [0, 9], [0, 9]] + +> Is this a bug or a feature that I don't know about? + +Most definitely a feature. You're getting the same reference for all four +list elements. To break it apart: + +list = [[0] * 2] * 4 # let a = 0, an integer. + [[a] * 2] * 4 # integers are immutable, so a copy is made + # for [a] * 2; let the copy be b. + [[a, b]] * 4 # ah, but [a, b] is a list, q. + [ q ] * 4 # lists are mutable, so we're just expanding + # references that all refer to the same + # q object. + [ q, q, q, q ] # Ta da! All four elements have the same + # object. + +If this were not the case, lists would be completely unnecessary since they +would be the same as tuples! + + + + + + + diff --git a/demo/ermis-f/python_m/cur/0153 b/demo/ermis-f/python_m/cur/0153 new file mode 100644 index 00000000..8b1259ee --- /dev/null +++ b/demo/ermis-f/python_m/cur/0153 @@ -0,0 +1,100 @@ +From: faassen at pop.vet.uu.nl (Martijn Faassen) +Date: Tue, 27 Apr 1999 18:29:32 +0200 +Subject: Pointers to variables +References: <19990422121403.A279051@vislab.epa.gov> <371F6124.48EA9794@pop.vet.uu.nl> <7g2f5m$kl6$1@mlv.mit.edu> +Message-ID: <3725E5EC.63AC65B1@pop.vet.uu.nl> +Content-Length: 3156 +X-UID: 153 + +Michael Vezie wrote: +> +> In article <371F6124.48EA9794 at pop.vet.uu.nl>, +> Martijn Faassen wrote: +[snip my code example] +> +> I don't think it has anything to do with mutable or not. mylist[0] +> simply points (at first) to the same object (string) that +> variable_i_want_to_change (hereafter called 'var2chg'). Then, +> at the second assignment, mylist[0] points to something different. +> If var2chg were an array or dictionary, it would make no difference; +> mylist[0] would still, after the second assignment, be "Bar". + +I know this; I probably made it sound too horribly complicated. + +> > mylist = [None] +> > variable_i_want_to_change = {} +> > mylist[0] = variable_i_want_to_change +> > mylist[0]["some key"] = "bar" # indeed changes +> >variable_i_want_to_change! +> +> This is different from the other examples. Here, you dereference +> mylist[0] (which is still pointing to the same object that var2chg +> points to). So the common object that they both point to changes. +> Strictly speaking, you aren't changing var2chg, just that which it +> (and mylist[0]) points to. + +Yes, that's because everything in Python is a reference. But in case of +immutable objects this is identical to value semantics, unless you use a +tuple which contains a mutable object in itself. + +> > # mylist[0] = "Bar" -- doesn't work, makes mylist[0] point elsewhere +> +> Well, it works as expected. It changes mylist[0], not what mylist[0] +> references. + +If you know you're dealing with references and that assignment only +changes what variable references what data, yes. I was attempting to +explain the implications of this, but I admit it was horribly +convoluted. :) + +[snip my atrocious C code] + +> I wonder if this is how it goes. I've not dived into the python +> engine code, so I don't know. Are immutable objects stored as +> objects or just as the data? + +I haven't dived in the Python code either, but I've seen people talk +about Python allocating an object for either integer, so I imagine yes. + +> In the grand scheme of things, it +> really makes no difference. If there were an "add" method for +> ints (so you could say: +> +> var2chg = 5 +> var2chg.add(3) +> +> and have var2chg have a value of 8), then it would obviously be +> a concern. But you can't, so it really doesn't matter at the +> python level whether: +> +> a = 5 +> b = a +> +> means that b and a point to the same object, or to separate +> values of 5. If you could do b.add(3) and suddenly have a +> with a value of 8, then it would. + +Yes, unless you deal with tuples, which are immutable, but can contain +mutable things: + +a = { "mutable" : "Yes" } +b = (a, "foo") +c = b +c["mutable"] = "really" +# b is changed at this point too, even though the tuple was immutable + +This was pointed out to me on the Python tutor list after I pointed out +that reference vs value semantics is the same in case of immutable +objects. It's only the same in case they're deeply immutable (or if you +exclude tuples). + +Anyway, I was trying to attempt to explain the same principles as you +did; I just wasn't very succesful at it. :) + +Regards, + +Martijn + + + + diff --git a/demo/ermis-f/python_m/cur/0154 b/demo/ermis-f/python_m/cur/0154 new file mode 100644 index 00000000..63cfeddc --- /dev/null +++ b/demo/ermis-f/python_m/cur/0154 @@ -0,0 +1,33 @@ +From: debot at xs4all.nl (Frank de Bot) +Date: Sun, 11 Apr 1999 14:31:50 +0200 +Subject: Processing time +Message-ID: <37109636.1FF246CB@xs4all.nl> +X-UID: 154 + +How can I get the Processing time of a script? + + + +-- + \\\|/// + \\ - - // + ( @ @ ) +/----------------------oOOo-(_)-oOOo--------------------\ +| | +| | +| My Email: debot at xs4all.nl | +| Homepages: http://www.searchy.net/ | +| http://www.debot.nl/ppi/ | +| | +| | +\-------------------------------Oooo--------------------/ + oooO ( ) + ( ) ) / + \ ( (_/ + \_) + + + + + + diff --git a/demo/ermis-f/python_m/cur/0155 b/demo/ermis-f/python_m/cur/0155 new file mode 100644 index 00000000..f8c7418d --- /dev/null +++ b/demo/ermis-f/python_m/cur/0155 @@ -0,0 +1,54 @@ +From: oakley at channelpoint.com (Bryan Oakley) +Date: 22 Apr 1999 22:31:19 GMT +Subject: The Future of Tk? +References: <371E964F.C531C2A@istar.ca> <371F11C2.3162025@ciril.fr> <4fv$ECA+JyH3EwbN@jessikat.demon.co.uk> +Message-ID: <7fo7vn$irf$12@newsread.f.de.uu.net> +Content-Length: 2247 +X-UID: 155 + +Barry Margolin wrote: +> +> In article <4fv$ECA+JyH3EwbN at jessikat.demon.co.uk>, +> Robin Becker wrote: +> >I take this completely differently; least astonishment for me is if +> >program X looks and behaves the same way no matter what keyboard, mouse +> >and screen I'm using. As a 'user' of the program X it shouldn't matter +> >what OS/WM is executing the code. I certainly don't want vi or emacs to +> >be different on the mac why should I treat word or excel differently? +> +> I would be very surprised if Netscape on the Macintosh presented a +> Windows-like user interface, rather than adopting the standard Macintosh +> user interface. Most end users don't switch between platforms much, so +> it's more important that all the programs on their system conform to their +> expectations, than that a particular program work the same across different +> platforms. + +I would have to agree with that statement. While there are those who +think retaining the same look and feel across platforms is necessary, I +would wager they are in the distinct minority. That's not to invalidate +their position, but merely to put it in context. _Most_ users of +software want a package to look and feel like the other packages on a +given system. I hate, for example, the artsy (-fartsy) graphic programs +that have some weird UI instead of a more traditional UI. + +On the other hand, to some degree this is application-dependent rather +than user-dependent. For example, if I were to have a requirement to +write a air traffic control program that had to run on BeOS, MacOS, NT +and *nix, I would think there would be significant advantages to keeping +it 100% identical across all platforms. So, to some degree it depends on +the application, or the targeted user base. + +My point being, there's a need in the world for both models. Only, the +model where applications should adhere to native conventions is (I'm +guessing) far and away the most commonly expected model by most users. +Which is why I think using native windows on Tk is a win -- it meets the +needs of the majority (though definitely not all) of the users in the +world. + +-- +Bryan Oakley mailto:oakley at channelpoint.com +ChannelPoint, Inc. http://purl.oclc.org/net/oakley + + + + diff --git a/demo/ermis-f/python_m/cur/0156 b/demo/ermis-f/python_m/cur/0156 new file mode 100644 index 00000000..5e5d5279 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0156 @@ -0,0 +1,30 @@ +From: rhww at erols.com (R Wentworth) +Date: Wed, 21 Apr 1999 03:23:20 -0400 +Subject: HTMLgen in Java? +References: <7f2are$kqq$1@panix.com> +Message-ID: <371D7CE8.7CF9067@erols.com> +X-UID: 156 + + +"David C. Lambert" wrote: +> +> I'm looking for a Java class library (freeware) that is more +> or less parallel to HTMLgen in its capabilities and structure. +> (That is, classes encapsulating the programmatic generation +> of the major HTML structures). + +Well, one option might be to use JPython, in which case you would +have easy access to any Java class library you like, from Python. +Granted, this may not be the right solution for everyone. +(See http://www.python.org/jpython) + +> If anyone knows of such a beast, I'd appreciate a pointer. +> +> TIA. +> +> - David C. Lambert +> dcl at panix.com + + + + diff --git a/demo/ermis-f/python_m/cur/0157 b/demo/ermis-f/python_m/cur/0157 new file mode 100644 index 00000000..b52fd2b1 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0157 @@ -0,0 +1,38 @@ +From: aa8vb at vislab.epa.gov (Randall Hopper) +Date: Tue, 6 Apr 1999 12:27:04 GMT +Subject: mxDateTime in Python distribution +In-Reply-To: ; from Oleg Broytmann on Tue, Apr 06, 1999 at 04:15:32PM +0400 +References: <19990406070255.A867135@vislab.epa.gov> +Message-ID: <19990406082704.A868024@vislab.epa.gov> +Content-Length: 1150 +X-UID: 157 + +Oleg Broytmann: + |> I needed to do some date/time arithmetic recently and found that core + |> Python didn't have this functionality. I was a little skeptical about + |> using a seperate extension for portability reasons. + | + | There is always some need for something more. Do you really want to + |include every bit of code into the Library? It would take infinite time to + |download and compile Python distribution if all possible modules and + |extensions come in. + | + | I want to keep the Library as little as possible. Download, compile and + |install only those extensions you need. + +On that thread, we should strive for a balance. Short download times is +nice, but we shouldn't go the way of Tcl where everything useful is a +separately downloaded and installed extension. That limits the +accessibility of the language. + +(Joe, I tried that new tool you gave me; it doesn't work. Oh, Bill you +have to extensions A,B,C,D,E,F, and G. If you have root access, run this. +Otherwise run this, put these files over here, munge this config file,a and +set this env variable... [Bill to self: Nahh, it's not worth it. Next +project].) + +Randall + + + + diff --git a/demo/ermis-f/python_m/cur/0158 b/demo/ermis-f/python_m/cur/0158 new file mode 100644 index 00000000..9314518a --- /dev/null +++ b/demo/ermis-f/python_m/cur/0158 @@ -0,0 +1,15 @@ +From: tedken at manning.com (Ted Kennedy) +Date: Fri, 09 Apr 1999 10:41:19 -0400 +Subject: New book on Perl TK +Message-ID: <370E118F.E387C3F8@manning.com> +X-UID: 158 + +We are looking for a few qualified people to review and comment on the +manuscript of a new book entitled, "Application Building with Perl TK". +If interested, please send a brief description of your credentials to + and I will send you more information. + + + + + diff --git a/demo/ermis-f/python_m/cur/0159 b/demo/ermis-f/python_m/cur/0159 new file mode 100644 index 00000000..30fd6239 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0159 @@ -0,0 +1,74 @@ +From: tim_one at email.msn.com (Tim Peters) +Date: Sun, 11 Apr 1999 22:04:25 GMT +Subject: bug or feature? traceback with python -x off by one line +In-Reply-To: <3710DF00.DF5@creo.com> +References: <3710DF00.DF5@creo.com> +Message-ID: <001101be8467$43307660$2a9e2299@tim> +Content-Length: 2293 +X-UID: 159 + +[Dale Nagata] +> I'm using Python 1.5.1 on Windows NT 4.0 Service Pack 3. + +This should work the same way everywhere, 1.5.2 included. + +> If I run a script the "normal" way, the exception +> traceback prints the correct source file line numbers: +> +> E:\home\dale\test\>python testx.py +> ... +> File "E:\home\dale\test\testx.py", line 18, in ? +> main() +> ... +> +> However, if I run the exact same script with the Python -x +> command line option to skip the first line of the script, the +> reported line numbers are consistently off by one: +> +> E:\home\dale\test>python -x testx.py +> ... +> File "testx.py", line 17, in ? +> try: +> ... +> +> Is this the way it's *supposed* to work? + +Feeling a bit under-telepathic today, I can only confirm that the code is +functioning as written . -x is implemented via advancing the input +file stream beyond the first line (well ...) before the parser ever sees it. +As far as the parser is concerned, the first line it sees is line number 1. + +> ... +> Any ideas on the best way to resolve this? + +I agree it would be nice to change. In the meantime, I don't see a +Python-only workaround. Under NT you don't *need* the -x trick, though +(look for NT help on "assoc" and friends; provided you have the cmd.exe +extensions enabled (the NT default), you can teach NT that .py files are to +be run by Python, much as .bat files are to be run by the command-line +interpreter; you cannot teach Win95 this, though). + +> How, from within a script, can I detect that the -x option is +> in effect? + +Can't; the info is long gone. + +> Or do I have to go hack the interpreter source? + +Start with function Py_Main in Modules\main.c. If you get it to work, send +a patch to Guido! I'd try replacing the "skipfirstline" fgets with a loop +that does getc until it hits a newline or EOF, and if hits a newline pushes +it back with ungetc. This is a local change to one block of code. Then the +first line the parser sees will be "\n", which is harmless, but will advance +the line counter. As is, the skipfirstline block advances the stream +*beyond* the newline, and that's where you're getting in trouble; the +current code is also flawed if the first line (including trailing newline) +has more than 255 characters. + +aha!-12-more-than-a-power-of-3-ly y'rs - tim + + + + + + diff --git a/demo/ermis-f/python_m/cur/0160 b/demo/ermis-f/python_m/cur/0160 new file mode 100644 index 00000000..ac2b365c --- /dev/null +++ b/demo/ermis-f/python_m/cur/0160 @@ -0,0 +1,36 @@ +From: tseaver at palladion.com (Tres Seaver) +Date: Mon, 12 Apr 1999 08:33:53 -0500 +Subject: WinZip vs 0-length files (was RE: trivial import question) +References: <000401be7808$6105e3c0$549e2299@tim> <000201be8308$8b824520$ac9e2299@tim> +Message-ID: <3711F641.AA796DA8@palladion.com> +Content-Length: 1033 +X-UID: 160 + +Tim Peters wrote: +> +> With tne candidate release of Python 1.5.2 just out, this is quite timely! +> +> At various times in March, at least Brad Clements, Lars Marius Garshol and +> Tres Seaver spread the rumor that WinZip wouldn't extract 0-length files, +> thus causing Python packages depending on an empty __init__.py to fail in +> mysterious ways. +> +> I tried reproducing that but had no problems with the latest WinZip, so had +> a good time insulting them all . +> +> But they were right! Steve Spicklemire provided the missing clue offline: +> while WinZip does not have a problem with 0-length files in .zip archives, +> it does indeed fail to extract them from .tgz archives. + +Heh, vindication! I hadn't reproduced the problem myself since Tim's +chastisement (not the comfy chair!), and appreciate his graciousness in beating +us to the counterpunch. + +-- +========================================================= +Tres Seaver tseaver at palladion.com 713-523-6582 +Palladion Software http://www.palladion.com + + + + diff --git a/demo/ermis-f/python_m/cur/0161 b/demo/ermis-f/python_m/cur/0161 new file mode 100644 index 00000000..dcbc9732 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0161 @@ -0,0 +1,51 @@ +From: mwh21 at cam.ac.uk (Michael Hudson) +Date: 14 Apr 1999 16:45:09 +0100 +Subject: REPOST:pretty please - Help re libpython1.5.so +References: <3714B9F9.30285D74@earth.ox.ac.uk> +Message-ID: +Content-Length: 1301 +X-UID: 161 + +Nick Belshaw writes: +> I'm gonna start taking this personally soon !!! + +1) You've not been very specific wrt platform, hardware. +2) I was getting there! Give us 24 hours! + +> You bright guys out there..................................... +> +> If anyone can spare a second - +> +> Whilst trying to get Python plugins to work on Gnumeric-0.23 I bumped up +> +> against the need for libpython1.5.so.0.0.0 +> +> I have 'The Full Python' ( - thats the sequel to 'The Full Monty' !!! ) +> +> and can build xxxx.a no problem but what do I have to do to get xxxx.so +> Can't seem to find anything specific on it in the docs or readme or +> Setup and my knowledge is too superficial to allow me to be clever. + +Are you sure it's exactly libpython1.5.so.0.0.0 it's asking for? I've +just compiled this bit of gnumeric (succesfully) and it's created +libpython.la, which references libpython.so.0.0.0 and libpython.a, +both of which are linked to libpython1.5.a. This is all on a redhat +5.2/i386 with slap bang up to date python and gnumeric from their +respective CVS repositories. + +> Help anyone? + +I'd try updating your gnumeric, and if that fails, email me more +details & what make says as it fails and I'll have a think. + +> cheers +> Nick/Oxford Geochemistry + +Michael/"the other place" + + + + + + + diff --git a/demo/ermis-f/python_m/cur/0162 b/demo/ermis-f/python_m/cur/0162 new file mode 100644 index 00000000..3df26a13 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0162 @@ -0,0 +1,18 @@ +From: bkc at murkworks.com (Brad Clements) +Date: Thu, 8 Apr 1999 12:29:52 -0400 +Subject: When will 1.5.2 final be released? +Message-ID: <7eilic$r7f$1@news.clarkson.edu> +X-UID: 162 + +I was porting 1.5.2b2 to NetWare, but have decided to wait for the final +release. Any ideas when that will be available? + +Thanks.. + + + + + + + + diff --git a/demo/ermis-f/python_m/cur/0163 b/demo/ermis-f/python_m/cur/0163 new file mode 100644 index 00000000..2c0928aa --- /dev/null +++ b/demo/ermis-f/python_m/cur/0163 @@ -0,0 +1,37 @@ +From: paul.moore at uk.origin-it.com (Paul Moore) +Date: Fri, 9 Apr 1999 14:18:27 +0200 +Subject: add type predicates to types module? +References: <14085.18842.492142.484721@bitdiddle.cnri.reston.va.us> <3705D878.4454DBEB@lemburg.com> +Message-ID: +X-UID: 163 + +On Sat, 3 Apr 1999 10:59:36 +0200, M.-A. Lemburg wrote: +>Jeremy Hylton wrote: +>> +>> The folkloric "file-like object" type is a good example. When people +>> say "file-like object" they mean an object that responds in a +>> reasonable way to the particular subset of methods on a builtin file +>> object that they are interested in. + +Er, doesn't this point out one of the inherent flaws with this scheme? You +don't really want to know the type of the item, you want to be able to do +certain things with it. So why not do + + try: + whatever... + except TypeError: + whatever you do if you're given the wrong type + +In other words, try and trap exceptions rather than test beforehand. + +That tends to be how C++ "generic programming" works. Write templates using +the operations you need - the templates won't compile when used with incorrect +types. We're just replacing a compile time check with a runtime one, because +Python uses dynamic typing in place of C++'s static model. + +Paul Moore. + + + + + diff --git a/demo/ermis-f/python_m/cur/0164 b/demo/ermis-f/python_m/cur/0164 new file mode 100644 index 00000000..1773b7de --- /dev/null +++ b/demo/ermis-f/python_m/cur/0164 @@ -0,0 +1,28 @@ +From: johanw at easics.be (Johan Wouters) +Date: Tue, 13 Apr 1999 09:09:45 +0200 +Subject: Error loading 'binascii' +References: <19990413032855.10759.qmail@nw179.netaddress.usa.net> +Message-ID: <3712EDB9.E2240D74@easics.be> +X-UID: 164 + +Seems to work here: + +> python +Python 1.5.1 (#2, Apr 20 1998, 16:24:46) [GCC 2.8.1] on sunos5 +Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam +>>> import binascii +>>> + + +Kind regards, +-- +=================================================================== +Johan Wouters === Easics === +ASIC Designer === VHDL-based ASIC design services === +Tel: +32-16-395 616 =================================== +Fax: +32-16-395 619 Interleuvenlaan 86, B-3001 Leuven, BELGIUM +mailto:johanw at easics.be http://www.easics.com + + + + diff --git a/demo/ermis-f/python_m/cur/0165 b/demo/ermis-f/python_m/cur/0165 new file mode 100644 index 00000000..dc1dd50a --- /dev/null +++ b/demo/ermis-f/python_m/cur/0165 @@ -0,0 +1,108 @@ +From: sdm7g at Virginia.EDU (Steven D. Majewski) +Date: Fri, 23 Apr 1999 14:26:41 -0400 (EDT) +Subject: Python too slow for real world +In-Reply-To: <3720A21B.9C62DDB9@icrf.icnet.uk> +References: <372068E6.16A4A90@icrf.icnet.uk> <3720A21B.9C62DDB9@icrf.icnet.uk> +Message-ID: +Content-Length: 3075 +X-UID: 165 + +On Fri, 23 Apr 1999, Arne Mueller wrote: + +> Hi All, +> +> thanks very much for all the suggestions how to speed up things and how +> to THINK about programming in python. I got alot of inspiration from +> your replys. However the problem of reading/writing larges files line by +> line is the source of slowing down the whole process. +> +> def rw(input, output): +> while 1: +> line = input.readline() +> if not line: break +> output.write(line) +> +> f = open('very_large_file','r') +> rw(f, stdout) +> +> The file I read in contains 2053927 lines and it takes 382 sec to +> read/write it where perl does it in 15 sec. These simple read/write +> functions use the functions from the C standard library, don't they? So, +> readline/write don't seem to be implemented very efficently ... (?) +> +> I can't read in the whole file as a single block, it's too big, if +> readline/write is slow the program will never get realy fast :-( +> + + +My guess would be that a difference this big is due to the file +buffering mode. + +See 'open' in the library reference docs: + + +| open (filename[, mode[, bufsize]]) + + [...] + +| ... The optional bufsize argument +| specifies the file's desired buffer size: 0 means unbuffered, 1 means +| line buffered, any other positive value means use a buffer of +| (approximately) that size. A negative bufsize means to use the system +| default, which is usually line buffered for for tty devices and fully +| buffered for other files. If omitted, the system default is used.[2.10] + + +Note that last sentence. +If your really testing this by writing to the standard output, it may +be using line buffered io. ( On a related note, I think it was AIX that +had a horribly misfeatured /dev/null implementation that caused io +tests dumped to /dev/null to be slower than if you used an actual device!) + + +Adding the following wrapper function to your 'rw' function, you +can test the effect of different buffer sizes or options. + +from time import clock + +def test1( filename, buf=None ): + if buf == None: + inp = open( filename, 'r' ) + else: + inp = open( filename, 'r', buf ) + out = open( 'junk', 'w' ) + c0 = clock() + rw( inp, out ) + c1 = clock() + return c1 - c0 + + +On the Mac, this makes about a *37 difference. +( I got tired of waiting for it to finish on 'big.file' , so + I cut down the size. ) + +>>> iotest.makebigfile( 'not.so.big.file', 4001 ) +>>> iotest.test1( 'not.so.big.file' ) +1.18333333333 +>>> iotest.test1( 'not.so.big.file', buf=1 ) +1.88333333333 +>>> iotest.test1( 'not.so.big.file', buf=0 ) +68.3833333333 + + +I surely HOPE this is your problem! + + +---| Steven D. Majewski (804-982-0831) |--- +---| Department of Molecular Physiology and Biological Physics |--- +---| University of Virginia Health Sciences Center |--- +---| P.O. Box 10011 Charlottesville, VA 22906-0011 |--- + + Caldera Open Linux: "Powerful and easy to use!" -- Microsoft(*) + (*) + + + + + + diff --git a/demo/ermis-f/python_m/cur/0166 b/demo/ermis-f/python_m/cur/0166 new file mode 100644 index 00000000..a6cd2dad --- /dev/null +++ b/demo/ermis-f/python_m/cur/0166 @@ -0,0 +1,26 @@ +From: gellyfish at gellyfish.com (Jonathan Stowe) +Date: 30 Apr 1999 09:54:32 +0100 +Subject: Python and Perl +References: +Message-ID: <37296fc8@newsread3.dircon.co.uk> +X-UID: 166 + +In comp.lang.perl.misc Ben Caradoc-Davies wrote: +> [This is not intended to start another pointless language war. Well, at least +> not between Perlers and Pythonistas. :-) ] +> + + + +Then why did you cross-post it then ? + +*plonk* + +/J\ +-- +Jonathan Stowe + + + + + diff --git a/demo/ermis-f/python_m/cur/0167 b/demo/ermis-f/python_m/cur/0167 new file mode 100644 index 00000000..bbccd360 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0167 @@ -0,0 +1,67 @@ +From: paul at prescod.net (Paul Prescod) +Date: Mon, 26 Apr 1999 22:09:09 GMT +Subject: Python too slow for real world +References: <372068E6.16A4A90@icrf.icnet.uk> + <3720A21B.9C62DDB9@icrf.icnet.uk> + <3720C4DB.7FCF2AE@appliedbiometrics.com> + <3720C6EE.33CA6494@appliedbiometrics.com> + + + <37215EFB.433AFCA6@prescod.net> + + <3724B2D6.B468687A@prescod.net> +Message-ID: <3724E405.5E8ACFD6@prescod.net> +Content-Length: 2104 +X-UID: 167 + +Roy Smith wrote: +> +> Paul Prescod wrote: +> > It is a performance issue if you don't know that regexps are supposed to +> > be compiled. +> +> I hope this doesn't sound as bad as I fear it might, but part of being a +> good programmer (or at least a good computer scientist) is to understand +> performance issues like this. + +No doubt. But Python is not designed to be a programming language +exclusively for good programmers or computer scientists. As I understand +the design, it also caters to those that are new programmers and to those +that don't want to worry about any more details than they absolutely have +to. + +> If you +> don't understand that factoring the expensive constant compilation process +> out of a loop is important to make your program run fast, you aren't a +> good programmer. No programming language can help that. + +That is absolutely not true. It is, however, a common myth. A programming +language can have default behaviours that support beginning programmers. +Python does that in most cases. + +In the last Perl/Python flame war someone used the analogy of clumsiness. +Sure, a clumsy person could kill themself with a dull knife but that +doesn't mean that a loaded gun and a dull knife are equally dangerous. + +I'm not promoting any particular language change here. I'm arguing against +the throw-your-hands-in-the-air-and-expect-programmers-to-be-experts +argument that is used to shout down any change that makes the language +easier for non-experts. That's the design philosophy that gives rise to +other languages that start with P: "You mean you aren't familiar with the +string interpolation conventions of the C-shell and the input argument +defaulting of Awk?" + +-- + Paul Prescod - ISOGEN Consulting Engineer speaking for only himself + http://itrc.uwaterloo.ca/~papresco + +Company spokeswoman Lana Simon stressed that Interactive +Yoda is not a Furby. Well, not exactly. + +"This is an interactive toy that utilizes Furby technology," +Simon said. "It will react to its surroundings and will talk." + - http://www.wired.com/news/news/culture/story/19222.html + + + + diff --git a/demo/ermis-f/python_m/cur/0168 b/demo/ermis-f/python_m/cur/0168 new file mode 100644 index 00000000..84c4c13e --- /dev/null +++ b/demo/ermis-f/python_m/cur/0168 @@ -0,0 +1,40 @@ +From: aahz at netcom.com (Aahz Maruch) +Date: Sat, 17 Apr 1999 14:35:48 GMT +Subject: re.sub() loops +References: +Message-ID: +Content-Length: 1218 +X-UID: 168 + +In article , +Andreas Jung wrote: +> +>I am trying to do some lame HTML processing with some +>HTML. The following lines tries to remove some +>unneccessary code from a HTML file. However python hangs +>in this call: +> +>data = re.sub('','',data) + +Does the ...
contain *all* the strings "es", "da", "en", +"fi", and "sv"? Or are the strings supposed to be "?es" and so on? In +any event, with six ".*" patterns in there, you've got exponential +processing time, even if it's not hanging. + +I think that if you want assistance in constructing the correct regex, +you'll need to give us more info about the data and the goal you're +trying to accomplish. You might find it productive to pick up a copy of +the O'Reilly regex book -- I'd used regexes for years, but I didn't +really learn them until I started using that book. +-- + --- Aahz (@netcom.com) + +Hugs and backrubs -- I break Rule 6 <*> http://www.rahul.net/aahz/ +Androgynous poly kinky vanilla queer het + +Sometimes, you're not just out of left field, you're coming in +all the way from outer space. + + + + diff --git a/demo/ermis-f/python_m/cur/0169 b/demo/ermis-f/python_m/cur/0169 new file mode 100644 index 00000000..8f9f1c93 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0169 @@ -0,0 +1,44 @@ +From: dfan at harmonixmusic.com (Dan Schmidt) +Date: 23 Apr 1999 13:16:14 -0400 +Subject: Python too slow for real world +References: <372068E6.16A4A90@icrf.icnet.uk> <3720A21B.9C62DDB9@icrf.icnet.uk> +Message-ID: +Content-Length: 1176 +X-UID: 169 + +Arne Mueller writes: + +| I can't read in the whole file as a single block, it's too big, if +| readline/write is slow the program will never get realy fast :-( + +You can use the 'sizehint' parameter to readlines() to get some of the +efficiency of readlines() without reading in the whole file. The +following code isn't optimized, but it shows the idea: + +class BufferedFileReader: + def __init__ (self, file): + self.file = file + self.lines = [] + self.numlines = 0 + self.index = 0 + + def readline (self): + if (self.index >= self.numlines): + self.lines = self.file.readlines(65536) + self.numlines = len(self.lines) + self.index = 0 + if (self.numlines == 0): + return "" + str = self.lines[self.index] + self.index = self.index + 1 + return str + +-- + Dan Schmidt -> dfan at harmonixmusic.com, dfan at alum.mit.edu +Honest Bob & the http://www2.thecia.net/users/dfan/ +Factory-to-Dealer Incentives -> http://www2.thecia.net/users/dfan/hbob/ + Gamelan Galak Tika -> http://web.mit.edu/galak-tika/www/ + + + + diff --git a/demo/ermis-f/python_m/cur/0170 b/demo/ermis-f/python_m/cur/0170 new file mode 100644 index 00000000..02cc1ef3 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0170 @@ -0,0 +1,166 @@ +From: kajiyama at grad.sccs.chukyo-u.ac.jp (Tamito Kajiyama) +Date: 29 Apr 1999 21:40:56 GMT +Subject: Python implementation of tar +In-Reply-To: frankmcgeough@my-dejanews.com's message of Sat, 24 Apr 1999 23:20:22 GMT +References: <7ftjjl$tim$1@nnrp1.dejanews.com> +Message-ID: +Content-Length: 4607 +X-UID: 170 + +frankmcgeough at my-dejanews.com writes: +| +| Does someone has a tar implementation written in Python? + +The attached is one that I wrote last year. It can extract files from +archives, but cannot create an archive. + +Feel free to use, modify, and redistribute the module. Comments and +improvement are appreciated. + +Regards, + +KAJIYAMA, Tamito + +----------snip----------snip----------snip---------- +#!/usr/bin/env python +# +# Tar.py - handles tape archive (tar) files +# written by Tamito KAJIYAMA <18 November 1998> +# + +import string + +BLOCKSIZE = 512 + +def trim_null(v): + return v[:string.find(v, '\000')] +def oct2int(v): + return eval('0' + string.strip(v)) +def int2int(v): + return int(string.strip(v)) + +class SubfileHeader: + def __init__(self, hblock, tar_name, base): + self.tar_name = tar_name + self.base = base + self.name = trim_null(hblock[0:100]) + self.mode = hblock[100:108-2] + self.uid = oct2int(hblock[108:116-2]) + self.gid = oct2int(hblock[116:124-2]) + self.size = oct2int(hblock[124:136]) + self.mtime = oct2int(hblock[136:148]) + self.checksum = int2int(hblock[148:156-2]) + self.linkflag = hblock[156] + self.linkname = trim_null(hblock[157:256]) + if self.size % BLOCKSIZE == 0: + self.size_in_block = self.size / BLOCKSIZE + else: + self.size_in_block = self.size / BLOCKSIZE + 1 + +class Subfile: + def __init__(self, header): + self.base = header.base + self.size = header.size + self.file = open(header.tar_name, 'r') + self.file.seek(header.base, 0) + self.header = header + def fileno(self): + return self.file.fileno() + def seek(self, offset, whence=0): + if whence == 0: + pass + elif whence == 1: + offset = self.tell() + offset + elif whence == 2: + offset = self.size - offset + else: + raise IOError, (22, 'Invalid argument') + if offset < 0: + offset = 0 + elif offset > self.size: + offset = self.size + self.file.seek(self.base + offset, 0) + def tell(self): + return self.file.tell() - self.base + def read(self, length=None): + remain = self.size - self.tell() + if remain <= 0: + return '' + elif length and length < remain: + return self.file.read(length) + else: + return self.file.read(remain) + def readline(self, length=None): + remain = self.size - self.tell() + if remain <= 0: + return '' + elif length and length < remain: + return self.file.readline(length) + else: + return self.file.readline(remain) + def readlines(self): + lines = [] + while 1: + line = self.readline() + if not line: + break + lines.append(line) + return lines + +class Tar: + def __init__(self, filename): + file = open(filename, 'r') + self.headers = [] + while 1: + # read subfile header + hblock = file.read(BLOCKSIZE) + if hblock[0] == '\000': + break + header = SubfileHeader(hblock, filename, file.tell()) + self.headers.append(header) + # skip subfile body + file.read(BLOCKSIZE * header.size_in_block) + file.close() + def list(self): + return self.headers + def retrieve(self, name): + for header in self.headers: + if header.name == name: + return Subfile(header) + else: + return None + +def test(): + import os, sys, time + + if len(sys.argv) == 2: + tar = Tar(sys.argv[1]) + for header in tar.list(): + print ' name:', header.name + print ' size:', header.size, 'bytes' + print 'mtime:', time.ctime(header.mtime) + print + elif len(sys.argv) > 2: + tar = Tar(sys.argv[1]) + for filename in sys.argv[2:]: + file = tar.retrieve(filename) + if file: + outfile = open(file.header.name, 'w') + outfile.write(file.read()) + outfile.close() + print 'wrote', file.header.name + else: + print filename, 'not found' + else: + print 'Usage: %s filename.tar [filename ...]' % \ + os.path.basename(sys.argv[0]) + +if __name__ == '__main__': + test() +----------snip----------snip----------snip---------- +-- +KAJIYAMA, Tamito + + + + diff --git a/demo/ermis-f/python_m/cur/0171 b/demo/ermis-f/python_m/cur/0171 new file mode 100644 index 00000000..ccf2ab20 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0171 @@ -0,0 +1,75 @@ +From: hyoon at bigfoot.com (Hoon Yoon) +Date: Tue, 13 Apr 1999 18:22:29 -0400 +Subject: Event in COM +Message-ID: <3713C3A5.59CB36E5@bigfoot.com> +Content-Length: 2414 +X-UID: 171 + +Hi, + + Can anyone show me some code or recommend me a book for this problem? +I look through the newsgroup and tried to read the source, but I cannot +figuire it out. (Thanks in Adv) + I am trying to write an event handler for a ocx control that receives +real time data. Obviously, I cannot retrieve anything without event +handelers. +after following: +>> import win32com.client +>> rR = win32com.client.Dispatch('RTLIST.RTList') + +---- +Obvious place for me to do this is at +gen_py/xxxxxxx-0900000--33242432.py (something like it) +by uncommenting those lines and writing it in, but I would like to write +a class by inheriting it and overwriting it and keep these things +general as possible. + +class _DRTListEvents: + "Xyris RTList Control events" + CLSID = pythoncom.MakeIID('{122B0CF2-C843-11CF-8925-00AA00575EBE}') + _public_methods_ = [] # For COM Server support + _dispid_to_func_ = { + 3 : "OnChangeEx", + 4 : "OnErrorEx", + 1 : "OnSnapComplete", + 2 : "OnChange", + 5 : "OnChangeVnt", + } + + def __init__(self, oobj = None): + pass + def _query_interface_(self, iid): + import win32com.server.util + if iid==self.CLSID: return win32com.server.util.wrap(self) + + # Handlers for the control + # If you create handlers, they should have the following prototypes: +# def OnChangeEx(self, ItemIndex=defaultNamedNotOptArg, +ItemName=defaultNamedNotOptArg, ItemValue=defaultNamedNotOptArg, +ItemStatus=defaultNamedNotOptArg, ChangeType=defaultNamedNotOptArg): +# "Occurs whenever real-time update is made to an item in the list" +# def OnErrorEx(self, ErrorCode=defaultNamedNotOptArg): +# "Occurs when RTList experiences an error communicating with the +real-time data source" + + +Help! + +-- +***************************************************************************** +S. Hoon Yoon (Quant) Merrill Lynch Equity Trading, +yelled at yahoo.com hoon at bigfoot.com(w) +"Miracle is always only few standard deviations away, but so is +catastrophe." +* Expressed opinions are often my own, but NOT my employer's. +"I feel like a fugitive from the law of averages." Mauldin +***************************************************************************** +-------------- next part -------------- +A non-text attachment was scrubbed... +Name: vcard.vcf +Type: text/x-vcard +Size: 202 bytes +Desc: Card for Hoon Yoon +URL: + + diff --git a/demo/ermis-f/python_m/cur/0172 b/demo/ermis-f/python_m/cur/0172 new file mode 100644 index 00000000..0a4e9819 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0172 @@ -0,0 +1,39 @@ +From: pboddie at my-dejanews.com (Paul Boddie) +Date: Mon, 19 Apr 1999 15:13:01 GMT +Subject: Problem with FNORB +References: <19990419073413.22923.00002720@ng-fz1.aol.com> +Message-ID: <7ffh5k$d7k$1@nnrp1.dejanews.com> +Content-Length: 1281 +X-UID: 172 + +In article <19990419073413.22923.00002720 at ng-fz1.aol.com>, + alhopiteau at aol.com (Alhopiteau) wrote: +> i have a problem with fnorb, running the example i get a error while the +script +> try to import the Fnorb.cdr module, this module is developped using C, how to +> manage this? + +If you mean that when you try to execute a program which imports various +Fnorb modules, you get errors complaining about the whereabouts of the cdr +module, then you should ensure that your PYTHONPATH points to the directory +where cdrmodule.so is located. So, if you have cdrmodule.so in +/home/badger/Fnorb then you must make sure that /home/badger/Fnorb is in your +PYTHONPATH. Note that in the Fnorb source, cdr is not used as if it belongs +to the Fnorb package. (import cdr is used.) + +I believe that the instructions with Fnorb advise you to place the .so files +(made in Fnorb/src) either somewhere in your existing PYTHONPATH, or in the +Fnorb directory. If you choose the second of these two options then you must +modify your PYTHONPATH accordingly. I was caught out by this, but the above +solution worked for me. + +-- +Paul Boddie +Oslo, Norway + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/0173 b/demo/ermis-f/python_m/cur/0173 new file mode 100644 index 00000000..38181225 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0173 @@ -0,0 +1,58 @@ +From: ddb at crystal.uwa.edu.au (Douglas du Boulay) +Date: Thu, 29 Apr 1999 09:57:23 +0800 +Subject: sharing variables in fortran +References: <3725643A.734B9F06@crystal.uwa.edu.au> +Message-ID: <3727BC83.831910A@crystal.uwa.edu.au> +Content-Length: 1364 +X-UID: 173 + +Travis Oliphant wrote: + +> > I am wondering if it is possible to coerce python to use +> > memory addresses corresponding to a fortran common block (by way of a c +> > extension) +> > for storage of certain variables. + +> There is an exported function you can call from C called +> PyArray_FromDimsAndData that creates a NumPy array from some dimension +> information and a pointer to already allocated memory. There is some +> improving documentation on the C-API to Numeric in the documentation +> recently released for NumPy. See the scientific computing topic section +> of www.python.org +> +> I'm not sure how to access a Fortran common block from C at the moment. +> + +Thanks Travis, that at least gets me started + +If I can borrow from Greg Landrums reply: + +if testblock is my fortran common block, +the equivalent in C is + +typedef struct { + float var1; + int var2; +} common1; +common1 testblock; /* a global block that exists for the entire +period of module use */ + +so if I have a testmodule.c file with: + +typedef struct { + PyObject_HEAD + /* something is missing here */ +} TestObject; + +What do I have to put in the TestObject struct to be able to read and write +the var1 and var2 variables +directly in a python script with something along the lines of +self.testblock.var1=2.0 ? + +Thanks again. +Doug + + + + + diff --git a/demo/ermis-f/python_m/cur/0174 b/demo/ermis-f/python_m/cur/0174 new file mode 100644 index 00000000..c42f594a --- /dev/null +++ b/demo/ermis-f/python_m/cur/0174 @@ -0,0 +1,26 @@ +From: savageb at pacbell.net (savageb) +Date: Sun, 04 Apr 1999 23:37:20 -0700 +Subject: newbie questions (Python vs. Perl) +References: <37082E26.A9445E43@earthlink.net> +Message-ID: +X-UID: 174 + +Phil Voris wrote: +> +> 1) I hear it's the best for learning OO. I have heard high praise of +> Eifel as well, but information on it seems to be scarce at best. (I +> have C and Perl experience) Will Python take me to the next level in +> terms of understanding OO? +> + +I think this is likely. If for no other reason than that it makes +understanding easier to get to play with objects interactively (in the +interpreter). + +Have fun. + +Bob + + + + diff --git a/demo/ermis-f/python_m/cur/0175 b/demo/ermis-f/python_m/cur/0175 new file mode 100644 index 00000000..bd5f4d62 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0175 @@ -0,0 +1,33 @@ +From: mal at lemburg.com (M.-A. Lemburg) +Date: Fri, 30 Apr 1999 16:04:05 +0200 +Subject: mktime() like function to produce GMT? +References: <00be01be9308$c649cf60$0301a8c0@cbd.net.au> +Message-ID: <3729B855.3A7C6B5A@lemburg.com> +X-UID: 175 + +Mark Nottingham wrote: +> +> I need a function to produce a Unix epoch time from a time tuple, a la +> time.mktime(). Problem is, mktime() gives you the tuple in localtime, which +> is dangerous if you're dealing with GMT times in the past (like in the +> HTTP). +> +> Is there a function that will make a GMT epoch time straight from a time +> tuple? + +On some platforms there is gmtime() which does exactly this. + +It's available through mxDateTime, BTW, which also offers a +work-around solution for those platforms where it is not +available. See the Python Pages below. + +-- +Marc-Andre Lemburg Y2000: 245 days left +--------------------------------------------------------------------- + : Python Pages >>> http://starship.python.net/~lemburg/ : + --------------------------------------------------------- + + + + + diff --git a/demo/ermis-f/python_m/cur/0176 b/demo/ermis-f/python_m/cur/0176 new file mode 100644 index 00000000..1ec95ff3 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0176 @@ -0,0 +1,85 @@ +From: jfarr at real.com (Jonothan Farr) +Date: Fri, 23 Apr 1999 12:02:59 -0700 +Subject: problem with windows sockets +Message-ID: <3v3U2.5267$Bm3.336482@news20.ispnews.com> +Content-Length: 1746 +X-UID: 176 + +I'm rather stuck trying to solve a networking problem. I've implemented a +TCP socket server derived from SocketServer.SocketServer and I want it to be +able to restart itself. The problem I'm having is binding a socket to the +same port twice. If I don't call setsockopt() with SO_REUSEADDR, then I get +a winsock error 10048, defined in winsock.h as WSAEADDRINUSE (or 48, +'Address already in use' on Linux). It seems like setting SO_REUSEADDR +should work, which it does on Linux but not on NT. + +Here's some example code to illustrate my point. + +--------------------- + +# Server: + +import socket + +port = 12000 +queue = 5 + +print 'bind 1' +s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) +s.bind(('', port)) +s.listen(queue) +client, addr = s.accept() +client.send('foo') +s.close() + +print 'bind 2' +s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) +s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) +s.bind(('', port)) +s.listen(queue) +client, addr = s.accept() +client.send('foo') +s.close() + +--------------------- + +# Client: + +import socket + +host = 'localhost' +port = 12000 +bufsize = 1024 + +print 'connect 1' +s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) +s.connect((host, port)) +print s.recv(bufsize) +s.close() + +print 'connect 2' +s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) +s.connect((host, port)) +print s.recv(bufsize) +s.close() + +--------------------- + +This works fine on Linux, but on NT I get a winsock error 10061 (defined as +WSAECONNREFUSED) when I try to connect a client after binding the port a +second time. Is this a problem with Winsock, a problem with Python, or a +problem with my code? How can I work around this? Am I going about it in +entirely the wrong way? Any help would be appreciated. + +Thanks, +--jfarr + + + + + + + + + + diff --git a/demo/ermis-f/python_m/cur/0177 b/demo/ermis-f/python_m/cur/0177 new file mode 100644 index 00000000..1011f679 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0177 @@ -0,0 +1,14 @@ +From: sportsnutz at email.msn.com (sportsnutz) +Date: Fri, 23 Apr 1999 16:49:04 -0400 +Subject: I NEED MAJOR HELP +Message-ID: +X-UID: 177 + +Ive never programmed before and i need some tips on some command to work +this thing + + + + + + diff --git a/demo/ermis-f/python_m/cur/0178 b/demo/ermis-f/python_m/cur/0178 new file mode 100644 index 00000000..6e696769 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0178 @@ -0,0 +1,58 @@ +From: guido at eric.cnri.reston.va.us (Guido van Rossum) +Date: 23 Apr 1999 09:45:47 -0400 +Subject: Running idle as a package +References: <372050E3.9D05CE8F@easics.be> +Message-ID: <5lr9pbsb5g.fsf@eric.cnri.reston.va.us> +Content-Length: 1644 +X-UID: 178 + +Jan Decaluwe writes: + +> I was trying to run idle as a package, so I turned the idle +> directory into a python package. But then I got: +> +> Python 1.5.2 (#2, Apr 21 1999, 17:14:19) [GCC 2.8.1] on sunos5 +> Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam +> >>> from idle import idle +> Failed to load extension 'SearchBinding' +> Traceback (innermost last): +> File "/usr/local/lib/python1.5/site-packages/idle/EditorWindow.py", line 470, in +> load_standard_extensions +> self.load_extension(name) +> File "/usr/local/lib/python1.5/site-packages/idle/EditorWindow.py", line 481, in load_extension +> mod = __import__(name) +> ImportError: No module named SearchBinding +> ... +> +> Apparently the problem is caused by the call to __import__, +> that is not aware of the intra-package shortcut. + +Thanks. A better fix (that works whether or not idle is being used as +a package) is to change the __import__ call as follows (line numbers +may be off): + +*** EditorWindow.py 1999/04/20 15:45:28 1.18 +--- EditorWindow.py 1999/04/23 13:42:38 +*************** +*** 484,490 **** + return extend.standard + + def load_extension(self, name): +! mod = __import__(name) + cls = getattr(mod, name) + ins = cls(self) + self.extensions[name] = ins +--- 484,490 ---- + return extend.standard + + def load_extension(self, name): +! mod = __import__(name, globals(), locals(), []) + cls = getattr(mod, name) + ins = cls(self) + self.extensions[name] = ins + +--Guido van Rossum (home page: http://www.python.org/~guido/) + + + + diff --git a/demo/ermis-f/python_m/cur/0179 b/demo/ermis-f/python_m/cur/0179 new file mode 100644 index 00000000..0286116d --- /dev/null +++ b/demo/ermis-f/python_m/cur/0179 @@ -0,0 +1,37 @@ +From: arcege at shore.net (Michael P. Reilly) +Date: Thu, 08 Apr 1999 18:24:37 GMT +Subject: DNS module ? +References: +Message-ID: +Content-Length: 1114 +X-UID: 179 + +Thomas Wouters wrote: + +: I'm looking for a DNS module. Actually, I'm looking for Anthony Baxters' DNS +: module, from what I've read on dejanews :) However, the URL he gives in +: the link in those posts, and all others I could find, point to a machine +: that no longer exists (alumni.dgs.monash.edu.au) and I cannot find a similar +: module anywhere else (except for the Demo DNS module, which, frankly, wont +: do :) + +: Am I looking in the wrong places ? Mind you, I started looking into python +: less than 24 hours ago, but I did check www.python.org, starship python, +: dejanews and altavista (though the starship python searchengine was showing +: a lack of voom when I tried it -- I think it was stunned) + +There is a dnslib module in the source distribution of Python 1.5.1 (and +in Python 1.5.2bx), in the Demo/dns subdirectory. + +: I would be _very_ grateful for any pointers to the damned module, before I +: write it myself, out of frustration, burning desire and the sublimal +: messages... Must... ...write... ...Python... + +Quick, get this man some toast&spam&vikings&spam! + + -Arcege + + + + + diff --git a/demo/ermis-f/python_m/cur/0180 b/demo/ermis-f/python_m/cur/0180 new file mode 100644 index 00000000..cf98c5fd --- /dev/null +++ b/demo/ermis-f/python_m/cur/0180 @@ -0,0 +1,118 @@ +From: aybtqtjw at somethingfunny.net (aybtqtjw at somethingfunny.net) +Date: Mon, 12 Apr 1999 08:44:36 GMT +Subject: A BUSINESS OPPORTUNITY +Message-ID: +Content-Length: 4002 +X-UID: 180 + +An unregistered copy of Newsgroup AutoPoster 95 was used to post this article! +--- +Join Me For Free! + +Hi Friend, + YOU PAY NOTHING TO ME UNTIL YOU ARE SATISFIED WITH THE + INCOME AFTER THE FIRST MONTH AND WOULD LIKE TO CONTINUE + WITH THE PROGRAM. + +This is your safeguard and allows you time to start building your new +business before parting with any money! + +Project 21 is a step-by-step, monthly course of information on how to operate +a successful internet business entirely from the comfort of your own PC at home. +The first installment is a comprehensive, 50+ page manual which guides you +into the lucrative world of home mail order. Each month you will receive a +new installment which helps you progress in an easy to follow fashion. + +The monthly payment of $90 covers the cost of the manual installment and +gives you full reproduction rights. Once you have your first customer the $90 +per month is covered. After that every new customer is pure profit worth +$1080 per year to you! + +I'm sure that you will have received hundreds of offers in your e-mailbox +full of hype and promising you $1000s for doing next to nothing but all +asking you to pay cash before disclosing what they are selling -- usually +rubbish to be filed in the trash. + +Already since going on-line with Project 21 my income stream looks destined +to multiply. Here are some genuine facts we would like to share with you: + +>One Client writes... +I first ran a small test emailing on Monday evening and by +Wednesday morning I'd had 9 inquiries and ONE Letter of Intent. +Then I started posting in Newsgroups and sent out 2 bulk emails +(of 500 and 750 addresses). By Sunday there had been over 60 +inquiries and 5 Letters of Intent. + +Not having done much on-line promoting I was flabbergasted at the +speed. By contrast, conventional mail would have taken 6-8 weeks +to get the first 5 customers and just think of all the associated costs! + +>Another Client writes... +When I first went on-line with this, I promoted directly to other +entrepreneurs like myself. Within 5 days of promotion I had +received 27 Letters of Intent!! I have taken part in other business +ventures that promise riches such as network marketing and other +programs, but not one has given me the independence this has! + +What sets Project 21 apart from the rest is that you can join me without +paying a penny until you tried it for one month. You only need give me a +LETTER OF INTENT valid for 30 days during which time you can promote the +program until your first months information package has expired. At that +time, if you wish to continue promoting, you would start paying me for each +additional information package received after the first month. + +The LETTER OF INTENT is not binding after 30 days and you have my personal +guarantee that, should you join, I will buy your business back from you at +any time, no quibbles. + +By duplicating my 30 day offer and buy-back guarantee you too can be on your +way to a six figure annual income and what's more IT COSTS NOTHING TO GET +STARTED. + +Give it a try. Fill out the following LETTER OF INTENT. (Cut it and Paste it +to a new email.) Then Email it to me. Let's get started!! + +With my best wishes for your financial future; + +_____________________________________________________ +I hereby apply to join in Project 21. I understand that I may +promote this program on-line via Email and Usenet postings and that full +advice and assistance will be available to me. + +This LETTER OF INTENT is valid for a period of 30 days from the date Email +transmission. + +During the 30 days I need make no payment for Project 21. If I am satisfied +with Project 21 after the first month and wish to continue I will agree to +pay $90 US for each additional information package received after the first +month. + +NAME: + +ADDRESS: + +City: + +State: + +COUNTRY: + +POST/ZIPCODE: + +Phone: + +E-mail: + +Alt. E-mail: + +Birth Date: + +DATE TRANSMITTED: + +Steven +balaw at sprint.ca + + + + + diff --git a/demo/ermis-f/python_m/cur/0181 b/demo/ermis-f/python_m/cur/0181 new file mode 100644 index 00000000..7b6604da --- /dev/null +++ b/demo/ermis-f/python_m/cur/0181 @@ -0,0 +1,29 @@ +From: poinot at onera.fr (Marc Poinot) +Date: Wed, 21 Apr 1999 16:48:53 GMT +Subject: [ANNOUNCE] Programme final JPF001 +Message-ID: <371E0175.6F0AE680@onera.fr> +X-UID: 181 + +Vous trouverez le programme final de +la Journee Python France du 28 Mai 1999 a... + + http://www.onera.fr/congres/jpf001/index.html + +All European are welcomed at JPF001, please have +a look at the final programme (URL above). + +Marcvs [alias Bien entendu, sont bienvenus les US citizens, + and people coming from Africa, Asia, + Australia (Hi Australian Pythoners!), Canada, + India, ...] + +----------------------------------------------------------------------- + Marc POINOT Alias: marcvs Email: poinot at onera.fr + ONERA -MFE/DSNA/ELSA Tel: 01.46.73.42.84 Info: elsa-info at onera.fr + 29, Div. Leclerc Fax: 01.46.73.41.66 Site: + 92322 Chatillon FRANCE Project: elsA Web: http://www.onera.fr +----------------------------------------------------------------------- + + + + diff --git a/demo/ermis-f/python_m/cur/0182 b/demo/ermis-f/python_m/cur/0182 new file mode 100644 index 00000000..1dafeaca --- /dev/null +++ b/demo/ermis-f/python_m/cur/0182 @@ -0,0 +1,65 @@ +From: befletch at my-dejanews.com (befletch at my-dejanews.com) +Date: Thu, 22 Apr 1999 00:39:48 GMT +Subject: How do I use proxies with httplib? +References: <7fl97e$lnc$1@nnrp1.dejanews.com> <099101be8c3f$cb6206e0$f29b12c2@pythonware.com> +Message-ID: <7flr4l$6bc$1@nnrp1.dejanews.com> +Content-Length: 1914 +X-UID: 182 + +In article <099101be8c3f$cb6206e0$f29b12c2 at pythonware.com>, + "Fredrik Lundh" wrote: +> wrote: +> > I want to use httplib through a proxy server and I can't seem to get +> > it to work. +[...] +> you might be able to use urllib instead: +[...] + +When I first looked at this I thought it wouldn't do the trick either, +since I wanted to use the HTTP POST protocol. On further inspection +I see that urllib has that covered. So I tried it out, only to run up +against a problem that I want to blame on urllib; it claims to not +recognize the http url type: + +Python 1.5.1 (#0, Nov 18 1998, 12:17:58) [MSC 32 bit (Intel)] on win32 +Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam +>>> import urllib +>>> connection=urllib.urlopen('http://www.yahoo.com') + +Traceback (innermost last): File "", line 1, in ? File "C:\PROGRAM +FILES\HOMERUN\lib\python1.5\urllib.py", line 59, in urlopen return +_urlopener.open(url) File "C:\PROGRAM +FILES\HOMERUN\lib\python1.5\urllib.py", line 155, in open return +self.open_unknown(fullurl) File "C:\PROGRAM +FILES\HOMERUN\lib\python1.5\urllib.py", line 169, in open_unk nown raise +IOError, ('url error', 'unknown url type', type) IOError: ('url error', +'unknown url type', 'http') + +>>> + +As a test, I hacked urllib by forcing it to think all url's are http +url's, like so: + +# name = 'open_' + type + name = 'open_http' + +This gets past the url type only to fail on the urllib line: + + if not host: raise IOError, ('http error', 'no host given') + +Hacking in a host doesn't help much either. Is there something wrong +with my proxy 'set' command? (This is under W95) + +SET http_proxy="100.287.14.130:80" + +Thanks again, +- Bruce + +(emailed & posted) + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/0183 b/demo/ermis-f/python_m/cur/0183 new file mode 100644 index 00000000..680a2af8 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0183 @@ -0,0 +1,43 @@ +From: ivanlan at callware.com (Ivan Van Laningham) +Date: Thu, 22 Apr 1999 15:09:27 GMT +Subject: How many of us are there? +References: <000301be8c67$08dd6600$959e2299@tim> +Message-ID: <371F3BA7.7E53151C@callware.com> +Content-Length: 1093 +X-UID: 183 + +I should have known. + +Tim Peters wrote: +> +> [Ivan Van Laningham] +> > Hello, Pythonistas-- +> > Does anyone out there have some idea how many people subscribe to the +> > mailing list, or read the newsgroup? +> +> Yes, I keep exact daily tallies of both, along with the precise number of +> Python programmers broken down by industry, application, age, gender, +> income, countries of origin and residence, employer and life goals. +> +> While I can't pass this information out for free, it's available for a +> price. How do you think all those spammers got your email address ? +> +> python's-demographics-make-perl's-look-like-cobol's-ly y'rs - tim + +-ly y'rs, +Ivan + +PS: Just define your currency. One or two jelly donuts?-) +---------------------------------------------- +Ivan Van Laningham +Callware Technologies, Inc. +ivanlan at callware.com +http://www.pauahtun.org +See also: +http://www.foretec.com/python/workshops/1998-11/proceedings.html +Army Signal Corps: Cu Chi, Class of '70 +---------------------------------------------- + + + + diff --git a/demo/ermis-f/python_m/cur/0184 b/demo/ermis-f/python_m/cur/0184 new file mode 100644 index 00000000..c691c299 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0184 @@ -0,0 +1,62 @@ +From: movits at lockstar.com (Mordy Ovits) +Date: Fri, 9 Apr 1999 17:43:50 GMT +Subject: OpenSSL/X.509 +References: <7e1hiq$a71$1@Starbase.NeoSoft.COM> + <7ear25$ksf$1@news-sj-3.cisco.com> + <14089.11820.416453.80124@bitdiddle.cnri.reston.va.us> + <3709C8BE.4257C9F1@lemburg.com> <14090.16807.950025.496495@bitdiddle.cnri.reston.va.us> <370A78B6.2C18D10F@lockstar.com> <370BE48E.2BA9750C@lemburg.com> +Message-ID: <370E3C56.D035A3FB@lockstar.com> +Content-Length: 1873 +X-UID: 184 + +M.-A. Lemburg wrote: +> +> Mordy Ovits wrote: +> > +> > Jeremy Hylton wrote: +> > > +> > > >>>>> "MAL" == M -A Lemburg writes: +> > +> > [SNIP] +> > +> > > MAL> Note that I have a project running with the intention to wrap +> > > MAL> OpenSSL in an OO manner called mxCrypto (see the link below). +> > > +> > > Looking forward to seeing it. When do you think you might have an +> > > alpha release ready? +> > > +> > > Jeremy +> > +>>I have a fairly complete SWIGing of OpenSSL/SSleay working. I made it on +>>company time, so I have to get company permission to release it. If there is +>>real interest, I'll push for us to release it. It does all the X.509 stuff, is +> > very OO, and builds on win32 and unices. +> > Interested? +> +> Sure, but if your company is US based, then chances are high +> you won't be able to share the code outside the US... that's +> why I started mxCrypto, BTW.\ + +That's debatable. The SWIG bindings contain no crypto code in their own right. +It is merely glue to crypto code. I wouldn't be able to release statically +prebuilt libraries, but why would I want to anyway? Our lawyers keep waffling +on this, which is why I haven't released it already. I'm really pleased with +it, and would love give something back to the Python community. How +long before we Americans are reduced to doing Crypto with a deck of cards? (See +Bruce Schneier's Solitaire). + +Mordy +-- +o Mordy Ovits +o Cryptographic Engineer +o LockStar Inc. +--------------------------------------------------------------------------- +#!/usr/local/bin/python +from sys import*;from string import*;a=argv;[s,p,q]=filter(lambda x:x[:1]!= +'-',a);d='-d'in a;e,n=atol(p,16),atol(q,16);l=(len(q)+1)/2;o,inb=l-d,l-1+d +while s:s=stdin.read(inb);s and map(stdout.write,map(lambda i,b=pow(reduce( +lambda x,y:(x<<8L)+y,map(ord,s)),e,n):chr(b>>8*i&255),range(o-1,-1,-1))) + + + + diff --git a/demo/ermis-f/python_m/cur/0185 b/demo/ermis-f/python_m/cur/0185 new file mode 100644 index 00000000..408bd42c --- /dev/null +++ b/demo/ermis-f/python_m/cur/0185 @@ -0,0 +1,27 @@ +From: nathan.froyd at rose-hulman.edu (Nathan Froyd) +Date: 24 Apr 1999 22:48:49 -0500 +Subject: pickling and unpickling on the same file? +Message-ID: +X-UID: 185 + +Is there any way to implement the above beast? Something like: + +p = Pickler(file) +u = Unpickler(file) + +file.seek(random_pos) +x = u.load() + +z = [7, 8, 9] +p.dump(z) + +would be perfect +-- +Nathan | nathan.froyd at rose-hulman.edu | http://www.rose-hulman.edu/~froydnj/ +God went through hell so we don't have to. ICQ:18861764 | AOL:myrlyn007 +Avoid the gates of hell. Use Linux. Python:"x='x=%s;x%%`x`';x%`x`" +Evolution is a million line computer program falling into place by accident. + + + + diff --git a/demo/ermis-f/python_m/cur/0186 b/demo/ermis-f/python_m/cur/0186 new file mode 100644 index 00000000..59e42b55 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0186 @@ -0,0 +1,28 @@ +From: Jack.Jansen at oratrix.com (Jack Jansen) +Date: Tue, 13 Apr 1999 12:05:39 +0200 +Subject: simple indexed file module? +References: +Message-ID: <371316F3.29E6DC89@oratrix.com> +X-UID: 186 + +Joe Strout wrote: +> +> For a CGI script I'm working on, I need to keep a couple of indexed +> files. These will contain variable-length data (descriptions), which +> may be changed fairly frequently. So I imagine that in addition to the +> data file, there will be an index file that keeps track of the position +> and length of each record. New or expanded records will be stuffed in +> wherever there is free space, or at the end if no sufficient free chunk +> is available. + +anydbm is probably the simplest here. Works on the Mac too, where gdbm is +available. + +-- +Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++ +Jack.Jansen at oratrix.com | ++++ if you agree copy these lines to your sig ++++ +www.oratrix.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm + + + + diff --git a/demo/ermis-f/python_m/cur/0187 b/demo/ermis-f/python_m/cur/0187 new file mode 100644 index 00000000..459efe26 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0187 @@ -0,0 +1,35 @@ +From: JamesL at Lugoj.Com (James Logajan) +Date: Mon, 05 Apr 1999 20:57:52 -0700 +Subject: SNMPy update +References: <7e1hiq$a71$1@Starbase.NeoSoft.COM> + <7ear25$ksf$1@news-sj-3.cisco.com> <14089.11820.416453.80124@bitdiddle.cnri.reston.va.us> +Message-ID: <37098640.6B0147DF@Lugoj.Com> +Content-Length: 1057 +X-UID: 187 + +Jeremy Hylton wrote: +> +> I'll second your sentiment! I did some work on an X.509 library +> written entirely in Python. Like you friend's SNMP code, it will +> probably never be released; I don't have time to finish it nor did I +> expect that I'd want to release it given the export control hassles. +> However, it seemed clear to me that an ASN.1 compiler could be written +> to generate the encode/decode routines. If someone is interested in +> that, I've got some design notes and rough code on how to do the +> encode/decode and on how to build a backend for SNACC. (A free-ish +> ASN.1 compiler; the only one?) +> +> Jeremy + +I had planned to write an SNMP MIB compiler in Python (actually also an +ASN.1(88) and ASN.1(9?) compiler). Worked out how to do macros, but I just +joined a startup, so I haven't found time to make any progress. The MIB +compiler would have output Python modules. + +I have an outstanding contract to supply said compiler, but they haven't +complained about it being delivered (of course, I only get paid for +deliverables ). + + + + diff --git a/demo/ermis-f/python_m/cur/0188 b/demo/ermis-f/python_m/cur/0188 new file mode 100644 index 00000000..2bd6405b --- /dev/null +++ b/demo/ermis-f/python_m/cur/0188 @@ -0,0 +1,42 @@ +From: ruebe at aachen.heimat.de (Christian Scholz) +Date: Fri, 23 Apr 1999 21:01:13 +0000 +Subject: Problem while Installing.. +Message-ID: <3720DF98.8CEC8D8F@aachen.heimat.de> +X-UID: 188 + +Hi everybody! + +I have a strange problem right now: + +'import exceptions' failed; use -v for traceback +Warning! Falling back to string-based exceptions +Fatal Python error: Cannot create string-based exceptions +IOT trap/Abort + +This I get when I try to install a new compiled Python 1.5.2 on my Linux +Box. +It was working before and did this after I told configure to use +threads.. +This message appears when the installation process wants to start +compiling +the modules (compileall.py). +I tried importing it then by hand with my installed python which worked +(The actual +python interpreter is installed before the compile process, right?) and +I then changed +the Makefile to use the installed python which worked. +But now when I want to use Python it says the same. + +Any idea what happens? + +I will now try to disable threads again and I will see if it works then +again.. + +-- Christian + + + + + + + diff --git a/demo/ermis-f/python_m/cur/0189 b/demo/ermis-f/python_m/cur/0189 new file mode 100644 index 00000000..af3c2fe1 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0189 @@ -0,0 +1,43 @@ +From: mlh at idt.ntnu.no (Magnus L. Hetland) +Date: 25 Apr 1999 21:48:25 +0200 +Subject: learning python +References: <7fqqtc$msf$1@nnrp1.dejanews.com> +Message-ID: +Content-Length: 1106 +X-UID: 189 + +wwells5546 at my-dejanews.com writes: + +> Hi everybody, +> +> I know nothing about computer language. I guess I need to start with Python, +> I've downloaded the progam and installed. I have the Python window and the +> Ineractive window before me what do I do next????? +> +> Any help on tutorials for somebody who doesn't know anything would be helpful. + +Please check out my tutorial "Instant Hacking" which is meant for +people in your situation. As my blurb says: "A quick introduction to +programming in general, using Python for examples etc. Meant for +people who haven't done any programming before, but have managed to +get their hands on a Python interpreter." I guess that's you :) + +It's at http://www.idi.ntnu.no/~mlh/python/programming.html + +You might also want to look at +http://www.idi.ntnu.no/~mlh/python/different.html when you gain a bit +confidence -- it's a Python tutorial for newbies :) + +> +> Regards +> + +-- + > Hi! I'm the signature virus 99! + Magnus > Copy me into your signature and join the fun! + Lie + Hetland http://arcadia.laiv.org + + + + diff --git a/demo/ermis-f/python_m/cur/0190 b/demo/ermis-f/python_m/cur/0190 new file mode 100644 index 00000000..98cb6106 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0190 @@ -0,0 +1,51 @@ +From: amaranda at nospam.com (Alex Maranda) +Date: Thu, 15 Apr 1999 10:29:18 +0100 +Subject: threads +References: <1288080841-20523503@hypernet.com> + <1288067824-21306356@hypernet.com> +Message-ID: <3715B16E.542B@nospam.com> +Content-Length: 1570 +X-UID: 190 + +Gordon McMillan wrote: +> +> Eric Lee Green writes: +> +> > Ah. Okay. So Python is doing user-land threads and not Posix +> > (OS-level) threads? +> +> Nope. Those are OS threads. It's just that there's an interpreter +> lock, which only gets released every N byte-code instructions. +This is kind of misleading. Posix threads can be both user level or +kernel level, depending on the contention scope passed to +pthread_create() (PTHREAD_SCOPE_PROCESS/PTHREAD_SCOPE_SYSTEM). +excerpt from Python-1.5.2/Python/thread_pthread.h: + +/* set default attribute object for different versions */ + +#if defined(PY_PTHREAD_D4) || defined(PY_PTHREAD_D7) +# define pthread_attr_default pthread_attr_default +# define pthread_mutexattr_default pthread_mutexattr_default +# define pthread_condattr_default pthread_condattr_default +#elif defined(PY_PTHREAD_STD) || defined(PY_PTHREAD_D6) +# define pthread_attr_default ((pthread_attr_t *)NULL) +# define pthread_mutexattr_default ((pthread_mutexattr_t *)NULL) +# define pthread_condattr_default ((pthread_condattr_t *)NULL) +#endif + +On my machine, Solaris2.5.1, I'm pretty sure it goes on #elif, so I get +a null ptr (defaults to user level threads). It doesn't matter on SMP +machines anyway because of the interpreter lock. +BTW, any estimate (Guido?) on when will the interpreter be fully +reentrant? (1.6? 2.0?) + +Cheers, +-- +Alex Maranda mailto: amaranda at spider dot com +Spider Software Ltd. Tel: +44 (0)131 4757036 +Edinburgh, UK http://members.xoom.com/Alex_Maranda +STREAMS based communications protocols for embedded systems + + + + diff --git a/demo/ermis-f/python_m/cur/0191 b/demo/ermis-f/python_m/cur/0191 new file mode 100644 index 00000000..56374f6b --- /dev/null +++ b/demo/ermis-f/python_m/cur/0191 @@ -0,0 +1,19 @@ +From: miller at uinpluxa.npl.uiuc.edu (M.A.Miller) +Date: 26 Apr 1999 11:57:12 -0500 +Subject: examples of parsing html? +Message-ID: <764sm3pbfb.fsf@zero.npl.uiuc.edu> +X-UID: 191 + +Can anyone point me to examples of how to parse html files? I +want to extract urls from an index so I can use those urls to get +data files. + +Mike + +-- +Michael A. Miller miller5 at uiuc.edu + Department of Physics, University of Illinois, Urbana-Champaign + + + + diff --git a/demo/ermis-f/python_m/cur/0192 b/demo/ermis-f/python_m/cur/0192 new file mode 100644 index 00000000..639dac96 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0192 @@ -0,0 +1,37 @@ +From: chadm at sgi.com (Chad McDaniel) +Date: 26 Apr 1999 11:27:11 -0700 +Subject: converting perl to python - simple questions. +References: <7fvagp$8lm$1@nnrp1.dejanews.com> +Message-ID: +X-UID: 192 + +aahz at netcom.com (Aahz Maruch) writes: + +> In article <7fvagp$8lm$1 at nnrp1.dejanews.com>, +> wrote: +> > +> >a) Perl's "defined". +> > [perl] +> > if (defined($x{$token}) +> > +> > [python] +> > if (x.has_key(token) and x[token]!=None) : +> +> That looks correct. Thankfully Python does have short-circuit +> evaluation. Note that if you normally expect x[token] to have a value, +> you might restructure the code a bit to use try/except. +> + +wouldn't x.get() work more elegantly: +--- +if (x.get(token)) : + [do stuff] +--- + + +-- +-chad + + + + diff --git a/demo/ermis-f/python_m/cur/0193 b/demo/ermis-f/python_m/cur/0193 new file mode 100644 index 00000000..158838b8 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0193 @@ -0,0 +1,53 @@ +From: bhuzyk at kodak.com (Bruce Huzyk) +Date: 14 Apr 1999 13:45:34 GMT +Subject: Converting a string to a tuple +References: <01be8530$65bb7120$52037e81@saints> <14098.28727.245158.616727@buffalo.fnal.gov> <00f501be857f$ff636f40$f29b12c2@pythonware.com> <01be85b5$f7197c90$52037e81@saints> <008f01be85b8$a5be9580$f29b12c2@pythonware.com> <040801be8646$823310d0$f29b12c2@pythonware.com> +Message-ID: <01be8685$52f6c930$52037e81@saints> +X-UID: 193 + +First let me thank everyone for their help. + +Let me take a step back and try to describe my problem with a little more +detail with the disclaimer that I am a little new to Python (but not +programming, BTW I couldn't find the PEWBIE module) and that I am +more of a newsgroup reader then writer so please excuse the fact that this +is my third post. + + +I will list my solution and ask the question: Is this the way that you +would +implement this? +Any side effects? + + +E:\PYTHON>type c:\batch\script1.py +import string + +fp = open("c:\\test.txt", "r") +s = fp.readline() +s = s[2:] +a = {} +a['1'] = eval(string.replace(s, '\\', '\\\\')) +print type (a['1']) +filename, offset = a['1'] +print filename, offset +fp.close + +E:\PYTHON>python c:\batch\script1.py + +c:\a\test.txt 1932 + +E:\PYTHON>type c:\test.txt +:R("c:\a\test.txt",1932) + +E:\PYTHON> + + + + + + + + + + diff --git a/demo/ermis-f/python_m/cur/0194 b/demo/ermis-f/python_m/cur/0194 new file mode 100644 index 00000000..e50e6230 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0194 @@ -0,0 +1,38 @@ +From: tseaver at palladion.com (Tres Seaver) +Date: Mon, 12 Apr 1999 08:20:20 -0500 +Subject: OrderedDict.py +References: +Message-ID: <3711F314.FC15B844@palladion.com> +Content-Length: 1238 +X-UID: 194 + +evil Japh wrote: +> +> Is there a need for a module which allows for ordered processing of an +> dictionary? +> +> I have one written, and it works fine I think. Basically, it allows for a +> dictionary to be treated like a list, but have the data structure of +> dictionary. Key-value pairs retain the order you entered them in. Unless +> you specifically change them. I'm currently working on more methods, to +> allow it to be sliced like an array. + +Your approach sounds like a sequence of (key, value) tuples. It can't really be +used as a general-purpose dictionary, because searching for an arbitrary element +using the key is going to be linear in the number of elements, whereas the +native Python dictionary is (normal-case) constant-time for the same lookup. + +Perhaps you are maintaining the ordered keys in a separate sequence on the +side? This construct is more useful, but again has scalability problems: +removing items from the list is harder, and more expensive, and you store the +keys twice (if keys are objects, this is only storing refernces twice). + + +-- +========================================================= +Tres Seaver tseaver at palladion.com 713-523-6582 +Palladion Software http://www.palladion.com + + + + diff --git a/demo/ermis-f/python_m/cur/0195 b/demo/ermis-f/python_m/cur/0195 new file mode 100644 index 00000000..fd3ac892 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0195 @@ -0,0 +1,36 @@ +From: paul at prescod.net (Paul Prescod) +Date: Sat, 24 Apr 1999 06:04:43 GMT +Subject: Python too slow for real world +References: <372068E6.16A4A90@icrf.icnet.uk> + <3720A21B.9C62DDB9@icrf.icnet.uk> + <3720C4DB.7FCF2AE@appliedbiometrics.com> + <3720C6EE.33CA6494@appliedbiometrics.com> + +Message-ID: <37215EFB.433AFCA6@prescod.net> +X-UID: 195 + +Justin Sheehy wrote: +> +> > (And... How about builtin regexes in P2?) +> +> In all seriousness, what reason do you have for making that +> suggestion? I am willing to believe that there might be a good reason +> to do so, but it certainly isn't immediately obvious. + +One benefit would be that the compiler could compile regexps at the same +time everything else is being compiled. + +-- + Paul Prescod - ISOGEN Consulting Engineer speaking for only himself + http://itrc.uwaterloo.ca/~papresco + +Company spokeswoman Lana Simon stressed that Interactive +Yoda is not a Furby. Well, not exactly. + +"This is an interactive toy that utilizes Furby technology," +Simon said. "It will react to its surroundings and will talk." + - http://www.wired.com/news/news/culture/story/19222.html + + + + diff --git a/demo/ermis-f/python_m/cur/0196 b/demo/ermis-f/python_m/cur/0196 new file mode 100644 index 00000000..24d5237c --- /dev/null +++ b/demo/ermis-f/python_m/cur/0196 @@ -0,0 +1,102 @@ +From: hyoon at bigfoot.com (Hoon Yoon) +Date: Wed, 14 Apr 1999 11:58:50 -0400 +Subject: TCL_LIBRARARY and making it work +References: <3714B880.22F87048@bigfoot.com> +Message-ID: <3714BB3A.54BF2531@bigfoot.com> +Content-Length: 3348 +X-UID: 196 + +Hi, + + I think I found the problem by setting TKPATH, but now I got a +different prob. All this used to work fine prior to install. I don't +know what's going on. + +Traceback (innermost last): + File "", line 1, in ? + File "c:\TEMP\python-BEAf6p", line 2, in ? + Tkinter._test() + File "C:\Python\Lib\lib-tk\Tkinter.py", line 1947, in _test + root = Tk() + File "C:\Python\Lib\lib-tk\Tkinter.py", line 886, in __init__ + self.tk = _tkinter.create(screenName, baseName, className) +TclError: Can't find a usable tk.tcl in the following directories: + {C:\Python\TCL\lib\tk8.0} . C:/Python/TCL/lib/tk8.0 ./tk8.0 +./lib/tk8.0 ./library ./tk8.0/library ./library +C:/Python/TCL/tk8.0/library + +C:/Python/TCL/lib/tk8.0/tk.tcl: bad event type or keysym "MouseWheel" +bad event type or keysym "MouseWheel" + while executing +"bind Listbox { + %W yview scroll [expr - (%D / 120) * 4] units +}" + (file "C:/Python/TCL/lib/tk8.0/listbox.tcl" line 179) + invoked from within +"source [file join $tk_library listbox.tcl]" + (file "C:/Python/TCL/lib/tk8.0/tk.tcl" line 151) + invoked from within +"source C:/Python/TCL/lib/tk8.0/tk.tcl" + ("uplevel" body line 1) + invoked from within +"uplevel #0 [list source $tkfile]" +C:/Python/TCL/lib/tk8.0/tk.tcl: bad event type or keysym "MouseWheel" +bad event type or keysym "MouseWheel" + while executing +"bind Listbox { + %W yview scroll [expr - (%D / 120) * 4] units +}" + (file "C:/Python/TCL/lib/tk8.0/listbox.tcl" line 179) + invoked from within +"source [file join $tk_library listbox.tcl]" + (file "C:/Python/TCL/lib/tk8.0/tk.tcl" line 151) + invoked from within +"source C:/Python/TCL/lib/tk8.0/tk.tcl" + ("uplevel" body line 1) + invoked from within +"uplevel #0 [list source $tkfile]" + + +This probably means that Tk wasn't installed properly. + +> -- +> ***************************************************************************** +> S. Hoon Yoon (Quant) Merrill Lynch Equity Trading, +> yelled at yahoo.com hoon at bigfoot.com(w) +> "Miracle is always only few standard deviations away, but so is +> catastrophe." +> * Expressed opinions are often my own, but NOT my employer's. +> "I feel like a fugitive from the law of averages." Mauldin +> ***************************************************************************** +> +> ------------------------------------------------------------------------ +> +> Hoon Yoon +> +> Hoon Yoon +> +> Netscape Conference Address +> Netscape Conference DLS Server +> Additional Information: +> Last Name +> First Name Hoon Yoon +> Version 2.1 + +-- +***************************************************************************** +S. Hoon Yoon (Quant) Merrill Lynch Equity Trading, +yelled at yahoo.com hoon at bigfoot.com(w) +"Miracle is always only few standard deviations away, but so is +catastrophe." +* Expressed opinions are often my own, but NOT my employer's. +"I feel like a fugitive from the law of averages." Mauldin +***************************************************************************** +-------------- next part -------------- +A non-text attachment was scrubbed... +Name: vcard.vcf +Type: text/x-vcard +Size: 202 bytes +Desc: Card for Hoon Yoon +URL: + + diff --git a/demo/ermis-f/python_m/cur/0197 b/demo/ermis-f/python_m/cur/0197 new file mode 100644 index 00000000..c77d5305 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0197 @@ -0,0 +1,40 @@ +From: aa8vb at vislab.epa.gov (Randall Hopper) +Date: Wed, 14 Apr 1999 12:30:18 GMT +Subject: IDLE with Tk app +Message-ID: <19990414083018.A1361046@vislab.epa.gov> +X-UID: 197 + +1) A first test + + >>> from Tkinter import * + >>> button = Button( None, text="Testing" ) + >>> button.pack() + >>> button.mainloop() + + Works fine, so I close the button's window (click X - WM_DELETE event), + but IDLE is still stuck in button.mainloop(). + + The same test in the raw python interpreter causes it to return to the + prompt. + +2) I try to exit (File->Exit) + + "The program is still running; do you want to kill it?" + + I click OK. + + (and we're still in the interpreter with the program running.) + + Try again, same result. So I kill the IDLE window. + + +Anything I'm doing wrong here? + +I'd guess this is related to IDLE also being a Tk app. Is there a +work-around so Tk apps can be run as-is in IDLE? + +Randall + + + + diff --git a/demo/ermis-f/python_m/cur/0198 b/demo/ermis-f/python_m/cur/0198 new file mode 100644 index 00000000..1a168d98 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0198 @@ -0,0 +1,47 @@ +From: brunomadv at ciudad.com.ar (Bruno Mattarollo) +Date: Wed, 21 Apr 1999 14:29:07 GMT +Subject: Kosovo database; Python speed +In-Reply-To: <371DAAC2.D9046550@cs.utwente.nl> +References: <371DAAC2.D9046550@cs.utwente.nl> +Message-ID: <002501be8c03$5085f760$6eba0ac8@kuarajy.infosys.com.ar> +Content-Length: 1230 +X-UID: 198 + +I presume that a SQL engine would be the fastest solution and all the +programming, in my opinion, should be done in Python using a database +connector. It depends on the uses you will give to this DB, but MySQL should +be the better choice. If you need data consistency (via FK) and a +transactional database, you should be looking perhaps to a commercial SQL +engine like Oracle or MS-SQL ... But if it's for querys mainly, MySQL if +damn fast ... :-) + +Hope this helps... and specially I hope this helps a little bit for the +people of Kosovo... + +/B + +Bruno Mattarollo +... proud to be a PSA member + +> -----Original Message----- +> From: python-list-request at cwi.nl [mailto:python-list-request at cwi.nl]On +> Behalf Of Richard van de Stadt +> Sent: Wednesday, April 21, 1999 7:39 AM +> To: python-list at cwi.nl +> Subject: Kosovo database; Python speed +> +> +> Suppose we were going to make a database to help Kosovars locate +> their family members. This would probably result in hundreds of +> thousands of records (say 1 record (file) per person). +> +> Would Python be fast enough to manage this data, make queries on +> the data, or should compiled programs be used? +> +> Richard. +> + + + + + diff --git a/demo/ermis-f/python_m/cur/0199 b/demo/ermis-f/python_m/cur/0199 new file mode 100644 index 00000000..9db0a071 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0199 @@ -0,0 +1,31 @@ +From: tratt at dcs.kcl.ac.uk (Laurence Tratt) +Date: Tue, 20 Apr 1999 09:54:49 +0100 +Subject: bzip2 module for Python +Message-ID: +X-UID: 199 + +In message <87zp43gaac.fsf at illusion.tui-net> + Paul Kunysch wrote: + +[me 'announcing' pyBZlib] +>> As I said, I am interested to know if there is a demand for this, so +>> comments are appreciated. +> IMHO it would be nice to have a module like the current "gzip", which +> handles .bz2 .gz .Z and uncompressed files transparently. + +pyBZlib handles .bz2 files 'transparently' as such, in that the inputs and +outputs to the bzip2 library are simply standard .bz2 files. The two simple +test files included with pyBZlib demonstrate this by slurping .bz2 files +straight into the libraries methods :) + +Do you mean you would like to see a module where you give it a file (which +could be .bz2, .gz, .zip etc), and then get an uncompressed version back +without worrying what compression type was used? Would you also want it to +automatically untar files? + + +Laurie + + + + diff --git a/demo/ermis-f/python_m/cur/0200 b/demo/ermis-f/python_m/cur/0200 new file mode 100644 index 00000000..23e57f74 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0200 @@ -0,0 +1,1039 @@ +From: garys at magna.com.au (Gary Stephenson) +Date: Tue, 06 Apr 1999 13:06:35 +1000 +Subject: Xbase++ preprocessor implementation in Python +Message-ID: <37097A3A.F772205@magna.com.au> +Content-Length: 28569 +X-UID: 200 + + +Attached please find a Python implementation of the Xbase++ +preprocessor. It +is not yet a totally perfect rendition, but it is pretty close. By +implication, it should also be a reasonable rendition of the Clipper +preprocessor (though I have not yet tested this). + +Oh, and it is *dead slow*! - hundreds of times slower I think! This is +undoubtedly partly due to me being a Python newbie, and I would greatly +appreciate any tips on how I might speed it up a bit. Any tips on how +the code could be improved would be equally welcome, particularly any +Python idioms that I have obviously not yet groked. (Error handling for +example!!) + +I could not figure out how to make either KJparsing or TRAP do what I +wanted, +and I haven't yet looked at John Aylcock's stuff (but I intend to!), so +the code is built from scratch around the re module. Any comments as to +the relative (de)merits of this approach are welcomed. + +I would like eventually to make this available to the Clipper/Xbase++ +community. But I want to present Python in the best possible light - so +I thought it best to first release it here in the hope that it might be +further refined first. + +"Why write such a program?" I hear you ask! Several reasons : + +- I needed a concrete project to help me get up to speed with Python. + +- I want to translate some or all of my Clipper/Xbase++ source to +Python, and I'm hoping this will help (but I'm not quite sure how!). + +- the Clipper/Xbase++ preprocessor had always been a bit of a mystery +to me, so I thought this might deepen my understanding of it a bit (it +has!). + +- Ditto for regular expressions! + +- I have taken the opportunity to make some "improvements". Some +patterns that do not successfully translate under Xbase++, but IMHO +should, do under PRGPP. + +- There are some concerns in the Xbase++ community as to +incompatibilities between the Clipper and Xbase++ preprocessors. +Hopefully, this tool might serve to clarify and/or resolve such issues. + +- Clipper and Xbase++ are only available on Window$ :-( + +- I love programming, the open-source idea, Python and the +Clipper/Xbase++/VO +languages. I would like eventually to see an open-source implementation +of a +such a language. Nuff said. + +many tias, + +gary + + +-------------- next part -------------- +""" + PRGPP.py - a Python re-implementation of the Xbase++ (Clipper) preprocessor + + Released to the public domain 2-Apr-1999, + + Provided as-is; use at your own risk; no warranty; no promises; enjoy! + + by Gary Stephenson (garys at magna.com.au) + (who is currently underemployed ) + +""" + +import re +import sys +import glob +import string + +Identifier = re.compile(r"\s*([A-Za-z_]+[A-Za-z0-9_]*)") +NumLiteral = re.compile(r"\s*([0-9]+(\.[0-9]+)?)") +StringLiteral = re.compile(r"\s*('.*?'|\".*?\")") +LogLiteral = re.compile(r"\s*(\.f\.|\.t\.)",re.I ) +Operator = re.compile(r"\s*(\+\+|\+=|\+|--|-=|->|-|\*\*|\*=|\*|/=|/|,|!|\||%|\.not\.|\.or\.|\.and\.|@|:=|:|==|=|>=|>|<=|<)",re.IGNORECASE) +BlockHeader = re.compile(r"\s*\{\s*\|.*\|" ) +OpenBrackets = re.compile(r"\s*(\[|\(|{)") +CloseBrackets = re.compile(r"\s*(\]|\)|})") +eol = re.compile(r"\s*$") +comma = re.compile(r"\s*,") + +defStmt = re.compile( r"#\s*define\s+(?P\w+)(?P.*)?", re.IGNORECASE ) +ifdef = re.compile( r"#\s*ifdef\s+(?P\w+)", re.IGNORECASE ) +ifndef = re.compile( r"#\s*ifndef\s+(?P\w+)", re.IGNORECASE ) +elsedef = re.compile( r"#\s*else\s*", re.IGNORECASE ) +endif = re.compile( r"#\s*endif\s*", re.IGNORECASE ) +include = re.compile( r"#\s*include\s+(?P.+)",re.IGNORECASE ) +undef = re.compile( r"#\s*undef\s+(?P\w+)", re.IGNORECASE ) +cmd = re.compile( r"#\s*command\s*(?P.+)=>(?P.*)", re.IGNORECASE ) +xcmd = re.compile( r"#\s*xcommand\s+(?P.+)=>(?P.*)", re.IGNORECASE ) +trans = re.compile( r"#\s*trans(late)?\s+(?P.+)=>(?P.*)", re.IGNORECASE ) +xtrans = re.compile( r"#\s*xtrans(late)?\s+(?P.+)=>(?P.*)", re.IGNORECASE ) +pragma = re.compile( r"#\s*pragma\s*.+", re.IGNORECASE ) + +matchLit = re.compile( r"\s*([^\s^\[^\]^<]+)" ) +matchGrp = re.compile( r"\s*\[" ) +endGrp = re.compile( r"\s*\]" ) +matchMrk = re.compile( r"\s*<(.+?)>" ) +DumbMrk = re.compile( r"\s*#<(.+)>" ) +firstNonWhite = re.compile( r"(\s*)\S" ) + +defs = { "__XPP__":None } +lineno = 0 +curfile = "" +curIndent = "" + +def StripComment( ln="" ) : + global curIndent + n = string.find( ln, '//' ) + if n <> -1 : + ln = ln[:n] + m = firstNonWhite.match(ln) + if m : + curIndent = m.group(1) + return string.strip( ln ) + +def splitMatch( str, lft, rght ) : + "Parses the string on balancing delimiters" + j = string.find( str, lft ) + if j == -1 : + return ( str,"","" ) + bef = str[:j] + i = j + 1 + l = len( str ) + n = 0 + while i < l : + if str[i] == rght : + if n == 0 : + return ( bef, str[j+1:i], str[i+1:] ) + n = n - 1 + elif str[i] == lft : + n = n + 1 + i = i + 1 + assert 0, "Unbalanced delimiters detected" + +def pseudofunc( key, str, line ) : + i = string.find( str, ")" ) + srch = string.split( str[1:i], "," ) + str = str[i+1:] + + i = string.find( line, key ) + bef = line[:i] + line = line[i+2:] + l = len( line ) + n = 0 + i = 0 + while n < l : + c = line[n] + if c == "(" : + i = i + 1 + elif c == ")" : + if i == 0 : + break + i = i - 1 + n = n + 1 + aft = line[n+1:] + subs = string.split( line[:n],"," ) + l = len( subs ) + assert l==len(srch), "Length mismatch" + for i in xrange( 0,l ) : + str = replace( str, string.strip( string.rstrip( srch[i] ) ) , string.strip( string.rstrip( subs[i] ) ) ) + + return bef + str + aft + +def writeln( hFile ) : + hFile.write( curIndent+tline+"\n" ) + +def writeBlank() : + if rootfile == curfile : + hOut.write( "\n" ) + +def readln( hFile ) : + global lineno + while 1 : + s = hFile.readline() + lineno = lineno+1 + if not s : + hFile.close() + break + s = StripComment( s ) + if not s : + writeBlank() + continue + if s[0] == "*" : + writeBlank() + continue + if s[:2] != "/*" : + break + writeBlank() + while string.rstrip(s)[-2:] != "*/" : + writeBlank() + s = hFile.readline() + lineno = lineno+1 + if not s : + hFile.close() + print "Error : Unclosed Multiline Comments" + sys.exit(1) + + return s + +def readNextLine( hFile ) : + s = readln( hFile ) + while s[-1:] == ";" : + s = s[:-1] + " " + readln( hFile ) + writeBlank() + return s + +def defOmit( hFile ) : + while 1 : + line = readNextLine( hFile ) + + m = endif.match( line ) + if m : + return + + m = elsedef.match( line ) + if m : + return + + m = ifdef.match( line ) + if m and not defs.has_key( m.group("name") ) : + defOmit( hFile ) + + m = ifndef.match( line ) + if m and defs.has_key( m.group("name") ) : + defOmit( hFile ) + + +class MatchGroup: + """ see docstring for MatchTree""" + + def __init__( self ) : + global curpos + self.trees = [] + while 1: + self.trees.append( MatchTree() ) + m = matchGrp.match( tline, curpos ) + if not m : + break + curpos = m.end() + + def __repr__( self ) : + return self.pprint( 0 ) + + def pprint( self, ind ) : + s = "" + for t in self.trees : + s = s + t.pprint( ind+1 ) + return s + + def match( self ) : + while 1 : + mtch = 0 + for t in self.trees : + if t.match() : + mtch = 1 + break + if not mtch : + break + return 1 + +class MatchTree: + """ + MatchTree -> ( Literal | Marker | MatchGroup )+ + + MatchGroup -> ( MatchTree )+ + + MatchTree stores the "syntax tree" for each clause + MatchGroup is a grouping of clauses at the same "level" (i.e. contiguous in the declaration) + + tline is the (global) string we are matching to + curpos is the (global) current index into tline, which the match methods increment on success! + """ + + def __init__( self ) : + self.tokens = [] + self.parse() + + def __repr__( self ) : + return self.pprint() + + def pprint( self, ind=0 ) : + s = "" + for t in self.tokens : + s = s + t.pprint( ind ) + s = s + (" "*ind)+"--------------\n" + return s + + def match( self ) : + global curpos + i = curpos + for m in self.tokens : + if not m.match() : + curpos = i + return 0 + return 1 + + def search( self ) : + global curpos + i = curpos + strt = self.tokens[0].search() + if strt != -1 : + for t in self.tokens[1:] : + if not t.match() : + curpos = i + return -1 + return strt + + def parse( self ) : + global curpos + l = len( tline ) + while curpos < l : + m = matchGrp.match( tline, curpos ) + if m : + curpos = m.end() + self.tokens.append( MatchGroup() ) + state = "G" + continue + + m = endGrp.match( tline, curpos ) + if m : + curpos = m.end() + return + + m = matchMrk.match( tline,curpos ) + if m: + body = m.group( 1 ) + curpos = m.end() + c = body[0] + if c == "(" : + self.tokens.append( ExtendedMarker( body[1:-1] ) ) + elif c == "#" : # single + self.tokens.append( SingleMarker( body[1:] ) ) + elif c == "*" : # wild + self.tokens.append( WildMarker( body[1:-1] ) ) + elif string.strip( body )[-3:] == "..." : # list + n = string.find( body, "," ) + self.tokens.append( ListMarker( string.strip( body[:n] ) ) ) + elif string.find( body, ":" ) > 0 : # restricted + self.tokens.append( RestrictedMarker( body ) ) + else : # regular + self.tokens.append( RegularMarker( body ) ) + state = "M" + continue + + m = Identifier.match( tline,curpos ) + if m : + self.tokens.append( KeyWord( m.group(1) ) ) + curpos = m.end() + continue + + m = matchLit.match( tline,curpos ) + if m : + self.tokens.append( Literal( m.group(1) ) ) + curpos = m.end() + continue + + assert 0, "Error - Unable to parse : "+tline[curpos:] + +def readExpression( xpos=0, expect="",commaOK = 0 ) : + + prevTok = "O" + while xpos < len( tline ) : + m = BlockHeader.match( tline,xpos ) + if m : + xpos = readExpression( m.end(), "}" ) + prevTok = "B" + continue + + m = OpenBrackets.match( tline, xpos ) + if m : + c = m.group(1) + if( prevTok != "O" and prevTok != "I" ) : + return xpos + if c == "[" : + bal = "]" + elif c == "{" : + bal = "}" + else : # c == "(" + bal = ")" + xpos = readExpression( m.end(), bal, 1 ) + prevTok = "X" + continue + + m = CloseBrackets.match( tline, xpos ) + if m : + if expect : + if m.group(1) != expect : + assert 0, "Unbalanced delimiters" + return m.end() + return xpos + + if not commaOK : + m = comma.match( tline,xpos ) + if m : + return xpos + + m = Operator.match(tline, xpos) + if m : + prevTok = "O" + xpos = m.end() + continue + + m = NumLiteral.match(tline, xpos) + if not m : + m = StringLiteral.match(tline, xpos) + if not m : + m = LogLiteral.match(tline, xpos) + if m : + if prevTok != "O" : + return xpos + prevTok = "L" + xpos = m.end() + continue + + m = Identifier.match(tline, xpos) + if m : + if prevTok != "O" : + return xpos + prevTok = "I" + xpos = m.end() + continue + + print "Error : Unable to parse string : "+tline[xpos:] + sys.exit(1) + + return xpos + +def ParseExpression() : + global curpos + i = curpos + curpos = readExpression( i ) + return tline[i:curpos] + +class Literal : + + def __init__( self, s ) : + #self.re = re.compile( r"\s*"+re.escape( s )+r"(\b|$)", re.I ) + self.re = re.compile( r"\s*"+re.escape( s ), re.I ) + assert s + + def __repr__( self ) : + return self.pprint() + + def pprint( self, ind=0 ) : + return (" ")*ind + "Literal : "+self.re.pattern+"\n" + + def match( self ) : + global curpos + m = self.re.match( tline, curpos ) + if m : + curpos = m.end() + return 1 + return 0 + + def search( self ) : + global curpos + m = self.re.search( tline, curpos ) + if m : + curpos = m.end() + return m.start() + return -1 + +class KeyWord : + + def __init__( self, s ) : + self.re = re.compile( r"\s*\b"+ s +r"(\b|$)", re.I ) + assert s + + def __repr__( self ) : + return self.pprint() + + def pprint( self, ind=0 ) : + return (" ")*ind + "Keyword : "+self.re.pattern+"\n" + + def match( self ) : + global curpos + m = self.re.match( tline, curpos ) + if m : + curpos = m.end() + return 1 + return 0 + + def search( self ) : + global curpos + m = self.re.search( tline, curpos ) + if m : + curpos = m.end() + return m.start() + return -1 + +class MatchMarker : + + def __init__( self, name ) : + self.name = name + self.vals = [] + if currentCmd.markers.has_key( name ) : + print "Error - marker name already present : "+name + sys.exit(1) + currentCmd.markers[name] = self + + def __repr__( self ) : + return self.pprint() + + def pprint( self,ind=0 ) : + assert 0, "Abstract method called" + return "" + + def match( self ) : + assert 0, "Abstract method called" + return 0 + + def getVal( self, i=0, f=None ) : + l = len( self.vals ) + if i >= l : + if l : + val = self.vals[l-1] + else : + val ="" + else : + val = self.vals[i] + if f : + return apply( f, (val,) ) + return val + +class RegularMarker( MatchMarker ) : + + def __init__( self, name ) : + MatchMarker.__init__( self,name ) + + def pprint( self, ind=0 ) : + return (" ")*ind + "Regular : "+self.name+"\n" + + def match( self ) : + self.vals.append( ParseExpression() ) + return 1 + +class RestrictedMarker( MatchMarker ) : + + def __init__( self, body ) : + n = string.find( body, ":" ) + name = string.strip( body[:n] ) + MatchMarker.__init__( self, name ) + self.vals = [] + mstr = string.replace( body[n+1:],",","|" ) + self.re = re.compile( "\s*("+string.replace( mstr, " ", "" )+")", re.I ) + + def pprint( self, ind=0 ) : + return (" ")*ind + "Regular : "+self.name+", "+self.re.pattern+"\n" + + def match( self ) : + global curpos + m = self.re.match( tline, curpos ) + if m : + self.vals.append( m.group( 1 ) ) + curpos = m.end() + return 1 + return 0 + + def search( self ) : + global curpos + m = self.re.search( tline, curpos ) + if m : + self.vals.append( m.group( 1 ) ) + curpos = m.end() + return m.start() + return -1 + +class WildMarker( MatchMarker ) : + + def __init__( self, name ) : + MatchMarker.__init__( self,name ) + + def pprint( self, ind=0 ) : + return (" ")*ind + "Wild : "+self.name+"\n" + + def match( self ) : + global curpos + self.vals.append( tline[curpos:] ) + curpos = len( tline ) + return 1 + +class SingleMarker( MatchMarker ) : + + def __init__( self, name ) : + MatchMarker.__init__( self,name ) + self.re = re.compile( r"\s*([^\s]*)" ) + + def pprint( self, ind=0 ) : + return (" ")*ind + "Single : "+self.name+"\n" + + def match( self ) : + global curpos + m = self.re.match( tline, curpos ) + if m : + self.vals.append( m.group(1) ) + curpos = m.end() + return 1 + return 0 + +class ExtendedMarker( MatchMarker ) : + + def __init__( self, name ) : + MatchMarker.__init__( self,name ) + self.reXpr = re.compile("\s*\(") + + def pprint( self, ind=0 ) : + return (" ")*ind + "Extended : "+self.name+"\n" + + def match( self ) : + global curpos + m = self.reXpr.match( tline, curpos ) + if m : + self.vals.append( ParseExpression() ) + return 1 + + m = StringLiteral.match( tline, curpos ) + if not m : + m = Identifier.match( tline, curpos ) + if m : + self.vals.append( m.group(1) ) + curpos = m.end() + return 1 + + return 0 + +class ListMarker( MatchMarker ) : + + def __init__( self, name ) : + MatchMarker.__init__( self,name ) + + def pprint( self, ind=0 ) : + return (" ")*ind + "List : "+self.name+"\n" + + def match( self ) : + global curpos + val = [] + self.vals.append( val ) + while 1: + xpos = curpos + curpos = readExpression(curpos) + val.append( tline[xpos:curpos] ) + m = comma.match( tline,curpos ) + if not m: + break + curpos = m.end() + return 1 + + def getVal( self, i=0, f=None ) : + l = len( self.vals ) + if i >= l : + if l : + val = self.vals[l-1] + else : + val = [""] + else : + val = self.vals[i] + if not val : + val.append("") + if f : + val = map( f, val ) + return reduce( lambda x,y : x+","+y, val ) + +class ResultGroup : + + def __init__( self ) : + global curpos + self.markers = [] + self.prs = "" + l = len( tline ) + while curpos < l : + + m = matchGrp.match( tline,curpos ) + if m : + self.prs = self.prs + tline[m.start():m.end()-1] + "%s" + curpos = m.end() + self.markers.append( (ResultGroup(),) ) + continue + + if endGrp.match( tline,curpos ) : + return + + Dumb = 0 + m = matchMrk.match( tline,curpos ) + if not m : + Dumb = 1 + m = DumbMrk.match( tline,curpos ) + if m : + self.prs = self.prs + tline[curpos:m.start()] + body = m.group(1) + curpos = m.end() + c = body[0] + if Dumb : + mname = body + func = stringify + elif c == '"' : + assert body[-1] == '"', "Invalid match marker : "+body + mname = body[1:-1] + func = normstringify + elif c == "(" : + assert body[-1] == ')', "Invalid match marker : "+body + mname = body[1:-1] + func = smartstringify + elif c == "{" : + assert body[-1] == '}', "Invalid match marker : "+body + mname = body[1:-1] + func = blockify + elif c == "." : + assert body[-1] == '.', "Invalid match marker : "+body + mname = body[1:-1] + func = logify + else : # regular + mname = body + func = lambda s : s + + if not currentCmd.markers.has_key( mname ) : + print "Error : match marker not found for "+mname+" at line :",lineno + print tline + print currentCmd.mtree + sys.exit(1) + + self.markers.append( (currentCmd.markers[mname],func) ) + self.prs = self.prs + "%s" + continue + + m = matchLit.match( tline, curpos ) + if m : + self.prs = self.prs + tline[m.start():m.end()] + curpos = m.end() + + def expand( self, i = 0 ) : + l = [] + for m in self.markers : + if len(m) == 2 : + l.append( m[0].getVal( i, m[1] ) ) + else : + l.append( m[0].repexpand() ) + return self.prs % tuple( l ) + + def repexpand( self ) : # Note : this should not have any repeating group markers! + maxlen = 0 + Result = "" + for m in self.markers : + if len( m[0].vals ) > maxlen : + maxlen = len( m[0].vals ) + for i in range( 0, maxlen ) : + Result = Result + self.expand( i ) + return Result + +class Command : + + cmds = [] + + def __init__( self, srch, repl ) : + global currentCmd,tline,curpos + self.markers = {} + currentCmd = self + curpos = 0 + tline = string.strip( srch ) + self.mtree = MatchTree() + tline = string.strip( repl ) + curpos = 0 + self.repl = ResultGroup() + Command.cmds.insert(0,self) + + def transform( self ) : + global tline + if self.mtree.match() : + tline = self.repl.expand() + t = self.markers.items() + for (n,m) in t : + m.vals = [] + return 1 + return 0 + +class Translate( Command ) : + + trns = [] + + def __init__( self, srch, repl ) : + global currentCmd,tline,curpos + self.markers = {} + currentCmd = self + tline = string.strip( srch ) + curpos = 0 + self.mtree = MatchTree() + tline = repl + curpos = 0 + self.repl = ResultGroup() + Translate.trns.insert(0,self) + + def transform( self ) : + global tline + i = self.mtree.search() + if i != -1 : + tline = tline[:i]+ self.repl.expand()+ tline[curpos:] + t = self.markers.items() + for (n,m) in t : + m.vals = [] + return 1 + return 1 + return 0 + + +def stringify( s ) : + if string.lstrip( s )[0] == '"' : + return "'"+s+"'" + return '"'+s+'"' + +def normstringify( s ) : + if s : + return '"'+s+'"' + return s + +def smartstringify( s ) : + if not s : + return "" + s = string.strip( s ) + if s[0] == "(" and s[-1:] == ")" : + return s + return '"'+s+'"' + +def blockify( s ) : + if s : + return "{|| "+s+" }" + return "" + +def logify( s ) : + if s : + return ".T." + return ".F." + +def applydefs() : + global defs,tline + for (frm,to) in defs.items() : + i = string.find( tline, frm ) + if i <> -1 : + tline = string.replace( tline, frm, to ) + return 1 + return 0 + +def applytrans() : + for c in Translate.trns : + if c.transform() : + return 1 + return 0 + +def applycmds() : + for c in Command.cmds : + if c.transform() : + return 1 + return 0 + +def transform( line ) : + global tline,curpos + tline = line + assert tline, "Empty string before transform" + curpos = 0 + while 1 : + if applydefs() : + continue + if applytrans() : + continue + if applycmds() : + continue + break + + assert tline, "Empty string after transform" + writeln( hOut ) + +def PreProcess( cFile ) : + global defs,hOut,lineno,curfile + + hFile = open( cFile, "r" ) + if not hFile : + print "Error : unable to open "+cFile + sys.exit(1) + + savno = lineno + savfile = curfile + curfile = cFile + lineno = 0 + while not hFile.closed : + line = readNextLine(hFile) + if not line : + continue + m = defStmt.match( line ) + if m : + nam = m.group("name") + if defs.has_key( nam ) : + print "Error : : "+nam+" already defined" + sys.exit(1) + if not m.group("aft") : + defs[nam] = "" # preprocessor const + elif m.group("aft")[0] == "(" : #pseudofunction + defs[nam+"("] = m.group("aft") + else : # symbolic constant + defs[nam] = string.strip( string.rstrip( m.group("aft") ) ) + continue + + m = ifdef.match( line ) + if m : + if not defs.has_key( m.group("name") ) : + defOmit( hFile ) + continue + + m = ifndef.match( line ) + if m : + if defs.has_key( m.group("name") ) : + defOmit( hFile ) + continue + + m = elsedef.match( line ) + if m : + defOmit( hFile ) + continue + + m = endif.match( line ) + if m : + continue + + m = include.match( line ) + if m : + fname = string.split( m.group("filename"),'"' )[1] + IncludeFile( fname ) + continue + + m = undef.match( line ) + if m : + if defs.has_key( m.group("name") ) : + del defs[ m.group("name") ] + continue + + m = xcmd.match( line ) + if m : + Command( m.group("srch"),m.group("repl") ) + continue + + m = cmd.match( line ) + if m : + Command( m.group("srch"),m.group("repl") ) + continue + + m = xtrans.match( line ) + if m : + Translate( m.group("srch"),m.group("repl") ) + continue + + m = trans.match( line ) + if m : + Translate( m.group("srch"),m.group("repl") ) + continue + + m = pragma.match( line ) + if m : + continue + + transform( line ) + + hFile.close() + lineno = savno + curfile = savfile + +def IncludeFile( fname ) : + import os + if not os.path.exists( fname ) : + if os.environ.has_key("INCLUDE") : + incpaths = string.split( os.environ["INCLUDE"], ";" ) + for p in incpaths : + if os.path.exists( p + "\\" + fname ) : + hOut.write( '#line 1 "'+p+"\\"+fname+'"@"'+fname+'"\n' ) + fname = p+"\\"+fname + break + else : + print "Error : unable to find : "+fname + sys.exit( 1 ) + else : + print "Error : unable to find : "+fname + sys.exit( 1 ) + else : + hOut.write( '#line 1 "'+fname+'"@"'+fname+'"\n' ) + + PreProcess( fname ) + if curfile : + hOut.write( "#line "+str(lineno)+' "'+curfile+'"\n' ) + +def PreProcessPrg( prg, pp=None,std=None ) : + import os + global hOut,curfile,rootfile + + if "." not in prg : + prg = prg+".prg" + + if not pp : + pp = os.path.splitext(prg)[0]+".ppp" + + hOut = open( pp, "w" ) + rootfile = prg + print "Preprocessing",prg,"to",pp,"using",std + if std : + IncludeFile( std ) + hOut.write( '#line 1 "'+prg+'"\n' ) + curfile = prg + PreProcess( prg ) + + hOut.close() + + +if __name__ == "__main__" : + import getopt + optlist, args = getopt.getopt( sys.argv[1:], "Uu:" ) + if not args or len(args) > 2 : + print "Syntax : PRGPP [-U | -u ] [ ] " + else : + if len(args) < 2 : + args.append( None ) + if optlist : + if optlist[0][0] == "-U" : + PreProcessPrg( args[0], args[1] ) + elif optlist[0][0] == "-u" : + PreProcessPrg( args[0], args[1], optlist[0][1] ) + else : + PreProcessPrg( args[0],args[1],"std.ch" ) + + diff --git a/demo/ermis-f/python_m/cur/0201 b/demo/ermis-f/python_m/cur/0201 new file mode 100644 index 00000000..37b5576e --- /dev/null +++ b/demo/ermis-f/python_m/cur/0201 @@ -0,0 +1,148 @@ +From: margaret at bewell.net (margaret at bewell.net) +Date: Thu,22 Apr 1999 18:08:53+2000 +Subject: Thing about Linux you do not know... +Message-ID: <104221999181500sforge@mcs.net> +Content-Length: 5459 +X-UID: 201 + + New total graphics and CAD solution for LIN????X !!! + + + http://www.linuxcad.com + + + LinuxCAD may replace AutoCAD and Visio in 90% of cases where ACAD is used, +and in 100% cases the Visio is used it means +thousands of dollars in savings !!! Plus true multitasking of Linux and +freedom from the MS-Windows. + + http://www.linuxcad.com + + LinuxCAD is an AutoCAD for Linux for all practical purposes it implements +all major features of ACAD in such a way that new users (who had ACAD experience before) +do not need any additional training to start working with LinuxCAD. + + http://www.linuxcad.com + + LinuxCAD is a professional quality Computer Aided design and Drafting + system for Linux , LinuxCAD is all graphics , all visual modelling and + all diagramming you may need for Linux !!! + + http://www.linuxcad.com + + LinuxCAD can be used in: + Software Development Flowcharting , + Entity Relationship Diagramming, + System Administration Diagramming and you actually can start + your sysadmin tasks from inside LinuxCAD, + Mechanical Engineering drafting, + PCB and schematic design ( easily integrated with routing programs ), + Geographicsl Information Systems, + Any kind of drafting where integration with database is important, + Floor plans for buildings and facilities, + Architectural Drafting, + Front end for programmable rendering systems like OpenGL, + Can be used to replace ACAD in every application later is used !!! + +LinuxCAD - a must have for every Linux user. + + LinuxCAD for Sun SPARC - $350 ( when purchasing multiple copies + major discount provided ). + + LinuxCAD is available for Intel x86 and PowerMac Linuxes. + LinuxCAD is a very affordable commercial program + Intel version - only $99 + LinuxPPC version - only $120 + Also available for all major ????nix versions ( look at our web site + for details. ) + + YO???? CAN START ????SING WORKING, BREATHING LIN????XCAD IN 24 HO????RS AFTER PAYING BY CREDIT CARD !!! + + + This prices will meet our competitors anywhere in the world +to the benefits of all Linux users. They show our commitment to mass Linux market, +our long term goals and superior quality of our product in comparison to +competition. + + LinuxCAD v 1.85 + +includes important additions: + + 1. Printing to HPGL compatible plotters , + 2. Printing DeskJet and LaserJet , + 3. Printing Postscript + 4. Printing LinuxCAD MS Windows based Print server. + 5. Blocks and Attributes - just like in AutoCAD. + 6. Bezier Splines. + 7. 3D objects and algorythms. + 8. ????ser Coordinate Systems. + 9. Bug fix from LinuxCAD rel 1.8 +10. Hidden lines removal. +11. Dview command. +12. Forming of 3D shapes by extrusion and revolution. +13. Support for SHX fonts in ????nifont format. That means national symbols, + including german accent letters, cyrillic, katakana, kanji. + + + all included in $99 basic package, there is no need to purchase any +additions or extensions. + Now our competitors can no longer claim "The best performance/price ratio" +The best performance/price ratio provides nothing else but LinuxCAD alone !!! + + + check and see for yourself: + + http://www.linuxcad.com + + + The outline of the main features of the previous versions: + 1) LinuxCAD provides great variety of entity types ( lines , circles , ellipses , traces , text , +polylines , solids , doughnuts , arcs , spline curves , user defined entities and 3D entities ) , + 2) LinuxCAD implements all necessary editing features ( scale , + rotate , mirror , offset , array , copy , move , hatch , trim , extend , purge , ... ). + 3) Allows up to 1000 layers, with ability to control layer color and visibility independently. + 4) All entities are transferable to and from AutoCAD through DXF exchange format. + 5) Supports user defined line types and load able fonts in SHX format ( including ????nicode fonts ). + 6) Supports a hardcopy to printers. + 7) Parts of the drawing can be copied between different instances of the LinuxCAD using X-Clipboard. + 8) LinuxCAD has industry standard Motif G????I. + 9) Allows users to write custom applications for automating typical editing and drafting tasks + using industry most popular C-compiler GCC. +10) Easy integration to relational databases !!! + + http://www.linuxcad.com + + We are looking for resellers of the shrink wrapped copies of LinuxCAD, +reseller discounts provided. + + + Software Forge Inc. + public relations department + + +PS. LinuxCAD has been developed using our proprietary Post Object Oriented +Technology of Software Development. We have a strategic advantage against +our competitors ( including big ones ) in the speed of development and +manageability of huge volumes of source code (!) + + In the long run You better off with LinuxCAD !!! + LinuxCAD is the future , AutoCAD is the past, Give LinuxCAD a try !!! + +http://www.linuxcad.com + + +Software Forge Inc. , just as such companies as Cygnus,Caldera,SSC, +Netscape,Oracle,IBM,Redhat doing its best in bringing Linux OS in the +mainstream of business computing !!! Our product LinuxCAD firmly +establishes Linux as solid platform for Computer Aided Drafting and +diagramming !!! + + + This entire post is Copyright of the Software Forge Inc. and can be reproduced +or copied only in its entirety in its original unmodified form. + + + + + + diff --git a/demo/ermis-f/python_m/cur/0202 b/demo/ermis-f/python_m/cur/0202 new file mode 100644 index 00000000..6ad748da --- /dev/null +++ b/demo/ermis-f/python_m/cur/0202 @@ -0,0 +1,16 @@ +From: bhuzyk at kodak.com (Bruce Huzyk) +Date: 12 Apr 1999 21:05:11 GMT +Subject: Converting a string to a tuple +Message-ID: <01be8530$65bb7120$52037e81@saints> +X-UID: 202 + +Here is a basic problem that is causing me much stress: + +I have a string a = '(1, "abc\\def", 2)' that I would like to convert to a +tuple. + +I have tried eval(), but it interprets the backslashes. + + + + diff --git a/demo/ermis-f/python_m/cur/0203 b/demo/ermis-f/python_m/cur/0203 new file mode 100644 index 00000000..68b54841 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0203 @@ -0,0 +1,26 @@ +From: jfarr at real.com (Jonothan Farr) +Date: Fri, 23 Apr 1999 15:29:38 -0700 +Subject: Efficient List Subtraction +References: <3720EF73.CA7DDEFF@Colorado.edu> +Message-ID: +X-UID: 203 + +I have also longed for built in support for the union and intersection of +two sequences. + +Perhaps: +list.union(list2) +and +list.intersection(list2) + +?? + +insert-clever-witty-long-hyphenated-phrase-ly y'rs +--jfarr + + + + + + + diff --git a/demo/ermis-f/python_m/cur/0204 b/demo/ermis-f/python_m/cur/0204 new file mode 100644 index 00000000..d1fb8d1f --- /dev/null +++ b/demo/ermis-f/python_m/cur/0204 @@ -0,0 +1,36 @@ +From: roy at popmail.med.nyu.edu (Roy Smith) +Date: Mon, 26 Apr 1999 16:01:41 -0400 +Subject: Python too slow for real world +References: <372068E6.16A4A90@icrf.icnet.uk> <3720A21B.9C62DDB9@icrf.icnet.uk> <3720C4DB.7FCF2AE@appliedbiometrics.com> <3720C6EE.33CA6494@appliedbiometrics.com> <37215EFB.433AFCA6@prescod.net> <3724B2D6.B468687A@prescod.net> +Message-ID: +Content-Length: 1053 +X-UID: 204 + +Paul Prescod wrote: +> It is a performance issue if you don't know that regexps are supposed to +> be compiled. + +I hope this doesn't sound as bad as I fear it might, but part of being a +good programmer (or at least a good computer scientist) is to understand +performance issues like this. + +Regular expression theory hasn't changed a whole bunch in the last 20 +years; it's the same stuff in C, Perl, and any other language that has RE +functionality (either built-in or through some library). The idea of +factoring constant operations out of loops is the same today is it was 10, +20, 30 years ago. + +If you don't know that RE's get compilied (and that the compilation stage +can be expensive), you don't understand the tool you're using. If you +don't understand that factoring the expensive constant compilation process +out of a loop is important to make your program run fast, you aren't a +good programmer. No programming language can help that. + +-- +Roy Smith +New York University School of Medicine + + + + + diff --git a/demo/ermis-f/python_m/cur/0205 b/demo/ermis-f/python_m/cur/0205 new file mode 100644 index 00000000..ecf0ff83 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0205 @@ -0,0 +1,47 @@ +From: aaron_watters at my-dejanews.com (aaron_watters at my-dejanews.com) +Date: Tue, 13 Apr 1999 13:15:16 GMT +Subject: simple indexed file module? +References: +Message-ID: <7evg0s$spu$1@nnrp1.dejanews.com> +Content-Length: 1442 +X-UID: 205 + +In article , + Joe Strout wrote: +> For a CGI script I'm working on, I need to keep a couple of indexed +> files. These will contain variable-length data (descriptions), which +> may be changed fairly frequently. So I imagine that in addition to the +> data file, there will be an index file that keeps track of the position +> and length of each record. New or expanded records will be stuffed in +> wherever there is free space, or at the end if no sufficient free chunk +> is available. + +If the data is small I'd say use an in memory approach with +load and store using marshal. If the data is large enough that +the time to load/unmarshal/marshal/store becomes an issue (probably +on the order of megs, I think) then use some sort of dbm implementation. +bplustree.py will work, but it doesn't do the kind of garbage +management you ask for (you'd have to do that periodically offline). +I haven't tested it on a mac, but it should require few if any +changes. + +http://starship.skyport.net/crew/aaron_watters/bplustree/ + +also have a look at + +http://www.chordate.com/gadfly.html + + -- Aaron Watters + +=== +You can express emotion in many ways +and with varying degrees of loudness. + -- from my recently purchased French vocab tape. + + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/0206 b/demo/ermis-f/python_m/cur/0206 new file mode 100644 index 00000000..8c88d397 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0206 @@ -0,0 +1,29 @@ +From: news at helen.demon.nl (Ilja Heitlager) +Date: Thu, 29 Apr 1999 10:27:34 +0200 +Subject: Using Python for Modular Artificial Intelligence code +References: +Message-ID: <7g94lp$mdu$1@news.worldonline.nl> +X-UID: 206 + +>I've started looking into Python as the AI scripting language for this +>purpose, but I'm having trouble seeing exactly how I could do this. I want +>a message passing architecture - so one object in the game world sends a +>message to another for interpretation (along with a Python tuple for the +>parameters of the message perhaps). This requires a two way interface +>between my C++ code and the Python script loaded for the particular game +>object. +Wouldn't you be better of using a network or distributed architecture. Use +Corba or TCP/IP protocol to let your objects interact. Saves you the trouble +of language-interoperatablility and provides possibilities for multi-user +(You're doing a LARGE game project, not?) + +Where do you use C++ for anyway? GUI's? Build them in Python, forget C++ +until you are done and than use C++ to speed up critical sections + +Ilja + + + + + + diff --git a/demo/ermis-f/python_m/cur/0207 b/demo/ermis-f/python_m/cur/0207 new file mode 100644 index 00000000..e61b2d26 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0207 @@ -0,0 +1,31 @@ +From: 4mschulz at informatik.uni-hamburg.de (Marko Schulz) +Date: 30 Apr 1999 12:40:00 GMT +Subject: Python IS slow ! [was] Re: Python too slow for real world +References: <613145F79272D211914B0020AFF6401914DAD8@gandalf.digicool.com> +Message-ID: <7gc8b0$27t$2@rzsun02.rrz.uni-hamburg.de> +X-UID: 207 + +Markus Kohler wrote: +> +> Python-1.5.2c1 .... +> 0.52 seconds +> +> Squeak .... +> 0.13 seconds. + +I wouldn't put too much meaning in this number. You can't say how big +the startup costs are for a python vs. squeak. You mentioned Garbage +Collection. There are other factors, that might make other (longer +running?) examples very different. + +Still it would be nice, if python were faster. + +-- +marko schulz + "Die Welt ist gut, die Welt ist schlecht. + Ich seh' mehr als ich begreifen kann. Ich sehe in 3-D." + '3-D', Extrabreit + + + + diff --git a/demo/ermis-f/python_m/cur/0208 b/demo/ermis-f/python_m/cur/0208 new file mode 100644 index 00000000..5dcea486 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0208 @@ -0,0 +1,45 @@ +From: jeremy at cnri.reston.va.us (Jeremy Hylton) +Date: Thu, 15 Apr 1999 15:25:37 -0400 (EDT) +Subject: for in benchmark interested +In-Reply-To: <37157CE7.EFB470CA@inka.de> +References: <37157CE7.EFB470CA@inka.de> +Message-ID: <14102.15523.573321.443195@bitdiddle.cnri.reston.va.us> +X-UID: 208 + +The Python version would be faster if you used sys.stdin.read instead +of sys.stdin.readlines. I'm not sure why you need to split the input +into lines before you split it into words; it seems like an +unnecessary step. + +The version below is 25% faster on my machine than your fastest Python +version. (And I'm not even an expert Python optimizer :-). + +import sys +import string + + +def run(): + dict={} + dict_get = dict.get + read = sys.stdin.read + string_split = string.split + while 1: + buf = read(500000) + if buf: + for key in string_split(buf): + dict[key] = dict_get(key, 0) + 1 + else: + return dict + + +dict = run() +write = sys.stdout.write +for word in dict.keys(): + write("%4d\t%s\n" % (dict[word], word)) + + +Jeremy + + + + diff --git a/demo/ermis-f/python_m/cur/0209 b/demo/ermis-f/python_m/cur/0209 new file mode 100644 index 00000000..b3799485 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0209 @@ -0,0 +1,46 @@ +From: richard at folwell.com (Richard Folwell) +Date: Fri, 16 Apr 1999 20:01:32 GMT +Subject: stupid Win-CGI getting started question +Message-ID: <01BE8851.3B6BED90.richard@folwell.com> +Content-Length: 1800 +X-UID: 209 + +On 14 April 1999 19:45, bill_seitz at my-dejanews.com +[SMTP:bill_seitz at my-dejanews.com] wrote: +> So nobody can run .py files as CGI? +> +> Is this a known problem? What's its scope? Only Netscape/NT? What about IIS? + +It was certainly possible to run .py files as CGI under IIS 2. I did not need +to upgrade that system, so cannot be sure about later versions of IIS, but +would find it extremely hard to believe that anyone would remove the ability to +use an abitrary external program to provide a CGI resource to a web server from +a mainstream web server. + +I do remember seeing a (at least one, maybe more) posting about differences in +configuring IIS2/3/4 w.r.t. external programs (e.g. stuff which worked fine +under IIS2/3 stopped working when the server was upgraded to version 4). + +The problem has to be along these lines. The CGI spec (I understand) simply +requires programs/languages that can handle standard input (stdin) and produce +standard output (stdout). + +> I'm trying to keep my code generic enough that it can be moved to other +> platforms/servers down the road (which is why I haven't been looking at nsapy +> or Medusa or ZopeHTTP...), so I don't want to work around a problem now and +> just have it hit me again later. I'd like to understand the nature of the +> problem enough to evaluate alternative solutions. + +I have done some work with ISAPI (the Microsoft equivalent to NSAPY). There +are performance gains with these approaches, but you definitely lock yourself +into a single web server supplier (unless someone has come up with a neat way +of producing cross-platform support for these plug-ins). CGI has the big +advantage that it is supported by all non-toy web servers, and the actual code +should not need changing between different web servers. + +Richard + + + + + diff --git a/demo/ermis-f/python_m/cur/0210 b/demo/ermis-f/python_m/cur/0210 new file mode 100644 index 00000000..70fad0b0 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0210 @@ -0,0 +1,29 @@ +From: calishar at *remove*this*.home.com (Calishar) +Date: Thu, 15 Apr 1999 21:59:58 GMT +Subject: Freezing an App +References: <7f15dj$bq4$1@m2.c2.telstra-mm.net.au> <7f3v96$g88$1@m2.c2.telstra-mm.net.au> +Message-ID: +X-UID: 210 + +Mark Hammond wrote in message +news:7f3v96$g88$1 at m2.c2.telstra-mm.net.au... +> Are you sure the code is being executed at all? I cant imagine how these +> could silently do nothing. + + +Actually, I must plead guilty to a week long case of brain death. I took a +close look at teh code and the registry today, and the code was doing +exactly what I told it to do, which of course was not quite what I wanted it +to. I was placing the Computer Name value one level too deep. + +So the program worked, the freeze worked, the programmer should be fired. + +Hanging his head in shame, + +Calishar + + + + + + diff --git a/demo/ermis-f/python_m/cur/0211 b/demo/ermis-f/python_m/cur/0211 new file mode 100644 index 00000000..220bfa52 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0211 @@ -0,0 +1,27 @@ +From: jeffp at crusoe.net (evil Japh) +Date: Sat, 3 Apr 1999 20:38:37 -0500 +Subject: Why are they? Re: Module Documentation Strings +In-Reply-To: +References: +Message-ID: +X-UID: 211 + +Why are there documentation strings? + +I mean, granted it would be very bad if the next version of python did not +support them, but why not just use comment lines? + +Just curious why this convention is used. + +-- +Jeff Pinyan (jeffp at crusoe.net) +www.crusoe.net/~jeffp + +Crusoe Communications, Inc. +732-728-9800 +www.crusoe.net + + + + + diff --git a/demo/ermis-f/python_m/cur/0212 b/demo/ermis-f/python_m/cur/0212 new file mode 100644 index 00000000..0f67c7de --- /dev/null +++ b/demo/ermis-f/python_m/cur/0212 @@ -0,0 +1,76 @@ +From: jeremy at cnri.reston.va.us (Jeremy Hylton) +Date: Wed, 28 Apr 1999 11:13:28 -0400 (EDT) +Subject: try vs. has_key() +In-Reply-To: +References: + + + <7g51q6$1pt$1@vvs.superst.iae.nl> + +Message-ID: <14119.8145.293039.667256@bitdiddle.cnri.reston.va.us> +Content-Length: 2011 +X-UID: 212 + +>>>>> "AM" == Aahz Maruch writes: + + AM> It appears that the second parameter for get() (to specify a + AM> value different from None when the key is not found) is new to + AM> 1.5.2. In 1.5.1 you still have to do the following: + +That's not correct. The optional second argument for get has been +around since get was introduced, which was before the release of 1.5 +final. (You check the CVS log for dictobject.c for confirmation :-). +If you use get, you can always specify a default value. + +This thread seems to have included a lot of code that misuses +dictionaries and other built-in types, which is probably why you +concluded that get changed between 1.5.1 and 1.5.2. + +I think the confusion started when the following bits of code were +posted: + + d={} + for word in words: + d[word]=d.get(word, 0)+1 + +The above part is just fine -- an efficient way to count words. + + d={} + for word in words: + first_two=word[:2] + d[first_two]=d.get(first_two, []).append(word) + +This second bit doesn't work because the append method on list objects +returns None. As a result, the first time a new value for first_two +appears None will be assigned to that key in the dictionary. The +second time that value of first_two shows up, None will be returned by +d.get. Then the code will raise an AttributeError, because None +doesn't have an append method. + +The following code would be correct: + + d={} + for word in words: + first_two=word[:2] + d[first_two]= temp = d.get(first_two, []) + temp.append(word) + +It would be less efficient, however, than the following: + + d={} + for word in words: + first_two=word[:2] + if d.has_key(first_two): + d[first_two].append(word) + else: + d[first_two] = [word] + +(And as Barry pointed out earlier in the thread, depending on how +frequently you expect has_key to return true, you may want to use +try/except instead. See http://www.python.org/~bwarsaw/ecshort.pdf.) + +Jeremy + + + + diff --git a/demo/ermis-f/python_m/cur/0213 b/demo/ermis-f/python_m/cur/0213 new file mode 100644 index 00000000..8af695ee --- /dev/null +++ b/demo/ermis-f/python_m/cur/0213 @@ -0,0 +1,60 @@ +From: wtanksle at dolphin.openprojects.net (William Tanksley) +Date: Tue, 06 Apr 1999 04:40:22 GMT +Subject: Crappy Software was Re: [OffTopic: Netscape] Re: How should Python be evangelized? +References: <7dos4m$usi$1@nnrp1.dejanews.com> <7dqs0h$lcq$1@nnrp1.dejanews.com> <2_6M2.30$Kj1.679@198.235.216.4> <37019F42.EA55CA8@kanga.org> <009d01be7b47$8a9a6020$f29b12c2@pythonware.com> <7dtmso$7u6$1@news.clarkson.edu> <3703ca33.9749737@news.bctel.ca> <37089dcb@fermi.armored.net> +Message-ID: +Content-Length: 1980 +X-UID: 213 + +On Mon, 5 Apr 1999 12:15:17 -0700, Samuel A. Falvo II wrote: +>>Er, that'd be the same Netscape that has such broken CSS that it is +>>absolutely unuseable? + +>While I understand that Netscape's CSS implementation is not the best, I +>have to take an opposing view as to it not being usable. Netscape's CSS is +>more than adequate for the vast majority of the web sites out there. They +>provide my web sites with a good, professional appearance under both +>Netscape and MSIE. + +I understand what you mean -- we have to design for what's out there, not +what we wish was out there. Nevertheless, Netscape is so broken that it +will *crash* on certain CSS inputs. Not render them wrong, crash. Thud. + +"Doctor, it hurts when I do this!" + +>>Myself, I prefer Opera; at least it meets standards. MSIE runs a close +>>second these days. Netscape is horrendously buggy. + +>And Mozilla will decimate MSIE. The trick, of course, is them actually +>releasing it as a finished product. :-) + +I have EVERY hope that this will happen. (Please please please...) + +And it'll be using Python, too. (Right?) + +>However, when I actually see Opera for Linux, I'll be sure to give it a +>shot. I've used Opera for Windows, and was only mildly impressed. It was a +>blazingly fast web browser, but it didn't have the feature set that MSIE had +>at the time. A lot has changed since then, I know -- which is why I'm +>willing to give it another shot. + +The one reason I like Opera (I'm not using it now because I'm a cheapskate): +it fully and nearly correctly supports the keyboard. Oh, it's CSS is better +than anything else, but like you said I don't code for the best, I code for +_everything_. + +>(I'll be REALLY happy when they port Opera to AmigaOS 5.) + +Hmm, would that be because of Opera or because of AmigaOS 5? (The current +version is OS 4.) + +Are there many Amiga Python users out there? + +-- +-William "Billy" Tanksley +"But you shall not escape my iambics." + -- Gaius Valerius Catullus + + + + diff --git a/demo/ermis-f/python_m/cur/0214 b/demo/ermis-f/python_m/cur/0214 new file mode 100644 index 00000000..bf1a8131 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0214 @@ -0,0 +1,35 @@ +From: arcege at shore.net (Michael P. Reilly) +Date: Wed, 28 Apr 1999 19:47:55 GMT +Subject: converting perl to python - simple questions. +References: <7fvagp$8lm$1@nnrp1.dejanews.com> +Message-ID: +X-UID: 214 + +Aahz Maruch wrote: +: In article , +: Florian Weimer wrote: +:> +:>(Quotation from the Perl 4 manpage. This version doesn't have an +:>`exists' function.) + +: Then you've just made a completely irrelevant comment, on the order of +: referring to Python 1.2. Perl 5 has been out for more than two years, +: and there are so many improvements that I don't know of *anyone* who's +: doing new work in Perl 4. + +Perl 5 was released somewhere around 3-4 years ago. And I haven't +written much Perl code in that time - but any Perl code I have written +is for perl4. I avoid perl5 religiously. + +But there could easily be others out there who still use perl4 as well. +Just like there are ppl out there who still use Tcl 7.5 (my previous +and current employers) and Python 1.4. It is not always easy to +upgrade when you have to support customers in the field using +real-world products. + + -Arcege + + + + + diff --git a/demo/ermis-f/python_m/cur/0215 b/demo/ermis-f/python_m/cur/0215 new file mode 100644 index 00000000..15f2b721 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0215 @@ -0,0 +1,37 @@ +From: moshez at math.huji.ac.il (Moshe Zadka) +Date: Thu, 29 Apr 1999 20:32:05 +0300 +Subject: Python IS slow ! [was] Re: Python too slow for real world +In-Reply-To: <7g9qmo$luf$1@news.udel.edu> +References: <613145F79272D211914B0020AFF6401914DAD8@gandalf.digicool.com> <7g9qmo$luf$1@news.udel.edu> +Message-ID: +X-UID: 215 + +On 29 Apr 1999, Terry Reedy wrote: + +> >The reason it's slow is its runtime model. _Every_ function call requires +> >a lookup in a hash table, just on the off-chance that the programmer +> >changed the meaning of the function. +> +> A batch-mode optimizer analyzing an entire file (module) should be able to +> detect whether or not function names are rebound. + +Or a human optimizer, might do something like + +(old code) +for i in a: + f(a) +(new code) +lf=f +for i in a: + lf(a) + +Python (I believe) optimizes local variable lookups. +-- +Moshe Zadka . +QOTD: My own exit is more likely to be horizontal then perpendicular. + + + + + + diff --git a/demo/ermis-f/python_m/cur/0216 b/demo/ermis-f/python_m/cur/0216 new file mode 100644 index 00000000..06d570a5 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0216 @@ -0,0 +1,21 @@ +From: heaney at cambridge.scr.slb.com (Steven Heaney) +Date: 22 Apr 99 10:50:40 +0100 +Subject: HTMLgen in Java? +References: <371D7CE8.7CF9067@erols.com> +Message-ID: +X-UID: 216 + +Try looking at http://java.apache.org/ecs/index.html + +........................................................................ +Steven Heaney +Schlumberger + +http://www.slb.com/cgi-bin/people.pl?type=person&name=steven%20heaney + + + + + + + diff --git a/demo/ermis-f/python_m/cur/0217 b/demo/ermis-f/python_m/cur/0217 new file mode 100644 index 00000000..cfd70a10 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0217 @@ -0,0 +1,45 @@ +From: fredrik at pythonware.com (Fredrik Lundh) +Date: Sat, 10 Apr 1999 14:00:51 GMT +Subject: Q on Tkinter Scrollbar +References: <370CFAC8.32EB0B29@ingr.com> +Message-ID: <004f01be835a$c0e15240$f29b12c2@pythonware.com> +Content-Length: 1525 +X-UID: 217 + +Joseph Robertson wrote: +> I want to manually control the scrollbar in a tkinter app, i.e. I don't +> want to tie it to another widget as a child. Below is what I have so +> far. I can't figure how to make the 'thumb' stay at the returned +> position, or the point where the user drags it. Right now it always +> pops back to the top. +> +> I want it to behave like a Scale, but look like a scrollbar. Think of a +> virtual window on a dataset, where I don't want to load the contents of +> the data set into a listbox (not enough memory). +> +> Anyone do this before, know of any similar examples, or give me a clue +> where to look next. I don't want to use extensions or another GUI, it +> needs to be Tkinter. + +you're halfways there. as you've seen, the callback given to the scrollbar's +"command" option (your _vscroll callback) is called with "moveto" or "scroll" +events, as described on: +http://www.pythonware.com/library/tkinter/introduction/scrollbar.htm + +however, the scrollbar target (your dataset) should respond to this by calling +the scrollbar's "set" method with two floating point values (first and last), +which gives the thumb's position as 0.0 (upper/left) and 1.0 (lower/right). +the target should of course also update the scrollbar if the view changes +by any other reason (e.g. if you load a new dataset). + +scrollable widgets like Listbox and Text provide "xscrollcommand" and +"yscrollcommand" options for this purpose. + +Cheers /F +fredrik at pythonware.com +http://www.pythonware.com + + + + + diff --git a/demo/ermis-f/python_m/cur/0218 b/demo/ermis-f/python_m/cur/0218 new file mode 100644 index 00000000..e52170f6 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0218 @@ -0,0 +1,30 @@ +From: tseaver at palladion.com (Tres Seaver) +Date: Fri, 30 Apr 1999 07:59:53 -0500 +Subject: HTML "sanitizer" in Python +References: +Message-ID: <3729A949.C16289FB@palladion.com> +X-UID: 218 + +Scott Stirling wrote: +> > 4) If someone helps me out, I think I should be able to use this info. and the tutorial and the Lutz book to loop the process and make the program run until all *.htm files in a folder have been handled once. +> +> Well, if I understand correctly, the *only* thing you're trying to do +> is to remove some specific strings from a bunch of files. Now if I +> were you, I wouldn't even bother to use Python on something that +> simple; I would just use sed. With sed, you could do: +> +> sed 'g/string_to_be_eliminated//g' my_file.html > output.html +> +> Presto, that's it. I think that there is a version for GNU sed for +> Windows somewhere out there; do yourself a favour and get it. + +Look for the "user tools" under http://sourceware.cygnus.com/cygwin/ + +-- +========================================================= +Tres Seaver tseaver at palladion.com 713-523-6582 +Palladion Software http://www.palladion.com + + + + diff --git a/demo/ermis-f/python_m/cur/0219 b/demo/ermis-f/python_m/cur/0219 new file mode 100644 index 00000000..a5896817 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0219 @@ -0,0 +1,38 @@ +From: jeremy at cnri.reston.va.us (Jeremy Hylton) +Date: Fri, 30 Apr 1999 11:08:30 -0400 (EDT) +Subject: try vs. has_key() +In-Reply-To: +References: + + + <7g51q6$1pt$1@vvs.superst.iae.nl> + + <14119.8145.293039.667256@bitdiddle.cnri.reston.va.us> + +Message-ID: <14121.50708.131339.251436@bitdiddle.cnri.reston.va.us> +X-UID: 219 + +>>>>> "JE" == Jeff Epler writes: + + >>The following code would be correct: + >> + >> d={} + >> for word in words: + >> first_two = word[:2] + >> d[first_two]= temp = d.get(first_two, []) + >> temp.append(word) + + JE> what about d[first_two] = d.get(first_two, [])+[word] ? Or is + JE> list construction and addition going to be enough more expensive + JE> than the function call to make this a lose as well? + +Yeah. Concatenating two lists results in a new list being created +every time (and you're already creating a new list containing the +value of word). Two list allocs is definitely more expensive that an +append. + +Jeremy + + + + diff --git a/demo/ermis-f/python_m/cur/0220 b/demo/ermis-f/python_m/cur/0220 new file mode 100644 index 00000000..2c27eec5 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0220 @@ -0,0 +1,41 @@ +From: arcege at shore.net (Michael P. Reilly) +Date: Thu, 29 Apr 1999 18:58:07 GMT +Subject: padding strings +References: +Message-ID: <3Z1W2.97$9L5.17946@news.shore.net> +X-UID: 220 + +Roy Smith wrote: +: Given a string, I want to generate another string which is exactly N +: characters long. If the first string is less than N, I want to blank-pad +: it. If the first string is greater than N, I want to truncate it. + +: What's the most straight-forward way to do that? + +You can use format strings: +Python 1.5.1 (#3, Jul 16 1998, 10:35:48) [GCC 2.7.2.2] on aix4 +Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam +>>> '%*s' % (10, "Michael") +' Michael' +>>> '%-*s' % (10, "Michael") +'Michael ' +>>> '%-*.*s' % (10, 10, "Michael P. Reilly") +'Michael P.' +>>> + +(Taken from section 2.1.5.1 "More String Operations" in the Python +Library Reference). + +You can also use '%%' to delay some of the formatting: + fmt = '%%-%d.%ds' % (10, 10) # yields '%-10.10s' + print repr(fmt % name) + +This is probably more efficient if you are going to use the same +format widths repeatedly. + + -Arcege + + + + + diff --git a/demo/ermis-f/python_m/cur/0221 b/demo/ermis-f/python_m/cur/0221 new file mode 100644 index 00000000..061b8dca --- /dev/null +++ b/demo/ermis-f/python_m/cur/0221 @@ -0,0 +1,66 @@ +From: rgruet at ina.fr (Richard GRUET) +Date: Thu, 15 Apr 1999 16:07:43 +0100 +Subject: 1.5.2 install problems on NT +References: <3714D8FF.634655C5@ina.fr> <8DA968455duncanrcpcouk@news.rmplc.co.uk> +Message-ID: <371600BF.28EE6F31@ina.fr> +Content-Length: 1999 +X-UID: 221 + +Forget what I've just written: I've just removed tk80.dll (in addition to +tcl80;dll) from the system32 directory, and this time all worked fine. + +So the final solution is : +- remove any extra copy of tcl80.dll and tk80.dll except the ones in tcl\bin +directory +- add tcl\bin directory to the Path environment variable. + +Thanks for your help + +Richard + + +Duncan Booth a ?crit : + +> Richard GRUET wrote in <3714D8FF.634655C5 at ina.fr>: +> +> >cl problems: +> >--------------- +> >shared by many ! see Hoon Yoon for instance... wish80;exe works (hence I +> >conclude that tcl is installed properly) but IDLE or Tkdb don't, with +> >insults like: +> >C:/PROGRA~1/PYTHON/TCL/lib/tk8.0/tk.tcl: bad event type +> >bad event type or keysym "MouseWheel" +> > while executing +> >"bind Listbox { +> > %W yview scroll [expr - (%D / 120) * 4] units +> >}" +> > (file "C:/PROGRA~1/PYTHON/TCL/lib/tk8.0/listbox.tcl +> > invoked from within +> >"source [file join $tk_library listbox.tcl]" +> > (file "C:/PROGRA~1/PYTHON/TCL/lib/tk8.0/tk.tcl" lin +> > invoked from within +> >"source C:/PROGRA~1/PYTHON/TCL/lib/tk8.0/tk.tcl" +> > ("uplevel" body line 1) +> > invoked from within +> >"uplevel #0 [list source $tkfile]" +> > +> >This probably means that Tk wasn't installed properly. +> > +> +> I had exactly that problem. I think it means that you upgraded an old Tcl +> system but there are still copies of the old Tcl80.dll files lying around +> somewhere and python is finding those in preference to the new ones. +> Delete tcl80.dll from the \winnt\system32 directory or wherever they +> are, and add the tcl bin directory (e.g. D:\Progra~1\Tcl\Bin) to the end of +> your path in the control manager/system/environment settings. +> +> -- +> Duncan Booth duncan at dales.rmplc.co.uk +> int month(char *p){return(124864/((p[0]+p[1]-p[2]&0x1f)+1)%12)["\5\x8\3" +> "\6\7\xb\1\x9\xa\2\0\4"];} // Who said my code was obscure? +> http://dales.rmplc.co.uk/Duncan + + + + + diff --git a/demo/ermis-f/python_m/cur/0222 b/demo/ermis-f/python_m/cur/0222 new file mode 100644 index 00000000..57ea36f7 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0222 @@ -0,0 +1,18 @@ +From: smithkf at OMIT_THIS.us.ibm.com (Kevin F. Smith) +Date: Fri, 23 Apr 1999 09:49:42 -0700 +Subject: millisecond time accuracy +Message-ID: <3720A4A6.125DA1C7@OMIT_THIS.us.ibm.com> +X-UID: 222 + +Is there a way to measure time accurate to milliseconds? + +For example, by calling the time.time() function I get seconds. Is +there a comparable function that I could use to measure interval times +down to at least millisecond accuracy? + +Thanks. + + + + + diff --git a/demo/ermis-f/python_m/cur/0223 b/demo/ermis-f/python_m/cur/0223 new file mode 100644 index 00000000..aa02e97e --- /dev/null +++ b/demo/ermis-f/python_m/cur/0223 @@ -0,0 +1,55 @@ +From: dfan at harmonixmusic.com (Dan Schmidt) +Date: 22 Apr 1999 13:30:53 -0400 +Subject: Pointers to variables +References: <19990422121403.A279051@vislab.epa.gov> +Message-ID: +Content-Length: 1652 +X-UID: 223 + +Randall Hopper writes: + +| This doesn't work: +| +| for ( var, str ) in [( self.min, 'min_units' ), +| ( self.max, 'max_units' )]: +| if cnf.has_key( str ): +| var = cnf[ str ] +| del cnf[ str ] +| +| It doesn't assign values to self.min, self.max (both integers). The +| values of these variables are inserted into the tuples and not +| references to the variables themselves, which is the problem. +| +| How can I cause a reference to the variables to be stored in the +| tuples instead of their values? + +Here's how I would do it: + + for ( varname, str ) in [( 'min', 'min_units' ), + ( 'max', 'max_units' )]: + if cnf.has_key( str ): + setattr (self, varname, cnf[ str ]) + del cnf[ str ] + +I don't think this is really any slower than what you wanted to do, +since Python was doing namespace lookups on 'min' and 'max' before +anyway. + +If min and max were mutable objects, a variation of your approach +would probably work, if there were a method to change them in-place +(e.g., "var.set_me (cnf[str])"). "var = cnf[str]" is never going to +do what you want, since it just makes the name 'var' point to a +different object (that's what assignment means in Python). + +I've just been using Python for a week, so take my answer with a grain +of salt... + +-- + Dan Schmidt -> dfan at harmonixmusic.com, dfan at alum.mit.edu +Honest Bob & the http://www2.thecia.net/users/dfan/ +Factory-to-Dealer Incentives -> http://www2.thecia.net/users/dfan/hbob/ + Gamelan Galak Tika -> http://web.mit.edu/galak-tika/www/ + + + + diff --git a/demo/ermis-f/python_m/cur/0224 b/demo/ermis-f/python_m/cur/0224 new file mode 100644 index 00000000..84305afb --- /dev/null +++ b/demo/ermis-f/python_m/cur/0224 @@ -0,0 +1,38 @@ +From: python-mode at python.org (python-mode at python.org) +Date: Thu, 29 Apr 1999 14:01:52 -0400 (EDT) +Subject: Emacs' python-mode buggy? +References: + <14120.30592.807745.732604@anthem.cnri.reston.va.us> + <3728955e.19679327@news.omnilink.de> +Message-ID: <14120.40592.744600.160039@anthem.cnri.reston.va.us> +X-UID: 224 + +>>>>> "SF" == Stefan Franke writes: + + SF> What bothers me most with the Emacs mode's TQSs is + SF> that editing gets terribly slow if there lots of them (and + SF> they are long). + SF> On each CR, Tab or : the current indent is computed, + SF> which takes *much* longer than outside the String. + SF> Can this be fixed? + +It's probably better with XEmacs, which has primitives that +python-mode can use to figure out if it's sitting inside a string or +not. Emacs doesn't have these. + +That being said, I've had a few people report such problems but no one +who's been able to send me a code sample so I can profile it. If you +can do this, use C-c C-b to send a python-mode bug report and include +your sample. + +-Barry + +P.S. Everything you ever wanted to know about python-mode and +font-locking: + + http://www.python.org/emacs/python-mode/faq.html + + + + + diff --git a/demo/ermis-f/python_m/cur/0225 b/demo/ermis-f/python_m/cur/0225 new file mode 100644 index 00000000..89221aeb --- /dev/null +++ b/demo/ermis-f/python_m/cur/0225 @@ -0,0 +1,25 @@ +From: mnot at pobox.com (Mark Nottingham) +Date: Fri, 30 Apr 1999 12:55:50 GMT +Subject: mktime() like function to produce GMT? +Message-ID: <00be01be9308$c649cf60$0301a8c0@cbd.net.au> +X-UID: 225 + +I need a function to produce a Unix epoch time from a time tuple, a la +time.mktime(). Problem is, mktime() gives you the tuple in localtime, which +is dangerous if you're dealing with GMT times in the past (like in the +HTTP). + +Is there a function that will make a GMT epoch time straight from a time +tuple? + +Thanks, + + +Mark Nottingham, Melbourne Australia +mnot at pobox.com http://www.pobox.com/~mnot/ + + + + + + diff --git a/demo/ermis-f/python_m/cur/0226 b/demo/ermis-f/python_m/cur/0226 new file mode 100644 index 00000000..7ecce25e --- /dev/null +++ b/demo/ermis-f/python_m/cur/0226 @@ -0,0 +1,61 @@ +From: mrfusion at bigfoot.com (mrfusion at bigfoot.com) +Date: Wed, 21 Apr 1999 02:49:43 GMT +Subject: Tkinter hangs on mainloop +References: <371c19bb.60709557@news> <008a01be8b11$e17fb320$f29b12c2@pythonware.com> +Message-ID: <371d3ae9.134747887@news> +Content-Length: 1491 +X-UID: 226 + +>> I've done a complete install of python ver 1.5.2 on my +>> windows98 system and I've run into a problem with Tkinter (no big +>> surprise!) I can import it with the line : from Tkinter import * +> +>I assume you're running this from the command +>line, right? + +I've tried both from the command line and double clicking the file +name (I have the proper associations set up). I've tried running +k:\python\python tktest.py, I've tried starting python and typing the +file in one line at a time, I've even tried waving a dead chicken over +my computer. No luck. + + +>> It hangs. +> +>not really. it doesn't hang, it just doesn't return +>immediately. in fact, it won't return until you've +>closed the root window. + +Actaully it doesn't return at all.....ever. +If I close the root window, I get a messsage from windows that says : +"Windows can't shut this program down automatically. It is recommended +that you close the program....bla bla bla". + + +>before you to this, look in the task bar. click on +>the Tk icon, and the (quite small) window will pop +>up. + +I've looked, there's no icon on the task bar. I've check through the +task manager and there's nothing there either. + + +> +>http://www.pythonware.com/library/tkinter/introduction/intro01.htm +>has some more information on the mainloop function. + + +I went to this site and typed in the example file (it was basically +the same one that I was trying to run). I still get nothing. + + +Any other suggestions? + +Thank you for trying to help , + +Tom + + + + + diff --git a/demo/ermis-f/python_m/cur/0227 b/demo/ermis-f/python_m/cur/0227 new file mode 100644 index 00000000..8fd7f7b6 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0227 @@ -0,0 +1,96 @@ +From: morse at harborcom.net (Kevin Dahlhausen) +Date: Thu, 22 Apr 1999 11:28:34 GMT +Subject: Controlling Linux serial port w/ Python ... - posixport.py (1/1) +References: <924762349.809295488@news.intergate.bc.ca> +Message-ID: <371f07e2.156646776@mail.oh.verio.com> +Content-Length: 5091 +X-UID: 227 + +begin 644 posixport.py +M:6UP;W)T(&]S"FEM<&]R="!F8VYT;"P at 1D-.5$P*:6UP;W)T('1E7=O2`M+2!P87)I='DN("!-=7-T(&)E(&]N92!O9CH* +M("`@("`@("`@("`@("`@("`@("`@(").;R(L(")/9&0B+"`B179E;B(L(")- +M87)K(BP@;W(@(E-P86-E(@H@("`@("`@("`@("!D871A3&5N("TM(&1A=&$@ +M;&5N9W1H("@U+3 at I"B`@("`@("`@("`@('-T;W!":71S("TM(",@;V8@2!F;W(@ +M=&AE(&]P=',N"@H@("`@("`@("`@("!+97EW;W)D(&%R9W5M96YT2!C;VYT86EN:6YG('1H92!F +M;VQL;W=I;F<@4U1224Y'4SH*("`@("`@("`@("`@("`@(%!O0H@("`@("`@("`@("`@("`@1&%T84QE;F=T:`H@("`@("`@("`@("`@ +M("`@4W1O<$)I=',*("`@("`@("`B(B(*("`@("`@("!I9B`H71H +M;VX@<&]S="`Q,B\R,R\Y-R`@("`*("`@("`@("`CPH@("`@("`@("`Q,3`Z5$52 +M34E/4RY",3$P+"`*("`@("`@("`@,3$U,C`P.E1%4DU)3U,N0C$Q-3(P,"P@ +M"B`@("`@("`@(#$R,#`Z5$5234E/4RY",3(P,"P@"B`@("`@("`@(#$S-#I4 +M15)-24]3+D(Q,S0L(`H@("`@("`@("`Q-3`Z5$5234E/4RY",34P+"`*("`@ +M("`@("`@,3 at P,#I415)-24]3+D(Q.#`P+"`*("`@("`@("`@,3DR,#`Z5$52 +M34E/4RY",3DR,#`L(`H@("`@("`@("`R,#`Z5$5234E/4RY",C`P+"`*("`@ +M("`@("`@,C,P-#`P.E1%4DU)3U,N0C(S,#0P,"P@"B`@("`@("`@(#(T,#`Z +M5$5234E/4RY",C0P,"P@"B`@("`@("`@(#,P,#I415)-24]3+D(S,#`L(`H@ +M("`@("`@("`S.#0P,#I415)-24]3+D(S.#0P,"P@"B`@("`@("`@(#0V,#@P +M,#I415)-24]3+D(T-C`X,#`L(`H@("`@("`@("`T.#`P.E1%4DU)3U,N0C0X +M,#`L(`H@("`@("`@("`U,#I415)-24]3+D(U,"P@"B`@("`@("`@(#4W-C`P +M.E1%4DU)3U,N0C4W-C`P+"`*("`@("`@("`@-C`P.E1%4DU)3U,N0C8P,"P@ +M"B`@("`@("`@(#7=O +Message-ID: <370594A2.E2571128@swcp.com> +X-UID: 228 + + +Martijn Faassen wrote: +... +> Python/Perl diplomatic relations Rob Malda of Slashdot let me run his +> site (www.slashdot.org) on this machine today too (in Zope), and it only + + +I thought Slashdot was running PHP! Or is that part of the joke? Zope is +cool. + +Alex + + + + diff --git a/demo/ermis-f/python_m/cur/0229 b/demo/ermis-f/python_m/cur/0229 new file mode 100644 index 00000000..60f266cc --- /dev/null +++ b/demo/ermis-f/python_m/cur/0229 @@ -0,0 +1,31 @@ +From: jwbaxter at olympus.net (John W. Baxter) +Date: Mon, 26 Apr 1999 14:32:57 -0700 +Subject: A bonus came with Learning Python +Message-ID: +X-UID: 229 + +Actually, it looked like a billing error until I recovered from the +"sticker shock." + +Folded into the book was a packing slip with invoice attached, for a large +amount* for 57 copies of Learning Python. + +Once I realized this was O'Reilly shipping to and invoicing Amazon.com, I +was amused rather than comatose. + +*I'm not saying *what* large amount, except to say that at that sort of +pricing in the industry, it seems odd that Amazon isn't making money. + +I haven't recovered enough even to skim...but a quick paging (with a stop +at "Files in action") leads me to say "Looks good, Mark...thanks!" + + --John + +-- +If nothing is pressing, putter about with this or that. + (Fortune cookie) +John W. Baxter Port Ludlow, WA USA jwb at olympus.net + + + + diff --git a/demo/ermis-f/python_m/cur/0230 b/demo/ermis-f/python_m/cur/0230 new file mode 100644 index 00000000..836cb92b --- /dev/null +++ b/demo/ermis-f/python_m/cur/0230 @@ -0,0 +1,62 @@ +From: schorsch at schorsch.com (Georg Mischler) +Date: Tue, 06 Apr 1999 16:35:14 GMT +Subject: Select weirdness on Solaris 2.4 +References: <199904011625.LAA28154@python.org> <199904011702.MAA06784@eric.cnri.reston.va.us> +Message-ID: <7edd41$5gi$1@nnrp1.dejanews.com> +Content-Length: 1741 +X-UID: 230 + +In article <199904011702.MAA06784 at eric.cnri.reston.va.us>, + Guido van Rossum wrote: +> Georg Mischler wrote: +> +> > So the question now turns away from asyncore and towards python +> > internals. Can anyone spot the crucial difference between the +> > following C (compiled with -lsocket -lnsl) and what python does +> > with the 6 lines from above? +> +> Here's another suggestion. Aren't there two socket implementations in +> Solaris? One SysV compatible and one BSD compatible? Does Python +> link with the same set of libraries as your little C program? + + +Thanks for all the suggestions from everybody. + +I finally gave up when I found the following in asyncore.py: + +if os.name == 'mac': + # The macintosh will select a listening socket for + # write if you let it. What might this mean? + def writable (self): + return not self.accepting + else: + def writable (self): + return 1 + +This showed me that the problem is not unique to my system, +and also pointed me to the solution. My derived class now +overwrites: + +def writable(self): + return not self.accepting + +Since I know that the dispatcher will never write anything +to any socket (why should it?), this is save and will end +my headaches. I still don't understand the behaviour of +select in this case, but I leave that to the socket experts +to ponder... + +as-long-as-it-works-don't-ask-why-ly yrs + +-schorsch + +-- +Georg Mischler -- simulation developper -- schorsch at schorsch.com ++schorsch.com+ -- lighting design tools -- http://www.schorsch.com/ + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/0231 b/demo/ermis-f/python_m/cur/0231 new file mode 100644 index 00000000..20d2d493 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0231 @@ -0,0 +1,43 @@ +From: tseaver at palladion.com (Tres Seaver) +Date: Wed, 07 Apr 1999 08:32:51 -0500 +Subject: GadFly - MemoryError +References: +Message-ID: <370B5E83.C796BFF3@palladion.com> +Content-Length: 1105 +X-UID: 231 + +Oleg Broytmann wrote: +> +> Hello! +> +> I tried to add yeat another database backend to my project "Bookmarks +> database". My database contains now about 3000 URLs, not too much, I think. +> I subclass by BookmarksParser to parse bookmarks.html into gadfly database +> and got a database of 500 Kbytes - very small database, I hope. +> Then I tried to find duplicates (there are duplicates). I ran the query: +> +> SELECT b1.rec_no, b2.rec_no, b1.URL +> FROM bookmarks b1, bookmarks b2 +> WHERE b1.URL = b2.URL +> AND b1.rec_no < b2.rec_no + +How many duplicates are there? Something like + + SELECT URL FROM bookmarks GROUP BY URL HAVING COUNT(*) > 1 + +will produce the URL's with duplicates; you could then do + + SELECT rec_no, URL FROM bookmarks + WHERE URL IN + (SELECT URL FROM bookmarks GROUP BY URL HAVING COUNT(*) > 1) + +or create a temp table first with the results of the subquery, then join it in a +separate query. +-- +========================================================= +Tres Seaver tseaver at palladion.com 713-523-6582 +Palladion Software http://www.palladion.com + + + + diff --git a/demo/ermis-f/python_m/cur/0232 b/demo/ermis-f/python_m/cur/0232 new file mode 100644 index 00000000..cd25cc7e --- /dev/null +++ b/demo/ermis-f/python_m/cur/0232 @@ -0,0 +1,51 @@ +From: m.mariani at imola.nettuno.it (Marco Mariani) +Date: Fri, 30 Apr 1999 00:01:41 GMT +Subject: while (a=b()) ... +Message-ID: <19990430000141.A5867@shalott> +X-UID: 232 + +Hi all language lawyers! + +Which one is more ugly? + + + +===== + +c = curs.fetchone() +while c: + print c + c = curs.fetchone() + +===== + +while 1: + c = curs.fetchone() + if c: + print c + else: + break + +===== + +Is there an elegant way? + + +while curs.fetchone() + print $_ + + +:-))) + + + +-- +"If you're going to kill someone there isn't much reason to get all worked + up about it and angry. Any discussions beforehand are a waste of time. + We need to smile at Novell while we pull the trigger." + + - Jim Allchin, Microsoft corp. - + + + + diff --git a/demo/ermis-f/python_m/cur/0233 b/demo/ermis-f/python_m/cur/0233 new file mode 100644 index 00000000..1f98b214 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0233 @@ -0,0 +1,25 @@ +From: ag_news at datamorgana.com (Anbjorn Grindheim) +Date: 16 Apr 1999 01:26:21 +0200 +Subject: what do you do with Python +References: <3714C9EA.86C0A4E@earthlink.net> +Message-ID: +X-UID: 233 + +* susan e paolini +| I never see jobs with Python advertised so what is it that Python does? + +It makes life happier! Besides turning repetive tasks to fully +automatic procedures when I administer web content at my need- +the-money-very-badly-since-i-am-a-student-job, it also has given several +special purpose applications to other employees wanting to lay out +content as well - applications written in no-time compared to other +programming languages. When I sooner or later leave the job, I bet +the job advertisment will say "Python" all over it :-) + + +-- +Anbjorn Grindheim + + + + diff --git a/demo/ermis-f/python_m/cur/0234 b/demo/ermis-f/python_m/cur/0234 new file mode 100644 index 00000000..696f8462 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0234 @@ -0,0 +1,23 @@ +From: morse at harborcom.net (Kevin Dahlhausen) +Date: Thu, 29 Apr 1999 11:58:57 GMT +Subject: Tags for Python +Message-ID: <37284922.3377336@news.oh.verio.com> +X-UID: 234 + +Someone emailed me a question about tags for Python. +Unfortunately, the message was accidently deleted before +I could reply. So, for whoever you are, here's a copy of +a previous post: + +> does it exist something like etags or ctags for python that allows to +> "tag-complete" python code in Emacs? +look in your python distribution at Tools/scripts/ptags.py +-- +Garry Hodgson comes a time +garry at sage.att.com when the blind man +Software Innovation Services takes your hand, says, +AT&T Labs "don't you see?" + + + + diff --git a/demo/ermis-f/python_m/cur/0235 b/demo/ermis-f/python_m/cur/0235 new file mode 100644 index 00000000..ef2b6e17 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0235 @@ -0,0 +1,40 @@ +From: liw at iki.fi (Lars Wirzenius) +Date: 13 Apr 1999 19:59:35 GMT +Subject: rfc822 date header +References: <37136310.62A6BE1A@rubic.com> +Message-ID: <7f07n7$7pqv$1@midnight.cs.hut.fi> +Content-Length: 1048 +X-UID: 235 + +jeffbauer at bigfoot.com: +> def strdate(self, timeval=None): +> from time import gmtime, strftime, time +> if timeval is None: +> timeval = time() +> return "Date: %s" % strftime('%a, %d %b %Y %H:%M:%S GMT', +> gmtime(timeval)) + +Here's what I wrote for Slime (thhe mailer I'm writing): + + def _date_header(self): + """Return Date header reflecting current time.""" + # XXX this should probably communicate the local time zone + # somehow + t = time.gmtime(time.time()) + return "Date: %s, %02d %s %04d %02d:%02d:%02d GMT\n" % \ + (rfc822._daynames[t[6]], + t[2], + rfc822._monthnames[t[1]], + t[0], + t[3], + t[4], + t[5]) + +Note that it isn't locale dependent. + +(I apologize for the bad indentation of a whole tab, I haven't got around +to implementing proper indentation support in my editor.) + + + + diff --git a/demo/ermis-f/python_m/cur/0236 b/demo/ermis-f/python_m/cur/0236 new file mode 100644 index 00000000..e6ec3784 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0236 @@ -0,0 +1,34 @@ +From: chadm at sgi.com (Chad McDaniel) +Date: 22 Apr 1999 10:24:48 -0700 +Subject: New python user seeks comments +References: <371DA955.9F13B144@pop.vet.uu.nl> <371E2DEE.C2BD5A58@pop.vet.uu.nl> +Message-ID: +X-UID: 236 + +Martijn Faassen writes: + +> Chad McDaniel wrote: +> +> ['in' is a reserved word so can't be used as a variable name] +> +> > It seems that Python could have mentioned that to the user. +> +> True, though it does say this: +> +> File "", line 2 +> in = open("test.txt", "r") +> ^ +> SyntaxError: invalid syntax +> +> Could be better, but easily could've been far worse.. + +I used Perl (and still do) before Python and I think that the Perl +interpreter gives exceptionally informative error messages. Of course, +with Perl's syntax, that may be a necessity ;-> + +-- +-chad + + + + diff --git a/demo/ermis-f/python_m/cur/0237 b/demo/ermis-f/python_m/cur/0237 new file mode 100644 index 00000000..deb9eb6c --- /dev/null +++ b/demo/ermis-f/python_m/cur/0237 @@ -0,0 +1,60 @@ +From: aa8vb at vislab.epa.gov (Randall Hopper) +Date: Wed, 14 Apr 1999 15:01:16 GMT +Subject: 1.5.2 broke IRIX module loading +Message-ID: <19990414110116.A1374923@vislab.epa.gov> +Content-Length: 1929 +X-UID: 237 + + I built and tried 1.5.2 this morning, and it failed to load a module +that worked fine on 1.5.1. See below for the errors. + + This is a C library I don't have source for which has references to a +number of zeroed-out internal symbols which aren't used. In this case (see +errors), "currstepc" is the exported C interface wrapper, and "currstep" is +the internal FORTRAN routine which has been zeroed-out. + + To convince Python to load this again, I found I had to reverse one of +the 1.5.1 changes to importdl.c (patch attached). I believe this news post +describes the problem I'm running into: + + http://www.dejanews.com/[ST_rn=ps]/getdoc.xp?AN=289722207 + +Could we consider reversing this change to importdl.c in the Python dist? + +Randall + +------------------------------------------------------------------------------- + +> python +Python 1.5.2 (#1, Apr 14 1999, 08:42:47) [C] on irix646-o32 +Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam +>>> import Util +Traceback (innermost last): + File "", line 1, in ? + File "Util.py", line 2, in ? + import Utilc +ImportError: 1380391:python-o32: rld: Fatal Error: unresolvable symbol in /home/rhh/work/libUtil.so: currstep + +------------------------------------------------------------------------------- + +> nm -Bo libUtil.so | grep currstep +libModels3.so: 5ffccda0 B currstep +libModels3.so: 5fe1e6c0 T currstep_ +libModels3.so: 5fe1e880 T currstepc + +------------------------------------------------------------------------------- + +-------------- next part -------------- +--- Python/ORIG/importdl.c Wed Jan 27 12:53:10 1999 ++++ Python/importdl.c Wed Apr 14 10:41:40 1999 +@@ -441,7 +441,7 @@ + #ifdef RTLD_NOW + /* RTLD_NOW: resolve externals now + (i.e. core dump now if some are missing) */ +- void *handle = dlopen(pathname, RTLD_NOW); ++ void *handle = dlopen(pathname, RTLD_NOW | RTLD_GLOBAL); + #else + void *handle; + if (Py_VerboseFlag) + + diff --git a/demo/ermis-f/python_m/cur/0238 b/demo/ermis-f/python_m/cur/0238 new file mode 100644 index 00000000..25675f77 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0238 @@ -0,0 +1,51 @@ +From: faassen at pop.vet.uu.nl (Martijn Faassen) +Date: Thu, 29 Apr 1999 12:18:26 +0200 +Subject: Maximize Benefit when Purchasing Learning Python +References: <9FJV2.153$pX2.88806@news.shore.net> <37277454.19DE2FDB@callware.com> +Message-ID: <372831F2.E9200A15@pop.vet.uu.nl> +Content-Length: 1283 +X-UID: 238 + +Ivan Van Laningham wrote: +> +> Hi All-- +> +> "Michael P. Reilly" wrote: +> > +> > David Ascher wrote: +> > : On Wed, 28 Apr 1999 jkraai at murl.com wrote: +> > +> > :> How can I help whom when purchasing Python books? +> > +> > : I'll dare to speak for Mark, and say that you should feel free to send +> > : either Mark or I (or both) checks for any amount whatsoever. Skip the +> > : middleman. Save trees -- don't buy the book, just send us cash. Don't +> > : hesitate for a minute. +> > +> > Better yet. Secure web credit-card transfers? Saves the paper from the +> > envelopes and checks/bills. ;) +> > +> > -Arcege +> +> People wonder what attracts me to Python. I claim it's the genteel +> comportment, sophisticated manner, and air of refined ennui projected by +> the participants in the online discussion. +> +> -ly y'rs, +> Ivan + +I hereby wish to say you people are welcome to send me checks and money +and stuff too. I don't care so much about trees as you all do +apparently, so free books are welcome as well. :) + +But, you might say, Martijn, you haven't done a thing that makes me want +to send you money and gifts! Well, this is no problem -- you can send +them to me anyway. + +I-love-this-newsgroup-ly yours, + +Martijn + + + + diff --git a/demo/ermis-f/python_m/cur/0239 b/demo/ermis-f/python_m/cur/0239 new file mode 100644 index 00000000..b8ca7d0b --- /dev/null +++ b/demo/ermis-f/python_m/cur/0239 @@ -0,0 +1,300 @@ +From: scott at chronis.pobox.com (scott cotton) +Date: 15 Apr 1999 00:59:12 GMT +Subject: reval builtin +References: <19990331160323.21601.00000471@ng-fi1.aol.com> <7du3ab$3ag@chronicle.concentric.net> <371219E9.9EA91839@home.com> <7f36m6$koq@ds2.acs.ucalgary.ca> +Message-ID: +Content-Length: 9922 +X-UID: 239 + +here's another config file utility. i know that some +pythoners won't like this, but it uses shell-like +'$variable' expansion. i personally like this interpolation +syntax in config files (but not in programming languages). + +enjoy, + +scott + +""" +Utilities for reading config files. + +functions: + readcf(path) - return a dict containing the vars and vals + readtxt(txt) - same as above but for text instead of file + dict2cf(dict, templ=None) - see function doc string +""" + + +import string + +class SyntaxErrorCF(StandardError): + def __init__(self, *args): + self.args = args + +# +# "eval" for config files +# given the rhs of an assignment as plain text, +# figure out what it's python native value is. +# +def figger(rhs): + rhs = string.strip(rhs) + if rhs == "None": + return None + elif rhs == 'yes' or rhs == 'on': # boolean + return 1 + elif rhs == 'no' or rhs == 'off': # more booleans + return 0 + elif len(rhs) >= 6 and rhs[:3] in ('"""', "'''") \ + and rhs[:3] == rhs[-3:]:# TQS + return rhs[3:-3] + elif rhs[0] in ("'", '"') and rhs[0] == rhs[-1]: # plain string + return rhs[1:-1] + elif rhs[0] == '[' and rhs[-1] == ']': # list (of strings only) + list = [] + inner = rhs[1:-1] + for s in string.split(inner, ","): # items in the list + s = string.strip(s) + if not s: + continue + if s == '""' or s == "''": # empty string + list.append("") + elif len(s) >= 6 \ + and s[:3] in ('"""', "'''") \ + and s[-3:] == s[:3]: # triple quoted string + list.append(s[3:-3]) + elif s[0] in ("'", '"') and s[0] == s[-1]: # regular string + list.append(s[1:-1]) + # since lists can only be lists of strings, we allow bare words + else: + list.append(s) + return list + else: # the only remaining value is an int. + try: + return string.atoi(rhs) + except ValueError: # oh well, the var get's None. + return rhs + +# +# return a dict containing non variable substituted key-values +# from the text of a config file. +# +def getassignments(text): + linect = 0 + assgns = {} + var = None + check_tqs = 0 # is it a triple quoted string? + text = string.replace(text, "\\\n", "") + for line in string.split(text, "\n"): + stripped = string.strip(line) + linect = linect + 1 + if check_tqs: # check for the end of a triple quoted string + rhs = rhs + "\n" + line + if len(stripped) >= 3 and stripped[-3:] == check_tqs: + # the variable check_tqs contains either ''' or """ as + # a string literal. + assgns[var] = figger(rhs) + var, rhs = None, None + check_tqs = 0 + elif not stripped or stripped[0] == '#': + # we try to wrap everything we know up from a previous assignment + if var is not None and rhs is not None: + if not string.strip(rhs): + raise SyntaxErrorCF(linect -1, "%s = " % (var)) + assgns[var] = figger(rhs) + # reinitialize the variables. + rhs = None + var = None + continue + elif line[0] not in " \t": + if var is not None and rhs is not None: + if not string.strip(rhs): + raise SyntaxErrorCF(linect -1, "%s = " % (var)) + assgns[var] = figger(rhs) + var, rhs = None, None + if string.find(line, "=") == -1: # not an assignment + raise SyntaxErrorCF(linect, line) + lhs, rhs = string.split(line, "=", 1) + var = string.strip(lhs) + if len(string.strip(rhs)) >= 3 \ + and string.strip(rhs)[:3] in ('"""', "'''"): + check_tqs = string.strip(rhs)[:3] + var = string.strip(lhs) + else: + if var is None: + raise SyntaxErrorCF(linect, line) + rhs = rhs + " " + line + # here we just wrap up what we found out iterating over the + # lines in the text one last time. + if var is not None and rhs is not None: + if not string.strip(rhs): + raise SyntaxErrorCF(linect -1, "%s = " % (var)) + assgns[var] = figger(rhs) + return assgns + +# +# globally replace variables with values (eg $prefix) +# +def global_replace(text, dict): + for k, v in dict.items(): + text = string.replace(text, '$' + k, v) + return text + +# +# replace variables defined earlier in a config file +# +def internal_replace(dict, replacements): + for var, rvars in replacements.items(): + for rvar in rvars: + cval = dict[var] + if type(cval) is type([]): + l = [] + for s in cval: + l.append(string.replace(s, '$' + rvar, dict[rvar])) + dict[var] = l + elif type(cval) is type(""): + dict[var] = string.replace(cval, '$' + rvar, dict[rvar]) + return dict + + +# +# top level function +# +def readcf(file, global_repl=None, int_repl=None): + """ + given a path to a file, and any replacements that need to + be made, return a dictionary containing the variables + in the config file as keys and the values as values. + """ + text = open(file).read() + text = string.replace(text, "\\\n", "") # get rid of \ cont'd lines + if global_repl is not None: + text = global_replace(text, global_repl) + d = getassignments(text) + if int_repl is not None: + d = internal_replace(d, int_repl) + return d + + +def readtxt(txt, global_repl=None, int_repl=None): + """ + reads the text of a cf file into a dict and return the dict. + """ + txt = string.replace(txt, "\\\n", "") + if global_repl is not None: + txt = global_replace(txt, global_repl) + d = getassignments(text) + if int_repl is not None: + d = internal_replace(d, int_repl) + return d + + +def dict2cf(dict, templ=None): + """ + given a dictionary keyed by the configuration variables + and whose values are a 3-tuple of (var-value, descr, vtype) + where vtype is one of 'str', 'int', 'bool' or 'list', return + text suitable for writing a config file. If optional second arg + 'templ' is passed, then transpose the values to the template, + which should be a string with 1 %()s entry per variable + """ + txtdict = {} + for k, (val, vtype, descr) in dict.items(): + valstr = "" + descr = string.rstrip(descr) + entry = descr + "\n#\n" + k + " = " + if vtype == "str": + if string.find(val, "\n") != -1: + valstr = '"""\\\n' + val + '"""' + elif string.find(val, '"') != -1: + valstr = "'" + val + "'" + else: + valstr = '"' + val + '"' + elif vtype == "bool": + if val: + valstr = "yes" + else: + valstr = "no" + elif vtype == "int": + valstr = "%d" % (val) + elif vtype == "list": + if not val: + valstr = "[]" + else: + spaces = " " * (len(k) + 4) + valstr = "[" + for item in val: + if string.find(item, "\n") != -1: + valstr = "%s%s%s%s,\n%s" % (valstr, + '"""\\\n', + item, + '"""', + spaces) + elif string.find(item, '"') != -1: + valstr = "%s%s%s%s,\n%s" % (valstr, + "'", + item, + "'", + spaces) + else: + valstr = "%s%s%s%s,\n%s" % (valstr, + '"', + item, + '"', + spaces) + valstr = valstr[:-2 - len(spaces)] + "]" + else: + print "weird:", k, val, descr, vtype + valstr = valstr + "\n\n" + txtdict[k] = entry + valstr + if templ: + return templ % txtdict + else: + vars = txtdict.keys() + vars.sort() + res = "" + for v in vars: + res = res + txtdict[v] + return res + + + + + + + + + + + + + + +On 14 Apr 1999 23:00:22 GMT, wrote: +>On Mon, 12 Apr 1999 15:59:05 GMT, Jim Meier wrote: +>>This introduces some major security problems, and is a little difficult +>>to edit, but there is very little parsing needed to make it usable. Does +>>anyone know of a way to limit the damage a user can do to such a file? +> +>It would be nice to have an "reval" builtin that would only evaluate +>literals. That would make building things like config files safe and +>easy. I have two ideas on how to accomplish this: +> +> 1. Create a new start symbol "reval_input" in the Grammar/Grammar +> and add a "builtin_reval" function in Python/bltinmodule.c. Sound +> easy? Well, the connection between these two changes is long and +> twisted. +> +> 2. Use something like lex and yacc to create an extension module +> that does the Right Thing(TM). I think the problem with this +> approach is making it conform to the real Python grammar. If I +> get time I will try it. +> +>Perhaps some guru can explain an easy way to accomplish this and same me +>some time. +> +> +> Neil + + + + diff --git a/demo/ermis-f/python_m/cur/0240 b/demo/ermis-f/python_m/cur/0240 new file mode 100644 index 00000000..beba7287 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0240 @@ -0,0 +1,39 @@ +From: paranoid at mnet.com.null (Paranoid User) +Date: Sat, 10 Apr 1999 13:46:47 -0700 +Subject: Python 2.0 compatibility +Message-ID: +Content-Length: 1054 +X-UID: 240 + +Hello, + +We have selected Python as the scripting language for the next generation of +one of our embedded systems. This is a very fast-track project scheduled to +ship near the end of the first quarter of 2000. + +I ran across a quote that said something to the effect that Python 2 will be +incompatible with Python 1. Before I make a decision as to whether we +freeze with Python 1.5.2, or migrate to Python 2 when it is released, I need +to find out the extent of truthfulness in the "quote". + +So, if anyone in-the-know about Python 2 could let me know the proposed +extent of its compatibility with 1.5.2 I would really appreciate it. + +Sorry for the obscured reply address. I get spam from addresses I haven't +used for 10 years. 8-( + +-------- +Daryl V. McDaniel darylm @ viper.mnet.com +Micronetics + (503) 621-0234 Aloha Research +Group + Portland, Oregon +USA + "Aloha Research Group", "Mnet", and "mnet" are trademarks of Micronetics + + + + + + + diff --git a/demo/ermis-f/python_m/cur/0241 b/demo/ermis-f/python_m/cur/0241 new file mode 100644 index 00000000..beeccd90 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0241 @@ -0,0 +1,41 @@ +From: calishar at *remove*this*.home.com (Calishar) +Date: Tue, 13 Apr 1999 23:59:49 GMT +Subject: Freezing an App +Message-ID: +Content-Length: 1269 +X-UID: 241 + +Hi Folks, + + Sorry to ask what must be a fairly frequently asked question by now, but I +am having problems freezing an app. + + It uses Tkinter and win32all (the win32api and win32con modules +spcifically). I did a freeze on it this morning, and took it into my client +site, and after about 3 hours of bashing away at the situation, I managed to +get part of the app to work properly. + + The part I am having problems with is using win32api. It runs, doesnt set +the registry values it is suppoed to, and exits without giving any errors. + + Could some kind soul please email me (or reply to group is fine) +step-by-step instructions for freezing a win32api program. Ideally also +telling me how I can freeze the tkinter part wqithout needing the init.tcl, +tk.tcl, and component .tcl files (like button.tcl). I am not a c/c++ +programmer, so working in VC++ 5.0 is VERY strange to me, although I can +probably follow instructions. I'm not a total dummy, but when it comes to +having to build python + tkinter + win32all for windows I feel like it. I +had less problems building things for linux after using it for 3 hours. + +THanks in advance for whatever help you can give me, + +Calishar + +P.s. My E-mail address is munged to mess up spam machines, the fix should +be obvious. + + + + + + diff --git a/demo/ermis-f/python_m/cur/0242 b/demo/ermis-f/python_m/cur/0242 new file mode 100644 index 00000000..3505090b --- /dev/null +++ b/demo/ermis-f/python_m/cur/0242 @@ -0,0 +1,29 @@ +From: Michael.Scharf at gmx.de (Michael Scharf) +Date: Thu, 15 Apr 1999 21:08:14 +0200 +Subject: Is there a 'make' replacement written in python ? +References: +Message-ID: <3716391E.954DDCDD@gmx.de> +X-UID: 242 + +Markus Kohler wrote: +> +> I'm looking for a replacement for the 'make' command +> similiar to Cons : +> Therefore something like Cons written in python would be really cool. + +Some years ago, Samuel L. Bayer posted a pymake. +Unfortunately, dejanews does not keep the uuencoded +file, but maybe someone has it... + + http://www.dejanews.com/getdoc.xp?AN=296444432 + +Michael +-- + ''''\ Michael Scharf + ` c-@@ TakeFive Software + ` > http://www.TakeFive.com + \_ V mailto:Michael_Scharf at TakeFive.co.at + + + + diff --git a/demo/ermis-f/python_m/cur/0243 b/demo/ermis-f/python_m/cur/0243 new file mode 100644 index 00000000..cfeb9c31 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0243 @@ -0,0 +1,46 @@ +From: robin at jessikat.demon.co.uk (Robin Becker) +Date: Wed, 14 Apr 1999 02:00:26 +0100 +Subject: site.py & COM startup +References: + <7f0kin$ben$1@m2.c2.telstra-mm.net.au> +Message-ID: +Content-Length: 1308 +X-UID: 243 + +In article <7f0kin$ben$1 at m2.c2.telstra-mm.net.au>, Mark Hammond + writes +>Robin Becker wrote in message ... +>>using Mark Hammond's win32com for a server I find that the installation +>path is not +>>automatically in sys.path so my base .pth files are missed and I get +>troubles. +>> +>>I hacked site.py to fix this using the fact that sys.prefix == '' when +>running a com +>>server (I guess inproc). +> +>It is indeed when run as an inproc. The problem is that Python uses the +>current executable to try and deduce the Python home. When Python is being +>used as a COM server, the host executable could be _anything_, and therefore +>cant be used to locate the Python home. +> +>So, I would like to fix this once and for all in the COM stuff, but I cant +>work out a reasonable strategy for locating the Python home. +> +>Also, FYI: As of build 124 and later of my extensions, when you register a +>COM object its path is now also automatically saved away, and automatically +>used as the object is created - thus, no more errors due to your COM object +>not being on the PythonPath... +> +>Mark. +> +> +so the com module itself will be known, but things it might be using +aren't guaranteed if they're in the standard locations. Site.py is +supposed to be in $PYTHONHOME/Lib. +-- +Robin Becker + + + + diff --git a/demo/ermis-f/python_m/cur/0244 b/demo/ermis-f/python_m/cur/0244 new file mode 100644 index 00000000..c97258f9 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0244 @@ -0,0 +1,29 @@ +From: arcege at shore.net (Michael P. Reilly) +Date: Wed, 21 Apr 1999 12:17:24 GMT +Subject: New python user seeks comments +References: <371db9cb.5622314@news.omnilink.de> +Message-ID: +X-UID: 244 + +Stefan Franke wrote: +: On 21 Apr 1999 00:33:10 -0400, David Steuber wrote: + +:>Er, uh, hmm. +:> +:>I wrote my first Python program today. It took longer than I +:>expected. Who would have guessed that you couldn't give a file object +:>the name 'in'? Or at least that was one of the weirder obstacles. + +: Maybe a reserved keyword-aware editor could have saved you +: from this? You could try IDLE, which comes with the lastest Python +: distribution or PythonWin, if you are using Windows. +: There's a very clever Python Emacs mode as well... + +And syntax highlighting for Python in vim (Vi IMproved). + + -Arcege + + + + + diff --git a/demo/ermis-f/python_m/cur/0245 b/demo/ermis-f/python_m/cur/0245 new file mode 100644 index 00000000..1c465453 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0245 @@ -0,0 +1,52 @@ +From: wtanksle at dolphin.openprojects.net (William Tanksley) +Date: Wed, 28 Apr 1999 17:54:02 GMT +Subject: Python IS slow ! [was] Re: Python too slow for real world +References: <613145F79272D211914B0020AFF6401914DAD8@gandalf.digicool.com> +Message-ID: +Content-Length: 1583 +X-UID: 245 + +On 28 Apr 1999 09:57:18 +0200, Markus Kohler wrote: +>>>>>> "Brian" == Brian Lloyd writes: +>[deltia] + +> Brian> Arne, + +>Python would be appropriate for much more problems if it would only be as fast +>as other scripting languages. The bytecode interpreter IS significantly slower +>than other byte code interpreted languages. Since we all know that python +>is more productive than most other languages, this becomes sooner or later an +>issue because one would not be able some tasks in python because it is just +>to slow. + +Your data is correct (Python is slow for many things, slower than it needs +to be), but your conclusion is wrong. Python isn't slow because its +bytecode engine is slow; actually, although there's a lot of room for +improvement, its bytecode engine is faster than many of the others out +there. + +The reason it's slow is its runtime model. _Every_ function call requires +a lookup in a hash table, just on the off-chance that the programmer +changed the meaning of the function. + +>It seems to me that without a redesign of at least the bytecode for +>function calls python's speed will not take off. + +Bytecode won't help enough -- the whole calling model needs to be +examined. Fortunately, that's one of the things the 2.0 design process +will be looking at. Like you, I hope that they consider Smalltalk as an +example. + +And Oberon (SlimBinaries), and Eiffel (typing and general compile-time +error catching), and ... + +>Markus + +-- +-William "Billy" Tanksley +"But you shall not escape my iambics." + -- Gaius Valerius Catullus + + + + diff --git a/demo/ermis-f/python_m/cur/0246 b/demo/ermis-f/python_m/cur/0246 new file mode 100644 index 00000000..183b2c18 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0246 @@ -0,0 +1,31 @@ +From: akuchlin at cnri.reston.va.us (Andrew M. Kuchling) +Date: Thu, 29 Apr 1999 12:12:05 -0400 (EDT) +Subject: Python and CGI +In-Reply-To: <37286538.5EAE0173@lemburg.com> +References: <37286538.5EAE0173@lemburg.com> +Message-ID: <14120.33118.681723.27557@amarok.cnri.reston.va.us> +X-UID: 246 + +M.-A. Lemburg writes: +>Although there were a number of hits on the web-page, I'm not +>sure whether the announcement got the message through... this +>is intended to be a campaign with the goal of promoting Python +>as CGI engine. + + I think a critical thing that's missing for CGI newbies is a +collection of example Python scripts, and a CGI HOWTO. Look at +www.cgi-resources.com for some ideas; it would be quite helpful to +newbies if there were example Python scripts that acted as hit +counters, guestbooks, mailers, etc. + +-- +A.M. Kuchling http://starship.python.net/crew/amk/ +Information is not knowledge. Knowledge is not wisdom. Wisdom is not truth. +Truth is not beauty. Beauty is not love. Love is not music. Music is the +*best!* + -- Frank Zappa, _Joe's Garage_ + + + + + diff --git a/demo/ermis-f/python_m/cur/0247 b/demo/ermis-f/python_m/cur/0247 new file mode 100644 index 00000000..800640eb --- /dev/null +++ b/demo/ermis-f/python_m/cur/0247 @@ -0,0 +1,59 @@ +From: tim_one at email.msn.com (Tim Peters) +Date: Tue, 6 Apr 1999 01:06:45 GMT +Subject: Possible regex match bug (re module) +In-Reply-To: <19990405084819.B802985@vislab.epa.gov> +References: <19990405084819.B802985@vislab.epa.gov> +Message-ID: <000001be7fc9$bdb0fec0$65a22299@tim> +Content-Length: 1550 +X-UID: 247 + +[Randall Hopper] +> Re doesn't handle named groups in alternative patterns like it +> seems it should. Given an alternative pattern with a particular group +> name in each, it only assigns the match if the group name matches the +> last alterative. + +re should raise an exception here -- it never intended to allow your +pattern. The deal is that symbolic group names are no more than that: +names for numbered groups. Like so: + +>>> import re +>>> p = re.compile('(---(?P[^-]*)---)|(===(?P[^=]*)===)') +>>> p.groupindex +{'id': 4} +>>> + +The groupindex member maps a symbolic name to the numeric group for which +it's an alias, and so in this pattern referring to group "id" is identical +to referring to group number 4. That explains everything you've seen. re +should instead notice that it already had a definition for name "id", and +complain about the redefinition. + +Same as in Perl, you're going to have to write a hairier regexp with only +one interesting group, or give the interesting groups different names and +sort them out after the match (in an alternation involving named groups, at +most one will be non-None after a match). Here's a discouraging +example of the former approach: + +>>> p = re.compile(r"([-=])\1\1(?P((?!\1).)*)\1\1\1").match +>>> p("---abc---").group("id") +'abc' +>>> p("===def===").group("id") +'def' +>>> print p("===ghi---") +None +>>> p("------").group("id") +'' +>>> p("---=---").group("id") +'=' +>>> print p("===a=b===") +None +>>> + +if-regexps-are-your-friends-you'd-hate-to-meet-your-enemies-ly y'rs - tim + + + + + + diff --git a/demo/ermis-f/python_m/cur/0248 b/demo/ermis-f/python_m/cur/0248 new file mode 100644 index 00000000..0b9e1162 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0248 @@ -0,0 +1,36 @@ +From: aa8vb at vislab.epa.gov (Randall Hopper) +Date: Tue, 6 Apr 1999 14:34:12 GMT +Subject: SWIG, Modulator, BGEN, etc. - which? (Re: swig or not to swig ?) +In-Reply-To: <3709f149.2262513@news.oh.verio.com>; from Kevin Dahlhausen on Tue, Apr 06, 1999 at 11:39:03AM +0000 +References: <4p6O2.1348$8m5.2126@newsr1.twcny.rr.com> <3709f149.2262513@news.oh.verio.com> +Message-ID: <19990406103412.A869943@vislab.epa.gov> +X-UID: 248 + +"Darrell" : + |Didn't have much luck with bgen. + |modulator seems handy, Is there a reason to prefer swig ? + +I'm also interested in what wrapping options folks like best. +Roll-your-own, SWIG, Modulator, BGEN? (Do others not listed exist for UNIX?) + +I'm primarily thinking in terms of both ease of definition and maintenance. +With maintenance, I have in mine: + + 1) automatically updating the wrapper "guts" most of the time, and + + 2) ideally providing some facility to "flag" wrapper functions whose + signatures have changed. + +The latter point is intended to be a work queue for a human operator to act +on. That is, for them to update the all the scripting code which uses +functions/symbols whose signatures have changed (a substitute for compiling +and linking, since our script isn't compiled and linked with the wrapped +code). + +Any pointers or insights appreciated, + +Randall + + + + diff --git a/demo/ermis-f/python_m/cur/0249 b/demo/ermis-f/python_m/cur/0249 new file mode 100644 index 00000000..aef73baf --- /dev/null +++ b/demo/ermis-f/python_m/cur/0249 @@ -0,0 +1,42 @@ +From: jam at newimage.com (jam) +Date: Mon, 26 Apr 1999 16:30:14 -0400 +Subject: help +In-Reply-To: ; from Stone Cold on Mon, Apr 26, 1999 at 07:18:13PM +0000 +References: +Message-ID: <19990426163014.B20207@toast.internal> +Content-Length: 1173 +X-UID: 249 + +On Mon, Apr 26, 1999 at 07:18:13PM +0000, Stone Cold wrote: +> +> I just got python and I need some help getting started. I have no +> programing knowlodge yet but I want to know all the languges. can someone +> help? +> + +greetings and welcome to python! + +I would suggest having a look at for +pointers on where to start.. also check out the online versions of the +documentation (so you can read it before printing it out on paper) located +at . + +python will run on linux, other unix-like platforms, and win32. it has a +reasonable liscense, source code is available, it is easily extensible in C +or C++, and is a top notch 'glue' language. the semantics of the language +are *very* clean and elegant, making it a snap to learn. it has been +described as 'executable pseudo code', and it lives up to that reputation. + +I don't want to sound like a bad commercial, but python is really and truly +very very cool and a lot of fun to work with. + +regards, +J +-- +|| visit gfd +|| psa member #293 +|| New Image Systems & Services, Inc. + + + + diff --git a/demo/ermis-f/python_m/cur/0250 b/demo/ermis-f/python_m/cur/0250 new file mode 100644 index 00000000..e6c92c53 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0250 @@ -0,0 +1,33 @@ +From: jody at ldgo.columbia.edu (Jody Winston) +Date: 08 Apr 1999 10:19:36 -0400 +Subject: Chaning instance methods +References: <370C2904.A6F4BD54@inrialpes.fr> <000801be8188$b59aa9a0$749e2299@tim> <370CC27E.ED2D0D59@inrialpes.fr> +Message-ID: +X-UID: 250 + +What I was trying to do was to dynamically change the runtime behavior of an +object instance by loading the new methods from a permanent store. Since this +wasn't easy to do, I now just save off all of the attributes, kill the +old object, create a new object, and restore the attributes. + +This works, but it doesn't seem to be as elegant as having the ability +to replace methods. + +-- +Jody Winston +Manager SeisRes +Lamont-Doherty Earth Observatory +RT 9W, Palisades, NY 10964 +jody at ldeo.columbia.edu, 914 365 8526, Fax 914 359 1631 + +Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email +address may not be added to any commercial mail list with out my +permission. Violation of my privacy with advertising or SPAM will +result in a suit for a MINIMUM of $500 damages/incident, $1500 for +repeats. + + + + + + diff --git a/demo/ermis-f/python_m/cur/0251 b/demo/ermis-f/python_m/cur/0251 new file mode 100644 index 00000000..025e1ac1 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0251 @@ -0,0 +1,76 @@ +From: pduffin at mailserver.hursley.ibm.com (Paul Duffin) +Date: Wed, 28 Apr 1999 11:07:21 +0100 +Subject: WARNING: AIX and dynamic loading. +References: <7g4i77$qif$1@nnrp1.dejanews.com> +Message-ID: <3726DDD9.19A1@mailserver.hursley.ibm.com> +Content-Length: 2644 +X-UID: 251 + +Jakob Schiotz wrote: +> +> Hi everybody, +> +> I would like to warn developers using AIX against this trap waiting +> for us to fall into. (I am cross-posting this to the SWIG mailing list +> although it is not strictly a SWIG problems, as SWIG users will be +> doing just the kind of stuff that gets you into trouble). +> +> SCENARIO: +> You are developing a dynamically loaded C module for Python (or +> possibly for other languages). You place the module in a directory on +> the PYTHONPATH. That directory is NFS mounted. Or you are loading +> the module directly from the directory where you compiled it, and that +> directory is NFS mounted. +> +> SYMPTOMS: +> You are improving the code, but it does not seem to have any effect at +> all. Eventually you realise that Python is loading the buggy version +> of your module that you tried out this morning, although _all_ copies +> on disk are the new improved version you just wrote ! +> +> PROBLEM: +> If you copy the module to the PYTHONPATH directory using cp, the old +> file gets overwritten, but keeps the same inode number. Apparently, +> the AIX dynamical loader is caching the module somewhere, and does not +> discover that the file has been modified. (If the directory is not NFS +> mounted cp will fail with an error message saying that you cannot +> overwrite a running program - although the program has stopped.) +> +> It is _possible_ that this only occurs if the module you wrote causes +> python to dump core. It certainly makes it frustrating to fix the +> bug as you continue to get the version that dumps core loaded into +> python, even after you fixed the bug. +> + +I found this problem when developing extensions for Tcl, my solution +was to run slibclean (as root) which removes all unused modules from the +system. + +> SOLUTION: +> You makefile should remove the old module (the .so file) before copying the +> new version into the installation directory. Then the file gets a new +> inode number and the loader discovers that it has been changed. If +> you ever load the module directly from the development directory you +> should also remove the .so file before compiling/linking, as you will +> otherwise get hit by the same bug. +> + +That is very useful, as I had a solution I did not bother to find out +what was happening. + +> I just wanted to warn you all about this bug in AIX. I wasted too much time +> on this last Friday :-( +> + +AIX should definitely look at the modification date as well as the +inode. + +-- +Paul Duffin +DT/6000 Development Email: pduffin at hursley.ibm.com +IBM UK Laboratories Ltd., Hursley Park nr. Winchester +Internal: 7-246880 International: +44 1962-816880 + + + + diff --git a/demo/ermis-f/python_m/cur/0252 b/demo/ermis-f/python_m/cur/0252 new file mode 100644 index 00000000..550e2318 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0252 @@ -0,0 +1,36 @@ +From: radbit at my-dejanews.com (radbit at my-dejanews.com) +Date: Wed, 28 Apr 1999 01:10:16 GMT +Subject: RE's in Python syntax +References: <372068E6.16A4A90@icrf.icnet.uk> <3720A21B.9C62DDB9@icrf.icnet.uk> <3720C4DB.7FCF2AE@appliedbiometrics.com> <3720C6EE.33CA6494@appliedbiometrics.com> <37215EFB.433AFCA6@prescod.net> <3724B2D6.B468687A@prescod.net> <37252816.42634501@Lugoj.Com> <3725F91D.4F9D6373@prescod.net> +Message-ID: <7g5n5m$tg7$1@nnrp1.dejanews.com> +Content-Length: 1121 +X-UID: 252 + +In article <3725F91D.4F9D6373 at prescod.net>, + Paul Prescod wrote: +> Roy Smith wrote: +> > +> > The thread was moving in the direction of "my program using regex is too +> > slow, and I think the solution would be to move regex into the python core +> > to make it faster". I was just pointing out why that is flawed reasoning. +> +> But it isn't flawed reasoning. There are many arguments for moving +> something into the core and many arguments for keeping something OUT of +> the core, and "performance in the hands of a newbie" strikes me as a valid +> argument for inclusion. Simplicity of expression is another. +> +hear, hear - my thinking exactly - Python is a great language to code in +and like in all languages algorithms matter when you're looking for speed +and efficiency. On the other hand if Python can offer better support (in terms +of speed and efficiency) both newbies and experienced programmers will benefit + +Cheers +-- +Florent Heyworth + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/0253 b/demo/ermis-f/python_m/cur/0253 new file mode 100644 index 00000000..6b2156b5 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0253 @@ -0,0 +1,51 @@ +From: herzog at online.de (Bernhard Herzog) +Date: 11 Apr 1999 14:40:26 +0200 +Subject: _tkinter.c, threads and C-modules in 1.5.2 +Message-ID: +Content-Length: 1662 +X-UID: 253 + + +A few weeks ago, there was a bug report on c.l.py regarding an +incompatibility between Sketch and Python 1.5.2b2 on Linux/glibc2. It +seems to me that the cause for the problems is the new Tcl-lock in +1.5.2. + +The tcl-lock was introduced for better thread support in Tkinter. +Whenever _tkinter calls the tcl interpreter, it releases the python-lock +and acquires the tcl-lock. Sketch defines some tcl-callbacks in C, which +in turn may call the python interpreter, but without releasing the +tcl-lock and acquiring the python-lock. I think that this is the cause, +because compiling just the _tkinter module without thread support cures +the problem, or so I'm told, I can't test this myself at the moment as +I'm still on libc5. + +The question now is, how do I make Sketch work correctly with a +threadable _tkinter? AFAICT, Sketch would have to have access to some +static variables in _tkinter.c. + +The best solution IMO would be to give third-party C-modules access to +the functionality of the macros ENTER_TCL, LEAVE_TCL, etc, via some +C-functions to access those variables and a _tkinter headerfile +installed with the other Python headerfiles. + +As it's probably too late to get something like this into Python 1.5.2 +final :(, the easiest solution for Sketch is to provide its own +non-threaded _tkinter module that is used instead of Python's if Sketch +runs with Python 1.5.2. + +It's kind of funny that 1.5.2 make it both easier, with the new +interpaddr() method, and harder, with the tcl-lock, to extend tkinter +with C-modules. + + + Bernhard + + +-- +Bernhard Herzog | Sketch, a python based drawing program +herzog at online.de | http://www.online.de/home/sketch/ + + + + diff --git a/demo/ermis-f/python_m/cur/0254 b/demo/ermis-f/python_m/cur/0254 new file mode 100644 index 00000000..34eeb7a0 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0254 @@ -0,0 +1,24 @@ +From: gornauth at dds.nl (Gornauth) +Date: Tue, 13 Apr 1999 13:38:36 +0200 +Subject: ZopeHTTP speed problem. +References: <7etton$j4q$1@nnrp1.dejanews.com> +Message-ID: <7evagc$dkj$1@news2.xs4all.nl> +X-UID: 254 + +befletch at my-dejanews.com wrote in message +<7etton$j4q$1 at nnrp1.dejanews.com>... +>I downloaded Zope to kick the tires a bit. It looks very interesting, +>but I am having a small problem with the ZopeHTTP server being really +>slow. It is taking about 5 seconds per HTTP request. Does anyone have +>an idea of what might be wrong here? +Did you try running the server with threads enabled? If not, try this: +"start.bat -t" +I did wonders for me :) + +g/. + + + + + + diff --git a/demo/ermis-f/python_m/cur/0255 b/demo/ermis-f/python_m/cur/0255 new file mode 100644 index 00000000..d0c0dd9c --- /dev/null +++ b/demo/ermis-f/python_m/cur/0255 @@ -0,0 +1,22 @@ +From: wware-nospam at world.std.com (Will Ware) +Date: Sat, 24 Apr 1999 04:11:47 GMT +Subject: I NEED MAJOR HELP +References: +Message-ID: +X-UID: 255 + +sportsnutz (sportsnutz at email.msn.com) wrote: +: Ive never programmed before and i need some tips on some command to work +: this thing + +Gently ease up on the clutch while you slowly press down on the gas. +If you hear a grindy noise, the clutch is unhappy, push it back down +and try again. +-- + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Will Ware email: wware[at]world[dot]std[dot]com +PGP fp (new key 07/15/97) 67683AE2 173FE781 A0D99636 0EAE6117 + + + + diff --git a/demo/ermis-f/python_m/cur/0256 b/demo/ermis-f/python_m/cur/0256 new file mode 100644 index 00000000..d3d093d6 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0256 @@ -0,0 +1,33 @@ +From: akuchlin at cnri.reston.va.us (Andrew M. Kuchling) +Date: Thu, 29 Apr 1999 12:39:12 -0400 (EDT) +Subject: GUI and creating GIF +In-Reply-To: <7g7u2k$fr0$1@wanadoo.fr> +References: <7g7u2k$fr0$1@wanadoo.fr> +Message-ID: <14120.35313.19477.657175@amarok.cnri.reston.va.us> +X-UID: 256 + +Frank.Derville writes: +>I would like to +>1) create a GIF file under Python by drawing lines, text, ... I have looked +>at Tk which can create bitmaps and photoimage but their seem to be no +>possibility to transform a canvas into a photoimage. +>2) rotate some text on a canvas. + + The Python Imaging Library seems to be what you need; look at +http://www.pythonware.com/products/pil/ . PIL lets you create Image +objects which are bitmaps that you can draw on and manipulate in +various ways, and save Images in one of a large number of different +formats, GIF and JPEG being the most common ones. There's also some +connectivity with Tkinter, so you can display Images on a canvas. I'm +not sure if PIL's font code can handle rotation, though. + +-- +A.M. Kuchling http://starship.python.net/crew/amk/ +Fast, fat computers breed slow, lazy programmers. + -- Robert Hummel + + + + + + diff --git a/demo/ermis-f/python_m/cur/0257 b/demo/ermis-f/python_m/cur/0257 new file mode 100644 index 00000000..467035dd --- /dev/null +++ b/demo/ermis-f/python_m/cur/0257 @@ -0,0 +1,27 @@ +From: loredo at spacenet.tn.cornell.edu (Tom Loredo) +Date: Mon, 05 Apr 1999 15:40:15 -0400 +Subject: Python books +References: <7dtsa4$b6p$1@nnrp1.dejanews.com> <7e0t19$1de$1@nnrp1.dejanews.com> <7e2vol$8c6$1@news1.rmi.net> <37090160.C52377BA@boi.hp.com> +Message-ID: <3709119F.59ACCC73@spacenet.tn.cornell.edu> +X-UID: 257 + +Bill Anderson wrote: + +> So what other publisher has a Python book out, and what is the name of +> it? + +You could of course find this out at python.org, but FWIW the answer is: + +*Internet Programming With Python* which includes Mr. Python himself +in the author list. Despite its title, it has very good *general* +coverage of Python, including extending and embedding it; the +chapters on creating HTML documents and writing CGI scripts should +be viewed merely as nice examples showing off some of the capability +described more generally in the earlier chapters. I think the +title is a bit unfortunate. + +-Tom Loredo + + + + diff --git a/demo/ermis-f/python_m/cur/0258 b/demo/ermis-f/python_m/cur/0258 new file mode 100644 index 00000000..a711935b --- /dev/null +++ b/demo/ermis-f/python_m/cur/0258 @@ -0,0 +1,95 @@ +From: atai-no-spam at glink.net.hk (>0 Remove -no-spam to reply) +Date: 29 Apr 1999 11:42:16 GMT +Subject: Shelve vs. Deepcopy +Message-ID: +Content-Length: 2001 +X-UID: 258 + +Hi: +I have a class who contains reference to other classes. Now I would like +to test an instance of this class. The test would alter the instance but I +would like to retain this instance, so at first I make a deepcopy of this +instance and perform the test on the copy. However, it take quite a long +time to finish the test. Then I try to use shelve to do the same thing. +I.e. first store the instance on a dbm. Then the copy is obtain from +loading the dbm. And to my surprise, the latter method is much faster than +the first method. With some profiling, I saw that the number of functions +calls of the first method is at least twice that of the second one. The +following are two test programs to illustrate this. When the first one is +run, using shelve is faster. While in the second one, deepcopy is faster. +I hope I have make some sense in the above sentences. +Regards, +>0 + + +test.py +Cut here ----------------------------------------------- + +import copy, shelve, time + +class test: + def __init__(self, num): + self.a = num + self.b = (2,3,`num`) + self.c = (3,7, `num`) +class test1: + def __init__(self, obj): + self.dict = {(1,3):obj} + for i in range(100): + self.__dict__[(`i`,1)] = i + +a = test(7) + +b = test1(a) + +dbase = shelve.open('tmp') +dbase['store'] = b + +start = time.time() +for i in range(1000): + c = dbase['store'] +stop = time.time() +print stop - start + +start = time.time() +for i in range(1000): + c = copy.deepcopy(b) +stop = time.time() +print stop - start + +dbase.close() + + +test2.py +Cut here------------------------------------------------- + + +import copy, shelve, time + +class test: + def __init__(self): + for i in range(100): + self.__dict__[`i`] = i + +a = test() + +dbase = shelve.open('tmp') +dbase['store'] = a + +start = time.time() +for i in range(1000): + c = dbase['store'] +stop = time.time() +print stop - start + +start = time.time() +for i in range(1000): + c = copy.deepcopy(a) +stop = time.time() +print stop - start + +dbase.close() + + + + diff --git a/demo/ermis-f/python_m/cur/0259 b/demo/ermis-f/python_m/cur/0259 new file mode 100644 index 00000000..ed90532a --- /dev/null +++ b/demo/ermis-f/python_m/cur/0259 @@ -0,0 +1,148 @@ +From: wtanksle at dolphin.openprojects.net (William Tanksley) +Date: Thu, 29 Apr 1999 23:06:15 GMT +Subject: Python IS slow ! [was] Re: Python too slow for real world +References: <613145F79272D211914B0020AFF6401914DAD8@gandalf.digicool.com> <372769B0.3CE8C0F3@prescod.net> +Message-ID: +Content-Length: 5450 +X-UID: 259 + +On 29 Apr 1999 10:35:50 +0200, Markus Kohler wrote: +>>>>>> "William" == William Tanksley writes: + +> William> On Wed, 28 Apr 1999 20:04:00 GMT, Paul Prescod wrote: +> >> William Tanksley wrote: + +> >>> And Oberon (SlimBinaries), and Eiffel (typing and general +> >>> compile-time error catching), and ... + +> >> Actually, isn't Eiffel's type system famous for being full of +> >> holes? + +> William> I'm familiar with the covariance/contravariance argument, +> William> but I've never before heard anyone say anything about +> William> Eiffel being full of holes. What problems have you heard +> William> of? + +>As far as I remember Eiffel requires a global system analysis to be type +>safe at compile time. + +According to Meyer, that would be the most permissive thing to do. He +also suggested an option, the rule about "no polymorphic CATcalls", which +would not require such intensive processing and would allow most of the +same things. + +All in all, though, after having read over Meyer's materials very +carefully, I have to say that I don't like his justifications. I just +looked at the Sather site (Sather is an Eiffel-inspired language which +uses contravariance), and they explain how to solve the problem he was +demonstrating (in a MUCH more logical and reuable way!). + +Since Sather is itself an subclass of Eiffel, I don't think I'm violating +any typing rules by claiming that imitating Sather is similar to taking +things from Eiffel ;-). + +Sather itself offers some interesting options for inheritance. For +example (let me translate to Python): + +class Gizmo(Object): + +inherits the interface of Object, but _none_ of its implementation. If +you want the same member functions as Object had, you have to do this: + +class Gizmo(Object): + import Object + from Object import new, del, etc + +This means that classes can behave like modules (because they bring +functions into their namespace the same way)... And logically, vice +versa. + +Of course, "inheriting an interface" is only meaningful with static +typing. Notice that this also addresses the issue of interfaces -- every +class is an interface. + +The disturbing thing, of course, is that this is totally incompatible with +the current way of doing things. That's easy to overcome, though: + +class Gizmo(Object, ): + from Doodad import * + +> >> Regardless, wouldn't a better source of inspiration on typing +> >> be a language with *optional* compile-time error checking? + +> William> Good question. I don't know the answer, but I can point +> William> out the dangers of not planning our path. + +[the dangers of C++ and other loose languages -- mixed measures considered +harmful] + +> William> The other dangerous side, of course, is being one of the +> William> languages which are so safe you can't use them without a +> William> huge manual and pages of UML. Python can NOT wind up +> William> like this, regardless of the dangers obvious in the other +> William> side. + +>Agreed. The main problem with todays statically typed languages is that +>they are too restrictive and to complicated. + +I'm not sure that they're _too_ restrictive; they work in their domains. +The problem is that we don't want to loose Python's greatest strength: +it's friendly. + +> William> Let me expand a little on the dangers of C++. + +> William> - virtual functions. It shouldn't be my job to tell the +> William> compiler when virtual lookups are the only thing to do; +> William> the compiler ought to be able to tell. For performance +> William> gurus, a way to hint to the compiler that virtual lookups +> William> were _not_ needed might be useful -- but what if the +> William> programmer was wrong? + +>True, SmallEiffel inlines most of the virtual function calls automatically. +>This is the way to go. + +Inlines virtual functions? I think you got your wires crossed ;-). +Virtual functions, by definition, can't be inlined. Inlining is where you +place the routine's source code directly into the code of the calling +routine. + +> William> - GC -- hard to add after the fact. No worry with +> William> Python, but what if there are other issues like it? + +>I'm not sure if I understand this sentence. Do you mean GC is hard to add +>to python without breaking existing code ? +>I would agree with that. And why do you say "no worry" +>Do you mean GC is not worth the effort ? + +Guido seems to think so. Anyone who disagrees is free to contribute and +work on porting GC code (I would like to see it). + +I think that worrying about the other issues is FAR more rewarding -- RC +is not only hard to replace with GC, but the rewards for doing so are +relatively small (in comparison to the other things we can think about). + +I don't want to stop anyone from trying, though. The nice thing about +free software is that even if everyone disagrees with you or thinks it's +not worth it you can still get it done. + +So what other issues are worth thinking about? I don't know. + +> You may have a look at Strongtalk a Smalltalk with static (optional) +> type checking. + +Found it using Google.com (a GOOD search engine for technical matters). +http://java.sun.com/people/gbracha/nwst.html + +I'll be spending some time reading it. My initial impression: _very_ +good. This would fit well, I think. + +> Markus + +-- +-William "Billy" Tanksley +"But you shall not escape my iambics." + -- Gaius Valerius Catullus + + + + diff --git a/demo/ermis-f/python_m/cur/0260 b/demo/ermis-f/python_m/cur/0260 new file mode 100644 index 00000000..51b61abd --- /dev/null +++ b/demo/ermis-f/python_m/cur/0260 @@ -0,0 +1,46 @@ +From: rhays at interaccess.com (Bob Hays, Computer Geek) +Date: Thu, 08 Apr 1999 11:30:31 GMT +Subject: Q: How to use long names in python for windows +Message-ID: <370e9080.37656309@news.interaccess.com> +Content-Length: 1321 +X-UID: 260 + +I'm on Win95, I've downloaded python 1.5.1 and pythonwin (123 I +think). I've been using pythonwin for development and that works +great. Now, I want to create a set of batch files to run processes +for me - I'm getting the following error from python: + +ValueError: Module name too long + +My import statement to the python interpreter is: + +import SumHours.MonthOfFiles + +This worked fine in pythonwin. In addition, I made sure to: + +set PYTHONPATH=H:\PySources;H:\Python\lib + +before starting. + +Is there a problem with long file name support in python 1.5.1 on +Windows95? Is there some startup script I need to execute first to +enable long file names? I want my code to run properly on UNIX also +(which it does right now), and I hate 8.3 naming conventions. + +Thanks and have fun! - Bob + +-- +I did not ask for the anal probe. -- Passion Fish +Discipline is never an end in itself, only a means to an end. - King Crimson +Whoever flees history will be pursued by history. - Janusz Korczak +-----BEGIN GEEK CODE BLOCK----- +Version: 3.1 +GCS d+(-)@ s+:+ a C++(+++)$ U$ P+$ L@ E+++$ W+++$ N++ !o-- K--? w$ !O M$ V@ +PS+ PE !Y+ PGP t !5-- !X !R tv+ b++() DI+ !D- G-- e++ h--- r+++ y+++** +------END GEEK CODE BLOCK------ +rhays at interaccess.com (home) http://homepage.interaccess.com/~rhays +Bob.Hays at abnamro.com (work) + + + + diff --git a/demo/ermis-f/python_m/cur/0261 b/demo/ermis-f/python_m/cur/0261 new file mode 100644 index 00000000..3d11a4c6 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0261 @@ -0,0 +1,31 @@ +From: chadm at sgi.com (Chad McDaniel) +Date: 21 Apr 1999 12:04:30 -0700 +Subject: New python user seeks comments +References: <371DA955.9F13B144@pop.vet.uu.nl> +Message-ID: +X-UID: 261 + +Martijn Faassen writes: + +> David Steuber wrote: +> > +> > Er, uh, hmm. +> > +> > I wrote my first Python program today. It took longer than I +> > expected. Who would have guessed that you couldn't give a file object +> > the name 'in'? Or at least that was one of the weirder obstacles. +> +> It's not that weird as 'in' is a reserved keyword in Python. :) +> +> for i in whatever: +> print "See?" +> + +It seems that Python could have mentioned that to the user. + +-- +-chad + + + + diff --git a/demo/ermis-f/python_m/cur/0262 b/demo/ermis-f/python_m/cur/0262 new file mode 100644 index 00000000..7d4374d2 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0262 @@ -0,0 +1,39 @@ +From: neilh at fast.fujitsu.com.au (Neil Hodgson) +Date: Thu, 15 Apr 1999 12:58:05 +1000 +Subject: Can't run Win32 Debugger outside PythonWin +References: <371475d6.77664796@news.omnilink.de> +Message-ID: <371555BD.70107860@fast.fujitsu.com.au> +Content-Length: 1043 +X-UID: 262 + +Stefan Franke wrote: + +> I just upgraded my NT4 SP3 Workstation to Python 1.5.2 and +> win32all build 124. Unluckily I can't start the debugger any +> longer from outside PythonWin. +> That is, typing +> +> It seems the Scintilla.DLL can't be found (even the latest update from the +> author's hompage). However, sys.path is OK: +> +> D:\Programme\Python\Pythonwin\pywin\debugger>python +> Python 1.5.2 (#0, Apr 13 1999, 10:51:12) [MSC 32 bit (Intel)] on win32 +> Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam +> >>> import debugger +> ... +> dllid = win32api.LoadLibrary("Scintilla.DLL") +> pywintypes.api_error: (126, 'LoadLibrary', 'Das angegebene Modul wurde nicht gef +> unden.') +> +> [The German error msg says "module not found"] + + Sorry, I don't see this error myself. As a temporary workaround you +could try copying Scintilla.DLL into the windows or windows system +directory (often called \winnt\system32). I hope Mark has some more +insight into this as I don't understand how Python manipulates the path. + + Neil Hodgson + + + + diff --git a/demo/ermis-f/python_m/cur/0263 b/demo/ermis-f/python_m/cur/0263 new file mode 100644 index 00000000..a879a861 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0263 @@ -0,0 +1,36 @@ +From: morse at harborcom.net (Kevin Dahlhausen) +Date: Tue, 27 Apr 1999 12:22:45 GMT +Subject: GUI other than Tkinter +References: <3721567f.1748033@news> <7g1a8h$fae$1@Starbase.NeoSoft.COM> <7g2gul$faf$1@Starbase.NeoSoft.COM> +Message-ID: <3725aa15.4550122@news.oh.verio.com> +Content-Length: 1096 +X-UID: 263 + +claird at Starbase.NeoSoft.COM (Cameron Laird) wrote: + . +>>> +>> +>>I appreciate this useful list. + +>>Also ... I noticed a refernce to `fltk' on this list, and I downloaded +>>and built it. However, I don't notice any Python support as part of +>>this distribution, and I'm wondering why `fltk' is on this "Python GUI" +>>list. Is there somewhere else where a Python interface to `fltk' +>>might exist? +>I've sent a copy of your question to a couple +>of people likely to know more. + +We are working on it - and perl support too. While FLTK doesn't play games +with the preprocessor, it does use a lot of function overloading. Bjorn +Petterson contributed a python idiom to allow overloaded functions. It's about +2/3 of the way completed - at least for an open alpha release. I've got a +handfull of the fltk test programs implemented in Python. In a few weeks, +we'll be asking for people to help test the wrappers. + +Mailing list: www.egroups.com/group/pyfltk/ +Future home: http://www.netpedia.net/hosting/fltk/ + + + + + diff --git a/demo/ermis-f/python_m/cur/0264 b/demo/ermis-f/python_m/cur/0264 new file mode 100644 index 00000000..7ae50400 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0264 @@ -0,0 +1,96 @@ +From: fredrik at pythonware.com (Fredrik Lundh) +Date: Fri, 23 Apr 1999 12:37:27 GMT +Subject: Pointers to variables +References: <19990422121403.A279051@vislab.epa.gov> <19990423080721.A344578@vislab.epa.gov> +Message-ID: <021801be8d86$0d3ba7a0$f29b12c2@pythonware.com> +Content-Length: 2164 +X-UID: 264 + +Randall Hopper wrote: +> I think I understand the source of my confusion. This construct: +> +> for ( var, val ) in [( min, 1 ), ( max, 100 )]: +> +> isn't pairwise assignment to all the values of the list. If it were, val +> would be an alias for the variable min, then an alias for max, etc. + +but that's exactly what it is. read on! + +> This actually builds a completely new list: +> +> [( valueof(min), 1 ), ( valueof(max), 100 )] +> +> in memory first, which is then iterated over. This is why my original +> example didn't work. + +nope. that's not the reason. read on! + +> Also, the "valueof()" relation for some types in python (apparently) +> is a reference rather than a value (lists, objects, etc.) which explains +> why these examples work: + +*EVERYTHING* is a reference. a pointer. a memory address. +or whatever term you prefer. + +> (1) min = [ 0 ] +> max = [ 0 ] +> +> for ( var, val ) in [( min, 1 ), ( max, 100 )]: +> var[0] = val + +here, you modify the object in place (through the reference), +by assigning to a list slot. + +corresponding C-ish code: + + varPtr->setitem(0, valPtr); + +> (2) class Val: +> def __init__( self, num ): +> self.num = num +> +> min = Val(0) +> max = Val(0) +> +> for ( var, val ) in [( min, 1 ), ( max, 100 )]: +> var.num = val + +here, you modify the "var" object in place by +setting an attribute. + +corresponding C-ish code: + + varPtr->setmember("num", valPtr); + +> but this one doesn't: +> +> (3) min = 0 +> max = 0 +> for ( var, val ) in [( min, 1 ), ( max, 100 )]: +> var = val + +here, you tell python to change the binding for the name "var" +in the local name space so it points to the same thing as the +name "val". + +corresponding C-ish code: + + varPtr = valPtr; + +or rather: + + setlocalname("var", valPtr); + +> So basically this is just a little asymmetry in the language. Putting a +> variable in a list/tuple (valueof(var)) performs a shallow copy rather than +> a deep copy. + +nope. content is never copied. only references. all the time. +perfect symmetry. + + + + + + + diff --git a/demo/ermis-f/python_m/cur/0265 b/demo/ermis-f/python_m/cur/0265 new file mode 100644 index 00000000..bbfe60ec --- /dev/null +++ b/demo/ermis-f/python_m/cur/0265 @@ -0,0 +1,53 @@ +From: da at ski.org (David Ascher) +Date: Thu, 29 Apr 1999 05:22:27 GMT +Subject: Maximize Benefit when Purchasing Learning Python +In-Reply-To: <3727E7B2.616A87F0@polytopic.com> +References: <3727E7B2.616A87F0@polytopic.com> +Message-ID: +Content-Length: 1781 +X-UID: 265 + +> I tell you what, if you've got the stones to send me your +> address off-list, you'll get a check. If you think Mr. +> Ascher is worth it--and I don't doubt it for a moment--if +> he'll provide me with the same, I'll send him one, too. + +You're not serious, are you? Anyway, ask Mark about the first part about +being worth it, but the second part is: + + 522A Green St + San Francisco CA 94133 + +Shameless, I know -- but what if you're one of the eBay founders and the +check will cover my kid's tuition in the year 2015? I'd hate myself for +not answering =). If you'd rather buy me a drink at the next conference, +that'd be fine too. I already owe Jeff Bauer and Fredrik Lundh drinks, so +we may have to start maintaining a database... + +[Off-topic: send in abstracts for the next Python conference! It'll be +fun! Mark and I will meet for the third time! We'll dedicate books for +free! We'll meet more folks who don't look like what we thought they +looked like! Information is on www.python.org] + +More seriously, on the topic of where to buy -- I tell people to buy it +through the PSA because 1) it's cheap and efficient, and 2) the PSA might +get some $'s from it. I don't know how much, but it's statistically +guaranteed to be more than through any other distribution channel. Note +that if you really want to have more cents come to Mark and I, you should +buy it direct from ORA. But most of the difference in the price goes to +ORA, not to us =). + +What I most want from readers is that you write good programs, evangelize +the use of Python where needed and as appropriate, and help Python grow. +While you're at it, join the PSA and/or the Python Consortium. If, as a +side effect, more companies hire us as trainers or consultants, that's +fine too. + +--David Ascher + + + + + + + diff --git a/demo/ermis-f/python_m/cur/0266 b/demo/ermis-f/python_m/cur/0266 new file mode 100644 index 00000000..1ca3d285 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0266 @@ -0,0 +1,46 @@ +From: fredrik at pythonware.com (Fredrik Lundh) +Date: Thu, 15 Apr 1999 13:24:11 GMT +Subject: 1.5.2 install problems on NT +References: <3714D8FF.634655C5@ina.fr> +Message-ID: <002201be8743$4414b940$f29b12c2@pythonware.com> +Content-Length: 1160 +X-UID: 266 + +Richard GRUET wrote: +> Tcl problems: +> --------------- +> shared by many ! see Hoon Yoon for instance... wish80;exe works (hence I +> conclude that tcl is installed properly) but IDLE or Tkdb don't, with +> insults like: +> C:/PROGRA~1/PYTHON/TCL/lib/tk8.0/tk.tcl: bad event type +> bad event type or keysym "MouseWheel" +> while executing +> "bind Listbox { +> %W yview scroll [expr - (%D / 120) * 4] units +> }" +> (file "C:/PROGRA~1/PYTHON/TCL/lib/tk8.0/listbox.tcl +> invoked from within +> "source [file join $tk_library listbox.tcl]" +> (file "C:/PROGRA~1/PYTHON/TCL/lib/tk8.0/tk.tcl" lin +> invoked from within +> "source C:/PROGRA~1/PYTHON/TCL/lib/tk8.0/tk.tcl" +> ("uplevel" body line 1) +> invoked from within +> "uplevel #0 [list source $tkfile]" +> +> This probably means that Tk wasn't installed properly. + +It means that you have several conflicting versions of Tk +installed on your machine (or rather, that Python is picking +up a version of tk80.dll that is older than the library files). + +Most likely, you'll find the offender in the system directory. + +See the thread "Tkinter, bad event type" for more info. + + + + + + + diff --git a/demo/ermis-f/python_m/cur/0267 b/demo/ermis-f/python_m/cur/0267 new file mode 100644 index 00000000..838d5ca1 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0267 @@ -0,0 +1,28 @@ +From: olipt at mayo.edu (Travis Oliphant) +Date: Fri, 16 Apr 1999 22:59:25 -0500 +Subject: #!/usr/bin/env python -u +In-Reply-To: +References: <37175574.25EBDDBE@stuco.uni-klu.ac.at> +Message-ID: +X-UID: 267 + +> +> So I tend to depend on GNU configure when I'm installing a script. I +> actually look for Python in the user's environment, then use sed to +> hard-code that path into the scripts before installing them. Can this +> be done with RPM? + +Sure, since RPM is just a series of sh scripts that run while installing a +package. You could put something in the %post section that did this. +Then the scripts would be set up for whoever ran the rpm command, but not +anyone who didn't have this same enviroment. This would imply multiple +rpm databases on a single system for different users. I'm not familiar +with using RPM in this way but I bet it could be done... + +Travis + + + + + + diff --git a/demo/ermis-f/python_m/cur/0268 b/demo/ermis-f/python_m/cur/0268 new file mode 100644 index 00000000..59a1fcaa --- /dev/null +++ b/demo/ermis-f/python_m/cur/0268 @@ -0,0 +1,34 @@ +From: da at ski.org (David Ascher) +Date: Thu, 29 Apr 1999 21:39:17 -0700 (Pacific Daylight Time) +Subject: Trouble with proxies +In-Reply-To: <7gasj8$g79$1@nnrp1.dejanews.com> +Message-ID: +X-UID: 268 + +On Fri, 30 Apr 1999 befletch at my-dejanews.com wrote: + +> Hello again everyone, +> +> I have tried all the suggestions people have sent me, and I have tried all +> the local debugging I could think of, but I still can't see the world from +> behind my proxy server. Can anyone find a possible solution to this? I've +> had to modify my URL lines with (colin-slash-slash) to get past DejaNews' +> Draconian posting filters: +> +> +> C:\>SET http_proxy=http(colin-slash-slash)10.187.200.230 + +I found I had to set the port of the proxy server (in our case 8080), so: + +C:\>SET http_proxy=http://10.187.200.230:8080 + +or whatever + +[FYI, that it's "colon", not "colin"] + +--david ascher + + + + + diff --git a/demo/ermis-f/python_m/cur/0269 b/demo/ermis-f/python_m/cur/0269 new file mode 100644 index 00000000..0532b371 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0269 @@ -0,0 +1,34 @@ +From: moritz at news.uni-mannheim.de (Moritz Moeller-Herrmann) +Date: Sun, 25 Apr 1999 20:38:18 +0200 +Subject: GUI other than Tkinter +References: <3721567f.1748033@news> +Message-ID: +X-UID: 269 + +On 25 Apr 1999 17:09:22 GMT, Michael W. Ryan wrote: +>On 25 Apr 1999 09:23:35 -0400, Russell Nelson wrote: +>>mrfusion at bigfoot.com writes: + +>>> Well, I've just about given up on EVER getting Tkinter to work on my +>>> Win98 machine. Is there any other GUI module that I can get that +> ^^^^^ +>>> doesn't require TCL/TK to be installed on my machine? Isn't there +>>> something called GD? + +>>There's pygtk, which uses the gtk toolkit. + +>As far as I know, GTk has not been ported to the Win32 platform, yet. + +And i wanted to propose pyQT/pyKDE :-) Seriously QT works for Windows, too but I +think the bindings are for real operating systems only, aren't they? + +-- +Moritz Moeller-Herrmann mmh at gmx.net ICQ# 3585990 # Not only +Get my public pgp / gpg key from # Open Source(TM) +http://webrum.uni-mannheim.de/jura/moritz/pubkeymoritz # but also + # Open Minded! + + + + + diff --git a/demo/ermis-f/python_m/cur/0270 b/demo/ermis-f/python_m/cur/0270 new file mode 100644 index 00000000..510f3410 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0270 @@ -0,0 +1,52 @@ +From: Jan.Kybic at epfl.ch (Jan Kybic) +Date: 28 Apr 1999 14:46:09 +0200 +Subject: Q: Threading and reload +Message-ID: +Content-Length: 1535 +X-UID: 270 + +Hello everybody, + I am developping a small web server. The problem is +that since I added multithreading, the reload() command does not seem +to have any effect. I have a separate thread for every request. The +interaction logic itself is in a special module. I would like to be +able to reload() this module for debugging purposes by issuing a +proper HTTP request. The code looks like this: + +import Module + +class ThreadingHTTPServer(BaseHTTPServer.HTTPServer): + def process_request(self, request, client_address): + """Start a new thread to process the request.""" + t=threading.Thread(target=self.finish_request, + args=(request, client_address)) + t.setDaemon(1) + t.start() + +class Handler(CGIHTTPServer.CGIHTTPRequestHandler): + + def run_cgi(self): + if script=='reload': + reload(Module); ... ; return + + ... + if not clients.has_key[client_number]: # new client + clients[client_number]=Module.clientLogic() + clients[client_number].emit_page() + ... + +Before introducing threads, all worked fine but since then the reload() +does not seem to do anything. What am I doing wrong? Are there any +special considerations for using reload and threads? Thanks a lot. + +Jan + +-- +------------------------------------------------------------------------- +Jan Kybic BIG IOA DMT EPFL Lausanne, Switzerland +http://bigwww.epfl.ch/kybic tel. work +41 (21) 693 5741 +For PGP key see my WWW page. + + + + diff --git a/demo/ermis-f/python_m/cur/0271 b/demo/ermis-f/python_m/cur/0271 new file mode 100644 index 00000000..3670744b --- /dev/null +++ b/demo/ermis-f/python_m/cur/0271 @@ -0,0 +1,30 @@ +From: R.Hooft at EuroMail.com (Rob Hooft) +Date: 19 Apr 1999 08:42:51 +0200 +Subject: Tkinter - the app that wouldn't quit +References: <19990416144831.A1548022@vislab.epa.gov> +Message-ID: +X-UID: 271 + +I would suggest to use Pmw (http://www.dscpl.com.au/pmw/) which +contains ready-to-use dialog windows. + +The problem in your current program appears to be that when your +application window is destroyed, "root" is still an active window, +although it is invisible. + +The WM_DELETE protocol is never called, because you're not +"destroying" the window using the window manager. + +The smallest change would be to make the "Quit" button run "sys.exit" +immediately instead of "self.destroy". + +Regards, + +-- +===== R.Hooft at EuroMail.net http://www.xs4all.nl/~hooft/rob/ ===== +===== R&D, Nonius BV, Delft http://www.nonius.nl/ ===== +===== PGPid 0xFA19277D ========================== Use Linux! ========= + + + + diff --git a/demo/ermis-f/python_m/cur/0272 b/demo/ermis-f/python_m/cur/0272 new file mode 100644 index 00000000..14bd8112 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0272 @@ -0,0 +1,54 @@ +From: aa8vb at vislab.epa.gov (Randall Hopper) +Date: Mon, 26 Apr 1999 10:42:45 -0400 +Subject: "Compiling" scripts before execution ? +Message-ID: <19990426104245.A504861@vislab.epa.gov> +Content-Length: 1821 +X-UID: 272 + + One concern I've been mulling over lately is the potential problem +maintaining Python scripts over time. For example: + + 1) It's easy to never create (or to sever) a link to a imported symbol + defined in another module, and you may never know it until python + tries to execute the referencing line of script code. + + 2) If the signature of an imported method changes, and all + references to it in all scripts aren't updated, you may never know + it until Python tries to execute one of these "broken" line of + script code. + +I realize with batch scripts, if you're diligent you can write and maintain +exhaustive test code and include it in the modules (Re: Tim's doctest +thread) -- a good idea IMO. + +However, I primarily have Python GUI code in mind, where it's not so simple +to automate testing. + +What are folks doing to keep this class of errors from being a problem? + +Is there a way to "lint" or compile Python code such that it forces symbols +to resolve when seen (possibly disallowing some dynamic symbol definition +available in the language (e.g. adding methods to classes after class +definition). + +To take a few examples: + + $ python >>> class C: $ python + >>> def F(): ... def M(): >>> class C: + ... return G() ... print self ... def M(self): + ... ... ... self.RemovedMethod() + >>> >>> ... + >>> + +Is there a "Python lint" tool or hidden option (e.g. "-Dstrict_python") that +can turn these into build-time errors of some sort? + +Any tips appreciated. + +Thanks, + +Randall + + + + diff --git a/demo/ermis-f/python_m/cur/0273 b/demo/ermis-f/python_m/cur/0273 new file mode 100644 index 00000000..05fa5a1b --- /dev/null +++ b/demo/ermis-f/python_m/cur/0273 @@ -0,0 +1,50 @@ +From: dalke at bioreason.com (Andrew Dalke) +Date: Mon, 26 Apr 1999 14:39:47 -0600 +Subject: Trouble with httplib and IRIX +References: <7g219p$hvb$1@nnrp1.dejanews.com> +Message-ID: <3724CF13.C4680904@bioreason.com> +Content-Length: 1041 +X-UID: 273 + +basv at sara.nl said: +> I'm running python 1.5.2 and running it on IRIX 6.5.3 systems. +> ... +> I have the following problem when i'm trying to connect to an +> non-existing machine the program hangs forever. + +I don't get that behaviour using 1.5.2c1 or 1.5.1 on either of +our 6.5.2m machines. + +max> pwd +/home/u05/dalke/ftps/Python-1.5.2c1 +max> env PYTHONPATH=Lib ./python +Python 1.5.2c1 (#4, Apr 14 1999, 16:29:33) [C] on irix6 +Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam +>>> import socket +>>> import httplib +>>> httplib.__file__ +'Lib/httplib.pyc' +>>> def main(): +... h = httplib.HTTP() +... h.set_debuglevel(100) +... try: +... h.connect("www.nsrc.nus.sg") +... except socket.error, detail: +... print 'Connect failed: %s' %detail +... +>>> main() +connect: ('www.nsrc.nus.sg', 80) +Connect failed: host not found +>>> ^D +max> uname -aR +IRIX64 max 6.5 6.5.2m 11051732 IP30 + +Can you attach a debugger or force a core dump and see where it's +hanging? + + Andrew + dalke at acm.org + + + + diff --git a/demo/ermis-f/python_m/cur/0274 b/demo/ermis-f/python_m/cur/0274 new file mode 100644 index 00000000..d17895e4 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0274 @@ -0,0 +1,19 @@ +From: moshez at math.huji.ac.il (Moshe Zadka) +Date: Sat, 3 Apr 1999 20:26:11 +0200 +Subject: Module Documentation Strings +Message-ID: +X-UID: 274 + +Is anyone working on adding doc-strings to the "re" module? + +I'm thinking of starting, and I wonder if I'm re-inventing the wheel +here. + +-- +Moshe Zadka . +QOTD: What fun to me! I'm not signing permanent. + + + + + diff --git a/demo/ermis-f/python_m/cur/0275 b/demo/ermis-f/python_m/cur/0275 new file mode 100644 index 00000000..df42118e --- /dev/null +++ b/demo/ermis-f/python_m/cur/0275 @@ -0,0 +1,24 @@ +From: Gaetan_Corneau at baan.com (Gaetan Corneau) +Date: Wed, 14 Apr 1999 10:43:28 GMT +Subject: Pig Latin? +Message-ID: <816010E2456BD111A48700805FBBE2EEA63EEF@ex-quebec-u1.baan.com> +X-UID: 275 + +OK, I'll bite: +Could someone tell me what "pig latin" is? A form of latin spoken by pigs? + +______________________________________________________ + Gaetan Corneau + Software Developer (System integration Team) + BaaN Supply Chain Solutions + E-mail: Gaetan_Corneau at baan.com + Compuserve: Gaetan_Corneau at compuserve.com + ICQ Number: 7395494 + Tel: (418) 654-1454 ext. 252 +______________________________________________________ +"Profanity is the one language all programmers know best" + + + + + diff --git a/demo/ermis-f/python_m/cur/0276 b/demo/ermis-f/python_m/cur/0276 new file mode 100644 index 00000000..8abc6d0f --- /dev/null +++ b/demo/ermis-f/python_m/cur/0276 @@ -0,0 +1,14 @@ +From: frankmcgeough at my-dejanews.com (frankmcgeough at my-dejanews.com) +Date: Sat, 24 Apr 1999 23:20:22 GMT +Subject: Python implementation of tar +Message-ID: <7ftjjl$tim$1@nnrp1.dejanews.com> +X-UID: 276 + +Does someone has a tar implementation written in Python? + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/0277 b/demo/ermis-f/python_m/cur/0277 new file mode 100644 index 00000000..e3a03bc7 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0277 @@ -0,0 +1,32 @@ +From: manus at bullfrog-tech.com (Manus Hand) +Date: Fri, 09 Apr 1999 17:41:24 -0600 +Subject: Help (PLEASE) CGI on 98/NT +Message-ID: <370E9024.6D256DE8@bullfrog-tech.com> +X-UID: 277 + +I had my Win95 Personal Web Server (PWS) up and running +just fine, having merely followed the simple instructions on +Aaron's pws.html page at the starship. + +So they go and give me a 98 machine. Well, it has PWS, so +you'd THINK it'd work if I did the same thing. Nope. + +I get "500 Server Error" and NO other help from Mr. Gates. + +My sysadmin has been unable to get NT's IIS 4 to run Python +CGI as well. + +I (desperately!!!) need someone to come to the rescue, at LEAST +on Win98's PWS, and hopefully also on NT's IIS 4. + +HELP!!!! + +PLEASE REPLY DIRECT TO ME AT manus at python.net IN +ADDITION TO POSTING. Much obliged! + +Manus + + + + + diff --git a/demo/ermis-f/python_m/cur/0278 b/demo/ermis-f/python_m/cur/0278 new file mode 100644 index 00000000..bd94037c --- /dev/null +++ b/demo/ermis-f/python_m/cur/0278 @@ -0,0 +1,46 @@ +From: dave at zeus.hud.ac.uk (Dave Dench) +Date: Thu, 29 Apr 1999 11:38:25 GMT +Subject: Designing Large Systems with Python +Message-ID: <199904291138.MAA06634@brahms.scom> +Content-Length: 1394 +X-UID: 278 + +> From python-list-request at cwi.nl Thu Apr 29 11:40:56 1999 +> From: davecook at home.com (David M. Cook) +> Newsgroups: comp.lang.python +> Subject: Re: Designing Large Systems with Python +> X-Organization: http://members.home.com/davecook +> Reply-To: davecook at home.com +> Date: Thu, 29 Apr 1999 10:13:48 GMT +> X-Complaints-To: abuse at home.net +> X-Trace: news.rdc1.sdca.home.com 925380828 24.0.189.179 (Thu, 29 Apr 1999 +> 03:13:48 PDT) +> To: python-list at cwi.nl +> +> Now to add something to the discussion, you might want to check out Extreme +> programming: +> +> http://c2.com/cgi/wiki?ExtremeProgrammingRoadmap +> +> It seems to be popular with SmallTalk people. +> + +At the recent OT99 at Oxford University, Kent Beck gave a keynote speech +about XP as a paradigm. They happen to be using Java on their projects, +language is not an issue. + + David + +________________________________________________________________________________ + + ************************************************ + * David Dench * + * The University of Huddersfield , UK * + * Tel: 01484 472083 * + * email: d.j.dench at hud.ac.uk * + ************************************************ +________________________________________________________________________________ + + + + diff --git a/demo/ermis-f/python_m/cur/0279 b/demo/ermis-f/python_m/cur/0279 new file mode 100644 index 00000000..970346a9 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0279 @@ -0,0 +1,26 @@ +From: aahz at netcom.com (Aahz Maruch) +Date: Wed, 21 Apr 1999 00:52:54 GMT +Subject: VB Nothing equivalent in win32com +References: <7fiffg$4sb$1@nnrp1.dejanews.com> <7fj65j$6cp$1@m2.c2.telstra-mm.net.au> +Message-ID: +X-UID: 279 + +In article <7fj65j$6cp$1 at m2.c2.telstra-mm.net.au>, +Mark Hammond wrote: +> +>Python uses None. Pythoncom also uses None in almost all relevant cases. + +I'm tempted to make a comment about None of your business, but I'm sure +you've all heard the joke before. +-- + --- Aahz (@netcom.com) + +Hugs and backrubs -- I break Rule 6 <*> http://www.rahul.net/aahz/ +Androgynous poly kinky vanilla queer het + +"You often don't really understand the problem until after the first +time you implement a solution." - Eric S. Raymond + + + + diff --git a/demo/ermis-f/python_m/cur/0280 b/demo/ermis-f/python_m/cur/0280 new file mode 100644 index 00000000..a970aa08 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0280 @@ -0,0 +1,52 @@ +From: tismer at appliedbiometrics.com (Christian Tismer) +Date: Wed, 7 Apr 1999 08:51:35 GMT +Subject: Chaning instance methods +References: <000401be80bc$999f1820$699e2299@tim> +Message-ID: <370B1C97.AC3CFD8A@appliedbiometrics.com> +Content-Length: 1394 +X-UID: 280 + + +Tim Peters wrote: + + + +> Right, a direct attribute of an instance is never a method. Except that +> this "works": +> +> import new +> f.m = new.instancemethod(m2, f, Foo) +> f.m() +> +> This sets f.m to a *bound* instance method that refers to f, which Python +> treats as an ordinary function when later referenced via f.m. Without using +> the "new" module, you can get the same effect via e.g. +> +> old_Foo_m = Foo.m +> Foo.m = m2 +> f.m = f.m # heh heh +> Foo.m = old_Foo_m + +As a related topic, there is also DOnBeaudry's functor module from +March '97 which makes use of the newmodule internally and is able +to create quite efficient wrappers around callables with bound +parameters. The calling overhead is about twice as large +as for the original function. + +This version needed some tweaking to make it run under Python 1.5 . +I just uploaded a slightly modified version to incoming and +hope it will make it into contrib/system. + +cheers - chris + +-- +Christian Tismer :^) +Applied Biometrics GmbH : Have a break! Take a ride on Python's +Kaiserin-Augusta-Allee 101 : *Starship* http://starship.python.net +10553 Berlin : PGP key -> http://wwwkeys.pgp.net +PGP Fingerprint E182 71C7 1A9D 66E9 9D15 D3CC D4D7 93E2 1FAE F6DF + we're tired of banana software - shipped green, ripens at home + + + + diff --git a/demo/ermis-f/python_m/cur/0281 b/demo/ermis-f/python_m/cur/0281 new file mode 100644 index 00000000..ea5bdbd0 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0281 @@ -0,0 +1,71 @@ +From: mlh at idt.ntnu.no (Magnus L. Hetland) +Date: 23 Apr 1999 16:13:12 +0200 +Subject: Python too slow for real world +References: <372068E6.16A4A90@icrf.icnet.uk> <37207685.F29BE1AB@ingr.com> +Message-ID: +Content-Length: 1710 +X-UID: 281 + +Joseph Robertson writes: + +> Hi, +> +> For what you state here, you don't even really need to read the 'data' at +> all. +> Just read your descriptors, and store the offsets and len of the data in a +> dictionary (i.e. index it). +> +> readline +> if first char == > +> get id +> get current position using seek method +> store id, pos in dict +> #for each id, we now have its byte posisition in the file + +Well... You have to read all the lines to find all the descriptors, +don't you? Is there really any great speadup here? + +Of course, you would get some speedup later, when using the same +structure again... + +> +> Then have a filter method which keeps or discards the records by criteria. +> +[...] + +If the number of excluded element isn't very high, this method will +only add to the burden of processing, won't it? + +(By seek -- do you mean os.lseek? Or is ther another one... Just curious.) + +> +> This way you can create views on your data without actually trying to load it +> all. The tradeoff of course is memory for fileaccess time, but I found +> fileaccess to be faster than doing all the work 'up front'. + +Hm. Yes. + +If the size (in lines) of the records is constant, then you could, of +course, use seek to skip all the data while processing as well... + +> Besides my +> project reached the point where we ran out of memory often, some datasets are +> on 8+ cdroms! +> +> Hope that was relevant, but maybe I misunderstood the question. +> Joe Robertson, +> jmrobert at ro.com +> +> +> +> +[...] +-- + > Hi! I'm the signature virus 99! + Magnus > Copy me into your signature and join the fun! + Lie + Hetland http://arcadia.laiv.org + + + + diff --git a/demo/ermis-f/python_m/cur/0282 b/demo/ermis-f/python_m/cur/0282 new file mode 100644 index 00000000..50590b04 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0282 @@ -0,0 +1,40 @@ +From: msrisney at my-dejanews.com (msrisney at my-dejanews.com) +Date: Sat, 24 Apr 1999 04:30:56 GMT +Subject: wrapped around the axle on regexpressions and file searching +Message-ID: <7frhe0$8g1$1@nnrp1.dejanews.com> +Content-Length: 1070 +X-UID: 282 + +Hey Pythoniers! + +I'm attemtping to locate log files on my drive(s), and do some comparison. +here's a simplified snippet where I'm getting bottlenecked. + +>>>import os,re +>>>regexp = re.compile('.log') +>>>def find_log_files(arg, directory, names): + ...for name in os.listdir(directory): + if regexp.search(name): + print directory + "\\" + name +>>>os.path.walk('D:\\',find_log_files,None) + + +here are my questions: 1. this prints out not only files with the file +extensions ".log" but also any file name that has "log" in it's name. how +would I rewrite to avoid?? + +2. is there a better, faster way of doing this??, my end goal is to open the +files and compare time sequences to one another. + +3. Is ther any way to determine the number of drives on a system, obviuosly I +am hardcoding the top level drive letter "D:\", is there any way to search the +entire system much like win32's find file search?? + +TIA + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/0283 b/demo/ermis-f/python_m/cur/0283 new file mode 100644 index 00000000..16c5d525 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0283 @@ -0,0 +1,38 @@ +From: a.mueller at icrf.icnet.uk (Arne Mueller) +Date: Fri, 23 Apr 1999 17:38:51 +0100 +Subject: Python too slow for real world +References: <372068E6.16A4A90@icrf.icnet.uk> +Message-ID: <3720A21B.9C62DDB9@icrf.icnet.uk> +X-UID: 283 + +Hi All, + +thanks very much for all the suggestions how to speed up things and how +to THINK about programming in python. I got alot of inspiration from +your replys. However the problem of reading/writing larges files line by +line is the source of slowing down the whole process. + +def rw(input, output): + while 1: + line = input.readline() + if not line: break + output.write(line) + +f = open('very_large_file','r') +rw(f, stdout) + +The file I read in contains 2053927 lines and it takes 382 sec to +read/write it where perl does it in 15 sec. These simple read/write +functions use the functions from the C standard library, don't they? So, +readline/write don't seem to be implemented very efficently ... (?) + +I can't read in the whole file as a single block, it's too big, if +readline/write is slow the program will never get realy fast :-( + + thanks a lot for discussion, + + Arne + + + + diff --git a/demo/ermis-f/python_m/cur/0284 b/demo/ermis-f/python_m/cur/0284 new file mode 100644 index 00000000..893372fe --- /dev/null +++ b/demo/ermis-f/python_m/cur/0284 @@ -0,0 +1,60 @@ +From: frederic.bonnet at ciril.fr (Frederic BONNET) +Date: Thu, 22 Apr 1999 14:10:42 +0200 +Subject: The Future of Tk? +References: <371E964F.C531C2A@istar.ca> +Message-ID: <371F11C2.3162025@ciril.fr> +Content-Length: 2310 +X-UID: 284 + +Hi, + +Eugene Dragoev wrote: +[...] +> But I also found that while older versions of Tk were using lightweight +> components (Some Java terminology :) the latest version is using native +> components for things like scrollbars and buttons. +> +> I don't want to say that this is bad for Tcl users but what about all +> the other languages that use Tk? Isn't writting multiplatform GUI harder +> using native components. I think Java made big step forward in +> abandoning the native components and using lightweight ones in Swing. +> +> Is there going to be any Tk implementation that will continue using +> lightweight components? + +By lightweight I guess you mean emulated in some way. I don't think that +cross-platform look&feel consistency is a good thing. As a GUI designer +I'd rather follow the principle of least astonishment: an app running on +Windows should look and feel like a Windows app. The same app running on +MacOS and X should do the same on the respective platforms. Such a +cross-platform application is not supposed to look and feel the same on +all platforms. If users want to use the same app on several platforms, +it's their problem, and I think this isn't an issue: if the same person +uses an application on both Mac and Windows, he or she is supposed to +know both platforms, so he won't be surprised if the same application +behave differently on different platforms. On the contrary he or she +would be surprised to use an application that behaves like a Mac app on +his Windows system. The current Tk implementation addresses these +problems in a transparent manner, which is good for both programmers and +users. + +A short summary of menubar differences between systems: + - they are placed on top of a window on Windows and X, and on top + of the screen on Mac. + - on Mac, the mouse button must be kept pressed to open and + navigate the menu (until recently). On X, one needs to click on + each menu to open it. On Windows, one needs to click on a menu + but doesn't need to keep the button pressed. + +And I don't speak about look differences. + +See you, Fred +-- +Fr?d?ric BONNET frederic.bonnet at ciril.fr +--------------------------------------------------------------- +"Theory may inform, but Practice convinces" + George Bain + + + + diff --git a/demo/ermis-f/python_m/cur/0285 b/demo/ermis-f/python_m/cur/0285 new file mode 100644 index 00000000..0367f817 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0285 @@ -0,0 +1,43 @@ +From: dfan at thecia.net (Dan Schmidt) +Date: 19 Apr 1999 00:28:33 GMT +Subject: Sorting tuples +References: <7fdkhf$12d$1@sparky.wolfe.net> +Message-ID: +X-UID: 285 + +On Sun, 18 Apr 1999 14:57:52 -0700, Jon Cosby wrote: +| I have a list of tuples +| [('a','p','q'),('b','r','s'),('c','t','u'),('a','v','w'),('b','x','y')], +| and I want to print out +| +| a : p, q, v, w +| b : r, s, x, y +| c : t, u + +This works: + +# Create a dictionary indexed by the first element of each tuple +tups = [('a','p','q'),('b','r','s'),('c','t','u'),('a','v','w'),('b','x','y')] +dict = {} +for tup in tups: + key, val = tup[0], tup[1:] + try: + dict[key] = dict[key] + list(val) + except KeyError: + dict[key] = list(val) + +import string +keys = dict.keys() +keys.sort() # keys is now a sorted list of the keys in dict +for key in keys: + print "%s : %s" % (key, string.join (dict[key], ", ")) + +-- + Dan Schmidt -> dfan at thecia.net, dfan at alum.mit.edu +Honest Bob & the http://www2.thecia.net/users/dfan/ +Factory-to-Dealer Incentives -> http://www2.thecia.net/users/dfan/hbob/ + Gamelan Galak Tika -> http://web.mit.edu/galak-tika/www/ + + + + diff --git a/demo/ermis-f/python_m/cur/0286 b/demo/ermis-f/python_m/cur/0286 new file mode 100644 index 00000000..e641addb --- /dev/null +++ b/demo/ermis-f/python_m/cur/0286 @@ -0,0 +1,37 @@ +From: MHammond at skippinet.com.au (Mark Hammond) +Date: Thu, 15 Apr 1999 15:52:27 +1000 +Subject: Can't run Win32 Debugger outside PythonWin +References: <371475d6.77664796@news.omnilink.de> <371555BD.70107860@fast.fujitsu.com.au> +Message-ID: <7f3uos$fjg$1@m2.c2.telstra-mm.net.au> +X-UID: 286 + +Neil Hodgson wrote in message <371555BD.70107860 at fast.fujitsu.com.au>... +>Stefan Franke wrote: +> +>> I just upgraded my NT4 SP3 Workstation to Python 1.5.2 and +>> win32all build 124. Unluckily I can't start the debugger any +>> longer from outside PythonWin. +>> That is, typing +>> +>> It seems the Scintilla.DLL can't be found (even the latest update from +the +>> author's hompage). However, sys.path is OK: + +sob. Ive seen this, and thought my update solved it. Ill check into it +more... + +> Sorry, I don't see this error myself. As a temporary workaround you +>could try copying Scintilla.DLL into the windows or windows system +>directory (often called \winnt\system32). + +That is the best idea for now. However, you will need to remember to delete +it when a new pythonwin build comes out (fairly soon) + +Mark. + + + + + + + diff --git a/demo/ermis-f/python_m/cur/0287 b/demo/ermis-f/python_m/cur/0287 new file mode 100644 index 00000000..ba8f731b --- /dev/null +++ b/demo/ermis-f/python_m/cur/0287 @@ -0,0 +1,32 @@ +From: mmc at vip.cybercity.dk (Morten Christensen) +Date: Thu, 15 Apr 1999 19:24:02 GMT +Subject: Fnorb for JPython ? (WAS: Fnorb 1.0 - A Python CORBA ORB) +References: +Message-ID: <371619a4.1287080@news.cybercity.dk> +X-UID: 287 + +On Wed, 14 Apr 99 16:59:36 GMT, Martin Chilvers +wrote: + +>Announcing the release of version 1.0 of 'Fnorb' a Python CORBA ORB. + +Great news! + +>Things on the TODO RSN list:- +> +>1) Implement the POA +>2) Implement the rest of the CORBA 2.1 datatypes +>3) Move documentation to PDF format. + +I would like to suggest support for JPython (for pure java) !!! + +:-) + +Keep up the good work! + +Thanks, +Morten Christensen + + + + diff --git a/demo/ermis-f/python_m/cur/0288 b/demo/ermis-f/python_m/cur/0288 new file mode 100644 index 00000000..f9eacd8d --- /dev/null +++ b/demo/ermis-f/python_m/cur/0288 @@ -0,0 +1,38 @@ +From: jbauer at rubic.com (Jeff Bauer) +Date: Sat, 24 Apr 1999 15:06:26 GMT +Subject: PythonCE +References: + <3721380C.C545A15@rubic.com> <7fshcn$68n$1@pollux.ip-plus.net> +Message-ID: <3721DDF2.E05C067E@rubic.com> +X-UID: 288 + +Franz GEIGER wrote: +> Is there a chance to have Tkinter someday on a CE +> machine. Or is it too mem consuming and impossible +> therefore? + +PythonWare's project-formerly-known-as-Topaz would +probably fit the bill. It's a small, tightly coded +Tk clone. We aren't likely to see it on the radar +screen anytime soon, alas. (Hoping to get a rise +out of /F, who will prove me wrong.) + +Another possibility would be for wxPython to run +on CE. This isn't as far-fetched as it might first +appear. Julian Smart's web site has already mentioned +some interest in this direction. If wxWindows were +ported to CE, wxPython/CE would be fairly straightforward. + +I am interested in promoting open source development +in this direction (PythonCE applications). If anyone +has specific, low-cost ideas, please discuss them on +this newsgroup or contact me via email. + +Best regards, + +Jeff Bauer +Rubicon, Inc. + + + + diff --git a/demo/ermis-f/python_m/cur/0289 b/demo/ermis-f/python_m/cur/0289 new file mode 100644 index 00000000..4a9bb2f9 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0289 @@ -0,0 +1,75 @@ +From: tim_one at email.msn.com (Tim Peters) +Date: Sun, 25 Apr 1999 13:13:26 -0400 +Subject: converting perl to python - simple questions. +In-Reply-To: <7fvagp$8lm$1@nnrp1.dejanews.com> +Message-ID: <000001be8f3e$eea9c3c0$d39e2299@tim> +Content-Length: 2025 +X-UID: 289 + +[sweeting at neuronet.com.my] +> ... +> Anyway, since I know that there are a few ex-perlmongers on the list, +> would somebody be so kind as to confirm whether I've translated +> the following code snippets correctly : +> +> a) Perl's "defined". +> [perl] +> if (defined($x{$token}) +> +> [python] +> if (x.has_key(token) and x[token]!=None) : + +If should be enough to do + + if x.has_key(token): + +under the probably-correct theory that the Perl is just asking "does hash +'x' have key 'token'?" "None" is a specific valid value, not at all +"undefined", so checking x[token] against None doesn't make sense unless +you've established your own consistent program-wide convention of using None +to *mean* something like undefined. Which is dicey. After e.g. "del +x[token]", a reference to x[token] doesn't yield None, it raises the +KeyError exception. + +> b) RE's. +> [perl] +> if ($mytext !~ /^\s$/) +> +> [python] +> if not (re.match('^\s$'), mytext) + +Hmm. The Perl says "if mytext isn't a single whitespace character", which +is an odd thing to check! If that's the intent, fine. Python's "match" +already constrains the search to begin at the start of the string, so the +leading "^" isn't needed (use Python's "search" if don't want that +constraint). So: + + if not re.match(r"\s$", mytext): + +Get in the habit of using r-strings for writing regexps; they'll make your +backslash life much easier. + +Another thing to note is that high-use regexps can be compiled, and if +they're always used in the same way (match vs search) you can capture that +choice too. So this may be more appropriate: + +is_single_whitespace = re.compile(r"\s$").match + +while whatever: + ... + if not is_single_whitespace(mytext): + ... + ... + +Hoisting the regexp compilation out of the loop can be a substantial win. + +> Since I know neither perl nor chinese, it would be nice if somebody +> could help me remove one of the variables in my debugging. + +native-speakers-of-both-say-chinese-is-easier-to-read-ly y'rs - tim + + + + + + diff --git a/demo/ermis-f/python_m/cur/0290 b/demo/ermis-f/python_m/cur/0290 new file mode 100644 index 00000000..db81e335 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0290 @@ -0,0 +1,60 @@ +From: doughellmann at mindspring.com (Doug Hellmann) +Date: Sat, 03 Apr 1999 17:37:29 -0500 +Subject: Tkinter problem (threads?) +References: +Message-ID: <37069828.89C5B08C@mindspring.com> +Content-Length: 2031 +X-UID: 290 + +Robert, + +You might want to look into the after_idle method available from the +Tkinter widget classes. It basically registers a function to be called +during the next "idle" period of the event loop. The idle period is +either after or before all normal events have been processed (I don't +know which). I have successfully used this technique in several +applications to do my processing "in the background" while the +interface remains responsive. + +The trick is to remember that while your idle function is running, the +interface *won't* update. Only after you return (or call +update_idletasks will it update. The best thing to do is make your idle +function perform only a small piece of your processing. + +For instance, in one program I had an idle function that polled several +pipes using select to see if any of them had output. When it found +output, it would read a small buffer, process it, and return. When it +found no output it would return immediately. That way, the interface +was very responsive, since my function didn't hang it up for very long. +I kept my state information (list of pipes, portion of buffer not +processed, etc.) as member variables of my application class. The idle +function was a method of the class, so I could access everything I +needed from the application instance. + +Oh, one other thing you need to know is that calling after_idle only +registers the function to be called one time. You will need to have +your function re-register itself if it has more processing to do. + +Let me know if you run into trouble, I'd be happy to help. + +Doug + + +Robert Vollmert wrote: +> +> I'm experiencing a problem while writing a simple plotting program +> using Tkinter: I've created a Plot class which, after being +> initialized with a canvas instance, gets new values through an add +> method. +> +> How can I make Tk enter the mainloop (in order to show the plot) and +> still add new values afterwards? +> +> TIA, Robert +> +> -- +> Robert Vollmert rvollmert at gmx.net + + + + diff --git a/demo/ermis-f/python_m/cur/0291 b/demo/ermis-f/python_m/cur/0291 new file mode 100644 index 00000000..c5a5381c --- /dev/null +++ b/demo/ermis-f/python_m/cur/0291 @@ -0,0 +1,91 @@ +From: arcege at shore.net (Michael P. Reilly) +Date: Sat, 03 Apr 1999 16:24:16 GMT +Subject: Put exception information into a string? +References: <8J6N2.457$Px6.74582@homer.alpha.net> +Message-ID: +Content-Length: 2540 +X-UID: 291 + +Fabian wrote: +: I've been having some odd problems.. +: It works in certain circumstances. For example if I have an plainly invalid +: object, it reports it right, such as "blah\n", or "import bad-name\n", but +: if I have an error +: such as "if a ==10\n b = 2\n" (missing ':'), it does not. what happens in +: this circumstance is: +:>:> lines = PyObject_CallFunction( +:>:> traceback_format_exception, "OOO", exc, val, tb) +: returns NULL into lines, and from then on the function does not want to +: return -anything- but NULL. + +: Thanks for all the help so far.. This is atleast useful in a way, but any +: ideas how to get it to work with these other situations? + +Without seeing your code, I can't say more. I tried this same string and +get the following on stderr. +' File "", line 1\n if a == 10\n ^\nSyntaxError: invalid + syntax\n' + +My little test code is below, maybe it can help. It compiled and ran with +gcc 2.7.2.2 on Solaris for Intel 2.6 with Python 1.5.1. + +And sorry for all the typos in the program, as I said, I wasn't able to +test it. :/ + + -Arcege + +#include +#include +#include + +int main(argc, argv) + int argc; + char *argv[]; + { char cmdstr[256]; + PyObject *traceback_format_exception; + PyObject *string_joinfields; + PyObject *mod, *moddict; + PyObject *exc, *val, *tb; + PyObject *lines, *exception_string; + int rc; + + /* setup */ + Py_Initialize(); + mod = PyImport_ImportModule("traceback"); + moddict = PyModule_GetDict(mod); + traceback_format_exception = + PyDict_GetItemString(moddict, "format_exception"); + Py_DECREF(mod); + Py_DECREF(moddict); + mod = PyImport_ImportModule("string"); + moddict = PyModule_GetDict(mod); + string_joinfields = + PyDict_GetItemString(moddict, "joinfields"); + Py_DECREF(mod); + Py_DECREF(moddict); + + /* strcpy(cmdstr, "import foobar"); */ + strcpy(cmdstr, "if a == 10\n b = 2\n"); + rc = PyRun_SimpleString(cmdstr); + + /* print the traceback to stderr */ + if (PyErr_Occurred()) + { PyErr_Fetch(&exc, &val, &tb); + lines = PyObject_CallFunction( + traceback_format_exception, "OOO", exc, val, tb + ); + exception_string = PyObject_CallFunction( + string_joinfields, "Os", lines, "" + ); + Py_DECREF(lines); + fprintf(stderr, PyString_AsString(exception_string)); + Py_DECREF(exception_string); + + Py_DECREF(exc); Py_DECREF(val); Py_DECREF(tb); + } + } + + + + + diff --git a/demo/ermis-f/python_m/cur/0292 b/demo/ermis-f/python_m/cur/0292 new file mode 100644 index 00000000..407fb797 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0292 @@ -0,0 +1,19 @@ +From: fuchs at princeton.edu (Ira H. Fuchs) +Date: Wed, 21 Apr 1999 13:35:02 -0400 +Subject: Reversing Long integers +Message-ID: <371E0C46.E6FA76A9@princeton.edu> +X-UID: 292 + +I am attempting to write an efficient Python program which can add an integer to +its reverse. This is quite easy to do in Lisp and Mathematica but (mostly out of +curiosity) I wanted to see how one might do this in Python. Converting an +integer to a string and reversing it and converting back is quite easy (although +not all of these ops are primitives) but the fact that Long integers have the +letter L appended means that the loop must include moving the L to the end of +the reversed string prior to summing. Can anyone think of a particularly clever +way to do this? + + + + + diff --git a/demo/ermis-f/python_m/cur/0293 b/demo/ermis-f/python_m/cur/0293 new file mode 100644 index 00000000..f54d439a --- /dev/null +++ b/demo/ermis-f/python_m/cur/0293 @@ -0,0 +1,18 @@ +From: hf at daisybytes.su.uunet.de (Holger Fl�rke) +Date: 13 Apr 1999 19:56:43 GMT +Subject: win32net.pyd--NetUserAdd +Message-ID: <37131b6c.2250115@kelly> +X-UID: 293 + +I am interested in adding user accounts on WinNT using python. The +functions "NetUserAdd" and "NetUserSetGroups" in Win32 networking +aren't implemented in then win32net.pyd-module. Does anyone have +mapped these functions? Any other ideas? + +Thanks + +HolgeR + + + + diff --git a/demo/ermis-f/python_m/cur/0294 b/demo/ermis-f/python_m/cur/0294 new file mode 100644 index 00000000..6aec127e --- /dev/null +++ b/demo/ermis-f/python_m/cur/0294 @@ -0,0 +1,17 @@ +From: barry at scottbb.demon.co.uk (Barry Scott) +Date: Fri, 23 Apr 1999 22:33:25 +0100 +Subject: Looking for db.h - its not in the 1.5.2 source kit +Message-ID: <924903339.24130.0.nnrp-10.9e982a40@news.demon.co.uk> +X-UID: 294 + +Can anyone point me at a copy of db.h that is required to build bsddb +windows +module please? Its missing from the final release 1.5.2 kit. + + BArry + + + + + + diff --git a/demo/ermis-f/python_m/cur/0295 b/demo/ermis-f/python_m/cur/0295 new file mode 100644 index 00000000..5954d864 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0295 @@ -0,0 +1,43 @@ +From: aa8vb at vislab.epa.gov (Randall Hopper) +Date: Mon, 5 Apr 1999 12:48:19 GMT +Subject: Possible regex match bug (re module) +Message-ID: <19990405084819.B802985@vislab.epa.gov> +X-UID: 295 + + Re doesn't handle named groups in alternative patterns like it seems +it should. Given an alternative pattern with a particular group name in +each, it only assigns the match if the group name matches the last +alterative. + +For example, the following example outputs: + + None + def + +rather than: + + abc + def + +(Note that I've simplified this example a good bit so the behavior is +apparent.) + +Randall + +------------------------------------------------------------------------------- + +import re + +pattern = '(---(?P[^-]*)---)|(===(?P[^=]*)===)' + +s = "---abc---" +match = re.compile( pattern ).match(s,0) +print match.group('id') + +s = "===def===" +match = re.compile( pattern ).match(s,0) +print match.group('id') + + + + diff --git a/demo/ermis-f/python_m/cur/0296 b/demo/ermis-f/python_m/cur/0296 new file mode 100644 index 00000000..ac0f43f7 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0296 @@ -0,0 +1,19 @@ +From: kranio at nospam.nospam.it (Kranio) +Date: Sat, 17 Apr 1999 09:53:48 GMT +Subject: Beginner - Tkinter info +Message-ID: <371c59e9.2723125@news.tin.it> +X-UID: 296 + +I am just starting using python and I would like to learn more. I have +about all the docs written by guido but I haven't found yet +documentation about tkinter usage. Can you help me? +Where I can find some example of both python and tkinter? + +Tnx + +Marco Buzzo +marco.buzzo at usa.NOSPAM.net + + + + diff --git a/demo/ermis-f/python_m/cur/0297 b/demo/ermis-f/python_m/cur/0297 new file mode 100644 index 00000000..466f567e --- /dev/null +++ b/demo/ermis-f/python_m/cur/0297 @@ -0,0 +1,21 @@ +From: sysadm at sysadm.cc (Julien Oster) +Date: 08 Apr 1999 08:27:43 +0200 +Subject: Lexical analyzers and parsers +Message-ID: <7jn20jmxsw.fsf@gandalf.midearth.fuzzys.org> +X-UID: 297 + +What about lexical analyzers and parsers? + +Under C I use bison/yacc and (f)lex. Under python, I can either implement this +stuff using C or try to write my parsers on my own, which is real pain. + +Is there no module suitable for such tasks? What do you suggest? + +-- + /--/ Julien Oster /---/ www.fuzzys.org <---> www.sysadm.cc /---/ + /--/ OpenBSD 2.5 /---/ Greetings from Munich, Germany /---/ +/--/ contact me : /---/ talk fuzzy at fuzzys.org or e-Mail me /---/ + + + + diff --git a/demo/ermis-f/python_m/cur/0298 b/demo/ermis-f/python_m/cur/0298 new file mode 100644 index 00000000..017591cb --- /dev/null +++ b/demo/ermis-f/python_m/cur/0298 @@ -0,0 +1,38 @@ +From: news at dorb.com (Darrell) +Date: Sat, 3 Apr 1999 17:13:33 -0500 +Subject: Rat sighting online +References: <19990403170011.21264.rocketmail@web602.mail.yahoo.com> +Message-ID: +X-UID: 298 + +Just commented this line out and it worked. Tricky though, it comes up as a +very small window that you have to look for. + + +Darrell wrote in message +news:p%uN2.960$8m5.1674 at newsr1.twcny.rr.com... +> I created the struct.py module and got this error. Guess I'll wait for the +> next version of Jpython. +> JPython 1.0.3 on java1.1.4 +> Copyright 1997-1998 Corporation for National Research Initiatives +> >>> import sys +> >>> sys.path.append('d:\\python\\lib') +> >>> import graph +> Traceback (innermost last): +> File "", line 1, in ? +> File "D:\at\sched\.\graph.py", line 202, in ? +> File "D:\at\sched\.\graph.py", line 116, in __init__ +> File "D:\at\sched\.\graph.py", line 131, in do_layout +> TypeError: can't assign to this attribute in java instance: size +> +> +> +> +> +> + + + + + + diff --git a/demo/ermis-f/python_m/cur/0299 b/demo/ermis-f/python_m/cur/0299 new file mode 100644 index 00000000..87c368b4 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0299 @@ -0,0 +1,83 @@ +From: faassen at pop.vet.uu.nl (Martijn Faassen) +Date: Fri, 23 Apr 1999 00:05:00 +0200 +Subject: Emulating C++ coding style +References: <371F8FB7.92CE674F@pk.highway.ne.jp> +Message-ID: <371F9D0C.4F1205BB@pop.vet.uu.nl> +Content-Length: 1924 +X-UID: 299 + +Thooney Millennier wrote: +> +> Hello Everyone! +> +> I usually use C++ ,so I want to make programs like +> I do using C++. + +Well, first of all, Python is not C++. Some C++ practices don't, and +shouldn't, translate to Python, and vice versa. Python coding style is +different than C++ coding style, just like Java is different yet again, +etc, etc. + +> I don't figure out how to implement the followings +> by Python. +> If you know any solutions,Please Help! +> +> 1. #define statements +> e.g. #define __PYTHON_INCLUDED__ +Why would you need this? You can use a dictionary and store this kind of +variable in there. + +> #define PYPROC(ARG) printf("%s",ARG) + +def pyproc(arg): + print "%s" % arg + +Python doesn't have a preprocessor. + +> 2. stream class +> e.g. cout << "hello python."< 3. const variables +> e.g. const int NOCHAGE=1; + +Though trickery is possible, Python does not strictly have any constant +variables. What you can do is use (global) variables with an preceding +underscore. When importing the module these variables are not +accessible. _like_this. + +> 4. access to class's members using "::" +> e.g. some_class::static_value +> e.g. some_class::static_func(x) + +Python does not support static methods (or 'class methods'). Usually a +module level global function suffices for this purpose. + +A static value can be created like this (besides using a global variable +in a module): + +class Foo: + self.shared = 1 + + def __init__(self): + print self.shared + + +Other people will likely come up or refer to the more complicated ways +to emulate these things in Python, but they're slower and nobody +actually seems to use them in practice. + +Python is more dynamic than C++, and that is reflected in the way the +language is used. I hope this helps. + +Regards, + +Martijn + + + + diff --git a/demo/ermis-f/python_m/cur/0300 b/demo/ermis-f/python_m/cur/0300 new file mode 100644 index 00000000..eb9be1d3 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0300 @@ -0,0 +1,30 @@ +From: akuchlin at cnri.reston.va.us (Andrew M. Kuchling) +Date: Tue, 27 Apr 1999 09:14:38 -0400 (EDT) +Subject: CGI post method +In-Reply-To: <7g31ah$hk2$1@sparky.wolfe.net> +References: <7g31ah$hk2$1@sparky.wolfe.net> +Message-ID: <14117.47102.615236.362798@amarok.cnri.reston.va.us> +X-UID: 300 + +Jon Cosby writes: +>Can somebody tell me what's wrong with the following form tag: +>
+> +>
+> +>My script isn't getting the text as input. + + It looks reasonable. Try changing the method to "GET" and see +if you wind up with /cgi-bin/fibo.py?value=10. What error are you +seeing? + +-- +A.M. Kuchling http://starship.python.net/crew/amk/ + "Mortal man?" + "Yes?" + "Beware of the dog." + -- Charon warns Orpheus, in SANDMAN: "The Song of Orpheus" + + + + diff --git a/demo/ermis-f/python_m/cur/0301 b/demo/ermis-f/python_m/cur/0301 new file mode 100644 index 00000000..d82a12df --- /dev/null +++ b/demo/ermis-f/python_m/cur/0301 @@ -0,0 +1,35 @@ +From: kevin at cocreator.com (Kevin K. Ehmka) +Date: Thu, 15 Apr 1999 09:00:06 -0400 +Subject: PIL fonts - Where are you? +References: <7jbR2.3071$YU1.5576@newsr2.twcny.rr.com> +Message-ID: +X-UID: 301 + +Oleg Broytmann wrote in message ... +>On Wed, 14 Apr 1999, Kevin K. Ehmka wrote: +>> Does anybody have some ready made fonts in PIL format they want to share? +A +> +> I avn send you some. I'v compiled them from BDF fonts. English parts of +>these fonts are ASCII, but characters from 128 up are Cyrillic (Russian). +> If you have some BDF fonts, I could try to compile them to PIL format. +> +>> web site maybe? I was unsuccessful today creating any. +> +> What's the problem? +> + +I'm using the compiled binaries of PIL (from Starship) and fail to get +pilfont to work on several BDF fonts. I even used a font maker program and I +get different errors. Using 1.0b I get encoder errors. Using 0.3 PIL I get +array bounds errors. + +If you could, Oleg, please email me some of yours. Thank you. + + + + + + + + diff --git a/demo/ermis-f/python_m/cur/0302 b/demo/ermis-f/python_m/cur/0302 new file mode 100644 index 00000000..44d3ed49 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0302 @@ -0,0 +1,41 @@ +From: mark at chem.uwa.edu.au (Mark C Favas) +Date: 19 Apr 99 08:31:56 GMT +Subject: Python-1.5.2 testing zlib +References: +Message-ID: +Content-Length: 1131 +X-UID: 302 + +piers at cs.su.oz.au (Piers Lauder) writes: + +>My "make check" fails with a core dump after "test_zlib". +>Runng that test by hand shows: + +> Bus error - core dumped + +>(My system: +> : s Python-1.5.2 ; uname -a +> SunOS staff 5.6 Generic_105181-05 sun4u sparc SUNW,Ultra-2 +> : s Python-1.5.2 ; ./python +> Python 1.5.2 (#2, Apr 17 1999, 20:08:31) [GCC 2.8.1] on sunos5 + +Works just fine for me on both DEC Alpha +(uname -a: OSF1 hostname V4.0 878 alpha, +python: Python 1.5.2 (#1, Apr 16 1999, 15:49:36) [C] on osf1V4) +and Solaris +(uname -a: SunOS hostname 5.6 Generic sun4m sparc SUNW,SPARCstation-10, +python: 1.5.2 (@1, Apr 16 1999, 17:38:58) [GCC egcs-2.90.29 980515 (egcs-1.0.3 +re on sinos5) + +These are both with zlib-1.1.3. + +-- +Email - mark at chem.uwa.edu.au ,-_|\ Mark C Favas +Phone - +61 9 380 3482 / \ Department of Chemistry +Fax - +61 9 380 1005 ---> *_,-._/ The University of Western Australia + v Nedlands +Loc - 31.97 S, 115.81 E Western Australia 6009 + + + + diff --git a/demo/ermis-f/python_m/cur/0303 b/demo/ermis-f/python_m/cur/0303 new file mode 100644 index 00000000..e34ee46f --- /dev/null +++ b/demo/ermis-f/python_m/cur/0303 @@ -0,0 +1,52 @@ +From: python at pinky.cchem.berkeley.edu (python at pinky.cchem.berkeley.edu) +Date: 20 Apr 1999 08:28:08 GMT +Subject: Tkinter: some Labels not updating +Message-ID: <7fhdqo$dnl$1@agate.berkeley.edu> +Content-Length: 1232 +X-UID: 303 + +Hi, + +I'm writing a small app using Python and Tkinter and I'm having trouble +with some Label objects not updating when I set the StringVar object +attached to the textvariable of the Label. + +My Tkinter window has a Canvas with a bitmap image in one Frame, +pull down menus in another Frame, and a few Buttons and Labels. The +Labels are supposed to indicate the values of certain variables which +change when the user clicks on the canvas. The first Label changes, +but the others don't, they stay fixed at the values they had when +I created the Label. + +Is there a trick here or something I don't get? + +I first create the StringVar: + + self.X1v=StringVar() + +Then I initialize X1v: + + self.X1v.set("X1: not entered") + +Then I make a Label object + + self.l1=Label(tb, textvariable=self.X1v) + self.l1.pack(side=TOP) + +Then in the mouse callback (yes, it gets run, I have it print to stdout) + + self.X1v.set("X1: Got It") + +But no update of the text in the label happens. Updates _do_ happen +in another Label object that is in a Frame by itself. Do I need a +separate Frame for each Label? Do I have too many Label objects? +Any workarounds? Post or e-mail replys. + +Thanks, + +JDM -- python enthusiast whose reach exceeds his grasp. :) + + + + + diff --git a/demo/ermis-f/python_m/cur/0304 b/demo/ermis-f/python_m/cur/0304 new file mode 100644 index 00000000..3b7f6510 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0304 @@ -0,0 +1,25 @@ +From: barry at scottbb.demon.co.uk (Barry Scott) +Date: Fri, 9 Apr 1999 20:42:37 +0100 +Subject: Embedding python question: PyRun_String only returns None not what I calculate +References: <923433832.14002.0.nnrp-07.9e982a40@news.demon.co.uk> <7ee5pk$qkm$1@m2.c2.telstra-mm.net.au> +Message-ID: <923762064.17505.0.nnrp-03.9e982a40@news.demon.co.uk> +X-UID: 304 + +>Hopefully someone with more time can give a better answer... +> +>But the short story is that PyRun_String works with statements, not +>expressions. You can use it to, eg, import modules, and even call +>functions, but you cant get the result. + +I guess I'll have to try and understand how the interactive python shell +works. (I got lost in the details last time...) + +This whole area is in need of docs or extra comments in the sources. + + Barry + + + + + + diff --git a/demo/ermis-f/python_m/cur/0305 b/demo/ermis-f/python_m/cur/0305 new file mode 100644 index 00000000..33425907 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0305 @@ -0,0 +1,40 @@ +From: fuming at sup.phys.washington.edu (Fuming Wang) +Date: Tue, 20 Apr 1999 05:06:00 -0700 +Subject: Quick fix to add "+=" +In-Reply-To: +References: <3717AB14.2926AF76@mediaone.net> <3717EE20.41343593@mediaone.net> +Message-ID: +X-UID: 305 + +Hi, + +On 17 Apr 1999, Bernhard Reiter wrote: + +> Your editor is your friend: +> +> Just use a macro in your favorite editor, which grabs the left +> word of the curser postion and expands it into +> =+ +> Trigger the macro with "+=" and you type excactly what you +> always type, just the result is more python like. +> +> For vim, the following does the trick (without the special word matching caps +> new vim versions provide. the ":noh is for people using hlsearch in +> vim 5.x version.) +> +> +> :map!^[:s/\([a-zA-Z_][a-zA-Z0-9_]*\)$/\1=\1+/^M:noh^MA +> +> Bernhard +> + +This works for me, except I got "no mapping found" when I enter the +suggested command. I am using vim 5.3. Is this the problem? + +Thanks! +Fuming + + + + + diff --git a/demo/ermis-f/python_m/cur/0306 b/demo/ermis-f/python_m/cur/0306 new file mode 100644 index 00000000..0589e631 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0306 @@ -0,0 +1,69 @@ +From: jschiotz at hotmail.com (Jakob Schiotz) +Date: Tue, 27 Apr 1999 14:39:36 GMT +Subject: WARNING: AIX and dynamic loading. +Message-ID: <7g4i77$qif$1@nnrp1.dejanews.com> +Content-Length: 2475 +X-UID: 306 + + +Hi everybody, + +I would like to warn developers using AIX against this trap waiting +for us to fall into. (I am cross-posting this to the SWIG mailing list +although it is not strictly a SWIG problems, as SWIG users will be +doing just the kind of stuff that gets you into trouble). + +SCENARIO: +You are developing a dynamically loaded C module for Python (or +possibly for other languages). You place the module in a directory on +the PYTHONPATH. That directory is NFS mounted. Or you are loading +the module directly from the directory where you compiled it, and that +directory is NFS mounted. + +SYMPTOMS: +You are improving the code, but it does not seem to have any effect at +all. Eventually you realise that Python is loading the buggy version +of your module that you tried out this morning, although _all_ copies +on disk are the new improved version you just wrote ! + +PROBLEM: +If you copy the module to the PYTHONPATH directory using cp, the old +file gets overwritten, but keeps the same inode number. Apparently, +the AIX dynamical loader is caching the module somewhere, and does not +discover that the file has been modified. (If the directory is not NFS +mounted cp will fail with an error message saying that you cannot +overwrite a running program - although the program has stopped.) + +It is _possible_ that this only occurs if the module you wrote causes +python to dump core. It certainly makes it frustrating to fix the +bug as you continue to get the version that dumps core loaded into +python, even after you fixed the bug. + +SOLUTION: +You makefile should remove the old module (the .so file) before copying the +new version into the installation directory. Then the file gets a new +inode number and the loader discovers that it has been changed. If +you ever load the module directly from the development directory you +should also remove the .so file before compiling/linking, as you will +otherwise get hit by the same bug. + + +I just wanted to warn you all about this bug in AIX. I wasted too much time +on this last Friday :-( + +Best regards, + +Jakob Schiotz + +-- +Jakob Schiotz, CAMP and Department of Physics, Tech. Univ. of Denmark, +DK-2800 Lyngby, Denmark. http://www.fysik.dtu.dk/~schiotz/ +This email address is used for newsgroups and mailing lists +(spam protection). Official email: schiotz @ fysik . dtu . dk + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/0307 b/demo/ermis-f/python_m/cur/0307 new file mode 100644 index 00000000..b6a05ffe --- /dev/null +++ b/demo/ermis-f/python_m/cur/0307 @@ -0,0 +1,16 @@ +From: jlcos at accessone.com (Jon Cosby) +Date: Mon, 5 Apr 1999 11:13:22 -0700 +Subject: Freeze for Windows +Message-ID: <923335978.611.91@news.remarQ.com> +X-UID: 307 + +Is it possible to configure 'freeze' for the Win32 binary installation of +Python 1.52? If so, what do I need to do? + +Jon Cosby + + + + + + diff --git a/demo/ermis-f/python_m/cur/0308 b/demo/ermis-f/python_m/cur/0308 new file mode 100644 index 00000000..a959ef16 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0308 @@ -0,0 +1,69 @@ +From: ivanlan at callware.com (Ivan Van Laningham) +Date: Mon, 26 Apr 1999 21:15:42 GMT +Subject: Python too slow for real world +References: <372068E6.16A4A90@icrf.icnet.uk> + <3720A21B.9C62DDB9@icrf.icnet.uk> + <3720C4DB.7FCF2AE@appliedbiometrics.com> + <3720C6EE.33CA6494@appliedbiometrics.com> + + + <37215EFB.433AFCA6@prescod.net> + + <3724B2D6.B468687A@prescod.net> +Message-ID: <3724D77E.66254D78@callware.com> +Content-Length: 2247 +X-UID: 308 + +Pythonistas-- + +Roy Smith wrote: +> +> I hope this doesn't sound as bad as I fear it might, but part of being a +> good programmer (or at least a good computer scientist) is to understand +> performance issues like this. +> +> Regular expression theory hasn't changed a whole bunch in the last 20 +> years; it's the same stuff in C, Perl, and any other language that has RE +> functionality (either built-in or through some library). The idea of +> factoring constant operations out of loops is the same today is it was 10, +> 20, 30 years ago. +> +> If you don't know that RE's get compilied (and that the compilation stage +> can be expensive), you don't understand the tool you're using. If you +> don't understand that factoring the expensive constant compilation process +> out of a loop is important to make your program run fast, you aren't a +> good programmer. No programming language can help that. +> + +Roy, you're absolutely right. However, the person who originally posted +the question (and I'm sorry, but I've forgotten who) was speaking from a +newbie's viewpoint. Stuff that most of us on the list take for granted +is not always obvious to someone who is new both to the language and to +the field in general. And, things that are obvious in C or C++ or some +other language are not always obvious when moving to a new language, and +some idioms simply don't exist in some languages. Look at the questions +posted the other day by the person who wanted to know how to do things +in Python that he had to do all the time in C++ ... it was just not +obvious to him that those were neither necessary nor desirable in +Python. + +In sum, I think tips on how to optimize source code need to be part of +the introductory documentation of any language; not everyone has gone to +school and learned these things in Pascal 101, and even if they have +there are idioms that won't translate. + +-ly y'rs, +Ivan +---------------------------------------------- +Ivan Van Laningham +Callware Technologies, Inc. +ivanlan at callware.com +http://www.pauahtun.org +See also: +http://www.foretec.com/python/workshops/1998-11/proceedings.html +Army Signal Corps: Cu Chi, Class of '70 +---------------------------------------------- + + + + diff --git a/demo/ermis-f/python_m/cur/0309 b/demo/ermis-f/python_m/cur/0309 new file mode 100644 index 00000000..f6f55156 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0309 @@ -0,0 +1,39 @@ +From: euroibc at solair1.inter.NL.net (Martin van Nijnatten) +Date: Wed, 21 Apr 1999 11:44:34 +0200 +Subject: opening more than 1 file +References: <371CB255.5FCAFBAF@solair1.inter.NL.net> <371CBF75.10FA1EE6@mojam.com> +Message-ID: <371D9E02.B0511625@solair1.inter.NL.net> +X-UID: 309 + +Thanks, this answers my question. +Thanks, this answers my question. + + +Skip Montanaro wrote: + +> martin van nijnatten wrote: +> > +> > I have a variable, which can have a value in the range from 1 to 20. +> > +> > If the value is 7, I have to open 7 files. +> > +> > What could be an elegant way of doing this? +> +> Well, how about: +> +> files = [] +> for i in range(nfiles): +> files.append(open("/tmp/file%03d"%i, "wb")) +> +> then access the i-th file as files[i]? +> +> -- +> Skip Montanaro | Mojam: "Uniting the World of Music" +> http://www.mojam.com/ +> skip at mojam.com | Musi-Cal: http://www.musi-cal.com/ +> 518-372-5583 + + + + + diff --git a/demo/ermis-f/python_m/cur/0310 b/demo/ermis-f/python_m/cur/0310 new file mode 100644 index 00000000..bd0549ba --- /dev/null +++ b/demo/ermis-f/python_m/cur/0310 @@ -0,0 +1,45 @@ +From: trashcan at david-steuber.com (David Steuber) +Date: 22 Apr 1999 21:41:52 -0400 +Subject: New python user seeks comments +References: <371DA955.9F13B144@pop.vet.uu.nl> <371E2DEE.C2BD5A58@pop.vet.uu.nl> +Message-ID: +Content-Length: 1133 +X-UID: 310 + +Martijn Faassen writes: + +-> Chad McDaniel wrote: +-> +-> ['in' is a reserved word so can't be used as a variable name] +-> +-> > It seems that Python could have mentioned that to the user. +-> +-> True, though it does say this: +-> +-> File "", line 2 +-> in = open("test.txt", "r") +-> ^ +-> SyntaxError: invalid syntax +-> +-> Could be better, but easily could've been far worse.. + +This is what threw me. I got the syntax error. I had no clue what +was wrong with the syntax though. I have gotten so used to using in +for the input file and out for the output file in other languages. + +-- +David Steuber +http://www.david-steuber.com + +If you wish to reply by mail, _please_ replace 'trashcan' with 'david' +in the e-mail address. The trashcan account really is a trashcan. + +.. The Anarchists' [national] anthem is an international anthem that +consists of 365 raspberries blown in very quick succession to the tune +of "Camptown Races". Nobody has to stand up for it, nobody has to +listen to it, and, even better, nobody has to play it. + -- Mike Harding, "The Armchair Anarchist's Almanac" + + + + diff --git a/demo/ermis-f/python_m/cur/0311 b/demo/ermis-f/python_m/cur/0311 new file mode 100644 index 00000000..8d2f735f --- /dev/null +++ b/demo/ermis-f/python_m/cur/0311 @@ -0,0 +1,13 @@ +From: bxqiyh at virtualbanner.com (bxqiyh at virtualbanner.com) +Date: Mon, 26 Apr 1999 16:17:36 GMT +Subject: Banner Exchange 8313 +Message-ID: +X-UID: 311 + +Has anyone seen that new banner exchange out there. Its called VirtualBanner. They are giving away 25000 free impressions just for signing up. They also have a FULL TIME 2:1 exchange ratio and do banner promotion. Check them out at http://www.virtualbanner.com +odxfqsusqfltrtuxbpvihvuwuvbnxswwrdwhhfgsrxpllmuiqiidltnfoqogzpbvhyrerpflwloysukehcucgdfvnbnuybuinc + + + + + diff --git a/demo/ermis-f/python_m/cur/0312 b/demo/ermis-f/python_m/cur/0312 new file mode 100644 index 00000000..85bce3d2 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0312 @@ -0,0 +1,42 @@ +From: William.H.Duquette at jpl.nasa.gov (William H. Duquette) +Date: Wed, 28 Apr 1999 14:58:13 GMT +Subject: try vs. has_key() +References: +Message-ID: <37247ea3.494305@news.jpl.nasa.gov> +X-UID: 312 + +On Fri, 23 Apr 1999 14:13:59 +0300, Moshe Zadka + wrote: + + +>d={} +>for word in words: +> first_two=word[:2] +> d[first_two]=d.get(first_two, []).append(word) +> +>Unfortunately, few people seem to know about the ``get'' method, which +>is really good. + +This doesn't seem to work. For example, here's a python +interpreter session: + +>>> d = {} +>>> a = 'Foo' +>>> d[a] = d.get(a, []).append('Bar') +>>> d +{'Foo': None} +>>> + +I'd have expected to see {'Foo': 'Bar'}, but that's not what I get. + +I'm using Python 1.5.2, by the way. + +Will Duquette +-------------------------------------------------------------------------- +Will Duquette, JPL | William.H.Duquette at jpl.nasa.gov +But I speak only | http://eis.jpl.nasa.gov/~will (JPL Use Only) +for myself. | It's amazing what you can do with the right tools. + + + + diff --git a/demo/ermis-f/python_m/cur/0313 b/demo/ermis-f/python_m/cur/0313 new file mode 100644 index 00000000..99c95b5e --- /dev/null +++ b/demo/ermis-f/python_m/cur/0313 @@ -0,0 +1,20 @@ +From: gscot at my-dejanews.com (gscot at my-dejanews.com) +Date: Thu, 08 Apr 1999 16:28:16 GMT +Subject: POST request +Message-ID: <7eilen$g9o$1@nnrp1.dejanews.com> +X-UID: 313 + +To All: I would like to write a short program that would play a game +found on the Internet. I cannot find any documentation on how to make a POST +request. It is a stock market game. You fill out a form with the symbol and +number of share you want to buy or sell. The form uses the POST method to +send the data. Since I cannot just put this information in the url I am not +sure how to write a program to automate this procese. Is there any way to do +that with Python. Thank you for your help. Gary + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/0314 b/demo/ermis-f/python_m/cur/0314 new file mode 100644 index 00000000..a6941327 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0314 @@ -0,0 +1,36 @@ +From: roy at popmail.med.nyu.edu (Roy Smith) +Date: Wed, 14 Apr 1999 11:28:18 -0400 +Subject: forking + stdout = confusion +References: <87n20caldg.fsf@spock.localnet.de> +Message-ID: +X-UID: 314 + +clarence at silcom.com (Clarence Gardner) wrote: +> That does indeed do the trick, but you probably had to os.close(2) also. +> (Both stdout and stderr normally are piped into Apache.) + +I don't know how all Apaches work, but at least on our machine, cgis get +pipes for stdin and stdout, but stderr is connected directly to the error +log file. I wrote a little test cgi which is just: + +> #!/bin/sh +> sleep 300 + +opened http://my.host.name/cgi-bin/roy/sleeper.cgi and ran lsof, which is +a neat utility which mucks about in the kernel's file tables and shows you +what files a process has open. I got: + +COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME +sleep 25247 nobody 0r FIFO 0x04a6ff00 0 22787 +sleep 25247 nobody 1w FIFO 0x04096e00 0 22788 +sleep 25247 nobody 2w VREG 3049,395040 4420204 90 +/www/logs/error_log + +-- +Roy Smith +New York University School of Medicine + + + + + diff --git a/demo/ermis-f/python_m/cur/0315 b/demo/ermis-f/python_m/cur/0315 new file mode 100644 index 00000000..38d38016 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0315 @@ -0,0 +1,26 @@ +From: davecook at home.com (David M. Cook) +Date: Thu, 29 Apr 1999 10:13:48 GMT +Subject: Designing Large Systems with Python +References: <372599D6.C156C996@pop.vet.uu.nl> <7g4a3l$atk$1@news.worldonline.nl> <7g99pj$b1$1@news.worldonline.nl> +Message-ID: +X-UID: 315 + +On Thu, 29 Apr 1999 11:54:58 +0200, Ilja Heitlager wrote: + +>OK, A UNIX guy (that will change ;-) + +Yes, soon you will *all* be Linux guys. Resistance is futile. You will be +assimilated. + +Now to add something to the discussion, you might want to check out Extreme +programming: + +http://c2.com/cgi/wiki?ExtremeProgrammingRoadmap + +It seems to be popular with SmallTalk people. + +Dave Cook + + + + diff --git a/demo/ermis-f/python_m/cur/0316 b/demo/ermis-f/python_m/cur/0316 new file mode 100644 index 00000000..9463c284 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0316 @@ -0,0 +1,36 @@ +From: nhead at esoc.esa.de (Nigel Head) +Date: Mon, 26 Apr 1999 09:21:18 +0200 +Subject: precompiled MySQL.pyd anyone ? (NT workstation) +References: <7fsu50$bss$1@nnrp1.dejanews.com> +Message-ID: <372413EE.A2DE88C8@esoc.esa.de> +X-UID: 316 + +I too have moved away from MySQL at the moment so I don't have any newer +version +than Jeff. In fact, Jeff probably has the only version as I seem to have +misplaced +my copies :-( + +Nigel. + +PS: Planning says I'll be back on MySQL July time frame .... I'll have +to catch up +on the version changes then (if s'one else hasn't already done it that +is!). + +sweeting at neuronet.com.my wrote: +> +> Digging up a previous thread but asking anyone working on NT/Win32 : +> is there a precompiled MySQL.pyd anywhere ? Have checked the starship +> members' pages and python site without luck. +[...] + +> >I have a copy of Nigel Head's (?) win32/MySQL dynamic +> >link libraries: libmySQL.dll and MySQL.pyd. I've used +[...] +> > +> >Jeff Bauer + + + + diff --git a/demo/ermis-f/python_m/cur/0317 b/demo/ermis-f/python_m/cur/0317 new file mode 100644 index 00000000..b3372218 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0317 @@ -0,0 +1,36 @@ +From: a.eyre at optichrome.com (Adrian Eyre) +Date: Mon, 19 Apr 1999 08:27:14 GMT +Subject: #!/usr/bin/env python -u +In-Reply-To: <37175574.25EBDDBE@stuco.uni-klu.ac.at> +References: <37175574.25EBDDBE@stuco.uni-klu.ac.at> +Message-ID: <000501be8a3e$6e7269f0$2bcbd9c2@optichrome.com> +X-UID: 317 + +> (I need the -u for unbuffered output) but when creating RPM files the +> final rpms needs /usr/local/bin/python. + +How about a hack like this: + +import sys + +class UnbufferedStdout: + def __init__(self, stdout): + self.stdout = stdout + def write(self, arg): + self.stdout.write(arg) + self.stdout.flush() + +sys.stdout = UnbufferedStdout(sys.stdout) + +-------------------------------------------- +Adrian Eyre +Optichrome Computer Solutions Ltd +Maybury Road, Woking, Surrey, GU21 5HX, UK +Tel: +44 1483 740 233 Fax: +44 1483 760 644 +http://www.optichrome.com +-------------------------------------------- + + + + + diff --git a/demo/ermis-f/python_m/cur/0318 b/demo/ermis-f/python_m/cur/0318 new file mode 100644 index 00000000..c759d432 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0318 @@ -0,0 +1,30 @@ +From: tomjenkins at my-dejanews.com (tomjenkins at my-dejanews.com) +Date: Tue, 27 Apr 1999 19:00:26 GMT +Subject: GUI other than Tkinter +References: <3721567f.1748033@news> <372360df.5406764@news.teleweb.at> +Message-ID: <7g51g7$9m8$1@nnrp1.dejanews.com> +X-UID: 318 + +In article <372360df.5406764 at news.teleweb.at>, + e9025657 at stud3.tuwien.ac.at wrote: +> >As far as I know, GTk has not been ported to the Win32 platform, yet. +> thats not correct. have a look at +> +> http://user.sgic.fi/~tml/gimp/win32/ +> +> kaweh +> + +While its true that GTK is being ported to Win32, I don't think that pyGTK can +be used on Win32 yet. (for one there is a GTK.py and a gtk.py in the +distribution, hmmm tain't gonna work on winders) + +Tom + + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/0319 b/demo/ermis-f/python_m/cur/0319 new file mode 100644 index 00000000..fcc3bf40 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0319 @@ -0,0 +1,84 @@ +From: Vladimir.Marangozov at inrialpes.fr (Vladimir Marangozov) +Date: Thu, 08 Apr 1999 05:56:52 +0200 +Subject: Chaning instance methods +References: +Message-ID: <370C2904.A6F4BD54@inrialpes.fr> +Content-Length: 2832 +X-UID: 319 + +Jody Winston wrote: +> +> I don't understand how to change instance methods. For example: +> ... +> What am I forgetting? + +On a first thought, you seem to forget Python's internals (that you're +supposed to forget, BTW) and people helped you generously on this by +introducing you, and me, to trickery. + +On a second thought, I'll follow their example ;-) but I'll try to do it +the easy (OO) way; it's easy enough not to be described so far, but it +seems more logical to me, so here goes. + +If Foo is a class and f is an instance of Foo, by changing the instance +method f.m (for whatever insane reason), one augments f's behavior beyond +the limits prescribed by Foo. By doing so, one withdraws f from the set of +"similar" objects, instances of Foo, that share a common set of properties +(operations), defined by the Foo class. (right, this is Object theory). + +Indeed, f becomes some particular object which is no more part of the Foo +gang. Pushing that further, we have reasons to believe that after the +change, we're in a situation where f belongs to some Bar gang, where +Foo and Bar differ only in the 'm' method, just like if f were an instance +of Bar from the start. + +In fact, it is Bar that has the desired augmented interface, not f. +Bar is the incarnation of the desired incremental code evolution +done the OO way through class inheritance (not with instance hacking). + +Thus we arrive at the easy & boring solution, which goes along these lines: +(it's an instance hack too, but a recognized one in metaobject communities) + +>>> class Foo: +... def m(self): +... print "Foo.m" +... +>>> f = Foo() +>>> f.m() +Foo.m +>>> +>>> def m2(self): +... print "m2" +... +>>> class Bar(f.__class__): pass +... +>>> Bar.m = m2 +>>> +>>> f.__class__ = Bar # f changes its camp +>>> f.m() +m2 + +Since we do ignore Python's internals, we do not notice that the +price to pay by f for deserting the Foo gang & joining Bar's is +an additional level of indirection for all accesses to Foo's methods. + +The good news are that if f is really a rebel instance and it wants +to change camps frequently, one can use the dedicated Bar proxy class +for storing new methods at will, without affecting Foo, nor its instances. +In a sense, this also avoids the tricky solutions resulting from +peculiarities of the class/instance implementation -- a good candidate +for major changes in Python2. We won't escape these changes, unless we +manage to increase bus traffic around CNRI or so ;-) + +To make a long story short, what you're trying to do is not very cool, +so perhaps you don't get truly cool answers, but still, you can do it +in Python. Fortunately, what you're asking here is not common practice, +I hope! + +-- + Vladimir MARANGOZOV | Vladimir.Marangozov at inrialpes.fr +http://sirac.inrialpes.fr/~marangoz | tel:(+33-4)76615277 fax:76615252 + + + + diff --git a/demo/ermis-f/python_m/cur/0320 b/demo/ermis-f/python_m/cur/0320 new file mode 100644 index 00000000..5e14c3c7 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0320 @@ -0,0 +1,24 @@ +From: jbauer at rubic.com (Jeff Bauer) +Date: Tue, 13 Apr 1999 15:30:24 GMT +Subject: rfc822 date header +Message-ID: <37136310.62A6BE1A@rubic.com> +X-UID: 320 + +Jeremy Hylton wrote: +> If you write it, I'll lobby :-). + +As a first pass, we could do lots worse than Chris Lawrence's +GMT version (untested). + +def strdate(self, timeval=None): + from time import gmtime, strftime, time + if timeval is None: + timeval = time() + return "Date: %s" % strftime('%a, %d %b %Y %H:%M:%S GMT', +gmtime(timeval)) + +-Jeff + + + + diff --git a/demo/ermis-f/python_m/cur/0321 b/demo/ermis-f/python_m/cur/0321 new file mode 100644 index 00000000..5f65f5d8 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0321 @@ -0,0 +1,28 @@ +From: scothrel at cisco.com (Scott Cothrell) +Date: Fri, 16 Apr 1999 10:06:05 -0500 +Subject: Change for compiling 1.5.2 on Windows NT Alpha +References: <7f6l71$20e$1@towncrier.cc.monash.edu.au> +Message-ID: <7f7je1$8t9$1@news-sj-3.cisco.com> +X-UID: 321 + +Jonathan Giddy wrote in message <7f6l71$20e$1 at towncrier.cc.monash.edu.au>... +>"Scott C" writes: +> +>>There needs to be the following change in file fpectlmodule.c, line 163: +> +>>Line currently reads: #elif defined(__alpha) +> +>>line should read: #elif defined(__alpha) && !defined(_MSC_VER) +> +>Or to follow the comments more obviously, change it to +>#elif defined(__alpha) && defined(__osf__) +> +>Jon. + +Ya, that'd work :o) + + + + + + diff --git a/demo/ermis-f/python_m/cur/0322 b/demo/ermis-f/python_m/cur/0322 new file mode 100644 index 00000000..e4036ade --- /dev/null +++ b/demo/ermis-f/python_m/cur/0322 @@ -0,0 +1,35 @@ +From: bernhard at alpha1.csd.uwm.edu (Bernhard Reiter) +Date: 20 Apr 1999 17:19:05 GMT +Subject: Quick fix to add "+=" +References: <3717AB14.2926AF76@mediaone.net> <3717EE20.41343593@mediaone.net> +Message-ID: +X-UID: 322 + +On Tue, 20 Apr 1999 05:06:00 -0700, Fuming Wang wrote: + +>On 17 Apr 1999, Bernhard Reiter wrote: +>> For vim, the following does the trick (without the special word matching caps +>> new vim versions provide. the ":noh is for people using hlsearch in +>> vim 5.x version.) +>> +>> :map!^[:s/\([a-zA-Z_][a-zA-Z0-9_]*\)$/\1=\1+/^M:noh^MA + + +>This works for me, except I got "no mapping found" when I enter the +>suggested command. I am using vim 5.3. Is this the problem? + +uh, I have been not precise enough and just outlined the idea. + +:map! += ^[:s/\([a-zA-Z_][a-zA-Z0-9_]*\)$/\1=\1+/^M:noh^MA + +Where ":" means go into vim Commandmode + "^[" means Esc, you have to enter it pressing Ctrl-v and then Esc + "^M" means "Return', you have to enter pressing Ctrl-v and then Return + +Does that help? :) + Bernhard + + + + + diff --git a/demo/ermis-f/python_m/cur/0323 b/demo/ermis-f/python_m/cur/0323 new file mode 100644 index 00000000..97d18edc --- /dev/null +++ b/demo/ermis-f/python_m/cur/0323 @@ -0,0 +1,62 @@ +From: htrd90 at zepler.org (Toby Dickenson) +Date: Thu, 08 Apr 1999 20:38:00 GMT +Subject: COM Event Sinks and Connection Points in Python +References: <7eggfh$o0f$1@nnrp1.dejanews.com> <7egnl2$ca5$1@m2.c2.telstra-mm.net.au> +Message-ID: <3711134d.17632096@news.freeserve.net> +Content-Length: 2025 +X-UID: 323 + +(posted, and copied to Mark) + +"Mark Hammond" wrote: + +> +>cingram at my-dejanews.com wrote in message +><7eggfh$o0f$1 at nnrp1.dejanews.com>... +>>I am trying to use functionality from a DLL that requires me to create a +>COM +>>event sink so that it can call back with events. I am trying to write this +>>event sink in Python. However, when I try to create a SimpleConnection +>>object, it gives this exception: "Unable to open the access token of the +>>current thread". +> +>There appears to be some problem using connection points from Python.exe. +>Some objects - mainly OCX controls - only fire event when running inside +>Pythonwin as an OCX. + +For controls this is to be expected. They are allowed to be fairly +non-functional until activated, which requires a control site. They might +implement IDispatch, but they can not be used a 'just' an automation server. + +>The "threading bug" I mention isnt the same as this. The threading bug will +>actually cause Python to die completely with an access violation. I am +>fairly certain they are not related. + +I read that comment a while ago, and Ive been meaning to investigate since then. +Well, my next project will be using events, and this post reminded me, so I +thought I would take a look. + +If I remove the extra 'return' from testPyComTest.py then I always get a +Fatal Python error: PyThreadState_Get: no current thread +Is this the bug you mean? I think I have some answers.... + +I believe this problem is not caused by a bug in pythoncom, but by several bugs +in PyCOMTest, the C++ server that complements this test harness. + +In PyCOMImpl.cpp, line 49, a new thread is started. That thread uses the Fire +method of the CPyCOMTest object, however this breaks the COM apartment rules. To +pass an object reference across apartments you need to use +CoMarshalInterThreadInterfaceInStream, at least once. + +Secondly, the new thread does not call CoInitializeEx. + +Hopefully I will have time to dig further next week. + +I hope this helps, + +Toby Dickenson + + + + + diff --git a/demo/ermis-f/python_m/cur/0324 b/demo/ermis-f/python_m/cur/0324 new file mode 100644 index 00000000..1e9d8996 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0324 @@ -0,0 +1,48 @@ +From: mal at lemburg.com (M.-A. Lemburg) +Date: Fri, 9 Apr 1999 15:53:57 GMT +Subject: OpenSSL/X.509 +References: <7e1hiq$a71$1@Starbase.NeoSoft.COM> + <7ear25$ksf$1@news-sj-3.cisco.com> + <14089.11820.416453.80124@bitdiddle.cnri.reston.va.us> + <3709C8BE.4257C9F1@lemburg.com> <14090.16807.950025.496495@bitdiddle.cnri.reston.va.us> <370A78B6.2C18D10F@lockstar.com> <370BE48E.2BA9750C@lemburg.com> <370E3C56.D035A3FB@lockstar.com> +Message-ID: <370E2295.31A119F0@lemburg.com> +Content-Length: 1535 +X-UID: 324 + +Mordy Ovits wrote: +> +> M.-A. Lemburg wrote: +> > +> >>I have a fairly complete SWIGing of OpenSSL/SSleay working. I made it on +> >>company time, so I have to get company permission to release it. If there is +> >>real interest, I'll push for us to release it. It does all the X.509 stuff, is +> > > very OO, and builds on win32 and unices. +> > > Interested? +> > +> > Sure, but if your company is US based, then chances are high +> > you won't be able to share the code outside the US... that's +> > why I started mxCrypto, BTW.\ +> +> That's debatable. The SWIG bindings contain no crypto code in their own right. +> It is merely glue to crypto code. I wouldn't be able to release statically +> prebuilt libraries, but why would I want to anyway? Our lawyers keep waffling +> on this, which is why I haven't released it already. I'm really pleased with +> it, and would love give something back to the Python community. How +> long before we Americans are reduced to doing Crypto with a deck of cards? (See +> Bruce Schneier's Solitaire). + +Well, the NCSA folks did something similar in their WWW server (they +included bindings to some crypto-lib for authentication) and +were called back by the NSA... but maybe the situation is different +now. + +-- +Marc-Andre Lemburg Y2000: 266 days left +--------------------------------------------------------------------- + : Python Pages >>> http://starship.skyport.net/~lemburg/ : + --------------------------------------------------------- + + + + + diff --git a/demo/ermis-f/python_m/cur/0325 b/demo/ermis-f/python_m/cur/0325 new file mode 100644 index 00000000..eec8d586 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0325 @@ -0,0 +1,38 @@ +From: mal at lemburg.com (M.-A. Lemburg) +Date: Fri, 23 Apr 1999 09:43:34 GMT +Subject: Emulating C++ coding style +References: <371F8FB7.92CE674F@pk.highway.ne.jp> +Message-ID: <372040C6.76C8320B@lemburg.com> +X-UID: 325 + +Thooney Millennier wrote: +> +> Hello Everyone! +> +> 2. stream class +> e.g. cout << "hello python."<>> import StringList,sys +>>> cout = StringList.StringList() +>>> endl = '\n' +>>> cout << "hello python" << endl +StringList: ['hello python', '\012'] +>>> cout.pack() >> sys.stdout +hello python + +-- +Marc-Andre Lemburg Y2000: 252 days left +--------------------------------------------------------------------- + : Python Pages >>> http://starship.skyport.net/~lemburg/ : + --------------------------------------------------------- + + + + + diff --git a/demo/ermis-f/python_m/cur/0326 b/demo/ermis-f/python_m/cur/0326 new file mode 100644 index 00000000..51a61176 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0326 @@ -0,0 +1,22 @@ +From: tjreedy at udel.edu (Terry Reedy) +Date: 25 Apr 1999 01:58:48 GMT +Subject: wrapped around the axle on regexpressions and file searching +References: <7frhe0$8g1$1@nnrp1.dejanews.com> +Message-ID: <7ftsso$r0$1@news.udel.edu> +X-UID: 326 + +[code to find and process files ending in .log] + +>2. is there a better, faster way of doing this??, + +For matching literal text, string.find, .rfind, .index, .rindex +are faster that regexes. Since you want to match text at end only, + if filename[-4:] == '.log' +will be even faster. + +TJR + + + + + diff --git a/demo/ermis-f/python_m/cur/0327 b/demo/ermis-f/python_m/cur/0327 new file mode 100644 index 00000000..d3194491 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0327 @@ -0,0 +1,26 @@ +From: nickb at earth.ox.ac.uk (Nick Belshaw) +Date: Tue, 13 Apr 1999 11:48:20 +0100 +Subject: How libpython1.5.so +Message-ID: <371320F4.5338600B@earth.ox.ac.uk> +X-UID: 327 + +If anyone can spare a second - + +Whilst trying to get Python plugins to work on Gnumeric-0.23 I bumped up +against the need for libpython1.5.so.0.0.0 + +I have 'The Full Python' ( - thats the sequel to 'The Full Monty' !!! ) + +and can build xxxx.a no problem but what do I have to do to get xxxx.so +Can't seem to find anything specific on it in the docs or readme or +Setup and my knowledge is too superficial to allow me to be clever. + +Help anyone? + +cheers +Nick/Oxford Geochemistry + + + + + diff --git a/demo/ermis-f/python_m/cur/0328 b/demo/ermis-f/python_m/cur/0328 new file mode 100644 index 00000000..bf775e25 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0328 @@ -0,0 +1,25 @@ +From: tim_one at email.msn.com (Tim Peters) +Date: Thu, 29 Apr 1999 03:07:17 -0400 +Subject: converting perl to python - simple questions. +In-Reply-To: +Message-ID: <000e01be920e$ea9e6880$199e2299@tim> +X-UID: 328 + +[Aahz Maruch] +> ... +> Perl 5 has been out for more than two years, and there are so many +> improvements that I don't know of *anyone* who's doing new work +> in Perl 4. + +I do -- one crusty Unix sysadmin in particular who doesn't trust "all that +new stuff", still using his "better the devil you know" old Perl4. +He won't use Python either. I subscribe him to functional-language mailing +lists just to keep him off balance . + +perl-has-72-iterations-to-go-to-catch-up-to-fortran77-ly y'rs - tim + + + + + + diff --git a/demo/ermis-f/python_m/cur/0329 b/demo/ermis-f/python_m/cur/0329 new file mode 100644 index 00000000..38196fd9 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0329 @@ -0,0 +1,41 @@ +From: trashcan at david-steuber.com (David Steuber) +Date: 28 Apr 1999 03:23:49 -0400 +Subject: Designing Large Systems with Python +References: <3725CA37.2027327D@lemburg.com> +Message-ID: +Content-Length: 1275 +X-UID: 329 + +"M.-A. Lemburg" writes: + +-> Not sure what your "cowboy" style looks like, but Python is just +-> great for designing well-organized OO apps with components using +-> pattern paradigms [...add all your favorite buzzwords here...]. + +Try to imagine object oriented spaghetti. This is what happens when +analysis, design, and coding all happen at the same time. + +-- +David Steuber +http://www.david-steuber.com + +If you wish to reply by mail, _please_ replace 'trashcan' with 'david' +in the e-mail address. The trashcan account really is a trashcan. + +So as your consumer electronics adviser, I am advising you to donate +your current VCR to a grate resident, who will laugh sardonically and +hurl it into a dumpster. Then I want you to go out and purchase a vast +array of 8-millimeter video equipment. + +.. OK! Got everything? Well, *too bad, sucker*, because while you +were gone the electronics industry came up with an even newer format +that makes your 8-millimeter VCR look as technologically advanced as +toenail dirt. This format is called "3.5 hectare" and it will not be +made available until it is outmoded, sometime early next week, by a +format called "Elroy", so *order yours now*. + -- Dave Barry, "No Surrender in the Electronics + Revolution" + + + + diff --git a/demo/ermis-f/python_m/cur/0330 b/demo/ermis-f/python_m/cur/0330 new file mode 100644 index 00000000..ceea2f0d --- /dev/null +++ b/demo/ermis-f/python_m/cur/0330 @@ -0,0 +1,50 @@ +From: aa8vb at vislab.epa.gov (Randall Hopper) +Date: Fri, 23 Apr 1999 12:37:14 GMT +Subject: Pointers to variables +In-Reply-To: <021801be8d86$0d3ba7a0$f29b12c2@pythonware.com>; from Fredrik Lundh on Fri, Apr 23, 1999 at 02:37:27PM +0200 +References: <19990422121403.A279051@vislab.epa.gov> <19990423080721.A344578@vislab.epa.gov> <021801be8d86$0d3ba7a0$f29b12c2@pythonware.com> +Message-ID: <19990423083714.A321566@vislab.epa.gov> +Content-Length: 1074 +X-UID: 330 + +Fredrik Lundh: + |> but this one doesn't: + |> + |> (3) min = 0 + |> max = 0 + |> for ( var, val ) in [( min, 1 ), ( max, 100 )]: + |> var = val + | + |here, you tell python to change the binding for the name "var" + |in the local name space so it points to the same thing as the + |name "val". + +Ahh (light bulb goes on). Makes sense. I should have seen that (need my +morning caffeine). + +When the "for" iterates, var is really an alias for min and max's storage +-- what you want. But the problem is you can't "change" the value of +storage with assignment to var (that just rebinds var). + +And Python being "pointerless" there is no: + + *var = val +or: + memcpy( var, val, sizeof(*var) ) + +-like construct. So you have to resort to other means (setattr). + + |> So basically this is just a little asymmetry in the language. Putting a + |> variable in a list/tuple (valueof(var)) performs a shallow copy rather than + |> a deep copy. + | + |nope. content is never copied. only references. all the time. + |perfect symmetry. + +Thanks. + +Randall + + + + diff --git a/demo/ermis-f/python_m/cur/0331 b/demo/ermis-f/python_m/cur/0331 new file mode 100644 index 00000000..e77608b4 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0331 @@ -0,0 +1,20 @@ +From: lutz at rmi.net (Mark Lutz) +Date: Sun, 4 Apr 1999 13:48:29 -0600 +Subject: Rat sighting online +Message-ID: <7e8fd3$er2$1@news1.rmi.net> +X-UID: 331 + +jkraai at murl.com writes about Learning Python: +> I can't resist, can we refer to it as: +> +> _Nixon_in_a_Nutshell_? + +I don't care how you refer to it, as long as you do ;-). + +--Mark Lutz (http://rmi.net/~lutz) + + + + + + diff --git a/demo/ermis-f/python_m/cur/0332 b/demo/ermis-f/python_m/cur/0332 new file mode 100644 index 00000000..c6ed4e1b --- /dev/null +++ b/demo/ermis-f/python_m/cur/0332 @@ -0,0 +1,38 @@ +From: lvirden at cas.org (lvirden at cas.org) +Date: 6 Apr 1999 12:10:21 GMT +Subject: Is Python dying? +References: <7dos4m$usi$1@nnrp1.dejanews.com> <7e30fp$8vf$1@news1.rmi.net> <14085.18282.936883.727575@bitdiddle.cnri.reston.va.us> +Message-ID: <7ectjd$516$1@srv38s4u.cas.org> +Content-Length: 1256 +X-UID: 332 + +According to Jeremy Hylton : +:This is really useless information, but I guess I along with most + +:Title Amazon.com Sales Rank +:Learning Python 1,570 +:Programming Python 1,685 +:Python : Pocket Reference 3,218 +:Internet Programming With Python 8,720 +:Mastering Regular Expressions 931 +:Programming Perl, 2nd ed. 81 +:Perl Cookbook 136 +:The C Programming Language 478 +:The C++ Programming Language 1,003 +:Tcl and the Tk Toolkit 3,362 + + +Elsewhere in this thread there have been discussions regarding the fact +that it's been several years since the last major Python book was released. +However, notice that the C Programming Language book is in the top 500 and +it is quite a few years old! Same for the Tcl and the Tk Toolkit book - +that reflects Tcl 7.3 (5 or so yrs ago) and people are still buying it... +-- + Quote: Saving the world before bedtime. +<*> O- +Unless explicitly stated to the contrary, nothing in this posting +should be construed as representing my employer's opinions. + + + + diff --git a/demo/ermis-f/python_m/cur/0333 b/demo/ermis-f/python_m/cur/0333 new file mode 100644 index 00000000..45da3505 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0333 @@ -0,0 +1,27 @@ +From: peter.stoehr at weihenstephan.org (Dr. Peter Stoehr) +Date: Sat, 24 Apr 1999 22:34:46 +0200 +Subject: Python and "Hand held" computers +Message-ID: <37222AE6.E6C8F713@weihenstephan.org> +X-UID: 333 + +Hi Python-Fans, + +I'm a great fan of python and I'm now looking for an hand held computer +(something smaller than a laptop) that can be programmed with python. + +Is there a WEB page or any other place were I can find information about +this +topic? + +Thanks in advance + Peter + +-- +--------------------------------------------------------------------------- + Dr. Peter Stoehr --- Teisenbergweg 6 --- 85435 Erding --- 08122/47232 +--------------------------------------------------------------------------- + I'm the terror that flaps through the night + + + + diff --git a/demo/ermis-f/python_m/cur/0334 b/demo/ermis-f/python_m/cur/0334 new file mode 100644 index 00000000..e4c07a1a --- /dev/null +++ b/demo/ermis-f/python_m/cur/0334 @@ -0,0 +1,42 @@ +From: news at helen.demon.nl (Ilja Heitlager) +Date: Tue, 27 Apr 1999 14:29:35 +0200 +Subject: Designing Large Systems with Python +References: <372599D6.C156C996@pop.vet.uu.nl> +Message-ID: <7g4a3l$atk$1@news.worldonline.nl> +Content-Length: 1068 +X-UID: 334 + +>What I am wondering about is the suitability of Python for specifying, +>a large system and building a prototype. I have gotten myself rather +>entrenched in the cowboy style and I would love it if Python supported +>that for larger systems. +My first contacts with Python were with JPython. I got interested for it's +use in unit-testing Java-classes. Now I am building prototypes with C-Python +and I love it. +Both the C and Java versions allow me to harden the code and transform the +Proto to +production code, if speed is necessary + +To build larger systems you need classes and modules for abstraction and +reuse. +To build proto's you need interactive programming and short code-debug +cycles. +Need GUI's? MFC or tcl/tk? +Networking, Parsers, XML, HTML, regex? + +ehh, Python? + +> One other thing. Is the documentation that comes with Python +> sufficient to gain mastery of the language, or should I consider +> buying (yet) another book? + + +The online-documentation and examples were sufficient for me, but I love +paper refs and +everbody should have Programming Python + + + + + + diff --git a/demo/ermis-f/python_m/cur/0335 b/demo/ermis-f/python_m/cur/0335 new file mode 100644 index 00000000..684e30a7 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0335 @@ -0,0 +1,53 @@ +From: bwarsaw at python.org (bwarsaw at python.org) +Date: Thu, 29 Apr 1999 18:46:57 -0400 (EDT) +Subject: New JPython domain and website +Message-ID: <14120.57697.662134.718114@anthem.cnri.reston.va.us> +Content-Length: 1357 +X-UID: 335 + +JPython users, + +I'm please to announce the new Web site for JPython, the 100% Pure +Java implementation of Python. Please come visit + + http://www.jpython.org/ + +and update your links. The old site +still exists but it will not be updated and will eventually go away. +My thanks to Cathy Rey of CNRI for her help in getting the new site +looking so good. + +A few other notables: + +- I'm starting a new bugs database using Jitterbug. The old bug + reports won't (yet?) be converted but you should use the new system + to report any future bugs. The URL for this is + + http://www.jpython.org/jpython-bugs + +- The next release of JPython will be covered by a new license, which + I believe is more "open". All existing releases of JPython are + still covered under the old license, but there will be a new release + soon. For more information, please see + + http://www.jpython.org/newlicenses.html + + We also have updated permission forms for contributions (which we're + encouraging!). See + + http://www.jpython.org/bugrelease.html + + for more information. + +- I'd like to collect a list of JPython users, similar to the one + maintained for Python itself. If you're interested in being listed, + please see + + http://www.jpython.org/Users.html + +Enjoy, and stay tuned for announcements of the next release. +-Barry + + + + diff --git a/demo/ermis-f/python_m/cur/0336 b/demo/ermis-f/python_m/cur/0336 new file mode 100644 index 00000000..3a43dd28 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0336 @@ -0,0 +1,33 @@ +From: joe at strout.net (Joe Strout) +Date: Fri, 23 Apr 1999 17:19:14 -0700 +Subject: I NEED MAJOR HELP +References: +Message-ID: +X-UID: 336 + +[[ This message was both posted and mailed: see + the "To," "Cc," and "Newsgroups" headers for details. ]] + +In article , sportsnutz + wrote: + +> Ive never programmed before and i need some tips on some command to work +> this thing + +Tip #1: when you have a problem, ask a SPECIFIC question. Include what +exactly you're trying to do, what kind of computer you're trying to do +it on, what you've tried already, and what happened. + +Cheers, +-- Joe + +-- +,------------------------------------------------------------------. +| Joseph J. Strout Biocomputing -- The Salk Institute | +| joe at strout.net http://www.strout.net | +`------------------------------------------------------------------' +Check out the Mac Web Directory! http://www.strout.net/macweb.cgi + + + + diff --git a/demo/ermis-f/python_m/cur/0337 b/demo/ermis-f/python_m/cur/0337 new file mode 100644 index 00000000..b2204962 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0337 @@ -0,0 +1,102 @@ +From: gony at my-dejanews.com (gony at my-dejanews.com) +Date: Wed, 28 Apr 1999 03:14:27 GMT +Subject: HELP - FTP seesions using python???????? +References: <7g328l$hga$1@nnrp1.dejanews.com> +Message-ID: <7g5ueh$3pt$1@nnrp1.dejanews.com> +Content-Length: 2532 +X-UID: 337 + +thanks for the samples + +I'll work my way through them and figure out what they do and how they do it + +another small question in perl the #!/usr/local/bin/perl is not needed when +run on a windows machine, does it matter for Python on a windows machine +whether this line is present or not? + + +In article , + aahz at netcom.com (Aahz Maruch) wrote: +> In article <7g328l$hga$1 at nnrp1.dejanews.com>, wrote: +> > +> >any links or tips etc on how to tackle automation of FTP sessions using +python +> >would be most appreciated. +> +> Here's a sample; there aren't any comments (proof that Python can be +> almost as obscure as Perl ;-), but it shouldn't be *that* hard to read: +> +> #!/usr/local/bin/python +> +> import sys, os, ftplib, string +> +> def getpass(prompt = "Password: "): +> import termios, TERMIOS, sys +> fd = sys.stdin.fileno() +> old = termios.tcgetattr(fd) +> new = termios.tcgetattr(fd) +> new[3] = new[3] & ~TERMIOS.ECHO # lflags +> try: +> termios.tcsetattr(fd, TERMIOS.TCSADRAIN, new) +> passwd = raw_input(prompt) +> finally: +> termios.tcsetattr(fd, TERMIOS.TCSADRAIN, old) +> print +> return passwd +> +> if len ( sys.argv ) < 4 : +> raise 'Must have three arguments: host[:path], user[:passwd], and file' +> +> HostPath = sys.argv[1] +> pos = string.find ( HostPath, ':' ) +> if pos > 0 : +> host = HostPath[0:pos] +> if ( pos + 1 ) == len ( HostPath ) : +> path = "" +> else: +> path = HostPath[(pos+1):] +> else : +> host = HostPath +> path = "" +> +> UserPass = sys.argv[2] +> pos = string.find ( UserPass, ':' ) +> if pos > 0 : +> user = UserPass[0:pos] +> if ( pos + 1 ) == len ( UserPass ) : +> passwd = "" +> else: +> passwd = UserPass[(pos+1):] +> else : +> user = UserPass +> passwd = getpass() +> +> filename = sys.argv[3] +> pos = string.rfind ( filename, '/' ) +> if pos > 0 : +> basename = filename[pos:] +> else : +> basename = filename +> +> fd = open ( filename ) +> ftp = ftplib.FTP ( host, user, passwd ) +> ftp.cwd ( path ) +> ftp.storbinary ( 'STOR %s' % basename, fd, 1024 * 16 ) +> ftp.close() +> +> fd.close() +> -- +> --- Aahz (@netcom.com) +> +> Hugs and backrubs -- I break Rule 6 <*> http://www.rahul.net/aahz/ +> Androgynous poly kinky vanilla queer het +> +> Hi! I'm a beta for SigVirus 2000! Copy me into your .sigfile! +> + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/0338 b/demo/ermis-f/python_m/cur/0338 new file mode 100644 index 00000000..97b38690 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0338 @@ -0,0 +1,17 @@ +From: japiinfo at aol.com (Japiinfo) +Date: 21 Apr 1999 19:40:51 GMT +Subject: Y2K +Message-ID: <19990421154051.04475.00000063@ng-fz1.aol.com> +X-UID: 338 + +Automatic Year 2000 data conversions/code verifications available from +Japi Info Corporation. + +Free demos available. + +For more information, please visit our web site at: www.japiinfo.com +or send us an E-mail to: y2k at japiinfo.com + + + + diff --git a/demo/ermis-f/python_m/cur/0339 b/demo/ermis-f/python_m/cur/0339 new file mode 100644 index 00000000..28146551 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0339 @@ -0,0 +1,45 @@ +From: Lance_Ellinghaus at marshall.com (Lance Ellinghaus) +Date: Wed, 7 Apr 1999 23:03:15 GMT +Subject: oracledb-0.1.2 and python 1.5.2b2 +Message-ID: <8825674C.007EA461.00@marshall.com> +X-UID: 339 + +I got it to compile by adding the necessary makefile rules from a previous +makefile into the makefile that is installed +from 1.5.2b2. Once that was done, everything compiles fine. Sorry for taking +list space. + +Lance + + +-------From: Lance Ellinghaus on 4/7/99 3:59:40 PM------- + +From: Lance Ellinghaus +To: python-list +cc: +Subject: oracledb-0.1.2 and python 1.5.2b2 + + + + + + + +Has anyone gotten these two things to compile together and run? +I am having trouble with the compile. Looks like something changed in the +Makefile on Python 1.5.2b2 from +previous python make files that makes oracledb-0.1.2 not compile. + + +Can anyone help?? + +Thanks, + +Lance + + + + + + + diff --git a/demo/ermis-f/python_m/cur/0340 b/demo/ermis-f/python_m/cur/0340 new file mode 100644 index 00000000..8398a246 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0340 @@ -0,0 +1,76 @@ +From: tismer at appliedbiometrics.com (Christian Tismer) +Date: Fri, 30 Apr 1999 13:02:43 GMT +Subject: Python IS slow ! [was] Re: Python too slow for real world +References: <613145F79272D211914B0020AFF6401914DAD8@gandalf.digicool.com> + + + <7g9qmo$luf$1@news.udel.edu> + <372965CA.2B3FD2FE@appliedbiometrics.com> <19990430080805.B776752@vislab.epa.gov> +Message-ID: <3729A9F3.75B2692B@appliedbiometrics.com> +Content-Length: 2601 +X-UID: 340 + + +Randall Hopper wrote: +> +> Christian Tismer: +> |Terry Reedy wrote: +> |> A batch-mode optimizer analyzing an entire file (module) should be able to +> |> detect whether or not function names are rebound. +> |> +> |> Perhaps module bindings should be considered immutable from outside the +> |> module unless explicitly declared otherwise. +> | +> |I'm thinking of no new keyword, but a mechanism which allows me to lock a +> |namespace somehow. +> +> I like this idea in concept. Though I would prefer a way to have +> namespaces "lock by default". Examples: After a class definition, the +> class function dictionary is locked. After a module is fully read, all +> references are bound and the module namespace is locked. etc. + +Well, I wouldn't do that by default. By default, everything +could stay as it is. First of all, this would not break any +existing code. Then, many people will want to +fine tune their modules, and they are perhaps not done +after a class definition was ready. + +Then, what would you do with classes which depend on each +other? You cannot lock them immediately, this would fail. +Locking them after they both are defined is fine, since +everything is defined then. With minimum effort and no +language changes, this will be needed. + +Then think of all the more difficult systems which need +more effort to become configured. The xml parsers together +with SAX are an example. If I wanted to lock this, then +this must be done with care. One would also not lock the mixin +classes, but only the final workhorse class, bound with +the correctly selected parser, and so on. + +It might also be necessary to find a way to specify which +attributes may be locked and which not, since there exist +indeed cases where Python's super-flexibility is needed :-) + +Depending on how exactly will be implemented, a single line +at the end of a module should suffice to accomplish this stuff +for the standard cases. Fine adjustment would take a little more. +As a side effect, locking a module would also find all +referenced but undefined symbols. + +Anyway, this is still no cakewalk and quite a lot of code +is involved. Needs much more thinking... + +ciao - chris + +-- +Christian Tismer :^) +Applied Biometrics GmbH : Have a break! Take a ride on Python's +Kaiserin-Augusta-Allee 101 : *Starship* http://starship.python.net +10553 Berlin : PGP key -> http://wwwkeys.pgp.net +PGP Fingerprint E182 71C7 1A9D 66E9 9D15 D3CC D4D7 93E2 1FAE F6DF + we're tired of banana software - shipped green, ripens at home + + + + diff --git a/demo/ermis-f/python_m/cur/0341 b/demo/ermis-f/python_m/cur/0341 new file mode 100644 index 00000000..877d9acc --- /dev/null +++ b/demo/ermis-f/python_m/cur/0341 @@ -0,0 +1,25 @@ +From: akuchlin at cnri.reston.va.us (Andrew M. Kuchling) +Date: Wed, 28 Apr 1999 09:11:03 -0400 (EDT) +Subject: Python implementation of tar +In-Reply-To: <372595AE.C27E7E50@phoenix-edv.netzservice.de> +References: <7ftjjl$tim$1@nnrp1.dejanews.com> + <372595AE.C27E7E50@phoenix-edv.netzservice.de> +Message-ID: <14119.2190.827661.960717@amarok.cnri.reston.va.us> +X-UID: 341 + +Holger Jannsen writes: +>frankmcgeough at my-dejanews.com schrieb: +>> Does someone has a tar implementation written in Python? + + Try Clement Hintze's tarlib.py: +ftp://ftp.python.org/pub/python/contrib/System/tarlib.py + +-- +A.M. Kuchling http://starship.python.net/crew/amk/ +Things have been a little turbulent of late. *Late* being the operative word. + -- Cain watches the Dreaming crumble, in SANDMAN #67: "The Kindly Ones:11" + + + + + diff --git a/demo/ermis-f/python_m/cur/0342 b/demo/ermis-f/python_m/cur/0342 new file mode 100644 index 00000000..bef6bf09 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0342 @@ -0,0 +1,42 @@ +From: david_ascher at yahoo.com (David Ascher) +Date: Tue, 13 Apr 1999 19:21:03 GMT +Subject: New Python Book err on Page 265 +Message-ID: <19990413192103.6940.rocketmail@web606.mail.yahoo.com> +Content-Length: 1044 +X-UID: 342 + +--- Sam Schulenburg wrote: +> I received the new Programming Python book + +Just for accuracy's sake, it's called "Learning +Python" -- it is not a new edition of Mark's +Programming Python. + +> and found an error on Page 265 in +> the get_temperature(country,state,city) function. + +Thanks for the bug report (I wouldn't be surprised if +it's due to a change in the web page format -- as we +presciently =) talk about in our description of the +program in the text -- then again, it could also be a +production bug). We'll add your fix to the errata +page, probably kept at Mark's site. + +In general, I suggest that bug reports about the book +be sent directly either to Mark Lutz (lutz at rmi.net) or +myself (da at python.net). No need to clutter the list +with them. + +--David Ascher +=== +--david ascher + da at ski.org is my permanent address -- use it instead of + david_ascher at yahoo.com +_________________________________________________________ +Do You Yahoo!? +Get your free @yahoo.com address at http://mail.yahoo.com + + + + + diff --git a/demo/ermis-f/python_m/cur/0343 b/demo/ermis-f/python_m/cur/0343 new file mode 100644 index 00000000..9a5e3dce --- /dev/null +++ b/demo/ermis-f/python_m/cur/0343 @@ -0,0 +1,51 @@ +From: paul at prescod.net (Paul Prescod) +Date: Tue, 27 Apr 1999 17:51:25 GMT +Subject: RE's in Python syntax +References: <372068E6.16A4A90@icrf.icnet.uk> + <3720A21B.9C62DDB9@icrf.icnet.uk> + <3720C4DB.7FCF2AE@appliedbiometrics.com> + <3720C6EE.33CA6494@appliedbiometrics.com> + + + <37215EFB.433AFCA6@prescod.net> + + <3724B2D6.B468687A@prescod.net> + + <37252816.42634501@Lugoj.Com> +Message-ID: <3725F91D.4F9D6373@prescod.net> +Content-Length: 1374 +X-UID: 343 + +Roy Smith wrote: +> +> The thread was moving in the direction of "my program using regex is too +> slow, and I think the solution would be to move regex into the python core +> to make it faster". I was just pointing out why that is flawed reasoning. + +But it isn't flawed reasoning. There are many arguments for moving +something into the core and many arguments for keeping something OUT of +the core, and "performance in the hands of a newbie" strikes me as a valid +argument for inclusion. Simplicity of expression is another. + +I also completely understand the arguments *against* built-in REs. I +haven't pushed this proposal because I realize that the costs and benefits +are about equal. Had you enumerated the costs I would have agreed and the +thread would be over. + +What I read in your message was an attempt to deprecate an entire class of +benefit: performance in the hands of newbies. I personally think that this +is one of the factors that we should continue to try and balance. + +-- + Paul Prescod - ISOGEN Consulting Engineer speaking for only himself + http://itrc.uwaterloo.ca/~papresco + +"Microsoft spokesman Ian Hatton admits that the Linux system would have +performed better had it been tuned." +"Future press releases on the issue will clearly state that the research +was sponsored by Microsoft." + http://www.itweb.co.za/sections/enterprise/1999/9904221410.asp + + + + diff --git a/demo/ermis-f/python_m/cur/0344 b/demo/ermis-f/python_m/cur/0344 new file mode 100644 index 00000000..f5a91592 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0344 @@ -0,0 +1,33 @@ +From: nothing at nowhere.com (-------------) +Date: Sun, 18 Apr 1999 13:30:23 -0500 +Subject: Parsing C++ headers with Python +Message-ID: <371A24BF.E3341937@nowhere.com> +X-UID: 344 + +As part of an effort to make our documentation more automatic (at least +to the +degree that we can generate reports on header changes), I'd like to be +able to +parse out c++ headers from Python. I'm not looking for "complete" +parsing abilitiies-- +the parser can assume that the headers are syntactically correct, can +ignore most +macro preprocessors, etc. etc. Does anyone know of a package to do this? +Does +anyone have a good set of regular expressions to do this? Please email +responses +to ken at be.com, as unfortunately I don't get much of a chance to read +newsgroups-- +the connection to a newsgroup server from home is currently slow, and +there +is no newsgroup server at work. + +Thanks in advance! +Ken McDonald +Tech Writer, Be, Inc. +ken at be.com + + + + + diff --git a/demo/ermis-f/python_m/cur/0345 b/demo/ermis-f/python_m/cur/0345 new file mode 100644 index 00000000..e7eaa167 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0345 @@ -0,0 +1,18 @@ +From: davecook at home.com (David M. Cook) +Date: Sat, 17 Apr 1999 15:18:43 GMT +Subject: Beginner - Tkinter info +References: <371c59e9.2723125@news.tin.it> +Message-ID: +X-UID: 345 + +On Sat, 17 Apr 1999 09:53:48 GMT, Kranio wrote: + +>Where I can find some example of both python and tkinter? + +Try http://www.pythonware.com + +Dave Cook + + + + diff --git a/demo/ermis-f/python_m/cur/0346 b/demo/ermis-f/python_m/cur/0346 new file mode 100644 index 00000000..f87947ff --- /dev/null +++ b/demo/ermis-f/python_m/cur/0346 @@ -0,0 +1,41 @@ +From: jam at newimage.com (jam) +Date: Mon, 26 Apr 1999 08:18:42 -0400 +Subject: timeout on urllib.urlopen? +In-Reply-To: ; from Steffen Ries on Mon, Apr 26, 1999 at 07:59:50AM -0400 +References: <7g0r7c$gn9$1@nnrp1.dejanews.com> <19990426061959.A18551@toast.internal> +Message-ID: <19990426081842.C18551@toast.internal> +X-UID: 346 + +On Mon, Apr 26, 1999 at 07:59:50AM -0400, Steffen Ries wrote: +> +> I used once SIGALRM to force a timeout. Maybe somebody could comment +> on that approach? +> +> +> /steffen +> +[..snipped code..] + +greetings, + +all well and good (the more ideas the better), except that if something goes +wrong, all you get is that a timeout happened within 120 seconds.. with the +'select' approach, you have a chance to record the specific error that the +socket had.. sometimes the server is down ('connection refused'), sometimes +the web server itself is having problems, sometimes the network is down, +etc.. you can import additional 'errno' symbols and trap them if necessary, +and even specify a timeout to the select call, so you can trap that +seperately as well. + +hope that helps. + +regards, +J +-- +|| visit gfd +|| psa member #293 +|| New Image Systems & Services, Inc. + + + + diff --git a/demo/ermis-f/python_m/cur/0347 b/demo/ermis-f/python_m/cur/0347 new file mode 100644 index 00000000..92b55fca --- /dev/null +++ b/demo/ermis-f/python_m/cur/0347 @@ -0,0 +1,62 @@ +From: illume at gmx.net (Paul Kunysch) +Date: 22 Apr 1999 11:43:10 +0200 +Subject: bzip2 module for Python +References: +Message-ID: <87emldous1.fsf@illusion.tui-net> +Content-Length: 1792 +X-UID: 347 + +Laurence Tratt writes: + +Hi + +> [me 'announcing' pyBZlib] +> >> As I said, I am interested to know if there is a demand for this, so +> >> comments are appreciated. + +>> IMHO it would be nice to have a module like the current "gzip", which +>> handles .bz2 .gz .Z and uncompressed files transparently. + +> Do you mean you would like to see a module where you give it a file (which +> could be .bz2, .gz, .zip etc), and then get an uncompressed version back +> without worrying what compression type was used? + +Yes. + +Well, not ".zip", since it's an archive, and not a compressed file. +But please support plain uncompressed files, too. Why should a +programmer use different interfaces if one could do everything? + +> Would you also want it to automatically untar files? + +Didn't think about it. Depends on the syntax. If it's easy enough that +the user of our programs can specify some files as an tar-comonent +without breaking existing code, why not. + +( "somewhere/webmirror.tar.bz2/index.html" ? ) + + +Hiding the "bzlib-functions" in the "urllib" might be more usefull. +For example I'm currently playing around with Debian-Packages-files. +They describe the contents of FTP-Sites. I just have to read them +once, they could be located anywhere and they might be compressed. + +Debian doesn't use bz2 right now, but if they decide to do so in a +year or two (when all computers have enough RAM) it would be great if +a user could still use the old python-scripts. In a perfect world the +this code ... + + file = sys.stdin.readline() + fd = urllib.open(file) + +... should work with "text" and with "rdist://some.ipv6.url/text.bz2" +as input. We might expect from the user that he installs some modules +(for uncommon things) but it would be nice if they would use the same +interface. + + +Bye + + + + diff --git a/demo/ermis-f/python_m/cur/0348 b/demo/ermis-f/python_m/cur/0348 new file mode 100644 index 00000000..b8879049 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0348 @@ -0,0 +1,73 @@ +From: barry at scottbb.demon.co.uk (Barry Scott) +Date: Sat, 10 Apr 1999 18:37:49 +0100 +Subject: 1.5.2c1 will not compile on Windows NT SP4 with VC++ 6.0 SP1 +Message-ID: <923765974.19722.0.nnrp-03.9e982a40@news.demon.co.uk> +Content-Length: 1543 +X-UID: 348 + +I extracted the 1.5.2c1 kit into P:\ + +python15 error +-------------------- +VC++ 6.0 gives this error. + +Fatal error C1083: Cannot open source file: +'P:\Python-1.5.2c1\Modules\reopmodule.c': No such file or directory + +The file reopmodule.c is not in the kit. + +Having removed reopmodule.c from the project I get a link error + +LINK : fatal error LNK1104: cannot open file ".\PC\python_nt.def" + +This file is also missing. + +Removing python_nt.def from the project reveals files that need to be added +to the project: + + object\bufferobject.c + pc\initwinsound.c + modules\_localemodule.c + +LINK needs winmm.lib added to it. + +Now I get a python15 built. + +pyhon error +---------------- +The project cannot find python.c + +fatal error C1083: Cannot open source file: +'P:\Python-1.5.2c1\python\Modules\python.c': No such file or directory + +There is a extra "python" directory that is not in the kits layout. +Fixed by replacing with 'P:\Python-1.5.2c1\Modules\python.c' + +Same path problem with python15.lib. +Fixed by replacing with P:\Python-1.5.2c1\vc40\python15.lib + +Now I get a python.exe + +_tkinter +---------- +The tk and tcl libs are named tk80.lib and tcl80.lib not tk80vc.lib and +tcl80vc.lib. + +I used the Tcl/Tk that the 1.5.2c1 installation put on my system. + +Now I have _tkinter.dll + +How was the kit for Windows built given all the missing or misnamed files? +Or is this a side effect of using VC++ 6.0? + +I also notice that the python.exe was built 8 apr 1999 but report sa dated +of 12 Mar 1999 +on the interactive command line. + + BArry + + + + + + diff --git a/demo/ermis-f/python_m/cur/0349 b/demo/ermis-f/python_m/cur/0349 new file mode 100644 index 00000000..e5eb5342 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0349 @@ -0,0 +1,17 @@ +From: tshort at my-dejanews.com (tshort at my-dejanews.com) +Date: Tue, 20 Apr 1999 17:56:09 GMT +Subject: Installing 1.5.2 on WinNT without Admin privileges? +Message-ID: <7fif3n$4m0$1@nnrp1.dejanews.com> +X-UID: 349 + +Is it possible to install a Python 1.5.2 binary without Admin privileges on +Windows NT? + +- Tom + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/0350 b/demo/ermis-f/python_m/cur/0350 new file mode 100644 index 00000000..240dc832 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0350 @@ -0,0 +1,32 @@ +From: trashcan at david-steuber.com (David Steuber) +Date: 07 Apr 1999 22:45:46 -0500 +Subject: povray.py +References: +Message-ID: +X-UID: 350 + +Dave Mitchell writes: + +-> neat! does it have a documented API? I downloaded the source and +-> browsed it for a bit, and don't see any specific extension api.. if +-> there isnt one and you're not familiar with the code it would be tough +-> to deal with... Are there any similar bindings for other languages +-> that you could use for inspiration? + +If you are talking about the POV-Ray scene description language, it is +documented in the POV distribution. All that is needed is to generate +the POV sdl based on the computational results from Python, or any +other scripting language or programming language for that matter. + +-- +David Steuber +http://www.david-steuber.com + +s/trashcan/david/ to reply by mail +If you don't, I won't see it. + +As long as the answer is right, who cares if the question is wrong? + + + + diff --git a/demo/ermis-f/python_m/cur/0351 b/demo/ermis-f/python_m/cur/0351 new file mode 100644 index 00000000..5c4b181d --- /dev/null +++ b/demo/ermis-f/python_m/cur/0351 @@ -0,0 +1,28 @@ +From: holger at phoenix-edv.netzservice.de (Holger Jannsen) +Date: Tue, 27 Apr 1999 10:47:10 GMT +Subject: Python implementation of tar +References: <7ftjjl$tim$1@nnrp1.dejanews.com> +Message-ID: <372595AE.C27E7E50@phoenix-edv.netzservice.de> +X-UID: 351 + +Hi there, + +that's what I'm interested in, too. +Please, be so kind to email me the final +result of your question. Please. +(Cause I'm offline for more than 2 weeks and +would miss the answers in this group...) + +1000thanx, +Holger + +frankmcgeough at my-dejanews.com schrieb: +> +> Does someone has a tar implementation written in Python? +> +> -----------== Posted via Deja News, The Discussion Network ==---------- +> http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/0352 b/demo/ermis-f/python_m/cur/0352 new file mode 100644 index 00000000..485980ea --- /dev/null +++ b/demo/ermis-f/python_m/cur/0352 @@ -0,0 +1,60 @@ +From: Friedrich.Dominicus at inka.de (Friedrich Dominicus) +Date: Fri, 30 Apr 1999 07:42:13 +0200 +Subject: while (a=b()) ... +References: +Message-ID: <372942B5.729506A6@inka.de> +Content-Length: 1063 +X-UID: 352 + +Nathan Clegg wrote: +> +> I have some deep-rooted "hates" in programming and don't even know where +> some of them came from. One of them is "while 1" loops. They seem +> somehow at the same level as goto statements and should be used, in my +> mind, about as rarely. +> +> The ideal, of course, would be: +> +> while (c = curs.fetchone()): ... + +no definetly not. + + +If you don't like while 1 why don't you try s.th like: + + +false = 0 +true = 1 + + +exit = false; +while exit != true: + + + + +> +> That is my only complaint about python, that statements cannot be +> expressions. + +I havn't any problems with that. Ok it makes C so terse and it's nice +just to write some stuff but I completly dislike the following. + + +if ((fd = fopen("whatever", modus)) == NULL)) + /* here is error handling */ + + +or even worse +if ((fd1 = fd2 = fopen("whatever", modus)) == NULL)) + +this clutters this line very much. Where's computation where is error +handling this is just one example where in one line too much is mixed +together. So better is not having that at all IMO + +Till then +Friedrich + + + + diff --git a/demo/ermis-f/python_m/cur/0353 b/demo/ermis-f/python_m/cur/0353 new file mode 100644 index 00000000..6c8d0828 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0353 @@ -0,0 +1,62 @@ +From: sdm7g at Virginia.EDU (Steven D. Majewski) +Date: Fri, 23 Apr 1999 21:35:32 -0400 (EDT) +Subject: Efficient List Subtraction +In-Reply-To: <3720EF73.CA7DDEFF@Colorado.edu> +References: <3720EF73.CA7DDEFF@Colorado.edu> +Message-ID: +Content-Length: 1555 +X-UID: 353 + +On Fri, 23 Apr 1999, KELLEY SCOTT T wrote: + +> +> Does anyone out there have a simple way to compare two lists (some operator perhaps) and +> return +> a list of *differences*? By differences, I mean the following: If had two +> lists like, +> +> a = [1, 4, 5, 100] +> b = [4, 5] +> +> the difference between a and b (a-b) would be [1, 100]. I suppose you could +> write a couple of for loops to go through each list and compare them, but I +> thought there might be a simple way to do this. +> +> I'm also interested in a simple way to returning a list of what is identical between the +> two lists. +> In the case of the above lists, a and b, they both contain [4, 5]. +> + +Well -- it's probably not the most efficient, but the simplest +list intersection is probably: + +>>> a = [1,4,5,100] +>>> b = [4,5] +>>> filter( lambda x: x in a, b ) +[4, 5] +>>> filter( lambda x: x in b, a ) # order doesn't matter +[4, 5] # for intersection + + # but it does for set-difference +>>> filter( lambda x: x not in a, b ) # b - a +[] +>>> filter( lambda x: x not in b, a ) # a - b +[1, 100] + + +I don't think union or XOR can be done as concisely. + + +---| Steven D. Majewski (804-982-0831) |--- +---| Department of Molecular Physiology and Biological Physics |--- +---| University of Virginia Health Sciences Center |--- +---| P.O. Box 10011 Charlottesville, VA 22906-0011 |--- + + Caldera Open Linux: "Powerful and easy to use!" -- Microsoft(*) + (*) + + + + + + diff --git a/demo/ermis-f/python_m/cur/0354 b/demo/ermis-f/python_m/cur/0354 new file mode 100644 index 00000000..2d8b564f --- /dev/null +++ b/demo/ermis-f/python_m/cur/0354 @@ -0,0 +1,66 @@ +From: chad at vision.arc.nasa.gov (Chad Netzer) +Date: Wed, 07 Apr 1999 13:37:43 -0700 +Subject: Tkinter and centering +References: <370B88CF.993D8847@yahoo.com> +Message-ID: <370BC217.FFF53A35@vision.arc.nasa.gov> +Content-Length: 1625 +X-UID: 354 + +Flbill Blipf wrote: + +> Hi, +> +> How do I center a window with Tkinter? If I use this: + +[Clipped] + +> +> +> The window appears in a semi-random location and then staggers to the +> center. +> +> If I remove root.update(), winfo_width and winfo_height both return 1. + +Well, I don't know if you can ever get the window width and height without +first mapping it (displaying). One option is to open it completely off the +screen, then update it to the center, but I think many window managers +won't do this (it might work on Windows, but not in Motif, etc.) + +Another option is to open the window as centered as possible, then update +to the more correct position, which may be less disconcerting. For example: + +from Tkinter import * + +root = Tk() +Label(root,text="Cough Cough Cough").pack() +sw = root.winfo_screenwidth() +sh = root.winfo_screenheight() +w = 120 +h = 30 +newGeometry='+%d+%d' % ((sw/2)-(w/2), (sh/2)-(h/2)) +root.geometry(newGeometry=newGeometry) +root.update() +w = root.winfo_width() +h = root.winfo_height() +newGeometry='+%d+%d' % ((sw/2)-(w/2), (sh/2)-(h/2)) +root.geometry(newGeometry=newGeometry) +root.mainloop() + + +Here, the initial height of 30 and width of 120, is just a rough estimate, but +is pretty close on my machine. At least the window comes up near the final +resting place. :) You could also just leave initialize width and height to 1, +but the movement is a bit jarring. + +Hope this helps a bit; I don't know if you'll be able to get exactly what you +want, unless you hard code the window sizes (which can be a mess). Using +'wm_minsize' option may be a slight help. + +Chad Netzer +chad at vision.arc.nasa.gov + + + + + + diff --git a/demo/ermis-f/python_m/cur/0355 b/demo/ermis-f/python_m/cur/0355 new file mode 100644 index 00000000..50aa9eca --- /dev/null +++ b/demo/ermis-f/python_m/cur/0355 @@ -0,0 +1,32 @@ +From: stephan at pcrm.win.tue.nl (Stephan Houben) +Date: 27 Apr 1999 08:28:25 +0200 +Subject: To redirect stdin,out +References: <37248549.6AD365AC@pk.highway.ne.jp> +Message-ID: +X-UID: 355 + +Thooney Millennier writes: + +> +> import sys +> sys.stdout = StdoutCatcher() +> print 'foo' +> +> I am at a loss how to redirect standard input. +> If you know any solutions,Please Help! + +Well, I tried the obvious analog of this code snippet: + + import sys + sys.stdin = open("one_of_my_files.txt") + print raw_input() + +And it seemded to work fine. Am I missing something? + +Greetings, + +Stephan + + + + diff --git a/demo/ermis-f/python_m/cur/0356 b/demo/ermis-f/python_m/cur/0356 new file mode 100644 index 00000000..f74eac95 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0356 @@ -0,0 +1,20 @@ +From: spamfranke at bigfoot.de (Stefan Franke) +Date: Thu, 29 Apr 1999 17:45:17 GMT +Subject: Emacs' python-mode buggy? +References: <14120.30592.807745.732604@anthem.cnri.reston.va.us> +Message-ID: <3728955e.19679327@news.omnilink.de> +X-UID: 356 + +What bothers me most with the Emacs mode's TQSs is +that editing gets terribly slow if there lots of them (and +they are long). +On each CR, Tab or : the current indent is computed, +which takes *much* longer than outside the String. +Can this be fixed? + +Stefan + + + + + diff --git a/demo/ermis-f/python_m/cur/0357 b/demo/ermis-f/python_m/cur/0357 new file mode 100644 index 00000000..2e4a1b21 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0357 @@ -0,0 +1,60 @@ +From: tismer at appliedbiometrics.com (Christian Tismer) +Date: Sun, 25 Apr 1999 20:05:15 GMT +Subject: Python too slow for real world +References: <372068E6.16A4A90@icrf.icnet.uk> + <3720A21B.9C62DDB9@icrf.icnet.uk> + <3720C4DB.7FCF2AE@appliedbiometrics.com> + <3720C6EE.33CA6494@appliedbiometrics.com> + + +Message-ID: <3723757B.CF96D973@appliedbiometrics.com> +Content-Length: 1723 +X-UID: 357 + + +"Magnus L. Hetland" wrote: +> +> Justin Sheehy writes: +> +> > mlh at idt.ntnu.no (Magnus L. Hetland) writes: +> > +> > > (And... How about builtin regexes in P2?) +> > +> > Um, why? I don't see any need at all for them to move from +> > module-status to core-language-status. +> [...] +> > +> > In all seriousness, what reason do you have for making that +> > suggestion? I am willing to believe that there might be a good reason +> > to do so, but it certainly isn't immediately obvious. +> +> Now, that's really simple -- because re.py is slow. I thought maybe +> some of the slowness might be improved by a c-implementation, that's +> all. Not too important to me... + +Now, true for re.py, but if you just care about speed, +you can abuse the underlying pcre module which is compiled. +For simple cases where I just needed to match something, +the "code" attribute of a compiled re object can be used +instead of the re object. +I admit this is a hack, but it gave me a speedup of factor 3 +for a simple matching case. pcre's speed seems to be +in the same order of magnitude as regex was. + +In the long term, I think it makes sense to build the rest of +re.py also into pcre. Then I still would not see any reason +to embed its functionaliy into the language. + +ciao - chris + +-- +Christian Tismer :^) +Applied Biometrics GmbH : Have a break! Take a ride on Python's +Kaiserin-Augusta-Allee 101 : *Starship* http://starship.python.net +10553 Berlin : PGP key -> http://wwwkeys.pgp.net +PGP Fingerprint E182 71C7 1A9D 66E9 9D15 D3CC D4D7 93E2 1FAE F6DF + we're tired of banana software - shipped green, ripens at home + + + + diff --git a/demo/ermis-f/python_m/cur/0358 b/demo/ermis-f/python_m/cur/0358 new file mode 100644 index 00000000..42a94964 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0358 @@ -0,0 +1,51 @@ +From: eric at linux-hw.com (Eric Lee Green) +Date: Tue, 13 Apr 1999 21:32:23 GMT +Subject: threads +In-Reply-To: <1288080841-20523503@hypernet.com> +References: <1288080841-20523503@hypernet.com> +Message-ID: +Content-Length: 1569 +X-UID: 358 + +On Tue, 13 Apr 1999, Gordon McMillan wrote: + +> Eric Lee Green wonders about Python threads: +> +> > My question is this: How "atomic" are basic Python variable +> > operations? +> +> This exact question was asked not long ago. My reply, and Guido's +> clarifications follow: + +Ah. Okay. So Python is doing user-land threads and not Posix (OS-level) +threads? + +The difference between the two doesn't make a difference for my +application, but I'd be curious to know in case I ever want to run this on +an SMP machine (where only OS-level threads are schedulable on multiple +processors). + +In any event, I'm relieved to know that basic operations are safe. As long +as the semaphoring requirements are similar to "C", which appears to be +the case, I am just fine. I do see, from reading the documentation, that +file I/O operations are thread-safe. The only question then is whether +Python's socket operations are thread-safe if we're doing user-land +threads... I'd hate to bring all threads to a halt by reading from a +socket, because that was the whole point (to be able to do things +asynchronously). + +Be a real bummer if I have to stop what I'm doing and start re-writing it +all into C++ :-(. (I am *NOT* fond of C++, it seems you have to spend eons +writing basic classes to do things that Python does out of the box before +you can even think about your application). + +-- +Eric Lee Green eric at linux-hw.com http://www.linux-hw.com/~eric +"People have grown used to thinking of computers as unreliable, and it + doesn't have to be that way." -- Linus + + + + + + diff --git a/demo/ermis-f/python_m/cur/0359 b/demo/ermis-f/python_m/cur/0359 new file mode 100644 index 00000000..eaa4bf0f --- /dev/null +++ b/demo/ermis-f/python_m/cur/0359 @@ -0,0 +1,66 @@ +From: jam at newimage.com (jam) +Date: Sun, 25 Apr 1999 15:50:40 -0400 +Subject: HELP! NumPy (Graphics) and Linux +In-Reply-To: <7fvpsh$l8e$1@nnrp1.dejanews.com>; from kelvin_chu@my-dejanews.com on Sun, Apr 25, 1999 at 07:19:47PM +0000 +References: <7fvpsh$l8e$1@nnrp1.dejanews.com> +Message-ID: <19990425155040.A16440@toast.internal> +Content-Length: 1897 +X-UID: 359 + +On Sun, Apr 25, 1999 at 07:19:47PM +0000, kelvin_chu at my-dejanews.com wrote: +> +> Hi all; +> +> I've had great success with EZplot and now want to move my code to Linux- +> based platforms in my lab. I am having significant difficulties building +> the Graphics portion of NumPy. +> +> 0. I am running RedHat linux 5.2 +> 1. I have installed Yorick in the cannonical place. +> 2. Instead of libX11.a, I have a shared-object library, locatedin +> /usr/X11R6/lib +> +> When I do the build (python makethis.py), I receive the following error: +> +> gcc -fpic -I/usr/local/lib/yorick/1.4/h -g -O2 +> -I/usr/local/include/python1.5 -I/usr/local/include/python1.5 +> -DHAVE_CONFIG_H -c ./Gist/Src/gistCmodule.c +> ./Gist/Src/gistCmodule.c:75: arrayobject.h: No such file or directory +> ./Gist/Src/gistCmodule.c:88: warning: `PyFPE_END_PROTECT' redefined +> /usr/local/include/python1.5/pyfpe.h:169: warning: this is the location of +> the previous definition +> make: *** [gistCmodule.o] Error 1 +> +> +> I suspect that I am going to run into multiple problems. There is a cryptic +> statement in the README that indicates that I should do import_arrays() before +> doing the build...where do I implement this? How much of this problem is +> related to the shared object X libs? +> +> Thanks, I appreciate any light you can shed on this matter! +> +> Cheers, +> +> Kelvin +> + +greetings, + +the error you posted doesn't appear to have anything to do with libX11.. it +points to the location of (at least) this error.. the compiler is unable to +find 'arrayobject.h', which is part of the python distribution. if you +installed from rpms, did you remember to also install the 'python-devel' +package? + +hope that helps.. please let us know! ;) + +Regards, +J +-- +|| visit gfd +|| psa member #293 +|| New Image Systems & Services, Inc. + + + + diff --git a/demo/ermis-f/python_m/cur/0360 b/demo/ermis-f/python_m/cur/0360 new file mode 100644 index 00000000..1b6f8c86 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0360 @@ -0,0 +1,26 @@ +From: arcege at shore.net (Michael P. Reilly) +Date: Wed, 28 Apr 1999 19:51:33 GMT +Subject: Maximize Benefit when Purchasing Learning Python +References: +Message-ID: <9FJV2.153$pX2.88806@news.shore.net> +X-UID: 360 + +David Ascher wrote: +: On Wed, 28 Apr 1999 jkraai at murl.com wrote: + +:> How can I help whom when purchasing Python books? + +: I'll dare to speak for Mark, and say that you should feel free to send +: either Mark or I (or both) checks for any amount whatsoever. Skip the +: middleman. Save trees -- don't buy the book, just send us cash. Don't +: hesitate for a minute. + +Better yet. Secure web credit-card transfers? Saves the paper from the +envelopes and checks/bills. ;) + + -Arcege + + + + + diff --git a/demo/ermis-f/python_m/cur/0361 b/demo/ermis-f/python_m/cur/0361 new file mode 100644 index 00000000..1d3091c6 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0361 @@ -0,0 +1,84 @@ +From: sdm7g at Virginia.EDU (Steven D. Majewski) +Date: Fri, 23 Apr 1999 14:59:31 -0400 (EDT) +Subject: millisecond time accuracy +In-Reply-To: <14112.46141.974182.785300@amarok.cnri.reston.va.us> +References: <3720A4A6.125DA1C7@OMIT_THIS.us.ibm.com> <14112.46141.974182.785300@amarok.cnri.reston.va.us> +Message-ID: +Content-Length: 2827 +X-UID: 361 + +On Fri, 23 Apr 1999, Andrew M. Kuchling wrote: + +> Kevin F. Smith writes: +> >Is there a way to measure time accurate to milliseconds? +> > +> >For example, by calling the time.time() function I get seconds. Is +> >there a comparable function that I could use to measure interval times +> >down to at least millisecond accuracy? +> +> Nothing portable. However, time.time() actually returns a +> floating point number, and the Python implementation tries to use the +> most precise function available in the C library. If your system +> supports gettimeofday(), which has microsecond resolution, then +> time.time() will return a floating point number with microsecond +> precision. +> +> Note that precision is not the same as accuracy! Python just +> uses the C library, so the accuracy or lack thereof is up to the +> library implementation. +> + + +I was having problems using time.time for benchmarking on the Mac, +and was complaining to Jack about it returning integral number of +seconds converted to a Python float, when I noticed in the Lib ref: + + +clock () +Return the current CPU time as a floating point number expressed in +seconds. The precision, and in fact the very definiton of the meaning of +``CPU time'', depends on that of the C function of the same name, but in +any case, this is the function to use for benchmarking Python or timing +algorithms. + + +i.e. time.clock() is supposed to be the best precision you can get. +Now -- I'm not sure that is actually the case, but on the Mac +time.clock() - time.clock() has a significant fractional part, while +time.time() - time.time() doesn't. + +( The offsets of the number of seconds returned by time and clock + are different, which is why I'm expressing the value as difference + of two pairs. ) + + +On Mac Python, the resolution is 1/60 sec., however it's possible +to get much better resolution by uncommenting a line(*) and rebuilding +the C libraries, however, Jack was suggesting exporting an additional +time.Microseconds() function. + + +What I want is a standard & portable way of getting the best clock value +on whatever platform. + + +(*) note: +> > [1.5] discovered in :MSL C:MSL Mac:Public Includes:timesize.mac.h +> > that you can enable microsecond resolution by uncommenting: +> > #define __TIMESIZE_DOUBLE__ +> > which causes clock_t to be a double and redefines CLOCKS_PER_SEC. + + +---| Steven D. Majewski (804-982-0831) |--- +---| Department of Molecular Physiology and Biological Physics |--- +---| University of Virginia Health Sciences Center |--- +---| P.O. Box 10011 Charlottesville, VA 22906-0011 |--- + + Caldera Open Linux: "Powerful and easy to use!" -- Microsoft(*) + (*) + + + + + + diff --git a/demo/ermis-f/python_m/cur/0362 b/demo/ermis-f/python_m/cur/0362 new file mode 100644 index 00000000..43ba9ab6 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0362 @@ -0,0 +1,14 @@ +From: christer.fernstrom at worldonline.fr (christer fernstrom) +Date: Fri, 23 Apr 1999 21:18:27 +0200 +Subject: GUI and printing +Message-ID: <7fqkcu$7gj$1@mars.worldonline.fr> +X-UID: 362 + +Anybody knows if any of the Pythonized GUI kits support printing of window +contents AND cross-platform compatibility? (at least on NT and Mac)? +Thx, + christer + + + + diff --git a/demo/ermis-f/python_m/cur/0363 b/demo/ermis-f/python_m/cur/0363 new file mode 100644 index 00000000..a134294e --- /dev/null +++ b/demo/ermis-f/python_m/cur/0363 @@ -0,0 +1,10 @@ +From: psychic777 at bigfoot.com (psychic777 at bigfoot.com) +Date: Fri, 16 Apr 1999 23:10:12 GMT +Subject: A special message for python-list +Message-ID: +X-UID: 363 + +An HTML attachment was scrubbed... +URL: + + diff --git a/demo/ermis-f/python_m/cur/0364 b/demo/ermis-f/python_m/cur/0364 new file mode 100644 index 00000000..0b2bb082 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0364 @@ -0,0 +1,26 @@ +From: faassen at pop.vet.uu.nl (Martijn Faassen) +Date: Tue, 06 Apr 1999 14:56:37 +0200 +Subject: mxDateTime in Python distribution +References: <19990406070255.A867135@vislab.epa.gov> <19990406082704.A868024@vislab.epa.gov> +Message-ID: <370A0485.EC244CF6@pop.vet.uu.nl> +X-UID: 364 + +Randall Hopper wrote: +> +> Oleg Broytmann: +[part of standard library vs installing modules, installation can be +difficult, etc] + +The distutils SIG at http://www.python.org/sigs/distutils-sig/ is trying +to make the cross platform distribution of Python modules (both Python +and C extensions) and programs less of a hassle. You could browse over, +subscribe to the list, and help out if you're interested in these +matters. + +Regards, + +Martijn + + + + diff --git a/demo/ermis-f/python_m/cur/0365 b/demo/ermis-f/python_m/cur/0365 new file mode 100644 index 00000000..b51f75eb --- /dev/null +++ b/demo/ermis-f/python_m/cur/0365 @@ -0,0 +1,48 @@ +From: wtanksle at dolphin.openprojects.net (William Tanksley) +Date: Mon, 19 Apr 1999 22:11:59 GMT +Subject: Beginner Help - class problem or string copy semantics? +References: <7fg8a0$3ib$1@nnrp1.dejanews.com> +Message-ID: +Content-Length: 1216 +X-UID: 365 + +On Mon, 19 Apr 1999 21:47:47 GMT, cmedcoff at my-dejanews.com wrote: +>As will soon be apparent I am totally new to Python. In the code fragment +>below I expect to see the output "foobar", but I do not. Can anyone tell me +>why? All the bookstores seem to be out of "Learning Python". Are they out of +>print already or has the initial shipment still not released? + +I suspect that the store hasn't ordered any. Keep bugging them :). + +>class Test: +> _name = "" +> def __init__(self, name): +> _name = name +> def show(self): +> print self._name + +First of all, I suspect that you're using the underscore because you want +the variable to be private. If so, try a double underscore, like __name. + +>mytest = Test("foobar") +>mytest.show() + +The problem is that you're setting "_name" (a variable local to the +__init__ function) instead of "self._name". Add that "self." and you'll +be fine. + +Also, you don't need to have a class variable named the same as your +object variable -- it'll never get viewed. Feel free to remove the '_name += ""' line from the class definition. + +>Regards, +>Chuck + +-- +-William "Billy" Tanksley +"But you shall not escape my iambics." + -- Gaius Valerius Catullus + + + + diff --git a/demo/ermis-f/python_m/cur/0366 b/demo/ermis-f/python_m/cur/0366 new file mode 100644 index 00000000..536dfec7 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0366 @@ -0,0 +1,33 @@ +From: ivanlan at callware.com (Ivan Van Laningham) +Date: Fri, 30 Apr 1999 20:32:52 GMT +Subject: [PSA MEMBERS ANNOUNCE] Python documentation updated! +References: <14122.3325.631762.383828@weyr.cnri.reston.va.us> +Message-ID: <372A1374.6405E48B@callware.com> +X-UID: 366 + +Hi Fred, All-- + +"Fred L. Drake" wrote: +> +> The documentation for Python 1.5.2 is now available. The online +> version is available at: +> +> http://www.python.org/doc/ +> + +Clicking on the HTML link gets me a 404 Doc not found error. ... + +Ivan +---------------------------------------------- +Ivan Van Laningham +Callware Technologies, Inc. +ivanlan at callware.com +http://www.pauahtun.org +See also: +http://www.foretec.com/python/workshops/1998-11/proceedings.html +Army Signal Corps: Cu Chi, Class of '70 +---------------------------------------------- + + + + diff --git a/demo/ermis-f/python_m/cur/0367 b/demo/ermis-f/python_m/cur/0367 new file mode 100644 index 00000000..e81d2c05 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0367 @@ -0,0 +1,44 @@ +From: klm at digicool.com (Ken Manheimer) +Date: Thu, 29 Apr 1999 00:42:17 -0400 +Subject: Emacs' python-mode buggy? +References: <199904282340.TAA19934@python.org> +Message-ID: <3727E329.2E8F3C31@digicool.com> +Content-Length: 1336 +X-UID: 367 + +Markus Stenberg wrote: + +> At least by my experiences the Emacs mode (at least, two versions I tried, +> 3.75 and whatever came with Python 1.5.2) seems to have tons of bugs; to be +> more precise, it seems to think a lot more of my code than should be is +> string (and therefore is green and indentation doesn't work). +> +> Funny thing is, it's colored properly when I load file but when I start +> editing some files' some parts, they turn green (comment-ish) and +> indentation starts to suck. +> +> Indentation being fairly neccessary feature for Python coding, is there +> some option I am missing or am I fucked? (read: forced to use vim or +> something) + +I can't speak to the intimacy issue, but the python-mode syntax recognition +may be due to having a leading '(' open paren in the first column in one of +your docstrings. If so, emacs' syntax confusion (not to be mistaken for +poor gender identification) can be remedied by escaping the leading open +paren with a '\' backslash, like so: + +\(this is what to do with parens in docstrings.) + +If it is the problem, well, it's emacs' problem, not pymode. If it's not, +well, do track it down. + +Oh, does that bug constitute the "tons" you mention, or were there others? +I never was good at estimating the weight of bugs - all that chiton, you +know. + +Ken Manheimer +klm at digicool.com + + + + diff --git a/demo/ermis-f/python_m/cur/0368 b/demo/ermis-f/python_m/cur/0368 new file mode 100644 index 00000000..35994542 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0368 @@ -0,0 +1,26 @@ +From: JamesL at Lugoj.Com (James Logajan) +Date: Mon, 05 Apr 1999 20:59:06 -0700 +Subject: SNMPy update +References: <7e1hiq$a71$1@Starbase.NeoSoft.COM> <7ear25$ksf$1@news-sj-3.cisco.com> <14089.11820.416453.80124@bitdiddle.cnri.reston.va.us> <7ebtn1$dq$1@Starbase.NeoSoft.COM> +Message-ID: <3709868A.CFCCE63@Lugoj.Com> +X-UID: 368 + +Cameron Laird wrote: +> +> In article <14089.11820.416453.80124 at bitdiddle.cnri.reston.va.us>, +> Jeremy Hylton wrote: +> . +> . +> . +> >encode/decode and on how to build a backend for SNACC. (A free-ish +> >ASN.1 compiler; the only one?) +> +> Hardly. There are several ASN.1 compilers. MAVROS www-sop.inria.fr/rodeo/personnel/huitema/mavros-home.html> is +> another. I know of none that's achieved SNACC's portability. + +MAVROS is free? + + + + diff --git a/demo/ermis-f/python_m/cur/0369 b/demo/ermis-f/python_m/cur/0369 new file mode 100644 index 00000000..c652e7ba --- /dev/null +++ b/demo/ermis-f/python_m/cur/0369 @@ -0,0 +1,50 @@ +From: ivanlan at callware.com (Ivan Van Laningham) +Date: Thu, 22 Apr 1999 20:52:24 GMT +Subject: What is it ? How can I learn it ? Where should I start ? Wha +References: <1287305973-36728049@hypernet.com> +Message-ID: <371F8C08.35432359@callware.com> +Content-Length: 1145 +X-UID: 369 + +Pythonistas-- + +Gordon ``The Klingon'' McMillan wrote: +> +> Ivan remembers... +> +> > ... and most of the real +> > cannibals have been muzzled (Gordon excepted, so don't put any parts +> > of you through his cage bars that you want to keep). ... +> +> and then forgets that I'm not poikilothermophagic... +> + +Well, Gordon, if you don't eat poikilotherms, then this sounds to me +like you're saying that you wouldn't take a bite out of Alexander the +Newbie because he's a cold fish. Sounds like an insult to me! +Alexander! Be insulted! + +> > PS: And just *where* is this job that (I should be so lucky) +> > *REQUIRES* you to know Python???????? Why aren't they calling +> > ME???? +> +> Now, Ivan, do you really have to ask? +> +> revenge-is-a-dish-best-eaten-raw-ly y'rs +> + +-ly y'rs, +Ivan +---------------------------------------------- +Ivan Van Laningham +Callware Technologies, Inc. +ivanlan at callware.com +http://www.pauahtun.org +See also: +http://www.foretec.com/python/workshops/1998-11/proceedings.html +Army Signal Corps: Cu Chi, Class of '70 +---------------------------------------------- + + + + diff --git a/demo/ermis-f/python_m/cur/0370 b/demo/ermis-f/python_m/cur/0370 new file mode 100644 index 00000000..8660e5d2 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0370 @@ -0,0 +1,42 @@ +From: aahz at netcom.com (Aahz Maruch) +Date: Sat, 10 Apr 1999 22:49:09 GMT +Subject: Python 2.0 compatibility +References: +Message-ID: +Content-Length: 1379 +X-UID: 370 + +In article , +Paranoid User wrote: +> +>We have selected Python as the scripting language for the next generation of +>one of our embedded systems. This is a very fast-track project scheduled to +>ship near the end of the first quarter of 2000. +> +>I ran across a quote that said something to the effect that Python 2 will be +>incompatible with Python 1. Before I make a decision as to whether we +>freeze with Python 1.5.2, or migrate to Python 2 when it is released, I need +>to find out the extent of truthfulness in the "quote". + +I'm not in the know about Python 2, but I do know this much: Python 2 +will almost certainly not ship before your product. Python 2 has also +not been completely designed yet, so nobody (not even Guido) knows the +extent to which Python 2 will be incompatible. + +There's also the likely release of Python 1.6; I don't know whether +that's in parallel with the Python 2 development. + +I suggest that you work with 1.5.2 and worry about future releases when +there's more clarity. +-- + --- Aahz (@netcom.com) + +Hugs and backrubs -- I break Rule 6 <*> http://www.rahul.net/aahz/ +Androgynous poly kinky vanilla queer het + +If they can get you asking the wrong questions, they don't have to worry +about the answers. -- Thomas Pynchon (from EFF quote collection) + + + + diff --git a/demo/ermis-f/python_m/cur/0371 b/demo/ermis-f/python_m/cur/0371 new file mode 100644 index 00000000..f6aaf947 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0371 @@ -0,0 +1,18 @@ +From: holger at phoenix-edv.netzservice.de (Holger Jannsen) +Date: Wed, 21 Apr 1999 09:29:01 GMT +Subject: NT: Create a link +Message-ID: <371D9A5D.76541E1E@phoenix-edv.netzservice.de> +X-UID: 371 + +Hi, + +I'd like to know how to create a link to a file with python under WinNT? +Perhaps there is a possibility to get access to 'IShellLink' (Win32Api)? + +Thank you, +Holger +(new under this snake;-)) + + + + diff --git a/demo/ermis-f/python_m/cur/0372 b/demo/ermis-f/python_m/cur/0372 new file mode 100644 index 00000000..27bbace9 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0372 @@ -0,0 +1,39 @@ +From: tismer at appliedbiometrics.com (Christian Tismer) +Date: Thu, 22 Apr 1999 18:11:00 GMT +Subject: Callbacks and "callable" objects +References: <19990422113516.A278137@vislab.epa.gov> +Message-ID: <371F6634.3ED0FD11@appliedbiometrics.com> +Content-Length: 1122 +X-UID: 372 + + +Randall Hopper wrote: +> +> A while back I asked how to pass parameterized callbacks to Tkinter. +> Now I need to explore how best to do partial resolution of callback +> arguments. For example, define values for arguments 1 and 2 at +> registration time, but leave argument 3 to be populated by Tkinter. + +With a speed penalty of about a factor 2, +Don Beaudry's functor module provides you with the +partial closure functionality which you would like. +Please get the current version from ftp.python.org, +it works with Python 1.5 . + +BTW, I think you will go back to the default parameter +trick after a while, since it is faster, which might be +an issue for callbacks. + +ciao - chris + +-- +Christian Tismer :^) +Applied Biometrics GmbH : Have a break! Take a ride on Python's +Kaiserin-Augusta-Allee 101 : *Starship* http://starship.python.net +10553 Berlin : PGP key -> http://wwwkeys.pgp.net +PGP Fingerprint E182 71C7 1A9D 66E9 9D15 D3CC D4D7 93E2 1FAE F6DF + we're tired of banana software - shipped green, ripens at home + + + + diff --git a/demo/ermis-f/python_m/cur/0373 b/demo/ermis-f/python_m/cur/0373 new file mode 100644 index 00000000..aaf538b8 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0373 @@ -0,0 +1,21 @@ +From: fredrik at pythonware.com (Fredrik Lundh) +Date: Mon, 19 Apr 1999 08:17:40 GMT +Subject: Beginner - Tkinter info +References: <371c59e9.2723125@news.tin.it> +Message-ID: <017301be8a3e$d3696de0$f29b12c2@pythonware.com> +X-UID: 373 + +Kranio wrote: +> I am just starting using python and I would like to learn more. I have +> about all the docs written by guido but I haven't found yet +> documentation about tkinter usage. Can you help me? + +http://www.python.org/topics/tkinter/doc.html +has the full story. + + + + + + + diff --git a/demo/ermis-f/python_m/cur/0374 b/demo/ermis-f/python_m/cur/0374 new file mode 100644 index 00000000..39bc615c --- /dev/null +++ b/demo/ermis-f/python_m/cur/0374 @@ -0,0 +1,51 @@ +From: boud at rempt.xs4all.nl (boud at rempt.xs4all.nl) +Date: Tue, 6 Apr 1999 07:21:30 GMT +Subject: Python and Qt+KDE +References: <36F940DC.44F08BDF@druga.com> <7dbtb8$38j$1@nnrp1.dejanews.com> <7dec78$977$1@Starbase.NeoSoft.COM> <36FB0C5F.E6CE768D@zarlut.utexas.edu> <199903290118.UAA05150@mira.erols.com> <3708D549.12844324@trust.ee> +Message-ID: +Content-Length: 2052 +X-UID: 374 + +"A.M. Kuchling" wrote: +> +> (I'm looking into GUI alternatives to Tkinter, having looked +> at PyGTK, but haven't yet examined PyKDE to any significant degree; +> comments on it would probably be helpful for many people interested in +> writing desktop apps in Python.) + +I've just decided to go with the pyKDE bindings for the application I'm +developing (on linux). I've looked at tkInter (+ pmw), pyGTK, wWindows, +Wpy, XForms, CGI, and the old kdebindings from python.org. + +The old kdebindings were obviously not up to date, although they were +nicely structured and not very memory intensive. CGI can't deliver a +complex interface, XForms I couldn't get to work. Wpy is based on the +Microsoft Foundation Classes, which since I only work in VB on Windows +isn't a plus from me, and doesn't seem to be very complete or +full-featured. WxWindows was rather nice (and portable), but rather +complicated to install. The documentation is very reasonable. Gtk is in +so rapid a development that it would be difficult to decide which +version to work with - and I didn't think much of the framework as +presented by the example applications. TkInter looks nice - as can be +seen from Grail or PySol - but is rather underdocumented. + +The KDE bindings are rather complete, and the documentation Troll +delivers for Qt is very good - and useable with the Python bindings. +I'm currently working my way through the KDE tutorials, translating from +c++ (which I don't know much about) to Python (which I am learning +quickly). The KDE bindings are a bit heavy on the memory - but that +issue is being addressed. Qt has some great widgets. The KDE + Qt +framework is very nice to work with, in my opinion, and the resulting +applications look good. And the maintainer of the pyKde bindings +reacted very quickly to some questions I had. + +This is just a description of the way I reached the decision to +go with KDE - and I might have made mistakes along the way, so +your mileage may vary, of course. All disclaimers apply. +-- + +Boudewijn Rempt | www.xs4all.nl/~bsarempt + + + + diff --git a/demo/ermis-f/python_m/cur/0375 b/demo/ermis-f/python_m/cur/0375 new file mode 100644 index 00000000..2c401f20 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0375 @@ -0,0 +1,27 @@ +From: quinn at necro.ugcs.caltech.edu (Quinn Dunkan) +Date: 25 Apr 1999 17:28:22 GMT +Subject: converting perl to python - simple questions. +References: <7fvagp$8lm$1@nnrp1.dejanews.com> +Message-ID: +X-UID: 375 + +On Sun, 25 Apr 1999 15:51:29 GMT, Aahz Maruch wrote: +>In article <7fvagp$8lm$1 at nnrp1.dejanews.com>, +> wrote: +>> +>> [python] +>> if not (re.match('^\s$'), mytext) +> +>I think you want +> +> if not (re.match('^\s$', mytext)) : +>or +> if not (re.match('^\s*$', mytext)) : + +Don't forget r'' in python when you have backslashes. + +if not (re.match(r'^\s*$', mytext)): + + + + diff --git a/demo/ermis-f/python_m/cur/0376 b/demo/ermis-f/python_m/cur/0376 new file mode 100644 index 00000000..f8405fb0 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0376 @@ -0,0 +1,48 @@ +From: alrice at swcp.com (Alex Rice) +Date: Fri, 02 Apr 1999 21:24:42 -0700 +Subject: disenchanted java user mumbles newbie questions +Message-ID: <3705980A.1C7E9512@swcp.com> +Content-Length: 1637 +X-UID: 376 + +Hola, + +1) In the Python 1.5 Tutorial, sec. 9.2 "Python Scopes and Name Spaces" +there is the following passage: + +>> +It is important to realize that scopes are determined textually: the +global scope of a function defined in a module is that module's name +space, no matter from where or by what alias the function is called. On +the other hand, the actual search for names is done dynamically, at run +time -- however, the language definition is evolving towards static name +resolution, at ``compile'' time, so don't rely on dynamic name +resolution! (In fact, local variables are already determined +statically.) +>> + +Where can I read more about this move towards for compile time, static +name resolution and the reasons for it. For some reason I was +envisioning Python as being less like Java and more like Objective-C or +Smalltalk in terms of dynamic binding. + +2) Which reminds me: does anyone have a URL for that Ousterhut (sp?) +article at Sunlabs about Scripting languages and why scripting rulz and +where he has a taxonomy of programming languages along 2 dimensions? +Lost that bookmark and cannot find it again. + +3) What's the Python equivalent of depends.exe? --something to find what +modules your script is depending upon? It seems like one would be able +to create a very slim distribution if one needed an .exe, couple of .dll +only a handful of .py files. A Java+Swing application can be 1-2 MB not +including the VM! bloat--ed. What's a typical size of a bare-bones +Python distribution? Obviously the thread in this group "Free commercial +Python application" is not representative... I hope. + +TIA! + +Alex Rice -- MindLube Software + + + + diff --git a/demo/ermis-f/python_m/cur/0377 b/demo/ermis-f/python_m/cur/0377 new file mode 100644 index 00000000..604c3be5 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0377 @@ -0,0 +1,104 @@ +From: mlh at idt.ntnu.no (Magnus L. Hetland) +Date: 23 Apr 1999 15:55:53 +0200 +Subject: Python too slow for real world +References: <372068E6.16A4A90@icrf.icnet.uk> +Message-ID: +Content-Length: 2475 +X-UID: 377 + +Arne Mueller writes: + +> Hi All, +> +> first off all: Sorry for that slightly provoking subject ;-) ... +[...] +> +> The following python code does the job: +[...] +> f = open('my_very_big_data_file','r') # datafile with ~300000 records +> read_write(f, stdout, {}) # for a simple test I don't exclude +> anything! + +Well -- re is known to be slow. If you have to be fast, maybe you +should try not to use regular expressions; You could perhaps use +something from the string module (several options there) or maybe even +consider fixed-length fields for the identifiers, which should speed +up things a bit. + +> It took 503.90 sec on a SGI Power Challange (R10000 CPU). An appropiate +> perl script does the same job in 32 sec (Same method, same loop +> structure)! + +Hm. Perl probably has a more efficient implementation of Perl regexes +than Python, naturally enough... + +> I'd realy like to know why python is so slow (or perl is so fast?) and +> what I can do to improove speed of that routine. + +Well -- at least I have made one suggestion... Though it may not +explain it all... + +> +> I don't want to switch back to perl - but honestly, is python the right +> language to process souch huge amount of data? +> +> If you want to generate a test set you could use the following lines to +> print 10000 datasets to stdout: +> +> for i in xrange(1, 10001): +> print +> '>px%05d\nLSADQISTVQASFDKVKGDPVGILYAVFKADPSIMAKFTQFAGKDLESIKGTAPFETHAN\n\ +> RIVGFFSKIIGELPNIEADVNTFVASHKPRGVTHDQLNNFRAGFVSYMKAHTDFAGAEAA\n\ +> WGATLDTFFGMIFSKM\n' % i +> +> And if you don't believe me that perl does the job quicker you can try +> the perl code below: +[...] + +OK. Using your testset, I tried the following program (It may not work +exactly like your script...) + +I have made the assumption that all the id's have a constant length of +7. + +---------- + +import fileinput + +exclude = {'px00003': 1} +skip = 0 + +for line in fileinput.input(): + if line[0] == '>': + id = line[1:8] + if exclude.has_key(id): + skip = 1 + else: + skip = 0 + if not skip: + print line, + +----------- + +It took about 12 seconds. + +> +> Please do convince me being a python programmer does not mean being slow +> ;-) +> + +At least I tried... + +> Thanks very much for any help, +> +> Arne + +-- + > Hi! I'm the signature virus 99! + Magnus > Copy me into your signature and join the fun! + Lie + Hetland http://arcadia.laiv.org + + + + diff --git a/demo/ermis-f/python_m/cur/0378 b/demo/ermis-f/python_m/cur/0378 new file mode 100644 index 00000000..e51e7346 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0378 @@ -0,0 +1,53 @@ +From: olipt at mayo.edu (Travis Oliphant) +Date: Sun, 25 Apr 1999 20:03:12 -0500 +Subject: HELP! NumPy (Graphics) and Linux +In-Reply-To: <7fvpsh$l8e$1@nnrp1.dejanews.com> +References: <7fvpsh$l8e$1@nnrp1.dejanews.com> +Message-ID: +Content-Length: 1688 +X-UID: 378 + +Glad to hear that you are using NumPy on Linux. + +I've been putting together the RPM's for NumPy and would definitely +suggest you go that route initially. If you want to compile the packages +yourself you can get the source RPM for Numpy from andrich.net or from my +site at http://oliphant.netpedia.net and it will build 3 binary packages: +NumPy, Gist (EzPlot), and RNG (random number generators). The packages +come with quite a bit of documentation (all I could find). + +Installing a source RPM and then compiling amounts to: + +rpm -i package-name.src.rpm +rpm -ba /usr/src/redhat/SPECS/package.spec + +This will build a binary package compiled on your system and place it in +/usr/src/redhat/RPMS/i386 + +You can then install it like any other package. + +I would highly encourage learning to build from RPM sources. Grabbing a +spec file is usually all you need to start building any package you want. +If you stick with Oliver's RPM's you should be fine. I've had trouble in +the past however with compiling my own RPM's (using gcc) and trying to +import them into a python interpreter installed from Oliver's RPMS +(compiled with pgcc). I get strange segfaults. I haven't tried for +awhile so I don't know if the problem is still there but you might keep +that in mind if you are mixing and matching compilers for different python +packages. + +After that bit of rambling... The problem you are having is due to the +fact that the gist module now looks for the arrayobject.h file in +numerical/arrayobject.h which is not where your arrayobject.h header file +likely is. So, change that #include line in the C-code and it should +work. I had to do this to get the RPM's to work. + +Best, + +Travis + + + + + + diff --git a/demo/ermis-f/python_m/cur/0379 b/demo/ermis-f/python_m/cur/0379 new file mode 100644 index 00000000..2ec36cf2 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0379 @@ -0,0 +1,24 @@ +From: andrew at starmedia.net (Andrew Csillag) +Date: Wed, 21 Apr 1999 14:08:37 GMT +Subject: Problems with mod_pyapache and cPickle +References: <371CC227.5BDF5C5A@starmedia.net> <5l4smau1xk.fsf@eric.cnri.reston.va.us> +Message-ID: <371DDBE4.2C8326B6@starmedia.net> +X-UID: 379 + +Guido van Rossum wrote: +> +> Or you could upgrade to Python 1.5.2, which gets rid of the +> class_cache altogether. +> -- +> --Guido van Rossum (home page: http://www.python.org/~guido/) +Ahhh. Handn't looked at the 1.5.2 cPickle code. Cool. Thanks. + +Drew Csillag +-- +"There are two major products that come out of Berkeley: +LSD and UNIX. We don't believe this to be a coincidence." +- Jeremy S. Anderson + + + + diff --git a/demo/ermis-f/python_m/cur/0380 b/demo/ermis-f/python_m/cur/0380 new file mode 100644 index 00000000..41f71916 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0380 @@ -0,0 +1,49 @@ +From: claird at Starbase.NeoSoft.COM (Cameron Laird) +Date: 6 Apr 1999 08:27:32 -0500 +Subject: Python Chip +References: <3703D175.85747FEE@pop.vet.uu.nl> <000501be7da7$450ddf20$879e2299@tim> +Message-ID: <7ed244$ke9$1@Starbase.NeoSoft.COM> +Content-Length: 1418 +X-UID: 380 + +In article <000501be7da7$450ddf20$879e2299 at tim>, +Tim Peters wrote: +>[Martijn Faassen] +>> This isn't official, but have you all heard about the Python chip? +>> ... [recklessly premature disclosure deleted] ... +> +>[Chad Netzer] +>> April fools, right? +> +>[Martin] +>> No, no, this is as serious as a ten ton weight! Just ask Tim about the +>> stress tests if you still don't believe it. :) +>> +>> Is-it-april-already-ly yours, +> +>As Martijn reported, the stress tests are going *amazingly* well, modulo a +>subtle space/tab screwup in the hardware. I've completed VLSINANNY.py, +>which will verify future hardware conformance to generally accepted +>international leading whitespace principles, but the Russian part of the +>team is refusing to cooperate in protest of Kosovo (although if you ask me, +>they're just pissed at the Swedes for sneaking herring into the borscht ... +>again). + . + . + . +The metajoke is that, as I've learned from the +comp.arch crowd, it's all turtles anyway. That +is, *no* chips actually run the instruction sets +they present to their consumers; they all emulate, +even, or perhaps especially, including Intel's +latest mass-market offerings. Maybe we're just a +tweaked microcode store away from the Python chip +now, but it doesn't matter. +-- + +Cameron Laird http://starbase.neosoft.com/~claird/home.html +claird at NeoSoft.com +1 281 996 8546 FAX + + + + diff --git a/demo/ermis-f/python_m/cur/0381 b/demo/ermis-f/python_m/cur/0381 new file mode 100644 index 00000000..72c96938 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0381 @@ -0,0 +1,27 @@ +From: jwtozer at my-dejanews.com (jwtozer at my-dejanews.com) +Date: Thu, 15 Apr 1999 02:31:27 GMT +Subject: Novice Question: two lists -> dictionary +Message-ID: <7f3j1v$f6j$1@nnrp1.dejanews.com> +X-UID: 381 + +How do I make the members of one list the key of a dictionary and the members +of a second list the members of list values associated with with those keys? + +Given: + +ListA = ['10', '10', '20', '20', '20', '24'] +ListB = ['23', '44', '11', '19', '57', '3'] + +Desired Result: + +Dict = {'10': ['23','44'],'20': ['11','19','57'], '24': ['3']} + +Any help will be much appreciated. + + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/0382 b/demo/ermis-f/python_m/cur/0382 new file mode 100644 index 00000000..bb8603d0 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0382 @@ -0,0 +1,54 @@ +From: olipt at mayo.edu (Travis Oliphant) +Date: Wed, 28 Apr 1999 08:42:18 -0500 +Subject: Bug or Feature? +In-Reply-To: +References: <37208E69.4B022E0C@mediaone.net> <7fr3eg$bqr@world1.bellatlantic.net> <7g4jkg$llc@ds2.acs.ucalgary.ca> +Message-ID: +Content-Length: 1455 +X-UID: 382 + +On 28 Apr 1999, Stephan Houben wrote: + +> nascheme at ucalgary.ca (Neil Schemenauer) writes: +> +> > I think the Numeric array should be added as a standard module. +> > This is on the Python TODO list. I may do it myself it I get +> > time. I don't know how much of Numeric should be added. Any +> > comments? +> +> That would be cool. + +Here, here. + +> As you see, the "Numerical" part is by far the biggest, and if you make it +> a standard part of Python, you increase the size of the standard distribution +> by quite much. So that might be a reason not to do it. +> +> On the other hand, the biggest parts of "Numeric" are the blas lite and the +> lapack lite, which together make up 1503K. So perhaps you could rely on +> a preinsatalled BLAS and LAPACK, just as the standard Python distribution +> relies on the readline library. +> + +Having the Numeric extensions as part of the core would be excellent. I'd +be interested to here from knowledgeable people (people who decide these +things, i.e. Guido) what the arguments against doing so are. + +Not including blas and lapack in the core is fine as long as the user is +informed of the need to get BLAS and LAPACK on their machine. It would be +nice if you could count on someone using Numeric to have a full +implementation of BLAS and LAPACK on their machine. Quite a few other +libraries out there that would be nice extensions to Numeric depend on +subroutines in those libraries. + + +Travis Oliphant + + + + + + + + + diff --git a/demo/ermis-f/python_m/cur/0383 b/demo/ermis-f/python_m/cur/0383 new file mode 100644 index 00000000..641d01a8 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0383 @@ -0,0 +1,37 @@ +From: behrends at cse.msu.edu (Reimer Behrends) +Date: 29 Apr 1999 23:27:10 GMT +Subject: Python IS slow ! [was] Re: Python too slow for real world +References: <613145F79272D211914B0020AFF6401914DAD8@gandalf.digicool.com> <37272CA0.3F3F02A2@prescod.net> +Message-ID: +Content-Length: 1105 +X-UID: 383 + +Paul Prescod (paul at prescod.net) wrote: +> Markus Kohler wrote: +> > You are right that one should choose the right tool for a problem, but +> > I disagree that Python is optimized for the general case. Squeak a free +> > Smalltalk implementation (www.squeak.org), is already much faster ( about +> > 3 times actually ) than python and it has even a true Garbage +> > Collector. +> +> This is a little off-topic but I'm curious whether squeak has an embedding +> API. Is there any languge that is as easy to embed as Python, and also has +> full garbage collection? + +Ruby. (Was discussed here before.) See + + http://www.netlab.co.jp/ruby/ + +I think it is actually easier to extend with C code (because you don't +have to keep track of reference counts, among other things). On the +other hand, I could live without some of the more Perl-inspired +constructs in Ruby (nothing against Perl in general, it just happens +that its feature set is just the opposite of what I personally like in +a programming language -- i.e. thousands of different idioms and +extensive use of punctuation symbols). + + Reimer Behrends + + + + diff --git a/demo/ermis-f/python_m/cur/0384 b/demo/ermis-f/python_m/cur/0384 new file mode 100644 index 00000000..869ca7bf --- /dev/null +++ b/demo/ermis-f/python_m/cur/0384 @@ -0,0 +1,41 @@ +From: dieter at handshake.de (Dieter Maurer) +Date: 21 Apr 1999 20:32:58 +0000 +Subject: Python 1.5.1/2 library incompatibilities +Message-ID: +Content-Length: 1334 +X-UID: 384 + +Neither can a Python 1.5.1 interpreter use a 1.5.2 Python library +(it results in a "NameError: buffer" on import of "types.py") +nor can a 1.5.2 interpreter use a 1.5.1 library (this results +in failing to find the (new) built in exception "EnvironmentError"; +the interpreter switches back to string based exceptions which causes +subsequent failure when the application uses class exceptions). + +This was (for a short time) an issue for us. +We wanted to switch to Python 1.5.2; +we had, however, 1.5.1 interpreters embedded in +executables that could not all be replaced +immediately. Installing Python 1.5.2 the standard way broke the old +executables (because the 1.5.1 library was overwritten) +while installing the new libraries in "/usr/local/lib/python1.5.2" +let the new interpreter find the old modules. + +We solved the problem by changing the way, our local +Python interpreter finds the library: it now uses +the full version number to find its library rather than +the base version number, only. This allows us, to +have Python libraries with different version levels +(e.g. 1.5.1 and 1.5.2) in the same "prefix" location. + +We could also have installed Python 1.5.2 with a different +"prefix". However, this had led to a duplication of +"site-python" or the use of an explicite PYTHONPATH. +Both was considered unsatisfactory. + + +- Dieter + + + + diff --git a/demo/ermis-f/python_m/cur/0385 b/demo/ermis-f/python_m/cur/0385 new file mode 100644 index 00000000..f4fca58d --- /dev/null +++ b/demo/ermis-f/python_m/cur/0385 @@ -0,0 +1,45 @@ +From: hinsen at cnrs-orleans.fr (Konrad Hinsen) +Date: 09 Apr 1999 20:10:52 +0200 +Subject: Numeric: vector operations? +References: +Message-ID: +Content-Length: 1517 +X-UID: 385 + +Joe Strout writes: + +> Playing with Numeric today, I noticed an apparent lack of common vector +> operations, like normalization, vector-length, and cross product. + +If you mean vectors as in 3D geometry, look at the module Vector in my +collection of scientific modules +(http://starship.python.net/crew/hinsen/scientific.html). + +For vectors in the sense of rank-one arrays, I am not aware of any +available module that contains these operations (and the cross product +is limited to 3D-space anyway), but they are also much less frequently +needed for non-geometric work. + +> These are fairly easy to code for my own evil purposes, but it's +> surprising that they're not in there. Am I missing something? Or are +> they purposefully omitted for some reason (e.g., they only apply to +> very restricted sorts of matrices whereas other operations are more +> general)? + +I guess there is too little advantage in writing + Numeric.vector_length(v) +over + Numeric.sqrt(Numeric.add.reduce(v**2)) + +-- +------------------------------------------------------------------------------- +Konrad Hinsen | E-Mail: hinsen at cnrs-orleans.fr +Centre de Biophysique Moleculaire (CNRS) | Tel.: +33-2.38.25.55.69 +Rue Charles Sadron | Fax: +33-2.38.63.15.17 +45071 Orleans Cedex 2 | Deutsch/Esperanto/English/ +France | Nederlands/Francais +------------------------------------------------------------------------------- + + + + diff --git a/demo/ermis-f/python_m/cur/0386 b/demo/ermis-f/python_m/cur/0386 new file mode 100644 index 00000000..bc636b6a --- /dev/null +++ b/demo/ermis-f/python_m/cur/0386 @@ -0,0 +1,46 @@ +From: tismer at appliedbiometrics.com (Christian Tismer) +Date: Wed, 21 Apr 1999 15:30:25 GMT +Subject: Bit Arrays +References: +Message-ID: <371DEF11.6D06D79D@appliedbiometrics.com> +Content-Length: 1255 +X-UID: 386 + + +Jeffrey Kunce wrote: +> +> Take a look at ./Demo/classes/bitvec.py in the python source distribution. It may be what you want, or at least give you some ideas. +> +> --Jeff + +Interesting. This demo has not been used very much +from 1993 on, since it has a long-life bug: + + def __cmp__(self, other, *rest): + #rprt(`self`+'.__cmp__'+`(other, ) + rest`+'\n') + if type(other) != type(self): + other = apply(bitvec, (other, ) + rest) + #expensive solution... recursive binary, with slicing + length = self._len + if length == 0 or other._len == 0: + return cmp(length, other._len) + if length != other._len: + min_lenght = min(length, other._len) + ^- here! + return cmp(self[:min_length], other[:min_length]) or \ + cmp(self[min_length:], other[min_length:]) + #the lengths are the same now... + +ciao - chris + +-- +Christian Tismer :^) +Applied Biometrics GmbH : Have a break! Take a ride on Python's +Kaiserin-Augusta-Allee 101 : *Starship* http://starship.python.net +10553 Berlin : PGP key -> http://wwwkeys.pgp.net +PGP Fingerprint E182 71C7 1A9D 66E9 9D15 D3CC D4D7 93E2 1FAE F6DF + we're tired of banana software - shipped green, ripens at home + + + + diff --git a/demo/ermis-f/python_m/cur/0387 b/demo/ermis-f/python_m/cur/0387 new file mode 100644 index 00000000..1cac5f5d --- /dev/null +++ b/demo/ermis-f/python_m/cur/0387 @@ -0,0 +1,48 @@ +From: stidolph at origin.ea.com (Stidolph, David) +Date: Fri, 30 Apr 1999 13:33:26 GMT +Subject: Errors +Message-ID: <11A17AA2B9EAD111BCEA00A0C9B4179301E10E2B@forest.origin.ea.com> +X-UID: 387 + +try this... + +tally = 0 +for word in All_Words: + z = 0 + while z < len(word): + if z == 0: + tally = tally + alpha.index(word[z]) + else: + tally = tally + (alpha.index(word[z]) * 26) + +The right side of the '=' is being done before the left, so you are trying +to read a variable that has not been initialized. + +-----Original Message----- +From: smoothasice at geocities.com [mailto:smoothasice at geocities.com] +Sent: Thursday, April 29, 1999 4:17 PM +To: python-list at cwi.nl +Subject: Errors + + +Ok I have been using python and I have noticed that the errors aren't +truly helpful.. I don't know if I just didn't learn this properly but I +dont' know why this generates an error: + +for word in All_Words: + z = 0 + while z < len(word): + if z == 0: + tally = tally + alpha.index(word[z]) + else: + tally = tally + (alpha.index(word[z]) * 26) + +It gives me this: NameError: tally +and I don't know why...... + +THanks, +Anton + + + + diff --git a/demo/ermis-f/python_m/cur/0388 b/demo/ermis-f/python_m/cur/0388 new file mode 100644 index 00000000..8ae0c17b --- /dev/null +++ b/demo/ermis-f/python_m/cur/0388 @@ -0,0 +1,31 @@ +From: see at my.sig (dg) +Date: Wed, 21 Apr 1999 21:24:37 -0700 +Subject: The Future of Tk? +References: <371E964F.C531C2A@istar.ca> +Message-ID: +X-UID: 388 + +In article <371E964F.C531C2A at istar.ca>, eugened at istar.ca spoke thusly: +> For programmers using languages other than Tcl. +> +> I recently "discovered" the latest stable version of Tcl/Tk (8.05) and +> must say that was quite impressed by the simplicity and ease of use of +> Tk. +> +> But I also found that while older versions of Tk were using lightweight +> components (Some Java terminology :) the latest version is using native +> components for things like scrollbars and buttons. +> +> I don't want to say that this is bad for Tcl users but what about all +> the other languages that use Tk? Isn't writting multiplatform GUI harder +> using native components.... + +Tk does all the hard work, depending on which platform it's compiled for. +The gui programmer makes the same calls in either case. +-- +Don Groves (groves_acm_org) +Replace underscores to get my email address + + + + diff --git a/demo/ermis-f/python_m/cur/0389 b/demo/ermis-f/python_m/cur/0389 new file mode 100644 index 00000000..f21e455b --- /dev/null +++ b/demo/ermis-f/python_m/cur/0389 @@ -0,0 +1,32 @@ +From: quinn at mark.ugcs.caltech.edu (Quinn Dunkan) +Date: 16 Apr 1999 21:28:06 GMT +Subject: pty, qwsv and Python +References: <3717725B.34F2E34A@bogus.bogus.com> +Message-ID: +X-UID: 389 + +On Fri, 16 Apr 1999 14:24:44 -0300, Henrique Almeida +wrote: +>Warning: NO native speaker ahead. +> +>Hi. +> +>I'm new to Python (only started looking at the docs yesterday). I want +>to know if it is possible to control a qwsv (quake world linux server) +>using Python: ie do a "status" command in the qwsv every 5 minutes, +>process the returned code, watch for some string in the pty... +> +>After searching the Python home page it looks like popen2() is the way +>to go. Is it? Also, is it possible to use "screen" (a program that let +>me "detach" the server) and "popen2" at the same time? I would like have +>a interactive session to qwsv to do administration. +> +>Thanks. + +popen2() not going to help with the infamous stdio buffering problem. What +you want is pyexpect. Look under System in +www.python.org/download/Contributed.html + + + + diff --git a/demo/ermis-f/python_m/cur/0390 b/demo/ermis-f/python_m/cur/0390 new file mode 100644 index 00000000..304a23c3 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0390 @@ -0,0 +1,31 @@ +From: paul at prescod.net (Paul Prescod) +Date: Wed, 28 Apr 1999 20:04:00 GMT +Subject: Python IS slow ! [was] Re: Python too slow for real world +References: <613145F79272D211914B0020AFF6401914DAD8@gandalf.digicool.com> + +Message-ID: <372769B0.3CE8C0F3@prescod.net> +X-UID: 390 + +William Tanksley wrote: +> +> And Oberon (SlimBinaries), and Eiffel (typing and general compile-time +> error catching), and ... + +Actually, isn't Eiffel's type system famous for being full of holes? + +Regardless, wouldn't a better source of inspiration on typing be a +language with *optional* compile-time error checking? + +-- + Paul Prescod - ISOGEN Consulting Engineer speaking for only himself + http://itrc.uwaterloo.ca/~papresco + +"Microsoft spokesman Ian Hatton admits that the Linux system would have +performed better had it been tuned." +"Future press releases on the issue will clearly state that the research +was sponsored by Microsoft." + http://www.itweb.co.za/sections/enterprise/1999/9904221410.asp + + + + diff --git a/demo/ermis-f/python_m/cur/0391 b/demo/ermis-f/python_m/cur/0391 new file mode 100644 index 00000000..d920c342 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0391 @@ -0,0 +1,57 @@ +From: tismer at appliedbiometrics.com (Christian Tismer) +Date: Fri, 9 Apr 1999 14:17:27 GMT +Subject: import from user input? +References: <816010E2456BD111A48700805FBBE2EEA63EB7@ex-quebec-u1.baan.com> +Message-ID: <370E0BF7.D6E35B7A@appliedbiometrics.com> +Content-Length: 1483 +X-UID: 391 + + +Gaetan Corneau wrote: +> +> Hello, +> +> I want to import modules at runtime, and get the module name from the user. +> Is that possible? How? + +There is more than one way. +The obvious one is to execute a generated statement +in the correct environment, as in + +>>> import string +>>> modname=string.strip(raw_input("which module do you want to import today?")) +>>> exec "import "+modname +>>> re # what I typed + +>>> + +But if you want to be less open to users who might type bad things +like "sys ; sys.exit()", +this version might be easier to handle: + +>>> globals()[modname] = __import__(modname) + +The advantage is that the builtin function __import__ is a function +which requires a module name as a string parameter. +No necessity to check for bad input, but by a try...except ImportError +clause +if the module isn't found. + +> Another question: is there a function to copy/move entire directory trees? + +There is a walk function in os.path which makes it +an easy exercise to write such a function. + +ciao - chris + +-- +Christian Tismer :^) +Applied Biometrics GmbH : Have a break! Take a ride on Python's +Kaiserin-Augusta-Allee 101 : *Starship* http://starship.python.net +10553 Berlin : PGP key -> http://wwwkeys.pgp.net +PGP Fingerprint E182 71C7 1A9D 66E9 9D15 D3CC D4D7 93E2 1FAE F6DF + we're tired of banana software - shipped green, ripens at home + + + + diff --git a/demo/ermis-f/python_m/cur/0392 b/demo/ermis-f/python_m/cur/0392 new file mode 100644 index 00000000..067b7055 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0392 @@ -0,0 +1,33 @@ +From: pchristo at ic.sunysb.edu (Pavlos Christoforou) +Date: Tue, 13 Apr 1999 14:13:14 -0400 +Subject: simple indexed file module? +In-Reply-To: <7evg0s$spu$1@nnrp1.dejanews.com> +References: <7evg0s$spu$1@nnrp1.dejanews.com> +Message-ID: +X-UID: 392 + +On Tue, 13 Apr 1999 aaron_watters at my-dejanews.com wrote: + +> In article , +> Joe Strout wrote: +> > For a CGI script I'm working on, I need to keep a couple of indexed +> > files. These will contain variable-length data (descriptions), which +> > may be changed fairly frequently. So I imagine that in addition to the +> > data file, there will be an index file that keeps track of the position +> > and length of each record. New or expanded records will be stuffed in +> > wherever there is free space, or at the end if no sufficient free chunk +> > is available. +> + +I would suggest you use BoboPOS, the Object database used in Zope and +available as a seperate component. It supports transactions, multiple +versions and undo plus a lot of other cool things. It is very easy to use +and very stable. + +Pavlos + + + + + + diff --git a/demo/ermis-f/python_m/cur/0393 b/demo/ermis-f/python_m/cur/0393 new file mode 100644 index 00000000..ee2a9fe8 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0393 @@ -0,0 +1,15 @@ +From: wolfman at clara.com (wolfman at clara.com) +Date: Wed, 21 Apr 1999 12:04:53 GMT +Subject: Should I? 2913 +Message-ID: +X-UID: 393 + +http://www.eureka-erotica.com/adultsex/pornplaza/ +Go on then! +Over 18s only. +kbzlilnbhnqxghwtemoc + + + + + diff --git a/demo/ermis-f/python_m/cur/0394 b/demo/ermis-f/python_m/cur/0394 new file mode 100644 index 00000000..2aceaaa3 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0394 @@ -0,0 +1,38 @@ +From: news at dorb.com (Darrell) +Date: Wed, 7 Apr 1999 13:22:48 -0400 +Subject: Chaning instance methods +References: +Message-ID: +X-UID: 394 + +As Tim says "so you've created a piece of immortal cyclic trash" +I love the way that sounds. +It sure would be nice to be able to walk a list of allocated memory and +clean it up if you want to. Or discover what objects are eating the memory +you have. + + +> Hope this helps. +> +> >>> class X: +> ... def y(self): +> ... print 'y1' +> ... +> >>> x=X() +> >>> x.y() +> y1 +> >>> def y2(self=x): +> ... print 'y2' +> ... +> >>> setattr(x,'y',y2) +> >>> x.y() +> y2 +> >>> +> +> + + + + + + diff --git a/demo/ermis-f/python_m/cur/0395 b/demo/ermis-f/python_m/cur/0395 new file mode 100644 index 00000000..c4de19ec --- /dev/null +++ b/demo/ermis-f/python_m/cur/0395 @@ -0,0 +1,58 @@ +From: trashcan at david-steuber.com (David Steuber) +Date: 28 Apr 1999 04:00:16 -0400 +Subject: Designing Large Systems with Python +References: <372599D6.C156C996@pop.vet.uu.nl> <7g4a3l$atk$1@news.worldonline.nl> +Message-ID: +Content-Length: 1612 +X-UID: 395 + +"Ilja Heitlager" writes: + +-> To build larger systems you need classes and modules for abstraction and +-> reuse. + +Python appears to have that. + +-> To build proto's you need interactive programming and short code-debug +-> cycles. + +Python also seems to have that. I would like better python support in +XEmacs. There is a python mode, but I haven't seen anything about +evaluating Python code ineteractivly the way you can with Lisp and +elisp. + +-> Need GUI's? MFC or tcl/tk? + +MFC???? I hope to seperate the functionality from the GUI to +make both orthoganal to each other. If I can pull that off, I suppose +a Windows version would be possible for what I want to do. I am +expecting to go straight to XLib and OpenGL. If I need an abstraction +layer over X, it would probably be xt. + +-> Networking, Parsers, XML, HTML, regex? + +I am not sure if I need to use networking. I am hoping to get +concurrent development via outside tools like CVS. + +-> ehh, Python? + +It looks interesting. It is more C like than Lisp like. I was +considering using Lisp, but for various reasons I have abandoned that +idea. JavaScript is too weak. Perl is a strong scripting language, +but it is a real bitch to create C++ style classes. The syntax is a +nightmare. I'll keep it for text munching. + +-- +David Steuber +http://www.david-steuber.com + +If you wish to reply by mail, _please_ replace 'trashcan' with 'david' +in the e-mail address. The trashcan account really is a trashcan. + +Drew's Law of Highway Biology: + The first bug to hit a clean windshield lands directly in front +of your eyes. + + + + diff --git a/demo/ermis-f/python_m/cur/0396 b/demo/ermis-f/python_m/cur/0396 new file mode 100644 index 00000000..e6a1fb79 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0396 @@ -0,0 +1,39 @@ +From: aahz at netcom.com (Aahz Maruch) +Date: Sat, 3 Apr 1999 00:01:31 GMT +Subject: string.join() vs % and + operators +References: <37054490.E79ADCC9@easystreet.com> +Message-ID: +Content-Length: 1175 +X-UID: 396 + +In article <37054490.E79ADCC9 at easystreet.com>, +Al Christians wrote: +> +>This ran amazingly fast on my Pentium 200 Mhz -- around 11 seconds for +>Way 1, and 7 for Way 2. So, either way, Python can put together about +>1 million little strings in a second. Way 3, the way that one would +>expect to be bad, recreating the string with each concatenation, was +>much slower, but only took about 1 minute. Surprisingly swift as well. +> +>Anybody have anything to add to this? Are there any related pitfalls +>that I may have missed? + +Yup. Using '+' for strings really bites when you've got long (or +potentially long) strings. The average size of the string you're +concatenating is about a hundred characters; suppose you're doing CGI +work with redirects, and you're looking at closer to three hundred +characters a pop. + +Try adding a 1K pre-string to the front of each of your Ways and see +what happens to the speed. +-- + --- Aahz (@netcom.com) + +Hugs and backrubs -- I break Rule 6 <*> http://www.rahul.net/aahz/ +Androgynous poly kinky vanilla queer het + +Why is this newsgroup different from all other newsgroups? + + + + diff --git a/demo/ermis-f/python_m/cur/0397 b/demo/ermis-f/python_m/cur/0397 new file mode 100644 index 00000000..1f7e3009 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0397 @@ -0,0 +1,17 @@ +From: pecold at my-dejanews.com (pecold at my-dejanews.com) +Date: Tue, 20 Apr 1999 18:02:27 GMT +Subject: VB Nothing equivalent in win32com +Message-ID: <7fiffg$4sb$1@nnrp1.dejanews.com> +X-UID: 397 + +Does Python support something like VB Nothing object?? (Universal NULL +pointer.) + +Petr + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/0398 b/demo/ermis-f/python_m/cur/0398 new file mode 100644 index 00000000..c0b79f50 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0398 @@ -0,0 +1,33 @@ +From: ruebe at aachen.heimat.de (Christian Scholz) +Date: Tue, 27 Apr 1999 15:51:32 +0000 +Subject: Designing Large Systems with Python +References: <372599D6.C156C996@pop.vet.uu.nl> <7g4a3l$atk$1@news.worldonline.nl> +Message-ID: <3725DD04.4452128F@aachen.heimat.de> +X-UID: 398 + +Hi! + +Ilja Heitlager wrote: + +> > One other thing. Is the documentation that comes with Python +> > sufficient to gain mastery of the language, or should I consider +> > buying (yet) another book? +> +> The online-documentation and examples were sufficient for me, but I love +> paper refs and +> everbody should have Programming Python + +Well, I found Programming Python a bit too narrating.. I usually just +want +a quick overview of function or who I do this or that. Thus the library +reference + the FAQ + The Python Quick Reference was quite enough for +me.. +(There are some interesting boxes in Programming Python though). +But actually I also had programming experience before. + +best, + Christian + + + + diff --git a/demo/ermis-f/python_m/cur/0399 b/demo/ermis-f/python_m/cur/0399 new file mode 100644 index 00000000..06953143 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0399 @@ -0,0 +1,26 @@ +From: fredrik at pythonware.com (Fredrik Lundh) +Date: Fri, 16 Apr 1999 13:28:43 GMT +Subject: Imperfections in ihooks.py? +References: +Message-ID: <00d301be880d$0ebcd000$f29b12c2@pythonware.com> +X-UID: 399 + +> I apologise for the lousy use of language in this post. It's a subject +> I find a bit confusing to think about, and I'm clearly not much better +> a writing about it. +> +> Does anybody out there use ihooks? I'm having a couple of problems. + +Forget about ihooks.py. Greg Stein's imputil.py module +is much easier to use, and much more powerful. + +It's in the "small distribution" kit, available from: + + http://www.lyra.org/greg/small/ + + + + + + + diff --git a/demo/ermis-f/python_m/cur/0400 b/demo/ermis-f/python_m/cur/0400 new file mode 100644 index 00000000..b38f180e --- /dev/null +++ b/demo/ermis-f/python_m/cur/0400 @@ -0,0 +1,52 @@ +From: fredrik at pythonware.com (Fredrik Lundh) +Date: Tue, 20 Apr 1999 10:01:02 GMT +Subject: Tkinter: some Labels not updating +References: <7fhdqo$dnl$1@agate.berkeley.edu> +Message-ID: <00b901be8b14$b45097e0$f29b12c2@pythonware.com> +Content-Length: 1341 +X-UID: 400 + +python at pinky.cchem.berkeley.edu wrote: +> My Tkinter window has a Canvas with a bitmap image in one Frame, +> pull down menus in another Frame, and a few Buttons and Labels. The +> Labels are supposed to indicate the values of certain variables which +> change when the user clicks on the canvas. The first Label changes, +> but the others don't, they stay fixed at the values they had when +> I created the Label. +> +> Is there a trick here or something I don't get? +> +> I first create the StringVar: +> +> self.X1v=StringVar() +> +> Then I initialize X1v: +> +> self.X1v.set("X1: not entered") +> +> Then I make a Label object +> +> self.l1=Label(tb, textvariable=self.X1v) +> self.l1.pack(side=TOP) +> +> Then in the mouse callback (yes, it gets run, I have it print to stdout) +> +> self.X1v.set("X1: Got It") +> +> But no update of the text in the label happens. Updates _do_ happen +> in another Label object that is in a Frame by itself. Do I need a +> separate Frame for each Label? Do I have too many Label objects? + +as far as I can tell, your program should work. which means that +there's probably something you forgot to tell us. try to make a +small but complete program that illustrates the problem. + +(btw, if nothing else helps, you could skip the textvariables and +use self.l1.config(text="X1: Got it") instead...) + + + + + + + diff --git a/demo/ermis-f/python_m/cur/0401 b/demo/ermis-f/python_m/cur/0401 new file mode 100644 index 00000000..76bc779a --- /dev/null +++ b/demo/ermis-f/python_m/cur/0401 @@ -0,0 +1,32 @@ +From: tim_one at email.msn.com (Tim Peters) +Date: Sat, 24 Apr 1999 00:42:18 -0400 +Subject: millisecond time accuracy +In-Reply-To: <14112.46141.974182.785300@amarok.cnri.reston.va.us> +Message-ID: <000201be8e0c$d60bc580$f09e2299@tim> +X-UID: 401 + +[Kevin F. Smith] +> Is there a way to measure time accurate to milliseconds? +> +> For example, by calling the time.time() function I get seconds. Is +> there a comparable function that I could use to measure interval times +> down to at least millisecond accuracy? + +[Andrew Kuchling] +> Nothing portable. However, time.time() actually returns a floating +> point number, and the Python implementation tries to use the +> most precise function available in the C library. + +OTOH, so does time.clock(), which yields better-than-microsecond resolution +on most Windows + Intel systems (and where time.time() is much cruder). + +Note that the Library Ref recommends time.clock() for benchmarking. + +over-ten-years-a-nanosecond-here-or-there-doesn't-amount-to-much- + more-than-a-microsecond-ly y'rs - tim + + + + + + diff --git a/demo/ermis-f/python_m/cur/0402 b/demo/ermis-f/python_m/cur/0402 new file mode 100644 index 00000000..169322d9 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0402 @@ -0,0 +1,36 @@ +From: claird at Starbase.NeoSoft.COM (Cameron Laird) +Date: 5 Apr 1999 23:46:10 -0500 +Subject: SNMPy update +References: <7e1hiq$a71$1@Starbase.NeoSoft.COM> <14089.11820.416453.80124@bitdiddle.cnri.reston.va.us> <7ebtn1$dq$1@Starbase.NeoSoft.COM> <3709868A.CFCCE63@Lugoj.Com> +Message-ID: <7ec3ii$4su$1@Starbase.NeoSoft.COM> +X-UID: 402 + +In article <3709868A.CFCCE63 at Lugoj.Com>, +James Logajan wrote: +>Cameron Laird wrote: + . + . + . +>> Hardly. There are several ASN.1 compilers. MAVROS > www-sop.inria.fr/rodeo/personnel/huitema/mavros-home.html> is +>> another. I know of none that's achieved SNACC's portability. +> +>MAVROS is free? + +Jeremy asked about "free-ish" compilers. The referenced +page says + You can get a free licence for the MAVROS executable + and/or source code for teaching and research use only. + + For commercial use please contact Alain Zahm. +Is it important to someone to find a compiler that's other- +than-SNACC and has a different license that MAVROS'? I'm +confident that, too, is possible. +-- + +Cameron Laird http://starbase.neosoft.com/~claird/home.html +claird at NeoSoft.com +1 281 996 8546 FAX + + + + diff --git a/demo/ermis-f/python_m/cur/0403 b/demo/ermis-f/python_m/cur/0403 new file mode 100644 index 00000000..cbddc4f9 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0403 @@ -0,0 +1,28 @@ +From: kaz at ashi.FootPrints.net (Kaz Kylheku) +Date: Thu, 22 Apr 1999 18:22:32 GMT +Subject: The Future of Tk? +References: <371E964F.C531C2A@istar.ca> <371F11C2.3162025@ciril.fr> <4fv$ECA+JyH3EwbN@jessikat.demon.co.uk> +Message-ID: +X-UID: 403 + +On Thu, 22 Apr 1999 18:01:27 GMT, Barry Margolin wrote: +>In article <4fv$ECA+JyH3EwbN at jessikat.demon.co.uk>, +>Robin Becker wrote: +>>I take this completely differently; least astonishment for me is if +>>program X looks and behaves the same way no matter what keyboard, mouse +>>and screen I'm using. As a 'user' of the program X it shouldn't matter +>>what OS/WM is executing the code. I certainly don't want vi or emacs to +>>be different on the mac why should I treat word or excel differently? +> +>I would be very surprised if Netscape on the Macintosh presented a +>Windows-like user interface, rather than adopting the standard Macintosh + +I'd be very surprised if even 10% of, say, comp.lang.c gave a damn. The pitiful +dumbfuck who started this thread made a severe mistake in constructing the +Newsgroups: header line, the moment he put in the first comma. + +I am setting Followup-to: to comp.lang.tcl. + + + + diff --git a/demo/ermis-f/python_m/cur/0404 b/demo/ermis-f/python_m/cur/0404 new file mode 100644 index 00000000..56761b4b --- /dev/null +++ b/demo/ermis-f/python_m/cur/0404 @@ -0,0 +1,63 @@ +From: bwarsaw at cnri.reston.va.us (Barry A. Warsaw) +Date: Thu, 29 Apr 1999 11:15:12 -0400 (EDT) +Subject: Emacs' python-mode buggy? +References: +Message-ID: <14120.30592.807745.732604@anthem.cnri.reston.va.us> +Content-Length: 2444 +X-UID: 404 + +>>>>> "MS" == Markus Stenberg writes: + + MS> At least by my experiences the Emacs mode (at least, two + MS> versions I tried, 3.75 and whatever came with Python 1.5.2) + MS> seems to have tons of bugs; to be more precise, it seems to + MS> think a lot more of my code than should be is string (and + MS> therefore is green and indentation doesn't work). + + MS> Funny thing is, it's colored properly when I load file but + MS> when I start editing some files' some parts, they turn green + MS> (comment-ish) and indentation starts to suck. + + MS> Indentation being fairly neccessary feature for Python coding, + MS> is there some option I am missing or am I fucked? (read: + MS> forced to use vim or something) + +Contrary to what Tim says, pymode was so buggy when I got it from him +that I renamed that pile of elisp `perl-mode' and rewrote the stuff +from scratch. Tim being a clever bot embedded himself in three elisp +defuns in the Python 1.5.2 version of the file. If you look at the +code closely you'll see that every 19,453rd time he gets run, he +decides to muck up your syntax coloring "just for the fun of it". + +Okay, like Tim I lied too (about the "clever bot" part, and maybe +about the rest of it). + +Since you don't say, let me make some educated guesses. Are you +running XEmacs (v20.something or 21.0)? In the code in question, do +you have an open parenthesis in column zero someplace higher up in a +triple quoted string (say a module docstring f'r instance)? + +This is a known lose on XEmacs -- but it's not a bug caused by pymode. +XEmacs, and older versions of Emacs, makes an assumption that any +character with `open' syntax (e.g. `(', `[', `{') in column zero +starts a top level definition and thus short circuits X/Emacs' +built-in parsing primitives. Works great for Lisp and C; useless +suckage for Python. Unfortunately, AFAIK there's no way to disable +this in Python buffers under XEmacs. + +The clue is the broken font-lockage for comments. This is all +controlled by primitives driven by syntax tables, so there's little +that pymode (or pymode's Legion of Corruptors) can mess up. + +So the answer is: don't put open parens in column zero inside triple +quoted strings. + +Hope that answers it. If not, hit C-c C-b in a python-mode buffer, +include a complete code sample and recipe for me to reproduce the +problem, and email the message to python-mode at python.org + +-Barry + + + + diff --git a/demo/ermis-f/python_m/cur/0405 b/demo/ermis-f/python_m/cur/0405 new file mode 100644 index 00000000..1316cd55 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0405 @@ -0,0 +1,36 @@ +From: skip at mojam.com (Skip Montanaro) +Date: Thu, 22 Apr 1999 03:08:35 GMT +Subject: Need someone to try some rarely used bsddb methods +References: <7fa14m$vfm$1@nnrp1.dejanews.com> +Message-ID: <371E9326.8472D97@mojam.com> +Content-Length: 1057 +X-UID: 405 + +A few days ago I asked for input about how the various bsddb object +methods work with different storage types (btree, hash, recno). I got +responses from several people whose findings were consistent with mine. +The "last" and "previous" methods seemed to fail for hash databases. + +It turns out they aren't supported. A little digging around in the +Berkeley DB code demonstrated that quite clearly. I will work on some +patches to the bsddb module that catch the mistake and return a more +meaningful error message along with the exception. I have yet to figure +out what is happening with the recno format databases. My +recommendation is that you only use the btree format for large +databases. (Unfortunately, anydbm.open calls bsddb.hashopen when it's +available.) + +I wound up writing the section for the library reference as well. I +believe it's in the CVS repository now. + +Thanks to all who replied. + +-- +Skip Montanaro | Mojam: "Uniting the World of Music" +http://www.mojam.com/ +skip at mojam.com | Musi-Cal: http://www.musi-cal.com/ +518-372-5583 + + + + diff --git a/demo/ermis-f/python_m/cur/0406 b/demo/ermis-f/python_m/cur/0406 new file mode 100644 index 00000000..1a62b3c4 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0406 @@ -0,0 +1,63 @@ +From: aa8vb at vislab.epa.gov (Randall Hopper) +Date: Fri, 30 Apr 1999 14:12:15 GMT +Subject: Python IS slow ! [was] Re: Python too slow for real world +In-Reply-To: <3729A9F3.75B2692B@appliedbiometrics.com>; from Christian Tismer on Fri, Apr 30, 1999 at 03:02:43PM +0200 +References: <613145F79272D211914B0020AFF6401914DAD8@gandalf.digicool.com> <7g9qmo$luf$1@news.udel.edu> <372965CA.2B3FD2FE@appliedbiometrics.com> <19990430080805.B776752@vislab.epa.gov> <3729A9F3.75B2692B@appliedbiometrics.com> +Message-ID: <19990430101215.A806665@vislab.epa.gov> +Content-Length: 2095 +X-UID: 406 + +Christian Tismer: + |Randall Hopper wrote: + |> Christian Tismer: + |> |I'm thinking of no new keyword, but a mechanism which allows me to lock a + |> |namespace somehow. + |> + |> I like this idea in concept. Though I would prefer a way to have + |> namespaces "lock by default". Examples: After a class definition, the + |> class function dictionary is locked. After a module is fully read, all + |> references are bound and the module namespace is locked. etc. + | + |Well, I wouldn't do that by default. By default, everything could stay as + |it is. First of all, this would not break any existing code. + +Right. I wasn't too clear. By default, I mean I don't want to have to +insert some commands/declarations for every namespace (every class, every +method, every module, etc.) to lock them. I want this to happen +automagically based on a switch. + +A command-line option (-w), or something like Perl's "use strict" +declaration would be a reasonable way to enable this behavior. + + |Then, what would you do with classes which depend on each + |other? You cannot lock them immediately, this would fail. + +Could you give an example? + + |Depending on how exactly will be implemented, a single line + |at the end of a module should suffice to accomplish this stuff + |for the standard cases. + +This would prevent namespace binding and locking from occuring while the +module is being parsed, wouldn't it? With a lock declaration at the +beginning, Python could do this as it goes. Seems like that would be +easier (Python sees end of function -> module.symbol referenced in the +function was not defined -> flag error and abort parse). + + |As a side effect, locking a module would also find all + |referenced but undefined symbols. + +That's the goal I'm rooting for. ;-) + + |Anyway, this is still no cakewalk and quite a lot of code + |is involved. Needs much more thinking... + +Definitely. No doubt Guido and the other language experts have a better +feel for this than I do. But I felt compelled to chime-in on this topic +since it's important to me (and the squeaky wheel gets the grease. :-) + +Randall + + + + diff --git a/demo/ermis-f/python_m/cur/0407 b/demo/ermis-f/python_m/cur/0407 new file mode 100644 index 00000000..dd916661 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0407 @@ -0,0 +1,39 @@ +From: geek+ at cmu.edu (geek+ at cmu.edu) +Date: 5 Apr 1999 12:36:56 -0400 +Subject: Subattributes of classes +Message-ID: +Content-Length: 1328 +X-UID: 407 + +Then spoke up and said: +> Randall Hopper wrote: +> +> > Why? +> +> Because "attr" in class A is just an int, and has no attributes, +> whereas "draw" in the Tkinter demo is a Canvas object, which has a +> scrollX and scrollY attribute. + +Actually, this is both right and wrong. It doesn't matter whether or +not the object has attributes. What matters is whether or not the +object is mutable. An integer object is not mutable. This is one of +the reasons there is no increment operator for integers. Such an +operation is usually semantically "in place", where it would have to +be a factory function (like +) in Python. + +-- +===================================================================== +| JAVA must have been developed in the wilds of West Virginia. | +| After all, why else would it support only single inheritance?? | +===================================================================== +| Finger geek at cmu.edu for my public key. | +===================================================================== +-------------- next part -------------- +A non-text attachment was scrubbed... +Name: not available +Type: application/pgp-signature +Size: 266 bytes +Desc: not available +URL: + + diff --git a/demo/ermis-f/python_m/cur/0408 b/demo/ermis-f/python_m/cur/0408 new file mode 100644 index 00000000..ba9c1637 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0408 @@ -0,0 +1,25 @@ +From: nathan.froyd at rose-hulman.edu (Nathan Froyd) +Date: 27 Apr 1999 21:44:00 -0500 +Subject: running application config files written in Python +Message-ID: +X-UID: 408 + +Say I have an application whose configuration language I want to be +Python. I have all my extra types implemented in C. Now what I'm +wondering is what's the best way to run that file so that the +functions, variables, etc. get imported into the Python interpreter +embedded in my program? + +Along the same lines, once I have run the file, what's the easiest way +to find out if a particular function/variable has been defined? For +example, if I always wanted to run the user-defined function +`startup_func', how would I go about doing that? +-- +Nathan | nathan.froyd at rose-hulman.edu | http://www.rose-hulman.edu/~froydnj/ +God went through hell so we don't have to. ICQ:18861764 | AOL:myrlyn007 +Avoid the gates of hell. Use Linux. Python:"x='x=%s;x%%`x`';x%`x`" +Evolution is a million line computer program falling into place by accident. + + + + diff --git a/demo/ermis-f/python_m/cur/0409 b/demo/ermis-f/python_m/cur/0409 new file mode 100644 index 00000000..f9db0a3a --- /dev/null +++ b/demo/ermis-f/python_m/cur/0409 @@ -0,0 +1,36 @@ +From: ruebe at aachen.heimat.de (Christian Scholz) +Date: Fri, 23 Apr 1999 21:02:23 +0000 +Subject: Problem while Installing.. +References: <3720DF98.8CEC8D8F@aachen.heimat.de> +Message-ID: <3720DFDF.F25E6775@aachen.heimat.de> +X-UID: 409 + +Christian Scholz wrote: + +> Hi everybody! +> +> I have a strange problem right now: +> +> 'import exceptions' failed; use -v for traceback +> Warning! Falling back to string-based exceptions +> Fatal Python error: Cannot create string-based exceptions +> IOT trap/Abort + +I also made the same with the -v switch: + +ruebe at server:/exports/home/homes/ruebe/prg/udmsearch-if > +/opt/python1.5/bin/python -v +'import exceptions' failed; traceback: +lost sys.stderr +Warning! Falling back to string-based exceptions +Fatal Python error: Cannot create string-based exceptions +IOT trap/Abort + +Just to let you know.. :) + +-- christian + + + + + diff --git a/demo/ermis-f/python_m/cur/0410 b/demo/ermis-f/python_m/cur/0410 new file mode 100644 index 00000000..fbf69dbf --- /dev/null +++ b/demo/ermis-f/python_m/cur/0410 @@ -0,0 +1,52 @@ +From: da at ski.org (David Ascher) +Date: Mon, 19 Apr 1999 16:24:30 GMT +Subject: Tkinter performance +In-Reply-To: <371B4B39.8B78BC7A@foreman.ac.rwth-aachen.de> +References: <371B4B39.8B78BC7A@foreman.ac.rwth-aachen.de> +Message-ID: +Content-Length: 1494 +X-UID: 410 + +On Mon, 19 Apr 1999, Greg Landrum wrote: + +> While I'm at it, I have a performance question about Tkinter. +> +> I am thinking about doing a python/Tkinter port of a program +> which currently uses C/Xlib (or C/quickdraw on the Mac). I'd +> love to get this to work because then I would (finally) have +> a version which could work under Win95/98/NT. But I'm worried +> about performance issues. +> +> The program does 3D graphics (molecular/crystal visualization +> and orbital plots). I handle all of the perspective/transformation +> stuff myself, so I don't need any 3D functionality. I do need +> something which can draw reasonably quickly however. +> +> Suppose I need to draw a couple hundred circles and several +> thousand line segments (these are mostly connected, so I can +> use things like XDrawLines to cut down function calls) at +> every update. +> 1) Can Tkinter on a "typical" PC (say a P200) deliver a +> "reasonable" update rate (a couple of frames per second +> would probably cut it)? +> 2) Is there anyway to do double-buffering to avoid flashing +> during redraws? +> +> I am guessing that the answer to both of these of these questions +> is "No", but I'd love to hear a contrary opinion. + +I'd suggest using PyOpenGL with the NumPy extension. In combination, it +can be quite fast, by pushing the loops to C extension modules. The only +portability problem is to the mac -- there is no Togl widget for the mac +yet. + + http://starship.python.net/~da/PyOpenGL + +--david ascher + + + + + + + diff --git a/demo/ermis-f/python_m/cur/0411 b/demo/ermis-f/python_m/cur/0411 new file mode 100644 index 00000000..32ec0543 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0411 @@ -0,0 +1,29 @@ +From: fatjim at home.com (Jim Meier) +Date: Fri, 23 Apr 1999 15:25:28 GMT +Subject: Python too slow for real world +References: <372068E6.16A4A90@icrf.icnet.uk> <37207685.F29BE1AB@ingr.com> +Message-ID: <3720921A.5C1651D8@home.com> +X-UID: 411 + +"Magnus L. Hetland" wrote: + +> Joseph Robertson writes: +> > This way you can create views on your data without actually trying to load it +> > all. The tradeoff of course is memory for fileaccess time, but I found +> > fileaccess to be faster than doing all the work 'up front'. +> +> Hm. Yes. +> +> If the size (in lines) of the records is constant, then you could, of +> course, use seek to skip all the data while processing as well... + +Of course, if you were really SERIOUS about finishing the project quickly, you +could ignore "seek" and just skip processing the data at all... + +*shy grin* +-Jim + + + + + diff --git a/demo/ermis-f/python_m/cur/0412 b/demo/ermis-f/python_m/cur/0412 new file mode 100644 index 00000000..ba36dd61 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0412 @@ -0,0 +1,26 @@ +From: nospam at bitbucket.com (Phil Mayes) +Date: Fri, 9 Apr 1999 11:26:09 -0700 +Subject: PyMIDI ? +References: <7ekagq$sjq$1@news1.cableinet.co.uk> +Message-ID: +X-UID: 412 + +Jason Cunliffe wrote in message <7ekagq$sjq$1 at news1.cableinet.co.uk>... +>Hello +> +>I am looking for pointers to any MIDI work done with Python. [snip] + +The excellent "Python Contributed Software" page at + http://www.python.org/download/Contributed.html +has a MIDI link way down near the bottom. +-- +Phil Mayes pmayes AT olivebr DOT com +Olive Branch Software - home of Arranger +http://www.olivebr.com/ + + + + + + + diff --git a/demo/ermis-f/python_m/cur/0413 b/demo/ermis-f/python_m/cur/0413 new file mode 100644 index 00000000..0cec5fcd --- /dev/null +++ b/demo/ermis-f/python_m/cur/0413 @@ -0,0 +1,34 @@ +From: joe at strout.net (Joe Strout) +Date: Thu, 08 Apr 1999 09:33:30 -0700 +Subject: PIL font questions +Message-ID: +X-UID: 413 + +I'm trying to work with drawing fonts in the Python Imaging Library. +Questions: + +1. I've never heard of BDF and PCF font descriptiors, and I certainly +don't have any on my Mac system. No fonts seem to be included with +PIL, either. So where can I get some fonts to use? + +2. There doesn't seem to be any way within ImageFont and ImageDraw to +set the size of a font. To scale a font, do I have to just draw to a +temporary Image, then copy (transparent?) to my destination image with +scaling? + +3. I presume the answer also applies to drawing rotated text, but +(here's hoping!) is there an easier way? + +Thanks, +-- Joe + +-- +,------------------------------------------------------------------. +| Joseph J. Strout Biocomputing -- The Salk Institute | +| joe at strout.net http://www.strout.net | +`------------------------------------------------------------------' +Check out the Mac Web Directory! http://www.strout.net/macweb.cgi + + + + diff --git a/demo/ermis-f/python_m/cur/0414 b/demo/ermis-f/python_m/cur/0414 new file mode 100644 index 00000000..09da5a15 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0414 @@ -0,0 +1,63 @@ +From: claird at NeoSoft.com (Cameron Laird) +Date: 8 Apr 1999 23:52:29 -0500 +Subject: README: Python-URL! - the weekly guide to Python resources (Apr 8) +Message-ID: <7ek12d$402$1@Starbase.NeoSoft.COM> +Content-Length: 2030 +X-UID: 414 + +It's been several weeks since the most recent installment of +"Python-URL!". That's a bit of an embarrassment for a digest +designed for weekly appearances, and only exacerbated by the +wealth of good material in comp.lang.python. + +This publishing pause is likely to continue into May; I have +hopes that I can schedule time then to restore its operation. +In the meantime, I ask for your patience. +========================================================================= +Everything you want is probably one or two clicks away in these pages: + + Python.org's Python Language Website is the center of Pythonia + http://www.python.org + + Much of Python's real work takes place on Special-Interest Group + mailing lists http://www.python.org/sigs/ + + Python Consortium emerges as an independent nexus of activity + http://www.python.org/consortium + + Python To-Do List anticipates some of Python's future direction + http://www.python.org/cgi-bin/todo.py + + Python Journal is at work on its second issue + http://www.pythonjournal.com + + Links2Go is a new semi-automated link collection; it's impressive + what AI can generate + http://www.links2go.com/search?search=python + + Archive probing trick of the trade: + http://www.dejanews.com/dnquery.xp?QRY=&DBS=2&ST=PS&defaultOp=AND&LNG=ALL&format=threaded&showsort=date&maxhits=100&groups=comp.lang.python + + +Previous - (U)se the (R)esource, (L)uke! - messages are listed here: + http://purl.org/thecliff/python/url.html +or + http://www.dejanews.com/dnquery.xp?QRY=~g%20comp.lang.python%20Python-URL%21 + + +Suggestions/corrections for next week's posting are always welcome. + http://www.egroups.com/list/python-url-leads/ + +To receive a new issue of this posting in e-mail each Monday morning +(once we resume), ask to subscribe. + + +-- The Python-URL! Team-- +-- + +Cameron Laird http://starbase.neosoft.com/~claird/home.html +claird at NeoSoft.com +1 281 996 8546 FAX + + + + diff --git a/demo/ermis-f/python_m/cur/0415 b/demo/ermis-f/python_m/cur/0415 new file mode 100644 index 00000000..1bfacb6c --- /dev/null +++ b/demo/ermis-f/python_m/cur/0415 @@ -0,0 +1,47 @@ +From: Martin.Preishuber at stuco.uni-klu.ac.at (Martin Preishuber) +Date: Sun, 18 Apr 1999 10:04:24 +0000 +Subject: #!/usr/bin/env python -u +References: <37175574.25EBDDBE@stuco.uni-klu.ac.at> +Message-ID: <3719AE28.64164417@stuco.uni-klu.ac.at> +Content-Length: 1327 +X-UID: 415 + +Bill Janssen wrote: + +> Martin, + +Hi, + +> I'm not a big fan of the /usr/bin/env approach for Python scripts, +> because at PARC many people run without having Python on their paths. +> Many, many packages at PARC, including Python and ILU, are installed in +> their own directory tree under either /project (/project/ILU/) or +> /import (/import/python-1.5/). People enable or disable various +> packages depending on what they're up to. +> +> So I tend to depend on GNU configure when I'm installing a script. I +> actually look for Python in the user's environment, then use sed to +> hard-code that path into the scripts before installing them. Can this +> be done with RPM? + +Actually I do use autoconf ... but when building a RPM file, you use +rpm -ba ... then it creates RPMS and SRPMS by doing the +usualy configure;make;make install (when specified) ... on my own +machine every occurence of python is been replaced by +/usr/local/bin/python +and the RPM is built with that path ... and therefor the final +RPM requires /usr/local/bin/python ... and that's what I want to +avoid, so I thought about the /usr/bin/env solution ... + +Martin + +-- +Martin Preishuber - Student, ECLiPt Core Member, SysAdmin +http://eclipt.uni-klu.ac.at, +mailto:Martin.Preishuber at stuco.uni-klu.ac.at + +Badges? We don't need no stinking badges. + + + + diff --git a/demo/ermis-f/python_m/cur/0416 b/demo/ermis-f/python_m/cur/0416 new file mode 100644 index 00000000..994bdcc2 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0416 @@ -0,0 +1,43 @@ +From: aahz at netcom.com (Aahz Maruch) +Date: Sat, 17 Apr 1999 13:37:37 GMT +Subject: Why no "=" in if? (was Re: Quick fix to add "+=") +References: <3717EE20.41343593@mediaone.net> <000701be888f$12fe2920$ee9e2299@tim> +Message-ID: +X-UID: 416 + +I'm getting really sick of the way I have to use this stupid construct: + +x = foo() +if x: + ... + +instead of + +if x = foo(): + ... + +Why doesn't Guido get off his duff and fix this?????????! + + + + + +In article <000701be888f$12fe2920$ee9e2299 at tim>, +Tim Peters wrote: +> +>can't-wait-for-a-resumption-of-the-assignment-expression-thread-ly +>y'rs - tim + +Be careful what you ask for. You may get it. +-- + --- Aahz (@netcom.com) + +Hugs and backrubs -- I break Rule 6 <*> http://www.rahul.net/aahz/ +Androgynous poly kinky vanilla queer het + +Sometimes, you're not just out of left field, you're coming in +all the way from outer space. + + + + diff --git a/demo/ermis-f/python_m/cur/0417 b/demo/ermis-f/python_m/cur/0417 new file mode 100644 index 00000000..195892be --- /dev/null +++ b/demo/ermis-f/python_m/cur/0417 @@ -0,0 +1,57 @@ +From: fredrik at pythonware.com (Fredrik Lundh) +Date: Wed, 14 Apr 1999 15:23:19 GMT +Subject: Help! PIL compiled into Tkinter in 1.5.2 (Tricky Bits!) +References: +Message-ID: <00b501be868a$bbc6a840$f29b12c2@pythonware.com> +Content-Length: 1682 +X-UID: 417 + +frank wrote: +> The Setup.in file lists the following 2 lines: +> # *** Uncomment and edit for PIL (TkImaging) extension only: +> # -DWITH_PIL -I../Extensions/Imaging/libImaging tkImaging.c \ + +1. unpack Imaging-1.0b1.tar.gz on the same level as +you unpacked Python. + +$ ls -l +drwxr-xr-x 8 eff effie 1024 Mar 29 11:11 Imaging-1.0b1 +drwxr-xr-x 15 eff effie 1024 Mar 25 12:54 Python-1.5.2b2 +drwxr-xr-x 14 eff effie 512 Mar 25 10:32 tcl8.0.5 +drwxr-xr-x 16 eff effie 512 Mar 25 10:40 tk8.0.5 + +2. build a standard version of Python (preferrably with dynamically +loaded extensions) + +3. build PIL according to the instructions in Imaging-1.0b1/README. + +4. in Python-1.5.2/Modules/Setup, change the Tkinter +section to something like (this assumes that you've + +# *** Always uncomment this (leave the leading underscore in!): +_tkinter _tkinter.c tkappinit.c -DWITH_APPINIT \ +# *** Uncomment and edit to reflect where your Tcl/Tk headers are: + -I/usr/local/include \ +# *** Uncomment and edit to reflect where your X11 header files are: + -I/usr/include/X11 \ +# *** Uncomment and edit for PIL (TkImaging) extension only: + -DWITH_PIL -I../../Imaging-1.0b1/libImaging ../../Imaging-1.0b1/Tk/tkImaging.c \ +# *** Uncomment and edit to reflect where your Tcl/Tk libraries are: + -L/usr/local/lib \ +# *** Uncomment and edit to reflect your Tcl/Tk versions: + -ltk8.0 -ltcl8.0 \ +# *** Uncomment and edit to reflect where your X11 libraries are: + -L/usr/lib \ +# *** Always uncomment this; X11 libraries to link with: + -lX11 + +5. rebuild Python. + +(works for me, at least) + + + + + + + diff --git a/demo/ermis-f/python_m/cur/0418 b/demo/ermis-f/python_m/cur/0418 new file mode 100644 index 00000000..fbac098c --- /dev/null +++ b/demo/ermis-f/python_m/cur/0418 @@ -0,0 +1,32 @@ +From: un4e at rz.uni-karlsruhe.de (Bjoern Giesler) +Date: Wed, 28 Apr 1999 09:53:54 GMT +Subject: running application config files written in Python +In-Reply-To: from "David Steuber" at Apr 28, 1999 03:11:57 AM +References: +Message-ID: +X-UID: 418 + +Hi, + +According to David Steuber: +> wanted to point out that you will be executing actual code not unlike +> the VBA macros in Microsoft Word with this technique. The Melissa +> virus was written in VBA in a Word document. If there is a way to +> sandbox such code, I would love to hear how + +Look at the documentation of the "rexec" module in the Library Reference; +should do exactly what you want. + +Regards, + --Bjoern +PS David: a) Faking headers is Not A Good Thing. b) 12 lines of signature +(even more in your previous mails) are Not A Good Thing Either. +-- +--------------------------------/\--One OS to rule them all---Windows NT----- +Bjoern Giesler / \ One OS to find them + / <> \ One OS to bring them all +-----------------------------/______\--And in the Darkness bind them--------- + + + + diff --git a/demo/ermis-f/python_m/cur/0419 b/demo/ermis-f/python_m/cur/0419 new file mode 100644 index 00000000..f743f59f --- /dev/null +++ b/demo/ermis-f/python_m/cur/0419 @@ -0,0 +1,24 @@ +From: zorro at zipzap.ch (Boris Borcic) +Date: Wed, 14 Apr 1999 10:31:34 +0200 +Subject: Python as an ODBC *source* on windoze ? +References: <01BE8604.AE1D9CC0.richard@folwell.com> +Message-ID: <37145266.1127FE06@zipzap.ch> +X-UID: 419 + +Richard Folwell wrote: +> +> It is certainly possible to implement a DBMS in Python (check out Gadfly!), but +> I suspect that you are asking a different question. (?) + +Indeed. It is my (untested) understanding that the MS Access Report writer (and gui) +can be exploited with data from other vendor's databases through ODBC. + +I was wondering if it was possible to configure python to serve data appropriately +to queries from the report writer -- this doesn't mean implementing a full DBMS +in python, only to feed back appropriately patterned data to the report generator. + +BB + + + + diff --git a/demo/ermis-f/python_m/cur/0420 b/demo/ermis-f/python_m/cur/0420 new file mode 100644 index 00000000..31a2853a --- /dev/null +++ b/demo/ermis-f/python_m/cur/0420 @@ -0,0 +1,26 @@ +From: fdrake at cnri.reston.va.us (Fred L. Drake) +Date: Tue, 13 Apr 1999 13:26:56 GMT +Subject: CVS module +In-Reply-To: <7evbjf$85f$1@anguish.transas.com> +References: <7evbjf$85f$1@anguish.transas.com> +Message-ID: <14099.17952.830567.515429@weyr.cnri.reston.va.us> +X-UID: 420 + +Michael Sobolev writes: + > My quick attempt to find something that would help me to cope with CVS files + > failed. Could anybody advise me whether such a module exist? Under "such a + + Sorry to say, but I don't know of anything like this. + On the other hand, I'd love to learn of something like this as well! +(Can we say "IDLE plugin"? ;) + + + -Fred + +-- +Fred L. Drake, Jr. +Corporation for National Research Initiatives + + + + diff --git a/demo/ermis-f/python_m/cur/0421 b/demo/ermis-f/python_m/cur/0421 new file mode 100644 index 00000000..feac4844 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0421 @@ -0,0 +1,31 @@ +From: williampark at my-dejanews.com (williampark at my-dejanews.com) +Date: Fri, 23 Apr 1999 06:05:52 GMT +Subject: I want to Journal Input and Log Output, any Help??? +References: <01be74eb$b634c200$01656565@fidget> +Message-ID: <7fp2jv$2vj$1@nnrp1.dejanews.com> +X-UID: 421 + +In article <01be74eb$b634c200$01656565 at fidget>, + "Jonathan Polley" wrote: +> Hi, +> +> I am using python to control the testing of a series of integrated +> systems. To make it easier for some of our engineers, I would like to be +> able to journal the scripts that they enter interactively. Once they enter +> a command, I would like to log the output to a file (to make it easier to +> verify the results of the test). I have been using IDLE as my python +> environment, and would like some ideas as to how to make the required edits +> (I have made some edits, but I think this is beyond by current abilities). +> +> Thanks, +> +> Jonathan Polley +> polley at netins.net +At least in Unix, 'python | tee stdout.log' will log you stdout. + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/0422 b/demo/ermis-f/python_m/cur/0422 new file mode 100644 index 00000000..ed40f07b --- /dev/null +++ b/demo/ermis-f/python_m/cur/0422 @@ -0,0 +1,72 @@ +From: fredrik at pythonware.com (Fredrik Lundh) +Date: Thu, 15 Apr 1999 14:56:29 GMT +Subject: Different methods with same name but different signature? +References: <3716909C.D8D1B372@fedex.com> <005201be8748$51e0bab0$f29b12c2@pythonware.com> <3715f36d.74192342@news.oh.verio.com> +Message-ID: <002901be8750$2727dd50$f29b12c2@pythonware.com> +Content-Length: 1968 +X-UID: 422 + +Kevin Dahlhausen wrote: +> >imho, it's also an improvement over the pure visitor pattern, +> >since it allows you to generate "logical events" that doesn't +> >correspond to "physical" data instances in your model. +> +> I don't quite follow you. Can you explain this in a more detail? + +here's an example from my upcoming Python book: + +one chapter deals with a simple 2D animation system. its +animation subsystem generates Movie object, which has a +list of Frame objects, each of which contain a list of Sprite +objects. + +this representation can be rendered to a display, to vector +graphic file formats, or to raster images (e.g. GIF animations, +or "ARG" files). the rendering machinery is implemented via +visitors, using the following interface: + + class Renderer(MovieRenderer): + def movie_start(self, movie) + # called before any subframes + def movie_end(self, movie) + # called after all subframes + def frame_start(self, frame) + # called for each new Frame, before + # any shapes are visited + def frame_end(self, frame) + # called for each Frame, after all + # shapes + def sprite(self, sprite) + # called for each Sprite + +the render implementations need to do things both before +and after each Frame (e.g. blank the image memory for each +new Frame, and flush the result to disk afterwards). + +the Movie, Frame, and Sprite classes have methods looking +something like: + + class Frame: + ... + def accept(self, visitor): + visitor.frame_start(self) + for sprite in self.sprites: + sprite.accept(visitor) + visitor.frame_end(self) + +etc. + +makes sense? + +anyone got a better solution? (but be warned that code that includes +apply(self.__do[tuple(map(type, args))], (self,) + args) (*) or similar stuff +is automatically disqualified ;-) + + + +*) taken from an old post of mine... what was I thinking... + + + + + diff --git a/demo/ermis-f/python_m/cur/0423 b/demo/ermis-f/python_m/cur/0423 new file mode 100644 index 00000000..05688b6c --- /dev/null +++ b/demo/ermis-f/python_m/cur/0423 @@ -0,0 +1,80 @@ +From: florent.heyworth at radbit.com (Florent Heyworth) +Date: Sun, 11 Apr 1999 12:57:58 +0200 +Subject: Python's object model +References: <37102ED0.933EDDA6@usa.net> +Message-ID: <37108036.3F33C237@radbit.com> +Content-Length: 1719 +X-UID: 423 + + +Francois Bedard wrote: + +> Hello, +> +> I'm new at Python. In the following program, "stack_1 pops stack_2's +> content" (that's actually what it prints), which is obviously not what +> I'm after - nor would expect. Is this how Python's object model really +> works (kindly explain), is there some arcane rule that I've missed, or +> is there some obvious mistake I just can't see? +> +> Aside from a few such quirks, it's quite an interesting language (I'm +> using 1.5.1 - on both Linux and NT). +> +> Thanks, +> +> Francois +> +> ------------------------------------- +> +> class Stack: +> stack = [] +> +> def push(self, value): +> self.stack.append(value) +> +> def pop(self): +> result = self.stack[-1] +> del self.stack[-1] +> return result +> +> class System: +> stack_1 = Stack() +> stack_2 = Stack() +> +> def __init__(self): +> self.stack_1.push('stack_1\'s content') +> self.stack_2.push('stack_2\'s content') +> print 'stack_1 pops', self.stack_1.pop() +> +> # 'main' +> +> system = System() + +Hi Francois + +what you're seeing is the difference between a class and an +instance variable. To see the behaviour you want you need to +modify your stack class as follows: + +class Stack: + def __init__(self): + self.stack = [] + + def push(self, value): + self.stack.append(value) + + def pop(self): + result = self.stack[-1] + del self.stack[-1] + return result + +Otherwise the stack is a class variable which can be referred as +Stack.stack() (this would then act as a class global). + +Cheers +Florent Heyworth + + + + + diff --git a/demo/ermis-f/python_m/cur/0424 b/demo/ermis-f/python_m/cur/0424 new file mode 100644 index 00000000..532915f5 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0424 @@ -0,0 +1,41 @@ +From: joe at strout.net (Joe Strout) +Date: Fri, 09 Apr 1999 10:22:00 -0700 +Subject: Publishing 'live' Python objects +References: <7ekq6v$of7$1@news2.xs4all.nl> +Message-ID: +Content-Length: 1060 +X-UID: 424 + +In article <7ekq6v$of7$1 at news2.xs4all.nl>, Camiel Dobbelaar + wrote: + +> I'm looking for advice on the following: +> +> Suppose I have a Python program that essentially does the following: +> +> while 1: +> read from stdin +> +> update some buffer objects +> +> I now wish to take a look at snapshots of those buffer objects in +> 'real-time'. (the program continues running and updating the buffers) +> I'd like to do this with HTTP. + +I'd suggest you periodically, during , copy the +buffer objects to a file, e.g. with pickle. Then you can have another +Python CGI script read these files and display them upon request. + +Cheers, +-- Joe + +-- +,------------------------------------------------------------------. +| Joseph J. Strout Biocomputing -- The Salk Institute | +| joe at strout.net http://www.strout.net | +`------------------------------------------------------------------' +Check out the Mac Web Directory! http://www.strout.net/macweb.cgi + + + + diff --git a/demo/ermis-f/python_m/cur/0425 b/demo/ermis-f/python_m/cur/0425 new file mode 100644 index 00000000..2576a176 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0425 @@ -0,0 +1,50 @@ +From: gmcm at hypernet.com (Gordon McMillan) +Date: Wed, 7 Apr 1999 17:54:56 GMT +Subject: Unable to register TclNotifier window class +In-Reply-To: <1288673916-74845510@hypernet.com> +References: <1288673916-74845510@hypernet.com> +Message-ID: <1288614601-78413274@hypernet.com> +Content-Length: 1179 +X-UID: 425 + +[Talking to myself] + +Still don't know what the real problem was, but once I changed it +to keep a reference to a frame I was using for alignment, the problem +went away... + +> OK Tk wizards (hi, /F-bot!) +> +> I'm getting "Unable to register TclNotifier window class". +> What does this mean? +> +> Details: +> Python 1.5.2b2 on NT SP4 +> +> I'm doing a tree control / form style window: +> a big frame +> another frame, packed 'left' with a Pmw.ScrolledListBox acting as a +> +> tree control. +> Then I have three different frames, each holding a "form" for +> displaying / editing a particular record type. +> When a new item in the tree control is selected, I "pack_forget" +> (if +> the record type has changed) the right hand frame, then "pack" the +> appropriate frame and fill the form. +> +> Works dandy for 2 of the three forms. Actually, the problem form +> fills properly, too, it just does a St Vitus dance until I kill the +> whole app (it appears to be continually re-packing itself). My +> console window has the mystery error. +> +> The problem form is the most complex (has the most widgets), but +> otherwise they are all clones of each other. +> +> - Gordon + +- Gordon + + + + diff --git a/demo/ermis-f/python_m/cur/0426 b/demo/ermis-f/python_m/cur/0426 new file mode 100644 index 00000000..e1813a10 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0426 @@ -0,0 +1,31 @@ +From: mlh at idt.ntnu.no (Magnus L. Hetland) +Date: 27 Apr 1999 13:59:44 +0200 +Subject: help +References: +Message-ID: +X-UID: 426 + +"Stone Cold" writes: + +> I just got python and I need some help getting started. I have no +> programing knowlodge yet but I want to know all the languges. can someone +> help? +> + +When you have your interpreter running, you might want to check out + + http://www.idi.ntnu.no/~mlh/python/hacking.html + +It is a programming tutorial that uses Python. + +> + +-- + > Hi! I'm the signature virus 99! + Magnus > Copy me into your signature and join the fun! + Lie + Hetland http://arcadia.laiv.org + + + + diff --git a/demo/ermis-f/python_m/cur/0427 b/demo/ermis-f/python_m/cur/0427 new file mode 100644 index 00000000..50073e21 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0427 @@ -0,0 +1,31 @@ +From: wware-nospam at world.std.com (Will Ware) +Date: Wed, 7 Apr 1999 18:06:30 GMT +Subject: Python for embedded controllers? +References: <7e09r7$16r$1@news.clarkson.edu> +Message-ID: +X-UID: 427 + +There is an effort by the Ryerson Amateur Radio Club (in Toronto, +Ontario, Canada) to develop a microcontroller SIMM board that can +run Linux, discussed at: + http://ryeham.ee.ryerson.ca/uClinux/simm/ +This board is being designed with a 68EZ328 dragonball microcontroller, +4 meg of flash, and 8 meg of dram. + +On the mailing list for this project, Michael Gorlick + wrote: +> We are currently porting Python to run on the Palm +> Pilot under the Palm OS. We have the Python +> interpreter whittled down to about 124 kB and +> should have a demonstration version running by the +> end of April (barring unforeseen technical +> obstacles). Porting it to the uCSIMM under Linux +> should be quite straightforward. +-- + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Will Ware email: wware[at]world[dot]std[dot]com +PGP fp (new key 07/15/97) 67683AE2 173FE781 A0D99636 0EAE6117 + + + + diff --git a/demo/ermis-f/python_m/cur/0428 b/demo/ermis-f/python_m/cur/0428 new file mode 100644 index 00000000..fcae03c9 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0428 @@ -0,0 +1,28 @@ +From: fdrake at cnri.reston.va.us (Fred L. Drake) +Date: Mon, 12 Apr 1999 21:55:58 GMT +Subject: Client side cookies in Python +In-Reply-To: +References: +Message-ID: <14098.27630.44323.990874@weyr.cnri.reston.va.us> +X-UID: 428 + +Aamir Sehbai writes: + > While I will be trying to make his code work with Yahoo, if anyone else + > has information about something similar, please share. + + Grail 0.6 contains a file, utils/cookielib.py, that might be useful +on the client side. Note that debugging was minimal, and Grail +doesn't actually use it (I didn't have time to finish the integration +code). Let me know if you find problems with it. + Grail is available at http://grail.cnri.reston.va.us/grail/. + + + -Fred + +-- +Fred L. Drake, Jr. +Corporation for National Research Initiatives + + + + diff --git a/demo/ermis-f/python_m/cur/0429 b/demo/ermis-f/python_m/cur/0429 new file mode 100644 index 00000000..ff83bea7 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0429 @@ -0,0 +1,17 @@ +From: mark.thomas at gsc.gte.com (Justin Development) +Date: Tue, 20 Apr 1999 11:59:07 -0400 +Subject: Tkinter->Tcl->Wsm +Message-ID: <7fi88s$eq4$1@news.gte.com> +X-UID: 429 + +I have created a Tkinter widget and am trying to pass some of it's +information (specifically it's winfo_id ) to the UNIX Window or Workspace +Manger. If I am correct I first need to pass the Tkinter information to Tcl +which will then allow me to work with the Wsm. How do I do this? Any links +or examples would also be helpful. + + + + + + diff --git a/demo/ermis-f/python_m/cur/0430 b/demo/ermis-f/python_m/cur/0430 new file mode 100644 index 00000000..9dbba8dd --- /dev/null +++ b/demo/ermis-f/python_m/cur/0430 @@ -0,0 +1,151 @@ +From: Brian at digicool.com (Brian Lloyd) +Date: Fri, 23 Apr 1999 14:34:45 GMT +Subject: Python too slow for real world +Message-ID: <613145F79272D211914B0020AFF6401914DAD8@gandalf.digicool.com> +Content-Length: 4724 +X-UID: 430 + +> Hi All, +> +> first off all: Sorry for that slightly provoking subject ;-) ... +> +> I just switched from perl to python because I think python makes live +> easyer in bigger software projects. However I found out that perl is +> more then 10 times faster then python in solving the +> following probelm: +> +> I've got a file (130 MB) with ~ 300000 datasets of the form: +> +> >px0034 hypothetical protein or whatever description +> LSADQISTVQASFDKVKGDPVGILYAVFKADPSIMAKFTQFAGKDLESIKGTAPFETHAN +> RIVGFFSKIIGELPNIEADVNTFVASHKPRGVTHDQLNNFRAGFVSYMKAHTDFAGAEAA +> WGATLDTFFGMIFSKM +> +> The word floowing the '>' is an identifier, the uppercase +> letters in the +> lines following the identifier are the data. Now I want to read and +> write the contens of that file excluding some entries (given by a +> dictionary with identifiers, e.g. 'px0034'). +> +> The following python code does the job: +> +> from re import * +> from sys import * +> +> def read_write(i, o, exclude): +> name = compile('^>(\S+)') # regex to fetch the identifier +> l = i.readline() +> while l: +> if l[0] == '>': # are we in new dataset? +> m = name.search(l) +> if m and exclude.has_key(m.group(1)): # excluding current +> dataset? +> l = i.readline() +> while l and l[0] != '>': # skip this dataset +> l = i.readline() +> pass +> o.write(l) +> l = i.readline() +> +> f = open('my_very_big_data_file','r') # datafile with ~300000 records +> read_write(f, stdout, {}) # for a simple test I don't exclude +> anything! +> +> It took 503.90 sec on a SGI Power Challange (R10000 CPU). An +> appropiate +> perl script does the same job in 32 sec (Same method, same loop +> structure)! +> +> Since I've to call this routine about 1500 times it's a very big +> difference in time and not realy accaptable. +> +> I'd realy like to know why python is so slow (or perl is so fast?) and +> what I can do to improove speed of that routine. +> +> I don't want to switch back to perl - but honestly, is python +> the right +> language to process souch huge amount of data? +> +> ... +> Please do convince me being a python programmer does not mean +> being slow +> ;-) +> +> Thanks very much for any help, +> +> Arne +> + +Arne, + + While I'm not going to go near comparing Python to Perl, I +will comment that different languages are just that - different. +As such, the approach you would take in one language may not be +the most appropriate (or comparable in speed or efficiency) to +the approach you would take in another. + +The question here (IMHO) is not Python's appropriateness for processing +large datasets (a fair number of scientist-types do this all the time), +or even the speed of Python in general, but using the most appropriate +algorithms in the context of the language in use. + +For example, Perl is very regex-centric, so your example Perl +implementation is probably perfectly appropriate for Perl. Python +tends to be more optimized for the general case, and if it were +_me_, I wouldn't bother with using regular expressions in this +case,. Since you have a predictable file format, there are more +specific (and efficient) Python tools that you could use here. + +There are also some general optimizations that can be used in +places where speed is an issue, such as avoiding repeated +attribute lookups (esp. in loops). This version of your read_write +function uses the same basic algorithm, but forgoes re for more +specific tools (slicing, string.split) and has some examples of +optimizations to mimimize attribute lookups. I haven't timed it +or anything, but I'd be surprised if it wasn't noticeably +faster. + +Hope this helps! + + +import sys, string + +def read_write(input, output, exclude): + + # These assignments will save us a lot of attribute + # lookups over the course of the big loop... + + ignore=exclude.has_key + readline=input.readline + write=output.write + split=string.split + + line=readline() + while line: + if line[0]=='>': + # knowing that the first char is a '>' and that + # the rest of the chars up to the first space are + # the id, we can avoid using re here... + key=split(line)[0][1:] + if ignore(key): + line=readline() + while line and line[0] != '>': + # skip this record + line=readline() + continue + write(line) + line=readline() + + +file=open('my_very_big_data_file','r') # datafile with ~300000 records +read_write(f, sys.stdout, {}) + + + +Brian Lloyd brian at digicool.com +Software Engineer 540.371.6909 +Digital Creations http://www.digicool.com + + + + diff --git a/demo/ermis-f/python_m/cur/0431 b/demo/ermis-f/python_m/cur/0431 new file mode 100644 index 00000000..81426867 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0431 @@ -0,0 +1,33 @@ +From: phd at sun.med.ru (Oleg Broytmann) +Date: Thu, 15 Apr 1999 07:20:07 GMT +Subject: PIL fonts - Where are you? +In-Reply-To: <7jbR2.3071$YU1.5576@newsr2.twcny.rr.com> +References: <7jbR2.3071$YU1.5576@newsr2.twcny.rr.com> +Message-ID: +X-UID: 431 + +On Wed, 14 Apr 1999, Kevin K. Ehmka wrote: +> Does anybody have some ready made fonts in PIL format they want to share? A + + I avn send you some. I'v compiled them from BDF fonts. English parts of +these fonts are ASCII, but characters from 128 up are Cyrillic (Russian). + If you have some BDF fonts, I could try to compile them to PIL format. + +> web site maybe? I was unsuccessful today creating any. + + What's the problem? + +> Thanks +> +> -- +> Kevin + +Oleg. +---- + Oleg Broytmann National Research Surgery Centre http://sun.med.ru/~phd/ + Programmers don't die, they just GOSUB without RETURN. + + + + + diff --git a/demo/ermis-f/python_m/cur/0432 b/demo/ermis-f/python_m/cur/0432 new file mode 100644 index 00000000..c25d0df0 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0432 @@ -0,0 +1,24 @@ +From: achrist at easystreet.com (Al Christians) +Date: Wed, 28 Apr 1999 19:19:57 -0700 +Subject: Python IS slow ! [was] Re: Python too slow for real world +References: <613145F79272D211914B0020AFF6401914DAD8@gandalf.digicool.com> <372769B0.3CE8C0F3@prescod.net> +Message-ID: <3727C1CD.83078225@easystreet.com> +X-UID: 432 + +> +> >Actually, isn't Eiffel's type system famous for being full of holes? +> +> I'm familiar with the covariance/contravariance argument, but I've never +> before heard anyone say anything about Eiffel being full of holes. What +> problems have you heard of? +> + +I think it's called changing availability by type, or some such. It is +possible to delete a feature in a descendant class, leaving a hole in +polymorphic calls through the base class. + +Al + + + + diff --git a/demo/ermis-f/python_m/cur/0433 b/demo/ermis-f/python_m/cur/0433 new file mode 100644 index 00000000..45558be9 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0433 @@ -0,0 +1,55 @@ +From: tim_one at email.msn.com (Tim Peters) +Date: Tue, 27 Apr 1999 23:49:02 -0400 +Subject: "Compiling" scripts before execution ? +In-Reply-To: <19990426104245.A504861@vislab.epa.gov> +Message-ID: <000801be912a$0e7ed680$29a02299@tim> +Content-Length: 1878 +X-UID: 433 + +[Randall Hopper] +> One concern I've been mulling over lately is the potential problem +> maintaining Python scripts over time. For example: +> +> 1) It's easy to never create (or to sever) a link to a +> imported symbol defined in another module, and you may never +> know it until python tries to execute the referencing line of +> script code. +> +> 2) If the signature of an imported method changes, and all +> references to it in all scripts aren't updated, you may never know +> it until Python tries to execute one of these "broken" line of +> script code. +> ... +> What are folks doing to keep this class of errors from being a problem? + +I use a text editor with extremely fast file-based search-and-replace <0.5 +wink>. Short of that, signatures and exported symbols are part of a +module's advertised contract, and a module has no right to change its +contract unilaterally in an incompatible way. This isn't as flippant as it +sounds (*almost*, but not quite ...). Python argument lists are exceedingly +flexible beasts, and it's almost always possible to maintain backwards +compatibility when changing a signature. + +> Is there a way to "lint" or compile Python code such that it +> forces symbols to resolve when seen (possibly disallowing some dynamic +> symbol definition available in the language (e.g. adding methods to +> classes after class definition). + +Nope, you'll have to deal with it. The best stab at a Python "lint" is +Aaron Watters's kjpylint, available from + + http://www.chordate.com/kwParsing/index.html + +It's not trying to do cross-module analysis, though. + +Python2 may or may not introduce some notion of optional static typing, +which could catch this stuff for those motivated enough to use it. That's a +Types-SIG topic. + +the-downside-of-a-dynamic-language-is-its-dynamicism-ly y'rs - tim + + + + + + diff --git a/demo/ermis-f/python_m/cur/0434 b/demo/ermis-f/python_m/cur/0434 new file mode 100644 index 00000000..c696627b --- /dev/null +++ b/demo/ermis-f/python_m/cur/0434 @@ -0,0 +1,13 @@ +From: Jcantrl at ix.netcom.com (Jcantrl at ix.netcom.com) +Date: Tue, 27 Apr 1999 09:52:24 GMT +Subject: Please unsubscribe +Message-ID: <372588D8.DEB86C58@ix.netcom.com> +X-UID: 434 + +Please Usubscibe me from your mailing list,Thank you + Sincerely Jcantrl at ix.netcom.com + + + + + diff --git a/demo/ermis-f/python_m/cur/0435 b/demo/ermis-f/python_m/cur/0435 new file mode 100644 index 00000000..26bc1b9b --- /dev/null +++ b/demo/ermis-f/python_m/cur/0435 @@ -0,0 +1,41 @@ +From: xidicone at iname.com (Jussi Jumppanen) +Date: Mon, 19 Apr 1999 22:22:41 +1100 +Subject: 'import exceptions' failed +Message-ID: <371B1201.392B@iname.com> +X-UID: 435 + +I have compiled the python source into a Windows DLL and using +this DLL I have embedd python into and windows text editor. Now +when I run the following macro script: + + import editor_functions + + def key_macro(): + print "this is a macro."; + + key_macro() # run the macro + +the macro runs fine and produces the expected ouput in the +text editor, but I also get the following messages sent to +stderr: + + 'import exceptions' failed; use -v for traceback + defaulting to old style exceptions + 'import site' failed; use -v for traceback + +To run the macro it is saved to file and is run using the +python API: + + PyRun_SimpleFile + +My question is have I missed something? What setup changes do I +need to do to remove this error or how do I simulate -v using +the Python API C functions so that this error is not generated? + +Thanks in advance. + +Cheers Jussi Jumppanen + + + + diff --git a/demo/ermis-f/python_m/cur/0436 b/demo/ermis-f/python_m/cur/0436 new file mode 100644 index 00000000..df6ca654 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0436 @@ -0,0 +1,103 @@ +From: sdm7g at Virginia.EDU (Steven D. Majewski) +Date: Fri, 23 Apr 1999 21:01:54 -0400 (EDT) +Subject: controling a Python daemon with mail +In-Reply-To: <84k8v3t4sw.fsf@mail.utexas.edu> +References: <84k8v3t4sw.fsf@mail.utexas.edu> +Message-ID: +Content-Length: 3133 +X-UID: 436 + +On 23 Apr 1999, Preston Landers wrote: + + +> I've looked at the mailbox.UnixMailbox package. I am able to write a +> script that retrieves each message in /var/spool/mail/myuser and +> displays the sender, recipient, and subject. I am able to generate a +> reply using /usr/bin/mail. But for the life of me, I cannot look at +> the body of the incoming message. Silly me. Where in the +> documentation is this describe? 10 points to anyone who can point out +> the specific place to me. + + +Yeah -- mailbox and rfc822 aren't the prettiest modules in the Python +libraries! Here's where the class browser in the Mac Python IDE comes +in handy, along with some interactive snooping. + + +>>> mb = mailbox.UnixMailbox( open( 'OneGig:Python+11', 'r' )) +>>> mb + + +## mb is a mailbox + +>>> dir(mb) +['fp', 'seekp'] +>>> a = mb.next() +>>> a + + +## a is a message. + +>>> dir(a) +['dict', 'fp', 'headers', 'seekable', 'startofbody', 'startofheaders', +'status', 'unixfrom'] + >>> a + +>>> a.fp + +>>> a.fp.fp + + +# a's _Subfile is what you want, speficially, for the message body: + +>>> print a.fp.read() + + + +> Periodically, I want my daemon to check a standard Unix mail spool +> file for new messages. Under certain conditions, I want the script to +> act on those messages (ie, do its thang on the contents of the message +> and mail the results back to the sender.) + + +However, the typical way to do this sort of thing on unix is to +redirect all messages with a .forward file to dispatcher program +that gets each message one at a time on it's standard input. +Thus you don't have to check the spool periodically -- the program +gets triggered as part of the mail delivery. There are unix programs +like procmail & filter that already do this. ( and procmail has +a companion program, formail, which among other things can split +a mailbox up into separate messages, pipeing each one to a new +procmail process, thus simulating the delivery process in batch +mode. ) + +You can use a python script in place of procmail -- in which case, +it doesn't have to split a mailbox into separate messages -- it gets +a single message on it's standard input. + +Or, you can use procmail to selectively send particular messages to +another script. + +Or, you can select a subset of messages and redirect them into a +different file, which can be the input for your batch processing. + + +You might also want to look a Mailman -- which is a mailing list +manager written in Python. It may already have most of the tools +you need for your responder. + + + +---| Steven D. Majewski (804-982-0831) |--- +---| Department of Molecular Physiology and Biological Physics |--- +---| University of Virginia Health Sciences Center |--- +---| P.O. Box 10011 Charlottesville, VA 22906-0011 |--- + + Caldera Open Linux: "Powerful and easy to use!" -- Microsoft(*) + (*) + + + + + + diff --git a/demo/ermis-f/python_m/cur/0437 b/demo/ermis-f/python_m/cur/0437 new file mode 100644 index 00000000..5efc7a6b --- /dev/null +++ b/demo/ermis-f/python_m/cur/0437 @@ -0,0 +1,22 @@ +From: cjw at connection.com (Colin J. Williams) +Date: Wed, 28 Apr 1999 17:10:42 -0400 +Subject: IDLE Problem +Message-ID: <37277952.3551E595@connection.com> +X-UID: 437 + +a= 99 +print 'UGH' +a= 101 + +When one steps through this code, the print statement hangs +the Windows. + +This happens when one Steps Over the command or when one +Steps and the Steps Out. + +Colin W. + + + + + diff --git a/demo/ermis-f/python_m/cur/0438 b/demo/ermis-f/python_m/cur/0438 new file mode 100644 index 00000000..76315c42 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0438 @@ -0,0 +1,21 @@ +From: KUNCEJ at mail.conservation.state.mo.us (Jeffrey Kunce) +Date: Fri, 23 Apr 1999 15:01:27 GMT +Subject: How do I use proxies with httplib? +Message-ID: +X-UID: 438 + +>I see that urllib has that covered. So I tried it out, only to run up +>against a problem that I want to blame on urllib; it claims to not +>recognize the http url type: + +proxies in urllib for 1.5.1 will work if you apply the two patches found on the [now somewhat buried] "Patches for Python 1.5.1" page: + http://www.python.org/1.5/patches-1.5.1/ + +Or, as Chad suggested, upgrade to 1.5.2 + + --Jeff + + + + + diff --git a/demo/ermis-f/python_m/cur/0439 b/demo/ermis-f/python_m/cur/0439 new file mode 100644 index 00000000..5862c0a8 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0439 @@ -0,0 +1,91 @@ +From: tismer at appliedbiometrics.com (Christian Tismer) +Date: Sat, 10 Apr 1999 12:14:50 GMT +Subject: import from user input? What about 'from'? +References: <816010E2456BD111A48700805FBBE2EEA63EB9@ex-quebec-u1.baan.com> + <370E0F51.E1D33D6@appliedbiometrics.com> <370E4EFB.3D9355BF@vision.arc.nasa.gov> +Message-ID: <370F40BA.A1A28A1B@appliedbiometrics.com> +Content-Length: 2515 +X-UID: 439 + + +Chad Netzer wrote: +> Christian Tismer wrote: +> +> > Instead, one should cut off the first name before the first dot +> > and put that into globals(). +> > +> > import string +> > globals()[string.split(modname, ".")[0]] = __import__(modname) +> > +> > seems to do it better. +> +> Hmm, what if I want to do something like: +> +> exec 'from ' + module_name + ' import ' + class_name +> +> Can I use the __import__call, and then just save the specific module name in globals()? +> ie. (minus exception checking): +> +> globals()[class_name] = getattr(__import__(module_name), class_name) + +Yes, this is ok with a single module and a single object in the +module. But for a full + +from package.subpackage.module import object + +you need to read the description of __import__ in section 2.3 of the +Python Library Reference and do a bit more. + +Using the full __import__ syntax of +__import__ (name[, globals[, locals[, fromlist]]]) + +import package.subpackage.module + +must be handled in a way that "package" goes into your module, +but "subpackage" gets imported into "package", and +"module" gets imported into "subpackage". +WHich means, our handle's name to be put into globals +is "package". On the other hand, for a + +from package.subpackage.module import object + +we need to work downhill from "package" to "module" and +pick the attribute "object", and we don't insert any +module into globals. + +Example: + +>>> target = "constants" +>>> modname = "win32com.client" +>>> fromlist = ["client"] +>>> glob = globals() +>>> loc=locals() +>>> glob[target] = getattr(__import__(modname, glob, loc, fromlist), target) +>>> constants + +>>> + +This the exact equivalent of +from win32com.client import constants + +Please don't ask me why fromlist has to be a list, dunno. +But its non-emptiness makes __import__ return the last, +not the first element in pi.pa.po . + +To get the full idea what happens, I'd further read the module +knee.py, which is a description what happens internally today. +Maybe someone can explain the details of fromlist to me :-) + +ciao - chris + +-- +Christian Tismer :^) +Applied Biometrics GmbH : Have a break! Take a ride on Python's +Kaiserin-Augusta-Allee 101 : *Starship* http://starship.python.net +10553 Berlin : PGP key -> http://wwwkeys.pgp.net +PGP Fingerprint E182 71C7 1A9D 66E9 9D15 D3CC D4D7 93E2 1FAE F6DF + we're tired of banana software - shipped green, ripens at home + + + + diff --git a/demo/ermis-f/python_m/cur/0440 b/demo/ermis-f/python_m/cur/0440 new file mode 100644 index 00000000..12e62f2c --- /dev/null +++ b/demo/ermis-f/python_m/cur/0440 @@ -0,0 +1,21 @@ +From: mal at lemburg.com (M.-A. Lemburg) +Date: Sat, 3 Apr 1999 13:30:54 GMT +Subject: Has anyone SWIGged libwww ? +Message-ID: <3706180E.1E07D605@lemburg.com> +X-UID: 440 + +Well, the subject says it all. libwww is a W3C library which implements +HTTP 1.1, FTP, etc. and is available from: + + http://www.w3.org/Library/ + +-- +Marc-Andre Lemburg Y2000: 272 days left +--------------------------------------------------------------------- + : Python Pages >>> http://starship.skyport.net/~lemburg/ : + --------------------------------------------------------- + + + + + diff --git a/demo/ermis-f/python_m/cur/0441 b/demo/ermis-f/python_m/cur/0441 new file mode 100644 index 00000000..336e2172 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0441 @@ -0,0 +1,37 @@ +From: john.michelsen at gte.net (John Michelsen) +Date: Wed, 7 Apr 1999 10:29:29 -0700 +Subject: Tkinter MDI, dockable toolbars, tree, progressbar, flatbuttons +Message-ID: <7eg2rd$4fm$1@news-2.news.gte.net> +Content-Length: 1027 +X-UID: 441 + +I've been working on some new widgets for Tkinter +including a MDI, dockable toolbars, tree, progressbar, and flatbuttons. +The MDI is almost done, though there are some problems with +resizing the child windows and setting the focus to half-way buried +child windows. Resizing only seems to make the child windows bigger, +for some reason, and rarely smaller. Setting the focus to a buried +child window is problematic because most of the time the child window +has children of its own on top of it, and binding the child window's +setFocus +method to clicks on its children doesn't seem to do anything. + +Also, I have no idea how the widgets look on unix or mac, so they probably +look +pretty bad because of a mish-mash of styles (I copied the windows icons, +etc. +with gifs and canvas items). If anyone could send me gifs of widgets on +other +platforms, I could put in some platform specific code to make them look +nicer there. + +Any help is appreciated - The files are available at: +http://www2.zyvex.com/OpenChem/Widgets.zip + +John + + + + + + diff --git a/demo/ermis-f/python_m/cur/0442 b/demo/ermis-f/python_m/cur/0442 new file mode 100644 index 00000000..3896f62b --- /dev/null +++ b/demo/ermis-f/python_m/cur/0442 @@ -0,0 +1,76 @@ +From: jason at harlequin.com (Jason Trenouth) +Date: Thu, 29 Apr 1999 10:48:23 GMT +Subject: Dylan vrs Python (was; Re: Python IS slow ! [was] Re: Python too slow for real world) +References: <613145F79272D211914B0020AFF6401914DAD8@gandalf.digicool.com> <372769B0.3CE8C0F3@prescod.net> <7g89eg$vb0$1@brick.cswv.com> +Message-ID: <375533c2.241102625@newshost> +Content-Length: 2085 +X-UID: 442 + +On 28 Apr 1999 19:34:24 -0500, neelk at brick.cswv.com (Neel Krishnaswami) wrote: + +> In article <372769B0.3CE8C0F3 at prescod.net>, +> Paul Prescod wrote: +> >William Tanksley wrote: +> >> +> >> And Oberon (SlimBinaries), and Eiffel (typing and general compile-time +> >> error catching), and ... +> > +> >Actually, isn't Eiffel's type system famous for being full of holes? +> > +> >Regardless, wouldn't a better source of inspiration on typing be a +> >language with *optional* compile-time error checking? +> +> I've been playing around with Dylan recently, and it seems like what +> Python would be if you added "end" blocks and mated it with CLOS. Since +> Dylan is nearly as dynamic as Python, I think it might be a good source +> of inspiration for Python 2. (And it might even be the case that the +> Dylan-to-C compiler might be a source of good bits to improve Python's +> speed. I haven't looked at the source yet, though.) + +Conversely, I was just looking at Python recently (as related work for a +paper). + +The Python community might like to take a look at Dylan: + + http://www.gwydiondylan.org + + http://www.harlequin.com/products/ads/dylan/ + +As a taster, here is the "invert" example in Python and Dylan: + +# Python +def invert(table): + index = {} # empty dictionary + for key in table.keys(): + value = table[key] + if not index.has_key(value): + index[value] = [] # empty list + index[value].append(key) + return index + +// Dylan +define function invert (table) + let index = make(); + for (value keyed-by key in table) + index[value] := add!(element(index, value, default: #()), key); + end; + index +end; + +The "keyed-by" clause in the "for" statement is a slight cheat since it is a +Harlequin extension (otherwise the Dylan code would be even more similar to +the Python code). + +with-heavy-troll () +What would you give for interactive development and native compilation and +incremental gc and objects-all-the-way-down and extensible syntax and COM and +CORBA and a great GUI toolkit? +end; + +:-j + +__Jason + + + + diff --git a/demo/ermis-f/python_m/cur/0443 b/demo/ermis-f/python_m/cur/0443 new file mode 100644 index 00000000..3336fa14 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0443 @@ -0,0 +1,28 @@ +From: dkuhlman at netcom.com (G. David Kuhlman) +Date: Sun, 18 Apr 1999 22:24:02 GMT +Subject: binary +References: <37171BD5.87CFA015@efes.net.tr> +Message-ID: +X-UID: 443 + +Just van Rossum wrote: +> At 2:15 PM +0300 4/16/99, Murat Yeneroglu wrote: +> >Hi, +> >I want to ask that how I can convert a decimal number to binary in +> >python ? +> >THNX + +> Take a look at the "struct" module. + +> Just + +And, also look at xdrlib in the standard Python library. XDR is a +binary format, right? And, it follows a standard, too. + + - Dave + + + + + + diff --git a/demo/ermis-f/python_m/cur/0444 b/demo/ermis-f/python_m/cur/0444 new file mode 100644 index 00000000..f5516ae8 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0444 @@ -0,0 +1,13 @@ +From: SRichter at ixl.com (Stephan Richter) +Date: Sun, 11 Apr 1999 11:37:30 -0500 +Subject: gdmodule - additional fonts +Message-ID: <923849189.1852633921@news.ixl.com> +X-UID: 444 + +This message is in MIME format. + + + + + + diff --git a/demo/ermis-f/python_m/cur/0445 b/demo/ermis-f/python_m/cur/0445 new file mode 100644 index 00000000..c8802d4d --- /dev/null +++ b/demo/ermis-f/python_m/cur/0445 @@ -0,0 +1,20 @@ +From: Marten.Hedman at btk.utu.fi (=?iso-8859-1?Q?M=E5rten?= Hedman) +Date: Wed, 14 Apr 1999 09:17:21 +0300 +Subject: Help: Tkinter, bad event type +Message-ID: <371432F0.28E2C614@btk.utu.fi> +X-UID: 445 + +Many thanks to both Don and Fredrik for their prompt answers to my +question. I searched my system an found old versions of both tk80.dll +and tcl80.dll in C:\winnt\system32. When I deleted them, my python +scripts worked fine. + +Thanks again. + +Marten Hedman +Centre for Biotechnology +Turku, Finland + + + + diff --git a/demo/ermis-f/python_m/cur/0446 b/demo/ermis-f/python_m/cur/0446 new file mode 100644 index 00000000..32352798 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0446 @@ -0,0 +1,88 @@ +From: basv at sara.nl (basv at sara.nl) +Date: Tue, 27 Apr 1999 08:29:20 GMT +Subject: Trouble with httplib and IRIX +References: <7g219p$hvb$1@nnrp1.dejanews.com> <3724CF13.C4680904@bioreason.com> +Message-ID: <7g3sgs$87n$1@nnrp1.dejanews.com> +Content-Length: 3253 +X-UID: 446 + +In article <3724CF13.C4680904 at bioreason.com>, + Andrew Dalke wrote: +> basv at sara.nl said: +> > I'm running python 1.5.2 and running it on IRIX 6.5.3 systems. +> > ... +> > I have the following problem when i'm trying to connect to an +> > non-existing machine the program hangs forever. +> +> I don't get that behaviour using 1.5.2c1 or 1.5.1 on either of +> our 6.5.2m machines. +> +> max> pwd +> /home/u05/dalke/ftps/Python-1.5.2c1 +> max> env PYTHONPATH=Lib ./python +> Python 1.5.2c1 (#4, Apr 14 1999, 16:29:33) [C] on irix6 +> Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam +> >>> import socket +> >>> import httplib +> >>> httplib.__file__ +> 'Lib/httplib.pyc' +> >>> def main(): +> ... h = httplib.HTTP() +> ... h.set_debuglevel(100) +> ... try: +> ... h.connect("www.nsrc.nus.sg") +> ... except socket.error, detail: +> ... print 'Connect failed: %s' %detail +> ... +> >>> main() +> connect: ('www.nsrc.nus.sg', 80) +> Connect failed: host not found +> >>> ^D +> max> uname -aR +> IRIX64 max 6.5 6.5.2m 11051732 IP30 +> +> Can you attach a debugger or force a core dump and see where it's +> hanging? + +I have attached the debugger to the process (dbx -p ) and it gives +the following message: + Source (of /xlv57/6.5.3m/work/irix/lib/libc/libc_n32_M4/sys/nanosleep.s) + not available for Process 344004 + +Below is the output of the first 9 lines from the 'dbx' output: + + 0 __nanosleep(0x7fff1af8, 0x0, 0xfb545b8, 0x0, 0x101a3ef9, 0x250000, 0xf, +0x77) ["/xlv57/6.5.3m/work/irix/lib/libc/libc_n32_M4/sys/nanosleep.s":15, +0xfaf6e38] 1 _usleep(0x186a0, 0x0, 0xfb545b8, 0x5f5e100, 0x101a3ef9, +0x250000, 0xf, 0x77) +["/xlv57/6.5.3m/work/irix/lib/libc/libc_n32_M4/gen/usleep.c":46, 0xfa52f60] +2 _ns_lookup(0x7fff1af8, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0xf) +["/xlv57/6.5.3m/work/irix/lib/libc/libc_n32_M4/ns/ns_lookup.c":175, +0xfaa8610] 3 _gethostbyname_r(0x7fff1af8, 0x101970c0, 0x101a3ef0, 0x0, +0x101a3ef9, 0x250000, 0xf, 0x77) +["/xlv57/6.5.3m/work/irix/lib/libc/libc_n32_M4/ns/ns_hosts.c":470, 0xfb165f8] + 4 _gethostbyname(0x101a03e4, 0x0, 0xfb545b8, 0x0, 0x101a3ef9, 0x250000, 0xf, +0x77) ["/xlv57/6.5.3m/work/irix/lib/libc/libc_n32_M4/ns/ns_hosts.c":532, +0xfb16880] 5 setipaddr(0x101a03e4, 0x0, 0xfb545b8, 0x0, 0x101a3ef9, +0x250000, 0xf, 0x77) +["/home/sara/bas/src/applications/Python/Python-1.5.2/Modules/socketmodule.c" +:404, 0x1006f6d0] 6 getsockaddrarg(0x7fff1af8, 0x0, 0x0, 0x0, 0x101a3ef9, +0x0, 0xf, 0x77) +["/home/sara/bas/src/applications/Python/Python-1.5.2/Modules/socketmodule.c" +:544, 0x1006f980] 7 PySocketSock_connect(0x0, 0x0, 0xfb545b8, 0x0, +0x101a3ef9, 0x250000, 0xf, 0x77) +["/home/sara/bas/src/applications/Python/Python-1.5.2/Modules/socketmodule.c" +:851, 0x100701c8] 8 call_builtin(0x2, 0x0, 0xfb545b8, 0x0, 0x101a3ef9, +0x250000, 0xf, 0x77) +["/home/sara/bas/src/applications/Python/Python-1.5.2/Python/ceval.c":2359, +0x1003d798] 9 PyEval_CallObjectWithKeywords(0x1019c028, 0x101970e0, 0x0, +0x0, 0x101a3ef9, 0x250000, 0xf, 0x77) +["/home/sara/bas/src/applications/Python/Python-1.5.2/Python/ceval.c":2324, +0x1003d4b0] + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/0447 b/demo/ermis-f/python_m/cur/0447 new file mode 100644 index 00000000..2b9e9da3 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0447 @@ -0,0 +1,24 @@ +From: downstairs at home.com (TM) +Date: Thu, 08 Apr 1999 05:25:30 GMT +Subject: Is Python dying? +References: <7dos4m$usi$1@nnrp1.dejanews.com> <7e30fp$8vf$1@news1.rmi.net> <14085.18282.936883.727575@bitdiddle.cnri.reston.va.us> <7ectjd$516$1@srv38s4u.cas.org> +Message-ID: +X-UID: 447 + +> +> Elsewhere in this thread there have been discussions regarding the fact +> that it's been several years since the last major Python book was +released. + +Now that you mentioned it, I remember hearing that someone was writeing +a Python TKinter book......what the hell ever happened to that?!?! + + +Tom + + + + + + + diff --git a/demo/ermis-f/python_m/cur/0448 b/demo/ermis-f/python_m/cur/0448 new file mode 100644 index 00000000..c3cebc78 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0448 @@ -0,0 +1,33 @@ +From: jeremy at cnri.reston.va.us (Jeremy Hylton) +Date: Thu, 29 Apr 1999 10:44:06 -0400 (EDT) +Subject: try vs. has_key() +In-Reply-To: <372789d8.27766891@news.jpl.nasa.gov> +References: + + + <37247ea3.494305@news.jpl.nasa.gov> + <372789d8.27766891@news.jpl.nasa.gov> +Message-ID: <14120.28625.776623.556213@bitdiddle.cnri.reston.va.us> +X-UID: 448 + +>>>>> "WD" == William H Duquette writes: + + WD> As someone pointed out, append() returns None, explaining the + WD> result I got. However, the following code works just fine: + d = {} + a = 'foo' + + # Append an entry to d[a], whether it has been initialized or not: + d[a] = d.get(a, []) + d[a].append('Bar') + +However, you're doing two dictionary lookups when only one is +necessary. It would be more efficient to store the results of the get +in a temporary variable -- temp = d[a] = d.get(a, []) -- and use the +temporary variable for the append. + +Jeremy + + + + diff --git a/demo/ermis-f/python_m/cur/0449 b/demo/ermis-f/python_m/cur/0449 new file mode 100644 index 00000000..15ddc044 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0449 @@ -0,0 +1,19 @@ +From: news at dorb.com (Darrell) +Date: Mon, 5 Apr 1999 13:33:24 -0400 +Subject: swig or not to swig ? +Message-ID: <4p6O2.1348$8m5.2126@newsr1.twcny.rr.com> +X-UID: 449 + +Coding a 'C' interface to python seems straight forward. Is swig worth the +trouble ? + +I want to access some shared libs. I tried the dl module which isn't obvious +how it works. import dl fails. + + + + + + + + diff --git a/demo/ermis-f/python_m/cur/0450 b/demo/ermis-f/python_m/cur/0450 new file mode 100644 index 00000000..d80b5e07 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0450 @@ -0,0 +1,31 @@ +From: tim_one at email.msn.com (Tim Peters) +Date: Sun, 11 Apr 1999 20:42:51 GMT +Subject: Python Chip +In-Reply-To: <3709CFC0.BCB0990A@pop.vet.uu.nl> +References: <3709CFC0.BCB0990A@pop.vet.uu.nl> +Message-ID: <000a01be845b$de38b020$2a9e2299@tim> +X-UID: 450 + +[Martijn Faassen] +> Hi everybody, +> +> For those who are still anxiously itching to get their hands on a Python +> machine, this was of course an April Fool's joke. :) + +Oh, *now* you tell me, just hours before we were to tape out final silicon! +Wonder whether I can get my money back. + +> You can now all come to destroy me now. (any other jokes in this +> newsgroup which I missed?) + +Marc posted a nice amendment to his conference's menu, but all in all c.l.py +was a deadly serious gaggle of humorless geekoids this year. Maybe that's +appropriate, though, since Guido *was* run over by an April 1st bus. + +thank-god-for-the-fully-automated-python-release-process-ly y'rs - tim + + + + + + diff --git a/demo/ermis-f/python_m/cur/0451 b/demo/ermis-f/python_m/cur/0451 new file mode 100644 index 00000000..2b5f8191 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0451 @@ -0,0 +1,76 @@ +From: mike.steed at natinst.com (Mike Steed) +Date: Thu, 29 Apr 1999 10:20:38 -0500 +Subject: GUI and creating GIF +References: <7g7u2k$fr0$1@wanadoo.fr> <3727CA5A.68BD@ccms.net> <372806B7.E050A0CF@vic.bigpond.net.au> +Message-ID: <372878C6.2CD3858A@natinst.com> +Content-Length: 1709 +X-UID: 451 + +John Leach wrote: +> +> I'd also like to use gdmodule but I can't understand the documentation +> (I've emailed to ask Richard Jones for more docs). I'm new to Python. +> Does anyone have any sample programs they can send? + +You might look at Richard's httpd logfile reporting tool (graph.py uses +gdmodule). + +http://starship.python.net/~richard/httpd_log/ + +Also, below is a simple demo that used to be distributed with gdmodule, +although it doesn't appear to be on Richard's site anymore. I don't +have "demoin.gif", so you will have to tweak the code some.... + +-Mike +----- + +#!/usr/local/bin/python -i +import gd +import sys + +# our test output image +im_out=gd.image((128,128)) +white = im_out.colorAllocate((255,255,255)) +im_out.colorTransparent(white) + +# input image +im_in=gd.image("demoin.gif") +im_in.copyResizedTo(im_out,(16,16),(0,0),(96,96)) + +red = im_out.colorAllocate((255,0,0)) +green = im_out.colorAllocate((0,255,0)) +blue = im_out.colorAllocate((0,0,255)) + +# test origin - switch to lower left type origin +im_out.origin((0,128),1,-1) +im_out.line((50,0),(128,50), red) +im_out.origin((0,0),1,1) + +# rectangle +im_out.line((8,8), (120,8), green) +im_out.line((120,8), (120,120), green) +im_out.line((120,120), (8,120), green) +im_out.line((8,120), (8,8), green) + +im_out.string(gd.gdFontLarge, (16,16), "hi", red) +im_out.stringUp(gd.gdFontSmall, (32,32), "hi", red) + +im_out.arc((64,64), (30,10), 0, 360, blue) +im_out.arc((64,64), (20,20), 45, 135, blue) + +im_out.fill((4,4), blue) + +im_out.polygon(((32,0),(0,64),(64,64)),green) + +# a brush +im_out.setBrush(gd.image(im_in,(8,8))) +im_out.setStyle((0,0,0,0,0,0,0,1)) +im_out.line((128,0),(0,128),gd.gdStyledBrushed) + +im_out.interlace(1) + +im_out.writeGif("demoout.gif") + + + + diff --git a/demo/ermis-f/python_m/cur/0452 b/demo/ermis-f/python_m/cur/0452 new file mode 100644 index 00000000..6c488698 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0452 @@ -0,0 +1,144 @@ +From: mnot at pobox.com (Mark Nottingham) +Date: Wed, 28 Apr 1999 22:17:08 GMT +Subject: HTML "sanitizer" in Python +References: <19990428152042.A708@better.net> +Message-ID: <00e501be91c4$db944f20$0301a8c0@cbd.net.au> +Content-Length: 5028 +X-UID: 452 + +There's a better (albeit non-Python) way. + +Check out http://www.w3.org/People/Raggett/tidy/ + +Tidy will do wonderful things in terms of making HTML compliant with the +spec (closing tags, cleaning up the crud that Word makes, etc.) As a big +bonus, it will remove all tags, etc, and replace them with CSS1 style +sheets. Wow. + +It's C, and is also available with a windows GUI (HTML-Kit) that makes a +pretty good HTML editor as well. On Unix, it's a command line utility, so +you can use it (clumsily) from a Python program. + +I suppose an extension could also be written; will look into this (or if +anyone does it, please tell me!) + + + + + + +----- Original Message ----- +From: William Park +Newsgroups: comp.lang.python +To: +Sent: Thursday, April 29, 1999 5:20 +Subject: Re: HTML "sanitizer" in Python + + +> On Wed, Apr 28, 1999 at 12:49:55PM -0400, Scott Stirling wrote: +> > Hi, +> > +> > I am new to Python. I have an idea of a work-related project I want +> > to do, and I was hoping some folks on this list might be able to +> > help me realize it. I have Mark Lutz' _Programming Python_ book, +> > and that has been a helpful orientation. I like his basic packer +> > and unpacker scripts, but what I want to do is something in between +> > that basic program and its later, more complex manifestations. +> > +> > I am on a Y2K project with 14 manufacturing plants, each of which +> > has an inventory of plant process components that need to be tested +> > and/or replaced. I want to put each plant's current inventory on +> > the corporate intranet on a weekly or biweekly basis. All the plant +> > data is in an Access database. We are querying the data we need and +> > importing into 14 MS Excel 97 spreadsheets. Then we are saving the +> > Excel sheets as HTML. The HTML files bloat out with a near 100% +> > increase in file size over the original Excel files. This is +> > because the HTML converter in Excel adds all kinds of unnecessary +> > HTML code, such as for every single +> > cell in the table. Many of these tables have over 1000 cells, and +> > this code, along with its accompanying closing FONT tag, add up +> > quick. The other main, unnecessary code is the ALIGN="left" +> > attribute in
tags (the default alignment _is_ left). The +> > unnecessary tags are consistent and easy to identify, and a routine +> > sh! +> > ould be writable that will automate the removal of them. +> > +> > I created a Macro in Visual SlickEdit that automatically opens all +> > these HTML files, finds and deletes all the tags that can be +> > deleted, saves the changes and closes them. I originally wanted to +> > do this in Python, and I would still like to know how, but time +> > constraints prevented it at the time. Now I want to work on how to +> > create a Python program that will do this. Can anyone help? Has +> > anyone written anything like this in Python already that they can +> > point me too? I would really appreciate it. +> > +> > Again, the main flow of the program is: +> > +> > >> Open 14 HTML files, all in the same folder and all with the .html +> > >> extension. Find certain character strings and delete them from +> > >> the files. In one case (the tags) it is easier to find the +> > >> whole tag with attributes and then _replace_ the original tag +> > >> with a plain . Save the files. Close the files. Exit the +> > >> program. +> +> Hi Scott, +> +> I shall assume that a tag occurs in one line. Try 'sed', +> for i in *.html +> do sed -e 's///g" $i > /tmp/$i && mv /tmp/$i $i +> done +> or, in Python, +> for s in open('...', 'r').readlines(): +> s = string.replace('', '', s) +> print string.strip(s) +> +> If tag spans over more than one line, then read the file in +> whole, like +> for s in open('...', 'r').read(): +> +> If the tag is not consistent, then you may have to use regular +> expression with 're' module. +> +> Hopes this helps. +> William +> +> +> > +> > More advanced options would be the ability for the user to set +> > parameters for the program upon running it, to keep from hard-coding +> > the find and replace parms. +> +> To use command line parameters, like +> $ cleantd 'ALIGN="left"' +> change to +> s = string.replace('' % sys.argv[1], '', s) +> +> > +> > OK, thanks to any help you can provide. I partly was turned on to +> > Python by Eric Raymond's article, "How to Become a Hacker" (featured +> > on /.). I use Linux at home, but this program would be for use on a +> > Windows 95 platform at work, if that makes any difference. I do +> > have the latest Python interpreter and editor for Windows here at +> > work. +> > +> > Yours truly, +> > Scott +> > +> > Scott M. Stirling +> > Visit the HOLNAM Year 2000 Web Site: http://web/y2k +> > Keane - Holnam Year 2000 Project +> > Office: 734/529-2411 ext. 2327 fax: 734/529-5066 email: +sstirlin at holnam.com +> > +> > +> > -- +> > http://www.python.org/mailman/listinfo/python-list +> +> +> +> + + + + + diff --git a/demo/ermis-f/python_m/cur/0453 b/demo/ermis-f/python_m/cur/0453 new file mode 100644 index 00000000..c55ed417 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0453 @@ -0,0 +1,78 @@ +From: tismer at appliedbiometrics.com (Christian Tismer) +Date: Mon, 26 Apr 1999 15:07:42 GMT +Subject: Python too slow for real world +References: <372068E6.16A4A90@icrf.icnet.uk> + <3720A21B.9C62DDB9@icrf.icnet.uk> + <3720C4DB.7FCF2AE@appliedbiometrics.com> + <3720C6EE.33CA6494@appliedbiometrics.com> + + + +Message-ID: <3724813E.ED53908F@appliedbiometrics.com> +Content-Length: 2666 +X-UID: 453 + + +Moshe Zadka wrote: +> +> On 25 Apr 1999, Magnus L. Hetland wrote: +... +> > Now, that's really simple -- because re.py is slow. I thought maybe +> > some of the slowness might be improved by a c-implementation, that's +> > all. Not too important to me... +> +> Um....two wrong assumptions here: +> 1. C implementation is /not/ the same as core status: C extension modules +> are numerous and wonderful, for example... + +As Mark already pointed out, what's the difference? +You will not see any performance change, wether a module +is in the core or in an extra dll. The calling mechanism +is always the same, (well, the call instr under X86 takes 1 byte more +to the dll :-) and not very fast. So the less calls, the better. + +> 2. re.py is a (very thin) wrapper around pcre, a C extension module for +> Perl Compatible Regular Expressions. + +Right, but it carries the class protocol overhead all the time. +Returning mathes always involves creation of an instance of +a match object, and a number of tuple building operations +are involved. This is where unnecessary interpreter overhead +can be saved, and results could be created more efficiently +from a c extension, since it is not forced to hold every +intermediate result by a Python object which involves memory +allocation, and so on. + +> Which just goes to say that while pcre can certainly be optimized, it +> can't be done by simply rewriting it in C. +> <0.5 wink> + +Surely not since it is written in C <1.5 wink>. +If you are referring to re.py, a (nearly) direct translation into +C would indeed not help too much. P2C does that, but since it can +only remove the interpreter overhead, you will not save more +than 30-40 percent. A hand-coded C version would try to avoid +as much overhead as possible. The main difference is that you +know the data types which you are dealing with, so you will optimize +this case, instead of having to take care of the general case +as Python does. + +But if Python had an optional strong type concept already, plus +some sealing option for modules and classes which would allow +to use compiled method tables instead of attribute lookups, +things could change dramatically. Given that, re.py could +be made fast enough without involving C, I believe. + +ciao - chris + +-- +Christian Tismer :^) +Applied Biometrics GmbH : Have a break! Take a ride on Python's +Kaiserin-Augusta-Allee 101 : *Starship* http://starship.python.net +10553 Berlin : PGP key -> http://wwwkeys.pgp.net +PGP Fingerprint E182 71C7 1A9D 66E9 9D15 D3CC D4D7 93E2 1FAE F6DF + we're tired of banana software - shipped green, ripens at home + + + + diff --git a/demo/ermis-f/python_m/cur/0454 b/demo/ermis-f/python_m/cur/0454 new file mode 100644 index 00000000..6f7261b6 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0454 @@ -0,0 +1,31 @@ +From: fredrik at pythonware.com (Fredrik Lundh) +Date: Tue, 20 Apr 1999 15:06:59 GMT +Subject: Tkinter canvas scaling does not work for Images?? +References: <87hfqbjtne.fsf@linux01.prc.tno.nl> +Message-ID: <02cb01be8b3f$71912250$f29b12c2@pythonware.com> +X-UID: 454 + +John van der Koijk wrote: +> I'm playing around with Pmw and (thus Tkinter). After some +> experiments, I found out that I can scale lines and such, but Images +> do not seem to respond to similar requests. The docs don't seem to +> mention this interesting limitation. + +answer 1: the "scale" method modifies the item coordinates +only. since bitmaps, images, windows, and text strings have +a single coordinate pair, they can only move around, not +change size... + +answer 2: resizing images and fonts on the fly is a non-trivial +problem, especially if you want both performance and port- +ability. so Tk simply passes on this one... + +in other words, you're on your own. it can be done, +but it takes some work... + + + + + + + diff --git a/demo/ermis-f/python_m/cur/0455 b/demo/ermis-f/python_m/cur/0455 new file mode 100644 index 00000000..d7445dae --- /dev/null +++ b/demo/ermis-f/python_m/cur/0455 @@ -0,0 +1,94 @@ +From: tismer at appliedbiometrics.com (Christian Tismer) +Date: Fri, 30 Apr 1999 17:20:07 GMT +Subject: Python IS slow ! [was] Re: Python too slow for real world +References: <613145F79272D211914B0020AFF6401914DAD8@gandalf.digicool.com> <7g9qmo$luf$1@news.udel.edu> <372965CA.2B3FD2FE@appliedbiometrics.com> <19990430080805.B776752@vislab.epa.gov> <3729A9F3.75B2692B@appliedbiometrics.com> <19990430101215.A806665@vislab.epa.gov> <3729CD92.43477316@appliedbiometrics.com> <19990430130807.A812795@vislab.epa.gov> +Message-ID: <3729E647.B38DFE72@appliedbiometrics.com> +Content-Length: 2837 +X-UID: 455 + + +Randall Hopper wrote: + +[me, trying to give an example of forward references] + +> Well, I personally would call this "broken". :-) +> Base class A calling subclass B's method M without declaring a virtual +> method M itself is very perverse IMO. + +Then please go and tell this to Jim Fulton (Bobo/Zope) +or look into the XML-sig's parsers. + +A mixin class is a mixin, which is not supposed to produce +prototypes for everybody who uses it. This is a different +idea which is implied by multiple inheritance, IMHO. + +> If we have: +> class parserops: +> "mixin class" +> def general_method1(self, *args): +> self.parser_method(self.scanner, args) +> def parser_method(self,...) +> """ Pure virtual method """ +> pass +> ... +> +> Then there's no problem. self.parse_method will always resolve, possibly +> to a subclass method but at least to this pure virtual stub. +> +> |It will also not resolve self.magic, since it doesn't +> |inherit from abstractparser. +> +> I bet you 5 bucks you know what I'm going to say. :-) +> Accessing attributes of a sibling base class united by a future subclass? +> [Cringe!] Sheesh. I wouldn't want to try to follow _that_ code, much less +> debug it. + +We were not talking style or how to do things, but +theory. Existing code would break. Some could be fixed, +some not, all-in-all I don't want to change the language, +but have my (at least:) programs run very fast. + +> +> |Yes, but this would limit Python down to Pascal like name spaces. +> |You would need all kinds of tricks to write recoursions like +> | +> |def two(arg): +> | if arg % 2 == 0: +> | return three(arg-1) +> | return arg +> | +> |def three(arg): +> | if arg % 3 == 0: +> | return two(arg-1) +> | return arg +> +> Good point for deferring resolution until the end of the module. +> I'm sold. I'd prefer this to having to use forward declarations. + +There'se also a lot more of possible flexibility which +we should keep. Some modules tend to produce code on-the-fly, +invent functions dynamically, whatever. +Also I often see initialization code like + +import string +my_split = string.split +del string + +and doing some more. During creation (execution) of the module +code, the name space is changing quite much. Some module +are stable afterwards, and they can be completely frozen, but, +of course, this would be about the last line of code. + +ciao - chris + +-- +Christian Tismer :^) +Applied Biometrics GmbH : Have a break! Take a ride on Python's +Kaiserin-Augusta-Allee 101 : *Starship* http://starship.python.net +10553 Berlin : PGP key -> http://wwwkeys.pgp.net +PGP Fingerprint E182 71C7 1A9D 66E9 9D15 D3CC D4D7 93E2 1FAE F6DF + we're tired of banana software - shipped green, ripens at home + + + + diff --git a/demo/ermis-f/python_m/cur/0456 b/demo/ermis-f/python_m/cur/0456 new file mode 100644 index 00000000..b062b195 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0456 @@ -0,0 +1,46 @@ +From: mnot at pobox.com (Mark Nottingham) +Date: Sun, 25 Apr 1999 05:18:16 GMT +Subject: pickling and unpickling on the same file? +References: +Message-ID: <01c001be8edb$066c5ea0$0301a8c0@cbd.net.au> +X-UID: 456 + +Have you looked at the shelve module? + + +----- Original Message ----- +From: Nathan Froyd +Newsgroups: comp.lang.python +To: +Sent: Sunday, April 25, 1999 1:48 +Subject: pickling and unpickling on the same file? + + +> Is there any way to implement the above beast? Something like: +> +> p = Pickler(file) +> u = Unpickler(file) +> +> file.seek(random_pos) +> x = u.load() +> +> z = [7, 8, 9] +> p.dump(z) +> +> would be perfect +> -- +> Nathan | nathan.froyd at rose-hulman.edu | +http://www.rose-hulman.edu/~froydnj/ +> God went through hell so we don't have to. ICQ:18861764 | +AOL:myrlyn007 +> Avoid the gates of hell. Use Linux. +Python:"x='x=%s;x%%`x`';x%`x`" +> Evolution is a million line computer program falling into place by +accident. +> +> + + + + + diff --git a/demo/ermis-f/python_m/cur/0457 b/demo/ermis-f/python_m/cur/0457 new file mode 100644 index 00000000..c5585ed9 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0457 @@ -0,0 +1,51 @@ +From: tismer at appliedbiometrics.com (Christian Tismer) +Date: Thu, 22 Apr 1999 18:04:36 GMT +Subject: Pointers to variables +References: <19990422121403.A279051@vislab.epa.gov> +Message-ID: <371F64B4.8DF3FF24@appliedbiometrics.com> +Content-Length: 1404 +X-UID: 457 + + +Randall Hopper wrote: +> +> This doesn't work: +> +> for ( var, str ) in [( self.min, 'min_units' ), +> ( self.max, 'max_units' )]: +> if cnf.has_key( str ): +> var = cnf[ str ] +> del cnf[ str ] +> +> It doesn't assign values to self.min, self.max (both integers). The values +> of these variables are inserted into the tuples and not references to the +> variables themselves, which is the problem. +> +> How can I cause a reference to the variables to be stored in the tuples +> instead of their values? + +There is simply no direct way to use references. You need +to use an object which itself has a reference. + +One way to achive the wanted effect is to use setattr, while +paying some speed penalty, of course: + + for ( var, str ) in [( 'min', 'min_units' ), + ( 'max', 'max_units' )]: + if cnf.has_key( str ): + setattr(self, var, cnf[ str ]) + del cnf[ str ] + +ciao - chris + +-- +Christian Tismer :^) +Applied Biometrics GmbH : Have a break! Take a ride on Python's +Kaiserin-Augusta-Allee 101 : *Starship* http://starship.python.net +10553 Berlin : PGP key -> http://wwwkeys.pgp.net +PGP Fingerprint E182 71C7 1A9D 66E9 9D15 D3CC D4D7 93E2 1FAE F6DF + we're tired of banana software - shipped green, ripens at home + + + + diff --git a/demo/ermis-f/python_m/cur/0458 b/demo/ermis-f/python_m/cur/0458 new file mode 100644 index 00000000..a8dbe486 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0458 @@ -0,0 +1,41 @@ +From: robin at alldunn.com (Robin Dunn) +Date: Mon, 26 Apr 1999 19:33:00 -0700 +Subject: Looking for db.h - its not in the 1.5.2 source kit +References: <924903339.24130.0.nnrp-10.9e982a40@news.demon.co.uk> +Message-ID: +X-UID: 458 + +You can find the Berkeley DB library at http://www.sleepycat.com/db/, you'll +need to build this first, and then you can build the bsddb Python module. +(You'll first need to change db.h to db_185.h in bsddbmodule.c) + +For a more complete wrapping of the Berkeley DB library, see my Starship +page, http://starship.python.net/crew/robind/index.html (Although it may not +be entirly compatible with the latest DB release. It's been a while since +I've updated my copy.) + +-- +Robin Dunn +robin at AllDunn.com +http://AllDunn.com/robin/ +http://AllDunn.com/wxPython/ Check it out! +Try http://AllDunn.com/laughworks/ for a good laugh. + + +Barry Scott wrote in message +<924903339.24130.0.nnrp-10.9e982a40 at news.demon.co.uk>... +>Can anyone point me at a copy of db.h that is required to build bsddb +>windows +>module please? Its missing from the final release 1.5.2 kit. +> +> BArry +> +> + + + + + + + + diff --git a/demo/ermis-f/python_m/cur/0459 b/demo/ermis-f/python_m/cur/0459 new file mode 100644 index 00000000..254dc7d4 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0459 @@ -0,0 +1,31 @@ +From: doylep at ecf.toronto.edu (doylep at ecf.toronto.edu) +Date: Thu, 29 Apr 1999 19:25:23 GMT +Subject: Python IS slow ! [was] Re: Python too slow for real world +References: <613145F79272D211914B0020AFF6401914DAD8@gandalf.digicool.com> <372769B0.3CE8C0F3@prescod.net> +Message-ID: <7gabmt$jm$1@nnrp1.dejanews.com> +X-UID: 459 + +In article , + Markus Kohler wrote: +> +> As far as I remember Eiffel requires a global system analysis to be type +> safe at compile time. + +Well, the story is a bit more complicated. The bottom line is that current +compilers use run-time checks in the dangerous situations, and that the +dangerous situations are easily avoided anyway. + +If you avoid covariant arguments and feature hiding, as many do, Eiffel is +statically typesafe with no global analysis. Personally, I'd prefer if Eiffel +didn't offer these language "features" at all. + +-- +Patrick Doyle +doylep at ecf.toronto.edu + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/0460 b/demo/ermis-f/python_m/cur/0460 new file mode 100644 index 00000000..3138c8c5 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0460 @@ -0,0 +1,101 @@ +From: jeremy at cnri.reston.va.us (Jeremy Hylton) +Date: Tue, 27 Apr 1999 12:01:22 -0400 (EDT) +Subject: threading/events questions +In-Reply-To: <3725a47f.96308574@scout> +References: <3725a47f.96308574@scout> +Message-ID: <14117.54695.658787.508940@bitdiddle.cnri.reston.va.us> +Content-Length: 2934 +X-UID: 460 + +>>>>> "C" == Chris writes: + + C> Hello... After experimenting with the modules thread and + C> threading I have some open questions. I've written the famous + C> ping-pong program. + +I'm not familiar with the ping-pong problem in general. I wonder if +the code you posted is doing exactly what you intended. The event +you're using could be used to allow communicate/synchronization +between the threads, but instead it's being used to sleep; the +Quit.wait() call only returns after the timeout period. So you could +just as easily call sleep: + +def f(t, msg): + print msg +## Quit.wait(t) +## if Quit.isSet(): +## return + time.sleep(t) + f(t, msg) + +You could also replace the recursive function call with a loop: + +def f(t, msg): + while 1: + print msg + Quit.wait(t) + if Quit.isSet(): + break + + C> With that program, the threads are running for 60 seconds. But, + C> how can I stop one thread and not both? I don't want to write an + C> additional function doing exactly the same except dealing with a + C> different Event. + +You could make the event a parameter instead of a global variable: + +def f(timeout, event, msg): + print msg + event.wait(timeout) + if event.isSet(): + return + f(timeout, event, msg) + + C> My second problem is sending an event with a message. + C> ChangeOutput = Event() and send the event ChangeOutput('something + C> different than ping-pong') to one thread. After receiving this + C> message, the thread should change the recursive call to f(t, + C> 'something different, than ping-pong'). + +Event objects don't have associated messages be default. You would +need to create a new object that also had an associated message. + +You could create an object that has the functionality you're +interested in and an associated event. You could manage the two +separately, although it seems like you do less bookkeeping if the +object has the event as an instance variable. Not sure if there are +pitfalls lurking... + +import threading +class MessageHolder(threading._Event): + def __init__(self, msg): + threading._Event.__init__(self) + self.msg = msg + def set_msg(self, msg): + self.msg = msg + self.set() + def get_msg(self): + return self.msg + +def f2(timeout, msg_obj): + while 1: + print msg_obj.get_msg() + msg_obj.wait(timeout) + if msg_obj.isSet(): + msg_obj.clear() + + C> How can I wait for events (more than one)? In the code above, + C> I am just waiting for one event with a proper timeout. How can I + C> react on the additional event ChangeOutput? + +Good question! I don't have a good answer. You might have some +arrangement with hierarchical events (or conditions), so that one +event is set only when one of the events under it is set. So you can +wait on the upper event, and when it is set, check each of the +underlying events. + +Jeremy + + + + diff --git a/demo/ermis-f/python_m/cur/0461 b/demo/ermis-f/python_m/cur/0461 new file mode 100644 index 00000000..85095012 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0461 @@ -0,0 +1,37 @@ +From: ppessi at hut.fi (Pekka Pessi) +Date: 18 Apr 1999 23:41:16 +0300 +Subject: SNMPy update +References: <7e1hiq$a71$1@Starbase.NeoSoft.COM> <7ear25$ksf$1@news-sj-3.cisco.com> <14089.11820.416453.80124@bitdiddle.cnri.reston.va.us> +Message-ID: +Content-Length: 1111 +X-UID: 461 + +Jeremy Hylton writes: +>I'll second your sentiment! I did some work on an X.509 library +>written entirely in Python. Like you friend's SNMP code, it will +>probably never be released; I don't have time to finish it nor did I +>expect that I'd want to release it given the export control hassles. + +>However, it seemed clear to me that an ASN.1 compiler could be written +>to generate the encode/decode routines. If someone is interested in +>that, I've got some design notes and rough code on how to do the +>encode/decode and on how to build a backend for SNACC. (A free-ish +>ASN.1 compiler; the only one?) + + There certainly are other free ASN.1 compilers; however, they tend + to be a bit incomplete. + + I have written BER, CER, DER, and a bit incomplete PER + decoding/encoding classes in pure Python. Based on them, I've + written LDAP client and server libraries in Python. However, as they + are developed on the company time, I'd have to talk with my boss in + order to release them. + + I'd certainly be interested in a SNACC backend generating Python. + +-- +Pekka.Pessi at hut.fi + + + + diff --git a/demo/ermis-f/python_m/cur/0462 b/demo/ermis-f/python_m/cur/0462 new file mode 100644 index 00000000..204a8244 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0462 @@ -0,0 +1,35 @@ +From: jasonic at nomadicsltd.com (Jason Cunliffe) +Date: Fri, 9 Apr 1999 08:33:41 +0100 +Subject: PyMIDI ? +Message-ID: <7ekagq$sjq$1@news1.cableinet.co.uk> +X-UID: 462 + +Hello + +I am looking for pointers to any MIDI work done with Python. I can see +several ways to handle MIDI in Python: + +- wrapping MIDI c libraries with SWIG + +- Direct binary MIDI file i/o parsing in Python - but will this be fast +enough? + +- linking to an existing optimized MIDI toolkit such as Tim Thompson's +superb openSource xplatform 'Keykit' language http://209.233.20.72/keykit/ +(check it out) + +- on Win32 via COM use a toolkit like Mabry's MIDII/o http://www.mabry.com + +- ??? + +Thanks in advance any ideas + +- Jason + + + + + + + + diff --git a/demo/ermis-f/python_m/cur/0463 b/demo/ermis-f/python_m/cur/0463 new file mode 100644 index 00000000..e9bd1ae4 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0463 @@ -0,0 +1,31 @@ +From: tratt at dcs.kcl.ac.uk (Laurence Tratt) +Date: Mon, 19 Apr 1999 22:26:42 +0100 +Subject: bzip2 module for Python +Message-ID: <2fbf63f548.tratt@tratt.freeserve.co.uk> +X-UID: 463 + +In message + Andreas Jung wrote: + +> Is there a module for the bzip2 compression library available or in the +> making ? + +I have put together a quick interface to the bzip2 compression system which +- for a couple of days or so - has a temporary home at: + + http://yi.com/home/TrattLaurence/pybzlib.tar + +I'm putting this out to see if there's any interest in developing it +further. At the moment, the module has two methods: 'compress' & +'decompress'. + +It's not been tested much, but the main parts seem to work. As I said, I am +interested to know if there is a demand for this, so comments are +appreciated. + + +Laurie + + + + diff --git a/demo/ermis-f/python_m/cur/0464 b/demo/ermis-f/python_m/cur/0464 new file mode 100644 index 00000000..6ab50922 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0464 @@ -0,0 +1,25 @@ +From: cs at spock.rhein-neckar.de (Carsten Schabacker) +Date: 13 Apr 1999 12:02:51 +0200 +Subject: forking + stdout = confusion +References: +Message-ID: <87n20caldg.fsf@spock.localnet.de> +X-UID: 464 + +clarence at silcom.com (Clarence Gardner) writes: + +> I thought that maybe sys.stdout was using a dup()'ed copy of stdout, +> but I checked sys.stdout.fileno() and it was 1, so that doesn't seem +> to be the case. +No, the child and the parent share the SAME filedescriptors. This is true +for ALL open files! So if you don't need the descriptors in a child or a +parent you should close them. + +Apache waits for the end of the file, so all processes (parents and +childs) must close the file! + +greetings from germany +Carsten + + + + diff --git a/demo/ermis-f/python_m/cur/0465 b/demo/ermis-f/python_m/cur/0465 new file mode 100644 index 00000000..b53cb5b4 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0465 @@ -0,0 +1,26 @@ +From: hyoon at bigfoot.com (Hoon Yoon) +Date: Sun, 18 Apr 1999 15:13:41 -0400 +Subject: restore sources from PYC [Q] +References: <37177D8E.FF43BF65@bigfoot.com> <000801be8891$f238d980$ee9e2299@tim> +Message-ID: <371A2EE5.90262EC6@bigfoot.com> +X-UID: 465 + +Yep, just more defensive mech from the old school. + +***************************************************************************** +S. Hoon Yoon (Quant) Merrill Lynch Equity Trading, +yelled at yahoo.com hoon at bigfoot.com(w) +"Miracle is always only few standard deviations away, but so is +catastrophe." +* Expressed opinions are often my own, but NOT my employer's. +"I feel like a fugitive from the law of averages." Mauldin +***************************************************************************** +-------------- next part -------------- +A non-text attachment was scrubbed... +Name: vcard.vcf +Type: text/x-vcard +Size: 202 bytes +Desc: Card for Hoon Yoon +URL: + + diff --git a/demo/ermis-f/python_m/cur/0466 b/demo/ermis-f/python_m/cur/0466 new file mode 100644 index 00000000..a1035f03 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0466 @@ -0,0 +1,38 @@ +From: tismer at appliedbiometrics.com (Christian Tismer) +Date: Tue, 20 Apr 1999 20:45:44 GMT +Subject: pythonw.exe doesn't work +References: <371cd0de.15002206@news.mysolution.com> +Message-ID: <371CE778.1E9CDEF4@appliedbiometrics.com> +Content-Length: 1143 +X-UID: 466 + + +Ken Power wrote: +> +> Another windows problem. Python scripts won't run on my system +> (when I do the double-click scenario). I'm using Python 1.5.2 on +> win95b. The .py and .pyw extension is associated with pythonw.exe, but +> they don't appear to work. Also, double-clicking pythonw.exe doesn't +> accomplish anyhting. Any clues, hints? + +The association of Pythonw.exe with the .py extension is wrong. +Pythonw is a Python without a console, so it most probably +does what it should do: execute a script and vanish. + +You should change the .py association back to python.exe . +Pythonw is there for running COM server processes, applications +which create their own windows, and so on. + +ciao - chris + +-- +Christian Tismer :^) +Applied Biometrics GmbH : Have a break! Take a ride on Python's +Kaiserin-Augusta-Allee 101 : *Starship* http://starship.python.net +10553 Berlin : PGP key -> http://wwwkeys.pgp.net +PGP Fingerprint E182 71C7 1A9D 66E9 9D15 D3CC D4D7 93E2 1FAE F6DF + we're tired of banana software - shipped green, ripens at home + + + + diff --git a/demo/ermis-f/python_m/cur/0467 b/demo/ermis-f/python_m/cur/0467 new file mode 100644 index 00000000..328203dd --- /dev/null +++ b/demo/ermis-f/python_m/cur/0467 @@ -0,0 +1,32 @@ +From: bend at realeducation.com (Benjamin Derstine) +Date: Mon, 26 Apr 1999 13:09:23 -0600 +Subject: Using the compression module +Message-ID: <7g2ddf$dra$1@birch.prod.itd.earthlink.net> +X-UID: 467 + +Hello, +I'm looking for a simple example of how to use the compression module, gzip. +All I want to do is a make a compressed copy of a file. From the gzip +documentation I see how to open a file for compression but I'm not sure what +to do with it after that. From the gzip documentation: + +open (fileobj[, filename[, mode[, compresslevel]]]) + Returns a new GzipFile object on top of fileobj, which can be a regular +file, a StringIO object, or any object which simulates a file. + +Okay, so I opened this file object : + +f=open('/Audit.dbf','r') +test=gzip.GzipFile('Auditc','r','9',f) + +So now how do I produce a compressed version of it? + +Thanks, +Ben + + + + + + + diff --git a/demo/ermis-f/python_m/cur/0468 b/demo/ermis-f/python_m/cur/0468 new file mode 100644 index 00000000..a7cffe1c --- /dev/null +++ b/demo/ermis-f/python_m/cur/0468 @@ -0,0 +1,36 @@ +From: MHammond at skippinet.com.au (Mark Hammond) +Date: Thu, 22 Apr 1999 10:15:05 +1000 +Subject: permissions on win32 [Q] +References: <7fk8r0$7ng$1@m2.c2.telstra-mm.net.au> <002401be8c03$4f21d380$6eba0ac8@kuarajy.infosys.com.ar> +Message-ID: <7flpkv$6je$1@m2.c2.telstra-mm.net.au> +X-UID: 468 + +Bruno Mattarollo wrote in message +<002401be8c03$4f21d380$6eba0ac8 at kuarajy.infosys.com.ar>... +>Thanks Mark... +> +> All this is supposed to run on sunday and it's Mission Critical, so I +>presume wiill be doing it by hand, but anyway thanks. I am looking forward +>to be able to do this on NT... :-) +> +> FYI we will be running another mission critical process on Sunday and it +>will be a small Python app that will run on NT ... I love Python ... :-) + +Actually, overnight I thought of a different solution you could use - use a +"template file". + +Although the help file omits this information, you could use +"win32security.GetFileSecurity()", and name a file that has the permissions +you wish to "copy". This will give you a SECURITY_DESCRIPTOR object. Once +you have the object, you can even manipulate the contents - the only thing +missing from 124 was the ability to create a brand-new, empty +SECURITY_DESCRIPTOR - all the functionality to manipulate them is there.... + +Mark. + + + + + + + diff --git a/demo/ermis-f/python_m/cur/0469 b/demo/ermis-f/python_m/cur/0469 new file mode 100644 index 00000000..44965b5b --- /dev/null +++ b/demo/ermis-f/python_m/cur/0469 @@ -0,0 +1,33 @@ +From: kiffney at my-dejanews.com (Gustin Kiffney) +Date: Thu, 22 Apr 1999 14:27:47 GMT +Subject: pythonwin/mapi crystal ball needed +Message-ID: <7fnbks$ga1$1@nnrp1.dejanews.com> +Content-Length: 1255 +X-UID: 469 + +I've had great results with Python under Linux (doing a host of CGI +chores that I was too lazy or stupid to figure out with Perl) and +am now hoping that Pythonwin can save me from the many-headed Visual +Basic dragon under windows - (nothing particular against Visual Basic +except that it kept me locked in a dungeon over holidays cursing myself +for listening to its siren song -"hey, this looks easy doesn't it - come +this way" and later getting enmeshed in its buggy coils) + +Anyway I've long put off learning much about MFC/COM/MAPI because +it looked too hard, but now have to find a way to implement a MAPI +service provider (an address book). I've looked at the MAPI stuff +in the python win32all distribution and it looks pretty complete (anyway, +it looks like lots of stuff that I don't understand yet is there). + +Can anyone who has entered these +swamps before predict for me whether trying to do this using Python has +a chance of success, or should I instead sit with a couple thousand +page MFC/MAPI/C++ books as being more likely to succeed (perhaps, at +finally rendering me completely insane)... + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/0470 b/demo/ermis-f/python_m/cur/0470 new file mode 100644 index 00000000..3021a129 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0470 @@ -0,0 +1,103 @@ +From: tim_one at email.msn.com (Tim Peters) +Date: Sun, 25 Apr 1999 17:29:34 -0400 +Subject: converting perl to python - simple questions. +In-Reply-To: <7fvstg$nqo$1@nnrp1.dejanews.com> +Message-ID: <000101be8f62$b66e4700$669e2299@tim> +Content-Length: 2963 +X-UID: 470 + +[sweeting at neuronet.com.my] + +[Perl "exists"/"defined" vs Python "None"] +> For years, I've been thinking of "None" in Python as "null" in javascript, +> meaning "no value set" + +Really not the same! + +> and so it was actually quite interesting to see that Perl has "exists" +> and "defined" functions for dictionaries.... + +Perl is much more reluctant than Python to raise errors, and tends to return +"the undefined value" in situations where Python would kick you. So e.g. + +%d = (); + +($d{'hasa'}) = ('cat' =~ /(a)/); +print exists $d{'hasa'} ? "exists" : "not exists", "\n"; +print defined $d{'hasa'} ? "defined" : "not defined", "\n"; + +($d{'hasa'}) = ('dog' =~ /(a)/); +print exists $d{'hasa'} ? "exists" : "not exists", "\n"; +print defined $d{'hasa'} ? "defined" : "not defined", "\n"; +print 2 + $d{'hasa'}, "\n"; + +prints: + +exists +defined +exists +not defined +2 + +I'd rather get kicked <0.1 wink>. To be fair, adding 2 to the undefined +value will print a "use of uninitialized value" warning if Perl is run +with -w. I'd still rather get kicked. (BTW, always run Perl with -w! Even +Perl-heads will advise that . If the script you're translating relies +on extreme Perlish subtleties, -w will probably alert you to them.) + +>> Get in the habit of using r-strings for writing regexps; +>> they'll make your backslash life much easier. + +> Thank you for pointing that out - the perl stuff's been screwing +> with my head and making me confused, \s being ok in that language. + +That's the problem! \s is fine in a Python string too. But other things +aren't, and without using r-strings you're responsible for remembering which +is which. For example, the regexp + + r"\bthe" + +matches "the" starting at a word boundary, but the regexp + + "\bthe" + +matches "the" following a backspace character. + +Perl actually has the same problem, but it's *usually* hidden by "regexp +context"; e.g.; + + $string =~ /\bthe/ + +matches "the" starting at a word boundary, while + + $pattern = "\bthe"; + $string =~ /$pattern/ + +matches "the" following a backspace character. Perl treats string escape +sequences differently depending on whether the string is or isn't in regexp +context; Python has no concept of context, so always treats string escapes +the same way; the feature of Python r-strings is that they don't do *any* +backslash substitutions, allowing the callee (in this case, re and pcre) to +treat them as *it* wants to. + +Subtleties aside, most Perl5 regexps work fine in Python after replacing the +bracketing / and / with r" and ". OTOH, if you can use a facility from the +string module instead, it's usually clearer and faster; e.g., the original + + $x !~ /^\s$/ + +may be better as + + not (len(x) == 1 and x in string.whitespace) + +depending on what the original line is *really* trying to do (did they +really want all of " ", "\n", " \n", and "\n\n" to match? beats me ... and +that's one reason a string version is clearer). + +all-bleeding-stops-ly y'rs - tim + + + + + + diff --git a/demo/ermis-f/python_m/cur/0471 b/demo/ermis-f/python_m/cur/0471 new file mode 100644 index 00000000..d83c3726 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0471 @@ -0,0 +1,27 @@ +From: trashcan at david-steuber.com (David Steuber) +Date: 28 Apr 1999 03:18:57 -0400 +Subject: python and SOCKS firewall +References: +Message-ID: +X-UID: 471 + +"Jeffrey Kunce" writes: + +-> I just found a way to get python on a Windows machine to talk through a SOCKS firewall. + +I sympathize with the fact that you are stuck using Novell GroupWise +for USENET. However, could you please find a way to limit you line +lengths? You posted long lines that are a PITA to read. FYI. + +-- +David Steuber +http://www.david-steuber.com + +If you wish to reply by mail, _please_ replace 'trashcan' with 'david' +in the e-mail address. The trashcan account really is a trashcan. + +"I refuse to have a battle of wits with an unarmed person." + + + + diff --git a/demo/ermis-f/python_m/cur/0472 b/demo/ermis-f/python_m/cur/0472 new file mode 100644 index 00000000..8646e057 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0472 @@ -0,0 +1,16 @@ +From: bwarsaw at cnri.reston.va.us (Barry A. Warsaw) +Date: 16 Apr 1999 19:52:35 -0400 +Subject: restore sources from PYC [Q] +References: <000101be879c$8aed0670$6eba0ac8@kuarajy.infosys.com.ar> <37177D8E.FF43BF65@bigfoot.com> <7f80ii$7m0@journal.concentric.net> <61r9pk1h2t.fsf@anthem.cnri.reston.va.us> <7f84mq$a7c@chronicle.concentric.net> +Message-ID: <61n20815to.fsf@anthem.cnri.reston.va.us> +X-UID: 472 + +>>>>> "CP" == Christopher Petrilli writes: + + CP> Get a life, Barry ;-) + +Been reading too much comp.emacs.xemacs lately! + + + + diff --git a/demo/ermis-f/python_m/cur/0473 b/demo/ermis-f/python_m/cur/0473 new file mode 100644 index 00000000..20f36d32 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0473 @@ -0,0 +1,34 @@ +From: aa8vb at vislab.epa.gov (Randall Hopper) +Date: Tue, 20 Apr 1999 15:28:37 GMT +Subject: Tkinter performance +In-Reply-To: <19990420083759.A133486@vislab.epa.gov>; from Randall Hopper on Tue, Apr 20, 1999 at 08:37:59AM -0400 +References: <371B4B39.8B78BC7A@foreman.ac.rwth-aachen.de> <19990420083759.A133486@vislab.epa.gov> +Message-ID: <19990420112837.A136681@vislab.epa.gov> +X-UID: 473 + +Randall Hopper: + |Greg Landrum: + | |Suppose I need to draw a couple hundred circles and several + | |thousand line segments (these are mostly connected, so I can +... + | |1) Can Tkinter on a "typical" PC (say a P200) deliver a + | |"reasonable" update rate (a couple of frames per second + | |would probably cut it)? +... + |The plus for OpenGL is of course the use of its display lists which makes + |redraws much faster. Hopefully TkGS will take off in the Tk world and + |OpenGL-accelerate the canvas by default when OpenGL is available. + +A correction. I assumed TkGS's plan to use OpenGL when available implied +it would use OpenGL display lists. That's not the case. I just swapped +mail with Frederic BONNET of TkGS and he said current plans don't call for +using OpenGL display lists in TkGS. + +(I asked him to reconsider this design choice.) + +Randall + + + + + diff --git a/demo/ermis-f/python_m/cur/0474 b/demo/ermis-f/python_m/cur/0474 new file mode 100644 index 00000000..ef13d6a4 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0474 @@ -0,0 +1,41 @@ +From: jbauer at rubic.com (Jeff Bauer) +Date: Sat, 24 Apr 1999 23:28:42 GMT +Subject: Python and "Hand held" computers +References: <37222AE6.E6C8F713@weihenstephan.org> +Message-ID: <372253AA.8FDFBFCB@rubic.com> +X-UID: 474 + +"Dr. Peter Stoehr" wrote: +> I'm a great fan of python and I'm now looking for an +> hand held computer (something smaller than a laptop) +> that can be programmed with python. + +This must be PythonCE week. Three requests in 3 days. + +Brian Lloyd's original PythonCE port: + + http://www.digicool.com/~brian/PythonCE/ + +Mark Hammond has extended it: + + http://starship.python.net/crew/mhammond/ce/ + +There is also a mailing list: + + http://www.egroups.com/group/python-ce/ + +Briefly, you should be able to run Python on any +of the CE family. Practically, this means CE +devices based on the MIPS or Hitachi processors. +The developers working on PythonCE all have MIPS +systems, I believe. (At least that's true for +Mark Hammond, Brian Lloyd, and myself.) + +Best regards, + +Jeff Bauer +Rubicon, Inc. + + + + diff --git a/demo/ermis-f/python_m/cur/0475 b/demo/ermis-f/python_m/cur/0475 new file mode 100644 index 00000000..d8794bd2 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0475 @@ -0,0 +1,59 @@ +From: quinn at necro.ugcs.caltech.edu (Quinn Dunkan) +Date: 15 Apr 1999 03:56:51 GMT +Subject: Novice Question: two lists -> dictionary +References: <7f3j1v$f6j$1@nnrp1.dejanews.com> +Message-ID: +Content-Length: 1296 +X-UID: 475 + +On Thu, 15 Apr 1999 02:31:27 GMT, jwtozer at my-dejanews.com + wrote: +>How do I make the members of one list the key of a dictionary and the members +>of a second list the members of list values associated with with those keys? +> +>Given: +> +>ListA = ['10', '10', '20', '20', '20', '24'] +>ListB = ['23', '44', '11', '19', '57', '3'] +> +>Desired Result: +> +>Dict = {'10': ['23','44'],'20': ['11','19','57'], '24': ['3']} +> +>Any help will be much appreciated. + +d = {} +for a, b in map(None, ListA, ListB): + if not d.has_key(a): + d[a] = [b] + else: + d[a].append(b) + +Notice that python does elementary pattern-matching (and calls it "tuple +unpacking"). You can actually do nested pattern-matching like: + +lst1 = ( + (1, 2), + (3, 4), +) +lst2 = ('a', 'b') +for (a, b), c in map(None, lst1, lst2): + print a, b, c + +Also, if you have mxTools, you can do: + +import NewBuiltins +d = dict(map(None, ListA, ListB)) + +Actually, this will give you {10: 44, 20: 57, 24: 3}, which is not what you +want, but it should be faster :) + + +I find the above map(None, ...) idiom useful for iterating over multiple +sequences at the same time (like haskell's zip function). I bring up +pattern-matching because it seems to be an area of python which is not +extensively discussed in the documentation. (?) + + + + diff --git a/demo/ermis-f/python_m/cur/0476 b/demo/ermis-f/python_m/cur/0476 new file mode 100644 index 00000000..508805ce --- /dev/null +++ b/demo/ermis-f/python_m/cur/0476 @@ -0,0 +1,30 @@ +From: kc5tja at bigfoot.com (Samuel A. Falvo II) +Date: Mon, 5 Apr 1999 12:38:05 -0700 +Subject: Doing the "right thing" with timezones on Linux (patch) +References: <19990329003313.A3517@quango.watervalley.net> <199903291915.OAA01148@eric.cnri.reston.va.us> <7dp9tm$hv2$1@towncrier.cc.monash.edu.au> +Message-ID: <3708a324@fermi.armored.net> +X-UID: 476 + +Jonathan Giddy wrote in message <7dp9tm$hv2$1 at towncrier.cc.monash.edu.au>... +>Guido van Rossum writes: +> +>I'm not sure whether it actually affects the code itself, but the comment +>#else /* !HAVE_TZNAME && !__GNU_LIBRARY__ */ +>is actually: +>#else /* !HAVE_TZNAME || __GNU_LIBRARY__ */ + + +Incorrect -- it should be: + +#else /* !( HAVE_TZNAME || __GNU_LIBRARY__ ) */ + +Note the order of operations. Unary ! has higher precedence than || in C. + +Just thought I'd mention this... :) + + + + + + + diff --git a/demo/ermis-f/python_m/cur/0477 b/demo/ermis-f/python_m/cur/0477 new file mode 100644 index 00000000..e7277d92 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0477 @@ -0,0 +1,26 @@ +From: phd at sun.med.ru (Oleg Broytmann) +Date: Tue, 20 Apr 1999 10:17:04 GMT +Subject: bzip2 module for Python +In-Reply-To: +References: +Message-ID: +X-UID: 477 + +Hello! + +On Tue, 20 Apr 1999, Laurence Tratt wrote: +> pyBZlib + + What is it? Sounds good! Where is it? + +> Laurie + +Oleg. +---- + Oleg Broytmann National Research Surgery Centre http://sun.med.ru/~phd/ + Programmers don't die, they just GOSUB without RETURN. + + + + + diff --git a/demo/ermis-f/python_m/cur/0478 b/demo/ermis-f/python_m/cur/0478 new file mode 100644 index 00000000..7accb3f3 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0478 @@ -0,0 +1,18 @@ +From: PTSex at PTSex.PTSex (PTSex) +Date: 8 Apr 1999 17:38:16 GMT +Subject: ENTER NOW...... GREAT AND 100% FREE LIVE SEX +Message-ID: <7eipi8$j6l$12101@duke.telepac.pt> +X-UID: 478 + +Looking for sex for the BEST 100% FREE SEX WORLD?? + +Go to: http://members.theglobe.com/esqueleto/index.htm + +Will find here the BESTLive Sex Shows...... DO YOU LIKE TO VIEW??? + +What are you wating for?????? +http://members.theglobe.com/esqueleto/index.htm + + + + diff --git a/demo/ermis-f/python_m/cur/0479 b/demo/ermis-f/python_m/cur/0479 new file mode 100644 index 00000000..6d2b34c6 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0479 @@ -0,0 +1,24 @@ +From: scothrell at austin.rr.com (Scott C) +Date: Fri, 09 Apr 1999 05:18:15 GMT +Subject: Python on Alpha NT...anyone? +References: <82gP2.685$87.74444@typhoon.austin.rr.com> +Message-ID: +X-UID: 479 + +Oh Fudge! Now I see that Guido has released 1.5.2c1...errrrr +Scott C wrote in message +news:82gP2.685$87.74444 at typhoon.austin.rr.com... +> I'm getting ready to compile Python on my Alpha processor NT box...in fact +> I've tried it and am "fixing bugs" as I go... Has anyone else done this? +> and are there "lessons" learned anywhere (re: porting). +> +> Scott Cothrell +> +> +> + + + + + + diff --git a/demo/ermis-f/python_m/cur/0480 b/demo/ermis-f/python_m/cur/0480 new file mode 100644 index 00000000..40bbc738 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0480 @@ -0,0 +1,39 @@ +From: pygmy at eskimo.com (Frank Sergeant) +Date: Tue, 20 Apr 1999 11:51:19 -0500 +Subject: interfacing to Dragon from a Python app +References: <000801be89dd$d407a0c0$ed9e2299@tim> +Message-ID: +Content-Length: 1050 +X-UID: 480 + +In article <000801be89dd$d407a0c0$ed9e2299 at tim>, +"Tim Peters" wrote: + +> FYI, people curious about speech recognition under Windows might want to +> give Microsoft's implementation a try; see the little-known +> +> http://www.microsoft.com/iit/ + +Thanks for the pointer. I browsed around the site for awhile. + +> This is not for the Windows-ignorant, weak-hearted, or slow-modem'ed , + +I couldn't quite bring myself to start the 21MB download. I'm still +pondering my approach to the whole Speech Recognition (SR) thing. I'm +gradually getting some hardware set up that might support it and +considering the Dragon Preferred product (around $135 somewhere on +the net) versus saving up for the Dragon developer's kit. Third in +line, I guess, is Microsoft's 21MB download. Although ... + +I'm also thinking of overall priorities -- in that that SR might +not be able to make a silk purse out of a sow's ear (then again, +a sow's ear may be better at SR than a silk purse). + + + -- Frank + frank.sergeant at pobox.com + + + + + diff --git a/demo/ermis-f/python_m/cur/0481 b/demo/ermis-f/python_m/cur/0481 new file mode 100644 index 00000000..491c8811 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0481 @@ -0,0 +1,79 @@ +From: fredrik at pythonware.com (Fredrik Lundh) +Date: Thu, 29 Apr 1999 15:30:51 GMT +Subject: Q on Tkinter Scrollbar +References: <370CFAC8.32EB0B29@ingr.com> <7g2g0f$km7$1@mlv.mit.edu> <3726C342.1DF7C6D6@ug.cs.usyd.edu.au> +Message-ID: <013201be9256$07c02bf0$f29b12c2@pythonware.com> +Content-Length: 1462 +X-UID: 481 + +Bradley Baetz wrote: +> Is it possible to find out the location of the top and bottom character +> of a tkinter text object currently showing? I want to be able to seardch +> for a tag on the currently viewable portion, but I can find out the +> start and end positions of the text. + +you can use the "@x,y" index syntax for this; the +start of the visible text is "@0,0", the end is "@x,y" +where x and y is the window size (or anything +larger, like "@10000,10000"). + +also see the attached example. + + + + +# +# tk053.py -- find visible region of a text widget +# +# fredrik lundh, may 1999 +# +# fredrik at pythonware.com +# http://www.pythonware.com +# + +from Tkinter import * + +root = Tk() + +# create a scrolled text widget + +frame = Frame(root, bd=2, relief=SUNKEN) + +scrollbar = Scrollbar(frame, orient=VERTICAL) +scrollbar.pack(fill=Y, side=RIGHT) + +text = Text(frame, bd=0) +text.pack() + +for i in range(1, 1000): + text.insert(END, "line %s\n" % i) + +# attach scrollbar +text.config(yscrollcommand=scrollbar.set) +scrollbar.config(command=text.yview) + +frame.pack() + +label = Label(root) +label.pack() + +def report_position(): + + # get (beginning of) first visible line + top = text.index("@0,0") + + # get (end of) last visible line + bottom = text.index("@0,%d" % text.winfo_height()) + + # update the label + label.config(text="top: %s\nbottom: %s" % (top, bottom)) + root.after(100, report_position) # update 10 times a second + +report_position() + +mainloop() + + + + + diff --git a/demo/ermis-f/python_m/cur/0482 b/demo/ermis-f/python_m/cur/0482 new file mode 100644 index 00000000..6d2c29dd --- /dev/null +++ b/demo/ermis-f/python_m/cur/0482 @@ -0,0 +1,43 @@ +From: trashcan at david-steuber.com (David Steuber) +Date: 26 Apr 1999 19:06:29 -0400 +Subject: Designing Large Systems with Python +Message-ID: +Content-Length: 1424 +X-UID: 482 + +Over my programming life, I have used a 'cowboy' programming style. +Once I have a general idea for a solution to a problem, I start +coding, using the text editor as sort of an etch-o-scetch. This works +fine for programs under about 10klocs (thousand lines of code), but it +is rather fragile and doesn't hold up to larger programs or the +requested additions of un-anticipated features. + +I've noticed the acedemic and industry attempts to solve the problem. +OOA/OOD, UML, design patterns, et al are all proposed solutions. + +Meanwhile, languages like Ansi Common Lisp have had features that +allow you to prototype and build a large system at the same time. +That is, the specification of the system becomes the system. People +have done the same thing with Visual Basic, so I am told. + +What I am wondering about is the suitability of Python for specifying, +a large system and building a prototype. I have gotten myself rather +entrenched in the cowboy style and I would love it if Python supported +that for larger systems. + +One other thing. Is the documentation that comes with Python +sufficient to gain mastery of the language, or should I consider +buying (yet) another book? + +-- +David Steuber +http://www.david-steuber.com + +If you wish to reply by mail, _please_ replace 'trashcan' with 'david' +in the e-mail address. The trashcan account really is a trashcan. + +A long memory is the most subversive idea in America. + + + + diff --git a/demo/ermis-f/python_m/cur/0483 b/demo/ermis-f/python_m/cur/0483 new file mode 100644 index 00000000..200a2edb --- /dev/null +++ b/demo/ermis-f/python_m/cur/0483 @@ -0,0 +1,33 @@ +From: da at ski.org (David Ascher) +Date: Wed, 28 Apr 1999 14:36:43 -0700 (Pacific Daylight Time) +Subject: Maximize Benefit when Purchasing Learning Python +In-Reply-To: <9FJV2.153$pX2.88806@news.shore.net> +Message-ID: +X-UID: 483 + +On Wed, 28 Apr 1999, Michael P. Reilly wrote: + +> David Ascher wrote: +> : On Wed, 28 Apr 1999 jkraai at murl.com wrote: +> +> :> How can I help whom when purchasing Python books? +> +> : I'll dare to speak for Mark, and say that you should feel free to send +> : either Mark or I (or both) checks for any amount whatsoever. Skip the +> : middleman. Save trees -- don't buy the book, just send us cash. Don't +> : hesitate for a minute. +> +> Better yet. Secure web credit-card transfers? Saves the paper from the +> envelopes and checks/bills. ;) + +If the amounts involved are enough to warrant the infrastructure costs, +I'll be glad to oblige. + +I somehow think I didn't make a huge commitment in that last sentence. + +--david + + + + + diff --git a/demo/ermis-f/python_m/cur/0484 b/demo/ermis-f/python_m/cur/0484 new file mode 100644 index 00000000..714da898 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0484 @@ -0,0 +1,51 @@ +From: davem at magnet.com (Dave Mitchell) +Date: Wed, 7 Apr 1999 15:27:26 GMT +Subject: povray.py +In-Reply-To: +References: +Message-ID: +Content-Length: 1427 +X-UID: 484 + + + +On 6 Apr 1999, David Steuber wrote: + +> mlh at idt.ntnu.no (Magnus L. Hetland) writes: +> +> -> "TM" writes: +> -> +> -> > Has anyone created a pov ray module for python? +> -> +> -> I have been thinking about it, but haven't done it yet... What do you +> -> think it should contain? +> +> This is a relatively off the cuff response. But I think such a module +> should provide python classes for the POV types. Then, instead of +> using the POV scene description language, you would use Python. You +> could algorithmicly create a scene or animation sequence. Then you +> would pass the data structure (a list or other sequence) to a Python +> function that renders it in POV scene description language for POV to +> digest and render. + + neat! does it have a documented API? I downloaded the source and +browsed it for a bit, and don't see any specific extension api.. if +there isnt one and you're not familiar with the code it would be tough +to deal with... Are there any similar bindings for other languages +that you could use for inspiration? + +> +> Another thing I would like to see is a module for generating RIB +> files. In fact, a Python RenderMan module would be quite nice, +> complete with shading language support. Anything out there like that? + + There is one of those, by Ture Palsson, I dont know how complete it +is, see http://www.lysator.liu.se/~ture/terry.html for info. + + -dave + + + + + + diff --git a/demo/ermis-f/python_m/cur/0485 b/demo/ermis-f/python_m/cur/0485 new file mode 100644 index 00000000..152840c7 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0485 @@ -0,0 +1,45 @@ +From: tismer at appliedbiometrics.com (Christian Tismer) +Date: Sat, 24 Apr 1999 15:36:54 +0200 +Subject: learning Python (rat book) +References: +Message-ID: <3721C8F6.610E9A7B@appliedbiometrics.com> +Content-Length: 1347 +X-UID: 485 + + +David Ascher wrote: +... +> > I'm currently working on the German translation. it will be +> > ready by end of July. I will try to adjust the index to mention +> > every person who plays a role in the book. +> +> Great -- make sure to check in with Mark and I about the fixes we make +> for the next printing, and let us know of the other bugs you find in the +> process. + +Sure I will. I also owe Mark a correction list for the +Pocket Reference. + +On extracting names: +I'm setting up a batch process which turns all the Framemaker +files into MIF files. Then I will run a Python script which +extracts every possible name, and checks it against my name +list. The name list is generated form my email archives which +have everything until Oct 1996, so I'm pretty sure I will +find everybody who mailed on some list, and I can use +the intersection with the extracted name candidates to amend +the index. :-) + +ciao - chris + +-- +Christian Tismer :^) +Applied Biometrics GmbH : Have a break! Take a ride on Python's +Kaiserin-Augusta-Allee 101 : *Starship* http://starship.python.net +10553 Berlin : PGP key -> http://wwwkeys.pgp.net +PGP Fingerprint E182 71C7 1A9D 66E9 9D15 D3CC D4D7 93E2 1FAE F6DF + we're tired of banana software - shipped green, ripens at home + + + + diff --git a/demo/ermis-f/python_m/cur/0486 b/demo/ermis-f/python_m/cur/0486 new file mode 100644 index 00000000..f5da6af3 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0486 @@ -0,0 +1,48 @@ +From: guido at eric.cnri.reston.va.us (Guido van Rossum) +Date: 26 Apr 1999 19:08:18 -0400 +Subject: webchecker on Windows +References: +Message-ID: <5logkbrndp.fsf@eric.cnri.reston.va.us> +Content-Length: 1328 +X-UID: 486 + +Des Barry writes: + +> I have just recently downloaded 1.5.2(final) and tried to use webchecker +> on a local file tree. +> +> I am unable to get it to work - as it did in 1.5.2b2 (with a patch +> applied to urllib) +> +> The arguments to webchecker that I use are: +> +> -x file:///D|/test1/test2/index.htm +> +> this does not find the file! +> +> -x file:/D|/test1/test2/index.htm +> +> this is able to read the file but not able to process any links +> contained in the file (all local links are internally created like +> file:xxx.htm) + +Unfortunately, you're right. I think that the change has to do with +the changes in urllib.py regarding when to use url2pathname() and +pathname2url() -- the new policy is much more useful, but webchecker +was counting on the old policy. (The policy change is that the url +argument to open(), open_file(), open_local_file() and the like must +always be in url format.) + +Below is a patch that I think makes it work, but it still requires +that you use forward slashes in the file: URL you give it. It +supports drive letters but only if you use the form "file:/D|/path"; +the form "file:///D|/path" doesn't seem to work due to the way +urlparse works. + +I hope someone else can continue the analysis from here... + +--Guido van Rossum (home page: http://www.python.org/~guido/) + + + + diff --git a/demo/ermis-f/python_m/cur/0487 b/demo/ermis-f/python_m/cur/0487 new file mode 100644 index 00000000..b3be20a6 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0487 @@ -0,0 +1,33 @@ +From: rhww at erols.com (R Wentworth) +Date: Tue, 20 Apr 1999 00:21:46 -0400 +Subject: Beginner Help - class problem or string copy semantics? +References: <7fg8a0$3ib$1@nnrp1.dejanews.com> +Message-ID: <371C00DA.895423A6@erols.com> +X-UID: 487 + + +cmedcoff at my-dejanews.com wrote: +> +> As will soon be apparent I am totally new to Python. In the code fragment +> below I expect to see the output "foobar", but I do not. Can anyone tell me +> why? +... +> class Test: +> _name = "" +> def __init__(self, name): +> _name = name +> def show(self): +> print self._name +> +> mytest = Test("foobar") +> mytest.show() + +The line "_name = name" should be "self._name = name". +Unlike C++, Python does not supply an implicit "this" or "self". +(Once you get used to it, this is actually a good thing.) +The "_name" you assigned to is simply a local variable within +the __init__() method; it vanishes as soon as the method ends. + + + + diff --git a/demo/ermis-f/python_m/cur/0488 b/demo/ermis-f/python_m/cur/0488 new file mode 100644 index 00000000..78460442 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0488 @@ -0,0 +1,48 @@ +From: jand at easics.be (Jan Decaluwe) +Date: Fri, 23 Apr 1999 12:52:19 +0200 +Subject: Running idle as a package +Message-ID: <372050E3.9D05CE8F@easics.be> +Content-Length: 1404 +X-UID: 488 + +I was trying to run idle as a package, so I turned the idle +directory into a python package. But then I got: + + Python 1.5.2 (#2, Apr 21 1999, 17:14:19) [GCC 2.8.1] on sunos5 + Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam + >>> from idle import idle + Failed to load extension 'SearchBinding' + Traceback (innermost last): + File "/usr/local/lib/python1.5/site-packages/idle/EditorWindow.py", line 470, in +load_standard_extensions + self.load_extension(name) + File "/usr/local/lib/python1.5/site-packages/idle/EditorWindow.py", line 481, in load_extension + mod = __import__(name) + ImportError: No module named SearchBinding + ... + +Apparently the problem is caused by the call to __import__, +that is not aware of the intra-package shortcut. + +I have been able to solve this for my case as follows: + + diff -r1.1 EditorWindow.py + 481c481,482 + < mod = __import__(name) + --- + > pck = __import__('idle.' + name) + > mod = getattr(pck, name) + +Regards, Jan + +-- +=================================================================== +Jan Decaluwe === Easics === +Design Manager === VHDL-based ASIC design services === +Tel: +32-16-395 600 =================================== +Fax: +32-16-395 619 Interleuvenlaan 86, B-3001 Leuven, BELGIUM +mailto:jand at easics.be http://www.easics.com + + + + diff --git a/demo/ermis-f/python_m/cur/0489 b/demo/ermis-f/python_m/cur/0489 new file mode 100644 index 00000000..0bb9817c --- /dev/null +++ b/demo/ermis-f/python_m/cur/0489 @@ -0,0 +1,40 @@ +From: fredrik at pythonware.com (Fredrik Lundh) +Date: Thu, 22 Apr 1999 12:19:54 GMT +Subject: Directory of current file +References: <371F0BD2.7D40A957@rubic.com> +Message-ID: <00ee01be8cba$6e98dcb0$f29b12c2@pythonware.com> +X-UID: 489 + +Jeff Bauer wrote: +> David Ascher wrote: +> > Tip: To find out the directory of the currently executing program, use: +> > +> > import sys, os +> > if __name__ == '__main__': +> > _thisDir = '' +> > else: +> > _thisDir = os.path.split(sys.modules[__name__].__file__)[0] +> +> David, what are the advantages over this? +> +> _thisDir = os.path.split(sys.argv[0])[0] + +as far as I can tell, David's method works for everything +*except* the main module, while your method works for +the main module, but not for anything else... + +how about a combination? + +import sys, os +if __name__ == '__main__': + _thisDir = sys.argv[0] +else: + _thisDir = sys.modules[__name__].__file__ +_thisDir = os.path.split(_thisDir)[0] + + + + + + + diff --git a/demo/ermis-f/python_m/cur/0490 b/demo/ermis-f/python_m/cur/0490 new file mode 100644 index 00000000..c274827b --- /dev/null +++ b/demo/ermis-f/python_m/cur/0490 @@ -0,0 +1,64 @@ +From: ivanlan at callware.com (Ivan Van Laningham) +Date: Thu, 15 Apr 1999 18:53:36 GMT +Subject: [Crew] squid +References: <7DB1CEC958A9D1119E5200A0C999411612AC6C@TAL_ENT> +Message-ID: <371635B0.1362E7B1@callware.com> +Content-Length: 1730 +X-UID: 490 + +If you take it off the list put me on the cc: !!! Thanks! + + +-ly y'rs, +Ivan;-0 + +Tom Funk wrote: +> +> >> [having windows] Puts me in a mischievous mood. +> +> +> +> You had me going. You'd think it was April 1st, not Tax Day. +> +> Consider yourself blessed -- you have windows, fresh air, etc. I work in a +> basement-like environment. I have a potted plant and a calendar with _pix_ +> of the outdoors. Not quite the same. +> +> >> I actually love it ! I grew up on it. (it has to be +> >> fresh and properly cooked). +> +> This seems to be a recurring theme. +> +> >> PS if you get the chance try them cooked in wine and olive oil. +> +> Pavlos, please send more info. *This* sounds very interesting. A buddy of +> mine has "Guest Chef" days at his home. Wine-and-olive-oil Calimari (or is +> it Calamari?) might be interesting to bring. Plus, there's a very nice +> fresh seafood store nearby where I can (probably) get fresh squid. Is there +> more to this recipe? Some garlic perhaps, some white pepper maybe? +> "Enquiring" minds want to know. +> +> (Should we take the crew out of the loop on this thread since this is *way* +> off-topic for this list -- unless we plan on discussing wine-and-olive-oil +> snake strips? ) +> +> -=< tom >=- +> +> _______________________________________________ +> Crew maillist - Crew at starship.python.net +> http://starship.python.net/mailman/listinfo/crew + +-- +---------------------------------------------- +Ivan Van Laningham +Callware Technologies, Inc. +ivanlan at callware.com +http://www.pauahtun.org +See also: +http://www.foretec.com/python/workshops/1998-11/proceedings.html +Army Signal Corps: Cu Chi, Class of '70 +---------------------------------------------- + + + + diff --git a/demo/ermis-f/python_m/cur/0491 b/demo/ermis-f/python_m/cur/0491 new file mode 100644 index 00000000..74b8ee27 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0491 @@ -0,0 +1,41 @@ +From: petrilli at trump.amber.org (Christopher Petrilli) +Date: 28 Apr 1999 21:39:00 PDT +Subject: Emacs' python-mode buggy? +References: <000401be91d0$5faab280$199e2299@tim> +Message-ID: <7g8np4$kvf@chronicle.concentric.net> +Content-Length: 1338 +X-UID: 491 + +Tim Peters wrote: +> [Markus Stenberg] +>> At least by my experiences the Emacs mode (at least, two versions I +>> tried, 3.75 and whatever came with Python 1.5.2) seems to have tons of +>> bugs; + +> Yes, that would be entirely Barry Warsaw's fault -- pymode had no bugs when +> I worked on it, and Barry is a known drug addict. Well, all right, I was +> the drug addict, and I lied about Barry -- but I'm sure it's still all his +> fault . + +Barry's a musician, 'nuff said. :-) But he likes Indian food, so he must +be Dutch... do those cancel out? :-) + +>> to be more precise, it seems to think a lot more of my code than should +>> be is string (and therefore is green and indentation doesn't work). + +> Offhand, that sounds like one bug. Try posting a minimal failing example? +> Amorphous griping doesn't help. If you searched DejaNews before posting, +> you may have noticed that reports of pymode bugs are conspicuous by absence. + +WEll, I have noticed some problems with tripple-quoted strings on occasion, +but I see similar problems in other modes, so I THINK it's something to do +with how (x)emacs applie the font-lock-mode parameters. + +Chris +-- +| Christopher Petrilli ``Television is bubble-gum for +| petrilli at amber.org the mind.''-Frank Lloyd Wright + + + + diff --git a/demo/ermis-f/python_m/cur/0492 b/demo/ermis-f/python_m/cur/0492 new file mode 100644 index 00000000..0515e6a3 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0492 @@ -0,0 +1,35 @@ +From: nascheme at m67.enme.ucalgary.ca (Neil Schemenauer) +Date: 14 Apr 1999 23:00:22 GMT +Subject: reval builtin +References: <19990331160323.21601.00000471@ng-fi1.aol.com> <7du3ab$3ag@chronicle.concentric.net> <371219E9.9EA91839@home.com> +Message-ID: <7f36m6$koq@ds2.acs.ucalgary.ca> +X-UID: 492 + +On Mon, 12 Apr 1999 15:59:05 GMT, Jim Meier wrote: +>This introduces some major security problems, and is a little difficult +>to edit, but there is very little parsing needed to make it usable. Does +>anyone know of a way to limit the damage a user can do to such a file? + +It would be nice to have an "reval" builtin that would only evaluate +literals. That would make building things like config files safe and +easy. I have two ideas on how to accomplish this: + + 1. Create a new start symbol "reval_input" in the Grammar/Grammar + and add a "builtin_reval" function in Python/bltinmodule.c. Sound + easy? Well, the connection between these two changes is long and + twisted. + + 2. Use something like lex and yacc to create an extension module + that does the Right Thing(TM). I think the problem with this + approach is making it conform to the real Python grammar. If I + get time I will try it. + +Perhaps some guru can explain an easy way to accomplish this and same me +some time. + + + Neil + + + + diff --git a/demo/ermis-f/python_m/cur/0493 b/demo/ermis-f/python_m/cur/0493 new file mode 100644 index 00000000..66cbf0a5 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0493 @@ -0,0 +1,41 @@ +From: schorsch at schorsch.com (Georg Mischler) +Date: Thu, 15 Apr 1999 09:39:05 GMT +Subject: what do you do with Python +References: <3714C9EA.86C0A4E@earthlink.net> +Message-ID: <7f4c3o$3ur$1@nnrp1.dejanews.com> +Content-Length: 1168 +X-UID: 493 + +susan e paolini wrote: +> I never see jobs with Python advertised so what is it that Python does? +> Thanks for the advice + +I am writing a user interface and project management application based +on one of the most advanced physically based lighting simulation +toolkits available. This is a commercial project, and will probably +end up with more than 20 kloc of python. +In any other language that could decently solve the task, this would +result in about five times as much code, which would mean that I'd +have to hire one or two programmers to help me. Since I can't afford +that, the project would have simply died without python. + +You will often find similar situations, where one python programmer +can eliminate several job offers for other language programmers. +Somehow, python is slowing down it's own growth through its key +strength here... + + +Have fun! + +-schorsch + +-- +Georg Mischler -- simulation developper -- schorsch at schorsch.com ++schorsch.com+ -- lighting design tools -- http://www.schorsch.com/ + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/0494 b/demo/ermis-f/python_m/cur/0494 new file mode 100644 index 00000000..f764e3d9 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0494 @@ -0,0 +1,35 @@ +From: guido at eric.cnri.reston.va.us (Guido van Rossum) +Date: 29 Apr 1999 09:02:55 -0400 +Subject: IDLE Problem +References: <37277952.3551E595@connection.com> +Message-ID: <5l676fbmv4.fsf@eric.cnri.reston.va.us> +X-UID: 494 + +"Colin J. Williams" writes: + +> a= 99 +> print 'UGH' +> a= 101 +> +> When one steps through this code, the print statement hangs +> the Windows. +> +> This happens when one Steps Over the command or when one +> Steps and the Steps Out. + +Colin, can you give more information over what exactly you have tried? +I presume this is not the complete code you are debugging (if only +because when you enter this in the Python Shell window, it would be +three separate unrelated statements). + +One thing you may not realize is that the print statement gets +redirected by code inside IDLE that displays the text in the Python +Shell window. Stepping through this code in the debugger takes some +time, even if you use 'Out'. Perhaps you need to have a little more +patience? + +--Guido van Rossum (home page: http://www.python.org/~guido/) + + + + diff --git a/demo/ermis-f/python_m/cur/0495 b/demo/ermis-f/python_m/cur/0495 new file mode 100644 index 00000000..bf123393 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0495 @@ -0,0 +1,76 @@ +From: sweeting at neuronet.com.my (sweeting at neuronet.com.my) +Date: Sat, 10 Apr 1999 17:51:07 GMT +Subject: Search Engines, Chinese and Python. +Message-ID: <7eo32a$tbr$1@nnrp1.dejanews.com> +Content-Length: 2504 +X-UID: 495 + +The "how do you build a search engine in Python ?" question has been +asked and answered enough times so I'll spare you all the agony. Given +the choice, I'd use Ultraseek*, WAIS or something rather than rebuild +this again myself; but I need this to work in Chinese. Forseeing a +great demand for this (for myself and in general) and failing to find a +decent ready-made solution, I figured that I may as well have a stab at +it. (If all else fails, at least I may improve my Mandarin). + +Snipping from a thread last December : + +[snip] +>Richard Jones wrote: +>: The short answer is "you don't". +> +The big answer might be (this not a Gadlfy answer, but hey): + +(This uses indexing on item submission to speed fetching.) + +A pair of (g)dm's. One that stores your entries under some unique per +item id. + +Churn through each new item looking for words. "Stop and stem" this +list (ie. kill "and" "at" "the", standardise case, collapse "runner", +"running" -> "run" or whatever. Can be tricky :-) You can automate +the stop-list just by counting word occurences) +The HTML parser and rfc822 et all could also be used to pull out +details for searches like "url:www.host.com". + +The second file holds a relation between words and the documents that +contain them. ie. an inverted list. + +Query comes in: search for "python programming": + list1 = db2["python"] + list2 = db2["programming"] + +The intersection of the list are the documents that contain both +words. As things get big, you may need to overload the getitem +to return a smaller list and store things like the number times +the word appears in an item (you can then sort the inverted lists +on this attribute). + +Hope this helps. + +(Start small!) +-- James Preston, waiting for Godot. +[/snip] + +Is it really as easy as that ? + +It seems that the real work is in the indexing and this is going to be +even more of a chore with Chinese because words aren't separated by +spaces - so we'll also have to build a parsing engine to work that out :( + +If anybody has worked with Chinese text and has any caveats with regards the +above project or programming double-byte characters in general, I'm all ears.. +I'm still struggling with getting my servers/scripts to write Chinese to +the screen of Chinese-Windows machines let alone programming this into a +database. + +Thank you very much, + +chas + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/0496 b/demo/ermis-f/python_m/cur/0496 new file mode 100644 index 00000000..71172e82 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0496 @@ -0,0 +1,45 @@ +From: mal at lemburg.com (M.-A. Lemburg) +Date: Thu, 8 Apr 1999 19:26:52 GMT +Subject: OpenSSL/X.509 +References: <7e1hiq$a71$1@Starbase.NeoSoft.COM> + <7ear25$ksf$1@news-sj-3.cisco.com> + <14089.11820.416453.80124@bitdiddle.cnri.reston.va.us> + <3709C8BE.4257C9F1@lemburg.com> + <14090.16807.950025.496495@bitdiddle.cnri.reston.va.us> + <370A78B6.2C18D10F@lockstar.com> + <370BE48E.2BA9750C@lemburg.com> <14092.42263.897530.425040@amarok.cnri.reston.va.us> +Message-ID: <370D02FC.5FA7D302@lemburg.com> +Content-Length: 1095 +X-UID: 496 + +Andrew M. Kuchling wrote: +> +> M.-A. Lemburg writes: +> >Sure, but if your company is US based, then chances are high +> >you won't be able to share the code outside the US... that's +> >why I started mxCrypto, BTW. +> +> Note that Pat Knight has a UK-based project to SWIG SSLeay; +> could you work using that as a base? http://www.ktgroup.co.uk/~pat/ + +I've looked at that code before I started off into mxCrypto. Pat's +approach uses pointers in the internal OpenSSL's data structure +as basis for doing the wrapping. Unfortunately, those pointers +seem to not work properly anymore in more recent versions of OpenSSL. + +Also, he swigged the BIO and SSL parts in OpenSSL, mxCrypto takes +care of most of the crypto routines. X.509 and ASN.1 are not +handled in Pat's version. + +Thanks for the tip anyway :-) + +-- +Marc-Andre Lemburg Y2000: 267 days left +--------------------------------------------------------------------- + : Python Pages >>> http://starship.skyport.net/~lemburg/ : + --------------------------------------------------------- + + + + + diff --git a/demo/ermis-f/python_m/cur/0497 b/demo/ermis-f/python_m/cur/0497 new file mode 100644 index 00000000..ab4240d0 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0497 @@ -0,0 +1,22 @@ +From: gemodek at t-online.de (gemodek) +Date: Sat, 24 Apr 1999 19:34:49 +0200 +Subject: MS Access under Linux +Message-ID: <372200B9.102E20E1@t-online.de> +X-UID: 497 + +Hi, + +I want to rund a Linux fileserver. On this fileserver, Win95 +Clients will put their Access97 *.mdb databases. + +Now I would like to analyse these *.mdb databases with Python under +Linux (for creating web reports). + +Does somebody know a module which can this?? +thanks + + Stephan + + + + diff --git a/demo/ermis-f/python_m/cur/0498 b/demo/ermis-f/python_m/cur/0498 new file mode 100644 index 00000000..714823e2 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0498 @@ -0,0 +1,29 @@ +From: tim_one at email.msn.com (Tim Peters) +Date: Sat, 24 Apr 1999 02:31:01 -0400 +Subject: Time complexity of dictionary insertions +In-Reply-To: <8DB21A313Me@news.rdc1.ct.home.com> +Message-ID: <000c01be8e1c$05a9dfc0$f09e2299@tim> +X-UID: 498 + +> This attempt at one-ups-man-ship would be a lot cuter if the STL had any +> kind of hashed containers, associative or otherwise, whose performance +> could be quoted! +> +> ... +> +> Argumentatively y'rs - dan. + +I specifically had in mind + + http://www.sgi.com/Technology/STL/HashedAssociativeContainer.html + +and its derivatives. I understand that this goes beyond the officially +blessed C++ STL, even to the point of being useful <0.9 wink>. + +no-guts-no-glory-ly y'rs - tim + + + + + + diff --git a/demo/ermis-f/python_m/cur/0499 b/demo/ermis-f/python_m/cur/0499 new file mode 100644 index 00000000..7af3f3d0 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0499 @@ -0,0 +1,31 @@ +From: gmcm at hypernet.com (Gordon McMillan) +Date: Wed, 7 Apr 1999 02:51:56 GMT +Subject: Writing lines longer than 80 charc ! +In-Reply-To: +References: +Message-ID: <1288668783-75154173@hypernet.com> +X-UID: 499 + +Sunit asks: + +> I'm wondering if someone knew of a way of writing a line of more +> than 80 characters to a file in way that it won't split it into two +> lines. + +That's an artifact of the way you're viewing it. None of the ways of +writing characters to a file do anything special at 80 characters. + +>>> open('test.txt','w').write('a'*1024) +>>> txt = open('test.txt', 'r').read() +>>> len(txt) +1024 +>>> txt == 'a'*1024 +1 + +See? Nothing but 'a's. + +- Gordon + + + + diff --git a/demo/ermis-f/python_m/cur/0500 b/demo/ermis-f/python_m/cur/0500 new file mode 100644 index 00000000..60bb1877 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0500 @@ -0,0 +1,98 @@ +From: sweeting at neuronet.com.my (sweeting at neuronet.com.my) +Date: Sun, 11 Apr 1999 05:03:50 GMT +Subject: Search Engines, Chinese and Python. +References: <7eo32a$tbr$1@nnrp1.dejanews.com> +Message-ID: <7epafj$qlg$1@nnrp1.dejanews.com> +Content-Length: 3475 +X-UID: 500 + +I have a sneaky feeling that somebody on the Python list first mentioned +this URL a couple of years back but I've just rediscovered the great +resource on CJK processing (I knew I bookmarked it for a reason) : + +http://www.ora.com/people/authors/lunde/cjk_inf.html + +so I answer the second half of my own question. +Now if maybe the Infoseek guys are interested in porting their +engine to the most widely-spoken language in the world ;-) + +chas + +*just as an aside, it was due to Infoseek that I first looked at Python; + always thought it was the best search engine, read that they used Python just + as I was despairing with another P-language... haven't looked back since. :) + + sweeting at neuronet.com.my wrote: +> The "how do you build a search engine in Python ?" question has been +> asked and answered enough times so I'll spare you all the agony. Given +> the choice, I'd use Ultraseek*, WAIS or something rather than rebuild +> this again myself; but I need this to work in Chinese. Forseeing a +> great demand for this (for myself and in general) and failing to find a +> decent ready-made solution, I figured that I may as well have a stab at +> it. (If all else fails, at least I may improve my Mandarin). +> +> Snipping from a thread last December : +> +> [snip] +> >Richard Jones wrote: +> >: The short answer is "you don't". +> > +> The big answer might be (this not a Gadlfy answer, but hey): +> +> (This uses indexing on item submission to speed fetching.) +> +> A pair of (g)dm's. One that stores your entries under some unique per +> item id. +> +> Churn through each new item looking for words. "Stop and stem" this +> list (ie. kill "and" "at" "the", standardise case, collapse "runner", +> "running" -> "run" or whatever. Can be tricky :-) You can automate +> the stop-list just by counting word occurences) +> The HTML parser and rfc822 et all could also be used to pull out +> details for searches like "url:www.host.com". +> +> The second file holds a relation between words and the documents that +> contain them. ie. an inverted list. +> +> Query comes in: search for "python programming": +> list1 = db2["python"] +> list2 = db2["programming"] +> +> The intersection of the list are the documents that contain both +> words. As things get big, you may need to overload the getitem +> to return a smaller list and store things like the number times +> the word appears in an item (you can then sort the inverted lists +> on this attribute). +> +> Hope this helps. +> +> (Start small!) +> -- James Preston, waiting for Godot. +> [/snip] +> +> Is it really as easy as that ? +> +> It seems that the real work is in the indexing and this is going to be +> even more of a chore with Chinese because words aren't separated by +> spaces - so we'll also have to build a parsing engine to work that out :( +> +> If anybody has worked with Chinese text and has any caveats with regards the +> above project or programming double-byte characters in general, I'm all ears.. +> I'm still struggling with getting my servers/scripts to write Chinese to +> the screen of Chinese-Windows machines let alone programming this into a +> database. +> +> Thank you very much, +> +> chas +> +> -----------== Posted via Deja News, The Discussion Network ==---------- +> http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own +> + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/0501 b/demo/ermis-f/python_m/cur/0501 new file mode 100644 index 00000000..38643bd1 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0501 @@ -0,0 +1,44 @@ +From: bernhard at alpha1.csd.uwm.edu (Bernhard Reiter) +Date: 17 Apr 1999 04:57:37 GMT +Subject: Quick fix to add "+=" +References: <3717AB14.2926AF76@mediaone.net> <3717EE20.41343593@mediaone.net> +Message-ID: +Content-Length: 1241 +X-UID: 501 + +Your editor is your friend: + +Just use a macro in your favorite editor, which grabs the left +word of the curser postion and expands it into + =+ +Trigger the macro with "+=" and you type excactly what you +always type, just the result is more python like. + +For vim, the following does the trick (without the special word matching caps +new vim versions provide. the ":noh is for people using hlsearch in +vim 5.x version.) + + +:map!^[:s/\([a-zA-Z_][a-zA-Z0-9_]*\)$/\1=\1+/^M:noh^MA + + Bernhard + + +On Fri, 16 Apr 1999 22:12:48 -0400, Fuming Wang wrote: +>I have searched dejanews. They don't like the "+=" characters. Could you +>be more specific about how to modify the interpreter? I desperate +>here.:) + +>Blake Winton wrote: +>> On Fri, 16 Apr 1999 17:26:44 -0400, Fuming Wang wrote: +>> >Any one knows a quick fix to add "+=" function. I am really getting +>> >tired of typing long names twice. +>> +>> += has been left out of the language for a good reason, and thus it's +>> probably not likely that there's an easy way to add it. I think you +>> will have to recompile the interpreter to get it to do what you want, +>> and even then, I don't think that you really want what it would do. + + + + diff --git a/demo/ermis-f/python_m/cur/0502 b/demo/ermis-f/python_m/cur/0502 new file mode 100644 index 00000000..80509f37 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0502 @@ -0,0 +1,55 @@ +From: steffen at cyberus.ca (Steffen Ries) +Date: 26 Apr 1999 07:59:50 -0400 +Subject: timeout on urllib.urlopen? +References: <7g0r7c$gn9$1@nnrp1.dejanews.com> <19990426061959.A18551@toast.internal> +Message-ID: +Content-Length: 1209 +X-UID: 502 + +jam writes: + +> On Mon, Apr 26, 1999 at 04:48:44AM +0000, Kevin L wrote: +> > +> > I'm trying to use urllib.urlopen() on a big list of urls, some of which are +> > dead (they don't return a 404, just no response). And the function just waits. +> > Is there any way to specify a timeout period for this function? thanks, + +.... +> attached, please find a short lightly tested module that might do what you +> are looking for.. please let me know if this is what you need. it's a piece +> of code I wrote for a larger application, and it seems to get the job done +> nicely. suggestions for optimizations, etc, accepted. + +I used once SIGALRM to force a timeout. Maybe somebody could comment +on that approach? + + +/steffen + +--8<----8<----8<----8<-- +import signal + +def alarmHandler(*args): + """ + signal handler for SIGALRM, just raise an exception + """ + raise "TimeOut" + +.... + signal.signal(signal.SIGALRM, alarmHandler) + try: + # set timeout + signal.alarm(120) + + #... urllib.urlretrieve pages + + except "TimeOut": + # some error handling + signal.alarm(0) +--8<----8<----8<----8<-- +-- +steffen at cyberus.ca <> Gravity is a myth -- the Earth sucks! + + + + diff --git a/demo/ermis-f/python_m/cur/0503 b/demo/ermis-f/python_m/cur/0503 new file mode 100644 index 00000000..eb91a2e1 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0503 @@ -0,0 +1,19 @@ +From: greg.ewing at compaq.com (Greg Ewing) +Date: Thu, 08 Apr 1999 10:03:54 +1200 +Subject: Select weirdness on Solaris 2.4 +References: <199903301125.GAA23793@python.org> <199903301418.JAA03146@eric.cnri.reston.va.us> <7dr952$1s2$1@nnrp1.dejanews.com> +Message-ID: <370BD64A.84E29479@compaq.com> +X-UID: 503 + +Georg Mischler wrote: +> +> Balk means: list two handle_writes and a socket.error: "socket +> not connected". + +When select returns true for an operation, it doesn't +necessarily mean that the operation will succeed - +only that the call won't block. + + + + diff --git a/demo/ermis-f/python_m/cur/0504 b/demo/ermis-f/python_m/cur/0504 new file mode 100644 index 00000000..949ece7c --- /dev/null +++ b/demo/ermis-f/python_m/cur/0504 @@ -0,0 +1,43 @@ +From: bill_seitz at my-dejanews.com (bill_seitz at my-dejanews.com) +Date: Wed, 14 Apr 1999 18:45:22 GMT +Subject: stupid Win-CGI getting started question +References: <7f0f0h$pfb$1@nnrp1.dejanews.com> <8DA86302Bduncanrcpcouk@news.rmplc.co.uk> +Message-ID: <7f2no0$n80$1@nnrp1.dejanews.com> +Content-Length: 1502 +X-UID: 504 + +In article <8DA86302Bduncanrcpcouk at news.rmplc.co.uk>, + Duncan Booth wrote: +> seitz at mail.medscape.com wrote in <7f0f0h$pfb$1 at nnrp1.dejanews.com>: +> +> >Installed the basic Python stuff. I can run the interpreter. But not clear on +> >getting it configured properly to talk CGI with my WinNT Netscape Enterprise +> >server. I set a CGI folder path properly, but I get a nasty error message. +> >But it's not a file-not-found, so I know it's finding the .py file. So I'm +> >guessing it's not finding the executable. + +> I tried all sorts of configuration changes to get it to run .py files +directly, +> and eventually gave it up as a bad job (mostly because I didn't want to risk +> breaking the server). +> +> The way I get CGI scripts to run with Netscape Enterprise server on NT is to +> put them in .cmd files instead of .py files. + +So nobody can run .py files as CGI? + +Is this a known problem? What's its scope? Only Netscape/NT? What about IIS? +What about Netscape/Solaris? + +I'm trying to keep my code generic enough that it can be moved to other +platforms/servers down the road (which is why I haven't been looking at nsapy +or Medusa or ZopeHTTP...), so I don't want to work around a problem now and +just have it hit me again later. I'd like to understand the nature of the +problem enough to evaluate alternative solutions. + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/0505 b/demo/ermis-f/python_m/cur/0505 new file mode 100644 index 00000000..30a17a2a --- /dev/null +++ b/demo/ermis-f/python_m/cur/0505 @@ -0,0 +1,38 @@ +From: Friedrich.Dominicus at inka.de (Friedrich Dominicus) +Date: Fri, 30 Apr 1999 19:26:37 +0200 +Subject: Python IS slow ! [was] Re: Python too slow for real world +References: <613145F79272D211914B0020AFF6401914DAD8@gandalf.digicool.com> +Message-ID: <3729E7CD.6D42AD0B@inka.de> +X-UID: 505 + +Markus Kohler wrote: +> +> >>>>> "Mitchell" == Mitchell Morris writes: +> +> [deletia] +> +> Mitchell> If it's not too much trouble, could you post your +> Mitchell> benchmark code and results, either here or on a web +> Mitchell> page? +> +> Of course I only did useless microbenchmarks ;-) + +If you have some of them please send me a copy and allow me to add them +too: + +http://edt.vol.cz:81/bench/ + +I like to collect more and more of them to get more values to get it +more fair. +Of course I'll write them in other languages too for comparison. If you +do such a test would you be so kind to document how long the development +took and how much bugs you have to fix? This is IMO another important +point to judge when a language is appropriate and when not. + + +Regards +Friedrich + + + + diff --git a/demo/ermis-f/python_m/cur/0506 b/demo/ermis-f/python_m/cur/0506 new file mode 100644 index 00000000..350f5aca --- /dev/null +++ b/demo/ermis-f/python_m/cur/0506 @@ -0,0 +1,65 @@ +From: cgw at fnal.gov (Charles G Waldman) +Date: Tue, 20 Apr 1999 19:06:36 GMT +Subject: Bit Arrays +In-Reply-To: <7fi9i8$n2u$1@info3.fnal.gov> +References: <7fi9i8$n2u$1@info3.fnal.gov> +Message-ID: <14108.53308.746874.201296@buffalo.fnal.gov> +Content-Length: 1668 +X-UID: 506 + +Laura Paterno writes: + > Hello all, + > + > I want to write a python program that has 26 Bit Arrays that each contain + > 1113 bits. Is there a structure in python that one can use to represent a + > bit array? + > + +Hi Laura. + +If memory efficiency is not an issue you could just use a string (or +list of strings). If you really need to pack bits, then this takes a +bit more work. You could use an array object (either from the +built-in array class or the fancy Array object from the Numeric +extension) and do the bit-slicing yourself in Python, something like +this (you could put in more type-checking, etc.) + +import array +import exceptions + +class MyObject: + def __init__(self): + self.data = [] + for i in range(26): + self.data.append(array.array(140,'b')) + + def __setitem__(self, key, value): + if len(key)!=2: + raise exceptions.ValueError, "expected two indices" + if value not in (0,1): + raise exceptions.ValueError, "value must be 0 or 1" + if key[0]>25 or key[0]<0: + raise exceptions.ValueError, "index out of range"%key[0] + if key[1]>139 or key[1]<0: + raise exceptions.ValueError, "index out of range" + arr = self.data[key[0]] + offset, bit = divmod(key[1],8) + arr[offset] = arr[offset] | 1< +Content-Length: 2859 +X-UID: 507 + +Hi All, + +first off all: Sorry for that slightly provoking subject ;-) ... + +I just switched from perl to python because I think python makes live +easyer in bigger software projects. However I found out that perl is +more then 10 times faster then python in solving the following probelm: + +I've got a file (130 MB) with ~ 300000 datasets of the form: + +>px0034 hypothetical protein or whatever description +LSADQISTVQASFDKVKGDPVGILYAVFKADPSIMAKFTQFAGKDLESIKGTAPFETHAN +RIVGFFSKIIGELPNIEADVNTFVASHKPRGVTHDQLNNFRAGFVSYMKAHTDFAGAEAA +WGATLDTFFGMIFSKM + +The word floowing the '>' is an identifier, the uppercase letters in the +lines following the identifier are the data. Now I want to read and +write the contens of that file excluding some entries (given by a +dictionary with identifiers, e.g. 'px0034'). + +The following python code does the job: + +from re import * +from sys import * + +def read_write(i, o, exclude): + name = compile('^>(\S+)') # regex to fetch the identifier + l = i.readline() + while l: + if l[0] == '>': # are we in new dataset? + m = name.search(l) + if m and exclude.has_key(m.group(1)): # excluding current +dataset? + l = i.readline() + while l and l[0] != '>': # skip this dataset + l = i.readline() + pass + o.write(l) + l = i.readline() + +f = open('my_very_big_data_file','r') # datafile with ~300000 records +read_write(f, stdout, {}) # for a simple test I don't exclude anything! + +It took 503.90 sec on a SGI Power Challange (R10000 CPU). An appropiate +perl script does the same job in 32 sec (Same method, same loop +structure)! + +Since I've to call this routine about 1500 times it's a very big +difference in time and not realy accaptable. + +I'd realy like to know why python is so slow (or perl is so fast?) and +what I can do to improove speed of that routine. + +I don't want to switch back to perl - but honestly, is python the right +language to process souch huge amount of data? + +If you want to generate a test set you could use the following lines to +print 10000 datasets to stdout: + +for i in xrange(1, 10001): + print +'>px%05d\nLSADQISTVQASFDKVKGDPVGILYAVFKADPSIMAKFTQFAGKDLESIKGTAPFETHAN\n\ +RIVGFFSKIIGELPNIEADVNTFVASHKPRGVTHDQLNNFRAGFVSYMKAHTDFAGAEAA\n\ +WGATLDTFFGMIFSKM\n' % i + +And if you don't believe me that perl does the job quicker you can try +the perl code below: + +#!/usr/local/bin/perl -w +open(IN,"test.dat"); +my %ex = (); +read_write(%ex); + +sub read_write{ + + $l = ; + OUTER: while( defined $l ){ + if( (($x) = $l =~ /^>(\S+)/) ){ + if( exists $ex{$x} ){ + $l = ; + while( defined $l && !($l =~ /^>(\S+)/) ){ + $l = ; + } + next OUTER; + } + } + print $l; + $l = ; + } +} + +Please do convince me being a python programmer does not mean being slow +;-) + + Thanks very much for any help, + + Arne + + + + diff --git a/demo/ermis-f/python_m/cur/0508 b/demo/ermis-f/python_m/cur/0508 new file mode 100644 index 00000000..e4c8b3fb --- /dev/null +++ b/demo/ermis-f/python_m/cur/0508 @@ -0,0 +1,61 @@ +From: tim_one at email.msn.com (Tim Peters) +Date: Fri, 9 Apr 1999 06:43:31 GMT +Subject: Chaning instance methods +In-Reply-To: <370CC27E.ED2D0D59@inrialpes.fr> +References: <370CC27E.ED2D0D59@inrialpes.fr> +Message-ID: <000f01be8254$489a7b60$14a02299@tim> +Content-Length: 1585 +X-UID: 508 + +[Tim] +> When I signed my exposition of instance-method trickery "subclassing-is- +> a-lot-easier-ly y'rs", I had exactly this in mind: +> +> class Bar(Foo): +> def m(self): +> print "m2" +> +> f = Bar() + +[Vladimir Marangozov] +> Careful! + +I usually am . + +> We'll eventually see what you had exactly in mind if you change the +> last line from +> +> (1) f = Bar() +> +> to +> +> (2) f.__class__ = Bar + +Nope, I didn't have that in mind at all. Turns out (to judge from his +followup) that this is what *Jody* had in mind, but not me. Most people who +have asked this question over the years really could have done just fine +using vanilla inheritance from the start, perhaps augmented by a factory +function to choose the object's class with more care. + +> While (1) resets f's internal state and makes a brand new instance, +> (2) preserves that state (which reflects f's past existence as an +> instance of Foo) by changing only its interface to that of Bar +> "on the fly". The difference is quite fundamental. + +Fundamental is too weak a word, but I know what you mean . Changing +an object's class after-the-fact is not an approach I'd recommend to anyone. +That doesn't mean I don't approve of it , it's just that people far +too often start playing absurd tricks with Python's highly dynamic features +when straightforward methods work fine. + +> We all knew that you meant (2) in your sig, but making it slightly +> more explicit does not hurt :-) + +the-things-we-know-that-aren't-true-could-fill-a-bottomless- + ocean-to-a-depth-of-half-an-invisible-inch-ly y'rs - tim + + + + + + diff --git a/demo/ermis-f/python_m/cur/0509 b/demo/ermis-f/python_m/cur/0509 new file mode 100644 index 00000000..2b3eeeb8 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0509 @@ -0,0 +1,12 @@ +From: nbecker at fred.net (nbecker at fred.net) +Date: 12 Apr 1999 14:14:02 -0400 +Subject: threads need -DREENTRANT? +Message-ID: +X-UID: 509 + +I see that building --with-threads doesn't automatically add +-DREENTRANT. Is it needed? + + + + diff --git a/demo/ermis-f/python_m/cur/0510 b/demo/ermis-f/python_m/cur/0510 new file mode 100644 index 00000000..42d156a4 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0510 @@ -0,0 +1,46 @@ +From: charles.choi at computer.org (Charles Y. Choi) +Date: Thu, 22 Apr 1999 03:42:13 -0700 +Subject: 1.5.2 Build Snag +Message-ID: <43DT2.3365$56.12822@typhoon-sf.pbi.net> +X-UID: 510 + +Folks - + +In trying to build Python 1.5.2 on a Sparc Solaris 2.5.1 machine +using gcc 2.8.1 I get this: + +-- +ar cr libpython1.5.a getbuildinfo.o +ranlib libpython1.5.a +true +cd Modules; make OPT="-g -O2" VERSION="1.5" \ + prefix="/usr/local" exec_prefix="/usr/local" \ + LIBRARY=../libpython1.5.a link +make[1]: Entering directory `/export/home/cchoi/src/Python-1.5.2/Modules' +gcc python.o \ + ../libpython1.5.a -lsocket -lnsl -ldl -lm -o python +Undefined first referenced + symbol in file +__muldi3 ../libpython1.5.a(longobject.o) +ld: fatal: Symbol referencing errors. No output written to python +make[1]: *** [link] Error 1 +make[1]: Leaving directory `/export/home/cchoi/src/Python-1.5.2/Modules' +make: *** [python] Error 2 +-- + + +Anybody here have a similar experience? Strangely enough, +I get a successful build using gcc version 2.5.6. + + +Thanks! + +-Charles + + + + + + + + diff --git a/demo/ermis-f/python_m/cur/0511 b/demo/ermis-f/python_m/cur/0511 new file mode 100644 index 00000000..41d89d02 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0511 @@ -0,0 +1,37 @@ +From: fdrake at cnri.reston.va.us (Fred L. Drake) +Date: Tue, 27 Apr 1999 20:04:28 GMT +Subject: Python classes for postscript +In-Reply-To: +References: +Message-ID: <14118.6220.972207.444585@weyr.cnri.reston.va.us> +X-UID: 511 + +Victor S. Miller writes: + > Are there packages available for formatted output (with nice fonts, + > etc.)? Presumably one could create individual pages use some sort of + > GUI like tkinter, but that would be one page at a time. Also, the XML + +Victor, + You may want to look at the material in the "printing" package in +Grail; it won't be a ready-to-use application, but it may be fairly +useful depending on your application. If you're basically presenting +text, it shouldn't be too difficult to use. It essentially provides a +"writer" object that produces PostScript output; see the formatter +module documentation for information on the "writer" interface: + + http://www.python.org/doc/lib/module-formatter.html + + Grail 0.6 is available at: + + http://grail.cnri.reston.va.us/grail/ + + + -Fred + +-- +Fred L. Drake, Jr. +Corporation for National Research Initiatives + + + + diff --git a/demo/ermis-f/python_m/cur/0512 b/demo/ermis-f/python_m/cur/0512 new file mode 100644 index 00000000..d97ed51d --- /dev/null +++ b/demo/ermis-f/python_m/cur/0512 @@ -0,0 +1,50 @@ +From: jeremy at cnri.reston.va.us (Jeremy Hylton) +Date: Fri, 2 Apr 1999 17:57:38 -0500 (EST) +Subject: add type predicates to types module? +In-Reply-To: +References: +Message-ID: <14085.18842.492142.484721@bitdiddle.cnri.reston.va.us> +Content-Length: 1184 +X-UID: 512 + +This is a really good idea. I know I've got type predicates of many +different flavors in code I've been working on recently. The tough +question, I think, is how to decide which predicates are needed and +how to implement them. + +The folkloric "file-like object" type is a good example. When people +say "file-like object" they mean an object that responds in a +reasonable way to the particular subset of methods on a builtin file +object that they are interested in. + +isSequence might be a better example, since you want to capture +instances that implement the sequence protocol along with tuples, +lists, and strings. I use: + +def isSequence(s): + try: + 0 in s + except TypeError: + return 0 + else: + return 1 + +def isCallable(obj): + if type(obj) in (types.BuiltinFunctionType, + types.BuiltinMethodType, types.LambdaType, + types.MethodType): + # XXX could include types.UnboundMethodType + return 1 + if type(obj) == types.InstanceType: + return hasattr(obj, '__call__') + return 0 + +In the particular application I needed, I know I would not want to +include UnboundMethodTypes. In the general case, though, I think it +should be included. + +Jeremy + + + + diff --git a/demo/ermis-f/python_m/cur/0513 b/demo/ermis-f/python_m/cur/0513 new file mode 100644 index 00000000..d93f24e1 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0513 @@ -0,0 +1,42 @@ +From: tseaver at palladion.com (Tres Seaver) +Date: Wed, 28 Apr 1999 23:36:38 -0500 +Subject: Designing Large Systems with Python +References: +Message-ID: <3727E1D6.B57F6371@palladion.com> +Content-Length: 1575 +X-UID: 513 + +boud at rempt.xs4all.nl wrote: +> +> David Steuber wrote: +> +> : Meanwhile, languages like Ansi Common Lisp have had features that +> : allow you to prototype and build a large system at the same time. +> : That is, the specification of the system becomes the system. People +> : have done the same thing with Visual Basic, so I am told. +> : +> +> Yes, they do. I should know - I'm working on a whopping great +> big laboratory erp system built in Visual Basic. First there was +> the prototype and it looked like a Windows program. Then there wasn't +> enough time to start again and discard the prototype, so the prototype +> became the specification, and in time, the system. Then the project +> was delayed by about a year. Then there were performance problems +> caused by conceptual errors that had to be rectified by hacking around. +> Then suddenly, the whole blasted !@#$%^&* was more than ten million +> lines, more than hundred dll's, numerous OCX'es, and countless forms, +> all built by twenty to thirty novices in the art of programming, of whom +> fifteen had left the company. It's more than painful or embarrasing... +> And it's not the first time I've seen that happen. Sorry for the rant - +> I just had to get it of my chest. I don't think Python really insures +> you against these mistakes. + +VB is notorious for insuring THAT a project makes those mistakes. :) +-- +========================================================= +Tres Seaver tseaver at palladion.com 713-523-6582 +Palladion Software http://www.palladion.com + + + + diff --git a/demo/ermis-f/python_m/cur/0514 b/demo/ermis-f/python_m/cur/0514 new file mode 100644 index 00000000..a8a98040 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0514 @@ -0,0 +1,42 @@ +From: herzog at online.de (Bernhard Herzog) +Date: 09 Apr 1999 21:04:29 +0200 +Subject: _tkinter.c, threads and C-modules +Message-ID: +Content-Length: 1249 +X-UID: 514 + + +A few weeks ago, there was a bug report on c.l.py regarding an +incompatibility between Sketch and Python 1.5.2b2. It seems to me that +the cause for the problems is the new Tcl-lock in 1.5.2. + +The tcl-lock was introduced for better thread support in Tkinter. +Whenever _tkinter calls the tcl interpreter, it releases the python-lock +and acquires the tcl-lock. Sketch defines some tcl-callbacks in C, which +in turn may call the python interpreter, but without releasing the +tcl.lock and acquiring the python-lock. I think that this is the cause, +because compiling just the _tkinter module without thread support cures +the problem. + +The question now is, how do I make Sketch work correctly with a +threadable _tkinter? AFAICT, Sketch would have to have access to some +static variables in _tkinter.c. + +The best solution IMO would be to give third-party C-modules access to +the functionality of the macros ENTER_TCL, LEAVE_TCL, etc, via some +C-functions to access those variables and a _tkinter headerfile +installed with the other Python headerfiles. + +Any chance to get something like this into Python 1.5.2 final? + + + Bernhard + + +-- +Bernhard Herzog | Sketch, a python based drawing program +herzog at online.de | http://www.online.de/home/sketch/ + + + + diff --git a/demo/ermis-f/python_m/cur/0515 b/demo/ermis-f/python_m/cur/0515 new file mode 100644 index 00000000..fec0fc29 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0515 @@ -0,0 +1,48 @@ +From: jant at igd.fhg.de (Jan Thomczek) +Date: Tue, 20 Apr 1999 16:44:10 +0200 +Subject: User-defined variables / compilation +Message-ID: <371C92BA.2C6C883F@igd.fhg.de> +Content-Length: 1416 +X-UID: 515 + +Hello, + +I?m new to this newsgroup and maybe you?ll say "Wow! What a stupid +question..." I think you?re right- + +I used to program in Turbo-Pascal 6. I installed Python on my NT +4.0-machine. + +I wonder how is the procedure to define the varibles by a user like +"readln(x);" I?m sure there is a simple way to do so. +Another question is: How do I *compile* the lines I have written to an +*.exe-file? + +Thanks in advance, + +Jan Thomczek + + +-- +o---------------------------------------------------o +| JAN THOMCZEK | +o---------------------------------------------------o +| Marketing und Kommunikation | +o---------------------------------------------------o +| Telefon: +49 (0)6151 / 155-437 | +| Fax: +49 (0)6151 / 155-446 | +| E-mail: jant at igd.fhg.de | +| jant at zgdv.de | +| URL: http://www.igd.fhg.de/~jant | +o---------------------------------------------------o +| Scientists have shown that the moon is moving | +| away a small measurable distance from the earth | +| every year. You can calculate that 65 million | +| years ago the moon was orbiting the earth at a | +| distance of about 10 meters from the surface... | +| This would explain the death of the dinosaurs. | +o---------------------------------------------------o + + + + diff --git a/demo/ermis-f/python_m/cur/0516 b/demo/ermis-f/python_m/cur/0516 new file mode 100644 index 00000000..5160f202 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0516 @@ -0,0 +1,26 @@ +From: greg.ewing at compaq.com (Greg Ewing) +Date: Mon, 19 Apr 1999 10:21:40 +1200 +Subject: Motif GUI Builder +References: <3717DA3C.8D91A592@sunrise.com> +Message-ID: <371A5AF4.6D78A16E@compaq.com> +X-UID: 516 + +Fred Sells wrote: +> +> Is there any interest in a Motif GUI builder that +> includes a Python interface???. +> +> The Python would be freebie or shareware... +> +> I need to decide whether to get it out there on the web +> or deep six it. + +Are you talking about making the whole GUI builder +open source? If so, I'm sure there would be many +people interested. + +Greg + + + + diff --git a/demo/ermis-f/python_m/cur/0517 b/demo/ermis-f/python_m/cur/0517 new file mode 100644 index 00000000..63de406b --- /dev/null +++ b/demo/ermis-f/python_m/cur/0517 @@ -0,0 +1,71 @@ +From: sdm7g at virginia.edu (Steven D. Majewski) +Date: Fri, 23 Apr 1999 23:40:33 GMT +Subject: Style/efficiency question using 'in' +In-Reply-To: <3720C3F3.CFF6D739@callware.com> +References: <3720C3F3.CFF6D739@callware.com> +Message-ID: +Content-Length: 1738 +X-UID: 517 + +On Fri, 23 Apr 1999, Ivan Van Laningham wrote several variations +on 'for x in y' : + + +And just to confuse the new user even further, lets add pseudo +sequences onto the pile. + +The actual protocol that 'for' uses is to get the next item in +the sequence until an IndexError is raised. Earlier versions +of Python compared the index to len() each time thru. I think +I can claim some credit in inspiring Guido to change that behaviour +by writing some Really Ugly classes which lied about their length +in order to implement indefinite or lazy sequences. Now, it's a +snap: all you have to do is implement __getitem__ to make something +appear as a sequence to 'for' and 'in'. + +For example, rather than reading in a entire file and splitting it +into tokens or chunks all at once, you can make a lazy sequence which +reads another chunk of the file if needed and parses the next token +each time __getitem__ is called with a larger index. You main loop +would be something like 'for tok in Tokens( filename ): ' + +A simpler example: + +>>> class Squares: +... def __init__( self, n ): +... self.n = n +... def __getitem__( self, i ): +... if i < self.n : return i*i +... else: raise IndexError +... +>>> sq = Squares(10) +>>> for x in sq: print x +... +0 +1 +4 +9 +16 +25 +36 +49 +64 +81 +>>> if 4 in sq : print 'YES' +... +YES +>>> + +---| Steven D. Majewski (804-982-0831) |--- +---| Department of Molecular Physiology and Biological Physics |--- +---| University of Virginia Health Sciences Center |--- +---| P.O. Box 10011 Charlottesville, VA 22906-0011 |--- + + Caldera Open Linux: "Powerful and easy to use!" -- Microsoft(*) + (*) + + + + + + diff --git a/demo/ermis-f/python_m/cur/0518 b/demo/ermis-f/python_m/cur/0518 new file mode 100644 index 00000000..bcf05cb6 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0518 @@ -0,0 +1,27 @@ +From: thecrow at cyberdude.com (bryce) +Date: Wed, 21 Apr 1999 23:27:25 GMT +Subject: Python/Windows question (GUI) +Message-ID: <371e5e52.6580435@news.prodigy.net> +X-UID: 518 + +I have a window class instance. + +For example: + + x = Window ( "hey there") + x.show () + +I think I am having some trouble when the window closes +with the window object being freed. + +I want the object to be destroyed regardless of how many +references there are to it when the WM_DESTROY message +is received. + +Any help is *much* appreciated. +Thanks. +Bryce + + + + diff --git a/demo/ermis-f/python_m/cur/0519 b/demo/ermis-f/python_m/cur/0519 new file mode 100644 index 00000000..5632dc3f --- /dev/null +++ b/demo/ermis-f/python_m/cur/0519 @@ -0,0 +1,46 @@ +From: samschul at ix.netcom.com (Sam Schulenburg) +Date: Tue, 13 Apr 1999 15:41:10 -0700 +Subject: Windows install has problems. Guido asked that I use this newsgroup to discus further +References: <924039873.18221.0.nnrp-12.9e982a40@news.demon.co.uk> <924040766.18823.0.nnrp-12.9e982a40@news.demon.co.uk> +Message-ID: <7f0h5p$n41@dfw-ixnews4.ix.netcom.com> +Content-Length: 1297 +X-UID: 519 + +I find that if I copy the Tcl/Tk DLLS to the DLLs folder after installing +Python152 that I have no problems. This has worked for me with both WinNT +and Win95/98 +I also use wise installer to distrubute this release along with my modified +IDLE files to the engineers that I support. I just have my installer perform +this copy after executing the Python release process. +Sam Schulenburg + +Barry Scott wrote in message +news:924040766.18823.0.nnrp-12.9e982a40 at news.demon.co.uk... +> >I wish I could. The installer is very stupid. Windows sucks :-( +> +> Is the WISE installer unable to deal with Win 9X vs. NT and handle +> registry queries and updates? I'm sure that I can do this with +> InstallShield (a poorly designed, annoying, but functional installer). +> +> As for the tcl80.dll problems. Either assume that tcl80.dll is in the +> standard (english) installation place +> %systemdrive%\program files\tcl\bin\tcl80.dll. +> +> OR release note that users must add the Tcl bin dir to there PATH. +> +> As the python lib does not have a module to access the registry it +makes +> getting the info from the registry hard. +> +> Maybe 1.6 needs a windows registry module to solve this and +> other problems. +> +> BArry +> +> + + + + + + diff --git a/demo/ermis-f/python_m/cur/0520 b/demo/ermis-f/python_m/cur/0520 new file mode 100644 index 00000000..fe6ee5ff --- /dev/null +++ b/demo/ermis-f/python_m/cur/0520 @@ -0,0 +1,31 @@ +From: mryan at localhost.netaxs.com (Michael W. Ryan) +Date: 25 Apr 1999 17:09:22 GMT +Subject: GUI other than Tkinter +References: <3721567f.1748033@news> +Message-ID: +X-UID: 520 + +On 25 Apr 1999 09:23:35 -0400, Russell Nelson wrote: +>mrfusion at bigfoot.com writes: +> +>> Well, I've just about given up on EVER getting Tkinter to work on my +>> Win98 machine. Is there any other GUI module that I can get that + ^^^^^ +>> doesn't require TCL/TK to be installed on my machine? Isn't there +>> something called GD? +> +>There's pygtk, which uses the gtk toolkit. + +As far as I know, GTk has not been ported to the Win32 platform, yet. + +-- +Michael W. Ryan | OTAKON 1999 +mryan at netaxs.com | Convention of Otaku Generation +http://www.netaxs.com/~mryan/ | http://www.otakon.com/ + +PGP fingerprint: 7B E5 75 7F 24 EE 19 35 A5 DF C3 45 27 B5 DB DF +PGP public key available by fingering mryan at unix.netaxs.com (use -l opt) + + + + diff --git a/demo/ermis-f/python_m/cur/0521 b/demo/ermis-f/python_m/cur/0521 new file mode 100644 index 00000000..c6c8c746 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0521 @@ -0,0 +1,37 @@ +From: mlh at idt.ntnu.no (Magnus L. Hetland) +Date: 25 Apr 1999 19:31:47 +0200 +Subject: Python too slow for real world +References: <372068E6.16A4A90@icrf.icnet.uk> <3720A21B.9C62DDB9@icrf.icnet.uk> <3720C4DB.7FCF2AE@appliedbiometrics.com> <3720C6EE.33CA6494@appliedbiometrics.com> +Message-ID: +X-UID: 521 + +Justin Sheehy writes: + +> mlh at idt.ntnu.no (Magnus L. Hetland) writes: +> +> > (And... How about builtin regexes in P2?) +> +> Um, why? I don't see any need at all for them to move from +> module-status to core-language-status. +[...] +> +> In all seriousness, what reason do you have for making that +> suggestion? I am willing to believe that there might be a good reason +> to do so, but it certainly isn't immediately obvious. + +Now, that's really simple -- because re.py is slow. I thought maybe +some of the slowness might be improved by a c-implementation, that's +all. Not too important to me... +> +> -Justin +> + +-- + > Hi! I'm the signature virus 99! + Magnus > Copy me into your signature and join the fun! + Lie + Hetland http://arcadia.laiv.org + + + + diff --git a/demo/ermis-f/python_m/cur/0522 b/demo/ermis-f/python_m/cur/0522 new file mode 100644 index 00000000..2c5fa89b --- /dev/null +++ b/demo/ermis-f/python_m/cur/0522 @@ -0,0 +1,25 @@ +From: tom at spirit.gcrc.upenn.edu (Tom Fenn) +Date: Tue, 06 Apr 1999 10:54:00 -0400 +Subject: Rat sighting online +References: <7e8fd3$er2$1@news1.rmi.net> +Message-ID: <370A2008.2AE0AECF@spirit.gcrc.upenn.edu> +X-UID: 522 + +I actually like the cover. It has that "There everywhere but you can't +see them" +idea that I associate with Python. + +Mark Lutz wrote: +> +> jkraai at murl.com writes about Learning Python: +> > I can't resist, can we refer to it as: +> > +> > _Nixon_in_a_Nutshell_? +> +> I don't care how you refer to it, as long as you do ;-). +> +> --Mark Lutz (http://rmi.net/~lutz) + + + + diff --git a/demo/ermis-f/python_m/cur/0523 b/demo/ermis-f/python_m/cur/0523 new file mode 100644 index 00000000..90ff4992 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0523 @@ -0,0 +1,35 @@ +From: gmcm at hypernet.com (Gordon McMillan) +Date: Wed, 7 Apr 1999 17:51:03 GMT +Subject: Crappy Software was Re: [OffTopic: Netscape] Re: How should +In-Reply-To: <370c7a2d.35857749@news.bctel.ca> +References: <370c7a2d.35857749@news.bctel.ca> +Message-ID: <1288614834-78399188@hypernet.com> +X-UID: 523 + +guppy wrote: + +> And another kick at Netscape: + + +Having recently ported a sophisticated applet using JNI (Sun's new +native interface) to JRI (older Netscape) and RNI (older IE), I too +can kick and scream. + +Despite the fact that JNI is modelled on JRI, it was _much_ easier to +port to RNI. Besides taking a whole lot more code (you have to do the +whole silly "plugin" thing), Netscape was prone to crash at strange +times for unknown reasons. + +There's even a difference between exiting from the file menu and +closing from the title bar. + +When's the last time you closed a GUI from the file menu?? + +Sheesh. + + +- Gordon + + + + diff --git a/demo/ermis-f/python_m/cur/0524 b/demo/ermis-f/python_m/cur/0524 new file mode 100644 index 00000000..febf3cb8 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0524 @@ -0,0 +1,63 @@ +From: sdm7g at Virginia.EDU (Steven D. Majewski) +Date: Thu, 22 Apr 1999 20:54:13 -0400 (EDT) +Subject: Emulating C++ coding style +In-Reply-To: +References: <371F8FB7.92CE674F@pk.highway.ne.jp> +Message-ID: +Content-Length: 1266 +X-UID: 524 + +On Fri, 23 Apr 1999 06:08:07 +0900, Thooney Millennier asked about +Python equivalents to C++ code. +> +> >2. stream class +> > e.g. cout << "hello python."< VERY bad idea. Bad even in C++. +> +> sys.stdout.write("hello python." + "\n"); + + +However, if you *REALLY* want to have that sort of C++ syntax, +you can get it in Python with something like: + +endl = '\n' + +class OutStream: + def __init__( self, file ): + if hasattr( file, 'write' ): + self.file = file + else: + self.file = open( file, 'w' ) + def write( self, what ): + self.file.write( what ) + def close( self ): + self.file.close() + def __lshift__(self, what ): + self.write( str(what)+' ') + return self + + +import sys +out = OutStream( sys.stdout ) +out << "Hello" << "World" << endl +out << "The answer is" << 3+4 << endl + + + +---| Steven D. Majewski (804-982-0831) |--- +---| Department of Molecular Physiology and Biological Physics |--- +---| University of Virginia Health Sciences Center |--- +---| P.O. Box 10011 Charlottesville, VA 22906-0011 |--- + + Caldera Open Linux: "Powerful and easy to use!" -- Microsoft(*) + (*) + + + + + + diff --git a/demo/ermis-f/python_m/cur/0525 b/demo/ermis-f/python_m/cur/0525 new file mode 100644 index 00000000..3fa8c4d7 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0525 @@ -0,0 +1,36 @@ +From: mal at lemburg.com (M.-A. Lemburg) +Date: Tue, 13 Apr 1999 07:39:45 GMT +Subject: rfc822 date header +References: <3712D863.2A8148BC@rubic.com> +Message-ID: <3712F4C1.52327AF4@lemburg.com> +X-UID: 525 + +Jeff Bauer wrote: +> +> Is there a reasonably bulletproof way to generate an +> rfc822-compliant date header using the time module? +> +> The reason I ask is I recall a number of subtle +> errors in this regard, reported by Chris Lawrence, +> among others. + +According to the RFC, time.ctime() should do the trick... +but it's probably locale aware which the RFC doesn't account +for. + +A better way is to use the ARPA submodule in mxDateTime: + + http://starship.skyport.net/~lemburg/mxDateTime.html + +...even if it's just for looking up the string format ;-) + +-- +Marc-Andre Lemburg Y2000: 262 days left +--------------------------------------------------------------------- + : Python Pages >>> http://starship.skyport.net/~lemburg/ : + --------------------------------------------------------- + + + + + diff --git a/demo/ermis-f/python_m/cur/0526 b/demo/ermis-f/python_m/cur/0526 new file mode 100644 index 00000000..db2ef703 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0526 @@ -0,0 +1,19 @@ +From: sjb at rockford.crosswinds.net (Samuel Bridgeland) +Date: Sun, 18 Apr 1999 01:23:03 GMT +Subject: goes with last message +Message-ID: +X-UID: 526 + +Really sould've put this in my last message. From what I can tell python +isn't loading any modules. For instance when I try to start xrpm or grail it +tells me I probably havn'r configured it and that it can't find the tkinter +module. +-- +Samuel Bridgeland +sjb at rockford.crosswinds.net +http://www.crosswinds.net/rockford/~sjb/ + + + + + diff --git a/demo/ermis-f/python_m/cur/0527 b/demo/ermis-f/python_m/cur/0527 new file mode 100644 index 00000000..28c8e9b4 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0527 @@ -0,0 +1,45 @@ +From: dperkins at snmpinfo.com (dperkins at snmpinfo.com) +Date: Tue, 6 Apr 1999 09:04:26 -0700 +Subject: SNMPy update +In-Reply-To: <7ebtn1$dq$1@Starbase.NeoSoft.COM> +References: <7e1hiq$a71$1@Starbase.NeoSoft.COM> <7ear25$ksf$1@news-sj-3.cisco.com> <14089.11820.416453.80124@bitdiddle.cnri.reston.va.us> <7ebtn1$dq$1@Starbase.NeoSoft.COM> +Message-ID: +X-UID: 527 + +HI, + +I cannot tell the context of the orginal question. But yet again, +to write an SNMP agent or manager, do not fall for the belief that +you need an ASN.1 compiler. Also, do not fall for the believe that +you need an ASN.1 compiler for processing MIB modules. + +Whether one or not a asn.1 compiler is free does not matter, because +you really donot need one! + +On 5 Apr 1999, Cameron Laird wrote: + +> In article <14089.11820.416453.80124 at bitdiddle.cnri.reston.va.us>, +> Jeremy Hylton wrote: +> . +> . +> . +> >encode/decode and on how to build a backend for SNACC. (A free-ish +> >ASN.1 compiler; the only one?) +> +> Hardly. There are several ASN.1 compilers. MAVROS www-sop.inria.fr/rodeo/personnel/huitema/mavros-home.html> is +> another. I know of none that's achieved SNACC's portability. +> -- +> +> Cameron Laird http://starbase.neosoft.com/~claird/home.html +> claird at NeoSoft.com +1 281 996 8546 FAX +> + + +Regards, +/david t. perkins + + + + + diff --git a/demo/ermis-f/python_m/cur/0528 b/demo/ermis-f/python_m/cur/0528 new file mode 100644 index 00000000..1427ef8f --- /dev/null +++ b/demo/ermis-f/python_m/cur/0528 @@ -0,0 +1,35 @@ +From: aa8vb at vislab.epa.gov (Randall Hopper) +Date: Mon, 5 Apr 1999 16:20:58 GMT +Subject: Subattributes of classes +In-Reply-To: <3708D83E.BBE87D60@appliedbiometrics.com>; from Christian Tismer on Mon, Apr 05, 1999 at 05:35:26PM +0200 +References: <19990405104408.A807008@vislab.epa.gov> <3708D83E.BBE87D60@appliedbiometrics.com> +Message-ID: <19990405122058.A815978@vislab.epa.gov> +X-UID: 528 + +Christian Tismer: + |> self.draw = Canvas(self, width="5i", height="5i", + |> background="white", + |> scrollregion=(0, 0, "20i", "20i")) + |> self.draw.scrollX = Scrollbar(self, orient=HORIZONTAL) + |> self.draw.scrollY = Scrollbar(self, orient=VERTICAL) + |> ^^^^^^^^^^^^ + | + |This is since the self.draw is assigned a Canvas instance + |which is itself an object with attributes. + +Thanks to all who replied. + +I was foiled by "print self.draw" printing something that looked like a +primitive string type (the Tk widget name), and so I didn't think it was a +class and thus couldn't have attributes. + +I'll not forget __str__/__repr__ so easily next time. :-) + +Thanks, + +Randall + + + + + diff --git a/demo/ermis-f/python_m/cur/0529 b/demo/ermis-f/python_m/cur/0529 new file mode 100644 index 00000000..78e8045f --- /dev/null +++ b/demo/ermis-f/python_m/cur/0529 @@ -0,0 +1,53 @@ +From: mwh21 at cam.ac.uk (Michael Hudson) +Date: 16 Apr 1999 07:54:10 +0100 +Subject: restore sources from PYC [Q] +References: <000101be879c$8aed0670$6eba0ac8@kuarajy.infosys.com.ar> +Message-ID: +Content-Length: 1357 +X-UID: 529 + +"Bruno Mattarollo" writes: +> Hi! +> +> By mistake I am unable to find the PY files (source) from a project I was +> working on. I only have the PYC files... Is there a way to recover the +> sources from the PYC? I only need my sources, I don't give a d... for the +> comments... + +Well.... The pyc files are marshalled code objects (after an eight +byte header), and there's the standard module dis which can +disassemble code objects, from which you could have a stab at +rewriting your code. You certainly wouldn't *want* to do it this way. + +It would probably be within the bounds of possibility to write a +decompiler, though unless you've lost a vast heap of code this is +going to be a much bigger project than rewriting your code. + +Anyway, if it helps, here's a function that'll pull the code out of a +.pyc file and disassemble that code: + +def dis_pyc(pyc_name): + import marshal,dis + file=open(pyc_name,'rb') + file.read(8) + code=marshal.load(file) + did.dis(code) + +(NB: This isn't much use because defined functions and classes are in +their own code objects stored as constants - they're still accessible, +in code.co_consts, but this code doesn't go looking for them) + +> TIA +> +> /B +> +> Bruno Mattarollo +> ... proud to be a PSA member + +Good luck! + +Michael + + + + diff --git a/demo/ermis-f/python_m/cur/0530 b/demo/ermis-f/python_m/cur/0530 new file mode 100644 index 00000000..7539b3d5 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0530 @@ -0,0 +1,110 @@ +From: mso at jimpick.com (Mike Orr) +Date: Sat, 10 Apr 1999 00:47:25 GMT +Subject: ConfigParser module and alternatives (flad, flan) +References: <19990331160323.21601.00000471@ng-fi1.aol.com> <7du3ab$3ag@chronicle.concentric.net> +Message-ID: +Content-Length: 4282 +X-UID: 530 + +William Annis wrote: +>> As one of many people whose grimy hands have touched this module---and +>> potentially the only person known to Guido who USES it, I can only say this. + +I use ConfigParser to parse the data files in a Mad Lib CGI program. +See it at http://mso.oz.net/python/madbibs/ +(When I add/change a story, I run a script that parses the files, +creates the HTML, and stores the preprocessed data structures in a +cPickle file for the CGI script.) + +I'm not sure if I'll use ConfigParser for the next version. I don't +really need the sections (multiple files work just fine, using the filename +for the section name), and I haven't found a use for the the %(other_key)s +substitutions. On the other hand, it doesn't handle multiple values (the +same key repeated within a record), which I sometimes need. + +Attached is a wrapper class for ConfigParser which supports booleans +and can also return an entire section as a dictionary (or all the sections +as nested dictionaries). I find these make it a little more convenient. + +I have a home-grown module flan.py that I use for most parsings. It's +loosely based on Flad, but with a different approach. Rather than +returning dictionaries, it returns a list (each record) of lists (each +field) of triples (key, value, linno). Of course, it requires more code +in the calling program to move the records in and out of objects. But +it allows more flexibility, because the calling program can decide +whether to allow multiple values (duplicate keys), can remember the +original order of the keys if desired, and, if there's a data error +parsing a particular field (e.g., a certain number must be between 1 and +100), it can put the file's line number in the exception string. +[I'd like to figure out how to print the original line with the caret +indicating the position of the error, a la SyntaxError, but haven't +succeeded yet.] Flan doesn't handle sections or %(other_key)s +substitutions, but it does know how to write files (without comments +at this point). It's a bit too long to post, but I can send it to +anybody who's interested. + +################### BEGIN ConfigParser2.py ###################### +"""ConfigParser2.py -- wrapper for ConfigParser with additional features. + +Differences from the original ConfigParser class: + +* The *getboolean* method accepts symbolic words as well as '1' or '0'. +Anything beginning with 't' or 'y' means '1' (true/yes). Anything +beginning with 'f' or 'n' is accepted as '0' (false/no). Case is insignificant. + +* New method *options_dict*(section) returns a copy of the dictionary +corresponding to that direction WITH THE DEFAULTS ADDED TO IT. + +* New method *sections_dict*() returns a dictionary containing each section, +with the default section under the key 'DEFAULT'. The other sections do NOT +contain copies of the entries from the default section. + +These methods do not resolve %(key)s interpolations: you must do that yourself. + +Testing status: Tested getboolean, options_dict, sections_dict 23-JAN-1999. +Module written by Mike Orr, mso at jimpick.com, 23-JAN-1999. Public domain. +""" +import ConfigParser; _cp = ConfigParser; del ConfigParser +import string + +class ConfigParser(_cp.ConfigParser): + def getboolean(self, section, option): + v = self.get(section, option) + val = string.strip(v) + val = string.lower(v[0:1]) + if val in ('1', 't', 'y'): + return 1 + elif val in ('0', 'f', 'n'): + return 0 + raise ValueError, 'Not a boolean: %s' % v + + def options_dict(self, section): + ret = self._ConfigParser__defaults.copy() + if section == _cp.DEFAULTSECT: + return ret + try: + section_dict = self._ConfigParser__sections[section] + except KeyError: + raise _cp.NoSectionError(section) + ret.update(section_dict) + return ret + + def sections_dict(self): + ret = { 'DEFAULT': self._ConfigParser__defaults.copy() } + ret.update(self._ConfigParser__sections) + return ret +########### END ConfigParser2.py ##################################### + +> -- +> William Annis - System Administrator - Biomedical Computing Group +> (608) 263 8625 annis at biostat.wisc.edu PGP ID:1024/FBF64031 +> Mi parolas Esperanton - La Internacia Lingvo www.esperanto.org + +Saludon, William. Ankaux mi parolas Esperanton. + +-- +-Mike Orr, mso at jimpick.com + + + + diff --git a/demo/ermis-f/python_m/cur/0531 b/demo/ermis-f/python_m/cur/0531 new file mode 100644 index 00000000..91d73a68 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0531 @@ -0,0 +1,65 @@ +From: rgruet at ina.fr (Richard GRUET) +Date: Wed, 14 Apr 1999 19:05:51 +0100 +Subject: 1.5.2 install problems on NT +Message-ID: <3714D8FF.634655C5@ina.fr> +Content-Length: 1896 +X-UID: 531 + +Hi everybody + +I'd like to contribute to the "best install problem contest" actually in +progress... ;-) + +I've upgraded today from 1.5.1 to 1.5.2 on NT 4.0. +Python seems to work at 1st glance, but : + +Registry problems: +---------------------- +-Unlike stated in the "python use of registry" document (and unlike +previous releases) there is no more "CurrentVersion" key under key: +HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore (it's not convenient for +me because some of my programs use this key!); + Furthermore there is no key "1.5.2" for the new release, and it seems +that a "1.5" key is used instead. Since I used to define keys under +HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\1.5.x\PythonPath for +adding dirs to the Python path (as advised in the doc), this time I had +to copy manually my PythonPath under the 1.5 key. Maybe I'm missing a +readme or something... + +- File associations: when associating '.py' and '.pyw' files with +python.exe, the python.exe path lacks enclosing "", causing troubles if +the path contains a space (as in 'program files'). + +Tcl problems: +--------------- +shared by many ! see Hoon Yoon for instance... wish80;exe works (hence I +conclude that tcl is installed properly) but IDLE or Tkdb don't, with +insults like: +C:/PROGRA~1/PYTHON/TCL/lib/tk8.0/tk.tcl: bad event type +bad event type or keysym "MouseWheel" + while executing +"bind Listbox { + %W yview scroll [expr - (%D / 120) * 4] units +}" + (file "C:/PROGRA~1/PYTHON/TCL/lib/tk8.0/listbox.tcl + invoked from within +"source [file join $tk_library listbox.tcl]" + (file "C:/PROGRA~1/PYTHON/TCL/lib/tk8.0/tk.tcl" lin + invoked from within +"source C:/PROGRA~1/PYTHON/TCL/lib/tk8.0/tk.tcl" + ("uplevel" body line 1) + invoked from within +"uplevel #0 [list source $tkfile]" + +This probably means that Tk wasn't installed properly. + + +Eagerly waiting for the fixes.... +regards, + +Richard + + + + + diff --git a/demo/ermis-f/python_m/cur/0532 b/demo/ermis-f/python_m/cur/0532 new file mode 100644 index 00000000..dcfaf9f5 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0532 @@ -0,0 +1,49 @@ +From: evan at tokenexchange.com (Evan Simpson) +Date: Fri, 16 Apr 1999 15:58:15 -0500 +Subject: Zope question +References: <37178D4B.7D933209@swcp.com> +Message-ID: +Content-Length: 1077 +X-UID: 532 + +Looks like the pcgi wrapper either can't find the var directory, or doesn't +have sufficient permissions in it. Check the paths in your Zope.cgi, and +make sure the var directory is writable by "nobody" (or whatever your Apache +runs as). I went so far as to make my var directory mode 2770 and chgrp it +and its contents to "nobody". + +nobody-is-going-to-write-to-*my*-zope/var-ly yrs, +Evan + +Alex Rice wrote in message <37178D4B.7D933209 at swcp.com>... +[snip] +This is on a Cobalt RaQ. This is a MIPS processor with Linux +2.0.34. Basically a RedHat box. I built Python 1.5.1 and Zope-1.10.2-src +with no problems. I'm using Apache. When I go to this URL: + +http://zope.swcp.com/Zope/ + +I see Zope.cgi process, then I see in my browser after about 15 sec: + + ! Temporarily Unavailable + The resource you requested is temporarily unavailable - please + try again later. + + (102) failure during connect + + +In /usr/share/zope/var, I have only + +Data.bbb Data.bbb.in + +(pcgi.* seem to be missing?) + + + + + + + diff --git a/demo/ermis-f/python_m/cur/0533 b/demo/ermis-f/python_m/cur/0533 new file mode 100644 index 00000000..fb5b26e1 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0533 @@ -0,0 +1,138 @@ +From: SSTirlin at holnam.com (Scott Stirling) +Date: Thu, 29 Apr 1999 09:42:18 -0400 +Subject: HTML "sanitizer" in Python +Message-ID: +Content-Length: 6396 +X-UID: 533 + +Will, + +Thank you. So far you are the only person who has offered the kind of practical HOW-TO that I was mainly hoping for! This is not to disparage the many other helpful and interesting suggestions I have received. + +I should reiterate that I have 14 fairly large HTML files that I want to _batch process_, taking out a few specific HTML tags that Excel adds unnecessarily. I don't have the time or the inclination to write an HTML generator and process the Access data from scratch. I also have to work with a team of people who don't care at all about doing things smarter or trying out new programming languages. + +Besides, someone on the team has already put a lot of effort into writing a VB program that batch processes the Excel sheets from an Access query. And, as I said, I have a Visual SlickEdit macro that does exactly what I need very quickly. I am out to learn a little Python more than anything. So, while any more suggestions and comments are welcome, I will ask some more specific questions in the meantime. And then you can see how far I am from writing even the simplest program in Python! + +1) What is the Python syntax for opening a file in MS Windows? I was following Guido's tutorial yesterday, but I could not figure out how to open a file in Windows. + +2) How do I find a string of text in the open file and delete it iteratively? + +3) How do I save the file in Windows after I have edited it with the Python program? How do I close it? + +4) If someone helps me out, I think I should be able to use this info. and the tutorial and the Lutz book to loop the process and make the program run until all *.htm files in a folder have been handled once. + +What do you say? + +Scott +>>> William Park 04/28 3:20 PM >>> +On Wed, Apr 28, 1999 at 12:49:55PM -0400, Scott Stirling wrote: +> Hi, +> +> I am new to Python. I have an idea of a work-related project I want +> to do, and I was hoping some folks on this list might be able to +> help me realize it. I have Mark Lutz' _Programming Python_ book, +> and that has been a helpful orientation. I like his basic packer +> and unpacker scripts, but what I want to do is something in between +> that basic program and its later, more complex manifestations. +> +> I am on a Y2K project with 14 manufacturing plants, each of which +> has an inventory of plant process components that need to be tested +> and/or replaced. I want to put each plant's current inventory on +> the corporate intranet on a weekly or biweekly basis. All the plant +> data is in an Access database. We are querying the data we need and +> importing into 14 MS Excel 97 spreadsheets. Then we are saving the +> Excel sheets as HTML. The HTML files bloat out with a near 100% +> increase in file size over the original Excel files. This is +> because the HTML converter in Excel adds all kinds of unnecessary +> HTML code, such as for every single +> cell in the table. Many of these tables have over 1000 cells, and +> this code, along with its accompanying closing FONT tag, add up +> quick. The other main, unnecessary code is the ALIGN="left" +> attribute in tags (the default alignment _is_ left). The +> unnecessary tags are consistent and easy to identify, and a routine +> sh! +> ould be writable that will automate the removal of them. +> +> I created a Macro in Visual SlickEdit that automatically opens all +> these HTML files, finds and deletes all the tags that can be +> deleted, saves the changes and closes them. I originally wanted to +> do this in Python, and I would still like to know how, but time +> constraints prevented it at the time. Now I want to work on how to +> create a Python program that will do this. Can anyone help? Has +> anyone written anything like this in Python already that they can +> point me too? I would really appreciate it. +> +> Again, the main flow of the program is: +> +> >> Open 14 HTML files, all in the same folder and all with the .html +> >> extension. Find certain character strings and delete them from +> >> the files. In one case (the tags) it is easier to find the +> >> whole tag with attributes and then _replace_ the original tag +> >> with a plain . Save the files. Close the files. Exit the +> >> program. + +Hi Scott, + +I shall assume that a tag occurs in one line. Try 'sed', + for i in *.html + do sed -e 's///g" $i > /tmp/$i && mv /tmp/$i $i + done +or, in Python, + for s in open('...', 'r').readlines(): + s = string.replace('', '', s) + print string.strip(s) + +If tag spans over more than one line, then read the file in +whole, like + for s in open('...', 'r').read(): + +If the tag is not consistent, then you may have to use regular +expression with 're' module. + +Hopes this helps. +William + + +> +> More advanced options would be the ability for the user to set +> parameters for the program upon running it, to keep from hard-coding +> the find and replace parms. + +To use command line parameters, like + $ cleantd 'ALIGN="left"' +change to + s = string.replace('' % sys.argv[1], '', s) + +> +> OK, thanks to any help you can provide. I partly was turned on to +> Python by Eric Raymond's article, "How to Become a Hacker" (featured +> on /.). I use Linux at home, but this program would be for use on a +> Windows 95 platform at work, if that makes any difference. I do +> have the latest Python interpreter and editor for Windows here at +> work. +> +> Yours truly, +> Scott +> +> Scott M. Stirling +> Visit the HOLNAM Year 2000 Web Site: http://web/y2k +> Keane - Holnam Year 2000 Project +> Office: 734/529-2411 ext. 2327 fax: 734/529-5066 email: sstirlin at holnam.com +> +> +> -- +> http://www.python.org/mailman/listinfo/python-list + +-- +http://www.python.org/mailman/listinfo/python-list + +__________________________________________________________________ +| Scott M. Stirling | +| Visit the HOLNAM Year 2000 Web Site: http://web/y2k | +| Keane - Holnam Year 2000 Project | +| Office: 734/529-2411 ext. 2327 fax: 734/529-5066 email: sstirlin at holnam.com | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + + + diff --git a/demo/ermis-f/python_m/cur/0534 b/demo/ermis-f/python_m/cur/0534 new file mode 100644 index 00000000..715d892e --- /dev/null +++ b/demo/ermis-f/python_m/cur/0534 @@ -0,0 +1,29 @@ +From: mal at lemburg.com (M.-A. Lemburg) +Date: Tue, 20 Apr 1999 09:00:05 GMT +Subject: How alter maximum recurtion depth +References: <371B2660.ECE4660A@data-dealeren.dk> +Message-ID: <371C4215.66EF2A5D@lemburg.com> +X-UID: 534 + +Uffe Koch wrote: +> +> How do I alter the maximum recursion depth for my Python interpreter? + +Compile the interpreter with MAX_RECURSION_DEPTH set to the new +value, e.g. add a line + +#define MAX_RECURSION_DEPTH 20000 + +to your config.h file. + +-- +Marc-Andre Lemburg Y2000: 255 days left +--------------------------------------------------------------------- + : Python Pages >>> http://starship.skyport.net/~lemburg/ : + --------------------------------------------------------- + + + + + + diff --git a/demo/ermis-f/python_m/cur/0535 b/demo/ermis-f/python_m/cur/0535 new file mode 100644 index 00000000..14d9b44c --- /dev/null +++ b/demo/ermis-f/python_m/cur/0535 @@ -0,0 +1,25 @@ +From: ivanlan at callware.com (Ivan Van Laningham) +Date: Wed, 21 Apr 1999 19:26:00 GMT +Subject: How many of us are there? +Message-ID: <371E2648.DED123AE@callware.com> +X-UID: 535 + +Hello, Pythonistas-- +Does anyone out there have some idea how many people subscribe to the +mailing list, or read the newsgroup? + +-ly y'rs, +Ivan +---------------------------------------------- +Ivan Van Laningham +Callware Technologies, Inc. +ivanlan at callware.com +http://www.pauahtun.org +See also: +http://www.foretec.com/python/workshops/1998-11/proceedings.html +Army Signal Corps: Cu Chi, Class of '70 +---------------------------------------------- + + + + diff --git a/demo/ermis-f/python_m/cur/0536 b/demo/ermis-f/python_m/cur/0536 new file mode 100644 index 00000000..d753df54 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0536 @@ -0,0 +1,90 @@ +From: nascheme at m67.enme.ucalgary.ca (Neil Schemenauer) +Date: 16 Apr 1999 22:30:27 GMT +Subject: ANN: LParser 0.1 - A Python literal expression parser +Message-ID: <7f8dm3$koe@ds2.acs.ucalgary.ca> +Content-Length: 2566 +X-UID: 536 + +Version 0.1 +April 16, 1999 +Neil Schemenauer +http://www.ucalgary.ca/~nascheme/ + +This extension module parses Python literals from a file. An intended +use is for human readable data storage (configuration files, data +files, etc.). It is copyrighted under a Python style license. + +The format of the input is the same as Python (with some extensions). +Lists, tuples, dictionaries, floats, integers, strings, and comments +are recognized. Triple quoted strings are not recognized. Long +integers and complex numbers are not recognized. Numbers are returned +as integers if possible. All sequences are returned as lists. + +The extensions to the syntax are: + + = is accepted in place of : for dictionaries. + + Commas separating items are optional. + + Quotes may be left off strings if they do not include any of the + following characters " \\t\\n#[](){}:=". + +The LParser.parse method takes an optional parameter specifices parsing +start mode. If it is LParser.DICT then the parser behaves as if the input +is wrapped in { and }. The option LParser.LIST is similar except +the input is wrapped in [ and ]. Finally, the option LParser.VALUE +indicates that no wrapping should be done. In this case all input may +not be read. The value None is returned for end of file. The default +start mode is LParser.DICT. + +A example data file using these extensions looks like this: + +--------------------------------------------------------------------- +option1 = 10 +option2 = (1 2 3) + +# some useful commentary +subsystem1 = { + option1 = 10.102 # a little comment + option2 = "This is a quoted string" + good_option = on +} +--------------------------------------------------------------------- + +when parsed that the following dictionary is returned: + +{'option1': 10, 'subsystem1': {'option1': 10.102, 'good_option': 'on', + 'option2': 'This is a quoted string'}, 'option2': [1, 2, 3]} + +On a parse error, an LParserError exception is raised. The value of +the exception gives the line number and a short description of what +when wrong. + +Features: +--------- + + nulls handled correctly + no arbitrary limits + fast (compared to eval) + safe (compared to eval) + + +Known Bugs: +----------- + + [ ... ) and ( ... ] are treated as valid lists. + String escape processing may not be the same as Python. + \r may not be handled correctly. + Nulls in input can affect error reporting. + Error reporting is somewhat limited. + Data must come from a real file, not a StringIO etc. + + +Download: +--------- + + http://www.ucalgary.ca/~nascheme/python/ + + + + diff --git a/demo/ermis-f/python_m/cur/0537 b/demo/ermis-f/python_m/cur/0537 new file mode 100644 index 00000000..0e063c42 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0537 @@ -0,0 +1,59 @@ +From: mcicogni at siosistemi.it (Mauro Cicognini) +Date: Fri, 23 Apr 1999 01:17:36 +0200 +Subject: Windows install has problems. Guido asked that I use this newsgroup + to discus further +References: <924039873.18221.0.nnrp-12.9e982a40@news.demon.co.uk> <924040766.18823.0.nnrp-12.9e982a40@news.demon.co.uk> +Message-ID: <371FAE0F.43B33158@siosistemi.it> +Content-Length: 1695 +X-UID: 537 + +Barry Scott wrote: + +> >I wish I could. The installer is very stupid. Windows sucks :-( +> +> Is the WISE installer unable to deal with Win 9X vs. NT and handle +> registry queries and updates? I'm sure that I can do this with +> InstallShield (a poorly designed, annoying, but functional installer). + +WISE sure can. We use it every other day and it really works a lot better than +InstallShield. + +> As for the tcl80.dll problems. Either assume that tcl80.dll is in the +> standard (english) installation place +> %systemdrive%\program files\tcl\bin\tcl80.dll. + +Mmm, since I'm not an English-language OS user, I'd rather see that as +%programfolder%\tcl\bin\tcl80.dll (I don't remember exactly, but I'm sure there +is a way to refer in a language-independent way to the folder that the US +version calls "Program Files" since we use it in our installations. + +> OR release note that users must add the Tcl bin dir to there PATH. +> + +Might as well (and make them aware that they need it some way or another). + +> As the python lib does not have a module to access the registry it makes +> getting the info from the registry hard. +> +> Maybe 1.6 needs a windows registry module to solve this and +> other problems. +> + +? +We use Mark Hammond's extensions and have no problem at all in fetching things +from the registry. Might just ask him and fold in the registry-access stuff. + +> +> BArry + +Mauro + +-------------- next part -------------- +A non-text attachment was scrubbed... +Name: mcicogni.vcf +Type: text/x-vcard +Size: 381 bytes +Desc: Card for Mauro Cicognini +URL: + + diff --git a/demo/ermis-f/python_m/cur/0538 b/demo/ermis-f/python_m/cur/0538 new file mode 100644 index 00000000..65746725 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0538 @@ -0,0 +1,27 @@ +From: nospam at morhp.dircon.co.uk (Pete Jewell) +Date: Wed, 21 Apr 1999 20:47:19 +0100 +Subject: Project for newbie +Message-ID: <70alf7.qc6.ln@loopback> +X-UID: 538 + +Hi + +I've read my way through the tutorial, and am now stuck - where do I go +from here? I want to learn how to use Python, but don't have any +pressing projects at the moment - can anyone suggest a program I should +have a go at writing, to help me learn the language further? + +TIA + +-- +Pete + +morph at softhome.net +---------------------------------------------------------------- +Linux Registered User # 100652 - Uptime 100 hours, and counting... + +-- A Bugless Program is an Abstract Theoretical Concept. -- + + + + diff --git a/demo/ermis-f/python_m/cur/0539 b/demo/ermis-f/python_m/cur/0539 new file mode 100644 index 00000000..62e43cab --- /dev/null +++ b/demo/ermis-f/python_m/cur/0539 @@ -0,0 +1,56 @@ +From: gmcm at hypernet.com (Gordon McMillan) +Date: Tue, 20 Apr 1999 03:57:28 GMT +Subject: accessing calling scripts from called scripts at run time +In-Reply-To: +References: +Message-ID: <1287541644-22552815@hypernet.com> +Content-Length: 1195 +X-UID: 539 + +John Michelsen says: + +> I'm having trouble accessing a calling script from a called script +> at run time. Here is an example: +> +> #first file, will call second +> from Tkinter import * +> import tkFileDialog, string +> +> root = None +> +> def importScript(): +> filename = tkFileDialog.askopenfilename() +> if filename != '': +> list = string.split(filename, '/') +> filename = list[-1] +> #dir = string.join(list[:-1], '/') +> #sys.path.append(dir) +> exec "import %s" % filename[:-3] +> +> if __name__ == "__main__": #? +> root = Tk() +> b = Button(root, text="import script", command=importScript) +> b.pack() root.mainloop() +> +> +> #another file, picked by tkFileDialog at run time by user +> from importTest import root +> root.config(bg='green') +> +> +> If I put the "if __name__ == '__main__':" in, the second file can't +> get at the root properly. If I leave it out, when I import root in +> the second file, it creates a new root window. How can I get at the +> root without making a new one? +> + +The straightforward way: Give all the dialog-modules a run(...) +method. Use + mod = __import__(filename) + mod.run(root, ....) + +- Gordon + + + + diff --git a/demo/ermis-f/python_m/cur/0540 b/demo/ermis-f/python_m/cur/0540 new file mode 100644 index 00000000..5927e4c9 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0540 @@ -0,0 +1,72 @@ +From: dkuhlman at netcom.com (G. David Kuhlman) +Date: Wed, 7 Apr 1999 00:09:24 GMT +Subject: Embedding python question: PyRun_String only returns None not what I calculate +References: <923433832.14002.0.nnrp-07.9e982a40@news.demon.co.uk> +Message-ID: +Content-Length: 1919 +X-UID: 540 + +This is not the most convenient solution to your problem, but may +be useful in your case. + +When you embed Python in an application, the application often +exposes functions that are callable from Python scripts. You could +provide a function named setReturnValue(value), which when called, +passed a Python object (the value). The script calls this +function, and then, when it exits, the embedding application (the +caller of PyRun_String or PyRun_SimpleString) uses the Python value +saved by this function. + +My application needs to do something similar. It needs to be able +to evaluate scripts, passing in one or more values and to "catch" a +value returned by the script. Effectively, we want scripts to be +functions. If you find a smoother way to do this than what I +described above, please let me know. + + - Dave + +Barry Scott wrote: +> What I want to do is call python to run python code and return the results +> to +> my app. But I cannot find anyway to do this. + +> It would seem that I should be using PyRun_String to run a piece of python +> and return a result object to me. But I can only get a return value of None. +> NULL is returned if the code does not run. + +> How do I get python to return 2 to me when I ask it what 1+1 is? + +> Below is a fragment of code that I'm using to investigate PyRun_String. + +> BArry + +> // +> // Test getting an object back from a command +> // +> char *command = "1+1"; + +> PyObject *m = PyImport_AddModule("__main__"); +> if (m == NULL) +> return EXIT_FAILURE; + +> PyObject *d = PyModule_GetDict(m); +> PyObject *v = PyRun_String(command, Py_file_input, d, d); +> if (v == NULL) +> { +> PyErr_Print(); +> return EXIT_FAILURE; +> } + +> PyObject *result = PyObject_Str( v ); + +> char *string = PyString_AsString( result ); +> printf("Python returned: %s", string ); + +> Py_DECREF(result); +> Py_DECREF(v); + + + + + + diff --git a/demo/ermis-f/python_m/cur/0541 b/demo/ermis-f/python_m/cur/0541 new file mode 100644 index 00000000..500b4ab6 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0541 @@ -0,0 +1,30 @@ +From: phd at sun.med.ru (Oleg Broytmann) +Date: Wed, 14 Apr 1999 08:17:33 GMT +Subject: bug in PyGreSQL module +In-Reply-To: <14099.48588.851795.102448@bitdiddle.cnri.reston.va.us> +References: <14099.48588.851795.102448@bitdiddle.cnri.reston.va.us> +Message-ID: +X-UID: 541 + +On Tue, 13 Apr 1999, Jeremy Hylton wrote: +> The nulls have been converted to 0. This seems straightforward given +> the C code in getresult. If the field is an integer, the libpq value +> is always handed off to PyInt_FromLong. I would think that there +> should be an explicit check for NULLs in pg_getresult that converts +> them to None. + + Have you subscribed to PyGres mailing list? Contact the list and report +this. + +> Jeremy +> + +Oleg. +---- + Oleg Broytmann National Research Surgery Centre http://sun.med.ru/~phd/ + Programmers don't die, they just GOSUB without RETURN. + + + + + diff --git a/demo/ermis-f/python_m/cur/0542 b/demo/ermis-f/python_m/cur/0542 new file mode 100644 index 00000000..c5fc6bde --- /dev/null +++ b/demo/ermis-f/python_m/cur/0542 @@ -0,0 +1,24 @@ +From: faassen at pop.vet.uu.nl (Martijn Faassen) +Date: Tue, 27 Apr 1999 18:16:59 +0200 +Subject: help +References: <37257B0A.AF4C8E4C@pop.vet.uu.nl> +Message-ID: <3725E2FB.F7E46CED@pop.vet.uu.nl> +X-UID: 542 + +Robert Meegan wrote: +> +> I've become known for appending a lengthy appendix to each design document +> that explains what Python is and why averyone should be using it. So far +> I've made a number of converts. All it takes is an experienced coder with +> an open mind and *pow* they're hooked. + +This is how we push the programmer population slowly up that exponential +curve. :) + +Regards, + +Martijn + + + + diff --git a/demo/ermis-f/python_m/cur/0543 b/demo/ermis-f/python_m/cur/0543 new file mode 100644 index 00000000..4748f835 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0543 @@ -0,0 +1,24 @@ +From: markusk at bidra241.bbn.hp.com (Markus Kohler) +Date: 15 Apr 1999 17:19:44 +0200 +Subject: Is there a 'make' replacement written in python ? +Message-ID: +X-UID: 543 + +I'm looking for a replacement for the 'make' command +similiar to Cons : +http://www.telerama.com/~bgarcia/cons/ + +Also the concepts of Cons look promising to me it is written in perl and +the build rules are specified in perl. + As we all know perl sucks and python rules ;-) + +Therefore something like Cons written in python would be really cool. + + +Markus +-- +Markus Kohler mailto:markus_kohler at hp.com + + + + diff --git a/demo/ermis-f/python_m/cur/0544 b/demo/ermis-f/python_m/cur/0544 new file mode 100644 index 00000000..8ea43797 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0544 @@ -0,0 +1,32 @@ +From: akuchlin at cnri.reston.va.us (Andrew M. Kuchling) +Date: Thu, 8 Apr 1999 13:07:30 GMT +Subject: OpenSSL/X.509 +In-Reply-To: <370BE48E.2BA9750C@lemburg.com> +References: <7e1hiq$a71$1@Starbase.NeoSoft.COM> + <7ear25$ksf$1@news-sj-3.cisco.com> + <14089.11820.416453.80124@bitdiddle.cnri.reston.va.us> + <3709C8BE.4257C9F1@lemburg.com> + <14090.16807.950025.496495@bitdiddle.cnri.reston.va.us> + <370A78B6.2C18D10F@lockstar.com> + <370BE48E.2BA9750C@lemburg.com> +Message-ID: <14092.42263.897530.425040@amarok.cnri.reston.va.us> +X-UID: 544 + +M.-A. Lemburg writes: +>Sure, but if your company is US based, then chances are high +>you won't be able to share the code outside the US... that's +>why I started mxCrypto, BTW. + + Note that Pat Knight has a UK-based project to SWIG SSLeay; +could you work using that as a base? http://www.ktgroup.co.uk/~pat/ + +-- +A.M. Kuchling http://starship.python.net/crew/amk/ +Autumn, to me the most congenial of seasons: the University, to me the most +congenial of lives. + -- Robertson Davies, _The Rebel Angels_ + + + + + diff --git a/demo/ermis-f/python_m/cur/0545 b/demo/ermis-f/python_m/cur/0545 new file mode 100644 index 00000000..53f4900e --- /dev/null +++ b/demo/ermis-f/python_m/cur/0545 @@ -0,0 +1,16 @@ +From: savageb at pacbell.net (savageb) +Date: Thu, 22 Apr 1999 19:28:58 -0700 +Subject: learning Python (rat book) +Message-ID: +X-UID: 545 + +The rat has landed! I managed to get my hands a copy at the Stanford +University Bookstore today. + +good luck gettin' yours, + +Bob Savage + + + + diff --git a/demo/ermis-f/python_m/cur/0546 b/demo/ermis-f/python_m/cur/0546 new file mode 100644 index 00000000..f6fdaea4 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0546 @@ -0,0 +1,81 @@ +From: spamfranke at bigfoot.de (Stefan Franke) +Date: Wed, 14 Apr 1999 11:12:19 GMT +Subject: Can't run Win32 Debugger outside PythonWin +Message-ID: <371475d6.77664796@news.omnilink.de> +Content-Length: 2343 +X-UID: 546 + +I just upgraded my NT4 SP3 Workstation to Python 1.5.2 and +win32all build 124. Unluckily I can't start the debugger any +longer from outside PythonWin. +That is, typing + + pywin.debugger.fail + +works fine, but running fail.py from the shell gives + +D:\Programme\Python\Pythonwin\pywin\debugger>fail.py +Traceback (innermost last): + File "D:\Programme\Python\Pythonwin\pywin\debugger\fail.py", line 50, in ? + a() + File "D:\Programme\Python\Pythonwin\pywin\debugger\fail.py", line 18, in a + pywin.debugger.post_mortem(sys.exc_info()[2]) + File "D:\Programme\Python\Pythonwin\pywin\debugger\__init__.py", line 75, in p +ost_mortem + p = _GetCurrentDebugger() + File "D:\Programme\Python\Pythonwin\pywin\debugger\__init__.py", line 28, in _ +GetCurrentDebugger + currentDebugger = debugger.Debugger() +AttributeError: Debugger + +It seems the Scintilla.DLL can't be found (even the latest update from the +author's hompage). However, sys.path is OK: + +D:\Programme\Python\Pythonwin\pywin\debugger>python +Python 1.5.2 (#0, Apr 13 1999, 10:51:12) [MSC 32 bit (Intel)] on win32 +Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam +>>> import debugger +Traceback (innermost last): + File "", line 1, in ? + File "D:\Programme\Python\Pythonwin\pywin\debugger\debugger.py", line 24, in ? + + from pywin.framework import app, interact, editor + File "D:\Programme\Python\Pythonwin\pywin\framework\editor\__init__.py", line +90, in ? + LoadDefaultEditor() + File "D:\Programme\Python\Pythonwin\pywin\framework\editor\__init__.py", line +39, in LoadDefaultEditor + mod = __import__(prefModule) + File "D:\Programme\Python\Pythonwin\pywin\framework\editor\color\coloreditor.p +y", line 39, in ? + dllid = win32api.LoadLibrary("Scintilla.DLL") +pywintypes.api_error: (126, 'LoadLibrary', 'Das angegebene Modul wurde nicht gef +unden.') + +[The German error msg says "module not found"] + +>>> import sys +>>> for x in sys.path: print x +D:\Programme\Python +D:\Programme\Pythonwin +D:\Programme\Python\Pythonwin +D:\Programme\Python\win32 +D:\Programme\Python\win32\lib +D:\Programme\Python +D:\Programme\Python\Lib\plat-win +D:\Programme\Python\Lib +D:\Programme\Python\DLLs +D:\Programme\Python\Lib\lib-tk +D:\Programme\Python\DLLs +D:\Programme\Python\lib +D:\Programme\Python\lib\plat-win +D:\Programme\Python\lib\lib-tk +D:\Programme\Python + + +Stefan + + + + + diff --git a/demo/ermis-f/python_m/cur/0547 b/demo/ermis-f/python_m/cur/0547 new file mode 100644 index 00000000..9b75547b --- /dev/null +++ b/demo/ermis-f/python_m/cur/0547 @@ -0,0 +1,55 @@ +From: tismer at appliedbiometrics.com (Christian Tismer) +Date: Fri, 30 Apr 1999 08:11:54 GMT +Subject: Python IS slow ! [was] Re: Python too slow for real world +References: <613145F79272D211914B0020AFF6401914DAD8@gandalf.digicool.com> + + <7g9qmo$luf$1@news.udel.edu> +Message-ID: <372965CA.2B3FD2FE@appliedbiometrics.com> +Content-Length: 1845 +X-UID: 547 + + +Terry Reedy wrote: +> +> In article , +> wtanksle at dolphin.openprojects.net says... +> +> >The reason it's slow is its runtime model. _Every_ function call requires +> >a lookup in a hash table, just on the off-chance that the programmer +> >changed the meaning of the function. +> +> A batch-mode optimizer analyzing an entire file (module) should be able to +> detect whether or not function names are rebound. +> +> Perhaps module bindings should be considered immutable from outside the +> module unless explicitly declared otherwise. (This would of course require a +> new keyword and would break the rare existing code that does this until the +> new directive was added.) + +I'm thinking of no new keyword, but a mechanism which +allows me to lock a namespace somehow. At the end of a +library module, this function could be called for the module, +and all functions would be bound to a special table. +I would also like to be able to do this with functions +and classes. A function would be modified by resolving +all identifiers once. For classes, I would do a similar +snapshot, which would collect once every function/method which +can be seen by inheritance. +This is of course a semantic change, but it is an option +for people who know the implications. There is no need +for a library module to be slow, if it just suffers from +flexibility. + +ciao - chris + +-- +Christian Tismer :^) +Applied Biometrics GmbH : Have a break! Take a ride on Python's +Kaiserin-Augusta-Allee 101 : *Starship* http://starship.python.net +10553 Berlin : PGP key -> http://wwwkeys.pgp.net +PGP Fingerprint E182 71C7 1A9D 66E9 9D15 D3CC D4D7 93E2 1FAE F6DF + we're tired of banana software - shipped green, ripens at home + + + + diff --git a/demo/ermis-f/python_m/cur/0548 b/demo/ermis-f/python_m/cur/0548 new file mode 100644 index 00000000..a7bca23b --- /dev/null +++ b/demo/ermis-f/python_m/cur/0548 @@ -0,0 +1,57 @@ +From: frank.mcgeough at synchrologic.com (Frank McGeough) +Date: Thu, 22 Apr 1999 10:34:57 -0400 +Subject: Embedding Python - Win32 - Request for Info/Opinions +Message-ID: <371f32af.0@news.inet-systems.net> +Content-Length: 1992 +X-UID: 548 + +Hi, + +I've gotten Python to embed in a Win32 COM dll. (It's very simple, thanks to +everyone that worked on the PCBuild stuff). I wanted to ask a couple of +general questions because I'm curious about how I can use this in an actual +app. + +What do I need to install when I put this on a target machine? I start off +with creating a Python directory. If I put my COM dll, atl.dll and the +python15.dll in this directory I can get my wrapper to register...but do I +need to set PythonPath? do I need to install common py files? Where would I +put these? Do I just mirror (in a very small way) what the Python install +does? What is commonly done by people who are using Python commercially? + +If I want to use win32com stuff what else do I need to install? Again, does +it mirror the Python Windows install? I would think I grab the following +files: +In win32com directory : +__init__.pyc, olectl.pyc, storagecon.pyc, util.pyc +In client directory: +All the pyc files +In server directory: +All the pyc files +And I'd put them in a directory structure that mirrors the install under the +directory where I'll put the python dll. Is this correct? + +Is the Python interpreter thread-safe? In what I've done so far I've got an +in-proc dll marked as free-threaded. I have a com object that wraps the +Python interpreter and lets me pass files or strings into the interpreter. +What I want is to instantiate this COM object from different threads and +have those threads run scripts. Is this going to work? What have people done +to achieve the same kind of functionality? That is, use Python in a server +environment and get lots of different scripts executing at the same time. Do +they launch the interpreter at the command line as a separate process? + +I am going to be working over the next couple days to answer these questions +on my own but if someone already has the answers then that would help me +quite a bit. + +Thank you. +-- +Frank McGeough +Synchrologic,Inc. www.synchrologic.com +E-mail: fm at synchrologic.com + + + + + + diff --git a/demo/ermis-f/python_m/cur/0549 b/demo/ermis-f/python_m/cur/0549 new file mode 100644 index 00000000..657caab3 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0549 @@ -0,0 +1,59 @@ +From: tim_one at email.msn.com (Tim Peters) +Date: Tue, 13 Apr 1999 02:40:39 GMT +Subject: Problems with InteractiveInterpreter +In-Reply-To: <370F80BE.30B889A9@isoe.ch> +References: <370F80BE.30B889A9@isoe.ch> +Message-ID: <001001be8557$04b9ffa0$97a02299@tim> +Content-Length: 1044 +X-UID: 549 + +[Marcel Lanz, runs this: + + from code import InteractiveInterpreter + + lines = open('test2.py', 'r').readlines() + + ii = InteractiveInterpreter() + for line in lines: + ii.runsource(line) + +over input containing + + for i in 'hello': + print i + +and gets an error] + +> any ideas? + +Sure! Stick "print " in front of your ii.run... line, look at the return +values it prints, then read runsource's docstring. You can't expect it to +work feeding it one line at a time; you need to feed it a complete +executable fragment; & the return values tell you whether you've fed it +enough. + +You'll get a bit closer doing this instead: + +input = "" +for line in lines: + input = input + line + status = ii.runsource(input) + if status == 0: + input = "" + +But then you'll find that + +for i in 'hello': + print i + print "OK!" + +doesn't work as you want. At that point, you're ready to study the +InteractiveConsole class (also in code.py) to see what's really needed. + +try-to-think-like-the-interpreter-ly y'rs - tim + + + + + + diff --git a/demo/ermis-f/python_m/cur/0550 b/demo/ermis-f/python_m/cur/0550 new file mode 100644 index 00000000..79b416fe --- /dev/null +++ b/demo/ermis-f/python_m/cur/0550 @@ -0,0 +1,42 @@ +From: guido at eric.cnri.reston.va.us (Guido van Rossum) +Date: 22 Apr 1999 08:25:30 -0400 +Subject: Directory of current file +References: <371F0BD2.7D40A957@rubic.com> <00ee01be8cba$6e98dcb0$f29b12c2@pythonware.com> +Message-ID: <5lvheosuyt.fsf@eric.cnri.reston.va.us> +X-UID: 550 + +"Fredrik Lundh" writes: + +> how about a combination? +> +> import sys, os +> if __name__ == '__main__': +> _thisDir = sys.argv[0] +> else: +> _thisDir = sys.modules[__name__].__file__ + +Eh, what's wrong with simply using __file__? It's a global in your +own module, remember! + +> _thisDir = os.path.split(_thisDir)[0] + +One more refinement: instead of os.path.split(x)[0], use +os.path.dirname(x). + +The whole thing could become a one-liner: + +_thisDir = os.path.dirname(__name__ == '__main__' and sys.argv[0] or __file__) + +You could also use the little-known fact that sys.path[0] is the +script's directory; or the empty string if it's the current directory: + +if __name__ == '__main__': + _thisDir = sys.path[0] or os.curdir +else: + _thisDir = os.path.dirname(__file__) + +--Guido van Rossum (home page: http://www.python.org/~guido/) + + + + diff --git a/demo/ermis-f/python_m/cur/0551 b/demo/ermis-f/python_m/cur/0551 new file mode 100644 index 00000000..094d2cec --- /dev/null +++ b/demo/ermis-f/python_m/cur/0551 @@ -0,0 +1,40 @@ +From: ivnowa at hvision.nl (Hans Nowak) +Date: Sun, 25 Apr 1999 23:19:02 GMT +Subject: Hear ye! Snippets! Python-DX 1.5.2! +Message-ID: <199904252216.AAA17995@axil.hvision.nl> +Content-Length: 1129 +X-UID: 551 + +I'm posting this to comp.lang.python because for some reason (moving?) this +messages did not show up in c.l.py.anncounce. + +------- Forwarded Message Follows ------- + +Howdy y'all, + +A short announcement: + +*) Python-DX, my Python version for DOS, is now updated to 1.5.2 (was: 1.5). +The binaries are there, I will probably upload some makefiles too, and am +still thinking about uploading the complete source somewhere (but I don't +have so much homepage space, and the code really isn't that different from +the original...) +Go to http://www.cuci.nl/~hnowak/html/python-dx.html + +*) The Python Snippets page has been updated. It now has 62 snippets. Not +really a vast collection yet, but it's growing. (And YOU can help, too. ;^) +Of course it's still under construction, but the snippets should be visible +all right. +Go to http://www.hvision.nl/~ivnowa/snippets/ +or http://browse.to/python.snippets + +Veel liefs, + ++ Hans Nowak (Zephyr Falcon) ++ Homepage (under construction): http://www.cuci.nl/~hnowak/ ++ You call me a masterless man. You are wrong. I am my own master. ++ May a gossiping bitch rescue your rice rocket! + + + + diff --git a/demo/ermis-f/python_m/cur/0552 b/demo/ermis-f/python_m/cur/0552 new file mode 100644 index 00000000..5ef917a4 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0552 @@ -0,0 +1,23 @@ +From: phd at sun.med.ru (Oleg Broytmann) +Date: Fri, 9 Apr 1999 15:14:43 GMT +Subject: import from user input? +In-Reply-To: <370E0BF7.D6E35B7A@appliedbiometrics.com> +References: <370E0BF7.D6E35B7A@appliedbiometrics.com> +Message-ID: +X-UID: 552 + +Hi! + +> > Another question: is there a function to copy/move entire directory trees? + + There are functions in shutil.py; look for copytree()... + +Oleg. +---- + Oleg Broytmann National Research Surgery Centre http://sun.med.ru/~phd/ + Programmers don't die, they just GOSUB without RETURN. + + + + + diff --git a/demo/ermis-f/python_m/cur/0553 b/demo/ermis-f/python_m/cur/0553 new file mode 100644 index 00000000..5f3ee59c --- /dev/null +++ b/demo/ermis-f/python_m/cur/0553 @@ -0,0 +1,36 @@ +From: annis at biostat.wisc.edu (William Annis) +Date: 20 Apr 1999 09:45:11 -0500 +Subject: Killing popen-generated children +Message-ID: +Content-Length: 1223 +X-UID: 553 + + Is there any convenient way to get the PID of a process +created via os.popen? I've written a little GUI tool which takes +the output of some program and shoves it into a Text widget. +(Yes, I know that's a little silly, but it's sometimes useful in the +context of larger systems.) + + The GUI works via a filehandler, which means that a program +like 'ping -s somehost' (Solaris) will keep shoving output into the +Text widget... exactly what I want. + + The problem is that for programs that run forever, when you +quit GUI tool, the program you're catching the output of is orphaned, +and keeps running. Further, any attempt to close the pipe blocks +forever. This does not happen if you're collecting the output of a +program which quits on it's own ('ls', for example). + + So... I need to send a kill the offending children. I +suppose I could poke around in one of the Stevens books and +reimplement popen to give me a PID, but I'd rather not if someone else +has found a solution already. + +-- +William Annis - System Administrator - Biomedical Computing Group +annis at biostat.wisc.edu PGP ID:1024/FBF64031 +Mi parolas Esperanton - La Internacia Lingvo www.esperanto.org + + + + diff --git a/demo/ermis-f/python_m/cur/0554 b/demo/ermis-f/python_m/cur/0554 new file mode 100644 index 00000000..f66a80d6 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0554 @@ -0,0 +1,35 @@ +From: ljz at asfast.com (Lloyd Zusman) +Date: 26 Apr 1999 11:10:48 -0400 +Subject: GUI other than Tkinter +References: <3721567f.1748033@news> <7g1a8h$fae$1@Starbase.NeoSoft.COM> +Message-ID: +X-UID: 554 + +claird at Starbase.NeoSoft.COM (Cameron Laird) writes: + +> In article <3721567f.1748033 at news>, wrote: +> >Well, I've just about given up on EVER getting Tkinter to work on my +> >Win98 machine. Is there any other GUI module that I can get that +> >doesn't require TCL/TK to be installed on my machine? Isn't there +> . +> . +> . +> + +I appreciate this useful list. + +Also ... I noticed a refernce to `fltk' on this list, and I downloaded +and built it. However, I don't notice any Python support as part of +this distribution, and I'm wondering why `fltk' is on this "Python GUI" +list. Is there somewhere else where a Python interface to `fltk' +might exist? + +Thanks in advance. + +-- + Lloyd Zusman + ljz at asfast.com + + + + diff --git a/demo/ermis-f/python_m/cur/0555 b/demo/ermis-f/python_m/cur/0555 new file mode 100644 index 00000000..d8f99aff --- /dev/null +++ b/demo/ermis-f/python_m/cur/0555 @@ -0,0 +1,37 @@ +From: hinsen at cnrs-orleans.fr (Konrad Hinsen) +Date: 28 Apr 1999 12:35:02 +0200 +Subject: WARNING: AIX and dynamic loading. +References: <7g4i77$qif$1@nnrp1.dejanews.com> <3726DDD9.19A1@mailserver.hursley.ibm.com> +Message-ID: +Content-Length: 1197 +X-UID: 555 + +Paul Duffin writes: + +> > PROBLEM: +> > If you copy the module to the PYTHONPATH directory using cp, the old +> > file gets overwritten, but keeps the same inode number. Apparently, + +On my system (running AIX 4.3.1), it is *impossible* to overwrite +a shared library that has ever been loaded; all you get is an error +message claiming that the file is being used. + +> > SOLUTION: +> > You makefile should remove the old module (the .so file) before copying the +> > new version into the installation directory. Then the file gets a new + +This is what I had to do as well, in order to be able to copy a new +version. With that I never had any problems. + +-- +------------------------------------------------------------------------------- +Konrad Hinsen | E-Mail: hinsen at cnrs-orleans.fr +Centre de Biophysique Moleculaire (CNRS) | Tel.: +33-2.38.25.55.69 +Rue Charles Sadron | Fax: +33-2.38.63.15.17 +45071 Orleans Cedex 2 | Deutsch/Esperanto/English/ +France | Nederlands/Francais +------------------------------------------------------------------------------- + + + + diff --git a/demo/ermis-f/python_m/cur/0556 b/demo/ermis-f/python_m/cur/0556 new file mode 100644 index 00000000..1220645a --- /dev/null +++ b/demo/ermis-f/python_m/cur/0556 @@ -0,0 +1,50 @@ +From: guido at eric.cnri.reston.va.us (Guido van Rossum) +Date: 30 Apr 1999 11:22:50 -0400 +Subject: mktime() like function to produce GMT? +References: <00be01be9308$c649cf60$0301a8c0@cbd.net.au> <3729B855.3A7C6B5A@lemburg.com> +Message-ID: <5lu2ty9lpx.fsf@eric.cnri.reston.va.us> +Content-Length: 1428 +X-UID: 556 + +> Mark Nottingham wrote: +> > +> > I need a function to produce a Unix epoch time from a time tuple, a la +> > time.mktime(). Problem is, mktime() gives you the tuple in localtime, which +> > is dangerous if you're dealing with GMT times in the past (like in the +> > HTTP). +> > +> > Is there a function that will make a GMT epoch time straight from a time +> > tuple? + +"M.-A. Lemburg" replies: + +> On some platforms there is gmtime() which does exactly this. +> +> It's available through mxDateTime, BTW, which also offers a +> work-around solution for those platforms where it is not +> available. See the Python Pages below. + +Huh? The C library function gmtime() *returns* a time tuple in UTC +(the polutically correct name for GMT). + +The standard way to use mktime() with a UTC is to add or subtract the +timezone offset (I admit I can never remember which :-) and force the +DST flag off. + +The following function in rfc822 may be helpful (it takes a 10-tuple +whose last item is the tz offset; set this to 0 for UTC): + +def mktime_tz(data): + """Turn a 10-tuple as returned by parsedate_tz() into a UTC timestamp.""" + if data[9] is None: + # No zone info, so localtime is better assumption than GMT + return time.mktime(data[:8] + (-1,)) + else: + t = time.mktime(data[:8] + (0,)) + return t - data[9] - time.timezone + +--Guido van Rossum (home page: http://www.python.org/~guido/) + + + + diff --git a/demo/ermis-f/python_m/cur/0557 b/demo/ermis-f/python_m/cur/0557 new file mode 100644 index 00000000..510446da --- /dev/null +++ b/demo/ermis-f/python_m/cur/0557 @@ -0,0 +1,44 @@ +From: aaron_watters at my-dejanews.com (aaron_watters at my-dejanews.com) +Date: Mon, 19 Apr 1999 19:50:52 GMT +Subject: Memory and swapping question +References: <371B5ED8.A9C82170@appliedbiometrics.com> +Message-ID: <7fg1ep$t5s$1@nnrp1.dejanews.com> +Content-Length: 1487 +X-UID: 557 + +In article <371B5ED8.A9C82170 at appliedbiometrics.com>, + Christian Tismer wrote: +> due to a question which came up in the tutor list, I'd like +> to ask if somebody can explain the following:.... + +timings on making huge lists of integers... + +> On my system, creation takes about 10 times as for big/2, +> this is ok. But the del takes at least three times as long. +> Besides the fact that integers are never really disposed but +> build up a freelist, why is deletion so much slower now? + +Could be wrong, but this may be a case of a famous database +problem. The OS (typically) swaps out pages by picking the "least recently +used" page, but when you are decreffing (scanning) a HUGE list of sequentially +allocated objects this guarantees that the page you need next will +be swapped out by the time you get to it. Yikes! Allocation is faster +because you are really only "paging things out" (the first time) +and the write to the disk can be buffered until the disk is +ready, allowing the program to proceed (?I think?). + +This is one reason why Oracle and Sybase, etc, like to do their own +memory and disk management ("gimme them sectors -- don't need no +g.d. filesystem, thanks!"). Just a guess, but a not completely +uneducated one. + -- Aaron Watters +=== +stop procrastinating tomorrow. + + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/0558 b/demo/ermis-f/python_m/cur/0558 new file mode 100644 index 00000000..eb9e5f00 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0558 @@ -0,0 +1,29 @@ +From: cmedcoff at my-dejanews.com (cmedcoff at my-dejanews.com) +Date: Fri, 23 Apr 1999 02:36:03 GMT +Subject: help with os.popen() +Message-ID: <7fomaj$oo9$1@nnrp1.dejanews.com> +X-UID: 558 + +Hello, + +I'm new to python and need a bit of help with os.popen(). What is wrong with +the following? What am I doing wrong? (I'm running 1.52 on WinNT 4.0) + +>>>import os +>>> p = os.popen("dir", "rt", 1024) +Traceback (innermost last): + File "", line 1, in ? + p = os.popen("dir", "rt", 1024) +OSError: (0, 'Error') +>>> + + +Regards, +Chuck + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/0559 b/demo/ermis-f/python_m/cur/0559 new file mode 100644 index 00000000..1cb4012a --- /dev/null +++ b/demo/ermis-f/python_m/cur/0559 @@ -0,0 +1,22 @@ +From: aa8vb at vislab.epa.gov (Randall Hopper) +Date: Tue, 20 Apr 1999 17:02:08 GMT +Subject: Bug with makesetup on FreeBSD +In-Reply-To: <371CB31A.474D6FF@starmedia.net>; from Andrew Csillag on Tue, Apr 20, 1999 at 01:02:18PM -0400 +References: <19990416143607.B1546743@vislab.epa.gov> <19990416215633.C2020@ipass.net> <19990417112344.A1624668@vislab.epa.gov> <371CB31A.474D6FF@starmedia.net> +Message-ID: <19990420130208.A125414@vislab.epa.gov> +X-UID: 559 + + |I figured it out! If you build out of the ports tree, it's Tkinter + |configuration is all on one line (see + |/usr/ports/lang/python/files/Setup.tk), not broken by using backslash + |continuation as is in the distributed Setup file. I was building from + |the source release from www.python.org, not from the ports tree as you + |did, hence why you didn't run into it and I did. + +Ahh, makes sense. Glad you got to the bottom of it. + +Randall + + + + diff --git a/demo/ermis-f/python_m/cur/0560 b/demo/ermis-f/python_m/cur/0560 new file mode 100644 index 00000000..ada7a9f3 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0560 @@ -0,0 +1,56 @@ +From: gemodek at t-online.de (gemodek) +Date: Thu, 29 Apr 1999 21:49:51 +0200 +Subject: Read MS Access 97 *.mdb files with python?? +References: <37287369.D6E67313@t-online.de> <3728867D.94B5BBF9@appliedbiometrics.com> <3728A903.CF75B41A@pop.vet.uu.nl> +Message-ID: <3728B7DF.80E23481@t-online.de> +Content-Length: 1288 +X-UID: 560 + +Martijn Faassen wrote: +> +> Christian Tismer wrote: +> > +> > gemodek wrote: +> > > +> > > Does somebody know some +> > > piece of soft which can this?? +> > +... +... +> +> Unfortunately, all this advice may be useless, as I noticed that he's +> the same guy who asked about accessing an Access database on Linux. I +> know Linux can do ODBC, but I doubt there are Access drivers for ODBC on +> linux.. +> + +First: Thanks for the fast response :-) + +But,.. yes I am the guy who asked about accessing Access database on +Linux. +My idea is the following: +At my company we are running 4 Win95 PC's on a network which works +sometimes +and crash sometimes (some days no reboot, some days 5-10 times). +Now I am tired of the whole Win stuff, and I will install an Linux +Server +with Samba. (OK, the clients are still Win95, but at least the server is +linux). +We use also a software which is based on Access. The whole database (mdb +files) will reside on the Linux server. +So far so good. +But now, I want to extract some information out of the access database +to +create html files which everybody in our company is alowed to view. +And for this I need "access to Access". + +Thats the whole story. I'm searching also for a format description +of access, but I did not find anything (up to now!). + +bye + + Stephan + + + + diff --git a/demo/ermis-f/python_m/cur/0561 b/demo/ermis-f/python_m/cur/0561 new file mode 100644 index 00000000..40ff9bee --- /dev/null +++ b/demo/ermis-f/python_m/cur/0561 @@ -0,0 +1,15 @@ +From: kranio at nospam.nospam.it (Kranio) +Date: Thu, 29 Apr 1999 21:57:14 GMT +Subject: info +Message-ID: <37260fc0.3063146@news.tiscalinet.it> +X-UID: 561 + +Where I can find any docs about Python' semantics ? + +Tnx + +Kranio + + + + diff --git a/demo/ermis-f/python_m/cur/0562 b/demo/ermis-f/python_m/cur/0562 new file mode 100644 index 00000000..0426f370 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0562 @@ -0,0 +1,34 @@ +From: dobbe at xs3.xs4all.nl (Camiel Dobbelaar) +Date: 9 Apr 1999 12:01:35 GMT +Subject: Publishing 'live' Python objects +Message-ID: <7ekq6v$of7$1@news2.xs4all.nl> +X-UID: 562 + +Hi Pythoneers, + +I'm looking for advice on the following: + +Suppose I have a Python program that essentially does the following: + +while 1: + read from stdin + + update some buffer objects + +I now wish to take a look at snapshots of those buffer objects in +'real-time'. (the program continues running and updating the buffers) +I'd like to do this with HTTP. + +Is this possible? I gave Zpublisher a try, but I don't think it can do +what I want. Should I look into using threads? + + +Thanks, + +Camiel + + + + + + diff --git a/demo/ermis-f/python_m/cur/0563 b/demo/ermis-f/python_m/cur/0563 new file mode 100644 index 00000000..62f7371c --- /dev/null +++ b/demo/ermis-f/python_m/cur/0563 @@ -0,0 +1,18 @@ +From: gsez020 at kryten.bedford.waii.com (Pete Forman) +Date: 28 Apr 1999 12:09:58 +0100 +Subject: WARNING: AIX and dynamic loading. +References: <7g4i77$qif$1@nnrp1.dejanews.com> +Message-ID: +X-UID: 563 + +Did you try running slibclean? That flushes out dynamic libraries +that are no longer being used from memory. This forces a reload from +disk when a library is next used. +-- +Pete Forman +Western Geophysical +pete.forman at westgeo.com + + + + diff --git a/demo/ermis-f/python_m/cur/0564 b/demo/ermis-f/python_m/cur/0564 new file mode 100644 index 00000000..fdff342f --- /dev/null +++ b/demo/ermis-f/python_m/cur/0564 @@ -0,0 +1,50 @@ +From: kj7ny at email.com (kj7ny at email.com) +Date: Fri, 2 Apr 1999 23:57:14 -0800 +Subject: TIFF, Python, and LibTiff +References: <6E5FB8BFB7CDD2118F6700A0C9E5871623B853@apexnews.rl.gov> +Message-ID: <7e4be9$ido$1@paperboy.owt.com> +Content-Length: 1322 +X-UID: 564 + +Sorry about this post. I originally posted this message close to a year ago. +I have no idea where it came from again. I assume there was a server problem +on our end. + +I took Guido's advise (way back then) and a just wrote my own TiffLib +module. + +It works great and I couldn't have done it without Python!!!!!!!!! + +The module not only creates Multi-Page Tiffs (MPT) out of Single-Page Tiffs +(SPT), but it has the ability to create what I call "Streaming Multi-Page +Tiffs". + +The first version I wrote merely grabbed all of the SPT files, combined them +into a single MPT file, and stored it on magnetic. That took up too much +storage and was too limiting. + +I rewrote it to have the option to stream the MPT back to the client without +storing a copy on magnetic. + +The user can now select any range of pages (e.g. pages 50-60 out of 1037 +pgs) to speed download and get just the pages they need. For some reason, +testing shows that the download time is consistently a few seconds faster if +the file is created on the fly than if it already existed and was just +downloaded (go figure?). + +If you're curious, the application can be seen at +http://www2.hanford.gov/declass + +You'd have to drill down through "Advanced Search" and find a document to +get to the streaming. + +...couldn't have done it without Python!!!!... + +Later, + + + + + + + diff --git a/demo/ermis-f/python_m/cur/0565 b/demo/ermis-f/python_m/cur/0565 new file mode 100644 index 00000000..e2f20826 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0565 @@ -0,0 +1,64 @@ +From: gmcm at hypernet.com (Gordon McMillan) +Date: Thu, 22 Apr 1999 22:06:26 GMT +Subject: Embedding Python - Win32 - Request for Info/Opinions +In-Reply-To: <371f32af.0@news.inet-systems.net> +References: <371f32af.0@news.inet-systems.net> +Message-ID: <1287303503-36876650@hypernet.com> +Content-Length: 2253 +X-UID: 565 + +Frank McGeough writes: +> +> I've gotten Python to embed in a Win32 COM dll. (It's very simple, +> thanks to everyone that worked on the PCBuild stuff). I wanted to +> ask a couple of general questions because I'm curious about how I +> can use this in an actual app. +> +> What do I need to install when I put this on a target machine? I +> start off with creating a Python directory. If I put my COM dll, +> atl.dll and the python15.dll in this directory I can get my wrapper +> to register...but do I need to set PythonPath? do I need to install +> common py files? Where would I put these? Do I just mirror (in a +> very small way) what the Python install does? What is commonly done +> by people who are using Python commercially? + +You can take complete control by providing exceptions.py and a +site.py in the app's current directory. Use site.py to force whatever +twisted perverted setup you desire. See + http://www.mcmillan-inc.com/install.html + +> If I want to use win32com stuff what else do I need to install? + +The above package has something that will determine all your +dependencies, both scripts and (since you have MSVC), binary. + +For COM servers, COM needs to be able to find your stuff. That used +to mean installing on the PATH somewhere, but I think build 124 +of Mark's stuff fixes that. + +> Is the Python interpreter thread-safe? In what I've done so far I've +> got an in-proc dll marked as free-threaded. + +This should work fine. Python is thread safe for Python-created +threads. Getting it to work with C-created threads is do-able, but a +headache. + +> I have a com object that +> wraps the Python interpreter and lets me pass files or strings into +> the interpreter. What I want is to instantiate this COM object from +> different threads and have those threads run scripts. Is this going +> to work? What have people done to achieve the same kind of +> functionality? That is, use Python in a server environment and get +> lots of different scripts executing at the same time. + +We've seen postings from people working towards this same idea, but +I've never been clear on why you'd run have one process executing a +bunch of independent scripts. It's a lot less work and not much more +load on the OS to run separate processes. + + +- Gordon + + + + diff --git a/demo/ermis-f/python_m/cur/0566 b/demo/ermis-f/python_m/cur/0566 new file mode 100644 index 00000000..6147e973 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0566 @@ -0,0 +1,29 @@ +From: befletch at my-dejanews.com (befletch at my-dejanews.com) +Date: Tue, 13 Apr 1999 17:39:16 GMT +Subject: ZopeHTTP speed problem. +References: <7etton$j4q$1@nnrp1.dejanews.com> <371358fb.4741377@news.omnilink.de> +Message-ID: <7evvg3$b4e$1@nnrp1.dejanews.com> +X-UID: 566 + +In article <371358fb.4741377 at news.omnilink.de>, + spamfranke at bigfoot.de (Stefan Franke) wrote: +> [...] +> > I found I have to use +> >my machine's numeric IP address, not 'localhost' as the docs indicate. +> +> Do you get the long response times even *with* using your +> localhost's IP address? + +Yes, I do. And yes, eliminating the reverse DNS lookup as you suggested +made it work properly. That along with the "-t" threads option gives me +enough responsiveness to evaluate Zope properly. + +Thanks for the help, +- Bruce + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/0567 b/demo/ermis-f/python_m/cur/0567 new file mode 100644 index 00000000..eff49b68 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0567 @@ -0,0 +1,39 @@ +From: mwh21 at cam.ac.uk (Michael Hudson) +Date: 13 Apr 1999 10:59:59 +0100 +Subject: Lexical analyzers and parsers +References: <7jn20jmxsw.fsf@gandalf.midearth.fuzzys.org> <14092.48400.954787.617539@amarok.cnri.reston.va.us> +Message-ID: +X-UID: 567 + +"Andrew M. Kuchling" writes: +> Julien Oster writes: +> >What about lexical analyzers and parsers? +> > +> >Under C I use bison/yacc and (f)lex. Under python, I can either implement this +> >stuff using C or try to write my parsers on my own, which is real pain. +> +> There are actually a bunch of different systems available; see +> http://starship.python.net/crew/amk/python/string.html#parsing +> for a list. (If I've missed any, let me know.) + +A lot of those links are a bit dated: + +kwParsing should probably link www.chordate.com, not the starship +mcf.pars seems to have gone missing; I can't find it at any rate. +"A parser generator based on M.-A. Lemburg's mxTextTools" likewise +The link to PyBison got me a "connection refused"; this may be +temporary (or not) + +These are the first four on the list, which is a little disconcerting! + +All the others work. + +Now I have to find one I can use.. + +HTH + +Michael Hudson + + + + diff --git a/demo/ermis-f/python_m/cur/0568 b/demo/ermis-f/python_m/cur/0568 new file mode 100644 index 00000000..f92ceba6 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0568 @@ -0,0 +1,48 @@ +From: tismer at appliedbiometrics.com (Christian Tismer) +Date: Mon, 5 Apr 1999 14:08:14 GMT +Subject: Is Python dying? +References: <7dos4m$usi$1@nnrp1.dejanews.com> <37009C12.4C0E6B0B@earth.ox.ac.uk> <922837384snz@vision25.demon.co.uk> + <7dtbu1$rpn$1@nnrp1.dejanews.com> + <37025110.1BA742B@appliedbiometrics.com> +Message-ID: <3708C3CE.1044311F@appliedbiometrics.com> +Content-Length: 1445 +X-UID: 568 + + +Jim Richardson wrote: + +[about printed Python docs] + +> I used mpage to condense them down to 2 pages per 8x11 sheet, and +> then printed odd/even, cycled the paper throgh the laser printer twice, +> bound them with those little springy plastic spiral things, and +> viola, a 5x8, Reference with the tutorial, the api, &etc all at once. +> Took something a little over 100 pages. I would have printed 4 to a page +> but I couldn't figure how to make mpage do the registering properly for +> 2 stage double sided printing. + +Well, not bad. :-) +4 to a page would be a mess for my eyes, BTW. + +I printed the manuals once when 1.4 was out, then never again. +But I would buy it as a book if it were available. +Therefore, I decided to take this as a toy project, +and to turn this all into a real book, with Framemaker. +I'm currently seeking for a publisher who wants it, +and I will prepare a book with the Python docs around +July (being occupied before). +I hope that this will be already for Python 1.6. + +cheers - chris + +-- +Christian Tismer :^) +Applied Biometrics GmbH : Have a break! Take a ride on Python's +Kaiserin-Augusta-Allee 101 : *Starship* http://starship.python.net +10553 Berlin : PGP key -> http://wwwkeys.pgp.net +PGP Fingerprint E182 71C7 1A9D 66E9 9D15 D3CC D4D7 93E2 1FAE F6DF + we're tired of banana software - shipped green, ripens at home + + + + diff --git a/demo/ermis-f/python_m/cur/0569 b/demo/ermis-f/python_m/cur/0569 new file mode 100644 index 00000000..a2a0e94e --- /dev/null +++ b/demo/ermis-f/python_m/cur/0569 @@ -0,0 +1,20 @@ +From: jlee at fastech.com (Jaeho Lee) +Date: Mon, 12 Apr 1999 20:47:55 GMT +Subject: how to use exec +Message-ID: <7etm5o$bvm$1@nnrp1.dejanews.com> +X-UID: 569 + +Hi folks, I'm making test tools based on python. I want to test script +includes python script and test tools execute the command dynamically. "exec" +is good for this. But if exec runs assign statement, it stores the variable +in local area. I want to put the variable in global area. How can I do this? +I saw this in python pocket reference. exec codestring [in globaldict [, +localdict]] But this syntax does not work. Could somebody let me know how to +use exec? + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/0570 b/demo/ermis-f/python_m/cur/0570 new file mode 100644 index 00000000..5b4f4918 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0570 @@ -0,0 +1,18 @@ +From: samschul at ix.netcom.com (Sam Schulenburg) +Date: Fri, 2 Apr 1999 20:43:16 -0800 +Subject: How do you access a windows printer from python? +Message-ID: <7e46o8$sln@sjx-ixn9.ix.netcom.com> +X-UID: 570 + +I would like to add a print function to the IDLE file menu, but do not have +any idea on how to access a win32 printer from Python. I know that i could +add this functionality to a dll and call the dll routine to accomplish my +task. I thought I would see if their is a beater way :>) + +Sam Schulenburg + + + + + + diff --git a/demo/ermis-f/python_m/cur/0571 b/demo/ermis-f/python_m/cur/0571 new file mode 100644 index 00000000..fb1d20ba --- /dev/null +++ b/demo/ermis-f/python_m/cur/0571 @@ -0,0 +1,31 @@ +From: phd at sun.med.ru (Oleg Broytmann) +Date: Thu, 8 Apr 1999 16:27:36 GMT +Subject: GadFly - MemoryError +In-Reply-To: <7eih6b$ck2$1@nnrp1.dejanews.com> +References: <7eih6b$ck2$1@nnrp1.dejanews.com> +Message-ID: +X-UID: 571 + +Hi! + +On Thu, 8 Apr 1999 aaron_watters at my-dejanews.com wrote: +> It would be interesting to try this, but my guess is that this would be +> slower than the first query since equalities are optimized and "in" is not. +> I hope oleg is using gadfly 1.0 too (not beta 0.2 or whatever). -- Aaron +> Watters + + I started playing with GadFly a few weeks ago, so I downloaded latest +versions of GadFly and kjBuckets. + Yesterday I found a way to use kjSet in my program. + + BTW, what are "kw" in "kwParsing" and "kj" in "kjBuckets"? + +Oleg. +---- + Oleg Broytmann National Research Surgery Centre http://sun.med.ru/~phd/ + Programmers don't die, they just GOSUB without RETURN. + + + + + diff --git a/demo/ermis-f/python_m/cur/0572 b/demo/ermis-f/python_m/cur/0572 new file mode 100644 index 00000000..3b65f660 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0572 @@ -0,0 +1,55 @@ +From: guido at eric.cnri.reston.va.us (Guido van Rossum) +Date: 30 Apr 1999 00:38:04 -0400 +Subject: Trouble with proxies +References: <7gasj8$g79$1@nnrp1.dejanews.com> +Message-ID: <5lzp3qafkj.fsf@eric.cnri.reston.va.us> +Content-Length: 2084 +X-UID: 572 + +befletch at my-dejanews.com writes: + +> I have tried all the suggestions people have sent me, and I have tried all +> the local debugging I could think of, but I still can't see the world from +> behind my proxy server. Can anyone find a possible solution to this? I've +> had to modify my URL lines with (colin-slash-slash) to get past DejaNews' +> Draconian posting filters: +> +> C:\>SET http_proxy=http(colin-slash-slash)10.187.200.230 +> +> C:\>"C:\Program Files\Python\python.exe" +> Python 1.5.2 (#0, Apr 13 1999, 10:51:12) [MSC 32 bit (Intel)] on win32 +> Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam +> >>> import urllib +> >>> u=urllib.urlopen('http(colin-slash-slash)www.yahoo.com') +> Traceback (innermost last): +> File "", line 1, in ? +> File "C:\Program Files\Python\Lib\urllib.py", line 59, in urlopen +> return _urlopener.open(url) +> File "C:\Program Files\Python\Lib\urllib.py", line 157, in open +> return getattr(self, name)(url) +> File "C:\Program Files\Python\Lib\urllib.py", line 266, in open_http +> errcode, errmsg, headers = h.getreply() +> File "C:\Program Files\Python\Lib\httplib.py", line 121, in getreply +> line = self.file.readline() +> File "C:\Program Files\Python\Lib\plat-win\socket.py", line 117, in readline +> new = self._sock.recv(self._rbufsize) +> IOError: [Errno socket error] (10054, 'winsock error') +> >>> + +A quick lookup in errno.errorcode shows that that error is +WSAECONNRESET, in other words the connection is reset by the server. +This apparently happens after the proxy has read your headers. Could +it be that the proxy server requires some kind of magic header? Ask +the sysadmin who is responsible for the proxy. At least find out what +the proxy software is, you can probably find the specs on the web.... + +If you have a way to snoop network packets, it would be interesting to +see what traffic happens when your regular browser (IE or netscape) +connects to the proxy from the same client machine (I'm assuming that +works!). + +--Guido van Rossum (home page: http://www.python.org/~guido/) + + + + diff --git a/demo/ermis-f/python_m/cur/0573 b/demo/ermis-f/python_m/cur/0573 new file mode 100644 index 00000000..badd3f72 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0573 @@ -0,0 +1,37 @@ +From: phd at sun.med.ru (Oleg Broytmann) +Date: Mon, 19 Apr 1999 09:56:02 GMT +Subject: How to merge data in a existant file +In-Reply-To: <7feqbf$pr6$1@nnrp1.dejanews.com> +References: <7feqbf$pr6$1@nnrp1.dejanews.com> +Message-ID: +X-UID: 573 + +Hi! + +On Mon, 19 Apr 1999 fquiquet at lemel.fr wrote: +> I know how to write data in a new file : +> +> f=open('file.name','w') +> f.write('data') +> f.close() +> +> I don't know what is the function that permit to add data whithout erase +> existing data. + +f=open('file.name', 'a') + ^ append + Other file modes are 'r+' and 'w+'. Read python documenataion on file +modes and open(). Remember to use 'b' when working with binary files +(mode = 'rb', for example.) + +> Thank's for your response to fquiquet at lemel.fr + +Oleg. +---- + Oleg Broytmann National Research Surgery Centre http://sun.med.ru/~phd/ + Programmers don't die, they just GOSUB without RETURN. + + + + + diff --git a/demo/ermis-f/python_m/cur/0574 b/demo/ermis-f/python_m/cur/0574 new file mode 100644 index 00000000..d3f702ab --- /dev/null +++ b/demo/ermis-f/python_m/cur/0574 @@ -0,0 +1,24 @@ +From: tjreedy at udel.edu (Terry Reedy) +Date: 7 Apr 1999 02:31:00 GMT +Subject: Xbase++ preprocessor implementation in Python +References: <37097A3A.F772205@magna.com.au> +Message-ID: <7eeg14$35f$1@news.udel.edu> +X-UID: 574 + +In article <37097A3A.F772205 at magna.com.au>, garys at magna.com.au says... + +>Attached please find a Python implementation of the Xbase++ preprocessor. +... +>Oh, and it is *dead slow*! - hundreds of times slower I think! +... + +I do not know re's well enough to comment on whether they can be rewritten +to run faster. I believe there is a python profiler which might give +indications on where to start to speed things up. + +Terry J. Reedy + + + + + diff --git a/demo/ermis-f/python_m/cur/0575 b/demo/ermis-f/python_m/cur/0575 new file mode 100644 index 00000000..754e3c07 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0575 @@ -0,0 +1,52 @@ +From: dgp at clover.cam.nist.gov (Don Porter) +Date: 13 Apr 1999 10:58:59 -0400 +Subject: Help: Tkinter, bad event type +References: <37134F3B.8C583E0@btk.utu.fi> +Message-ID: <7evm3j$217$1@clover.cam.nist.gov> +Content-Length: 1942 +X-UID: 575 + + wrote: +> I'm running Python 1.5.2c1 under Win NT with SP4 and Tcl/Tk 8.05. When I +> try to run any script that uses Tkinter, even hello.py from the Tkinter +> Life Preserver, I get two identical error messages: +> +> bad event type or keysym "MouseWheel" +> while executing "bind Listbox ..." invoked from +> /listbox.tcl +> ... +> invoked from /tk.tcl + +I've not used Python or Tkinter, but that message appears when a +pre-8.0.4 Tk library tries to evaluate the initialization scripts +distributed with Tk 8.0.4 or later. Can you check the value of +the Tcl variable 'tk_patchLevel' to see for sure that your apps +are using matching versions of the Tk library and the initialization +scripts? Perhaps they're linking to an earlier version of the Tk +shared library which is somewhere on your system? Perhaps there's +an old tk80.dll in your .../Windows/System area? + +> I can work around this by editing listbox.tcl and commenting out the +> "bind Listbox ..." statement, but I have to do this every +> time I install a new version of Tcl/Tk, and it's annoying. + +Rather than comment out, wrap these statements (there's also one +in text.tcl) in code which tests the value of the global variable +tk_patchLevel, and evaluates the MouseWheel binding only if +tk_patchLevel reports that the Tk library 8.0.4 or later is in use. + +...but you still have to do that for every new 8.0.x release of +Tk unless you can convince Scriptics to fix this bug. To report +it to them, use their WWW Bug Report Form: + + http://www.scriptics.com/support/bugForm.tcl + +-- +| Don Porter, D.Sc. Mathematical and Computational Sciences Division | +| donald.porter at nist.gov Information Technology Laboratory | +| http://math.nist.gov/mcsd/Staff/DPorter/ NIST | +|______________________________________________________________________| + + + + diff --git a/demo/ermis-f/python_m/cur/0576 b/demo/ermis-f/python_m/cur/0576 new file mode 100644 index 00000000..50e6ffdc --- /dev/null +++ b/demo/ermis-f/python_m/cur/0576 @@ -0,0 +1,29 @@ +From: peter.stoehr at weihenstephan.org (Dr. Peter Stoehr) +Date: Sun, 11 Apr 1999 22:41:56 +0200 +Subject: idle : Setting breakpoints within the debugger +Message-ID: <37110914.938829F3@weihenstephan.org> +X-UID: 576 + +Hi out there, + +I hope this is not a FAQ, but I didn't find something in the docs of +idle :-(. + +I try to set a breakpoint while debugging a script using the built in +debugger +by pressing the right mouse button. +Well, all I get is a "beep" and no breakpoint is set. Am I doing +something +wrong and if what ? + + Any help is welcome + Peter +-- +--------------------------------------------------------------------------- + Dr. Peter Stoehr --- Teisenbergweg 6 --- 85435 Erding --- 08122/47232 +--------------------------------------------------------------------------- + I'm the terror that flaps through the night + + + + diff --git a/demo/ermis-f/python_m/cur/0577 b/demo/ermis-f/python_m/cur/0577 new file mode 100644 index 00000000..8aeab73f --- /dev/null +++ b/demo/ermis-f/python_m/cur/0577 @@ -0,0 +1,54 @@ +From: mal at lemburg.com (M.-A. Lemburg) +Date: Mon, 12 Apr 1999 22:00:23 GMT +Subject: ANN: Python Database API Specification 2.0 +Message-ID: <37126CF7.79F8AF72@lemburg.com> +Content-Length: 1358 +X-UID: 577 + +The Python Database SIG is proud to announce a new revision of +the database interface specification for Python: + + *** Python Database API Specification 2.0 *** + +The new version of the specification fixes some important short comings +of the old 1.0 version. Most notably, the dbi abstraction module +was folded into the interface module and new abstract data type +constructors were added. + +You can find the version 2.0a15 document on the DB-SIG web-site +at www.python.org (this URL will become the official citation +URL for the specification): + + http://www.python.org/topics/database/DatabaseAPI-2.0.html + +Until the above page is updated, you can find the final 2.0 version +on Starship: + + http://starship.skyport.net/~lemburg/DatabaseAPI-2.0.html + +Here are a few more links that should be of interest if you +intend to do database related work with Python: + +The DB-SIG homepage: + http://www.python.org/sigs/db-sig/ + +The Database Topic Guide: + http://www.python.org/topics/database/ + +The old version 1.0 of the specification: + http://www.python.org/topics/database/DatabaseAPI-1.0.html + +We hope that this long needed update will be welcomed by the +Python database community. + +Enjoy ! + +

+X-UID: 579 + +Hey all... + +I'm interested in writing a Python script that can be controlled by +email. I've read all the relevant Library documentation and the FAQ +and searched the howto's but have not found some specific bits of +information I need. That's when I turn to comp.lang.python. ;-) + +Periodically, I want my daemon to check a standard Unix mail spool +file for new messages. Under certain conditions, I want the script to +act on those messages (ie, do its thang on the contents of the message +and mail the results back to the sender.) + +I've looked at the mailbox.UnixMailbox package. I am able to write a +script that retrieves each message in /var/spool/mail/myuser and +displays the sender, recipient, and subject. I am able to generate a +reply using /usr/bin/mail. But for the life of me, I cannot look at +the body of the incoming message. Silly me. Where in the +documentation is this describe? 10 points to anyone who can point out +the specific place to me. + +Many thanks, + +Preston Landers +Austin, Texas + + + + + diff --git a/demo/ermis-f/python_m/cur/0580 b/demo/ermis-f/python_m/cur/0580 new file mode 100644 index 00000000..1dd82843 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0580 @@ -0,0 +1,33 @@ +From: polley at netins.net (Jonathan Polley) +Date: 6 Apr 1999 00:46:11 GMT +Subject: FYI: Conflict Between Python1.5.2b2 and win32all-123 +Message-ID: <01be7fc6$af6c11e0$01656565@fidget> +X-UID: 580 + +I have installed Python 1.5.2b2 then installed win32all-123. When I invoke +IDLE with a file name on the commandline, I get the following error: + +Traceback (innermost last): + File "C:\Program Files\Python\Pythonwin\pywin\framework\scriptutils.py", +line 236, in RunScript + exec codeObject in __main__.__dict__ + File "C:\PROGRA~1\PYTHON\TOOLS\IDLE\idle.py", line 3, in ? + PyShell.main() + File "C:\PROGRA~1\PYTHON\TOOLS\IDLE\PyShell.py", line 780, in main + aPath = os.path.abspath(os.path.dirname(filename)) + File "C:\Program Files\Python\Lib\ntpath.py", line 398, in abspath + return win32api.GetFullPathName(path) +api_error: (161, 'GetFullPathName', 'The specified path is invalid.') + + +If I remove pythonwin, the error goes away. Since I don't plan on running +IDLE with files as arguments, the current behavior is not an issue for me. +I have noticed that there is a 124 version on Marks Hammond's web site and +will see if the problem exists with that update. + +Jon Polley +polley at netins.net + + + + diff --git a/demo/ermis-f/python_m/cur/0581 b/demo/ermis-f/python_m/cur/0581 new file mode 100644 index 00000000..660d1f4b --- /dev/null +++ b/demo/ermis-f/python_m/cur/0581 @@ -0,0 +1,39 @@ +From: joe at strout.net (Joe Strout) +Date: Fri, 09 Apr 1999 13:48:46 -0700 +Subject: povray.py +References: <__YN2.30200$FZ5.11443@news.rdc1.sfba.home.com> <370E4F3E.F9C2CD07@lockstar.com> +Message-ID: +Content-Length: 1093 +X-UID: 581 + +In article , Quinn Dunkan + wrote: + +> pov.py v0.0: +> http://www.calarts.edu/~elaforge/pov/ +> +> I guess it's released now :) + +Cool! Looks very neat. I'm not quite clear on how you're planning to +handle animations. Will your Python script spit out a different +POV-Ray script for each time point? Or will it spit out a whole series +of them? Some things, like flocking behavior, are really hard to +implement in a clock-independent way. + +Also, I see matrix transforms are on your to-do list. I suggest you +use the Numeric module. Use dot(m1,m2) or dot(m1,v) to combine +matrices or apply a transformation matrix to a vector, respectively. + +Cheers, +-- Joe + +-- +,------------------------------------------------------------------. +| Joseph J. Strout Biocomputing -- The Salk Institute | +| joe at strout.net http://www.strout.net | +`------------------------------------------------------------------' +Check out the Mac Web Directory! http://www.strout.net/macweb.cgi + + + + diff --git a/demo/ermis-f/python_m/cur/0582 b/demo/ermis-f/python_m/cur/0582 new file mode 100644 index 00000000..c3319633 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0582 @@ -0,0 +1,68 @@ +From: dalke at bioreason.com (Andrew Dalke) +Date: Thu, 29 Apr 1999 18:51:57 -0600 +Subject: converting perl to python - simple questions. +References: <000201be929f$636d10a0$5fa02299@tim> +Message-ID: <3728FEAD.CF650A4@bioreason.com> +Content-Length: 2216 +X-UID: 582 + +Uncle Tim said: +> Here's a topic for civil debate: Resolved: returning different stuff +> depending on whether an expression is in array or scalar context is no +> worse than killing those of your classmates wearing shirts with sports +> insignia . + +Using the formalism of symbolic algebra we start with the universe +of concepts denoted U. We choose two items, A,B which are elements +of U such that: + + A = "returning different stuff depending on whether an expression is +in array or scalar context" + +and + + B = "killing those of your classmates wearing shirts with sports +insignia" + + +It is obvious that there exists some metric M which induces an +ordering in U such that if X,Y are elements of U then the statement +"X is worse than Y" is either correct or incorrect. We denote "X +is worse than Y" by the expressions "X > Y" or "Y < X". The other +standard expression for equality and inequality apply as normal, +and it should be observed that this is a partial ordering as there +can be some X,Y in U where X < Y and X > Y are both incorrect (so +X == Y) using M but X is not identical to Y in U. + +We can derive such a metric M through newscasts and other forms of +media. From this it is a relatively trivial matter to conclude that + + A < B + +given M(media) on U. Hence it is seen that it is not true that B >= A +and so the statement proposed by in his +paper <000201be929f$636d10a0$5fa02299 at tim>. + + "returning different stuff depending on whether an expression is + in array or scalar context is no worse than killing those of your + classmates wearing shirts with sports insignia" + +is a correct one, and that we can make the even stronger assertion + + "returning different stuff depending on whether an expression is + in array or scalar context is less worse than killing those of + your classmates wearing shirts with sports insignia" + +as the equivalence case has been shown to be false for the given +M(media). It remains to be seen if there exists some M for which +these statements are incorrect. + +(Whew - got that math lingo coursing through my system now, and +hence we see that I should halt before I further such discussions :) + + Andrew + dalke at acm.org + + + + diff --git a/demo/ermis-f/python_m/cur/0583 b/demo/ermis-f/python_m/cur/0583 new file mode 100644 index 00000000..819f3426 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0583 @@ -0,0 +1,26 @@ +From: KUNCEJ at mail.conservation.state.mo.us (Jeffrey Kunce) +Date: Wed, 21 Apr 1999 20:55:11 GMT +Subject: How do I use proxies with httplib? +Message-ID: +X-UID: 583 + +>I want to use httplib through a proxy server and I can't seem to get +>it to work. Someone in this group suggested setting an environment +>variable, like: +> +>SET http_proxy="12.189.130.200:80" + +I don't know that that will work for httplib. +I know it *does* work with urllib. +An example from memory (not tested): + +import os, urllib +os.environ['http_proxy']="http://12.189.130.200:80" +f = urllib.urlopen('http://www.python.org') +data = f.read() + + --Jeff + + + + diff --git a/demo/ermis-f/python_m/cur/0584 b/demo/ermis-f/python_m/cur/0584 new file mode 100644 index 00000000..9c0b9eb5 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0584 @@ -0,0 +1,42 @@ +From: hyoon at bigfoot.com (Hoon Yoon) +Date: Wed, 14 Apr 1999 08:57:40 -0400 +Subject: Delphi Linux and Python +Message-ID: <371490C4.F19BA4F5@bigfoot.com> +Content-Length: 1219 +X-UID: 584 + +Hi, + + I heard about this free Delphi for Linux being developed by + +http://www.megido.org/ +& There is a free 32-bit Pascal compiler for Linux at +http://www.brain.uni-freiburg.de/~klaus/fpc/fpc.html + +& GNU General Public License (GPL) +Pascal and Basic Linux RAD IDE Lazarus +http://www.pcpros.net/~vbman/ + + Given that Python can be extended & embedded directly into/by Delphi, +can same be use to by Delphi in Unix environment like Linux and Solaris? +Have anyone tried it? + Inquiring minds wanna know. +Thanks, +-- +***************************************************************************** +S. Hoon Yoon (Quant) Merrill Lynch Equity Trading, +yelled at yahoo.com hoon at bigfoot.com(w) +"Miracle is always only few standard deviations away, but so is +catastrophe." +* Expressed opinions are often my own, but NOT my employer's. +"I feel like a fugitive from the law of averages." Mauldin +***************************************************************************** +-------------- next part -------------- +A non-text attachment was scrubbed... +Name: vcard.vcf +Type: text/x-vcard +Size: 202 bytes +Desc: Card for Hoon Yoon +URL: + + diff --git a/demo/ermis-f/python_m/cur/0585 b/demo/ermis-f/python_m/cur/0585 new file mode 100644 index 00000000..414fe272 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0585 @@ -0,0 +1,33 @@ +From: boud at rempt.xs4all.nl (boud at rempt.xs4all.nl) +Date: Wed, 14 Apr 1999 22:00:20 GMT +Subject: Tutorial Python +References: <3714BAA0.12F180F3@xs4all.nl> <3714E1D8.AE305670@earthlink.net> +Message-ID: +X-UID: 585 + +susan e paolini wrote: +: +: Python + KDE Tutorial +: +: Perhaps this will help Frank +: + +Um, not really. What my tutorial teaches you is the rudiments +of programming in Python using the KDE and Qt libraries. +What Frank needs is a tutorial that focuses on the rudiments of +Python and the interaction between Python and CGI. + +The only part where CGI programming is mentioned is the introduction, +where I give it as part of the reason I went over to Python. + +I learned CGI programming with Python from Guido's Python tutorial +and the cgi module documention - which did not prevent me from +asking a silly question on this group. But it should be enough +to get him started. +-- + +Boudewijn Rempt | www.xs4all.nl/~bsarempt + + + + diff --git a/demo/ermis-f/python_m/cur/0586 b/demo/ermis-f/python_m/cur/0586 new file mode 100644 index 00000000..6e673ab3 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0586 @@ -0,0 +1,24 @@ +From: guido at CNRI.Reston.VA.US (Guido van Rossum) +Date: Thu, 8 Apr 1999 23:22:52 GMT +Subject: Python 1.5.2c1 -- release candidate for 1.5.2 final +Message-ID: <199904082322.TAA05234@eric.cnri.reston.va.us> +X-UID: 586 + +Steven Cummings reminded me that a new Tcl version (8.0.5) has been +available for a while. I've now updated the Python installer for +Windows to include Tcl 8.0.5 instead of 8.0.4, to make the release +candidate more valuable. + +If you downloaded it before 8 April 7:10pm Eastern time (that would be +9 April 1:10am in most of Europe) you had the version with Tcl 8.0.4. + +There's an update to a source file too (the installer script) but I +won't bother to update the source release candidate. If you want it, +you can get it from the CVS tree (http://www.python.org/psa/cvs.html). + +--Guido van Rossum (home page: http://www.python.org/~guido/) + + + + + diff --git a/demo/ermis-f/python_m/cur/0587 b/demo/ermis-f/python_m/cur/0587 new file mode 100644 index 00000000..877ce229 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0587 @@ -0,0 +1,35 @@ +From: stephan at pcrm.win.tue.nl (Stephan Houben) +Date: 23 Apr 1999 16:34:06 +0200 +Subject: Suggestion for alternative to map/filter functions +References: +Message-ID: +X-UID: 587 + +"Evan Simpson" writes: + +> What language are we speaking of here? I'm sure somebody here would be +> interested in a description of this mystery construct, if it's sufficiently +> elegant. Sorry, I find your post amusingly cryptic. + +My guess would be that he's talking about list comprehension. +(Did I spell that last word correctly.) + +That looks something like this (pseudo Haskell/Python alert): + + strlist = [str(i) | i <- intlist ] + +,which is supposed to do the same thing as strlist = map(str,intlist). +To filter out all negative numbers: + + strlist = [str(i) | i <- intlist | i >= 0] + +You see, mapping and filtering in one fellow swoop! Cool! +Sorts of, at least. + +Greetings, + +Stephan + + + + diff --git a/demo/ermis-f/python_m/cur/0588 b/demo/ermis-f/python_m/cur/0588 new file mode 100644 index 00000000..5591392f --- /dev/null +++ b/demo/ermis-f/python_m/cur/0588 @@ -0,0 +1,52 @@ +From: mal at lemburg.com (M.-A. Lemburg) +Date: Wed, 28 Apr 1999 15:18:13 +0200 +Subject: ANN: mxCGIPython Version 0.2.0 +Message-ID: <37270A95.2E33A840@lemburg.com> +Content-Length: 1692 +X-UID: 588 + +ANNOUNCING: + + mxCGIPython Version 0.2.0 + + Setup scripts to build one-file easy-to-install + Python interpreters + +>From the web-page: + + If you are in the CGI scripting business, then you know how + hard it can sometimes be getting the sysadmins to install + Python for you. I ran into such situations a few times. + Fortunately it's not a big problem, if you can get a grip on a + pre-compiled binary for the machine the ISP is running. + + Since installing a complete package with many files through a + FTP-only connection is not exactly fun, we need something + different here. This were the freeze tool can help: with it you + can wrap the interpreter together with the whole standard + library and the builtin modules into one single file. All that + remains is to FTP that binary to the ISP and off you go. + + Ok, so much for the theory. Now where do you get that + pre-compiled binary from ? That's where this campaign + starts... + +I encourage everybody on this list and in the news group to have a look +at this package and help build a library of pre-compiled single file +interpreters. This would certainly help a lot of CGI writers out +there in making a decision whether to use Python or Perl... + +More infos are available on my Starship pages: + + http://starship.skyport.net/~lemburg/mxCGIPython.html + +-- +Marc-Andre Lemburg Y2000: 247 days left +--------------------------------------------------------------------- + : Python Pages >>> http://starship.skyport.net/~lemburg/ : + --------------------------------------------------------- + + + + + diff --git a/demo/ermis-f/python_m/cur/0589 b/demo/ermis-f/python_m/cur/0589 new file mode 100644 index 00000000..8c701cc9 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0589 @@ -0,0 +1,25 @@ +From: cgw at fnal.gov (Charles G Waldman) +Date: Mon, 19 Apr 1999 16:50:47 GMT +Subject: How libpython1.5.so +In-Reply-To: <199904190114.VAA03514@207-172-39-16.s16.tnt10.ann.va.dialup.rcn.com> +References: <371320F4.5338600B@earth.ox.ac.uk> + <199904190114.VAA03514@207-172-39-16.s16.tnt10.ann.va.dialup.rcn.com> +Message-ID: <14107.24295.964592.782833@buffalo.fnal.gov> +X-UID: 589 + +A.M. Kuchling writes: + > Here's a patch to the top-level Makefile.in which adds a "shared" + > target. Can people please try this and see if it works on your + > favorite Unix variant? + +I tried this on Linux 2.2.5 with GCC, on Solaris 5.5.1 with the Sun C +compiler (SC4.0 18 Oct 1995 C 4.0) and on Irix 5.3 with the SGI +compiler. Good news is that it works on all of those platforms. +Minor bug is that the generated library is called, on all 3 platforms, +libpython1.5..so (with an extra "." in there) + + + + + + diff --git a/demo/ermis-f/python_m/cur/0590 b/demo/ermis-f/python_m/cur/0590 new file mode 100644 index 00000000..be7c6e39 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0590 @@ -0,0 +1,47 @@ +From: tim_one at email.msn.com (Tim Peters) +Date: Mon, 12 Apr 1999 15:52:50 GMT +Subject: bug report: profiler +In-Reply-To: <7es542$94v$1@beta.EMBL-Heidelberg.DE> +References: <7es542$94v$1@beta.EMBL-Heidelberg.DE> +Message-ID: <000001be84fc$84ba9d00$ac9e2299@tim> +Content-Length: 1482 +X-UID: 590 + +[Ralph Heinkel] +> when trying to run the profiler calibration explained in the python +> documentation, I got the following error: +> +> Python 1.5.1 (#8, Dec 18 1998, 09:42:46) [GCC 2.7.2.1] on linux2 +> Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam +> >>> import profile +> >>> pr = profile.Profile() +> >>> print pr.calibrate(100) +> Traceback (innermost last): +> File "", line 1, in ? +> File "/usr/local/lib/python1.5/profile.py", line 498, in calibrate +> self.instrumented() +> File "/usr/local/lib/python1.5/profile.py", line 515, in instrumented +> self.profiler_simulation(a, a, a) +> File "/usr/local/lib/python1.5/profile.py", line 520, in +> profiler_simulation +> t = t[0] + t[1] +> AttributeError: __getitem__ + +Suggest you wait a day or two for 1.5.2 final to be released, or at least +extract a 1.5.2 profile.py; this was fixed quite some time ago (the profiler +uses one of several timing methods depending on the platform, but +profiler_simulation *assumed* a particular one was in use -- presumably the +one in use on the platform on which it was written ). + +BTW, calibration is a touchy process, and in my experience unless you always +run on a dedicated dead-quiet machine, the result of fiddling with it is +anomalies like negative reported runtimes. Profiling to get a feel for +where the *bulk* of the time is being spent works fine without bothering. + +a-percent-or-two-here-or-there-may-vary-with-the-humdity-ly y'rs - tim + + + + + + diff --git a/demo/ermis-f/python_m/cur/0591 b/demo/ermis-f/python_m/cur/0591 new file mode 100644 index 00000000..a54c14be --- /dev/null +++ b/demo/ermis-f/python_m/cur/0591 @@ -0,0 +1,25 @@ +From: dozier at bellatlantic.net (Bill Dozier) +Date: Thu, 22 Apr 1999 09:25:02 -0400 +Subject: unpickling an NT object in Solaris? +References: <5lzp42smtd.fsf@eric.cnri.reston.va.us> +Message-ID: +X-UID: 591 + +In article <5lzp42smtd.fsf at eric.cnri.reston.va.us>, Guido van Rossum + wrote: + +>dozier at bellatlantic.net (Bill Dozier) writes: +>> +>> The text mode of pickling is not cross-platform and seems to expect UNIX +>> linefeeds. :P +> +>Nonsense. However you must open the file you're pickling to in binary +>mode: open(filename,'wb'). +> + +Unfortunately, this detail is not found in the documentation. It certainly +does not seem obvious that one should write a text file in binary mode. + + + + diff --git a/demo/ermis-f/python_m/cur/0592 b/demo/ermis-f/python_m/cur/0592 new file mode 100644 index 00000000..7008d477 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0592 @@ -0,0 +1,29 @@ +From: dubois1 at llnl.gov (Paul F. Dubois) +Date: Mon, 19 Apr 1999 17:52:45 GMT +Subject: LLNL distribution 11 available +Message-ID: +X-UID: 592 + +xfiles.llnl.gov and ftp-icf.llnl.gov are now back up, and I have fought my +way back through the security changes so I was able to fix the links to make +them point to version 11. Versions 9 and 10 are also available via the ftp +site. + +At version 11 the Windows distribution changes from a .exe file (an +installer) to a .zip file that has a simple installation script you run with +Python. This installation procedure requires Python 1.5. If you do not have +Python 1.5 you will have to install by hand in whatever way you choose. + +Those of you who tried to use the link to LLNLDistribution.zip and failed +were victims of the sudden LLNL shutdown, for which we are sorry. + +I also discovered that I had failed to upload the gifs and style sheet for +the HTML version of the Numerical Python document. That is fixed too. +Another reason to prefer PDF.(:->. + + + + + + + diff --git a/demo/ermis-f/python_m/cur/0593 b/demo/ermis-f/python_m/cur/0593 new file mode 100644 index 00000000..27d94955 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0593 @@ -0,0 +1,21 @@ +From: MHammond at skippinet.com.au (Mark Hammond) +Date: Sat, 10 Apr 1999 10:22:57 +1000 +Subject: Pythonwin problem in HookNotify +References: +Message-ID: <7em5ke$f60$1@m2.c2.telstra-mm.net.au> +X-UID: 593 + +Phil Mayes wrote in message ... +>of it. What are the odds of anyone using this rather obscure +>area? Any opinions on the best way to handle this? Mark? + +Ive fixed it! + +Mark. + + + + + + + diff --git a/demo/ermis-f/python_m/cur/0594 b/demo/ermis-f/python_m/cur/0594 new file mode 100644 index 00000000..3425c1fa --- /dev/null +++ b/demo/ermis-f/python_m/cur/0594 @@ -0,0 +1,35 @@ +From: vdhome at idas.cz (vaclav.dvorak.) +Date: Thu, 22 Apr 1999 20:43:44 GMT +Subject: thread problem on Linux +Message-ID: <924813824.1@idas.cz> +Content-Length: 1052 +X-UID: 594 + +Hello! + +I have an account on some Linux machine in school, so I thought I + would test Python's portability, one of the reasons why I love it. I + use OS/2, so I only had experience with Python on OS/2, but I + assumed everything should work the same on Linux. + +There was Python 1.5.1 on the Linux machine. My first problem was + that it didn't have the thread module. So I downloaded the most + recent RPM of Oliver Andrich with Python 1.5.2 for Linux, but + because I don't have sufficient rights on the machine to install the + whole RPM, I only extracted the one executable file to my home + directory and tried again. The thread module is there, but doesn't + work! thread.start_new_thread doesn't throw an exception, but the + new thread simply doesn't run. When I accidentally pressed Ctrl+D, + it seemed to run for a while, but then the whole script froze. + +Would somebody please have an idea of what could be wrong? I admit + that my knowledge of Unix is very limited, so perhaps this is an + issue with Linux???? + +Bye, Vaclav/2. (vdhome at idas.cz) + + + + + + diff --git a/demo/ermis-f/python_m/cur/0595 b/demo/ermis-f/python_m/cur/0595 new file mode 100644 index 00000000..fb3384b7 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0595 @@ -0,0 +1,34 @@ +From: duncan at rcp.co.uk (Duncan Booth) +Date: 15 Apr 1999 08:49:13 GMT +Subject: stupid Win-CGI getting started question +References: <7f0f0h$pfb$1@nnrp1.dejanews.com> <8DA86302Bduncanrcpcouk@news.rmplc.co.uk> <7f2no0$n80$1@nnrp1.dejanews.com> +Message-ID: <8DA9637FEduncanrcpcouk@news.rmplc.co.uk> +X-UID: 595 + +bill_seitz at my-dejanews.com wrote in <7f2no0$n80$1 at nnrp1.dejanews.com>: + +>> The way I get CGI scripts to run with Netscape Enterprise server on NT +is to +>> put them in .cmd files instead of .py files. +> +>So nobody can run .py files as CGI? +> +>Is this a known problem? What's its scope? Only Netscape/NT? What about +IIS? +>What about Netscape/Solaris? +> +I didn't say it was impossible to run .py files as CGI, simply that I had +problems getting it to work. Since my number one priority was not to take +the web server off-line at all, there were limits to how far I could play +around with it. I'm sure there must be some way to get it to work, but I +got enough for my purposes. + +-- +Duncan Booth duncan at dales.rmplc.co.uk +int month(char *p){return(124864/((p[0]+p[1]-p[2]&0x1f)+1)%12)["\5\x8\3" +"\6\7\xb\1\x9\xa\2\0\4"];} // Who said my code was obscure? +http://dales.rmplc.co.uk/Duncan + + + + diff --git a/demo/ermis-f/python_m/cur/0596 b/demo/ermis-f/python_m/cur/0596 new file mode 100644 index 00000000..1af642c2 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0596 @@ -0,0 +1,38 @@ +From: glenn at gacela.demon.co.uk (Glenn Rogers) +Date: Thu, 22 Apr 1999 21:29:08 +0100 +Subject: Project for newbie +References: <70alf7.qc6.ln@loopback> <14110.12533.232498.655489@amarok.cnri.reston.va.us> +Message-ID: +Content-Length: 1201 +X-UID: 596 + +In article <14110.12533.232498.655489 at amarok.cnri.reston.va.us>, +Andrew M. Kuchling wrote: +>Pete Jewell writes: +>>I've read my way through the tutorial, and am now stuck - where do I go +>>from here? I want to learn how to use Python, but don't have any +>>pressing projects at the moment - can anyone suggest a program I should +>>have a go at writing, to help me learn the language further? +> +> Having third parties provide ideas usually doesn't result in +>anything interesting. I have a list of projects on my Web page, but +>they're all extremely unlikely to appeal to anyone who isn't me (and +>even I'm a bit cool on some of them). +> +For what it's worth, my first project (5ish months ago) was an internet-utility +type thing: opening/closing connection, timing the period online, getting a +list of mail waiting for me, telling me when I've stopped getting news etc. +My second one was for work doing the same sort of thing over a telnet +connection. Then several simple text filtering/processing utilities, and +I'm now doing something that started life as an addressbook (storing in a +database) but has now got rather more ambitious. + +What did everyone else do? + + +-- +Glenn the Gazelle + + + + diff --git a/demo/ermis-f/python_m/cur/0597 b/demo/ermis-f/python_m/cur/0597 new file mode 100644 index 00000000..323ff6ec --- /dev/null +++ b/demo/ermis-f/python_m/cur/0597 @@ -0,0 +1,19 @@ +From: SunitJoshi at email.msn.com (SunitJoshi) +Date: Tue, 6 Apr 1999 19:09:04 -0500 +Subject: Writing lines longer than 80 charc ! +Message-ID: +X-UID: 597 + +I'm wondering if someone knew of a way of writing a line of more than 80 +characters +to a file in way that it won't split it into two lines. + +thanks +Sunit +sjoshi at ingr.com + + + + + + diff --git a/demo/ermis-f/python_m/cur/0598 b/demo/ermis-f/python_m/cur/0598 new file mode 100644 index 00000000..5f69c6b7 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0598 @@ -0,0 +1,31 @@ +From: richard at folwell.com (Richard Folwell) +Date: Tue, 13 Apr 1999 21:36:07 GMT +Subject: Python as an ODBC *source* on windoze ? +Message-ID: <01BE8604.AE1D9CC0.richard@folwell.com> +X-UID: 598 + +On 13 April 1999 14:57, Boris Borcic [SMTP:zorro at zipzap.ch] wrote: +> Is there a way to have Python on windows to act as an ODBC source (server) on +windoze ? +> +> Reason : to use the MS Access report generator component. + +Can you state your problem more generally? Reason I am asking is that it is +not clear what you are trying to do. + +Python can work with databases. ODBC is a standard(ish) way of working with +databases. You can use Python to addto/change/etc data in databases (both +directly and via ODBC - search the Python website for "ODBC" for more details - +I have used Sam Rushing's ODBC access stuff with success, but there are other +approaches available). You can then use Access to manipulate/create reports +on/etc such databases. + +It is certainly possible to implement a DBMS in Python (check out Gadfly!), but +I suspect that you are asking a different question. (?) + +Richard + + + + + diff --git a/demo/ermis-f/python_m/cur/0599 b/demo/ermis-f/python_m/cur/0599 new file mode 100644 index 00000000..41a5c830 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0599 @@ -0,0 +1,44 @@ +From: bernhard at alpha1.csd.uwm.edu (Bernhard Reiter) +Date: 9 Apr 1999 06:15:30 GMT +Subject: DLL Prob Win32com +Message-ID: +Content-Length: 1086 +X-UID: 599 + +Get strange errors, when using PythonWin (win32all-124) +with Python 1.5.2b2 or 1.5.2c1 on this Windows 95 machine here. +The installprogram said that + AXScript, Python Interpreter and Python Dictionary +couldn't be registered. Should be registered manually. + +How can I do that? + +When importing COM stuff, I get: +import pythoncom +Traceback (innermost last): File "", line 1, +in ?ImportError: +DLL load failed: A device attached to the system is not functioning. + +Reading documentation I know about possible old COM dlls as noted on +http://starship.python.net/crew/mhammond/bigpond/Downloads.html +but my error message seems to be different. + +That why I though I just ask again. :-) +(Python.org is not reachable from here right now, so I cannot +follow the link on Hammond's page to find out more about that DLLs.) +Is it save to install them? + + +Another thing: +The example in the architecture.html file seems to be out of +data. It should be: + from pywin.mfc import dialog + +(it is just not nice, if beginners stumble over on of the first examples.) + +Regards, + Bernhard + + + + diff --git a/demo/ermis-f/python_m/cur/0600 b/demo/ermis-f/python_m/cur/0600 new file mode 100644 index 00000000..9551efc1 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0600 @@ -0,0 +1,61 @@ +From: tim_one at email.msn.com (Tim Peters) +Date: Tue, 13 Apr 1999 02:06:20 GMT +Subject: role of semilcolon +In-Reply-To: +References: +Message-ID: <000801be8552$393f1300$97a02299@tim> +Content-Length: 1897 +X-UID: 600 + +[Reuben Sumner] +> In the python interpreter doing 'a=1;b=2;b=3' does what I would +> expect, three seperate assignments. However ; doesn't seem to appear +> in the language reference except in the list of delimeters. Is the +> above example formally valid python? + +Yup, and the semicolon's formal role in the grammar is captured in the +non-terminal "stmt_list", which you'll find in the manual's chapter on +compound statements. + +Note that you'll hardly ever see a semicolon in an experienced Python +programmer's code, though! "a, b, c = 1, 2, 3" is more idiomatic for what +you did above, and in general Python is succinct so you can afford to write +code readably and still fit a major algorithm on a single screen. + +> BTW as you can tell I am a newbie + +Yes: nobody else ever looks at the reference manual . + +> but I am impressed with the ease at which I was able to implement +> some number theoretic algorithms (gcd, primaility testing, pollard +> rho factoring, jacobian...) + +So let's pick on gcd. Here's the bare-bones idiomatic way to spell that: + +def gcd(a, b): + while b: + a, b = b, a % b + return a + +Close to what you did? Finding the *fastest* way to write gcd in Python is +something I've been working on for years . + +> Is there a big practical difference between using long numbers and +> the mpz package? (is the latter faster) + +Python's bigint implementation is straightforward, very compact (in code +size), and extremely portable. It wasn't aiming at speed or completeness. +In contrast, the GNU GMP package has been labored over for years, with +hyper-optimized core assembler routines on most major platforms. If you +need peak speed, use that. At one time Andrew Kuckling combined the two, +but don't know how usable that still is; see the first link at: + + http://starship.python.net/crew/amk/python/code.html + +big-ints-for-big-brains-ly y'rs - tim + + + + + + diff --git a/demo/ermis-f/python_m/cur/0601 b/demo/ermis-f/python_m/cur/0601 new file mode 100644 index 00000000..d9fec9bf --- /dev/null +++ b/demo/ermis-f/python_m/cur/0601 @@ -0,0 +1,38 @@ +From: fm at synchrologic.com (fm at synchrologic.com) +Date: Mon, 26 Apr 1999 13:06:01 GMT +Subject: GNU GUIs in Python (was Re: GUI other than Tkinter (wxPython)) +References: <3721567f.1748033@news> <7fs9to$rlr$1@nnrp1.dejanews.com> <19990426080609.A503367@vislab.epa.gov> +Message-ID: <7g1obm$97o$1@nnrp1.dejanews.com> +Content-Length: 1088 +X-UID: 601 + +There is an exception to the GPL in the license.txt file for wxWindows. It +states: + +The exception is that you may use, copy, link, modify and distribute under the +user's own terms, binary object code versions of works based on the Library. + +In article <19990426080609.A503367 at vislab.epa.gov>, + Randall Hopper wrote: +> On a related note, is wxWindows/wxPython GPLed? It isn't bold in stating +> it, but I noticed in the Copyright section: +> +> http://web.ukonline.co.uk/julian.smart/wxwin/manuals/html/wx2/wx1.htm#topic0 +> +> it says: +> +> "Please see the wxWindows licence files (preamble.txt, lgpl.txt, gpl.txt, +> licence.txt, licendoc.txt) for conditions of software and documentation +> use." +> +> Many developers are familiar with the GNU license policy (you link with GNU +> ==> you're GNU) which discourages use of any GNU product for commercial +> purposes where you need to link at the factory. +> + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/0602 b/demo/ermis-f/python_m/cur/0602 new file mode 100644 index 00000000..fd260181 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0602 @@ -0,0 +1,40 @@ +From: phd at sun.med.ru (Oleg Broytmann) +Date: Thu, 22 Apr 1999 15:37:40 +0400 (MSD) +Subject: Pyton setuid program? +In-Reply-To: <7fn0u5$9jm$1@news.rz.uni-karlsruhe.de> +Message-ID: +X-UID: 602 + +Hi! + +On 22 Apr 1999, Bjoern Giesler wrote: +> is it possible to have a Python script run setuid? If so, how do I do +> that? + + Having setuid script is big security issues. Most modern operating +systems do not allow to do this. Perl has special provisions for making +perl scripts setuid. In python please avoid it. Write setuid wrapper for +your script. Standard python distribution has a file Misc/setuid-prog.c. It +is a template for writing good setuid wrappers. + +> Or could that be a Linux problem? + + It is OS-specific. Yes, Linux (thanks a lot) is among other OSes that +disable setuid scripts. + +> TIA, +> --Bjoern +> -- +> | thank you for your time, worship the antichrist, and have a nice day /\ +> +---------------------------------------------------------------------/()\ +> | pgp key available on request /____\ + +Oleg. +---- + Oleg Broytmann National Research Surgery Centre http://sun.med.ru/~phd/ + Programmers don't die, they just GOSUB without RETURN. + + + + + diff --git a/demo/ermis-f/python_m/cur/0603 b/demo/ermis-f/python_m/cur/0603 new file mode 100644 index 00000000..8f12529c --- /dev/null +++ b/demo/ermis-f/python_m/cur/0603 @@ -0,0 +1,38 @@ +From: cgw at fnal.gov (Charles G Waldman) +Date: Thu, 29 Apr 1999 22:14:08 GMT +Subject: Errors +In-Reply-To: <3728CD26.907ED9A1@geocities.com> +References: <3728CD26.907ED9A1@geocities.com> +Message-ID: <14120.55728.975548.357835@buffalo.fnal.gov> +X-UID: 603 + +smoothasice at geocities.com writes: + + > for word in All_Words: + > z = 0 + > while z < len(word): + > if z == 0: + > tally = tally + alpha.index(word[z]) + > else: + > tally = tally + (alpha.index(word[z]) * 26) + > + > It gives me this: NameError: tally + > and I don't know why...... + + +Try putting "tally = 0" somewhere. You get a NameError because when +you execute the line + tally = tally + alpha.index(word[z]) + +for the first time, Python evaluates the right-hand side of the +assignment, and since "tally" has never been assigned to before, it +has no value - it's an undefined name - hence the NameError. + +Once you fix this I think you will discover another problem - you need +to increment "z" or else the "while z" loop never terminates. + + + + + + diff --git a/demo/ermis-f/python_m/cur/0604 b/demo/ermis-f/python_m/cur/0604 new file mode 100644 index 00000000..d103b266 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0604 @@ -0,0 +1,50 @@ +From: brunomadv at ciudad.com.ar (Bruno Mattarollo) +Date: Fri, 16 Apr 1999 14:42:31 GMT +Subject: restore sources from PYC [ANSWER] +In-Reply-To: <000101be879c$8aed0670$6eba0ac8@kuarajy.infosys.com.ar> +References: <000101be879c$8aed0670$6eba0ac8@kuarajy.infosys.com.ar> +Message-ID: <001c01be8817$5b614800$6eba0ac8@kuarajy.infosys.com.ar> +X-UID: 604 + +Hi! + + Thanks to all that replyed to my original posting ... I will rewrite my +code ... + + :-) + + Thanks again. + +/B + +Bruno Mattarollo +... proud to be a PSA member + +> -----Original Message----- +> From: python-list-request at cwi.nl [mailto:python-list-request at cwi.nl]On +> Behalf Of Bruno Mattarollo +> Sent: Thursday, April 15, 1999 9:03 PM +> To: Python list +> Subject: restore sources from PYC [Q] +> +> +> Hi! +> +> By mistake I am unable to find the PY files (source) from a +> project I was +> working on. I only have the PYC files... Is there a way to recover the +> sources from the PYC? I only need my sources, I don't give a d... for the +> comments... +> +> TIA +> +> /B +> +> Bruno Mattarollo +> ... proud to be a PSA member +> + + + + + diff --git a/demo/ermis-f/python_m/cur/0605 b/demo/ermis-f/python_m/cur/0605 new file mode 100644 index 00000000..ff23d2df --- /dev/null +++ b/demo/ermis-f/python_m/cur/0605 @@ -0,0 +1,24 @@ +From: quinn at necro.ugcs.caltech.edu (Quinn Dunkan) +Date: 23 Apr 1999 23:12:15 GMT +Subject: vim5 + python: can't resolve symbol +Message-ID: +X-UID: 605 + +I gather there are some vim users around here... I've been having trouble +getting vim's python mode to work properly. It doesn't want to load .so +modules: + +When importing anything that loads a .so from vim (:py import ...), I get a +screen full of "can't resolve symbol"s. Things like PyExc_OverflowError, +Py_BuildValue, Py_InitModule4, etc. Some modules will load (like string), but +some will ImportError: Unable to resolve symbol (like math). I can do +':py import vim' and do some elementary stuff, but I want my modules! + +The system is Linux 2, python 1.5.2b1, vim 5.0. Has anyone else experienced +this? Suggestions, ideas? + +thanks! + + + + diff --git a/demo/ermis-f/python_m/cur/0606 b/demo/ermis-f/python_m/cur/0606 new file mode 100644 index 00000000..8bc813f5 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0606 @@ -0,0 +1,46 @@ +From: tseaver at palladion.com (Tres Seaver) +Date: Thu, 08 Apr 1999 09:05:51 -0500 +Subject: Extreme Programming ( XP ) in python ? +References: <199904080900.KAA17021@brahms.scom> +Message-ID: <370CB7BF.CC27DDBA@palladion.com> +Content-Length: 1554 +X-UID: 606 + +Dave Dench wrote: +> +> Dear All, +> I recently attended the OT99 conference at Oxford University. +> One of the highlights was the inspiring keynote speech by Kent Beck +> on his experiences with Extreme Programming ( XP ) . +> ( ref: http://c2.com/cgi/wiki?ExtremeProgrammingRoadmap ) +> Unfortunately, he was using Java as his particular language vehicle, +> but that is not mandatory. +> It would seem to me that XP and python is a marriage made in heaven. +> Has anyone on this list had any experiences with XP on their projects? + +Given that XP is originally a Smalltalk methodology (Beck is one of the +uber-gurus of the Smalltalk world), it can't be very wedded to Java. I was +employing a semi-heretical[*] version of XP in most of my consulting work +(C++/Delphi/Java) when I found Python: DING! + +[*] I don't quite hold with "you're not gonna need it!", which taints my +orthodoxy. :) + +> PPS It would also seem that XML is starting to get linked with CORBA very +> productively by passing content-rich strings. ( perhaps this is old news ? ) + +XML does provide an interesting, "Pythonesqu" alternative to CORBA's (new) +object-by-value feature: passing self-describing objects as strings, rather than +as "valutypes," trades off compile-time typechecks for a reduction in the +dependency jitter. There are some downsides, however: the reduction in +encapsulation can make for headaches. + + +-- +========================================================= +Tres Seaver tseaver at palladion.com 713-523-6582 +Palladion Software http://www.palladion.com + + + + diff --git a/demo/ermis-f/python_m/cur/0607 b/demo/ermis-f/python_m/cur/0607 new file mode 100644 index 00000000..9a5d56f2 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0607 @@ -0,0 +1,45 @@ +From: dfan at harmonixmusic.com (Dan Schmidt) +Date: 22 Apr 1999 15:31:45 -0400 +Subject: Reversing Long integers +References: <371E0C46.E6FA76A9@princeton.edu> +Message-ID: +Content-Length: 1295 +X-UID: 607 + +"Ira H. Fuchs" writes: + +| I am attempting to write an efficient Python program which can add +| an integer to its reverse. This is quite easy to do in Lisp and +| Mathematica but (mostly out of curiosity) I wanted to see how one +| might do this in Python. Converting an integer to a string and +| reversing it and converting back is quite easy (although not all of +| these ops are primitives) but the fact that Long integers have the +| letter L appended means that the loop must include moving the L to +| the end of the reversed string prior to summing. Can anyone think of +| a particularly clever way to do this? + +This isn't particularly clever, but it does the job. The +time spent dealing with checking for longs should be negligible +compared to the rest of it. + +s = `i` +m = map (None, s) # Turn into an array of characters +is_long = 0 +if m[-1] == 'L': + m, is_long = m[0:-1], 1 +m.reverse() +s2 = string.join (m, '') +if (is_long): + i2 = long(s2) +else: + i2 = int(s2) + +-- + Dan Schmidt -> dfan at harmonixmusic.com, dfan at alum.mit.edu +Honest Bob & the http://www2.thecia.net/users/dfan/ +Factory-to-Dealer Incentives -> http://www2.thecia.net/users/dfan/hbob/ + Gamelan Galak Tika -> http://web.mit.edu/galak-tika/www/ + + + + diff --git a/demo/ermis-f/python_m/cur/0608 b/demo/ermis-f/python_m/cur/0608 new file mode 100644 index 00000000..327f1b1d --- /dev/null +++ b/demo/ermis-f/python_m/cur/0608 @@ -0,0 +1,38 @@ +From: fredrik at pythonware.com (Fredrik Lundh) +Date: Mon, 19 Apr 1999 19:15:59 GMT +Subject: Beginner - Tkinter info +References: <371c59e9.2723125@news.tin.it> <371B453E.C3F83831@foreman.ac.rwth-aachen.de> +Message-ID: <004301be8a99$0faf7920$f29b12c2@pythonware.com> +X-UID: 608 + +> "Introduction to Tkinter" + +> 1) It's a work in progress (which means: "woefully incomplete"). + +woeful: lamentably bad or serious; deplorable, afflictive, calamitous, +dire, distressing, grievous, heartbreaking, lamentable, regrettable, +unfortunate. + +ouch. + +> 2) It isn't available as one download (if it is, I couldn't find +> it and I looked pretty hard). + +there's something called websucker.py down in the Tools +directory in the Python distribution: + +$ cd Tools/webchecker +$ python websucker.py http://www.pythonware.com/library/tkinter/introduction/index.htm + +gives you a local copy in no time at all. + +> 3) It is woefully incomplete. + +you already said that. + + + + + + + diff --git a/demo/ermis-f/python_m/cur/0609 b/demo/ermis-f/python_m/cur/0609 new file mode 100644 index 00000000..ea92c232 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0609 @@ -0,0 +1,27 @@ +From: tim_one at email.msn.com (Tim Peters) +Date: Thu, 22 Apr 1999 02:22:57 GMT +Subject: How many of us are there? +In-Reply-To: <371E2648.DED123AE@callware.com> +References: <371E2648.DED123AE@callware.com> +Message-ID: <000301be8c67$08dd6600$959e2299@tim> +X-UID: 609 + +[Ivan Van Laningham] +> Hello, Pythonistas-- +> Does anyone out there have some idea how many people subscribe to the +> mailing list, or read the newsgroup? + +Yes, I keep exact daily tallies of both, along with the precise number of +Python programmers broken down by industry, application, age, gender, +income, countries of origin and residence, employer and life goals. + +While I can't pass this information out for free, it's available for a +price. How do you think all those spammers got your email address ? + +python's-demographics-make-perl's-look-like-cobol's-ly y'rs - tim + + + + + + diff --git a/demo/ermis-f/python_m/cur/0610 b/demo/ermis-f/python_m/cur/0610 new file mode 100644 index 00000000..dffeac3f --- /dev/null +++ b/demo/ermis-f/python_m/cur/0610 @@ -0,0 +1,22 @@ +From: guido at eric.cnri.reston.va.us (Guido van Rossum) +Date: 30 Apr 1999 09:01:49 -0400 +Subject: while (a=b()) ... +References: <19990430000141.A5867@shalott> <3728F8D0.5E91C0F5@bioreason.com> +Message-ID: <5lwvyu9s8y.fsf@eric.cnri.reston.va.us> +X-UID: 610 + +Andrew Dalke writes: + +> The usual answers when this is asked (quick, checking if this is +> in the FAQ as it is a faq -- nope) are: + +It is now. Thanks for suggesting this! + +(Why don't more PSA members occasionally contribute to the FAQ wizard? +The password is in your welcome-to-the-PSA mail!) + +--Guido van Rossum (home page: http://www.python.org/~guido/) + + + + diff --git a/demo/ermis-f/python_m/cur/0611 b/demo/ermis-f/python_m/cur/0611 new file mode 100644 index 00000000..9658d196 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0611 @@ -0,0 +1,19 @@ +From: hew at hons.cs.usyd.edu.au (Matthew Robert Gallagher) +Date: Mon, 12 Apr 1999 17:07:06 +1000 +Subject: RPC and XDR with python +Message-ID: <37119B99.B3E2633C@hons.cs.usyd.edu.au> +X-UID: 611 + +Does anybody know where these resource are located. +python.org has a couple of ref but nothing concrete + +It would be better find an example thou + +thanks + +hew + + + + + diff --git a/demo/ermis-f/python_m/cur/0612 b/demo/ermis-f/python_m/cur/0612 new file mode 100644 index 00000000..ca572fd1 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0612 @@ -0,0 +1,36 @@ +From: pereira at research.att.com (Fernando Pereira) +Date: Fri, 30 Apr 1999 02:58:58 GMT +Subject: FP exception, core dump in Python 1.5.2 (Tim's doing ) +References: +Message-ID: <290419992258582791%pereira@research.att.com> +Content-Length: 1142 +X-UID: 612 + +In article , Mark C Favas +wrote: + +> [Tim Peters suggests some code to generate INFs and NANs] +> +> [Mark tries it, and...] +> +> On my platform, (DEC Alpha, Digital Unix 4.0D, Python 1.5.2) I get... a core +> dump! (exclamation because it's one of the few Python core dumps I've seen). +Unfortunately, the Alpha implementation of IEEE FP does not handle +overflow gracefully. With the default C compilation flags, the code +generated cannot recover from an overflow to stuff an Inf in the +result, so the only thing the OS can do is to kill the process. +Alternatively, with appropriate flags (can't remember them from the top +of my head, had to deal with this 6 months ago), the C compiler adds +machine instructions to allow recovery from FP exceptions, including +storing Inf as a result of overflow. Unfortunately, FP performance in +this mode is not nearly as good. None of the other machines I use (SGI, +Sun, Intel, Mac) have this problem. On the other hand, none of them +comes close to an Alpha in FP performance (with the dafault `fast' +compilation setting). Tradeoffs... + +-- +-- F + + + + diff --git a/demo/ermis-f/python_m/cur/0613 b/demo/ermis-f/python_m/cur/0613 new file mode 100644 index 00000000..f38b5721 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0613 @@ -0,0 +1,72 @@ +From: dnagata at creo.com (Dale Nagata) +Date: Sun, 11 Apr 1999 10:42:24 -0700 +Subject: bug or feature? traceback with python -x off by one line +Message-ID: <3710DF00.DF5@creo.com> +Content-Length: 2152 +X-UID: 613 + +I'm using Python 1.5.1 on Windows NT 4.0 Service Pack 3. + +If I run a script the "normal" way, the exception +traceback prints the correct source file line numbers: + +E:\home\dale\test\>python testx.py +Traceback (innermost last): + File "E:\home\dale\test\testx.py", line 18, in ? + main() + File "E:\home\dale\test\testx.py", line 14, in main + f = open( 'foo.txt', 'r' ) +IOError: (2, 'No such file or directory') + +However, if I run the exact same script with the Python -x +command line option to skip the first line of the script, the +reported line numbers are consistently off by one: + +E:\home\dale\test>python -x testx.py +Traceback (innermost last): + File "testx.py", line 17, in ? + try: + File "testx.py", line 13, in main + def main(): +IOError: (2, 'No such file or directory') + +Is this the way it's *supposed* to work? + +I package a lot of Python scripts as ready-to-run Windows NT batch +files by prepending the line + + @python -x %~f0 %* & goto :EOF + +which means "without echoing to the console window, run Python +with the -x option, passing it the full path to this batch file +with the rest of the commmand line arguments, and after it +finishes executing, jump to the end of the batch file so it +doesn't try to interpret the remainder of the file as native NT +batch language". + +So when an error occurs in one of these Python-scripts-disguised- +as-NT-batch-files, the traceback line numbers are always off by +one. + +I've seen this enough times now that if I'm not too lazy or tired, +I can grudgingly remember to adjust the line numbers, but since +I've managed to convince a growing number of co-workers to start +using Python and indeed make it an essential part of our software +development, it's becoming an increasing source of confusion. + +Any ideas on the best way to resolve this? +How, from within a script, can I detect that the -x option is +in effect? Or do I have to go hack the interpreter source? + +Thanks in advance, + + +-- +Dale Nagata | tel : +1 604.451.2700 ext. 2254 (UTC-0800) +Software Developer | fax : +1 604.437.9891 +Creo Products Inc. | pgr : +1 604.691.8279 +Burnaby BC Canada | http://www.creo.com/ + + + + diff --git a/demo/ermis-f/python_m/cur/0614 b/demo/ermis-f/python_m/cur/0614 new file mode 100644 index 00000000..7f276f86 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0614 @@ -0,0 +1,37 @@ +From: aa8vb at vislab.epa.gov (Randall Hopper) +Date: Tue, 27 Apr 1999 08:11:09 -0400 +Subject: Cross-references between dynamically loaded modules under AIX +In-Reply-To: <7g42o5$d8u$1@nnrp1.dejanews.com>; from Jakob Schiotz on Tue, Apr 27, 1999 at 10:15:35AM +0000 +References: <7g42o5$d8u$1@nnrp1.dejanews.com> +Message-ID: <19990427081109.C579158@vislab.epa.gov> +Content-Length: 1060 +X-UID: 614 + +Jakob Schiotz: + |I wrote a small function to convert a C pointer to a NumPy array (I am + |using SWIG), ... it coredumps under AIX ... the dynamical loader under + |AIX cannot resolve symbols in one module that refers to another module. + +Not knowing NumPy, my assumption is you are failing on a .so-to-.so module +dynamic link. If so... + +I did something like this with SWIG recently myself, albeit on IRIX. Does +AIX have the equivalent of an RPATH (check the ld man page, and search for +rpath)? If so, just augment RPATH for the wraper module (.so) to point to +the directory where your wrapped C shared libraries (.so's) live. + +FWIW, here is what I use to build my SWIG wrapper libraries. Note that the +core C libraries they wrap live (or rather, are linked) to the current +directory, so adding the current directory ($PWD) to the rpath is +sufficient for my case: + +LINK_SO = ld -shared -rdata_shared -w -o32 -KPIC -rpath $(PWD) -L $(PWD) + +You can also use LD_LIBRARY_PATH, but for a number of reasons, it's better +to use RPATH when you can. + +Randall + + + + diff --git a/demo/ermis-f/python_m/cur/0615 b/demo/ermis-f/python_m/cur/0615 new file mode 100644 index 00000000..3b18fb21 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0615 @@ -0,0 +1,27 @@ +From: bryan.hann at pobox.com (Bryan Hann) +Date: Mon, 12 Apr 1999 01:34:04 +0800 +Subject: two questions +References: <370dbbe7.71248459@scout> +Message-ID: <3710DD0C.42B9FCD3@pobox.com> +X-UID: 615 + +Chris... wrote: + +> 2) Is there an way to mimic Perls +> perl -p -e s/pattern1/pattern2/ +> command line? + +Perhaps you can derive something from the fileinput module. It might be +handy :) +(I.e., share if you do :) +-- +================================================================== + Bryan Hann -- bryan.hann at pobox.com -- www.pobox.com/~bryan.hann + The RITE Group: Researching Information Technology in Education. +================================================================== + + + + + + diff --git a/demo/ermis-f/python_m/cur/0616 b/demo/ermis-f/python_m/cur/0616 new file mode 100644 index 00000000..648c5326 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0616 @@ -0,0 +1,31 @@ +From: tim_one at email.msn.com (Tim Peters) +Date: Sun, 4 Apr 1999 07:15:50 GMT +Subject: Why are they? Re: Module Documentation Strings +In-Reply-To: +References: +Message-ID: <001101be7e6a$f7cea220$ea9e2299@tim> +X-UID: 616 + +[Jeff "evil Japh" Pinyan] +> Why are there documentation strings? ... why not just use +> comment lines? + +D:\Python>python +Python 1.5.2b2 (#0, Feb 16 1999, 17:09:09) [MSC 32 bit (Intel)] on win32 +Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam +>>> dir([]) +['append', 'count', 'extend', 'index', 'insert', 'pop', 'remove', + 'reverse', 'sort'] +>>> print [].pop.__doc__ +[].pop([index]) -> item -- remove and return item at index (default last) +>>> + +Comments aren't available for introspection or interactive use. + +that's-all-ly y'rs - tim + + + + + + diff --git a/demo/ermis-f/python_m/cur/0617 b/demo/ermis-f/python_m/cur/0617 new file mode 100644 index 00000000..dda83720 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0617 @@ -0,0 +1,28 @@ +From: sca at isogmbh.de (Chris...) +Date: Fri, 09 Apr 1999 08:47:11 GMT +Subject: two questions +Message-ID: <370dbbe7.71248459@scout> +X-UID: 617 + +Hello... + + Since I am new to python (ver 1.5 under NT), these may be silly, +anyhow: + +1) How can I copy files with python? At first I planned to run the +DOS-command "copy" from python, but couldn't find the right function. +Second, I thought, there might be a python command to do it. Until +now, I didn't succeed. + +2) Is there an way to mimic Perls +perl -p -e s/pattern1/pattern2/ +command line? + +Thanks a lot in advance + +bye + Chris... + + + + diff --git a/demo/ermis-f/python_m/cur/0618 b/demo/ermis-f/python_m/cur/0618 new file mode 100644 index 00000000..04708d76 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0618 @@ -0,0 +1,73 @@ +From: faassen at pop.vet.uu.nl (Martijn Faassen) +Date: Thu, 29 Apr 1999 20:46:27 +0200 +Subject: Read MS Access 97 *.mdb files with python?? +References: <37287369.D6E67313@t-online.de> <3728867D.94B5BBF9@appliedbiometrics.com> +Message-ID: <3728A903.CF75B41A@pop.vet.uu.nl> +Content-Length: 1646 +X-UID: 618 + +Christian Tismer wrote: +> +> gemodek wrote: +> > +> > Does somebody know some +> > piece of soft which can this?? +> +> Use PythonWin, create an interface for +> Microsoft DAO (your version) with the +> makepy utility, and then use COM to access Access. +> +> Something like +> +> import win32com.client +> engine=win32com.client.Dispatch("dao.dbengine.35") +> +> Then you can use every method of the database +> engine, as you can find in the VBA help file +> of your copy of the MS Access distribution. + +You can also use ODBC, part of PythonWin as well: + +import dbi, odbc # note import them in this order + +# open database +db = odbc.odbc("mydatabase_odbc_alias") +# get cursor +cur = db.cursor() +# sql statement +sql = "select * from whatever" +# execute sql statement +cur.execute(sql) +# fetch all data +data = cur.fetchall() + +More information is at: + +http://www.python.org/topics/database/ + +Look at the database API specs (version 1 is still used in PythonWin, I +think). + +Unfortunately, all this advice may be useless, as I noticed that he's +the same guy who asked about accessing an Access database on Linux. I +know Linux can do ODBC, but I doubt there are Access drivers for ODBC on +linux.. + +> > Or does somebody know if the description of +> > the format ia avaible (for free of course). +> +> That's a long awaited feature which I guess will never +> be available. + +What you could try for Linux is use a Windows script to convert the +stuff to something else, and then put it into some Linux database. You +use that one from there. The problem of course that it's hard to keep +everything synchronized and up to date that way. + +Regards and good luck, + +Martijn + + + + diff --git a/demo/ermis-f/python_m/cur/0619 b/demo/ermis-f/python_m/cur/0619 new file mode 100644 index 00000000..23edfe16 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0619 @@ -0,0 +1,42 @@ +From: mambuhl at earthlink.net (Martin Ambuhl) +Date: Thu, 22 Apr 1999 22:26:45 -0400 +Subject: The Future of Tk? +References: <371E964F.C531C2A@istar.ca> <7fmv24$agu$1@m1.cs.man.ac.uk> +Message-ID: <371FDA65.804D7F8B@earthlink.net> +Content-Length: 1043 +X-UID: 619 + +"Donal K. Fellows" wrote: +> +> In article <371E964F.C531C2A at istar.ca>, +> Eugene Dragoev wrote: +> > Is there going to be any Tk implementation that will continue using +> > lightweight components? + +Other than comp.lang.tcl, where this should be topical, and comp.lang.c, where +it definitely is not, I have no idea which of the other 4 of the 6 groups give a +tinker's damn about this. + +I have reset the followups to this message as comp.lang.tcl. Please do +something similar in your subsequent postings. + +Please stop the inane childish massive crossposting. If you want to be known as +unwelcome antisocial polluters of other newsgroups, why don't you just join the +Meow group? + +In case you can't understand the above: Take this junk out of the newsgroups +where it does not belong. Think before you you start another idiotic +crosspost. Despite what you might think, usenet is divided into newsgroups for +a reason. + + + + +-- +Martin Ambuhl (mambuhl at earthlink.net) +Note: mambuhl at tiac.net will soon be inactive + + + + + diff --git a/demo/ermis-f/python_m/cur/0620 b/demo/ermis-f/python_m/cur/0620 new file mode 100644 index 00000000..c1c9fc11 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0620 @@ -0,0 +1,79 @@ +From: duncan at rcp.co.uk (Duncan Booth) +Date: 14 Apr 1999 08:43:26 GMT +Subject: stupid Win-CGI getting started question +References: <7f0f0h$pfb$1@nnrp1.dejanews.com> +Message-ID: <8DA86302Bduncanrcpcouk@news.rmplc.co.uk> +Content-Length: 2672 +X-UID: 620 + +seitz at mail.medscape.com wrote in <7f0f0h$pfb$1 at nnrp1.dejanews.com>: + +>Installed the basic Python stuff. I can run the interpreter. But not clear on +>getting it configured properly to talk CGI with my WinNT Netscape Enterprise +>server. I set a CGI folder path properly, but I get a nasty error message. +>But it's not a file-not-found, so I know it's finding the .py file. So I'm +>guessing it's not finding the executable. +> +>How should that first #! be changed for Windows users? Could that be it? +> +>Could the fact that all my Python stuff is under +>d:\program files\python\ +>be part of the problem (the long folder name with a space in it)? + +I tried all sorts of configuration changes to get it to run .py files directly, +and eventually gave it up as a bad job (mostly because I didn't want to risk +breaking the server). + +The way I get CGI scripts to run with Netscape Enterprise server on NT is to +put them in .cmd files instead of .py files. For example: + +---------test.cmd---------------- +@c:\Progra~1\Python\python -x "%~f0" %* & goto :EOF +import os + +print "Content-type: text/html" +print +print "Test" +print "Hello world from python.

" + +for k in os.environ.keys(): + print k, os.environ[k], "
" +print "" +---------end of test.cmd--------- +You would need to change the path to reflect the location of your copy of +Python, either use the 8.3 filename as above, or put the filename in quotes: +@"c:\Program Files\Python\python" -x "%~f0" %* & goto :EOF +works. + +To get Bobo (now ZPublisher) working, I use a wrapper .cmd file like this: +--------------form.cmd---------------- +@c:\Progra~1\Python\pythonw -x "%~f0" %* & goto :EOF +import traceback, sys +try: + sys.path[0:0] = ["h:\\staff\\tvoc\\python"] + + import cgi_module_publisher + cgi_module_publisher.publish_module("form") + +except: + print 'Content-type: text/plain\n\n' + print 'An error occured in attempting to set up the environment for +this application.' +-------------end of form.cmd------------------- + +sys.path needs to be set to include the directory with the python code you want +to publish, but the python code need not be visible to the web users. + +I then set up a redirect in the Netscape server configuration so that an +ordinary URL with an html extension gets redirected to form.cmd and the end +user doesn't even need to know that any CGI is involved. + +-- +Duncan Booth duncan at dales.rmplc.co.uk +int month(char *p){return(124864/((p[0]+p[1]-p[2]&0x1f)+1)%12)["\5\x8\3" +"\6\7\xb\1\x9\xa\2\0\4"];} // Who said my code was obscure? +http://dales.rmplc.co.uk/Duncan + + + + diff --git a/demo/ermis-f/python_m/cur/0621 b/demo/ermis-f/python_m/cur/0621 new file mode 100644 index 00000000..6a9def0b --- /dev/null +++ b/demo/ermis-f/python_m/cur/0621 @@ -0,0 +1,38 @@ +From: phd at sun.med.ru (Oleg Broytmann) +Date: Fri, 9 Apr 1999 10:13:10 GMT +Subject: simple dbm question +In-Reply-To: <370D55D9.B75ECE47@hons.cs.usyd.edu.au> +References: <370D55D9.B75ECE47@hons.cs.usyd.edu.au> +Message-ID: +X-UID: 621 + +On Fri, 9 Apr 1999, Matthew Robert Gallagher wrote: +> import anydbm +> file = anydbm.open('hew') +> +> error appears as +> Traceback (innermost last): +> File "/usr/local/lib/python1.5/anydbm.py", line 54, in open +> return _mod.open(file, flag, mode) +> gdbm.error: (2, 'No such file or directory') + + Is there GDBM database "hew"? If not - you need to create it: + +import anydbm +file = anydbm.open('hew', 'w') + +> thanks +> +> hew +> +> + +Oleg. +---- + Oleg Broytmann National Research Surgery Centre http://sun.med.ru/~phd/ + Programmers don't die, they just GOSUB without RETURN. + + + + + diff --git a/demo/ermis-f/python_m/cur/0622 b/demo/ermis-f/python_m/cur/0622 new file mode 100644 index 00000000..a729302c --- /dev/null +++ b/demo/ermis-f/python_m/cur/0622 @@ -0,0 +1,30 @@ +From: dalke at bioreason.com (Andrew Dalke) +Date: Thu, 22 Apr 1999 22:11:15 -0600 +Subject: Built-in Modules gl, GL for SGI IRIX +References: +Message-ID: <371FF2E3.7FB17EBD@bioreason.com> +X-UID: 622 + +David Steuber asked: +> How difficult is it to set up the gl and GL modules to +> look on the system for Mesa, GL or Windows OpenGL dlls and use the +> appropriate shared objects for a Python program? + +GL and OpenGL are quite different libraries, with different +function names, different ways of viewing the world, and even +different transformation matricies (post- vs. pre- multiply). +It would be hard to make them work together at the level you want. + +However, since you don't have to worry about supporting SGI +hardware from about 1996 or earlier, just use the PyOpenGL module + + http://starship.python.net/crew/da/PyOpenGL/ + +and ignore that section in the Python manual. + + Andrew + dalke at acm.org + + + + diff --git a/demo/ermis-f/python_m/cur/0623 b/demo/ermis-f/python_m/cur/0623 new file mode 100644 index 00000000..97fedddb --- /dev/null +++ b/demo/ermis-f/python_m/cur/0623 @@ -0,0 +1,25 @@ +From: aahz at netcom.com (Aahz Maruch) +Date: Fri, 23 Apr 1999 13:44:43 GMT +Subject: try vs. has_key() +References: +Message-ID: +X-UID: 623 + +Thanks for all the responses, it's a lot clearer now. + +As a side note, people who cc their posts by e-mail should stick the +phrase "[posted and e-mailed]" at the top; it's disconcerting when one +doesn't know whether something is intended to be private, and e-mail +almost always arrives faster than news. +-- + --- Aahz (@netcom.com) + +Hugs and backrubs -- I break Rule 6 <*> http://www.rahul.net/aahz/ +Androgynous poly kinky vanilla queer het + +"You often don't really understand the problem until after the first +time you implement a solution." - Eric S. Raymond + + + + diff --git a/demo/ermis-f/python_m/cur/0624 b/demo/ermis-f/python_m/cur/0624 new file mode 100644 index 00000000..e941f805 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0624 @@ -0,0 +1,52 @@ +From: aa8vb at vislab.epa.gov (Randall Hopper) +Date: Mon, 26 Apr 1999 08:06:09 -0400 +Subject: GNU GUIs in Python (was Re: GUI other than Tkinter (wxPython)) +In-Reply-To: <7fs9to$rlr$1@nnrp1.dejanews.com>; from fm@synchrologic.com on Sat, Apr 24, 1999 at 11:28:58AM +0000 +References: <3721567f.1748033@news> <7fs9to$rlr$1@nnrp1.dejanews.com> +Message-ID: <19990426080609.A503367@vislab.epa.gov> +Content-Length: 1825 +X-UID: 624 + +fm at synchrologic.com: + |mrfusion at bigfoot.com wrote: + |> Well, I've just about given up on EVER getting Tkinter to work on my + |> Win98 machine. Is there any other GUI module that I can get that + |> doesn't require TCL/TK to be installed on my machine? Isn't there + |> something called GD? + | + |I am a real big fan of wxPython. I've gotten everyone at our company + |hooked on it. We use it for prototyping apps now because it's so much + |faster than any other tool (that is, VB). It has a full set of controls + |(tree, list, grid). Actually, wxWindows on which it's based is pretty + |nice as well (though C++ requires 10-20 times more typing). Check out + |http://www.alldunn.com/wxPython/ and + |http://web.ukonline.co.uk/julian.smart/wxwin/. I think you'll be pretty + |happy with it. Good luck. + +On a related note, is wxWindows/wxPython GPLed? It isn't bold in stating +it, but I noticed in the Copyright section: + + http://web.ukonline.co.uk/julian.smart/wxwin/manuals/html/wx2/wx1.htm#topic0 + +it says: + + "Please see the wxWindows licence files (preamble.txt, lgpl.txt, gpl.txt, + licence.txt, licendoc.txt) for conditions of software and documentation + use." + +Many developers are familiar with the GNU license policy (you link with GNU +==> you're GNU) which discourages use of any GNU product for commercial +purposes where you need to link at the factory. + +Has anyone taken a look at how/whether this affects scripting code like +Python scripts? Here you're usually not "linking" to anything until the +program is run, and then it's the user actually responsible for the +linking. This is similar to LKMs (loadable kernel modules) where the user +makes the choice. (Though a snag might be if you have to relink the Python +interpreter at the factor [like Tkinter] to support use of the GUI in scripts.) + +Randall + + + + diff --git a/demo/ermis-f/python_m/cur/0625 b/demo/ermis-f/python_m/cur/0625 new file mode 100644 index 00000000..84a2bf72 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0625 @@ -0,0 +1,32 @@ +From: news at helen.demon.nl (Ilja Heitlager) +Date: Tue, 27 Apr 1999 21:47:08 +0200 +Subject: Designing Large Systems with Python +References: +Message-ID: <925242516.13209.0.rover.c3ade4b2@news.demon.nl> +X-UID: 625 + +>Yes, they do. I should know - I'm working on a whopping great +>big laboratory erp system built in Visual Basic. First there was +>the prototype and it looked like a Windows program. + +[Very nice anekdote about (failure of) software management] + +> I don't think Python really insures you against these mistakes. + + +You are right, maybe + +The Commando Returns by David Thielen and Larry Constantine +in SD magazine. + +http://www.sdmagazine.com/supplement/ppm/homepage.shtml + +might be interesting + +Ilja + + + + + + diff --git a/demo/ermis-f/python_m/cur/0626 b/demo/ermis-f/python_m/cur/0626 new file mode 100644 index 00000000..ec729de6 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0626 @@ -0,0 +1,49 @@ +From: aahz at netcom.com (Aahz Maruch) +Date: Mon, 26 Apr 1999 00:58:41 GMT +Subject: converting perl to python - simple questions. +References: <000001be8f3e$eea9c3c0$d39e2299@tim> +Message-ID: +Content-Length: 1280 +X-UID: 626 + +In article <000001be8f3e$eea9c3c0$d39e2299 at tim>, +Tim Peters wrote: +>[sweeting at neuronet.com.my] +>> ... +>> Anyway, since I know that there are a few ex-perlmongers on the list, +>> would somebody be so kind as to confirm whether I've translated +>> the following code snippets correctly : +>> +>> a) Perl's "defined". +>> [perl] +>> if (defined($x{$token}) +>> +>> [python] +>> if (x.has_key(token) and x[token]!=None) : +> +>If should be enough to do +> +> if x.has_key(token): +> +>under the probably-correct theory that the Perl is just asking "does hash +>'x' have key 'token'?" + +Try "definitely wrong theory" ;-). In Perl, exists($x{$token}) is +precisely equivalent to Pyton's x.has_key(token), and you can either use +defined($x{$token}) or $x{$token}!=undef to make sure that a value +exists for that key. Thing is, in Perl you can go straight to checking +the value because a non-existant key is not an error. + +(I won't quite call myself a Perl expert, but I'm pretty close to an +expert on Perl hashes.) +-- + --- Aahz (@netcom.com) + +Hugs and backrubs -- I break Rule 6 <*> http://www.rahul.net/aahz/ +Androgynous poly kinky vanilla queer het + +Hi! I'm a beta for SigVirus 2000! Copy me into your .sigfile! + + + + diff --git a/demo/ermis-f/python_m/cur/0627 b/demo/ermis-f/python_m/cur/0627 new file mode 100644 index 00000000..3047f7eb --- /dev/null +++ b/demo/ermis-f/python_m/cur/0627 @@ -0,0 +1,25 @@ +From: SunitJoshi at email.msn.com (SunitJoshi) +Date: Mon, 5 Apr 1999 19:04:15 -0500 +Subject: Help! Parsing file +Message-ID: +X-UID: 627 + +I have a text file with two cols like: + ADDBBD 'This is a test file that spans +two lines' + +I was wondering if someone could point out the best way to scan this file so +that I can +create an output file like: + ADDBBD This is a test file that spans two lines + +i.e without the single quotes + +thanks +Sunit + + + + + + diff --git a/demo/ermis-f/python_m/cur/0628 b/demo/ermis-f/python_m/cur/0628 new file mode 100644 index 00000000..77240ee0 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0628 @@ -0,0 +1,33 @@ +From: tim_one at email.msn.com (Tim Peters) +Date: Fri, 23 Apr 1999 04:12:48 GMT +Subject: unpickling an NT object in Solaris? +In-Reply-To: +References: +Message-ID: <000201be8d3f$8d3269e0$9a9e2299@tim> +X-UID: 628 + +[Bill Dozier] +> The text mode of pickling is not cross-platform and seems to +> expect UNIX linefeeds. :P + +[Guido] +> Nonsense. However you must open the file you're pickling to in binary +> mode: open(filename,'wb'). + +[Bill] +> Unfortunately, this detail is not found in the documentation. It +> certainly does not seem obvious that one should write a text file +> in binary mode. + +It does if you've tried to port any other kind of text file from Windows to +Unix, whether via Python or C -- there's nothing unique to pickle in this! +Windows text files aren't properly read by Unix libc file routines, and +that's all there is to it. + +text-files-aren't-portable-period-ly y'rs - tim + + + + + + diff --git a/demo/ermis-f/python_m/cur/0629 b/demo/ermis-f/python_m/cur/0629 new file mode 100644 index 00000000..71a6563e --- /dev/null +++ b/demo/ermis-f/python_m/cur/0629 @@ -0,0 +1,25 @@ +From: ranjan.bagchi at pobox.com (ranjan.bagchi at pobox.com) +Date: Tue, 13 Apr 1999 15:03:54 GMT +Subject: Help? Newbie COM Question +Message-ID: <7evmck$2en$1@nnrp1.dejanews.com> +X-UID: 629 + +Hi -- + +I'm checking Python out for automating COM objects and fast GUI development. +The COM objects in question are developed in VisualJ++, and in other COM +enviromments (tcl with the tcom package), I can get lists of methods and +properties offered by the object. + +Is there an easy way to do this in WinPython? + +Thanks in advance! + +-rj + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/0630 b/demo/ermis-f/python_m/cur/0630 new file mode 100644 index 00000000..042c0ddc --- /dev/null +++ b/demo/ermis-f/python_m/cur/0630 @@ -0,0 +1,41 @@ +From: Norbert.Klamann at pobox.com (Norbert.Klamann at pobox.com) +Date: Tue, 27 Apr 1999 05:29:45 GMT +Subject: HELP - FTP seesions using python???????? +References: <7g328l$hga$1@nnrp1.dejanews.com> +Message-ID: <7g3i05$uo9$1@nnrp1.dejanews.com> +X-UID: 630 + +In article <7g328l$hga$1 at nnrp1.dejanews.com>, + gony at my-dejanews.com wrote: +> any links or tips etc on how to tackle automation of FTP sessions using python +> would be most appreciated. +Here is a batch example, it is an extract so it comes with no warranty :) +It implements a 'put'-Operation on a file from Windows NT to an IBM-Host + + +import ftplib + +def doit(): + ftp = ftplib.FTP(FTPNameHost) + ftp.login(FTPUserId,FTPPasswort) + fileA= open(AuftragSammelDateiName,'r') + ftp.storlines("STOR '" + AuftragHostDateiname + "'" ,fileA) + ftp.quit() + fileA.close() + +The 'STOR' and the "'" - Delimiters are specific for +the FTP-Implementation on an IBM Host. + +Hope that helps ! +-- +Norbert Klamann +Klamann Software & Beratung +Erftstadt Germany +Klamann.Software at pobox.com + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/0631 b/demo/ermis-f/python_m/cur/0631 new file mode 100644 index 00000000..2dd596d2 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0631 @@ -0,0 +1,38 @@ +From: trashcan at david-steuber.com (David Steuber) +Date: 06 Apr 1999 15:46:12 -0500 +Subject: povray.py +References: <__YN2.30200$FZ5.11443@news.rdc1.sfba.home.com> +Message-ID: +X-UID: 631 + +mlh at idt.ntnu.no (Magnus L. Hetland) writes: + +-> "TM" writes: +-> +-> > Has anyone created a pov ray module for python? +-> +-> I have been thinking about it, but haven't done it yet... What do you +-> think it should contain? + +This is a relatively off the cuff response. But I think such a module +should provide python classes for the POV types. Then, instead of +using the POV scene description language, you would use Python. You +could algorithmicly create a scene or animation sequence. Then you +would pass the data structure (a list or other sequence) to a Python +function that renders it in POV scene description language for POV to +digest and render. + +Another thing I would like to see is a module for generating RIB +files. In fact, a Python RenderMan module would be quite nice, +complete with shading language support. Anything out there like that? + +-- +David Steuber +http://www.david-steuber.com + +s/trashcan/david/ to reply by mail +If you don't, I won't see it. + + + + diff --git a/demo/ermis-f/python_m/cur/0632 b/demo/ermis-f/python_m/cur/0632 new file mode 100644 index 00000000..fe84277a --- /dev/null +++ b/demo/ermis-f/python_m/cur/0632 @@ -0,0 +1,64 @@ +From: gscot at my-dejanews.com (gscot at my-dejanews.com) +Date: Sat, 10 Apr 1999 04:52:06 GMT +Subject: Internet Robot +References: <7ehe9m$hbs$1@nnrp1.dejanews.com> +Message-ID: <7emldl$rh9$1@nnrp1.dejanews.com> +Content-Length: 2204 +X-UID: 632 + +David Steuber: Thank you for the reply (and Thanks to every one that +replied). It was a big help to read over the rfc 1945 and rfc 2068. It is the +first time that I have every looked at one and they are pretty informative. + I can now POST my request but the server is asking for authentication. +You mentioned that it might be helpful to capture and look at the client?s +out put. How do I do that. I am using linux RedHat 5.0. I read in ?TCP/IP +Network Administration? from O?Reilly (A great book) and they suggested using +snoop or tcpdump. I could not find a version of snoop for linux. I tried +tcpdump, but it gave me a lot of what looked like Greek to me (I am not at my +own computer or I would add some of tcpdump produced). I had expected to see +thing in English. Thank you again for your previous reply and thanks +in advance for any information you can give me with this. Gary + + + + +In article , + David Steuber wrote: +> gscot at my-dejanews.com writes: +> +> -> To All, I would like to write a Python robot to play an Internet +> -> game. I do not know how to make a POST request. Thanks to anyone in advance +> -> that can point me in the right direction. Gary +> +> There are two ways to post data. I remember one way, but the other is +> a little trickier. The simple way is to send up a URL encoded string +> as the body of the request. The other is to send a multi-part mime +> document. I suggest you go with the former if possible. A post would +> look something like this: +> +> POST /URI HTTP/1.0 +> Content-Length: octets +> Content-Type: +> +> URL+Encoded+Data+as+name+value+pairs +> +> A good thing to do would be to capture the output of an HTTP client +> posting form data. Also see RFC-1945 and RFC-2068. +> +> -- +> David Steuber +> http://www.david-steuber.com +> +> s/trashcan/david/ to reply by mail +> If you don't, I won't see it. +> +> A LISP programmer knows the value of everything, but the cost of +> nothing. +> + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/0633 b/demo/ermis-f/python_m/cur/0633 new file mode 100644 index 00000000..6be586dd --- /dev/null +++ b/demo/ermis-f/python_m/cur/0633 @@ -0,0 +1,40 @@ +From: banderson at boi.hp.com (Bill Anderson) +Date: Mon, 05 Apr 1999 21:35:52 +0000 +Subject: Python books +References: <7dtsa4$b6p$1@nnrp1.dejanews.com> <7e0t19$1de$1@nnrp1.dejanews.com> <7e2vol$8c6$1@news1.rmi.net> <37090160.C52377BA@boi.hp.com> <3709119F.59ACCC73@spacenet.tn.cornell.edu> +Message-ID: <37092CB8.C958CCBE@boi.hp.com> +X-UID: 633 + +Tom Loredo wrote: +> +> Bill Anderson wrote: +> +> > So what other publisher has a Python book out, and what is the name of +> > it? +> +> You could of course find this out at python.org, but FWIW the answer is: +> +> *Internet Programming With Python* which includes Mr. Python himself +> in the author list. Despite its title, it has very good *general* +> coverage of Python, including extending and embedding it; the +> chapters on creating HTML documents and writing CGI scripts should +> be viewed merely as nice examples showing off some of the capability +> described more generally in the earlier chapters. I think the +> title is a bit unfortunate. +> +> -Tom Loredo + + +Have that one. In a momentary lapse of memory forgot it wasn't published +by O'Reilly %-} + +I agree that it's usefullness exceeds the title. + +-- +Bill Anderson Linux Administrator +MCS-Boise (ARC) banderson at boi.hp.com +My opinions are just that; _my_ opinions. + + + + diff --git a/demo/ermis-f/python_m/cur/0634 b/demo/ermis-f/python_m/cur/0634 new file mode 100644 index 00000000..998830ab --- /dev/null +++ b/demo/ermis-f/python_m/cur/0634 @@ -0,0 +1,27 @@ +From: MHammond at skippinet.com.au (Mark Hammond) +Date: Tue, 13 Apr 1999 17:43:54 +1000 +Subject: Python without registry entries +References: <370fb711.28093946@news.demon.co.uk> <7eol16$1l2$1@m2.c2.telstra-mm.net.au> <37121820.3758204@news.netmeg.net> <37116F7B.3E3088EB@prescod.net> +Message-ID: <7eushr$see$1@m2.c2.telstra-mm.net.au> +X-UID: 634 + +Paul Prescod wrote in message <37116F7B.3E3088EB at prescod.net>... +> I would prefer if PythonWin did what Netscape does which is put the vast +> majority of setup information in a text file in the Netscape directory and + +Actually, this is done in .py code. A single MFC call allows you to toggle +this behaviour. Would certainly be possible to have most Pythonwin config +info in a .ini file with only very minor changes. + +But this is only info like the recent file list, window positions, editor +preferences etc - not pythonpath type information - pythonwin leaves that to +Python (as as Fredrik mentions, site and sitecustomize are good mechanisms +for that) + +Mark. + + + + + + diff --git a/demo/ermis-f/python_m/cur/0635 b/demo/ermis-f/python_m/cur/0635 new file mode 100644 index 00000000..d8c2df52 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0635 @@ -0,0 +1,55 @@ +From: paul at prescod.net (Paul Prescod) +Date: Fri, 16 Apr 1999 09:44:20 GMT +Subject: Simple module installation +Message-ID: <37170674.F77233A6@prescod.net> +Content-Length: 1742 +X-UID: 635 + +I was just installing Fnorb and it was as painless an installation as a +sane person could ask for but I got to thinking...couldn't this be less +painless? The reason I ask is because I'm thinking of distributing code +that depends on code that depends on code that depends on Fnorb and I need +each installation part to be as simple as possible. So this isn't meant to +pick on Fnorb in particular but to use it as a random sample package with +binary and Python parts. + +The only thing that makes it extremely mildly painful is that it requires +setting a few environment variables: + +FNORB_HOME +PYTHONPATH +PATH + +The PYTHONPATH and PATH would be unneccessary if Fnorb used the Windows +registry. Even so, I think that a Python-managed, portable, text +file-based registry (like JPython's) would be better than depending upon +the over-centralized Windows registry. + +FNORB_HOME seems to only exist in order to implement a feature that Andrew +Kuchling has asked for before. Fnorb has a bunch of tiny scripts that do +this: + +@python.exe "%FNORB_HOME%"\Fnorb\script\fnendian %1 %2 %3 %4 %5 %6 %7 %8 +%9 + +If Python could find scripts in its PYTHONPATH then this wouldn't be +necessary. So this is a feature request for that feature. I can implement +it if people agree it would be a good idea: + +python -r script: run the script named "script.py" in the PYTHONPATH + +If we put my idea for a Python-managed registry together with the "-r" +idea then Fnorb could register itself on Windows or Unix like this: + +python -r register Fnorb /path/to/fnorb + +-- + Paul Prescod - ISOGEN Consulting Engineer speaking for only himself + http://itrc.uwaterloo.ca/~papresco + +"In spite of everything I still believe that people are basically +good at heart." - Anne Frank + + + + diff --git a/demo/ermis-f/python_m/cur/0636 b/demo/ermis-f/python_m/cur/0636 new file mode 100644 index 00000000..c14dc3ac --- /dev/null +++ b/demo/ermis-f/python_m/cur/0636 @@ -0,0 +1,24 @@ +From: marduk at manson.ddns.org (marduk at manson.ddns.org) +Date: 9 Apr 1999 01:52:19 GMT +Subject: povray.py +References: <__YN2.30200$FZ5.11443@news.rdc1.sfba.home.com> +Message-ID: +X-UID: 636 + +TM says: +>I would love a copy. I've only written a few (simple) modules, +>but I'd sure like to try and help you out. +> + +Second that. Perhaps it would be easier putting it on a web/ftp site. + +marduk at python.net + + +-- +---------------------------------------------------------------- +(c) Copywight 1992 Elmer Fudd. All wights wesewved. + + + + diff --git a/demo/ermis-f/python_m/cur/0637 b/demo/ermis-f/python_m/cur/0637 new file mode 100644 index 00000000..cf9cc586 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0637 @@ -0,0 +1,24 @@ +From: djosephs at citiscape.com (DMJ) +Date: Tue, 13 Apr 1999 10:27:17 GMT +Subject: Python list removal +References: <3709C492.EED3BF03@parkey.com> <370A7E0A.3C8D79B9@metricom.com> +Message-ID: <37131C03.63C86F43@citiscape.com> +X-UID: 637 + +> + +To Whom it May concern, + +Please remove djosephs at citiscape.com, fadler at citiscape.com and +media at citiscape.com from the newsgroup mailing list for questions + +Thank you + +David Josephs +CFO +CITISCAPE + + + + + diff --git a/demo/ermis-f/python_m/cur/0638 b/demo/ermis-f/python_m/cur/0638 new file mode 100644 index 00000000..89efc2b3 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0638 @@ -0,0 +1,42 @@ +From: MHammond at skippinet.com.au (Mark Hammond) +Date: Fri, 9 Apr 1999 11:11:40 +1000 +Subject: How to use long names in python for windows +References: <370e9080.37656309@news.interaccess.com> +Message-ID: <7ejk3a$5ir$1@m2.c2.telstra-mm.net.au> +X-UID: 638 + +Bob Hays, Computer Geek wrote in message +<370e9080.37656309 at news.interaccess.com>... +>I'm on Win95, I've downloaded python 1.5.1 and pythonwin (123 I +>think). I've been using pythonwin for development and that works +>great. Now, I want to create a set of batch files to run processes +>for me - I'm getting the following error from python: +> +>ValueError: Module name too long + +This is very strange. Internally, Python will throw this error when it is +asked to import a module name over 255 characters long - certainly isnt an +"8.3" issue. + +You could try adding to the start of your script: +import sys +for path in sys.path: + print path + +When the script fails, see what the values are, and if there are any +insanely long paths that somehow got themselves in... + + +>Is there a problem with long file name support in python 1.5.1 on +>Windows95? Is there some startup script I need to execute first to + +Nope - long file names (up to 255 characters) should work fine... + +Mark. + + + + + + + diff --git a/demo/ermis-f/python_m/cur/0639 b/demo/ermis-f/python_m/cur/0639 new file mode 100644 index 00000000..468065d7 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0639 @@ -0,0 +1,69 @@ +From: mal at lemburg.com (M.-A. Lemburg) +Date: Fri, 16 Apr 1999 11:19:42 GMT +Subject: ANN: mxStack Package - Version 0.3.0 +Message-ID: <37171CCE.656F3EF6@lemburg.com> +Content-Length: 1832 +X-UID: 639 + +ANNOUNCING: + + mxStack Version 0.3.0 + + A Python Extension Package providing a fast and memory + efficient stack implementation. + + +WHAT IT IS: + +mxStack is an extension package that provides a new type called +Stack. The type works like a stack with an implementation that +is optimized for speed. Memory usage is comparable to that of +Python lists. + +The package also includes a UserStack implementation written +entirely in Python. + +Apart from providing access to this type to Python programmers, +the extension also exports a C API object useable by third party +extensions. This API gives direct access to the implementation +through C function calls. + +WHAT'S NEW ? + +The 0.3.0 version fixes a memory leak and adds a few more methods +to the type, making it more versatile and efficient. An up-to-date +pre-compiled Windows PYD file is included in the package. + +WHERE CAN I GET IT ? + +The full documentation and instructions for downloading and +installing can be found at: + + http://starship.skyport.net/~lemburg/mxStack.html + +WHAT DOES IT COST ? + +mxStack comes with a Python-style license, but is otherwise free +for commercial and non-commercial use. + +WHERE CAN I GET SUPPORT ? + +I am offering commercial support for this package through +Python Professional Services Inc. (http://www.pythonpros.com). +Look on their support pages for details or contact me directly. + +REFERENCE: + +

+X-UID: 641 + +Hi All.. + +New to OpenGL so please bear with me. I'm trying to create an OpenGL port +in my application to display images--only way to show more than 256 colors +here on our SGIs. I've been having some difficulties: + +1.) Any way to scroll via. scrollbars the OpenGL port? (like attaching + to a canvas but that didn't seem to do the trick) + +2.) My Images are always offset about 25% up and left using this code: + glLoadIdentity() + gluOrtho2d(0,portWidth,0,portHeight) + glRasterPos2i(0,0) + glDrawPixels(imWid,imHeight, GL_RGBA, GL_UNSIGNED_BYTE, im) + +At least I can see the image, but I don't understand where the offset is +coming in. I've looked for a simple "DisplayImage" demo but haven't found +one. + +Thanks in advance! + +Mark A. McGuire +mcguire at rhythm.com +Rhythm & Hues Studios, Inc. + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/0642 b/demo/ermis-f/python_m/cur/0642 new file mode 100644 index 00000000..3ed33043 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0642 @@ -0,0 +1,73 @@ +From: mwh21 at cam.ac.uk (Michael Hudson) +Date: 19 Apr 1999 10:32:38 +0100 +Subject: How libpython1.5.so +References: <371320F4.5338600B@earth.ox.ac.uk> <199904190114.VAA03514@207-172-39-16.s16.tnt10.ann.va.dialup.rcn.com> +Message-ID: +Content-Length: 2094 +X-UID: 642 + +"A.M. Kuchling" writes: +> Nick Belshaw writes: +> > Whilst trying to get Python plugins to work on Gnumeric-0.23 I bumped up +> > against the need for libpython1.5.so.0.0.0 +> +> Here's a patch to the top-level Makefile.in which adds a "shared" +> target. Can people please try this and see if it works on your +> favorite Unix variant? + +It works on mine (bog standard redhat5.2/i686 glibc2 egcs 1.1.2) and +now gnumeric loads Python extensions! Yippee! + +I had to make a small change to the patch, see below. + +> It doesn't verify that you've compiled all the +> code with -fPIC or whatever's required; I'm not sure how to check or +> enforce that. (It could do "make clean ; make CCFLAGS=", +> but is that too extreme?) + +The proper answer is to use libtool I suppose. You need to build with +"make OPT='-g -O2 -fPIC'" rather then CCFLAGS, btw. + +> Index: Makefile.in +> =================================================================== +> RCS file: /projects/cvsroot/python/dist/src/Makefile.in,v +> retrieving revision 1.80 +> diff -C2 -r1.80 Makefile.in +> *** Makefile.in 1999/02/23 15:43:15 1.80 +> --- Makefile.in 1999/04/19 00:53:28 +> *************** +> *** 214,217 **** +> --- 214,226 ---- +> libtool -o $(LDLIBRARY) -dynamic $(OTHER_LIBTOOL_OPT) $(LIBRARY) -framework System @LIBTOOL_CRUFT@ +> +> + # Target to make a shared library containing the interpreter +> + +> + shared: $(LIBRARY) +> + test -d .shared || mkdir .shared ; \ +> + (cd .shared;ar x ../$(LIBRARY); $(LDSHARED) -o ../libpython$(VERSION).$(SO) *.o ); \ + +-----------------------------------------------------------------------------^ + +This period shouldn't be here. + +> + /bin/rm -rf ./.shared +> + +> + +> + +> $(SUBDIRS): Makefiles +> +> +> -- +> A.M. Kuchling http://starship.python.net/crew/amk/ +> Since I killed my son... the Dreaming has not been the same ... or perhaps I +> was no longer the same. I still had my obligations... But even the freedom of +> the Dreaming can be a cage, of a kind, my sister. +> -- Dream, in SANDMAN #69: "The Kindly Ones:13" + +Thanks a lot! + +Michael + + + + diff --git a/demo/ermis-f/python_m/cur/0643 b/demo/ermis-f/python_m/cur/0643 new file mode 100644 index 00000000..4f89cfb8 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0643 @@ -0,0 +1,35 @@ +From: morse at harborcom.net (Kevin Dahlhausen) +Date: Thu, 15 Apr 1999 14:07:52 GMT +Subject: overloading ( was Different methods with same name but different signature? ) - overloadinginpython.tar.gz (0/1) +References: <3716909C.D8D1B372@fedex.com> +Message-ID: <3715f152.73653197@news.oh.verio.com> +X-UID: 643 + +Here's some code by Bjorn Pettersen that implements a +scheme for overloaded member functions. I've not messed +RTTI in user types, but I think you might need to overload whatever +handles the type info for a user class in each of your user classes. + +Bjorn's code uses the types of all parameters passed to a function +as key into a dictionary containing the correct function for various +types of input paramters. It works very well. + + +frederic pinel wrote: +>Hello, +> +>While trying to implement the visitor pattern in Python, I ran into the +>following problem: +> +>My class needs to have 2 (or more) different methods, but with the same +>name, the difference being the signature (an object in my case), +>unfortunately Pyhton interprets this as an overidding, and only +>considers the last method defined. +>C++ being able to switch to the right method, based on the signature, I +>thought Python would. + + + + + + diff --git a/demo/ermis-f/python_m/cur/0644 b/demo/ermis-f/python_m/cur/0644 new file mode 100644 index 00000000..c22bd165 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0644 @@ -0,0 +1,32 @@ +From: donn at u.washington.edu (Donn Cave) +Date: 27 Apr 1999 15:43:10 GMT +Subject: Python too slow for real world +References: <372068E6.16A4A90@icrf.icnet.uk> <3720A21B.9C62DDB9@icrf.icnet.uk> <3720C4DB.7FCF2AE@appliedbiometrics.com> <3720C6EE.33CA6494@appliedbiometrics.com> <37215EFB.433AFCA6@prescod.net> <3724B2D6.B468687A@prescod.net> <37252816.42634501@Lugoj.Com> +Message-ID: <7g4lue$qsq$1@nntp6.u.washington.edu> +Content-Length: 1025 +X-UID: 644 + +roy at popmail.med.nyu.edu (Roy Smith) writes: +|James Logajan wrote: +|> When an SME finds the tool too slow, it would be nice if they could post +|> their problem to a group like this without fear of insult, intended or not. +| +| There was no intent to insult. +| +| The thread was moving in the direction of "my program using regex is too +| slow, and I think the solution would be to move regex into the python core +| to make it faster". I was just pointing out why that is flawed reasoning. + +I didn't read any insult. You venture into a somewhat sensitive area +when you start making distinctions like ``good programmer'', and I reckon +some criticism is inevitable. It's going to take a while to come to terms +with this issue (Python for people who don't qualify as expert programmers), +and in this process we need to feel free to speak up without too much fear +of saying something politically incorrect. + + Donn Cave, University Computing Services, University of Washington + donn at u.washington.edu + + + + diff --git a/demo/ermis-f/python_m/cur/0645 b/demo/ermis-f/python_m/cur/0645 new file mode 100644 index 00000000..62604dec --- /dev/null +++ b/demo/ermis-f/python_m/cur/0645 @@ -0,0 +1,20 @@ +From: faassen at pop.vet.uu.nl (Martijn Faassen) +Date: Tue, 06 Apr 1999 11:11:28 +0200 +Subject: Python Chip +References: <3703C591.FE65E94D@pop.vet.uu.nl> +Message-ID: <3709CFC0.BCB0990A@pop.vet.uu.nl> +X-UID: 645 + +Hi everybody, + +For those who are still anxiously itching to get their hands on a Python +machine, this was of course an April Fool's joke. :) + +You can now all come to destroy me now. (any other jokes in this +newsgroup which I missed?) + +Martijn + + + + diff --git a/demo/ermis-f/python_m/cur/0646 b/demo/ermis-f/python_m/cur/0646 new file mode 100644 index 00000000..6665e7a2 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0646 @@ -0,0 +1,36 @@ +From: fredrik at pythonware.com (Fredrik Lundh) +Date: Mon, 19 Apr 1999 08:28:18 GMT +Subject: [Image-SIG] PIL 1.0b1 bug report +References: <199904170334.XAA06683@python.org> +Message-ID: <017401be8a3e$d6f37f00$f29b12c2@pythonware.com> +X-UID: 646 + +Piers Lauder wrote: +> I had to add the following code just before the last #include +> in each of Jpeg{En|De}code.c +> #undef METHODDEF +> #define METHODDEF(A) static A +> #undef GLOBAL +> #define GLOBAL(A) A +> +> Without that, the macros produced code of the form +> static (void) XXX + +this is not a bug. you're using an old version of the JPEG +libraries (older than 6a, which is the oldest version listed +in the PIL README). recent versions of the JPEG library +can be obtained from: + + http://www.ijg.org/ + +(but now that you've fixed this, version 6 should work +just as well as 6a!) + +Cheers /F +fredrik at pythonware.com +http://www.pythonware.com + + + + + diff --git a/demo/ermis-f/python_m/cur/0647 b/demo/ermis-f/python_m/cur/0647 new file mode 100644 index 00000000..f0456944 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0647 @@ -0,0 +1,23 @@ +From: fredp at multimania.com (Fred Pacquier) +Date: Mon, 26 Apr 99 21:15:28 GMT +Subject: Python and "Hand held" computers +References: <37222AE6.E6C8F713@weihenstephan.org> +Message-ID: <7g2l65$92k$1@minus.oleane.net> +X-UID: 647 + +In article <37222AE6.E6C8F713 at weihenstephan.org>, peter.stoehr at weihenstephan.org wrote: +>Hi Python-Fans, +> +>I'm a great fan of python and I'm now looking for an hand held computer +>(something smaller than a laptop) that can be programmed with python. +> +>Is there a WEB page or any other place were I can find information about +>this +>topic? +> +Python 1.5.1 was ported last year to the Psion Series 5 by an Englishman, and +it works quite well. I can find the Web site if you're interested... + + + + diff --git a/demo/ermis-f/python_m/cur/0648 b/demo/ermis-f/python_m/cur/0648 new file mode 100644 index 00000000..c9ea8724 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0648 @@ -0,0 +1,40 @@ +From: MHammond at skippinet.com.au (Mark Hammond) +Date: Wed, 14 Apr 1999 14:26:56 +1000 +Subject: Freezing an App +References: +Message-ID: <7f15dj$bq4$1@m2.c2.telstra-mm.net.au> +X-UID: 648 + +Calishar wrote in message ... + +> The part I am having problems with is using win32api. It runs, doesnt set +>the registry values it is suppoed to, and exits without giving any errors. + +Im not sure what you mean here. + +Firstly, you could consider simply shipping win32api.pyd - ie, dont freeze +it. You should definately try to get your frozen application working with +win32api.pyd before attempting to freeze it. + +You do this simply by excluding win32api from the freeze using "-x win32api" + +If you want to freeze the win32api sources into your app, the process then +is: +* Download the sources to the win32api module. +* Check out the .ini file that comes with freeze. It is used to locate the +source to win32apimodule.cpp. + +Run freeze - it may complain it cant find the file. If so, ensure the +environment variable it uses is set. I can't recall exactly what that is. + +This could do with more work - Im happy to discuss ways you can help to make +this better for the next person :-) + +Mark. + + + + + + + diff --git a/demo/ermis-f/python_m/cur/0649 b/demo/ermis-f/python_m/cur/0649 new file mode 100644 index 00000000..52956312 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0649 @@ -0,0 +1,60 @@ +From: bmcd at es.co.nz (Ben Caradoc-Davies) +Date: 29 Apr 1999 22:51:19 GMT +Subject: Python and Perl (was: converting perl to python) +Message-ID: +Content-Length: 2179 +X-UID: 649 + +[This is not intended to start another pointless language war. Well, at least +not between Perlers and Pythonistas. :-) ] + +On Thu, 29 Apr 1999 20:29:45 +0300, Moshe Zadka wrote: +>I wonder if Randal came here (2 messages in this group) to spread the +>regular Perl propaganda (summarized by "This language is icky because +>programmers are icky").... +>Randal, while I'm sure you're a good guy, and I liked ``Learning Perl'', +>most of us at c.l.py heard more about Perl then we'll ever want to -- +>in fact, I think many of us moved to Python from Perl, and never looked +>back. (Or we'd turn into salt) +>(And hey, Randal, when you wake up and start using Python, I'm sure you'll +>be one of the best c.l.py posters <0.5 wink>) + +Hmm ... Randal did have a rather Python-friendly .sig ... I would be reluctant +to start hassling him. + +I think that between Tom C. and Randal, some of the nicest things that I have +heard said about Python have come from Perlers. + +In my opinion, Perl is one of the best things Python has going for it; +1) Perl has, because of it's extreme usefulness, very deep "market + penetration" (ugh, I'm sounding like a suit). +2) Perl has established the credibility of dynamically typed high level + languages (I'm trying to stamp out the term "scripting languages") + for general purpose programming. +3) The nice people in c.l.p.m mention Python from time to time, and point + people in the right direction. And then there's Tom C's web page + comparing Perl and Python. + +Perl is a fertile breeding ground for Pythonistas. I'm sure many expand into +Python from Perl. But Perlers never forget their roots. Some things are just +too succint in perl to do any other way. + +e.g. deformatting a document, when you need extended regex and text which sed +can't handle; + +perl -e "while(<>){s/\s/\n/g;print;}" file1.txt > temp1.txt +perl -e "while(<>){s/\s/\n/g;print;}" file2.txt > temp2.txt +diff temp1.txt temp2.txt + +And this was on a machine which didn't have python (yet!). Even if it had, I +would have still used perl. + +Perl is going to be around for a long time. This is a very good thing for +Python. + +-- +Ben Caradoc-Davies + + + + diff --git a/demo/ermis-f/python_m/cur/0650 b/demo/ermis-f/python_m/cur/0650 new file mode 100644 index 00000000..620acd2f --- /dev/null +++ b/demo/ermis-f/python_m/cur/0650 @@ -0,0 +1,37 @@ +From: news at dorb.com (Darrell) +Date: Thu, 8 Apr 1999 17:44:18 -0400 +Subject: Python is working HARD to make you cash! +Message-ID: +X-UID: 650 + +This must be Guido's money making arm of the PSA + +>From: sales at pythonvideo.com +>Subject: Python pays 50% commission for live Amsterdam sex shows +> +>Dear Webmaster, +> +>Python is proud to introduce our newest plan to make you more money! +> +>We have increased our commissions on both the gay and straight Amsterdam +>Live Sex Show. +> +>Now, instead of a one time 40% payout, you'll get 50% recurring commission! +> +>Check it out at http://www.pythonvideo.com/products/amls.phtml +> +>Just another way Python is working HARD to make you cash! +> +>Sincerely, +> +>David van der Poel +>Vice President of Sales & Marketing +>Python Communications Inc. +>sales at pythonvideo.com + + + + + + + diff --git a/demo/ermis-f/python_m/cur/0651 b/demo/ermis-f/python_m/cur/0651 new file mode 100644 index 00000000..568f586d --- /dev/null +++ b/demo/ermis-f/python_m/cur/0651 @@ -0,0 +1,49 @@ +From: sweeting at neuronet.com.my (sweeting at neuronet.com.my) +Date: Sun, 25 Apr 1999 14:57:30 GMT +Subject: converting perl to python - simple questions. +Message-ID: <7fvagp$8lm$1@nnrp1.dejanews.com> +X-UID: 651 + +In my ongoing saga to build a chinese-language search engine, I've found a +great deal of groundwork already. The bad news (for me) is that this was all +in Perl so I've had a rather distressing day : +(a) learning perl +(b) converting the scripts to python so that I can build objects with them. + +Anyway, since I know that there are a few ex-perlmongers on the list, +would somebody be so kind as to confirm whether I've translated the following +code snippets correctly : + +a) Perl's "defined". + [perl] + if (defined($x{$token}) + + [python] + if (x.has_key(token) and x[token]!=None) : + +b) RE's. + [perl] + if ($mytext !~ /^\s$/) + + [python] + if not (re.match('^\s$'), mytext) + + +Since I know neither perl nor chinese, it would be nice if somebody +could help me remove one of the variables in my debugging. + +Thanking you :) + +chas + + + + + + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/0652 b/demo/ermis-f/python_m/cur/0652 new file mode 100644 index 00000000..8d96366b --- /dev/null +++ b/demo/ermis-f/python_m/cur/0652 @@ -0,0 +1,19 @@ +From: bwarsaw at cnri.reston.va.us (Barry A. Warsaw) +Date: 16 Apr 1999 19:54:28 -0400 +Subject: Python.org scheduled down time +References: <14103.22251.209537.804890@anthem.cnri.reston.va.us> <7f86kr$bd2@ds2.acs.ucalgary.ca> +Message-ID: <61iuaw15qj.fsf@anthem.cnri.reston.va.us> +X-UID: 652 + +>>>>> "NS" == Neil Schemenauer writes: + + NS> Is ftp.python.org mirrored anywhere? + +Lots of places. See http://www.python.org/Mirrors.html (which you can +do now that the main site is back up again :-) + +-Barry + + + + diff --git a/demo/ermis-f/python_m/cur/0653 b/demo/ermis-f/python_m/cur/0653 new file mode 100644 index 00000000..10d84705 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0653 @@ -0,0 +1,54 @@ +From: Bjoern.Giesler at stud.uni-karlsruhe.de (Bjoern Giesler) +Date: Mon, 12 Apr 1999 20:17:52 GMT +Subject: Stupid Tkinter question +References: <99041222110400.01382@dominion> +Message-ID: <99041222210800.02403@dominion> +Content-Length: 1080 +X-UID: 653 + +Hi, + +On Mon, 12 Apr 1999 I wrote myself: +[snip] +>[snip] +>#!/usr/bin/env python +> +>from Tkinter import * +>from sys import * +> +>def makeToolbar(aFrame): +> toolbar = Frame(aFrame) +> markimage = BitmapImage(file = "Mark.xbm") +> markbutton = Button(toolbar, +> image = markimage, +> command = exit) +> +> markbutton.pack() +> return toolbar +> +>def makeUI(anApp): +> frame = Frame(anApp) +> toolbar = makeToolbar(frame) +> +> toolbar.pack() +> frame.pack() +> +>app = Tk() +>makeUI(app) +>app.mainloop() +>[snip] + +I've just found out why the example above doesn't work: If I add a +"global markimage" to the function makeToolbar, it works. Now my +question: Why does markimage have to be global, since it's only used by +markbutton? And why, by analogy, doesn't markbutton have to be global? + + --Bjoern +-- ++ thanks for your time, worship the antichrist, and have a nice day /\ ++----------------------------------------------------------------- /()\ ++ support privacy on the 'net: mail me for pgp public key /____\ + + + + diff --git a/demo/ermis-f/python_m/cur/0654 b/demo/ermis-f/python_m/cur/0654 new file mode 100644 index 00000000..33c69e37 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0654 @@ -0,0 +1,28 @@ +From: bwinton at tor.dhs.org (Blake Winton) +Date: Fri, 16 Apr 1999 23:04:07 GMT +Subject: Quick fix to add "+=" +References: <3717AB14.2926AF76@mediaone.net> +Message-ID: +X-UID: 654 + +On Fri, 16 Apr 1999 17:26:44 -0400, Fuming Wang wrote: +>Any one knows a quick fix to add "+=" function. I am really getting +>tired of typing long names twice. + +Heh. I can't wait to see the other replies... :) + ++= has been left out of the language for a good reason, and thus it's +probably not likely that there's an easy way to add it. I think you +will have to recompile the interpreter to get it to do what you want, +and even then, I don't think that you really want what it would do. + +Surely there's some discussion about += in dejanews which would provide +more enlightenment that I can. + +Later, +Blake. + + + + + diff --git a/demo/ermis-f/python_m/cur/0655 b/demo/ermis-f/python_m/cur/0655 new file mode 100644 index 00000000..67eb6b7c --- /dev/null +++ b/demo/ermis-f/python_m/cur/0655 @@ -0,0 +1,50 @@ +From: jody at ldgo.columbia.edu (Jody Winston) +Date: 06 Apr 1999 16:34:08 -0400 +Subject: Chaning instance methods +Message-ID: +X-UID: 655 + +I don't understand how to change instance methods. For example: + +class Foo: + def __init__(self): + self.data = 42 + def m(self): + print "Foo.m" + print dir(self) + +def m2(self): + print "m2" + print dir(self) + +f = Foo() +f.m() +# this fails +# f.m = m2 +# f.m() +Foo.m = m2 # Changes all instances of Foo.m +f.m() + +f2 = Foo() +f2.m() + +What am I forgetting? + +-- +Jody Winston +Manager SeisRes +Lamont-Doherty Earth Observatory +RT 9W, Palisades, NY 10964 +jody at ldeo.columbia.edu, 914 365 8526, Fax 914 359 1631 + +Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email +address may not be added to any commercial mail list with out my +permission. Violation of my privacy with advertising or SPAM will +result in a suit for a MINIMUM of $500 damages/incident, $1500 for +repeats. + + + + + + diff --git a/demo/ermis-f/python_m/cur/0656 b/demo/ermis-f/python_m/cur/0656 new file mode 100644 index 00000000..865cdfef --- /dev/null +++ b/demo/ermis-f/python_m/cur/0656 @@ -0,0 +1,45 @@ +From: rdr_nl at my-dejanews.com (Henk Jansen) +Date: Tue, 13 Apr 1999 16:10:44 GMT +Subject: Lexical analyzers and parsers +References: <7jn20jmxsw.fsf@gandalf.midearth.fuzzys.org> <14092.48400.954787.617539@amarok.cnri.reston.va.us> +Message-ID: <7evq9s$68n$1@nnrp1.dejanews.com> +Content-Length: 1577 +X-UID: 656 + +In article <14092.48400.954787.617539 at amarok.cnri.reston.va.us>, + "Andrew M. Kuchling" wrote: +> Julien Oster writes: +> >What about lexical analyzers and parsers? +> > +> >Under C I use bison/yacc and (f)lex. Under python, I can either implement +this +> >stuff using C or try to write my parsers on my own, which is real pain. +> +> There are actually a bunch of different systems available; see +> http://starship.python.net/crew/amk/python/string.html#parsing +> for a list. (If I've missed any, let me know.) + +I've tried out a few of the Python based parser-generator tools for a +non-trivial language (Modelica). I found kwParsing and PyLR too slow, PyLR +wasn't complete (and AFAIK still isn't). I was most successful with YAPPS and +liked it because it's a recursive-decendent parser, ala ANTLR, but only +LL(1). Finally, I've decided to use the Java-based ANTLR tool because it's +mature, actively being used and supported by a wide users group. Moreover, it +has great support for AST building and translation (I wouldn't like thinking +of figuring out all this myself...). I'll probably use JPython to mix the +best of both, simply because Python is great. + +Henk + +-- + ===================================================================== + Henk Jansen -- Delft University of Technology -- Dept. of Mathematics + hjansen at math.tudelft.nl + http://dutita0.twi.tudelft.nl/WAGM/people/H.Jansen.html + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/0657 b/demo/ermis-f/python_m/cur/0657 new file mode 100644 index 00000000..dd720113 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0657 @@ -0,0 +1,81 @@ +From: tim_one at email.msn.com (Tim Peters) +Date: Thu, 15 Apr 1999 01:36:38 GMT +Subject: reval builtin +In-Reply-To: <7f36m6$koq@ds2.acs.ucalgary.ca> +References: <7f36m6$koq@ds2.acs.ucalgary.ca> +Message-ID: <001701be86e0$68574a60$589e2299@tim> +Content-Length: 2254 +X-UID: 657 + +[Neil Schemenauer] +> It would be nice to have an "reval" builtin that would only evaluate +> literals. That would make building things like config files safe and +> easy. I have two ideas on how to accomplish this: +> +> 1. Create a new start symbol "reval_input" in the Grammar/Grammar +> and add a "builtin_reval" function in Python/bltinmodule.c. ... +> +> 2. Use something like lex and yacc to create an extension module +> that does the Right Thing(TM). ... +> +> Perhaps some guru can explain an easy way to accomplish this and same me +> some time. + +The /F-bot already did -- this is Python, and nothing is *that* hard . +Even builtins are looked up dynamically at runtime, so all that's required +is to take away eval's normal context. As a one-liner: + +def reval(string): + return eval(string, {"__builtins__": {}}) + +This tells eval to use the dict {"__builtins__": {}} for both local and +global lookups. "__builtins__" is the only key, so is the only name that +*can* be looked up successfully. It's a semi-magical key that Python +accesses internally when all other attempts to resolve a name fail, and in +this case its value is an empty dict, so that makes Python's last-resort +name-lookup fail too. + +>>> reval('1+2') +3 +>>> reval('int("3")') +Traceback (innermost last): + File "", line 1, in ? + reval('int("3")') + File "", line 2, in reval + return eval(string, {"__builtins__": {}}) + File "", line 0, in ? +NameError: int +>>> + +Caution: it does not work to pass eval an empty dict: + +>>> eval('int("3")', {}) +3 +>>> + +That may be obscure . The reason is this: + +>>> empty = {} +>>> eval('int("3")', empty) +3 +>>> empty.keys() +['__builtins__'] +>>> + +That is, if the dict you pass to eval (or exec) doesn't have a +"__builtins__" key, Python inserts one for you, with the same value as the +current module's __builtins__. This is to make the normal use of eval/exec +easier. So to stop Python cold, you have to supply your own "__builtins__" +key. + +If you're determined to allow only literals (I don't see any harm in +allowing e.g. 1+3), probably easiest to feed the string to the std parser +module, then crawl over the AST looking for things to complain about. + +syntactic-cleansing-ly y'rs - tim + + + + + + diff --git a/demo/ermis-f/python_m/cur/0658 b/demo/ermis-f/python_m/cur/0658 new file mode 100644 index 00000000..3063930f --- /dev/null +++ b/demo/ermis-f/python_m/cur/0658 @@ -0,0 +1,70 @@ +From: tismer at appliedbiometrics.com (Christian Tismer) +Date: Fri, 23 Apr 1999 19:07:07 GMT +Subject: Python too slow for real world +References: <372068E6.16A4A90@icrf.icnet.uk> <3720A21B.9C62DDB9@icrf.icnet.uk> +Message-ID: <3720C4DB.7FCF2AE@appliedbiometrics.com> +Content-Length: 1753 +X-UID: 658 + + +Arne Mueller wrote: +> +> Hi All, +> +> I can't read in the whole file as a single block, it's too big, if +> readline/write is slow the program will never get realy fast :-( + +Please try this one. +For me, it was about 6-7 times faster than the first one. +I don't read by line, also I don't read all in one. +Let me know how it performs on your machine. +I think I'm down to measuring I/O time. +Well, the code is a bit long. + +But fast :-) + +I believe nothing more can be done, but to +use P2C to get the interpreter overhead away. + +def read_write_bulk(input, output, exclude): + + bufsize = 1 << 16 + splitter = ">" + + ignore=exclude.has_key + split=string.split + No = None + + buffer = input.read(bufsize) + got = len(buffer) + while len(buffer)>1 : + pieces = split(buffer, splitter) + idx = 0 + inner = pieces[1:-1] + for piece in inner: + idx = idx+1 ; key = split(piece, No, 1)[0] + if ignore(key): + del inner[idx] ; idx = idx-1 + output.write("<") + output.write(string.join(inner, splitter)) + if got==0: + break + chunk = input.read(bufsize) + buffer = splitter+pieces[-1] + chunk + got = len(chunk) + if got==0: + buffer = buffer+splitter # spill last one + +#:-) end of hack + +-- +Christian Tismer :^) +Applied Biometrics GmbH : Have a break! Take a ride on Python's +Kaiserin-Augusta-Allee 101 : *Starship* http://starship.python.net +10553 Berlin : PGP key -> http://wwwkeys.pgp.net +PGP Fingerprint E182 71C7 1A9D 66E9 9D15 D3CC D4D7 93E2 1FAE F6DF + we're tired of banana software - shipped green, ripens at home + + + + diff --git a/demo/ermis-f/python_m/cur/0659 b/demo/ermis-f/python_m/cur/0659 new file mode 100644 index 00000000..c1586ad7 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0659 @@ -0,0 +1,31 @@ +From: steeds at ccms.net (Mike Steed) +Date: Wed, 28 Apr 1999 21:56:26 -0500 +Subject: GUI and creating GIF +References: <7g7u2k$fr0$1@wanadoo.fr> +Message-ID: <3727CA5A.68BD@ccms.net> +X-UID: 659 + +Frank.Derville wrote: +> +> Hello, +> +> I would like to +> 1) create a GIF file under Python by drawing lines, text, ... I have looked +> at Tk which can create bitmaps and photoimage but their seem to be no +> possibility to transform a canvas into a photoimage. +> 2) rotate some text on a canvas. +> +> Does anyone has a tip to do it under Tk, wxWindows or any other GUI? +> +> Thanks by advance + +I recommend you look at gdmodule by Richard Jones. I have a +pre-compiled Win32 binary if you need it. + +http://starship.python.net/~richard/gdmodule/ + +-Mike + + + + diff --git a/demo/ermis-f/python_m/cur/0660 b/demo/ermis-f/python_m/cur/0660 new file mode 100644 index 00000000..9a0f8fc7 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0660 @@ -0,0 +1,28 @@ +From: mlh at idt.ntnu.no (Magnus L. Hetland) +Date: 25 Apr 1999 22:25:27 +0200 +Subject: Python too slow for real world +References: <372068E6.16A4A90@icrf.icnet.uk> <3720A21B.9C62DDB9@icrf.icnet.uk> <3720C4DB.7FCF2AE@appliedbiometrics.com> <3720C6EE.33CA6494@appliedbiometrics.com> <3723757B.CF96D973@appliedbiometrics.com> +Message-ID: +X-UID: 660 + +Christian Tismer writes: + +> "Magnus L. Hetland" wrote: +> > +[...] +> +> In the long term, I think it makes sense to build the rest of +> re.py also into pcre. Then I still would not see any reason +> to embed its functionaliy into the language. + +Agreed. I guess this is what I really wanted. :) + +-- + > Hi! I'm the signature virus 99! + Magnus > Copy me into your signature and join the fun! + Lie + Hetland http://arcadia.laiv.org + + + + diff --git a/demo/ermis-f/python_m/cur/0661 b/demo/ermis-f/python_m/cur/0661 new file mode 100644 index 00000000..316f2801 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0661 @@ -0,0 +1,38 @@ +From: jwpolley at cacd.rocwell.com (Jonathan Polley) +Date: Tue, 06 Apr 1999 11:04:18 -0500 +Subject: Did I build 1.5.2b2 wrong????? +Message-ID: <370A3081.CCBE15BE@cacd.rocwell.com> +X-UID: 661 + +Hi, + + I just brought version 1.5.2b2 of python down and got it built using +tcl/tk 8.0 (on Solaris 2.5.1) and am running IDLE. When I press the +right mouse button I get the following traceback: + +Exception in Tkinter callback +Traceback (innermost last): + File +"/net/mayhem/usr/lfs/v1/users/jwpolley/Python-1.5.2b2/Lib/lib-tk/Tkinter.py", +line 764, in __call__ + return apply(self.func, args) + File "EditorWindow.py", line 214, in right_menu_event + rmenu.tk_popup(event.x_root, event.y_root) + File +"/net/mayhem/usr/lfs/v1/users/jwpolley/Python-1.5.2b2/Lib/lib-tk/Tkinter.py", +line 1492, in tk_popup + self.tk.call('tk_popup', self._w, x, y, entry) +TclError: invalid command name "tk_menuSetFocus(.2899048.text.3256864)" + +I know this works fine under NT, but I was able to download the +executable and didn't have a chance to mess it up. Does anyone have any +ideas as to what I may have done wrong in building python??? Any help +would be appreciated! + +Jon Polley +jwpolley at collins.rockwell.com + + + + + diff --git a/demo/ermis-f/python_m/cur/0662 b/demo/ermis-f/python_m/cur/0662 new file mode 100644 index 00000000..281b6c96 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0662 @@ -0,0 +1,22 @@ +From: phd at sun.med.ru (Oleg Broytmann) +Date: Tue, 20 Apr 1999 16:12:34 GMT +Subject: unpickling an NT object in Solaris? +In-Reply-To: +References: +Message-ID: +X-UID: 662 + +On Tue, 20 Apr 1999, Bill Dozier wrote: +> ImportError exception ("No module named __main__^M") when I try to + ^^ + It seems you ftp'd file in text mode. Try binary ftp. + +Oleg. +---- + Oleg Broytmann National Research Surgery Centre http://sun.med.ru/~phd/ + Programmers don't die, they just GOSUB without RETURN. + + + + + diff --git a/demo/ermis-f/python_m/cur/0663 b/demo/ermis-f/python_m/cur/0663 new file mode 100644 index 00000000..6451d9db --- /dev/null +++ b/demo/ermis-f/python_m/cur/0663 @@ -0,0 +1,48 @@ +From: mal at lemburg.com (M.-A. Lemburg) +Date: Fri, 30 Apr 1999 00:15:31 +0200 +Subject: Python and CGI +References: <37286538.5EAE0173@lemburg.com> +Message-ID: <3728DA03.431E34BF@lemburg.com> +Content-Length: 1322 +X-UID: 663 + +M.-A. Lemburg wrote: +> +> Hi everybody, +> +> Yesterday, I mailed an announcement for mxCGIPython, a drop-in +> setup extension for the Python source distribution that allows +> compiling a one-file executable containing the standard Python +> interpreter + the standard library + the default builtin +> modules. The result is a complete Python installation in one +> single file -- easy to install and ship around. +> +> Although there were a number of hits on the web-page, I'm not +> sure whether the announcement got the message through... this +> is intended to be a campaign with the goal of promoting Python +> as CGI engine. + +Ok, the first compiled version are being submitted. Good sign :-) +So far, I've received these setups: + + cgipython-1.5.2-Linux-2.0.35-i586-unknown.gz + cgipython-1.5.2-Linux-2.0.36-i586-unknown.gz + cgipython-1.5.2-Linux-2.0.35-i686-unknown.gz + +Hmm, maybe I should include the libc version/name too. + +> Hope this campaign becomes a success... +> +> http://starship.skyport.net/~lemburg/mxCGIPython.html +> + +-- +Marc-Andre Lemburg Y2000: 246 days left +--------------------------------------------------------------------- + : Python Pages >>> http://starship.skyport.net/~lemburg/ : + --------------------------------------------------------- + + + + + diff --git a/demo/ermis-f/python_m/cur/0664 b/demo/ermis-f/python_m/cur/0664 new file mode 100644 index 00000000..68507fae --- /dev/null +++ b/demo/ermis-f/python_m/cur/0664 @@ -0,0 +1,41 @@ +From: jbkerr at sr.hp.com (Jim Kerr) +Date: Wed, 21 Apr 1999 08:54:46 -0700 +Subject: problem running 1.5.2 on Win95 +Message-ID: <371DF4C6.C1276E96@sr.hp.com> +X-UID: 664 + +Hello, + + I tried installing the 1.5.2 binaries on my Win95b machine, +and the results weren't happy. + + I opted to install both Python and Tcl/Tk, and the process +seemed to go smoothly. Since there were no warnings to the +contrary, I installed on top of my existing 1.5.1 files. + + The problem is, when I try to run PythonWin or IDLE, an +error dialog comes up: + + ++ Microsoft Visual C++ Runtime Library ++ ++ Runtime Error! ++ Program: C:\PROGRAM FILES\PYTHON\PYTHONWIN\PYTHONWIN.EXE ++ ++ abnormal program termination + + + Any ideas what's wrong here? + +-Jim + +-- +Jim Kerr +Hewlett-Packard +Santa Rosa Systems Division +1400 Fountaingrove Pkwy, MS 3USZ +Santa Rosa, CA 95403 + + + + diff --git a/demo/ermis-f/python_m/cur/0665 b/demo/ermis-f/python_m/cur/0665 new file mode 100644 index 00000000..e9a23188 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0665 @@ -0,0 +1,40 @@ +From: hj_ka at my-dejanews.com (hj_ka at my-dejanews.com) +Date: Sun, 18 Apr 1999 01:33:46 GMT +Subject: NT: win32api and win32ui import error +Message-ID: <7fbcpq$2jb$1@nnrp1.dejanews.com> +X-UID: 665 + +Help! + +I have previously used win32api and win32ui in Windows 95 without +problem. However, I have now installed Python 1.5.2 and Pythonwin +124 (win32all-124.exe) on a brand new Windows NT machine, and I +get errors when importing win32api or win32ui: + +>>> import win32api + +"exceptions.ImportError: DLL load failed: The process cannot access +the file because it is being used by another process." + +The problem is confined to Windows NT only. Windows 95 and Windows 98 +have no problem. + +--------------- + +I don't know whether this is also related: when I installed +win32all-124.exe, I got a few warnings: + +"Registration of the (AXScript/Python Interpreter/Python Dictionary) +failed. Installation will continue, but this server will require +manual registration before it will function." + +regards, + +Hung Jung + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/0666 b/demo/ermis-f/python_m/cur/0666 new file mode 100644 index 00000000..84748d0e --- /dev/null +++ b/demo/ermis-f/python_m/cur/0666 @@ -0,0 +1,19 @@ +From: alexandre.ferrieux at cnet.francetelecom.fr (Alexandre Ferrieux) +Date: Thu, 22 Apr 1999 10:23:04 +0200 +Subject: Kosovo database; Python speed +References: <371DAAC2.D9046550@cs.utwente.nl> <371DB466.32097FE5@pop.vet.uu.nl> <7flalp$n10$1@nnrp1.dejanews.com> +Message-ID: <371EDC68.38E1@cnet.francetelecom.fr> +X-UID: 666 + +aaron_watters at my-dejanews.com wrote: +> +> It also depends on what you expect the queries to be. For this +> kind of problem "grep" might work pretty well, actually. + +Seconded. Next step being 'glimpse'. + +-Alex + + + + diff --git a/demo/ermis-f/python_m/cur/0667 b/demo/ermis-f/python_m/cur/0667 new file mode 100644 index 00000000..fd372cb4 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0667 @@ -0,0 +1,50 @@ +From: dfan at harmonixmusic.com (Dan Schmidt) +Date: 21 Apr 1999 12:18:16 -0400 +Subject: problem running 1.5.2 on Win95 +References: <371DF4C6.C1276E96@sr.hp.com> +Message-ID: +Content-Length: 1262 +X-UID: 667 + +Jim Kerr writes: + +| Hello, +| +| I tried installing the 1.5.2 binaries on my Win95b machine, +| and the results weren't happy. +| +| I opted to install both Python and Tcl/Tk, and the process +| seemed to go smoothly. Since there were no warnings to the +| contrary, I installed on top of my existing 1.5.1 files. +| +| The problem is, when I try to run PythonWin or IDLE, an +| error dialog comes up: +| +| +| + Microsoft Visual C++ Runtime Library +| + +| + Runtime Error! +| + Program: C:\PROGRAM FILES\PYTHON\PYTHONWIN\PYTHONWIN.EXE +| + +| + abnormal program termination +| +| +| Any ideas what's wrong here? + +This happened to me too (I also installed 1.5.2 on top of 1.5.1). +Then I de-installed 1.5.1, and re-installed 1.5.2 from scratch, and +everything worked fine. + +I think I had neglected to install the 1.5.2 version of win32all. I +wouldn't be surprised if your problem were the same. In any case, +doing a clean install is safest. + +-- + Dan Schmidt -> dfan at harmonixmusic.com, dfan at alum.mit.edu +Honest Bob & the http://www2.thecia.net/users/dfan/ +Factory-to-Dealer Incentives -> http://www2.thecia.net/users/dfan/hbob/ + Gamelan Galak Tika -> http://web.mit.edu/galak-tika/www/ + + + + diff --git a/demo/ermis-f/python_m/cur/0668 b/demo/ermis-f/python_m/cur/0668 new file mode 100644 index 00000000..238ea258 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0668 @@ -0,0 +1,36 @@ +From: dfan at harmonixmusic.com (Dan Schmidt) +Date: 27 Apr 1999 09:39:00 -0400 +Subject: Designing Large Systems with Python +References: +Message-ID: +Content-Length: 1142 +X-UID: 668 + +David Steuber writes: + +| One other thing. Is the documentation that comes with Python +| sufficient to gain mastery of the language, or should I consider +| buying (yet) another book? + +If you've done a bunch of programming before, the Tutorial in the +online docs should serve you well. + +I recently read through Learning Python and thought it was excellent. +One nice thing is that it presents a bunch of the standard modules, +which otherwise you have to learn simply by reading the reference. + +I would recommend either of those as an introduction to the language +over Programming Python. You'll want to pick it up at some point (I +found its discussion on embedding Python to be very useful, for +example), but I found it difficult to learn the language from; the +reader is overwhelmed with detail from the very start. + +-- + Dan Schmidt -> dfan at harmonixmusic.com, dfan at alum.mit.edu +Honest Bob & the http://www2.thecia.net/users/dfan/ +Factory-to-Dealer Incentives -> http://www2.thecia.net/users/dfan/hbob/ + Gamelan Galak Tika -> http://web.mit.edu/galak-tika/www/ + + + + diff --git a/demo/ermis-f/python_m/cur/0669 b/demo/ermis-f/python_m/cur/0669 new file mode 100644 index 00000000..0dc75bef --- /dev/null +++ b/demo/ermis-f/python_m/cur/0669 @@ -0,0 +1,59 @@ +From: claird at Starbase.NeoSoft.COM (Cameron Laird) +Date: 6 Apr 1999 12:19:03 -0500 +Subject: Understanding Tk +References: <7eabbe$pbu$1@Starbase.NeoSoft.COM> +Message-ID: <7edfm7$19u$1@Starbase.NeoSoft.COM> +Content-Length: 1745 +X-UID: 669 + +In article <7eabbe$pbu$1 at Starbase.NeoSoft.COM>, I exhorted: +>Are you in the position of explaining Tk(inter) to others, or +>simply want to understand it better for yourself? The PerlTk + . + [complicated URL; + my one-sentence + synopsis of Tk; + and so on] + . + . +A gentle correspondent pointed out that my language +in this article was indistinguishable from that of +mass marketers. That was *not* my aim. Here's what +I have to say: +1. comp.lang.perl.tk has recently discussed + Nancy Walsh's *Learning Perl/Tk* book. + This thread interests me. I think the + testimony of some of its readers bears + weight for subjects well beyond PerlTk. + First, much of what's said about PerlTk + applies immediately to Tk, Tkinter, + SchemeTk, ... Beyond that, several of + the remarks on style, tone, and approach + is pertinent to anyone aiming to teach + any scripting language or extension. + Therefore, I commend this thread to the + attention of everyone writing references + or documents or tutorials. + + The URL I gave looks ugly because I + haven't yet figured out a better one. + DejaNews made yet another cursed change + in its syntax, and it's now painful to + direct readers to an appropriate view + of a thread. +2. Lots of Tk is common to any WIMP system + or toolkit ("design interface carefully + ... mouse ... blah-blah ..."). People + *really* start to enjoy and benefit from + Tk (PerlTk, Tkinter, ...), though, when + they "get" a few key ideas. It's impor- + tant to think deeply about what makes Tk + special. I hope book authors do this. +-- + +Cameron Laird http://starbase.neosoft.com/~claird/home.html +claird at NeoSoft.com +1 281 996 8546 FAX + + + + diff --git a/demo/ermis-f/python_m/cur/0670 b/demo/ermis-f/python_m/cur/0670 new file mode 100644 index 00000000..8b616039 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0670 @@ -0,0 +1,45 @@ +From: tim_one at email.msn.com (Tim Peters) +Date: Sun, 11 Apr 1999 00:44:03 GMT +Subject: 1.5.2c1 will not compile on Windows NT SP4 with VC++ 6.0 SP1 +In-Reply-To: <923765974.19722.0.nnrp-03.9e982a40@news.demon.co.uk> +References: <923765974.19722.0.nnrp-03.9e982a40@news.demon.co.uk> +Message-ID: <000001be83b4$65c95d80$7fa22299@tim> +Content-Length: 1368 +X-UID: 670 + +[Barry Scott, reports several weird problems trying to build 1.5.2c1 under + VC 6 on NT] + +Barry, you didn't say how you *started* your build, but I suspect you +followed the instructions in PC\readme.txt without reading the first +paragraph: + + (NOTE: the project files for MS VC++ 5.x are now in the PCbuild + directory. See the file readme.txt there for instructions.) + +If so, throw out everything you did, and start over in the PCbuild +directory, where a full-blown .dsw file awaits your building pleasure. + +Had no problems building either release or debug Pythons starting from +there, under Win95 using VC 5. I doubt VC 6 or NT have anything to do with +what you're seeing, since e.g. the reopmodule.c you report a complaint about +is mentioned only in the PC directory, not in the (correct) PCbuild +directory. + +Note: I did not attempt to build _tkinter. + +i-try-to-be-helpful-but-ain't-masochistic-ly y'rs - tim + + +PS to Guido: A fellow at work tripped over much the same thing when +building one of the 1.5.2bx releases. I figured the odds of somebody else +skipping over the first paragraph of the PC readme too were so slim that it +wasn't worth reporting. The problem may be that an experienced Windows-head +decides to start partying the instant they see the PC\vc40.mak file (which, +I believe, tries to do all the obsolete stuff Barry reported)! + + + + + + diff --git a/demo/ermis-f/python_m/cur/0671 b/demo/ermis-f/python_m/cur/0671 new file mode 100644 index 00000000..1288e66d --- /dev/null +++ b/demo/ermis-f/python_m/cur/0671 @@ -0,0 +1,28 @@ +From: bwinton at tor.dhs.org (Blake Winton) +Date: Sun, 18 Apr 1999 22:47:40 GMT +Subject: Why no "=" in if? (was Re: Quick fix to add "+=") +References: <3717EE20.41343593@mediaone.net> <000701be888f$12fe2920$ee9e2299@tim> +Message-ID: +X-UID: 671 + +On Sat, 17 Apr 1999 14:30:04 GMT, Aahz Maruch wrote: +>In article , +>John W. Baxter wrote: +>>In article , aahz at netcom.com (Aahz Maruch) wrote: +>>> +>>> Why doesn't Guido get off his duff and fix this?????????! +>> +>>Because it's not broken. +> +>Yes, it is. + +Hitler! Hitler! Hitler! +You're all Hitler! + +Later, +Blake. + + + + + diff --git a/demo/ermis-f/python_m/cur/0672 b/demo/ermis-f/python_m/cur/0672 new file mode 100644 index 00000000..d19760e1 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0672 @@ -0,0 +1,37 @@ +From: nospam at take.it (Salmaso Raffaele) +Date: Thu, 08 Apr 1999 18:55:06 GMT +Subject: Is Python dying? +References: <7dos4m$usi$1@nnrp1.dejanews.com> <37009C12.4C0E6B0B@earth.ox.ac.uk> <922837384snz@vision25.demon.co.uk> <7dtbu1$rpn$1@nnrp1.dejanews.com> <37025110.1BA742B@appliedbiometrics.com> +Message-ID: <370cfb74.23483@194.247.160.50> +X-UID: 672 + +On 4 Apr 1999 17:45:54 GMT, warlock at eskimo.com (Jim Richardson) wrote: + +If it can help (I use it to print almost everythings). + +#!/bin/sh +case $1 in +# quarta e prima + f) psbook $2 | mpage -bA4 -o -2 -dp | psselect -o -r | lpr ;; +# seconda e terza + r) psbook $2 | mpage -bA4 -o -2 -dp | psselect -e | lpr ;; +# comando errato + *) cat << EOF +libretto (c) 1999 Salmaso Raffaele +usage: libretto f/r file.ps +f print even page +r print odd page + +EOF +;; +esac + +-- +(o- T | Unix is simple and coherent , but it takes a genius to understand +//\ U | and appreciate its simplicity . +V_/_ X | Dennis Ritchie . +email: r.salmaso (at) flashnet.it | salmaso.raffaele (at) iname.com + + + + diff --git a/demo/ermis-f/python_m/cur/0673 b/demo/ermis-f/python_m/cur/0673 new file mode 100644 index 00000000..65856b01 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0673 @@ -0,0 +1,24 @@ +From: Robert.Meegan at wcom.com (Robert Meegan) +Date: Tue, 27 Apr 1999 12:55:40 GMT +Subject: help +In-Reply-To: <37257B0A.AF4C8E4C@pop.vet.uu.nl> +References: <37257B0A.AF4C8E4C@pop.vet.uu.nl> +Message-ID: +X-UID: 673 + +I've become known for appending a lengthy appendix to each design document +that explains what Python is and why averyone should be using it. So far +I've made a number of converts. All it takes is an experienced coder with +an open mind and *pow* they're hooked. + +--- Robert + +-------------------------------- +Robert Meegan +MCIWorldCom - Cedar Rapids, Iowa +319.375.2416 + + + + + diff --git a/demo/ermis-f/python_m/cur/0674 b/demo/ermis-f/python_m/cur/0674 new file mode 100644 index 00000000..096eeb9a --- /dev/null +++ b/demo/ermis-f/python_m/cur/0674 @@ -0,0 +1,42 @@ +From: William.H.Duquette at jpl.nasa.gov (William H. Duquette) +Date: Wed, 28 Apr 1999 22:23:00 GMT +Subject: try vs. has_key() +References: <37247ea3.494305@news.jpl.nasa.gov> +Message-ID: <372789d8.27766891@news.jpl.nasa.gov> +X-UID: 674 + +On Wed, 28 Apr 1999 14:58:13 GMT, William.H.Duquette at jpl.nasa.gov +(William H. Duquette) wrote: + + +>>>> d = {} +>>>> a = 'Foo' +>>>> d[a] = d.get(a, []).append('Bar') +>>>> d +>{'Foo': None} +>>>> +> +>I'd have expected to see {'Foo': 'Bar'}, but that's not what I get. + + +As someone pointed out, append() returns None, explaining +the result I got. However, the following code works just fine: + + d = {} + a = 'foo' + + # Append an entry to d[a], whether it has been initialized or not: + d[a] = d.get(a, []) + d[a].append('Bar') + + +Will + +-------------------------------------------------------------------------- +Will Duquette, JPL | William.H.Duquette at jpl.nasa.gov +But I speak only | http://eis.jpl.nasa.gov/~will (JPL Use Only) +for myself. | It's amazing what you can do with the right tools. + + + + diff --git a/demo/ermis-f/python_m/cur/0675 b/demo/ermis-f/python_m/cur/0675 new file mode 100644 index 00000000..a75d8405 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0675 @@ -0,0 +1,50 @@ +From: philh at vision25.demon.co.uk (Phil Hunt) +Date: Fri, 30 Apr 99 01:47:12 GMT +Subject: while (a=b()) ... +References: <19990430000141.A5867@shalott> +Message-ID: <925436832snz@vision25.demon.co.uk> +X-UID: 675 + +In article <19990430000141.A5867 at shalott> + m.mariani at imola.nettuno.it "Marco Mariani" writes: + +> Hi all language lawyers! +> +> Which one is more ugly? +> ===== +> c = curs.fetchone() +> while c: +> print c +> c = curs.fetchone() +> ===== +> while 1: +> c = curs.fetchone() +> if c: +> print c +> else: +> break +> ===== +> +> Is there an elegant way? + +How about: + +while 1: + c = curs.fetchone() + if not c: break + print c + + +> while curs.fetchone() +> print $_ + +This would mean nothing to me if I hadn't already seen the python +examples -- it is very obscure. + +-- +Phil Hunt....philh at vision25.demon.co.uk + + + + + diff --git a/demo/ermis-f/python_m/cur/0676 b/demo/ermis-f/python_m/cur/0676 new file mode 100644 index 00000000..8e48862b --- /dev/null +++ b/demo/ermis-f/python_m/cur/0676 @@ -0,0 +1,91 @@ +From: aahz at netcom.com (Aahz Maruch) +Date: Tue, 27 Apr 1999 01:50:51 GMT +Subject: HELP - FTP seesions using python???????? +References: <7g328l$hga$1@nnrp1.dejanews.com> +Message-ID: +Content-Length: 1877 +X-UID: 676 + +In article <7g328l$hga$1 at nnrp1.dejanews.com>, wrote: +> +>any links or tips etc on how to tackle automation of FTP sessions using python +>would be most appreciated. + +Here's a sample; there aren't any comments (proof that Python can be +almost as obscure as Perl ;-), but it shouldn't be *that* hard to read: + +#!/usr/local/bin/python + +import sys, os, ftplib, string + +def getpass(prompt = "Password: "): + import termios, TERMIOS, sys + fd = sys.stdin.fileno() + old = termios.tcgetattr(fd) + new = termios.tcgetattr(fd) + new[3] = new[3] & ~TERMIOS.ECHO # lflags + try: + termios.tcsetattr(fd, TERMIOS.TCSADRAIN, new) + passwd = raw_input(prompt) + finally: + termios.tcsetattr(fd, TERMIOS.TCSADRAIN, old) + print + return passwd + + + +if len ( sys.argv ) < 4 : + raise 'Must have three arguments: host[:path], user[:passwd], and file' + +HostPath = sys.argv[1] +pos = string.find ( HostPath, ':' ) +if pos > 0 : + host = HostPath[0:pos] + if ( pos + 1 ) == len ( HostPath ) : + path = "" + else: + path = HostPath[(pos+1):] +else : + host = HostPath + path = "" + + +UserPass = sys.argv[2] +pos = string.find ( UserPass, ':' ) +if pos > 0 : + user = UserPass[0:pos] + if ( pos + 1 ) == len ( UserPass ) : + passwd = "" + else: + passwd = UserPass[(pos+1):] +else : + user = UserPass + passwd = getpass() + + +filename = sys.argv[3] +pos = string.rfind ( filename, '/' ) +if pos > 0 : + basename = filename[pos:] +else : + basename = filename + + +fd = open ( filename ) +ftp = ftplib.FTP ( host, user, passwd ) +ftp.cwd ( path ) +ftp.storbinary ( 'STOR %s' % basename, fd, 1024 * 16 ) +ftp.close() + +fd.close() +-- + --- Aahz (@netcom.com) + +Hugs and backrubs -- I break Rule 6 <*> http://www.rahul.net/aahz/ +Androgynous poly kinky vanilla queer het + +Hi! I'm a beta for SigVirus 2000! Copy me into your .sigfile! + + + + diff --git a/demo/ermis-f/python_m/cur/0677 b/demo/ermis-f/python_m/cur/0677 new file mode 100644 index 00000000..5a8c1d29 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0677 @@ -0,0 +1,56 @@ +From: bellman at lysator.liu.se (Thomas Bellman) +Date: 16 Apr 1999 16:40:46 GMT +Subject: Bug in Python 1.5.1 (with all patches) on Solaris 7? +References: <7f76eh$ijj@news2.newsguy.com> +Message-ID: <7f7p6e$mhj$1@newsy.ifm.liu.se> +Content-Length: 1425 +X-UID: 677 + +"Fredrik Nehr" writes: + +> I'm experience different behaivors when running the same instructions as +> script and interactively, the interactive behaivor is correct. + +> Example: + +> 603 ~ $ cat foo.py +> import string +> print string.lower('ABC123???') +> 604 ~ $ python foo.py +> abc123??? +> 605 ~ $ python +> Python 1.5.1 (#1, Mar 22 1999, 17:07:44) [GCC 2.8.1] on sunos5 +> Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam +> >>> import string +> >>> print string.lower('ABC123???') +> abc123??? +> >>> + +Your interactive Python probably has readline support, and you +have $LC_CTYPE set to iso_8859_1 or something. Readline seems to +call setlocale(LC_CTYPE, "") or something when loaded, which +makes tolower(), toupper(), and so on, behaving according to your +locale settings. + +If you want that behaviour even without readline, just do + + import locale + locale.setlocale(locale.LC_CTYPE, "") + +before doing your string manipulations. Locale settings are +unfortunately global to the entire process, making it awkward to +process text in different languages in different parts of the +program. :-( + +To return to the default behaviour, you should set your locale to +"C". + + +-- +Thomas Bellman, Lysator Computer Club, Link?ping University, Sweden +"This isn't right. This isn't even wrong." ! bellman @ lysator.liu.se + -- Wolfgang Pauli ! Make Love -- Nicht Wahr! + + + + diff --git a/demo/ermis-f/python_m/cur/0678 b/demo/ermis-f/python_m/cur/0678 new file mode 100644 index 00000000..99be5226 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0678 @@ -0,0 +1,26 @@ +From: clarence at silcom.com (Clarence Gardner) +Date: Wed, 14 Apr 1999 16:36:39 GMT +Subject: forking + stdout = confusion +References: <87n20caldg.fsf@spock.localnet.de> +Message-ID: +X-UID: 678 + +Clarence Gardner (clarence at silcom.com) wrote: +: However, your first thought also works, with the same caveat about stderr. +: stdin, stdout, and stderr all have the __xxx__ copy in the sys module +: (which I was not aware of). + +Mea culpa. The os.close() *is* still necessary. Is there yet another +copy of these file objects? I tried to find that function that returns +the reference count, but don't see it in the manual. + +-- +-=-=-=-=-=-=-=-= +Clarence Gardner +AvTel Communications +Software Products and Services Division +clarence at avtel.com + + + + diff --git a/demo/ermis-f/python_m/cur/0679 b/demo/ermis-f/python_m/cur/0679 new file mode 100644 index 00000000..18f18632 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0679 @@ -0,0 +1,27 @@ +From: joe at strout.net (Joe Strout) +Date: Fri, 09 Apr 1999 10:23:45 -0700 +Subject: Numeric: vector operations? +Message-ID: +X-UID: 679 + +Playing with Numeric today, I noticed an apparent lack of common vector +operations, like normalization, vector-length, and cross product. +These are fairly easy to code for my own evil purposes, but it's +surprising that they're not in there. Am I missing something? Or are +they purposefully omitted for some reason (e.g., they only apply to +very restricted sorts of matrices whereas other operations are more +general)? + +Thanks, +-- Joe + +-- +,------------------------------------------------------------------. +| Joseph J. Strout Biocomputing -- The Salk Institute | +| joe at strout.net http://www.strout.net | +`------------------------------------------------------------------' +Check out the Mac Web Directory! http://www.strout.net/macweb.cgi + + + + diff --git a/demo/ermis-f/python_m/cur/0680 b/demo/ermis-f/python_m/cur/0680 new file mode 100644 index 00000000..22d2fb30 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0680 @@ -0,0 +1,24 @@ +From: jimmyth at my-dejanews.com (jimmyth at my-dejanews.com) +Date: Mon, 26 Apr 1999 11:51:01 GMT +Subject: os.exec +Message-ID: <7g1jv4$5eh$1@nnrp1.dejanews.com> +X-UID: 680 + +Is there a way to send the output from a python-spawned external program +straight to the script without having to deal with the OS's piping and such? +I want to be able to say: + +bob = get_output_from(os.execv('runme.exe', ('parm1', 'parm2'))) + +or something to that effect. + +Thanks, + +Jimmy + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/0681 b/demo/ermis-f/python_m/cur/0681 new file mode 100644 index 00000000..6256c56c --- /dev/null +++ b/demo/ermis-f/python_m/cur/0681 @@ -0,0 +1,40 @@ +From: jno at glasnet.ru (jno at glasnet.ru) +Date: 22 Apr 1999 11:42:35 GMT +Subject: ``if t'' vs ``if t is not None'' +Message-ID: <7fn1vb$rbo$1@news.glas.net> +X-UID: 681 + +hi there, + +i faced a VERY strange behaviour of if-test operation! + + ``if t'' != ``if t is not None'' + where ``t'' is None or a class instance + +i was writing a threader for a news reader. +and found occasional hangs of a routine which builds the sequence of message +numbers for "read next" operation. +digging deeper brought me strange results: replacing ``if t'' with +``if t is not None'' speeded up the things dramatically! + +the call contecst: + + for x in self.keys() : + m, t = self.mesg_list[ x ] + self.Sequence.append( m.num ) + if t is not None : + t.buildSequence(i+1) + self.Sequence.extend( t.Sequence ) + del t.Sequence ; t.Sequence = None # trash extra data + +can anyone explain me such a phenomenon??? + +-- +SY, [ mailto:jno at glas.apc.org ] +jno (PRIVATE PERSON) [ http://www.glasnet.ru/~jno ] +a GlasNet techie [ http://www.aviation.ru/ ] +If God meant man to fly, He'd have given him more money. + + + + diff --git a/demo/ermis-f/python_m/cur/0682 b/demo/ermis-f/python_m/cur/0682 new file mode 100644 index 00000000..b81575f6 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0682 @@ -0,0 +1,64 @@ +From: guido at CNRI.Reston.VA.US (Guido van Rossum) +Date: Tue, 6 Apr 1999 20:07:42 -0700 (PDT) +Subject: fix for posix_fsync under SunOS 4.1.x +In-Reply-To: Your message of "Sat, 03 Apr 1999 07:29:50 GMT." + <199904030729.XAA24695@igce.igc.org> +Message-ID: <199904070307.UAA12597@igce.igc.org> +Content-Length: 1564 +X-UID: 682 + +>> Here's a patch to make sure that posix_fsync will compile on all operating +>> systems (specifically needed for SunOS 4.1.x). +>> +>> This unified diff was made against Python 1.5.2 beta 2 . +>> +>> -scott +>> +>> --- Modules/posixmodule.c~ Tue Feb 16 11:38:04 1999 +>> +++ Modules/posixmodule.c Fri Apr 2 22:18:03 1999 +>> @@ -647,6 +647,8 @@ +>> "fsync(fildes) -> None\n\ +>> force write of file with filedescriptor to disk."; +>> +>> +extern int fsync(int); /* Prototype just in case */ +>> + +>> static PyObject * +>> posix_fsync(self, args) +>> PyObject *self; +> +>On how many other operating systems have you tried this patch? I have +>found that almost invariably when you use an extern declaration of a +>standard function that is defined in the system headers on most modern +>systems, there's at least one system out there where what they have in +>the headers causes a conflict with what you declare! It would be +>better if you put it insude an #ifdef specific for the SunOS 4.x +>platform. + +I've only tried it on SunOS 4 and Solaris 2. + +I originally put my extern inside + + #ifdef HAVE_UNISTD_H + /* XXX These are for SunOS4.1.3 but shouldn't hurt elsewhere */ + extern int rename(); + extern int pclose(); + extern int lstat(); + extern int symlink(); + #else /* !HAVE_UNISTD_H */ + +But then I noticed that posix_fdatasync had + + extern int fdatasync(int); /* Prototype just in case */ + + static PyObject * + posix_fdatasync(self, args) + +so I did it that way to be "consistent". + +I don't really know which way is better (or if a third way is needed). + +-scott + + + + diff --git a/demo/ermis-f/python_m/cur/0683 b/demo/ermis-f/python_m/cur/0683 new file mode 100644 index 00000000..646472a6 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0683 @@ -0,0 +1,44 @@ +From: tim_one at email.msn.com (Tim Peters) +Date: Mon, 26 Apr 1999 02:26:05 GMT +Subject: Handling backspace chars in a string... +In-Reply-To: <3723bd8c.603427371@news2.bga.com> +References: <3723bd8c.603427371@news2.bga.com> +Message-ID: <000201be8f8c$22f186c0$d5a02299@tim> +Content-Length: 1307 +X-UID: 683 + +[Purple] +> I didn't post the code for that bit [newlines] as it seems easy enough +> to take care of processing those with something like +> map(string.strip,string.split(stringWithNewlines,"\n") +> +> Unless there's a better way to do that too? :) + +I don't know what you're trying to do. What that code *does* is break the +string into chunks as separated by newlines, strips leading and trailing +whitespace of all kinds from each resulting chunk, and leaves the result as +a list of strings. That doesn't sound like what you *wanted* to do, but if +it is I can't think of a better to do that . + +> ... +> [code using lists snipped] +> I may well go that route... Is it any slower or faster to do this +> using lists rather than counting up the backspaces and slicing around +> the bits that need to be snipped? + +from time import clock + +How big are the strings? What's the expected distribution of backspaces? +Etc. The list code is worst-case linear-time (in practice although not in +theory); the string slicing worst-case quadratic (although "acts linear" +until strings reach a platform-dependent size). There's no definitive +answer to which is faster without a strong characterization of your data. +Don't bother telling me, time it . + +in-the-end-is-it-faster-to-run-or-walk?-yes-ly y'rs - tim + + + + + + diff --git a/demo/ermis-f/python_m/cur/0684 b/demo/ermis-f/python_m/cur/0684 new file mode 100644 index 00000000..08731cab --- /dev/null +++ b/demo/ermis-f/python_m/cur/0684 @@ -0,0 +1,21 @@ +From: alrice at swcp.com (Alex Rice) +Date: Mon, 19 Apr 1999 14:17:58 -0600 +Subject: Zope question +References: <37178D4B.7D933209@swcp.com> +Message-ID: <371B8F76.AAAC9C1C@swcp.com> +X-UID: 684 + + +Evan Simpson wrote: + +> nobody-is-going-to-write-to-*my*-zope/var-ly yrs, +> Evan + +That was it! Thanks. Turns out Apache is configured to run as user +"httpd" on this Cobalt. I chown -R httpd *'d and all is well so far. + +Alex Rice + + + + diff --git a/demo/ermis-f/python_m/cur/0685 b/demo/ermis-f/python_m/cur/0685 new file mode 100644 index 00000000..92967c78 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0685 @@ -0,0 +1,15 @@ +From: morse at harborcom.net (Kevin Dahlhausen) +Date: Thu, 15 Apr 1999 15:15:29 GMT +Subject: Tutorial Python +References: <3714BAA0.12F180F3@xs4all.nl> +Message-ID: <3716022c.77967200@news.oh.verio.com> +X-UID: 685 + +It's not a tutorial, but I have a simple DBF cgi search script on: +http://www.geocities.com/siliconvalley/peaks/4673/python.html + + + + + + diff --git a/demo/ermis-f/python_m/cur/0686 b/demo/ermis-f/python_m/cur/0686 new file mode 100644 index 00000000..399508bb --- /dev/null +++ b/demo/ermis-f/python_m/cur/0686 @@ -0,0 +1,26 @@ +From: spamfranke at bigfoot.de (Stefan Franke) +Date: Wed, 21 Apr 1999 11:47:11 GMT +Subject: New python user seeks comments +References: +Message-ID: <371db9cb.5622314@news.omnilink.de> +X-UID: 686 + +On 21 Apr 1999 00:33:10 -0400, David Steuber wrote: + +>Er, uh, hmm. +> +>I wrote my first Python program today. It took longer than I +>expected. Who would have guessed that you couldn't give a file object +>the name 'in'? Or at least that was one of the weirder obstacles. + +Maybe a reserved keyword-aware editor could have saved you +from this? You could try IDLE, which comes with the lastest Python +distribution or PythonWin, if you are using Windows. +There's a very clever Python Emacs mode as well... + +Stefan + + + + + diff --git a/demo/ermis-f/python_m/cur/0687 b/demo/ermis-f/python_m/cur/0687 new file mode 100644 index 00000000..284c440b --- /dev/null +++ b/demo/ermis-f/python_m/cur/0687 @@ -0,0 +1,78 @@ +From: Bjoern.Giesler at stud.uni-karlsruhe.de (Bjoern Giesler) +Date: Mon, 12 Apr 1999 20:02:11 GMT +Subject: Stupid Tkinter question +Message-ID: <99041222110400.01382@dominion> +Content-Length: 1504 +X-UID: 687 + +Hi, + +I want to display a button in my application that shows a bitmap (.xbm). +I'm going crazy. Why does this fragment work (adapted from imageview.py +in Guido's Tkinter demos): + +[snip] +#!/usr/bin/env python + +from Tkinter import * +import sys + +def main(): + filename = sys.argv[1] + root = Tk() + img = BitmapImage(file=filename) + label = Button(root, text=filename, image=img, command=sys.exit) + label.pack() + root.mainloop() + +main() +[snip] + +.... but this doesn't: + +[snip] +#!/usr/bin/env python + +from Tkinter import * +from sys import * + +def makeToolbar(aFrame): + toolbar = Frame(aFrame) + markimage = BitmapImage(file = "Mark.xbm") + markbutton = Button(toolbar, + image = markimage, + command = exit) + + markbutton.pack() + return toolbar + +def makeUI(anApp): + frame = Frame(anApp) + toolbar = makeToolbar(frame) + + toolbar.pack() + frame.pack() + +app = Tk() +makeUI(app) +app.mainloop() +[snip] + +As far as I can see, the two are doing exactly the same. The first +example displays the bitmap, and the button is clickable, the second +displays a button the size of the bitmap, but which has nothing in it, +and which isn't clickable. + +HELP! + +TIA, + --Bjoern +PS Python 1.5.1 on Linux, if that is important. +-- ++ thanks for your time, worship the antichrist, and have a nice day /\ ++----------------------------------------------------------------- /()\ ++ support privacy on the 'net: mail me for pgp public key /____\ + + + + diff --git a/demo/ermis-f/python_m/cur/0688 b/demo/ermis-f/python_m/cur/0688 new file mode 100644 index 00000000..e240de6e --- /dev/null +++ b/demo/ermis-f/python_m/cur/0688 @@ -0,0 +1,29 @@ +From: aa8vb at vislab.epa.gov (Randall Hopper) +Date: Fri, 30 Apr 1999 08:08:05 -0400 +Subject: Python IS slow ! [was] Re: Python too slow for real world +In-Reply-To: <372965CA.2B3FD2FE@appliedbiometrics.com>; from Christian Tismer on Fri, Apr 30, 1999 at 08:11:54AM +0000 +References: <613145F79272D211914B0020AFF6401914DAD8@gandalf.digicool.com> <7g9qmo$luf$1@news.udel.edu> <372965CA.2B3FD2FE@appliedbiometrics.com> +Message-ID: <19990430080805.B776752@vislab.epa.gov> +X-UID: 688 + +Christian Tismer: + |Terry Reedy wrote: + |> A batch-mode optimizer analyzing an entire file (module) should be able to + |> detect whether or not function names are rebound. + |> + |> Perhaps module bindings should be considered immutable from outside the + |> module unless explicitly declared otherwise. + | + |I'm thinking of no new keyword, but a mechanism which allows me to lock a + |namespace somehow. + +I like this idea in concept. Though I would prefer a way to have +namespaces "lock by default". Examples: After a class definition, the +class function dictionary is locked. After a module is fully read, all +references are bound and the module namespace is locked. etc. + +Randall + + + + diff --git a/demo/ermis-f/python_m/cur/0689 b/demo/ermis-f/python_m/cur/0689 new file mode 100644 index 00000000..e0cc0e91 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0689 @@ -0,0 +1,52 @@ +From: boud at rempt.xs4all.nl (boud at rempt.xs4all.nl) +Date: Wed, 28 Apr 1999 14:29:19 GMT +Subject: Designing Large Systems with Python +References: +Message-ID: +Content-Length: 1791 +X-UID: 689 + +David Steuber wrote: +: +: I never heard it being _that_ bad. I am hoping that the modular +: nature of Python allows me to throw away the stuff that turns out to +: be crap and insert replacement code without a complete re-write. +: + +Mind you, I was talking about a VB-5 project (which also won't compile +under VB-6, but that's another issue...), but the general problem is +that after your first millionth line you won't be able to guess as to +what to throw away, even if you program in Python. + +On the other hand, after an absence of two weeks I've spent today the +whole day in rebuilding my development environment to the point where +I could compile code again... That's a problem Python wouldn't have, +anyway. And I've never come across problems with corrupted type +libraries or the like in Python. + +: +: This is assuming I actually get my but in gear and go ahead with the +: project I have in mind. It is a project of the ambitious sort where +: the word hubris is a hopelessly inadequate description of my state of +: mind in even contemplating the thing. +: + +I don't know anything about Lisp, apart from having gone through +'The Little Lisper', and my adventures with Eiffel have been brief, so +I don't know about those, but my feeling is that if you want to start +a really big project you need two things: organization and robust +wrists... + +Anyway, I have decided to use Python for my personal projects and whatever +it's qualities for multi-million line projects, I'm a happy, productive +and creative programmer, no longer plagued by pointer arithmetic and +the amount of code I have to type has decreased enormously. So I'd say +that whatever you plan, short of a new operating system, go with +Python. +-- + +Boudewijn Rempt | www.xs4all.nl/~bsarempt + + + + diff --git a/demo/ermis-f/python_m/cur/0690 b/demo/ermis-f/python_m/cur/0690 new file mode 100644 index 00000000..3f7d8ec3 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0690 @@ -0,0 +1,27 @@ +From: behrends at cse.msu.edu (Reimer Behrends) +Date: 29 Apr 1999 23:51:39 GMT +Subject: while (a=b()) ... +References: <19990430000141.A5867@shalott> +Message-ID: +X-UID: 690 + +Marco Mariani (m.mariani at imola.nettuno.it) wrote: +> Hi all language lawyers! +> +> Which one is more ugly? +[...] + +Both. + +> Is there an elegant way? + +while curs.fetchone(): + print curs.item + +Remember that objects have state. + + Reimer Behrends + + + + diff --git a/demo/ermis-f/python_m/cur/0691 b/demo/ermis-f/python_m/cur/0691 new file mode 100644 index 00000000..5e6e8e32 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0691 @@ -0,0 +1,33 @@ +From: aa8vb at vislab.epa.gov (Randall Hopper) +Date: Thu, 8 Apr 1999 11:46:12 GMT +Subject: Python x-windows GUI example needed +In-Reply-To: <7eg741$5t1$2@news.inet.tele.dk>; from Lone H. og Lars G. on Wed, Apr 07, 1999 at 08:12:27PM +0200 +References: <7eg741$5t1$2@news.inet.tele.dk> +Message-ID: <19990408074612.A983383@vislab.epa.gov> +X-UID: 691 + +Lone H. og Lars G.: + |To get started with phyton x-windows GUI programming I would appreciate any + |code examples or references. + +By x-windows programming do you mean: + 1) Conventional Xlib/Xt/ programming? OR + 2) Use of any GUI toolkit system that will display on an X/Windows display + server? + +If the latter, check out: + + http://www.python.org/topics/tkinter/doc.html + +for some links to Tkinter, Python's defacto GUI standard. This is but one +of the GUI development toolkits supported in Python. + +(If you aren't tied to Xlib/Xt/..., I wouldn't recommend using it unless +you need to. Lots of flexibility, but it's the assembly language of X GUI +development.) + +Randall + + + + diff --git a/demo/ermis-f/python_m/cur/0692 b/demo/ermis-f/python_m/cur/0692 new file mode 100644 index 00000000..fd23d9fb --- /dev/null +++ b/demo/ermis-f/python_m/cur/0692 @@ -0,0 +1,19 @@ +From: bgue at my-dejanews.com (bgue at my-dejanews.com) +Date: Sun, 04 Apr 1999 20:18:10 GMT +Subject: plea for kjbuckets for pywin +Message-ID: <7e8hds$5i7$1@nnrp1.dejanews.com> +X-UID: 692 + +Has anybody compiled kjbuckets against Pywin 1.5 or 1.5.1, and if so, could I +trouble you for a copy? I lack a compiler on my Windows partition. + +Thanks, + +Brian + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/0693 b/demo/ermis-f/python_m/cur/0693 new file mode 100644 index 00000000..3c277db0 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0693 @@ -0,0 +1,21 @@ +From: antrobus at innocent.com (Greg) +Date: Thu, 08 Apr 1999 06:04:14 GMT +Subject: mxDateTime in Python distribution +References: <19990406070255.A867135@vislab.epa.gov> <19990406082704.A868024@vislab.epa.gov> <370A0485.EC244CF6@pop.vet.uu.nl> +Message-ID: <7ehgss$jfj$1@nnrp1.dejanews.com> +X-UID: 693 + +I agree with the original poster. mxDateTime is *essential* and should be +intergrated into Python. I don't even care about all the nice features and +functions of mxDateTime; it's just completely insane being stuck with the C +library's unix epoch limitation... ouch. + +And it's VERY necessary for the DBAPI as well... + + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/0694 b/demo/ermis-f/python_m/cur/0694 new file mode 100644 index 00000000..9d006861 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0694 @@ -0,0 +1,20 @@ +From: illume at gmx.net (Paul Kunysch) +Date: 20 Apr 1999 06:56:11 +0200 +Subject: bzip2 module for Python +References: <2fbf63f548.tratt@tratt.freeserve.co.uk> +Message-ID: <87zp43gaac.fsf@illusion.tui-net> +X-UID: 694 + +Laurence Tratt writes: + +> As I said, I am interested to know if there is a demand for this, so +> comments are appreciated. + +IMHO it would be nice to have a module like the current "gzip", which +handles .bz2 .gz .Z and uncompressed files transparently. + +Bye + + + + diff --git a/demo/ermis-f/python_m/cur/0695 b/demo/ermis-f/python_m/cur/0695 new file mode 100644 index 00000000..80b4412d --- /dev/null +++ b/demo/ermis-f/python_m/cur/0695 @@ -0,0 +1,34 @@ +From: MHammond at skippinet.com.au (Mark Hammond) +Date: Thu, 8 Apr 1999 08:54:12 +1000 +Subject: COM Event Sinks and Connection Points in Python +References: <7eggfh$o0f$1@nnrp1.dejanews.com> +Message-ID: <7egnl2$ca5$1@m2.c2.telstra-mm.net.au> +X-UID: 695 + +cingram at my-dejanews.com wrote in message +<7eggfh$o0f$1 at nnrp1.dejanews.com>... +>I am trying to use functionality from a DLL that requires me to create a +COM +>event sink so that it can call back with events. I am trying to write this +>event sink in Python. However, when I try to create a SimpleConnection +>object, it gives this exception: "Unable to open the access token of the +>current thread". + +There appears to be some problem using connection points from Python.exe. +Some objects - mainly OCX controls - only fire event when running inside +Pythonwin as an OCX. + +The "threading bug" I mention isnt the same as this. The threading bug will +actually cause Python to die completely with an access violation. I am +fairly certain they are not related. + +Events seem a black art. Im happy to help you track this down, but I havent +much time... + +Mark. + + + + + + diff --git a/demo/ermis-f/python_m/cur/0696 b/demo/ermis-f/python_m/cur/0696 new file mode 100644 index 00000000..143cba40 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0696 @@ -0,0 +1,52 @@ +From: hyoon at bigfoot.com (Hoon Yoon) +Date: Thu, 15 Apr 1999 08:58:18 -0400 +Subject: Q about OCXtest.py example +Message-ID: <3715E26A.F17BA8BD@bigfoot.com> +Content-Length: 1778 +X-UID: 696 + +Thanks to Mark. I think I am getting hang of COM. +I finally got this example, but one more Q. +Let's say I have two controls either 2 calendar or 1 calendar & 1 timer +for instance. +I guess doing it the second one will be easy, I will just have to +inherit one more control in class + MyCal(activex.Control, calendarParentModule.Calendar, +timerParentModule.timer): +and just specify the Ondefs; however, what do I do when I have 2 +controls same controls on the dialog or inherited Ondefs have same name? +Do someone have some example they don't mind sharing? + +--------------------------------------------------------- +def GetTestCalendarClass(): + global calendarParentModule + win32ui.DoWaitCursor(1) + calendarParentModule = +gencache.EnsureModule("{8E27C92E-1264-101C-8A2F-040224009C02}", 0, 7, 0) + win32ui.DoWaitCursor(0) + if calendarParentModule is None: return None + class TestCalDialog(dialog.Dialog): + def OnInitDialog(self): + class MyCal(activex.Control, calendarParentModule.Calendar): # +<---------********* + def OnAfterUpdate(self): + print "OnAfterUpdate" + +-- +***************************************************************************** +S. Hoon Yoon (Quant) Merrill Lynch Equity Trading, +yelled at yahoo.com hoon at bigfoot.com(w) +"Miracle is always only few standard deviations away, but so is +catastrophe." +* Expressed opinions are often my own, but NOT my employer's. +"I feel like a fugitive from the law of averages." Mauldin +***************************************************************************** +-------------- next part -------------- +A non-text attachment was scrubbed... +Name: vcard.vcf +Type: text/x-vcard +Size: 202 bytes +Desc: Card for Hoon Yoon +URL: + + diff --git a/demo/ermis-f/python_m/cur/0697 b/demo/ermis-f/python_m/cur/0697 new file mode 100644 index 00000000..5bf612f8 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0697 @@ -0,0 +1,109 @@ +From: wtanksle at dolphin.openprojects.net (William Tanksley) +Date: Thu, 22 Apr 1999 23:15:11 GMT +Subject: Emulating C++ coding style +References: <371F8FB7.92CE674F@pk.highway.ne.jp> +Message-ID: +Content-Length: 2731 +X-UID: 697 + +On Fri, 23 Apr 1999 06:08:07 +0900, Thooney Millennier wrote: +>Hello Everyone! + +Hi! + +>I usually use C++ ,so I want to make programs like +>I do using C++. + +Bad idea. How many other languages do you know? If you only know C++, +you're now privledged to learn a second language. Part of that is +learning that Good Ideas in one language are Bad Ideas in another. + +>I don't figure out how to implement the followings +>by Python. + +Okay... + +>If you know any solutions,Please Help! + +>1. #define statements +> e.g. #define __PYTHON_INCLUDED__ + +Meaningless in Python. A bad idea in C++, except for #include control +(which isn't needed in Python). + +> #define PYPROC(ARG) printf("%s",ARG) + +A very bad idea in C++ -- you're supposed to use inline templatized +functions. In Python, just define a function: + +def PYPROC(ARG): sys.stdout.write(ARG) + +>2. stream class +> e.g. cout << "hello python."<3. const variables +> e.g. const int NOCHAGE=1; + +Mediocre idea in C++. Not possible in Python, because in Python variables +aren't supposed to be typed in any way -- instead, they hold things which +are typed. + +Why is it only a mediocre idea in C++? Because a constant is part of an +interface, and a free constant is as bad as a free function; it pollutes +the global namespace. + +In proper C++, your const will be contained inside a class (probably +static) to keep it out of the global namespace. In proper Python, your +const will also be contained inside a class -- and __setattr__ will be +redefined to disallow changing any values. + +class __myConsts: + NOCHAGE = 1 + SOMECHAGE = 2 + + # now make sure nobody can hack my values... + def __setattrs__(self,attrname,value): + raise "can't modify my constants!" + +consts = __myConsts() + +Now, after you import this module, you can access all your constants +through expressions such as consts.NOCHAGE, but you can't change them. + +Well, not quite. It turns out that you CAN change them, but only like +this: + +__myConsts.NOCHAGE = 2 + +...and that only works from within the same file (because names beginning +with underscores are private), so it's probably what you wanted anyhow +(more like Java's 'final' keyword). + +>4. access to class's members using "::" +> e.g. some_class::static_value +> e.g. some_class::static_func(x) + +In Python, "." works for ALL object access. Pointers, class variables, +and so on don't matter. + +To be fair, I think this isn't a bad part of C++; :: notation makes some +things more clear. But Python isn't C++. + +>Thanks for reading. + +Good luck. + +>Thooney Millennier. + +-- +-William "Billy" Tanksley +"But you shall not escape my iambics." + -- Gaius Valerius Catullus + + + + diff --git a/demo/ermis-f/python_m/cur/0698 b/demo/ermis-f/python_m/cur/0698 new file mode 100644 index 00000000..4b996cc0 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0698 @@ -0,0 +1,33 @@ +From: phd at sun.med.ru (Oleg Broytmann) +Date: Wed, 14 Apr 1999 08:04:35 GMT +Subject: real time scheduler +In-Reply-To: <3713AE36.A1EA255B@arlut.utexas.edu> +References: <3713AE36.A1EA255B@arlut.utexas.edu> +Message-ID: +X-UID: 698 + +On Tue, 13 Apr 1999, Bryan VanDeVen wrote: +> Is there a module for scheduling events in real time? I have events +> that need to be repeated indefinitely, each at a given time period. The +> periods are large (at least one minute) and precision requirements are +> not that great (within a few seconds). Is anyone aware of code to do +> this? + + I saw EventLoop module somewhere on ftp.python.org (or was it +Contributer.html?) Pretty simple, but may be adequate. + +> -- +> Bryan Van de Ven +> Applied Research Labs +> University of Texas, Austin +> + +Oleg. +---- + Oleg Broytmann National Research Surgery Centre http://sun.med.ru/~phd/ + Programmers don't die, they just GOSUB without RETURN. + + + + + diff --git a/demo/ermis-f/python_m/cur/0699 b/demo/ermis-f/python_m/cur/0699 new file mode 100644 index 00000000..699d26b5 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0699 @@ -0,0 +1,30 @@ +From: MHammond at skippinet.com.au (Mark Hammond) +Date: Fri, 30 Apr 1999 09:56:07 +1000 +Subject: How to read stdin while debuggingin PythonWin +References: <7g9utu$kin$1@nnrp1.dejanews.com> +Message-ID: <7garhi$hqi$1@m2.c2.telstra-mm.net.au> +X-UID: 699 + +he he - this is broken. Pythonwin does not provide a valid stdin (like it +does for stdout and stderr). + +However, if you use input or raw_input, a dialog will be displayed. + +Im not sure why this would be different under the debugger, but when I try +that from the Pythonwin window I get: +>>> sys.stdin.read() +Traceback (innermost last): + File "", line 0, in ? +IOError: [Errno 9] Bad file descriptor +>>> + +Which is what I expect. + +Mark. + + + + + + + diff --git a/demo/ermis-f/python_m/cur/0700 b/demo/ermis-f/python_m/cur/0700 new file mode 100644 index 00000000..24071436 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0700 @@ -0,0 +1,35 @@ +From: thooney at pk.highway.ne.jp (Thooney Millennier) +Date: Thu, 15 Apr 1999 03:50:48 +0900 +Subject: python interface to c++ class +Message-ID: <3714E388.CD434E8A@pk.highway.ne.jp> +X-UID: 700 + +Hello, everyone. +I am now working on building Python interface +to my C++ matrix library. + +for example In C++,we can enjoy following +operations. +(f_matrix: matrix class for float, d_matrix: for +double) + + 1. f_matrix x1,x2; float y; x2=y*x1; (operation +between different types) + 2. x1(1,2)=3.4; (substitution for matrix +element) + 3. d_matrix z; z=x1; + (auto conversion from float matrix to another +type(d_matrix)) + +Is it possible by "PyNumberMethods" ? +I would like to know how to implement above with +Python. + +Thanks for reading. + + +Thooney Millennier. + + + + diff --git a/demo/ermis-f/python_m/cur/0701 b/demo/ermis-f/python_m/cur/0701 new file mode 100644 index 00000000..e86b529e --- /dev/null +++ b/demo/ermis-f/python_m/cur/0701 @@ -0,0 +1,16 @@ +From: bwarsaw at cnri.reston.va.us (Barry A. Warsaw) +Date: 28 Apr 1999 00:11:40 -0400 +Subject: help +References: +Message-ID: <61lnfdjseb.fsf@anthem.cnri.reston.va.us> +X-UID: 701 + +>>>>> "MZ" == Moshe Zadka writes: + + MZ> Don't we all know that feeling? + +Fortunately, we don't have that problem too much around here :-) + + + + diff --git a/demo/ermis-f/python_m/cur/0702 b/demo/ermis-f/python_m/cur/0702 new file mode 100644 index 00000000..004add85 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0702 @@ -0,0 +1,47 @@ +From: guido at CNRI.Reston.VA.US (Guido van Rossum) +Date: Mon, 19 Apr 1999 17:31:26 GMT +Subject: Memory and swapping question +In-Reply-To: Your message of "Mon, 19 Apr 1999 18:50:33 +0200." + <371B5ED8.A9C82170@appliedbiometrics.com> +References: <371B5ED8.A9C82170@appliedbiometrics.com> +Message-ID: <199904191731.NAA03862@eric.cnri.reston.va.us> +Content-Length: 1070 +X-UID: 702 + +> Now, create a list of numbers with the half of big, +> and count the seconds. Afterwards, delete the list +> and again count the seconds. +> +> >>> x=range(big/2) +> >>> del x +> >>> +> +> This will be quite fast, and the deletion will be somewhat +> faster than the creation. +> +> Now for the big WHY? +> Do the same with big. +> +> >>> x=range(big) +> >>> del x +> >>> +> +> On my system, creation takes about 10 times as for big/2, +> this is ok. But the del takes at least three times as long. +> Besides the fact that integers are never really disposed but +> build up a freelist, why is deletion so much slower now? + +Clearly in the second case you're exceeding your physical memory and +paging VM pages in and out of swap space? + +My guess: when creating the list you are allocating new VM pages, +which don't require any overhead until they need to be written, but +when deleting it, each page gets read from swap space, modified, and +then written back. Thus, you're I/O bound, and deleting requires more +I/O. + +--Guido van Rossum (home page: http://www.python.org/~guido/) + + + + diff --git a/demo/ermis-f/python_m/cur/0703 b/demo/ermis-f/python_m/cur/0703 new file mode 100644 index 00000000..66ce4461 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0703 @@ -0,0 +1,24 @@ +From: tim_one at email.msn.com (Tim Peters) +Date: Tue, 27 Apr 1999 23:48:59 -0400 +Subject: SMTPLIB accessing MicroSoft SMTP mail server +In-Reply-To: <7g5o9g$ues$1@nnrp1.dejanews.com> +Message-ID: <000701be912a$0cf52940$29a02299@tim> +X-UID: 703 + +[max at rightworks.com] +> I had reported a problem that when sending mail to a MS SMTP +> server my code was hanging. The fix is in the data() method the +> msg text is terminated by sending "\n.\n" It appears that MicroSoft +> requires a full CRLF. By changing the line from self.send("\n.\n") +> to self.send(CRLF+"."+CRLF) problem is fixed. + +Aha! This msg crossed with my reply to c.l.py. As that reply suggested-- +but as you no longer need to know --this is already fixed in 1.5.2. + +upgrade!-ly y'rs - tim + + + + + + diff --git a/demo/ermis-f/python_m/cur/0704 b/demo/ermis-f/python_m/cur/0704 new file mode 100644 index 00000000..d8c8fa76 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0704 @@ -0,0 +1,25 @@ +From: morse at harborcom.net (Kevin Dahlhausen) +Date: Tue, 06 Apr 1999 11:39:03 GMT +Subject: swig or not to swig ? +References: <4p6O2.1348$8m5.2126@newsr1.twcny.rr.com> +Message-ID: <3709f149.2262513@news.oh.verio.com> +X-UID: 704 + +>Didn't have much luck with bgen. +>modulator seems handy, Is there a reason to prefer swig ? + +Ahh, because it works really well? :) +Seriously, depending on the library, it can make creating wrappers trivial. +It can do most of the work itself, you just have to help it with ambiguos +parameters - like int * refererring to a list of ints or something. Python is +very well documented on the swig site. Give it a shot. + +Having said that. I would guess - not having used modulator - that a reason not +to prefer swig is that you need to compile a shared module. does the modulator + +produce a pure python source result? + + + + + diff --git a/demo/ermis-f/python_m/cur/0705 b/demo/ermis-f/python_m/cur/0705 new file mode 100644 index 00000000..f684c432 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0705 @@ -0,0 +1,32 @@ +From: mal at lemburg.com (M.-A. Lemburg) +Date: Mon, 26 Apr 1999 20:59:21 +0200 +Subject: I need test .py files +References: <37249009.AA2B13CA@abo.fi> +Message-ID: <3724B789.C514B05@lemburg.com> +X-UID: 705 + +Raul Parra Bacete FS wrote: +> +> Hi, +> +> I have ported the python interpreter to the sh1 hitachi, and now I would +> like to get .py programs to test my python interpreter... that programs +> should not have any import statment or any reference to files, so I need +> some BASIC .py programs to test my python + +The scripts in Lib/test/ of the Python source distribution +are intended to be a relatively complete test suite for the interpreter +and many of the standard libs modules. + +See Lib/test/regrtest.py for details on how to run the suite. + +-- +Marc-Andre Lemburg Y2000: 249 days left +--------------------------------------------------------------------- + : Python Pages >>> http://starship.skyport.net/~lemburg/ : + --------------------------------------------------------- + + + + + diff --git a/demo/ermis-f/python_m/cur/0706 b/demo/ermis-f/python_m/cur/0706 new file mode 100644 index 00000000..4726248e --- /dev/null +++ b/demo/ermis-f/python_m/cur/0706 @@ -0,0 +1,36 @@ +From: MHammond at skippinet.com.au (Mark Hammond) +Date: Wed, 14 Apr 1999 09:44:13 +1000 +Subject: Help? Newbie COM Question +References: <7evmck$2en$1@nnrp1.dejanews.com> +Message-ID: <7f0kqs$bv6$1@m2.c2.telstra-mm.net.au> +X-UID: 706 + +There are a number of ways: + +* PythonCOM/Pythonwin comes with a clunky OLE Viewer you could use. +* VB, VC or VJ object viewers can still be used. +* If you use makepy (check out the documentation that comes with the +package) you can read the generated source code. +* You can find a freeware or shareware object viewer. +* (You could help make the pythoncom object viewer less clunky :-) + +Mark. + +ranjan.bagchi at pobox.com wrote in message +<7evmck$2en$1 at nnrp1.dejanews.com>... +>Hi -- +> +>I'm checking Python out for automating COM objects and fast GUI +development. +>The COM objects in question are developed in VisualJ++, and in other COM +>enviromments (tcl with the tcom package), I can get lists of methods and +>properties offered by the object. +> +>Is there an easy way to do this in WinPython? + + + + + + + diff --git a/demo/ermis-f/python_m/cur/0707 b/demo/ermis-f/python_m/cur/0707 new file mode 100644 index 00000000..5a59d47f --- /dev/null +++ b/demo/ermis-f/python_m/cur/0707 @@ -0,0 +1,19 @@ +From: gemodek at t-online.de (gemodek) +Date: Thu, 29 Apr 1999 16:57:45 +0200 +Subject: Read MS Access 97 *.mdb files with python?? +Message-ID: <37287369.D6E67313@t-online.de> +X-UID: 707 + +Does somebody know some +piece of soft which can this?? + +Or does somebody know if the description of +the format ia avaible (for free of course). + +Thanks + + Stephan + + + + diff --git a/demo/ermis-f/python_m/cur/0708 b/demo/ermis-f/python_m/cur/0708 new file mode 100644 index 00000000..aff32f2d --- /dev/null +++ b/demo/ermis-f/python_m/cur/0708 @@ -0,0 +1,40 @@ +From: astro at nospam.tne.net.au (Tim Auld) +Date: Mon, 26 Apr 1999 12:41:13 +0930 +Subject: Using Python for Modular Artificial Intelligence code +Message-ID: +Content-Length: 1064 +X-UID: 708 + +Hi all, + +I've been designing a large game project, and I want it to be easily +extensible. It's a space combat/exploration/trade game, in the spirit of +the original Elite. What I want to be able to do is add new units to the +game while the player is in the middle of a game that has lasted weeks (or +any arbitrary length of time) already. + +I've started looking into Python as the AI scripting language for this +purpose, but I'm having trouble seeing exactly how I could do this. I want +a message passing architecture - so one object in the game world sends a +message to another for interpretation (along with a Python tuple for the +parameters of the message perhaps). This requires a two way interface +between my C++ code and the Python script loaded for the particular game +object. + +My question is, how can I load the Python script, let my C++ object call +functions within the Python script, and provide a callback for the Python +script to call methods in the C++ object? + +Thanks, +Tim + +________________________ +astro at tne.net.au +tim at ratbaggames.com + + + + + + + diff --git a/demo/ermis-f/python_m/cur/0709 b/demo/ermis-f/python_m/cur/0709 new file mode 100644 index 00000000..028fd2ec --- /dev/null +++ b/demo/ermis-f/python_m/cur/0709 @@ -0,0 +1,20 @@ +From: cgw at fnal.gov (Charles G Waldman) +Date: Tue, 20 Apr 1999 17:40:04 GMT +Subject: Tkinter hangs in Emacs in 1.5.2 on Win32 +In-Reply-To: <371ca96f.0@nnrp1.news.uk.psi.net> +References: <371ca96f.0@nnrp1.news.uk.psi.net> +Message-ID: <14108.48116.801905.475712@buffalo.fnal.gov> +X-UID: 709 + +Pat Knight writes: + > I often prototype fragments of Tkinter code using the interactive Python mode + > in NT emacs. Since installing 1.5.2 the interpreter hangs when run + > interactively inside Emacs. + +Do you have the latest version of python-mode.el? Do you have +"py-python-command-args" set to ("-i") ? You might also try a setting +of ("-i" "-u") if that doesn't work + + + + diff --git a/demo/ermis-f/python_m/cur/0710 b/demo/ermis-f/python_m/cur/0710 new file mode 100644 index 00000000..a264bc5d --- /dev/null +++ b/demo/ermis-f/python_m/cur/0710 @@ -0,0 +1,36 @@ +From: fmwang at mediaone.net (Fuming Wang) +Date: Fri, 16 Apr 1999 22:12:48 -0400 +Subject: Quick fix to add "+=" +References: <3717AB14.2926AF76@mediaone.net> +Message-ID: <3717EE20.41343593@mediaone.net> +X-UID: 710 + +I have searched dejanews. They don't like the "+=" characters. Could you +be more specific about how to modify the interpreter? I desperate +here.:) + +Thanks, +Fuming + +Blake Winton wrote: +> +> On Fri, 16 Apr 1999 17:26:44 -0400, Fuming Wang wrote: +> >Any one knows a quick fix to add "+=" function. I am really getting +> >tired of typing long names twice. +> +> Heh. I can't wait to see the other replies... :) +> +> += has been left out of the language for a good reason, and thus it's +> probably not likely that there's an easy way to add it. I think you +> will have to recompile the interpreter to get it to do what you want, +> and even then, I don't think that you really want what it would do. +> +> Surely there's some discussion about += in dejanews which would provide +> more enlightenment that I can. +> +> Later, +> Blake. + + + + diff --git a/demo/ermis-f/python_m/cur/0711 b/demo/ermis-f/python_m/cur/0711 new file mode 100644 index 00000000..ecb3f0d3 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0711 @@ -0,0 +1,54 @@ +From: trashcan at david-steuber.com (David Steuber) +Date: 28 Apr 1999 03:36:58 -0400 +Subject: Designing Large Systems with Python +References: +Message-ID: +Content-Length: 1968 +X-UID: 711 + +boud at rempt.xs4all.nl writes: + +-> Then suddenly, the whole blasted !@#$%^&* was more than ten million +-> lines, more than hundred dll's, numerous OCX'es, and countless forms, +-> all built by twenty to thirty novices in the art of programming, of whom +-> fifteen had left the company. It's more than painful or embarrasing... +-> And it's not the first time I've seen that happen. Sorry for the rant - +-> I just had to get it of my chest. I don't think Python really insures +-> you against these mistakes. + +I never heard it being _that_ bad. I am hoping that the modular +nature of Python allows me to throw away the stuff that turns out to +be crap and insert replacement code without a complete re-write. + +This is assuming I actually get my but in gear and go ahead with the +project I have in mind. It is a project of the ambitious sort where +the word hubris is a hopelessly inadequate description of my state of +mind in even contemplating the thing. + +-- +David Steuber +http://www.david-steuber.com + +If you wish to reply by mail, _please_ replace 'trashcan' with 'david' +in the e-mail address. The trashcan account really is a trashcan. + +Review Questions + +(1) If Nerd on the planet Nutley starts out in his spaceship at 20 KPH, + and his speed doubles every 3.2 seconds, how long will it be before + he exceeds the speed of light? How long will it be before the + Galactic Patrol picks up the pieces of his spaceship? + +(2) If Roger Rowdy wrecks his car every week, and each week he breaks + twice as many bones as before, how long will it be before he breaks + every bone in his body? How long will it be before they cut off + his insurance? Where does he get a new car every week? + +(3) If Johnson drinks one beer the first hour (slow start), four beers + the next hour, nine beers the next, etc., and stacks the cans in a + pyramid, how soon will Johnson's pyramid be larger than King + Tut's? When will it fall on him? Will he notice? + + + + diff --git a/demo/ermis-f/python_m/cur/0712 b/demo/ermis-f/python_m/cur/0712 new file mode 100644 index 00000000..02990f98 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0712 @@ -0,0 +1,28 @@ +From: phd at sun.med.ru (Oleg Broytmann) +Date: Tue, 27 Apr 1999 20:00:27 +0400 (MSD) +Subject: Directories +In-Reply-To: <3725DDD2.149DF47F@geocities.com> +Message-ID: +X-UID: 712 + +On Tue, 27 Apr 1999 smoothasice at geocities.com wrote: +> Hi, i'm curious if there is a python command or set of commaneds that +> could be used like the dir() command in dos prompt. I am trying to +> write a program in python that would allow me to list the files of a +> certain data type in a few directories but I need to know how I would do +> that ...thanks a bundle. + + fnmatch standard module pretty good on it. Full listsing could also be +generated by os.listdir(). + +> Anton + +Oleg. +---- + Oleg Broytmann National Research Surgery Centre http://sun.med.ru/~phd/ + Programmers don't die, they just GOSUB without RETURN. + + + + + diff --git a/demo/ermis-f/python_m/cur/0713 b/demo/ermis-f/python_m/cur/0713 new file mode 100644 index 00000000..c2fd700d --- /dev/null +++ b/demo/ermis-f/python_m/cur/0713 @@ -0,0 +1,33 @@ +From: phd at sun.med.ru (Oleg Broytmann) +Date: Mon, 26 Apr 1999 11:38:50 +0400 (MSD) +Subject: timeout on urllib.urlopen? +In-Reply-To: <7g0r7c$gn9$1@nnrp1.dejanews.com> +Message-ID: +X-UID: 713 + +Hello! + +On Mon, 26 Apr 1999, Kevin L wrote: +> I'm trying to use urllib.urlopen() on a big list of urls, some of which are +> dead (they don't return a 404, just no response). And the function just waits. +> Is there any way to specify a timeout period for this function? thanks, + + this is well-known problem with sockets. No, there is no simple way to +specify timeout. You should rewrite your program to use either fork() or +threads. + One thread (or parent process, if you use fork()) controlls another, and +after timeout kill watching thread/process. Recently I rewrote my URL +checker to use fork() (the very checker is under debuggung and soon to be +published). + +> Kevin + +Oleg. +---- + Oleg Broytmann National Research Surgery Centre http://sun.med.ru/~phd/ + Programmers don't die, they just GOSUB without RETURN. + + + + + diff --git a/demo/ermis-f/python_m/cur/0714 b/demo/ermis-f/python_m/cur/0714 new file mode 100644 index 00000000..985d0c40 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0714 @@ -0,0 +1,43 @@ +From: MHammond at skippinet.com.au (Mark Hammond) +Date: Tue, 20 Apr 1999 09:23:27 +1000 +Subject: 'import exceptions' failed +References: <371B1201.392B@iname.com> +Message-ID: <7fgdrm$8rc$1@m2.c2.telstra-mm.net.au> +Content-Length: 1325 +X-UID: 714 + +You are obviously investing serious time with Python, so you should try and +go to the next level. Compile the whole shabang with Debugging symbols, and +work it out :-) The biggest advantage is that it will give you a good +understanding of the internals, making many of these questions suddenly +become either obvious or moot. + +For example, you ask how to turn "-v" on from the API - simple - go to the +Python sources, work out how it does -v, then do the same thing! Should be +easy to find. + +Similarly with the path issue. Set a breakpoint where Python is about to +start building your sys.path. Step through it, and understand exactly why +it is building a sys.path that does not include the directory where your +"exceptions.py" and "site.py" live. The answer will then be obvious (even +though I have no idea what it is :-) + +Hope this helps, even if it points to a slightly longer, but far more +beneficial road. + +Mark. +BTW - what editor control are you using? - I happen to know this guy who has +written a really cool free one that Pythonwin now uses - Ive got some big +plans :-) + +Jussi Jumppanen wrote in message <371B1201.392B at iname.com>... +>I have compiled the python source into a Windows DLL and using +>this DLL I have embedd python into and windows text editor. Now +>when I run the following macro script: + + + + + + + diff --git a/demo/ermis-f/python_m/cur/0715 b/demo/ermis-f/python_m/cur/0715 new file mode 100644 index 00000000..27dcc0be --- /dev/null +++ b/demo/ermis-f/python_m/cur/0715 @@ -0,0 +1,30 @@ +From: gmcm at hypernet.com (Gordon McMillan) +Date: Tue, 20 Apr 1999 03:57:28 GMT +Subject: calldll windll instantiation +In-Reply-To: <371bdcbf.0@news.dbtech.net> +References: <371bdcbf.0@news.dbtech.net> +Message-ID: <1287541642-22552898@hypernet.com> +X-UID: 715 + +Karl & Mel ask: + +> Need some help. +> I think?(scarry moment)? that I need to create more that one +> instance of a dll. +> +> 1. Can this be done? + +Nope. Perhaps if you made a second copy (of the dll file) and gave it +a different name. Or perhaps the dll uses thread local storage, and +if you attach from different threads it will act like each thread has +its own copy. But I doubt it. + +Different processes will get different copies, so maybe you could use +IPC between 2 python scripts... + + +- Gordon + + + + diff --git a/demo/ermis-f/python_m/cur/0716 b/demo/ermis-f/python_m/cur/0716 new file mode 100644 index 00000000..1cf446a6 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0716 @@ -0,0 +1,54 @@ +From: akuchlin at cnri.reston.va.us (Andrew M. Kuchling) +Date: Mon, 26 Apr 1999 15:36:49 -0400 (EDT) +Subject: Using the compression module +In-Reply-To: <7g2ddf$dra$1@birch.prod.itd.earthlink.net> +References: <7g2ddf$dra$1@birch.prod.itd.earthlink.net> +Message-ID: <14116.48932.822574.914523@amarok.cnri.reston.va.us> +Content-Length: 1470 +X-UID: 716 + +Benjamin Derstine writes: +>From the gzip documentation: +>open (fileobj[, filename[, mode[, compresslevel]]]) +> Returns a new GzipFile object on top of fileobj, which can be a regular +>file, a StringIO object, or any object which simulates a file. + + Are you sure that's what the documentation says? The current +documentation has filename, mode, compresslevel, fileobj, which +matches the code. Check the current documentation on +www.python.org/doc/lib/ . + +>f=open('/Audit.dbf','r') +>test=gzip.GzipFile('Auditc','r','9',f) + + The first line opens Audit.dbf for reading. However, if you +want to make a compressed version of it, the second line is wrong; +it's trying to make a compressed file object from the uncompressed +/Audit.dbf. Instead, you need to open a compressed file for writing: + +f=open('/Audit.dbf','r') +test=gzip.GzipFile('Auditc', 'w') + +test.write() will then write data to the compressed file, so you need +a loop to copy between the two files: + +while 1: + chunk = f.read(4096) # Work in chunks of 4K + if chunk == "": break # End-of-file? Break out of the loop + test.write( chunk ) +f.close() +test.close() + +-- +A.M. Kuchling http://starship.python.net/crew/amk/ +I had known him for years in a casual way, but I had never seen very deeply +into him. He seemed to me to have more conscience than is good for any man. A +powerful conscience and no sense of humour -- a dangerous combination. + -- Robertson Davies, _The Rebel Angels_ + + + + + + + diff --git a/demo/ermis-f/python_m/cur/0717 b/demo/ermis-f/python_m/cur/0717 new file mode 100644 index 00000000..ff64a002 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0717 @@ -0,0 +1,71 @@ +From: tbryan at zarlut.utexas.edu (Tom Bryan) +Date: Sun, 25 Apr 1999 20:50:47 -0500 +Subject: perl v python +References: <37238A6A.E245337D@btinternet.com> +Message-ID: <3723C677.7A6DB767@zarlut.utexas.edu> +Content-Length: 2454 +X-UID: 717 + + +"Mark E. Owen" wrote: +> +> I've been using perl quite some time, just starting looking +> at Python. +> +> what's peoples views/comparisons of both languages? +> +> Cheers +> Mark + +This comes up often. You can probably find scores of responses if +you do a PowerSearch of comp.lang.python at DejaNews. + +As a Perl hacker, you might be interested to read what Tom Christiansen +said about the two languages several years ago. +http://language.perl.com/versus/python + +Although a lot of time has passed since that message was written, +it's still a nice, polite, concise summary. Of course, both +languages have developed since then. I think there are many more +Python users than there were at the time he was writing. + +I originally started using Python at the recommendation of my +co-workers when I started trying to learn about Perl's references +so that I could build better data structures for my scripts. The +syntax alone was driving me crazy. I started using Python, and I +haven't written a Perl program of more than 10 lines since then. +I don't program full time, and Python is simply easier to remember +when I've been away from the language for a few weeks. + +As an extra bonus, I find that I write code that's much easier to +reuse when I'm writing in Python. The language really encourages it. +The thing that really motivated me to try Python was when I wrote a +Perl script that *grew* to over 1000 lines. I was away from it for +a while, and then I had to use it again...and modify it. It took +me over an hour to figure the code out. It took me an afternoon +to rewrite so that it could cope with the changes that I needed to +make. Nothing like that has happened since I started using Python. + +Try it. You'll like it. :-) + +---Tom + +P.S. Christiansen's article seems to imply that Python doesn't have + a variety of ways to accomplish the same task: + "Another thing people consider a feature in Python over Perl is + that no one is ever going to turn around and write the whole thing + in an entirely different way as they might in Perl." + There's more than one way to do it in Python, too. There just aren't + so many ways that you always have to delve into some dark corner of + the language every time you read a different programmer's code. + I'm finding that out now as I try to port some old Perl code to + Python. + +-- +tbryan at zarlut.utexas.edu +Remove the z from this address to reply. +Stop spam! http://spam.abuse.net/spam/ + + + + diff --git a/demo/ermis-f/python_m/cur/0718 b/demo/ermis-f/python_m/cur/0718 new file mode 100644 index 00000000..e8673815 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0718 @@ -0,0 +1,38 @@ +From: tjreedy at udel.edu (Terry Reedy) +Date: 9 Apr 1999 02:59:32 GMT +Subject: Q: newbie win95 - python path navigation assignment strategies needed +References: <7eibtm$igb$1@news1.cableinet.co.uk> +Message-ID: <7ejqek$cuh$2@news.udel.edu> +Content-Length: 1029 +X-UID: 718 + +In article <7eibtm$igb$1 at news1.cableinet.co.uk>, jasonic at nomadicsltd.com +says... + +>I do not understand the relationships between modules, namespace, path and +>the Python shell. When I am in the python shell at the prompt I can + +The main differences between batch and interactive mode are that the latter: +1. echoe the value of expressions; +2. requires a blank line to terminate blocks (if, while, for, def, class). + +A module, once imported, is (or becomes) a namespace. Path is where to fine +the text for modules. + +>But how and when do I need to change the working directory? +>I cannot seem to find a setcwd() command or similar.. Am I missing +>something? + +Yes. For 'how', check contents of ntpath. For when, when you want to import +modules not on explicit paths in sys.pyth (so that they are in '.') or when +you want to open files for reading and writing by simple name without a path. + +I'm not sure about some of other questions. Hope this helps. I also work on +Win95 and have few problems. + +Terry J. Reedy + + + + + diff --git a/demo/ermis-f/python_m/cur/0719 b/demo/ermis-f/python_m/cur/0719 new file mode 100644 index 00000000..6210286f --- /dev/null +++ b/demo/ermis-f/python_m/cur/0719 @@ -0,0 +1,35 @@ +From: moshez at math.huji.ac.il (Moshe Zadka) +Date: Wed, 21 Apr 1999 22:32:58 +0300 +Subject: New python user seeks comments +In-Reply-To: <371db9cb.5622314@news.omnilink.de> +References: <371db9cb.5622314@news.omnilink.de> +Message-ID: +X-UID: 719 + +On Wed, 21 Apr 1999, Stefan Franke wrote: + +> On 21 Apr 1999 00:33:10 -0400, David Steuber wrote: +> +> >Er, uh, hmm. +> > +> >I wrote my first Python program today. It took longer than I +> >expected. Who would have guessed that you couldn't give a file object +> >the name 'in'?Or at least that was one of the weirder obstacles. +> +> Maybe a reserved keyword-aware editor could have saved you +> from this? You could try IDLE, which comes with the lastest Python +> distribution or PythonWin, if you are using Windows. +> There's a very clever Python Emacs mode as well... + +Just my 0.02$: Recent versions of vim are also Python syntax aware. + +And, though its name is misleading, the ``cheatsheet'' is wonderful: +lists of reserved words, etc. +-- +Moshe Zadka . +QOTD: What fun to me! I'm not signing permanent. + + + + + diff --git a/demo/ermis-f/python_m/cur/0720 b/demo/ermis-f/python_m/cur/0720 new file mode 100644 index 00000000..4375a200 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0720 @@ -0,0 +1,48 @@ +From: duncan at rcp.co.uk (Duncan Booth) +Date: 29 Apr 1999 09:11:18 GMT +Subject: 'sourcing' Python scripts? +References: <372713AD.6ABA444@cern.ch> +Message-ID: <8DB767BD4duncanrcpcouk@news.rmplc.co.uk> +Content-Length: 1501 +X-UID: 720 + +Haimo G. Zobernig wrote in +<372713AD.6ABA444 at cern.ch>: + +>Dear Python experts, +> +>this might be a unix rather than a Python problem, but I need to set +>environment variables from a Python program *in the parent process* +>that is running the Python script ( a la os.environ['BAR'] = 'foo' ). +>In other words, I want to achieve the equivalent of 'sourcing' the +>Python script. Can this be done? Even better would be a solution that +>also works on the various WinAbominations... (well, NT at least) + +About the only way to make this work would be to make the python program +output a shell script that sets the environment variables and 'source' the +output. Something similar should work on NT/95 although you would have to +output appropriate syntax for the system in use. + +For example, the following abomination works on Windows NT 4 SP4: +--------- something.bat or something.cmd -------------- +@echo off +set XYZZY="------------------" +echo XYZZY is %XYZZY% +for /F "tokens=*" %%i in ('d:\progra~1\python\python.exe test.py') do %%i +echo XYZZY is %XYZZY% +------------------------------------------------------- + +---------- test.py ------------------- +print "SET XYZZY=Hello World" +-------------------------------------- + + +-- +Duncan Booth duncan at dales.rmplc.co.uk +int month(char *p){return(124864/((p[0]+p[1]-p[2]&0x1f)+1)%12)["\5\x8\3" +"\6\7\xb\1\x9\xa\2\0\4"];} // Who said my code was obscure? +http://dales.rmplc.co.uk/Duncan + + + + diff --git a/demo/ermis-f/python_m/cur/0721 b/demo/ermis-f/python_m/cur/0721 new file mode 100644 index 00000000..1c5f78e3 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0721 @@ -0,0 +1,26 @@ +From: ngps at my-dejanews.com (ngps at my-dejanews.com) +Date: Wed, 21 Apr 1999 06:30:50 GMT +Subject: Raw binary string --> long integer? +Message-ID: <7fjrar$avb$1@nnrp1.dejanews.com> +X-UID: 721 + +Hi, + +I'm looking for a way to do the following in pure Python. + +Given a binary string, e.g., '\003\004\005', convert the string into a long. +So the example should become (3<<8|4)<<8|5 == 110000010000000101 == 197,637. + +The binary strings can be arbitrarily long. (Ok, up to about 256 bytes for an +RSA public key. ;-) + +Hints appreciated. Cheers. + +- PS + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/0722 b/demo/ermis-f/python_m/cur/0722 new file mode 100644 index 00000000..7fa8a47c --- /dev/null +++ b/demo/ermis-f/python_m/cur/0722 @@ -0,0 +1,33 @@ +From: paul at prescod.net (Paul Prescod) +Date: Wed, 28 Apr 1999 15:43:28 GMT +Subject: Python IS slow ! [was] Re: Python too slow for real world +References: <613145F79272D211914B0020AFF6401914DAD8@gandalf.digicool.com> +Message-ID: <37272CA0.3F3F02A2@prescod.net> +X-UID: 722 + +Markus Kohler wrote: +> +> +> You are right that one should choose the right tool for a problem, but +> I disagree that Python is optimized for the general case. Squeak a free +> Smalltalk implementation (www.squeak.org), is already much faster ( about +> 3 times actually ) than python and it has even a true Garbage +> Collector. + +This is a little off-topic but I'm curious whether squeak has an embedding +API. Is there any languge that is as easy to embed as Python, and also has +full garbage collection? + +-- + Paul Prescod - ISOGEN Consulting Engineer speaking for only himself + http://itrc.uwaterloo.ca/~papresco + +"Microsoft spokesman Ian Hatton admits that the Linux system would have +performed better had it been tuned." +"Future press releases on the issue will clearly state that the research +was sponsored by Microsoft." + http://www.itweb.co.za/sections/enterprise/1999/9904221410.asp + + + + diff --git a/demo/ermis-f/python_m/cur/0723 b/demo/ermis-f/python_m/cur/0723 new file mode 100644 index 00000000..8b88a4e4 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0723 @@ -0,0 +1,24 @@ +From: tjreedy at udel.edu (Terry Reedy) +Date: 7 Apr 1999 02:56:09 GMT +Subject: Xbase++ preprocessor implementation in Python +References: <37097A3A.F772205@magna.com.au> +Message-ID: <7eehg9$3at$1@news.udel.edu> +X-UID: 723 + +In article <37097A3A.F772205 at magna.com.au>, garys at magna.com.au says... + +>Attached please find a Python implementation of the Xbase++ preprocessor. +... +>Oh, and it is *dead slow*! - hundreds of times slower I think! +... + +I do not know re's well enough to comment on whether they can be rewritten +to run faster. I believe there is a python profiler which might give +indications on where to start to speed things up. + +Terry J. Reedy + + + + + diff --git a/demo/ermis-f/python_m/cur/0724 b/demo/ermis-f/python_m/cur/0724 new file mode 100644 index 00000000..28ced18e --- /dev/null +++ b/demo/ermis-f/python_m/cur/0724 @@ -0,0 +1,35 @@ +From: np2 at doc.ic.ac.uk (Nat Pryce) +Date: Fri, 30 Apr 1999 18:38:37 +0100 +Subject: CORBA IDL AND SCRIPTS +References: <3729E026.D9D29B1@ppllc.com> +Message-ID: <3729EA9D.51C630C6@doc.ic.ac.uk> +Content-Length: 1058 +X-UID: 724 + +> My question is: Is there any support for generating Scripting +> language bindings from CORBA IDL or a +> translator (less preferable) that can translate from CORBA IDL to a +> scripting language IDL ?? + +Any scripting language that has a binding to the CORBA Dynamic +Invocation Interface (DII) and Interface Repository (IR) can +safely invoke operations on CORBA objects without knowing their +types at compile time. If you make all the APIs you want to be +scriptable available through an ORB then the scripting interfaces +will be available "for free". + +Cheers, + Nat. + +-- ++------------------------------------------+---------------------+ +| Name: Nat Pryce MEng ACGI | Dept. of Computing, | +| Email: np2 at doc.ic.ac.uk | Imperial College, | +| Tel: +44 (0)171 594 8394 | 180 Queen's Gate, | +| Fax: +44 (0)171 581 8024 | London SW7 2BZ, | +| WWW: http://www-dse.doc.ic.ac.uk/~np2 | United Kingdom | ++------------------------------------------+---------------------+ + + + + diff --git a/demo/ermis-f/python_m/cur/0725 b/demo/ermis-f/python_m/cur/0725 new file mode 100644 index 00000000..7ce393e4 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0725 @@ -0,0 +1,31 @@ +From: fredrik at pythonware.com (Fredrik Lundh) +Date: Tue, 13 Apr 1999 07:32:13 GMT +Subject: Python without registry entries +References: <370fb711.28093946@news.demon.co.uk> <7eol16$1l2$1@m2.c2.telstra-mm.net.au> <37121820.3758204@news.netmeg.net> <37116F7B.3E3088EB@prescod.net> +Message-ID: <00f601be857f$ff9ef1a0$f29b12c2@pythonware.com> +X-UID: 725 + +Paul Prescod wrote: +> I would prefer if PythonWin did what Netscape does which is put the vast +> majority of setup information in a text file in the Netscape directory and +> make a single pointer to that from the registry. + +sitecustomize.py still works, afaik + +(see the comments in site.py for details). + +iirc, most of the stuff in the registry isn't really there +for plain python usage; it's there to make sure COM +and other windows-specific goodies work as they +should. + +(btw, if you want a really plain python-on-windows +installation, our py15 distribution doesn't touch the +registry or the system directories at all...) + + + + + + + diff --git a/demo/ermis-f/python_m/cur/0726 b/demo/ermis-f/python_m/cur/0726 new file mode 100644 index 00000000..f8b5c3f7 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0726 @@ -0,0 +1,40 @@ +From: jkraai at murl.com (jkraai at murl.com) +Date: Thu, 29 Apr 1999 19:31:00 GMT +Subject: padding strings +Message-ID: <009301be9276$e20531a0$8b7125a6@cpda6686.mcit.com> +X-UID: 726 + +padchar = ' ' +N = 50 + +str = 'I need to be padded' +padded = (str+padchar*N)[:N] + +print '>'+padded+'<' +print 'len:',len(padded) + +--jim + +-----Original Message----- +From: Roy Smith +Newsgroups: comp.lang.python +To: python-list at cwi.nl +Date: Thursday, April 29, 1999 2:01 PM +Subject: padding strings + + +>Given a string, I want to generate another string which is exactly N +>characters long. If the first string is less than N, I want to blank-pad +>it. If the first string is greater than N, I want to truncate it. +> +>What's the most straight-forward way to do that? +> +>-- +>Roy Smith +>New York University School of Medicine +> + + + + + diff --git a/demo/ermis-f/python_m/cur/0727 b/demo/ermis-f/python_m/cur/0727 new file mode 100644 index 00000000..e4a3a0a1 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0727 @@ -0,0 +1,47 @@ +From: faassen at pop.vet.uu.nl (Martijn Faassen) +Date: Wed, 14 Apr 1999 21:19:46 +0200 +Subject: what do you do with Python +References: <3714C9EA.86C0A4E@earthlink.net> +Message-ID: <3714EA52.B0E4D2C6@pop.vet.uu.nl> +Content-Length: 1542 +X-UID: 727 + +susan e paolini wrote: +> +> I never see jobs with Python advertised so what is it that Python does? +> Thanks for the advice + +I write software with Python. Python is one of the nicest programming +languages I know (and I know quite a few). I write scripts to do various +boring database stuff (luckily less boring due to Python), I've written +a CGI script, I'm working on building a web site in Zope (which is a +Python based web application platform). I play around with Python a lot +too. It's great to do prototyping in. + +I'm planning to use Python to drive several of my larger pet programming +projects; use fast C or C++ where necessary, but use Python to do the +rest (and the rest is big; user interfaces, analysis of data, scripting, +etc). + +Anyway, I'm making money doing mostly Python stuff. I introduced Python +here myself, it wasn't advertized, but now they're stuck with it (as +they're going for Zope). Python isn't a bad language to be stuck with; +one of the best languages to be stuck with, in fact, so I'm doing them a +favor. :) + +Python, by the way, is a clear, powerful, object oriented interpreted +language with one of the most intelligent and civilized internet user +communities I've yet encountered; and they like a good joke too. :) + +As I've expressed before in previous posts, Python is probably edging +towards the 'zooming off into infinity' part of the exponential growth +curve just about now. One or two years from now no one in computing will +be able to ask your question. + +bold-prediction-mode-off-ly yours, + +Martijn + + + + diff --git a/demo/ermis-f/python_m/cur/0728 b/demo/ermis-f/python_m/cur/0728 new file mode 100644 index 00000000..1e1783c1 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0728 @@ -0,0 +1,28 @@ +From: tjreedy at udel.edu (Terry Reedy) +Date: 29 Apr 1999 14:35:04 GMT +Subject: Python IS slow ! [was] Re: Python too slow for real world +References: <613145F79272D211914B0020AFF6401914DAD8@gandalf.digicool.com> +Message-ID: <7g9qmo$luf$1@news.udel.edu> +X-UID: 728 + +In article , +wtanksle at dolphin.openprojects.net says... + +>The reason it's slow is its runtime model. _Every_ function call requires +>a lookup in a hash table, just on the off-chance that the programmer +>changed the meaning of the function. + +A batch-mode optimizer analyzing an entire file (module) should be able to +detect whether or not function names are rebound. + +Perhaps module bindings should be considered immutable from outside the +module unless explicitly declared otherwise. (This would of course require a +new keyword and would break the rare existing code that does this until the +new directive was added.) + +TJR + + + + + diff --git a/demo/ermis-f/python_m/cur/0729 b/demo/ermis-f/python_m/cur/0729 new file mode 100644 index 00000000..5b017ae9 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0729 @@ -0,0 +1,23 @@ +From: jcosby at wolfenet.com (Jon Cosby) +Date: Sun, 18 Apr 1999 14:57:52 -0700 +Subject: Sorting tuples +Message-ID: <7fdkhf$12d$1@sparky.wolfe.net> +X-UID: 729 + +I have a list of tuples +[('a','p','q'),('b','r','s'),('c','t','u'),('a','v','w'),('b','x','y')], +and I want to print out + +a : p, q, v, w +b : r, s, x, y +c : t, u + +Can somebody tell me what command will do this? + +Jon Cosby + + + + + + diff --git a/demo/ermis-f/python_m/cur/0730 b/demo/ermis-f/python_m/cur/0730 new file mode 100644 index 00000000..dc1049a8 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0730 @@ -0,0 +1,36 @@ +From: jbauer at rubic.com (Jeff Bauer) +Date: Sat, 24 Apr 1999 03:18:36 GMT +Subject: PythonCE +References: +Message-ID: <3721380C.C545A15@rubic.com> +X-UID: 730 + +Rich Holm wrote: +> Does anyone know the status of PythonCE? I would like to get +> an updated copy, 1.5.2? Also, where is the source? I wouldn't +> mind recompiling and extending it. + +Brian Lloyd's original PythonCE port: + + http://www.digicool.com/~brian/PythonCE/ + +Mark Hammond has extended it: + + http://starship.python.net/crew/mhammond/ce/ + +PythonCE is stable, even useful for certain tasks, +especially http/ftp communication with your handheld. +The only drawback (IMO) is that a GUI application +will require you to write directly to the Win32/CE +API. Mark provides an excellent example of how +to do this -- he includes a shell written completely +in Python. + +Best regards, + +Jeff Bauer +Rubicon, Inc. + + + + diff --git a/demo/ermis-f/python_m/cur/0731 b/demo/ermis-f/python_m/cur/0731 new file mode 100644 index 00000000..fe6e9c41 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0731 @@ -0,0 +1,89 @@ +From: mal at lemburg.com (M.-A. Lemburg) +Date: Tue, 06 Apr 1999 20:37:42 +0200 +Subject: SNMPy update +References: <7e1hiq$a71$1@Starbase.NeoSoft.COM> + <7ear25$ksf$1@news-sj-3.cisco.com> + <14089.11820.416453.80124@bitdiddle.cnri.reston.va.us> + <3709C8BE.4257C9F1@lemburg.com> <14090.16807.950025.496495@bitdiddle.cnri.reston.va.us> +Message-ID: <370A5476.3AE3A7C1@lemburg.com> +Content-Length: 3483 +X-UID: 731 + +Jeremy Hylton wrote: +> +> >>>>> "MAL" == M -A Lemburg writes: +> +> MAL> Jeremy Hylton wrote: +> >> I'll second your sentiment! I did some work on an X.509 library +> >> written entirely in Python. Like you friend's SNMP code, it will +> >> probably never be released; I don't have time to finish it nor +> >> did I expect that I'd want to release it given the export control +> >> hassles. +> +> MAL> Just want to note that SSLeay/OpenSSL includes a pretty +> MAL> complete X.509 lib and also routines to do ASN.1 encoding an +> MAL> decoding. The main argument for using OpenSSL in this context +> MAL> is, of course, that no export control restrictions apply. +> +> Absolutely! There are a number of good reasons for using OpenSSL +> other than export control as well. OpenSSL buys you all of SSL as +> well as a lot of X.509 (and more of that every day). A Python +> application built on a SWIGed OpenSSL, however, has a *lot* of C code +> underneath it -- with all the problems a large C program has. A pure +> Python implementation of X.509 could be easier to understand, debug, +> and maintain. + +Luckily, there's a whole team of people looking into this and +it is already pretty well debugged, so this may not be a +serious issue. The size is a problem though: you wouldn't want +OpenSSL sitting around in your memory on e.g. Windows CE :-) + +> >> However, it seemed clear to me that an ASN.1 compiler could be +> >> written to generate the encode/decode routines. If someone is +> >> interested in that, I've got some design notes and rough code on +> >> how to do the encode/decode and on how to build a backend for +> >> SNACC. (A free-ish ASN.1 compiler; the only one?) +> +> MAL> Not sure what you mean with "ASN.1" compiler. If you want a +> MAL> compiler that does ASN.1 description -> Python function calling +> MAL> de/encoding routines kind of thing, then I guess the ASN.1 +> MAL> stuff in OpenSSL could help you getting started quite fast. +> +> It seems awfully hard to separate the ASN.1 specific stuff out of +> OpenSSL. It uses it owns I/O abstractions and some moderately hair C +> data structures to manage the results. It's a lot simpler to just +> write the encode/decode routines in pure Python. + +True. Using the struct module should get you the same results +on all supported platforms. + +> MAL> Note that I have a project running with the intention to wrap +> MAL> OpenSSL in an OO manner called mxCrypto (see the link below). +> +> Looking forward to seeing it. When do you think you might have an +> alpha release ready? + +I'm planning to wrap the ASN.1 stuff in the near future, since +it comes in handy when en/decoding keys used by the public key +algorithms. + +Not sure when an alpha will be ready though. Right now I have +all the ciphers and hash functions wrapped, as well as RSA +and Diffie-Hellman. All takes a little longer, since I want to +do the wrapping in nice OO and not just simply tear out the +functions and use them on the raw data. + +Maybe you could write the ASN.1 compiler stuff with an OO +structure in mind ?! That would make it possible to use it +for the stuff in mxCrypto too (with a speed gain I suppose). + +-- +Marc-Andre Lemburg Y2000: 269 days left +--------------------------------------------------------------------- + : Python Pages >>> http://starship.skyport.net/~lemburg/ : + --------------------------------------------------------- + + + + + diff --git a/demo/ermis-f/python_m/cur/0732 b/demo/ermis-f/python_m/cur/0732 new file mode 100644 index 00000000..9ec19413 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0732 @@ -0,0 +1,50 @@ +From: sdm7g at Virginia.EDU (Steven D. Majewski) +Date: Fri, 23 Apr 1999 13:00:16 -0400 (EDT) +Subject: Bug or Feature? +In-Reply-To: <37208E69.4B022E0C@mediaone.net> +References: <37208E69.4B022E0C@mediaone.net> +Message-ID: +X-UID: 732 + +On Fri, 23 Apr 1999, Fuming Wang wrote: + +> +> Hi, +> +> I found this little surprise with Python 1.5.1: +> +> +> >list = [[0]*2]*4 +> >list +> [[0, 0], [0, 0], [0, 0], [0, 0]] +> >list[0][1] = 9 +> >list +> [[0, 9], [0, 9], [0, 9], [0, 9]] +> +> Is this a bug or a feature that I don't know about? +> + +It's a Frequently Discussed Feature. + +[0]*2 concatenates two _copies_ of the list [0] to each other, and +the "*4" concatenates four _copies_ of that list together. + +While we're on the subject of map (in another thread nearby), try: + + list = [[0]*2]*4 + list = map( lambda x: x[:], list ) + list[0][1] = 9 + + +( Looks like copy.deepcopy is too smart to do what I want here. ) + + +---| Steven D. Majewski (804-982-0831) |--- +---| Department of Molecular Physiology and Biological Physics |--- +---| University of Virginia Health Sciences Center |--- +---| P.O. Box 10011 Charlottesville, VA 22906-0011 |--- + + + + + diff --git a/demo/ermis-f/python_m/cur/0733 b/demo/ermis-f/python_m/cur/0733 new file mode 100644 index 00000000..95dbfa9d --- /dev/null +++ b/demo/ermis-f/python_m/cur/0733 @@ -0,0 +1,24 @@ +From: jbauer at rubic.com (Jeff Bauer) +Date: Fri, 30 Apr 1999 04:11:24 GMT +Subject: Rat sited on Amazon +Message-ID: <37292D6C.5684BF72@rubic.com> +X-UID: 733 + +Hey everyone. Check out what's featured on Amazon today +under "Computers and Internet". + +Has David or Mark ever refused to buy you a free drink? + +Now's your chance to get even and write a negative review. + +It's never too late for blackmail, or what we of the +genteel persuasion prefer to call "negotiation". + +ethics-at-$3-a-round-ly yr's + +Jeff Bauer +Rubicon, Inc. + + + + diff --git a/demo/ermis-f/python_m/cur/0734 b/demo/ermis-f/python_m/cur/0734 new file mode 100644 index 00000000..8203650d --- /dev/null +++ b/demo/ermis-f/python_m/cur/0734 @@ -0,0 +1,18 @@ +From: cmedcoff at my-dejanews.com (cmedcoff at my-dejanews.com) +Date: Thu, 29 Apr 1999 15:47:11 GMT +Subject: How to read stdin while debuggingin PythonWin +Message-ID: <7g9utu$kin$1@nnrp1.dejanews.com> +X-UID: 734 + +I may be overlooking something obvious... + +I'm debugging a script in PythonWin's debugger. I get to the statement +"answer = sys.stdin.read()" and the program stops as expected; but where to I +provide the input?! + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/0735 b/demo/ermis-f/python_m/cur/0735 new file mode 100644 index 00000000..ad897c92 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0735 @@ -0,0 +1,27 @@ +From: smoothasice at geocities.com (smoothasice at geocities.com) +Date: Thu, 29 Apr 1999 21:16:50 GMT +Subject: Errors +Message-ID: <3728CD26.907ED9A1@geocities.com> +X-UID: 735 + +Ok I have been using python and I have noticed that the errors aren't +truly helpful.. I don't know if I just didn't learn this properly but I +dont' know why this generates an error: + +for word in All_Words: + z = 0 + while z < len(word): + if z == 0: + tally = tally + alpha.index(word[z]) + else: + tally = tally + (alpha.index(word[z]) * 26) + +It gives me this: NameError: tally +and I don't know why...... + +THanks, +Anton + + + + diff --git a/demo/ermis-f/python_m/cur/0736 b/demo/ermis-f/python_m/cur/0736 new file mode 100644 index 00000000..31b01273 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0736 @@ -0,0 +1,56 @@ +From: andrew at starmedia.net (Andrew Csillag) +Date: Tue, 20 Apr 1999 17:02:18 GMT +Subject: Bug with makesetup on FreeBSD +References: <19990416143607.B1546743@vislab.epa.gov> <19990416215633.C2020@ipass.net> <19990417112344.A1624668@vislab.epa.gov> +Message-ID: <371CB31A.474D6FF@starmedia.net> +Content-Length: 1594 +X-UID: 736 + +Randall Hopper wrote: +> +> Andrew Csillag: +> |Randall Hopper wrote: +> |> Andrew Csillag: +> |> |makesetup in Python 1.5.1 and 1.5.2 bombs on lines in the Setup file +> |> |that use backslash continuation to break a module spec across lines on +> |> |FreeBSD. +> |> +> |> BTW FWIW, I just built 1.5.2 last night on 3.0-RELEASE using the 1.5.2c1 +> |> port. Worked fine. But it may not invoke makesetup under the hood. +> | +> |It does invoke makesetup (that's how the Makefile in Modules gets +> |written). I'm also running FreeBSD 2.2.8, so it may be a bug in /bin/sh +> |that has been subsequently fixed... The quick test is to try this on +> |your 3.0 machine +> | +> |$ read line +> |some text here\ +> | +> |On my 2.2.8 machine after I hit return after the \, I get a command line +> |prompt, not a "blank prompt" that would mean that the read wasn't done. +> +> It must be something else then, because here with stock Bourne shell: +> +> |$ read line +> |some text here\ +> |$ echo $line +> |some text here\ +> +> I get the same behavior you describe, but no build breakage. +> +> Randall + +I figured it out! If you build out of the ports tree, it's Tkinter +configuration is all on one line (see +/usr/ports/lang/python/files/Setup.tk), not broken by using backslash +continuation as is in the distributed Setup file. I was building from +the source release from www.python.org, not from the ports tree as you +did, hence why you didn't run into it and I did. +-- +"There are two major products that come out of Berkeley: +LSD and UNIX. We don't believe this to be a coincidence." +- Jeremy S. Anderson + + + + diff --git a/demo/ermis-f/python_m/cur/0737 b/demo/ermis-f/python_m/cur/0737 new file mode 100644 index 00000000..b28ddd25 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0737 @@ -0,0 +1,21 @@ +From: aa8vb at vislab.epa.gov (Randall Hopper) +Date: Tue, 6 Apr 1999 11:02:55 GMT +Subject: mxDateTime in Python distribution +Message-ID: <19990406070255.A867135@vislab.epa.gov> +X-UID: 737 + + I'd like to add my vote toward integrating Marc Lemburg's mxDateTime +functionality into the next Python release. + + I needed to do some date/time arithmetic recently and found that core +Python didn't have this functionality. I was a little skeptical about +using a seperate extension for portability reasons. + +Randall + + + + + + + diff --git a/demo/ermis-f/python_m/cur/0738 b/demo/ermis-f/python_m/cur/0738 new file mode 100644 index 00000000..7e42109b --- /dev/null +++ b/demo/ermis-f/python_m/cur/0738 @@ -0,0 +1,24 @@ +From: stephan at pcrm.win.tue.nl (Stephan Houben) +Date: 22 Apr 1999 12:54:01 +0200 +Subject: Controlling Linux serial port w/ Python ... +References: <924762349.809295488@news.intergate.bc.ca> +Message-ID: +X-UID: 738 + +Gerald Gutierrez writes: + +> I understand that POSIX termios, for which Python has a binding, may be able to +> do this. Can someone point me to an example somewhere? Alternatively, can +> someone direct me to where this type of information is available? + +What about the Serial-Programming-HOWTO ? + +It describes how to do it in C, but my guess is it's pretty similar in Python. + +Greetings, + +Stephan + + + + diff --git a/demo/ermis-f/python_m/cur/0739 b/demo/ermis-f/python_m/cur/0739 new file mode 100644 index 00000000..3fb91b2b --- /dev/null +++ b/demo/ermis-f/python_m/cur/0739 @@ -0,0 +1,42 @@ +From: fdrake at cnri.reston.va.us (Fred L. Drake) +Date: Mon, 5 Apr 1999 19:04:56 GMT +Subject: Fwd: gzip/zlib module Doc bug (1.5.2b2 Library Reference) +In-Reply-To: <199904051825.NAA29396@alpha1.csd.uwm.edu> +References: <199904051825.NAA29396@alpha1.csd.uwm.edu> +Message-ID: <14089.2392.607974.602129@weyr.cnri.reston.va.us> +Content-Length: 1057 +X-UID: 739 + +Bernhard Reiter writes: + > This leaves the impression that the gzip module can decompress + > all the files the gzip program can decompress, which is not true. + > The gzip program can also deflate data compressed with "compress" + > and "pack". The python module cannot do this. + + I've made changes to make this more clear. + + > This is not true for Windows, where you need and have to use an + > additional "b" in the mode argument. At least I needed to do it, + + Good point; the modules were written and tested on Unix systems, so +this wasn't caught here. I've fixed the documentation and made the +module always use the binary the default flavor for 'mode'. + + > Both bugs sucked in some of my time. + > I hope this helps to improve! ;-> + + I'm sorry this cost you some time, but I'm glad to have the bug +report! Thanks for pointing this out! + These changes will be included in the next documentation release; +your prize is one free download. ;-) + + + -Fred + +-- +Fred L. Drake, Jr. +Corporation for National Research Initiatives + + + + diff --git a/demo/ermis-f/python_m/cur/0740 b/demo/ermis-f/python_m/cur/0740 new file mode 100644 index 00000000..39c11707 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0740 @@ -0,0 +1,35 @@ +From: MHammond at skippinet.com.au (Mark Hammond) +Date: Fri, 23 Apr 1999 09:19:44 +1000 +Subject: pythonwin/mapi crystal ball needed +References: <7fnbks$ga1$1@nnrp1.dejanews.com> +Message-ID: <7foapn$iij$1@m2.c2.telstra-mm.net.au> +X-UID: 740 + +Gustin Kiffney wrote in message <7fnbks$ga1$1 at nnrp1.dejanews.com>... + +>Anyway I've long put off learning much about MFC/COM/MAPI because +>it looked too hard, but now have to find a way to implement a MAPI +>service provider (an address book). I've looked at the MAPI stuff +>in the python win32all distribution and it looks pretty complete (anyway, +>it looks like lots of stuff that I don't understand yet is there). + +Unfortunately, Python can not do this. The MAPI support allows us to _use_ +MAPI objects, whereas implementing an Address Book provider requires you to +implement them. + +The only way to go this route is to enhance the MAPI support to be able to +do this. This would not be trivial - I would allow myself 1 week to do +this. However, as writing an Address Book provider is very hard, and lots +of code, I personally would probably still go this route - I think the week +invested would buy me time... + +Sorry I can't be more help, or give better news... + +Mark. + + + + + + + diff --git a/demo/ermis-f/python_m/cur/0741 b/demo/ermis-f/python_m/cur/0741 new file mode 100644 index 00000000..bb17ddf3 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0741 @@ -0,0 +1,87 @@ +From: gmcm at hypernet.com (Gordon McMillan) +Date: Tue, 13 Apr 1999 22:10:51 GMT +Subject: Tools for three way merge of Python source files? +In-Reply-To: +References: +Message-ID: <1288080836-20523748@hypernet.com> +Content-Length: 2333 +X-UID: 741 + +Milton L. Hankins writes: + +> Are there tools to help with 3-way merges of Python sources and/or +> indentation conversion? + +I can help with the indentation conversion. + +http://www.mcmillan-inc.com/dnld/tabcleaner.py + +This converts leading whitespace to whatever tab / spaces +configuration you want. It uses tokenize.py to determine indents and +dedents, so it's Guido doing the parsing, not me. + +(Anyone who's had trouble with this before - it's been completely +rewritten, and no longer gets fooled by certain triple-quoted +strings). + +Another way (for your purposes) might be to always filter everything +through pindent.py. + +> I'm using Python on a Real Project and I need to do a 3-way merge. +> Certain whitespace characters must be ignored -- specifically, +> carriage returns. I have a diff tool which ignores blanks but then +> I run into problems where a block of code has been indented further +> (inside a new block). +> +> I wish I could rely on the parser to catch this sort of thing, but +> it won't detect all possible follies, such as this one: +> +> +> if foo: +> if bar: +> baz() +> else: +> frob() +> +> +> if foo: +> if bar: +> baz() +> else: +> frob() +> +> Here, the merge result (using blank ignorance) would not incorporate +> the changes from . +> +> One correct solution seems to be to strip CR from CRLF. But I'm +> afraid of having too many conflicting sections (false negatives) +> where the spacing difference is actually benign. Perhaps I should +> just tell my fellow developers not to change indentation unless they +> have to. +> +> So, it also appears that I need a Python-aware indentation converter +> -- something that converts a source file to use a minimal number of +> tabs (or perhaps spaces, as long as it were consistent) for block +> indents. +> +> If anyone has had similar experiences or knows of a solution I'd +> love to hear about it. Email is preferred. Thanks. +> +> +> (I really hope this doesn't start Yet Another Whitespace War.) +> +> -- +> Milton L. Hankins -=- +> +> Software Engineer, Raytheon Systems Company -=- RayComNet +> 7-225-4728 +> http://amasts.msd.ray.com/~mlh -=- ><> Isaiah 64:6 +> ><> +> +> + +- Gordon + + + + diff --git a/demo/ermis-f/python_m/cur/0742 b/demo/ermis-f/python_m/cur/0742 new file mode 100644 index 00000000..3e3c631a --- /dev/null +++ b/demo/ermis-f/python_m/cur/0742 @@ -0,0 +1,23 @@ +From: zorro at zipzap.ch (Boris Borcic) +Date: Wed, 14 Apr 1999 10:25:30 +0200 +Subject: Python as an ODBC *source* on windoze ? +References: <816010E2456BD111A48700805FBBE2EEA63EDE@ex-quebec-u1.baan.com> +Message-ID: <371450FA.EA31CB69@zipzap.ch> +X-UID: 742 + +Gaetan Corneau wrote: + +> [GC] +> The easy way is just to dump your data to a text file (comma or tab +> delimited) and read it with MS Access: there is a Text ODBC driver that +> works well. +> +> Hope this helps, + +The voice of reason ;-) + +BB + + + + diff --git a/demo/ermis-f/python_m/cur/0743 b/demo/ermis-f/python_m/cur/0743 new file mode 100644 index 00000000..0206cdbb --- /dev/null +++ b/demo/ermis-f/python_m/cur/0743 @@ -0,0 +1,35 @@ +From: phil at geog.ubc.ca (Phil Austin) +Date: 29 Apr 1999 17:09:42 -0700 +Subject: Designing Large Systems with Python +References: <3725CA37.2027327D@lemburg.com> <37274e10.12544588@nntp1.ba.best.com> +Message-ID: +X-UID: 743 + +bkhunter at best.com (Bill) writes: + +> On Tue, 27 Apr 1999 16:31:19 +0200, "M.-A. Lemburg" +> wrote: +> >Projects around 50k are still well manageable using an editor +> >like Xemacs; larger projects probably need the help of systems +> >like SNIFF (which offers Python support). +> +> Are you talking about SNIFF+ from TakeFive Software? I browsed their +> site and could only find mention of C++ and Java support. Any +> pointers? + + +It's at: + + +http://starship.python.net/crew/scharf/sn4py/ + + +-- +------------------------------------------------------------ +Phil Austin (phil at geog.ubc.ca) +Department of Geography, Tel: (604) 822-2663 +University of British Columbia, B.C. Fax: (604) 822-6150 + + + + diff --git a/demo/ermis-f/python_m/cur/0744 b/demo/ermis-f/python_m/cur/0744 new file mode 100644 index 00000000..7f060596 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0744 @@ -0,0 +1,79 @@ +From: calishar at *remove*this*.home.com (Calishar) +Date: Thu, 15 Apr 1999 00:22:48 GMT +Subject: Freezing an App +References: <7f15dj$bq4$1@m2.c2.telstra-mm.net.au> +Message-ID: +Content-Length: 2466 +X-UID: 744 + +> > The part I am having problems with is using win32api. It runs, doesnt +set +> >the registry values it is suppoed to, and exits without giving any +errors. +> +> Im not sure what you mean here. + +okay, basically I am using Python to automate a process at a client site. in +this application, I have about 4 different functions which each get called +by button clicks. One of the routines is supposed to set a registry key +based on an environment variable. The lines follow: + + +the_key=win32api.RegCreateKey(win32con.HKEY_LOCAL_MACHINE,"Software\Stac\Rea +chout\8.0") + win32api.RegSetValueEx(the_key,"Computer Name",0,win32con.REG_SZ,mac_name) + +At the moment, this is the only part of the application I dont have working +on my non-development system, unfortunately it happens to be kind of +important. + +> Firstly, you could consider simply shipping win32api.pyd - ie, dont freeze + + This was my first thought, I made sure that I had the .pyd file in the +same directory as the program I am running. It doesnt do it. + +> You do this simply by excluding win32api from the freeze using "-x +win32api" + + Tried doing this, then copying the files needed over to my '95 test system +(not the same OS,but should be close enough for this part) and when I ran +it, it crashed at line 3 of the code (import win32api) + +> If you want to freeze the win32api sources into your app, the process then +> is: +> * Download the sources to the win32api module. +> * Check out the .ini file that comes with freeze. It is used to locate +the +> source to win32apimodule.cpp. +> +> Run freeze - it may complain it cant find the file. If so, ensure the +> environment variable it uses is set. I can't recall exactly what that is. + + Okay, then I did this section, and when I ran freeze at the end it said: + +generating table of frozen modules +No definition of module _tkinter in any specified map file. +No definition of module win32api in any specified map file. +Warning: unknown modules remain: _tkinter win32api + + Which looks the same as what I had the first time. I did notice that for +win32api it was using the win32api.pyd file rather than the source code +specified in the .ini file. + +> This could do with more work - Im happy to discuss ways you can help to +make +> this better for the next person :-) + +Thanks for the help, I'm really starting to feel like a dummy here. + +Here is the command line I am using for freeze + +python freeze.py -p e:\src\python1.5.2c1 -o e:\bins e:\ghostit.py + +Calishar + + + + + + diff --git a/demo/ermis-f/python_m/cur/0745 b/demo/ermis-f/python_m/cur/0745 new file mode 100644 index 00000000..2eb034ac --- /dev/null +++ b/demo/ermis-f/python_m/cur/0745 @@ -0,0 +1,60 @@ +From: ferradajj at ornl.gov (Juan Ferrada) +Date: Fri, 30 Apr 1999 13:41:59 -0400 +Subject: graphics using Python 1.2 in DOS +Message-ID: <3.0.32.19990430134156.006fe674@tin2.cad.ornl.gov> +Content-Length: 2697 +X-UID: 745 + +At Oak Ridge National Laboratory, we developed a chemical process +simulation program using C++ that works in a DOS environment. It is a +graphic interface and process diagrams are created by putting different +icons that are dragged and dropped in the screen. It has worked very +nicely for us for the last four years. Four years ago, we were after a +scripting language that could simplify the model writing. Each icon (that +represents a specif engineering process) can be model using an executable +in any language. For example, we use executables written in Fortran, +Pascal, Prolog, C, C++ etc and our program launches those executable when +they are needed. By using an scripting language the modeling would be +simplified. In fact, 4 years ago we downloaded the current version of +Python and we integrate it with our code and produce the executable of our +application. We called it FLOW. It has been very successful. Many +students that do their internship with us have learned the basic principles +of Python and some of the classes and objects that we created for our own +purpose. After just two weeks of tutorials they are capable of producing +their models and run them with the rest of the application. + +The only problem we have is that when we go from the FLOW graphic interface +and want to interact with the user and ask them some question, for example +what is the input pressure of your bomb? or what is the diameter of your +tank? we go to the traditional black screen of the DOS environment. We +would like to improve this by putting, for example, the figure of a pump +and show the user the question directly on the graphic. + +We believe that we could use a graphic library like the one you developed +and being able to develop the graphics we want. Is it possible to use your +library in the DOS environment? So when we invoke the library, as we do +with other libraries that we have developed earlier(from ourlyb import * at +the beginning of the program), we can get the desired effects. + +We downloaded the Python version 1.2, April 1995 and we compiled with our +C++ code. We are looking for a library that works with that version so we +can invoke the library by simply writing: + from graphiclibrary import *, +so we don't have to recompiled everything again. + +Do you think this is possible and if it is how can we get to that library +and where we need to put it to make it work. We currently put everything +writting in Python in a directory like this: + C:\flow\python +and every fiel *.py goes there including the libraries. + +I would really appreciate your help. I have a couple of students working +with me that really need this feature. + +thank you very much + +Juan J. Ferrada + + + + diff --git a/demo/ermis-f/python_m/cur/0746 b/demo/ermis-f/python_m/cur/0746 new file mode 100644 index 00000000..092f95e3 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0746 @@ -0,0 +1,25 @@ +From: srowland at biocryst.com (srowland at biocryst.com) +Date: Fri, 16 Apr 1999 14:17:30 GMT +Subject: 1.5.2 broke IRIX module loading +References: <19990414110116.A1374923@vislab.epa.gov> <37161C26.C121CA1E@bioreason.com> +Message-ID: <7f7gpf$r4a$1@nnrp1.dejanews.com> +X-UID: 746 + +In article <37161C26.C121CA1E at bioreason.com>, + Andrew Dalke wrote: +> Randall Hopper said: +> > I built and tried 1.5.2 this morning, and it failed to load a module +> > that worked fine on 1.5.1. +> + +Does this failure occur for all modules including standard +Python Library modules or is it limited to some specialized module? + +Scott Rowland + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/0747 b/demo/ermis-f/python_m/cur/0747 new file mode 100644 index 00000000..2cf86b8b --- /dev/null +++ b/demo/ermis-f/python_m/cur/0747 @@ -0,0 +1,132 @@ +From: hyoon at bigfoot.com (Hoon Yoon) +Date: Thu, 15 Apr 1999 09:19:35 -0400 +Subject: TCL_LIBRARARY and making it work +References: <3714B880.22F87048@bigfoot.com> <3714BB3A.54BF2531@bigfoot.com> +Message-ID: <3715E767.4DE62C8@bigfoot.com> +Content-Length: 4474 +X-UID: 747 + +Thanks Duncan, + + As soon as I added c:\python\TCL\bin path and then killed off +tcl80.dll, tclpip80.dll, and tk80.dll from \WINNT\system32, everything +was fine! + +Hoon Yoon wrote: +> +> Hi, +> +> I think I found the problem by setting TKPATH, but now I got a +> different prob. All this used to work fine prior to install. I don't +> know what's going on. +> +> Traceback (innermost last): +> File "", line 1, in ? +> File "c:\TEMP\python-BEAf6p", line 2, in ? +> Tkinter._test() +> File "C:\Python\Lib\lib-tk\Tkinter.py", line 1947, in _test +> root = Tk() +> File "C:\Python\Lib\lib-tk\Tkinter.py", line 886, in __init__ +> self.tk = _tkinter.create(screenName, baseName, className) +> TclError: Can't find a usable tk.tcl in the following directories: +> {C:\Python\TCL\lib\tk8.0} . C:/Python/TCL/lib/tk8.0 ./tk8.0 +> ./lib/tk8.0 ./library ./tk8.0/library ./library +> C:/Python/TCL/tk8.0/library +> +> C:/Python/TCL/lib/tk8.0/tk.tcl: bad event type or keysym "MouseWheel" +> bad event type or keysym "MouseWheel" +> while executing +> "bind Listbox { +> %W yview scroll [expr - (%D / 120) * 4] units +> }" +> (file "C:/Python/TCL/lib/tk8.0/listbox.tcl" line 179) +> invoked from within +> "source [file join $tk_library listbox.tcl]" +> (file "C:/Python/TCL/lib/tk8.0/tk.tcl" line 151) +> invoked from within +> "source C:/Python/TCL/lib/tk8.0/tk.tcl" +> ("uplevel" body line 1) +> invoked from within +> "uplevel #0 [list source $tkfile]" +> C:/Python/TCL/lib/tk8.0/tk.tcl: bad event type or keysym "MouseWheel" +> bad event type or keysym "MouseWheel" +> while executing +> "bind Listbox { +> %W yview scroll [expr - (%D / 120) * 4] units +> }" +> (file "C:/Python/TCL/lib/tk8.0/listbox.tcl" line 179) +> invoked from within +> "source [file join $tk_library listbox.tcl]" +> (file "C:/Python/TCL/lib/tk8.0/tk.tcl" line 151) +> invoked from within +> "source C:/Python/TCL/lib/tk8.0/tk.tcl" +> ("uplevel" body line 1) +> invoked from within +> "uplevel #0 [list source $tkfile]" +> +> This probably means that Tk wasn't installed properly. +> +> > -- +> > ***************************************************************************** +> > S. Hoon Yoon (Quant) Merrill Lynch Equity Trading, +> > yelled at yahoo.com hoon at bigfoot.com(w) +> > "Miracle is always only few standard deviations away, but so is +> > catastrophe." +> > * Expressed opinions are often my own, but NOT my employer's. +> > "I feel like a fugitive from the law of averages." Mauldin +> > ***************************************************************************** +> > +> > ------------------------------------------------------------------------ +> > +> > Hoon Yoon +> > +> > Hoon Yoon +> > +> > Netscape Conference Address +> > Netscape Conference DLS Server +> > Additional Information: +> > Last Name +> > First Name Hoon Yoon +> > Version 2.1 +> +> -- +> ***************************************************************************** +> S. Hoon Yoon (Quant) Merrill Lynch Equity Trading, +> yelled at yahoo.com hoon at bigfoot.com(w) +> "Miracle is always only few standard deviations away, but so is +> catastrophe." +> * Expressed opinions are often my own, but NOT my employer's. +> "I feel like a fugitive from the law of averages." Mauldin +> ***************************************************************************** +> +> ------------------------------------------------------------------------ +> +> Hoon Yoon +> +> Hoon Yoon +> +> Netscape Conference Address +> Netscape Conference DLS Server +> Additional Information: +> Last Name +> First Name Hoon Yoon +> Version 2.1 + +-- +***************************************************************************** +S. Hoon Yoon (Quant) Merrill Lynch Equity Trading, +yelled at yahoo.com hoon at bigfoot.com(w) +"Miracle is always only few standard deviations away, but so is +catastrophe." +* Expressed opinions are often my own, but NOT my employer's. +"I feel like a fugitive from the law of averages." Mauldin +***************************************************************************** +-------------- next part -------------- +A non-text attachment was scrubbed... +Name: vcard.vcf +Type: text/x-vcard +Size: 202 bytes +Desc: Card for Hoon Yoon +URL: + + diff --git a/demo/ermis-f/python_m/cur/0748 b/demo/ermis-f/python_m/cur/0748 new file mode 100644 index 00000000..47606328 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0748 @@ -0,0 +1,34 @@ +From: Gaetan_Corneau at baan.com (Gaetan Corneau) +Date: Fri, 9 Apr 1999 14:18:19 GMT +Subject: import from user input? +Message-ID: <816010E2456BD111A48700805FBBE2EEA63EB9@ex-quebec-u1.baan.com> +X-UID: 748 + +Chris, + +> >>> globals()[modname] = __import__(modname) +[GC] +Exactly what I was looking for. I read about the __import__ function in the +doc, but I didn't know that I had to assign it that way. + +> > Another question: is there a function to copy/move entire directory +> trees? +> There is a walk function in os.path which makes it +> an easy exercise to write such a function. +[GC] +Thanks a lot, Chris. +______________________________________________________ + Gaetan Corneau + Software Developer (System integration Team) + BaaN Supply Chain Solutions + E-mail: Gaetan_Corneau at baan.com + Compuserve: Gaetan_Corneau at compuserve.com + ICQ Number: 7395494 + Tel: (418) 654-1454 ext. 252 +______________________________________________________ +"Profanity is the one language all programmers know best" + + + + + diff --git a/demo/ermis-f/python_m/cur/0749 b/demo/ermis-f/python_m/cur/0749 new file mode 100644 index 00000000..b47a30e2 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0749 @@ -0,0 +1,42 @@ +From: jschiotz at hotmail.com (Jakob Schiotz) +Date: Wed, 28 Apr 1999 12:27:41 GMT +Subject: SOLUTION: Cross-references between dynamically loaded modules under AIX +References: <7g42o5$d8u$1@nnrp1.dejanews.com> <19990427081109.C579158@vislab.epa.gov> +Message-ID: <7g6urp$v5u$1@nnrp1.dejanews.com> +Content-Length: 1184 +X-UID: 749 + + +In a recent post, I wrote: +> I wrote a small function to convert a C pointer to a NumPy array (I am +> using SWIG), ... it coredumps under AIX ... the dynamical loader under +> AIX cannot resolve symbols in one module that refers to another module. + +It turns out is was NOT a dynamic loading problem after all. One of my +colleagues found a new NumPy manual (March 99) that contains a chapter on how +to extend NumPy. And it turns out that one should call the function +import_array() in the modules initialization function. Then it works! + +Now the only mystery is why it worked on the Alpha architecture without that +call... :-) + +BTW, it looks like a very nice NumPy manual: + ftp://ftp-icf.llnl.gov/pub/python/numericalpython.pdf + + +Thanks for all your suggestions! + +Jakob + +-- +Jakob Schiotz, CAMP and Department of Physics, Tech. Univ. of Denmark, +DK-2800 Lyngby, Denmark. http://www.fysik.dtu.dk/~schiotz/ +This email address is used for newsgroups and mailing lists +(spam protection). Official email: schiotz @ fysik . dtu . dk + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/0750 b/demo/ermis-f/python_m/cur/0750 new file mode 100644 index 00000000..c66458b8 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0750 @@ -0,0 +1,23 @@ +From: jon at rdt.monash.edu.au (Jonathan Giddy) +Date: 16 Apr 1999 06:26:41 GMT +Subject: Change for compiling 1.5.2 on Windows NT Alpha +References: +Message-ID: <7f6l71$20e$1@towncrier.cc.monash.edu.au> +X-UID: 750 + +"Scott C" writes: + +>There needs to be the following change in file fpectlmodule.c, line 163: + +>Line currently reads: #elif defined(__alpha) + +>line should read: #elif defined(__alpha) && !defined(_MSC_VER) + +Or to follow the comments more obviously, change it to +#elif defined(__alpha) && defined(__osf__) + +Jon. + + + + diff --git a/demo/ermis-f/python_m/cur/0751 b/demo/ermis-f/python_m/cur/0751 new file mode 100644 index 00000000..ddf06c7d --- /dev/null +++ b/demo/ermis-f/python_m/cur/0751 @@ -0,0 +1,36 @@ +From: tim_one at email.msn.com (Tim Peters) +Date: Sat, 24 Apr 1999 05:17:10 GMT +Subject: Time complexity of dictionary insertions +In-Reply-To: +References: +Message-ID: <000901be8e11$b4842560$f09e2299@tim> +X-UID: 751 + +[someone asks about the time complexity of Python dict insertions] + +[Tim replies] +> Min O(1), Max O(N), Ave O(1). If the hash function is doing +> a terrible job (e.g. maps every key to the same hash value), make +> those all O(N). + +[one person confuses the issue] +> C++ STL junkies know this as "amortized constant time". + +[and another compounds it] +> So does anyone who has ever studied much at all about algorithms, data +> structures, and optimization. +> +> It's not a C++ thing. It's a computer science thing. + +This one-ups-man-ship would be a lot cuter if Python's dict insertion were +in fact amortized constant time <0.9 wink>. It's not, and the answer I gave +doesn't imply that it is. Insertion in STL hashed associative containers +isn't ACT either. + +reassuringly y'rs - tim + + + + + + diff --git a/demo/ermis-f/python_m/cur/0752 b/demo/ermis-f/python_m/cur/0752 new file mode 100644 index 00000000..9007d077 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0752 @@ -0,0 +1,19 @@ +From: free at good.pt (FREE and GOOD SEX) +Date: 7 Apr 1999 06:36:56 GMT +Subject: PTSex - The best SEX for FREE... +Message-ID: <7eeue8$7m4$12102@duke.telepac.pt> +X-UID: 752 + +Looking for sex for FREE?? + +Go to: http://www.sapo.pt/cgi/getid?id=http://members.theglobe.com/esqueleto/index.htm&server= +Here you will find the best pictures collection in a portuguese SITE + +Will find there too, FOR FREE, the best Live Sex Shows + +What are you wating for?????? +http://www.sapo.pt/cgi/getid?id=http://members.theglobe.com/esqueleto/index.htm&server= + + + + diff --git a/demo/ermis-f/python_m/cur/0753 b/demo/ermis-f/python_m/cur/0753 new file mode 100644 index 00000000..f271f402 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0753 @@ -0,0 +1,53 @@ +From: Martin.Preishuber at stuco.uni-klu.ac.at (Martin Preishuber) +Date: Mon, 26 Apr 1999 06:50:55 +0000 +Subject: Strange fork() behaviour +References: <37203066.6B4A58D9@stuco.uni-klu.ac.at> +Message-ID: <37240CCF.EF01D299@stuco.uni-klu.ac.at> +Content-Length: 1402 +X-UID: 753 + +Harald Hanche-Olsen wrote: + +> | There are some strange things with fork() and python 1.5.2 going +> | on here. +> | +> | I do have some main program which is basically +> | +> | while 1: +> | fork() +> | +> | The program forks under certain conditions and works as expected +> | but somewhen the main process dies even though it is in the +> | while 1: loop ... there's no error message ... did anyone +> | see anything similar ? the program worked fine with 1.5.1 +> | (this is all on a linux box running rh 5.2 and kernel 2.2.6-ac1) + +> This is a joke, right? What I would expect the above program to do is +> to fork processes until the process table is full or you hit the +> per-user process limit, at which point fork() will begin to fail, +> which will then most likely terminate the calling process (unless you +> trap the error). + +No sorry, this is definitely not the _full_ code ... it just forks +under some condition (usually, there are never more than 3 or 4 +children) ... the point is that the father should never die, but it +does ! + +> I'd be curious to know how this could have worked earlier, or how you +> could expect it to behave differently. + +It does, believe me ;-) + +Martin + +-- +Martin Preishuber - Student, ECLiPt Core Member, SysAdmin +http://eclipt.uni-klu.ac.at, +mailto:Martin.Preishuber at stuco.uni-klu.ac.at + +I respect faith, but doubt is what gives you an education. +-- Wilson Mizner + + + + diff --git a/demo/ermis-f/python_m/cur/0754 b/demo/ermis-f/python_m/cur/0754 new file mode 100644 index 00000000..b2182f56 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0754 @@ -0,0 +1,26 @@ +From: zak at wiggins-t.co.uk (Zacharias Pigadas) +Date: Fri, 16 Apr 1999 15:09:37 +0100 +Subject: PythonScript in web page +Message-ID: <924271602.14980.0.nnrp-02.c224787d@news.demon.co.uk> +X-UID: 754 + +hello + I am trying to make an ASP using python, + I have a question, + How do I access the contents of a form in the document? I tried it +javascript way and i got the message: + password=document.formTest.passTest.value RuntimeError: Instance-method +attributes not accesible in restricted method. + What does that mean and is this the correct way to use it?? Any +suggestions on how to overcome it? + +Thanks, +Zach + + + + + + + + diff --git a/demo/ermis-f/python_m/cur/0755 b/demo/ermis-f/python_m/cur/0755 new file mode 100644 index 00000000..2453591e --- /dev/null +++ b/demo/ermis-f/python_m/cur/0755 @@ -0,0 +1,44 @@ +From: moshez at math.huji.ac.il (Moshe Zadka) +Date: Mon, 26 Apr 1999 01:36:05 +0300 +Subject: Python too slow for real world +In-Reply-To: +References: <372068E6.16A4A90@icrf.icnet.uk> <3720A21B.9C62DDB9@icrf.icnet.uk> <3720C4DB.7FCF2AE@appliedbiometrics.com> <3720C6EE.33CA6494@appliedbiometrics.com> +Message-ID: +Content-Length: 1103 +X-UID: 755 + +On 25 Apr 1999, Magnus L. Hetland wrote: + +> > Um, why? I don't see any need at all for them to move from +> > module-status to core-language-status. +> [...] +> > +> > In all seriousness, what reason do you have for making that +> > suggestion? I am willing to believe that there might be a good reason +> > to do so, but it certainly isn't immediately obvious. +> +> Now, that's really simple -- because re.py is slow. I thought maybe +> some of the slowness might be improved by a c-implementation, that's +> all. Not too important to me... + +Um....two wrong assumptions here: +1. C implementation is /not/ the same as core status: C extension modules +are numerous and wonderful, for example... +2. re.py is a (very thin) wrapper around pcre, a C extension module for +Perl Compatible Regular Expressions. + +Which just goes to say that while pcre can certainly be optimized, it +can't be done by simply rewriting it in C. +<0.5 wink> + +but-we-can-always-call-Perl-on-the-fly-to-evaluate-regular-expression-ly +y'rs, +Z. +-- +Moshe Zadka . +QOTD: What fun to me! I'm not signing permanent. + + + + + diff --git a/demo/ermis-f/python_m/cur/0756 b/demo/ermis-f/python_m/cur/0756 new file mode 100644 index 00000000..db797d0e --- /dev/null +++ b/demo/ermis-f/python_m/cur/0756 @@ -0,0 +1,42 @@ +From: mwh21 at cam.ac.uk (Michael Hudson) +Date: 16 Apr 1999 15:43:53 +0100 +Subject: Imperfections in ihooks.py? +References: <00d301be880d$0ebcd000$f29b12c2@pythonware.com> +Message-ID: +X-UID: 756 + +"Fredrik Lundh" writes: +> > I apologise for the lousy use of language in this post. It's a subject +> > I find a bit confusing to think about, and I'm clearly not much better +> > a writing about it. +> > +> > Does anybody out there use ihooks? I'm having a couple of problems. +> +> Forget about ihooks.py. Greg Stein's imputil.py module +> is much easier to use, and much more powerful. +> +> It's in the "small distribution" kit, available from: +> +> http://www.lyra.org/greg/small/ +> +> + +Ah! Fantastic! + +Usual case; I start to think about a problem, ask about it and find +someone else has solved the problem already. + +Not perfection yet though - imputil.py contains these lines: + + def _reload_hook(self, module): + raise SystemError, "reload not yet implemented" + +which was one of the things I was moaning about in my post. + +Thanks! + +Michael + + + + diff --git a/demo/ermis-f/python_m/cur/0757 b/demo/ermis-f/python_m/cur/0757 new file mode 100644 index 00000000..002a9a23 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0757 @@ -0,0 +1,31 @@ +From: marcel.lanz at isoe.ch (Marcel Lanz) +Date: Sat, 17 Apr 1999 19:11:41 +0200 +Subject: Sleeping threads +References: <3718042D.EE5D36A8@hons.cs.usyd.edu.au> +Message-ID: <3718C0CD.814F3506@isoe.ch> +X-UID: 757 + +Matthew Robert Gallagher wrote: +> +> I've been looking at threads and time but how do you sleep threads + +hi, +if you use low-level threads: +simply sleep with the time.sleep() method in the thread-method you +choosed. + +import time, thread +... +... +def x(): + print 'too high' + time.sleep(0.5) + +thread.start_new_thread(x, ()) + +greetings + marcel + + + + diff --git a/demo/ermis-f/python_m/cur/0758 b/demo/ermis-f/python_m/cur/0758 new file mode 100644 index 00000000..eaed30cf --- /dev/null +++ b/demo/ermis-f/python_m/cur/0758 @@ -0,0 +1,76 @@ +From: tismer at appliedbiometrics.com (Christian Tismer) +Date: Thu, 22 Apr 1999 16:58:05 GMT +Subject: Directory of current file +References: + <371F0BD2.7D40A957@rubic.com> + <00ee01be8cba$6e98dcb0$f29b12c2@pythonware.com> <5lvheosuyt.fsf@eric.cnri.reston.va.us> +Message-ID: <371F551D.5F40782F@appliedbiometrics.com> +Content-Length: 1898 +X-UID: 758 + + +Guido van Rossum wrote: +> +> "Fredrik Lundh" writes: +> +> > how about a combination? +> > +> > import sys, os +> > if __name__ == '__main__': +> > _thisDir = sys.argv[0] +> > else: +> > _thisDir = sys.modules[__name__].__file__ +> +> Eh, what's wrong with simply using __file__? It's a global in your +> own module, remember! + +[I think we had that some months ago, already] + +> if __name__ == '__main__': +> _thisDir = sys.path[0] or os.curdir +> else: +> _thisDir = os.path.dirname(__file__) + +Since these come up again and again, I still see no reason why +we don't support __file__ for __main__? + +Wouldn't it be much clearer to +1) provide an absolute path for __file__ always +2) provide __file__ for __main__ as + abs_path(sys.path[0] or os.curdir) + name_of_sciptfile? +If there is no scriptfile, well we'd take the empty string. + +The other proposals are not as foolproof, since they depend +on weak stuff as os.curdir which has dynamic meaning, while +paths of files are a static thing, a "compile time" property +with early binding. + +I'd like to be able to always use: + +_thisDir = os.path.dirname(__file__) +_script = os.path.basename(__file__) + +if _script: + # well, we have a script file + +always? Even better + +_thisdir, _script = os.path.split(__file__) + +What is the background to keep this thing complicated for the user +(where complicated means to use more than one function call), +instead of the above? + +ciao - chris + +-- +Christian Tismer :^) +Applied Biometrics GmbH : Have a break! Take a ride on Python's +Kaiserin-Augusta-Allee 101 : *Starship* http://starship.python.net +10553 Berlin : PGP key -> http://wwwkeys.pgp.net +PGP Fingerprint E182 71C7 1A9D 66E9 9D15 D3CC D4D7 93E2 1FAE F6DF + we're tired of banana software - shipped green, ripens at home + + + + diff --git a/demo/ermis-f/python_m/cur/0759 b/demo/ermis-f/python_m/cur/0759 new file mode 100644 index 00000000..1b978cfc --- /dev/null +++ b/demo/ermis-f/python_m/cur/0759 @@ -0,0 +1,19 @@ +From: smoothasice at geocities.com (smoothasice at geocities.com) +Date: Wed, 21 Apr 1999 20:53:08 GMT +Subject: Python Win +Message-ID: <371E3B80.A6D5379@geocities.com> +X-UID: 759 + +Ok i've been playing Python for a long time and I am just now wanting +to expand to learning the visual portion of it.(A.k.a Gui/MFC) but I +have found that there is a diffinite lack of information on the site and +I Haven't been able to find a book and I was wondering if there is +anyone out there that could help me out or perhaps direct me towards +where I could find info on it. + +Thanks , +Anton + + + + diff --git a/demo/ermis-f/python_m/cur/0760 b/demo/ermis-f/python_m/cur/0760 new file mode 100644 index 00000000..8632c9c7 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0760 @@ -0,0 +1,25 @@ +From: pfjakub at earthlink.net (Peter Jakubowicz) +Date: Sun, 25 Apr 1999 23:35:48 GMT +Subject: Beginner Needs Help Compiling/Running Module +Message-ID: <3723a436.9965940@news.earthlink.net> +X-UID: 760 + +Hi, +This is a very rudimentary questions; I just started trying to learn +Python last night w/ Learning Python. What I need to know is how to +compile and run a simple module. I am running WinPython 1.5.2 under +Win 98. I have placed C:\program files\python\lib in my path. I am +saving my modules in a directory called pythonsource. When I am in +that directory I try to invoke python by typing python MyModule.py and +an command line arguments, as in Java, but apparently I cannot do +this. Alternatively, when I have the python window console open I +cannot get at my module at all, tho I can invoke the python +interpreter. If someone could either point me tostep-by-step +instructions for compiling and running the equivalent of a Hello World +module using WinPython, or tell me all the steps, I would greatly +appreciate it. TIA + + + + + diff --git a/demo/ermis-f/python_m/cur/0761 b/demo/ermis-f/python_m/cur/0761 new file mode 100644 index 00000000..0773f66c --- /dev/null +++ b/demo/ermis-f/python_m/cur/0761 @@ -0,0 +1,40 @@ +From: dkuhlman at netcom.com (G. David Kuhlman) +Date: Wed, 28 Apr 1999 15:24:46 GMT +Subject: Using Python for Modular Artificial Intelligence code +References: +Message-ID: +X-UID: 761 + +Tim Auld wrote: +> Hi all, + +... + +> My question is, how can I load the Python script, let my C++ object call +> functions within the Python script, and provide a callback for the Python +> script to call methods in the C++ object? + +Get the Python documentation at http://www.python.org/doc, then +look at the sections on "Extending and Embedding" and "Python/C +API". There is lot's there on this topic. + +Also download the Python source distribution. In the demo +directory you will find an example on embedding. Play with and +expand on that to learn how to do it yourself. + +Then ask some more questions on this news group. + + - Dave + + - Dave + +> ________________________ +> astro at tne.net.au +> tim at ratbaggames.com + + + + + + + diff --git a/demo/ermis-f/python_m/cur/0762 b/demo/ermis-f/python_m/cur/0762 new file mode 100644 index 00000000..8686eb17 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0762 @@ -0,0 +1,23 @@ +From: Frank.Derville at wanadoo.fr (Frank.Derville) +Date: Wed, 28 Apr 1999 23:17:14 +0200 +Subject: GUI and creating GIF +Message-ID: <7g7u2k$fr0$1@wanadoo.fr> +X-UID: 762 + +Hello, + +I would like to +1) create a GIF file under Python by drawing lines, text, ... I have looked +at Tk which can create bitmaps and photoimage but their seem to be no +possibility to transform a canvas into a photoimage. +2) rotate some text on a canvas. + +Does anyone has a tip to do it under Tk, wxWindows or any other GUI? + +Thanks by advance + + + + + + diff --git a/demo/ermis-f/python_m/cur/0763 b/demo/ermis-f/python_m/cur/0763 new file mode 100644 index 00000000..5dfe1dc8 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0763 @@ -0,0 +1,46 @@ +From: geek+ at cmu.edu (geek+ at cmu.edu) +Date: 5 Apr 1999 11:42:04 -0400 +Subject: Subattributes of classes +Message-ID: +Content-Length: 1225 +X-UID: 763 + +Then spoke up and said: +> +> class A: +> def __init__( self ): +> self.attr = 123 +> self.attr.subattr = 456 # <--------- Error! +> +> a = A() +> +> +> This generates an error as I would have expected. +> +> However, I see the same syntax in: +> demos/tkinter/matt/canvas-with-scrollbars.py + +because in the demo you pointed to, they are setting sub-attributes of +an integer. The object 123 is immutable. Do it this way: + +class foo: pass +f = foo() +f.bar = foo() +f.bar.baz = 123 + +-- +===================================================================== +| JAVA must have been developed in the wilds of West Virginia. | +| After all, why else would it support only single inheritance?? | +===================================================================== +| Finger geek at cmu.edu for my public key. | +===================================================================== +-------------- next part -------------- +A non-text attachment was scrubbed... +Name: not available +Type: application/pgp-signature +Size: 266 bytes +Desc: not available +URL: + + diff --git a/demo/ermis-f/python_m/cur/0764 b/demo/ermis-f/python_m/cur/0764 new file mode 100644 index 00000000..17e0abea --- /dev/null +++ b/demo/ermis-f/python_m/cur/0764 @@ -0,0 +1,34 @@ +From: MHammond at skippinet.com.au (Mark Hammond) +Date: Thu, 22 Apr 1999 10:19:09 +1000 +Subject: Python Win +References: <371E3B80.A6D5379@geocities.com> +Message-ID: <7flpsj$6rg$1@m2.c2.telstra-mm.net.au> +X-UID: 764 + +For now, a good MFC book is really required to learn MFC and Pythonwin at +the same time. Pythonwin is great for building slick windows specific apps, +but the learning curve is steep if you dont know MFC. + +You way like to fiddle with Tkinter - you will probably find far more +tutorial type information available...After playing with it, you can decide +if it is suitable for your intended use. + +Mark. + +smoothasice at geocities.com wrote in message +<371E3B80.A6D5379 at geocities.com>... +>Ok i've been playing Python for a long time and I am just now wanting +>to expand to learning the visual portion of it.(A.k.a Gui/MFC) but I +>have found that there is a diffinite lack of information on the site and +>I Haven't been able to find a book and I was wondering if there is +>anyone out there that could help me out or perhaps direct me towards +>where I could find info on it. +> +>Thanks , +>Anton + + + + + + diff --git a/demo/ermis-f/python_m/cur/0765 b/demo/ermis-f/python_m/cur/0765 new file mode 100644 index 00000000..09be1d08 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0765 @@ -0,0 +1,47 @@ +From: da at ski.org (David Ascher) +Date: Fri, 23 Apr 1999 20:49:54 -0700 (PDT) +Subject: learning Python (rat book) +In-Reply-To: <37206351.DB8025EF@appliedbiometrics.com> +Message-ID: +Content-Length: 1559 +X-UID: 765 + +On Fri, 23 Apr 1999, Christian Tismer wrote: + +> Unfortunately, names seem to appear just by the chance that +> material was used. I was astonished to find quite a couple +> of names, but no Aaron Watters, no Barry Warsaw. + +Indices refer to text, so yes, names will show up based on whether they +show up in the text. As such, Aaron and Barry's names should have +appeared in the index, since they are mentioned in the text (Aaron for +gadfly and IPP, Barry for his PSA work -- he should be mentioned in the +context of JPython as well, but maybe that change happened too late for +the first printing. Anyway, all this to say that these omissions were not +deliberate, and will be fixed in future printings if they don't affect the +page count (I believe that's the rule). In fact, I wish to make public an +acknowledgement which was omitted unintentionally in the final rush of +production -- Jim Hugunin provided valuable assistance in the the JPython +program development. I'll try and get that fixed in the next printing as +well. We'll add Christian as well for the Starship reference, of course. + +> But when mentioning SWIG, it should had better put a reference +> to Dave Beazley into the index as well. + +Agreed. + +> I'm currently working on the German translation. it will be +> ready by end of July. I will try to adjust the index to mention +> every person who plays a role in the book. + +Great -- make sure to check in with Mark and I about the fixes we make +for the next printing, and let us know of the other bugs you find in the +process. + +--David Ascher + + + + + + diff --git a/demo/ermis-f/python_m/cur/0766 b/demo/ermis-f/python_m/cur/0766 new file mode 100644 index 00000000..ea6eb089 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0766 @@ -0,0 +1,75 @@ +From: akuchlin at cnri.reston.va.us (Andrew M. Kuchling) +Date: Fri, 23 Apr 1999 09:59:20 -0400 (EDT) +Subject: opening more than 1 file +In-Reply-To: <7fpteh$cik$1@news1.xs4all.nl> +References: <371CB255.5FCAFBAF@solair1.inter.NL.net> + <371CCAE0.7DE87F8A@aw.sgi.com> + <7fpteh$cik$1@news1.xs4all.nl> +Message-ID: <14112.31139.164770.168982@amarok.cnri.reston.va.us> +Content-Length: 2095 +X-UID: 766 + +Gornauth writes: +>>files = map(lambda i: open("file%02d"%i, 'w'), range(N)) +> +>I'm not completely sure how that one-liner works. To be honest, I have no +>clue whatsoever. + +It would be equally workable to just use a for loop: + +files = [] +for i in range(N): + files.append( open("file%02d"%i, 'w') ) + +Using map() is tricky, but lets you keep the line count down; +generally one shouldn't care too much about line count. :) +Take it step by step: + + * What does range(N) do? It returns a list containing the +numbers 0,1,2, ... that are less than N. range(5) returns [0, 1, 2, +3, 4]. + + * What does map() do? map(F, L), where F is some function and +L is some list (actually, any sequence type) returns a new list +containing the result of F applied to each element of L. + +map(F, range(N)) returns [ F(0), F(1), ... F(N-1) ]. +map(string.upper, ["This", "is", "a", "test"] ) returns +['THIS', 'IS', 'A', 'TEST'] + + * What does lambda do? It defines a function which doesn't +have a name (it's an anonymous function), and can only contain an +expression whose value is returned. It's possible to assign the +anonymous function to a name, and it will act like any other Python +function. + +>>>f = lambda x: x+1 +>>> f(0) +1 +>>> f(3) +4 + + However, to define a named function it's clearer to just use +def f(x): return x+1 . lambda is therefore usually used with map() +and its cousins filter() and reduce(), where you often need a function +which does something simple. In that case, the function is only +needed for that one map(), so people are reluctant to write: + +def opener(i): return open("file%02d"%i, 'w') +files = map(opener, range(N) ) + +The above two lines are equivalent to the one-liner using lambda; the +only difference is that now there's an opener() function lying around +in the namespace. + +-- +A.M. Kuchling http://starship.python.net/crew/amk/ +... but whenever optimization comes up, people get sucked into debates about +exciting but elaborate schemes not a one of which ever gets implemented; +better to get an easy 2% today than dream about 100% forever. + -- Tim Peters, 22 Mar 1998 + + + + + diff --git a/demo/ermis-f/python_m/cur/0767 b/demo/ermis-f/python_m/cur/0767 new file mode 100644 index 00000000..bfa5cd44 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0767 @@ -0,0 +1,50 @@ +From: barry at scottbb.demon.co.uk (Barry Scott) +Date: Tue, 6 Apr 1999 22:22:17 +0100 +Subject: Embedding python question: PyRun_String only returns None not what I calculate +Message-ID: <923433832.14002.0.nnrp-07.9e982a40@news.demon.co.uk> +X-UID: 767 + +What I want to do is call python to run python code and return the results +to +my app. But I cannot find anyway to do this. + +It would seem that I should be using PyRun_String to run a piece of python +and return a result object to me. But I can only get a return value of None. +NULL is returned if the code does not run. + +How do I get python to return 2 to me when I ask it what 1+1 is? + +Below is a fragment of code that I'm using to investigate PyRun_String. + + BArry + +// + // Test getting an object back from a command + // + char *command = "1+1"; + + PyObject *m = PyImport_AddModule("__main__"); + if (m == NULL) + return EXIT_FAILURE; + + PyObject *d = PyModule_GetDict(m); + PyObject *v = PyRun_String(command, Py_file_input, d, d); + if (v == NULL) + { + PyErr_Print(); + return EXIT_FAILURE; + } + + PyObject *result = PyObject_Str( v ); + + char *string = PyString_AsString( result ); + printf("Python returned: %s", string ); + + Py_DECREF(result); + Py_DECREF(v); + + + + + + diff --git a/demo/ermis-f/python_m/cur/0768 b/demo/ermis-f/python_m/cur/0768 new file mode 100644 index 00000000..bfd97be7 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0768 @@ -0,0 +1,42 @@ +From: jwbaxter at olympus.net (John W. Baxter) +Date: Thu, 29 Apr 1999 22:25:49 -0700 +Subject: Rat sited on Amazon +References: <37292D6C.5684BF72@rubic.com> +Message-ID: +X-UID: 768 + +In article <37292D6C.5684BF72 at rubic.com>, jeffbauer at bigfoot.com wrote: + +> Hey everyone. Check out what's featured on Amazon today +> under "Computers and Internet". +> +> Has David or Mark ever refused to buy you a free drink? +> +> Now's your chance to get even and write a negative review. +> +> It's never too late for blackmail, or what we of the +> genteel persuasion prefer to call "negotiation". +> +> ethics-at-$3-a-round-ly yr's +> +> Jeff Bauer +> Rubicon, Inc. + +My (preordered) copy came with a little "surprise" folded into the book. +Stapled together: a packing slip for 40 copies and an invoice for 57 +copies. + +Once I recovered enough to read, I noted that the packing slip and invoice +were O'Reilly shipping to and invoicing Amazon. I felt much better then. +(Or was this Amazon attempting to improve quarterly results? ;-)) + + --John + +-- +If nothing is pressing, putter about with this or that. + (Fortune cookie) +John W. Baxter Port Ludlow, WA USA jwb at olympus.net + + + + diff --git a/demo/ermis-f/python_m/cur/0769 b/demo/ermis-f/python_m/cur/0769 new file mode 100644 index 00000000..ede7d553 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0769 @@ -0,0 +1,57 @@ +From: tismer at appliedbiometrics.com (Christian Tismer) +Date: Fri, 9 Apr 1999 15:26:28 GMT +Subject: import from user input? +References: <816010E2456BD111A48700805FBBE2EEA63EB9@ex-quebec-u1.baan.com> + <370E0F51.E1D33D6@appliedbiometrics.com> <14094.6366.328759.966352@buffalo.fnal.gov> +Message-ID: <370E1C24.A2C4F159@appliedbiometrics.com> +Content-Length: 1381 +X-UID: 769 + + +Charles G Waldman wrote: +> +> Christian Tismer writes: +> > +> > import string +> > globals()[string.split(modname, ".")[0]] = __import__(modname) +> > +> > seems to do it better. +> > +> +> Why not just +> +> exec "import "+modname + +See my former post. +It works for you and me, but if I have to be aware of +users trying things like + +modname = "sys;sys.exit()" + +to name a quite harmless idea, you would have more work to +prevend this than by a string which is no parsed command. +I think it's not clean to give the user full access to your +namespace and interpreter. Not if you are the user, of course. +But if you allow arbitrary strings to be executed, you are poking +a big hole into your software. How about + +modname = "sys;None=5" + +This was just a concern, which would more apply to Internet +CGI scripts. Using these concepts thoughtlessly with the proper +pickled string, would let your user break into your module +completely. + +ciao - chris + +-- +Christian Tismer :^) +Applied Biometrics GmbH : Have a break! Take a ride on Python's +Kaiserin-Augusta-Allee 101 : *Starship* http://starship.python.net +10553 Berlin : PGP key -> http://wwwkeys.pgp.net +PGP Fingerprint E182 71C7 1A9D 66E9 9D15 D3CC D4D7 93E2 1FAE F6DF + we're tired of banana software - shipped green, ripens at home + + + + diff --git a/demo/ermis-f/python_m/cur/0770 b/demo/ermis-f/python_m/cur/0770 new file mode 100644 index 00000000..cd1767d6 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0770 @@ -0,0 +1,21 @@ +From: dozier at bellatlantic.net (Bill Dozier) +Date: Tue, 20 Apr 1999 10:57:49 -0400 +Subject: unpickling an NT object in Solaris? +Message-ID: +X-UID: 770 + +Hi, + +I created an object running python on NT and pickled it. I have no problem +unpickling on NT, but when I ftp'd the file over to Solaris, I get an +ImportError exception ("No module named __main__^M") when I try to +unpickle it. + +Is this a 1.5.2 (on NT) vs. 1.5.1 (on Solaris) problem, or am I mistaken +in expecting the pickled objects to work cross-platform? + +Thanks! + + + + diff --git a/demo/ermis-f/python_m/cur/0771 b/demo/ermis-f/python_m/cur/0771 new file mode 100644 index 00000000..50c24932 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0771 @@ -0,0 +1,40 @@ +From: jeffp at crusoe.net (evil Japh) +Date: Fri, 9 Apr 1999 18:30:04 -0400 +Subject: OrderedDict.py +Message-ID: +X-UID: 771 + +Is there a need for a module which allows for ordered processing of an +dictionary? + +I have one written, and it works fine I think. Basically, it allows for a +dictionary to be treated like a list, but have the data structure of +dictionary. Key-value pairs retain the order you entered them in. Unless +you specifically change them. I'm currently working on more methods, to +allow it to be sliced like an array. + +currently, it wouldn't allow for numeric keys, because the __getitem__ +finds out what you sent, an integer (numeric index) or a string (a +dictionary key). the __getslice__ and __setslice__ aren't a problem. I +could make a special class for indices for getting dict[4]... + +something like: + +dict[Index(4)] instead of dict[4] + +but I'd like to be as seamless as possible. + +I'll be putting the code on my web site soon. + +-- +Jeff Pinyan (jeffp at crusoe.net) +www.crusoe.net/~jeffp + +Crusoe Communications, Inc. +732-728-9800 +www.crusoe.net + + + + + diff --git a/demo/ermis-f/python_m/cur/0772 b/demo/ermis-f/python_m/cur/0772 new file mode 100644 index 00000000..db846a78 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0772 @@ -0,0 +1,37 @@ +From: dhfx at bga.com (dhfx at bga.com) +Date: Tue, 27 Apr 1999 02:40:30 GMT +Subject: IDLE ! +References: <371ADC8C.54C4CDBE@zipzap.ch> +Message-ID: <7g382v$mkk$1@nnrp1.dejanews.com> +Content-Length: 1116 +X-UID: 772 + +In article <371ADC8C.54C4CDBE at zipzap.ch>, + Boris Borcic wrote: +> I am having my first look at 1.5.2 and IDLE (on Win95). +> +> Very nice. Thank you (once again), Guido. +> +> Boris Borcic +> +Seconded. Many thanks, Guido. The colors look nice. + + Just one minor detail. I'm running 1.5.2 on a Win95 box, and I happen to +have changed the color scheme to give me white text on a dark background; +it's really much easier on the eyes. I've noticed that a number of W95 apps +implicitly assume that text will always be black; they set the background +color to white (or something close to it) but don't bother setting the +default foreground color - so I get WHITE ON WHITE! Sadly, the current +version of IDLE is one of these. I don't even see the banner lines that come +up when the window opens! Guido, if you could please put on your TODO list +to set a default background color (black, presumably) for text, I'd be most +appreciative. + +David Friedman + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/0773 b/demo/ermis-f/python_m/cur/0773 new file mode 100644 index 00000000..85dd3003 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0773 @@ -0,0 +1,43 @@ +From: tincho.NO at SPAM.crl.com (Martin Bertolino) +Date: Fri, 9 Apr 1999 08:06:03 -0500 +Subject: Python 1.5.2c1 -- release candidate for 1.5.2 +References: <199904082148.RAA04479@eric.cnri.reston.va.us> +Message-ID: <7eku4f$2gt8$1@nnrp9.crl.com> +Content-Length: 1080 +X-UID: 773 + +Is there any documentation on what is planned/in devlopment for Python 2.0? +How it will be different from the 1.5.X releases? + +Thanks + +Martin Bertolino + +Guido van Rossum wrote in message +<199904082148.RAA04479 at eric.cnri.reston.va.us>... +>On 8 April 1999, Python 1.5.2c1 was released. This is a release +>candidate for 1.5.2 final - only showstopping bugs will be fixed +>before 1.5.2 is released. +> +>*** Please help making 1.5.2 rock solid by banging on the release +>candidate in all possible ways! *** +> +>I hope to release the final version of 1.5.2 on 13 April. That will +>conclude the 1.5 development cycle; while I may release some essential +>patches later, my main development focus will be on Python 1.6 (with +>2.0 on the horizon; 1.6 will probably be the last of the 1.x +>versions). +> +>Go to http://www.python.org/1.5/ for more info, or download directly: +> +>ftp://ftp.python.org/pub/python/src/py152c1.tgz (source, 2.5M) +>ftp://ftp.python.org/pub/python/win32/py152c1.exe (Windows installer, 5.0 +M) +> +>--Guido van Rossum (home page: http://www.python.org/~guido/) + + + + + + diff --git a/demo/ermis-f/python_m/cur/0774 b/demo/ermis-f/python_m/cur/0774 new file mode 100644 index 00000000..738f4f85 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0774 @@ -0,0 +1,31 @@ +From: aa8vb at vislab.epa.gov (Randall Hopper) +Date: Thu, 22 Apr 1999 12:14:03 -0400 +Subject: Pointers to variables +Message-ID: <19990422121403.A279051@vislab.epa.gov> +X-UID: 774 + +This doesn't work: + + + for ( var, str ) in [( self.min, 'min_units' ), + ( self.max, 'max_units' )]: + if cnf.has_key( str ): + var = cnf[ str ] + del cnf[ str ] + + +It doesn't assign values to self.min, self.max (both integers). The values +of these variables are inserted into the tuples and not references to the +variables themselves, which is the problem. + +How can I cause a reference to the variables to be stored in the tuples +instead of their values? + +Thanks, + +Randall + + + + + diff --git a/demo/ermis-f/python_m/cur/0775 b/demo/ermis-f/python_m/cur/0775 new file mode 100644 index 00000000..134266ff --- /dev/null +++ b/demo/ermis-f/python_m/cur/0775 @@ -0,0 +1,31 @@ +From: MHammond at skippinet.com.au (Mark Hammond) +Date: Wed, 21 Apr 1999 10:29:57 +1000 +Subject: Installing 1.5.2 on WinNT without Admin privileges? +References: <7fif3n$4m0$1@nnrp1.dejanews.com> +Message-ID: <7fj64d$6cc$1@m2.c2.telstra-mm.net.au> +X-UID: 775 + +At this stage, no. the only real reason is that making an installer handle +both cases it just too hard, and installing stuff so it is available +machine-wide (rather than just the current user) seemed more useful - +especially for people hoping to use it with CGI etc. + +You should be able to copy to binaries to your machine, set a PYTHONPATH +variable, and all should be well.. + +Mark. + +tshort at my-dejanews.com wrote in message <7fif3n$4m0$1 at nnrp1.dejanews.com>... +>Is it possible to install a Python 1.5.2 binary without Admin privileges on +>Windows NT? +> +>- Tom +> +>-----------== Posted via Deja News, The Discussion Network ==---------- +>http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + + + diff --git a/demo/ermis-f/python_m/cur/0776 b/demo/ermis-f/python_m/cur/0776 new file mode 100644 index 00000000..2815203c --- /dev/null +++ b/demo/ermis-f/python_m/cur/0776 @@ -0,0 +1,25 @@ +From: frankmcgeough at my-dejanews.com (frankmcgeough at my-dejanews.com) +Date: Sun, 25 Apr 1999 22:45:44 GMT +Subject: perl v python +References: <37238A6A.E245337D@btinternet.com> +Message-ID: <7g05un$v80$1@nnrp1.dejanews.com> +X-UID: 776 + +I believe you may be able to find an analysis on the www.python.org website +giving several links to comparison pages. The pluses for python (IMHO) are : +lends itself to more readable and thus more maintainable code; is easily +usable for programs involving data structures (thus more complicated +programs); has oo constructs from the start so they seem more natural than +Perl's additions. We didn't run into too many problems when converting our +test framework from Perl to Python. + +> I've been using perl quite some time, just starting looking +> at Python. +> what's peoples views/comparisons of both languages? + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/0777 b/demo/ermis-f/python_m/cur/0777 new file mode 100644 index 00000000..ccbe8894 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0777 @@ -0,0 +1,35 @@ +From: arcege at shore.net (Michael P. Reilly) +Date: Tue, 13 Apr 1999 15:25:20 GMT +Subject: CVS module +References: <7evbjf$85f$1@anguish.transas.com> +Message-ID: +X-UID: 777 + +Michael Sobolev wrote: +: My quick attempt to find something that would help me to cope with CVS files +: failed. Could anybody advise me whether such a module exist? Under "such a +: module" I mean something that permits to get the complete information about the +: given file: + +: cvsfile = CVSFile () + +: from pprint import pprint + +: pprint (cvsfile.revisions) + +: or something alike. + +I have some modules that I wrote a year ago. Nothing of production +quality, but they were usable (and stable). I used them a lot in +my SCM/RM duties. + +Read the cvslib.py doc for usage. + +The URL is: http://www.shore.net/~arcege/python/Pycvs.tar.gz + + -Arcege + + + + + diff --git a/demo/ermis-f/python_m/cur/0778 b/demo/ermis-f/python_m/cur/0778 new file mode 100644 index 00000000..1ffdd3a1 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0778 @@ -0,0 +1,24 @@ +From: pj at sgi.com (Paul Jackson) +Date: 16 Apr 1999 17:24:39 GMT +Subject: #!/usr/bin/env python -u +References: <37175574.25EBDDBE@stuco.uni-klu.ac.at> +Message-ID: <7f7ron$ur2o@fido.engr.sgi.com> +X-UID: 778 + +Not that this is any help, but other kernels besides Linux don't +pass #! arguments in full generality. For example, the Irix +system I'm on right now is doing pretty much the same thing. + +Part of this is the convention, apparent on both my Linux and +Irix boxes, to pass the name of the script file as argv[2], +which leaves argv[1] stuck with the entire trailing argument +list from the #! line. +-- + +======================================================================= +I won't rest till it's the best ... Software Production Engineer +Paul Jackson (pj at sgi.com; pj at usa.net) 3x1373 http://sam.engr.sgi.com/pj + + + + diff --git a/demo/ermis-f/python_m/cur/0779 b/demo/ermis-f/python_m/cur/0779 new file mode 100644 index 00000000..6f0a471a --- /dev/null +++ b/demo/ermis-f/python_m/cur/0779 @@ -0,0 +1,18 @@ +From: bwarsaw at cnri.reston.va.us (Barry A. Warsaw) +Date: Fri, 16 Apr 1999 11:27:39 -0400 (EDT) +Subject: Python.org scheduled down time +Message-ID: <14103.22251.209537.804890@anthem.cnri.reston.va.us> +X-UID: 779 + +Folks, + +parrot.python.org, the machine that hosts web, mail and ftp, will be +taken down today 16-Apr-1999 at 4pm GMT -0500 for approximately 1/2 +hour. We need to install some new hardware. + +Thanks, +-Barry + + + + diff --git a/demo/ermis-f/python_m/cur/0780 b/demo/ermis-f/python_m/cur/0780 new file mode 100644 index 00000000..ddb46fac --- /dev/null +++ b/demo/ermis-f/python_m/cur/0780 @@ -0,0 +1,44 @@ +From: mstenber at cc.helsinki.fi (Markus Stenberg) +Date: 29 Apr 1999 07:48:21 +0300 +Subject: Emacs' python-mode buggy? +In-Reply-To: Ken Manheimer's message of "Thu, 29 Apr 1999 00:42:17 -0400" +References: <199904282340.TAA19934@python.org> <3727E329.2E8F3C31@digicool.com> +Message-ID: +Content-Length: 1123 +X-UID: 780 + +Ken Manheimer writes: +> Markus Stenberg wrote: +> I can't speak to the intimacy issue, but the python-mode syntax recognition +> may be due to having a leading '(' open paren in the first column in one of +> your docstrings. If so, emacs' syntax confusion (not to be mistaken for +> poor gender identification) can be remedied by escaping the leading open +> paren with a '\' backslash, like so: + +Ah, what's causing that problem? + +> \(this is what to do with parens in docstrings.) +> +> If it is the problem, well, it's emacs' problem, not pymode. If it's not, +> well, do track it down. +> +> Oh, does that bug constitute the "tons" you mention, or were there others? +> I never was good at estimating the weight of bugs - all that chiton, you +> know. + +Think there is two, as one of my (moderately large) modules has no +docstrings with ('s yet still exhibits that behavior. (ok, I got carried +away, but I was moderately frustrated over the feature :-P) + +> Ken Manheimer +> klm at digicool.com + +-Markus + +-- + Markus Stenberg +Finger fingon at mpoli.fi for PGP key -- PGP key id: 1024/5DAC7D21 + + + + diff --git a/demo/ermis-f/python_m/cur/0781 b/demo/ermis-f/python_m/cur/0781 new file mode 100644 index 00000000..f75e7a12 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0781 @@ -0,0 +1,26 @@ +From: kj7ny at email.com (kj7ny at email.com) +Date: Sat, 3 Apr 1999 00:05:16 -0800 +Subject: Python on Apache and traceback +Message-ID: <7e4bta$ild$1@paperboy.owt.com> +X-UID: 781 + +Before you flame my socks off, I know this is NOT the right place to +probably ask this question, but I guarantee you there is no where better to +get the right answer. + +I am using Python on Apache on Win98. + +Has anyone figured out how to get at the traceback errors when using Python +on Apache? They are not automatically returned to the browser as they are on +IIS and PWS. + +Thanks, + +kj7ny at email.com + + + + + + + diff --git a/demo/ermis-f/python_m/cur/0782 b/demo/ermis-f/python_m/cur/0782 new file mode 100644 index 00000000..03422e51 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0782 @@ -0,0 +1,54 @@ +From: duncan at rcp.co.uk (Duncan Booth) +Date: 20 Apr 1999 08:42:59 GMT +Subject: Date/Time conversions +References: <371BEBA7.5DBC1B0F@qut.edu.au> +Message-ID: <8DAE62F4Dduncanrcpcouk@news.rmplc.co.uk> +Content-Length: 1783 +X-UID: 782 + +Rico Albanese wrote in +<371BEBA7.5DBC1B0F at qut.edu.au>: + +>I am writing a web based database application and I am having problems +>in creating a string that contains an integer in it. I wish to store +>the login time as an integer so that I may do some time difference +>calculations based on the stored login time (ie. the integer). The SQL +>statement string creation fails when I have the integer variable +>"logtime" in it but not when it is removed. I believe that my problem +>is caused by trying to insert an integer into a string. The database +>works fine (ie I can add integers to the column "LogTime"). +> +> +Your problem is that you are trying to concatenate a string with an +integer. The arguments to the '+' operator should both be numbers, or both +strings, you cannot mix strings and numbers here. + +There are two obvious solutions. One is to convert logtime to a string. +e.g. +thesql=thesql + frontpar + str(logtime) + "," + +The other, possibly better one is to build up your SQL string using the '%' +operator. For example, your SQL statement may be build up something like +this: + +SQLtemplate = '''INSERT INTO CSJobs.compjobs +(LogTime,Caller,Phone_Extension,Caller_Category,Location,Job_Description,Jo +b_Priority,LogNumb,Log_Date,Finished) +VALUES (%(logtime)s, '%(Caller)s', '%(Ph)s', '%(Sch)s', '%(Loc)s', +'%(JbDes)s', '%(JbPr)s', '%(LogN)s', '%(logdate)s', 'n') +''' +thesql = SQLtemplate % locals() +crsr.execute(thesql) + +Which does all the neccessary conversions to strings as you go. + + +-- +Duncan Booth duncan at dales.rmplc.co.uk +int month(char *p){return(124864/((p[0]+p[1]-p[2]&0x1f)+1)%12)["\5\x8\3" +"\6\7\xb\1\x9\xa\2\0\4"];} // Who said my code was obscure? +http://dales.rmplc.co.uk/Duncan + + + + diff --git a/demo/ermis-f/python_m/cur/0783 b/demo/ermis-f/python_m/cur/0783 new file mode 100644 index 00000000..8524caae --- /dev/null +++ b/demo/ermis-f/python_m/cur/0783 @@ -0,0 +1,50 @@ +From: holger at phoenix-edv.netzservice.de (Holger Jannsen) +Date: Tue, 27 Apr 1999 10:09:35 GMT +Subject: sort of multiple dictonaries +References: <371F28CA.2240BB7B@phoenix-edv.netzservice.de> +Message-ID: <37258CDF.1B3AC266@phoenix-edv.netzservice.de> +X-UID: 783 + +Thank ya' Michael, + +Ciao, +Holger + +Michael Hudson schrieb: +> +> Holger Jannsen writes: +> > Hi there, +> > +> > perhaps a typical newbie-question: +> > +> > I've got a list of dictonaries like that: +> > +> > mydics=[{'sortit': 'no412', 'mode': 'nothing'}, +> > {'sortit': 'no112', 'mode': 'something'}, +> > {'sortit': 'no02', 'mode': 'something else'}] +> > +> > Is there an easy way to get that list sorted like that: +> > +> > def sortDictonary(aDictonary, theSortKey="sortit"): +> > .... +> > +> > Result have to be: +> > +> > mydics=[{'sortit': 'no02', 'mode': 'something else'}, +> > {'sortit': 'no112', 'mode': 'something'}, +> > {'sortit': 'no412', 'mode': 'nothing'}] +> > +> > Any hints? +> +> Well, it's actually a list you're sorting isn't it? +> +> mydics.sort(lambda x,y:cmp(x['sortit'],y['sortit'])) +> +> should work, if I understand the problem. +> +> HTH +> Michael + + + + diff --git a/demo/ermis-f/python_m/cur/0784 b/demo/ermis-f/python_m/cur/0784 new file mode 100644 index 00000000..1b012396 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0784 @@ -0,0 +1,77 @@ +From: trashcan at david-steuber.com (David Steuber) +Date: 21 Apr 1999 00:33:10 -0400 +Subject: New python user seeks comments +Message-ID: +Content-Length: 2167 +X-UID: 784 + +Er, uh, hmm. + +I wrote my first Python program today. It took longer than I +expected. Who would have guessed that you couldn't give a file object +the name 'in'? Or at least that was one of the weirder obstacles. +Anyway, I am not at all used to thinking in Python. I was wondering +if anyone would care to offer comments on my Python script. It is +quite small and is responsible for my sig. Feel free to scarf it. + +-------------- next part -------------- +#! /usr/bin/env python + +# Tue Apr 20 17:31 + +# This is my first python program. It is intended to generate signature +# files for mail and news using the fortune program. + +# The first step is to open a template file that contains the constant +# portion of the signature. For flexability, I would like to get +# the file name from the command line. So really, the first step is +# to read the command line. + +# imports section +import sys +import os +import commands +import time + +# Test the number of arguments to see that it is the required number. +if len (sys.argv) != 3: + print 'usage: siggen.python template pipe' + sys.exit(0) + +# The first argument is the input file, the second argument is the +# output file which should be a named pipe. +template = sys.argv[1] +npipe = sys.argv[2] + +if not os.path.isfile(template): + print template + ' is not a file!' + sys.exit(0) + +if not os.path.exists(npipe): + os.mkfifo(npipe) + +# Time to get into it. Go into an infinite loop where we open the +# template file, copy it line by line to the pipe, then execute the +# fortune program and send it out the pipe +while 1: + fin = open(template, 'r', 1) + fout = open(npipe, 'w', 0) + fout.writelines(fin.readlines()) + fin.close() + fout.writelines([commands.getoutput('/usr/bin/fortune -a'),'\n']) + fout.close() + time.sleep(1) +-------------- next part -------------- + +-- +David Steuber +http://www.david-steuber.com + +s/trashcan/david/ to reply by mail | while you're at it, you might also +If you don't, I won't see it. | want to track down and kill bulk + | mailers, aka spammers. + +Vote for ME -- I'm well-tapered, half-cocked, ill-conceived and +TAX-DEFERRED! + + diff --git a/demo/ermis-f/python_m/cur/0785 b/demo/ermis-f/python_m/cur/0785 new file mode 100644 index 00000000..9f58b65a --- /dev/null +++ b/demo/ermis-f/python_m/cur/0785 @@ -0,0 +1,48 @@ +From: ivnowa at hvision.nl (Hans Nowak) +Date: Sun, 11 Apr 1999 20:37:07 GMT +Subject: best way to copy a file [Q] +In-Reply-To: <000201be8441$7965d4d0$6eba0ac8@kuarajy.infosys.com.ar> +References: <000201be8441$7965d4d0$6eba0ac8@kuarajy.infosys.com.ar> +Message-ID: <199904111935.VAA24485@axil.hvision.nl> +Content-Length: 1059 +X-UID: 785 + +On 11 Apr 99, Ce'Nedra took her magical amulet and heard Bruno Mattarollo say: + +>Hi! +> +> I need to copy a file (can be binary or ascii) from one path to another. I +>have tryied to do: +> line = fd.readline() +> while line: +> fd2.write(line) +> line = fd.readline() +> fd.close() +> fd2.close() +> +> It only works for ascii files ... How can I do a 'copy' ...? I need to run +>this on NT ...:( And I don't want to open a shell to do a copy from +>there... I also tryied fd.read() ... No success neither. + +Sure can: + +fin = open("myfile", "rb") # notice the 'rb' +fout = open("target", "wb") # ...and the 'wb' +data = fin.read(1000) # or any amount of bytes you want to read +while data: + fout.write(data) + data = fin.read(1000) +fin.close() +fout.close() + +This should work. For large files, a larger number than 1000 may be +desirable. + ++ Hans Nowak (Zephyr Falcon) ++ Homepage (under construction): http://www.cuci.nl/~hnowak/ ++ You call me a masterless man. You are wrong. I am my own master. ++ May a plumber throw eggs at your dead presidents! + + + + diff --git a/demo/ermis-f/python_m/cur/0786 b/demo/ermis-f/python_m/cur/0786 new file mode 100644 index 00000000..fe8d1807 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0786 @@ -0,0 +1,32 @@ +From: barry at scottbb.demon.co.uk (Barry Scott) +Date: Tue, 13 Apr 1999 22:57:30 +0100 +Subject: Windows install has problems. Guido asked that I use this newsgroup to discus further +References: <924039873.18221.0.nnrp-12.9e982a40@news.demon.co.uk> +Message-ID: <924040766.18823.0.nnrp-12.9e982a40@news.demon.co.uk> +X-UID: 786 + +>I wish I could. The installer is very stupid. Windows sucks :-( + + Is the WISE installer unable to deal with Win 9X vs. NT and handle + registry queries and updates? I'm sure that I can do this with + InstallShield (a poorly designed, annoying, but functional installer). + + As for the tcl80.dll problems. Either assume that tcl80.dll is in the + standard (english) installation place + %systemdrive%\program files\tcl\bin\tcl80.dll. + + OR release note that users must add the Tcl bin dir to there PATH. + + As the python lib does not have a module to access the registry it makes + getting the info from the registry hard. + + Maybe 1.6 needs a windows registry module to solve this and + other problems. + + BArry + + + + + + diff --git a/demo/ermis-f/python_m/cur/0787 b/demo/ermis-f/python_m/cur/0787 new file mode 100644 index 00000000..0eb287fc --- /dev/null +++ b/demo/ermis-f/python_m/cur/0787 @@ -0,0 +1,15 @@ +From: guido at eric.cnri.reston.va.us (Guido van Rossum) +Date: 20 Apr 1999 22:45:11 -0400 +Subject: Problems with mod_pyapache and cPickle +References: <371CC227.5BDF5C5A@starmedia.net> +Message-ID: <5l4smau1xk.fsf@eric.cnri.reston.va.us> +X-UID: 787 + +Or you could upgrade to Python 1.5.2, which gets rid of the +class_cache altogether. +-- +--Guido van Rossum (home page: http://www.python.org/~guido/) + + + + diff --git a/demo/ermis-f/python_m/cur/0788 b/demo/ermis-f/python_m/cur/0788 new file mode 100644 index 00000000..a59b2d48 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0788 @@ -0,0 +1,33 @@ +From: nickb at earth.ox.ac.uk (Nick Belshaw) +Date: Wed, 14 Apr 1999 16:53:29 +0100 +Subject: REPOST:pretty please - Help re libpython1.5.so +Message-ID: <3714B9F9.30285D74@earth.ox.ac.uk> +X-UID: 788 + +I'm gonna start taking this personally soon !!! + +You bright guys out there..................................... + +If anyone can spare a second - + +Whilst trying to get Python plugins to work on Gnumeric-0.23 I bumped up + +against the need for libpython1.5.so.0.0.0 + +I have 'The Full Python' ( - thats the sequel to 'The Full Monty' !!! ) + +and can build xxxx.a no problem but what do I have to do to get xxxx.so +Can't seem to find anything specific on it in the docs or readme or +Setup and my knowledge is too superficial to allow me to be clever. + +Help anyone? + +cheers +Nick/Oxford Geochemistry + + + + + + + diff --git a/demo/ermis-f/python_m/cur/0789 b/demo/ermis-f/python_m/cur/0789 new file mode 100644 index 00000000..ab00cee0 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0789 @@ -0,0 +1,98 @@ +From: samschul at ix.netcom.com (Sam Schulenburg) +Date: Tue, 13 Apr 1999 16:00:41 -0700 +Subject: Keyboard interrupt handling response under IDLE +Message-ID: <7f0iad$nqj@dfw-ixnews4.ix.netcom.com> +Content-Length: 2742 +X-UID: 789 + +Keyboard interrupt handling response under IDLE + +The following function performs a call to a DLL that handles issuing +commands to an external SCSI hard disk drive. + +def test(): + while(1): + try: + io6(0x12,0x00,0x00,0x00,0xff,0x00) + print '*', + except KeyboardInterrupt: + key = raw_input('Key board interrupt detected: do you want to +continue Y/N ') + if(upper(key) != 'Y'): + break + +The io6(0x12,0x00,0x00,0x00,0xff,0x00) function resides within the DLL and +will report all errors back to Python via +this function call: + +static void vLogP(UCHAR *ucMsgStr,UCHAR ucIndex) +{ + UCHAR ucPyString[200]; + if( iERRORMSG == 1) + { + + wsprintf(ucPyString,"sys.stderr.write(\'%s\')",ucMsgStr); + PyRun_SimpleString(ucPyString); + wsprintf(ucPyString,"print \"\""); + PyRun_SimpleString(ucPyString); + } + else + { + wsprintf(ucPyString,"print \"%s\"",ucMsgStr); + PyRun_SimpleString(ucPyString); + } +}; + + +The problem occurrs when the function within the DLL has an error and the +reported error occurrs continously. +What appears to happen is that the IDLE enviroment detects the error as +shown below but does not always +throw the exception + + +*Drive is not available for testing: +Traceback (innermost last): + File "", line 1, in ? + File "D:\Python152\Tools\idle\PyShell.py", line 598, in write + self.shell.write(s, self.tags) + File "D:\Python152\Tools\idle\PyShell.py", line 589, in write + raise KeyboardInterrupt +# Detected the exception but continued with the main loop +KeyboardInterrupt +*Drive is not available for testing: +*Drive is not available for testing: +Traceback (innermost last): + File "", line 1, in ? + File "D:\Python152\Tools\idle\PyShell.py", line 598, in write + self.shell.write(s, self.tags) + File "D:\Python152\Tools\idle\PyShell.py", line 589, in write + raise KeyboardInterrupt +# Detected the exception but continued with the main loop +KeyboardInterrupt +*Drive is not available for testing: +*Drive is not available for testing: +*Drive is not available for testing: +*Drive is not available for testing: +*Drive is not available for testing: +*Drive is not available for testing: +Traceback (innermost last): + File "", line 1, in ? + File "D:\Python152\Tools\idle\PyShell.py", line 598, in write + self.shell.write(s, self.tags) + File "D:\Python152\Tools\idle\PyShell.py", line 589, in write + raise KeyboardInterrupt +KeyboardInterrupt +# Detected the exception but continued with the main loop +*Drive is not available for testing: +*Drive is not available for testing: +* +Key board interrupt detected: do you want to continue Y/N n # Finally +caught the exception + + + + + + + diff --git a/demo/ermis-f/python_m/cur/0790 b/demo/ermis-f/python_m/cur/0790 new file mode 100644 index 00000000..18a6d4c8 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0790 @@ -0,0 +1,25 @@ +From: quelle at NO_SPAM_infrasystems.com (Reinhardt Quelle) +Date: Tue, 13 Apr 1999 23:58:03 GMT +Subject: Windows install has problems. Guido asked that I use this newsgroup to discus further +References: <924039873.18221.0.nnrp-12.9e982a40@news.demon.co.uk> <924040766.18823.0.nnrp-12.9e982a40@news.demon.co.uk> +Message-ID: +X-UID: 790 + +Barry Scott wrote in message +news:924040766.18823.0.nnrp-12.9e982a40 at news.demon.co.uk... +> >I wish I could. The installer is very stupid. Windows sucks :-( +> +> Is the WISE installer unable to deal with Win 9X vs. NT and handle +> registry queries and updates? I'm sure that I can do this with +> InstallShield (a poorly designed, annoying, but functional installer). +> + +I have an older version of WISE - it reports the OS version as well as +supports reading and writing to the registry (and trivially adding things to +the path in autoexec) + + + + + + diff --git a/demo/ermis-f/python_m/cur/0791 b/demo/ermis-f/python_m/cur/0791 new file mode 100644 index 00000000..112fcc4d --- /dev/null +++ b/demo/ermis-f/python_m/cur/0791 @@ -0,0 +1,27 @@ +From: akuchlin at cnri.reston.va.us (Andrew M. Kuchling) +Date: Tue, 27 Apr 1999 09:05:50 -0400 (EDT) +Subject: examples for beginners +In-Reply-To: <3724e511.441513@news.tin.it> +References: <3724e511.441513@news.tin.it> +Message-ID: <14117.46113.146923.36938@amarok.cnri.reston.va.us> +X-UID: 791 + +Kranio writes: +>Could you suggest me where to find some script just for studying? + + http://www.strout.net/python/tidbits.html + http://starship.python.net/crew/amk/python/simple.html + +The Demo directory that comes with Python is also helpful. + +-- +A.M. Kuchling http://starship.python.net/crew/amk/ +By undue profundity we perplex and enfeeble thought; and it is possible to +make even Venus herself vanish from the firmament by a scrutiny too sustained, +too concentrated, or too direct. + -- E.A. Poe, "The Murders in the Rue Morgue" + + + + + diff --git a/demo/ermis-f/python_m/cur/0792 b/demo/ermis-f/python_m/cur/0792 new file mode 100644 index 00000000..9f16a189 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0792 @@ -0,0 +1,29 @@ +From: Stuart.Ramsden at anu.edu.au (Stuart Ramsden) +Date: Wed, 14 Apr 1999 10:26:44 +1000 +Subject: real time scheduler +References: <3713AE36.A1EA255B@arlut.utexas.edu> +Message-ID: <3713E0C4.2AD4FCCB@anu.edu.au> +X-UID: 792 + +Bryan VanDeVen wrote: + +> Is there a module for scheduling events in real time? I have events +> that need to be repeated indefinitely, each at a given time period. The +> periods are large (at least one minute) and precision requirements are +> not that great (within a few seconds). Is anyone aware of code to do +> this? + +I wrote a midi scheduler based on the priority queues described in +Guido's python book. My biggest problem was the latency - I tried +a few mechanisms, including tk's 'after' and a mixture of long and short +sleeps - the best was a tight loop polling for the next time event. + +Have a look at the source and ignore the midi stuff (will only run under +SGI and Python 1.2-1.4 anyway) + +http://anusf.anu.edu.au/~sjr/midiplayer.py + + + + + diff --git a/demo/ermis-f/python_m/cur/0793 b/demo/ermis-f/python_m/cur/0793 new file mode 100644 index 00000000..7ddbaae4 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0793 @@ -0,0 +1,29 @@ +From: mstenber at cc.Helsinki.FI (Markus Stenberg) +Date: 29 Apr 1999 00:27:17 +0300 +Subject: Emacs' python-mode buggy? +Message-ID: +X-UID: 793 + +At least by my experiences the Emacs mode (at least, two versions I tried, +3.75 and whatever came with Python 1.5.2) seems to have tons of bugs; to be +more precise, it seems to think a lot more of my code than should be is +string (and therefore is green and indentation doesn't work). + +Funny thing is, it's colored properly when I load file but when I start +editing some files' some parts, they turn green (comment-ish) and +indentation starts to suck. + +Indentation being fairly neccessary feature for Python coding, is there +some option I am missing or am I fucked? (read: forced to use vim or +something) + +-Markus + +-- + Microsoft is not the answer. + Microsoft is the question. + NO (or Linux) is the answer. + + + + diff --git a/demo/ermis-f/python_m/cur/0794 b/demo/ermis-f/python_m/cur/0794 new file mode 100644 index 00000000..04f89ac2 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0794 @@ -0,0 +1,30 @@ +From: hew at hons.cs.usyd.edu.au (Matthew Robert Gallagher) +Date: Fri, 09 Apr 1999 11:20:25 +1000 +Subject: simple dbm question +Message-ID: <370D55D9.B75ECE47@hons.cs.usyd.edu.au> +X-UID: 794 + + +could someone please tell me why this dbm doesn't work + + + +import anydbm +file = anydbm.open('hew') + + +error appears as +Traceback (innermost last): + File "/usr/local/lib/python1.5/anydbm.py", line 54, in open + return _mod.open(file, flag, mode) +gdbm.error: (2, 'No such file or directory') + + +thanks + +hew + + + + + diff --git a/demo/ermis-f/python_m/cur/0795 b/demo/ermis-f/python_m/cur/0795 new file mode 100644 index 00000000..4e54ae88 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0795 @@ -0,0 +1,74 @@ +From: ucvocnmb at somethingfunny.net (ucvocnmb at somethingfunny.net) +Date: Tue, 13 Apr 1999 18:41:30 GMT +Subject: $$$ Make Money While Surfing $$$ +Message-ID: +Content-Length: 8564 +X-UID: 795 + +An unregistered copy of Newsgroup AutoPoster 95 was used to post this article! +--- + +This e-mail is about a new company that has a completely mindblowing business model. They launched their service Monday, at Midnight eastern time, 9 pm Pacific. + +Without sounding corny or salesy, I want to encourage everyone to read this e-mail as soon as possible, because you can make a lot of money and the earlier you sign up, the more you can make. This is not a joke or a trick, it's not play money or worthless stock. It's cash. it is a new, free, Internet membership company. + +Because there is no money to put up front, no sales to make, no sales person contacting you, and no need to purchase anything, ther is NO RISK! This e-mail is long, because the concept needs explaining, but once you read it, you'll be stunned at how simple this is. + +We've all witnessed how the Internet is changing the rules of the game. Well a bunch of Stanford Computer Science PhDs are changing the way advertisers pay to reach consumers. Throughout time, advertisers have paid anyone who can aggregate a large quantity of people. TV Networks, Radio Stations, Magazine and Newspaper publishers, whoever can do it. The consumers, who advertisers are paying to reach, never get a dime of that money. These guys are changing that. They're essentially going to "unionize" consumers, so that consumers get paid by the advertisers, not the companies who aggregate those consumers. This idea is so simple that it's crazy. But it will work and anyone can sign up for free and make serious money. Please keep +reading. I know you think I've lost my mind, but keep reading. + +This company is called AllAdvantage. +(http://www.alladvantage.com/go.asp?refid=ATE-943) Here's how it works. It's completely free to participate. You don't have to buy anything, you don't have to sell anything, you don't have to change your web usage. If you go to their site and sign up, you'll have to enter you name, address, and the member number of who referred you. [That's me, Member ID# ATE-943] You'll +get your own Member ID number, and you'll soon be sent a little file to download, which appears as a long thin window that'll be open below your web browser. In this window will be a standard online advertisement, a rectangular banner like the one's you see on most web sites. You can +open it or close the window whenever you'd like, but for every hour you have that window open, you'll get $0.50. Up to 40 hours a month, so you could make $20 a month. Nice so far, but that's just the beginning...even better if you have a browser open most of the day at work. + +They are doing a pyramid payment plan to create a model where everyone is getting everyone else to sign up. Remember, it's completely free to participate, and you can always choose whether or not you want the window open. They'll pay you 10 cents for every hour that a person you refer +has this window open. For anyone those people refer, you get a nickel for every hour. For everyone they refer, you get a nickel also, and so on for 4 levels. This will generate big money for people who get in early. + +AN EXAMPLE +Let's say everyone has 10 people who joined entering their Member ID number. And let's also say everyone has this window open for 10 hours a month. You could easily make over $50,000 a month! Here's how. + +--You're on the web with this window open for 10 hours a month. 50 cents an hour is $5.00 +--The ten people who were referred by you have it open for 10 hours a month, that's 100 user-hours. 10 cents per hour is $10.00 +--Each of those 10 refer 10, that's 100 people, each on for 10 hours a month, that's 1000 user hours. 5 cents per hour is $50.00 +--Each of those 100 refer 10, that's 1000 people, each on for 10 hours a month, that's 10,000 user hours. 5 cents per hour is $500.00 +--Each of those 1000 refer 10, that's 10,000 people, each on for 10 hours a month, that's 100,000 user hours. 5 cents per hour is $5,000.00 +--Each of those 10,000 refer 10, that's 100,000 people, each on for 10 hours a month, that's 1,000,000 user hours. 5 cents per hour is $50,000.00 That's it. $55,565.00 per month. Just for getting 10 people to sign up and put your number in as who referred them. And if you get more people, you make more money. There's no limit. They're counting on the fact that you'll get tons of people. There are over 50 million internet users, and many have multiple PCs. People who get in early, could literally retire. + +WHY ARE THEY DOING THIS? +You're probably thinking that they'll have to pay out hundreds of millions of dollars to people, and your right, they will have to pay out hundreds of millions of dollars to consumers. But don't look at it from the macro level. Look at it from the micro level. It's so simple. AllAdvantage is paying 80 cents for every hour a user has this window open. (50 cents to the user, 10 cent to whoever referred them, 5 cents to the person who referred them, 5 cents to the person who referred them, 5 cents to the person who referred them, and 5 cents to the person who referred them). Every 20 seconds, a different ad rotates into the window, so 3 ads every minute, 180 ads every hour. If they can sell the 180 ads for more than 80 cents they're instantly profitable, and they'll be able to sell the ads for more. That's it. That's the whole thing. If they sell $10 million in advertising, they'll distribute $9 million or so to the users, and keep the rest. Everyone wins. + +Companies who rely on advertising spend a lot of money to attract an audience, and build and staff a product. AllAdvantage is just going to pay you as a valuable consumer and reward you for attracting an audience. A TV Network might put 90% of their ad revenue into programming and +operations, and keep 10% as profits. This company will give 90% of their ad revenue +to people who use them, and keep 10% for themselves. I told you it was simple. + +WHY WOULD YOU DO THIS? +Why not? It's completely free, and you can make a lot of money, finally getting paid for advertisers to reach you. It doesn't effect or interrupt your time on the web, you still spend the same time surfing as you always have, the same way you always have, the same sites you always have. The only difference is that you can have this window open below your web browser +if you want to, and you'll get paid for it. And if you tell a lot of people who also sign up, you'll get paid even more. Just sign up at http://www.alladvantage.com/go.asp?refid=ATE-943. + +THE SOONER THE BETTER +No matter when you sign up for this, you'll make some extra money. But the people who sign up earliest, will make loads of money. People are probably going to get very creative about how to tell as many people as quickly as possible. Some people may rent out e-mail lists and send it out to thousands of people at a time, or mention it in chat rooms or user groups. Others are spreading the word on college campuses and internationally. Who knows? The more you sign up the more you make, and the more they make. + +IS THIS A PYRAMID SCEME? +It's really not. It's kind of built on a similar premise, but it's totally free. There's no scheme! You don't pay anything or sell anything or spend your time any differently. In a pyramid scheme the last people in, lose. With this, the last person in still gets cash every month. Just not as much as the people who get in early. Just sign up, tell friends, and keep the window open if you want to. Advertisers will pay money to be in that window, and you'll get a very nice share of that money. You may have seen similar ideas where companies are giving away stock, or other things. This is different.. It's real. + + +OK, the race is on. My Member ID number is ATE-943. Please go to +http://www.alladvantage.com/go.asp?refid=ATE-943 and sign up. ID number. You'll be issued your own user number. Then cut and paste this email, changing the URL and the member ID number to your user number, and e-mail it to as many people as you can think of. Or mention this when +you're talking to friends, or in a chat room, or where ever! The more people who sign up, the more advertising revenue AllAdvantage generates, and the more we all get paid. Don't ignore this because it's "too simple" or "too good to be true". If you have any questions, please just go to the site and check it out. It's self explanatory. + +I love the Internet! + +WWB + +http://www.alladvantage.com/go.asp?refid=ATE-943 + +All Advantage Member ID# ATE-943 + + + + + + + + diff --git a/demo/ermis-f/python_m/cur/0796 b/demo/ermis-f/python_m/cur/0796 new file mode 100644 index 00000000..f3b502c2 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0796 @@ -0,0 +1,52 @@ +From: harms at mbnet.mb.ca (SH) +Date: Tue, 20 Apr 1999 19:13:24 GMT +Subject: Multiple menu-bars and processes under Tk? +Message-ID: +Content-Length: 1841 +X-UID: 796 + +Background: +Newbie to programming, who chose Python on a Linux box as the road to +enlightenment. + +Problem: +Pharmacokinetic calculations of multiple drugs given to a patient during +an Anesthetic should be displayed in a drugCollectionWindow for easy +overview, simulations and controll of drug infusions. + +This drugCollectionWindow would be similair or analog to a filing cabinet +drawer, with multiple "folders" or CalculatorInstances in place. Each +"folder" can be viewed either closed or open. In the closed position, the +appearance is similair to a horisontal menu-bar. One or more of the +horisontal menubars can be expanded to reveal more detail of the +CalculatorInstance. New menu-bars can be added on the fly. The order of +these menu-bars can be changed by the user and are not simply a function +of the sequence that new drugInstances were created. + +Each CalculatorInstance would represent a separate pharmacokinetic drug +calculation process that continues regardless whether the "folder" is open +or closed. (And possibly whether the drugCollectionWindow is open or +closed as well.) + +A screenshot of the proposed interface: gasnet.med.yale.edu/lamdi/21_lamdi.html + +Questions: + +1. Is there an existing Python/TK way of doing this under Linux ? I +looked at the PMW, but I could not find an example. + +2. Would you suggest to make a separate frame for each +CalculatorInstance? Can new ones be added on the fly? + +3. Let's say that the drugCollectionWindow is being closed. Is there a +way that the calculations can be continued and tracking resumed upon +opening another window? I.e. how can the program be designed that each of +the CalculatorInstances is a separate process (less chance of them all +crashing at the same time), but they can all be viewed and controlled from +one single window? + +Thank you for your consideration. + + + + diff --git a/demo/ermis-f/python_m/cur/0797 b/demo/ermis-f/python_m/cur/0797 new file mode 100644 index 00000000..28fd2e20 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0797 @@ -0,0 +1,30 @@ +From: Jack.Jansen at oratrix.com (Jack Jansen) +Date: Tue, 13 Apr 1999 12:10:33 +0200 +Subject: Error loading 'binascii' +References: <19990413032855.10759.qmail@nw179.netaddress.usa.net> +Message-ID: <37131819.A8372E9E@oratrix.com> +X-UID: 797 + +VICTOR KOLOSOV wrote: + +> % python +> Python 1.5.1 (#2, Oct 12 1998, 15:11:45) [GCC 2.7.2.1] on freebsd3 +> Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam +> >>> import binascii +> Traceback (innermost last): +> File "", line 1, in ? +> ImportError: /usr/local/lib/python1.5/lib-dynload/binascii.so: Undefined +> symbol "PyDict_SetItemString" +> >>> + +Victor, +could it be that you're trying to load a 1.5.2b-something dynamic module into a +1.5.1 Python? +-- +Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++ +Jack.Jansen at oratrix.com | ++++ if you agree copy these lines to your sig ++++ +www.oratrix.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm + + + + diff --git a/demo/ermis-f/python_m/cur/0798 b/demo/ermis-f/python_m/cur/0798 new file mode 100644 index 00000000..e7eb6cbd --- /dev/null +++ b/demo/ermis-f/python_m/cur/0798 @@ -0,0 +1,32 @@ +From: da at ski.org (David Ascher) +Date: Fri, 23 Apr 1999 21:00:33 -0700 (PDT) +Subject: PyOpenGL -- Scrollbars? +In-Reply-To: <7fq8se$5ti$1@nnrp1.dejanews.com> +Message-ID: +X-UID: 798 + +On Fri, 23 Apr 1999 mamcguire at my-dejanews.com wrote: + +> Hi All.. +> +> New to OpenGL so please bear with me. I'm trying to create an OpenGL port +> in my application to display images--only way to show more than 256 colors +> here on our SGIs. I've been having some difficulties: +> +> 1.) Any way to scroll via. scrollbars the OpenGL port? (like attaching +> to a canvas but that didn't seem to do the trick) + +No -- but you can find out from the scrollbars what the shift in +coordinates would be and adjust your drawing code in OpenGL to do the +appropriate thing. + +I will be posting code in the next PyOpenGL release which might do a lot +of what you need. Keep an eye out for it. + +--david + + + + + + diff --git a/demo/ermis-f/python_m/cur/0799 b/demo/ermis-f/python_m/cur/0799 new file mode 100644 index 00000000..67368e64 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0799 @@ -0,0 +1,35 @@ +From: jkraai at murl.com (jkraai at murl.com) +Date: Wed, 28 Apr 1999 18:37:55 GMT +Subject: Maximize Benefit when Purchasing Learning Python +Message-ID: <00e401be91a6$4d581750$8b7125a6@cpda6686.mcit.com> +X-UID: 799 + +How can I help whom when purchasing Python books? + +Haven't seen enough about this on the list lately & thought +it should come up again. + +I see on python.org a link to Amazon. I've seen in the +past that such links can generate a percentage to the +linking page. + +If I buy via this link, will python.org get something from +Amazon? + +If not, who does/can? If python.org can't get it, I'd like to +see that Mark Lutz gets a little more compensation for +his efforts. + +I'd rather direct the percentage to someone other than +Amazon (or O'Reiley) if I can. (I have nothing against +these fine companies.) + +Thanks, + +--jim + + + + + + diff --git a/demo/ermis-f/python_m/cur/0800 b/demo/ermis-f/python_m/cur/0800 new file mode 100644 index 00000000..163963d0 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0800 @@ -0,0 +1,29 @@ +From: news at dorb.com (Darrell) +Date: Tue, 6 Apr 1999 22:09:29 -0400 +Subject: Chaning instance methods +References: +Message-ID: +X-UID: 800 + +Hope this helps. + +>>> class X: +... def y(self): +... print 'y1' +... +>>> x=X() +>>> x.y() +y1 +>>> def y2(self=x): +... print 'y2' +... +>>> setattr(x,'y',y2) +>>> x.y() +y2 +>>> + + + + + + diff --git a/demo/ermis-f/python_m/cur/0801 b/demo/ermis-f/python_m/cur/0801 new file mode 100644 index 00000000..8653ffc9 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0801 @@ -0,0 +1,25 @@ +From: invalid.address at do.not.email (guppy) +Date: Thu, 22 Apr 1999 03:23:06 GMT +Subject: Python Win +References: <371E3B80.A6D5379@geocities.com> +Message-ID: <371f956b.70694328@news.bctel.ca> +X-UID: 801 + +On Wed, 21 Apr 1999 20:53:08 GMT, smoothasice at geocities.com wrote: + +>Ok i've been playing Python for a long time and I am just now wanting +>to expand to learning the visual portion of it.(A.k.a Gui/MFC) but I +>have found that there is a diffinite lack of information on the site and +>I Haven't been able to find a book and I was wondering if there is +>anyone out there that could help me out or perhaps direct me towards +>where I could find info on it. + +Could try wxPython. +-- +MSpeak: in-no-va-tion, n. 1. extending or modifying +existing standards in undocumented ways. 2. creating +new, undocumented standards. --de-com-mod-it-ize, v. + + + + diff --git a/demo/ermis-f/python_m/cur/0802 b/demo/ermis-f/python_m/cur/0802 new file mode 100644 index 00000000..d2f76d1a --- /dev/null +++ b/demo/ermis-f/python_m/cur/0802 @@ -0,0 +1,29 @@ +From: barry at scottbb.demon.co.uk (Barry Scott) +Date: Fri, 9 Apr 1999 20:44:41 +0100 +Subject: Embedding python question: PyRun_String only returns None not what I calculate +References: <923433832.14002.0.nnrp-07.9e982a40@news.demon.co.uk> +Message-ID: <923762066.17505.1.nnrp-03.9e982a40@news.demon.co.uk> +X-UID: 802 + +G. David Kuhlman wrote in message ... +>This is not the most convenient solution to your problem, but may +>be useful in your case. +> +>When you embed Python in an application, the application often +>exposes functions that are callable from Python scripts. You could +>provide a function named setReturnValue(value), which when called, +>passed a Python object (the value). The script calls this +>function, and then, when it exits, the embedding application (the +>caller of PyRun_String or PyRun_SimpleString) uses the Python value +>saved by this function. + + I thought of that buts its not a help accept in a few cases. + + + BArry + + + + + + diff --git a/demo/ermis-f/python_m/cur/0803 b/demo/ermis-f/python_m/cur/0803 new file mode 100644 index 00000000..3b1481fa --- /dev/null +++ b/demo/ermis-f/python_m/cur/0803 @@ -0,0 +1,46 @@ +From: tim_one at email.msn.com (Tim Peters) +Date: Thu, 29 Apr 1999 01:47:02 -0400 +Subject: Emacs' python-mode buggy? +In-Reply-To: <7g8np4$kvf@chronicle.concentric.net> +Message-ID: <000901be9203$b4c32e40$199e2299@tim> +Content-Length: 1249 +X-UID: 803 + +[Christopher Petrilli] +> ... +> WEll, I have noticed some problems with tripple-quoted strings on +> occasion, but I see similar problems in other modes, so I THINK it's +> something to do with how (x)emacs applie the font-lock-mode parameters. + +The Emacs language modes rely on heavy-duty functions written in C to do the +bulk of their parsing. These Emacs parsing functions are configurable, but +not quite configurable enough to capture all of Python's rules. In +particular, triple-quoted strings aren't in their repertoire and can't be +added, so given something like + + """ + "Hi!" I'm a doc string + """ + +Emacs "sees" it as a sequence of 4 strings with some crap in the middle: + + "" + "\n " + Hi! + " I'm a doc string\n " + "" + +elisp is too slow to do the character-at-a-time parsing that would be needed +to fix cases like this, so-- like all other language modes --pymode settles +for what it can get. AFAIK it should *never* screw up in the absence of +triple-quoted strings, though, and you can help it make sense of those by +pretending you're the Emacs C parsing function, using judicious backslash +escapes until you stop confusing yourself . + +you-want-to-see-a-nightmare-try-perl-mode-ly y'rs - tim + + + + + + diff --git a/demo/ermis-f/python_m/cur/0804 b/demo/ermis-f/python_m/cur/0804 new file mode 100644 index 00000000..3f4205a1 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0804 @@ -0,0 +1,48 @@ +From: rgruet at ina.fr (Richard GRUET) +Date: Thu, 15 Apr 1999 15:45:08 +0100 +Subject: 1.5.2 install problems on NT +References: <3714D8FF.634655C5@ina.fr> <8DA968455duncanrcpcouk@news.rmplc.co.uk> +Message-ID: <3715FB74.37EB984@ina.fr> +Content-Length: 1466 +X-UID: 804 + +Duncan Booth a ?crit : + +> Richard GRUET wrote in <3714D8FF.634655C5 at ina.fr>: +> +> >Tcl problems: +> >--------------- +> >...... +> > +> >This probably means that Tk wasn't installed properly. +> > +> +> I had exactly that problem. I think it means that you upgraded an old Tcl +> system but there are still copies of the old Tcl80.dll files lying around +> somewhere and python is finding those in preference to the new ones. +> Delete tcl80.dll from the \winnt\system32 directory or wherever they +> are, and add the tcl bin directory (e.g. D:\Progra~1\Tcl\Bin) to the end of +> your path in the control manager/system/environment settings. + +You're right, I have an old Tcl80.dll in my windows\system32 directory. I've +removed it and added the Tcl\bin path to my Path variable. +The old problem disappeared, but now when I launch for instance idle.pyw, I get +an error: +"The procedure entry point _Tcl_Gets could not be located in the dynamic linl +library tcl80.dll". + +There is no other copy of Tcl80.dll anywhere on my computer. My Tcl80.dll is +362 Kb and dated 99/03/08; and it actually doesn't export any _Tcl_Gets +procedure !! I precise that during install of the Python upgrade to 1.5.2, I've +selected the Tcl upgrade. + +Do you know the reason for that problem ? + +Thanks + +Richard +-------------- next part -------------- +An HTML attachment was scrubbed... +URL: + + diff --git a/demo/ermis-f/python_m/cur/0805 b/demo/ermis-f/python_m/cur/0805 new file mode 100644 index 00000000..dea96dcc --- /dev/null +++ b/demo/ermis-f/python_m/cur/0805 @@ -0,0 +1,56 @@ +From: tismer at appliedbiometrics.com (Christian Tismer) +Date: Mon, 19 Apr 1999 18:00:12 GMT +Subject: Memory and swapping question +References: <371B5ED8.A9C82170@appliedbiometrics.com> <199904191731.NAA03862@eric.cnri.reston.va.us> +Message-ID: <371B6F2C.D48C63BE@appliedbiometrics.com> +Content-Length: 1892 +X-UID: 805 + +Guido van Rossum wrote: +... +> > >>> x=range(big) +> > >>> del x +> > >>> +> > +> > On my system, creation takes about 10 times as for big/2, +> > this is ok. But the del takes at least three times as long. +> > Besides the fact that integers are never really disposed but +> > build up a freelist, why is deletion so much slower now? +> +> Clearly in the second case you're exceeding your physical memory and +> paging VM pages in and out of swap space? + +Yes, this was what I wanted to check out. + +> My guess: when creating the list you are allocating new VM pages, +> which don't require any overhead until they need to be written, but +> when deleting it, each page gets read from swap space, modified, and +> then written back. Thus, you're I/O bound, and deleting requires more +> I/O. + +Now I've got it. Right, since the structures almost fit main memory, +there is a little but not too much swapping, just pushing other +processes memory away. +Then, all the integers are deallocated which means they are +not deleted at all, but written again since they build up +the free list. This ensures that my whole memory gets written +to the disk. The same would happen if I'd read once through the +list. +But, not really. Doesn't this suggest to do memory deallocation +from the end to the start of a list? I could imagine that the +probability to touch something in memory is higher in this +case. Did someone try this before? (before I waste time) + +thanks & cheers - chris + +-- +Christian Tismer :^) +Applied Biometrics GmbH : Have a break! Take a ride on Python's +Kaiserin-Augusta-Allee 101 : *Starship* http://starship.python.net +10553 Berlin : PGP key -> http://wwwkeys.pgp.net +PGP Fingerprint E182 71C7 1A9D 66E9 9D15 D3CC D4D7 93E2 1FAE F6DF + we're tired of banana software - shipped green, ripens at home + + + + diff --git a/demo/ermis-f/python_m/cur/0806 b/demo/ermis-f/python_m/cur/0806 new file mode 100644 index 00000000..ee4df172 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0806 @@ -0,0 +1,36 @@ +From: nathan at islanddata.com (Nathan Clegg) +Date: Fri, 30 Apr 1999 09:32:46 -0700 (PDT) +Subject: while (a=b()) ... +In-Reply-To: <372942B5.729506A6@inka.de> +Message-ID: +X-UID: 806 + +Just because the language allows it doesn't mean you have to program it +that way. You could just as easily: + +fd = fopen("whatever", modus); +if (fd == NULL) { + ... + +which is just as clean as python. A little self-restraint should always +be preferrable over new mandates. Yer talkin' prohibition to stop drunk +driving. + +> I havn't any problems with that. Ok it makes C so terse and it's nice +> just to write some stuff but I completly dislike the following. +> +> +> if ((fd = fopen("whatever", modus)) == NULL)) +> /* here is error handling */ + + + +---------------------------------- +Nathan Clegg + nathan at islanddata.com + + + + + + diff --git a/demo/ermis-f/python_m/cur/0807 b/demo/ermis-f/python_m/cur/0807 new file mode 100644 index 00000000..81c35e4b --- /dev/null +++ b/demo/ermis-f/python_m/cur/0807 @@ -0,0 +1,66 @@ +From: MHammond at skippinet.com.au (Mark Hammond) +Date: Sat, 10 Apr 1999 10:26:02 +1000 +Subject: DLL Prob Win32com +References: +Message-ID: <7em5q8$fh6$1@m2.c2.telstra-mm.net.au> +Content-Length: 1826 +X-UID: 807 + +I would appreciate if you could confirm or deny the following (just so I can +get some data on this problem). + +Check your Windows\System directory for pywintypes15.dll and +pythoncom15.dll. Using Windows Explorer, view the properties of these +files, and there should be a "Version" tab. Check the build number in the +version. + +My guess is that the version is not the 124 version - for some reason the +installer neglected to overwrite the existing one. + +If this is true, you can use winzip to open win32all-124.exe and extract the +files, and replace the ones in your system directory. It should then work. + +Please let me know either way if this was your problem? + +Mark. + +Bernhard Reiter wrote in message ... +>Get strange errors, when using PythonWin (win32all-124) +>with Python 1.5.2b2 or 1.5.2c1 on this Windows 95 machine here. +>The installprogram said that +> AXScript, Python Interpreter and Python Dictionary +>couldn't be registered. Should be registered manually. +> +>How can I do that? +> +>When importing COM stuff, I get: +>import pythoncom +>Traceback (innermost last): File "", line 1, +>in ?ImportError: +>DLL load failed: A device attached to the system is not functioning. +> +>Reading documentation I know about possible old COM dlls as noted on +>http://starship.python.net/crew/mhammond/bigpond/Downloads.html +>but my error message seems to be different. +> +>That why I though I just ask again. :-) +>(Python.org is not reachable from here right now, so I cannot +>follow the link on Hammond's page to find out more about that DLLs.) +>Is it save to install them? +> +> +>Another thing: +>The example in the architecture.html file seems to be out of +>data. It should be: +> from pywin.mfc import dialog +> +>(it is just not nice, if beginners stumble over on of the first examples.) +> +>Regards, +> Bernhard + + + + + + diff --git a/demo/ermis-f/python_m/cur/0808 b/demo/ermis-f/python_m/cur/0808 new file mode 100644 index 00000000..aa061b00 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0808 @@ -0,0 +1,25 @@ +From: aa8vb at vislab.epa.gov (Randall Hopper) +Date: Fri, 16 Apr 1999 18:14:34 GMT +Subject: 1.5.2 broke IRIX module loading +In-Reply-To: <7f7gpf$r4a$1@nnrp1.dejanews.com>; from srowland@biocryst.com on Fri, Apr 16, 1999 at 02:17:30PM +0000 +References: <19990414110116.A1374923@vislab.epa.gov> <37161C26.C121CA1E@bioreason.com> <7f7gpf$r4a$1@nnrp1.dejanews.com> +Message-ID: <19990416141434.A1545732@vislab.epa.gov> +X-UID: 808 + +srowland at biocryst.com: + |> Randall Hopper: + |> > I built and tried 1.5.2 this morning, and it failed to load a module + |> > that worked fine on 1.5.1. + | + |Does this failure occur for all modules including standard + |Python Library modules or is it limited to some specialized module? + +The latter. It's an unresolved symbol issue that before didn't make any +difference. The new dlopen flags basically force every symbol to resolve +at link time whether they are used or not. + +Randall + + + + diff --git a/demo/ermis-f/python_m/cur/0809 b/demo/ermis-f/python_m/cur/0809 new file mode 100644 index 00000000..72f26d46 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0809 @@ -0,0 +1,50 @@ +From: l.szyster at ibm.net (Laurent Szyster) +Date: Wed, 21 Apr 1999 16:08:18 +0200 +Subject: Kosovo database; Python speed +References: <371DAAC2.D9046550@cs.utwente.nl> +Message-ID: <371DDBD2.A37EB85E@ibm.net> +Content-Length: 1451 +X-UID: 809 + +Richard van de Stadt wrote: +> +> Suppose we were going to make a database to help Kosovars locate +> their family members. This would probably result in hundreds of +> thousands of records (say 1 record (file) per person). +> +> Would Python be fast enough to manage this data, make queries on +> the data, or should compiled programs be used? + +Given the purpose I would suggest the following: + +1. Design an XML document which represents the entry form + refugees would fill in. Make it as complete as possible, + since you don't know what kind of statistics you will + have to produce from those forms. + +2. Make a small web application that collects those documents + and automatically store them in a Web as XML and HTML. Basically + it would consist of a CGI upload form. + +3. Use a web search engine to index the HTML web. + +What you end with is a effective way to collect data inputed +off-line, to publish and search it worldwide. With no need to +distribute software (everything happen on the web server). + +Later you may build your own database(s) from the web, once +there is enough data and you know which statistics you want ;-) + +Then mySQL should prove to be good enough. + + +Laurent +-------------- next part -------------- +A non-text attachment was scrubbed... +Name: l.szyster.vcf +Type: text/x-vcard +Size: 254 bytes +Desc: Card for Laurent Szyster +URL: + + diff --git a/demo/ermis-f/python_m/cur/0810 b/demo/ermis-f/python_m/cur/0810 new file mode 100644 index 00000000..f6a5351b --- /dev/null +++ b/demo/ermis-f/python_m/cur/0810 @@ -0,0 +1,15 @@ +From: fmwang at mediaone.net (Fuming Wang) +Date: Fri, 16 Apr 1999 17:26:44 -0400 +Subject: Quick fix to add "+=" +Message-ID: <3717AB14.2926AF76@mediaone.net> +X-UID: 810 + +Any one knows a quick fix to add "+=" function. I am really getting +tired of typing long names twice. + +Thanks a lot! +Fuming + + + + diff --git a/demo/ermis-f/python_m/cur/0811 b/demo/ermis-f/python_m/cur/0811 new file mode 100644 index 00000000..60b1975e --- /dev/null +++ b/demo/ermis-f/python_m/cur/0811 @@ -0,0 +1,40 @@ +From: bwarsaw at cnri.reston.va.us (Barry A. Warsaw) +Date: Thu, 22 Apr 1999 23:31:33 -0400 (EDT) +Subject: try vs. has_key() +References: + <371FC9A7.D3C77413@bioreason.com> +Message-ID: <14111.59797.258298.283889@anthem.cnri.reston.va.us> +Content-Length: 1095 +X-UID: 811 + +>>>>> "AD" == Andrew Dalke writes: + + AD> Barry's results showed that if 5% of the cases or + AD> less were "exceptional" then try/except is faster, otherwise, + AD> use has_key. Alas, I cannot find the URL for that paper. + + (sorry, I lost the +on-line version of the longer paper) + +I did the tests as part of my presentation at IPC6, against Python +1.5. While the numbers and exact trade-off might be different now, I +believe the general recommendations are still valid. If you expect to +get a hit on the key less than ~90% of the time, use has_key(). The +one pattern where you might be better off with try/except would be if +you're using a dictionary as a cache, where you'll only get a miss +once. + +Note that since then, dictionaries grew a get() method, which will +usually be better than both has_key() and try/except, depending on the +application. E.g.: + + dict[counterkey] = dict.get(counterkey, 0) + 1 + +With only one dictionary access and no exceptions, this is about as +fast as you're gonna get. + +-Barry + + + + diff --git a/demo/ermis-f/python_m/cur/0812 b/demo/ermis-f/python_m/cur/0812 new file mode 100644 index 00000000..6c8d1b6f --- /dev/null +++ b/demo/ermis-f/python_m/cur/0812 @@ -0,0 +1,17 @@ +From: mrfusion at bigfoot.com (mrfusion at bigfoot.com) +Date: Sat, 24 Apr 1999 05:31:31 GMT +Subject: GUI other than Tkinter +Message-ID: <3721567f.1748033@news> +X-UID: 812 + +Well, I've just about given up on EVER getting Tkinter to work on my +Win98 machine. Is there any other GUI module that I can get that +doesn't require TCL/TK to be installed on my machine? Isn't there +something called GD? + +Thanks, +Frustrated in Frisco..... + + + + diff --git a/demo/ermis-f/python_m/cur/0813 b/demo/ermis-f/python_m/cur/0813 new file mode 100644 index 00000000..5f613eb6 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0813 @@ -0,0 +1,38 @@ +From: thooney at pk.highway.ne.jp (Thooney Millennier) +Date: Tue, 27 Apr 1999 00:24:57 +0900 +Subject: To redirect stdin,out +Message-ID: <37248549.6AD365AC@pk.highway.ne.jp> +X-UID: 813 + +Hello,everyone. + +I want to redirect standard input and output +to my C++ stream object and +use something like PyRun_InteractiveLoop(). + +It seems we can redirect standard output by ... +(quoted from http://www.python.org/doc/FAQ.html) + + class StdoutCatcher: + def __init__(self): + self.data = '' + def write(self, stuff): + self.data = self.data +stuff + ToCppObject(self.data) #pass data to +C++ object + + import sys + sys.stdout = StdoutCatcher() + print 'foo' + +I am at a loss how to redirect standard input. +If you know any solutions,Please Help! + + +Thanks for reading. + +Thooney Millennier + + + + diff --git a/demo/ermis-f/python_m/cur/0814 b/demo/ermis-f/python_m/cur/0814 new file mode 100644 index 00000000..54595074 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0814 @@ -0,0 +1,67 @@ +From: fredrik at pythonware.com (Fredrik Lundh) +Date: Tue, 20 Apr 1999 13:48:50 GMT +Subject: Tkinter performance +References: <371B4B39.8B78BC7A@foreman.ac.rwth-aachen.de> <19990420083759.A133486@vislab.epa.gov> +Message-ID: <020701be8b34$8960b810$f29b12c2@pythonware.com> +Content-Length: 2419 +X-UID: 814 + +Randall Hopper wrote: +> Note that the canvas seems to have respectable optimizations in place so +> the less that is visible (e.g. the more you're zoomed in, the faster +> redraws get. Also if only a partial area needs redrawn, it redraws it +> fairly quickly relative to the full-expose frame rate. It's obvious +> there's some optimization going on when you load to make drawing faster. + +some background: the canvas widget uses a straight-forward +"damage/repair" model. changes to the canvas, and external +events such as Expose, all update a single "dirty rectangle". +they also register an idle task (after_idle) which redraws the +canvas when you get back to the main loop. + +when it's time to redraw the canvas, the widget starts by +allocating a pixmap (on X windows, this is an image memory +stored on the display) with the same size as the dirty rectangle. +it then loops over the canvas items, and redraws *all* items +whose bounding box touch the dirty rectangle (this means +that diagonal lines may be redrawn also if they don't actually +cover the rectangle, but this is usually no big deal). finally, +the widget copies the pixmap to the display (this last step is +a very fast operation on all modern hardware), and releases +the pixmap. + +a few additional notes: + +-- most Tk widgets use double-buffering to prevent flicker +(this includes simple widgets like buttons and labels). there's +no way to change this in current version of Tk. + +-- most Tk widgets also use delayed drawing. that is, they +respond to modifications and external events by scheduling +an idle task, not by updating the screen directly. there's +no way to change this in current versions of Tk. + +-- the repeated allocation of pixmaps can seriously affect +performance if you're animating stuff in a maximized window +on a large truecolor display... (we all have 1800x1440 24-bit +displays, don't we?) + +-- since the canvas uses a *single* dirty rectangle, you can +get better performance in some situations by forcing updates. +for example, if you're changing things in different parts of the +canvas without returning to the main loop, adding explicit +calls to update_idletasks() allows the canvas to update a +few small rectangles, instead of a large one with many more +objects. + +-- the text widget is a bit smarter than the canvas... + +-- guess I should mention uiToolkit here, but I'll leave that +for another day... + + + + + + + diff --git a/demo/ermis-f/python_m/cur/0815 b/demo/ermis-f/python_m/cur/0815 new file mode 100644 index 00000000..282c2e01 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0815 @@ -0,0 +1,66 @@ +From: tismer at appliedbiometrics.com (Christian Tismer) +Date: Mon, 19 Apr 1999 16:50:33 GMT +Subject: Memory and swapping question +Message-ID: <371B5ED8.A9C82170@appliedbiometrics.com> +Content-Length: 1588 +X-UID: 815 + +Hi folks, + +due to a question which came up in the tutor list, I'd like +to ask if somebody can explain the following: + +(This is true for Python 1.5 under Win98 and Suse Linux at least) + +Remember the size of your machine's main memory in MB. +On my machine, this is 64. + +Start a fresh Python session with not many other tasks +active at the same time. + +Now, divide the number by 16 and multiply by a million. + +>>> my_mb = 64 +>>> big = my_mb / 16 * 1000000 +>>> big +4000000 + +(16 is a good guess for one integer entry in a list: +4 bytes the pointer, 12 bytes the object). + +Now, create a list of numbers with the half of big, +and count the seconds. Afterwards, delete the list +and again count the seconds. + +>>> x=range(big/2) +>>> del x +>>> + +This will be quite fast, and the deletion will be somewhat +faster than the creation. + +Now for the big WHY? +Do the same with big. + +>>> x=range(big) +>>> del x +>>> + +On my system, creation takes about 10 times as for big/2, +this is ok. But the del takes at least three times as long. +Besides the fact that integers are never really disposed but +build up a freelist, why is deletion so much slower now? + +cheers - chris + +-- +Christian Tismer :^) +Applied Biometrics GmbH : Have a break! Take a ride on Python's +Kaiserin-Augusta-Allee 101 : *Starship* http://starship.python.net +10553 Berlin : PGP key -> http://wwwkeys.pgp.net +PGP Fingerprint E182 71C7 1A9D 66E9 9D15 D3CC D4D7 93E2 1FAE F6DF + we're tired of banana software - shipped green, ripens at home + + + + diff --git a/demo/ermis-f/python_m/cur/0816 b/demo/ermis-f/python_m/cur/0816 new file mode 100644 index 00000000..84d8d916 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0816 @@ -0,0 +1,119 @@ +From: tim_one at email.msn.com (Tim Peters) +Date: Fri, 30 Apr 1999 02:24:01 -0400 +Subject: FP exception, core dump in Python 1.5.2 (Tim's doing ) +In-Reply-To: <290419992258582791%pereira@research.att.com> +Message-ID: <001401be92d2$09dcb800$5fa02299@tim> +Content-Length: 4380 +X-UID: 816 + +[Fernando Pereira] +> Unfortunately, the Alpha implementation of IEEE FP does not handle +> overflow gracefully. With the default C compilation flags, the code +> generated cannot recover from an overflow to stuff an Inf in the +> result, so the only thing the OS can do is to kill the process. +> Alternatively, with appropriate flags (can't remember them from the top +> of my head, had to deal with this 6 months ago), the C compiler adds +> machine instructions to allow recovery from FP exceptions, including +> storing Inf as a result of overflow. + +Mark (Favas) got around this by recompiling with -ieee. However, the Python +code I posted still didn't work for him. Code that does is attached, and +those with a passion for fp esoterica will be rolling on the floors with +childlike glee, delighting in the extreme convolutions this required . + +> Unfortunately, FP performance in this mode is not nearly as good. None +> of the other machines I use (SGI, Sun, Intel, Mac) have this problem. + +The Alpha is a silly chip <0.9 wink>. Denorms are a pain in the butt when +designing fast FP HW, but overflowing to an infinity is trivial (consider +that it's already got the logic to detect the overflow and signal an +exception as a result -- all they need to do instead is pass on a fixed, +simple bit pattern as the result). + +> On the other hand, none of them comes close to an Alpha in FP +> performance (with the dafault `fast' compilation setting). Tradeoffs... + +Luckily, Python's FP performance is poor on every platform . + +the-alpha-is-a-cray-cpu-that-somehow-forgot-the-vectors-ly y'rs - tim + +"""Module ieee: exports a few useful IEEE-754 constants and functions. + +PINF positive infinity +MINF minus infinity +NAN a generic quiet NaN +PZERO positive zero +MZERO minus zero + +isnan(x) + Return true iff x is a NaN. +""" + +def _make_inf(): + x = 2.0 + x2 = x * x + i = 0 + while i < 100 and x != x2: + x = x2 + x2 = x * x + i = i + 1 + if x != x2: + raise ValueError("This machine's floats go on forever!") + return x + +# NaN-testing. +# +# The usual method (x != x) doesn't work. +# Python forces all comparisons thru a 3-outcome cmp protocol; unordered +# isn't a possible outcome. The float cmp outcome is essentially defined +# by this C expression (combining some cross-module implementation +# details, and where px and py are pointers to C double): +# px == py ? 0 : *px < *py ? -1 : *px > *py ? 1 : 0 +# Comparing x to itself thus always yields 0 by the first clause, and so +# x != x is never true. +# If px and py point to distinct NaN objects, a strange thing happens: +# 1. On scrupulous 754 implementations, *px < *py returns false, and so +# does *px > *py. Python therefore returns 0, i.e. "equal"! +# 2. On Pentium HW, an unordered outcome sets an otherwise-impossible +# combination of condition codes, including both the "less than" and +# "equal to" flags. Microsoft C generates naive code that accepts +# the "less than" flag at face value, and so the *px < *py clause +# returns true, and Python returns -1, i.e. "not equal". +# So with a proper C 754 implementation Python returns the wrong result, +# and under MS's improper 754 implementation Python yields the right +# result -- both by accident. It's unclear who should be shot . +# +# Anyway, the point of all that was to convince you it's tricky getting +# the right answer in a portable way! + +def isnan(x): + """x -> true iff x is a NaN.""" + # multiply by 1.0 to create a distinct object (x < x *always* + # false in Python, due to object identity forcing equality) + if x * 1.0 < x: + # it's a NaN and this is MS C on a Pentium + return 1 + # Else it's non-NaN, or NaN on a non-MS+Pentium combo. + # If it's non-NaN, then x == 1.0 and x == 2.0 can't both be true, + # so we return false. If it is NaN, then assuming a good 754 C + # implementation Python maps both unordered outcomes to true. + return 1.0 == x == 2.0 + +PINF = _make_inf() +MINF = -PINF + +NAN = PINF - PINF +if not isnan(NAN): + raise ValueError("This machine doesn't have NaNs, " + "'overflows' to a finite number, " + "suffers a novel way of implementing C comparisons, " + "or is 754-conformant but is using " + "a goofy rounding mode.") +PZERO = 0.0 +MZERO = -PZERO + + + + + + diff --git a/demo/ermis-f/python_m/cur/0817 b/demo/ermis-f/python_m/cur/0817 new file mode 100644 index 00000000..8661fc77 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0817 @@ -0,0 +1,37 @@ +From: phd at sun.med.ru (Oleg Broytmann) +Date: Sat, 3 Apr 1999 14:35:10 GMT +Subject: GadFly - MemoryError +Message-ID: +Content-Length: 1025 +X-UID: 817 + +Hello! + + I tried to add yeat another database backend to my project "Bookmarks +database". My database contains now about 3000 URLs, not too much, I think. +I subclass by BookmarksParser to parse bookmarks.html into gadfly database +and got a database of 500 Kbytes - very small database, I hope. + Then I tried to find duplicates (there are duplicates). I ran the query: + +SELECT b1.rec_no, b2.rec_no, b1.URL + FROM bookmarks b1, bookmarks b2 +WHERE b1.URL = b2.URL +AND b1.rec_no < b2.rec_no + + GadFly eats all memory and fails with MemoryError. Is it that gadfly +really constructs multiplication of b1 and b2, thus getting 3000*3000 +pairs? Or I just did something wrong? + I tried to create indicies, but this was not of any help. + + BTW, where are indicies stored? After creating ones I didn't find +additional files - only one file in the database changed. + +Oleg. +---- + Oleg Broytmann National Research Surgery Centre http://sun.med.ru/~phd/ + Programmers don't die, they just GOSUB without RETURN. + + + + + diff --git a/demo/ermis-f/python_m/cur/0818 b/demo/ermis-f/python_m/cur/0818 new file mode 100644 index 00000000..434655f4 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0818 @@ -0,0 +1,21 @@ +From: jcosby at wolfenet.com (Jon Cosby) +Date: Mon, 26 Apr 1999 17:44:44 -0700 +Subject: CGI post method +Message-ID: <7g31ah$hk2$1@sparky.wolfe.net> +X-UID: 818 + +Can somebody tell me what's wrong with the following form tag: + +

+ + + +My script isn't getting the text as input. + +Jon Cosby + + + + + + diff --git a/demo/ermis-f/python_m/cur/0819 b/demo/ermis-f/python_m/cur/0819 new file mode 100644 index 00000000..539886c3 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0819 @@ -0,0 +1,39 @@ +From: Gaetan_Corneau at baan.com (Gaetan Corneau) +Date: Wed, 14 Apr 1999 18:17:21 GMT +Subject: what do you do with Python +Message-ID: <816010E2456BD111A48700805FBBE2EEA63EFA@ex-quebec-u1.baan.com> +X-UID: 819 + +Susan, + +To see what Python does, take a look at http://www.python.org + +If you want python job ads, take a look at http://www.dice.com +There are many :) + +Ciao, +______________________________________________________ + Gaetan Corneau + Software Developer (System integration Team) + BaaN Supply Chain Solutions + E-mail: Gaetan_Corneau at baan.com + Compuserve: Gaetan_Corneau at compuserve.com + ICQ Number: 7395494 + Tel: (418) 654-1454 ext. 252 +______________________________________________________ +"Profanity is the one language all programmers know best" + +> -----Original Message----- +> From: susan e paolini [SMTP:tville at earthlink.net] +> Sent: Wednesday, April 14, 1999 1:02 PM +> To: python-list at cwi.nl +> Subject: what do you do with Python +> +> I never see jobs with Python advertised so what is it that Python does? +> Thanks for the advice +> +> + + + + diff --git a/demo/ermis-f/python_m/cur/0820 b/demo/ermis-f/python_m/cur/0820 new file mode 100644 index 00000000..eebf35e1 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0820 @@ -0,0 +1,34 @@ +From: MHammond at skippinet.com.au (Mark Hammond) +Date: Wed, 14 Apr 1999 09:50:06 +1000 +Subject: Event in COM +References: <3713C3A5.59CB36E5@bigfoot.com> +Message-ID: <7f0l5u$cg5$1@m2.c2.telstra-mm.net.au> +X-UID: 820 + +You can only get events from an OCX by using code from within Pythonwin. + +You can subclass from the generated code. + +You should check out the Pythonwin demos. Depending on the version you +have, these will be either in "pywin\Demos" or "pywin\Demos\ocx". You +should look for "ocxserialtest.py", "ocxtest.py", "webbrowser.py" and a +later one "msoffice.py" + +Mark. + +Hoon Yoon wrote in message <3713C3A5.59CB36E5 at bigfoot.com>... +>Hi, +> +> Can anyone show me some code or recommend me a book for this problem? +>I look through the newsgroup and tried to read the source, but I cannot +>figuire it out. (Thanks in Adv) +> I am trying to write an event handler for a ocx control that receives +>real time data. Obviously, I cannot retrieve anything without event +>handelers. + + + + + + + diff --git a/demo/ermis-f/python_m/cur/0821 b/demo/ermis-f/python_m/cur/0821 new file mode 100644 index 00000000..3fae4d58 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0821 @@ -0,0 +1,21 @@ +From: bwarsaw at cnri.reston.va.us (Barry A. Warsaw) +Date: 16 Apr 1999 15:49:30 -0400 +Subject: restore sources from PYC [Q] +References: <000101be879c$8aed0670$6eba0ac8@kuarajy.infosys.com.ar> <37177D8E.FF43BF65@bigfoot.com> <7f80ii$7m0@journal.concentric.net> +Message-ID: <61r9pk1h2t.fsf@anthem.cnri.reston.va.us> +X-UID: 821 + +>>>>> "CP" == Christopher Petrilli writes: + + CP> Seriously, this is a non-event that people use to spread FUD, + CP> but it exists in all languages. The simplicity with which it + CP> can be done changes, but it's never more than a freshman + CP> college project. + +Which is why almost every binary license I've ever stayed awake to +fully read includes text like "you may not decompile, disassemble, +reverse-engineer" blah, blah, blah! :-) + + + + diff --git a/demo/ermis-f/python_m/cur/0822 b/demo/ermis-f/python_m/cur/0822 new file mode 100644 index 00000000..8b818b02 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0822 @@ -0,0 +1,19 @@ +From: aa8vb at vislab.epa.gov (Randall Hopper) +Date: Fri, 30 Apr 1999 08:40:34 -0400 +Subject: IDLE - How to change shell color +Message-ID: <19990430084034.A783805@vislab.epa.gov> +X-UID: 822 + + I have a monitor with good brightness, so its very hard to read the +brightly colored text on a bright white background. + + How do I change the background color to something a little dimmer? +(What is IDLE's equivalent to -xrm "*gui_resource: value"?) + +Thanks, + +Randall + + + + diff --git a/demo/ermis-f/python_m/cur/0823 b/demo/ermis-f/python_m/cur/0823 new file mode 100644 index 00000000..f040b4e5 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0823 @@ -0,0 +1,28 @@ +From: phd at sun.med.ru (Oleg Broytmann) +Date: Thu, 22 Apr 1999 14:49:34 +0400 (MSD) +Subject: 1.5.2 Build Snag +In-Reply-To: <43DT2.3365$56.12822@typhoon-sf.pbi.net> +Message-ID: +X-UID: 823 + +Hi! + +On Thu, 22 Apr 1999, Charles Y. Choi wrote: +> In trying to build Python 1.5.2 on a Sparc Solaris 2.5.1 machine +> using gcc 2.8.1 I get this: + + I had no problems building on exactly the same environment: + +>>> python +Python 1.5.2 (#1, Apr 15 1999, 12:17:41) [GCC 2.8.1] on sunos5 +Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam + +Oleg. +---- + Oleg Broytmann National Research Surgery Centre http://sun.med.ru/~phd/ + Programmers don't die, they just GOSUB without RETURN. + + + + + diff --git a/demo/ermis-f/python_m/cur/0824 b/demo/ermis-f/python_m/cur/0824 new file mode 100644 index 00000000..6e41692c --- /dev/null +++ b/demo/ermis-f/python_m/cur/0824 @@ -0,0 +1,65 @@ +From: aa8vb at vislab.epa.gov (Randall Hopper) +Date: Tue, 6 Apr 1999 11:26:49 GMT +Subject: Possible regex match bug (re module) +In-Reply-To: <000001be7fc9$bdb0fec0$65a22299@tim>; from Tim Peters on Mon, Apr 05, 1999 at 09:06:45PM -0400 +References: <19990405084819.B802985@vislab.epa.gov> <000001be7fc9$bdb0fec0$65a22299@tim> +Message-ID: <19990406072649.A867123@vislab.epa.gov> +Content-Length: 2028 +X-UID: 824 + +Tim Peters: + |> Re doesn't handle named groups in alternative patterns like it + |> seems it should. Given an alternative pattern with a particular group + |> name in each, it only assigns the match if the group name matches the + |> last alterative. + | + |re should raise an exception here -- it never intended to allow your + |pattern. The deal is that symbolic group names are no more than that: + |names for numbered groups. Like so: + +Thanks for the reply Tim. BTW, what's "re never intended...". A little AI +at work in that module? :-) + +Well, to the point, it seems to me it would be more intuitive to have named +groups in alternatives to be assigned strings only when an alternative is +matched. It certainly yields more readable regexes: + + '(---(?P[^-]*)---)|(===(?P[^=]*)===)' + r"([-=])\1\1(?P((?!\1).)*)\1\1\1" + +In which is it more apparent what the patterns are? Or even how many there +are? + +Also, as I noted, I simplified this example a good bit so that the re +behavior would be apparent. The original regex was a good bit more +complex. Basically it was parsing fields from a spreadsheet text import +file, where the fields are delimeted by commas, but fields can be single or +double quoted so that commas and spaces can be embedded: + + 1,"Brown, Charlie",127.37,Hi + +The field match regex for this wouldn't be as simple to collapse into a +single regex as you did above, and assuming it is possible, the result +would have been very tough to decipher. I think we're also stuck in +attempting to do this if the prefixes don't match the suffixes, and the +named group matches aren't virtually identical. + + I'll post the regex later. I'm not at the box it's sitting on right now. + + BTW, what I ended up doing (again, continuing with the trivial example +regex), was something like this: + + '(---(?P[^-]*)---)|(===(?P[^=]*)===)' + + str = id1 or id2 + +It just seemed to make since that I should be able to use "id" for both and +just say "str = id". + +Thanks, + +Randall + + + + diff --git a/demo/ermis-f/python_m/cur/0825 b/demo/ermis-f/python_m/cur/0825 new file mode 100644 index 00000000..de6ed10c --- /dev/null +++ b/demo/ermis-f/python_m/cur/0825 @@ -0,0 +1,43 @@ +From: moshez at math.huji.ac.il (Moshe Zadka) +Date: Wed, 7 Apr 1999 09:53:15 +0200 +Subject: Python and the Singleton Pattern +In-Reply-To: <7ee4si$sec$2@antiochus.ultra.net> +References: <37048D53.5D1ED05F@lemburg.com> <7ee4si$sec$2@antiochus.ultra.net> +Message-ID: +X-UID: 825 + +On Tue, 6 Apr 1999, Neelakantan Krishnaswami wrote: + +> Isn't it possible to make use of Python's dynamism to turn any +> class into a singleton class, as needed? + + + +The problem with that, of course, is that it makes inheritance from +a singleton class impossible. + +How about: + +class MySingleton: + class _my_dummy: pass + _dummy=_my_dummy() + _initialized=0 + def __init__(self, ....): + if initialized: return + ...... + def __getattr__(self, attr): + return _dummy.__dict__[attr] + + def __setattr__(self, attr, val): + _dummy.__dict__[attr]=val + +(I haven't tested it, but is seems like it should work) +-- +Moshe Zadka . +QOTD: What fun to me! I'm not signing permanent. + + + + + diff --git a/demo/ermis-f/python_m/cur/0826 b/demo/ermis-f/python_m/cur/0826 new file mode 100644 index 00000000..02416ae9 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0826 @@ -0,0 +1,44 @@ +From: saric at bph.ruhr-uni-bochum.de (Marc Saric) +Date: Thu, 29 Apr 1999 10:06:27 +0200 +Subject: IDLE ! +References: <371ADC8C.54C4CDBE@zipzap.ch> <3728126B.E35F4464@bph.ruhr-uni-bochum.de> +Message-ID: <37281303.73BB69A4@bph.ruhr-uni-bochum.de> +X-UID: 826 + +Boris Borcic wrote: +> +> I am having my first look at 1.5.2 and IDLE (on Win95). +Had that look too, and found it a very nice and usefull tool: + +Some things I would like to see in an updated version: + +Cursor-up-and-down-history in the command shell, like in PTUI. + +Some key-bindings seem to be problematic (at least with a german +keyboard; you cant press "CTRL+ [" for indentation for example). + +On Unix (SuSE 6.0 to be exact) I can't manage to get proper +Windows-style copy and paste (CTRL+C, CTRL+V) (I don' like the +Unix-key-bindungs, and therefore changed that to the +windows-settings). + +Maybe it's just me who is too stupid, and someone may help me... + + +-- +Bye, + + +Marc Saric + + +Lehrstuhl fuer Biophysik +Projektgruppe Theoretische Biophysik +http://www.bph.ruhr-uni-bochum.de/ + +Ruhr-Universitaet Bochum +Germany + + + + diff --git a/demo/ermis-f/python_m/cur/0827 b/demo/ermis-f/python_m/cur/0827 new file mode 100644 index 00000000..94980275 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0827 @@ -0,0 +1,44 @@ +From: moshez at math.huji.ac.il (Moshe Zadka) +Date: Sat, 24 Apr 1999 20:41:16 +0300 +Subject: CSV Module +Message-ID: +Content-Length: 1087 +X-UID: 827 + +I wonder if there is some standard module out there that can parse +``CSV'' files. Or, if anyone knows where the documentation of that format +can be had. + +Here is my meek attempt at an answer. It is not certain to work, as I am +not sure about the format -- I was guessing from looking at the file. + +-------------- begin python code ------------------ +import re +csv_entry=re.compile('(?:"[^"]*",)|(?:[^,]*,)') +eol=re.compile('\015?\012') +CSVError='csv.CSVError' + +def csv2list(line): + line, n = eol.subn(',', line) + if not n: raise CSVError, 'record not complete' + ret=[] + while 1: + m=csv_entry.match(line) + if not m: break + len = m.end() + field, line = line[:len], line[len:] + if field[0]=='"': field=field[1:-2] + else: field=field[:-1] + ret.append(field) + return ret +----------------- end python code ----------------------------- + +Thanks in advance. +-- +Moshe Zadka . +QOTD: What fun to me! I'm not signing permanent. + + + + + diff --git a/demo/ermis-f/python_m/cur/0828 b/demo/ermis-f/python_m/cur/0828 new file mode 100644 index 00000000..5851a97b --- /dev/null +++ b/demo/ermis-f/python_m/cur/0828 @@ -0,0 +1,61 @@ +From: clarence at silcom.com (Clarence Gardner) +Date: Mon, 12 Apr 1999 07:03:13 GMT +Subject: forking + stdout = confusion +Message-ID: +Content-Length: 1947 +X-UID: 828 + +I have a program running in Python 1.5.1 under FreeBSD 2.1.7. +It happens to be a nph-type CGI program. Normally, it runs a +report that can take quite a while, and I'm trying to add an +option to delay the start. I defined this function: + +def LateShift(): + OutputID = `os.getpid()` + Child = os.fork() + if Child: + print 'content-type: text/plain' + print + print '''The program is waiting to run later. The output will + be available with the id number of %s. + ''' % OutputID + sys.exit(0) + sys.stdin.close() + sys.stdout.close() + sys.stderr.close() + sys.stdout = open(os.path.join(SpoolDir, OutputID), 'w') + sys.stderr = sys.stdout + time.sleep(15) + +The idea is that, after forking, one of the processes will tell the +user how to get the report output later, then exit, and the other +will wait until some appropriate time and the run the report, with +the output going to a file that normally goes to the web browser. + +The problem is that the browser's connection to the server is not +being closed until the actual report is done (i.e., until the caller +of this function exits). It seems to me that the three standard +I/O streams are closed (which they are immediately in both processes), +that should do it. Being an nph program, there should be no connection +to the HTTP server (which is Apache), but just in case it was waiting +for the child process to exit, I had the parent (Apache's child) exit +immediately and its child do the waiting, but it works the same either +way. + +I thought that maybe sys.stdout was using a dup()'ed copy of stdout, +but I checked sys.stdout.fileno() and it was 1, so that doesn't seem +to be the case. + +Can anyone hazard a guess (or see right off the top of his head) what's +going on here? Thanks for any help. + +-- +-=-=-=-=-=-=-=-= +Clarence Gardner +AvTel Communications +Software Products and Services Division +clarence at avtel.com + + + + diff --git a/demo/ermis-f/python_m/cur/0829 b/demo/ermis-f/python_m/cur/0829 new file mode 100644 index 00000000..7b240602 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0829 @@ -0,0 +1,34 @@ +From: claird at Starbase.NeoSoft.COM (Cameron Laird) +Date: 27 Apr 1999 16:55:34 -0500 +Subject: Python and C +References: <37243B44.AE6231AE@serop.abb.se> +Message-ID: <7g5bom$g4n$1@Starbase.NeoSoft.COM> +X-UID: 829 + +In article <37243B44.AE6231AE at serop.abb.se>, thstr wrote: +>Hi +> +>I'm writing a function-test-program i C (no C++ involved). +>It will parse header-files, extracting functions and types to some +>information module. That module should be used for declaring variables +>and calling functions. One module for every logically grouped set of +>functions (like a class). +>I would like to add some kind of command interpreter to which you can +>type commands like "test functionA(arg1, arg2, ...)" and automatically +>find a declaration for this function i above mentioned module. +>For some reasons I'd like this interpreter in Python (like a static +>module), linked with C at compile time, is this possible?? + . + . + . +It's more than possible. It's a well-established practice. +comp.lang.python is the newsgroup where you'll find the best +help on this topic. +-- + +Cameron Laird http://starbase.neosoft.com/~claird/home.html +claird at NeoSoft.com +1 281 996 8546 FAX + + + + diff --git a/demo/ermis-f/python_m/cur/0830 b/demo/ermis-f/python_m/cur/0830 new file mode 100644 index 00000000..045f2959 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0830 @@ -0,0 +1,37 @@ +From: gmcm at hypernet.com (Gordon McMillan) +Date: Wed, 14 Apr 1999 01:47:48 GMT +Subject: threads +In-Reply-To: +References: <1288080841-20523503@hypernet.com> + +Message-ID: <1288067824-21306356@hypernet.com> +X-UID: 830 + +Eric Lee Green writes: + +> Ah. Okay. So Python is doing user-land threads and not Posix +> (OS-level) threads? + +Nope. Those are OS threads. It's just that there's an interpreter +lock, which only gets released every N byte-code instructions. + +Except, of course, that blocking operations (like socket I/O) will +release the lock before doing their thing, then reacquire it to get +the stuff back into Python. + +Check the archives of the thread-SIG for more than you could ever +possibly want to know... + +> The difference between the two doesn't make a difference for my +> application, but I'd be curious to know in case I ever want to run +> this on an SMP machine (where only OS-level threads are schedulable +> on multiple processors). + +Sorry. SMP won't get you any benefit at this stage. + + +- Gordon + + + + diff --git a/demo/ermis-f/python_m/cur/0831 b/demo/ermis-f/python_m/cur/0831 new file mode 100644 index 00000000..4a7723e1 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0831 @@ -0,0 +1,40 @@ +From: joe at strout.net (Joe Strout) +Date: Thu, 29 Apr 1999 10:45:02 -0700 +Subject: GUI and creating GIF +References: <7g7u2k$fr0$1@wanadoo.fr> +Message-ID: +Content-Length: 1117 +X-UID: 831 + +[[ This message was both posted and mailed: see + the "To," "Cc," and "Newsgroups" headers for details. ]] + +In article <7g7u2k$fr0$1 at wanadoo.fr>, Frank.Derville + wrote: + +> I would like to +> 1) create a GIF file under Python by drawing lines, text, ... I have looked +> at Tk which can create bitmaps and photoimage but their seem to be no +> possibility to transform a canvas into a photoimage. +> 2) rotate some text on a canvas. + +You can do this with PIL (Python Imaging Library), but it's a little +painful. + +You can also try PIDDLE, which is still under development -- but it can +do this if you're brave. It's the piddlePIL backend that you'd want. +See: http://www.strout.net/python/piddle/ for more info. + +Cheers, +-- Joe + +-- +,------------------------------------------------------------------. +| Joseph J. Strout Biocomputing -- The Salk Institute | +| joe at strout.net http://www.strout.net | +`------------------------------------------------------------------' +Check out the Mac Web Directory! http://www.strout.net/macweb.cgi + + + + diff --git a/demo/ermis-f/python_m/cur/0832 b/demo/ermis-f/python_m/cur/0832 new file mode 100644 index 00000000..9d1f21a0 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0832 @@ -0,0 +1,69 @@ +From: barry at scottbb.demon.co.uk (Barry Scott) +Date: Tue, 13 Apr 1999 22:42:21 +0100 +Subject: Windows install has problems. Guido asked that I use this newsgroup to discus further +Message-ID: <924039873.18221.0.nnrp-12.9e982a40@news.demon.co.uk> +Content-Length: 2234 +X-UID: 832 + +THis is Guido's reply to my comments that tcl80.dll is not found +by IDLE on a default installation. + +> > > Running "IDLE (Python GUI)" reports that tcl80.dll is +> > > not in my path then the shell comes up and I can +> > > use Tkinter from the shell. +> > > +> > > Just in case this might be involved my Windows NT system +> > > is on G: not C:. +> > +> > To solve this one, I think you'll have to edit your autoexec.bat to +> > add the Tcl directory (containing that DLL) to the PATH variable. For +> > various reasons I do not believe it is a good idea to copy the Tcl/Tk +> > DLL files into the Python directory, nor do I think it is possible to +> > reliably edit autoexec.bat in the installer. Instead, Tkinter.py +> > imports a hack module, FixTk.py, which searches for tcl80.dll in a few +> > places and then patches the PATH environment variable of the running +> > process, but this is not failsafe either. :-( +> +> It would be nice if I did not have to edit the path manually. +> Suggest that the install edits the path or you use the registry +> to find the tcl80.dll image. + +I wish I could. The installer is very stupid. Windows sucks :-( + +> 1) The PATH is a registry key on NT. I don't have an autoexec.bat, +> isn't for MS-DOS compatibility only these days? + +No, it's still needed on Windows 98 and 98. + +> The machines PATH is in +> +> HKEY_LOCAL_MACHINE\CurrentControlSet\Control\Session Manager\Environment +> +> 2a) I notice that HKEY_CLASSES_ROOT\TclShell\shell\open\command +> contains a default value which is how to run wish. e.g. +> +> G:\PROGRA~1\Tcl\bin\wish80.exe "%1" +> +> tcl80.dll is in the same dir as wish80.exe. +> +> 2b) +HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\SharedDlls +> lists all the shared files on the system. There is an value +> "G:\Program Files\Tcl\bin\tcl80.dll" with the date 0x0000001 against it. +> +> 2c) HKEY_LOCAL_MACHINE\SOFTWARE\Scriptics\Tcl\8.0 +> contains the default value field with the data G:\PROGRA~1\Tcl +> +> The DLL being in data + "\tcl80.dll". +> +> BArry +Please take it up on the newsgroup -- there are many people with +similar interests and more understanding of Windows than I have! + +--Guido van Rossum (home page: http://www.python.org/~guido/) + + + + + + diff --git a/demo/ermis-f/python_m/cur/0833 b/demo/ermis-f/python_m/cur/0833 new file mode 100644 index 00000000..dab7a00d --- /dev/null +++ b/demo/ermis-f/python_m/cur/0833 @@ -0,0 +1,32 @@ +From: arcege at shore.net (Michael P. Reilly) +Date: Tue, 06 Apr 1999 14:24:53 GMT +Subject: [IRC] Has anyone created a useful IRC module? +References: +Message-ID: +X-UID: 833 + +Alexander Williams wrote: +: Has anyone written a module in the spirit of telnetlib that would +: facilitate writing an IRC bot that connects to the server and can +: communicate with the core? Such a beast would definitely facilitate +: writing decent Bots ... such as the one I'd like to put together. + +I have a preliminary IRC application framework. It has a working +Tkinter and curses interface, but it was designed for just about any +interface, including a bot. The API is the based on the IRC command +set (not any one client) and the protocol. + +The URL is http://www.shore.net/~arcege/python/Pyirc-1.5.tar.gz. As, +I said it is preliminary so there isn't much (any) documentation. But +it should give you some ideas. + +And before you ask *wink*, no I didn't want just a single module. +There are too many features that a bot/client will want to make just a +"simple" module, IMO. + + -Arcege + + + + + diff --git a/demo/ermis-f/python_m/cur/0834 b/demo/ermis-f/python_m/cur/0834 new file mode 100644 index 00000000..854bb451 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0834 @@ -0,0 +1,46 @@ +From: sweeting at neuronet.com.my (sweeting at neuronet.com.my) +Date: Sat, 24 Apr 1999 17:14:10 GMT +Subject: precompiled MySQL.pyd anyone ? (NT workstation) +Message-ID: <7fsu50$bss$1@nnrp1.dejanews.com> +Content-Length: 1095 +X-UID: 834 + +Digging up a previous thread but asking anyone working on NT/Win32 : +is there a precompiled MySQL.pyd anywhere ? Have checked the starship +members' pages and python site without luck. + +Thank you, + +chas + +-------------------------------------------------------------- + +>Randy Trigg wrote: +>> So my question is, does anyone have a pre-compiled win32 +>> module for use with mxODBC that contains this DriverConnect +>> function? (Judging from the source, it looks like a +>> compile-time flag may determine whether your mxODBC pyd +>> includes that function or not.) +> +>Randy, +> +>I have a copy of Nigel Head's (?) win32/MySQL dynamic +>link libraries: libmySQL.dll and MySQL.pyd. I've used +>them long enough to test access from NT to a database +>running on Solaris ... and promptly fled back to the +>safety of Unix. ;-) +> +>If the libraries aren't available elsewhere, I'll place +>them on the starship. +> +>Best regards, +> +>Jeff Bauer +>Rubicon, Inc. + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/0835 b/demo/ermis-f/python_m/cur/0835 new file mode 100644 index 00000000..476a3346 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0835 @@ -0,0 +1,48 @@ +From: aa8vb at vislab.epa.gov (Randall Hopper) +Date: Fri, 16 Apr 1999 18:48:31 GMT +Subject: Tkinter - the app that wouldn't quit +Message-ID: <19990416144831.A1548022@vislab.epa.gov> +Content-Length: 1085 +X-UID: 835 + + I'm writing a test wrapper for a dialog module that doesn't terminate +the application. How can I exit the test program when the dialog is +dismissed? + + Attached is a minimal version that illustrates the problem. When it +self.destroy()'s itself, we're hung. mainloop() is still spinning. +As you can see, I did try WM_DELETE_WINDOW. + +Thanks for any tips, + +Randall + +-------------- next part -------------- +#!/usr/bin/env python + +import sys +from Tkinter import * +from ScrolledText import ScrolledText + +class CommandWindow(ScrolledText): + + def __init__(self, master=None, **cnf): + apply(ScrolledText.__init__, (self, master), cnf) + +class CommandWindowDialog(Toplevel): + + def __init__(self, master=None, **cnf): + apply(Toplevel.__init__, (self, master), cnf ) + self.title( 'COMMAND OUTPUT' ) + win = CommandWindow( self ) + win.pack(expand=1, fill=X) + btn = Button( self, text="Quit", command=self.destroy ) + btn.pack() + +root = Tk() +w = CommandWindowDialog( root ) +w.protocol( 'WM_DELETE_WINDOW', sys.exit ) +root.wm_withdraw() +w.mainloop() + + diff --git a/demo/ermis-f/python_m/cur/0836 b/demo/ermis-f/python_m/cur/0836 new file mode 100644 index 00000000..380ffd8c --- /dev/null +++ b/demo/ermis-f/python_m/cur/0836 @@ -0,0 +1,26 @@ +From: han.holl at pobox.com (Han Holl) +Date: 9 Apr 1999 18:38:32 GMT +Subject: simple dbm question +References: <370D55D9.B75ECE47@hons.cs.usyd.edu.au> +Message-ID: <370E4927.B5E03D52@pobox.com> +X-UID: 836 + +> +> Is there GDBM database "hew"? If not - you need to create it: +> +> import anydbm +> file = anydbm.open('hew', 'w') +> + +Actually, it should be: + file = anydbm.open('hew', 'c') + +'w' is for read/write an _existing_ database. + +(Of course, for ordinary file open, you need 'w'! ) + +Han + + + + diff --git a/demo/ermis-f/python_m/cur/0837 b/demo/ermis-f/python_m/cur/0837 new file mode 100644 index 00000000..53aeb8c8 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0837 @@ -0,0 +1,47 @@ +From: flight at mathi.uni-heidelberg.de (Gregor Hoffleit) +Date: 21 Apr 1999 19:53:57 GMT +Subject: Buglet: egcs' name is too long for Python startup message +Message-ID: +Content-Length: 1130 +X-UID: 837 + +A small annoyance: When I compile Python on a Debian system with egcc, +the startup message is cut-off strangely: + + freefly:1> python + Python 1.5.2 (#0, Apr 21 1999, 14:13:38) [GCC egcs-2.91.66 Debian + GNU/Linux (egc on linux2 + Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam + >>> + +This is due to a short printf field in Python/getversion.c. Certainly +Guido didn't think that some compiler might use a 54 char __VERSION__ like +"egcs-2.91.66 Debian GNU/Linux (egcs-1.1.2 release)" :-) + +Therefore, the correct startup message would be: + + Python 1.5.2 (#0, Apr 21 1999, 14:49:42) [GCC egcs-2.91.66 Debian + GNU/Linux (egcs-1.1.2 release)] on linux2 + +The following patch should do no harm to anything else, therefore I'd like +to see it applied. + + Gregor + + +--- python-1.5.2.orig/Python/getversion.c ++++ python-1.5.2/Python/getversion.c +@@ -39,7 +39,7 @@ + Py_GetVersion() + { + static char version[100]; +- sprintf(version, "%.10s (%.40s) %.40s", PY_VERSION, ++ sprintf(version, "%.10s (%.40s) %.80s", PY_VERSION, + Py_GetBuildInfo(), Py_GetCompiler()); + return version; + } + + + + + diff --git a/demo/ermis-f/python_m/cur/0838 b/demo/ermis-f/python_m/cur/0838 new file mode 100644 index 00000000..10c60e5c --- /dev/null +++ b/demo/ermis-f/python_m/cur/0838 @@ -0,0 +1,36 @@ +From: tim_one at email.msn.com (Tim Peters) +Date: Sat, 17 Apr 1999 17:08:39 GMT +Subject: sys.path.insert - how to make it global? +In-Reply-To: <19990417113121.A1627033@vislab.epa.gov> +References: <19990417113121.A1627033@vislab.epa.gov> +Message-ID: <000301be88f4$f0096d60$ee9e2299@tim> +X-UID: 838 + +[Stefan Franke] +> sys.path *is* already global, though only accessible via the +> sys module's namespace. Just give it a try. + +[Randall Hopper] +> I'd already tried that. It's effect doesn't appear to be global: +> +> # Augment search path to pull in our C library wrappers +> sys.path.insert( 0, '/home/mylogin/Wrappers' ) +> +> import MapFile +> +> This allows Python to find MapFile, but this doesn't allow MapFile to +> import other modules in that same Wrappers directory. + +Randall, try posting a minimal set of failing code. This works for everyone +else on the face of the earth, so the hope is that in trying to whittle your +code down you'll come face to face with the demon who's clouding your mind +. If MapFile is C code, it's more likely that you're writing C-level +imports incorrectly. + +debugging-as-exorcism-ly y'rs - tim + + + + + + diff --git a/demo/ermis-f/python_m/cur/0839 b/demo/ermis-f/python_m/cur/0839 new file mode 100644 index 00000000..f45293a0 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0839 @@ -0,0 +1,32 @@ +From: gmcm at hypernet.com (Gordon McMillan) +Date: Wed, 7 Apr 1999 19:10:45 GMT +Subject: File objects in extension module +In-Reply-To: <370B9414.68053816@natinst.com> +References: <370B9414.68053816@natinst.com> +Message-ID: <1288610052-78686891@hypernet.com> +X-UID: 839 + +Mike Steed writes: +> +> I am trying to use a file object passed from Python to a C extension +> module (Windows 98). All the C runtime calls crash when I pass them +> the FILE pointer (fwrite, fflush, etc.) +> +> The pointer I get back from PyFile_AsFile seems okay -- the struct +> members have reasonable values, etc. +> +> I have seen the same behavior with MS VC++ (4.2) and egcs/mingw32 +> (1.1.2), and with Python-1.5.1 and 1.5.2b2. +> +> What am I missing? + +You need the same build / link options as Python - specifically, you +need to use the Multithreaded DLL for c runtime support. Otherwise +you're trying to manipulate one file from 2 separate copies of the c +runtime. Kablooie. + +- Gordon + + + + diff --git a/demo/ermis-f/python_m/cur/0840 b/demo/ermis-f/python_m/cur/0840 new file mode 100644 index 00000000..e748ac0a --- /dev/null +++ b/demo/ermis-f/python_m/cur/0840 @@ -0,0 +1,62 @@ +From: wesc at rocketmail.com (Wesley J. Chun) +Date: Fri, 16 Apr 1999 22:43:36 GMT +Subject: what do you do with Python +References: <3714C9EA.86C0A4E@earthlink.net> <199904142107.XAA19293@axil.hvision.nl> +Message-ID: <7f8eem$nak$1@nnrp1.dejanews.com> +Content-Length: 2312 +X-UID: 840 + +In article <199904142107.XAA19293 at axil.hvision.nl>, + "Hans Nowak" wrote: +> On 14 Apr 99, Ce'Nedra took her magical amulet and heard susan e paolini say: +> +> >I never see jobs with Python advertised so what is it that Python does? + +hi susan, + +yes, you have to still look somewhat *deep* to find jobs with "python* +there, but they *are* there. contracting jobs as well as full-time. +in fact, my group at work is hiring someone where python would be a +good skill to have (although unfortunately not a full-time python job!) + +> +> Hmm, seriously though, it's good for a lot of things. I'm sure that there are +> lots of people around who can explain it better than I can, but I'll give it +> a try anyway. Python is a highly flexible and dynamic language, useful for +> programs ranging from simple scripts to large projects (for instance, the +> Grail web browser). It's also very readable and thus maintainable. It +> provides ways for object-oriented, procedural and even functional programming +> (to some extent). If Python itself doesn't do what you want, you can extend +> it in C, or possibly another language if your platform allows it. + +it is esp. great for when c/c++/java is too "heavy" to use, +but shell scripts, etc., are too weak to handle. it's the +perfect, "in-between" language! + +> +> Myself, I'm using it for just about everything now. I wrote a Magic the +> Gathering database & search engine, a Vedic astrology program, a board game, +> a signature file generator, a spell checker, a card game, an ftp thingy, etc. +> etc. and *lots* of little scripts to make life easier. + +stuff we have done with python... let's see, lots of scripts +as mentioned above, software that manages all the dirty nightly +tasks, statistics gathering programs, schedule-management stuff, +hardware monitoring systems, web-based email systems :-), etc. + +some day soon, not only will you *see* python in the job descrip- +tion, but it will also be "required." :*) + +-wesley + +------------------------------------------------------------------------ +"A computer never does what you want... only what you tell it." + +Wesley J. Chun + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/0841 b/demo/ermis-f/python_m/cur/0841 new file mode 100644 index 00000000..fa03d14c --- /dev/null +++ b/demo/ermis-f/python_m/cur/0841 @@ -0,0 +1,25 @@ +From: moshez at math.huji.ac.il (Moshe Zadka) +Date: Sat, 10 Apr 1999 10:27:32 +0200 +Subject: Idiom for Getting Slices of a List +Message-ID: +X-UID: 841 + +Hi. + +I want a clean, and relatively efficient method to do the following: +I have an array of length, n*m and I want to make it an array of +length m, where each member is an array of length n. + +Example: n=2, m=3 +[0, 1, 2, 3, 4, 5] ==> [[0, 1], [2, 3], [4, 5]] + +Anyone? + +-- +Moshe Zadka . +QOTD: What fun to me! I'm not signing permanent. + + + + + diff --git a/demo/ermis-f/python_m/cur/0842 b/demo/ermis-f/python_m/cur/0842 new file mode 100644 index 00000000..76a1b19f --- /dev/null +++ b/demo/ermis-f/python_m/cur/0842 @@ -0,0 +1,22 @@ +From: arcege at shore.net (Michael P. Reilly) +Date: Wed, 28 Apr 1999 18:28:52 GMT +Subject: Python implementation of tar +References: <7ftjjl$tim$1@nnrp1.dejanews.com> +Message-ID: +X-UID: 842 + +frankmcgeough at my-dejanews.com wrote: +: Does someone has a tar implementation written in Python? + +I don't know of one, but I just wrote this in the last 45 minutes or +so. + http://www.shore.net/~arcege/python/tar.py + +It only reads the tarfiles for now, and doesn't handle blocking (yet). + + -Arcege + + + + + diff --git a/demo/ermis-f/python_m/cur/0843 b/demo/ermis-f/python_m/cur/0843 new file mode 100644 index 00000000..e9dc09ea --- /dev/null +++ b/demo/ermis-f/python_m/cur/0843 @@ -0,0 +1,33 @@ +From: aahz at netcom.com (Aahz Maruch) +Date: Mon, 19 Apr 1999 14:38:04 GMT +Subject: Why no "=" in if? (was Re: Quick fix to add "+=") +References: <3717EE20.41343593@mediaone.net> <371B2C29.594AE647@pop.vet.uu.nl> +Message-ID: +X-UID: 843 + +In article <371B2C29.594AE647 at pop.vet.uu.nl>, +Martijn Faassen wrote: +>Blake Winton wrote: +> +>[assignment in expression rears its head again] +> +>> Hitler! Hitler! Hitler! +>> You're all Hitler! +> +>Hey, that doesn't work; intentional calling upon Nazis to end a thread +>isn't support to work. I read it in a FAQ on this (I forget the name for +>the 'law') just recently. :) + +Godwin's Law. +-- + --- Aahz (@netcom.com) + +Hugs and backrubs -- I break Rule 6 <*> http://www.rahul.net/aahz/ +Androgynous poly kinky vanilla queer het + +"You often don't really understand the problem until after the first +time you implement a solution." - Eric S. Raymond + + + + diff --git a/demo/ermis-f/python_m/cur/0844 b/demo/ermis-f/python_m/cur/0844 new file mode 100644 index 00000000..1b9cd4f2 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0844 @@ -0,0 +1,48 @@ +From: befletch at my-dejanews.com (befletch at my-dejanews.com) +Date: Fri, 30 Apr 1999 00:13:31 GMT +Subject: Trouble with proxies +Message-ID: <7gasj8$g79$1@nnrp1.dejanews.com> +Content-Length: 1558 +X-UID: 844 + +Hello again everyone, + +I have tried all the suggestions people have sent me, and I have tried all +the local debugging I could think of, but I still can't see the world from +behind my proxy server. Can anyone find a possible solution to this? I've +had to modify my URL lines with (colin-slash-slash) to get past DejaNews' +Draconian posting filters: + + +C:\>SET http_proxy=http(colin-slash-slash)10.187.200.230 + +C:\>"C:\Program Files\Python\python.exe" +Python 1.5.2 (#0, Apr 13 1999, 10:51:12) [MSC 32 bit (Intel)] on win32 +Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam +>>> import urllib +>>> u=urllib.urlopen('http(colin-slash-slash)www.yahoo.com') +Traceback (innermost last): + File "", line 1, in ? + File "C:\Program Files\Python\Lib\urllib.py", line 59, in urlopen + return _urlopener.open(url) + File "C:\Program Files\Python\Lib\urllib.py", line 157, in open + return getattr(self, name)(url) + File "C:\Program Files\Python\Lib\urllib.py", line 266, in open_http + errcode, errmsg, headers = h.getreply() + File "C:\Program Files\Python\Lib\httplib.py", line 121, in getreply + line = self.file.readline() + File "C:\Program Files\Python\Lib\plat-win\socket.py", line 117, in readline + new = self._sock.recv(self._rbufsize) +IOError: [Errno socket error] (10054, 'winsock error') +>>> + + +I'm just out of ideas on how to solve this one. Thanks for any pointers, +- Bruce + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/0845 b/demo/ermis-f/python_m/cur/0845 new file mode 100644 index 00000000..a9ec9aca --- /dev/null +++ b/demo/ermis-f/python_m/cur/0845 @@ -0,0 +1,44 @@ +From: claird at Starbase.NeoSoft.COM (Cameron Laird) +Date: 26 Apr 1999 15:05:41 -0500 +Subject: GUI other than Tkinter +References: <3721567f.1748033@news> <7g1a8h$fae$1@Starbase.NeoSoft.COM> +Message-ID: <7g2gul$faf$1@Starbase.NeoSoft.COM> +Content-Length: 1193 +X-UID: 845 + +In article , Lloyd Zusman wrote: +>claird at Starbase.NeoSoft.COM (Cameron Laird) writes: +>> . +>> . +>> . +>> +> +>I appreciate this useful list. +You're welcome. Please be aware that I often +know more than what appears in these documents; +I might not get around to expressing it readably, +though, until someone expresses a definite interest. +When you ask particular questions, as you do below, +sometimes I can unpack other notes of mine and +update the documents to make them more useful. +That's what I'm working to do now with the fltk +reference. +> +>Also ... I noticed a refernce to `fltk' on this list, and I downloaded +>and built it. However, I don't notice any Python support as part of +>this distribution, and I'm wondering why `fltk' is on this "Python GUI" +>list. Is there somewhere else where a Python interface to `fltk' +>might exist? +I've sent a copy of your question to a couple +of people likely to know more. + . + . + . +-- + +Cameron Laird http://starbase.neosoft.com/~claird/home.html +claird at NeoSoft.com +1 281 996 8546 FAX + + + + diff --git a/demo/ermis-f/python_m/cur/0846 b/demo/ermis-f/python_m/cur/0846 new file mode 100644 index 00000000..7e4495dd --- /dev/null +++ b/demo/ermis-f/python_m/cur/0846 @@ -0,0 +1,35 @@ +From: steve at blighty.com (Steve Atkins) +Date: Sat, 24 Apr 1999 14:52:51 GMT +Subject: wrapped around the axle on regexpressions and file searching +References: <7frhe0$8g1$1@nnrp1.dejanews.com> <1287155028-45807148@hypernet.com> +Message-ID: <372ed9f3.497562737@192.168.1.1> +X-UID: 846 + +On Sat, 24 Apr 1999 15:21:03 GMT, "Gordon McMillan" + wrote: + +>msrisney writes: + +>> here are my questions: 1. this prints out not only files with the +>> file extensions ".log" but also any file name that has "log" in it's +>> name. how would I rewrite to avoid?? +> +>In a regex, a "." is a wildcard character. If you want a literal "." +>you need to escape it: +> re.compile('\\.log') +>or +> re.compile(r'\.log') + +Wouldn't that be re.compile('\\.log$'), so as to avoid things like +tree.log.jpg? + +doesn't-yet-grok-python-but-does-grok-regexps-ly y'rs + +Steve +-- +-- Steve Atkins -- steve at blighty.com + + + + + diff --git a/demo/ermis-f/python_m/cur/0847 b/demo/ermis-f/python_m/cur/0847 new file mode 100644 index 00000000..1960ccd6 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0847 @@ -0,0 +1,51 @@ +From: dacut at kanga.org (David Cuthbert) +Date: Fri, 23 Apr 1999 20:21:53 -0400 +Subject: Emulating C++ coding style +References: <371F8FB7.92CE674F@pk.highway.ne.jp> +Message-ID: <7fr2q8$4ne@world1.bellatlantic.net> +Content-Length: 1667 +X-UID: 847 + +William Tanksley wrote: +> On Fri, 23 Apr 1999 06:08:07 +0900, Thooney Millennier wrote: +> >2. stream class +> > e.g. cout << "hello python."< +> VERY bad idea. Bad even in C++. + +Out of curiosity, why is this a "VERY bad idea"? Personally, I really like +the ideas behind the streams interface in C++ (though the implementations +are usually somewhat lacking) and use Python file objects in the same +manner. Am I doing something wrong? + +For that matter, I don't see how C++ streams are really any different than +Python's file objects. To summarise: + +In C++: Base interface definition in {i,o}stream and streambuf. +In Python: Base interface definition in file objects. + +In C++: New streams are defined by inheriting from {i,o}stream and + streambuf, and by providing an implementation for the relevant + methods. +In Python: New streams are defined by providing methods with the same + name and arguments as those for files. + +In C++: User-defined classes are streamed in/out by providing: + ostream& operator << (ostream&, UserClass const&) + istream& operator >> (istream&, UserClass&) + methods/functions (or by using a persistence library). +In Python: Classes are streamed in/out by providing a __str__() method + or by using one of the (nicely built-in :-) persistence + modules. + +The biggest difference that I can see is that C++ methods are static (i.e., +checked and linked at compile time) vs. dynamic in Python (which is how you +get away without inheriting from a file base class). But this isn't +specific to streams. + + + + + + + diff --git a/demo/ermis-f/python_m/cur/0848 b/demo/ermis-f/python_m/cur/0848 new file mode 100644 index 00000000..1b83b5c7 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0848 @@ -0,0 +1,32 @@ +From: spamfranke at bigfoot.de (Stefan Franke) +Date: Tue, 20 Apr 1999 20:17:18 GMT +Subject: Bit Arrays +References: <7fi9i8$n2u$1@info3.fnal.gov> +Message-ID: <371cdadc.73180347@news.omnilink.de> +X-UID: 848 + +There is no bit or bit array type directly supported by Python. + +Are you in need of a memory-optimal solution? In that case +I would suggest to use the array module. Otherwise it should +be no problem using a list of lists. + +What about NumPy? + +Stefan + +On Tue, 20 Apr 1999 11:21:24 -0500, "Laura Paterno" wrote: + +>Hello all, +> +>I want to write a python program that has 26 Bit Arrays that each contain +>1113 bits. Is there a structure in python that one can use to represent a +>bit array? +> +>Laura Paterno +> + + + + + diff --git a/demo/ermis-f/python_m/cur/0849 b/demo/ermis-f/python_m/cur/0849 new file mode 100644 index 00000000..c96a8f71 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0849 @@ -0,0 +1,43 @@ +From: aa8vb at vislab.epa.gov (Randall Hopper) +Date: Tue, 27 Apr 1999 07:47:49 -0400 +Subject: Problem while Installing.. +In-Reply-To: <3720DF98.8CEC8D8F@aachen.heimat.de>; from Christian Scholz on Fri, Apr 23, 1999 at 09:01:13PM +0000 +References: <3720DF98.8CEC8D8F@aachen.heimat.de> +Message-ID: <19990427074749.B579158@vislab.epa.gov> +Content-Length: 1121 +X-UID: 849 + +Christian Scholz: + |Hi everybody! + | + |I have a strange problem right now: + | + |'import exceptions' failed; use -v for traceback + |Warning! Falling back to string-based exceptions + |Fatal Python error: Cannot create string-based exceptions + |IOT trap/Abort + | + |This I get when I try to install a new compiled Python 1.5.2 on my Linux + |Box. It was working before and did this after I told configure to use + |threads.. This message appears when the installation process wants to + |start compiling the modules (compileall.py). I tried importing it then + |by hand with my installed python which worked (The actual python + |interpreter is installed before the compile process, right?) and I then + |changed the Makefile to use the installed python which worked. But now + |when I want to use Python it says the same. + | + |Any idea what happens? + +Yeah, been there done that :-) + +This may not be your problem, but see if $PYTHONPATH is set. If so, unset +it until you finish building and installing python. It confuses the build +(it overrides the configured system search path, so python can't find +itself). + +Randall + + + + + diff --git a/demo/ermis-f/python_m/cur/0850 b/demo/ermis-f/python_m/cur/0850 new file mode 100644 index 00000000..10dde884 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0850 @@ -0,0 +1,48 @@ +From: cgw at fnal.gov (Charles G Waldman) +Date: Tue, 27 Apr 1999 20:52:21 GMT +Subject: Long integers getting short shrift? +Message-ID: <14118.9093.292465.438475@buffalo.fnal.gov> +Content-Length: 1215 +X-UID: 850 + +The functions Py_BuildValue and PyArg_ParseTuple don't seem to be +listed in the index of the Python/C API documentation. They are only +described in the Embedding and Extending docs. + +The "L" format code for Long integers is not described anywhere, +AFAICT. I discovered it by reading source. + +It seems that if you are on a system without the "long long" type then +the "L" format char is not available. The "L" format performs the +same function as the "PyLong_FromLongLong" function, but there's no +format character to get me the equivalent of "PyLong_FromLong". So, +if I am calling a Python function from C which is expecting a long int +as an arg, I am forced to write + +result = PyObject_CallFunction(func, "O", PyLong_FromLong(x)); + +which isn't terrible but isn't as nice as writing + +result = PyObject_CallFunction(func, "L", x); + +which I can only do if the system has "long long" and x is of that +type... I'd like to be able to get regular C integers into Python +long's. + +One reason for wanting this is that I often use long's in Python to +hold what would be in C an "unsigned int" - since there's no +"unsigned" type in Python, to represent a 32-bit value without +sign-bit I use a Python long. + + + + + + + + + + + + + diff --git a/demo/ermis-f/python_m/cur/0851 b/demo/ermis-f/python_m/cur/0851 new file mode 100644 index 00000000..757dae18 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0851 @@ -0,0 +1,58 @@ +From: fdrake at cnri.reston.va.us (Fred L. Drake) +Date: Fri, 30 Apr 1999 20:05:17 GMT +Subject: Python documentation updated! +Message-ID: <14122.3325.631762.383828@weyr.cnri.reston.va.us> +Content-Length: 1739 +X-UID: 851 + + The documentation for Python 1.5.2 is now available. The online +version is available at: + + http://www.python.org/doc/ + + Archives of the documentation in HTML, LaTeX, PDF, and PostScript +formats are available at the same location, and may also be downloaded +via FTP from: + + ftp://ftp.python.org/pub/python/doc/ + + If you have any questions or comments on the documentation, please +send email to: + + python-docs at python.org + + Many modules have been documented (166 total!), including both new +and old modules. There have been some additional refinements of the +"look" of the online version, especially for those of you with CSS +enabled in your Web browsers. There is also more extensive +hyperlinking within the Python Library Reference for your convenience. + + A new document, "Documenting Python", is now included. Though still +young, this is a useful reference for documentation contributors. It +includes a great deal of information on the markup used for the Python +documentation, as well as a discussion of where we'll go from here. + + Windows users: If you installed Python using the installer rather +than by building from source, you can get the updated documentation by +downloading the HTML archive and unpacking it into the "Doc" directory +of your installation. + + Some re-organization of the documentation area on the Web site +should make it easier to locate and download documentation. + + Thanks go out to all the individuals who have contributed sections +or sent in comments and bug reports; this release of the documentation +is substantially better thanks to the efforts of the Python community! + + Enjoy! + + + -Fred + +-- +Fred L. Drake, Jr. +Corporation for National Research Initiatives + + + + diff --git a/demo/ermis-f/python_m/cur/0852 b/demo/ermis-f/python_m/cur/0852 new file mode 100644 index 00000000..e44b5e7a --- /dev/null +++ b/demo/ermis-f/python_m/cur/0852 @@ -0,0 +1,26 @@ +From: cgw at fnal.gov (Charles G Waldman) +Date: Fri, 9 Apr 1999 15:12:30 GMT +Subject: import from user input? +In-Reply-To: <370E0F51.E1D33D6@appliedbiometrics.com> +References: <816010E2456BD111A48700805FBBE2EEA63EB9@ex-quebec-u1.baan.com> + <370E0F51.E1D33D6@appliedbiometrics.com> +Message-ID: <14094.6366.328759.966352@buffalo.fnal.gov> +X-UID: 852 + +Christian Tismer writes: + > + > import string + > globals()[string.split(modname, ".")[0]] = __import__(modname) + > + > seems to do it better. + > + +Why not just + +exec "import "+modname + +? + + + + diff --git a/demo/ermis-f/python_m/cur/0853 b/demo/ermis-f/python_m/cur/0853 new file mode 100644 index 00000000..dcdf714b --- /dev/null +++ b/demo/ermis-f/python_m/cur/0853 @@ -0,0 +1,23 @@ +From: janssen at parc.xerox.com (Bill Janssen) +Date: Fri, 30 Apr 1999 17:46:26 GMT +Subject: CORBA IDL AND SCRIPTS +In-Reply-To: <3729E026.D9D29B1@ppllc.com> +References: <3729E026.D9D29B1@ppllc.com> +Message-ID: +X-UID: 853 + +IDL support is available for both Python and Perl. That is, you can +take your IDL specs and generate scripting-language support for the +types and interfacees specified in that IDL. With systems like ILU, you +can do the same sort of thing that SWIG does -- link your C (or other +language) code with your Python, glued together automatically by code +generated by ILU from your IDL. There's an example of doing this in the +examples/multlang directory of the ILU source release. + +More ILU info at ftp://ftp.parc.xerox.com/pub/ilu/ilu.html. + +Bill + + + + diff --git a/demo/ermis-f/python_m/cur/0854 b/demo/ermis-f/python_m/cur/0854 new file mode 100644 index 00000000..e4d52bd2 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0854 @@ -0,0 +1,60 @@ +From: dcalvelo at lailp2pc2.univ-lille1.fr (Daniel Calvelo) +Date: 26 Apr 1999 13:13:40 GMT +Subject: HELP! NumPy (Graphics) and Linux +References: <7fvpsh$l8e$1@nnrp1.dejanews.com> +Message-ID: <7g1oq4$hi6$1@netserv.univ-lille1.fr> +Content-Length: 1749 +X-UID: 854 + +kelvin_chu at my-dejanews.com wrote: +: Hi all; + +Hi, Kelvin. + +: I've had great success with EZplot and now want to move my code to Linux- +: based platforms in my lab. I am having significant difficulties building +: the Graphics portion of NumPy. + +: 0. I am running RedHat linux 5.2 +: 1. I have installed Yorick in the cannonical place. +: 2. Instead of libX11.a, I have a shared-object library, locatedin +: /usr/X11R6/lib + +: When I do the build (python makethis.py), I receive the following error: + +: gcc -fpic -I/usr/local/lib/yorick/1.4/h -g -O2 +: -I/usr/local/include/python1.5 -I/usr/local/include/python1.5 +: -DHAVE_CONFIG_H -c ./Gist/Src/gistCmodule.c +: ./Gist/Src/gistCmodule.c:75: arrayobject.h: No such file or directory +: ./Gist/Src/gistCmodule.c:88: warning: `PyFPE_END_PROTECT' redefined +: /usr/local/include/python1.5/pyfpe.h:169: warning: this is the location of +: the previous definition +: make: *** [gistCmodule.o] Error 1 + +This is a matter of gcc not finding arrayobject.h which is in +../Numerical/Include/ + +To uglily bypass this, try *after the failure* to do a + +make CC='gcc -I../Numerical/Include/' + +in the LLNL/Graphics/ directory + +This should override the CC variable of the Makefile written by makethis.py, +so the make-generated command does find the .h + +: I suspect that I am going to run into multiple problems. There is a cryptic +: statement in the README that indicates that I should do import_arrays() before +: doing the build...where do I implement this? How much of this problem is +: related to the shared object X libs? + +Up to now, unrelated. Look for trouble of the same kind in linking the final .so. +IIRC, the only problem I had compiling this myself was the broken include. + +: Kelvin + +HTH, Daniel. + + + + diff --git a/demo/ermis-f/python_m/cur/0855 b/demo/ermis-f/python_m/cur/0855 new file mode 100644 index 00000000..ed837f12 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0855 @@ -0,0 +1,40 @@ +From: mkersey at metricom.com (Michael Kersey) +Date: Tue, 06 Apr 1999 16:35:06 -0500 +Subject: Python under ASP/MTS +References: <3709C492.EED3BF03@parkey.com> +Message-ID: <370A7E0A.3C8D79B9@metricom.com> +Content-Length: 1216 +X-UID: 855 + +If you instantiate the Python COM object at the application level, then it +should be resident and available immediately. You could instantiate one or +more of these COM objects at the Application level and keep them in a pool. +This should eliminate any unloading/reloading problem. Allocate them to +incoming ASP requests as needed. +Good Luck, +Michael D. Kersey + +Carol Parkey wrote: + +> We have to build something quickly for a client, but we have to fit +> within their ASP/MTS mandate. +> I have developed the first cut of a Python COM object which sits under +> Microsoft Transaction Server, and can be called from an Active Server +> Page in VBScript/JavaScript (thanks to Mark Hammond and all the FAQ +> writers). The requirement is perfect for Python, since it has to +> convert between user requests in XML and mainframe messages in some +> hideous format, plus some other fiddly bits. +> I am concerned, though, about whether I will experience performance +> problems, with the interpreter being loaded and unloaded. Am I worrying +> needlessly, or is there something I should be doing (like forcing the COM +> object's reference count to never drop to zero)? +> All suggestions gratefully received +> +> regards +> +> jp + + + + + diff --git a/demo/ermis-f/python_m/cur/0856 b/demo/ermis-f/python_m/cur/0856 new file mode 100644 index 00000000..21ab6306 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0856 @@ -0,0 +1,65 @@ +From: arcege at shore.net (Michael P. Reilly) +Date: Sun, 18 Apr 1999 12:17:17 GMT +Subject: Python-1.5.2 testing zlib +References: +Message-ID: +Content-Length: 1836 +X-UID: 856 + +Piers Lauder wrote: +: My "make check" fails with a core dump after "test_zlib". +: Runng that test by hand shows: + +: : s Python-1.5.2 ; ./python Lib/test/test_zlib.py +: 0xe5c1a120 0x43b6aa94 +: 0xbd602f7 0xbd602f7 +: expecting Bad compression level +: expecting Invalid initialization option +: expecting Invalid initialization option +: normal compression/decompression succeeded +: compress/decompression obj succeeded +: decompress with init options succeeded +: decompressobj with init options succeeded +: Bus error - core dumped + +: Adding a print at the start of the last loop: +: : s Python-1.5.2 ; ./python Lib/test/test_zlib.py +: 0xe5c1a120 0x43b6aa94 +: 0xbd602f7 0xbd602f7 +: expecting Bad compression level +: expecting Invalid initialization option +: expecting Invalid initialization option +: normal compression/decompression succeeded +: compress/decompression obj succeeded +: decompress with init options succeeded +: decompressobj with init options succeeded +: Decompress: flush mode=0, level=0 +: Memory fault - core dumped + +: Anyone else seen this? + +: (My system: +: : s Python-1.5.2 ; uname -a +: SunOS staff 5.6 Generic_105181-05 sun4u sparc SUNW,Ultra-2 +: : s Python-1.5.2 ; ./python +: Python 1.5.2 (#2, Apr 17 1999, 20:08:31) [GCC 2.8.1] on sunos5 +: Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam +: ) + +Yes, I found this on Solaris for Intel 2.6 as well. I hadn't gotten +time to look into it more. For now, I've removed the zlib module from +the build and continued on with my own system tests. I was thinking I +just had a _very_ old version of libz (Oct 97). + +Since I didn't get time to download the libz, I couldn't test this on +the AIX 4.2 systems at work. + +SunOS golem 5.6 Generic_105182-05 i86pc i386 i86pc +Python 1.5.2 (#5, Apr 17 1999, 14:07:59) [GCC 2.7.2.2] on sunos5 + + -Arcege + + + + + diff --git a/demo/ermis-f/python_m/cur/0857 b/demo/ermis-f/python_m/cur/0857 new file mode 100644 index 00000000..31920942 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0857 @@ -0,0 +1,54 @@ +From: oakley at channelpoint.com (Bryan Oakley) +Date: Thu, 22 Apr 1999 12:38:06 -0600 +Subject: The Future of Tk? +References: <371E964F.C531C2A@istar.ca> <371F11C2.3162025@ciril.fr> <4fv$ECA+JyH3EwbN@jessikat.demon.co.uk> +Message-ID: <371F6C8E.6631E8F1@channelpoint.com> +Content-Length: 2247 +X-UID: 857 + +Barry Margolin wrote: +> +> In article <4fv$ECA+JyH3EwbN at jessikat.demon.co.uk>, +> Robin Becker wrote: +> >I take this completely differently; least astonishment for me is if +> >program X looks and behaves the same way no matter what keyboard, mouse +> >and screen I'm using. As a 'user' of the program X it shouldn't matter +> >what OS/WM is executing the code. I certainly don't want vi or emacs to +> >be different on the mac why should I treat word or excel differently? +> +> I would be very surprised if Netscape on the Macintosh presented a +> Windows-like user interface, rather than adopting the standard Macintosh +> user interface. Most end users don't switch between platforms much, so +> it's more important that all the programs on their system conform to their +> expectations, than that a particular program work the same across different +> platforms. + +I would have to agree with that statement. While there are those who +think retaining the same look and feel across platforms is necessary, I +would wager they are in the distinct minority. That's not to invalidate +their position, but merely to put it in context. _Most_ users of +software want a package to look and feel like the other packages on a +given system. I hate, for example, the artsy (-fartsy) graphic programs +that have some weird UI instead of a more traditional UI. + +On the other hand, to some degree this is application-dependent rather +than user-dependent. For example, if I were to have a requirement to +write a air traffic control program that had to run on BeOS, MacOS, NT +and *nix, I would think there would be significant advantages to keeping +it 100% identical across all platforms. So, to some degree it depends on +the application, or the targeted user base. + +My point being, there's a need in the world for both models. Only, the +model where applications should adhere to native conventions is (I'm +guessing) far and away the most commonly expected model by most users. +Which is why I think using native windows on Tk is a win -- it meets the +needs of the majority (though definitely not all) of the users in the +world. + +-- +Bryan Oakley mailto:oakley at channelpoint.com +ChannelPoint, Inc. http://purl.oclc.org/net/oakley + + + + diff --git a/demo/ermis-f/python_m/cur/0858 b/demo/ermis-f/python_m/cur/0858 new file mode 100644 index 00000000..e7d69fa5 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0858 @@ -0,0 +1,97 @@ +From: stephan at pcrm.win.tue.nl (Stephan Houben) +Date: 23 Apr 1999 10:48:07 +0200 +Subject: Emulating C++ coding style +References: <371F8FB7.92CE674F@pk.highway.ne.jp> +Message-ID: +Content-Length: 2093 +X-UID: 858 + +Thooney Millennier writes: + +> Hello Everyone! +> +> I usually use C++ ,so I want to make programs like +> I do using C++. + +Perhaps it would be better to learn how to these things in Python. + +> I don't figure out how to implement the followings +> by Python. +> If you know any solutions,Please Help! +> +> 1. #define statements +> e.g. #define __PYTHON_INCLUDED__ + +This one is not needed in Python. Python's module mechanism, being +considerably less brain-dead than C++'s excuse for a module system, +can actually figure out itself whether a particular module has already +been loaded (gasp!). + +> #define PYPROC(ARG) printf("%s",ARG) + +Even in C(++), I would solve this like: + +int pyproc(const char *arg) +{ + return printf("%s", arg); +} + +Why bother with the #define ? + +> 2. stream class +> e.g. cout << "hello python."< 3. const variables +> e.g. const int NOCHAGE=1; + +Sorry, no constants in Python. + +> 4. access to class's members using "::" +> e.g. some_class::static_value +> e.g. some_class::static_func(x) + +Well, you can do: + +class MyClass: + static_value = 1 + def static_func(x): + print x + +and then: +MyClass.static_value = 2 +MyClass.static_func("hello") + +However, you get Strange Results(TM) if you access static_value and +static_func() via an instance of MyClass. +So I guess you better ignore this idiom. + +There are several other suggestions to simulate a "real" static member +in Python. Read Dejanews for more info. However, the best thing to do +is to just use some other idiom. + +For "static methods": +If you really feel they belong to your class, you just create a method +that ignores its "self" parameter. Otherwise, use a global function. + +For "static variables": +Make them module-global. Of course, mutations should go via accessor +functions (IMHO), so see "static methods" for more info. + +Greetings, + +Stephan + + + + + diff --git a/demo/ermis-f/python_m/cur/0859 b/demo/ermis-f/python_m/cur/0859 new file mode 100644 index 00000000..8267c090 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0859 @@ -0,0 +1,68 @@ +From: wtanksle at dolphin.openprojects.net (William Tanksley) +Date: Mon, 26 Apr 1999 04:30:56 GMT +Subject: Emulating C++ coding style +References: <371F8FB7.92CE674F@pk.highway.ne.jp> <3720675C.FF7A9E99@gssec.bt.co.uk> +Message-ID: +Content-Length: 1941 +X-UID: 859 + +On Fri, 23 Apr 1999 13:28:12 +0100, Alan Gauld wrote: +>> >2. stream class +>> > e.g. cout << "hello python."<> VERY bad idea. Bad even in C++. + +>Why? + +Very good question. Okay, so I like hyperbole. Thanks for calling me on +it ;-). You're right. + +>Its one of the 'improvements' over C that allows +>overridding of the << operator so that you can +>write a class to any stream. Python does similar +>with the _str_ mechanism but that doesn't allow +>chaining of types together, which I do like in C++ + +>so why is it a bad idea? + +The reason I don't like it -- or why I didn't when I posted -- is that +it's a yukky overloading. It makes a symbol mean something _entirely_ +different from its usual meaning. + +The reason I'm eating my words is that although it may be bad to _design_ +an operator function which behaves so badly, it's not always bad to use an +already (badly) designed operator, so long as it's unambiguous. And +whatever I might say about C++'s << operator, it's not ambiguous in +practice. + +In other words, the designer(s) of C++ may have given the C++ world a bad +example with the << op, but they sure did a good job choosing which +operator to implement. + +>Since its off-topic for the group respond by email +>if you want... + +Someone else asked, so I figger it's okay. + +Plus, since Python 2.0 is in its early requirements-gathering phase, maybe +it wouldn't hurt to think about issues like this. + +>> In proper C++, your const will be contained inside a class (probably +>> static) to keep it out of the global namespace. + +>Hopefully not. It should be contained within a C++ namespace. + +Okay, I'll bite. Why "hopefully not" a class? I know namespaces are new +and cool, but classes seem to have done the job very well in the past. +Have they been secretly causing bloat in our code all along ;-)? + +>Alan G. + +-- +-William "Billy" Tanksley +"But you shall not escape my iambics." + -- Gaius Valerius Catullus + + + + diff --git a/demo/ermis-f/python_m/cur/0860 b/demo/ermis-f/python_m/cur/0860 new file mode 100644 index 00000000..c62db748 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0860 @@ -0,0 +1,34 @@ +From: trashcan at david-steuber.com (David Steuber) +Date: 26 Apr 1999 16:35:06 -0400 +Subject: Built-in Modules gl, GL for SGI IRIX +References: <371FF2E3.7FB17EBD@bioreason.com> +Message-ID: +X-UID: 860 + +Andrew Dalke writes: + +-> However, since you don't have to worry about supporting SGI +-> hardware from about 1996 or earlier, just use the PyOpenGL module +-> +-> http://starship.python.net/crew/da/PyOpenGL/ +-> +-> and ignore that section in the Python manual. + +Thanks for the link, Andrew. + +I'll let you guys know how it works out for me in the uncertain +future. + +-- +David Steuber +http://www.david-steuber.com + +If you wish to reply by mail, _please_ replace 'trashcan' with 'david' +in the e-mail address. The trashcan account really is a trashcan. + +Trying to be happy is like trying to build a machine for which the only +specification is that it should run noiselessly. + + + + diff --git a/demo/ermis-f/python_m/cur/0861 b/demo/ermis-f/python_m/cur/0861 new file mode 100644 index 00000000..e26f377d --- /dev/null +++ b/demo/ermis-f/python_m/cur/0861 @@ -0,0 +1,26 @@ +From: neale-news at pobox.com (Neale Pickett) +Date: 05 Apr 1999 11:38:14 -0600 +Subject: [IRC] Has anyone created a useful IRC module? +References: +Message-ID: +X-UID: 861 + +Alexander Williams writes: +> Has anyone written a module in the spirit of telnetlib that would +> facilitate writing an IRC bot that connects to the server and can +> communicate with the core? Such a beast would definitely facilitate +> writing decent Bots ... such as the one I'd like to put together. + +I have. + +Check out irc.py at http://www.pobox.com/~neale/src/net/ + +You might want to look at lovebot.tar.gz, too. + +I'll go ahead and put this up on the modules section of the web page. + +Neale + + + + diff --git a/demo/ermis-f/python_m/cur/0862 b/demo/ermis-f/python_m/cur/0862 new file mode 100644 index 00000000..9d9cea8c --- /dev/null +++ b/demo/ermis-f/python_m/cur/0862 @@ -0,0 +1,20 @@ +From: iam at not.you (Ken Power) +Date: Tue, 20 Apr 1999 19:11:36 GMT +Subject: pythonw.exe doesn't work +Message-ID: <371cd0de.15002206@news.mysolution.com> +X-UID: 862 + + Another windows problem. Python scripts won't run on my system +(when I do the double-click scenario). I'm using Python 1.5.2 on +win95b. The .py and .pyw extension is associated with pythonw.exe, but +they don't appear to work. Also, double-clicking pythonw.exe doesn't +accomplish anyhting. Any clues, hints? +-------------------------------- +Ken Power +uncle_wiggly at bigfoot dot com +get that? +-------------------------------- + + + + diff --git a/demo/ermis-f/python_m/cur/0863 b/demo/ermis-f/python_m/cur/0863 new file mode 100644 index 00000000..aefdd7d6 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0863 @@ -0,0 +1,53 @@ +From: markus_kohler at hp.com (Markus Kohler) +Date: 29 Apr 1999 10:17:41 +0200 +Subject: Python IS slow ! [was] Re: Python too slow for real world +References: <613145F79272D211914B0020AFF6401914DAD8@gandalf.digicool.com> +Message-ID: +Content-Length: 1628 +X-UID: 863 + +>>>>> "William" == William Tanksley writes: + +[deletia] + William> Your data is correct (Python is slow for many things, + William> slower than it needs to be), but your conclusion is + William> wrong. Python isn't slow because its bytecode engine is + William> slow; actually, although there's a lot of room for + William> improvement, its bytecode engine is faster than many of + William> the others out there. + +It seems to me that *most* of the byte code engine is ok. + + William> The reason it's slow is its runtime model. _Every_ + William> function call requires a lookup in a hash table, just on + William> the off-chance that the programmer changed the meaning of + William> the function. + +That is the same in Smalltalk (squeak). You can build new classes and new +methods at runtime and everything still works as expected. + + >> It seems to me that without a redesign of at least the bytecode + >> for function calls python's speed will not take off. + + William> Bytecode won't help enough -- the whole calling model + William> needs to be examined. Fortunately, that's one of the + William> things the 2.0 design process will be looking at. Like + William> you, I hope that they consider Smalltalk as an example. + +I hope so too. My point was exactly that the bytecode for doing the +function call seems to be the problem. + + William> And Oberon (SlimBinaries), and Eiffel (typing and general + William> compile-time error catching), and ... + + OPTIONAL types would be cool. + + +Markus + +-- +Markus Kohler mailto:markus_kohler at hp.com + + + + diff --git a/demo/ermis-f/python_m/cur/0864 b/demo/ermis-f/python_m/cur/0864 new file mode 100644 index 00000000..0b563bbd --- /dev/null +++ b/demo/ermis-f/python_m/cur/0864 @@ -0,0 +1,61 @@ +From: alex at somewhere.round.here (Alex) +Date: 16 Apr 1999 10:01:20 -0400 +Subject: binary +References: <37171BD5.87CFA015@efes.net.tr> +Message-ID: +Content-Length: 1784 +X-UID: 864 + +There were a whole lot of solutions to this posted here a little while +ago. I'm not sure if I'm duplicating an earlier method. Anyway, this +might be a bit slow, but it seems to work for any base: + +************************************************************** +import math + +chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ' + +def base_repr (number, base = 2, padding = 0): + if number < base: \ + return (padding - 1) * chars [0] + chars [int (number)] + max_exponent = int (math.log (number)/math.log (base)) + max_power = long (base) ** max_exponent + lead_digit = int (number/max_power) + return chars [lead_digit] + \ + base_repr (number - max_power * lead_digit, base, \ + max (padding - 1, max_exponent)) + +print map (base_repr, 17 * [17], range (2, 19)) +************************************************************** + +The result is + +['10001', '122', '101', '32', '25', '23', '21', '18', '17', \ +'16', '15', '14', '13', '12', '11', '10', 'H'] + +If you just want binary, there is a slightly slicker way: + +************************************************************** +import math, operator, string + +def binary_repr (number, max_length = 32): + # This will only work reliably for relatively small numbers. + # Increase the value of max_length if you think you're going + # to use long integers + assert number < 2L << max_length + shifts = map (operator.rshift, max_length * [number], \ + range (max_length - 1, -1, -1)) + digits = map (operator.mod, shifts, max_length * [2]) + if not digits.count (1): return 0 + digits = digits [digits.index (1):] + return string.join (map (repr, digits), '') + +print binary_repr (17) +************************************************************** + +See you. +Alex. + + + + diff --git a/demo/ermis-f/python_m/cur/0865 b/demo/ermis-f/python_m/cur/0865 new file mode 100644 index 00000000..af5f1794 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0865 @@ -0,0 +1,40 @@ +From: banderson at boi.hp.com (Bill Anderson) +Date: Mon, 05 Apr 1999 18:30:56 +0000 +Subject: Python books +References: <7dtsa4$b6p$1@nnrp1.dejanews.com> <7e0t19$1de$1@nnrp1.dejanews.com> <7e2vol$8c6$1@news1.rmi.net> +Message-ID: <37090160.C52377BA@boi.hp.com> +X-UID: 865 + +Mark Lutz wrote: +> +> Wesley J. Chun wrote in message <7e0t19$1de$1 at nnrp1.dejanews.com>... +> >o'reilly appears to be very hesitant to publish more python +> >books in a timely fashion. this "learning python" was slated +> >for release last fall, then it became march, and now it's april. +> > +> > [...] +> >same say that they want to see how "learning" does before mak- +> >ing any more committments to python. due to their lack of en- +> >thusiasm, i am looking for other publishers who are more inter- +> >ested in getting more python books on the market. +> +> Hold on a minute, friend. +> +> Next week, O'Reilly will begin shipping the first major +> Python book to hit the shelves since 1996 (Learning Python). +> That will make 3 Python books in their catalog--3 times as +> many as any other publisher. + +So what other publisher has a Python book out, and what is the name of +it? + + + +-- +Bill Anderson Linux Administrator +MCS-Boise (ARC) banderson at boi.hp.com +My opinions are just that; _my_ opinions. + + + + diff --git a/demo/ermis-f/python_m/cur/0866 b/demo/ermis-f/python_m/cur/0866 new file mode 100644 index 00000000..ba5e08e6 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0866 @@ -0,0 +1,31 @@ +From: moshez at math.huji.ac.il (Moshe Zadka) +Date: Fri, 16 Apr 1999 15:40:41 +0300 +Subject: Word Counting -- A Novell Approach +Message-ID: +X-UID: 866 + +There was a thread here about word counting, when reading in arbitary +chunks, instead of line-by-line. + +I have a friend who continually reminds me "In Rome, do as the Romans", so +it seems to me the right way is to count with an object you 'feed()' data +into, like other non-line-based Python parsers (XML, HTML, etc.). + +So I wrote a small word counting class, whose interface is: + * feed: Feed some data into the counter. + * flush: Force a word break. The next feed will force new words. + This is useful, for example, when counting words in multiple + files, to make sure words are not concatenated across files. + * items: Will return a list of (word, count) pairs. + +(This is an excerpt from the documentation) + +I will happily mail this class to anyone who wants. +-- +Moshe Zadka . +QOTD: What fun to me! I'm not signing permanent. + + + + + diff --git a/demo/ermis-f/python_m/cur/0867 b/demo/ermis-f/python_m/cur/0867 new file mode 100644 index 00000000..7b3d9dbc --- /dev/null +++ b/demo/ermis-f/python_m/cur/0867 @@ -0,0 +1,42 @@ +From: SSTirlin at holnam.com (Scott Stirling) +Date: Thu, 29 Apr 1999 09:26:18 -0400 +Subject: HTML "sanitizer" in Python +Message-ID: +Content-Length: 1665 +X-UID: 867 + +Thanks, Mark! That is a very cool tool. It will make a nice HTML editor for me here at work. + +The only feature I immediately saw lacking (but maybe I missed it--I just downloaded it this AM) is the ability to record macros. For my Excel problem, I really need the ability to batch process the HTML files because there are 14 of them. + +Anyway, this is a great reference. Thank you again. + +Scott +>>> "Mark Nottingham" 04/28 6:17 PM >>> +There's a better (albeit non-Python) way. + +Check out http://www.w3.org/People/Raggett/tidy/ + +Tidy will do wonderful things in terms of making HTML compliant with the +spec (closing tags, cleaning up the crud that Word makes, etc.) As a big +bonus, it will remove all tags, etc, and replace them with CSS1 style +sheets. Wow. + +It's C, and is also available with a windows GUI (HTML-Kit) that makes a +pretty good HTML editor as well. On Unix, it's a command line utility, so +you can use it (clumsily) from a Python program. + +I suppose an extension could also be written; will look into this (or if +anyone does it, please tell me!) + +__________________________________________________________________ +| Scott M. Stirling | +| Visit the HOLNAM Year 2000 Web Site: http://web/y2k | +| Keane - Holnam Year 2000 Project | +| Office: 734/529-2411 ext. 2327 fax: 734/529-5066 email: sstirlin at holnam.com | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + + + + diff --git a/demo/ermis-f/python_m/cur/0868 b/demo/ermis-f/python_m/cur/0868 new file mode 100644 index 00000000..3f408263 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0868 @@ -0,0 +1,27 @@ +From: bwinton at tor.dhs.org (Blake Winton) +Date: Tue, 06 Apr 1999 01:11:32 GMT +Subject: help +References: <7e1fr0$6cio$1@titan.xtra.co.nz> +Message-ID: +X-UID: 868 + +On Mon, 05 Apr 1999 04:39:21 GMT, SH wrote: +>In article , I wrote: +>> On Fri, 2 Apr 1999 15:58:52 +1200, nfbb wrote: +>> >I'm running Windows 98 and was wondering what the best program for +>> >writing python Source code is under this operating system? +>> IDLE (Guido's IDE) is also up on my favourites list. +>Where do you find the latest IDLE? Searches on the web are not +>helpful, and on the Python.org site the search points to the CVS +>directories? + +It comes with the latest Python source release, available from the usual +places. + +Later, +Blake. + + + + + diff --git a/demo/ermis-f/python_m/cur/0869 b/demo/ermis-f/python_m/cur/0869 new file mode 100644 index 00000000..7eb864f0 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0869 @@ -0,0 +1,25 @@ +From: eugened at istar.ca (Eugene Dragoev) +Date: Sat, 24 Apr 1999 02:22:21 -0400 +Subject: The Future of Tk? +References: <371E964F.C531C2A@istar.ca> <7fmv24$agu$1@m1.cs.man.ac.uk> +Message-ID: <3721631D.8642F0AA@istar.ca> +X-UID: 869 + +Where could I find more info about TkGS? + +"Donal K. Fellows" wrote: +> +> In article <371E964F.C531C2A at istar.ca>, +> Eugene Dragoev wrote: +> > Is there going to be any Tk implementation that will continue using +> > lightweight components? +> +> No current Tk implementation uses lightweight components. All are +> heavy (which actually merely means that they have their own window +> each.) One of the things that might come out of the TkGS work at some +> point may be lightweight components. There are other issues being +> resolved there first though... + + + + diff --git a/demo/ermis-f/python_m/cur/0870 b/demo/ermis-f/python_m/cur/0870 new file mode 100644 index 00000000..45659d8c --- /dev/null +++ b/demo/ermis-f/python_m/cur/0870 @@ -0,0 +1,83 @@ +From: tismer at appliedbiometrics.com (Christian Tismer) +Date: Fri, 23 Apr 1999 14:36:56 +0200 +Subject: Pointers to variables +References: <19990422121403.A279051@vislab.epa.gov> <19990423080721.A344578@vislab.epa.gov> +Message-ID: <37206968.C1E548BD@appliedbiometrics.com> +Content-Length: 2300 +X-UID: 870 + + +Randall Hopper wrote: +... +[you are beginning to understand the concept] +... +> but this one doesn't: +> +> (3) min = 0 +> max = 0 +> for ( var, val ) in [( min, 1 ), ( max, 100 )]: +> var = val +> +> So basically this is just a little asymmetry in the language. Putting a +> variable in a list/tuple (valueof(var)) performs a shallow copy rather than +> a deep copy. +> +> Does this sound about right? + +Not completely. There is no asymmetry if you take the right +position. I'll try to adjust jour sight a little :-) + +There is sometimes a little confusion since people talk +of Python, passing "variables" by "reference", which is +wrong. Python passes objects by reference, but no variables +at all, in the sense of a "C" variable. +(You might find some more about this in the tutor archive). + +It is better to think of labels, sticked to boxes which +are the objects. +By "min = 0", you stick the label "min" to the object "0". +By "var = val", you pick the object which has the label +"val", and stick label "var" to it as well. + +While passign the values around between the lables, Python +indeed uses reverences to the objects, although in this +example, it makes no difference, since the values of +unchangeable (immutable) objects like numbers cannot be changed. + +You will recognze the difference, if you use different objects +like lists. In + +a = [1, 2, 3] + +I've put a label "a" to a list object with three numbers. +Now I can use a as a handle to the list, it gives me a reference +to the object which I now can change, like + +a[1] = "howdy", which reads now + +>>> a +[1, 'howdy', 3] +>>> + +Now you will understand that I did not change the "variable a". +I also did not change the "label a", but I modified the list +object where a was my handle. + +while 1: + if vanished("asymmetry"): + break + think_again() #:-) + +Hope this helps - chris + +-- +Christian Tismer :^) +Applied Biometrics GmbH : Have a break! Take a ride on Python's +Kaiserin-Augusta-Allee 101 : *Starship* http://starship.python.net +10553 Berlin : PGP key -> http://wwwkeys.pgp.net +PGP Fingerprint E182 71C7 1A9D 66E9 9D15 D3CC D4D7 93E2 1FAE F6DF + we're tired of banana software - shipped green, ripens at home + + + + diff --git a/demo/ermis-f/python_m/cur/0871 b/demo/ermis-f/python_m/cur/0871 new file mode 100644 index 00000000..ba6bdce0 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0871 @@ -0,0 +1,28 @@ +From: aahz at netcom.com (Aahz Maruch) +Date: Sat, 17 Apr 1999 14:30:04 GMT +Subject: Why no "=" in if? (was Re: Quick fix to add "+=") +References: <3717EE20.41343593@mediaone.net> <000701be888f$12fe2920$ee9e2299@tim> +Message-ID: +X-UID: 871 + +In article , +John W. Baxter wrote: +>In article , aahz at netcom.com (Aahz Maruch) wrote: +>> +>> Why doesn't Guido get off his duff and fix this?????????! +> +>Because it's not broken. + +Yes, it is. +-- + --- Aahz (@netcom.com) + +Hugs and backrubs -- I break Rule 6 <*> http://www.rahul.net/aahz/ +Androgynous poly kinky vanilla queer het + +Sometimes, you're not just out of left field, you're coming in +all the way from outer space. + + + + diff --git a/demo/ermis-f/python_m/cur/0872 b/demo/ermis-f/python_m/cur/0872 new file mode 100644 index 00000000..d5068ff0 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0872 @@ -0,0 +1,51 @@ +From: arcege at shore.net (Michael P. Reilly) +Date: Wed, 28 Apr 1999 15:57:28 GMT +Subject: 'sourcing' Python scripts? +References: <372713AD.6ABA444@cern.ch> +Message-ID: +Content-Length: 1394 +X-UID: 872 + +Haimo G. Zobernig wrote: +: Dear Python experts, + +: this might be a unix rather than a Python problem, but I need to set +: environment variables from a Python program *in the parent process* +: that is running the Python script ( a la os.environ['BAR'] = 'foo' ). +: In other words, I want to achieve the equivalent of 'sourcing' the +: Python script. Can this be done? Even better would be a solution that +: also works on the various WinAbominations... (well, NT at least) + +: Haimo G. Zobernig + +: Haimo.Zobernig at cern.ch + +Are both programs written in Python? + +If so, then you could make something like: + + def environ_save(filename, environ): + file = open(filename, 'w') + lines = [ 'environ = {}\n' ] + for (key, value) in environ.items(): + lines.append('environ[%s] = %s\n' % (repr(key), repr(value))) + open(filename, 'w').writelines(lines) + + def environ_load(filename, other_environ): + execfile(filename) # this creates a local variable called 'environ' + for (key, value) in environ.items(): + other_environ[key] = value + +Call "environ_save" from the child process, and "environ_load" from the +parent. Also, this relies on the data being reproducable from repr(). +Which, if it is from os.environ, it should be. :) + +Now, I haven't tested this, but I don't see any problems. A pickle +solution can be left to the reader. + + -Arcege + + + + + diff --git a/demo/ermis-f/python_m/cur/0873 b/demo/ermis-f/python_m/cur/0873 new file mode 100644 index 00000000..bd540f76 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0873 @@ -0,0 +1,40 @@ +From: basv at sara.nl (basv at sara.nl) +Date: Tue, 27 Apr 1999 11:52:54 GMT +Subject: Trouble with httplib and IRIX +References: <7g219p$hvb$1@nnrp1.dejanews.com> <3724CF13.C4680904@bioreason.com> <7g3sgs$87n$1@nnrp1.dejanews.com> +Message-ID: <7g48el$hjt$1@nnrp1.dejanews.com> +Content-Length: 1337 +X-UID: 873 + +In article <7g3sgs$87n$1 at nnrp1.dejanews.com>, + basv at sara.nl wrote: +> In article <3724CF13.C4680904 at bioreason.com>, +> Andrew Dalke wrote: +> > basv at sara.nl said: +> > > I'm running python 1.5.2 and running it on IRIX 6.5.3 systems. +> > > ... +> > > I have the following problem when i'm trying to connect to an +> > > non-existing machine the program hangs forever. +> > +> > I don't get that behaviour using 1.5.2c1 or 1.5.1 on either of +> > our 6.5.2m machines. + + This is a bug in 6.5.3, ping and telnet also hangs forever. I just + phoned SGI and they said that it will be fixed in 6.5.4 + + +******************************************************************** +* * +* Bas van der Vlies e-mail: basv at sara.nl * +* SARA - Academic Computing Services phone: +31 20 592 8012 * +* Kruislaan 415 fax: +31 20 6683167 * +* 1098 SJ Amsterdam * +* * +******************************************************************** + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/0874 b/demo/ermis-f/python_m/cur/0874 new file mode 100644 index 00000000..8d5112ec --- /dev/null +++ b/demo/ermis-f/python_m/cur/0874 @@ -0,0 +1,15 @@ +From: houseofmelange.bassment at teleweb.at (Alexander M. Dietrich) +Date: Thu, 22 Apr 1999 18:41:45 GMT +Subject: What is it ? How can I learn it ? Where should I start ? What can you do with it ? +Message-ID: +X-UID: 874 + +I just heard about it, it's required for a job I will eventually apply to. +I have C programming experience . Is that a plus ? + + + + + + + diff --git a/demo/ermis-f/python_m/cur/0875 b/demo/ermis-f/python_m/cur/0875 new file mode 100644 index 00000000..24676599 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0875 @@ -0,0 +1,42 @@ +From: dave at zeus.hud.ac.uk (Dave Dench) +Date: Wed, 7 Apr 1999 11:21:36 GMT +Subject: Confused by COM +Message-ID: <199904071121.MAA16569@brahms.scom> +Content-Length: 1418 +X-UID: 875 + +Dear All, +on this thread, perhaps someone can explain the following. +I am starting to play with COM. I have read the tutorial and looked at the +demos and am now playing with Andy Robinson's SpamServer/SpamCan demo. + +Everything seems fine on the face of it. The standalone python part works, +the COM facilities seem to work. BUT after uninstalling the SpamServer +and the SpamCan components, I still see an entry for SpamCan using the +COM Browser that comes with pythonwin. +It appears to be the correct UUID as the one that I install, as after installing +there are only the two entries under the PythonServer entry, and the UUID +tallys. +I don't understand why the SpamServer uninstalls correctly(?) but the +SpamCan doesn't. + +Similarly using the Registry Editor that comes with Nortons, I can remove the +SpamCan entry but still see it using the pythonwin COM browser? + + Thanks, + David + +________________________________________________________________________________ + + ************************************************ + * David Dench * + * The University of Huddersfield , UK * + * Tel: 01484 472083 * + * email: d.j.dench at hud.ac.uk * + ************************************************ +________________________________________________________________________________ + + + + + diff --git a/demo/ermis-f/python_m/cur/0876 b/demo/ermis-f/python_m/cur/0876 new file mode 100644 index 00000000..51de1319 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0876 @@ -0,0 +1,144 @@ +From: call at 83331002.wong (Mr Wong) +Date: 24 Apr 1999 10:55:50 GMT +Subject: make your first $1 million. +Message-ID: <7fs7vm$pga$11125@hfc.pacific.net.hk> +Content-Length: 4486 +X-UID: 876 + + HANG CHEONG INTERNATIONAL + +A new successful marketing tactic to increase your sales : + + Do you always have problems to find channels to increase your sales? +The advertise in newspapers, magazines and doing some Direct Mailing, but +still can not achieve you goal, so why still dumping your money to a media +that could not help your sales and not using the most efficient and modern +way of selling stragies E-MAIL.Now many big companies are using this, +because it is economical, fast and efficient, and the other way is selling +by fax through the internets, and the result are remarkable. + + According to report pointed out that the ratio of internet selling is +1,000:1.5 that is 20,000,000 names x 0.0015 = 30,000. These 30,000 clients +will buy from you and if your net profit is $50 that is to say your total +profit is: + + HK$50 x 30,000 = HK$1,500,000. 1.5 Million Dollars !!! + +How to make your first 1 million in your life, now it is quite possible that +you can make your first 1 million within one month. But the thing is ??Are +you selling the right products, through the right media.?? + +*************************************************************************** +A full set of sales tool with 20 million of client??s names will make you a SUPER SALES. + +A professional mail software (no need to go through any ISP Mail Server,making your computer +as the professional Mail Server, its super speed. Easy to use. + +* 500,000 E-mail addresses in Hong Kong +* 1,000,000 E-mail address in Taiwan +* 20,000,000 E-mail address in the World + (latest revised on 10th April 1999.) + +* A free revision one year (around 100,000 every month) + +* Free of charge of 200,000 names of fax addresses in Hong Kong for 1999. + +* Door to door installation * Technical support * software replacement. + +* Using CD-R dish and CD-AutoRun Menu. + +(Only HK$680 for one full set) for unlimited use. + +HK$680 is very small amount, you may not need it now but you will sure to use it when you +have every thing ready. + +*************************************************************************** +If you need any E-mail address, call us any time!! +*************************************************************************** +Don??t miss this chance, you may make lots of money with this new marketing technique. + +Booking Hotline : (852) 8333 1002 Mr Wong + +2ND FL.FRONT BLOCK HING YIP HOUSE.24,SAI YEE ST,HK +_________________________________________________________________________________________ + + ???????? + HANG CHEONG INTERNATIONAL + +?s???\???????P + + ?z?O?_?g?`???p?????i???P???D??????? + +?Z?n????,???x?s?i???l?H???? (Direct Mail)?O?_?w?g?L?k?F???z?w?????s?i???G? + +?P???N?????M???????O?b?????????????????P?????W,?????z?????t?M?s?n???k?? + +???N?{?????s?i???P????.?????s?i???P???????O???h?H?O???O???s?i?O???M?s?i + +???q????????????,?]???\?h?j???q?g?L?f?V?????????w?????????g?????t?B???G + +???n??"?????????????s?i???P ?? ???u?s?i???P" ?]?N?O--?????????????o?e?s?i, + +?]?????T???g?????t???B?Q???????I + + ?g???i???????????P???C1000?? 1.5 . + +???Y,20000000?U???W???? 0.0015????30000 + +?]?N?O?T?U???????|???z?R,?p?z???f?~???b?Q??50??,???A?i???? + +50??30000??1500000,?@?????Q?U!!!!! + +?????H???????@???@???U?A?n?p????,?{?b?N???i???@?????N???@???U. + +?Q?????h???????g?P???~????.?u?n???????~.???P?????S???D. +________________________________________________________________________________ +???M???P?u???X??,2000?U??????E-MAIL?H?c?a?}.???A????????SUPER SALES. + +?M?~???t?o?q?l?n??.(?????n?z?L????ISP??MAIL SERVER,???A???q?????M?~MAIL SERVER +?t???W??).????????. + +*???????Q?U??????E-MAIL?H?c?a?}. +*?x?W?@???U??????E-MAIL?H?c?a?}. +*?@???G?d?U??????E-MAIL?H?c?a?}. + +(???????s??????99?~4??10??) + +*???i1?~?K?O???s(???C???Q?U??)* + +*(?A?e????99?~?u???~20?U?????????u???X(?????~,?a??,???q?W,?s?n??)* + +*?s?W???w?? *???N???? *?n?????s + +*????CD-R??????????.(????CD-AutoRun??????????????) + +(???M?u?? $680 ) ???[?L?????????C + +680???u???L?O???p?????A?]?\?A?{?b?????n?A?????O?H???n???P?u?@?W?? + +???~???A???????n?I + +*************************************************************************** +?????q???????j?????A???A?M???????????U???U?~ Email Address?A +???n?U???U?~???? Email Address?A???H???p???????I +*************************************************************************** + +???n???????L?o???????????|???I + +(?q?????u)-(852)-83331002?????? + +?a?}:?????E?s?????~????24?????~??3???e?y. +_____________________________________________________________________ + + + + + + + + + + + + + diff --git a/demo/ermis-f/python_m/cur/0877 b/demo/ermis-f/python_m/cur/0877 new file mode 100644 index 00000000..f5eba3a8 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0877 @@ -0,0 +1,31 @@ +From: e9025657 at stud3.tuwien.ac.at (Kaweh Kazemi) +Date: Sun, 18 Apr 1999 22:58:11 GMT +Subject: Parsing C++ headers with Python +References: <371A24BF.E3341937@nowhere.com> +Message-ID: <371a61b8.648812@news.teleweb.at> +X-UID: 877 + +>As part of an effort to make our documentation more automatic (at least to the +>degree that we can generate reports on header changes), I'd like to be able to +>parse out c++ headers from Python. I'm not looking for "complete" +>parsing abilitiies-- + +there is a tool written in perl for this purpose. see + + http://friga.mer.utexas.edu/mark/perl/perceps/ + +for more information. the reason i am posting this, is because i would +be interested to port this tool to python, mainly because i am +familiar with python and have no clue about perl. + +i would take the time to port it, and make the port available to the +python community, if someone could help me in understanding what perl +is doing (mainly regarding structure and regular expressions). + +kaweh kazemi (e9025657 at stud3.tuwien.ac.at) + + + + + + diff --git a/demo/ermis-f/python_m/cur/0878 b/demo/ermis-f/python_m/cur/0878 new file mode 100644 index 00000000..0a0209f8 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0878 @@ -0,0 +1,23 @@ +From: bwarsaw at cnri.reston.va.us (Barry A. Warsaw) +Date: 28 Apr 1999 00:15:28 -0400 +Subject: smtplib hang on send "data " to MS SMTP server +References: <7g5euo$m7e$1@nnrp1.dejanews.com> <000601be9124$1846dce0$29a02299@tim> +Message-ID: <61hfq1js7z.fsf@anthem.cnri.reston.va.us> +X-UID: 878 + +>>>>> "TP" == Tim Peters writes: + + TP> Also be clear about which version of Python you're using, and + TP> which OS. smtplib.py has changed a *lot* since 1.5.1 (have + TP> you tried 1.5.2?). + +There's even a patch that was made to smtplib.py /after/ Python 1.5.2 +final was released. You can grab the latest version from the CVS tree + + http://www.python.org/download/cvs.html + +-Barry + + + + diff --git a/demo/ermis-f/python_m/cur/0879 b/demo/ermis-f/python_m/cur/0879 new file mode 100644 index 00000000..168bb6b1 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0879 @@ -0,0 +1,37 @@ +From: pradeepj at delhi.tcs.co.in (pradeepj at delhi.tcs.co.in) +Date: Tue, 13 Apr 1999 07:10:50 GMT +Subject: lexical analyzer +Message-ID: <7euqlm$aru$1@nnrp1.dejanews.com> +X-UID: 879 + +Question 1 : The following syntax-directed translation scheme is used with a +shit reduce (bottom up) parser that perform the action in braces immediately +after any reduction the corresponding production +A-> aB { print "0" }, A-> c {print "1"}, B-> Ab {print "2"}. +The string printed when the parser input is aacbb is + +a) 00122 +b) 02021 +c) 10202 +d) 12020 + +Question 2 : (I) The task of lexical analyzer is to translate the input +source language text into tokens and determine how groups of tokens are +inter-related. (ii) Two basic approaches to translation are generation and +interpretation. (iii) A load-and-go compiler is capable of translating the +source language text on a host machine A that can be later run on any machine +B. + +Which of the following is true ? +a) All are true +b) Only (I) and (III) are true +c) Only (I) is true +d) Only (III) is false + + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/0880 b/demo/ermis-f/python_m/cur/0880 new file mode 100644 index 00000000..a96e020f --- /dev/null +++ b/demo/ermis-f/python_m/cur/0880 @@ -0,0 +1,31 @@ +From: fdrake at cnri.reston.va.us (Fred L. Drake) +Date: Tue, 27 Apr 1999 18:07:55 GMT +Subject: Built-in Modules gl, GL for SGI IRIX +In-Reply-To: +References: + <371FF2E3.7FB17EBD@bioreason.com> + +Message-ID: <14117.64763.590661.415595@weyr.cnri.reston.va.us> +X-UID: 880 + +Andrew Dalke writes: +> However, since you don't have to worry about supporting SGI +> hardware from about 1996 or earlier, just use the PyOpenGL module +> +> http://starship.python.net/crew/da/PyOpenGL/ +> +> and ignore that section in the Python manual. + + I'll add a reference to this in the "gl" section of the Python +Library Reference. + + + -Fred + +-- +Fred L. Drake, Jr. +Corporation for National Research Initiatives + + + + diff --git a/demo/ermis-f/python_m/cur/0881 b/demo/ermis-f/python_m/cur/0881 new file mode 100644 index 00000000..e21665c6 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0881 @@ -0,0 +1,34 @@ +From: mal at lemburg.com (M.-A. Lemburg) +Date: Thu, 15 Apr 1999 15:49:17 GMT +Subject: timezone stuff driving me bonkers!!! +References: <371604B6.C6267011@quantisci.co.uk> +Message-ID: <37160A7D.72AD2893@lemburg.com> +X-UID: 881 + +Stephen Crompton wrote: +> +> Pretty obvious from the header I guess. +> +> I want to convert from a UTC tuple to the time since the epoch. As far +> as I can tell this should definitely be timezone, DST, etc. independent. +> However, there is a notable absence of this functionality in the time +> module (presumably due to C library absences ?) + +Try the utc2local() function in mxDateTime (an extension package +which can download from my Python Pages). + +It will convert a DateTime instance using UTC values to a +DateTime instance using local time. The .ticks() method on +that instance will get you the time since epoch value. + +Cheers, +-- +Marc-Andre Lemburg Y2000: 260 days left +--------------------------------------------------------------------- + : Python Pages >>> http://starship.skyport.net/~lemburg/ : + --------------------------------------------------------- + + + + + diff --git a/demo/ermis-f/python_m/cur/0882 b/demo/ermis-f/python_m/cur/0882 new file mode 100644 index 00000000..304a3d84 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0882 @@ -0,0 +1,45 @@ +From: fredrik at pythonware.com (Fredrik Lundh) +Date: Tue, 20 Apr 1999 09:34:24 GMT +Subject: Tkinter hangs on mainloop +References: <371c19bb.60709557@news> +Message-ID: <008a01be8b11$e17fb320$f29b12c2@pythonware.com> +X-UID: 882 + + wrote: +> I've done a complete install of python ver 1.5.2 on my +> windows98 system and I've run into a problem with Tkinter (no big +> surprise!) I can import it with the line : from Tkinter import * + +I assume you're running this from the command +line, right? + +> widget.mainloop() +> +> It hangs. + +not really. it doesn't hang, it just doesn't return +immediately. in fact, it won't return until you've +closed the root window. + +> If I wait for a while and then hit Ctr-C I get the +> following error: +> +> Traceback (innermost last): +> File "", line 1, in ? +> File "k:\python\lib\lib-tk\Tkinter.py", line 492, in mainloop +> self.tk.mainloop(n) +> KeyboardInterrupt + +before you to this, look in the task bar. click on +the Tk icon, and the (quite small) window will pop +up. + +http://www.pythonware.com/library/tkinter/introduction/intro01.htm +has some more information on the mainloop function. + + + + + + + diff --git a/demo/ermis-f/python_m/cur/0883 b/demo/ermis-f/python_m/cur/0883 new file mode 100644 index 00000000..e6110265 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0883 @@ -0,0 +1,51 @@ +From: aaron_watters at my-dejanews.com (aaron_watters at my-dejanews.com) +Date: Wed, 21 Apr 1999 19:58:51 GMT +Subject: Kosovo database; Python speed +References: <371DAAC2.D9046550@cs.utwente.nl> <371DB466.32097FE5@pop.vet.uu.nl> +Message-ID: <7flalp$n10$1@nnrp1.dejanews.com> +Content-Length: 1517 +X-UID: 883 + +In article <371DB466.32097FE5 at pop.vet.uu.nl>, + M.Faassen at vet.uu.nl wrote: +> Richard van de Stadt wrote: +> > +> > Suppose we were going to make a database to help Kosovars locate +> > their family members. This would probably result in hundreds of +> > thousands of records (say 1 record (file) per person). +> > +> > Would Python be fast enough to manage this data, make queries on +> > the data, or should compiled programs be used? +> +> Depends on what queries you make, but if used smartly, Python can +> probably be fast enough. From what I've heard Gadfly is (a database +> implemented in Python). + +It also depends on what you expect the queries to be. For this +kind of problem "grep" might work pretty well, actually. + +Gadfly is best at the moment when you are doing a lot of exact matches, +so I'd expect if you were doing matches on last/first name by exact +spelling gadfly would be okay on a sufficiently large machine. +However for inexact matches I'd recommend other methods, like grep +for example. Generally if all you have is one big table something +like gadfly is less compelling than if you have many interrelated +structures to manage and query. Also look at dbm, gdbm, bplustree, +and similar. + + http://www.chordate.com/gadfly.html + http://starship.skyport.net/crew/aaron_watters/bplustree/ + + -- Aaron Watters + +=== +% ping elvis +elvis is alive +% _ + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/0884 b/demo/ermis-f/python_m/cur/0884 new file mode 100644 index 00000000..d8683660 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0884 @@ -0,0 +1,60 @@ +From: aaron_watters at my-dejanews.com (aaron_watters at my-dejanews.com) +Date: Wed, 14 Apr 1999 12:01:02 GMT +Subject: Python as an ODBC *source* on windoze ? +References: <01BE8604.AE1D9CC0.richard@folwell.com> <37145266.1127FE06@zipzap.ch> +Message-ID: <7f201s$1ml$1@nnrp1.dejanews.com> +Content-Length: 1841 +X-UID: 884 + +In article <37145266.1127FE06 at zipzap.ch>, + Boris Borcic wrote: +> Richard Folwell wrote: +> > +> > It is certainly possible to implement a DBMS in Python (check out Gadfly!), +but +> > I suspect that you are asking a different question. (?) +> +> Indeed. It is my (untested) understanding that the MS Access Report writer +(and gui) +> can be exploited with data from other vendor's databases through ODBC. +> +> I was wondering if it was possible to configure python to serve data +appropriately +> to queries from the report writer -- this doesn't mean implementing a full +DBMS +> in python, only to feed back appropriately patterned data to the report +generator. + +I briefly looked into what it would take to do this and I decided +that it looked almost as hard as implementing a full dbms in Python. :) + +I didn't look all that hard though. + +It's mainly a matter of generating python callbacks from the ODBC +C calls. It should be possible to do this by modifying examples +from the ODBC SDK, I think, but it would be tedious. ODBC is a fairly +complex API. + +A simpler approach, if this is acceptible, is to simply use the ODBC +client api provided with pythonwin to load data into MSJET on an as +needed basis and then use plain old Access to generate the reports or +whatever and then unload the data out again if it changes. It's not +ideal but it can be done now without too much effort. + +I'm hoping something like XML-RPC or COM+ will make it much easier to +interface python modules (or other modules) to existing APIs like +ODBC, but this doesn't seem to be happening too fast, comments Greg, +Bill, Mark? + + -- Aaron Watters + +=== +We have met the enemy +and he is us. -- Pogo + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/0885 b/demo/ermis-f/python_m/cur/0885 new file mode 100644 index 00000000..8e6004c4 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0885 @@ -0,0 +1,62 @@ +From: mwh21 at cam.ac.uk (Michael Hudson) +Date: 26 Apr 1999 13:43:18 +0100 +Subject: os.exec +References: <7g1jv4$5eh$1@nnrp1.dejanews.com> +Message-ID: +Content-Length: 1438 +X-UID: 885 + +jimmyth at my-dejanews.com writes: +> Is there a way to send the output from a python-spawned external program +> straight to the script without having to deal with the OS's piping and such? +> I want to be able to say: +> +> bob = get_output_from(os.execv('runme.exe', ('parm1', 'parm2'))) +> +> or something to that effect. + +There's commands.py, a library module: + +Python 1.5.2 (#2, Apr 14 1999, 13:02:03) [GCC egcs-2.91.66 19990314 (egcs-1.1.2 on linux2 +Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam +>>> import commands +>>> bob=commands.getoutput ('echo "bill"') +>>> print bob +bill +>>> + +or there's popen: + +Python 1.5.2 (#2, Apr 14 1999, 13:02:03) [GCC egcs-2.91.66 19990314 (egcs-1.1.2 on linux2 +Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam +>>> import os +>>> bob=os.popen('echo "bill"').read() +>>> print bob +bill + +>>> + +which is pretty much what commands.py does under the hood. There's +also popen2: + +Python 1.5.2 (#2, Apr 14 1999, 13:02:03) [GCC egcs-2.91.66 19990314 (egcs-1.1.2 on linux2 +Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam +>>> import popen2 +>>> o,i,e=popen2.popen3('echo "stdout"; echo "stderr" >& 2') +>>> o.read() +'stdout\012' +>>> e.read() +'stderr\012' +>>> + +Or you can roll your own (I'd recommend starting with +popen2.py). These are more likely to do what you expect on unix-ish +OSes than windows, but I think the first two will work on windows too. + + +HTH +Michael + + + + diff --git a/demo/ermis-f/python_m/cur/0886 b/demo/ermis-f/python_m/cur/0886 new file mode 100644 index 00000000..914ba45c --- /dev/null +++ b/demo/ermis-f/python_m/cur/0886 @@ -0,0 +1,20 @@ +From: hew at hons.cs.usyd.edu.au (Matthew Robert Gallagher) +Date: Sat, 17 Apr 1999 13:10:45 +1000 +Subject: Scheduling in Python +Message-ID: <3717FBB5.6FA30769@hons.cs.usyd.edu.au> +X-UID: 886 + +I'm currently writing a CPU scheduler for an active network in python +but I"m unable to find +suitable routine to place Restricted Execution environments to sleep + +Does anybody know how this is done + +thanks + +hew + + + + + diff --git a/demo/ermis-f/python_m/cur/0887 b/demo/ermis-f/python_m/cur/0887 new file mode 100644 index 00000000..0259e414 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0887 @@ -0,0 +1,29 @@ +From: guido at CNRI.Reston.VA.US (Guido van Rossum) +Date: Thu, 8 Apr 1999 21:48:12 GMT +Subject: Python 1.5.2c1 -- release candidate for 1.5.2 +Message-ID: <199904082148.RAA04479@eric.cnri.reston.va.us> +X-UID: 887 + +On 8 April 1999, Python 1.5.2c1 was released. This is a release +candidate for 1.5.2 final - only showstopping bugs will be fixed +before 1.5.2 is released. + +*** Please help making 1.5.2 rock solid by banging on the release +candidate in all possible ways! *** + +I hope to release the final version of 1.5.2 on 13 April. That will +conclude the 1.5 development cycle; while I may release some essential +patches later, my main development focus will be on Python 1.6 (with +2.0 on the horizon; 1.6 will probably be the last of the 1.x +versions). + +Go to http://www.python.org/1.5/ for more info, or download directly: + +ftp://ftp.python.org/pub/python/src/py152c1.tgz (source, 2.5M) +ftp://ftp.python.org/pub/python/win32/py152c1.exe (Windows installer, 5.0 M) + +--Guido van Rossum (home page: http://www.python.org/~guido/) + + + + diff --git a/demo/ermis-f/python_m/cur/0888 b/demo/ermis-f/python_m/cur/0888 new file mode 100644 index 00000000..46e6314d --- /dev/null +++ b/demo/ermis-f/python_m/cur/0888 @@ -0,0 +1,53 @@ +From: befletch at my-dejanews.com (befletch at my-dejanews.com) +Date: Fri, 30 Apr 1999 19:30:57 GMT +Subject: Trouble with proxies +References: <7gasj8$g79$1@nnrp1.dejanews.com> <5lzp3qafkj.fsf@eric.cnri.reston.va.us> +Message-ID: <7gd0dh$add$1@nnrp1.dejanews.com> +Content-Length: 1754 +X-UID: 888 + +In article <5lzp3qafkj.fsf at eric.cnri.reston.va.us>, + Guido van Rossum wrote: +> A quick lookup in errno.errorcode shows that that error is +> WSAECONNRESET, in other words the connection is reset by the server. +> This apparently happens after the proxy has read your headers. Could +> it be that the proxy server requires some kind of magic header? Ask +> the sysadmin who is responsible for the proxy. At least find out what +> the proxy software is, you can probably find the specs on the web.... +> +> If you have a way to snoop network packets, it would be interesting to +> see what traffic happens when your regular browser (IE or netscape) +> connects to the proxy from the same client machine (I'm assuming that +> works!). + +The proxy server is WinProxy Lite, V2.1. It is running on an NT4 server. +Yes, IE and Netscape both work fine through the proxy server, and no, the +sysadmin doesn't know anything more about WinProxy than how to install it +and configure it for normal http/ftp/smtp/pop3 clients. + +Following suggestions from several kind people, I have also tried the +following: + +import os, urllib + +os.environ['http_proxy'] = "http(colon-slash-slash)10.187.200.230" + +f = urllib.urlopen('http://www.python.org') + +data = f.read() + +This gets as far as the f.read() call before it fails in the same fashion. +Appending ":80" or ":8080" to the proxy URL yield the same results, too. +I'm going to try to contact the WinProxy folks and see if they have any +insight into this problem, but if anyone here can help, it would of course +be appreciated. + +Thanks, +- Bruce + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/0889 b/demo/ermis-f/python_m/cur/0889 new file mode 100644 index 00000000..b748be97 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0889 @@ -0,0 +1,22 @@ +From: dcl at panix.com (David C. Lambert) +Date: 14 Apr 1999 11:05:18 -0400 +Subject: HTMLgen in Java? +Message-ID: <7f2are$kqq$1@panix.com> +X-UID: 889 + +I'm looking for a Java class library (freeware) that is more +or less parallel to HTMLgen in its capabilities and structure. +(That is, classes encapsulating the programmatic generation +of the major HTML structures). + +If anyone knows of such a beast, I'd appreciate a pointer. + +TIA. + +- David C. Lambert + dcl at panix.com + + + + + diff --git a/demo/ermis-f/python_m/cur/0890 b/demo/ermis-f/python_m/cur/0890 new file mode 100644 index 00000000..b0b495b3 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0890 @@ -0,0 +1,60 @@ +From: s.havemann at tu-bs.de (Sven Havemann) +Date: Mon, 26 Apr 1999 19:36:40 +0200 +Subject: SOLUTION: Triangulation of the unit sphere +Message-ID: <3724A428.138357DC@tu-bs.de> +Content-Length: 1977 +X-UID: 890 + +Hi! +=== + +I have a neat C++ solution for the problem of finding a triangulation of +n random points distributed on the unit sphere. The algorithm runs in +O(n*sqrt(n)) with a nice small constant, as you can see below (SGI O2 +with 250 MHz MIPS R10000). + +Python (www.python.org) and PyOpenGL +(http://starship.python.net/crew/da/PyOpenGL/) have been _very_ helpful, +and there's a nice unit sphere viewer and algorithm visualization +included in the 8K .tgz for those unixers who have it installed (I can +build a windows VC++ version on demand). + +Have a look: +ftp://ftp.cg.cs.tu-bs.de/pub/cg/people/havemann/sdelaunay-1.00.tgz + +Greetings, Sven. + +=============================================================== + +1004 faces, 504 vertices, 0.065275 seconds +2004 faces, 1004 vertices, 0.138277 seconds +3004 faces, 1504 vertices, 0.213124 seconds +4004 faces, 2004 vertices, 0.323524 seconds +5004 faces, 2504 vertices, 0.416665 seconds +6004 faces, 3004 vertices, 0.520598 seconds +7004 faces, 3504 vertices, 0.655553 seconds +8004 faces, 4004 vertices, 0.757154 seconds +9004 faces, 4504 vertices, 0.887238 seconds +10004 faces, 5004 vertices, 1.024282 seconds +11004 faces, 5504 vertices, 1.160054 seconds +12004 faces, 6004 vertices, 1.327187 seconds +13004 faces, 6504 vertices, 1.466274 seconds +14004 faces, 7004 vertices, 1.627190 seconds +15004 faces, 7504 vertices, 1.818125 seconds +16004 faces, 8004 vertices, 1.988085 seconds +17004 faces, 8504 vertices, 2.169752 seconds +18004 faces, 9004 vertices, 2.370354 seconds +19004 faces, 9504 vertices, 2.549433 seconds +20004 faces, 10004 vertices, 2.751907 seconds + +-- +__________________________________________________________________ + dipl-inform. Sven Havemann Institut fuer ComputerGraphik + Odastrasse 6 Rebenring 18 + 38122 Braunschweig - Germany 38106 Braunschweig - Germany + Tel. 0531/2808955 Tel. 0531/391-2108, Fax: -2103 + mailto:s.havemann at tu-bs.de http://www.cg.cs.tu-bs.de + + + + diff --git a/demo/ermis-f/python_m/cur/0891 b/demo/ermis-f/python_m/cur/0891 new file mode 100644 index 00000000..c7eaa754 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0891 @@ -0,0 +1,229 @@ +From: jeuguang at cm1.hinet.net (Wang Cheng-cheng) +Date: Wed, 14 Apr 1999 19:32:45 +0800 +Subject: [comp.lang.python.*] Posting guidelines -- bi-weekly posting +References: +Message-ID: <37147CDD.6C2A@cm1.hinet.net> +Content-Length: 9663 +X-UID: 891 + +Markus Fleck wrote: +> +> Archive-name: python-faq/python-newsgroup-faq +> Comp-lang-python-announce-archive-name: python-newsgroup-faq +> Comp-lang-python-archive-name: python-newsgroup-faq +> Posting-Frequency: biweekly +> Last-modified: 1998/08/20 +> Version: 1.4 +> +> Changes in 1.4: - now also cross-posting to comp.answers and news.answers +> +> > HOW TO post to comp.lang.python[.announce] < +> ------------------------------------------------ +> posted bi-weekly to comp.lang.python.announce, +> comp.lang.python, comp.answers, news.answers +> +> About Python +> ------------ +> +> From the Python FAQ: +> +> "Python is an interpreted, interactive, object-oriented programming +> language. It incorporates modules, exceptions, dynamic typing, very high +> level dynamic data types, and classes. Python combines remarkable power +> with very clear syntax. It has interfaces to many system calls and +> libraries, as well as to various window systems, and is extensible in C or +> C++. It is also usable as an extension language for applications that need +> a programmable interface. Finally, Python is portable: it runs on many +> brands of UNIX, on the Mac, and on PCs under MS-DOS, Windows, Windows NT, +> and OS/2. +> +> To find out more, the best thing to do is to start reading the tutorial +> from the documentation set at ." +> +> Example: "Hello World" in Python +> -------------------------------- +> +> The original task can be accomplished by a one-liner: +> +> print "Hello World!" +> +> Here is a longer example, a function that returns a string +> containing a series of multiple "Hello World!" greetings: +> +> def my_hello(how_often): +> retval = how_often * "Hello World! " # "multiply" string +> return retval[:-1] # strip off trailing space +> +> Usage: +> >>> my_hello(5) +> 'Hello World! Hello World! Hello World! Hello World! Hello World!' +> +> Note that block structure in Python is defined by indentation, rather than +> block delimiters (as used in many other programming languages such as Perl, +> Java and C/C++). +> +> comp.lang.python +> ---------------- +> +> comp.lang.python (or c.l.py for short) is the general discussion newsgroup +> for users of the Python language. It is also available as a mailing list; +> see below for instructions on subscribing to c.l.py through the mailing list. +> +> If you have questions regarding the use of Python, please take the time to +> consult the Python "Frequently Asked Questions" (FAQ) list first before +> posting to comp.lang.python: it's at . +> +> comp.lang.python.announce +> ------------------------- +> +> The comp.lang.python.announce newsgroup (or c.l.py.a for short) has been +> created in early 1998 as a companion newsgroup for comp.lang.python focused +> on Python-related announcements. The newsgroup charter is as follows: +> +> "comp.lang.python.announce is a moderated, low-volume newsgroup for +> announcements regarding the Python programming language, including: +> +> - new releases of the core distribution and contributed software +> - events (user group meetings, conferences, training, etc.) +> - periodic postings (FAQs) +> - other items of general interest to the Python community +> +> This is not a discussion group. Posts are expected to have +> Followup-To: headers set to "poster" or an appropriate newsgroup; +> posts that omit this header will have a Followup-To: comp.lang.python +> inserted by the moderator." +> +> comp.lang.python.announce posting guidelines +> -------------------------------------------- +> +> In addition to honoring the c.l.py.a charter (see above), you are asked +> to consider the following things when submitting announcements for +> comp.lang.python.announce: +> +> 1. It is often very helpful to INCLUDE SOME BACKGROUND INFORMATION if +> you are announcing a very specialized package or event. Submissions +> will be rejected by the moderators if a casual c.l.py.a reader +> cannot understand the utility or context of your announcement. +> +> 2. INCLUDE A URL (web address) for your announcement. Hint: a "real" +> web page often looks better than a mere FTP address and offers more +> possibilites to present your package "at a glance". +> +> 3. GIVE YOUR PACKAGE A VERSION NUMBER. If you give your package a version +> number from the start, it will be easier to identify different releases +> in the future. Even "small" packages should have version numbers. +> +> 4. Clarify the LICENSE that you release your package under. If you want to +> release something as free software, you might want to have a look at +> the "Open Source Definition", , +> and pick one of the licenses mentioned there under "Example Licenses". +> +> 5. You should INCLUDE YOUR E-MAIL ADDRESS in the body text of your +> posting or in the trailing .signature block. Please do *not* sign +> your announcement with PGP; most people would not know your public +> PGP key anyway and would get a warning message. +> +> 6. Avoid excessive cross-posting. Messages that are cross-posted to +> several moderated news groups will usually be approved by the +> moderator of the first group in the list. +> +> 7. To make it easier to include your announcement on www.python.org's +> front page, please include 2-3 lines of HTML code at the very end +> of your submission, using the following template: +> +>

403 Forbidden

+ +

The request was not properly formatted. A possible security risk + detected.

+ + Traceback (innermost last): + File "C:\PROGRA~1\PYTHON\TOOLS\IDLE\ScriptBinding.py", line 131, in + run_module_event + execfile(filename, mod.__dict__) + File "C:\Users\Bruce\postal codes\idle_experiment.py", line 19, in ? + data = f.readline() + File "C:\Program Files\Python\Lib\plat-win\socket.py", line 117, in readline + new = self._sock.recv(self._rbufsize) + error: (10054, 'winsock error') + +It would appear that the proxy server isn't at issue. Who is +generating that HTML output, anyway? + +Thanks, +- Bruce + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/1143 b/demo/ermis-f/python_m/cur/1143 new file mode 100644 index 00000000..f4142a93 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1143 @@ -0,0 +1,53 @@ +From: kajiyama at grad.sccs.chukyo-u.ac.jp (Tamito Kajiyama) +Date: 12 Apr 1999 19:11:16 GMT +Subject: Python 1.5.2c1 -- release candidate for 1.5.2 +In-Reply-To: Guido van Rossum's message of Thu, 8 Apr 1999 21:48:12 GMT +References: <199904082148.RAA04479@eric.cnri.reston.va.us> +Message-ID: +Content-Length: 1670 +X-UID: 1143 + +Guido van Rossum writes: +| +| *** Please help making 1.5.2 rock solid by banging on the release +| candidate in all possible ways! *** + +I gave the release candidate a try on a PC running Plamo Linux 1.3 +(a Linux distribution based on Slackware 3.5) and a Sparc box +running SunOS 4.1.4_JL, both together with two additional packages +PIL 1.0b1 and xml 0.5. The installations had no problem and +completely succeeded. Congratulations! :-) + +By the way, the cPickle bug in 1.5.2b1 that I reported in this news +group on January 11 (see [1]) has still been alive in 1.5.2c1. The +attached is a context diff fixing it. (Excuse me for realizing this +so late, but I didn't re-install 1.5.2b2 on the Sparc box...) + +[1] http://x10.dejanews.com/getdoc.xp?AN=431438253&CONTEXT=923940461.1386086447&hitnum=1 + +*** cPickle.c.orig Mon Apr 12 23:51:44 1999 +--- cPickle.c Mon Apr 12 23:52:13 1999 +*************** +*** 3295,3301 **** + if ((self->num_marks + 1) >= self->marks_size) { + s=self->marks_size+20; + if (s <= self->num_marks) s=self->num_marks + 1; +! if (self->marks) + self->marks=(int *)malloc(s * sizeof(int)); + else + self->marks=(int *)realloc(self->marks, s * sizeof(int)); +--- 3295,3301 ---- + if ((self->num_marks + 1) >= self->marks_size) { + s=self->marks_size+20; + if (s <= self->num_marks) s=self->num_marks + 1; +! if (! self->marks) + self->marks=(int *)malloc(s * sizeof(int)); + else + self->marks=(int *)realloc(self->marks, s * sizeof(int)); + +-- +KAJIYAMA, Tamito + + + + diff --git a/demo/ermis-f/python_m/cur/1144 b/demo/ermis-f/python_m/cur/1144 new file mode 100644 index 00000000..6625cdd0 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1144 @@ -0,0 +1,121 @@ +From: tismer at appliedbiometrics.com (Christian Tismer) +Date: Fri, 23 Apr 1999 13:16:25 GMT +Subject: try vs. has_key() +References: +Message-ID: <372072A9.922CE7A9@appliedbiometrics.com> +Content-Length: 3477 +X-UID: 1144 + + +Aahz Maruch wrote: +> +> I've seen roughly half the people here doing +> +> try: +> dict[key].append(foo) +> except: +> dict[key]=[foo] +> +> with the other half doing +> +> if dict.has_key(key): +> dict[key].append(foo) +> else: +> dict[key]=[foo] +> +> Can people explain their preferences? + +Well, besides the other good answers, there's some more. + +>From a design point of view, both versions have their place. +The has_key version reflects the expectation of many missing keys, +and it is not exceptional. The try..except version suggests +that you usually will find a key, while a non-existant key +is exceptional. +I think, the dict.get variant is just a more efficient +compromize which is somewhere between. +It is also a matter of taste. + +But on execution speed, there are the measures of Barry's paper, +and he is still right, although I would need measures for dict.get +as well. + +Note that a loop running over dict.get calls is still a bit +slower than indexing the dict, due to some internal method +access overhead. It even applies when the dict.get method +is assigned to a local variable. Indexing is the fastest +way to access a dict element when you expect no key errors. + +I have no exact measures yet, but will provide some, soon. + +To optimize things if you can expect a very small number of +key failures, a different approach can help to get the +last cycles squeezed out of the code: +If it is possible for your algorithm, you can put the +try..except clause outside of some loop. +This saves a statement and the exception clause setup as well. +Your code must be changed quite heavily, since it has to +restart the loop where it failed, but there are a number of +cases where I need this kind of optimization. + +Here an example, which doesn't try to look well-designed, +but run as fats as possible. I recommend to provide +a second, more readable version of the function for +documentation. + +Assuming you have code which runs in a loop and tries to collect +new elements as your code does, here a good, "nearly fast" +version, one with "get", and a faster, ugly one: + +def count_many(dict, itemlist): + for key, value in itemlist: + if dict.has_key(key): + dict[key].append(value) + else: + dict[key] = [value] + +def count_many_get(dict, itemlist): + for key, value in itemlist: + lis = dict.get(key) + if lis : + lis.append(value) + else: + dict[key] = [value] + +def count_many_fast(dict, itemlist): + while 1: + try: + k = 1 + for key, value in itemlist: + dict[key].append(value) ; k = k+1 + break + except KeyError: + dict[key] = [value] + itemlist = itemlist[k:] + +results = """ +# given a list of 1000 tuples, and appending +# this 1000 times, we measure + +>>> d={} ; print timing(count_many, (d, list) ,1000)[0] +17.8 +>>> d={} ; print timing(count_many_get, (d, list) ,1000)[0] +16.15 +>>> d={} ; print timing(count_many_fast, (d, list) ,1000)[0] +13.73 +>>> +""" + +ciao - chris + +-- +Christian Tismer :^) +Applied Biometrics GmbH : Have a break! Take a ride on Python's +Kaiserin-Augusta-Allee 101 : *Starship* http://starship.python.net +10553 Berlin : PGP key -> http://wwwkeys.pgp.net +PGP Fingerprint E182 71C7 1A9D 66E9 9D15 D3CC D4D7 93E2 1FAE F6DF + we're tired of banana software - shipped green, ripens at home + + + + diff --git a/demo/ermis-f/python_m/cur/1145 b/demo/ermis-f/python_m/cur/1145 new file mode 100644 index 00000000..2b63c838 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1145 @@ -0,0 +1,47 @@ +From: aa8vb at vislab.epa.gov (Randall Hopper) +Date: Fri, 16 Apr 1999 10:29:19 GMT +Subject: 1.5.2 broke IRIX module loading +In-Reply-To: <37161C26.C121CA1E@bioreason.com>; from Andrew Dalke on Thu, Apr 15, 1999 at 11:04:38AM -0600 +References: <19990414110116.A1374923@vislab.epa.gov> <37161C26.C121CA1E@bioreason.com> +Message-ID: <19990416062919.A1501651@vislab.epa.gov> +Content-Length: 1424 +X-UID: 1145 + +Thanks for the reply. + + |> "currstep" is the internal FORTRAN routine which has been zeroed-out. + | + | But I don't know what zeroed-out means in this context. For me + |I found which were missing with "nm library.so | grep UNDEFINED" + +I don't know exactly how they built this library, but somehow they +internalized the FORTRAN function names so that they are not exported by +the FORTRAN objects (e.g. currstep in currstep.o), while a dangling +reference exists to them in the C wrapper object (e.g. currstepc.o): + +Symbols from currstep.o: + + [Index] Value Size Class Type Section Name + + [0] | 0| |File |ref=16 |Text | /tmp_mnt/pub/storage/xcc/work/m3io/currstep.f + [1] | 0| |Proc |end=15 unsigned long |Text | currstep_ +->[2] | -8| |Local |unsigned long |Abs | currstep + + Symbols frstepc + + [Index] Class Type Section Name + + [0] | 0| |File |ref=15 |Text | /tmp_mnt/pub/storage/xcc/work/m3io/currstepc.c + [1] | 0| |Proc |end=14 int |Text | currstepc + [13] | 420| |End |ref=1 |Text | currstepc +->[101] | 0| |Proc | |Undefined| currstep + + +If one links with and calls any of these wrappers (e.g. currstepc()), it +works fine. + +Randall + + + + diff --git a/demo/ermis-f/python_m/cur/1146 b/demo/ermis-f/python_m/cur/1146 new file mode 100644 index 00000000..e8d20492 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1146 @@ -0,0 +1,55 @@ +From: johngrayson at ome.com (John Grayson) +Date: Thu, 08 Apr 1999 23:08:05 GMT +Subject: Is Python Dying? +Message-ID: <370D36ED.8A270DE9@ome.com> +Content-Length: 2089 +X-UID: 1146 + + +| Now that you mentioned it, I remember hearing that someone was +| writeing a Python TKinter book......what the hell ever happened to +|that?!?! + +I don't know about *that* one, but I can say there are two new Python +books on the way from Manning Publications. + +Ken MacDonald's "The Quick Python Book" has been through its reviews and +has been revised. Right now it is in final technical review and once +complete the Publisher will begin production. + +I reviewed the ms and can say that it will be a great book for +programmers new to Python. The first part illustrates the key features +of Python with some good examples. Then, it goes on to demonstrate how +to build meaningful applications, including Tkinter GUIs, Windows/COM +and interfacing Python and Java. You can get some more details at +http://www.manning.com. + +I'm at various stages of completion of chapters for "Python and Tkinter +Programming", which has just completed a review of the partial +manuscript. This book is intended for experienced programmers, who +probably are getting to know Python pretty well (or have read "Quick +Python"!), and have a need to build applications or prototypes in Python +and Tkinter. + +P+TkP starts with some introductions to Python and Tkinter to give +context and then documents Tkinter widgets and functions, using some +(hopefully) realistic examples. Creating many types of GUI's, front +panels and machines, interfacing TCP/IP, ODBC and CORBA, graphic design +and many other topics are illustrated with full examples, with detailed +explanation of the key points of the code. In fact, the +longer-than-usual examples are a key feature of the book; this is +intended to provide the reader with some concrete examples that might be +useful as templates for their own prototypes and applications. + +As an appendix, there is a complete Tk to Tkinter mapping, intended to +allow Tcl/Tk programmers to make use of Tkinter (!) and to enable +Tkinter programmers to make better use of the Tk man pages. Also Pmw +widgets feature prominently in the examples. + +So, Is Python dying? + + ... not a chance! + + + + diff --git a/demo/ermis-f/python_m/cur/1147 b/demo/ermis-f/python_m/cur/1147 new file mode 100644 index 00000000..b661ead9 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1147 @@ -0,0 +1,15 @@ +From: nbecker at fred.net (nbecker at fred.net) +Date: 12 Apr 1999 14:10:21 -0400 +Subject: [success] 1.5.2c1 linux +Message-ID: +X-UID: 1147 + +python-1.5.2c1 i686-pc-linux-gnu (--with-threads) +glibc-2.0.7 egcs-1.1.2 + +49 tests OK. +12 tests skipped: test_al test_audioop test_bsddb test_cd test_cl test_dl test_gl test_imageop test_imgfile test_nis test_rgbimg test_sunaudiodev + + + + diff --git a/demo/ermis-f/python_m/cur/1148 b/demo/ermis-f/python_m/cur/1148 new file mode 100644 index 00000000..193cb5d5 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1148 @@ -0,0 +1,38 @@ +From: jblake at speakeasy.org (Jonathon Blake) +Date: Tue, 06 Apr 1999 05:01:48 GMT +Subject: Python books +References: <7dr72m$9p5$1@news1.cableinet.co.uk> <7dso8m$bk5$1@nnrp1.dejanews.com> +Message-ID: <923374908.564.89@news.remarQ.com> +X-UID: 1148 + +: just right. i'd be interested in hearing everyone elses' ideas as to what +: such a book would/should have in it. i need some encouragment!!! + + Something like << take your choice here >> + + _The Pascal Handbook_ + _The Basic Handbook_ + _The Standard C Library_ Plaugher (?sp) + + As your source material use _every_ module mentioned in + the Snake Book, IPWP, and found in Python v 1.0, 1.1, 1.2 + 1.3, .4 & 1.5x. State which modules are depreciated, and + what the improvements are. + + FWIW, this is something I've been slowly typing up, on my + old XT, whilst waiting for my computers to comeback after + they crash. << Something in Python 1.5. doesn't agree + the code I write. >> + + xan + + jonathon + +-- + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1149 b/demo/ermis-f/python_m/cur/1149 new file mode 100644 index 00000000..b711c7e8 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1149 @@ -0,0 +1,62 @@ +From: mlh at swl.msd.ray.com (Milton L. Hankins) +Date: Tue, 13 Apr 1999 13:17:50 -0400 +Subject: Tools for three way merge of Python source files? +Message-ID: +Content-Length: 1706 +X-UID: 1149 + +Keywords: diff3, merge, three-way, 3-way + +Are there tools to help with 3-way merges of Python sources and/or +indentation conversion? + +I'm using Python on a Real Project and I need to do a 3-way merge. +Certain whitespace characters must be ignored -- specifically, carriage +returns. I have a diff tool which ignores blanks but then I run into +problems where a block of code has been indented further (inside a new +block). + +I wish I could rely on the parser to catch this sort of thing, but it +won't detect all possible follies, such as this one: + + +if foo: + if bar: + baz() + else: + frob() + + +if foo: + if bar: + baz() +else: + frob() + +Here, the merge result (using blank ignorance) would not incorporate +the changes from . + +One correct solution seems to be to strip CR from CRLF. But I'm +afraid of having too many conflicting sections (false negatives) where +the spacing difference is actually benign. Perhaps I should just tell +my fellow developers not to change indentation unless they have to. + +So, it also appears that I need a Python-aware indentation converter -- +something that converts a source file to use a minimal number of tabs (or +perhaps spaces, as long as it were consistent) for block indents. + +If anyone has had similar experiences or knows of a solution I'd love +to hear about it. Email is preferred. Thanks. + + +(I really hope this doesn't start Yet Another Whitespace War.) + +-- + Milton L. Hankins -=- +Software Engineer, Raytheon Systems Company -=- RayComNet 7-225-4728 + http://amasts.msd.ray.com/~mlh -=- ><> Isaiah 64:6 ><> + + + + + diff --git a/demo/ermis-f/python_m/cur/1150 b/demo/ermis-f/python_m/cur/1150 new file mode 100644 index 00000000..b5d60560 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1150 @@ -0,0 +1,29 @@ +From: poinot at onera.fr (Marc Poinot) +Date: Wed, 14 Apr 1999 12:02:52 GMT +Subject: Tools for three way merge of Python source files? +References: +Message-ID: <371483EC.24A9AE3@onera.fr> +X-UID: 1150 + +"Milton L. Hankins" wrote: +> +> Keywords: diff3, merge, three-way, 3-way +> +You can use the GNU Emacs merge tool. +You will have a color presentation with some nice facilities. +Emacs can translate tabs to white-spaces and reverse and back +(untabify). +http://www.fsf.org + +You can also use CVS to store your files +and ask it to merge them when you have several +branches of development. +http://www.cyclic.com + +Marcvs [alias Emacs also have an undo, if to want to get back to the +reverse + of your translation] + + + + diff --git a/demo/ermis-f/python_m/cur/1151 b/demo/ermis-f/python_m/cur/1151 new file mode 100644 index 00000000..3a60683e --- /dev/null +++ b/demo/ermis-f/python_m/cur/1151 @@ -0,0 +1,53 @@ +From: john.michelsen at gte.net (John Michelsen) +Date: Tue, 20 Apr 1999 00:49:16 GMT +Subject: accessing calling scripts from called scripts at run time +Message-ID: +X-UID: 1151 + +I'm having trouble accessing a calling script from a called script at run +time. +Here is an example: + +#first file, will call second +from Tkinter import * +import tkFileDialog, string + +root = None + +def importScript(): + filename = tkFileDialog.askopenfilename() + if filename != '': + list = string.split(filename, '/') + filename = list[-1] + #dir = string.join(list[:-1], '/') + #sys.path.append(dir) + exec "import %s" % filename[:-3] + +if __name__ == "__main__": #? + root = Tk() + b = Button(root, text="import script", command=importScript) + b.pack() + root.mainloop() + + +#another file, picked by tkFileDialog at run time by user +from importTest import root +root.config(bg='green') + + +If I put the "if __name__ == '__main__':" in, the second file can't get at +the +root properly. If I leave it out, when I import root in the second file, it +creates +a new root window. How can I get at the root without making a new one? + +Thanks, + +John + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1152 b/demo/ermis-f/python_m/cur/1152 new file mode 100644 index 00000000..633b3884 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1152 @@ -0,0 +1,46 @@ +From: markus_kohler at hp.com (Markus Kohler) +Date: 29 Apr 1999 16:05:25 +0200 +Subject: Dangers of C++ (Way off topic) +References: <613145F79272D211914B0020AFF6401914DAD8@gandalf.digicool.com> <372769B0.3CE8C0F3@prescod.net> <372827D8.7A5F@mailserver.hursley.ibm.com> +Message-ID: +Content-Length: 1271 +X-UID: 1152 + +>>>>> "Paul" == Paul Duffin writes: + + Paul> William Tanksley wrote: + >> Let me expand a little on the dangers of C++. + >> + >> - virtual functions. It shouldn't be my job to tell the + >> compiler when virtual lookups are the only thing to do; the + >> compiler ought to be able to tell. For performance gurus, a + >> way to hint to the compiler that virtual lookups were _not_ + >> needed might be useful -- but what if the programmer was wrong? + >> + + Paul> How can the compiler tell ? + +What William means (I think) is that the default should be that functions +are virtual. Since even virtuals functions can be inlined this makes sense. + + >> - inline functions. Again, a good compiler HAS to make this + >> decision for itself, and in a good compiler, whether or not + >> this decision was made should be transparent to the programmer. + >> + + Paul> A good compiler will, inline is only a hint to the compiler, + Paul> the compiler can choose whether or not to inline that + Paul> function, it can also choose to inline other functions which + Paul> have not been marked as inline. + +[agree with all the other points] + + +Markus + +-- +Markus Kohler mailto:markus_kohler at hp.com + + + + diff --git a/demo/ermis-f/python_m/cur/1153 b/demo/ermis-f/python_m/cur/1153 new file mode 100644 index 00000000..5f829b67 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1153 @@ -0,0 +1,141 @@ +From: markus_kohler at hp.com (Markus Kohler) +Date: 30 Apr 1999 09:13:53 +0200 +Subject: Python IS slow ! [was] Re: Python too slow for real world +References: <613145F79272D211914B0020AFF6401914DAD8@gandalf.digicool.com> <372769B0.3CE8C0F3@prescod.net> +Message-ID: +Content-Length: 4774 +X-UID: 1153 + +>>>>> "William" == William Tanksley writes: + +[deletia] + >> Agreed. The main problem with todays statically typed languages + >> is that they are too restrictive and to complicated. + + William> I'm not sure that they're _too_ restrictive; they work in + William> their domains. The problem is that we don't want to + William> loose Python's greatest strength: it's friendly. + + William> Let me expand a little on the dangers of C++. + + William> - virtual functions. It shouldn't be my job to tell the + William> compiler when virtual lookups are the only thing to do; + William> the compiler ought to be able to tell. For performance + William> gurus, a way to hint to the compiler that virtual lookups + William> were _not_ needed might be useful -- but what if the + William> programmer was wrong? + + >> True, SmallEiffel inlines most of the virtual function calls + >> automatically. This is the way to go. + + William> Inlines virtual functions? I think you got your wires + William> crossed ;-). Virtual functions, by definition, can't be + William> inlined. Inlining is where you place the routine's + William> source code directly into the code of the calling + William> routine. + +No I'm serious. Even most C++ compilers cannot inline virtual functions, + that doesn't mean it is not possible ;-) + +A virtual function call can be inlined if you know all subtypes of a type: + +Assume you have a class "A" and classes "AA" and "AB" that are subclasses of +A. + +Given + + A thing; + thing = createFromFactory();/* it's not known here at compile whether thing is + of type A, AA or AB */ + thing.doSomething(); + +Then the a call A.doSomething() can be inlined ( translated to pseudo-C (tm)). + + A thing + thing = createFromFactory(); + + if (thing.type)==AA + { + doSomething__AA(thing); + } + elseif (thing.type)==AC + { + doSomething__AB(thing); + } + elseif (thing.type)==A + { + doSomething__A(thing); + } + else + { + performHashBasedSlowCall(thing, doSomething) + } + + +Nobody says that one has to use vtables like C++ does ;-) + +SmallEiffel does exactly this. They used have a paper about their technique +on their web side: http://SmallEiffel.loria.fr/index.html + +Self a smalltalk successor did the same without static type information +years ago : http://self.smli.com/ +Sun's new HotSpot Java compiler is based on this technology. + +Another way to speed up calling polymorphic functions is to use +a cache of the latest (or the first) type together with the functions called for +this type. This works very well for Smalltalk and should be a good thing in python too. + + William> - GC -- hard to add after the fact. No worry with + William> Python, but what if there are other issues like it? + + >> I'm not sure if I understand this sentence. Do you mean GC is + >> hard to add to python without breaking existing code ? I would + >> agree with that. And why do you say "no worry" Do you mean GC + >> is not worth the effort ? + + William> Guido seems to think so. Anyone who disagrees is free to + William> contribute and work on porting GC code (I would like to + William> see it). + + + William> I think that worrying about the other issues is FAR more + William> rewarding -- RC is not only hard to replace with GC, but + William> the rewards for doing so are relatively small (in + William> comparison to the other things we can think about). + +I would guess it's a lot of work to replace the RC with a GC, because a good +GC needs a way to know if something is a pointer or not and this would require +changing object layouts. Also all the reference counting calls would need to be +removed. OK it might be possible to replace this code with macros that just do nothing. + +But the main problem would be that a lot of external (C) code would break with a decent GC +because the GC would move objects around at runtime. + + William> I don't want to stop anyone from trying, though. The + William> nice thing about free software is that even if everyone + William> disagrees with you or thinks it's not worth it you can + William> still get it done. + + William> So what other issues are worth thinking about? I don't + William> know. + + >> You may have a look at Strongtalk a Smalltalk with static + >> (optional) type checking. + + William> Found it using Google.com (a GOOD search engine for + William> technical matters). + William> http://java.sun.com/people/gbracha/nwst.html + + William> I'll be spending some time reading it. My initial + William> impression: _very_ good. This would fit well, I think. + +Nice to hear that ... + + +Markus +-- +Markus Kohler mailto:markus_kohler at hp.com + + + + diff --git a/demo/ermis-f/python_m/cur/1154 b/demo/ermis-f/python_m/cur/1154 new file mode 100644 index 00000000..5ee9a10b --- /dev/null +++ b/demo/ermis-f/python_m/cur/1154 @@ -0,0 +1,18 @@ +From: wdrake at my-dejanews.com (wdrake at my-dejanews.com) +Date: Fri, 30 Apr 1999 02:12:10 GMT +Subject: Oracle Call Interface +Message-ID: <7gb3hn$lse$1@nnrp1.dejanews.com> +X-UID: 1154 + +If anyone has experience writing applications directly to the Oracle Call +Interface (OCI), in Python or JPython please send me examples or references on +how to do it. + +Thanks, + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/1155 b/demo/ermis-f/python_m/cur/1155 new file mode 100644 index 00000000..f4a3f498 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1155 @@ -0,0 +1,35 @@ +From: cgw at fnal.gov (Charles G Waldman) +Date: Sun, 11 Apr 1999 06:58:43 GMT +Subject: Python's object model +Message-ID: <199904110658.BAA06796@buffalo.fnal.gov> +X-UID: 1155 + +This "Stack" class: + + +class Stack: + stack = [] + + def push(self, value): + self.stack.append(value) + + ... + +doesn't work as you expected because the way you've declared it, the +".stack" attribute is a class attribute (shared by all instances of +the class) rather than an instance attribute. To create instance +attriubtes, create them in the initializer, like this: + +class Stack: + def __init__(self): + self.stack = () + + def push(self, value): + ... + +Also note that in the not-quite-yet released Python 1.5.2 the builtin +list objects have a pop() method, which is kind of handy. + + + + diff --git a/demo/ermis-f/python_m/cur/1156 b/demo/ermis-f/python_m/cur/1156 new file mode 100644 index 00000000..3fe4e4ba --- /dev/null +++ b/demo/ermis-f/python_m/cur/1156 @@ -0,0 +1,31 @@ +From: MHammond at skippinet.com.au (Mark Hammond) +Date: Wed, 14 Apr 1999 14:28:59 +1000 +Subject: win32net.pyd--NetUserAdd +References: <37131b6c.2250115@kelly> +Message-ID: <7f15hd$bt0$1@m2.c2.telstra-mm.net.au> +X-UID: 1156 + +As fate would have it, Ive started on this today. + +I intend using Python dictionaries to exchange the information between the +various USER_INFO_* structures.... + +You can be a beta tester if you like :-) + +Mark. + +Holger Fl?rke wrote in message <37131b6c.2250115 at kelly>... +>I am interested in adding user accounts on WinNT using python. The +>functions "NetUserAdd" and "NetUserSetGroups" in Win32 networking +>aren't implemented in then win32net.pyd-module. Does anyone have +>mapped these functions? Any other ideas? +> +>Thanks +> +>HolgeR + + + + + + diff --git a/demo/ermis-f/python_m/cur/1157 b/demo/ermis-f/python_m/cur/1157 new file mode 100644 index 00000000..19fa3b01 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1157 @@ -0,0 +1,13 @@ +From: jeff.saenz at jpl.nasa.gov (Jeff Saenz) +Date: Mon, 26 Apr 1999 15:09:34 -0700 +Subject: decompiling python +Message-ID: <3724E41E.D3730480@jpl.nasa.gov> +X-UID: 1157 + +Does anyone know of a decompilation tool for python? + +-jm + + + + diff --git a/demo/ermis-f/python_m/cur/1158 b/demo/ermis-f/python_m/cur/1158 new file mode 100644 index 00000000..3d45f3c8 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1158 @@ -0,0 +1,23 @@ +From: tscha00a at oi42.kwu.siemens.de (Dr. Armin Tschammer) +Date: Wed, 07 Apr 1999 15:51:46 +0200 +Subject: Python and Nutcracker +Message-ID: <370B62F2.93D76301@oi42.kwu.siemens.de> +X-UID: 1158 + +Hi, +Has anyone experience with Python and Nutcracker ? +We are using embedded Python in our application which +is developed under HPUX. +We are now porting our application to Windows NT +with the help of the Nutcracker library. +Has anyone already done such stuff ? + + + Armin + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1159 b/demo/ermis-f/python_m/cur/1159 new file mode 100644 index 00000000..d994d554 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1159 @@ -0,0 +1,31 @@ +From: jefftc at leland.Stanford.EDU (Jeffrey Chang) +Date: Thu, 29 Apr 1999 01:10:23 -0700 +Subject: help +In-Reply-To: <3725E2FB.F7E46CED@pop.vet.uu.nl> +References: <37257B0A.AF4C8E4C@pop.vet.uu.nl> <3725E2FB.F7E46CED@pop.vet.uu.nl> +Message-ID: +X-UID: 1159 + +> This is how we push the programmer population slowly up that exponential +> curve. :) +> +> Regards, +> +> Martijn + + +That's so true! At my last employer, someone managed to convince me and a +few other people to look at Python (thanks, Andrew!) Now that I'm back in +school, I have a whole new audience to infec^h^h^h^h^h tell. +Unfortunately, that other language seems to be quite entrenched in my +field (bioinformatics). + +but-1.1-people-is-all-it-takes-to-achieve-exponential-growth-ly y'rs, +(wow, that is fun!) +Jeff + + + + + + diff --git a/demo/ermis-f/python_m/cur/1160 b/demo/ermis-f/python_m/cur/1160 new file mode 100644 index 00000000..49e5aa48 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1160 @@ -0,0 +1,19 @@ +From: lpaterno at fnal.gov (Laura Paterno) +Date: Tue, 20 Apr 1999 11:21:24 -0500 +Subject: Bit Arrays +Message-ID: <7fi9i8$n2u$1@info3.fnal.gov> +X-UID: 1160 + +Hello all, + +I want to write a python program that has 26 Bit Arrays that each contain +1113 bits. Is there a structure in python that one can use to represent a +bit array? + +Laura Paterno + + + + + + diff --git a/demo/ermis-f/python_m/cur/1161 b/demo/ermis-f/python_m/cur/1161 new file mode 100644 index 00000000..baf918f8 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1161 @@ -0,0 +1,105 @@ +From: jschiotz at hotmail.com (Jakob Schiotz) +Date: Tue, 27 Apr 1999 10:15:35 GMT +Subject: Cross-references between dynamically loaded modules under AIX +Message-ID: <7g42o5$d8u$1@nnrp1.dejanews.com> +Content-Length: 2993 +X-UID: 1161 + + + I am tuning a C program into a python module. The program contains +some very large arrays of doubles, that I would like to become NumPy +arrays in Python. I wrote a small function to convert a C pointer to +a NumPy array (I am using SWIG), the program is appended below. It +works fine on an alpha processor running OSF1 V4.0, but it coredumps +under AIX version 4.1.5. The coredump occurs when PyArray_FromDims is +called. It looks like the dynamical loader under AIX cannot resolve +symbols in one module that refers to another module. It is probably +related to the primitive way dynamic loading is working under AIX. +The modules are created by the ld_so_aix, which is using a text file +with the symbols defined in the python executable (created when the +python executable was linked). I assume that the linker cannot link +the references to symbols in the NumPy modules without similar +information. + + Does anyone have a solution for this problem? Repeating the relevant +code from the NumPy source would not be very nice, as it is quite a +bit that would have to be repeated. + + +Best regards, + +Jakob Schiotz + + +Here is the interface file for SWIG. Vector is typedef'ed to +double[3] in main.h. +------------------------------------------------------------ +/* Emacs: Use -*- C -*- mode for this stuff */ +%module fast + +%title "FAST - a molecular dynamics module",keep + +%{ +#include "main.h" +#include "arrayobject.h" +%} + +%include fastcommon.i + +/* Initialize FAST, reading input files */ +CmFile *initfast(char *potfilename, char *infilename, int wantclass, + int dynamics, int frame, int hmode); + + +%init %{ + setdefaults(); + fprintf(stderr, "FAST: %s %s\n", __DATE__, __TIME__); +%} + +/* Access functions for global arrays of Vector */ +%{ +PyObject *my_Vectors_As_NumPy(PyObject *self, PyObject *args) + { + char *vectorp; + double *cdata; + PyArrayObject *numpy; + int dims[2]; + + /* Read the argument, it should be a string encoding a pointer */ + if (!PyArg_ParseTuple(args, "s", &vectorp)) + return NULL; + + /* Decode the pointer */ + if (SWIG_GetPtr(vectorp, (void **) &cdata, "_Vector_p")) + { + PyErr_SetString(PyExc_TypeError, "Not a pointer to Vector"); + return NULL; + } + + /* Create an empty numpy array of dimension nAtoms * 3 */ + dims[0] = nAtoms; + dims[1] = 3; + numpy = (PyArrayObject *) PyArray_FromDims(2, dims, PyArray_DOUBLE); + + /* Copy the data to the numpy array */ + memcpy(numpy->data, cdata, dims[0]*dims[1]*sizeof(double)); + + return (PyObject*) numpy; + } +%} + +%native(Vectors_As_NumPy) extern PyObject *my_Vectors_As_NumPy(PyObject *self, +PyObject *args); + +-- +Jakob Schiotz, CAMP and Department of Physics, Tech. Univ. of Denmark, +DK-2800 Lyngby, Denmark. http://www.fysik.dtu.dk/~schiotz/ +This email address is used for newsgroups and mailing lists +(spam protection). Official email: schiotz @ fysik . dtu . dk + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/1162 b/demo/ermis-f/python_m/cur/1162 new file mode 100644 index 00000000..e1490d3d --- /dev/null +++ b/demo/ermis-f/python_m/cur/1162 @@ -0,0 +1,30 @@ +From: paul at prescod.net (Paul Prescod) +Date: Fri, 30 Apr 1999 14:40:19 GMT +Subject: Python IS slow ! [was] Re: Python too slow for real world +References: <613145F79272D211914B0020AFF6401914DAD8@gandalf.digicool.com> <7g9qmo$luf$1@news.udel.edu> <372965CA.2B3FD2FE@appliedbiometrics.com> <19990430080805.B776752@vislab.epa.gov> <3729A9F3.75B2692B@appliedbiometrics.com> <19990430101215.A806665@vislab.epa.gov> +Message-ID: <3729C0D3.6D28A592@prescod.net> +X-UID: 1162 + +Randall Hopper wrote: +> +> Right. I wasn't too clear. By default, I mean I don't want to have to +> insert some commands/declarations for every namespace (every class, every +> method, every module, etc.) to lock them. I want this to happen +> automagically based on a switch. + +But the "right thing" varies on a class by class basis. Some classes in a +module need to be locked and some do not. + +-- + Paul Prescod - ISOGEN Consulting Engineer speaking for only himself + http://itrc.uwaterloo.ca/~papresco + +"Microsoft spokesman Ian Hatton admits that the Linux system would have +performed better had it been tuned." +"Future press releases on the issue will clearly state that the research +was sponsored by Microsoft." + http://www.itweb.co.za/sections/enterprise/1999/9904221410.asp + + + + diff --git a/demo/ermis-f/python_m/cur/1163 b/demo/ermis-f/python_m/cur/1163 new file mode 100644 index 00000000..4bec43f7 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1163 @@ -0,0 +1,28 @@ +From: zessin at my-dejanews.com (Uwe Zessin) +Date: Sun, 25 Apr 1999 08:15:50 GMT +Subject: CSV Module +References: +Message-ID: <7fuivl$n79$1@nnrp1.dejanews.com> +X-UID: 1163 + +In article +, + Moshe Zadka wrote: +> I wonder if there is some standard module out there that can parse +> ``CSV'' files. + +I've downloaded one last year from: + http://yi.com/home/TrattLaurence/comp/python/csv/index.html + +It saved me a lot of time, thanks! +Just checked - the URL is still valid. + +-- +Uwe Zessin + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/1164 b/demo/ermis-f/python_m/cur/1164 new file mode 100644 index 00000000..82ce426c --- /dev/null +++ b/demo/ermis-f/python_m/cur/1164 @@ -0,0 +1,30 @@ +From: behrends at cse.msu.edu (Reimer Behrends) +Date: 29 Apr 1999 23:37:24 GMT +Subject: Dylan vrs Python (was; Re: Python IS slow ! [was] Re: Python too slow for real world) +References: <613145F79272D211914B0020AFF6401914DAD8@gandalf.digicool.com> <372769B0.3CE8C0F3@prescod.net> <7g89eg$vb0$1@brick.cswv.com> <375533c2.241102625@newshost> +Message-ID: +X-UID: 1164 + +Jason Trenouth (jason at harlequin.com) wrote: +[...] +> with-heavy-troll () +> What would you give for interactive development and native compilation and +> incremental gc and objects-all-the-way-down and extensible syntax and COM and +> CORBA and a great GUI toolkit? +> end; + +A lot--now if I could only get Harlequin Dylan to (1) use a readable +font and (2) run on my Linux machine. So I have to settle for Gwydion +Dylan right now, which is nice, but not nearly as nice as what you +described above. :) + +(I would still second Jason's comment and suggest that people have a +look at the free version of Harlequin Dylan--if I had to develop code +under Windows, it would probably be my IDE of choice, with a couple of +reservations.) + + Reimer Behrends + + + + diff --git a/demo/ermis-f/python_m/cur/1165 b/demo/ermis-f/python_m/cur/1165 new file mode 100644 index 00000000..d21d92ad --- /dev/null +++ b/demo/ermis-f/python_m/cur/1165 @@ -0,0 +1,21 @@ +From: aa8vb at vislab.epa.gov (Randall Hopper) +Date: Fri, 16 Apr 1999 18:19:48 GMT +Subject: Bug with makesetup on FreeBSD +In-Reply-To: <37175E05.4CF3C68@starmedia.net>; from Andrew Csillag on Fri, Apr 16, 1999 at 11:57:57AM -0400 +References: <37175E05.4CF3C68@starmedia.net> +Message-ID: <19990416141948.B1545732@vislab.epa.gov> +X-UID: 1165 + +Andrew Csillag: + |makesetup in Python 1.5.1 and 1.5.2 bombs on lines in the Setup file + |that use backslash continuation to break a module spec across lines on + |FreeBSD. + +BTW FWIW, I just built 1.5.2 last night on 3.0-RELEASE using the 1.5.2c1 +port. Worked fine. But it may not invoke makesetup under the hood. + +Randall + + + + diff --git a/demo/ermis-f/python_m/cur/1166 b/demo/ermis-f/python_m/cur/1166 new file mode 100644 index 00000000..76b81d0e --- /dev/null +++ b/demo/ermis-f/python_m/cur/1166 @@ -0,0 +1,34 @@ +From: JamesL at Lugoj.Com (James Logajan) +Date: Fri, 02 Apr 1999 20:45:01 -0800 +Subject: Dealing with failure Was: Dealing with faults matters +References: <7ds2g4$cm8$1@Starbase.NeoSoft.COM> <000901be7b41$cdc84f20$f19e2299@tim> <7dt2pv$1mj$1@Starbase.NeoSoft.COM> <3706f449.12085377@news.cybercity.dk> <7e3efa$j7v$1@Starbase.NeoSoft.COM> +Message-ID: <37059CCD.44FA3A91@Lugoj.Com> +X-UID: 1166 + +Cameron Laird wrote: +> In fact, a correct computer program often +> has over half its lines devoted to accomo- +> dating error. + +Oh sh*t. Yet another quantifiable measurement I suspect my programs wouldn't +hold up to. If it comes to 49% I'm SOL. God forbid it should be 48% or even +(gasp) 37.5%. + +I will confess here and now that I wrote programs for over 10 years that +included no exception handling (well, an occasional setjmp/longjmp back in +the "dark ages"). I am SO ashamed. Will the emotional agony never end? Even +worse, I still write the occasional proceedural program, rather than +approach it object-oriented. *SOB* + +They say confession is good for the soul, but I know in my heart I have +sinned and will be condemmed to hell where I will be forced to write an +X-Windows server using Apple ][ Basic and 6502 assembly for all eternity +(cause we all know that is how long it will take to get running right). + +PRINT D$"OPEN FILE" + +....(I think that is right.) + + + + diff --git a/demo/ermis-f/python_m/cur/1167 b/demo/ermis-f/python_m/cur/1167 new file mode 100644 index 00000000..1bbbefd9 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1167 @@ -0,0 +1,27 @@ +From: faassen at pop.vet.uu.nl (Martijn Faassen) +Date: Wed, 21 Apr 1999 12:32:54 +0200 +Subject: New python user seeks comments +References: +Message-ID: <371DA955.9F13B144@pop.vet.uu.nl> +X-UID: 1167 + +David Steuber wrote: +> +> Er, uh, hmm. +> +> I wrote my first Python program today. It took longer than I +> expected. Who would have guessed that you couldn't give a file object +> the name 'in'? Or at least that was one of the weirder obstacles. + +It's not that weird as 'in' is a reserved keyword in Python. :) + +for i in whatever: + print "See?" + +Regards, + +Martijn + + + + diff --git a/demo/ermis-f/python_m/cur/1168 b/demo/ermis-f/python_m/cur/1168 new file mode 100644 index 00000000..74c50572 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1168 @@ -0,0 +1,29 @@ +From: news at dorb.com (Darrell) +Date: Thu, 8 Apr 1999 17:34:52 -0400 +Subject: Chaning instance methods +References: <370C2904.A6F4BD54@inrialpes.fr> +Message-ID: +X-UID: 1168 + +> To make a long story short, what you're trying to do is not very cool, +> so perhaps you don't get truly cool answers, but still, you can do it +> in Python. Fortunately, what you're asking here is not common practice, +> I hope! + +Is this a truly flawed design pattern ? +I have done this for a module to replace a function with out changing the +module its self. Because I didn't control that module. Also for a class once +to allow a runtime XML type script to replace a method. Both of these can be +tricky to debug because you tend to forget what's happening. Yet a better +solution doesn't come to mind. + +Possibly the module problem could be solved by creating another module and +"from XXX import *" then add my replacement function. + +Darrell Gallion + + + + + + diff --git a/demo/ermis-f/python_m/cur/1169 b/demo/ermis-f/python_m/cur/1169 new file mode 100644 index 00000000..c92c540a --- /dev/null +++ b/demo/ermis-f/python_m/cur/1169 @@ -0,0 +1,72 @@ +From: herzog at online.de (Bernhard Herzog) +Date: 13 Apr 1999 00:02:04 +0200 +Subject: extending questions +References: <371220AD.6C3B0B5@home.com> +Message-ID: +Content-Length: 1694 +X-UID: 1169 + +"Michael P. Reilly" writes: + +> Jim Meier wrote: +> : Firstly, I'm looking for a quick and easy way for a PyCFunction to +> : accept as an argument either an integer or a floating point number, so +> : that the function can be called as +> +> : func(1,1,1) +> +> : or as +> +> : func(0.5,0,2/3) +> +> : because python doesn't seem to let me consider an integer as a float. +> : I've tried using some of the conversion functions in the abstract +> : numeric suite and the PyFloat_GetDouble (or some similar name), but with +> : no luck - it always returned -1 for me. Any ideas? +> +> My best suggestion would be to use the PyInt_Check and PyFloat_check +> functions. +> +> PyObject *func(PyObject *self, PyObject *args) +> { PyObject *arg1, *arg2, *arg3; +> double a1, a2, a3; +> +> if (!PyArg_ParseTuple(args, "OOO", &arg1, &arg2, &arg3)) +> return NULL; +> /* get the double from the first argument */ +> #define py_to_double(a, var) \ +> if (PyInt_Check(a)) (var) = (double)PyInt_AS_LONG(a); \ +> else if (PyFloat_Check(a)) (var) = PyFloat_AS_DOUBLE(a); \ +> else { PyErr_SetString(PyExc_TypeError, "must supply a number"); \ +> return NULL; } +> +> py_to_double(arg1, a1); +> py_to_double(arg2, a2); +> py_to_double(arg3, a3); +> #undef py_to_double + +Why not just + +PyObject * +func(PyObject *self, PyObject *args) +{ + double a1, a2, a3; + + if (!PyArg_ParseTuple(args, "ddd", &a1, &a2, &a3)) + return NULL; + + +/* ... */ +} + + +This should work for Python floats, int and longs. + + +-- +Bernhard Herzog | Sketch, a python based drawing program +herzog at online.de | http://www.online.de/home/sketch/ + + + + diff --git a/demo/ermis-f/python_m/cur/1170 b/demo/ermis-f/python_m/cur/1170 new file mode 100644 index 00000000..67298739 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1170 @@ -0,0 +1,35 @@ +From: c.evans at clear.net.nz (Carey Evans) +Date: 25 Apr 1999 18:14:01 +1200 +Subject: help with os.popen() +References: <7fomaj$oo9$1@nnrp1.dejanews.com> <000301be8e0c$d71ff4a0$f09e2299@tim> +Message-ID: <87yajhxm52.fsf@psyche.evansnet> +X-UID: 1170 + +"Tim Peters" writes: + +[snip - about popen() on Win32] + +> I'll figure this all out if I ever get a free year <0.7 wink>. + +Why bother? The Tcl people have done it already, I've had very few +problems with pipes there, and it's under a generous license. There's +some interesting comments in tclWinPipe.c and stub16.c too, and an +amazing number of special cases. + +I'd be eternally grateful[1] if pipes worked as well in Python as they +do in Tcl, although I suppose I could try rewriting tclWinPipe.c using +the Win32 extensions. Actually, it would be quite nice if I could +just get the return value from os.system() or os.spawnv() like I can +from Tcl's "exec". + +[1] I'd buy the author a drink if I met them, anyway. + +-- + Carey Evans http://home.clear.net.nz/pages/c.evans/ + +"these are not inherent flaws in [NT] -- they don't happen by accident. + They are the result of deliberate and well-thought-out efforts." - MS + + + + diff --git a/demo/ermis-f/python_m/cur/1171 b/demo/ermis-f/python_m/cur/1171 new file mode 100644 index 00000000..33b46cc7 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1171 @@ -0,0 +1,11 @@ +From: Jcantrl at ix.netcom.com (Jcantrl at ix.netcom.com) +Date: Sun, 25 Apr 1999 05:43:00 GMT +Subject: Unsubscribe +Message-ID: <3722AB63.9DC28BA5@ix.netcom.com> +X-UID: 1171 + + + + + + diff --git a/demo/ermis-f/python_m/cur/1172 b/demo/ermis-f/python_m/cur/1172 new file mode 100644 index 00000000..5b0ee4dc --- /dev/null +++ b/demo/ermis-f/python_m/cur/1172 @@ -0,0 +1,41 @@ +From: aaron_watters at my-dejanews.com (aaron_watters at my-dejanews.com) +Date: Tue, 27 Apr 1999 13:40:27 GMT +Subject: Python and "Hand held" computers +References: <318D8A1FC77AD211A3110080C83DFC6403139F@comsrv.sowatec.com> <7g1opt$9li$1@nnrp1.dejanews.com> <7g2r14$sia$1@m2.c2.telstra-mm.net.au> +Message-ID: <7g4eob$n87$1@nnrp1.dejanews.com> +Content-Length: 1251 +X-UID: 1172 + +In article <7g2r14$sia$1 at m2.c2.telstra-mm.net.au>, + "Mark Hammond" wrote: +> >btw: gadfly runs on python-ce (with some mods) :) I think it +> >is the most fully featured sql implementation that runs on wince. +> >(pocketAccess is braindead.) +> +> Hey - that is great! Im also glad to hear you have the thing working OK - +> are you using my builds? + +Yes. I also must admit that gadfly runs *slowly* and I don't think +it's all my problem (some of it is)... +Just in the interest of keeping the signal to +noise ratio high :) "imports" of large modules seem to take longer than +they should. Gadfly would be much more interesting with a kjbuckets +port too. [Dunno what my problem is, just too honest I guess, I can't +get into the tradition of "hyperbole" in this industry.] I'm surprised +and delighted that it runs as well as it does nonetheless. + +Thanks Mark, Brian et al for the great work!! + -- Aaron Watters + +=== +...doesn't know the difference between "hyperbole" and "mendacity" +any more... + +[Father, I cannot tell a lie: that woman cut down the cherry tree...] + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/1173 b/demo/ermis-f/python_m/cur/1173 new file mode 100644 index 00000000..3d423222 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1173 @@ -0,0 +1,25 @@ +From: MHammond at skippinet.com.au (Mark Hammond) +Date: Wed, 21 Apr 1999 10:30:35 +1000 +Subject: VB Nothing equivalent in win32com +References: <7fiffg$4sb$1@nnrp1.dejanews.com> +Message-ID: <7fj65j$6cp$1@m2.c2.telstra-mm.net.au> +X-UID: 1173 + +Python uses None. Pythoncom also uses None in almost all relevant cases. + +Mark. + +pecold at my-dejanews.com wrote in message <7fiffg$4sb$1 at nnrp1.dejanews.com>... +>Does Python support something like VB Nothing object?? (Universal NULL +>pointer.) +> +>Petr +> +>-----------== Posted via Deja News, The Discussion Network ==---------- +>http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + + + diff --git a/demo/ermis-f/python_m/cur/1174 b/demo/ermis-f/python_m/cur/1174 new file mode 100644 index 00000000..f43dd55b --- /dev/null +++ b/demo/ermis-f/python_m/cur/1174 @@ -0,0 +1,70 @@ +From: john.michelsen at gte.net (John Michelsen) +Date: Mon, 5 Apr 1999 00:23:18 -0700 +Subject: Tkinter bug in Misc.tkraise, Canvas.tkraise +References: <37082E26.A9445E43@earthlink.net> +Message-ID: <7e9n6b$7sk$1@news-1.news.gte.net> +Content-Length: 1696 +X-UID: 1174 + +I found a bug in using Tkinter to raise a canvas widget above later +packed (etc.) widgets. It seems Tkinter gets confused between the +Misc.tkraise() method and the Canvas.tkraise(item) methods. +The following script shows the problem: + +from Tkinter import * + +def raiseCanvas(): + canvas1.lift() + #canvas1.tkraise() + #canvas1.widgetlift() + +root = Tk() +canvas1 = Canvas(root, bg='blue') +canvas1.place(x=10, y=10, anchor=NW) +canvas2 = Canvas(root, bg='red') +canvas2.place(x=20, y=20, anchor=NW) +raiseButton = Button(root, text='raiseCanvas', command=raiseCanvas) +raiseButton.pack() +root.geometry("%dx%d" % (100,100)) +root.mainloop() + +which gives the following error: + +Exception in Tkinter callback +Traceback (innermost last): + File "C:\Program Files\Python\Lib\lib-tk\Tkinter.py", line 764, in +__call__ + return apply(self.func, args) + File "C:\PROGRA~1\PYTHON\RAISEC~1.PY", line 4, in raiseCanvas + canvas1.lift() + File "C:\Program Files\Python\Lib\lib-tk\Tkinter.py", line 1287, in +tkraise + self.tk.call((self._w, 'raise') + args) +TclError: wrong # args: should be ".8249616 raise tagOrId ?aboveThis?" + +I made Tkinter do what I want by adding a method to the Misc +class and not the Canvas class: + +class Misc... + def tkraise(self, aboveThis=None): + self.tk.call('raise', self._w, aboveThis) + lift = widgetlift = tkraise + +so that widgetlift will call the tkraise in Misc and not the tkraise in +Canvas. + +I discovered the error in developing a multiple document interface for +Tkinter +which can be found on: http://www2.zyvex.com/OpenChem/index.htm +Dockable toolbars and a tree widget can also be found there. +They probably don't look very good on unix yet. + +John + + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1175 b/demo/ermis-f/python_m/cur/1175 new file mode 100644 index 00000000..6a8786f2 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1175 @@ -0,0 +1,54 @@ +From: marcel.lanz at isoe.ch (Marcel Lanz) +Date: Sat, 10 Apr 1999 18:47:58 +0200 +Subject: Problems with InteractiveInterpreter +Message-ID: <370F80BE.30B889A9@isoe.ch> +X-UID: 1175 + +Hi, + +I have a modified python shell and I would use processing python code +with the InteractiveInterpreter class. +Now, I've got the following error, if I try to run some codelines with +this Interpreter: + +Output: +--------------------------------------------- +lanzm at frodo:~/data/projects/pylip > python interp.py + File "", line 1 + print i + ^ +SyntaxError: invalid syntax +--------------------------------------------- +interp.py: +--------------------------------------------- +from code import InteractiveInterpreter + +lines = open('test2.py', 'r').readlines() + +ii = InteractiveInterpreter() +for line in lines: + ii.runsource(line) +--------------------------------------------- +test2.py: +--------------------------------------------- +#!/usr/local/bin/python +# +# test, marcel.lanz at gmx.net +# +# -------------- +# File: $Source$ +# -------------- +# $Log$ +# + +for i in 'hello': + print i +---------------------------------------------- + +any ideas? + +marcel + + + + diff --git a/demo/ermis-f/python_m/cur/1176 b/demo/ermis-f/python_m/cur/1176 new file mode 100644 index 00000000..a716bb3d --- /dev/null +++ b/demo/ermis-f/python_m/cur/1176 @@ -0,0 +1,26 @@ +From: john.david at mankato.msus.edu (john) +Date: Wed, 21 Apr 1999 13:17:42 -0500 +Subject: Telnetlib error - not +References: +Message-ID: <371E1632.77566BAE@mankato.msus.edu> +X-UID: 1176 + +Bug in my code - + +John wrote: + +> I am running python 1.5.2 (final release downloaded 19Apr1999) on: +> Linux version 2.0.34 (gcc version egcs-2.90.29 980515 (egcs-1.0.3 release)) +> +> Has anyone else run into this problem? +> +> File "./telnet_test.py", line 86, in ? +> initial_data = tn.expect('->') +> File "/usr/local/lib/python1.5/telnetlib.py", line 450, in expect +> list[i] = re.compile(list[i]) +> TypeError: object doesn't support item assignment + + + + + diff --git a/demo/ermis-f/python_m/cur/1177 b/demo/ermis-f/python_m/cur/1177 new file mode 100644 index 00000000..59906353 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1177 @@ -0,0 +1,13 @@ +From: Alexia.Marie at wanadoo.fr (France T�l�com) +Date: 29 Apr 1999 10:16:22 GMT +Subject: Question about Tkinter +Message-ID: <01be922b$23801c40$e110fac1@renpostlib> +X-UID: 1177 + +Does Tkinter or any of its extensions allows saving a canvas on a bitmap +file? + + + + + diff --git a/demo/ermis-f/python_m/cur/1178 b/demo/ermis-f/python_m/cur/1178 new file mode 100644 index 00000000..5d80170e --- /dev/null +++ b/demo/ermis-f/python_m/cur/1178 @@ -0,0 +1,63 @@ +From: jmrober1 at ingr.com (Joseph Robertson) +Date: Thu, 08 Apr 1999 13:51:52 -0500 +Subject: Q on Tkinter Scrollbar +Message-ID: <370CFAC8.32EB0B29@ingr.com> +Content-Length: 1421 +X-UID: 1178 + +Hi everyone, + +I want to manually control the scrollbar in a tkinter app, i.e. I don't +want to tie it to another widget as a child. Below is what I have so +far. I can't figure how to make the 'thumb' stay at the returned +position, or the point where the user drags it. Right now it always +pops back to the top. + +I want it to behave like a Scale, but look like a scrollbar. Think of a +virtual window on a dataset, where I don't want to load the contents of +the data set into a listbox (not enough memory). + +Anyone do this before, know of any similar examples, or give me a clue +where to look next. I don't want to use extensions or another GUI, it +needs to be Tkinter. + +Thanks in advance, +Joe Robertson +jmrober1 at ingr.com + + +>----begin code +# a manual scrollbar +# +# Joe Robertson, jmrober1 at ingr.com +# +from Tkinter import * + +class Manual(Frame): + + def __init__(self, master, **kw): + apply(Frame.__init__, (self, master), kw) + vscrollbar = Scrollbar(self, orient=VERTICAL) + self.canvas = Canvas(self) + vscrollbar.config(command=self._vscroll) + vscrollbar.pack(fill=Y, side=RIGHT) + self.canvas.pack(expand=1, fill=BOTH, side=LEFT) + + def _vscroll(self, type, *arg): + print type + if type == 'moveto': + for each in arg: + print each + +# doit +root = Tk() +f = Manual(root) +f.pack(expand=1, fill=BOTH) +root.mainloop() + +>----end code + + + + + diff --git a/demo/ermis-f/python_m/cur/1179 b/demo/ermis-f/python_m/cur/1179 new file mode 100644 index 00000000..a46ec857 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1179 @@ -0,0 +1,23 @@ +From: kiket at my-dejanews.com (kiket at my-dejanews.com) +Date: Mon, 19 Apr 1999 08:35:26 GMT +Subject: How to add data in a existant file ? +Message-ID: <7fepse$pff$1@nnrp1.dejanews.com> +X-UID: 1179 + +Hi, + +I use python to developp a script and I want to know which is the fonction +that permit to add data in a existant file. I know already how to write data +in a new file -----> f=open('file.name','w') f.write('data') f.close() + +But how to merge data in a existant file ? + +Mail your response to fquiquet at lemel.fr +Thank's a lot for your help. + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/1180 b/demo/ermis-f/python_m/cur/1180 new file mode 100644 index 00000000..e0f99443 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1180 @@ -0,0 +1,51 @@ +From: fuzzy at fuzzys.org (Julien Oster) +Date: 12 Apr 1999 14:29:28 +0200 +Subject: forking + stdout = confusion +References: +Message-ID: <7jlnfyowd3.fsf@gandalf.midearth.fuzzys.org> +Content-Length: 2067 +X-UID: 1180 + +>>>>> "Clarence" == Clarence Gardner writes: + + Clarence> I have a program running in Python 1.5.1 under FreeBSD 2.1.7. + Clarence> It happens to be a nph-type CGI program. Normally, it runs a + Clarence> report that can take quite a while, and I'm trying to add an + Clarence> option to delay the start. I defined this function: + +[...] + +I ran in exactly the same problem. I tried closing all stdxxx-filedescriptors, +setting a new session id with setsid, also tried it with setting a new +progress groups, and I even tried to reopen stdin, stderr and stdout to +/dev/null, but nothing helped. Then I saw that in OpenBSD, there's a function +in stdlib.h called "daemon()". You simply call it, and it puts the running +program in the background (it forks and exits the parent), redirects the +stdxxx-descriptors, sets a new session ID etc... and with this function, it +works! + +Anyway, I was not able to reproduce what daemon does in any way, obviously it +does anything else which I did not think of, but I can't find out what. So for +now I use a very dirty wrapper which just calls the daemon-function, but since +I also realized that at least linux libc5 (I don't know how this is with +glibc) doesn't know this handy function, it would be fine to know what I +forgot while trying to reproduce daemon()'s actions. + +I think it must be something with the stdxxx-filedescriptors and/or the +terminal, since using daemon() in a cgi lets apache close the connection to +the browser, but the simple call of fork, stdxxx.close/reopen/whatever, setsid +and setpgrp does not. + +For know, check if you're system is having the daemon() function (it should +reside in the C-Library and its declaration in stdlib.h) and if it has, use it +either with a small C wrapper program, with a python module which implements +it or even using the dl-module. + +-- + /--/ Julien Oster /---/ www.fuzzys.org <---> www.sysadm.cc /---/ + /--/ OpenBSD 2.5 /---/ Greetings from Munich, Germany /---/ +/--/ contact me : /---/ talk fuzzy at fuzzys.org or e-Mail me /---/ + + + + diff --git a/demo/ermis-f/python_m/cur/1181 b/demo/ermis-f/python_m/cur/1181 new file mode 100644 index 00000000..cb79eaca --- /dev/null +++ b/demo/ermis-f/python_m/cur/1181 @@ -0,0 +1,69 @@ +From: hj_ka at my-dejanews.com (hj_ka at my-dejanews.com) +Date: Sun, 18 Apr 1999 20:50:45 GMT +Subject: NT: win32api and win32ui import error +References: <7fbcpq$2jb$1@nnrp1.dejanews.com> +Message-ID: <7fdgj4$nnl$1@nnrp1.dejanews.com> +Content-Length: 1751 +X-UID: 1181 + +In article , + bernhard at alpha1.csd.uwm.edu (Bernhard Reiter) wrote: +> +> Mark said, that the following dll and their versions might +> be relevant: +> +> ole32.dll +> oleaut32.dll +> msvcrt.dll + +No luck. I downloaded some more recent versions of ole32.dll +and oleaut32.dll from http://solo.abac.com/dllarchive/, (their +msvcrt.dll is older, from VC5 instead of VC6). I also tried +those DLLs from my Windows 98 System folder. I tried many +combinations. Here is the list of the versions: + +msvcrt.dll: + 5.00.7303 (solo.abac.com) + 5.00.7128 (my Windows 98) + 6.00.8267.0 (my Windows NT) + +ole32.dll: + 4.71.1120 (solo.abac.com) + 4.71.1719 (my Windows 98) + 4.00 (my Windows NT) + +oleaut32.dll: + 2.20.4122 (solo.abac.com) + 2.20.4122 (my Windows 98) + 2.20.4118 (my Windows NT) + +I tried many combinations of the DLLs inside the +C:\Winnt\system32 folder. But they didn't help, and +matter of fact, they broke something else and I got +more error messages from the operating system. + +NT has had persistent problem with the Pythonwin +extensions. This is not the first time. I have +never been able to run Pythonwin or use its +extensions modules (e.g: win32api, win32ui) on NT, +and we have quite a few NT machines here. + +The current real status is: PYTHONWIN DOES NOT +RUN ON NT. At least not on modern NT versions +(our msvcrt.dll is dated 9/23/98, this should be +considered fairly recent.) + +I am willing to track down the problem a bit more. +But help is needed from Mark or other people. I am +lost at this moment. + +regards, + +Hung Jung + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/1182 b/demo/ermis-f/python_m/cur/1182 new file mode 100644 index 00000000..2b53810c --- /dev/null +++ b/demo/ermis-f/python_m/cur/1182 @@ -0,0 +1,22 @@ +From: MHammond at skippinet.com.au (Mark Hammond) +Date: Tue, 27 Apr 1999 08:58:06 +1000 +Subject: Python and "Hand held" computers +References: <318D8A1FC77AD211A3110080C83DFC6403139F@comsrv.sowatec.com> <7g1opt$9li$1@nnrp1.dejanews.com> +Message-ID: <7g2r14$sia$1@m2.c2.telstra-mm.net.au> +X-UID: 1182 + +>btw: gadfly runs on python-ce (with some mods) :) I think it +>is the most fully featured sql implementation that runs on wince. +>(pocketAccess is braindead.) + +Hey - that is great! Im also glad to hear you have the thing working OK - +are you using my builds? + +Mark. + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1183 b/demo/ermis-f/python_m/cur/1183 new file mode 100644 index 00000000..ca1d1905 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1183 @@ -0,0 +1,21 @@ +From: digitome at iol.ie (Sean Mc Grath) +Date: Sun, 04 Apr 1999 10:54:30 GMT +Subject: Announce: XML Scripting with Python Tutorial +Message-ID: <37074410.2385470@news.iol.ie> +X-UID: 1183 + +Some time ago I announced a Python tutorial at the upcoming +WWW8 conference (http://www.www8.org). + +The content of the tutorial has been amended to take account +of demand for focused information on the XML scripting +with Python. See http://www.www8.org/tutorials.html#python +for details. + +regards, +Sean Mc Grath + + + + + diff --git a/demo/ermis-f/python_m/cur/1184 b/demo/ermis-f/python_m/cur/1184 new file mode 100644 index 00000000..06617764 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1184 @@ -0,0 +1,69 @@ +From: mal at lemburg.com (M.-A. Lemburg) +Date: Fri, 16 Apr 1999 12:53:32 GMT +Subject: Simple module installation +References: <37170674.F77233A6@prescod.net> +Message-ID: <371732CC.201012AF@lemburg.com> +Content-Length: 2414 +X-UID: 1184 + +Paul Prescod wrote: +> +> I was just installing Fnorb and it was as painless an installation as a +> sane person could ask for but I got to thinking...couldn't this be less +> painless? The reason I ask is because I'm thinking of distributing code +> that depends on code that depends on code that depends on Fnorb and I need +> each installation part to be as simple as possible. So this isn't meant to +> pick on Fnorb in particular but to use it as a random sample package with +> binary and Python parts. + +Maybe the distutils package that is being developped by the distutils +sig could help. + +> ... +> The PYTHONPATH and PATH would be unneccessary if Fnorb used the Windows +> registry. Even so, I think that a Python-managed, portable, text +> file-based registry (like JPython's) would be better than depending upon +> the over-centralized Windows registry. +> ... +> If we put my idea for a Python-managed registry together with the "-r" +> idea then Fnorb could register itself on Windows or Unix like this: +> +> python -r register Fnorb /path/to/fnorb + +You should take the idea even a bit further and have Python use +the registry per default for all lookups and only have it revert +to PYTHONPATH in case it doesn't find anything appropriate. + +A while back I wrote a patch called fastpath that made Python +use a callback (sys.fastback I think it was named) in the import +loader: + +A little Python function read a marshalled version of +a module lookup table the first time it was called and then +tried to find the module in that table. If it did find something, +the module loader would stop the search and use the returned +path to the module, otherwise it would do its normal actions. + +The nice thing about this callback is that you can modify the +module locator's action without having to modify the Python +source code (well, apart from the few lines needed to add the +callback). + +BTW, using the above fastpath trick reduces IO overhead on +startup quite a bit: from a few 100 stat()s to a few 10s for +an average script. + +The (old) code is still available for anyone to play with: + + http://starship.skyport.net/~lemburg/fastpath.zip + +-- +Marc-Andre Lemburg Y2000: 259 days left +--------------------------------------------------------------------- + : Python Pages >>> http://starship.skyport.net/~lemburg/ : + --------------------------------------------------------- + + + + + diff --git a/demo/ermis-f/python_m/cur/1185 b/demo/ermis-f/python_m/cur/1185 new file mode 100644 index 00000000..bb5a95ea --- /dev/null +++ b/demo/ermis-f/python_m/cur/1185 @@ -0,0 +1,57 @@ +From: tismer at appliedbiometrics.com (Christian Tismer) +Date: Wed, 21 Apr 1999 11:20:32 GMT +Subject: Kosovo database; Python speed +References: <371DAAC2.D9046550@cs.utwente.nl> +Message-ID: <371DB480.32947654@appliedbiometrics.com> +Content-Length: 1935 +X-UID: 1185 + + +Richard van de Stadt wrote: +> +> Suppose we were going to make a database to help Kosovars locate +> their family members. This would probably result in hundreds of +> thousands of records (say 1 record (file) per person). +> +> Would Python be fast enough to manage this data, make queries on +> the data, or should compiled programs be used? + +Dependant of the operating system, I'd suggest to use a +database extension. +Controlling this database from Python will give you +enough speed. If I had to do this, my preferences are + +mySQL for Linux, with its interface, +MS-Access for Windows, with a COM interface. + +The latter is not since I like it so much, but we have +used it before, and the interfaces are there. + +Since the Kosovars need help quickly, I'd use this combination +instead of writing something special. Python alone will not +be too easy, since your data will probably not fit into memory. +You will also have lots of edits, so I think using a true +database is the better choice here. (Not saying that Access is +a true database, but it works fine with several 100000 records). + +But two single columns with a name and a record ID will fit, +so your code might extract this info as a whole, map it to a dict +and search it in some sophisticated manner. This can be even faster +than the database. +Do you have more info on the amount of data, fields per record, +and what search capabilities are needed? Is it designed as a web +based application? Are there on-line updates and such? + +ciao - chris + +-- +Christian Tismer :^) +Applied Biometrics GmbH : Have a break! Take a ride on Python's +Kaiserin-Augusta-Allee 101 : *Starship* http://starship.python.net +10553 Berlin : PGP key -> http://wwwkeys.pgp.net +PGP Fingerprint E182 71C7 1A9D 66E9 9D15 D3CC D4D7 93E2 1FAE F6DF + we're tired of banana software - shipped green, ripens at home + + + + diff --git a/demo/ermis-f/python_m/cur/1186 b/demo/ermis-f/python_m/cur/1186 new file mode 100644 index 00000000..352d1a71 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1186 @@ -0,0 +1,19 @@ +From: j_hendry at ix.netcom.com (Jonathan Hendry) +Date: Thu, 22 Apr 1999 21:37:32 -0600 +Subject: learning Python (rat book) +References: +Message-ID: <7fomar$49k@sjx-ixn10.ix.netcom.com> +X-UID: 1186 + +savageb wrote in message ... +>The rat has landed! I managed to get my hands a copy at the Stanford +>University Bookstore today. + + +Mine arrived from Amazon on Tuesday. + + + + + + diff --git a/demo/ermis-f/python_m/cur/1187 b/demo/ermis-f/python_m/cur/1187 new file mode 100644 index 00000000..6fb7f899 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1187 @@ -0,0 +1,30 @@ +From: graham at sloth.math.uga.edu (Graham Matthews) +Date: 30 Apr 1999 15:53:22 GMT +Subject: Python IS slow ! [was] Re: Python too slow for real world +References: <613145F79272D211914B0020AFF6401914DAD8@gandalf.digicool.com> +Message-ID: <7gcjli$dn2$2@cronkite.cc.uga.edu> +X-UID: 1187 + +William Tanksley (wtanksle at dolphin.openprojects.net) wrote: +: Your data is correct (Python is slow for many things, slower than it needs +: to be), but your conclusion is wrong. Python isn't slow because its +: bytecode engine is slow; actually, although there's a lot of room for +: improvement, its bytecode engine is faster than many of the others out +: there. +: +: The reason it's slow is its runtime model. _Every_ function call requires +: a lookup in a hash table, just on the off-chance that the programmer +: changed the meaning of the function. + +I don't buy this. As far as I know every function call in Self and +Smalltalk also requires a lookup (just like Python), but both languages +are significantly faster than Python it seems. + +graham +-- + This ain't no technological breakdown + Oh no, this is the road to hell + + + + diff --git a/demo/ermis-f/python_m/cur/1188 b/demo/ermis-f/python_m/cur/1188 new file mode 100644 index 00000000..53d263b1 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1188 @@ -0,0 +1,122 @@ +From: tismer at appliedbiometrics.com (Christian Tismer) +Date: Fri, 30 Apr 1999 15:34:42 GMT +Subject: Python IS slow ! [was] Re: Python too slow for real world +References: <613145F79272D211914B0020AFF6401914DAD8@gandalf.digicool.com> <7g9qmo$luf$1@news.udel.edu> <372965CA.2B3FD2FE@appliedbiometrics.com> <19990430080805.B776752@vislab.epa.gov> <3729A9F3.75B2692B@appliedbiometrics.com> <19990430101215.A806665@vislab.epa.gov> +Message-ID: <3729CD92.43477316@appliedbiometrics.com> +Content-Length: 3981 +X-UID: 1188 + + +Randall Hopper wrote: + +[tismer().chris about locking] + +> |Well, I wouldn't do that by default. By default, everything could stay as +> |it is. First of all, this would not break any existing code. +> +> Right. I wasn't too clear. By default, I mean I don't want to have to +> insert some commands/declarations for every namespace (every class, every +> method, every module, etc.) to lock them. I want this to happen +> automagically based on a switch. +> +> A command-line option (-w), or something like Perl's "use strict" +> declaration would be a reasonable way to enable this behavior. + +Now, well, but Perl is quite different here. As I remember, +it doesn't have all the dynamic features of Python. +In Python, you can reference any identifier in a function +or class definition without the need that the object exists. +That's the reason why I'm talking of an optional feature, +since it has reasonable semantic side effects. + +> |Then, what would you do with classes which depend on each +> |other? You cannot lock them immediately, this would fail. +> +> Could you give an example? + +class abstractparser: + magic = 42 + pass # numerous default and stub methods + +class parserops: + "mixin class" + def general_method1(self, *args): + self.parser_method(self.scanner, args) + def funky_method(self, *args): + #some code there + return self.magic + +class someparser(abstractparser, parserops): + def parser_method(self, scanner, *args): + # do something, and then use the mixin + self.funky_method(2, 3, 5) + +Sorry about my lack of spirit today, this example is bad. +But, if you lock class parserops after it is created, +it will barf, since parser_method cannot be resolved yet. +It will also not resolve self.magic, since it doesn't +inherit from abstractparser. + +But if I lock someparser, it will get all of its methods +right though the inheritance mechanism once. + +> |Depending on how exactly will be implemented, a single line +> |at the end of a module should suffice to accomplish this stuff +> |for the standard cases. +> +> This would prevent namespace binding and locking from occuring while the +> module is being parsed, wouldn't it? With a lock declaration at the +> beginning, Python could do this as it goes. Seems like that would be +> easier (Python sees end of function -> module.symbol referenced in the +> function was not defined -> flag error and abort parse). + +Yes, but this would limit Python down to Pascal like name spaces. +You would need all kinds of tricks to write recoursions like + +def two(arg): + if arg % 2 == 0: + return three(arg-1) + return arg + +def three(arg): + if arg % 3 == 0: + return two(arg-1) + return arg + +(again not good :) + +This would need to be locked after both are defined, +otherwise we had to invent declarations which is bad. + +> |As a side effect, locking a module would also find all +> |referenced but undefined symbols. +> +> That's the goal I'm rooting for. ;-) + +If it is just that, download Aaron Watter's kwParsing module +and use its pylint module to see lots of complaints about +your source :-) + +> |Anyway, this is still no cakewalk and quite a lot of code +> |is involved. Needs much more thinking... +> +> Definitely. No doubt Guido and the other language experts have a better +> feel for this than I do. But I felt compelled to chime-in on this topic +> since it's important to me (and the squeaky wheel gets the grease. :-) + +Sure that they will also not like my idea, but this +cannot stop me from trying :-) + +ciao - chris + +-- +Christian Tismer :^) +Applied Biometrics GmbH : Have a break! Take a ride on Python's +Kaiserin-Augusta-Allee 101 : *Starship* http://starship.python.net +10553 Berlin : PGP key -> http://wwwkeys.pgp.net +PGP Fingerprint E182 71C7 1A9D 66E9 9D15 D3CC D4D7 93E2 1FAE F6DF + we're tired of banana software - shipped green, ripens at home + + + + diff --git a/demo/ermis-f/python_m/cur/1189 b/demo/ermis-f/python_m/cur/1189 new file mode 100644 index 00000000..9f6b180c --- /dev/null +++ b/demo/ermis-f/python_m/cur/1189 @@ -0,0 +1,47 @@ +From: cgw at fnal.gov (Charles G Waldman) +Date: Tue, 27 Apr 1999 23:13:20 GMT +Subject: Long integers getting short shrift? +In-Reply-To: <37262F45.2473F5A5@callware.com> +References: <14118.9093.292465.438475@buffalo.fnal.gov> + <37262F45.2473F5A5@callware.com> +Message-ID: <14118.17552.252493.22073@buffalo.fnal.gov> +Content-Length: 1061 +X-UID: 1189 + +Ivan Van Laningham writes: + + > ???? I have Python running on my UnixWare system at home, and the long + > types are easily accessible. + +Perhaps I was unclear, I'm not saying that the long type is not +available; I'm referring to the level of support for Long objects in +the Python/C API, in particular the functions PyArg_ParseTuple and +PyObject_CallFunction. Below is the snippet of code in getargs.c that +handles the "L" format character... I was wishing for something +similar to "L" that would take a plain C int and make a Python Long +out of it... I don't know what letter I'd use since l and L are +already taken! + +It's not too important, one can always use the "O" format letter and +handle the arg. specially with PyLong_FromLong; it's just a bit ugly +to have to do so. + + +#ifdef HAVE_LONG_LONG + case 'L': /* LONG_LONG */ + { + LONG_LONG *p = va_arg( *p_va, LONG_LONG * ); + LONG_LONG ival = PyLong_AsLongLong( arg ); + if( ival == (LONG_LONG)-1 && PyErr_Occurred() ) { + return "long"; + } else { + *p = ival; + } + break; + } +#endif + + + + + diff --git a/demo/ermis-f/python_m/cur/1190 b/demo/ermis-f/python_m/cur/1190 new file mode 100644 index 00000000..e50249bd --- /dev/null +++ b/demo/ermis-f/python_m/cur/1190 @@ -0,0 +1,39 @@ +From: merlyn at stonehenge.com (Randal L. Schwartz) +Date: 29 Apr 1999 07:26:22 -0700 +Subject: converting perl to python - simple questions. +References: <000101be8f62$b66e4700$669e2299@tim> +Message-ID: +X-UID: 1190 + +>>>>> "Tim" == Tim Peters writes: + +Tim> Perl actually has the same problem, but it's *usually* hidden by "regexp +Tim> context"; e.g.; + +Tim> $string =~ /\bthe/ + +Tim> matches "the" starting at a word boundary, while + +Tim> $pattern = "\bthe"; +Tim> $string =~ /$pattern/ + +Tim> matches "the" following a backspace character. + +Oddly enough, these *will* match word boundaries: + + $pattern = '\bthe'; + + $pattern = qr/\bthe/; + +Yes, Perl is heavily context sensitive... and so are human beings. :) + +-- +Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095 +Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying +Email: Snail: (Call) PGP-Key: (finger merlyn at teleport.com) +Web: My Home Page! +Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me + + + + diff --git a/demo/ermis-f/python_m/cur/1191 b/demo/ermis-f/python_m/cur/1191 new file mode 100644 index 00000000..0da1e831 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1191 @@ -0,0 +1,40 @@ +From: mgm at unpkhswm04.bscc.bls.com (Mitchell Morris) +Date: 28 Apr 1999 11:24:37 GMT +Subject: Python IS slow ! [was] Re: Python too slow for real world +References: <613145F79272D211914B0020AFF6401914DAD8@gandalf.digicool.com> +Message-ID: +X-UID: 1191 + +In article , Markus Kohler wrote: +[snip] +>Python would be appropriate for much more problems if it would only be as fast +>as other scripting languages. The bytecode interpreter IS significantly slower +>than other byte code interpreted languages. +[snip] +>You are right that one should choose the right tool for a problem, but +>I disagree that Python is optimized for the general case. Squeak a free +>Smalltalk implementation (www.squeak.org), is already much faster ( about +>3 times actually ) than python and it has even a true Garbage +>Collector. +[snip] +>From profiling python 1.5.2c I found that python's main problem is that +>calling functions seems to be very costly. +[snip] +>Markus +>-- +>Markus Kohler mailto:markus_kohler at hp.com + +If it's not too much trouble, could you post your benchmark code and results, +either here or on a web page? + ++Mitchell + + +-- +Mitchell Morris + +Underlying Principle of Socio-Genetics: Superiority is recessive. + + + + diff --git a/demo/ermis-f/python_m/cur/1192 b/demo/ermis-f/python_m/cur/1192 new file mode 100644 index 00000000..9d75fdd9 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1192 @@ -0,0 +1,66 @@ +From: brunomadv at ciudad.com.ar (Bruno Mattarollo) +Date: Thu, 22 Apr 1999 05:07:36 GMT +Subject: permissions on win32 [Q] +In-Reply-To: <7flpkv$6je$1@m2.c2.telstra-mm.net.au> +References: <7flpkv$6je$1@m2.c2.telstra-mm.net.au> +Message-ID: <001b01be8c7e$093c5770$6eba0ac8@kuarajy.infosys.com.ar> +Content-Length: 1764 +X-UID: 1192 + +It looks like a solution, but I would have to create those template file by +hand ... Since all the permissions are new. I mean it's a migration from one +system to another, so there is no previous state, or at least, the previous +state is so diferent from the final one, that I cannot use a template file +without some serious hand-worked labor.... :-) + +Thanks a lot Mark. + +/B + +Bruno Mattarollo +... proud to be a PSA member + +> -----Original Message----- +> From: python-list-request at cwi.nl [mailto:python-list-request at cwi.nl]On +> Behalf Of Mark Hammond +> Sent: Wednesday, April 21, 1999 9:15 PM +> To: python-list at cwi.nl +> Subject: Re: permissions on win32 [Q] +> +> +> Bruno Mattarollo wrote in message +> <002401be8c03$4f21d380$6eba0ac8 at kuarajy.infosys.com.ar>... +> >Thanks Mark... +> > +> > All this is supposed to run on sunday and it's Mission Critical, so I +> >presume wiill be doing it by hand, but anyway thanks. I am +> looking forward +> >to be able to do this on NT... :-) +> > +> > FYI we will be running another mission critical process on Sunday and it +> >will be a small Python app that will run on NT ... I love Python ... :-) +> +> Actually, overnight I thought of a different solution you could +> use - use a +> "template file". +> +> Although the help file omits this information, you could use +> "win32security.GetFileSecurity()", and name a file that has the +> permissions +> you wish to "copy". This will give you a SECURITY_DESCRIPTOR +> object. Once +> you have the object, you can even manipulate the contents - the only thing +> missing from 124 was the ability to create a brand-new, empty +> SECURITY_DESCRIPTOR - all the functionality to manipulate them is +> there.... +> +> Mark. +> +> +> +> + + + + + diff --git a/demo/ermis-f/python_m/cur/1193 b/demo/ermis-f/python_m/cur/1193 new file mode 100644 index 00000000..e038eed4 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1193 @@ -0,0 +1,45 @@ +From: mrfusion at bigfoot.com (mrfusion at bigfoot.com) +Date: Tue, 20 Apr 1999 06:19:21 GMT +Subject: Tkinter hangs on mainloop +Message-ID: <371c19bb.60709557@news> +X-UID: 1193 + +Hi, + I've done a complete install of python ver 1.5.2 on my +windows98 system and I've run into a problem with Tkinter (no big +surprise!) I can import it with the line : from Tkinter import * +Everything seems to be fine so far. I add a few more lines: + +widget = Lable(None, text = 'Hello') +widget.pack() + +Everything great so far..... + +widget.mainloop() + +It hangs. If I wait for a while and then hit Ctr-C I get the +following error: + +Traceback (innermost last): + File "", line 1, in ? + File "k:\python\lib\lib-tk\Tkinter.py", line 492, in mainloop + self.tk.mainloop(n) +KeyboardInterrupt + + +This happens whenever I try to run a program that uses Tkinter. +For some reason I can get the tkFileDialog.py and the +tkColorChooser.py to run alright but nothing else......very weird. + +Can anyone offer insight to this baffling problem?? + +Thank you so much, + +Tom + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1194 b/demo/ermis-f/python_m/cur/1194 new file mode 100644 index 00000000..83a5b9ab --- /dev/null +++ b/demo/ermis-f/python_m/cur/1194 @@ -0,0 +1,47 @@ +From: euroibc at solair1.inter.NL.net (Martin van Nijnatten) +Date: Wed, 21 Apr 1999 11:43:43 +0200 +Subject: opening more than 1 file +References: <371CB255.5FCAFBAF@solair1.inter.NL.net> <371CC329.F22B534F@pop.vet.uu.nl> +Message-ID: <371D9DCF.9ED0973A@solair1.inter.NL.net> +X-UID: 1194 + +Thanks, this answers my question. + +I want to read the files, and they have to be open simultaneously because I +want to +merge the records/lines in the files into 1 file (after I made some changes +to certain fields) + +Martijn Faassen wrote: + +> martin van nijnatten wrote: +> > +> > I have a variable, which can have a value in the range from 1 to 20. +> > +> > If the value is 7, I have to open 7 files. +> > +> > What could be an elegant way of doing this? +> +> It's hard to say without more details -- what names do you want these +> files to have, for instance? Do you want to read the files, or write to +> them? The basic idea could be something like: +> +> def openfiles(howmany): +> opened_files = [] +> for i in range(howmany): +> opened_files.append(open("prefix%s" % i, "r")) +> return opened_files +> +> This returns a list with file objects. +> +> Why is it necessary to open so many files simultaneously anyway? Perhaps +> I misunderstood. :) +> +> Regards, +> +> Martijn + + + + + diff --git a/demo/ermis-f/python_m/cur/1195 b/demo/ermis-f/python_m/cur/1195 new file mode 100644 index 00000000..f8dc07d7 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1195 @@ -0,0 +1,27 @@ +From: mlh at idt.ntnu.no (Magnus L. Hetland) +Date: 06 Apr 1999 14:55:53 +0200 +Subject: povray.py +References: <__YN2.30200$FZ5.11443@news.rdc1.sfba.home.com> +Message-ID: +X-UID: 1195 + +"TM" writes: + +> Has anyone created a pov ray module for python? + +I have been thinking about it, but haven't done it yet... What do you +think it should contain? + +> +> Thanks, +> Tom + +-- + + Magnus + Lie + Hetland http://arcadia.laiv.org + + + + diff --git a/demo/ermis-f/python_m/cur/1196 b/demo/ermis-f/python_m/cur/1196 new file mode 100644 index 00000000..e94823b4 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1196 @@ -0,0 +1,54 @@ +From: frank at ned.dem.csiro.au (frank) +Date: Wed, 14 Apr 1999 16:47:17 +0800 +Subject: Help! PIL compiled into Tkinter in 1.5.2 (Tricky Bits!) +Message-ID: +Content-Length: 1701 +X-UID: 1196 + +I'm trying to compile PIL (1.0b1) into the _tkinter module in 1.5.2's +Modules/Setup config file under Digital Unix 4.0d (from source on all +counts). + +Since it might matter, I'm trying to do this under VPATH control from an +architecture-specific directory, where configure was run as: +/configure + +I unpacked the 1.5.2 source into its own directory, separate from +/usr/local/lib/python-1.5, where I have the installation proper. + +The Setup.in file lists the following 2 lines: +# *** Uncomment and edit for PIL (TkImaging) extension only: +# -DWITH_PIL -I../Extensions/Imaging/libImaging tkImaging.c \ + +Since the 1.5.2 source is living in its own pristine directory, and in +particular *has* no Extensions subdirectory, what is the proper way to +configure the above two lines in my architecture-specific Modules/Setup, +if I want to have PIL/TkImaging built in? + +Things I've tried, and failed: + +* Building PIL in-place, under a hand-built Extensions subdirectory of +the pristine 1.5.2 source directory. + +* Hardwiring the path in Setup to my *old* PIL installation, found under +my 1.5.1 Extensions subdirectory. (I never managed to figure this out for +1.5.1 either, and so PIL isn't married to _tkinter in my 1.5.1 installaion +either) + +* Slapping John Cleese on the side of his head with a large dead fish, +next to a canal, while dressed in Pith Helmet, Khaki shorts, and Khaki +shirt. (Ok, Ok, not really, but then, nobody expects the Spanish +Inquisition!) + +Any help would be much appreciated! + + Cheers, + Frank Horowitz + +-- +Frank Horowitz; frank at ned.dem.csiro.au +CSIRO Exploration & Mining/AGCRC; Perth, AUSTRALIA + + + + diff --git a/demo/ermis-f/python_m/cur/1197 b/demo/ermis-f/python_m/cur/1197 new file mode 100644 index 00000000..9aaef09d --- /dev/null +++ b/demo/ermis-f/python_m/cur/1197 @@ -0,0 +1,50 @@ +From: a.eyre at optichrome.com (Adrian Eyre) +Date: Tue, 6 Apr 1999 13:04:38 GMT +Subject: Calling __builtins__ from C API +In-Reply-To: +References: +Message-ID: <000a01be802e$0798d4e0$2bcbd9c2@optichrome.com> +Content-Length: 1164 +X-UID: 1197 + +> However, I can't figure out the proper way to refer to this +> instance from the C API. While I can use the PyRun_SimpleString +> function to refer the instance, this seems like a hack. + +Try: + +#include +void main() +{ + Py_Initialize(); + PyObject* builtinsMod = PyImport_ImportModule("__builtin__"); + PyObject* builtinsDict = PyModule_GetDict(builtinsMod); + PyObject* someString = PyString_FromString("someValue"); + PyDict_SetItemString(builtinsDict, "someName", someString); + Py_DECREF(builtinsMod); + Py_DECREF(builtinsDict); + Py_DECREF(someString); + Py_Finalize(); +} + + + +> What are the disadvantages of using this over the more cumbersome, +> PyObject_GetAttrString(), Py_BuildValue(), PyEval_CallObject(), etc.? +> How do you refer to a built-in function or object? + +AFAIK, the only difference is that with PyRun_String(), it has to run +throught the parser first. + +-------------------------------------------- +Adrian Eyre +Optichrome Computer Solutions Ltd +Maybury Road, Woking, Surrey, GU21 5HX, UK +Tel: +44 1483 740 233 Fax: +44 1483 760 644 +http://www.optichrome.com +-------------------------------------------- + + + + + diff --git a/demo/ermis-f/python_m/cur/1198 b/demo/ermis-f/python_m/cur/1198 new file mode 100644 index 00000000..61f37156 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1198 @@ -0,0 +1,44 @@ +From: tim_one at email.msn.com (Tim Peters) +Date: Sat, 10 Apr 1999 04:13:53 GMT +Subject: WinZip vs 0-length files (was RE: trivial import question) +In-Reply-To: <000401be7808$6105e3c0$549e2299@tim> +References: <000401be7808$6105e3c0$549e2299@tim> +Message-ID: <000201be8308$8b824520$ac9e2299@tim> +Content-Length: 1317 +X-UID: 1198 + +With tne candidate release of Python 1.5.2 just out, this is quite timely! + +At various times in March, at least Brad Clements, Lars Marius Garshol and +Tres Seaver spread the rumor that WinZip wouldn't extract 0-length files, +thus causing Python packages depending on an empty __init__.py to fail in +mysterious ways. + +I tried reproducing that but had no problems with the latest WinZip, so had +a good time insulting them all . + +But they were right! Steve Spicklemire provided the missing clue offline: +while WinZip does not have a problem with 0-length files in .zip archives, +it does indeed fail to extract them from .tgz archives. + +Nico Mak (WinZip's source) confirmed this, adding that it's a problem for +all of .z, .gz, and .tgz archives (I think .tar belongs in there too), and +said it should be fixed in "a future release" (as opposed, I guess, to a +past release -- only Guido can pull that one off). + +Since most Windows distributions get packaged as .zip archives, most times +you shouldn't have a problem. If you download the 1.5.2c1 *source* +distribution, though, note that there are three files in py152c1.tgz WinZip +fails to extract: + +Python-1.5.2c1\Tools\pynche\__init__.py +Python-1.5.2c1\PC\vc15_lib\_.c +Python-1.5.2c1\PC\vc15_w31\_.c + +be-careful-it's-an-empty-jungle-out-there-ly y'rs - tim + + + + + + diff --git a/demo/ermis-f/python_m/cur/1199 b/demo/ermis-f/python_m/cur/1199 new file mode 100644 index 00000000..eb99a82e --- /dev/null +++ b/demo/ermis-f/python_m/cur/1199 @@ -0,0 +1,31 @@ +From: tomjenkins at my-dejanews.com (tomjenkins at my-dejanews.com) +Date: Mon, 26 Apr 1999 20:47:29 GMT +Subject: Python too slow for real world +References: <613145F79272D211914B0020AFF6401914DAD8@gandalf.digicool.com> +Message-ID: <7g2jd0$3r0$1@nnrp1.dejanews.com> +X-UID: 1199 + +In article <613145F79272D211914B0020AFF6401914DAD8 at gandalf.digicool.com>, + Brian Lloyd wrote: +> There are also some general optimizations that can be used in +> places where speed is an issue, such as avoiding repeated +> attribute lookups (esp. in loops). This version of your read_write +> function uses the same basic algorithm, but forgoes re for more +> specific tools (slicing, string.split) and has some examples of +> optimizations to mimimize attribute lookups. I haven't timed it +> or anything, but I'd be surprised if it wasn't noticeably +> faster. + +Brian, just to followup on your post I profiled his original code and yours: +PII 450, 128M, WinNT +Original: 5.126 seconds +Your Ver: 1.512 seconds + +Tom + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/1200 b/demo/ermis-f/python_m/cur/1200 new file mode 100644 index 00000000..689d015c --- /dev/null +++ b/demo/ermis-f/python_m/cur/1200 @@ -0,0 +1,32 @@ +From: fdrake at cnri.reston.va.us (Fred L. Drake) +Date: Tue, 13 Apr 1999 13:30:00 GMT +Subject: RPC and XDR with python +In-Reply-To: <19990413071131.A1293592@vislab.epa.gov> +References: <37119B99.B3E2633C@hons.cs.usyd.edu.au> + <19990413071131.A1293592@vislab.epa.gov> +Message-ID: <14099.18136.253966.903734@weyr.cnri.reston.va.us> +X-UID: 1200 + +Randall Hopper writes: + > Well, haven't looked for RPC, but XDR is there. Here's a code snip from + > something I wrote recently, brutally cut and simplified to highlight how + > xdrlib can be used: + + The xdrlib module is documented at: + + http://www.python.org/doc/lib/module-xdrlib.html + + Using this to support RPC is included in the Demo/rpc/ directory of +the source distribution; I don't know how recently this has been +tested. + + + -Fred + +-- +Fred L. Drake, Jr. +Corporation for National Research Initiatives + + + + diff --git a/demo/ermis-f/python_m/cur/1201 b/demo/ermis-f/python_m/cur/1201 new file mode 100644 index 00000000..90734799 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1201 @@ -0,0 +1,31 @@ +From: joe at strout.net (Joseph J. Strout) +Date: Thu, 8 Apr 1999 22:48:18 GMT +Subject: PIL font questions +In-Reply-To: <19990408223742.21605.rocketmail@ web605.yahoomail.com> +References: <19990408223742.21605.rocketmail@ web605.yahoomail.com> +Message-ID: +X-UID: 1201 + +At 3:37 PM -0700 04/08/99, David Ascher wrote: + +>There is a bunch of PIL fonts as part of the "FULL" Snow distribution. Feel +>free to steal. + +Thanks! Er, but where do I get that? I just downloaded a fresh copy of +Snow 1.26, and I can't seem to find these there. + +FYI, I'm working on a PIL backend to PIDDLE. I think you already have a +PIL backend for Snow, but if my piddlePIL works out nicely, and assuming +you're planning to also support PIDDLE, then you may be able to use that +rather than maintaining your own PIL-drawing code. Just a thought. + +Cheers, +-- Joe +,------------------------------------------------------------------. +| Joseph J. Strout Biocomputing -- The Salk Institute | +| joe at strout.net http://www.strout.net | +`------------------------------------------------------------------' + + + + diff --git a/demo/ermis-f/python_m/cur/1202 b/demo/ermis-f/python_m/cur/1202 new file mode 100644 index 00000000..c217ee5d --- /dev/null +++ b/demo/ermis-f/python_m/cur/1202 @@ -0,0 +1,22 @@ +From: stephan at pcrm.win.tue.nl (Stephan Houben) +Date: 23 Apr 1999 16:25:48 +0200 +Subject: Bug or Feature? +References: <37208E69.4B022E0C@mediaone.net> +Message-ID: +X-UID: 1202 + +Fuming Wang writes: + +> Is this a bug or a feature that I don't know about? + +It is a feature. If you do something like [[]]*10, then +you should realize that this gives you a list containing ten +times the *same* list. So mutation to one changes them all. + +Greetings, + +Stephan + + + + diff --git a/demo/ermis-f/python_m/cur/1203 b/demo/ermis-f/python_m/cur/1203 new file mode 100644 index 00000000..d209dcf7 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1203 @@ -0,0 +1,29 @@ +From: gmcm at hypernet.com (Gordon McMillan) +Date: Thu, 22 Apr 1999 21:25:18 GMT +Subject: What is it ? How can I learn it ? Where should I start ? Wha +In-Reply-To: <371F7DB9.E7E48A82@callware.com> +References: <371F7DB9.E7E48A82@callware.com> +Message-ID: <1287305973-36728049@hypernet.com> +X-UID: 1203 + +Ivan remembers... + +> ... and most of the real +> cannibals have been muzzled (Gordon excepted, so don't put any parts +> of you through his cage bars that you want to keep). ... + +and then forgets that I'm not poikilothermophagic... + +> PS: And just *where* is this job that (I should be so lucky) +> *REQUIRES* you to know Python???????? Why aren't they calling +> ME???? + +Now, Ivan, do you really have to ask? + +revenge-is-a-dish-best-eaten-raw-ly y'rs + +- Gordon + + + + diff --git a/demo/ermis-f/python_m/cur/1204 b/demo/ermis-f/python_m/cur/1204 new file mode 100644 index 00000000..57408b3c --- /dev/null +++ b/demo/ermis-f/python_m/cur/1204 @@ -0,0 +1,24 @@ +From: chad at vision.arc.nasa.gov (Chad Netzer) +Date: Fri, 02 Apr 1999 17:09:36 -0800 +Subject: string.join() vs % and + operators +References: <37054490.E79ADCC9@easystreet.com> +Message-ID: <37056A50.E22A3560@vision.arc.nasa.gov> +X-UID: 1204 + +Al Christians wrote: + +> Whereas Python's strings are immutable, there is potentially a strong +> incentive to get them right the first time. In my applications, I +> want to create strings that have many fields within them. I assume that +> it would be nice to be able to modify the fields without creating a new +> string any time its contents get changed, but I don't think that Python +> gives any nice way to do this. + +Look into the array module. (or the NumArray module from LLNL) +Depending on the specifics of your applications, it may allow you to do +what you want. + + + + + diff --git a/demo/ermis-f/python_m/cur/1205 b/demo/ermis-f/python_m/cur/1205 new file mode 100644 index 00000000..5e3c2cfe --- /dev/null +++ b/demo/ermis-f/python_m/cur/1205 @@ -0,0 +1,24 @@ +From: larsga at ifi.uio.no (Lars Marius Garshol) +Date: 08 Apr 1999 11:17:17 +0200 +Subject: Internet Robot +References: <7ehe9m$hbs$1@nnrp1.dejanews.com> +Message-ID: +X-UID: 1205 + +* gscot at my-dejanews.com +| +| I would like to write a Python robot to play an Internet game. I do +| not know how to make a POST request. Thanks to anyone in advance +| that can point me in the right direction. + +Use httplib in the standard libraries. + +If you need information on HTTP you can look here: + + + +--Lars M. + + + + diff --git a/demo/ermis-f/python_m/cur/1206 b/demo/ermis-f/python_m/cur/1206 new file mode 100644 index 00000000..483d2f1a --- /dev/null +++ b/demo/ermis-f/python_m/cur/1206 @@ -0,0 +1,29 @@ +From: news at helen.demon.nl (Ilja Heitlager) +Date: Thu, 29 Apr 1999 13:18:14 +0200 +Subject: Designing Large Systems with Python +References: <372599D6.C156C996@pop.vet.uu.nl> <7g4a3l$atk$1@news.worldonline.nl> <7g99pj$b1$1@news.worldonline.nl> +Message-ID: <7g9eln$4eq$1@news.worldonline.nl> +X-UID: 1206 + +David M. Cook wrote in message ... +>On Thu, 29 Apr 1999 11:54:58 +0200, Ilja Heitlager +wrote: +> +>>OK, A UNIX guy (that will change ;-) +> +>Yes, soon you will *all* be Linux guys. + + +I would love too, but Windows doesn't leave any space on my HD ;-( + +> Resistance is futile. You will be assimilated. + +Borgs don't mix with snakes. + +Ilja + + + + + + diff --git a/demo/ermis-f/python_m/cur/1207 b/demo/ermis-f/python_m/cur/1207 new file mode 100644 index 00000000..e7f84079 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1207 @@ -0,0 +1,46 @@ +From: bwinton at tor.dhs.org (Blake Winton) +Date: Sun, 11 Apr 1999 18:35:53 GMT +Subject: bug or feature? traceback with python -x off by one line +References: <3710DF00.DF5@creo.com> +Message-ID: +Content-Length: 1419 +X-UID: 1207 + +On Sun, 11 Apr 1999 10:42:24 -0700, Dale Nagata wrote: +>I package a lot of Python scripts as ready-to-run Windows NT batch +>files by prepending the line +> @python -x %~f0 %* & goto :EOF + +Hey, that's pretty cool looking... But I have to wonder, why don't you +just type "filename.py"? The associations are set up correctly by +default if I remember correctly, so if you have python installed on the +machine, you don't need the trick. (Say, does that work on Win95/98 as +well? There it could be very handy for some stuff we're doing at +work...) + +>which means "without echoing to the console window, run Python with the + +This got me started thinking about the "Hello Polyglot" program I saw a +while ago, and I wondered just what that line would do if interpreted as +a Perl program (because of the @)... The answer is: + +syntax error at temp2 line 1, near "@python -x " +Warning: Use of "-x" without parens is ambiguous at temp2 line 1. +Bareword found where operator expected at temp2 line 1, near "%~f0" + (Missing operator before f0?) +Execution of temp2 aborted due to compilation errors. + +>Any ideas on the best way to resolve this? How, from within a script, +>can I detect that the -x option is in effect? Or do I have to go hack +>the interpreter source? + +I think you'ld have to hack the source, since the traceback line numbers +are set in there, no matter what you do. + +Later, +Blake. + + + + + diff --git a/demo/ermis-f/python_m/cur/1208 b/demo/ermis-f/python_m/cur/1208 new file mode 100644 index 00000000..d721984a --- /dev/null +++ b/demo/ermis-f/python_m/cur/1208 @@ -0,0 +1,25 @@ +From: markc at chiark.greenend.org.uk (Mark Carroll) +Date: 14 Apr 1999 12:40:31 +0100 (BST) +Subject: Pig Latin? +References: <816010E2456BD111A48700805FBBE2EEA63EEF@ex-quebec-u1.baan.com> +Message-ID: <-FC*R+rXn@news.chiark.greenend.org.uk> +X-UID: 1208 + +In article <816010E2456BD111A48700805FBBE2EEA63EEF at ex-quebec-u1.baan.com>, +Gaetan Corneau wrote: +>OK, I'll bite: +>Could someone tell me what "pig latin" is? A form of latin spoken by pigs? + +http://WWW-KSL-SVC.stanford.edu:5915/WEBSTER/ is your +friend. According to it, + +pig latin n, often cap L +(1931) +:a jargon that is made by systematic alteration of English (as ipskay +the ointjay for skip the joint) + +-- Mark + + + + diff --git a/demo/ermis-f/python_m/cur/1209 b/demo/ermis-f/python_m/cur/1209 new file mode 100644 index 00000000..395de883 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1209 @@ -0,0 +1,53 @@ +From: wlfraed at ix.netcom.com (Dennis Lee Bieber) +Date: Fri, 30 Apr 1999 05:37:51 GMT +Subject: HTML "sanitizer" in Python +References: +Message-ID: <37293e7c.2958315@nntp.ix.netcom.com> +Content-Length: 1900 +X-UID: 1209 + +On Thu, 29 Apr 1999 12:20:27 -0400, "Scott Stirling" + declaimed the following in comp.lang.python: + +> On opening files in Windows--I was hoping there was a way to give python the full file path. Everything I have seen so far just tells me how to open a file if it's in the same directory I am running python from. +> +> I don't have sed on my MS Windows PC at work. This was part of the initial explanation--I am working for a company where we have DOS, Windows and Office 97. No sed, no Unix. This is a Y2K Project too, so we are on a budget with little leeway for new ideas that weren't included in the original statement of work and project plan. +> + Did you try? + + Actually, you might have gotten caught on the \ treatment. + +> PythonWin 1.5 (#0, Dec 30 1997, 23:24:20) [MSC 32 bit (Intel)] on win32 +> Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam +> Portions copyright 1994-1998 Mark Hammond (MHammond at skippinet.com.au) +> >>> fo = open("h:\temp\somefile.txt","w") +> Traceback (innermost last): +> File "", line 1, in ? +> IOError: (2, 'No such file or directory') +> >>> fo = open("h:/temp/somefile.txt", "w") +> >>> fo.write("This is a line of text\n") +> >>> fo.close() +> >>> +> >>> fo=open("h:\\temp\\somefile.txt","r") +> >>> for ln in fo.readlines(): +> ... print ln +> ... +> This is a line of text +> +> >>> fo.close() +> >>> + + Note the use of reversed / on the first open, and the doubled \\ +on the second. + +-- + > ============================================================== < + > wlfraed at ix.netcom.com | Wulfraed Dennis Lee Bieber KD6MOG < + > wulfraed at dm.net | Bestiaria Support Staff < + > ============================================================== < + > Bestiaria Home Page: http://www.beastie.dm.net/ < + > Home Page: http://www.dm.net/~wulfraed/ < + + + + diff --git a/demo/ermis-f/python_m/cur/1210 b/demo/ermis-f/python_m/cur/1210 new file mode 100644 index 00000000..288dcc5b --- /dev/null +++ b/demo/ermis-f/python_m/cur/1210 @@ -0,0 +1,40 @@ +From: fredrik at pythonware.com (Fredrik Lundh) +Date: Thu, 15 Apr 1999 13:31:35 GMT +Subject: PIL fonts - Where are you? +References: <7jbR2.3071$YU1.5576@newsr2.twcny.rr.com> +Message-ID: <002c01be8744$4a7af2d0$f29b12c2@pythonware.com> +Content-Length: 1173 +X-UID: 1210 + +Kevin K. Ehmka wrote: +> >> Does anybody have some ready made fonts in PIL format they want to share? + +we'll post pilfont versions of the fonts in the X11 release within a +near future. These fonts are fully redistributable, but the current +version of pilfont doesn't copy the copyright text from the source +files. That should be fixed first. + +> I'm using the compiled binaries of PIL (from Starship) and fail to get +> pilfont to work on several BDF fonts. I even used a font maker program and I +> get different errors. Using 1.0b I get encoder errors. Using 0.3 PIL I get +> array bounds errors. + +pilfont has been tested with all files from the standard distribution, +but the version shipped with 1.0b1 fails on fonts generated by some +other tools. most notable, it assumes that the FONT field is a full +X11 font specifier, e.g: + +FONT -Adobe-Times-Medium-R-Normal--11-80-100-100-P-54-ISO8859-1 + +some tools use values like "font1" or "generated" etc. you could +try editing the files by hand, changing the value of FONT to some- +thing (anything) with an appropriate number of hyphens in it... + +this will be fixed (together with some other problems) in 1.0 final. + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1211 b/demo/ermis-f/python_m/cur/1211 new file mode 100644 index 00000000..2dc483df --- /dev/null +++ b/demo/ermis-f/python_m/cur/1211 @@ -0,0 +1,28 @@ +From: kaz at ashi.FootPrints.net (Kaz Kylheku) +Date: 22 Apr 1999 19:17:02 GMT +Subject: The Future of Tk? +References: <371E964F.C531C2A@istar.ca> <371F11C2.3162025@ciril.fr> <4fv$ECA+JyH3EwbN@jessikat.demon.co.uk> +Message-ID: <7fnsje$pum$14@newsread.f.de.uu.net> +X-UID: 1211 + +On Thu, 22 Apr 1999 18:01:27 GMT, Barry Margolin wrote: +>In article <4fv$ECA+JyH3EwbN at jessikat.demon.co.uk>, +>Robin Becker wrote: +>>I take this completely differently; least astonishment for me is if +>>program X looks and behaves the same way no matter what keyboard, mouse +>>and screen I'm using. As a 'user' of the program X it shouldn't matter +>>what OS/WM is executing the code. I certainly don't want vi or emacs to +>>be different on the mac why should I treat word or excel differently? +> +>I would be very surprised if Netscape on the Macintosh presented a +>Windows-like user interface, rather than adopting the standard Macintosh + +I'd be very surprised if even 10% of, say, comp.lang.c gave a damn. The pitiful +dumbfuck who started this thread made a severe mistake in constructing the +Newsgroups: header line, the moment he put in the first comma. + +I am setting Followup-to: to comp.lang.tcl. + + + + diff --git a/demo/ermis-f/python_m/cur/1212 b/demo/ermis-f/python_m/cur/1212 new file mode 100644 index 00000000..93911962 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1212 @@ -0,0 +1,47 @@ +From: astro at nospam.tne.net.au (Tim Auld) +Date: Fri, 30 Apr 1999 23:07:45 +0930 +Subject: Using Python for Modular Artificial Intelligence code +References: <7g94lp$mdu$1@news.worldonline.nl> +Message-ID: +Content-Length: 1490 +X-UID: 1212 + +>>I've started looking into Python as the AI scripting language for this +>>purpose, but I'm having trouble seeing exactly how I could do this. I +want +>>a message passing architecture - so one object in the game world sends a +>>message to another for interpretation (along with a Python tuple for the +>>parameters of the message perhaps). This requires a two way interface +>>between my C++ code and the Python script loaded for the particular game +>>object. +>Wouldn't you be better of using a network or distributed architecture. Use +>Corba or TCP/IP protocol to let your objects interact. Saves you the +trouble +>of language-interoperatablility and provides possibilities for multi-user +>(You're doing a LARGE game project, not?) +> +>Where do you use C++ for anyway? GUI's? Build them in Python, forget C++ +>until you are done and than use C++ to speed up critical sections +> +>Ilja + + +This is an interesting idea, using sockets to communicate with the AI +modules, which would have +to be run in separate threads (but perhaps blocking on socket I/O to save +cycles). I was naturally going to use sockets for multiplayer, and having +socket connections to AI modules may even generalise (and simplify) the +system further. The reason I'm using C++ is mainly because I'm familiar +with it, and because of speed. I'm aware that Python is relatively slow, so +I would rather use C++ as a base from the start, and save myself the trouble +of rewriting it all later. + +Thanks for your help :) + +Tim + + + + + + diff --git a/demo/ermis-f/python_m/cur/1213 b/demo/ermis-f/python_m/cur/1213 new file mode 100644 index 00000000..4a55fca4 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1213 @@ -0,0 +1,38 @@ +From: trashcan at david-steuber.com (David Steuber) +Date: 28 Apr 1999 03:11:57 -0400 +Subject: running application config files written in Python +References: +Message-ID: +X-UID: 1213 + +Nathan Froyd writes: + +-> Say I have an application whose configuration language I want to be +-> Python. + +I would like to do the same thing. However, my application will be +written in Python and translated to C or C++ as necessary. I just +wanted to point out that you will be executing actual code not unlike +the VBA macros in Microsoft Word with this technique. The Melissa +virus was written in VBA in a Word document. If there is a way to +sandbox such code, I would love to hear how because it is very useful +to be able to just recycle the Python interpreter for reading +configuration information. + +-- +David Steuber +http://www.david-steuber.com + +If you wish to reply by mail, _please_ replace 'trashcan' with 'david' +in the e-mail address. The trashcan account really is a trashcan. + + "Gee, Mudhead, everyone at More Science High has an +extracurricular activity except you." + "Well, gee, doesn't Louise count?" + "Only to ten, Mudhead." + + -- Firesign Theater + + + + diff --git a/demo/ermis-f/python_m/cur/1214 b/demo/ermis-f/python_m/cur/1214 new file mode 100644 index 00000000..ba29211e --- /dev/null +++ b/demo/ermis-f/python_m/cur/1214 @@ -0,0 +1,27 @@ +From: tim_one at email.msn.com (Tim Peters) +Date: Sun, 11 Apr 1999 02:15:52 GMT +Subject: WinZip vs 0-length files (was RE: trivial import question) +In-Reply-To: <14095.40219.501277.258165@buffalo.fnal.gov> +References: <14095.40219.501277.258165@buffalo.fnal.gov> +Message-ID: <000301be83c1$39637a20$7fa22299@tim> +X-UID: 1214 + +[Tim, passes on Nico Mak's confirmation that WinZip 7 does not extract + 0-length files from .tgz/.gz/.z/.tar archives, but does from .zip + archives, and that the former behavior is an acknowledged bug +] + +[Charles G Waldman] +> would it work to make the __init__.py files just have a #comment in +> them so that they wouldn't be 0 bytes? + +Certainly should work, yes. Should also work to leave __init__.py empty but +also ship __init__.pyc files (which aren't empty even if __init__.py is). + +words-to-the-wise-and-the-idle-ly y'rs - tim + + + + + + diff --git a/demo/ermis-f/python_m/cur/1215 b/demo/ermis-f/python_m/cur/1215 new file mode 100644 index 00000000..91646bd7 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1215 @@ -0,0 +1,25 @@ +From: faassen at pop.vet.uu.nl (Martijn Faassen) +Date: Wed, 21 Apr 1999 21:58:38 +0200 +Subject: New python user seeks comments +References: <371DA955.9F13B144@pop.vet.uu.nl> +Message-ID: <371E2DEE.C2BD5A58@pop.vet.uu.nl> +X-UID: 1215 + +Chad McDaniel wrote: + +['in' is a reserved word so can't be used as a variable name] + +> It seems that Python could have mentioned that to the user. + +True, though it does say this: + + File "", line 2 + in = open("test.txt", "r") + ^ +SyntaxError: invalid syntax + +Could be better, but easily could've been far worse.. + + + + diff --git a/demo/ermis-f/python_m/cur/1216 b/demo/ermis-f/python_m/cur/1216 new file mode 100644 index 00000000..5b0b40aa --- /dev/null +++ b/demo/ermis-f/python_m/cur/1216 @@ -0,0 +1,44 @@ +From: amk1 at erols.com (A.M. Kuchling) +Date: Sun, 18 Apr 1999 21:14:02 -0400 +Subject: How libpython1.5.so +Message-ID: <199904190114.VAA03514@207-172-39-16.s16.tnt10.ann.va.dialup.rcn.com> +Content-Length: 1770 +X-UID: 1216 + +Spam detection software, running on the system "albatross.python.org", has +identified this incoming email as possible spam. The original message +has been attached to this so you can view it (if it isn't spam) or label +similar future email. If you have any questions, see +the administrator of that system for details. + +Content preview: Nick Belshaw writes: > Whilst trying to get Python plugins + to work on Gnumeric-0.23 I bumped up > against the need for libpython1.5.so.0.0.0 + Here's a patch to the top-level Makefile.in which adds a "shared" target. + Can people please try this and see if it works on your favorite Unix variant? + It doesn't verify that you've compiled all the code with -fPIC or whatever's + required; I'm not sure how to check or enforce that. (It could do "make clean + ; make CCFLAGS=", but is that too extreme?) [...] + +Content analysis details: (7.9 points, 5.0 required) + + pts rule name description +---- ---------------------- -------------------------------------------------- + 4.4 HELO_DYNAMIC_IPADDR2 Relay HELO'd using suspicious hostname (IP addr + 2) + 0.5 FH_HELO_EQ_D_D_D_D Helo is d-d-d-d + 1.6 TVD_RCVD_IP TVD_RCVD_IP + 2.0 FH_DATE_IS_19XX The date is not 19xx. + 0.1 RDNS_DYNAMIC Delivered to trusted network by host with + dynamic-looking rDNS +-0.7 AWL AWL: From: address is in the auto white-list + + +-------------- next part -------------- +An embedded message was scrubbed... +From: "A.M. Kuchling" +Subject: How libpython1.5.so +Date: Sun, 18 Apr 1999 21:14:02 -0400 +Size: 2582 +URL: + + diff --git a/demo/ermis-f/python_m/cur/1217 b/demo/ermis-f/python_m/cur/1217 new file mode 100644 index 00000000..0f1dc9d8 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1217 @@ -0,0 +1,34 @@ +From: brunomadv at ciudad.com.ar (Bruno Mattarollo) +Date: Sun, 11 Apr 1999 17:33:55 GMT +Subject: best way to copy a file [Q] +Message-ID: <000201be8441$7965d4d0$6eba0ac8@kuarajy.infosys.com.ar> +X-UID: 1217 + +Hi! + + I need to copy a file (can be binary or ascii) from one path to another. I +have tryied to do: + line = fd.readline() + while line: + fd2.write(line) + line = fd.readline() + fd.close() + fd2.close() + + It only works for ascii files ... How can I do a 'copy' ...? I need to run +this on NT ...:( And I don't want to open a shell to do a copy from +there... I also tryied fd.read() ... No success neither. I have looked +unsuccesfully throughout the documentation and didn't find a 'filecopy' +method. The files can range from 1KB to 600MB+ ... + + TIA and excuse my english ... :-) + +/B + +Bruno Mattarollo +... proud to be a PSA member + + + + + diff --git a/demo/ermis-f/python_m/cur/1218 b/demo/ermis-f/python_m/cur/1218 new file mode 100644 index 00000000..f5da17b0 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1218 @@ -0,0 +1,23 @@ +From: arcege at shore.net (Michael P. Reilly) +Date: Wed, 28 Apr 1999 18:32:06 GMT +Subject: Python implementation of tar +References: <7ftjjl$tim$1@nnrp1.dejanews.com> <372595AE.C27E7E50@phoenix-edv.netzservice.de> <14119.2190.827661.960717@amarok.cnri.reston.va.us> +Message-ID: +X-UID: 1218 + +Andrew M. Kuchling wrote: +: Holger Jannsen writes: +:>frankmcgeough at my-dejanews.com schrieb: +:>> Does someone has a tar implementation written in Python? + +: Try Clement Hintze's tarlib.py: +: ftp://ftp.python.org/pub/python/contrib/System/tarlib.py + +That'll teach me for writing one when I don't know if there is one. ;) + + -Arcege + + + + + diff --git a/demo/ermis-f/python_m/cur/1219 b/demo/ermis-f/python_m/cur/1219 new file mode 100644 index 00000000..74866103 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1219 @@ -0,0 +1,42 @@ +From: jam at newimage.com (jam) +Date: Sun, 25 Apr 1999 18:27:15 -0400 +Subject: HELP! NumPy (Graphics) and Linux +In-Reply-To: <199904252156.RAA83445@chipotle.physics.uvm.edu>; from Kelvin Chu on Sun, Apr 25, 1999 at 05:56:44PM -0400 +References: <7fvpsh$l8e$1@nnrp1.dejanews.com> <199904252156.RAA83445@chipotle.physics.uvm.edu> +Message-ID: <19990425182715.A17114@toast.internal> +Content-Length: 1044 +X-UID: 1219 + +On Sun, Apr 25, 1999 at 05:56:44PM -0400, Kelvin Chu wrote: +> +> Dear J; +> +> Thanks for your quick response. I didn't install RPMS, I built the +> source. Should I go back and get the RPMs instead? -k +> + + +greetings, + +in general, I install rpms when I can find them from 'trusted' sources +(check for latest python rpms).. they have +already been compiled, and generally whatever headaches required to fix +compilation problems have already been ironed out.. go for it.. it can't +hurt.. if it *still* doesn't work, then let me know, and we can work from +there... also, before you install the rpms, I would suggest removing old +versions of the interpreter that may have been installed in /usr/local/... +it "shouldn't" hurt anything to leave them around, but just to be on the +safe side, that's what I would do. + +let me know if that helps. + +regards, +J +-- +|| visit gfd +|| psa member #293 +|| New Image Systems & Services, Inc. + + + + diff --git a/demo/ermis-f/python_m/cur/1220 b/demo/ermis-f/python_m/cur/1220 new file mode 100644 index 00000000..ebe109f8 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1220 @@ -0,0 +1,32 @@ +From: dalke at bioreason.com (Andrew Dalke) +Date: Wed, 21 Apr 1999 14:31:20 -0600 +Subject: Buglet: egcs' name is too long for Python startup message +References: +Message-ID: <371E3598.1E28EA19@bioreason.com> +X-UID: 1220 + +Gregor Hoffleit suggested a patch: +> --- python-1.5.2.orig/Python/getversion.c +> +++ python-1.5.2/Python/getversion.c +> @@ -39,7 +39,7 @@ +> Py_GetVersion() +> { +> static char version[100]; +> - sprintf(version, "%.10s (%.40s) %.40s", PY_VERSION, +> + sprintf(version, "%.10s (%.40s) %.80s", PY_VERSION, +> Py_GetBuildInfo(), Py_GetCompiler()); +> return version; +> } + +And you probably want to use + + static char version[140]; + +instead of 100 (since you now allow 80+40+10+5 = 135 characters). + + Andrew + dalke at acm.org + + + + diff --git a/demo/ermis-f/python_m/cur/1221 b/demo/ermis-f/python_m/cur/1221 new file mode 100644 index 00000000..a1fdff75 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1221 @@ -0,0 +1,18 @@ +From: max at rightworks.com (max at rightworks.com) +Date: Wed, 28 Apr 1999 01:29:23 GMT +Subject: SMTPLIB accessing MicroSoft SMTP mail server +Message-ID: <7g5o9g$ues$1@nnrp1.dejanews.com> +X-UID: 1221 + +I had reported a problem that when sending mail to a MS SMTP server my code +was hanging. The fix is in the data() method the msg text is terminated by +sending "\n.\n" It appears that MicroSoft requires a full CRLF. By changing +the line from self.send("\n.\n") to self.send(CRLF+"."+CRLF) problem is +fixed. + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/1222 b/demo/ermis-f/python_m/cur/1222 new file mode 100644 index 00000000..5bbf25cc --- /dev/null +++ b/demo/ermis-f/python_m/cur/1222 @@ -0,0 +1,27 @@ +From: aa8vb at vislab.epa.gov (Randall Hopper) +Date: Tue, 27 Apr 1999 07:33:42 -0400 +Subject: GUI and printing +In-Reply-To: <7fqkcu$7gj$1@mars.worldonline.fr>; from christer fernstrom on Fri, Apr 23, 1999 at 09:18:27PM +0200 +References: <7fqkcu$7gj$1@mars.worldonline.fr> +Message-ID: <19990427073342.A579158@vislab.epa.gov> +X-UID: 1222 + +christer fernstrom: + |Anybody knows if any of the Pythonized GUI kits support printing of window + |contents AND cross-platform compatibility? (at least on NT and Mac)? + |Thx, + | christer + +Re printing. I don't know the details (since I haven't used this feature), +but seems I recall that Tk has some support for PostScript printing. +Grepping Tkinter, I see that the Canvas widget has a "postscript" method. + +Tkinter is one that is widely cross platform since it's built on Tk. IIRC, +it runs on both the platforms you mention along with many others. + +Randall + + + + + diff --git a/demo/ermis-f/python_m/cur/1223 b/demo/ermis-f/python_m/cur/1223 new file mode 100644 index 00000000..8c89cc1c --- /dev/null +++ b/demo/ermis-f/python_m/cur/1223 @@ -0,0 +1,89 @@ +From: skip at mojam.com (Skip Montanaro) +Date: Fri, 23 Apr 1999 22:41:19 GMT +Subject: Python too slow for real world +References: <372068E6.16A4A90@icrf.icnet.uk> <3720A21B.9C62DDB9@icrf.icnet.uk> +Message-ID: <3720F783.24F2E94B@mojam.com> +Content-Length: 2124 +X-UID: 1223 + +Arne Mueller wrote: +> However the problem of reading/writing larges files line by +> line is the source of slowing down the whole process. +> +> def rw(input, output): +> while 1: +> line = input.readline() +> if not line: break +> output.write(line) +> +> f = open('very_large_file','r') +> rw(f, stdout) +> +> The file I read in contains 2053927 lines and it takes 382 sec to +> read/write it where perl does it in 15 sec. + +I saw a mention of using readlines with a buffer size to get the +benefits of large reads without requiring that you read the entire file +into memory at once. Here's a concrete example. I use this idiom +(while loop over readlines() and a nested for loop processing each line) +all the time for processing large files that I don't need to have in +memory all at once. + +The input file, /tmp/words2, was generated from /usr/dict/words: + + sed -e 's/\(.*\)/\1 \1 \1 \1 \1/' < /usr/dict/words > /tmp/words + cat /tmp/words /tmp/words /tmp/words /tmp/words /tmp/words > +/tmp/words2 + +It's not as big as your input file (10.2MB, 227k lines), but still big +enough to measure differences. The script below prints (on the second +of two runs to make sure the file is in memory) + + 68.9596179724 + 7.96663999557 + +suggesting about a 8x speedup between your original function and my +readlines version. It's still not going to be as fast as Perl, but it's +probably close enough that some other bottleneck will probably pop up +now... + +import sys, time + +def rw(input, output): + while 1: + line = input.readline() + if not line: break + output.write(line) + +f = open('/tmp/words2','r') +devnull = open('/dev/null','w') + +t = time.time() +rw(f, devnull) +print time.time() - t + +def rw2(input, output): + lines = input.readlines(100000) + while lines: + output.writelines(lines) + lines = input.readlines(100000) + +f = open('/tmp/words2','r') + +t = time.time() +rw2(f, devnull) +print time.time() - t + + + +Cheers, + +-- +Skip Montanaro | Mojam: "Uniting the World of Music" +http://www.mojam.com/ +skip at mojam.com | Musi-Cal: http://www.musi-cal.com/ +518-372-5583 + + + + diff --git a/demo/ermis-f/python_m/cur/1224 b/demo/ermis-f/python_m/cur/1224 new file mode 100644 index 00000000..42a068c0 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1224 @@ -0,0 +1,66 @@ +From: jbauer at rubic.com (Jeff Bauer) +Date: Mon, 19 Apr 1999 00:32:54 GMT +Subject: Sorting tuples +References: <7fdkhf$12d$1@sparky.wolfe.net> +Message-ID: <371A79B6.F803063E@rubic.com> +Content-Length: 1134 +X-UID: 1224 + +> I have a list of tuples +> [('a','p','q'),('b','r','s'),('c','t','u'),('a','v','w'),('b','x','y')], +> and I want to print out +> +> a : p, q, v, w +> b : r, s, x, y +> c : t, u + +Jon, + +There are lots of cute ways to do this, and I +expect to see a bunch of followup posts that will +show off arcane Python wizardry, but the simple +solution is to use a dictionary. + +The dictionary approach is quick, easy, and +more amenable to modification. + +### Jon's list of tuples, shuffled +t = [ ('b','y','x'), + ('a','v','w'), + ('b','r','s'), + ('c','u','t'), + ('a','p','q'), ] + +### build the dict +d = {} +for x in t: + if not d.has_key(x[0]): + d[x[0]] = [] + for y in x[1:]: + d[x[0]].append(y) + +### print the dict, sorting the values at the +### last possible moment. +keys = d.keys() +keys.sort() +for k in keys: + d[k].sort() + print k, ':', d[k] + +It may not be obvious from the example above, but lists +of tuples can also just be sorted in place, e.g. + + t = [ ('b','x','y'), ... + t.sort() + +Python almost always follows the principle of least +surprise in this regard. + +Best regards, + +Jeff Bauer +Rubicon, Inc. + + + + diff --git a/demo/ermis-f/python_m/cur/1225 b/demo/ermis-f/python_m/cur/1225 new file mode 100644 index 00000000..d5f9e041 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1225 @@ -0,0 +1,44 @@ +From: fredrik at pythonware.com (Fredrik Lundh) +Date: Wed, 14 Apr 1999 07:12:22 GMT +Subject: Converting a string to a tuple +References: <01be8530$65bb7120$52037e81@saints> <14098.28727.245158.616727@buffalo.fnal.gov> <00f501be857f$ff636f40$f29b12c2@pythonware.com> <01be85b5$f7197c90$52037e81@saints> <008f01be85b8$a5be9580$f29b12c2@pythonware.com> +Message-ID: <040801be8646$823310d0$f29b12c2@pythonware.com> +Content-Length: 1064 +X-UID: 1225 + +> > since \\ is Python's string representation +> > for a single backslash (that is, \\ in the +> > source code becomes \ in the actual +> > string). +> +> > and \t is an alias for \011 (a tab). +> +> No it isn't. + +of course it is. when used in Python's string representation, +which was what I was talking about. please read the entire +message before following up on pieces of it. + +> The problem arises because of the second evaluation. Either use +> string.replace to double backslashes in the string, prefix the string +> with an "r", or don't use eval. + +argh! if you have the string in source code, just remove the +outer quotes. converting strings to tuples has never been +easier. but I suspect Bruce was looking for something else, +and that he was tricked by Python's string syntax and repr. +it has happened to many good programmers before, as can +be seen in the c.l.py archives. + +> I'd avoid eval... + +why? it's there, it works, and it can be used in a safe way, +as shown in earlier posts. and converting strings to tuples +is kinda hard without it... + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1226 b/demo/ermis-f/python_m/cur/1226 new file mode 100644 index 00000000..87eea301 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1226 @@ -0,0 +1,39 @@ +From: phd at sun.med.ru (Oleg Broytmann) +Date: Wed, 7 Apr 1999 14:55:30 GMT +Subject: GadFly - MemoryError +In-Reply-To: <370B5E83.C796BFF3@palladion.com> +References: <370B5E83.C796BFF3@palladion.com> +Message-ID: +X-UID: 1226 + +Hello! + +On Wed, 7 Apr 1999, Tres Seaver wrote: +> SELECT rec_no, URL FROM bookmarks +> WHERE URL IN +> (SELECT URL FROM bookmarks GROUP BY URL HAVING COUNT(*) > 1) +> +> or create a temp table first with the results of the subquery, then join it in a +> separate query. + + It looks nice. I'll try. + The problem with it is that I work with Postgres SQl server a little +more than a year, and Postgres has many problems with HAVING, so usually I +avoid it. I forget to switch my mind when switched to GadFly. + Thanks. + +> -- +> ========================================================= +> Tres Seaver tseaver at palladion.com 713-523-6582 +> Palladion Software http://www.palladion.com +> + +Oleg. +---- + Oleg Broytmann National Research Surgery Centre http://sun.med.ru/~phd/ + Programmers don't die, they just GOSUB without RETURN. + + + + + diff --git a/demo/ermis-f/python_m/cur/1227 b/demo/ermis-f/python_m/cur/1227 new file mode 100644 index 00000000..8e387b27 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1227 @@ -0,0 +1,48 @@ +From: never at mail.matav.hu (Hever Zsolt) +Date: Mon, 12 Apr 1999 01:41:57 GMT +Subject: ANNOUNCEMENT: Some Python Documentation in Hungarian language +Message-ID: +Content-Length: 1266 +X-UID: 1227 + +Hi there, + +I am writing my diploma work in Python. I made two enclosures to it and +converted them into HTML format. Now I put them out on the Internet with a +Python home page together all in Hungarian language. I hope this +documentation will help Python to be better known in Hungary. + +The documentations: + +** Python home page in Hungarian language +< http://www.cab.u-szeged.hu/~h532851/python.htm > + +The translation of the foreword: + +Dear Visitor, +by the links on this page you can get into the world of the Python and the +Internet Community. + +** Python Mini Reference in Hungarian language: +< http://www.cab.u-szeged.hu/~h532851/pmr.htm > +It was translated from the work "A Python Quick Reference" by Chris +Hoffmann and I tried to keep it up-to-date by inserting links. + +** Tkinter in Hungarian language: +< http://www.cab.u-szeged.hu/~h532851/tkinter.htm > +It is based on Tkinter Life Preserver by Matt Conway and has lots of links +pointing to the Python Tkinter Resources, +An Introduction to Tkinter by Fredrik Lundh . + +I hope that no copyright is violated by these documentations. + +I would like to say thank to Arpad Kiss < +http://starship.python.net/crew/arpadk/> for his help with making these +documentations and my diploma work. + +Zsolt Hever + + + + + diff --git a/demo/ermis-f/python_m/cur/1228 b/demo/ermis-f/python_m/cur/1228 new file mode 100644 index 00000000..78c7f42a --- /dev/null +++ b/demo/ermis-f/python_m/cur/1228 @@ -0,0 +1,55 @@ +From: achrist at easystreet.com (Al Christians) +Date: Tue, 06 Apr 1999 15:05:17 -0700 +Subject: How to use os.path.walk method +References: <7edt95$krh$1@ash.prod.itd.earthlink.net> +Message-ID: <370A851D.F13835CE@easystreet.com> +Content-Length: 1504 +X-UID: 1228 + +Are you sure that you've got that right? I cut your code and +put it into a Python console, then changed the dir from +/Windmodem/ to / and it worked for me. Maybe you meant 'Winmodem'? + +Al + + +Benjamin Derstine wrote: +> +> Can anyone give me a brief example of how to use this method? The +> documentation is somewhat unclear: +> +> walk (path, visit, arg) +> Calls the function visit with arguments (arg, dirname, names) for each +> directory in the directory tree rooted at path (including path itself, if it +> is a directory). The argument dirname specifies the visited directory, the +> argument names lists the files in the directory (gotten from +> os.listdir(dirname)). The visit function may modify names to influence the +> set of directories visited below dirname, e.g., to avoid visiting certain +> parts of the tree. (The object referred to by names must be modified in +> place, using del or slice assignment.) +> +> I understand I need to define a second function for the visit argument but +> I'm unclear as to the third argument (arg) in walk() is for. Likewise with +> the first argument in visit(). I tried a dummy function just to print the +> directories it walks like so: +> +> import os +> +> def visit(something, dirname, names): +> print dirname +> print names +> print something +> +> arg=None +> os.path.walk('/Windmodem/',visit,arg) +> +> where 'Windowmodem' is a directory on my root. +> +> But this does nothing and quits without returning any errors. +> Thanks, +> +> Ben + + + + diff --git a/demo/ermis-f/python_m/cur/1229 b/demo/ermis-f/python_m/cur/1229 new file mode 100644 index 00000000..1538503f --- /dev/null +++ b/demo/ermis-f/python_m/cur/1229 @@ -0,0 +1,18 @@ +From: kevinsl at yahoo.com (Kevin L) +Date: Mon, 26 Apr 1999 04:48:44 GMT +Subject: timeout on urllib.urlopen? +Message-ID: <7g0r7c$gn9$1@nnrp1.dejanews.com> +X-UID: 1229 + +I'm trying to use urllib.urlopen() on a big list of urls, some of which are +dead (they don't return a 404, just no response). And the function just waits. +Is there any way to specify a timeout period for this function? thanks, + +Kevin + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/1230 b/demo/ermis-f/python_m/cur/1230 new file mode 100644 index 00000000..ee3c75b8 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1230 @@ -0,0 +1,22 @@ +From: da at ski.org (David Ascher) +Date: Wed, 28 Apr 1999 11:50:52 -0700 (Pacific Daylight Time) +Subject: Maximize Benefit when Purchasing Learning Python +In-Reply-To: <00e401be91a6$4d581750$8b7125a6@cpda6686.mcit.com> +Message-ID: +X-UID: 1230 + +On Wed, 28 Apr 1999 jkraai at murl.com wrote: + +> How can I help whom when purchasing Python books? + +I'll dare to speak for Mark, and say that you should feel free to send +either Mark or I (or both) checks for any amount whatsoever. Skip the +middleman. Save trees -- don't buy the book, just send us cash. Don't +hesitate for a minute. + +David Ascher + + + + + diff --git a/demo/ermis-f/python_m/cur/1231 b/demo/ermis-f/python_m/cur/1231 new file mode 100644 index 00000000..281233aa --- /dev/null +++ b/demo/ermis-f/python_m/cur/1231 @@ -0,0 +1,42 @@ +From: trashcan at david-steuber.com (David Steuber) +Date: 08 Apr 1999 18:21:07 -0500 +Subject: Internet Robot +References: <7ehe9m$hbs$1@nnrp1.dejanews.com> +Message-ID: +X-UID: 1231 + +gscot at my-dejanews.com writes: + +-> To All, I would like to write a Python robot to play an Internet +-> game. I do not know how to make a POST request. Thanks to anyone in advance +-> that can point me in the right direction. Gary + +There are two ways to post data. I remember one way, but the other is +a little trickier. The simple way is to send up a URL encoded string +as the body of the request. The other is to send a multi-part mime +document. I suggest you go with the former if possible. A post would +look something like this: + +POST /URI HTTP/1.0 +Content-Length: octets +Content-Type: + +URL+Encoded+Data+as+name+value+pairs + + +A good thing to do would be to capture the output of an HTTP client +posting form data. Also see RFC-1945 and RFC-2068. + +-- +David Steuber +http://www.david-steuber.com + +s/trashcan/david/ to reply by mail +If you don't, I won't see it. + +A LISP programmer knows the value of everything, but the cost of +nothing. + + + + diff --git a/demo/ermis-f/python_m/cur/1232 b/demo/ermis-f/python_m/cur/1232 new file mode 100644 index 00000000..2d7c8dfa --- /dev/null +++ b/demo/ermis-f/python_m/cur/1232 @@ -0,0 +1,57 @@ +From: ivanlan at callware.com (Ivan Van Laningham) +Date: Wed, 21 Apr 1999 20:12:41 GMT +Subject: New python user seeks comments +References: + <371DA955.9F13B144@pop.vet.uu.nl> +Message-ID: <371E3139.FDDF65A1@callware.com> +Content-Length: 1194 +X-UID: 1232 + +Pythonistas-- + +Chad McDaniel wrote: +> +> Martijn Faassen writes: +> +> > David Steuber wrote: +> > > +> > > Er, uh, hmm. +> > > +> > > I wrote my first Python program today. It took longer than I +> > > expected. Who would have guessed that you couldn't give a file object +> > > the name 'in'? Or at least that was one of the weirder obstacles. +> > +> > It's not that weird as 'in' is a reserved keyword in Python. :) +> > +> > for i in whatever: +> > print "See?" +> > +> +> It seems that Python could have mentioned that to the user. +> +> -- +> -chad + + http://www.python.org/doc/ref/keywords.html + +The interpreter also states, in response to an attempt to assign a +number to a variable named `in', that such usage is a Syntax Error. + +It could be changed to ``Fruitless attempt to assign to keyword Error,'' +I suppose. + +-ly y'rs, +Ivan =:o +---------------------------------------------- +Ivan Van Laningham +Callware Technologies, Inc. +ivanlan at callware.com +http://www.pauahtun.org +See also: +http://www.foretec.com/python/workshops/1998-11/proceedings.html +Army Signal Corps: Cu Chi, Class of '70 +---------------------------------------------- + + + + diff --git a/demo/ermis-f/python_m/cur/1233 b/demo/ermis-f/python_m/cur/1233 new file mode 100644 index 00000000..30c5d94c --- /dev/null +++ b/demo/ermis-f/python_m/cur/1233 @@ -0,0 +1,78 @@ +From: aaron_watters at my-dejanews.com (aaron_watters at my-dejanews.com) +Date: Mon, 12 Apr 1999 12:42:05 GMT +Subject: GadFly - MemoryError +References: <7eih6b$ck2$1@nnrp1.dejanews.com> +Message-ID: <7espms$idh$1@nnrp1.dejanews.com> +Content-Length: 2202 +X-UID: 1233 + +In article , + phd at sun.med.ru wrote: +> I started playing with GadFly a few weeks ago, so I downloaded latest +> versions of GadFly and kjBuckets. +> Yesterday I found a way to use kjSet in my program. +> +> BTW, what are "kw" in "kwParsing" and "kj" in "kjBuckets"? + +That's for me to know and you to guess. + +BTW, I ran the following benchmark on my workstation, emulating +your query with artificial data: + +===snip +fanout = 5 +length = 3000 + +# create a table for self-join test +import gadfly +g = gadfly.gadfly() +g.startup("jtest", "dbtest") # dir ./dbtest should exist +c = g.cursor() +print "making table" +c.execute("create table test (a integer, b integer)") +def mapper(i): return (i, i/fanout) +data = map(mapper, range(length)) +c.execute("insert into test(a,b) values (?,?)", data) + +# do a self join with fanout +from time import time +print "doing query" +now = time() +c.execute("select * from test x, test y where x.b=y.b and x.atestjoin.py +making table +doing query +elapsed 2.39299988747 +6000 results generated from initial 3000 + +This is actually reasonably fast, I think. Adding an index didn't +make that much of a difference because the join algorithm actually +builds an index on the fly without one for this particular query. +The optimized join builds an intermediate table of size +15000 before eliminating most of the intermediate entries with the +x.a + <7ear25$ksf$1@news-sj-3.cisco.com> + <14089.11820.416453.80124@bitdiddle.cnri.reston.va.us> + <3709C8BE.4257C9F1@lemburg.com> <14090.16807.950025.496495@bitdiddle.cnri.reston.va.us> +Message-ID: <370A78B6.2C18D10F@lockstar.com> +Content-Length: 1097 +X-UID: 1234 + +Jeremy Hylton wrote: +> +> >>>>> "MAL" == M -A Lemburg writes: + +[SNIP] + +> MAL> Note that I have a project running with the intention to wrap +> MAL> OpenSSL in an OO manner called mxCrypto (see the link below). +> +> Looking forward to seeing it. When do you think you might have an +> alpha release ready? +> +> Jeremy + +I have a fairly complete SWIGing of OpenSSL/SSleay working. I made it on +company time, so I have to get company permission to release it. If there is +real interest, I'll push for us to release it. It does all the X.509 stuff, is +very OO, and builds on win32 and unices. +Interested? +Mordy + +-- +o Mordy Ovits +o Cryptographic Engineer +o LockStar Inc. +--------------------------------------------------------------------------- +#!/usr/local/bin/python +from sys import*;from string import*;a=argv;[s,p,q]=filter(lambda x:x[:1]!= +'-',a);d='-d'in a;e,n=atol(p,16),atol(q,16);l=(len(q)+1)/2;o,inb=l-d,l-1+d +while s:s=stdin.read(inb);s and map(stdout.write,map(lambda i,b=pow(reduce( +lambda x,y:(x<<8L)+y,map(ord,s)),e,n):chr(b>>8*i&255),range(o-1,-1,-1))) + + + + diff --git a/demo/ermis-f/python_m/cur/1235 b/demo/ermis-f/python_m/cur/1235 new file mode 100644 index 00000000..c4e9600f --- /dev/null +++ b/demo/ermis-f/python_m/cur/1235 @@ -0,0 +1,63 @@ +From: andrew-johnson at home.com (Andrew Johnson) +Date: Sun, 25 Apr 1999 21:19:13 GMT +Subject: converting perl to python - simple questions. +References: <7fvagp$8lm$1@nnrp1.dejanews.com> +Message-ID: +Content-Length: 1680 +X-UID: 1235 + +In article , + Florian Weimer wrote: +! sweeting at neuronet.com.my writes: +! +! > a) Perl's "defined". +! > [perl] +! > if (defined($x{$token}) +! > +! > [python] +! > if (x.has_key(token) and x[token]!=None) : +! +! Depending on the code, you can omit the comparision to `None'. Perl +! programmers traditionally uses `defined' to test if a key is in a hash, +! so your code is the correct translation if you mimic Perl's undefined +! value with Python's `None', but most of the time, this is not required. + +Just a point of clarification: Actually, perl programmer's +traditionally use 'exists' to test if a key is in a hash ... using +'defined' to test for key existence is a mistake---'defined' will +only tell you if that key exists and has a defined value associated +with it: Witness the defined test on key2 in the following: + +#!/usr/bin/perl -w +use strict; +my %hash = ( key1 => 0, + key2 => undef, + key3 => 1 + ); +print "key1 exists\n" if exists $hash{key1}; +print "key1 has defined value\n" if defined $hash{key1}; +print "key1 has true value\n" if $hash{key1}; + +print "key2 exists\n" if exists $hash{key2}; +print "key2 has defined value\n" if defined $hash{key2}; +print "key2 has true value\n" if $hash{key2}; + +print "key3 exists\n" if exists $hash{key3}; +print "key3 has defined value\n" if defined $hash{key3}; +print "key3 has true value\n" if $hash{key3}; +__END__ + +which prints: +key1 exists +key1 has defined value +key2 exists +key3 exists +key3 has defined value +key3 has true value + +regards +andrew + + + + diff --git a/demo/ermis-f/python_m/cur/1236 b/demo/ermis-f/python_m/cur/1236 new file mode 100644 index 00000000..371a74a9 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1236 @@ -0,0 +1,28 @@ +From: scott at igc.apc.org (Scott Weikart) +Date: Sat, 3 Apr 1999 07:29:50 GMT +Subject: fix for posix_fsync under SunOS 4.1.x +Message-ID: <199904030729.XAA24695@igce.igc.org> +X-UID: 1236 + +Here's a patch to make sure that posix_fsync will compile on all operating +systems (specifically needed for SunOS 4.1.x). + +This unified diff was made against Python 1.5.2 beta 2 . + +-scott + +--- Modules/posixmodule.c~ Tue Feb 16 11:38:04 1999 ++++ Modules/posixmodule.c Fri Apr 2 22:18:03 1999 +@@ -647,6 +647,8 @@ + "fsync(fildes) -> None\n\ + force write of file with filedescriptor to disk."; + ++extern int fsync(int); /* Prototype just in case */ ++ + static PyObject * + posix_fsync(self, args) + PyObject *self; + + + + diff --git a/demo/ermis-f/python_m/cur/1237 b/demo/ermis-f/python_m/cur/1237 new file mode 100644 index 00000000..eb33e9a0 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1237 @@ -0,0 +1,49 @@ +From: markus_kohler at hp.com (Markus Kohler) +Date: 29 Apr 1999 10:13:46 +0200 +Subject: Python IS slow ! [was] Re: Python too slow for real world +References: <613145F79272D211914B0020AFF6401914DAD8@gandalf.digicool.com> <37272CA0.3F3F02A2@prescod.net> +Message-ID: +Content-Length: 1707 +X-UID: 1237 + +>>>>> "Paul" == Paul Prescod writes: + + Paul> Markus Kohler wrote: + >> + >> + >> You are right that one should choose the right tool for a + >> problem, but I disagree that Python is optimized for the + >> general case. Squeak a free Smalltalk implementation + >> (www.squeak.org), is already much faster ( about 3 times + >> actually ) than python and it has even a true Garbage + >> Collector. + + Paul> This is a little off-topic but I'm curious whether squeak + Paul> has an embedding API. Is there any languge that is as easy + Paul> to embed as Python, and also has full garbage collection? + +No really off-topic, because not using a GC makes embedding much easier, because +objects do not move around. Squeak has 'plugins' but these are not yet good +enough to allow embedding of arbitrary C code. The main problem is of course +that some C code cannot use Squeak allocated objects because the address of the object +may change because of garbage collection. Also Squeak currently lacks an easy general +mechanism to callback Squeak code from C. + +In summary one can say that with a decent GC (generational copying + mark and sweep) +embedding is more diffcult. Anyway I think a fairly simple embedding API with could +be done, it's just more work to do once. +Visualworks a commercial Smalltalk implementation shows it's possible to do it. +They also have a COM integration for example. + +I don't know of any other language with a decent garbage that is easy to embed. + +Maybe SmallEiffel does it. I is a free Eiffel compiler that translates to C has an (optional) GC +and allows to call C code. + +Markus +-- +Markus Kohler mailto:markus_kohler at hp.com + + + + diff --git a/demo/ermis-f/python_m/cur/1238 b/demo/ermis-f/python_m/cur/1238 new file mode 100644 index 00000000..81515384 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1238 @@ -0,0 +1,23 @@ +From: jeremy at cnri.reston.va.us (Jeremy Hylton) +Date: Tue, 13 Apr 1999 11:20:58 -0400 (EDT) +Subject: bug in PyGreSQL module +Message-ID: <14099.24295.229214.504295@bitdiddle.cnri.reston.va.us> +X-UID: 1238 + +I found an apparent bug in the Python interface to PostgreSQL. I +tried sending a query to the author but haven't heard back, so I'm +looking for other users to see if they have run into the problem. +I have a table with lots of int fields, some of which of NULL. When I +do a Python query, the PyGreSQL module converts the NULL to 0 instead +of None, which is the value I expected. Is that a reasonable +expectation? + +The PyGreSQL module doesn't implement the DB API, but I checked there +anyway. Alas, it didn't say anything about how to handle NULL. + +Jeremy + + + + + diff --git a/demo/ermis-f/python_m/cur/1239 b/demo/ermis-f/python_m/cur/1239 new file mode 100644 index 00000000..4d2e817b --- /dev/null +++ b/demo/ermis-f/python_m/cur/1239 @@ -0,0 +1,25 @@ +From: vincem at en.com (Vincent Marchetti) +Date: 19 Apr 99 05:49:32 -0400 +Subject: How to decode AppleEvent return values +Message-ID: +X-UID: 1239 + +I am using the aetools.TalkTo class and methods generated by +gensuitemodule.py to send AppleEvents to an app (In this case, +CodeWarrior). Some scripting calls to CodeWarrior + return a class defined by the application, +[e.g. the type 'Segment' from CodeWarrior AppleScript dictionary] +which is returned by aepack.unpack as a type 'Unknown'. Is there +a way to decode the data attribute of the Unknown class returned by Python +or do I need to write my own functions to do this? + +Thanks, + +Vincent Marchetti +vincem at en.com + + + + + + diff --git a/demo/ermis-f/python_m/cur/1240 b/demo/ermis-f/python_m/cur/1240 new file mode 100644 index 00000000..e0caaecc --- /dev/null +++ b/demo/ermis-f/python_m/cur/1240 @@ -0,0 +1,41 @@ +From: aa8vb at vislab.epa.gov (Randall Hopper) +Date: Mon, 19 Apr 1999 14:38:00 GMT +Subject: Tkinter - the app that wouldn't quit +In-Reply-To: <14107.14469.908426.160852@octopus.chem.uu.nl>; from Rob Hooft on Mon, Apr 19, 1999 at 04:07:01PM +0200 +References: <19990416144831.A1548022@vislab.epa.gov> <19990419095013.A62714@vislab.epa.gov> <14107.14469.908426.160852@octopus.chem.uu.nl> +Message-ID: <19990419103800.A63906@vislab.epa.gov> +Content-Length: 1089 +X-UID: 1240 + +Rob Hooft: + |>>>>> "RH" == Randall Hopper writes: + | + | RH> Do I need to add special testing-harness hooks into the dialog + | RH> class, or is there a general way to determine when a dialog + | RH> destroys/unmaps itself from outside of the dialog code? + | + |Using Tkinter, you can "wait" for a few specific events. + | + |"w.wait_window()" will wait for w to be destroyed. But even then, a + |destroyed window can not be reused! + +Ahh, perfect. Just what I was looking for. + + |I come back to my advertisement: in the *Dialog() classes in the Pmw + |framework this has all been programmed (using a wait_variable in that + |case); there is no real reason except "the fun of it" to reinvent this + |wheel... + +Well, there's another reason. I'm at the getting-up-to-speed stage with +Python and Tkinter, and I want to understand the fundamentals before I go +layering other libraries on top. + +But thanks for the pointer. I'd found Pmw before and do plan to use it in +my next project. It looks like it can save me a good bit of time for the +off-canvas portions. + +Randall + + + + diff --git a/demo/ermis-f/python_m/cur/1241 b/demo/ermis-f/python_m/cur/1241 new file mode 100644 index 00000000..a903e6ba --- /dev/null +++ b/demo/ermis-f/python_m/cur/1241 @@ -0,0 +1,39 @@ +From: ajung at sz-sb.de (Andreas Jung) +Date: Sun, 18 Apr 1999 11:53:06 GMT +Subject: re.sub() loops +In-Reply-To: ; from Aahz Maruch on Sat, Apr 17, 1999 at 02:35:48PM +0000 +References: +Message-ID: <19990418135305.A20347@sz-sb.de> +Content-Length: 1028 +X-UID: 1241 + +On Sat, Apr 17, 1999 at 02:35:48PM +0000, Aahz Maruch wrote: +> In article , +> Andreas Jung wrote: +> > +> >I am trying to do some lame HTML processing with some +> >HTML. The following lines tries to remove some +> >unneccessary code from a HTML file. However python hangs +> >in this call: +> > +> >data = re.sub('','',data) +> +> Does the ...
contain *all* the strings "es", "da", "en", +> "fi", and "sv"? Or are the strings supposed to be "?es" and so on? In +> any event, with six ".*" patterns in there, you've got exponential +> processing time, even if it's not hanging. + +The strings are all contained within the TABLE section. I used +".*?" to get the smallest match because there are several +TABLE sections in the HTML document. You're right - re did not +hang - after about 5 minutes a got a reply :) However meanwhile +I got another working solution for the problem. + +Thanks, +Andreas + + + + + + diff --git a/demo/ermis-f/python_m/cur/1242 b/demo/ermis-f/python_m/cur/1242 new file mode 100644 index 00000000..dedcaf55 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1242 @@ -0,0 +1,29 @@ +From: petrilli at trump.amber.org (Christopher Petrilli) +Date: 21 Apr 1999 18:35:25 PDT +Subject: How many of us are there? +References: <371E2648.DED123AE@callware.com> +Message-ID: <7fluct$73g@chronicle.concentric.net> +X-UID: 1242 + +Steven D. Majewski wrote: + +> "How many of us are there?" + +> Do you mean counting the elevator boy ? +> Is he part of your family ? + +We are four. +But of course there's your family. +But they're not traveling with me. +Where? + +:-) + +Chris +-- +| Christopher Petrilli ``Television is bubble-gum for +| petrilli at amber.org the mind.''-Frank Lloyd Wright + + + + diff --git a/demo/ermis-f/python_m/cur/1243 b/demo/ermis-f/python_m/cur/1243 new file mode 100644 index 00000000..5a79740e --- /dev/null +++ b/demo/ermis-f/python_m/cur/1243 @@ -0,0 +1,47 @@ +From: phd at sun.med.ru (Oleg Broytmann) +Date: Mon, 5 Apr 1999 15:43:26 GMT +Subject: Subattributes of classes +In-Reply-To: <19990405104408.A807008@vislab.epa.gov> +References: <19990405104408.A807008@vislab.epa.gov> +Message-ID: +X-UID: 1243 + +On Mon, 5 Apr 1999, Randall Hopper wrote: +> class A: +> def __init__( self ): +> self.attr = 123 +> self.attr.subattr = 456 # <--------- Error! +> +> a = A() +> +> +> This generates an error as I would have expected. +[skipped] +> Why? + + Try this: + + class B: + pass + + class A: + def __init__( self ): + self.attr = B() + self.attr.subattr = 456 + + a = A() + +> Randall +> +> +> + +Oleg. +---- + Oleg Broytmann National Research Surgery Centre http://sun.med.ru/~phd/ + Programmers don't die, they just GOSUB without RETURN. + + + + + diff --git a/demo/ermis-f/python_m/cur/1244 b/demo/ermis-f/python_m/cur/1244 new file mode 100644 index 00000000..27dc0ab4 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1244 @@ -0,0 +1,32 @@ +From: barmar at bbnplanet.com (Barry Margolin) +Date: 22 Apr 1999 18:51:01 GMT +Subject: The Future of Tk? +References: <371E964F.C531C2A@istar.ca> <371F11C2.3162025@ciril.fr> <4fv$ECA+JyH3EwbN@jessikat.demon.co.uk> +Message-ID: <7fnr2l$mrt$26@newsread.f.de.uu.net> +Content-Length: 1097 +X-UID: 1244 + +In article <4fv$ECA+JyH3EwbN at jessikat.demon.co.uk>, +Robin Becker wrote: +>I take this completely differently; least astonishment for me is if +>program X looks and behaves the same way no matter what keyboard, mouse +>and screen I'm using. As a 'user' of the program X it shouldn't matter +>what OS/WM is executing the code. I certainly don't want vi or emacs to +>be different on the mac why should I treat word or excel differently? + +I would be very surprised if Netscape on the Macintosh presented a +Windows-like user interface, rather than adopting the standard Macintosh +user interface. Most end users don't switch between platforms much, so +it's more important that all the programs on their system conform to their +expectations, than that a particular program work the same across different +platforms. + +-- +Barry Margolin, barmar at bbnplanet.com +GTE Internetworking, Powered by BBN, Burlington, MA +*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups. +Please DON'T copy followups to me -- I'll assume it wasn't posted to the group. + + + + diff --git a/demo/ermis-f/python_m/cur/1245 b/demo/ermis-f/python_m/cur/1245 new file mode 100644 index 00000000..7cbcc53c --- /dev/null +++ b/demo/ermis-f/python_m/cur/1245 @@ -0,0 +1,22 @@ +From: Haimo.Zobernig at cern.ch (Haimo G. Zobernig) +Date: Wed, 28 Apr 1999 15:57:01 +0200 +Subject: 'sourcing' Python scripts? +Message-ID: <372713AD.6ABA444@cern.ch> +X-UID: 1245 + +Dear Python experts, + +this might be a unix rather than a Python problem, but I need to set +environment variables from a Python program *in the parent process* +that is running the Python script ( a la os.environ['BAR'] = 'foo' ). +In other words, I want to achieve the equivalent of 'sourcing' the +Python script. Can this be done? Even better would be a solution that +also works on the various WinAbominations... (well, NT at least) + +Haimo G. Zobernig + +Haimo.Zobernig at cern.ch + + + + diff --git a/demo/ermis-f/python_m/cur/1246 b/demo/ermis-f/python_m/cur/1246 new file mode 100644 index 00000000..97e58cab --- /dev/null +++ b/demo/ermis-f/python_m/cur/1246 @@ -0,0 +1,36 @@ +From: fredrik at pythonware.com (Fredrik Lundh) +Date: Thu, 22 Apr 1999 12:13:39 GMT +Subject: ``if t'' vs ``if t is not None'' +References: <7fn1vb$rbo$1@news.glas.net> +Message-ID: <00e601be8cb9$92a7ee30$f29b12c2@pythonware.com> +X-UID: 1246 + + wrote: +> i faced a VERY strange behaviour of if-test operation! +> +> ``if t'' != ``if t is not None'' +> where ``t'' is None or a class instance +> +> i was writing a threader for a news reader. +> and found occasional hangs of a routine which builds the sequence of message +> numbers for "read next" operation. +> digging deeper brought me strange results: replacing ``if t'' with +> ``if t is not None'' speeded up the things dramatically! + +"if t" evaluates "t" by calling it's __nonzero__ or __len__ methods +(see http://www.python.org/doc/ref/customization.html for +details). + +"if t is not None" compares t's object identity (a pointer) with +the object identity for None (another pointer). + +in other words, using "is" tests are always faster. how much +faster depends on how much work you do in your __len__ +(or __nonzero__) method... + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1247 b/demo/ermis-f/python_m/cur/1247 new file mode 100644 index 00000000..6cbcb370 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1247 @@ -0,0 +1,69 @@ +From: nospam at morhp.dircon.co.uk (Pete Jewell) +Date: Mon, 26 Apr 1999 22:53:01 +0100 +Subject: Project for newbie +References: <70alf7.qc6.ln@loopback> + <14110.12533.232498.655489@amarok.cnri.reston.va.us> + +Message-ID: +Content-Length: 2051 +X-UID: 1247 + +In article , + glenn at gacela.demon.co.uk (Glenn Rogers) writes: +GR> In article <14110.12533.232498.655489 at amarok.cnri.reston.va.us>, +GR> Andrew M. Kuchling wrote: +>>Pete Jewell writes: +>>>I've read my way through the tutorial, and am now stuck - where do I go +>>>from here? I want to learn how to use Python, but don't have any +>>>pressing projects at the moment - can anyone suggest a program I should +>>>have a go at writing, to help me learn the language further? +>> +>> Having third parties provide ideas usually doesn't result in +>>anything interesting. I have a list of projects on my Web page, but +>>they're all extremely unlikely to appeal to anyone who isn't me (and +>>even I'm a bit cool on some of them). +>> +GR> For what it's worth, my first project (5ish months ago) was +GR> an internet-utility type thing: opening/closing connection, +GR> timing the period online, getting a list of mail waiting for me, +GR> telling me when I've stopped getting news etc. +GR> My second one was for work doing the same sort of thing over a +GR> telnet connection. Then several simple text filtering/ +GR> processing utilities, and I'm now doing something that started +GR> life as an addressbook (storing in a database) but has now +GR> got rather more ambitious. +GR> +GR> What did everyone else do? +GR> +GR> + +I'm still at the tiny scripts stage - this is why I like python :-) - + +#!/usr/local/bin/python +# 'sendnntp.py' v0.0.1 +# send the contents of stdin to the nntphost localhost + +from nntplib import * + +server = NNTP('localhost') +messagepipe = open('/dev/stdin','r') +server.post(messagepipe) + +server.quit() + +I'm using this in combination with procmail/formail to gate posts +to a newsgroup via an email address (strictly controlled). Thanks +for the suggestions though :-) + +-- +Pete + +morph at softhome.net +---------------------------------------------------------------- +Linux Registered User # 100652 - Uptime 25 hours, and counting... + +-- If I can't fix it, it's probably a dead norwegian blue. -- + + + + diff --git a/demo/ermis-f/python_m/cur/1248 b/demo/ermis-f/python_m/cur/1248 new file mode 100644 index 00000000..e3564323 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1248 @@ -0,0 +1,252 @@ +From: mwh21 at cam.ac.uk (Michael Hudson) +Date: 30 Apr 1999 16:11:39 +0100 +Subject: Python IS slow ! [was] Re: Python too slow for real world +References: <613145F79272D211914B0020AFF6401914DAD8@gandalf.digicool.com> <7g9qmo$luf$1@news.udel.edu> <372965CA.2B3FD2FE@appliedbiometrics.com> <19990430080805.B776752@vislab.epa.gov> <3729A9F3.75B2692B@appliedbiometrics.com> +Message-ID: +Content-Length: 7498 +X-UID: 1248 + +Christian Tismer writes: + +> Randall Hopper wrote: +> > +> > Christian Tismer: +> > |Terry Reedy wrote: +> > |> A batch-mode optimizer analyzing an entire file (module) should be able to +> > |> detect whether or not function names are rebound. +> > |> +> > |> Perhaps module bindings should be considered immutable from outside the +> > |> module unless explicitly declared otherwise. +> > | +> > |I'm thinking of no new keyword, but a mechanism which allows me to lock a +> > |namespace somehow. +> > +> > I like this idea in concept. Though I would prefer a way to have +> > namespaces "lock by default". Examples: After a class definition, the +> > class function dictionary is locked. After a module is fully read, all +> > references are bound and the module namespace is locked. etc. +> +> Well, I wouldn't do that by default. By default, everything +> could stay as it is. First of all, this would not break any +> existing code. Then, many people will want to +> fine tune their modules, and they are perhaps not done +> after a class definition was ready. +> +> Then, what would you do with classes which depend on each +> other? You cannot lock them immediately, this would fail. +> Locking them after they both are defined is fine, since +> everything is defined then. With minimum effort and no +> language changes, this will be needed. +> +> Then think of all the more difficult systems which need +> more effort to become configured. The xml parsers together +> with SAX are an example. If I wanted to lock this, then +> this must be done with care. One would also not lock the mixin +> classes, but only the final workhorse class, bound with +> the correctly selected parser, and so on. +> +> It might also be necessary to find a way to specify which +> attributes may be locked and which not, since there exist +> indeed cases where Python's super-flexibility is needed :-) +> +> Depending on how exactly will be implemented, a single line +> at the end of a module should suffice to accomplish this stuff +> for the standard cases. Fine adjustment would take a little more. +> As a side effect, locking a module would also find all +> referenced but undefined symbols. +> +> Anyway, this is still no cakewalk and quite a lot of code +> is involved. Needs much more thinking... + +I think I can do this. Not to classes yet, but given a function, I can +make you another function where all the global lookups are bound to +the values found at that moment. + +It's used like this: + +>>> def f(x): +... return x+y +... +>>> import closure +>>> g=closure.bind(f,y=1) +>>> f(1) +Traceback (innermost last): + File "", line 1, in ? + File "", line 2, in f +NameError: y +>>> g(1) +2 + +It's then easy to write a function that binds all the variables found +in the current environment: + +def bind_now(func): + try: + raise "" + except: + import sys + frame=sys.exc_traceback.tb_frame.f_back + l=apply(bind,(func,),frame.f_locals) + g=apply(bind,(l,),frame.f_globals) + return g + +This gets used like so: + +>>> import closure +>>> y=1 +>>> def f(x): +... return x+y +... +>>> f(0) +1 +>>> g=closure.bind_now (f) +>>> y=2 +>>> f(0) +2 +>>> g(0) +1 +>>> + +Is this what you wanted? + +A word of warning: this code is nasty, *nasty*, NASTY. Possibly the +most horrible thing you will see perpetrated in Python this year. It +applies regular expressions to strings of bytecode... + +I made Python core repeatedly when debugging it. + +However, it works. The returned functions are very fast. I wrote this +package because I wanted to avoid both the tackiness of the `default +argument hack' and the performance penalty of using classes to fake +closures. + +As to `sealing' classes in this fashion, I guess it could be +done. You'd need to look for patterns of LOAD_FAST 0 (the first +argument is the zeroth local) followed by LOAD_ATTR. You could then +calculate this and insert a LOAD_CONST instead. The thing is, this +would replace two argumented bytecode with one, changing the length of +the codestring and you'd need to recompute jumps. I haven't had the +bloody-mindedness to get this to work yet. + +Code follows... + +HTH +Michael + +import new,string,re + +def copy_code_with_changes(codeobject, + argcount=None, + nlocals=None, + stacksize=None, + flags=None, + code=None, + consts=None, + names=None, + varnames=None, + filename=None, + name=None, + firstlineno=None, + lnotab=None): + if argcount is None: argcount = codeobject.co_argcount + if nlocals is None: nlocals = codeobject.co_nlocals + if stacksize is None: stacksize = codeobject.co_stacksize + if flags is None: flags = codeobject.co_flags + if code is None: code = codeobject.co_code + if consts is None: consts = codeobject.co_consts + if names is None: names = codeobject.co_names + if varnames is None: varnames = codeobject.co_varnames + if filename is None: filename = codeobject.co_filename + if name is None: name = codeobject.co_name + if firstlineno is None: firstlineno = codeobject.co_firstlineno + if lnotab is None: lnotab = codeobject.co_lnotab + return new.code(argcount, + nlocals, + stacksize, + flags, + code, + consts, + names, + varnames, + filename, + name, + firstlineno, + lnotab) + +def encode_16(n): + return '\\%03o\\%03o'%(n%256,n/256) + +LOAD_CONST=chr(100) +LOAD_GLOBAL=chr(116) + +def munge_code(code,vars): + codestring=code.co_code + names=list(code.co_names) + consts=list(code.co_consts) + for var,value in vars.items(): + try: + index=names.index(var) + except ValueError: + continue + codestring=re.sub(LOAD_GLOBAL+encode_16(index), + LOAD_CONST+encode_16(len(consts)), + codestring) + consts.append(value) + return copy_code_with_changes( + code, + consts=tuple(consts), + code=codestring) + +def bind(func,**vars): + newfunc=new.function( + munge_code(func.func_code,vars), + func.func_globals, + func.func_name) + newfunc.__doc__=func.__doc__ + newfunc.func_defaults=func.func_defaults + newfunc.func_doc=func.func_doc + return newfunc + +def bind_locals(func): + try: + raise "" + except: + import sys + frame=sys.exc_traceback.tb_frame.f_back + l=apply(bind,(func,),frame.f_locals) + frame=None + return l + +def bind_now(func): + try: + raise "" + except: + import sys + frame=sys.exc_traceback.tb_frame.f_back + l=apply(bind,(func,),frame.f_locals) + g=apply(bind,(l,),frame.f_globals) + return g + +## examples + +def make_adder(n): + def adder(x): + return x+n + return bind_locals(adder) + +def make_balance(initial_amount): + def withdraw(amount): + if current[0] +Content-Length: 1096 +X-UID: 1249 + +I want to use httplib through a proxy server and I can't seem to get +it to work. Someone in this group suggested setting an environment +variable, like: + +SET http_proxy="12.189.130.200:80" + +This didn't help. Here is a sample session: + + +Python 1.5.1 (#0, Nov 18 1998, 12:17:58) [MSC 32 bit (Intel)] on win32 +Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam +>>> import httplib +>>> h=httplib.HTTP('www.yahoo.com') + +Traceback (innermost last): File "", line 1, in ? File "C:\PROGRAM +FILES\PYTHON\lib\python1.5\httplib.py", line 51, in __init__ if host: +self.connect(host, port) File "C:\PROGRAM +FILES\PYTHON\lib\python1.5\httplib.py", line 79, in connect +self.sock.connect(host, port) File "", line 1, in connect +socket.error: host not found + +>>> + +For any given test site, I have no problem with a normal web browser, +but I can't get past this error with Python. Am I missing something +obvious? + +Thanks, +- Bruce + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/1250 b/demo/ermis-f/python_m/cur/1250 new file mode 100644 index 00000000..24781803 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1250 @@ -0,0 +1,53 @@ +From: news at dorb.com (Darrell) +Date: Mon, 5 Apr 1999 14:12:04 -0400 +Subject: swig or not to swig ? +References: <4p6O2.1348$8m5.2126@newsr1.twcny.rr.com> +Message-ID: +Content-Length: 1304 +X-UID: 1250 + +As is always the case I found the dl module right after making this post. +import imp exposes load_dynamic + +It doesn't look like a general purpose shared lib interface. +So now I'm looking at bgen in the tools directory. + +Here's a doc string from there. +"""\ + +Tools for scanning header files in search of function prototypes. + +Often, the function prototypes in header files contain enough information +to automatically generate (or reverse-engineer) interface specifications +from them. The conventions used are very vendor specific, but once you've +figured out what they are they are often a great help, and it sure beats +manually entering the interface specifications. (These are needed to +generate +the glue used to access the functions from Python.) + +In order to make this class useful, almost every component can be +overridden. +The defaults are (currently) tuned to scanning Apple Macintosh header files, +although most Mac specific details are contained in header-specific +subclasses. +""" + + +Darrell wrote in message +news:4p6O2.1348$8m5.2126 at newsr1.twcny.rr.com... +> Coding a 'C' interface to python seems straight forward. Is swig worth the +> trouble ? +> +> I want to access some shared libs. I tried the dl module which isn't +obvious +> how it works. import dl fails. +> +> +> +> + + + + + + diff --git a/demo/ermis-f/python_m/cur/1251 b/demo/ermis-f/python_m/cur/1251 new file mode 100644 index 00000000..7fcbd3cb --- /dev/null +++ b/demo/ermis-f/python_m/cur/1251 @@ -0,0 +1,94 @@ +From: brunomadv at ciudad.com.ar (Bruno Mattarollo) +Date: Wed, 21 Apr 1999 14:29:05 GMT +Subject: permissions on win32 [Q] +In-Reply-To: <7fk8r0$7ng$1@m2.c2.telstra-mm.net.au> +References: <7fk8r0$7ng$1@m2.c2.telstra-mm.net.au> +Message-ID: <002401be8c03$4f21d380$6eba0ac8@kuarajy.infosys.com.ar> +Content-Length: 2488 +X-UID: 1251 + +Thanks Mark... + + All this is supposed to run on sunday and it's Mission Critical, so I +presume wiill be doing it by hand, but anyway thanks. I am looking forward +to be able to do this on NT... :-) + + FYI we will be running another mission critical process on Sunday and it +will be a small Python app that will run on NT ... I love Python ... :-) + + Cheers, + +/B + +Bruno Mattarollo +... proud to be a PSA member + +> -----Original Message----- +> From: python-list-request at cwi.nl [mailto:python-list-request at cwi.nl]On +> Behalf Of Mark Hammond +> Sent: Wednesday, April 21, 1999 7:22 AM +> To: python-list at cwi.nl +> Subject: Re: permissions on win32 [Q] +> +> +> NT security is a bit of a black art. Build 124 has +> win32security.SetFileSecurity(). +> +> The next question will be how to create a security descriptor - +> here is some +> sample code. +> +> [Oh damn - just realised that pywintypes.SECURITY_DESCRIPTOR() doesnt +> actually exist in 124 - it will in 125. sorry - you will +> probably get stuck +> here... But Ill still post it as reference for build 125 and later] +> +> Mark. +> +> def CreateSD(userName): +> sd = pywintypes.SECURITY_DESCRIPTOR() +> +> sidUser = win32security.LookupAccountName(None,userName)[0] +> sidCreator = pywintypes.SID() +> sidCreator.Initialize(ntsecuritycon.SECURITY_CREATOR_SID_AUTHORITY,1) +> sidCreator.SetSubAuthority(0, ntsecuritycon.SECURITY_CREATOR_OWNER_RID) +> +> acl = pywintypes.ACL() +> acl.AddAccessAllowedAce(win32file.FILE_ALL_ACCESS, sidUser) +> acl.AddAccessAllowedAce(win32file.FILE_ALL_ACCESS, sidCreator) +> +> sd.SetSecurityDescriptorDacl(1, acl, 0) +> return sd +> +> Bruno Mattarollo wrote in message +> <001201be8ba6$f2f706e0$6eba0ac8 at kuarajy.infosys.com.ar>... +> >Hi! +> > +> > I have to do a little script for a customer that will copy files from an +> NT +> >server to another. I need to change the permissions on those files and +> >directories. I mean, I need to give privileges to groups like +> >Administrators, the user that owns the files (changes from file to file) +> and +> >other special groups. Anyone knows how to do this with Python? +> We have the +> >following env: NT4SP4, Python 1.5.1, Win32All 124 ... the lastest one. I +> >have already done the script that copies the files, I just need +> to know how +> >to set this permissions. +> > +> > TIA +> > +> >/B +> > +> >Bruno Mattarollo +> >... proud to be a PSA member +> > +> +> +> + + + + + diff --git a/demo/ermis-f/python_m/cur/1252 b/demo/ermis-f/python_m/cur/1252 new file mode 100644 index 00000000..41a471b6 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1252 @@ -0,0 +1,58 @@ +From: fatjim at home.com (Jim Meier) +Date: Mon, 12 Apr 1999 15:59:05 GMT +Subject: ConfigParser module and alternatives (flad, flan) +References: <19990331160323.21601.00000471@ng-fi1.aol.com> <7du3ab$3ag@chronicle.concentric.net> +Message-ID: <371219E9.9EA91839@home.com> +Content-Length: 1444 +X-UID: 1252 + + +Mike Orr wrote: + +> I'm not sure if I'll use ConfigParser for the next version. I don't +> really need the sections (multiple files work just fine, using the filename +> for the section name), and I haven't found a use for the the %(other_key)s +> substitutions. On the other hand, it doesn't handle multiple values (the +> same key repeated within a record), which I sometimes need. +> +> Attached is a wrapper class for ConfigParser which supports booleans +> and can also return an entire section as a dictionary (or all the sections +> as nested dictionaries). I find these make it a little more convenient. +> + +Why not simply use a file of python expressions? Like this: + +{'section1': { + 'key1':[1,2,3,'value',['useful','nesting','eh?']], + 'key2':'anotherval' + }, +'section2': { + 'subsection':{ + 'subkey':5 + } + } +} + +I beleive you can even use variable names in such files for application-specified +substitutions, like this: + +(python app defines variable "rootdir") + +{'pathssection': { + 'fontpath': rootdir+'/font/' + } +} + +This introduces some major security problems, and is a little difficult to edit, +but there is very little parsing needed to make it usable. Does anyone know of a +way to limit the damage a user can do to such a file? + +Another idea is to run your config file through a simple macro utility (or do the +macro conversion in python itself) to convert it into python code to eval. + +Jim Meier + + + + + diff --git a/demo/ermis-f/python_m/cur/1253 b/demo/ermis-f/python_m/cur/1253 new file mode 100644 index 00000000..f81f90ac --- /dev/null +++ b/demo/ermis-f/python_m/cur/1253 @@ -0,0 +1,23 @@ +From: just at letterror.com (Just van Rossum) +Date: Fri, 16 Apr 1999 12:35:10 GMT +Subject: binary +In-Reply-To: <37171BD5.87CFA015@efes.net.tr> +References: <37171BD5.87CFA015@efes.net.tr> +Message-ID: +X-UID: 1253 + +At 2:15 PM +0300 4/16/99, Murat Yeneroglu wrote: +>Hi, +>I want to ask that how I can convert a decimal number to binary in +>python ? +>THNX + +Take a look at the "struct" module. + +Just + + + + + + diff --git a/demo/ermis-f/python_m/cur/1254 b/demo/ermis-f/python_m/cur/1254 new file mode 100644 index 00000000..9a22dfdc --- /dev/null +++ b/demo/ermis-f/python_m/cur/1254 @@ -0,0 +1,26 @@ +From: claird at Starbase.NeoSoft.COM (Cameron Laird) +Date: 5 Apr 1999 22:06:09 -0500 +Subject: SNMPy update +References: <7e1hiq$a71$1@Starbase.NeoSoft.COM> <7ear25$ksf$1@news-sj-3.cisco.com> <14089.11820.416453.80124@bitdiddle.cnri.reston.va.us> +Message-ID: <7ebtn1$dq$1@Starbase.NeoSoft.COM> +X-UID: 1254 + +In article <14089.11820.416453.80124 at bitdiddle.cnri.reston.va.us>, +Jeremy Hylton wrote: + . + . + . +>encode/decode and on how to build a backend for SNACC. (A free-ish +>ASN.1 compiler; the only one?) + +Hardly. There are several ASN.1 compilers. MAVROS is +another. I know of none that's achieved SNACC's portability. +-- + +Cameron Laird http://starbase.neosoft.com/~claird/home.html +claird at NeoSoft.com +1 281 996 8546 FAX + + + + diff --git a/demo/ermis-f/python_m/cur/1255 b/demo/ermis-f/python_m/cur/1255 new file mode 100644 index 00000000..c4af864d --- /dev/null +++ b/demo/ermis-f/python_m/cur/1255 @@ -0,0 +1,21 @@ +From: kuncej at mail.conservation.state.mo.us (Jeffrey Kunce) +Date: Tue, 27 Apr 1999 15:24:01 GMT +Subject: python and SOCKS firewall +Message-ID: +X-UID: 1255 + +I just found a way to get python on a Windows machine to talk through a SOCKS firewall. + +There is a program called SocksCap (http://www.socks.nec.com/sockscap.html) that "socksifies" windows TCP and UDP applications. You launch the tcp app with SocksCap, and SocksCap intercepts tcp and udp calls, and redirects them through the socks server. + +As far as I can tell, python launched with SocksCap is talking fine through the socks firewall at my location. + + --Jeff + +PS SocksCap is free for non-commercial and internal-business use. + + + + + + diff --git a/demo/ermis-f/python_m/cur/1256 b/demo/ermis-f/python_m/cur/1256 new file mode 100644 index 00000000..7558fe88 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1256 @@ -0,0 +1,39 @@ +From: wtanksle at dolphin.openprojects.net (William Tanksley) +Date: Thu, 29 Apr 1999 23:22:51 GMT +Subject: Errors +References: <3728CD26.907ED9A1@geocities.com> +Message-ID: +X-UID: 1256 + +On Thu, 29 Apr 1999 21:16:50 GMT, smoothasice at geocities.com wrote: +>Ok I have been using python and I have noticed that the errors aren't +>truly helpful.. I don't know if I just didn't learn this properly but I +>dont' know why this generates an error: + +The errors could certainly be improved, couldn't they? + +>for word in All_Words: +> z = 0 +> while z < len(word): +> if z == 0: +> tally = tally + alpha.index(word[z]) +> else: +> tally = tally + (alpha.index(word[z]) * 26) + +>It gives me this: NameError: tally +>and I don't know why...... + +This one's not too hard -- look at 'tally'. What is its starting value? +You're trying to use a variable which has no value. Try setting it to +zero somewhere. + +>Anton + +-- +-William "Billy" Tanksley +"But you shall not escape my iambics." + -- Gaius Valerius Catullus + + + + diff --git a/demo/ermis-f/python_m/cur/1257 b/demo/ermis-f/python_m/cur/1257 new file mode 100644 index 00000000..5f62c03b --- /dev/null +++ b/demo/ermis-f/python_m/cur/1257 @@ -0,0 +1,34 @@ +From: neilh at fast.fujitsu.com.au (Neil Hodgson) +Date: Mon, 12 Apr 1999 19:11:18 +1000 +Subject: OrderedDict.py +References: +Message-ID: <3711B8B6.9F0D55C7@fast.fujitsu.com.au> +X-UID: 1257 + +evil Japh (or possibly his good twin Jeff Pinyan) wrote: + +> Is there a need for a module which allows for ordered processing of an +> dictionary? + + I think there is a need for this. There is a bit of code I wrote for +PythonWin where some values are displayed in a UI and then read back in +after user modification. It did not matter what order the dictionary was +displayed in so long as it could be read back in in the same order to +match up. Nothing in the documentation specifies that asking for the +elements (or keys) of a dictionary returns elements (or keys) in the +same order each time, even if no modifications are done to the +dictionary between accesses. Therefore, each time the dictionary was +used, there was a sequence like: + + sortedkeys = formats.keys() + sortedkeys.sort() + for f in sortedkeys: + + Your module may have made this code easier and also clearer. + + Neil Hodgson + Fujitsu Australia Software Technology + + + + diff --git a/demo/ermis-f/python_m/cur/1258 b/demo/ermis-f/python_m/cur/1258 new file mode 100644 index 00000000..6c2c7cbe --- /dev/null +++ b/demo/ermis-f/python_m/cur/1258 @@ -0,0 +1,22 @@ +From: lutz at rmi.net (Mark Lutz) +Date: Fri, 30 Apr 1999 15:15:29 -0600 (MDT) +Subject: Rat sited on Amazon +Message-ID: <199904302115.PAA03581@shell.rmi.net> +X-UID: 1258 + +Jeff Bauer wrote (about Learning Python): +> Hey everyone.? Check out what's featured on Amazon today +> under "Computers and Internet". + +It gets a little better: the book (and Python) +made amazon.com's home page today. It showed +up in a paragraph titled "Mighty Python", along +with Sarah McLachlan's new CD. + +Cheers, + +--Mark Lutz (http://rmi.net/~lutz) + + + + diff --git a/demo/ermis-f/python_m/cur/1259 b/demo/ermis-f/python_m/cur/1259 new file mode 100644 index 00000000..f6dce06e --- /dev/null +++ b/demo/ermis-f/python_m/cur/1259 @@ -0,0 +1,23 @@ +From: claird at Starbase.NeoSoft.COM (Cameron Laird) +Date: 26 Apr 1999 04:05:21 -0500 +Subject: GUI other than Tkinter +References: <3721567f.1748033@news> +Message-ID: <7g1a8h$fae$1@Starbase.NeoSoft.COM> +X-UID: 1259 + +In article <3721567f.1748033 at news>, wrote: +>Well, I've just about given up on EVER getting Tkinter to work on my +>Win98 machine. Is there any other GUI module that I can get that +>doesn't require TCL/TK to be installed on my machine? Isn't there + . + . + . + +-- + +Cameron Laird http://starbase.neosoft.com/~claird/home.html +claird at NeoSoft.com +1 281 996 8546 FAX + + + + diff --git a/demo/ermis-f/python_m/cur/1260 b/demo/ermis-f/python_m/cur/1260 new file mode 100644 index 00000000..22211e62 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1260 @@ -0,0 +1,47 @@ +From: mal at lemburg.com (M.-A. Lemburg) +Date: Wed, 7 Apr 1999 23:04:46 GMT +Subject: OpenSSL/X.509 +References: <7e1hiq$a71$1@Starbase.NeoSoft.COM> + <7ear25$ksf$1@news-sj-3.cisco.com> + <14089.11820.416453.80124@bitdiddle.cnri.reston.va.us> + <3709C8BE.4257C9F1@lemburg.com> <14090.16807.950025.496495@bitdiddle.cnri.reston.va.us> <370A78B6.2C18D10F@lockstar.com> +Message-ID: <370BE48E.2BA9750C@lemburg.com> +Content-Length: 1124 +X-UID: 1260 + +Mordy Ovits wrote: +> +> Jeremy Hylton wrote: +> > +> > >>>>> "MAL" == M -A Lemburg writes: +> +> [SNIP] +> +> > MAL> Note that I have a project running with the intention to wrap +> > MAL> OpenSSL in an OO manner called mxCrypto (see the link below). +> > +> > Looking forward to seeing it. When do you think you might have an +> > alpha release ready? +> > +> > Jeremy +> +> I have a fairly complete SWIGing of OpenSSL/SSleay working. I made it on +> company time, so I have to get company permission to release it. If there is +> real interest, I'll push for us to release it. It does all the X.509 stuff, is +> very OO, and builds on win32 and unices. +> Interested? + +Sure, but if your company is US based, then chances are high +you won't be able to share the code outside the US... that's +why I started mxCrypto, BTW. + +-- +Marc-Andre Lemburg Y2000: 268 days left +--------------------------------------------------------------------- + : Python Pages >>> http://starship.skyport.net/~lemburg/ : + --------------------------------------------------------- + + + + + diff --git a/demo/ermis-f/python_m/cur/1261 b/demo/ermis-f/python_m/cur/1261 new file mode 100644 index 00000000..e8f23228 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1261 @@ -0,0 +1,34 @@ +From: jbauer at rubic.com (Jeff Bauer) +Date: Mon, 26 Apr 1999 12:44:28 GMT +Subject: precompiled MySQL.pyd anyone ? (NT workstation) +References: <7fsu50$bss$1@nnrp1.dejanews.com> <372413EE.A2DE88C8@esoc.esa.de> +Message-ID: <37245FAC.8A4719C6@rubic.com> +X-UID: 1261 + +Nigel Head wrote: +> I too have moved away from MySQL at the moment +> so I don't have any newer version than Jeff. In +> fact, Jeff probably has the only version as I seem +> to have misplaced my copies :-( + +True confession time. I have MySQL.pyd and libmySQL.dll +compiled -- based on Nigel's code -- but I haven't used +them much. They appear to work, however. Other people +have reported success. + +I've placed both binaries on the starship: + + ftp://starship.python.net/pub/crew/jbauer/MySQL.pyd + ftp://starship.python.net/pub/crew/jbauer/libmySQL.dll + +If anyone has problems obtaining these via anon ftp, +please contact me or post your queries on this newsgroup. + +Best regards, + +Jeff Bauer +Rubicon, Inc. + + + + diff --git a/demo/ermis-f/python_m/cur/1262 b/demo/ermis-f/python_m/cur/1262 new file mode 100644 index 00000000..0b175fef --- /dev/null +++ b/demo/ermis-f/python_m/cur/1262 @@ -0,0 +1,48 @@ +From: bwizard at bga.com (Purple) +Date: Mon, 26 Apr 1999 01:15:32 GMT +Subject: Handling backspace chars in a string... +References: <37239c48.594910176@news2.bga.com> <000301be8f7e$16b89780$669e2299@tim> +Message-ID: <3723bd8c.603427371@news2.bga.com> +Content-Length: 1333 +X-UID: 1262 + +On Mon, 26 Apr 1999 00:45:32 GMT, "Tim Peters" +wrote: + +>[Purple] +>> I'm in the poistion of having to process strings with arbitrary +>> numbers of backspace and newline characters in them. +> +>Your code doesn't appear to care about newlines one way or t'other. Do you +>? + +I didn't post the code for that bit as it seems easy enough to take +care of processing those with something like +map(string.strip,string.split(stringWithNewlines,"\n") + +Unless there's a better way to do that too? :) + +>> The backspaces actually get put in the string, so I have to handle +>> removing the characters that are backspaced over. +>> ... [rather sprawling string + indexing code] ... +>> This just looked rather messy to me -- I was curious if anyone know a +>> better way? +> +>Assuming "better" means "less messy" here, lists support appending and +>deleting quite naturally and efficiently; like +> +[code using lists snipped] + +>This essentially treats the input string as a sequence of opcodes for a +>stack machine, where "\b" means "pop" and anything else means "push me!". +> +>don't-use-any-indices-and-you-can't-screw-'em-up-ly y'rs - tim + +I may well go that route... Is it any slower or faster to do this +using lists rather than counting up the backspaces and slicing around +the bits that need to be snipped? + + + + + diff --git a/demo/ermis-f/python_m/cur/1263 b/demo/ermis-f/python_m/cur/1263 new file mode 100644 index 00000000..07555296 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1263 @@ -0,0 +1,31 @@ +From: kmiller at castle.cudenver.edu (N Yocom) +Date: Sun, 11 Apr 1999 01:38:42 -0700 +Subject: Graduate Student Research Survey +Message-ID: <7eqtkq$qpl$1@news.cudenver.edu> +X-UID: 1263 + +Greetings, + +We are a small group of graduate students at the University of Colorado at +Denver who intend to study specific characteristics of online buying +behavior. We have composed a survey to address our questions at +http://www.cudenver.edu/~mparthas/survey.htm. This survey should not take +more than five minutes of your time. You are assured complete +confidentiality. Never will any respondent be identified to any third +parties, nor will you ever be contacted by anyone regarding your input. +Thank you for your time. If you are interested in the results please +mailto: kmiller at castle.cudenver.edu + +Sincerely, + +Karl Miller +Noelle Yocom +Maria Morris +Assaro + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1264 b/demo/ermis-f/python_m/cur/1264 new file mode 100644 index 00000000..bbed501c --- /dev/null +++ b/demo/ermis-f/python_m/cur/1264 @@ -0,0 +1,23 @@ +From: john.michelsen at gte.net (John Michelsen) +Date: Sat, 10 Apr 1999 11:39:13 -0700 +Subject: Multiple Document Interface on Unix, Mac +Message-ID: <7eo48q$2r2$1@news-1.news.gte.net> +X-UID: 1264 + +Hi all, + +I put a Multiple Document Interface script (MDI.py) at +http://www2.zyvex.com/OpenChem/Widgets0.1.zip. +I was wondering if anyone could send me a gif of what it looks like on +Unix or Mac so that I could do some system specific +code for the button icons. + +Thanks, + +John + + + + + + diff --git a/demo/ermis-f/python_m/cur/1265 b/demo/ermis-f/python_m/cur/1265 new file mode 100644 index 00000000..97f1efa8 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1265 @@ -0,0 +1,68 @@ +From: news at dorb.com (Darrell) +Date: Thu, 29 Apr 1999 16:02:25 -0400 +Subject: Read MS Access 97 *.mdb files with python?? +References: <37287369.D6E67313@t-online.de> <3728867D.94B5BBF9@appliedbiometrics.com> <3728A903.CF75B41A@pop.vet.uu.nl> <3728B7DF.80E23481@t-online.de> +Message-ID: +Content-Length: 1653 +X-UID: 1265 + +I'm no expert but... +Put some data base package on your Linux machine that supports ODBC. I would +think that with lots of luck Access running on the Win boxes could connect +to it. + +--Darrell + + +gemodek wrote in message +news:3728B7DF.80E23481 at t-online.de... +> Martijn Faassen wrote: +> > +> > Christian Tismer wrote: +> > > +> > > gemodek wrote: +> > > > +> > > > Does somebody know some +> > > > piece of soft which can this?? +> > > +> ... +> ... +> > +> > Unfortunately, all this advice may be useless, as I noticed that he's +> > the same guy who asked about accessing an Access database on Linux. I +> > know Linux can do ODBC, but I doubt there are Access drivers for ODBC on +> > linux.. +> > +> +> First: Thanks for the fast response :-) +> +> But,.. yes I am the guy who asked about accessing Access database on +> Linux. +> My idea is the following: +> At my company we are running 4 Win95 PC's on a network which works +> sometimes +> and crash sometimes (some days no reboot, some days 5-10 times). +> Now I am tired of the whole Win stuff, and I will install an Linux +> Server +> with Samba. (OK, the clients are still Win95, but at least the server is +> linux). +> We use also a software which is based on Access. The whole database (mdb +> files) will reside on the Linux server. +> So far so good. +> But now, I want to extract some information out of the access database +> to +> create html files which everybody in our company is alowed to view. +> And for this I need "access to Access". +> +> Thats the whole story. I'm searching also for a format description +> of access, but I did not find anything (up to now!). +> +> bye +> +> Stephan + + + + + + diff --git a/demo/ermis-f/python_m/cur/1266 b/demo/ermis-f/python_m/cur/1266 new file mode 100644 index 00000000..358a937f --- /dev/null +++ b/demo/ermis-f/python_m/cur/1266 @@ -0,0 +1,28 @@ +From: janssen at parc.xerox.com (Bill Janssen) +Date: Sat, 17 Apr 1999 01:28:04 GMT +Subject: #!/usr/bin/env python -u +In-Reply-To: <37175574.25EBDDBE@stuco.uni-klu.ac.at> +References: <37175574.25EBDDBE@stuco.uni-klu.ac.at> +Message-ID: +X-UID: 1266 + +Martin, + +I'm not a big fan of the /usr/bin/env approach for Python scripts, +because at PARC many people run without having Python on their paths. +Many, many packages at PARC, including Python and ILU, are installed in +their own directory tree under either /project (/project/ILU/) or +/import (/import/python-1.5/). People enable or disable various +packages depending on what they're up to. + +So I tend to depend on GNU configure when I'm installing a script. I +actually look for Python in the user's environment, then use sed to +hard-code that path into the scripts before installing them. Can this +be done with RPM? + +Bill + + + + + diff --git a/demo/ermis-f/python_m/cur/1267 b/demo/ermis-f/python_m/cur/1267 new file mode 100644 index 00000000..5bd9e5f8 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1267 @@ -0,0 +1,46 @@ +From: ppessi at hut.fi (Pekka Pessi) +Date: 19 Apr 1999 17:34:46 +0300 +Subject: what is reloc error ? +References: <371A1E26.846AF8B6@pk.highway.ne.jp> +Message-ID: +X-UID: 1267 + +Thooney Millennier writes: +>I am now working on building Python interface +>to my C++ matrix library. + +>I have a problem. +>After compiling and when trying to import my +>module +>I get following message. + +> % gcc -c XXXtype.cc + + You are compiling position independent code, so use -fPIC flag. + +> % gcc -c subXXXtype.cc +> ....................... +> % ld -o XXXtype.so -dy -G -g *.o -lstdc++ + + What about gcc -o XXXtype.so *.o -shared -g -lstdc++? + +> % python -c "import XXXtype" +> python: can't handle reloc type +><====this!!! + +>I don't understand why this occurs. +>Please help me! +>(Platform: python 1.5.2, Linux 2.0.34 with gcc.) + + The best way to do compile modules is to write a Setup file and let + Python to create the Makefile by itself. For details, see + Demo/extend in the Python source distribution. + + Pekka + +-- +Pekka.Pessi at hut.fi + + + + diff --git a/demo/ermis-f/python_m/cur/1268 b/demo/ermis-f/python_m/cur/1268 new file mode 100644 index 00000000..002c66df --- /dev/null +++ b/demo/ermis-f/python_m/cur/1268 @@ -0,0 +1,148 @@ +From: tim_one at email.msn.com (Tim Peters) +Date: Sat, 3 Apr 1999 05:29:16 GMT +Subject: string.join() vs % and + operators +In-Reply-To: <37054490.E79ADCC9@easystreet.com> +References: <37054490.E79ADCC9@easystreet.com> +Message-ID: <000001be7d92$ea8da080$879e2299@tim> +Content-Length: 3983 +X-UID: 1268 + +[Al Christians] +> Whereas Python's strings are immutable, there is potentially a strong +> incentive to get them right the first time. + +Not really much more than in a language with mutable strings -- if you +overwrite substrings in one of the latter, it's going to be s-l-o-w when the +length changes. OTOH, if your fields are 50's-style fixed-width , a +Python character array (array.array('c')) makes a fine mutable string. + +> In my applications, I want to create strings that have many fields +> within them. I assume that it would be nice to be able to modify +> the fields without creating a new string any time its contents get +> changed, but I don't think that Python gives any nice way to do this. + +Maybe see above? I'm not sure what you mean. Is there any language that +*does* give you "a nice way to do this", keeping in mind that you're worried +about efficiency too? E.g., use "substr" on the left-hand side of a Perl +string assignment, and under the covers it's going to copy the whole +thing -- even if the length doesn't change: + + $a = "gold you so"; + $b = $a; + substr($a, 0, 1) = "t"; + print "$a\n$b\n"; + +prints + + told you so + gold you so + +You can do better than this in Python as-is, although you need a little more +typing: + + import array + a = array.array('c', "gold you so") + b = a + a[0] = "t" + print a.tostring() + print b.tostring() + +In return for letting you change a[0] in-place, this prints "told you so" +twice. + +> So, I'm stuck with building the string from many little pieces. + +Think of it instead as an opportunity to excel . + +> The 'many' part of this gives me some worry about efficiency, which it +> is better not to worry about, so I did a brief test to see if there is +> ugly downside to this. I ran the following script: + +[tries a long "%s%s%s..." format, string.join, and repeated catenation; + discovers the 2nd is fastest, the first 2nd-fastest, and third much slower +] + +> ... +> Way 3, the way that one would expect to be bad, recreating the string +> with each concatenation, was much slower, but only took about 1 minute. +> Surprisingly swift as well. + +It can be very much worse, of course -- it's a quadratic-time approach, and +you're helped here in that the final length of your string is only a few +hundred characters. + +> Anybody have anything to add to this? + +Maybe the array module; maybe not. + +> Are there any related pitfalls that I may have missed? + +Not if you stick to string.join -- it's reliably good at this. I'll attach +a rewrite of your timing harness that avoids the common Python timing +pitfalls, and adds a fourth method showing that array.tostring() blows +everything else out of the water. But then doing a length-changing slice +assignment to a character array is like doing a length-changing assignment +to a Python list: under the covers, everything "to the right" is shifted +left or right as needed to keep the array contiguous; mutability can be +expensive in under-the-cover ways. + +pay-now-pay-later-or-pay-all-the-time-ly y'rs - tim + +import string +N = 100 +S = [] +for i in range(N): + S.append(`i`) +F = "%s" * N + +# for method 4 (character array) +import array +SARRAY = array.array('c') +for i in S: + SARRAY.fromstring(i) + +# if time.clock has good enough resolution (it does under Windows), +# no point to looping more often than this +indices = range(10000) + +def f1(s=S, f=F): + for i in indices: + z = f % tuple(s) + return z + +def f2(s=S, join=string.join): + for i in indices: + z = join(s, '') + return z + +def f3(s=S): + for i in indices: + z = '' + for j in s: + z = z + j + return z + +def f4(s=SARRAY): + for i in indices: + z = s.tostring() + return z + +def timeit(f): + from time import clock + start = clock() + result = f() + finish = clock() + print f.__name__, round(finish - start, 2) + return result + +z1 = timeit(f1) +z2 = timeit(f2) +z3 = timeit(f3) +z4 = timeit(f4) +assert z1 == z2 == z3 == z4 + + + + + + diff --git a/demo/ermis-f/python_m/cur/1269 b/demo/ermis-f/python_m/cur/1269 new file mode 100644 index 00000000..26a99940 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1269 @@ -0,0 +1,46 @@ +From: mwh21 at cam.ac.uk (Michael Hudson) +Date: 23 Apr 1999 11:03:07 +0100 +Subject: sort of multiple dictonaries +References: <371F28CA.2240BB7B@phoenix-edv.netzservice.de> +Message-ID: +X-UID: 1269 + +Holger Jannsen writes: +> Hi there, +> +> perhaps a typical newbie-question: +> +> I've got a list of dictonaries like that: +> +> mydics=[{'sortit': 'no412', 'mode': 'nothing'}, +> {'sortit': 'no112', 'mode': 'something'}, +> {'sortit': 'no02', 'mode': 'something else'}] +> +> Is there an easy way to get that list sorted like that: +> +> def sortDictonary(aDictonary, theSortKey="sortit"): +> .... +> +> Result have to be: +> +> mydics=[{'sortit': 'no02', 'mode': 'something else'}, +> {'sortit': 'no112', 'mode': 'something'}, +> {'sortit': 'no412', 'mode': 'nothing'}] +> +> Any hints? + +Well, it's actually a list you're sorting isn't it? + +mydics.sort(lambda x,y:cmp(x['sortit'],y['sortit'])) + +should work, if I understand the problem. + +HTH +Michael + +> Ciao, +> Holger + + + + diff --git a/demo/ermis-f/python_m/cur/1270 b/demo/ermis-f/python_m/cur/1270 new file mode 100644 index 00000000..ebc8d4ee --- /dev/null +++ b/demo/ermis-f/python_m/cur/1270 @@ -0,0 +1,24 @@ +From: brunomadv at ciudad.com.ar (Bruno Mattarollo) +Date: Fri, 16 Apr 1999 00:03:22 GMT +Subject: restore sources from PYC [Q] +Message-ID: <000101be879c$8aed0670$6eba0ac8@kuarajy.infosys.com.ar> +X-UID: 1270 + +Hi! + + By mistake I am unable to find the PY files (source) from a project I was +working on. I only have the PYC files... Is there a way to recover the +sources from the PYC? I only need my sources, I don't give a d... for the +comments... + + TIA + +/B + +Bruno Mattarollo +... proud to be a PSA member + + + + + diff --git a/demo/ermis-f/python_m/cur/1271 b/demo/ermis-f/python_m/cur/1271 new file mode 100644 index 00000000..1cd3225f --- /dev/null +++ b/demo/ermis-f/python_m/cur/1271 @@ -0,0 +1,56 @@ +From: robin at jessikat.demon.co.uk (Robin Becker) +Date: Thu, 22 Apr 1999 14:22:06 +0100 +Subject: The Future of Tk? +References: <371E964F.C531C2A@istar.ca> <371F11C2.3162025@ciril.fr> +Message-ID: <4fv$ECA+JyH3EwbN@jessikat.demon.co.uk> +Content-Length: 1892 +X-UID: 1271 + +In article <371F11C2.3162025 at ciril.fr>, Frederic BONNET + writes +>Hi, +> +>Eugene Dragoev wrote: +>[...] +>> But I also found that while older versions of Tk were using lightweight +... +>> Is there going to be any Tk implementation that will continue using +>> lightweight components? +> +>By lightweight I guess you mean emulated in some way. I don't think that +>cross-platform look&feel consistency is a good thing. As a GUI designer +>I'd rather follow the principle of least astonishment: an app running on +>Windows should look and feel like a Windows app. The same app running on +>MacOS and X should do the same on the respective platforms. Such a +>cross-platform application is not supposed to look and feel the same on +>all platforms. If users want to use the same app on several platforms, +... +I take this completely differently; least astonishment for me is if +program X looks and behaves the same way no matter what keyboard, mouse +and screen I'm using. As a 'user' of the program X it shouldn't matter +what OS/WM is executing the code. I certainly don't want vi or emacs to +be different on the mac why should I treat word or excel differently? + +Another reason for having a Tk look and feel is that it allows widget +behaviours different from those allowed by the underlying 'convention'. + +Of course those with an interest in the survival of rigid wm systems +prefer we should adhere to their conventions. The only changes then come +from the suppler of such systems and are introduced to make us by new +versions etc. + +Competition between different WM's is currently almost impossible +because of the original model ie the 'toplevel' is controlled and +decorated by the WM. We don't have to do that with the widgets inside +the 'toplevel' so why do we? Let 100 flowers bloom etc. +... +>And I don't speak about look differences. +> +>See you, Fred + +-- +Robin Becker + + + + diff --git a/demo/ermis-f/python_m/cur/1272 b/demo/ermis-f/python_m/cur/1272 new file mode 100644 index 00000000..b4bae60a --- /dev/null +++ b/demo/ermis-f/python_m/cur/1272 @@ -0,0 +1,21 @@ +From: ajung at sz-sb.de (Andreas Jung) +Date: Sat, 17 Apr 1999 13:59:07 GMT +Subject: re.sub() loops +Message-ID: +X-UID: 1272 + +I am trying to do some lame HTML processing with some +HTML. The following lines tries to remove some +unneccessary code from a HTML file. However python hangs +in this call: + +data = re.sub('','',data) + +Any idea why ? My env: Python 1.5.2 under Solaris 2.5.1 - 7.0. + +Andreas + + + + + diff --git a/demo/ermis-f/python_m/cur/1273 b/demo/ermis-f/python_m/cur/1273 new file mode 100644 index 00000000..45f0fdbf --- /dev/null +++ b/demo/ermis-f/python_m/cur/1273 @@ -0,0 +1,24 @@ +From: spamfranke at bigfoot.de (Stefan Franke) +Date: Sat, 17 Apr 1999 15:30:26 GMT +Subject: sys.path.insert - how to make it global? +References: <19990416172011.A1551755@vislab.epa.gov> +Message-ID: <3718a8aa.4229211@news.omnilink.de> +X-UID: 1273 + +On Fri, 16 Apr 1999 21:20:11 GMT, Randall Hopper wrote: + +> If I want to augment my Python module search path inside a Python +>script (so that it affects itself and imported modules), what's the best +>way to do this? +> +>Randall + +sys.path *is* already global, though only accessible via the +sys module's namespace. Just give it a try. + +Stefan + + + + + diff --git a/demo/ermis-f/python_m/cur/1274 b/demo/ermis-f/python_m/cur/1274 new file mode 100644 index 00000000..ec6051d4 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1274 @@ -0,0 +1,40 @@ +From: quinn at necro.ugcs.caltech.edu (Quinn Dunkan) +Date: 24 Apr 1999 06:42:59 GMT +Subject: package.module != module +Message-ID: +Content-Length: 1039 +X-UID: 1274 + +I have discovered that apparently python's mechanism for discovering if a +module has already been imported fails when you import a "fully qualified" +package previously imported as a sister. i.e.: + +client.py ("import package.sister") +package/ + __init__.py + sister.py ("class B: pass") + publish.py (""" +import sys +sys.path.append('..') +import sister, client +print repr(sister.B), repr(client.package.sister.B) +print sys.modules.keys() +""") + +We find that sister.B and client.package.sister.B are different classes. The +reason why appears to be sys.modules: we have both 'package.sister' and +'sister' imported as seperate modules. + +I get this convoluted structure all the time in ZPublisher (Zope), and when I +want to talk about a class defined in a package from a module run by that +package, nothing works because the package has different versions of the same +classes I'm talking about in my modules. You can't catch exceptions defined +in the package and thrown from a client module. + +Feature? Quirk? Workaround? Help! :) + +thanks! + + + + diff --git a/demo/ermis-f/python_m/cur/1275 b/demo/ermis-f/python_m/cur/1275 new file mode 100644 index 00000000..01b5d5e9 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1275 @@ -0,0 +1,38 @@ +From: david_ascher at yahoo.com (David Ascher) +Date: Sat, 3 Apr 1999 17:00:11 GMT +Subject: Rat sighting online +Message-ID: <19990403170011.21264.rocketmail@web602.mail.yahoo.com> +X-UID: 1275 + +--- Darrell wrote: +> I don't knowing much about Java so I tried the +> Jpython example and got +> stuck. It imports pickle which imports struct. +> Jpython doesn't seem to have +> struct ? + +The example was tested with JPython 1.1a3, which I +believe has the struct module. I don't have access to +JPython right now, but I believe you can get the +example to work by creating a struct.py file which +just defines empty functions for the functions which +pickle imports (I believe, just pack and unpack). +Something like: + +def pack(*args, **kw): pass +unpack = pack + +--david ascher + +PS: It's surprising that the book came out before the +software -- I believe it's mostly because the JPython +folks are working out a new license agreement for +easier distribution. +_________________________________________________________ +Do You Yahoo!? +Get your free @yahoo.com address at http://mail.yahoo.com + + + + + diff --git a/demo/ermis-f/python_m/cur/1276 b/demo/ermis-f/python_m/cur/1276 new file mode 100644 index 00000000..40b0bfb1 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1276 @@ -0,0 +1,47 @@ +From: aahz at netcom.com (Aahz Maruch) +Date: Tue, 27 Apr 1999 23:17:23 GMT +Subject: try vs. has_key() +References: <7g51q6$1pt$1@vvs.superst.iae.nl> +Message-ID: +Content-Length: 1267 +X-UID: 1276 + +In article <7g51q6$1pt$1 at vvs.superst.iae.nl>, +Carel Fellinger wrote: +>In article you wrote: +>> +>> d={} +>> for word in words: +>> first_two=word[:2] +>> d[first_two]=d.get(first_two, []).append(word) +> +>this is the statement where i get lost. and when i try it with python 1.5.1 +>it doesn't work either. As far as i understand the append function it doesn't +>return anything as it is just a shorthand for an assignment which to my +>knowledge even in python 1.5.2 doesn't return values. or am i missing +>something here? nonetheless, it looks great, and i sure hope it works too. + +It appears that the second parameter for get() (to specify a value +different from None when the key is not found) is new to 1.5.2. In +1.5.1 you still have to do the following: + +d={} +for word in words: + first_two=word[:2] + if d.get(first_two) is None : + d[first_two]=[word] + else : + d[first_two].append(word) + +(I think, without testing the code) +-- + --- Aahz (@netcom.com) + +Hugs and backrubs -- I break Rule 6 <*> http://www.rahul.net/aahz/ +Androgynous poly kinky vanilla queer het + +Hi! I'm a beta for SigVirus 2000! Copy me into your .sigfile! + + + + diff --git a/demo/ermis-f/python_m/cur/1277 b/demo/ermis-f/python_m/cur/1277 new file mode 100644 index 00000000..d10e4d01 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1277 @@ -0,0 +1,71 @@ +From: brunomadv at ciudad.com.ar (Bruno Mattarollo) +Date: Sun, 11 Apr 1999 19:49:50 GMT +Subject: best way to copy a file [ANSWER] +In-Reply-To: <199904111935.VAA24485@axil.hvision.nl> +References: <199904111935.VAA24485@axil.hvision.nl> +Message-ID: <000801be8454$7608f390$6eba0ac8@kuarajy.infosys.com.ar> +Content-Length: 1613 +X-UID: 1277 + +Thanks Hans. It worked... I didn't used the 'rb' and 'wb' when opening the +files... + +I should stop working on sundays ... :-) Well, I should stop working +everyday ;) + +/B + +Bruno Mattarollo +... proud to be a PSA member + +> -----Original Message----- +> From: Hans Nowak [mailto:ivnowa at hvision.nl] +> Sent: Sunday, April 11, 1999 5:37 PM +> To: Bruno Mattarollo; python-list at cwi.nl +> Subject: Re: best way to copy a file [Q] +> +> +> On 11 Apr 99, Ce'Nedra took her magical amulet and heard Bruno +> Mattarollo say: +> +> >Hi! +> > +> > I need to copy a file (can be binary or ascii) from one +> path to another. I +> >have tryied to do: +> > line = fd.readline() +> > while line: +> > fd2.write(line) +> > line = fd.readline() +> > fd.close() +> > fd2.close() +> > +> > It only works for ascii files ... How can I do a 'copy' +> ...? I need to run +> >this on NT ...:( And I don't want to open a shell to do a copy from +> >there... I also tryied fd.read() ... No success neither. +> +> Sure can: +> +> fin = open("myfile", "rb") # notice the 'rb' +> fout = open("target", "wb") # ...and the 'wb' +> data = fin.read(1000) # or any amount of bytes you want to read +> while data: +> fout.write(data) +> data = fin.read(1000) +> fin.close() +> fout.close() +> +> This should work. For large files, a larger number than 1000 may be +> desirable. +> +> + Hans Nowak (Zephyr Falcon) +> + Homepage (under construction): http://www.cuci.nl/~hnowak/ +> + You call me a masterless man. You are wrong. I am my own master. +> + May a plumber throw eggs at your dead presidents! +> + + + + + diff --git a/demo/ermis-f/python_m/cur/1278 b/demo/ermis-f/python_m/cur/1278 new file mode 100644 index 00000000..7bb1aaf1 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1278 @@ -0,0 +1,24 @@ +From: bwarsaw at cnri.reston.va.us (Barry A. Warsaw) +Date: 13 Apr 1999 13:06:54 -0400 +Subject: hey advocates +References: <7etg59$6mt$1@nnrp1.dejanews.com> <003f01be852e$a0125b60$0301a8c0@cbd.net.au> +Message-ID: <61btgse9g1.fsf@anthem.cnri.reston.va.us> +X-UID: 1278 + +>>>>> "MN" == Mark Nottingham writes: + + MN> I had a program that I wrote in Perl and had no problem + MN> getting into cgi-resources. Then, when I rewrote it in Python + MN> and released it (while still making the original available; + MN> different uses), he wouldn't create a category for Python, and + MN> he wouldn't even put it somewhere else. Grrr... + +Well, I just sent him a comment requesting addition of a Python +category. We'll see. + +Y'all should make the same request! +-Barry + + + + diff --git a/demo/ermis-f/python_m/cur/1279 b/demo/ermis-f/python_m/cur/1279 new file mode 100644 index 00000000..d2f546d9 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1279 @@ -0,0 +1,46 @@ +From: news at dorb.com (Darrell) +Date: Mon, 5 Apr 1999 14:38:40 -0400 +Subject: swig or not to swig ? +References: <4p6O2.1348$8m5.2126@newsr1.twcny.rr.com> +Message-ID: +Content-Length: 1224 +X-UID: 1279 + +Didn't have much luck with bgen. +modulator seems handy, Is there a reason to prefer swig ? + + +Darrell wrote in message +news:kZ6O2.1351$8m5.2222 at newsr1.twcny.rr.com... +> As is always the case I found the dl module right after making this post. +> import imp exposes load_dynamic +> +> It doesn't look like a general purpose shared lib interface. +> So now I'm looking at bgen in the tools directory. +> +> Here's a doc string from there. +> """\ +> +> Tools for scanning header files in search of function prototypes. +> +> Often, the function prototypes in header files contain enough information +> to automatically generate (or reverse-engineer) interface specifications +> from them. The conventions used are very vendor specific, but once you've +> figured out what they are they are often a great help, and it sure beats +> manually entering the interface specifications. (These are needed to +> generate +> the glue used to access the functions from Python.) +> +> In order to make this class useful, almost every component can be +> overridden. +> The defaults are (currently) tuned to scanning Apple Macintosh header +files, +> although most Mac specific details are contained in header-specific +> subclasses. + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1280 b/demo/ermis-f/python_m/cur/1280 new file mode 100644 index 00000000..2cb2c0df --- /dev/null +++ b/demo/ermis-f/python_m/cur/1280 @@ -0,0 +1,52 @@ +From: clarence at silcom.com (Clarence Gardner) +Date: Wed, 14 Apr 1999 15:11:15 GMT +Subject: forking + stdout = confusion +References: <87n20caldg.fsf@spock.localnet.de> +Message-ID: +Content-Length: 1726 +X-UID: 1280 + +Roy Smith (roy at popmail.med.nyu.edu) wrote: +: Carsten Schabacker wrote: +: > No, the child and the parent share the SAME filedescriptors. This is true +: > for ALL open files! So if you don't need the descriptors in a child or a +: > parent you should close them. +: > +: > Apache waits for the end of the file, so all processes (parents and +: > childs) must close the file! +Carsten: Please take this constructively :) I am aware of the fd sharing, +and the code I posted clearly closed stdin, stdout, and stderr in both the +parent and child processes. Also, in case you're not aware of it, the +distinguishing feature of a nph-type CGI program is that its output does +not go through the web server. + +: +: When doing a similar thing a while ago, I had similar problems :-) I +: eventually found that in addition to doing sys.stdout.close(), I had to do +: os.close(1) to make sure the fd really got closed. +: +: I'm still not sure I understand what was going on. I know that +: sys.__stdout__ contains a copy of sys.stdout, so at first I figured that +: doing both sys.stdout.close() and sys.__stdout__.close() would do the +: trick, but it didn't, but os.close(1) did. + +That does indeed do the trick, but you probably had to os.close(2) also. +(Both stdout and stderr normally are piped into Apache.) +However, your first thought also works, with the same caveat about stderr. +stdin, stdout, and stderr all have the __xxx__ copy in the sys module +(which I was not aware of). + +So it was a Python issue after all! Removes any tinge of guilt I had +about posting it here :) + + +-- +-=-=-=-=-=-=-=-= +Clarence Gardner +AvTel Communications +Software Products and Services Division +clarence at avtel.com + + + + diff --git a/demo/ermis-f/python_m/cur/1281 b/demo/ermis-f/python_m/cur/1281 new file mode 100644 index 00000000..e0771d11 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1281 @@ -0,0 +1,59 @@ +From: warlock at eskimo.com (Jim Richardson) +Date: 4 Apr 1999 17:45:54 GMT +Subject: Is Python dying? +References: <7dos4m$usi$1@nnrp1.dejanews.com> <37009C12.4C0E6B0B@earth.ox.ac.uk> <922837384snz@vision25.demon.co.uk> <7dtbu1$rpn$1@nnrp1.dejanews.com> <37025110.1BA742B@appliedbiometrics.com> +Message-ID: +Content-Length: 1761 +X-UID: 1281 + +On Wed, 31 Mar 1999 16:45:04 GMT, + Christian Tismer, in the persona of , + brought forth the following words...: + +> +> +>aaron_watters at my-dejanews.com wrote: +>> +>> > > K&R is one of the best programming books I have read. A Python equivalent +>> > > would be nice. +>> +>> I think the Python equivalent are Guido's tutorial and reference +>> manual. He did such a good job that all other books had to add +>> a lot more stuff in order to not be totally redundant. Note that +>> there is no K&R equivalent of the library ref unless you consider +>> Unix man pages [3]. +>> +>> Sorry you can't get them in bound form and put them on your shelf. +>> -- Aaron Watters +> +>Well, isn't that an idea? +>If somebody (which needn't be Guido himself) just takes +>the standard documentation, does some touch-up of the layout, +>and turns it into a printable book? +> +>The "GvR Official Python Library and Reference Book" would appear +>with every new release of Python. I could imagine this would +>sell good, for Guido and the publisher. +>At least I would love to have that on my desk, hard-covered +>and bound, not just in electronic form or printed by myself. +> +>ciao - chris + +I used mpage to condense them down to 2 pages per 8x11 sheet, and +then printed odd/even, cycled the paper throgh the laser printer twice, +bound them with those little springy plastic spiral things, and +viola, a 5x8, Reference with the tutorial, the api, &etc all at once. + Took something a little over 100 pages. I would have printed 4 to a page +but I couldn't figure how to make mpage do the registering properly for +2 stage double sided printing. + +-- +Jim Richardson + www.eskimo.com/~warlock +All hail Eris +"Linux, because a cpu is a terrible thing to waste." + + + + + diff --git a/demo/ermis-f/python_m/cur/1282 b/demo/ermis-f/python_m/cur/1282 new file mode 100644 index 00000000..809e149a --- /dev/null +++ b/demo/ermis-f/python_m/cur/1282 @@ -0,0 +1,41 @@ +From: ivanlan at callware.com (Ivan Van Laningham) +Date: Mon, 26 Apr 1999 21:47:40 GMT +Subject: help +References: + <19990426163014.B20207@toast.internal> <3724D1C3.8BFA2C5B@pop.vet.uu.nl> +Message-ID: <3724DEFC.A01E93C2@callware.com> +X-UID: 1282 + +Hi All-- + +Martijn Faassen wrote: +> + +[snip] + +> I always sound like that too, don't worry. :) (they're calling me a +> Python preacher these days, at work) +> +> Regards, +> +> Martijn + +Oh, they won't even let me talk in meetings around here anymore. I just +*look* like I'm going to open my mouth and they all yell, ``Yes, we +*know* we should use Python!'' + +-ly y'rs, +Ivan +---------------------------------------------- +Ivan Van Laningham +Callware Technologies, Inc. +ivanlan at callware.com +http://www.pauahtun.org +See also: +http://www.foretec.com/python/workshops/1998-11/proceedings.html +Army Signal Corps: Cu Chi, Class of '70 +---------------------------------------------- + + + + diff --git a/demo/ermis-f/python_m/cur/1283 b/demo/ermis-f/python_m/cur/1283 new file mode 100644 index 00000000..a6b72cf5 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1283 @@ -0,0 +1,22 @@ +From: wwells5546 at my-dejanews.com (wwells5546 at my-dejanews.com) +Date: Fri, 23 Apr 1999 22:06:38 GMT +Subject: learning python +Message-ID: <7fqqtc$msf$1@nnrp1.dejanews.com> +X-UID: 1283 + +Hi everybody, + +I know nothing about computer language. I guess I need to start with Python, +I've downloaded the progam and installed. I have the Python window and the +Ineractive window before me what do I do next????? + +Any help on tutorials for somebody who doesn't know anything would be helpful. + +Regards + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/1284 b/demo/ermis-f/python_m/cur/1284 new file mode 100644 index 00000000..58da1348 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1284 @@ -0,0 +1,35 @@ +From: mal at lemburg.com (M.-A. Lemburg) +Date: Wed, 14 Apr 1999 10:32:55 +0200 +Subject: bug in PyGreSQL module +References: <14099.24295.229214.504295@bitdiddle.cnri.reston.va.us> +Message-ID: <371452B7.1C5E40EC@lemburg.com> +Content-Length: 1056 +X-UID: 1284 + +Jeremy Hylton wrote: +> +> I found an apparent bug in the Python interface to PostgreSQL. I +> tried sending a query to the author but haven't heard back, so I'm +> looking for other users to see if they have run into the problem. +> I have a table with lots of int fields, some of which of NULL. When I +> do a Python query, the PyGreSQL module converts the NULL to 0 instead +> of None, which is the value I expected. Is that a reasonable +> expectation? +> +> The PyGreSQL module doesn't implement the DB API, but I checked there +> anyway. Alas, it didn't say anything about how to handle NULL. + +Database interface modules should use None as reprensentation +of SQL NULL values on the Python side of things; in fact most +interfaces already take this intuitive approach. + +-- +Marc-Andre Lemburg Y2000: 261 days left +--------------------------------------------------------------------- + : Python Pages >>> http://starship.skyport.net/~lemburg/ : + --------------------------------------------------------- + + + + + diff --git a/demo/ermis-f/python_m/cur/1285 b/demo/ermis-f/python_m/cur/1285 new file mode 100644 index 00000000..30cbc1e6 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1285 @@ -0,0 +1,23 @@ +From: loewis at informatik.hu-berlin.de (Martin von Loewis) +Date: 21 Apr 1999 19:19:21 +0200 +Subject: HTTP-NG Support? +References: <002201be8c08$1969e570$8b7125a6@cpda6686.mcit.com> +Message-ID: +X-UID: 1285 + +jkraai at murl.com writes: + +> Been looking over http-ng ( http://www.w3.org/HTTP-NG/ ) for +> the last couple of days. +> +> Wondering if anything has been done via Python. + +ILU supports http-ng, and Python (among other protocols and +languages). It is available from ftp.parc.xerox.com/pub/ilu. + +Regards, +Martin + + + + diff --git a/demo/ermis-f/python_m/cur/1286 b/demo/ermis-f/python_m/cur/1286 new file mode 100644 index 00000000..655bdf4e --- /dev/null +++ b/demo/ermis-f/python_m/cur/1286 @@ -0,0 +1,25 @@ +From: fmwang at mediaone.net (Fuming Wang) +Date: Fri, 23 Apr 1999 11:14:49 -0400 +Subject: Bug or Feature? +Message-ID: <37208E69.4B022E0C@mediaone.net> +X-UID: 1286 + +Hi, + +I found this little surprise with Python 1.5.1: + + +>list = [[0]*2]*4 +>list +[[0, 0], [0, 0], [0, 0], [0, 0]] +>list[0][1] = 9 +>list +[[0, 9], [0, 9], [0, 9], [0, 9]] + +Is this a bug or a feature that I don't know about? + +Fuming + + + + diff --git a/demo/ermis-f/python_m/cur/1287 b/demo/ermis-f/python_m/cur/1287 new file mode 100644 index 00000000..8731bd25 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1287 @@ -0,0 +1,17 @@ +From: gustav at morpheus.demon.co.uk (Paul Moore) +Date: Sun, 11 Apr 1999 21:26:27 GMT +Subject: Does the standard ftplib module support proxies? +Message-ID: <37110c85.7753709@news.demon.co.uk> +X-UID: 1287 + +The header says it all... I've looked in the manual, but I can't see +anything about proxy (firewall) support, one way or another. + +Actually, the same question applies to httplib and urllib. + +Thanks, +Paul Moore. + + + + diff --git a/demo/ermis-f/python_m/cur/1288 b/demo/ermis-f/python_m/cur/1288 new file mode 100644 index 00000000..bdb1520a --- /dev/null +++ b/demo/ermis-f/python_m/cur/1288 @@ -0,0 +1,21 @@ +From: dubois1 at llnl.gov (Paul F. Dubois) +Date: Mon, 12 Apr 1999 19:20:04 GMT +Subject: LLNL Website back on line +Message-ID: +X-UID: 1288 + +http://xfiles.llnl.gov is back on line, as is the ftp site +ftp://ftp-icf.llnl.gov/pub/python. + +The latest distributions remain at http://dubois.simplenet.com/python as +well. I would appreciate hearing from those far from California if +downloading from the latter is better; in principle it should be, I believe. +If this is the case I don't mind keeping up the dual locations. + + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1289 b/demo/ermis-f/python_m/cur/1289 new file mode 100644 index 00000000..3ea0f391 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1289 @@ -0,0 +1,65 @@ +From: ivanlan at callware.com (Ivan Van Laningham) +Date: Thu, 22 Apr 1999 19:51:21 GMT +Subject: What is it ? How can I learn it ? Where should I start ? What can + you do with it ? +References: +Message-ID: <371F7DB9.E7E48A82@callware.com> +Content-Length: 1715 +X-UID: 1289 + +Pythonistas-- + +"Alexander M. Dietrich" wrote: +> +> I just heard about it, it's required for a job I will eventually apply to. +> I have C programming experience . Is that a plus ? + +Welcome aboard, Alexander. + +> What is it? + +The coolest programming language on the planet. + +> How can I learn it? + +Buy _Learning Python_ by Mark Lutz & David Ascher, O'Reilly Press. Bug +us. This list is actually civilized. No newbies have been harmed +beyond repair in the last year or so, and most of the real cannibals +have been muzzled (Gordon excepted, so don't put any parts of you +through his cage bars that you want to keep). ... + +> Where should I start? + +Here. http://www.python.org (You can order the books from here, too) +There's also a Python-tutor mailing list you might want to consider +joining. + +> What can you do with it? + +Anything. The weirder the better. Check out the previous conference +pages at www.python.org; paper topics are, shall we say, all over the +map. About the only area where Python doesn't shine is competing with +Perl on regular expressions. It can do the same stuff, just not as +fast. + +Python is fun, easy, and entertaining. And, it's educational. + +-ly +y'rs, +Ivan + +PS: And just *where* is this job that (I should be so lucky) *REQUIRES* +you to know Python???????? Why aren't they calling ME???? +---------------------------------------------- +Ivan Van Laningham +Callware Technologies, Inc. +ivanlan at callware.com +http://www.pauahtun.org +See also: +http://www.foretec.com/python/workshops/1998-11/proceedings.html +Army Signal Corps: Cu Chi, Class of '70 +---------------------------------------------- + + + + diff --git a/demo/ermis-f/python_m/cur/1290 b/demo/ermis-f/python_m/cur/1290 new file mode 100644 index 00000000..692b994c --- /dev/null +++ b/demo/ermis-f/python_m/cur/1290 @@ -0,0 +1,85 @@ +From: jasonic at nomadicsltd.com (Jason Cunliffe) +Date: Thu, 8 Apr 1999 14:45:18 +0100 +Subject: Q: newbie win95 - python path navigation assignment strategies needed +Message-ID: <7eibtm$igb$1@news1.cableinet.co.uk> +Content-Length: 2788 +X-UID: 1290 + +Hello + +I am very new to Python, though totally convinced of its genius and utility. +Been reading through, and downloading lots of great code, docs, etc. + the 3 +books (now waiting for 'Learning Python'). But I seem to be stuck on a +_very_ basic issue. Please help, I need some guidance - over-the-shoulder; +heads-up on something I am not 'getting' yet... + +system: Python 1.5.2b2 [MSC 32 bit (Intel)] on win32. 'Idle' by preference +:-) + +I do not understand the relationships between modules, namespace, path and +the Python shell. When I am in the python shell at the prompt I can + +>>> import sys +>>> sys.path +['C:\\Program Files\\Python\\Tools\\idle', +'C:\\PROGRA~1\\PYTHON\\TOOLS\\IDLE', 'C:\\Program Files\\Python\\win32', +'C:\\Program Files\\Python\\win32\\lib', 'C:\\Program Files\\Python', +'C:\\Program Files\\Python\\Pythonwin', 'C:\\Program +Files\\Python\\LLNLDistribution\\NUMERICAL\\LIB', 'C:\\Program +Files\\Python\\LLNLDistribution\\NUMERICAL\\PYDS', 'C:\\Program .....etc +etc... + +and also +>>> import os +>>> os.getcwd() +'C:\\Program Files\\Python\\Tools\\idle' + +But how and when do I need to change the working directory? +How and when do I need to navigate in the Python shell? +Should I be in the python shell or outside it to do this? +Do I need to even worry about it? +At what point in a session do I need to set the path? +Can I explicitly import a module by supplying a path prefix once and let +Python take care of the rest? +Is there some simple code to automate this? +Are these problems any different because I am using Idle? +What does Python do if it finds two modules with the same name both on +sys.path? + +And what are the rules/caveats here about upper or lower case? for Win32 +Python pathnames + +I cannot seem to find a setcwd() command or similar.. Am I missing +something? + +If add items to my path for example +>>> sys.path.append('c:\\mynewmodulepath') +this is good because I can then +>>> import mynewmodule + +But when I save out my stuff, read or write from files, or import other +modules which may be located somewhere else, what strategy do you advise I +follow for path setting and manipulation? I have tried setting and changing +os.environ items. Is this the preferred way? for example: + +os.environ['MY_DEMOS'] = 'c:\\downloads\\My_Demos' + +I realize some of my confusion is because I using Win32 and not on a unix +box at the moment. I am champing at the Python bit because I keep stumbling +over this basic path cwd stuff. + +Likewise everywhere it in docs and READMEs where it advises running python +scripts as executables (Unix) how do you advise I behave on Win95/98/NT? + +I need to use Win95 at the moment for other purposes and am very keen to use +Python as the glue between apps on Win32 and other OSen (Irix, Linux). + +Thanks in advance for any help. + +- Jason + + + + + + diff --git a/demo/ermis-f/python_m/cur/1291 b/demo/ermis-f/python_m/cur/1291 new file mode 100644 index 00000000..000f791a --- /dev/null +++ b/demo/ermis-f/python_m/cur/1291 @@ -0,0 +1,29 @@ +From: brunomadv at ciudad.com.ar (Bruno Mattarollo) +Date: Sun, 11 Apr 1999 16:36:42 GMT +Subject: by-passing exception [Q] +In-Reply-To: <000501be83ec$64157180$6b9e2299@tim> +References: <000501be83ec$64157180$6b9e2299@tim> +Message-ID: <000101be8439$7b0c0460$6eba0ac8@kuarajy.infosys.com.ar> +X-UID: 1291 + +Thanks Tim ... + + Now I am awake and I see it clearly... + +> just-try-getting-a-dog-to-tell-you-whether-a-file-exists-ly y'rs - tim + + Do you have a dog that can tell that? I would like one :-) Would be nice, +no more programming alone at 2AM ... :-) + +Cheers, + +/B + +Bruno Mattarollo +... proud to be a PSA member + + + + + + diff --git a/demo/ermis-f/python_m/cur/1292 b/demo/ermis-f/python_m/cur/1292 new file mode 100644 index 00000000..e15a3cc4 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1292 @@ -0,0 +1,48 @@ +From: Vladimir.Marangozov at inrialpes.fr (Vladimir Marangozov) +Date: Thu, 08 Apr 1999 16:51:42 +0200 +Subject: Chaning instance methods +References: <370C2904.A6F4BD54@inrialpes.fr> <000801be8188$b59aa9a0$749e2299@tim> +Message-ID: <370CC27E.ED2D0D59@inrialpes.fr> +X-UID: 1292 + +Tim Peters wrote: +> +> [me, on f being an instance of Foo, becoming an instance of Bar, +> the latter being derived directly from Foo] +> > ... +> +> When I signed my exposition of instance-method trickery "subclassing-is- +> a-lot-easier-ly y'rs", I had exactly this in mind: +> +> class Bar(Foo): +> def m(self): +> print "m2" +> +> f = Bar() +> + +Careful! +We'll eventually see what you had exactly in mind if you change the last +line from + +(1) f = Bar() + +to + +(2) f.__class__ = Bar + +While (1) resets f's internal state and makes a brand new instance, +(2) preserves that state (which reflects f's past existence as an +instance of Foo) by changing only its interface to that of Bar +"on the fly". The difference is quite fundamental. + +We all knew that you meant (2) in your sig, but making it slightly +more explicit does not hurt :-) + +-- + Vladimir MARANGOZOV | Vladimir.Marangozov at inrialpes.fr +http://sirac.inrialpes.fr/~marangoz | tel:(+33-4)76615277 fax:76615252 + + + + diff --git a/demo/ermis-f/python_m/cur/1293 b/demo/ermis-f/python_m/cur/1293 new file mode 100644 index 00000000..e098dcfe --- /dev/null +++ b/demo/ermis-f/python_m/cur/1293 @@ -0,0 +1,43 @@ +From: fastlanete at aol.com (FastLaneTe) +Date: 22 Apr 1999 14:56:57 GMT +Subject: Tkinter Support +Message-ID: <19990422105657.05425.00000129@ng-cg1.aol.com> +Content-Length: 1417 +X-UID: 1293 + +I am just getting started using Python. Read the programming python book +and much of the docs. I am investigating using python for both a univeristy +research project and a commercial project. One of the issues is a cross +platform GUI +(linux,windows, mac) Looks like Tk is the likely candidate. + +I am impressed with the clean design of the Python language and can see a +lot of potential for its use. I run a large research program at the +University and I think we could seriously contribute to the Python +community. However I need help understanding more about how well the Python +open source support works. + +So far everything we have done is C (Unix Linux Windows VxWorks Qnx) In +fact the QNX port for Python makes it something we can use for our +autonomous underwater vehicles. + +Questions: + +Is there complete documentation for Tkinter someplace? ( I have read the +html pages on pkware's web site its good but not complete) + +I found a lot of detail in a Tk book that is not apparent in the Tkinter +docs ("Practical programming in Tcl and Tk). Is all of Tk supported ( I +assume so but its not clear how or if Tkinter does some things) + +How extensive is the group of people supporting Tkinter? Is there a +committment to continue to support Tk as the default GUI for Python like +it is for TCL and Perl? + +I see references to several different Python applications that must use a +GUI. How prevalent is Tkinter usage? + + + + + diff --git a/demo/ermis-f/python_m/cur/1294 b/demo/ermis-f/python_m/cur/1294 new file mode 100644 index 00000000..b78751a3 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1294 @@ -0,0 +1,19 @@ +From: bbosware at vic.bigpond.net.au (John Leach) +Date: Fri, 30 Apr 1999 22:03:14 +1000 +Subject: pil vs gd +Message-ID: <37299C02.4095E584@vic.bigpond.net.au> +X-UID: 1294 + +Thank you for everyone who sent me gd examples. +It's working fine now. +gd does what I need; but in order to get some sort of context - does pil +provide, or is intended to provide one day, a superset of gd - or are +they separate beasts? +Can pil for example create gif images from text? And with a choice of +fonts? +John Leach +www.bosware.com.au + + + + diff --git a/demo/ermis-f/python_m/cur/1295 b/demo/ermis-f/python_m/cur/1295 new file mode 100644 index 00000000..b4be79a2 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1295 @@ -0,0 +1,33 @@ +From: fdrake at cnri.reston.va.us (Fred L. Drake) +Date: Thu, 29 Apr 1999 21:21:19 GMT +Subject: Extension Doc bug +In-Reply-To: +References: +Message-ID: <14120.52559.376120.364972@weyr.cnri.reston.va.us> +X-UID: 1295 + +Michael P. Reilly writes: + > I just spent the morning trying to find a very obscure bug related to + > the passing keyword arguments to a builtin method/function. + +Michael, + You didn't post your original code that exhibited the bug, so I +can't be sure of my conclusions. If you can send source for enough of +your extension module that someone can compile it, that would be +helpful. + My first inclination, however, is that you passed in illegal +arguments to PyArg_ParseTupleAndKeywords(). Passing NULL for the +keywords dictionary is allowed; I've been looking at the +implementation and don't see a way for that to be a problem (but I +might have missed something). + + + -Fred + +-- +Fred L. Drake, Jr. +Corporation for National Research Initiatives + + + + diff --git a/demo/ermis-f/python_m/cur/1296 b/demo/ermis-f/python_m/cur/1296 new file mode 100644 index 00000000..1ce00c85 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1296 @@ -0,0 +1,66 @@ +From: bruce.adams at rmc-ltd.com (Bruce S. O. Adams) +Date: Fri, 23 Apr 1999 10:30:11 +0100 +Subject: The Future of Tk? +References: <371E964F.C531C2A@istar.ca> <371F11C2.3162025@ciril.fr> <4fv$ECA+JyH3EwbN@jessikat.demon.co.uk> <371F6C8E.6631E8F1@channelpoint.com> +Message-ID: <37203DA3.42B86115@rmc-ltd.com> +Content-Length: 2757 +X-UID: 1296 + + +Bryan Oakley wrote: + +> Barry Margolin wrote: +> > +> > In article <4fv$ECA+JyH3EwbN at jessikat.demon.co.uk>, +> > Robin Becker wrote: +> > >I take this completely differently; least astonishment for me is if +> > >program X looks and behaves the same way no matter what keyboard, mouse +> > >and screen I'm using. As a 'user' of the program X it shouldn't matter +> > >what OS/WM is executing the code. I certainly don't want vi or emacs to +> > >be different on the mac why should I treat word or excel differently? +> > +> > I would be very surprised if Netscape on the Macintosh presented a +> > Windows-like user interface, rather than adopting the standard Macintosh +> > user interface. Most end users don't switch between platforms much, so +> > it's more important that all the programs on their system conform to their +> > expectations, than that a particular program work the same across different +> > platforms. +> +> I would have to agree with that statement. While there are those who +> think retaining the same look and feel across platforms is necessary, I +> would wager they are in the distinct minority. That's not to invalidate +> their position, but merely to put it in context. _Most_ users of +> software want a package to look and feel like the other packages on a +> given system. I hate, for example, the artsy (-fartsy) graphic programs +> that have some weird UI instead of a more traditional UI. +> +> On the other hand, to some degree this is application-dependent rather +> than user-dependent. For example, if I were to have a requirement to +> write a air traffic control program that had to run on BeOS, MacOS, NT +> and *nix, I would think there would be significant advantages to keeping +> it 100% identical across all platforms. So, to some degree it depends on +> the application, or the targeted user base. +> +> My point being, there's a need in the world for both models. Only, the +> model where applications should adhere to native conventions is (I'm +> guessing) far and away the most commonly expected model by most users. +> Which is why I think using native windows on Tk is a win -- it meets the +> needs of the majority (though definitely not all) of the users in the +> world. +> + +The two models need not be mutually exclusive. Though I have not had the +pleasure of using SWING for JAVA myself, I believe it offers the ability +to switch look-and-feel at the touch of a button. A configuration option that +would surely please everybody. I would think this kind of configurability is +a good design goal. Of course there are trade offs which are worthy of +discussion. Would some kind soul with experience in this arena care to shed +some light? + Regards, + Bruce A. + + + + + + diff --git a/demo/ermis-f/python_m/cur/1297 b/demo/ermis-f/python_m/cur/1297 new file mode 100644 index 00000000..6e055bd5 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1297 @@ -0,0 +1,28 @@ +From: Michael.Scharf at kosmos.rhein-neckar.de (Michael Scharf) +Date: Fri, 23 Apr 1999 03:37:00 +0200 +Subject: Emulating C++ coding style +References: <371F8FB7.92CE674F@pk.highway.ne.jp> +Message-ID: <371FCEBB.96ABCADE@kosmos.rhein-neckar.de> +X-UID: 1297 + +"Steven D. Majewski" wrote: +Steven D. Majewski wrote: + +> > > e.g. cout << "hello python."< However, if you *REALLY* want to have that sort of C++ syntax, +> you can get it in Python with something like: + +...compare those 15 lines with the zillions of lines +of C++ code! + +Michael +-- + ''''\ Michael Scharf + ` c-@@ TakeFive Software + ` > http://www.TakeFive.com + \_ V mailto:Michael_Scharf at TakeFive.co.at + + + + diff --git a/demo/ermis-f/python_m/cur/1298 b/demo/ermis-f/python_m/cur/1298 new file mode 100644 index 00000000..d2ca4f9e --- /dev/null +++ b/demo/ermis-f/python_m/cur/1298 @@ -0,0 +1,34 @@ +From: linge at embl-heidelberg.de (Jens Linge) +Date: Thu, 29 Apr 1999 19:19:49 +0200 +Subject: string.atoi('-') +Message-ID: <372894B5.78F68430@embl-heidelberg.de> +X-UID: 1298 + +I had the following problem: + +With python 1.51 running on a SGI: +>>> string.atoi('-') +Traceback (innermost last): + File "", line 1, in ? +ValueError: invalid literal for atoi(): - +>>> + +But with python 1.52 running on a SGI: +>>> string.atoi('-') +0 +>>> + +Does it depend on the compilation? +Does anyone have the same problem? + +WHAT IS THE RULE? + + + +Thank you in advance. + +Jens + + + + diff --git a/demo/ermis-f/python_m/cur/1299 b/demo/ermis-f/python_m/cur/1299 new file mode 100644 index 00000000..41ab1f60 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1299 @@ -0,0 +1,40 @@ +From: gony at my-dejanews.com (gony at my-dejanews.com) +Date: Mon, 26 Apr 1999 05:38:14 GMT +Subject: Cryptography and web storage using PGP,Python and ftp sessions +Message-ID: <7g0u46$j1i$1@nnrp1.dejanews.com> +Content-Length: 1503 +X-UID: 1299 + +This is a 4th year bachelor of technology assignment for a systems programming +paper and hence a complete answer to the assignment would be wrong. + +However there are about 20 of my fellow students who would greatly appreciate +any guidance in completing this assignment. + the assignment is as follows. + +Your task is to develop a secure internet-based file repository so mobile +users can access files whilst travelling, and enable secure off site backup. +Your system must enable a user to save personal files on the archieve-server +with the confidence that, even if the files should be inappropriately +accessed, they will be of absolutely no use to anyone else. These files are +to be encrypted so that they can only be read by the intended recipient this +could either be the person publishing the page or another specified person (a +single recipient must be specified beforethe file is published). In the +latter case the server acts as a secure mailbox. + +for the encrytion system, use the freely available version of PGP. For +communication with the remote system automate an ftp session. The code to tie +these together is to be written in Python - a freely available interpreted +language. + +we can develop the system in either a UNIX or a Win95/98 platform. + +any hints, tips, suggestions, links to relevant sites, advice etc would be +greatly appreciated + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/1300 b/demo/ermis-f/python_m/cur/1300 new file mode 100644 index 00000000..4608a3ba --- /dev/null +++ b/demo/ermis-f/python_m/cur/1300 @@ -0,0 +1,76 @@ +From: aa8vb at vislab.epa.gov (Randall Hopper) +Date: Thu, 22 Apr 1999 11:35:16 -0400 +Subject: Callbacks and "callable" objects +Message-ID: <19990422113516.A278137@vislab.epa.gov> +Content-Length: 2224 +X-UID: 1300 + + A while back I asked how to pass parameterized callbacks to Tkinter. +Now I need to explore how best to do partial resolution of callback +arguments. For example, define values for arguments 1 and 2 at +registration time, but leave argument 3 to be populated by Tkinter. + + Probably makes no sense. So let me use an example: + +------------------------------------------------------------------------------- + +For simple callbacks you can use a lambda or function wrapper: + + def SetColor( color ): + print color + + wgt1.configure( command = lambda color="red" : SetColor(color) ) + wgt1.configure( command = lambda color="blue": SetColor(color) ) + +One suggestion Thomas Heller offered before was to use a callable object +instead; this gives a much simpler appearance: + + def SetColor( color ): + print color + + wgt1.configure( command = Call( SetColor, "red" ) ) + wgt1.configure( command = Call( SetColor, "blue" ) ) + +(Call class source attached below in case you're interested). + +------------------------------------------------------------------------------- + +The wrinkle now is what if SetColor is an event callback (i.e. Tkinter +provides an event argument): + + def SetColor( color, event ): + print color + +this breaks the callable object form: + wgt1.configure( command = Call( SetColor, "red" ) ) + +with Tkinter giving: + TypeError: too many arguments; expected 1, got 2 + +So my quetsion is, can the "callable object" be used? Or do I have to fall +back to a lambda wrapper? + +Thanks, + +Randall + + + +------------------------------------------------------------------------------- +class Call: + """Instances of this class store a function as well as a list of arguments. + When they are called, the function will be called together with the + arguments used for creating the instance. + Slightly different than lambda, but nicer syntax.""" + + def __init__ (self, func, *args): + self.func = func # save the function (or bound method,or ...) + self.args = args # save the arguments to use + def __call__ (self): + apply (self.func, self.args) # call function, using args as arguments. +------------------------------------------------------------------------------- + + + + + diff --git a/demo/ermis-f/python_m/cur/1301 b/demo/ermis-f/python_m/cur/1301 new file mode 100644 index 00000000..17a6df41 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1301 @@ -0,0 +1,40 @@ +From: jwbaxter at olympus.net (John W. Baxter) +Date: Thu, 29 Apr 1999 22:21:19 -0700 +Subject: string.atoi('-') +References: <372894B5.78F68430@embl-heidelberg.de> <372904D7.1A9FC1AB@bioreason.com> +Message-ID: +X-UID: 1301 + +In article <372904D7.1A9FC1AB at bioreason.com>, Andrew Dalke + wrote: + +> (cc'ed to Jens Linge , the author of) +> > With python 1.51 running on a SGI: +> > >>> string.atoi('-') +> > Traceback (innermost last): +> > File "", line 1, in ? +> > ValueError: invalid literal for atoi(): - +> > >>> +> > +> > But with python 1.52 running on a SGI: +> > >>> string.atoi('-') +> > 0 +> > >>> +> > +> > Does it depend on the compilation? +> > Does anyone have the same problem? +> > +> > WHAT IS THE RULE? + +The rule is: for the sake of sanity, do not present atoi() with the string '-'. + + --John + +-- +If nothing is pressing, putter about with this or that. + (Fortune cookie) +John W. Baxter Port Ludlow, WA USA jwb at olympus.net + + + + diff --git a/demo/ermis-f/python_m/cur/1302 b/demo/ermis-f/python_m/cur/1302 new file mode 100644 index 00000000..2b6b65ba --- /dev/null +++ b/demo/ermis-f/python_m/cur/1302 @@ -0,0 +1,34 @@ +From: aa8vb at vislab.epa.gov (Randall Hopper) +Date: Thu, 8 Apr 1999 11:55:45 GMT +Subject: Is Python dying? +In-Reply-To: ; from TM on Thu, Apr 08, 1999 at 05:25:30AM +0000 +References: <7dos4m$usi$1@nnrp1.dejanews.com> <7e30fp$8vf$1@news1.rmi.net> <14085.18282.936883.727575@bitdiddle.cnri.reston.va.us> <7ectjd$516$1@srv38s4u.cas.org> +Message-ID: <19990408075544.B983383@vislab.epa.gov> +X-UID: 1302 + +TM: + |> Elsewhere in this thread there have been discussions regarding the fact + |>that it's been several years since the last major Python book was + |>released. + | + |Now that you mentioned it, I remember hearing that someone was writeing + |a Python TKinter book......what the hell ever happened to that?!?! + +I believe that was Fredrik Lundh . + +In shopping for Python books late last month, I happened upon his announced +plan to write a Tkinter book. So I slipped him an e-mail query asking how +the book was going and if he had an estimated timeframe (in case it was +close to market), but I haven't received a response. I assume he's just +busy like the rest of us. + +Draft two of his Intro to Tkinter appeared on his pages in Feb: + http://www.pythonware.com/fredrik/tkdraft/ + +Randall + + + + + + diff --git a/demo/ermis-f/python_m/cur/1303 b/demo/ermis-f/python_m/cur/1303 new file mode 100644 index 00000000..0911fa06 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1303 @@ -0,0 +1,22 @@ +From: miller at uinpluxa.npl.uiuc.edu (M.A.Miller) +Date: 09 Apr 1999 11:23:59 -0500 +Subject: formating string like sprintf +References: <370e1d60@isoit370.bbn.hp.com> +Message-ID: <7690c1vk2o.fsf@zero.npl.uiuc.edu> +X-UID: 1303 + +>>>>> "Monnet" == Monnet writes: + + > How can I format a string like using sprintf (mybuffer, + > "%02x", myhex_value) ? + +Like this: + +>>> myhex_value = 1223 +>>> mybuffer = "%02x" % ( myhex_value ) +>>> print mybuffer +4c7 + + + + diff --git a/demo/ermis-f/python_m/cur/1304 b/demo/ermis-f/python_m/cur/1304 new file mode 100644 index 00000000..b0cfa6a8 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1304 @@ -0,0 +1,40 @@ +From: cfelling at iae.nl (Carel Fellinger) +Date: 27 Apr 1999 21:05:42 +0200 +Subject: try vs. has_key() +References: +Message-ID: <7g51q6$1pt$1@vvs.superst.iae.nl> +X-UID: 1304 + +Hai Moshe Zadka, + +sorry to react so late, but i'm a newbie to python, so it took me some time +to realise that i really don't understand what you are doing:) + +In article you wrote: +> Note: +> This article is a non-commercial advertisement for the ``get'' method +> of dictionary objects. +> Brought to you by the object None and the method .append. + +> d={} +> for word in words: +> d[word]=d.get(word, 0)+1 + +> Or, for logging: +> d={} +> for word in words: +> first_two=word[:2] +> d[first_two]=d.get(first_two, []).append(word) + +this is the statement where i get lost. and when i try it with python 1.5.1 +it doesn't work either. As far as i understand the append function it doesn't +return anything as it is just a shorthand for an assignment which to my +knowledge even in python 1.5.2 doesn't return values. or am i missing +something here? nonetheless, it looks great, and i sure hope it works too. + +-- +groetjes, carel + + + + diff --git a/demo/ermis-f/python_m/cur/1305 b/demo/ermis-f/python_m/cur/1305 new file mode 100644 index 00000000..0b728b5d --- /dev/null +++ b/demo/ermis-f/python_m/cur/1305 @@ -0,0 +1,61 @@ +From: wtanksle at dolphin.openprojects.net (William Tanksley) +Date: Thu, 29 Apr 1999 23:18:25 GMT +Subject: Dangers of C++ (Way off topic) +References: <613145F79272D211914B0020AFF6401914DAD8@gandalf.digicool.com> <372769B0.3CE8C0F3@prescod.net> <372827D8.7A5F@mailserver.hursley.ibm.com> +Message-ID: +Content-Length: 2013 +X-UID: 1305 + +On Thu, 29 Apr 1999 10:35:20 +0100, Paul Duffin wrote: +>William Tanksley wrote: + +>> Let me expand a little on the dangers of C++. + +>> - virtual functions. It shouldn't be my job to tell the compiler when +>> virtual lookups are the only thing to do; the compiler ought to be able to +>> tell. For performance gurus, a way to hint to the compiler that virtual +>> lookups were _not_ needed might be useful -- but what if the programmer +>> was wrong? + +>How can the compiler tell ? + +Because there's only one possibility in all of the libraries with which +the system is linked. Or perhaps it can tell in some other way -- perhaps +the object to which the message is being sent was just declared and +couldn't have changed. + +But let's suppose you have the stupidest compiler in the world (i.e. one +that never makes optimizations). What's the _worst_ thing that could +happen if functions defaulted to virtual? Your code would be a tiny bit +slower. Yawn. + +But with only a little more cleverness in the compiler, you wind up with +the compiler able to make virtual calls when virtual calls are needed, and +direct ones otherwise. This means that the same function could be called +virtually one moment and directly the next. + +>> - inline functions. Again, a good compiler HAS to make this decision for +>> itself, and in a good compiler, whether or not this decision was made +>> should be transparent to the programmer. + +>A good compiler will, inline is only a hint to the compiler, the compiler +>can choose whether or not to inline that function, it can also choose to +>inline other functions which have not been marked as inline. + +Good. So get rid of it. + +Oh, and even a good C++ compiler can't choose to inline a function which +wasn't defined in the header file. And at that, it doesn't have complete +information about what the global impact of inlining will be -- only for +that one module. + +>Paul Duffin + +-- +-William "Billy" Tanksley +"But you shall not escape my iambics." + -- Gaius Valerius Catullus + + + + diff --git a/demo/ermis-f/python_m/cur/1306 b/demo/ermis-f/python_m/cur/1306 new file mode 100644 index 00000000..c833302d --- /dev/null +++ b/demo/ermis-f/python_m/cur/1306 @@ -0,0 +1,46 @@ +From: bwarsaw at cnri.reston.va.us (Barry A. Warsaw) +Date: Wed, 21 Apr 1999 14:58:36 -0400 (EDT) +Subject: Python mailing lists are moving! +Message-ID: <14110.8156.698067.110820@anthem.cnri.reston.va.us> +Content-Length: 1504 +X-UID: 1306 + +This message is for folks who are currently receiving the the Python +list traffic via python-list at cwi.nl or python-announce-list at cwi.nl, or +would like to receive comp.lang.python or comp.lang.python.announce +via email instead of Usenet. + +We are finally moving the mailing lists from cwi.nl to python.org. +The lists at python.org will be managed by Mailman and will still be +gatewayed to the Usenet newsgroups. We are not going to move people's +subscriptions enmasse (yet). For the time being if you want to switch +your subscription you should: + + 1) send an unsubscribe request to python-list-request at cwi.nl + + 2) Visit http://www.python.org/mailman/listinfo/python-list + and fill out a subscription request + +(same goes for python-announce-list, just substitute +`python-announce-list' for `python-list' above). + +At some point when the majority of people have moved over, and we've +had the opportunity to stress the system with real traffic, we will +move the remaining subscribers over to python.org, but we'll announce +that before we do it. + +One advantage of moving to python-list at python.org is that you can set +your Mailman subscription to deliver the messages in digests (MIME or +`plain'). This is a nice middle ground between receiving the messages +immediately as they are posted, and reading them via Usenet. + +Feel free to begin sending messages to the list via +python-list at python.org. python-list at cwi.nl will become an alias for +this new address. + +Enjoy, +-Barry + + + + diff --git a/demo/ermis-f/python_m/cur/1307 b/demo/ermis-f/python_m/cur/1307 new file mode 100644 index 00000000..f4b281fc --- /dev/null +++ b/demo/ermis-f/python_m/cur/1307 @@ -0,0 +1,42 @@ +From: bernhard at alpha1.csd.uwm.edu (Bernhard Reiter) +Date: 20 Apr 1999 19:44:30 GMT +Subject: bzip2 module for Python +References: +Message-ID: +Content-Length: 1231 +X-UID: 1307 + +On Tue, 20 Apr 1999 09:54:49 +0100, Laurence Tratt wrote: +>In message <87zp43gaac.fsf at illusion.tui-net> +> Paul Kunysch wrote: +> +>[me 'announcing' pyBZlib] +>>> As I said, I am interested to know if there is a demand for this, so +>>> comments are appreciated. +>> IMHO it would be nice to have a module like the current "gzip", which +>> handles .bz2 .gz .Z and uncompressed files transparently. + +Hmmm the gzip module could eventually made compatible with +the functionality of the "gzip" GNU programm: + uncompressing .gz .Z (and pack) + compressing .gz + +A bzip2 module should be able to do, what the "bzip2" program can do. +But the two modules should work in the same way. + +This might be most intuitive for people, I think. + +>Do you mean you would like to see a module where you give it a file (which +>could be .bz2, .gz, .zip etc), and then get an uncompressed version back +>without worrying what compression type was used? Would you also want it to +>automatically untar files? + +untaring (or unzipping multiple files) is a totally different matter. +Someone could argu leaving that to the filesystem, because +that modules would need to act like an filesystem then. + + Bernhard + + + + diff --git a/demo/ermis-f/python_m/cur/1308 b/demo/ermis-f/python_m/cur/1308 new file mode 100644 index 00000000..6d7b6fae --- /dev/null +++ b/demo/ermis-f/python_m/cur/1308 @@ -0,0 +1,37 @@ +From: cppdan at dansmart.com (Daniel Smart) +Date: Sat, 24 Apr 1999 05:38:50 GMT +Subject: Time complexity of dictionary insertions +References: <000901be8e11$b4842560$f09e2299@tim> +Message-ID: <8DB21A313Me@news.rdc1.ct.home.com> +X-UID: 1308 + +[posted and mailed] + +Tim Peters wrote in +<000901be8e11$b4842560$f09e2299 at tim>: + +>[someone asks about the time complexity of Python dict insertions] +> +>[Tim replies] +>[one person confuses the issue] +>[and another compounds it] +>This one-ups-man-ship would be a lot cuter if Python's dict insertion +>were in fact amortized constant time <0.9 wink>. It's not, and the +>answer I gave doesn't imply that it is. Insertion in STL hashed +>associative containers isn't ACT either. +> +This attempt at one-ups-man-ship would be a lot cuter if the STL had any +kind of hashed containers, associative or otherwise, whose performance +could be quoted! + +>reassuringly y'rs - tim + +Argumentatively y'rs - dan. + +-- +Dan Smart. C++ Programming and Mentoring. +cppdan at dansmart.com + + + + diff --git a/demo/ermis-f/python_m/cur/1309 b/demo/ermis-f/python_m/cur/1309 new file mode 100644 index 00000000..ddc89bb5 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1309 @@ -0,0 +1,40 @@ +From: nelson at crynwr.com (Russell Nelson) +Date: 18 Apr 1999 01:06:33 -0400 +Subject: Why no "=" in if? (was Re: Quick fix to add "+=") +References: <3717EE20.41343593@mediaone.net> <000701be888f$12fe2920$ee9e2299@tim> +Message-ID: +X-UID: 1309 + +aahz at netcom.com (Aahz Maruch) writes: + +> I'm getting really sick of the way I have to use this stupid construct: +> +> x = foo() +> if x: +> ... +> +> instead of +> +> if x = foo(): +> ... +> +> Why doesn't Guido get off his duff and fix this?????????! + +I'm really sick of the way I get to use this stupid construct: + +if x == foo(): + +I think we should go back to the days of condition codes: + +compare(x, foo()) +ife: + +-- +-russ nelson http://crynwr.com/~nelson +Crynwr supports Open Source(tm) Software| PGPok | There is good evidence +521 Pleasant Valley Rd. | +1 315 268 1925 voice | that freedom is the +Potsdam, NY 13676-3213 | +1 315 268 9201 FAX | cause of world peace. + + + + diff --git a/demo/ermis-f/python_m/cur/1310 b/demo/ermis-f/python_m/cur/1310 new file mode 100644 index 00000000..7848ec0a --- /dev/null +++ b/demo/ermis-f/python_m/cur/1310 @@ -0,0 +1,85 @@ +From: tismer at appliedbiometrics.com (Christian Tismer) +Date: Tue, 20 Apr 1999 20:09:42 GMT +Subject: Win32: os.listdir() on a non-existent directory +References: <335a0ac6.114790@news.demon.co.uk> +Message-ID: <371CDF06.9166182D@appliedbiometrics.com> +Content-Length: 2540 +X-UID: 1310 + +Responding to a thread which is slightly +out of date (exactly 2 years old), +but today we stepped into this again, and nobody +really seemed to take care about it. +Anyway, something must be done, it cannot stay as it is. + +Paul Moore wrote: +> +> I'm running Python 1.4 on Windows 95. If I do +> +> import os +> p = os.listdir("C:\\banana") +> +> I get +> +> Traceback (innermost last): +> File "", line 1, in ? +> nt.error: (3, 'No such process') + +Well, meanwhile this has been changed to os.error, but +the same wrong error message is still there. + +The os returns an error message number 3. +This is defined in the Windows Syserr.c file as + +#ifdef _WIN32 + +char *_sys_errlist[] = +{ + /* 0 */ "No error", + /* 1 EPERM */ "Operation not permitted", + /* 2 ENOENT */ "No such file or directory", + /* 3 ESRCH */ "No such process", + /* 4 EINTR */ "Interrupted function call", + +But, the meaning is different. +What is meant instead is a Unix error message which is mapped +to DOS error messages in the Windows Dosmap.c file: + + +static struct errentry errtable[] = { + { ERROR_INVALID_FUNCTION, EINVAL }, /* 1 */ + { ERROR_FILE_NOT_FOUND, ENOENT }, /* 2 */ + { ERROR_PATH_NOT_FOUND, ENOENT }, /* 3 */ + { ERROR_TOO_MANY_OPEN_FILES, EMFILE }, /* 4 */ + { ERROR_ACCESS_DENIED, EACCES }, /* 5 */ + +What we really get is a correct Unix System V error number. +The error is to take it as-is, without translation to +the internal DOS errors. + +Now, MSDN says in "_doserrno, errno, _sys_errlist, and _sys_nerr": + +On an error, errno is not necessarily set to the same value as the error +code returned by a system call. For I/O operations only, use _doserrno +to access the operating-system error-code equivalents of errno codes. +For other operations the value of _doserrno is undefined. + +For me this means we must either output our own posix message +or map the error code to a DOS code. + +I'd like to correct this. +What is "the right thing"(tm) ? + +ciao - chris + +-- +Christian Tismer :^) +Applied Biometrics GmbH : Have a break! Take a ride on Python's +Kaiserin-Augusta-Allee 101 : *Starship* http://starship.python.net +10553 Berlin : PGP key -> http://wwwkeys.pgp.net +PGP Fingerprint E182 71C7 1A9D 66E9 9D15 D3CC D4D7 93E2 1FAE F6DF + we're tired of banana software - shipped green, ripens at home + + + + diff --git a/demo/ermis-f/python_m/cur/1311 b/demo/ermis-f/python_m/cur/1311 new file mode 100644 index 00000000..5b22ce5c --- /dev/null +++ b/demo/ermis-f/python_m/cur/1311 @@ -0,0 +1,43 @@ +From: fellowsd at cs.man.ac.uk (Donal K. Fellows) +Date: 22 Apr 1999 10:52:52 GMT +Subject: The Future of Tk? +References: <371E964F.C531C2A@istar.ca> +Message-ID: <7fmv24$agu$1@m1.cs.man.ac.uk> +Content-Length: 1629 +X-UID: 1311 + +In article <371E964F.C531C2A at istar.ca>, +Eugene Dragoev wrote: +> Is there going to be any Tk implementation that will continue using +> lightweight components? + +No current Tk implementation uses lightweight components. All are +heavy (which actually merely means that they have their own window +each.) One of the things that might come out of the TkGS work at some +point may be lightweight components. There are other issues being +resolved there first though... + +On the subject of what you thought lightweight components were: There +was a substantial discussion on this matter long ago (at the start of +the 8.0 cycle) and the decision was reached that what many people +actually wanted was not components that looked the same on all +platforms (they had that before and didn't like it) but rather +components that fitted in on the platform that they were being run +under at the time. Like that, an application that looks like it +belongs when running under Solaris/CDE also looks like it belongs when +running on Windows or on the Mac. We feel that this is a good thing, +and it is the business of making apps look (and eventually feel) like +they belong that is one of the major motivations of the TkGS project. + +Or at least, that's the way *I* see and remember it. YMMV. + +Donal. +-- +Donal K. Fellows http://www.cs.man.ac.uk/~fellowsd/ fellowsd at cs.man.ac.uk +-- The small advantage of not having California being part of my country would + be overweighed by having California as a heavily-armed rabid weasel on our + borders. -- David Parsons + + + + diff --git a/demo/ermis-f/python_m/cur/1312 b/demo/ermis-f/python_m/cur/1312 new file mode 100644 index 00000000..92a55068 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1312 @@ -0,0 +1,24 @@ +From: lutz at rmi.net (Mark Lutz) +Date: Wed, 28 Apr 1999 18:28:18 -0600 (MDT) +Subject: Maximize Benefit when Purchasing Learning Python +Message-ID: <199904290028.SAA20624@shell.rmi.net> +X-UID: 1312 + +David Ascher wrote: +> On Wed, 28 Apr 1999 jkraai at murl.com wrote: +> +> How can I help whom when purchasing Python books? +> +> I'll dare to speak for Mark, and say that you should feel free to send +> either Mark or I (or both) checks for any amount whatsoever. Skip the +> middleman. Save trees -- don't buy the book, just send us cash. Don't +> hesitate for a minute. + +What he said. (Though you could save another +middleman by making the check out to my wife.) + +--Mark Lutz (http://rmi.net/~lutz) + + + + diff --git a/demo/ermis-f/python_m/cur/1313 b/demo/ermis-f/python_m/cur/1313 new file mode 100644 index 00000000..92c2e404 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1313 @@ -0,0 +1,83 @@ +From: steve at estel.uindy.edu (Steve Spicklemire) +Date: Mon, 12 Apr 1999 10:38:47 GMT +Subject: forking + stdout = confusion +In-Reply-To: (clarence@silcom.com) +References: +Message-ID: <199904121038.FAA28479@estel.uindy.edu> +Content-Length: 1981 +X-UID: 1313 + +Hi Clarence, + +>>>>> "Clarence" == Clarence Gardner writes: + +[snip] + + Clarence> def LateShift(): + Clarence> OutputID = `os.getpid()` + Clarence> Child = os.fork() + Clarence> if Child: + Clarence> print 'content-type: text/plain' + Clarence> print + Clarence> print '''The program is waiting to run later. The output will + Clarence> be available with the id number of %s. + Clarence> ''' % OutputID + Clarence> sys.exit(0) + Clarence> sys.stdin.close() + Clarence> sys.stdout.close() + Clarence> sys.stderr.close() + Clarence> sys.stdout = open(os.path.join(SpoolDir, OutputID), 'w') + Clarence> sys.stderr = sys.stdout + Clarence> time.sleep(15) + +[snip] + +Hmm.. the following code works for me: + + try: + serr = sys.stderr + sys.stderr = sys.stdout + + sys.stdout.flush() + pid = os.fork() + if pid: + # + # OK...we are the parent process + # + sys.stdout.close() + sys.stdin.close() + + os.wait() + else: + sys.stderr = serr + sys.stdout.close() + sys.stdin.close() + + ... on to do time consuming task..... + + Clarence> I thought that maybe sys.stdout was using a dup()'ed + Clarence> copy of stdout, but I checked sys.stdout.fileno() and it + Clarence> was 1, so that doesn't seem to be the case. + + Clarence> Can anyone hazard a guess (or see right off the top of + Clarence> his head) what's going on here? Thanks for any help. + +I'm not sure, but I think sys.stdout is always 1. I think you need to close +sys.stdxxx in both processes explicitly. At least it works on my systems. + +good luck! +-steve + + Clarence> -- -=-=-=-=-=-=-=-= Clarence Gardner AvTel + Clarence> Communications Software Products and Services Division + Clarence> clarence at avtel.com + + + + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1314 b/demo/ermis-f/python_m/cur/1314 new file mode 100644 index 00000000..90bf4062 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1314 @@ -0,0 +1,24 @@ +From: nascheme at m67.enme.ucalgary.ca (Neil Schemenauer) +Date: 16 Apr 1999 20:30:19 GMT +Subject: Python.org scheduled down time +References: <14103.22251.209537.804890@anthem.cnri.reston.va.us> +Message-ID: <7f86kr$bd2@ds2.acs.ucalgary.ca> +X-UID: 1314 + +On Fri, 16 Apr 1999 11:27:39 -0400 (EDT), +Barry A. Warsaw wrote: +> +>Folks, +> +>parrot.python.org, the machine that hosts web, mail and ftp, will be +>taken down today 16-Apr-1999 at 4pm GMT -0500 for approximately 1/2 +>hour. We need to install some new hardware. + +Is ftp.python.org mirrored anywhere? + + + Neil + + + + diff --git a/demo/ermis-f/python_m/cur/1315 b/demo/ermis-f/python_m/cur/1315 new file mode 100644 index 00000000..ea86b76b --- /dev/null +++ b/demo/ermis-f/python_m/cur/1315 @@ -0,0 +1,111 @@ +From: mal at lemburg.com (M.-A. Lemburg) +Date: Tue, 27 Apr 1999 16:07:32 +0200 +Subject: ANN: mxODBC Package - Version 1.1.0 +Message-ID: <3725C4A4.1C06FB72@lemburg.com> +Content-Length: 3879 +X-UID: 1315 + +ANNOUNCING: + + mxODBC Version 1.1.0 + + A Python Extension Package providing a generic + Interface to ODBC 2.0 API compliant + Database Drivers or Managers + + +WHAT IT IS: + +mxODBC is an extension package that provides a Python Database +API compliant interface to ODBC 2.0 capable database drivers +and managers. In addition to the capabilities provided through +the standard API it also provides a rich set of catalog methods +that allow you to scan the database for tables, procedures, etc. +Furthermore, it uses the mxDateTime package for date/time value +interfacing eliminating most of the problems these types normally +introduce. + +mxODBC is known to work with Adabas, MySQL, iODBC Unix ODBC Manager, +Solid, Sybase, OpenLink and Intersolv ODBC drivers, Oracle/NT, +EasySofts ODBC-ODBC bridge and the Windows ODBC Manager. +This covers pretty much the whole range of well known relational +database engines and gives you all the connectivity you'll need for +doing great database work in Python. + +WHAT'S NEW ? + +The 1.1.0 version is the start of moving from DB API 1.0 to +DB API 2.0. Not all changes have been implemented yet, but most +of the interface was overhauled in order to become DB API 2.0 +compatible. Since mxODBC has been using an extended version +of the DB API standard for some time already the changes are +kept to a minimum. See the documentation for more details. + +Starting with this version, mxODBC knows about two different +ways to bind Python data to SQL statement parameters: + +The first was in use ever since the first version: SQL type binding. +In this mode the database is queried for the data type and +the Python parameters are then converted into those types. + +The new binding mode in this version is Python type binding. +Here, the Python programmer has to know which types are to +be used for the parameters and the conversion is left to the +database. This is of course not as elegant as the first method, +but the only way to get some database to work together with +mxODBC (since their drivers are missing an important ODBC API). + +As a result, mxODBC can now also be used to connect to MS Access. +In fact, the archive contains a precompiled binary which will +let you start working right away. + +To test your database's capabilities (and the mxODBC connection +to it), the package now comes with a generic test script. This +provides two features: 1. column type detection and 2. memory +leak detection. Note that there are no known leaks in mxODBC; +OTOH, several ODBC drivers do leak. + +WHERE CAN I GET IT ? + +The full documentation and instructions for downloading and +installing can be found at: + + http://starship.skyport.net/~lemburg/mxODBC.html + +The mxDateTime package needed for mxODBC can be found at: + + http://starship.skyport.net/~lemburg/mxDateTime.html + +WHAT DOES IT COST ? + +mxODBC comes with a slightly modified Python-style license: +Usage is free for non-commercial and commercial internal use. +Redistribution of the package in commercial products requires a +separate license and will only be free if the product itself is +free. + +Detailed license information is available at: + + http://starship.skyport.net/~lemburg/mxODBC-License.html + +WHERE CAN I GET SUPPORT ? + +I am offering commercial support for this package through +Python Professional Services Inc. (http://www.pythonpros.com). +Look on their support pages for details or contact me directly. + +REFERENCE: + +

<371f956b.70694328@news.bctel.ca> +Message-ID: <37207AAE.172D16B6@bigfoot.com> +Content-Length: 2083 +X-UID: 1317 + +Guppy, + + Do you know if I can embed & display a COM obj in wxPython? wxPy is +good, but needs good graphics package like Graphics Server. + I have linked VB with Python via COM. It's a pretty decent solution. I +get all the graphics stuff of VB screens and it's much much easier than +using MFC. Only problem is it takes about 20 sec to shoot up the first +form and passing large array back and forth via COM takes some time. + Good MFC reference would really be great. MS still leads everyone on +the GUI portion by great margin. Now if we only had IDE like VB where I +can just draw controls and hit . to get all attributes and methods. I +wish I was good enough to write Visual Pyhon. + +Hoon, + + +guppy wrote: +> +> On Wed, 21 Apr 1999 20:53:08 GMT, smoothasice at geocities.com wrote: +> +> >Ok i've been playing Python for a long time and I am just now wanting +> >to expand to learning the visual portion of it.(A.k.a Gui/MFC) but I +> >have found that there is a diffinite lack of information on the site and +> >I Haven't been able to find a book and I was wondering if there is +> >anyone out there that could help me out or perhaps direct me towards +> >where I could find info on it. +> +> Could try wxPython. +> -- +> MSpeak: in-no-va-tion, n. 1. extending or modifying +> existing standards in undocumented ways. 2. creating +> new, undocumented standards. --de-com-mod-it-ize, v. + +-- +***************************************************************************** +S. Hoon Yoon (Quant) Merrill Lynch Equity Trading, +yelled at yahoo.com hoon at bigfoot.com(w) +"Miracle is always only few standard deviations away, but so is +catastrophe." +* Expressed opinions are often my own, but NOT my employer's. +"I feel like a fugitive from the law of averages." Mauldin +***************************************************************************** +-------------- next part -------------- +A non-text attachment was scrubbed... +Name: vcard.vcf +Type: text/x-vcard +Size: 202 bytes +Desc: Card for Hoon Yoon +URL: + + diff --git a/demo/ermis-f/python_m/cur/1318 b/demo/ermis-f/python_m/cur/1318 new file mode 100644 index 00000000..58670d22 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1318 @@ -0,0 +1,50 @@ +From: fredrik at pythonware.com (Fredrik Lundh) +Date: Tue, 13 Apr 1999 14:19:18 GMT +Subject: Converting a string to a tuple +References: <01be8530$65bb7120$52037e81@saints> <14098.28727.245158.616727@buffalo.fnal.gov> <00f501be857f$ff636f40$f29b12c2@pythonware.com> <01be85b5$f7197c90$52037e81@saints> +Message-ID: <008f01be85b8$a5be9580$f29b12c2@pythonware.com> +X-UID: 1318 + +Bruce Huzyk wrote: +> I will now take this opportunity to revise my original post. +> I wish to convert a string to a tuple. +> My sample string should have been: +> s = '(1, "abc\\tef", 2)' +> instead of: +> s = '(1, "abc\\def", 2)' + +if that's Python source code, your string +actually contains: + + (1, "abc\tef", 2) + +since \\ is Python's string representation +for a single backslash (that is, \\ in the +source code becomes \ in the actual +string). + +and \t is an alias for \011 (a tab). + +try printing it (using print) to see what +I mean. + +but I doubt that this is the real problem -- +if you have these strings in Python source +code, you could as well use your editor +to remove the quotes, right? + +so if you get the data from a file or any +other external source, the plain eval +solutions work as they should. for +simple data types like this, + + v == eval(repr(v)) + +is always true. + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1319 b/demo/ermis-f/python_m/cur/1319 new file mode 100644 index 00000000..14ec4b0f --- /dev/null +++ b/demo/ermis-f/python_m/cur/1319 @@ -0,0 +1,21 @@ +From: mal at lemburg.com (M.-A. Lemburg) +Date: Tue, 13 Apr 1999 07:48:18 GMT +Subject: Is comp.lang.python.announce "offline" ? +Message-ID: <3712F6C2.50F7BE6A@lemburg.com> +X-UID: 1319 + +There have been no new messages in that newsgroup since 1999-03-30, +but I'm pretty sure that I did mail some announcements there. + +Does anybody know details ? + +-- +Marc-Andre Lemburg Y2000: 262 days left +--------------------------------------------------------------------- + : Python Pages >>> http://starship.skyport.net/~lemburg/ : + --------------------------------------------------------- + + + + + diff --git a/demo/ermis-f/python_m/cur/1320 b/demo/ermis-f/python_m/cur/1320 new file mode 100644 index 00000000..097301cd --- /dev/null +++ b/demo/ermis-f/python_m/cur/1320 @@ -0,0 +1,17 @@ +From: jeremy at cnri.reston.va.us (Jeremy Hylton) +Date: Thu, 8 Apr 1999 16:50:37 -0400 (EDT) +Subject: Internet Robot +In-Reply-To: +References: <7ehe9m$hbs$1@nnrp1.dejanews.com> + +Message-ID: <14093.5746.99707.193428@bitdiddle.cnri.reston.va.us> +X-UID: 1320 + +Or use urllib in the standard library. Usage is: +urllib.urlopen(url, post_data) + +Jeremy + + + + diff --git a/demo/ermis-f/python_m/cur/1321 b/demo/ermis-f/python_m/cur/1321 new file mode 100644 index 00000000..0d983824 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1321 @@ -0,0 +1,40 @@ +From: joe at strout.net (Joe Strout) +Date: Fri, 23 Apr 1999 11:11:46 -0700 +Subject: Style/efficiency question using 'in' +References: <3720B3B9.98BED320@earth.ox.ac.uk> +Message-ID: +X-UID: 1321 + +In article <3720B3B9.98BED320 at earth.ox.ac.uk>, Nick Belshaw + wrote: + +> If I do something like :- +> +> ------------------ +> def func1(): +> return 1,2,3,4,5,6,7,8 +> +> for x in func1(): +> print x +> ------------------ +> +> it works as expected but is the use of a function in a loop undesirable? +> Is the function called once to build the loop or is it called each loop +> increment and therefore undesirable if there is much overhead? + +It's called once to build the loop, as you can prove to yourself by +inserting "print 'spam'" into func1(). + +Cheers, +-- Joe + +-- +,------------------------------------------------------------------. +| Joseph J. Strout Biocomputing -- The Salk Institute | +| joe at strout.net http://www.strout.net | +`------------------------------------------------------------------' +Check out the Mac Web Directory! http://www.strout.net/macweb.cgi + + + + diff --git a/demo/ermis-f/python_m/cur/1322 b/demo/ermis-f/python_m/cur/1322 new file mode 100644 index 00000000..9d725bd9 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1322 @@ -0,0 +1,40 @@ +From: alan.gauld at gssec.bt.co.uk (Alan Gauld) +Date: Fri, 23 Apr 1999 13:28:12 +0100 +Subject: Emulating C++ coding style +References: <371F8FB7.92CE674F@pk.highway.ne.jp> +Message-ID: <3720675C.FF7A9E99@gssec.bt.co.uk> +X-UID: 1322 + +> >2. stream class +> > e.g. cout << "hello python."< +> VERY bad idea. Bad even in C++. + +Why? +Its one of the 'improvements' over C that allows +overridding of the << operator so that you can +write a class to any stream. Python does similar +with the _str_ mechanism but that doesn't allow +chaining of types together, which I do like in C++ + +so why is it a bad idea? + +Since its off-topic for the group respond by email +if you want... + +> In proper C++, your const will be contained inside a class (probably +> static) to keep it out of the global namespace. + +Hopefully not. It should be contained within a C++ namespace. + +Alan G. + +-- +================================================= +This post represents the views of the author +and does not necessarily accurately represent +the views of BT. + + + + diff --git a/demo/ermis-f/python_m/cur/1323 b/demo/ermis-f/python_m/cur/1323 new file mode 100644 index 00000000..c57598f9 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1323 @@ -0,0 +1,50 @@ +From: jam at newimage.com (jam) +Date: Sun, 25 Apr 1999 18:32:29 -0400 +Subject: perl v python +In-Reply-To: <37238A6A.E245337D@btinternet.com>; from Mark E. Owen on Sun, Apr 25, 1999 at 10:34:34PM +0100 +References: <37238A6A.E245337D@btinternet.com> +Message-ID: <19990425183229.B17114@toast.internal> +Content-Length: 1426 +X-UID: 1323 + +On Sun, Apr 25, 1999 at 10:34:34PM +0100, Mark E. Owen wrote: +> +> I've been using perl quite some time, just starting looking +> at Python. +> +> what's peoples views/comparisons of both languages? +> +> Cheers +> Mark +> + +greetings, + +though perhaps considered a bit dated, I found the following reference on +the python.org site : + + "Python and Perl come from a similar background (Unix scripting, which + both have long outgrown), and sport many similar features, but have a + different philosophy. Perl emphasizes support for common + application-oriented tasks, e.g. by having built-in regular expressions, + file scanning and report generating features. Python emphasizes support + for common programming methodologies such as data structure design and + object-oriented programming, and encourages programmers to write readable + (and thus maintainable) code by providing an elegant but not overly + cryptic notation. As a consequence, Python comes close to Perl but rarely + beats it in its original application domain; however Python has an + applicability well beyond Perl's niche." + +there have also been numerous posts on c.l.python regarding this very +topic.. have a look through dejanews. + +regards, +J +-- +|| visit gfd +|| psa member #293 +|| New Image Systems & Services, Inc. + + + + diff --git a/demo/ermis-f/python_m/cur/1324 b/demo/ermis-f/python_m/cur/1324 new file mode 100644 index 00000000..80192382 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1324 @@ -0,0 +1,68 @@ +From: mlh at idt.ntnu.no (Magnus L. Hetland) +Date: 25 Apr 1999 21:35:08 +0200 +Subject: Efficient List Subtraction +References: <3720EF73.CA7DDEFF@Colorado.edu> +Message-ID: +Content-Length: 1547 +X-UID: 1324 + +KELLEY SCOTT T writes: + +> Does anyone out there have a simple way to compare two lists (some operator perhaps) and +> return +> a list of *differences*? By differences, I mean the following: If had two +> lists like, +> +> a = [1, 4, 5, 100] +> b = [4, 5] + +(Check dejanews for similar reply to several similar functions...) + + +You can use dictionaries. + +def difference(a,b): + result = {} + for element in a: + result[element] = 1 + for element in b: + if result.has_key(element): + del result[element] + return result.keys() +> +> the difference between a and b (a-b) would be [1, 100]. I suppose you could +> write a couple of for loops to go through each list and compare them, but I +> thought there might be a simple way to do this. + +At least hashtables makes it more efficient. + +> I'm also interested in a simple way to returning a list of what is identical between the +> two lists. +> In the case of the above lists, a and b, they both contain [4, 5]. + +Same thing, basically... Just do something like: + +def intersection(a,b): + temp = {} + result = [] + for elt in a: + temp[elt] = 1 + for elt in b: + if temp.has_key(elt): + result.append(elt) + return result + +> +> If anyone out there has a suggestion (or two) I would very much appreciate it. +> +> Cheers! -Scott + +-- + > Hi! I'm the signature virus 99! + Magnus > Copy me into your signature and join the fun! + Lie + Hetland http://arcadia.laiv.org + + + + diff --git a/demo/ermis-f/python_m/cur/1325 b/demo/ermis-f/python_m/cur/1325 new file mode 100644 index 00000000..4ada5b99 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1325 @@ -0,0 +1,64 @@ +From: MHammond at skippinet.com.au (Mark Hammond) +Date: Fri, 9 Apr 1999 11:20:32 +1000 +Subject: COM Event Sinks and Connection Points in Python +References: <7eggfh$o0f$1@nnrp1.dejanews.com> <7egnl2$ca5$1@m2.c2.telstra-mm.net.au> <3711134d.17632096@news.freeserve.net> +Message-ID: <7ejkjt$67g$1@m2.c2.telstra-mm.net.au> +Content-Length: 1902 +X-UID: 1325 + +Toby Dickenson wrote in message <3711134d.17632096 at news.freeserve.net>... +>"Mark Hammond" wrote: + +>For controls this is to be expected. They are allowed to be fairly +>non-functional until activated, which requires a control site. They might +>implement IDispatch, but they can not be used a 'just' an automation +server. + +Actually, in many cases, I can use the functionality of the objects - just +not get events. Excel, Word and MSAgent are good examples - can use the +IDispatch interfaces fine, but cant get events. + +However, Im not convinced it isnt something silly I have done, lacking the +time to give it serious effort. + +>If I remove the extra 'return' from testPyComTest.py then I always get a +>Fatal Python error: PyThreadState_Get: no current thread +>Is this the bug you mean? I think I have some answers.... + +Yes, and great! + +>I believe this problem is not caused by a bug in pythoncom, but by several +bugs +>in PyCOMTest, the C++ server that complements this test harness. +> +>In PyCOMImpl.cpp, line 49, a new thread is started. That thread uses the +Fire +>method of the CPyCOMTest object, however this breaks the COM apartment +rules. To +>pass an object reference across apartments you need to use +>CoMarshalInterThreadInterfaceInStream, at least once. + +ohh. Yes. good point. This means it probably should work if we init +Pythoncom as free-threaded. + +>Secondly, the new thread does not call CoInitializeEx. +Oops. +> +>Hopefully I will have time to dig further next week. + +Great - let me know if it fixes it! However, the particular thread state +error from Python makes me think it wont - the problems you describe would, +to me, imply different symptoms. + +I am sort-of hoping that this is actually finding a threading bug in the COM +framework. If so, it will be useful as it is easily reproducible. Ahhh, +for more time to play with this stuff... + +Mark. + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1326 b/demo/ermis-f/python_m/cur/1326 new file mode 100644 index 00000000..5165cd45 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1326 @@ -0,0 +1,18 @@ +From: euroibc at solair1.inter.NL.net (martin van nijnatten) +Date: Tue, 20 Apr 1999 18:59:01 +0200 +Subject: opening more than 1 file +Message-ID: <371CB255.5FCAFBAF@solair1.inter.NL.net> +X-UID: 1326 + +I have a variable, which can have a value in the range from 1 to 20. + +If the value is 7, I have to open 7 files. + +What could be an elegant way of doing this? + +Martin + + + + + diff --git a/demo/ermis-f/python_m/cur/1327 b/demo/ermis-f/python_m/cur/1327 new file mode 100644 index 00000000..ee9a5474 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1327 @@ -0,0 +1,61 @@ +From: arcege at shore.net (Michael P. Reilly) +Date: Thu, 08 Apr 1999 15:15:36 GMT +Subject: Tkinter bug in Misc.tkraise, Canvas.tkraise +References: <199904062020.QAA05784@python.org> <199904062043.QAA21700@eric.cnri.reston.va.us> +Message-ID: +Content-Length: 1779 +X-UID: 1327 + +Guido van Rossum wrote: +:> It is not a bug with either code, it is a naming problem. The +:> Canvas.tkraise is calling the correct code, but it should be called +:> tag_raise, not tkraise (see the Text widget for naming choice). +:> +:> Fredrik or Guido, is this something you can change for before 1.5.2 is +:> released? (I don't see anything on www.python.org/1.5/ that says when +:> 1.5.2 will be done except "mid March", which has gone by.) + +: You are right that there is a naming conflict. Unfortunately the +: default rules for naming Tk subcommands yield this conflict and I +: didn't catch it when I (or whoever it was) originally created the +: Canvas class. The Canvas.bind() method shows a precedent for naming +: it tag_raise() as you propose. + +Actually, I got the name "tag_raise" from the method in the Text class +of the same name. + +: Unfortunately, I cannot make this change without breaking all existing +: code that was using Canvas.tkraise() for raising Canvas items (instead +: of raising the Canvas itself). I can add tag_raise() and then in 1.6 +: we can delete the tkraise() and lift() names. + +Good enough for me. + +: Other issues: + +: - As someone else suggested, the proper solution is +: Misc.tkraise(canvasobject). + +The proper interim solution only, I think. + +: - /Fredrik Lundh is responsible for *documenting* Tkinter, but not for +: its maintenance (although he contributed a bunch of support modules). +: The maintenance of Tkinter is strictly my responsibility. (Not that I +: asked for it. :-) + +Well.. I knew he was in there somewhere. ;) Sorry, Fredrik! + +: - 1.5.2 will more likely be released around mid-April. + +I'm awaitin'. :) + +: --Guido van Rossum (home page: http://www.python.org/~guido/) + +Thanks, Guido! + + -Arcege + + + + + diff --git a/demo/ermis-f/python_m/cur/1328 b/demo/ermis-f/python_m/cur/1328 new file mode 100644 index 00000000..ad50dfb3 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1328 @@ -0,0 +1,40 @@ +From: Marten.Hedman at btk.utu.fi (=?iso-8859-1?Q?M=E5rten?= Hedman) +Date: Tue, 13 Apr 1999 17:05:47 +0300 +Subject: Help: Tkinter, bad event type +Message-ID: <37134F3B.8C583E0@btk.utu.fi> +X-UID: 1328 + +Hi + +I'm running Python 1.5.2c1 under Win NT with SP4 and Tcl/Tk 8.05. When I +try to run any script that uses Tkinter, even hello.py from the Tkinter +Life Preserver, I get two identical error messages: + + bad event type or keysym "MouseWheel" + while executing "bind Listbox ..." invoked from + /listbox.tcl + ... + invoked from /tk.tcl + +I can work around this by editing listbox.tcl and commenting out the +"bind Listbox ..." statement, but I have to do this every +time I install a new version of Tcl/Tk, and it's annoying. + +The same thing happened when I downloaded Python 1.5.2b2, and allowed +the installer to install Tcl/Tk. I have tried downloading a fresh copy +of Tcl/Tk and reinstalling it, but the problem persists. + +Tk scripts work fine without the modifying of listbox.tcl, so it seems +to be a problem in the interface between Python and Tk. + +Any help would be appreciated + +Yours + +Marten Hedman +Centre for Biotechnology +Turku, Finland + + + + diff --git a/demo/ermis-f/python_m/cur/1329 b/demo/ermis-f/python_m/cur/1329 new file mode 100644 index 00000000..b7c84a29 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1329 @@ -0,0 +1,65 @@ +From: ivanlan at callware.com (Ivan Van Laningham) +Date: Fri, 23 Apr 1999 19:03:15 GMT +Subject: Style/efficiency question using 'in' +References: <3720B3B9.98BED320@earth.ox.ac.uk> +Message-ID: <3720C3F3.CFF6D739@callware.com> +Content-Length: 1546 +X-UID: 1329 + +Pythonistas-- + +Nick Belshaw wrote: +> +> If someone could spare a mo to clarify - +> +> If I do something like :- +> +> ------------------ +> def func1(): +> return 1,2,3,4,5,6,7,8 +> +> for x in func1(): +> print x +> ------------------ +> +> it works as expected but is the use of a function in a loop undesirable? +> Is the function called once to build the loop or is it called each loop +> increment and therefore undesirable if there is much overhead? +> + +l = (1,2,3,4,5,6,7,8) +for x in l: + print x + +or + +for x in 1,2,3,4,5,6,7,8: + print x + +And your version, are all the same. In each case, a tuple is created; +in the middle case, the tuple is named. There is no ``loop +increment''--for just steps through the items in the sequence that it +sees in the order that it sees them. That's why handing for a reversed +list doesn't produce unexpected behaviour. + +The only undesirable effects of these three methods are that in (1), you +have created a named function that may only be used once; in (2), I +created a named variable which may only be used once; and in (3), the +tuple has no name and ceases to exist at the end of the for loop. Of +course, that means you can't use the tuple again, either;-) + +-ly y'rs, +Ivan +---------------------------------------------- +Ivan Van Laningham +Callware Technologies, Inc. +ivanlan at callware.com +http://www.pauahtun.org +See also: +http://www.foretec.com/python/workshops/1998-11/proceedings.html +Army Signal Corps: Cu Chi, Class of '70 +---------------------------------------------- + + + + diff --git a/demo/ermis-f/python_m/cur/1330 b/demo/ermis-f/python_m/cur/1330 new file mode 100644 index 00000000..7f7113de --- /dev/null +++ b/demo/ermis-f/python_m/cur/1330 @@ -0,0 +1,46 @@ +From: ivanlan at callware.com (Ivan Van Laningham) +Date: Wed, 14 Apr 1999 19:18:08 GMT +Subject: what do you do with Python +References: <816010E2456BD111A48700805FBBE2EEA63EFA@ex-quebec-u1.baan.com> +Message-ID: <3714E9F0.C3E925FB@callware.com> +Content-Length: 1073 +X-UID: 1330 + +Hi All-- + +Gaetan Corneau wrote: +> +> Susan, +> +> To see what Python does, take a look at http://www.python.org +> + +Also consider joining the Python Tutorial mailing list, if you are new +to programming or to Python. The address can be found on the python.org +pages (it has mysteriously vanished from my address book--that will +teach me to back up NetScape!), and is a quick way to get beginner's +questions answered. Someone will undoubtedly jump into the puddle with +both feet and provide the address on this list, if I don't beat them to +it, so watch this space;-) + +> If you want python job ads, take a look at http://www.dice.com +> There are many :) +> + +But *NONE* in Utah, dammit. + +-ly y'rs, +Ivan +---------------------------------------------- +Ivan Van Laningham +Callware Technologies, Inc. +ivanlan at callware.com +http://www.pauahtun.org +See also: +http://www.foretec.com/python/workshops/1998-11/proceedings.html +Army Signal Corps: Cu Chi, Class of '70 +---------------------------------------------- + + + + diff --git a/demo/ermis-f/python_m/cur/1331 b/demo/ermis-f/python_m/cur/1331 new file mode 100644 index 00000000..53e19162 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1331 @@ -0,0 +1,74 @@ +From: cjw at connection.com (Colin J. Williams) +Date: Mon, 19 Apr 1999 10:32:25 -0400 +Subject: Problems with PythonWin debugger & tk +Message-ID: <371B3E79.C7683E94@connection.com> +Content-Length: 2165 +X-UID: 1331 + +When attempting to use the debugger with the simplest of tk programs, a couple +of problems are observed: + +1. An exception is reported when the breakpoint is set. + +2. When stepping thro portions of tkinter, the coordination between the source +window and the debugger are lost after about line 1000. + +Below is the source script and the exception report. + +Are there known limitations when using the debugger with tkinter stuff? +This script works fine without the debugger. + +I would appreciate advise. + +Colin W. + +''' First test script. + + ''' + +from Tkinter import * +def test(): + root = Tk() + + w = Label(root, text="Hello, world!") + w.pack() <<<=== Breakpoint here! + + root.mainloop() + +if __name__ == '__main__': + test() + +Traceback (innermost last): + File "E:\Program Files\Python\Pythonwin\pywin\framework\scriptutils.py", line +234, in RunScript + debugger.run(codeObject, __main__.__dict__) + File "E:\Program Files\Python\Pythonwin\pywin\debugger\__init__.py", line 38, +in run + _GetCurrentDebugger().run(cmd, globals,locals) + File "E:\Program Files\Python\Pythonwin\pywin\debugger\debugger.py", line +988, in run + debugger_parent.run(self, cmd, globals, locals) + File "C:\Python\Lib\bdb.py", line 343, in run + exec cmd in globals, locals + File "C:\My Files\Python\Tkinter\T1.py", line 15, in ? + test() + File "C:\My Files\Python\Tkinter\T1.py", line 7, in test + root = Tk() + File "C:\Python\Lib\lib-tk\Tkinter.py", line 910, in __init__ + self.readprofile(baseName, className) + File "C:\Python\Lib\lib-tk\Tkinter.py", line 929, in readprofile + exec 'from Tkinter import *' in dir + File "", line 1, in ? + File "C:\Python\Lib\bdb.py", line 41, in trace_dispatch + return self.dispatch_call(frame, arg) + File "C:\Python\Lib\bdb.py", line 61, in dispatch_call + if not (self.stop_here(frame) or self.break_anywhere(frame)): + File "E:\Program Files\Python\Pythonwin\pywin\debugger\debugger.py", line +899, in break_anywhere + fname = string.lower(win32api.GetFullPathName(frame.f_code.co_filename)) +api_error: (161, 'GetFullPathName', 'The specified path is invalid.') + + + + + diff --git a/demo/ermis-f/python_m/cur/1332 b/demo/ermis-f/python_m/cur/1332 new file mode 100644 index 00000000..df4d6bdd --- /dev/null +++ b/demo/ermis-f/python_m/cur/1332 @@ -0,0 +1,38 @@ +From: brunomadv at ciudad.com.ar (Bruno Mattarollo) +Date: Sun, 11 Apr 1999 04:54:44 GMT +Subject: by-passing exception [Q] +Message-ID: <000101be83d7$6a77dc80$6eba0ac8@kuarajy.infosys.com.ar> +X-UID: 1332 + +Hi All Python Gurus ... + + Perhaps this is a stupid question, but it's saturday and it's almost 2AM, +so you may understand my state-of-mind :-) + + I have a script that has to check a directory for the existence of a file, +so I do a os.stat(path-to-file) ... But I want to continue processing even +if this file doesn't exist, so I tryed this: + + try: + os.stat(path-to-file) + except IOError, msg: + blah blah .... + + But I get an exception ... and it doesn't go into the except statement... +Should I be doing a os.listdir(path-to-dir-where-file-resides) and checking +there? + + I am a little bit confused ... Perhaps it's time to go to bed or to stop +drinking beer while working ... :-) + + TIA + +/B + +Bruno Mattarollo +... proud to be a PSA member + + + + + diff --git a/demo/ermis-f/python_m/cur/1333 b/demo/ermis-f/python_m/cur/1333 new file mode 100644 index 00000000..d5c698fc --- /dev/null +++ b/demo/ermis-f/python_m/cur/1333 @@ -0,0 +1,18 @@ +From: mark.thomas at gsc.gte.com (Justin Development) +Date: Wed, 7 Apr 1999 16:07:38 -0400 +Subject: Looking 4 C extention examples +Message-ID: <7egdv0$2at$1@news.gte.com> +X-UID: 1333 + +I'm looking for some C extention examples and their associated Python +modules to help me learn more about Python extending. + +Thanks!!! + + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1334 b/demo/ermis-f/python_m/cur/1334 new file mode 100644 index 00000000..1783cdc7 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1334 @@ -0,0 +1,32 @@ +From: roy at popmail.med.nyu.edu (Roy Smith) +Date: Tue, 13 Apr 1999 11:55:36 -0400 +Subject: forking + stdout = confusion +References: <87n20caldg.fsf@spock.localnet.de> +Message-ID: +X-UID: 1334 + +Carsten Schabacker wrote: +> No, the child and the parent share the SAME filedescriptors. This is true +> for ALL open files! So if you don't need the descriptors in a child or a +> parent you should close them. +> +> Apache waits for the end of the file, so all processes (parents and +> childs) must close the file! + +When doing a similar thing a while ago, I had similar problems :-) I +eventually found that in addition to doing sys.stdout.close(), I had to do +os.close(1) to make sure the fd really got closed. + +I'm still not sure I understand what was going on. I know that +sys.__stdout__ contains a copy of sys.stdout, so at first I figured that +doing both sys.stdout.close() and sys.__stdout__.close() would do the +trick, but it didn't, but os.close(1) did. + +-- +Roy Smith +New York University School of Medicine + + + + + diff --git a/demo/ermis-f/python_m/cur/1335 b/demo/ermis-f/python_m/cur/1335 new file mode 100644 index 00000000..7ef784c0 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1335 @@ -0,0 +1,34 @@ +From: robin at jessikat.demon.co.uk (Robin Becker) +Date: Tue, 13 Apr 1999 17:13:12 GMT +Subject: site.py & COM startup +In-Reply-To: <4D0A23B3F74DD111ACCD00805F31D8100DB90B2B@RED-MSG-50> +References: <4D0A23B3F74DD111ACCD00805F31D8100DB90B2B@RED-MSG-50> +Message-ID: <8DzenAAos3E3EwyI@jessikat.demon.co.uk> +X-UID: 1335 + +In message <4D0A23B3F74DD111ACCD00805F31D8100DB90B2B at RED-MSG-50>, Bill +Tutt writes +>I typically do something like: +> +>k_strModuleName = "swv2Phoenix" +> +>if __name__ == "__main__": +> import win32com.server.register +> import sys, regsetup +> # The next line is the equivalent of regsvr32 for a Python COM server. +> win32com.server.register.UseCommandLine(swMapping) +> # Tell the python DLL where to find this .py file +> regsetup.FindRegisterModule(k_strModuleName, k_strModuleName + '.py', +>sys.path) +> +>The call into regsetup, alters the Python registry settings to register +>where the .py file is located at. +> +>Bill +thanks that's useful +-- +Robin Becker + + + + diff --git a/demo/ermis-f/python_m/cur/1336 b/demo/ermis-f/python_m/cur/1336 new file mode 100644 index 00000000..7999ca1c --- /dev/null +++ b/demo/ermis-f/python_m/cur/1336 @@ -0,0 +1,41 @@ +From: gmcm at hypernet.com (Gordon McMillan) +Date: Wed, 14 Apr 1999 01:47:48 GMT +Subject: Windows install has problems. Guido asked that I use this ne +In-Reply-To: <924040766.18823.0.nnrp-12.9e982a40@news.demon.co.uk> +References: <924040766.18823.0.nnrp-12.9e982a40@news.demon.co.uk> +Message-ID: <1288067825-21306272@hypernet.com> +X-UID: 1336 + +Barry Scott writes: + +[troubles with tcl/tk and installer on NT] + +> As for the tcl80.dll problems. Either assume that tcl80.dll is +> in the standard (english) installation place +> %systemdrive%\program files\tcl\bin\tcl80.dll. +> +> OR release note that users must add the Tcl bin dir to there +> PATH. + +Sounds good to me. + +> As the python lib does not have a module to access the registry +> it makes getting the info from the registry hard. +> +> Maybe 1.6 needs a windows registry module to solve this and +> other problems. + +Actually, the standard Python on Windows does know about the +registry. And Mark Hammond's Win32 extension stuff has a registry +module. + +But what if the user is (for some other purposes) relying on having a +different version of tcl/tk around? Not all that uncommon, and very +messy. Python is not real flexible about the version of tcl / tk it +uses. + +- Gordon + + + + diff --git a/demo/ermis-f/python_m/cur/1337 b/demo/ermis-f/python_m/cur/1337 new file mode 100644 index 00000000..b86310f7 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1337 @@ -0,0 +1,25 @@ +From: asehbai at gslink.com (Aamir Sehbai) +Date: Fri, 9 Apr 1999 01:14:10 -0400 +Subject: Client side cookies in Python +Message-ID: +X-UID: 1337 + +To handle cookies sent by the server, the Cookies.py module is not enough. + +I need to be able to handle client-side cookies in my Python script, (to +log in to Yahoo! and get my email). While I searched for this topic in +this newsgroup, I found the following hack from Rick Otten to deal with +the problem, at + +http://x8.dejanews.com/[ST_rn=ap]/getdoc.xp?AN=367235052&CONTEXT=923633207.1880162449&hitnum=1 + +While I will be trying to make his code work with Yahoo, if anyone else +has information about something similar, please share. + +Thanks. + + + + + + diff --git a/demo/ermis-f/python_m/cur/1338 b/demo/ermis-f/python_m/cur/1338 new file mode 100644 index 00000000..cdbcf410 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1338 @@ -0,0 +1,36 @@ +From: amitp at Xenon.Stanford.EDU (Amit Patel) +Date: 30 Apr 1999 17:55:35 GMT +Subject: Python IS slow ! [was] Re: Python too slow for real world +References: <613145F79272D211914B0020AFF6401914DAD8@gandalf.digicool.com> <19990430080805.B776752@vislab.epa.gov> <3729A9F3.75B2692B@appliedbiometrics.com> +Message-ID: <7gcqqn$p4b$1@nntp.Stanford.EDU> +X-UID: 1338 + + Michael Hudson wrote: +| +| A word of warning: this code is nasty, *nasty*, NASTY. Possibly the +| most horrible thing you will see perpetrated in Python this year. It +| applies regular expressions to strings of bytecode... + +[code removed] + +| def make_adder(n): +| def adder(x): +| return x+n +| return bind_locals(adder) + + + + +Yow. + +I think you are INSANE. :-) I thought bind_locals was impossible to +implement in Python, and you go and implement it. Eek! + + + + + Amit, too afraid to use bind_locals + + + + diff --git a/demo/ermis-f/python_m/cur/1339 b/demo/ermis-f/python_m/cur/1339 new file mode 100644 index 00000000..aace19c2 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1339 @@ -0,0 +1,46 @@ +From: mal at lemburg.com (M.-A. Lemburg) +Date: Thu, 29 Apr 1999 15:57:12 +0200 +Subject: Python and CGI +Message-ID: <37286538.5EAE0173@lemburg.com> +Content-Length: 1395 +X-UID: 1339 + +Hi everybody, + +Yesterday, I mailed an announcement for mxCGIPython, a drop-in +setup extension for the Python source distribution that allows +compiling a one-file executable containing the standard Python +interpreter + the standard library + the default builtin +modules. The result is a complete Python installation in one +single file -- easy to install and ship around. + +Although there were a number of hits on the web-page, I'm not +sure whether the announcement got the message through... this +is intended to be a campaign with the goal of promoting Python +as CGI engine. + +I've further enhanced and simplified the setup, so that producing +these binaries really becomes a very simple and highly automated +task. Basically all you have to do is unarchive the source +distribution, the setup I provide on the web-page below and +then type 'make -f Makefile.cgi'. + +I'll collect the submitted binaries on the starship FTP server +for everybody to download at their ISPs (if they don't already +support Python). + +Hope this campaign becomes a success... + + http://starship.skyport.net/~lemburg/mxCGIPython.html + +Cheers, +-- +Marc-Andre Lemburg Y2000: 246 days left +--------------------------------------------------------------------- + : Python Pages >>> http://starship.skyport.net/~lemburg/ : + --------------------------------------------------------- + + + + + diff --git a/demo/ermis-f/python_m/cur/1340 b/demo/ermis-f/python_m/cur/1340 new file mode 100644 index 00000000..8de76198 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1340 @@ -0,0 +1,23 @@ +From: Bjoern.Giesler at stud.uni-karlsruhe.de (Bjoern Giesler) +Date: 22 Apr 1999 11:24:53 GMT +Subject: Pyton setuid program? +Message-ID: <7fn0u5$9jm$1@news.rz.uni-karlsruhe.de> +X-UID: 1340 + +Hi, + +is it possible to have a Python script run setuid? If so, how do I do +that? + +Or could that be a Linux problem? + +TIA, + --Bjoern +-- +| thank you for your time, worship the antichrist, and have a nice day /\ ++---------------------------------------------------------------------/()\ +| pgp key available on request /____\ + + + + diff --git a/demo/ermis-f/python_m/cur/1341 b/demo/ermis-f/python_m/cur/1341 new file mode 100644 index 00000000..cb201a24 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1341 @@ -0,0 +1,18 @@ +From: smoothasice at geocities.com (smoothasice at geocities.com) +Date: Tue, 27 Apr 1999 15:51:18 GMT +Subject: Directories +Message-ID: <3725DDD2.149DF47F@geocities.com> +X-UID: 1341 + +Hi, i'm curious if there is a python command or set of commaneds that +could be used like the dir() command in dos prompt. I am trying to +write a program in python that would allow me to list the files of a +certain data type in a few directories but I need to know how I would do +that ...thanks a bundle. + + +Anton + + + + diff --git a/demo/ermis-f/python_m/cur/1342 b/demo/ermis-f/python_m/cur/1342 new file mode 100644 index 00000000..910175c3 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1342 @@ -0,0 +1,68 @@ +From: tavares at connix.com (tavares at connix.com) +Date: Wed, 28 Apr 1999 20:54:13 GMT +Subject: HTML "sanitizer" in Python +References: +Message-ID: <7g7shk$rgd$1@nnrp1.dejanews.com> +Content-Length: 2997 +X-UID: 1342 + +In article , + "Scott Stirling" wrote: +> Hi, +> +> I am new to Python. I have an idea of a work-related project I want to do, +> and I was hoping some folks on this list might be able to help me realize it. +> I have Mark Lutz' _Programming Python_ book, and that has been a helpful +> orientation. I like his basic packer and unpacker scripts, but what I want +> to do is something in between that basic program and its later, more complex +> manifestations. +> +> I am on a Y2K project with 14 manufacturing plants, each of which has an +> inventory of plant process components that need to be tested and/or +> replaced. I want to put each plant's current inventory on the corporate +> intranet on a weekly or biweekly basis. All the plant data is in an Access +> database. We are querying the data we need and importing into 14 MS Excel 97 +> spreadsheets. Then we are saving the Excel sheets as HTML. The HTML files +> bloat out with a near 100% increase in file size over the original Excel +> files. This is because the HTML converter in Excel adds all kinds of +> unnecessary HTML code, such as for every +> single cell in the table. Many of these tables have over 1000 cells, and +> this code, along with its accompanying closing FONT tag, add up quick. +> The other main, unnecessary code is the ALIGN="left" attribute in

PackageName 1.0 - short +> description of not more than one sentence. (DD-Mon-YY) +> +> You may only include *one* link, which should point to a web page +> with more info about your package (cf 2. above). The date should +> be in parentheses, formatted as shown, e.g. 29-Jul-98. +> +> 8. Format your posting so that all lines are at most 78 characters +> wide. (Exception: Internet resource addresses (cf. 7. above) should +> not be line-wrapped, if possible.) +> +> You can upload your program or module to , +> or become a PSA member and create a web page at the "Starship Python" server +> (see below). The Python main FTP site is being mirrored at serveral sites +> all around the world. Don't forget to send a short e-mail notification to +> and upload a corresponding .README +> file together with your announcement. +> +> Mailing list gateways +> --------------------- +> +> * comp.lang.python: +> +> There is a two-way gateway between the comp.lang.python news group and +> the "python-list" mailing list. You can subscribe to this list by sending +> an e-mail message to the following address: +> +> +> +> with the text "subscribe" in the e-mail body. You can unsubscribe by +> sending an e-mail message to the same address with the text "unsubscribe" +> in the e-mail body. +> +> There is a web archive of past comp.lang.python postings at FindMail, +> +> . +> +> * comp.lang.python.announce: +> +> There is also a mailing list gateway for comp.lang.python.announce. +> To subscribe or unsubscribe, send an e-mail to +> +> +> +> with a body content of "subscribe" or "unsubscribe", respectively. +> +> Please note that comp.lang.python.announce is moderated; you cannot +> just post to this list. Please e-mail any announcements to the +> c.l.py.a submission address: +> +> +> +> or use your news reader to post to comp.lang.python.announce. +> In the latter case, your posting should be forwarded to the +> c.l.py.a moderators automatically by the news server software. +> +> A web archive of c.l.py.a postings is currently being prepared. +> Until it becomes available, you can look for c.l.py and c.l.py.a +> postings with DejaNews, , or FindMail, +> . +> +> Further Python Resources +> ------------------------ +> +> WWW: - Python Language Home Page +> - Python Language FAQ +> - Python Quick Help Index Page +> - Starship Python: User Pages +> +> Usenet: - Python Discussion Newsgroup +> - Python Announcements Newsgroup +> +> The PSA +> ------- +> +> About the "Python Software Activity" (PSA), cf. : +> +> "The continued, free existence of Python is promoted by the contributed +> efforts of many people. The Python Software Activity (PSA) supports those +> efforts by helping to coordinate them. The PSA operates web, ftp, and +> email services, organizes conferences, and engages in other activities +> that benefit the Python user community. In order to continue, the PSA +> needs the membership of people who value Python." Have a look at the PSA +> web pages for further information about the PSA and membership benefits. +> +> -- +> ----------- comp.lang.python.announce (moderated) ---------- +> Article Submission Address: python-announce at python.org +> Python Language Home Page: http://www.python.org/ +> Python Quick Help Index: http://www.python.org/Help.html +> ------------------------------------------------------------ +sasa + + + + diff --git a/demo/ermis-f/python_m/cur/0892 b/demo/ermis-f/python_m/cur/0892 new file mode 100644 index 00000000..5c861e86 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0892 @@ -0,0 +1,36 @@ +From: fredrik at pythonware.com (Fredrik Lundh) +Date: Thu, 15 Apr 1999 14:00:24 GMT +Subject: Different methods with same name but different signature? +References: <3716909C.D8D1B372@fedex.com> +Message-ID: <005201be8748$51e0bab0$f29b12c2@pythonware.com> +X-UID: 892 + +frederic pinel wrote: +> While trying to implement the visitor pattern in Python, I ran into the +> following problem: +> +> My class needs to have 2 (or more) different methods, but with the same +> name, the difference being the signature (an object in my case), +> unfortunately Pyhton interprets this as an overidding, and only +> considers the last method defined. + +well, python doesn't allow you to specify argument types, +so there's no way to tell the difference anyway... + +> - using a single method, but checking isinstance() of the object passed +> to switch to the right code, +> - using different names for the methods, + +the second method is preferred -- it's faster, easier to +understand, and less error-prone + +imho, it's also an improvement over the pure visitor pattern, +since it allows you to generate "logical events" that doesn't +correspond to "physical" data instances in your model. + + + + + + + diff --git a/demo/ermis-f/python_m/cur/0893 b/demo/ermis-f/python_m/cur/0893 new file mode 100644 index 00000000..aa28eab9 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0893 @@ -0,0 +1,13 @@ +From: daye at earthling.net (Daye) +Date: Wed, 7 Apr 1999 23:51:28 -0500 +Subject: infoseek? +Message-ID: <7ehcn3$elg$1@newssvr01-int.news.prodigy.com> +X-UID: 893 + +does anyone know if Infoseek.com still use python for their +search engine? Thanks. + + + + + diff --git a/demo/ermis-f/python_m/cur/0894 b/demo/ermis-f/python_m/cur/0894 new file mode 100644 index 00000000..4556f348 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0894 @@ -0,0 +1,30 @@ +From: arcege at shore.net (Michael P. Reilly) +Date: Mon, 05 Apr 1999 21:59:39 GMT +Subject: Secure Python for embedding +References: <7ebb3c$8jf$1@news.inet.tele.dk> +Message-ID: +X-UID: 894 + +Per Knudsgaard wrote: +: Hi all, + +: I have a situation where I would like to add a scripting language to the +: client of a client-server application. The server will, as part of the +: communication between client and server, provide the client with scripts to +: run. I would like it to be secure so I do not end in a situation where I +: expose the client machine to virae, Trojan horses or similar nasty things. +: In other words, I would like the scripts to be run in their own little +: "sandbox" environment. I have the embedding almost down, but what I have is +: a fully functional language within the client. Is there any way, without +: modifying the core Python code, that I can implement a secure scripting +: language using Python? + +You will probably want to look at the rexec standard module. Reading the +code can help you a lot. + + -Arcege + + + + + diff --git a/demo/ermis-f/python_m/cur/0895 b/demo/ermis-f/python_m/cur/0895 new file mode 100644 index 00000000..3a0b3e5a --- /dev/null +++ b/demo/ermis-f/python_m/cur/0895 @@ -0,0 +1,41 @@ +From: invalid.address at do.not.email (guppy) +Date: Wed, 07 Apr 1999 15:38:50 GMT +Subject: Crappy Software was Re: [OffTopic: Netscape] Re: How should Python be evangelized? +References: <7dos4m$usi$1@nnrp1.dejanews.com> <7dqs0h$lcq$1@nnrp1.dejanews.com> <2_6M2.30$Kj1.679@198.235.216.4> <37019F42.EA55CA8@kanga.org> <009d01be7b47$8a9a6020$f29b12c2@pythonware.com> <7dtmso$7u6$1@news.clarkson.edu> <3703ca33.9749737@news.bctel.ca> <37089dcb@fermi.armored.net> <370bd698.137859911@news.dslspeed.com> +Message-ID: <370c7a2d.35857749@news.bctel.ca> +Content-Length: 1458 +X-UID: 895 + +And another kick at Netscape: + +Jamie Z, pretty much the alpha geek programmer at Netscape, has resigned. + +And in his words: "...I strongly believed that Netscape was no longer +capable of shipping products. ... Netscape was shipping garbage, and +shipping it late. And daring move or no, this was not going to change: +Netscape no longer had the talent, either in engineering or management, to +ship quality products. The magic was gone, as the magicians had either +moved on to more compelling companies, or were having their voices lost in +the din of the crowd, swamped by the mediocrity around them. The Netscape I +cared about was dead." + +The Web Standards Organization has this to say: "We do not plan on +reviewing any Netscape browsers.... Netscape does not claim that +Communicator 4.0 or 4.5 is CSS compliant. Trying to list the important bugs +would be an exercise in writing long documents, one we do not have the +patience to do. Running Netscape 4.x through the tests we use... will +provide a clear demonstration of Netscape's current shortcomings to anyone +who doubts them. Of about 40 test pages in those two reviews, there are +only two that don't demonstrate problems in Netscape Communicator (and we +weren't even looking for bugs in Netscape Communicator when we wrote those +tests)." + + +-- +MSpeak: in-no-va-tion, n. 1. extending or modifying +existing standards in undocumented ways. 2. creating +new, undocumented standards. --de-com-mod-it-ize, v. + + + + diff --git a/demo/ermis-f/python_m/cur/0896 b/demo/ermis-f/python_m/cur/0896 new file mode 100644 index 00000000..55a4c37f --- /dev/null +++ b/demo/ermis-f/python_m/cur/0896 @@ -0,0 +1,72 @@ +From: john.michelsen at gte.net (John Michelsen) +Date: Mon, 5 Apr 1999 10:04:34 -0700 +Subject: Tkinter bug in Misc.tkraise, Canvas.tkraise +Message-ID: <7eaoop$leq$1@news-2.news.gte.net> +Content-Length: 1751 +X-UID: 896 + +The following got posted in a reply tree by mistake: + +I found a bug in using Tkinter to raise a canvas widget above later +packed (etc.) widgets. It seems Tkinter gets confused between the +Misc.tkraise() method and the Canvas.tkraise(item) methods. +The following script shows the problem: + +from Tkinter import * + +def raiseCanvas(): + canvas1.lift() + #canvas1.tkraise() + #canvas1.widgetlift() + +root = Tk() +canvas1 = Canvas(root, bg='blue') +canvas1.place(x=10, y=10, anchor=NW) +canvas2 = Canvas(root, bg='red') +canvas2.place(x=20, y=20, anchor=NW) +raiseButton = Button(root, text='raiseCanvas', command=raiseCanvas) +raiseButton.pack() +root.geometry("%dx%d" % (100,100)) +root.mainloop() + +which gives the following error: + +Exception in Tkinter callback +Traceback (innermost last): + File "C:\Program Files\Python\Lib\lib-tk\Tkinter.py", line 764, in +__call__ + return apply(self.func, args) + File "C:\PROGRA~1\PYTHON\RAISEC~1.PY", line 4, in raiseCanvas + canvas1.lift() + File "C:\Program Files\Python\Lib\lib-tk\Tkinter.py", line 1287, in +tkraise + self.tk.call((self._w, 'raise') + args) +TclError: wrong # args: should be ".8249616 raise tagOrId ?aboveThis?" + +I made Tkinter do what I want by adding a method to the Misc +class and not the Canvas class: + +class Misc... + def tkraise(self, aboveThis=None): + self.tk.call('raise', self._w, aboveThis) + lift = widgetlift = tkraise + +so that widgetlift will call the tkraise in Misc and not the tkraise in +Canvas. + +I discovered the error in developing a multiple document interface for +Tkinter +which can be found on: http://www2.zyvex.com/OpenChem/index.htm +Dockable toolbars and a tree widget can also be found there. +They probably don't look very good on unix yet. + +John + + + + + + + + + diff --git a/demo/ermis-f/python_m/cur/0897 b/demo/ermis-f/python_m/cur/0897 new file mode 100644 index 00000000..29b79ad5 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0897 @@ -0,0 +1,92 @@ +From: ivanlan at callware.com (Ivan Van Laningham) +Date: Thu, 22 Apr 1999 21:58:00 GMT +Subject: Emulating C++ coding style +References: <371F8FB7.92CE674F@pk.highway.ne.jp> +Message-ID: <371F9B68.5071C282@callware.com> +Content-Length: 1830 +X-UID: 897 + +Hi Thooney and all the other Pythonistas out there-- + +Thooney Millennier wrote: +> +> Hello Everyone! +> +> I usually use C++ ,so I want to make programs like +> I do using C++. +> I don't figure out how to implement the followings +> by Python. +> If you know any solutions,Please Help! +> +> 1. #define statements +> e.g. #define __PYTHON_INCLUDED__ +> #define PYPROC(ARG) printf("%s",ARG) +> + +__PYTHON_INCLUDED__ = 1 + +(Although that's probably not what you really mean to do.) + +def PYPROC(arg): + print arg + +> 2. stream class +> e.g. cout << "hello python."< + +print "hello python" + +--or-- + +sys.stdout.write("hello python") + + +> 3. const variables +> e.g. const int NOCHAGE=1; +> + +Can't be done. Any sufficiently determined Pythonista can change +anything she wants to. + +But, you can do this to keep your edges inside a specific file-- + +_NOCHANGE = 1 + +Any variable beginning with an underscore has module-specific scope. + +> 4. access to class's members using "::" +> e.g. some_class::static_value +> e.g. some_class::static_func(x) +> + +print some_class.static_value +t = some_class.static_func(x) + +See, there's no real concept of a ``static'' member, or of ``private'' +members in Python classes. All methods and members of all classes are +public. That's a good thing. + +> Thanks for reading. +> +> Thooney Millennier. + +You should investigate the tutorial at http://www.python.org + +It's really very good, and with your C++ experience you will have no +trouble at all. + +-ly y'rs, +Ivan +---------------------------------------------- +Ivan Van Laningham +Callware Technologies, Inc. +ivanlan at callware.com +http://www.pauahtun.org +See also: +http://www.foretec.com/python/workshops/1998-11/proceedings.html +Army Signal Corps: Cu Chi, Class of '70 +---------------------------------------------- + + + + diff --git a/demo/ermis-f/python_m/cur/0898 b/demo/ermis-f/python_m/cur/0898 new file mode 100644 index 00000000..54c412c6 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0898 @@ -0,0 +1,27 @@ +From: bryanv at arlut.utexas.edu (Bryan VanDeVen) +Date: Mon, 19 Apr 1999 14:49:47 -0500 +Subject: Tkinter performance +References: <371B4B39.8B78BC7A@foreman.ac.rwth-aachen.de> +Message-ID: <371B88DB.B71584E4@arlut.utexas.edu> +X-UID: 898 + +> +> I'd suggest using PyOpenGL with the NumPy extension. In combination, it +> can be quite fast, by pushing the loops to C extension modules. The only +> portability problem is to the mac -- there is no Togl widget for the mac +> yet. + +Another alternative would be the excellent Visualization Toolkit +Library, freely available from http://www.kitware.com. It is a large +cross-platform C++ class library for building 2D and 3D data +visualization apps which has both Python and tcl/tk bindings. + + +-- +Bryan Van de Ven +Applied Research Labs +University of Texas, Austin + + + + diff --git a/demo/ermis-f/python_m/cur/0899 b/demo/ermis-f/python_m/cur/0899 new file mode 100644 index 00000000..4563fe43 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0899 @@ -0,0 +1,35 @@ +From: thooney at pk.highway.ne.jp (Thooney Millennier) +Date: Fri, 23 Apr 1999 06:08:07 +0900 +Subject: Emulating C++ coding style +Message-ID: <371F8FB7.92CE674F@pk.highway.ne.jp> +X-UID: 899 + +Hello Everyone! + +I usually use C++ ,so I want to make programs like +I do using C++. +I don't figure out how to implement the followings +by Python. +If you know any solutions,Please Help! + +1. #define statements + e.g. #define __PYTHON_INCLUDED__ + #define PYPROC(ARG) printf("%s",ARG) + +2. stream class + e.g. cout << "hello python."< <7du3ab$3ag@chronicle.concentric.net> <371219E9.9EA91839@home.com> +Message-ID: +Content-Length: 1103 +X-UID: 900 + +>>>> Thus spake 'Jim Meier (fatjim at home.com)': + + JM> Mike Orr wrote: + + >> I'm not sure if I'll use ConfigParser for the next version. I don't + >> really need the sections (multiple files work just fine, using the filename + >> for the section name), and I haven't found a use for the the %(other_key)s + >> substitutions. On the other hand, it doesn't handle multiple values (the + >> same key repeated within a record), which I sometimes need. + >> + >> Attached is a wrapper class for ConfigParser which supports booleans + >> and can also return an entire section as a dictionary (or all the sections + >> as nested dictionaries). I find these make it a little more convenient. + >> + + JM> Why not simply use a file of python expressions? Like this: + +Or classes (which is what I've used in several apps): + + class Section1: + key1 = [ 1, 2, 3, 'value', [ 'useful, 'nesting', 'eh?' ] ] + key2 = 'anotherval' + +-- +Brad Howes bhowes at motorola.com +Principal Compass Hacker Work: +1 602 446 5219 +Motorola Cell: +1 602 768 0735 + + + + diff --git a/demo/ermis-f/python_m/cur/0901 b/demo/ermis-f/python_m/cur/0901 new file mode 100644 index 00000000..e30ba1d1 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0901 @@ -0,0 +1,22 @@ +From: nascheme at ucalgary.ca (Neil Schemenauer) +Date: 27 Apr 1999 15:03:44 GMT +Subject: Bug or Feature? +References: <37208E69.4B022E0C@mediaone.net> <7fr3eg$bqr@world1.bellatlantic.net> +Message-ID: <7g4jkg$llc@ds2.acs.ucalgary.ca> +X-UID: 901 + +Stephan Houben wrote: + +[that making multi-dimensional "arrays" is difficult] + +I think the Numeric array should be added as a standard module. +This is on the Python TODO list. I may do it myself it I get +time. I don't know how much of Numeric should be added. Any +comments? + + + Neil + + + + diff --git a/demo/ermis-f/python_m/cur/0902 b/demo/ermis-f/python_m/cur/0902 new file mode 100644 index 00000000..0ebd33ba --- /dev/null +++ b/demo/ermis-f/python_m/cur/0902 @@ -0,0 +1,33 @@ +From: a.mueller at icrf.icnet.uk (Arne Mueller) +Date: Tue, 20 Apr 1999 13:47:08 +0100 +Subject: RuntimeError: Maxium recursion ... +Message-ID: <371C774C.A3E0001B@icrf.icnet.uk> +X-UID: 902 + +Hi All, + +In my program I get the following error message from python: + +RuntimeError: Maximum recursion depth exceeded + +And it's true, there're alot of recursions, too many, but this is not a +bug in my program, it's only an 'extrem' dataset, and I'll have to think +about an iterative solution of my problem ... . However, I'd like to get +some results as soon as possible. Is there a may to set the number of +maximum allowed recursion depth to a higher value? + + thanks, + Arne + +-- +Arne Mueller +Biomolecular Modelling Laboratory +Imperial Cancer Research Fund +44 Lincoln's Inn Fields +London WC2A 3PX, U.K. +phone : +44-(0)171 2693405 | Fax : +44-(0)171 269 3258 +email : a.mueller at icrf.icnet.uk | http://www.icnet.uk/bmm/ + + + + diff --git a/demo/ermis-f/python_m/cur/0903 b/demo/ermis-f/python_m/cur/0903 new file mode 100644 index 00000000..1aefa069 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0903 @@ -0,0 +1,73 @@ +From: markus_kohler at hp.com (Markus Kohler) +Date: 28 Apr 1999 09:57:18 +0200 +Subject: Python IS slow ! [was] Re: Python too slow for real world +References: <613145F79272D211914B0020AFF6401914DAD8@gandalf.digicool.com> +Message-ID: +Content-Length: 2820 +X-UID: 903 + +>>>>> "Brian" == Brian Lloyd writes: + +[deltia] + + Brian> Arne, + + Brian> While I'm not going to go near comparing Python to Perl, I + Brian> will comment that different languages are just that - + Brian> different. As such, the approach you would take in one + Brian> language may not be the most appropriate (or comparable in + Brian> speed or efficiency) to the approach you would take in + Brian> another. + + Brian> The question here (IMHO) is not Python's appropriateness + Brian> for processing large datasets (a fair number of + Brian> scientist-types do this all the time), or even the speed of + Brian> Python in general, but using the most appropriate + Brian> algorithms in the context of the language in use. + +Python would be appropriate for much more problems if it would only be as fast +as other scripting languages. The bytecode interpreter IS significantly slower +than other byte code interpreted languages. Since we all know that python +is more productive than most other languages, this becomes sooner or later an +issue because one would not be able some tasks in python because it is just +to slow. + + Brian> For example, Perl is very regex-centric, so your example + Brian> Perl implementation is probably perfectly appropriate for + Brian> Perl. Python tends to be more optimized for the general + Brian> case, and if it were _me_, I wouldn't bother with using + Brian> regular expressions in this case,. Since you have a + Brian> predictable file format, there are more specific (and + Brian> efficient) Python tools that you could use here. + +You are right that one should choose the right tool for a problem, but +I disagree that Python is optimized for the general case. Squeak a free +Smalltalk implementation (www.squeak.org), is already much faster ( about +3 times actually ) than python and it has even a true Garbage +Collector. As soon as the first Just in Time Compiler has been +finished, it may even come close to Visualworks a commercial +Smalltalk implementation with a Just in Time Compiler. At the moment +Visualworks is still at least 5 times faster than squeak. +I tell you all this just to give you some idea how fast a language that is +as flexible as python could be. + + [deletia] + +>From profiling python 1.5.2c I found that python's main problem is that +calling functions seems to be very costly. Also I have not yet looked at +this issue in detail it is obvious that the code to call a +python function is pretty complex. + +I guess this is because python supports default arguments and other +'nice' features for calling functions. + +It seems to me that without a redesign of at least the bytecode for +function calls python's speed will not take off. + +Markus +-- +Markus Kohler mailto:markus_kohler at hp.com + + + + diff --git a/demo/ermis-f/python_m/cur/0904 b/demo/ermis-f/python_m/cur/0904 new file mode 100644 index 00000000..7d3393d3 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0904 @@ -0,0 +1,46 @@ +From: tismer at appliedbiometrics.com (Christian Tismer) +Date: Sat, 24 Apr 1999 15:10:48 GMT +Subject: wrapped around the axle on regexpressions and file searching +References: <1287155028-45807148@hypernet.com> +Message-ID: <3721DEF8.FBF889D4@appliedbiometrics.com> +Content-Length: 1340 +X-UID: 904 + + +Gordon McMillan wrote: +> +> msrisney writes: + +... + +> At any rate, os.path.exists('e:/') is an effective way of finding out +> if e: exists. Though specifying 'a:/' will pop up one of those lovely +> Abort/Retry/Fail dialogs if nothing is in the drive. + +Not always. On my Win98 box, the floppy drive brushes teeth for +a second, and then I get back *one* from os.path.exists. +This is really bad, since I didn't insert a floppy. + +> in-nearly-20-years-I-still-haven't-figured-out-the-difference-between +> -Abort-and-Fail-ly y'rs + +Some of my early dos tools aborted immediately from the DOS +function when I hit abort, while they caught the error and +some were able to continue, when I answered with "Fail". +So I think the designed intent was to give the user a chance +to decide wether the program should shut down, or an internal +error handler should get a chance. + +Anyway no good solution - ciao - chris + +-- +Christian Tismer :^) +Applied Biometrics GmbH : Have a break! Take a ride on Python's +Kaiserin-Augusta-Allee 101 : *Starship* http://starship.python.net +10553 Berlin : PGP key -> http://wwwkeys.pgp.net +PGP Fingerprint E182 71C7 1A9D 66E9 9D15 D3CC D4D7 93E2 1FAE F6DF + we're tired of banana software - shipped green, ripens at home + + + + diff --git a/demo/ermis-f/python_m/cur/0905 b/demo/ermis-f/python_m/cur/0905 new file mode 100644 index 00000000..456e39f9 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0905 @@ -0,0 +1,35 @@ +From: cgambrell at my-dejanews.com (Chris Gambrell) +Date: Fri, 30 Apr 1999 13:41:23 GMT +Subject: Launching web browser programmatically +References: <3724EB92.248E7933@hotmail.com> <7g2rm1$t8i$1@m2.c2.telstra-mm.net.au> +Message-ID: <7gcbu2$nbc$1@nnrp1.dejanews.com> +X-UID: 905 + +But how does one specify no scrollbars, no menus, the size of the window, etc. + +Thanks, +Chris + + + +In article <7g2rm1$t8i$1 at m2.c2.telstra-mm.net.au>, + "Mark Hammond" wrote: +> If you have the win32 extensions, you can use win32api.ShellExecute() +> +> Anything you can use after "start" you can pass to ShellExecute - ie, a URL, +> a document file, .exe, etc. +> +> Mark. +> +> Ben Darnell wrote in message <3724EB92.248E7933 at hotmail.com>... +> >How do I launch the the user's web browser programmatically on Win9x? I +> >can use "start http://www.python.org" at the command line, but +> +> + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/0906 b/demo/ermis-f/python_m/cur/0906 new file mode 100644 index 00000000..f0a50e85 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0906 @@ -0,0 +1,32 @@ +From: jcosby at wolfenet.com (Jon Cosby) +Date: Tue, 27 Apr 1999 10:37:35 -0700 +Subject: CGI post method +References: <7g31ah$hk2$1@sparky.wolfe.net> <14117.47102.615236.362798@amarok.cnri.reston.va.us> +Message-ID: <7g4slp$e3v$1@sparky.wolfe.net> +X-UID: 906 + +Tried that. Shows the correct argument, but the script reverts to the +default value. + +Jon Cosby + +Andrew M. Kuchling wrote in message +<14117.47102.615236.362798 at amarok.cnri.reston.va.us>... +> It looks reasonable. Try changing the method to "GET" and see +>if you wind up with /cgi-bin/fibo.py?value=10. What error are you +>seeing? +> +>-- +>A.M. Kuchling http://starship.python.net/crew/amk/ +> "Mortal man?" +> "Yes?" +> "Beware of the dog." +> -- Charon warns Orpheus, in SANDMAN: "The Song of Orpheus" +> +> + + + + + + diff --git a/demo/ermis-f/python_m/cur/0907 b/demo/ermis-f/python_m/cur/0907 new file mode 100644 index 00000000..10762ef2 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0907 @@ -0,0 +1,46 @@ +From: tismer at appliedbiometrics.com (Christian Tismer) +Date: Thu, 29 Apr 1999 16:19:09 GMT +Subject: Read MS Access 97 *.mdb files with python?? +References: <37287369.D6E67313@t-online.de> +Message-ID: <3728867D.94B5BBF9@appliedbiometrics.com> +Content-Length: 1051 +X-UID: 907 + + +gemodek wrote: +> +> Does somebody know some +> piece of soft which can this?? + +Use PythonWin, create an interface for +Microsoft DAO (your version) with the +makepy utility, and then use COM to access Access. + +Something like + +import win32com.client +engine=win32com.client.Dispatch("dao.dbengine.35") + +Then you can use every method of the database +engine, as you can find in the VBA help file +of your copy of the MS Access distribution. + +> Or does somebody know if the description of +> the format ia avaible (for free of course). + +That's a long awaited feature which I guess will never +be available. + +ciao - chris + +-- +Christian Tismer :^) +Applied Biometrics GmbH : Have a break! Take a ride on Python's +Kaiserin-Augusta-Allee 101 : *Starship* http://starship.python.net +10553 Berlin : PGP key -> http://wwwkeys.pgp.net +PGP Fingerprint E182 71C7 1A9D 66E9 9D15 D3CC D4D7 93E2 1FAE F6DF + we're tired of banana software - shipped green, ripens at home + + + + diff --git a/demo/ermis-f/python_m/cur/0908 b/demo/ermis-f/python_m/cur/0908 new file mode 100644 index 00000000..61ba5f11 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0908 @@ -0,0 +1,49 @@ +From: kernr at mail.ncifcrf.gov (Robert Kern) +Date: Sun, 11 Apr 1999 19:32:31 -0400 +Subject: cygwin32-b20 _tkinter problem +References: <371071b0.15953469@news.btx.dtag.de> +Message-ID: <3711310F.65CA2C0A@mail.ncifcrf.gov> +Content-Length: 1438 +X-UID: 908 + +Monika G?hmann wrote: +> +> When I try to compile python-1.5.2b2 under WinNT with Cygwin32-B20 it +> works very well without Tk-Module. But when I try to include Tk, I get +> the following messages: +> +> gcc python.o \ +> ../libpython1.5.a -ltix4180 -ltk80 -ltcl80 -lstdc++ -lm +> -lm -o python +> ../libpython1.5.a(_tkinter.o): In function `Tkapp_CreateFileHandler': +> //c/temp/Python-1.5.2b2/Modules/./_tkinter.c:1459: undefined +> reference to `Tcl_CreateFileHandler' +> ../libpython1.5.a(_tkinter.o): In function `Tkapp_DeleteFileHandler': +> //c/temp/Python-1.5.2b2/Modules/./_tkinter.c:1486: undefined +> reference to `Tcl_DeleteFileHandler' +> ../libpython1.5.a(_tkinter.o): In function `EventHook': +> //c/temp/Python-1.5.2b2/Modules/./_tkinter.c:1913: undefined +> reference to `Tcl_CreateFileHandler' +> //c/temp/Python-1.5.2b2/Modules/./_tkinter.c:1943: undefined +> reference to `Tcl_DeleteFileHandler' +> collect2: ld returned 1 exit status +> make[1]: *** [link] Error 1 +> make: *** [python] Error 2 + +Add -lexpect526 to the command line. Those symbols are only defined in +libexpect526.a of the cygwin B20.1 distribution. + +Hope that helps. + +[snip] + +-- +Robert Kern | +----------------------|"In the fields of Hell where the grass grows high +This space | Are the graves of dreams allowed to die." +intentionally | - Richard Harter +left blank. | + + + + diff --git a/demo/ermis-f/python_m/cur/0909 b/demo/ermis-f/python_m/cur/0909 new file mode 100644 index 00000000..7b554f01 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0909 @@ -0,0 +1,18 @@ +From: my at efes.net.tr (Murat Yeneroglu) +Date: Fri, 16 Apr 1999 11:15:33 GMT +Subject: binary +Message-ID: <37171BD5.87CFA015@efes.net.tr> +X-UID: 909 + +Hi, +I want to ask that how I can convert a decimal number to binary in +python ? +THNX + +murat. + + + + + + diff --git a/demo/ermis-f/python_m/cur/0910 b/demo/ermis-f/python_m/cur/0910 new file mode 100644 index 00000000..2b970873 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0910 @@ -0,0 +1,66 @@ +From: pduffin at mailserver.hursley.ibm.com (Paul Duffin) +Date: Thu, 29 Apr 1999 10:35:20 +0100 +Subject: Dangers of C++ (Way off topic) +References: <613145F79272D211914B0020AFF6401914DAD8@gandalf.digicool.com> <372769B0.3CE8C0F3@prescod.net> +Message-ID: <372827D8.7A5F@mailserver.hursley.ibm.com> +Content-Length: 2186 +X-UID: 910 + +William Tanksley wrote: +> +> Let me expand a little on the dangers of C++. +> +> - virtual functions. It shouldn't be my job to tell the compiler when +> virtual lookups are the only thing to do; the compiler ought to be able to +> tell. For performance gurus, a way to hint to the compiler that virtual +> lookups were _not_ needed might be useful -- but what if the programmer +> was wrong? +> + +How can the compiler tell ? + +> - inline functions. Again, a good compiler HAS to make this decision for +> itself, and in a good compiler, whether or not this decision was made +> should be transparent to the programmer. +> + +A good compiler will, inline is only a hint to the compiler, the compiler +can choose whether or not to inline that function, it can also choose to +inline other functions which have not been marked as inline. + +> - templates. Generic functions are a very good thing, and with Python +> 2's type support we might wind up needing them. In C++, templates are +> also a very good thing, but thanks to the C model of seperate compilation, +> no two C++ compilers handle templates compatibly. +> + +True enough. + +> - single-root object hierarchy -- this is a must when the default binding +> is virtual. +> +> - GC -- hard to add after the fact. No worry with Python, but what if +> there are other issues like it? +> +> - covariance/contravariance/"no"variance -- when a subclass redefines a +> function, what types of input parameters can the redefinition accept? In +> C++, you can't accept a different type without overloading the function. +> With covariance (in Sather) you can allow the redefined function to accept +> a parent class, which allows the new function to handle more subclasses +> (including all the ones the old function handled). With contravariance +> you can require the redefinition to be more specific, accepting fewer +> classes. Aside from my obvious dislike of novariance, I'm not going to +> take sides ;-). +> + +This is something which I would love to be able to do in C++. + +-- +Paul Duffin +DT/6000 Development Email: pduffin at hursley.ibm.com +IBM UK Laboratories Ltd., Hursley Park nr. Winchester +Internal: 7-246880 International: +44 1962-816880 + + + + diff --git a/demo/ermis-f/python_m/cur/0911 b/demo/ermis-f/python_m/cur/0911 new file mode 100644 index 00000000..226d0b0e --- /dev/null +++ b/demo/ermis-f/python_m/cur/0911 @@ -0,0 +1,79 @@ +From: r.albanese at qut.edu.au (Rico Albanese) +Date: Tue, 20 Apr 1999 12:51:19 +1000 +Subject: Date/Time conversions +Message-ID: <371BEBA7.5DBC1B0F@qut.edu.au> +Content-Length: 2222 +X-UID: 911 + +I am writing a web based database application and I am having problems +in creating a string that contains an integer in it. I wish to store +the login time as an integer so that I may do some time difference +calculations based on the stored login time (ie. the integer). The SQL +statement string creation fails when I have the integer variable +"logtime" in it but not when it is removed. I believe that my problem +is caused by trying to insert an integer into a string. The database +works fine (ie I can add integers to the column "LogTime"). + +This is part of the code: +. +import dbi,odbc #For ODBC stuff +import time #For ODBC and time related stuff +import rexec #For executing the SQL query +import cgi #For processing the form stuff +import re #For regular expression and pattern matching + +#------------------------------------------------------------------------------------------------------- + +form = cgi.SvFormContentDict() +. +. +. +Caller=Ph=Loc=Sch=JbDes=JbPr=None +Caller=form['Name'] +Ph=form['PhNumb'] +Loc=form['Locn'] +Sch=form['Schl'] +JbDes=form['JobDesc'] +JbPr=form['urgency'] +. +. +logtm=time.time() #a floating point +logtime=int(logtm) #an integer +. +. +frontpar='(' +backpar=')' + +#Build the SQL statement string + +thesql="INSERT INTO CSJobs.compjobs +(LogTime,Caller,Phone_Extension,Caller_Category,Location,Job_Description,Job_Priority,LogNumb,Log_Date,Finished) +VALUES " +thesql=thesql + frontpar + logtime + "," +The inclusion of this variable ^ (ie logtime) causes this script to +fail. When it is removed, it works ok. + +thesql= thesql + "'" + Caller + "'" + "," +thesql=thesql + "'" + Ph + "'" + "," + "'" + Sch + "'" + "," +thesql=thesql + "'" + Loc + "'" + "," + "'" + JbDes + "'" +thesql=thesql + "," + "'" + JbPr + "'" + "," + "'" + LogN + "'" + "," + +"'" + logdate + "'" + "," + "'" + "n" + "'" +thesql=thesql + backpar +thesql='"""' + thesql + '"""' +thesql=frontpar + thesql + backpar +thecode='crsr.execute' + thesql +. +. +exec(thecode) + +Any suggestions as to what I am doing wrong?? + +Thanks in advance for any assistance. + +Rico + +-------------- next part -------------- +An HTML attachment was scrubbed... +URL: + + diff --git a/demo/ermis-f/python_m/cur/0912 b/demo/ermis-f/python_m/cur/0912 new file mode 100644 index 00000000..8d671a0f --- /dev/null +++ b/demo/ermis-f/python_m/cur/0912 @@ -0,0 +1,18 @@ +From: culliton at clark.net (Tom Culliton) +Date: Wed, 7 Apr 1999 21:38:31 GMT +Subject: Cygnus Java Compiler and JPython +Message-ID: <199904072138.RAA25670@shell.clark.net> +X-UID: 912 + +Having just seen the announcement for the "Cygnus GNU Compiler +Java(tm) Edition (GCJ)" I immediately wondered if anyone here has +tried compiling JPython with it yet? Sounds like an interesting +experiment... If it works any thoughts on the speed vs. CPython? + +A story on the GCJ announement can be seen at: + +http://www.newsalert.com/bin/story?StoryId=CnWRyqbKbytaXotq + + + + diff --git a/demo/ermis-f/python_m/cur/0913 b/demo/ermis-f/python_m/cur/0913 new file mode 100644 index 00000000..3e188222 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0913 @@ -0,0 +1,30 @@ +From: mal at lemburg.com (M.-A. Lemburg) +Date: Wed, 7 Apr 1999 23:01:20 GMT +Subject: Looking 4 C extention examples +References: <7egdv0$2at$1@news.gte.com> +Message-ID: <370BE3C0.1ABD6052@lemburg.com> +X-UID: 913 + +Justin Development wrote: +> +> I'm looking for some C extention examples and their associated Python +> modules to help me learn more about Python extending. + +Have a look at the C files in the Modules/ subdir of the Python +source distribution, esp. the xxmodule.c boiler plate should +be of interest. + +If that's not enough, surf the contrib section on www.python.org. + +Cheers, +-- +Marc-Andre Lemburg Y2000: 268 days left +--------------------------------------------------------------------- + : Python Pages >>> http://starship.skyport.net/~lemburg/ : + --------------------------------------------------------- + + + + + + diff --git a/demo/ermis-f/python_m/cur/0914 b/demo/ermis-f/python_m/cur/0914 new file mode 100644 index 00000000..568e9d30 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0914 @@ -0,0 +1,31 @@ +From: tim_one at email.msn.com (Tim Peters) +Date: Wed, 28 Apr 1999 03:06:22 GMT +Subject: smtplib hang on send "data " to MS SMTP server +In-Reply-To: <7g5euo$m7e$1@nnrp1.dejanews.com> +References: <7g5euo$m7e$1@nnrp1.dejanews.com> +Message-ID: <000601be9124$1846dce0$29a02299@tim> +X-UID: 914 + +[max at rightworks.com] +> code which works fine with netscape SMTP mail server, fails (hangs) when +> attempting to send mail to a MicroSoft SMTP server. In the +> module following the call to putcmd("data") the data() calls getreply +> and never returns. Does anyone have an idea what is happening here? The +> server seems to work with other clients. thanks max + +Try posting a complete executable failing example? If you're not going to +track it down, you need to pass on enough info so someone else can <0.9 +wink>. MS SMTP servers in my experience follow the most restrictive +possible reading of the protocol specs, and will just sit there if you e.g. +so much as include an extraneous blank. + +Also be clear about which version of Python you're using, and which OS. +smtplib.py has changed a *lot* since 1.5.1 (have you tried 1.5.2?). + +upgrading-is-a-cure-for-many-ills-ly y'rs - tim + + + + + + diff --git a/demo/ermis-f/python_m/cur/0915 b/demo/ermis-f/python_m/cur/0915 new file mode 100644 index 00000000..be4054da --- /dev/null +++ b/demo/ermis-f/python_m/cur/0915 @@ -0,0 +1,23 @@ +From: bernhard at alpha1.csd.uwm.edu (Bernhard Reiter) +Date: 6 Apr 1999 00:23:42 GMT +Subject: Is Python dying? +References: <7dos4m$usi$1@nnrp1.dejanews.com> <3700528A.3F0C047D@Lugoj.Com> <009e01be7a80$b20299b0$f29b12c2@pythonware.com> +Message-ID: +X-UID: 915 + +On 01 Apr 1999 14:56:28 +0200, Lars Marius Garshol wrote: +>* Fredrik Lundh +>| He's not alone: according to an article I just read, anything that +>| is not written in SGML will disappear within 50 years. +> +>Fredrik, can you read your word processing documents from 1986 today? +>I can't. And yet SGML would present no problem today, at least not +>after 30 minutes of DSSSL hacking. + +.dvi and text sources work just fine. + + Bernhard + + + + diff --git a/demo/ermis-f/python_m/cur/0916 b/demo/ermis-f/python_m/cur/0916 new file mode 100644 index 00000000..608fc8e1 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0916 @@ -0,0 +1,34 @@ +From: john.michelsen at gte.net (John Michelsen) +Date: Wed, 7 Apr 1999 10:06:36 -0700 +Subject: askyesnocancel in tkMessageBox +References: <199904062020.QAA05784@python.org> <199904062043.QAA21700@eric.cnri.reston.va.us> +Message-ID: <7eg1g9$nem$1@news-2.news.gte.net> +X-UID: 916 + +>- /Fredrik Lundh is responsible for *documenting* Tkinter, but not for +>its maintenance (although he contributed a bunch of support modules). +>The maintenance of Tkinter is strictly my responsibility. (Not that I +>asked for it. :-) + + +Could you put the following function in tkMessageBox then?: + +def askyesnocancel(title=None, message=None, **options): + "Ask a question; return yes, no, or cancel" + return apply(_show, (title, message, WARNING, YESNOCANCEL), options) + +I use it in a standard "closing the document" function so that the user can +close +with saving, without saving, or cancel the close. + +Thanks, + +John + + + + + + + + diff --git a/demo/ermis-f/python_m/cur/0917 b/demo/ermis-f/python_m/cur/0917 new file mode 100644 index 00000000..a618dd84 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0917 @@ -0,0 +1,29 @@ +From: aa8vb at vislab.epa.gov (Randall Hopper) +Date: Fri, 30 Apr 1999 17:40:46 GMT +Subject: Python IS slow ! [was] Re: Python too slow for real world +In-Reply-To: <3729E647.B38DFE72@appliedbiometrics.com>; from Christian Tismer on Fri, Apr 30, 1999 at 07:20:07PM +0200 +References: <7g9qmo$luf$1@news.udel.edu> <372965CA.2B3FD2FE@appliedbiometrics.com> <19990430080805.B776752@vislab.epa.gov> <3729A9F3.75B2692B@appliedbiometrics.com> <19990430101215.A806665@vislab.epa.gov> <3729CD92.43477316@appliedbiometrics.com> <19990430130807.A812795@vislab.epa.gov> <3729E647.B38DFE72@appliedbiometrics.com> +Message-ID: <19990430134046.A807445@vislab.epa.gov> +X-UID: 917 + +Christian Tismer: + |Randall Hopper wrote: + |> + |> Base class A calling subclass B's method M without declaring a virtual + |> method M itself is very perverse IMO. +... + |> Accessing attributes of a sibling base class united by a future subclass? +... + + |We were not talking style or how to do things, but theory. Existing code + |would break. + +Point taken. No argument there. I was a bit surprised to hear some folks +are doing such things, but I suppose if a semantic is possible in a +language, there will always be someone who will use it. + +Randall + + + + diff --git a/demo/ermis-f/python_m/cur/0918 b/demo/ermis-f/python_m/cur/0918 new file mode 100644 index 00000000..0507fb03 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0918 @@ -0,0 +1,91 @@ +From: andrew at starmedia.net (Andrew Csillag) +Date: Tue, 20 Apr 1999 18:06:31 GMT +Subject: Problems with mod_pyapache and cPickle +Message-ID: <371CC227.5BDF5C5A@starmedia.net> +Content-Length: 2586 +X-UID: 918 + +When using mod_pyapache, an interpreter is initialized and finalized for +each request. The problem is when using cPickle for serialization, +cPickle, upon unpickling, creates a cache of objects that it loads out +of modules so that it doesn't have to repeatedly import modules to get +at classes it has already de-serialized, which is cool. The problem is +that when the second time (in a different interpreter than the first) +that cPickle is loaded, it's class cache still references classes from +the first interpreter, which when used, causes all sorts of problems +since their __builtins__ module has been wrecked and all it's external +module references are now wrecked too, making them virtually unusable. + +I don't believe that this problem is specific to the cPickle module, but +is problematic for any C module that contains references to python +objects (C objects appear to be immune). + +For the cPickle module, I've written a patch to make it work correctly, +but it requires a python wrapper module to make it "transparent". What +I did is this: made a module function that destroys the class cache +(called class_map in the code), and creates a new, empty one. Then, I +have a wrapper module that imports cPickle and calls the function to +clear the cache. + +-- +Added this function to cPickle.c: +-- +static PyObject* +clear_map(PyObject *self, PyObject *args) { + + PyObject *new_map; + PyObject *old_map; + + /* check arguments */ + if (!PyArg_ParseTuple(args, "")) + return NULL; + + /* try to create a new dict */ + new_map=PyDict_New(); + if (!new_map) + return NULL; + + old_map=class_map; + class_map=new_map; + Py_DECREF(old_map); + Py_INCREF(Py_None); + return Py_None; +} + +-- + +and added this to the cPickle_methods structure in cPickle.c + +-- +{"clear_map", (PyCFunction)clear_cache, 1, + "clear_map() -- clear the class map\n" +}, +-- + +Then the simple python wrapper module + +-- +import cPickle +cPickle.clear_map() +-- + +This alleviates the problem and makes it work. Outside of not +finalizing interpreters (which alleviates it somewhat, but makes the +code run in restricted mode since __builtins__ of the unpickled objects +isn't the same as the "current" __builtins__), I don't know of any other +way to fix this. + +This is likely an issue in other apps that use multiple interpreters and +use C extensions which maintain references to python objects also. +Might there be a way (although likely not trivial) to fix this for all +cases? + + +-- +"There are two major products that come out of Berkeley: +LSD and UNIX. We don't believe this to be a coincidence." +- Jeremy S. Anderson + + + + diff --git a/demo/ermis-f/python_m/cur/0919 b/demo/ermis-f/python_m/cur/0919 new file mode 100644 index 00000000..01b83e17 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0919 @@ -0,0 +1,32 @@ +From: desb at desb.demon.co.uk (Des Barry) +Date: Sat, 24 Apr 1999 13:28:29 +0100 +Subject: webchecker on Windows +Message-ID: +X-UID: 919 + +Hi, +I have just recently downloaded 1.5.2(final) and tried to use webchecker +on a local file tree. + +I am unable to get it to work - as it did in 1.5.2b2 (with a patch +applied to urllib) + +The arguments to webchecker that I use are: + +-x file:///D|/test1/test2/index.htm + +this does not find the file! + +-x file:/D|/test1/test2/index.htm + +this is able to read the file but not able to process any links +contained in the file (all local links are internally created like +file:xxx.htm) + +What am I doing wrong? +-- +Des Barry + + + + diff --git a/demo/ermis-f/python_m/cur/0920 b/demo/ermis-f/python_m/cur/0920 new file mode 100644 index 00000000..374f0710 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0920 @@ -0,0 +1,44 @@ +From: mal at lemburg.com (M.-A. Lemburg) +Date: Tue, 27 Apr 1999 16:31:19 +0200 +Subject: Designing Large Systems with Python +References: +Message-ID: <3725CA37.2027327D@lemburg.com> +Content-Length: 1469 +X-UID: 920 + +David Steuber wrote: +> +> Over my programming life, I have used a 'cowboy' programming style. +> Once I have a general idea for a solution to a problem, I start +> coding, using the text editor as sort of an etch-o-scetch. This works +> fine for programs under about 10klocs (thousand lines of code), but it +> is rather fragile and doesn't hold up to larger programs or the +> requested additions of un-anticipated features. +> +> I've noticed the acedemic and industry attempts to solve the problem. +> OOA/OOD, UML, design patterns, et al are all proposed solutions. +> ... +> +> What I am wondering about is the suitability of Python for specifying, +> a large system and building a prototype. I have gotten myself rather +> entrenched in the cowboy style and I would love it if Python supported +> that for larger systems. + +Not sure what your "cowboy" style looks like, but Python is just +great for designing well-organized OO apps with components using +pattern paradigms [...add all your favorite buzzwords here...]. + +Projects around 50k are still well manageable using an editor +like Xemacs; larger projects probably need the help of systems +like SNIFF (which offers Python support). + +-- +Marc-Andre Lemburg Y2000: 248 days left +--------------------------------------------------------------------- + : Python Pages >>> http://starship.skyport.net/~lemburg/ : + --------------------------------------------------------- + + + + + diff --git a/demo/ermis-f/python_m/cur/0921 b/demo/ermis-f/python_m/cur/0921 new file mode 100644 index 00000000..d8331957 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0921 @@ -0,0 +1,273 @@ +From: geoff at elj.com (geoff at elj.com) +Date: Mon, 05 Apr 1999 15:07:20 GMT +Subject: newbie questions (Python vs. Perl) +References: <37082E26.A9445E43@earthlink.net> +Message-ID: <7eajj2$qe7$1@nnrp1.dejanews.com> +Content-Length: 8008 +X-UID: 921 + +In article <37082E26.A9445E43 at earthlink.net>, + Phil Voris wrote: + +[..] + +> I've been using Perl for several months and don't find its syntax +> troublesome. I like its speed considering I don't have to use C +> constructs (and memory management). I'm considering learning Python for +> several reasons; but have questions and concerns: +> +> 1) I hear it's the best for learning OO. I have heard high praise of +> Eifel as well, but information on it seems to be scarce at best. (I +> have C and Perl experience) + +Starting from http://www.elj.com/ (elj.com - Eiffel Liberty) you can +find all kinds of information relating to Eiffel, Perl, Python and +open source software. In relation to Eiffel, the following might help +with the information scarcity problem (which seems a common perception). + + -- For Python see: http://www.python.org/ + -- For Perl see: http://www.perl.com/ + +For Eiffel .. + +Online Books/Papers: +-------------------- + + * Object-Oriented Software Engineering with Eiffel + by Jean-Marc Jezequel + http://www.irisa.fr/pampa/EPEE/book.html + + -- (This is my pick ..) + -- NB: The first 4 chapters are available here in pdf format: + -- http://www.irisa.fr/pampa/EPEE/oosewe.pdf + + * Object-Oriented Programming in Eiffel + by Robert Rist + http://www-staff.socs.uts.edu.au/~rist/eiffel/ + + -- There are two main sections in the Online Eiffel book which + -- are The language and Case study. You may read through The + -- language part first then look at the Case study for examples + -- of each topic covered in The language. + + * An Invitation to Eiffel + by Bertrand Meyer + http://www.eiffel.com/doc/manuals/language/intro/ + + -- on-line introduction to the Eiffel method and language. This + -- material was derived from chapter 1, An Invitation to Eiffel, + -- of the book Eiffel: The Language, the official reference on + -- Eiffel, published by Prentice Hall and available from bookstores + -- as well as from ISE. + + * Eiffel: An Advanced Introduction + by Alan A. Snyder and Brian N. Vetter + http://www.elj.com/eiffel/intro/ + + * Into Eiffel + by Ian Joyner + http://www.elj.com/eiffel/ij/into-eiffel/ij-into-eiffel.pdf + + * An Eiffel Overview + by Richard Paige + http://www.elj.com/eiffel/rp/eiffel-overview.pdf + -- see also summary of BON: http://www.elj.com/eiffel/rp/bon-intro.pdf + + * Downloadable Eiffel Papers page: + collated by Roger Browne + http://www.eiffel.tm/papers.htm + + * Why Eiffel? + by Todd Plessel + http://www.elj.com/eiffel/why-eiffel/ + +Books: +------ + + * Eiffel, The Language by Bertrand Meyer + http://www.eiffel.com/doc/documentation.html#etl + + * Object Oriented Software Construction 2nd Edition by Bertrand Meyer + http://www.eiffel.com/doc/oosc.html + + * for more books .. + http://www.eiffel.com/doc/ + +Eiffel Langugage: +----------------- + +Controlled by the Non-Profit International Consortium for Eiffel (NICE): + + http://www.eiffel-nice.org/ + +Eiffel Portability Issues: + + http://www.gobo.demon.co.uk/eiffel/gobo/portability/ + +Contributed documentation: + + * Eiffel, The Language by Bertrand Meyer + http://www.eiffel.com/doc/documentation.html#etl + + * Eiffel: The Syntax by Eric Bezault + http://www.gobo.demon.co.uk/eiffel/syntax/ + + * Eiffel Syntax Diagrams + ftp://eiffel.com/pub/doc/language/diagrams.ps.gz + + * Eiffel Kernel Library Standard 1995 + http://eiffel.com/doc/manuals/library/elks/ + http://www.gobo.demon.co.uk/eiffel/nice/elks95/ + + * Eiffel Style Guide by Bertrand Meyer (from OOSC) + http://eiffel.com/doc/manuals/language/style/ + + * Eiffel: The Reference + http://www.wiwi.uni-karlsruhe.de/info/doc/eiffel_ref/ + + -- Roger writes .. ``Prepared by Neil Wilson as a + -- proposed update to Bertrand Meyer's "Eiffel The Reference" - + -- but NICE chose not to pursue it. Neil logged his + -- changes, which include some pointers to parts of + -- the specification worth reviewing. + +Some language extensions include: + + * Precusor [All vendors have implemented this proposal]: +http://www.eiffel.com/doc/manuals/technology/language/precursor/ +http://www.eiffel.com/doc/manuals/technology/language/precursor/formal.html + + * [Proposed] Tuples: + http://eiffel.com/doc/manuals/language/tuples/page.html + + * [Proposed] Creating objects of formal generic types + http://eiffel.com/doc/manuals/language/generic-creation/page.html + + * [Proposed] Agents, introspection and iterators: + http://eiffel.com/doc/manuals/language/agent/page.html + +Eiffel Compilers: +----------------- + +Eiffel Forum has a page titled ``Tools for Eiffel Developers'' here: + + http://www.eiffel-forum.org/archive/tools.htm + +There should be a compiler there to fit your needs. + +Eiffel Libraries: +----------------- + +The Eiffel Forum Archive: + + http://www.eiffel-forum.org/archive/category.htm + +Two libraries that you can learn much from are: + + * Eric Bezault's GOBO Eiffel Project (includes an Eiffel + lex, yacc and data structures libraries): + + http://www.gobo.demon.co.uk/eiffel/gobo/ + + * Pylon: a compact foundation library for writing portable + Eiffel software and libraries. + + http://www.altsoft.demon.co.uk/free/pylon.html + + An excellent description of the Eiffel Conventions used + in Pylon is provided here: + + http://www.altsoft.demon.co.uk/doc/pylonA.html + +Eiffel Projects: +---------------- + + http://www.eiffel.com/eiffel/projects/list.html + http://www.eiffel.com/eiffel/projects/hp/creel.html + + http://www.elj.com/eiffel/projects/ + +Web sites?: +----------- + + * Eiffel Forum: + http://www.eiffel-forum.org/ + + * elj.com (Eiffel Liberty): + http://www.elj.com/ + -- to all things Eiffel, plus a bit more .. + -- There are dozens of sites to explore from elj.com + +[Some other sites/papers ..] +---------------------------- + + * Getting acquainted with Eiffel + by Cameron Laird and Kathryn Soraiz (in SunWorld's Nov 98 Issue) + http://www.sunworld.com/swol-11-1998/swol-11-regex.html#2 + + * Eiffel for Native Speakers of C++ + by Patrick Doyle (C++ Report Mar 99 Issue) + + -- [An article to help] demystify some of the major concepts + -- of the [Eiffel] language, including Design by Contract, + -- Command-Query Separation, and multiple inheritance, by + -- casting them in terms that C++ programmers can readily + -- embrace. + + * Eiffel vs C++ (in 1989) + by Bertrand Meyer + http://www.elj.com/eiffel/bm/eiffelvscpp89/ + + * Design by Contract + by Todd Plessel + http://www.elj.com/eiffel/dbc/ + + * C++?? Critique (Version 3) + by Ian Joyner + http://www.elj.com/cppcv3/ + -- an updated book version is due mid-year from Prentice-Hall + + * Collective Hypnosis: Avoiding the Second Historic Mistake + by Bertrand Meyer + http://www.elj.com/eiffel/bm/mistake/ + + * A critique of Java + by Harold Thimbleby + http://www.cs.mdx.ac.uk/harold/papers/javaspae.html + + * Bertrand Meyer (Eiffel's main designer) + http://www.elj.com/eiffel/bm/ + + * Ian Joyner + http://www.elj.com/eiffel/ij/ + -- particularly - http://www.elj.com/eiffel/ij/correctness/ + +Finally, for fun: +----------------- + + * Academic Programmers - A Spotter's Guide + by Pete Fenelon + http://www.ee.ryerson.ca/~elf/hack/academic.html + +> Will Python take me to the next level in terms of understanding OO? + +For sure .. so will Perl (perltoot[1] did it for me [2,3]) and even +Eiffel. + + [1] perltoot: http://www.perl.com/CPAN/doc/manual/html/pod/perltoot.html + [2] Realtime (30 min) Weather: + http://www.tg.nsw.gov.au/nem/realtime/weather/all/ + [3] Realtime ( 5 min) Electricity Prices: + http://www.tg.nsw.gov.au/nem/realtime/ppsd/all/ + +Geoff Eldridge -- ``Eiffel: Do what you want, when you want'' + +-- email: geoff at elj.com +-- elj-daily: http://www.elj.com/new/ -- daily Eiffel news, plus more .. + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/0922 b/demo/ermis-f/python_m/cur/0922 new file mode 100644 index 00000000..69ec77f8 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0922 @@ -0,0 +1,66 @@ +From: tim_one at email.msn.com (Tim Peters) +Date: Wed, 28 Apr 1999 01:24:23 -0400 +Subject: FP exception, core dump in Python 1.5.2 (Tim's doing ) +In-Reply-To: +Message-ID: <000201be9137$5ffb8320$899e2299@tim> +Content-Length: 1604 +X-UID: 922 + +[Tim, suggests some code to generate INFs and NANs] +> ... + +[Mark Favas tries it, and...] +> On my platform, (DEC Alpha, Digital Unix 4.0D, Python 1.5.2) I +> get... a core dump! (exclamation because it's one of the few Python +> core dumps I've seen). + +Excellent! Here's one of your problems: + +> DEC Alpha + +and here's the other : + +> Digital Unix + + +> [code modified to print i, x, x2] +> +> python ieee.py +> 0 2.0 4.0 +> 1 4.0 16.0 +> 2 16.0 256.0 +> 3 256.0 65536.0 +> 4 65536.0 4294967296.0 +> 5 4294967296.0 1.84467440737e+19 +> 6 1.84467440737e+19 3.40282366921e+38 +> 7 3.40282366921e+38 1.15792089237e+77 +> 8 1.15792089237e+77 1.34078079299e+154 +> Floating exception (core dumped) + +Well, the next step is to square 1.3e154, and that will create an infinity +on an IEEE-754 conformant machine (the square is too big to fit in an IEEE +double). Your platform apparently triggers an unmasked IEEE (not Python) +Overflow exception instead, and your OS decides that's fatal. That means +your platform violates the 754 std in two ways, and, as advertised, ieee.py +raises an exception to gently inform you of that . + +Presumably if you scrounge around long enough, you'll find the software +incantation you need to make your platform pretend to be 754 conformant. +There's not much use in trying to muck with 754 features so long as it's +not! Nothing Python can do about it on its own, either, short of simulating +754 arithmetic in software. + +> ... +> 9 PyNumber_Multiply(0x1400b2988, 0x1400b13c0, 0x1400b13c0, +> 0x0, 0x3) [0x12006f400] +> (dbx) + +Oh ya. + +floating-point-is-its-own-reward-ly y'rs - tim + + + + + + diff --git a/demo/ermis-f/python_m/cur/0923 b/demo/ermis-f/python_m/cur/0923 new file mode 100644 index 00000000..3d715c39 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0923 @@ -0,0 +1,45 @@ +From: wtanksle at dolphin.openprojects.net (William Tanksley) +Date: Thu, 29 Apr 1999 23:11:38 GMT +Subject: Python IS slow ! [was] Re: Python too slow for real world +References: <613145F79272D211914B0020AFF6401914DAD8@gandalf.digicool.com> <372769B0.3CE8C0F3@prescod.net> <3727C1CD.83078225@easystreet.com> +Message-ID: +Content-Length: 1286 +X-UID: 923 + +On Wed, 28 Apr 1999 19:19:57 -0700, Al Christians wrote: +>> >Actually, isn't Eiffel's type system famous for being full of holes? + +>> I'm familiar with the covariance/contravariance argument, but I've never +>> before heard anyone say anything about Eiffel being full of holes. What +>> problems have you heard of? + +>I think it's called changing availability by type, or some such. + +No, CAT is a feature of any object system (never a bug). + +>It is +>possible to delete a feature in a descendant class, leaving a hole in +>polymorphic calls through the base class. + +This would be true, but feature deletion is not used for public +interfaces. It's mainly used when you're treating inheritance as though +it were 'import' (certainly a major weakness of Eiffel). It's true that +you can abuse it by making that feature deletion public, but the type +system could just as easily forbid you from doing any such thing (I have +no idea whether it does). + +I think you were talking about Meyer's insistance on covariance. I would +call that _one_ hole, albeit a strange one. It's certainly not enough to +condemn it as full of holes -- its type system is in other ways quite +robust. + +>Al + +-- +-William "Billy" Tanksley +"But you shall not escape my iambics." + -- Gaius Valerius Catullus + + + + diff --git a/demo/ermis-f/python_m/cur/0924 b/demo/ermis-f/python_m/cur/0924 new file mode 100644 index 00000000..ce0f1abf --- /dev/null +++ b/demo/ermis-f/python_m/cur/0924 @@ -0,0 +1,41 @@ +From: MGoehmann at t-online.de (Monika G�hmann) +Date: Mon, 12 Apr 1999 17:50:56 GMT +Subject: cygwin32-b20 _tkinter problem +References: <371071b0.15953469@news.btx.dtag.de> <3711310F.65CA2C0A@mail.ncifcrf.gov> +Message-ID: <37122f43.23780524@news.btx.dtag.de> +X-UID: 924 + +On Sun, 11 Apr 1999 19:32:31 -0400, Robert Kern + wrote: + + +>Add -lexpect526 to the command line. Those symbols are only defined in +>libexpect526.a of the cygwin B20.1 distribution. +> +>Hope that helps. +> +>[snip] +> +>-- +>Robert Kern | + +Well yes, I did but got a myriad of error messages. I now do believe, +you need to comment out a few lines in _tkinter.c. + +//#if TKMAJORMINOR < 8000 || !defined(MS_WINDOWS) +//#define HAVE_CREATEFILEHANDLER +//#endif + +Cygwin does not define MS_WINDOWS, since it is kind of a "UNIX" +system. Nevertheless the two functions which were giving me the error +are not included ( other than in the expect526.a which does not work ) + +With this change _tkinter.c does compile and link fine and IDLE, for +example is running. I still do have lot's of problems with PATH +settings, but that's another story. + +Thanks for your help, Monika G?hmann + + + + diff --git a/demo/ermis-f/python_m/cur/0925 b/demo/ermis-f/python_m/cur/0925 new file mode 100644 index 00000000..aa8b4ed6 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0925 @@ -0,0 +1,26 @@ +From: perk at int.tele.dk (Per Knudsgaard) +Date: Mon, 5 Apr 1999 23:56:20 +0200 +Subject: Secure Python for embedding +Message-ID: <7ebb3c$8jf$1@news.inet.tele.dk> +X-UID: 925 + + Hi all, + + I have a situation where I would like to add a scripting language to the +client of a client-server application. The server will, as part of the +communication between client and server, provide the client with scripts to +run. I would like it to be secure so I do not end in a situation where I +expose the client machine to virae, Trojan horses or similar nasty things. +In other words, I would like the scripts to be run in their own little +"sandbox" environment. I have the embedding almost down, but what I have is +a fully functional language within the client. Is there any way, without +modifying the core Python code, that I can implement a secure scripting +language using Python? + + -- Per. + + + + + + diff --git a/demo/ermis-f/python_m/cur/0926 b/demo/ermis-f/python_m/cur/0926 new file mode 100644 index 00000000..d3773122 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0926 @@ -0,0 +1,22 @@ +From: philh at vision25.demon.co.uk (Phil Hunt) +Date: Fri, 30 Apr 99 01:30:12 GMT +Subject: % +Message-ID: <925435812snz@vision25.demon.co.uk> +X-UID: 926 + +Consider the % operator, eg: + + 'All %(a)s eat %(b)s' % {'a':'cows', 'b':'grass'} + +If the dictionary doesn't have all the relevant keys, an error +occurs. Is it possible for me to change the behaviour of this so that +if a key doesn't occur a default value of '' is assumed? + + +-- +Phil Hunt....philh at vision25.demon.co.uk + + + + + diff --git a/demo/ermis-f/python_m/cur/0927 b/demo/ermis-f/python_m/cur/0927 new file mode 100644 index 00000000..c6a4bee8 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0927 @@ -0,0 +1,59 @@ +From: mwh21 at cam.ac.uk (Michael Hudson) +Date: 16 Apr 1999 13:10:56 +0100 +Subject: Imperfections in ihooks.py? +Message-ID: +Content-Length: 1865 +X-UID: 927 + +I apologise for the lousy use of language in this post. It's a subject +I find a bit confusing to think about, and I'm clearly not much better +a writing about it. + +Does anybody out there use ihooks? I'm having a couple of problems. + +What I want to happen is to be able to import a file ending in some +random extension (I've chosen '.om') apply some simple preproccessing +to it, and then treat that preprocessing as a normal python module. + +I have a mostly working solution. I can import just fine, but +reloading doesn't happen (for any module, not just mine) after I've +installed a module importer. I've looked at the code, and this seems +inevitable. Should this be changed? I could have a stab at it. + +On a related note, the import of '.pyc' files takes no notice of the +timestamp in the file, so if you import a module that has a stale .pyc +file, you get the stale version from the '.pyc' file, not the new +version from the '.py' file. This would seem to be harder to fix. I +can't see any consideration given to the possibility of rejecting a +file once it's been found. + +These problems would cause no grief once a program is finished, but +they make a bit of a mess of development. + +Turns out the first problem is easy to fix: + +--- ihooks.py 1999/04/15 08:19:46 1.1.1.1 ++++ ihooks.py 1999/04/16 12:08:41 +@@ -489,6 +489,7 @@ + def reload(self, module): + name = module.__name__ + if '.' not in name: ++ self.unload(module) + return self.import_it(name, name, None) + i = string.rfind(name, '.') + pname = name[:i] + +which does the trick for simple modules. Packages just make my head +hurt a bit at the moment. + +Anybody have any ideas what I could do to improve my situation? If I +make some changes to fix them, would there be a chance of getting them +into the distribution? + +Thanks for reading + +Michael + + + + diff --git a/demo/ermis-f/python_m/cur/0928 b/demo/ermis-f/python_m/cur/0928 new file mode 100644 index 00000000..0004ec49 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0928 @@ -0,0 +1,28 @@ +From: aahz at netcom.com (Aahz Maruch) +Date: Thu, 22 Apr 1999 20:11:00 GMT +Subject: Jobs and Python (was Re: What is it ? How can I learn it ? Where should I start ? What can + you do with it ?) +References: <371F7DB9.E7E48A82@callware.com> +Message-ID: +X-UID: 928 + +In article <371F7DB9.E7E48A82 at callware.com>, +Ivan Van Laningham wrote: +> +>PS: And just *where* is this job that (I should be so lucky) *REQUIRES* +>you to know Python???????? Why aren't they calling ME???? + +I advertised such a job a couple of months ago, on the lower peninsula +in the SF Bay Area. We still have openings if anyone is interested. +-- + --- Aahz (@netcom.com) + +Hugs and backrubs -- I break Rule 6 <*> http://www.rahul.net/aahz/ +Androgynous poly kinky vanilla queer het + +"You often don't really understand the problem until after the first +time you implement a solution." - Eric S. Raymond + + + + diff --git a/demo/ermis-f/python_m/cur/0929 b/demo/ermis-f/python_m/cur/0929 new file mode 100644 index 00000000..ac44e8a2 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0929 @@ -0,0 +1,29 @@ +From: fredrik at pythonware.com (Fredrik Lundh) +Date: Mon, 19 Apr 1999 08:14:46 GMT +Subject: Plugins, or selecting modules to import at runtime +References: <924379180.825429211@news.intergate.bc.ca> +Message-ID: <017201be8a3e$d327a9f0$f29b12c2@pythonware.com> +X-UID: 929 + +Gerald Gutierrez wrote: +> I'd like to write a program in Python in which the user can select one of +> several modules to execute through a function that has the same name in all the +> modules. I don't believe "import" lets me pass it a string. There is also +> reload(), but the module to reload must be previously imported. +> +> This is very similar to plugins like that used in Netscape, Photoshop and the +> GIMP. +> +> Can someone please give me a hint? + +module = __import__("module") + +also see: +http://www.pythonware.com/people/fredrik/fyi/fyi06.htm + + + + + + + diff --git a/demo/ermis-f/python_m/cur/0930 b/demo/ermis-f/python_m/cur/0930 new file mode 100644 index 00000000..fc3d09ac --- /dev/null +++ b/demo/ermis-f/python_m/cur/0930 @@ -0,0 +1,72 @@ +From: MGoehmann at t-online.de (Monika G�hmann) +Date: Sun, 11 Apr 1999 10:33:19 GMT +Subject: cygwin32-b20 _tkinter problem +Message-ID: <371071b0.15953469@news.btx.dtag.de> +Content-Length: 2414 +X-UID: 930 + +When I try to compile python-1.5.2b2 under WinNT with Cygwin32-B20 it +works very well without Tk-Module. But when I try to include Tk, I get +the following messages: + +gcc python.o \ + ../libpython1.5.a -ltix4180 -ltk80 -ltcl80 -lstdc++ -lm +-lm -o python +../libpython1.5.a(_tkinter.o): In function `Tkapp_CreateFileHandler': + //c/temp/Python-1.5.2b2/Modules/./_tkinter.c:1459: undefined +reference to `Tcl_CreateFileHandler' +../libpython1.5.a(_tkinter.o): In function `Tkapp_DeleteFileHandler': + //c/temp/Python-1.5.2b2/Modules/./_tkinter.c:1486: undefined +reference to `Tcl_DeleteFileHandler' +../libpython1.5.a(_tkinter.o): In function `EventHook': + //c/temp/Python-1.5.2b2/Modules/./_tkinter.c:1913: undefined +reference to `Tcl_CreateFileHandler' + //c/temp/Python-1.5.2b2/Modules/./_tkinter.c:1943: undefined +reference to `Tcl_DeleteFileHandler' +collect2: ld returned 1 exit status +make[1]: *** [link] Error 1 +make: *** [python] Error 2 + +My Modules/Setup looks like this + +# *** Always uncomment this (leave the leading underscore in!): + _tkinter _tkinter.c tkappinit.c -DWITH_APPINIT \ +# *** Uncomment and edit to reflect where your Tcl/Tk headers are: +# -I/usr/local/include \ +# *** Uncomment and edit to reflect where your X11 header files are: +# -I/usr/X11R6/include \ +# *** Or uncomment this for Solaris: +# -I/usr/openwin/include \ +# *** Uncomment and edit for Tix extension only: + -DWITH_TIX -ltix4180 \ +# *** Uncomment and edit for BLT extension only: +# -DWITH_BLT -I/usr/local/blt/blt8.0-unoff/include -lBLT8.0 \ +# *** Uncomment and edit for PIL (TkImaging) extension only: +# -DWITH_PIL -I../Extensions/Imaging/libImaging tkImaging.c \ +# *** Uncomment and edit for TOGL extension only: +# -DWITH_TOGL togl.c \ +# *** Uncomment and edit to reflect where your Tcl/Tk libraries are: +# -L/usr/local/lib \ +# *** Uncomment and edit to reflect your Tcl/Tk versions: + -ltk80 -ltcl80 \ +# *** Uncomment and edit to reflect where your X11 libraries are: +# -L/usr/X11R6/lib \ +# *** Or uncomment this for Solaris: +# -L/usr/openwin/lib \ +# *** Uncomment these for TOGL extension only: +# -lGL -lGLU -lXext -lXmu \ +# *** Uncomment for AIX: +# -lld \ +# *** Always uncomment this; X11 libraries to link with: +# -lX11 + -lstdc++ + +Tcl/Tk header and libs are in the Cygwin32-directories and the +compiler finds them. + +Since I have no idea, what is the equivalent of X11 under Cygwin, I +used libstdc++. Is this the problem ? + + + + diff --git a/demo/ermis-f/python_m/cur/0931 b/demo/ermis-f/python_m/cur/0931 new file mode 100644 index 00000000..ea6fe746 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0931 @@ -0,0 +1,28 @@ +From: fredrik at pythonware.com (Fredrik Lundh) +Date: Tue, 13 Apr 1999 07:26:50 GMT +Subject: Converting a string to a tuple +References: <01be8530$65bb7120$52037e81@saints> <14098.28727.245158.616727@buffalo.fnal.gov> +Message-ID: <00f501be857f$ff636f40$f29b12c2@pythonware.com> +X-UID: 931 + +Charles G Waldman wrote: +> If you're concerned about safety (the "eval" could be evaluating any +> Python code, possibly a hazard if the string is coming from user +> input) then you don't want to use eval at all. + +try: + + result = eval(string, {"__builtins__": {}}) + +or: + + import rexec + r = rexec.RExec() + result = r.r_eval(string) + + + + + + + diff --git a/demo/ermis-f/python_m/cur/0932 b/demo/ermis-f/python_m/cur/0932 new file mode 100644 index 00000000..228a4522 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0932 @@ -0,0 +1,69 @@ +From: bwinton at tor.dhs.org (Blake Winton) +Date: Thu, 15 Apr 1999 03:45:55 GMT +Subject: Novice Question: two lists -> dictionary +References: <7f3j1v$f6j$1@nnrp1.dejanews.com> +Message-ID: +Content-Length: 1494 +X-UID: 932 + +On Thu, 15 Apr, jwtozer at my-dejanews.com wrote: +>How do I make the members of one list the key of a dictionary and the members +>of a second list the members of list values associated with with those keys? +> +>Given: +>ListA = ['10', '10', '20', '20', '20', '24'] +>ListB = ['23', '44', '11', '19', '57', '3'] +> +>Desired Result: +>Dict = {'10': ['23','44'],'20': ['11','19','57'], '24': ['3']} +> +>Any help will be much appreciated. + +Just off the top of my head, (after some playing around, cause +it's sooo easy to do with Python. :) + +Dict = {} +for i in range(len(ListA)): + try: + Dict[ListA[i]].append(ListB[i]) + except KeyError: + Dict[ListA[i]] = [ListB[i]] + +This gives us +Dict = {'24': ['3'], '10': ['23', '44'], '20': ['11', '19', '57']} + +I think you could write a sort function of some sort if you really +needed to get the elements in order, but it would probably just +be easier to use: + +x = Dict.keys() +x.sort() +for i in x: + print i, "=", Dict[i] + +And I'm sure there's an easier way to do it, as well as a way involving +map and or reduce, but it's been a while since I've programmed +functionally, so I'm not going to try. + +# ignore the following code. +def myfunc( key, value ): + global Dict + try: + Dict[key].append(value) + return "got it" + except KeyError: + Dict[key] = [value] + return "need it" +map( myfunc, ListA, ListB ) + +Hope this helps, +Blake. + +-- +I speak for PCDocs +http://www.cluetrain.com/ + + + + + diff --git a/demo/ermis-f/python_m/cur/0933 b/demo/ermis-f/python_m/cur/0933 new file mode 100644 index 00000000..6af1590f --- /dev/null +++ b/demo/ermis-f/python_m/cur/0933 @@ -0,0 +1,13 @@ +From: human at netteens.net (Humans) +Date: Fri, 23 Apr 1999 00:20:53 +0800 +Subject: Here is which country newsgroup ? +Message-ID: <7fku3a$7fu$1@imsp026.netvigator.com> +X-UID: 933 + +as title + + + + + + diff --git a/demo/ermis-f/python_m/cur/0934 b/demo/ermis-f/python_m/cur/0934 new file mode 100644 index 00000000..b0de4854 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0934 @@ -0,0 +1,43 @@ +From: debot at xs4all.nl (Frank de Bot) +Date: Wed, 14 Apr 1999 17:56:17 +0200 +Subject: Tutorial Python +Message-ID: <3714BAA0.12F180F3@xs4all.nl> +Content-Length: 1327 +X-UID: 934 + +Does somebody knows a good tutorial on the internet especialy for python +- CGI Aplications. Currently I have several websites running on PERL (As +you can see at the bottom of this mail). Currently the searchengine has +4100 sites and it takes about 0.80 cpu to search. This is now not a +problem, because I rarely get visitors. But I realy like to get +something that's working fast and good. (Ps I've already checked +python.org, but they aren't giving any examples (And I need them hard to +understand the language)) +Thanks in advance... + +Frank de Bot. + + +-- + \\\|/// + \\ - - // + ( @ @ ) +/----------------------oOOo-(_)-oOOo--------------------\ +| | +| | +| My Email: debot at xs4all.nl | +| Homepages: http://www.searchy.net/ | +| http://www.debot.nl/ppi/ | +| | +| | +\-------------------------------Oooo--------------------/ + oooO ( ) + ( ) ) / + \ ( (_/ + \_) + + + + + + diff --git a/demo/ermis-f/python_m/cur/0935 b/demo/ermis-f/python_m/cur/0935 new file mode 100644 index 00000000..3e107222 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0935 @@ -0,0 +1,31 @@ +From: tseaver at palladion.com (Tres Seaver) +Date: Fri, 23 Apr 1999 08:05:09 -0500 +Subject: Time complexity of dictionary insertions +References: <371F2125.BEC5F892@fzi.de> <7fo08u$4j2$1@nnrp1.dejanews.com> +Message-ID: <37207005.1CC60E1B@palladion.com> +X-UID: 935 + +tim_one at email.msn.com wrote: +> +> In article <371F2125.BEC5F892 at fzi.de>, +> Oliver Ciupke wrote: +> > As I understood from the Python documentation, dictionaries are +> > implemented as extensible hash tables. +> +> Yes. +> +> > What I didn't find either in the references or in the FAQ is: what is +> > the actual time complexity for an insertion into a dictionary? +> +> Min O(1), Max O(N), Ave O(1). If the hash function is doing a terrible job +> (e.g. maps every key to the same hash value), make those all O(N). + +C++ STL junkies know this as "amortized constant time". + +========================================================= +Tres Seaver tseaver at palladion.com 713-523-6582 +Palladion Software http://www.palladion.com + + + + diff --git a/demo/ermis-f/python_m/cur/0936 b/demo/ermis-f/python_m/cur/0936 new file mode 100644 index 00000000..5a20d787 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0936 @@ -0,0 +1,45 @@ +From: arcege at shore.net (Michael P. Reilly) +Date: Thu, 22 Apr 1999 12:51:56 GMT +Subject: stdout in a restricted environment +References: <7fn3rs$1v9$1@whisper.globalserve.net> +Message-ID: +Content-Length: 1351 +X-UID: 936 + +Chris AtLee wrote: +: I'm trying to make a program that will enable users to connect to a server +: running a python interpreter and be able to program in a restricted +: environment in that interpreter. The rexec object has methods called s_exec +: and s_eval which are supposed to use secure forms of the standard I/O +: streams, but I can't redefine them to be something else (specifically, an +: object that sends the response back to the client) Any pointers on how to +: go about redirecting the standard I/O streams from a restricted environment? + +I would suggest making a subclass of RExec that redefines the +make_delegate_files method. + + def __init__(self, socket, hooks = None, verbose = 0): + RExec.__init__(self, hooks=hooks, verbose=verbose) + self._data_socket = socket + + def make_delegate_files(self): + reader = self._data_socket.makefile('r') + writer = self._data_socket.makefile('w') + s = self.modules['sys'] + self.delegate_stdin = FileDelegate(s, 'stdin') + self.delegate_stdout = FileDelegate(s, 'stdout') + self.delegate_stderr = FileDelegate(s, 'stderr') + self.restricted_stdin = FileWrapper(reader) + self.restricted_stdout = FileWrapper(writer) + self.restricted_stderr = FileWrapper(writer) + +Granted, I haven't tried this, but it looks correct. :) + +Good luck. + + -Arcege + + + + + diff --git a/demo/ermis-f/python_m/cur/0937 b/demo/ermis-f/python_m/cur/0937 new file mode 100644 index 00000000..d8410bb3 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0937 @@ -0,0 +1,47 @@ +From: phd at sun.med.ru (Oleg Broytmann) +Date: Tue, 27 Apr 1999 18:49:38 +0400 (MSD) +Subject: PyApache problem (was -- Re: Cross-references between dynamically loaded modules under AIX) +In-Reply-To: <19990427081109.C579158@vislab.epa.gov> +Message-ID: +Content-Length: 1660 +X-UID: 937 + +Hello! + + Recenly I found a problem trying to use PyApache. I installed it on Sun +(sparc-solaris), found it working nicely, and tried to install it on linux. +I got an error in httpd error_log: + +Traceback (innermost last): + File "xxx.py", line 3, in ? + import cgi + File "/usr/local/lib/python1.5/cgi.py", line 422, in ? + import urllib + File "/usr/local/lib/python1.5/urllib.py", line 25, in ? + import socket +ImportError: /usr/local/lib/python1.5/lib-dynload/socketmodule.so: +undefined symbol: _Py_NoneStruct + + I recompiled PyApache with different options. Sometimes it works, +sometimes it files again with the same error. + Anyone understand what is going on and how to make PyApache stable? + + (on all my systems - sun, redhat 5.1 and debian 2.1 - there is python +1.5.1 and apache 1.3.4; recently I upgraded to python 1.5.2 and apache +1.3.6, but nothing changed - the same problem with dynamic loading) + +On Tue, 27 Apr 1999, Randall Hopper wrote: +> Not knowing NumPy, my assumption is you are failing on a .so-to-.so module +> dynamic link. If so... +[skipped] +> Randall + +Oleg. +---- + Oleg Broytmann National Research Surgery Centre http://sun.med.ru/~phd/ + Programmers don't die, they just GOSUB without RETURN. + + + + + diff --git a/demo/ermis-f/python_m/cur/0938 b/demo/ermis-f/python_m/cur/0938 new file mode 100644 index 00000000..6e51009a --- /dev/null +++ b/demo/ermis-f/python_m/cur/0938 @@ -0,0 +1,42 @@ +From: davidh at progmatics.com.au (David Hobley) +Date: Thu, 15 Apr 1999 12:19:06 +1000 +Subject: How libpython1.5.so +References: <371320F4.5338600B@earth.ox.ac.uk> <14100.50513.166352.167346@amarok.cnri.reston.va.us> +Message-ID: <37154C9A.44DB755B@progmatics.com.au> +X-UID: 938 + + +"Andrew M. Kuchling" wrote: + +> Nick Belshaw writes: +> >Whilst trying to get Python plugins to work on Gnumeric-0.23 I bumped up +> >against the need for libpython1.5.so.0.0.0 +> +> Python doesn't build a .so file, so I think the Gnumeric + +Is there any reason it doesn't? It is stunningly useful when building arbitrary +extensions +as you can build them shared and not have to relink python. Or am I +misunderstanding +something? + +The last time I built the pykde stuff for FreeBSD I ran into this and ended up +hacking +together a libpython1.5.so which solved all my linking problems. + + +-- +Cheers, +david davidh at progmatics.com.au + +Progmatics Pty Ltd - Architects of IT and Internet Solutions + +Level 8, 191 Clarence Street Phone +61 2 9262 4933 +Sydney NSW Australia Fax +61 2 9262 4045 +http://www.progmatics.com.au/ + + + + + + diff --git a/demo/ermis-f/python_m/cur/0939 b/demo/ermis-f/python_m/cur/0939 new file mode 100644 index 00000000..6024a142 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0939 @@ -0,0 +1,42 @@ +From: bwarsaw at cnri.reston.va.us (Barry A. Warsaw) +Date: Fri, 2 Apr 1999 17:06:44 -0500 (EST) +Subject: Changes to this list +Message-ID: <14085.16244.835438.347220@anthem.cnri.reston.va.us> +Content-Length: 1320 +X-UID: 939 + +Folks, + +Breaking Warsaw's Second Law of Hackputing[*], I am making the +following changes to python-list at python.org. This message will only +be seen by you poor saps^H^H^H^H^H^H^H^H^Hlucky souls who are +subscribed via email; it is not going out to Usenet (I hope ;-). + +First, I'm pointing the news host for the list to an internal NNTP +machine instead of the Alternet feed. This is partially to test our +internal server and also because our NNTP machine has a /much/ longer +expiry for c.l.py and c.l.py.a so it'll be easier for me to use for +debugging. I plan to run the real list off of our internal server +when this thing goes live. + +Second, I've installed what will be Mailman 1.0b11. I believe this +fixes the Usenet archiving bug that Wesley reported. On the downside, +it's too hard to fix the old archives, so I've essentially just blown +them away. Once I turn gating back on, the new archives should be +much better. + +I'd like to let this run for about a week, and then start coordinating +with Sjoerd on migration issues. + +Enjoy, + +-Barry + +[*] WSLH: "Never change anything after 3pm on Friday." In totally +flaunting this law, I'm am right now heading out for at least 12 +hours. I'm going to turn the gateway back on after this message goes +out, but I'll show Guido how to shut it off, just in case ;-) + + + + diff --git a/demo/ermis-f/python_m/cur/0940 b/demo/ermis-f/python_m/cur/0940 new file mode 100644 index 00000000..20313b39 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0940 @@ -0,0 +1,37 @@ +From: mal at lemburg.com (M.-A. Lemburg) +Date: Tue, 20 Apr 1999 09:00:12 GMT +Subject: Python on multiple processor machines +References: <7dv7t7$h96$1@nnrp1.dejanews.com> +Message-ID: <371C421C.7610BAB4@lemburg.com> +Content-Length: 1289 +X-UID: 940 + +max at rightworks.com wrote: +> +> I would like to hear some insights to running Python apps on multi-processor +> machines. We are developing an app a good deal of it in Python and there are +> those amoungst us who predict that the Python interpreter would be forced to +> effectively serialize it's processing in order to be thread safe if running +> on a multi-processor machine. We could run multiple interpreters, but this +> wouldn't provide the kind of scalability we need, and implies other problems +> of dispatching etc. Our application does web based catalog management. I +> need facts to keep me from becoming a Java programmer. thanks, max + +Don't know what platform you use, but on Unix you can easily get away +with implementing a multi process model. Communication would be done +via shared memory or sockets. The latter even buys you clustering in +case IO should become a bottleneck. + +As for free threading, Greg Stein is working on that idea: +http://www.lyra.org/~greg/ (I think it was). + +-- +Marc-Andre Lemburg Y2000: 255 days left +--------------------------------------------------------------------- + : Python Pages >>> http://starship.skyport.net/~lemburg/ : + --------------------------------------------------------- + + + + + diff --git a/demo/ermis-f/python_m/cur/0941 b/demo/ermis-f/python_m/cur/0941 new file mode 100644 index 00000000..ab8d4a8c --- /dev/null +++ b/demo/ermis-f/python_m/cur/0941 @@ -0,0 +1,59 @@ +From: bernhard_mulder at ccm.sc.intel.com (Bernhard Mulder) +Date: Fri, 16 Apr 1999 14:11:12 -0700 +Subject: Pythonw IDLE Tab setting +References: <3715C0A9.D57546B@connection.com> +Message-ID: <3717A770.34CCEF8@ccm.sc.intel.com> +Content-Length: 1205 +X-UID: 941 + +Here are the changes I made to get an indent of 3: + +78c78 +< spaceindent = 3*" " +--- +> spaceindent = 4*" " +110,111c110,111 +< if i == n and chars[-3:] == " ": +< ndelete = 3 +--- +> if i == n and chars[-4:] == " ": +> ndelete = 4 +155c155 +< line = line[:i] + " " + line[i:] +--- +> line = line[:i] + " " + line[i:] +171,173c171,173 +< indent = indent[:-1] + " " +< elif indent[-3:] == " ": +< indent = indent[:-3] +--- +> indent = indent[:-1] + " " +> elif indent[-4:] == " ": +> indent = indent[:-4] +176c176 +< indent = indent[:-3] +--- +> indent = indent[:-4] + + +"Colin J. Williams" wrote: + +> The program AutoIndent.py has: +> +> prefertabs = 0 +> spaceindent = 4*" " +> +> Should spaceindent be changed to 2 if one wishes the tabs to have +> that value? +> +> Currently I use PythonWin which permits the user to change the Tab +> value (incidentally, it also provides for breakpoints). +> +> Any advice would be appreciated. +> +> Colin W. + + + + + diff --git a/demo/ermis-f/python_m/cur/0942 b/demo/ermis-f/python_m/cur/0942 new file mode 100644 index 00000000..69cb4417 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0942 @@ -0,0 +1,21 @@ +From: peteb at octave.demon.co.uk (Pete Becker) +Date: Thu, 8 Apr 1999 12:22:36 +0100 +Subject: Wanted: man2html, info2html +Message-ID: +X-UID: 942 + +Hi, + +As the subject says and having searched off http://www.python.org +without much success, I'm looking for native Python (not Perl!) packages +to convert man and info pages to html. Can be batch-oriented or on-the- +fly CGI based. + +Many thanks for any info ;-) + +-- +Pete Becker + + + + diff --git a/demo/ermis-f/python_m/cur/0943 b/demo/ermis-f/python_m/cur/0943 new file mode 100644 index 00000000..ecc1c92d --- /dev/null +++ b/demo/ermis-f/python_m/cur/0943 @@ -0,0 +1,16 @@ +From: morse at harborcom.net (Kevin Dahlhausen) +Date: Wed, 14 Apr 1999 14:27:41 GMT +Subject: Documentation for SIP C++ Wrapper Generator? +Message-ID: <3714a549.185097135@news.oh.verio.com> +X-UID: 943 + +Is there any documentation for Phil Thompson's C++ interface generator SIP? +Is the module spec. the same as for SWIG? + +(I'm downloading the Qt bindings to use as an example.) + +Thanks........ + + + + diff --git a/demo/ermis-f/python_m/cur/0944 b/demo/ermis-f/python_m/cur/0944 new file mode 100644 index 00000000..857a3423 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0944 @@ -0,0 +1,21 @@ +From: spamfranke at bigfoot.de (Stefan Franke) +Date: Thu, 29 Apr 1999 18:06:26 GMT +Subject: HTML "sanitizer" in Python +References: <372a9bd7.21336470@news.omnilink.de> +Message-ID: <372b9f60.22241571@news.omnilink.de> +X-UID: 944 + +Oh, just saw a bug: + +On Thu, 29 Apr 1999 18:01:54 GMT, spamfranke at bigfoot.de (Stefan Franke) wrote: + +>source = open("/path/file.txt", "r") +>dest = open("/path/file.txt", "w") +One should use different filenames here of course. + +>Stefan + + + + + diff --git a/demo/ermis-f/python_m/cur/0945 b/demo/ermis-f/python_m/cur/0945 new file mode 100644 index 00000000..779c96f3 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0945 @@ -0,0 +1,24 @@ +From: jeremy at cnri.reston.va.us (Jeremy Hylton) +Date: Mon, 5 Apr 1999 17:45:46 -0400 (EDT) +Subject: SNMPy update +In-Reply-To: <7ear25$ksf$1@news-sj-3.cisco.com> +References: <7e1hiq$a71$1@Starbase.NeoSoft.COM> + <7ear25$ksf$1@news-sj-3.cisco.com> +Message-ID: <14089.11820.416453.80124@bitdiddle.cnri.reston.va.us> +X-UID: 945 + +I'll second your sentiment! I did some work on an X.509 library +written entirely in Python. Like you friend's SNMP code, it will +probably never be released; I don't have time to finish it nor did I +expect that I'd want to release it given the export control hassles. +However, it seemed clear to me that an ASN.1 compiler could be written +to generate the encode/decode routines. If someone is interested in +that, I've got some design notes and rough code on how to do the +encode/decode and on how to build a backend for SNACC. (A free-ish +ASN.1 compiler; the only one?) + +Jeremy + + + + diff --git a/demo/ermis-f/python_m/cur/0946 b/demo/ermis-f/python_m/cur/0946 new file mode 100644 index 00000000..6e0baf8e --- /dev/null +++ b/demo/ermis-f/python_m/cur/0946 @@ -0,0 +1,43 @@ +From: gmcm at hypernet.com (Gordon McMillan) +Date: Fri, 16 Apr 1999 17:53:20 GMT +Subject: Imperfections in ihooks.py? +In-Reply-To: +References: +Message-ID: <1287837093-4782027@hypernet.com> +Content-Length: 1132 +X-UID: 946 + +[Michael Hudson messes with ihooks and /F points him to Greg's +imputil.py at http://www.lyra.org/greg/small/ ]: + +> Ah! Fantastic! +> +> Usual case; I start to think about a problem, ask about it and find +> someone else has solved the problem already. +> +> Not perfection yet though - imputil.py contains these lines: +> +> def _reload_hook(self, module): +> raise SystemError, "reload not yet implemented" +> +> which was one of the things I was moaning about in my post. + +Greg is being bad. First, that page hasn't been updated with the link +to my installer (www.mcmillan-inc.com/install.html), and his +imputil.py doesn't have my patch. Said patch doesn't implement +reload, but it does at least determine whether the reload request is +for a module under the hook's control. If not, it passes the request +on. + +I looked at what it would take to implement reload. It didn't look +_that_ bad. However, for my purposes (serving modules from an +archive) it just didn't make much sense. I mean, we're talking about +an alternative to freeze after all... + +Nits aside, imputil.py is a truly outstanding piece of code. + +- Gordon + + + + diff --git a/demo/ermis-f/python_m/cur/0947 b/demo/ermis-f/python_m/cur/0947 new file mode 100644 index 00000000..cc3d1af3 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0947 @@ -0,0 +1,42 @@ +From: tseaver at palladion.com (Tres Seaver) +Date: Fri, 30 Apr 1999 08:19:22 -0500 +Subject: Oracle Call Interface +References: <7gb3hn$lse$1@nnrp1.dejanews.com> +Message-ID: <3729ADDA.8E51C1D0@palladion.com> +Content-Length: 1427 +X-UID: 947 + +Jeffrey Chang wrote: +> +> > If anyone has experience writing applications directly to the Oracle Call +> > Interface (OCI), in Python or JPython please send me examples or references on +> > how to do it. +> +> Yuck! What are you planning to do? Do you really really need to write +> directly to the OCI or can you use one of the available Oracle extension +> modules? +> +> About a year ago, I used the oracledb module from Digital Creations with +> Oracle7. It's very nice, but not optimized, and thus slow for large +> queries. Since then, Digital Creations has made DCOracle +> (http://www.digicool.com/DCOracle/; their commercial extension module) +> open source, so I guess that will replace oracledb. I haven't looked at +> it, but according to the FAQ, it's "much faster." +> +> I strongly advise you to use an extension module or JDBC if at all +> possible. Writing to the OCI is extremely ugly -- all the stuff we try to +> avoid by using python! + +ODBC/JDBC solutions suffer from "least-common-denominator" symptom; one can't +easily exploit Oracleisms. I haven't played with DCOracle yet, but wrapping OCI +into a nice Pythonic package would be a big win in some situations (passing +array parameters to stored procedures is the one I most often want). + +-- +========================================================= +Tres Seaver tseaver at palladion.com 713-523-6582 +Palladion Software http://www.palladion.com + + + + diff --git a/demo/ermis-f/python_m/cur/0948 b/demo/ermis-f/python_m/cur/0948 new file mode 100644 index 00000000..314ec0d2 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0948 @@ -0,0 +1,48 @@ +From: fw at cygnus.stuttgart.netsurf.de (Florian Weimer) +Date: 27 Apr 1999 21:10:42 +0200 +Subject: converting perl to python - simple questions. +References: <7fvagp$8lm$1@nnrp1.dejanews.com> +Message-ID: +Content-Length: 1427 +X-UID: 948 + +andrew-johnson at home.com (Andrew Johnson) writes: + +> Just a point of clarification: Actually, perl programmer's +> traditionally use 'exists' to test if a key is in a hash ... + +No, unfortunately that's wrong: + +| defined(EXPR) +| +| defined EXPR +| Returns a boolean value saying whether the lvalue +| EXPR has a real value or not. Many operations +| return the undefined value under exceptional con- +| ditions, such as end of file, uninitialized vari- +| able, system error and such. This function allows +| you to distinguish between an undefined null +| string and a defined null string with operations +| that might return a real null string, in particu- +| lar referencing elements of an array. You may +| also check to see if arrays or subroutines exist. +| Use on predefined variables is not guaranteed to +| produce intuitive results. Examples: +| +| print if defined $switch{'D'}; +| [...] + +(Quotation from the Perl 4 manpage. This version doesn't have an +`exists' function.) + +> using +> 'defined' to test for key existence is a mistake---'defined' will +> only tell you if that key exists and has a defined value associated +> with it: Witness the defined test on key2 in the following: + +Of course you are right. That's the reason why `exists' was introduced +-- I guess in Perl 5. + + + + diff --git a/demo/ermis-f/python_m/cur/0949 b/demo/ermis-f/python_m/cur/0949 new file mode 100644 index 00000000..416df1e2 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0949 @@ -0,0 +1,43 @@ +From: Richard.Jones at fulcrum.com.au (Richard Jones) +Date: Fri, 30 Apr 1999 00:24:45 GMT +Subject: GUI and creating GIF +In-Reply-To: Message from Mike Steed of 1999-Apr-29 10:20:38, + <372878C6.2CD3858A@natinst.com> +References: <372878C6.2CD3858A@natinst.com> +Message-ID: <199904300024.KAA14035@icarus.fulcrum.com.au> +X-UID: 949 + +[Mike Steed] +> +> John Leach wrote: +> > +> > I'd also like to use gdmodule but I can't understand the documentation +> > (I've emailed to ask Richard Jones for more docs). I'm new to Python. +> > Does anyone have any sample programs they can send? +> +> You might look at Richard's httpd logfile reporting tool (graph.py uses +> gdmodule). +> +> http://starship.python.net/~richard/httpd_log/ +> +> Also, below is a simple demo that used to be distributed with gdmodule, +> although it doesn't appear to be on Richard's site anymore. I don't +> have "demoin.gif", so you will have to tweak the code some.... + + I lost the code, docs and demo scripts about a couple of months ago. I'll +put this demo script back up on the web page. + + "demoin.gif" comes with GD - but you could use any GIF image. + + graph.py is not something I'd point anyone to as sample code :) ... I'd feel +much better pointing them to the PIL version which I wrote much more recently +with a better design. + + + Richard + + + + + + diff --git a/demo/ermis-f/python_m/cur/0950 b/demo/ermis-f/python_m/cur/0950 new file mode 100644 index 00000000..7cec65bb --- /dev/null +++ b/demo/ermis-f/python_m/cur/0950 @@ -0,0 +1,84 @@ +From: arcege at shore.net (Michael P. Reilly) +Date: Wed, 28 Apr 1999 19:28:42 GMT +Subject: running application config files written in Python +References: +Message-ID: +Content-Length: 2668 +X-UID: 950 + +Nathan Froyd wrote: +: Say I have an application whose configuration language I want to be +: Python. I have all my extra types implemented in C. Now what I'm +: wondering is what's the best way to run that file so that the +: functions, variables, etc. get imported into the Python interpreter +: embedded in my program? + +: Along the same lines, once I have run the file, what's the easiest way +: to find out if a particular function/variable has been defined? For +: example, if I always wanted to run the user-defined function +: `startup_func', how would I go about doing that? + +You can do this in two ways easily (and other ways less easily). + +1) Store the configuration files as modules, then import them. +If you are worried about security, you can import them using rexec. + + char modulename[] = "app_config"; + PyObject *config_module, *config_dict; + PyObject *startup_func, *result; + Py_Initialize(); + + if ((config_module = PyImport_ImportModule(modulename)) != NULL && + (config_dict = PyModule_GetDict(config_module)) != NULL) { + startup_func = PyDict_GetItemString(config_dict, "startup_func"); + /* look for startup function, but ignore if not present */ + result = NULL; + if (startup_func != NULL && PyCallable_Check(startup_func)) + result = PyObject_CallFunction(startup_func, ""); + if ((startup_func == NULL || result == NULL) && + PyErr_Occurred() && + !PyErr_ExceptionMatches(PyExc_AttributeError)) + /* ignore AttributeError exceptions */ + PyErr_Print(); + PyErr_Clear(); + Py_XDECREF(startup_func); + Py_XDECREF(result); + } else { + /* the module could not be loaded */ + PyErr_Print(); + Py_Exit(1); + } + +All values are stored in the module (accessed thru config_dict). The +exception handling is more verbose then the next method. + +2) Run the equivalent of execfile(). + + char filename[] = "app_config.py"; + FILE *app_config; + + Py_Initialize(); + + app_config = fopen(filename, "r"); + if (PyRun_Simplefile(app_config, filename) == -1) { + fclose(app_config); + /* the traceback has already been written to stderr */ + Py_Exit(1); + } + fclose(app_config); + PyRun_SimpleString("try: startup_func()\n\ + except NameError: pass\n"); + +All values are stored in the current namespace (the module __main__, +and accessed thru the undocumented function PyEval_GetGlobals() or thru +other PyRun_* calls). If there are exceptions raised, PyRun_* calls +handle the output; the return value is either -1 for failure, 0 for +success. + +I would suggest using method (1). Good luck. + -Arcege + + + + + diff --git a/demo/ermis-f/python_m/cur/0951 b/demo/ermis-f/python_m/cur/0951 new file mode 100644 index 00000000..e57d406e --- /dev/null +++ b/demo/ermis-f/python_m/cur/0951 @@ -0,0 +1,24 @@ +From: webmaster at python.org (webmaster at python.org) +Date: 12 Apr 1999 14:27:48 -0400 +Subject: ANNOUNCEMENT: Some Python Documentation in Hungarian language +References: +Message-ID: <61k8vhelsr.fsf@anthem.cnri.reston.va.us> +X-UID: 951 + +>>>>> "HZ" == Hever Zsolt writes: + + HZ> I am writing my diploma work in Python. I made two enclosures + HZ> to it and converted them into HTML format. Now I put them out + HZ> on the Internet with a Python home page together all in + HZ> Hungarian language. I hope this documentation will help Python + HZ> to be better known in Hungary. + +Cool! I've added links to the Non-English resources page at + + http://www.python.org/doc/NonEnglish.html + +-Barry + + + + diff --git a/demo/ermis-f/python_m/cur/0952 b/demo/ermis-f/python_m/cur/0952 new file mode 100644 index 00000000..8d238cb0 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0952 @@ -0,0 +1,46 @@ +From: wtanksle at dolphin.openprojects.net (William Tanksley) +Date: Fri, 30 Apr 1999 02:59:54 GMT +Subject: while (a=b()) ... +References: +Message-ID: +Content-Length: 1360 +X-UID: 952 + +On Thu, 29 Apr 1999 16:48:39 -0700 (PDT), Nathan Clegg wrote: +>I have some deep-rooted "hates" in programming and don't even know where +>some of them came from. One of them is "while 1" loops. They seem +>somehow at the same level as goto statements and should be used, in my +>mind, about as rarely. + +I agree. Especially since while(1) loops require the use of a goto inside +of them. + +>The ideal, of course, would be: +>while (c = curs.fetchone()): ... + +I have done my own arguing for an assignment expression, but this I can't +countenance. A while statement containing an explicit assignment isn't +any kind of an ideal; it's a necessary evil. + +Thankfully, Python offers some ways around the problem -- making an object +is one of them, and it results in the cleanest while statement (although I +think it's too messy to stay in Python 2). Hopefully, Python 2 will offer +some other ways -- I rather like Sather-K's notion of streams. + +>That is my only complaint about python, that statements cannot be +>expressions. + +I've got some other complaints, but in spite of my complaints Python still +is the easiest language I've worked with. I'm afraid that if they ever +implement any of my suggestions the language will get way worse. :) + +>Nathan Clegg + +-- +-William "Billy" Tanksley +"But you shall not escape my iambics." + -- Gaius Valerius Catullus + + + + diff --git a/demo/ermis-f/python_m/cur/0953 b/demo/ermis-f/python_m/cur/0953 new file mode 100644 index 00000000..f69e32e8 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0953 @@ -0,0 +1,20 @@ +From: lars.lone at post.tele.dk (Lone H. og Lars G.) +Date: Wed, 7 Apr 1999 20:12:27 +0200 +Subject: Phyton x-windows GUI example needed +Message-ID: <7eg741$5t1$2@news.inet.tele.dk> +X-UID: 953 + +Hi' + +To get started with phyton x-windows GUI programming I would appreciate any +code examples or references. + +Thanks. + Lars + + + + + + + diff --git a/demo/ermis-f/python_m/cur/0954 b/demo/ermis-f/python_m/cur/0954 new file mode 100644 index 00000000..a7b04624 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0954 @@ -0,0 +1,52 @@ +From: wware-nospam at world.std.com (Will Ware) +Date: Sat, 10 Apr 1999 23:17:29 GMT +Subject: Python for embedded controllers? +References: <370de606.77891472@news.oh.verio.com> +Message-ID: +Content-Length: 2085 +X-UID: 954 + +Ken McCracken (aa175 at torfree.net) wrote: +: Neal Bridges in Toronto, Ont. has been developing an onboard Forth +: compliler for the Pilot for a while. People seem pretty well enthused +: about it and it is making converts to the Forth language and reattracting +: programmers who had given up on Forth. + +The two things I like about Forth are (1) the interactivity, and (2) the +interpreter is incredibly simple to understand; a bonehead like me can +code one up. I very much applaud the work Mike Gorlick's group is doing, +but it won't be interactive. + +Well, it won't be interactive out of the box, but interactivity could +perhaps be added to it. An obvious approach is to implement a little +language in Python, compile the little langugage interpreter, and load +it onto the target board. + +I can imagine another possible approach, but I'm not clever enough to +know if it's really feasible. Mike et al. are working on an implementation +of the Python virtual machine, to run on a target board. Maybe a Python +variant running on a host could have the parser and compiler without the +VM, and run all its compiled code on the target's VM. + +The appeal of interactivity could be circumvented if one were to write +Python classes that adequately simulated the target board (and where, +necessary, the inputs and outputs from the real world). One could then +interact with a simulation on the host, and in a perfect world, the +code above the hardware simulation layer should port directly to the +target board. Mike's team's effort would apply directly to this +appproach. + +If one went with this development model, it would make sense to maintain +the simulation and improve its accuracy as one developed one's application +code, and had to find and fix progressively subtler bugs. In the +aforementioned perfect world, there would be large open-source simulation +libraries for popular microcontrollers' on-chip +peripherals. +-- + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Will Ware email: wware[at]world[dot]std[dot]com +PGP fp (new key 07/15/97) 67683AE2 173FE781 A0D99636 0EAE6117 + + + + diff --git a/demo/ermis-f/python_m/cur/0955 b/demo/ermis-f/python_m/cur/0955 new file mode 100644 index 00000000..7b32382f --- /dev/null +++ b/demo/ermis-f/python_m/cur/0955 @@ -0,0 +1,51 @@ +From: patrick at ablecommerce.com (Patrick Curtain) +Date: Mon, 05 Apr 1999 23:24:58 +0000 +Subject: building python from the tarball on RedHat +Message-ID: <3709464A.7C5F02D1@ablecommerce.com> +Content-Length: 1755 +X-UID: 955 + +Howdy All! + +Hopefully that subject will narrow down those looking at this message +and save everyone some time. + +First, a confession. I've got a wierd (i think) linux setup. I'm +running the RedHat 5.2 distribution, but I'm using several applications +from source; I'm bypassing the RPM mechanism. This may be the cause of +my troubles, but.... I want to be able to build from tar balls, so... + +I need to have my system setup to run apache (1.3.6), php3 (3.05) and +MySQL (3.22.20a). Using the default RPM's for each of these didn't get +me a working system in which php would talk to mysql. To make that much +work, I downloaded the tar balls for each app, ungzip'd and did the +usual ./configure; make; make install; process. + +Now I'm trying to get python working with MySQL from the source tar +ball. I downloaded py152b2.tgz and did the same process to build it. +When I run the interpreter and say 'import Mysqldb' it says +'ImportError: No module named Mysqldb'. + +I downloaded MySQLmodule-1.4.tar.gz, read the instructions and tried to +build. I'm definitely new to building systems blind, but... +irregardless of what I try, the 'make install' step (or 'make test' +before that) gives the following: + +'./python: error in loading shared libraries +libmysqlclient.so.6: cannot open shared object file: No such file or +directory +make: *** [libinstall] Error 127' + +The file 'libmysqlclient.so.6' is in /usr/local/lib/mysql and that +directory is named in the Modules/Setup file. Not sure about pasting +that section in here, but let me know if that info would help as well. +I just pulled the block from the readme. + +Any ideas? Where can I search from this point? And thanks in advance! +--p +Patrick Curtain, Husband & Father (i also write software) + + + + + diff --git a/demo/ermis-f/python_m/cur/0956 b/demo/ermis-f/python_m/cur/0956 new file mode 100644 index 00000000..e260182f --- /dev/null +++ b/demo/ermis-f/python_m/cur/0956 @@ -0,0 +1,17 @@ +From: jpersson1 at yahoo.com (Jan Persson) +Date: Sat, 24 Apr 1999 16:20:11 +0200 +Subject: Using Tkinter togther with threads +Message-ID: <3721D31A.8650251@yahoo.com> +X-UID: 956 + +I have not been able to find an answer to this question in +the FAQ. Is it possible to use Tkinter together with threads +on the plattforms that support both? + +Regards + //Janne Persson + + + + + diff --git a/demo/ermis-f/python_m/cur/0957 b/demo/ermis-f/python_m/cur/0957 new file mode 100644 index 00000000..3e4b218b --- /dev/null +++ b/demo/ermis-f/python_m/cur/0957 @@ -0,0 +1,33 @@ +From: jeremy at cnri.reston.va.us (Jeremy Hylton) +Date: Fri, 2 Apr 1999 17:49:09 -0500 (EST) +Subject: Is Python dying? +In-Reply-To: <7e30fp$8vf$1@news1.rmi.net> +References: <7dos4m$usi$1@nnrp1.dejanews.com> + <7e30fp$8vf$1@news1.rmi.net> +Message-ID: <14085.18282.936883.727575@bitdiddle.cnri.reston.va.us> +X-UID: 957 + +This is really useless information, but I guess I along with most +other people are fascinated by top ten lists and movie grosses and +... Amazon.com sales ranks. + +Title Amazon.com Sales Rank +Learning Python 1,570 +Programming Python 1,685 +Python : Pocket Reference 3,218 +Internet Programming With Python 8,720 +Mastering Regular Expressions 931 +Programming Perl, 2nd ed. 81 +Perl Cookbook 136 +The C Programming Language 478 +The C++ Programming Language 1,003 +Tcl and the Tk Toolkit 3,362 + +Learning Python seems to be selling well for a book that hasn't been +shipped. :-) + +Jeremy + + + + diff --git a/demo/ermis-f/python_m/cur/0958 b/demo/ermis-f/python_m/cur/0958 new file mode 100644 index 00000000..a0963ffb --- /dev/null +++ b/demo/ermis-f/python_m/cur/0958 @@ -0,0 +1,35 @@ +From: tim_one at email.msn.com (Tim Peters) +Date: Sat, 17 Apr 1999 04:59:29 GMT +Subject: Quick fix to add "+=" +In-Reply-To: <3717EE20.41343593@mediaone.net> +References: <3717EE20.41343593@mediaone.net> +Message-ID: <000701be888f$12fe2920$ee9e2299@tim> +X-UID: 958 + +[Fuming Wang] +> I have searched dejanews. They don't like the "+=" characters. Could you +> be more specific about how to modify the interpreter? I desperate +> here.:) + +There's a Python ToDo entry open on this; it may (or may not) be introduced +in Python2; last time this went around was late last August, in thread "Why +no += operator, please?"; modifying the interpreter was an absurd +suggestion, although that's what it would take; in the meantime, use an +editor with word completion (e.g. Guido's IDLE environment, included with +1.5.2, has this), and/or factor by hand, e.g. not + + a.b.c.d.e.f.g.h.i.j = a.b.c.d.e.f.g.h.i + 1 + +but + + x = a.b.c.d.e.f.g.h.i + x.j = x.j + 1 + +can't-wait-for-a-resumption-of-the-assignment-expression-thread-ly +y'rs - tim + + + + + + diff --git a/demo/ermis-f/python_m/cur/0959 b/demo/ermis-f/python_m/cur/0959 new file mode 100644 index 00000000..898475a0 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0959 @@ -0,0 +1,26 @@ +From: guido at eric.cnri.reston.va.us (Guido van Rossum) +Date: 19 Apr 1999 11:13:50 -0400 +Subject: Python-1.5.2 testing zlib +References: +Message-ID: <5l7lr8tzgx.fsf@eric.cnri.reston.va.us> +X-UID: 959 + +piers at cs.su.oz.au (Piers Lauder) writes: +> My "make check" fails with a core dump after "test_zlib". + +mark at chem.uwa.edu.au (Mark C Favas) replies: +> Works just fine for me on both DEC Alpha +[..] +> These are both with zlib-1.1.3. + +Yes, the new zlib uses features of zlib 1.1.3 that aren't supported by +zlib 1.0.4, so you must use 1.1.3 or later. + +This is documented in the source but easily overseen; unfortunately we +didn't think of putting in a version number test. + +--Guido van Rossum (home page: http://www.python.org/~guido/) + + + + diff --git a/demo/ermis-f/python_m/cur/0960 b/demo/ermis-f/python_m/cur/0960 new file mode 100644 index 00000000..16c1d5ff --- /dev/null +++ b/demo/ermis-f/python_m/cur/0960 @@ -0,0 +1,23 @@ +From: MHammond at skippinet.com.au (Mark Hammond) +Date: Mon, 26 Apr 1999 11:39:50 +1000 +Subject: Python too slow for real world +References: <372068E6.16A4A90@icrf.icnet.uk> <3720A21B.9C62DDB9@icrf.icnet.uk> <3720C4DB.7FCF2AE@appliedbiometrics.com> <3720C6EE.33CA6494@appliedbiometrics.com> +Message-ID: <7g0g3v$h90$1@m2.c2.telstra-mm.net.au> +X-UID: 960 + +Moshe Zadka wrote in message ... +>Um....two wrong assumptions here: +>1. C implementation is /not/ the same as core status: C extension modules +>are numerous and wonderful, for example... + +Why not? I can only think of differences for types, and even these arent +significant. I cant see any distinction between core modules and extension +modules, other than the fact you need an extra file hanging around. + +Mark. + + + + + + diff --git a/demo/ermis-f/python_m/cur/0961 b/demo/ermis-f/python_m/cur/0961 new file mode 100644 index 00000000..211572bc --- /dev/null +++ b/demo/ermis-f/python_m/cur/0961 @@ -0,0 +1,39 @@ +From: faassen at pop.vet.uu.nl (Martijn Faassen) +Date: Wed, 21 Apr 1999 13:20:06 +0200 +Subject: Kosovo database; Python speed +References: <371DAAC2.D9046550@cs.utwente.nl> +Message-ID: <371DB466.32097FE5@pop.vet.uu.nl> +X-UID: 961 + +Richard van de Stadt wrote: +> +> Suppose we were going to make a database to help Kosovars locate +> their family members. This would probably result in hundreds of +> thousands of records (say 1 record (file) per person). +> +> Would Python be fast enough to manage this data, make queries on +> the data, or should compiled programs be used? + +Depends on what queries you make, but if used smartly, Python can +probably be fast enough. From what I've heard Gadfly is (a database +implemented in Python). + +Another alternative is to use Python in combination with an external +database, and communicate to the database with SQL. This is pretty fast. +See for more info: + +http://www.python.org/topics/database/ + +Another thing you may want to look at is Zope -- they have an object +database implemented in Python. It's web oriented, but perhaps that is +what you want: + +http://www.zope.org + +Regards, + +Martijn + + + + diff --git a/demo/ermis-f/python_m/cur/0962 b/demo/ermis-f/python_m/cur/0962 new file mode 100644 index 00000000..e749ee09 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0962 @@ -0,0 +1,24 @@ +From: cjw at connection.com (Colin J. Williams) +Date: Thu, 15 Apr 1999 06:34:17 -0400 +Subject: Pythonw IDLE Tab setting +Message-ID: <3715C0A9.D57546B@connection.com> +X-UID: 962 + +The program AutoIndent.py has: + + prefertabs = 0 + spaceindent = 4*" " + +Should spaceindent be changed to 2 if one wishes the tabs to have +that value? + +Currently I use PythonWin which permits the user to change the Tab +value (incidentally, it also provides for breakpoints). + +Any advice would be appreciated. + +Colin W. + + + + diff --git a/demo/ermis-f/python_m/cur/0963 b/demo/ermis-f/python_m/cur/0963 new file mode 100644 index 00000000..b6fc1b8f --- /dev/null +++ b/demo/ermis-f/python_m/cur/0963 @@ -0,0 +1,68 @@ +From: mbf2y at my-dejanews.com (mbf2y at my-dejanews.com) +Date: Mon, 19 Apr 1999 22:17:10 GMT +Subject: Can PyApache slow things down?! +Message-ID: <7fga0t$55l$1@nnrp1.dejanews.com> +Content-Length: 3422 +X-UID: 963 + +Short version of question: + +I have a project where I am using SGMLParser to parse a HTML document I fetch +from another site. The machine I'm using is slow - a DEC Alpha with (get +this) 20MB of Ram. (Someone must have canibalized the memory to boost +another machine at some point. The lack of RAM makes the machine crawl.) +I'm also sharing this machine with other people. Bottom line is that my +queries take 5-7 sec of wall-clock time for one query, and 3-5 seconds of +wall-clock time for the other. In an attempt to speed things up, I +downloaded and built apache with PyApache included. Added the "AddHandler" +line. I can tell that PyApache is running properly because using "top" I can +see that "httpd" is the process doing all the work, whereas previously, +"myscript.py" was doing the work. Problem: I noticed a slowdown in +wall-clock time. After much pondering, I decided that since my machine is so +low on RAM and the httpd binary nearly doubled in size (to just over a meg), +maybe I'm doing more context switches. So instead of starting 5 httpd's, I +dropped to 2. + +Still, even when I'm the only user on the webserver, the queries were slower +than the "normal" way. I ended up backing out the change, reverted to the +old apache binary and kept the number of webservers at 2; this did speed +things up a touch (should have thought of that sooner.) Anyway, I'm +wondering if this is normal, and if not, what could I be doing wrong? I used +Python 1.5.2b2. However, I also tried this exact same solution with Python +1.5.2 on a machine with more RAM (128MB, but slower chip - an old Sparc 5). +The scripts ran slower with PyApache than without... this makes no sense to +me as at minimum I should be saving time by having fewer context switches... + +Thanks for any help (and if you have an extra second, could you read the +P.S.?) -Fred (I don't ever check dejanews mail... if you want to e-mail me +instead of post here, my address is fred-at-cs-dot-umd-dot-edu) + + +P.S. I'm a graduate student working on a project analyzing search engine +usage. What my project does is it presents the user with a type-in box just +like the "real" search engines. I then take the query and pass it onto the +"real" engine that the user chose (either hotbot or altavista). I get the +page back from altavista/hotbot and then use a class derived from SGMLParser +to parse the page and extract the hits. I then present to the user the +hitlist, free from all the advertising junk present on the "real" search +engine sites. I also have it set up so that whenever the user clicks on a +URL, I write something like "CLICK-ON #47" to a file. My hope is to analyze +usage patterns and try to generate some sort of metric which can indicate a +user's satisfaction with the hitlist based on the user behavior (what +numbered hits they clicked on, etc.) I am trying to collect as many query +sessions as I can over the next 2 weeks or so. If you ever use Altavista or +Hotbot, could you please travel to http://www.cs.umd.edu/~fred/search/ and +bookmark my site? Then the next time (or few times) you have to run a search +engine query, could you use the site? If you have privacy concerns or want a +more detailed description of the research goals, answers can be found at that +site. + +Thanks, +-Fred + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/0964 b/demo/ermis-f/python_m/cur/0964 new file mode 100644 index 00000000..f6069b77 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0964 @@ -0,0 +1,58 @@ +From: festus at altavista.netx (remove 'x" to send me e-mail) +Date: Thu, 29 Apr 1999 03:45:38 GMT +Subject: Maximize Benefit when Purchasing Learning Python +References: <00e401be91a6$4d581750$8b7125a6@cpda6686.mcit.com> +Message-ID: <372bce88.15442009@news.cjnetworks.com> +Content-Length: 2016 +X-UID: 964 + +jkraai at murl.com wrote: + +>How can I help whom when purchasing Python books? +> +>Haven't seen enough about this on the list lately & thought +>it should come up again. +> +>I see on python.org a link to Amazon. I've seen in the +>past that such links can generate a percentage to the +>linking page. +> +>If I buy via this link, will python.org get something from +>Amazon? +> +>If not, who does/can? If python.org can't get it, I'd like to +>see that Mark Lutz gets a little more compensation for +>his efforts. + +I'd rather direct it to myself, personally. Mark Lutz, God bless him, +isn't starving, so far as I know, so I'll do myself a turn, to keep my +own family from starving. I suspect he gets a per-copy fee based on +sales -- regardless who sells them. + +What about python.org? What does their balance sheet look like? Does +anybody know or is this just an assumption that they are living on +barely-get-along street? Are they being funded by the Chinese military +like the US Democrat party? Well, beggars get what they ask for -- +pennies from a few folk. Do beggars do better in the Nederlands? (as +opposed to the US?) What would a python app looked like that graphed, +with tkinter, relative giving among the Dutch, Europeans overall, and +Americans? Could Canadians make up any shortfall? Could we invoice the +Australian government for a million or so and not have them notice? + +www.fatbrain.com wants $23.95 for "Learning Python." I don't know who +runs this outfit, but they look suspiciously like an adjunct of +amazon.com or barnesandnoble.com. I saw an ad for this outfit in the +latest PC Magazine, so I thought I'd check them out. Adios, +fatbrain.com. +www.bookpool.com wants $19.95 for "Learning Python." +www.amazon.com wants $17.97 for "Learning Python." +www.barnesandnoble.com wants $23.96 for "Learning Python." + +I was shocked that amazon.com beat bookpool.com on a computer book -- +especially since I had ordered copies from bookpool.com and thought my +shit didn't stink. Turns out it does. Shockeroo! + + + + + diff --git a/demo/ermis-f/python_m/cur/0965 b/demo/ermis-f/python_m/cur/0965 new file mode 100644 index 00000000..efa44571 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0965 @@ -0,0 +1,35 @@ +From: clarence at silcom.com (Clarence Gardner) +Date: Wed, 14 Apr 1999 14:36:36 GMT +Subject: hey advocates +References: <7etg59$6mt$1@nnrp1.dejanews.com> +Message-ID: +X-UID: 965 + +aaron_watters at my-dejanews.com wrote: +: I don't know whether it really matters or not, but aren't there +: any CGI or web applications written in Python? +: +: http://cgi-resources.com/Programs_and_Scripts/ +: +: [Actually, my experience has been that sites like this one +: don't actually accept submissions they have no exterior interest +: in, but it might be worth a try. Let's harass the poor bugger, +: shall we?] + +Particularly since two of the languages included on the page have +no entries! Python can at least match that :) + +(Further investigation shows that actually there are but the counts on +the home page are wrong. Although the one program provided under +"Unix Shell" is not a CGI program.) + +-- +-=-=-=-=-=-=-=-= +Clarence Gardner +AvTel Communications +Software Products and Services Division +clarence at avtel.com + + + + diff --git a/demo/ermis-f/python_m/cur/0966 b/demo/ermis-f/python_m/cur/0966 new file mode 100644 index 00000000..55e75732 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0966 @@ -0,0 +1,29 @@ +From: mlh at swl.msd.ray.com (Milton L. Hankins) +Date: Mon, 5 Apr 1999 17:04:21 -0400 +Subject: win32pipe.popen2 file objects: How to use advanced operations? +Message-ID: +X-UID: 966 + +I'm trying to use win32pipe.popen2(). + +I'd like to be able to set the buffer size of one or more of the file +objects returned by it. How does one do this? + +Also, how does one perform a non-blocking read or write on such a file +object? + +Is there any documentation on these file objects with these operations +mentioned? I checked the Python library reference's material on file +objects and PythonWin's help to no avail. + +Please respond via email. Thank you. + +-- + Milton L. Hankins -=- +Software Engineer, Raytheon Systems Company -=- RayComNet 7-225-4728 + http://amasts.msd.ray.com/~mlh -=- John 14:12 ><> + + + + + diff --git a/demo/ermis-f/python_m/cur/0967 b/demo/ermis-f/python_m/cur/0967 new file mode 100644 index 00000000..65589fa3 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0967 @@ -0,0 +1,31 @@ +From: cmedcoff at my-dejanews.com (cmedcoff at my-dejanews.com) +Date: Mon, 19 Apr 1999 21:47:47 GMT +Subject: Beginner Help - class problem or string copy semantics? +Message-ID: <7fg8a0$3ib$1@nnrp1.dejanews.com> +X-UID: 967 + +As will soon be apparent I am totally new to Python. In the code fragment +below I expect to see the output "foobar", but I do not. Can anyone tell me +why? All the bookstores seem to be out of "Learning Python". Are they out of +print already or has the initial shipment still not released? + +class Test: + _name = "" + def __init__(self, name): + _name = name + def show(self): + print self._name + + +mytest = Test("foobar") +mytest.show() + +Regards, +Chuck + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/0968 b/demo/ermis-f/python_m/cur/0968 new file mode 100644 index 00000000..15bb392a --- /dev/null +++ b/demo/ermis-f/python_m/cur/0968 @@ -0,0 +1,13 @@ +From: kranio at nospam.nospam.it (Kranio) +Date: Mon, 26 Apr 1999 22:16:43 GMT +Subject: examples for beginners +Message-ID: <3724e511.441513@news.tin.it> +X-UID: 968 + +Could you suggest me where to find some script just for studying? + +Tnx + + + + diff --git a/demo/ermis-f/python_m/cur/0969 b/demo/ermis-f/python_m/cur/0969 new file mode 100644 index 00000000..7d03627e --- /dev/null +++ b/demo/ermis-f/python_m/cur/0969 @@ -0,0 +1,58 @@ +From: spamfranke at bigfoot.de (Stefan Franke) +Date: Thu, 29 Apr 1999 18:01:54 GMT +Subject: HTML "sanitizer" in Python +References: +Message-ID: <372a9bd7.21336470@news.omnilink.de> +Content-Length: 1280 +X-UID: 969 + +On Thu, 29 Apr 1999 12:20:27 -0400, "Scott Stirling" +wrote: + +>On opening files in Windows--I was hoping there was a way to give python the full file path. +>Everything I have seen so far just tells me how to open a file if it's in the same directory I am +>running python from. +Uuh, + + f = open ("c:/my_path/my_file.txt", "r") + +Every in function in the Python library that has a file name argument +accepts a full/relative path also (except when dealing with path and +name components explicitely)! + +Note the normal slashes.. with backslashes you had to write + + f = open ("c:\\my_path\\my_file.txt", "r") + +or + + f = open ( r"c:\my_path\my_file.txt", "r") + +because Python uses the backslash as an escape character inside +string literals, which can be suppressed by using "raw" strings with +a leading 'r'. + +Here's a quick outline of some file processing of your kind, which +may give you a first impression (typed without testing): + +source = open("/path/file.txt", "r") +dest = open("/path/file.txt", "w") + +content = source.read() # read the entire file as a string + +# Do some processing, perhaps +import string +string.replace (content, "some_substring", "by_another") + +dest.write (content) +source.close() +dest.close() + + +Hope that helps, +Stefan + + + + + diff --git a/demo/ermis-f/python_m/cur/0970 b/demo/ermis-f/python_m/cur/0970 new file mode 100644 index 00000000..456589cf --- /dev/null +++ b/demo/ermis-f/python_m/cur/0970 @@ -0,0 +1,24 @@ +From: morse at harborcom.net (Kevin Dahlhausen) +Date: Thu, 15 Apr 1999 14:12:33 GMT +Subject: Different methods with same name but different signature? +References: <3716909C.D8D1B372@fedex.com> <005201be8748$51e0bab0$f29b12c2@pythonware.com> +Message-ID: <3715f36d.74192342@news.oh.verio.com> +X-UID: 970 + +"Fredrik Lundh" wrote: + + +>> - using different names for the methods, +> +>the second method is preferred -- it's faster, easier to +>understand, and less error-prone +> +>imho, it's also an improvement over the pure visitor pattern, +>since it allows you to generate "logical events" that doesn't +>correspond to "physical" data instances in your model. + +I don't quite follow you. Can you explain this in a more detail? + + + + diff --git a/demo/ermis-f/python_m/cur/0971 b/demo/ermis-f/python_m/cur/0971 new file mode 100644 index 00000000..c1cfce7f --- /dev/null +++ b/demo/ermis-f/python_m/cur/0971 @@ -0,0 +1,30 @@ +From: faassen at pop.vet.uu.nl (Martijn Faassen) +Date: Mon, 26 Apr 1999 22:51:15 +0200 +Subject: help +References: <19990426163014.B20207@toast.internal> +Message-ID: <3724D1C3.8BFA2C5B@pop.vet.uu.nl> +X-UID: 971 + +jam wrote: +> +> On Mon, Apr 26, 1999 at 07:18:13PM +0000, Stone Cold wrote: +> > +> > I just got python and I need some help getting started. I have no +> > programing knowlodge yet but I want to know all the languges. can someone +> > help? +> > +[snip Python 'commercial'] +> +> I don't want to sound like a bad commercial, but python is really and truly +> very very cool and a lot of fun to work with. + +I always sound like that too, don't worry. :) (they're calling me a +Python preacher these days, at work) + +Regards, + +Martijn + + + + diff --git a/demo/ermis-f/python_m/cur/0972 b/demo/ermis-f/python_m/cur/0972 new file mode 100644 index 00000000..a6b20b72 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0972 @@ -0,0 +1,65 @@ +From: tismer at appliedbiometrics.com (Christian Tismer) +Date: Mon, 5 Apr 1999 15:35:26 GMT +Subject: Subattributes of classes +References: <19990405104408.A807008@vislab.epa.gov> +Message-ID: <3708D83E.BBE87D60@appliedbiometrics.com> +Content-Length: 1448 +X-UID: 972 + + +Randall Hopper wrote: +> +> class A: +> def __init__( self ): +> self.attr = 123 +> self.attr.subattr = 456 # <--------- Error! +> +> a = A() +> +> This generates an error as I would have expected. +> +> However, I see the same syntax in: +> demos/tkinter/matt/canvas-with-scrollbars.py +> +> and it works: +> +> self.draw = Canvas(self, width="5i", height="5i", +> background="white", +> scrollregion=(0, 0, "20i", "20i")) +> self.draw.scrollX = Scrollbar(self, orient=HORIZONTAL) +> self.draw.scrollY = Scrollbar(self, orient=VERTICAL) +> +> ^^^^^^^^^^^^ +> +> Why? + +This is since the self.draw is assigned a Canvas instance +which is itself an object with attributes. +Here comes your ticket :-) + +>>> class attribs: pass +>>> class A: +... def __init__(self): +... self.attr = attribs() +... self.attr.subattr = 456 +... +>>> x=A() +>>> x.attr +<__main__.attribs instance at 15f87e0> +>>> x.attr.subattr +456 +>>> + +ciao - chris + +-- +Christian Tismer :^) +Applied Biometrics GmbH : Have a break! Take a ride on Python's +Kaiserin-Augusta-Allee 101 : *Starship* http://starship.python.net +10553 Berlin : PGP key -> http://wwwkeys.pgp.net +PGP Fingerprint E182 71C7 1A9D 66E9 9D15 D3CC D4D7 93E2 1FAE F6DF + we're tired of banana software - shipped green, ripens at home + + + + diff --git a/demo/ermis-f/python_m/cur/0973 b/demo/ermis-f/python_m/cur/0973 new file mode 100644 index 00000000..d0e7daf3 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0973 @@ -0,0 +1,48 @@ +From: Digulla at SOWATEC.COM (Aaron Digulla) +Date: Mon, 26 Apr 1999 07:11:31 GMT +Subject: Python and "Hand held" computers +Message-ID: <318D8A1FC77AD211A3110080C83DFC6403139F@comsrv.sowatec.com> +X-UID: 973 + +What about Palm Pilot ? + +-----Original Message----- +From: Jeff Bauer +To: peter.stoehr at weihenstephan.org; Python List +Sent: 4/25/99 1:28 AM +Subject: Re: Python and "Hand held" computers + +"Dr. Peter Stoehr" wrote: +> I'm a great fan of python and I'm now looking for an +> hand held computer (something smaller than a laptop) +> that can be programmed with python. + +This must be PythonCE week. Three requests in 3 days. + +Brian Lloyd's original PythonCE port: + + http://www.digicool.com/~brian/PythonCE/ + +Mark Hammond has extended it: + + http://starship.python.net/crew/mhammond/ce/ + +There is also a mailing list: + + http://www.egroups.com/group/python-ce/ + +Briefly, you should be able to run Python on any +of the CE family. Practically, this means CE +devices based on the MIPS or Hitachi processors. +The developers working on PythonCE all have MIPS +systems, I believe. (At least that's true for +Mark Hammond, Brian Lloyd, and myself.) + +Best regards, + +Jeff Bauer +Rubicon, Inc. + + + + diff --git a/demo/ermis-f/python_m/cur/0974 b/demo/ermis-f/python_m/cur/0974 new file mode 100644 index 00000000..00ba027f --- /dev/null +++ b/demo/ermis-f/python_m/cur/0974 @@ -0,0 +1,37 @@ +From: scrompton at quantisci.co.uk (Stephen Crompton) +Date: Thu, 15 Apr 1999 19:27:22 +0100 +Subject: timezone stuff driving me bonkers!!! +References: <371604B6.C6267011@quantisci.co.uk> <37160A7D.72AD2893@lemburg.com> +Message-ID: <37162F8A.B5CF4307@quantisci.co.uk> +X-UID: 974 + +M.-A. Lemburg wrote: + +> Try the utc2local() function in mxDateTime (an extension package +> which can download from my Python Pages). +> +> It will convert a DateTime instance using UTC values to a +> DateTime instance using local time. The .ticks() method on +> that instance will get you the time since epoch value. +> +> Cheers, +> -- +> Marc-Andre Lemburg Y2000: 260 days left +> --------------------------------------------------------------------- +> : Python Pages >>> http://starship.skyport.net/~lemburg/ : +> --------------------------------------------------------- + +Thanks Marc. But why is the logic wrong in the first place ? + +Cheers, + +Steve. + +------------------------------------------- + +Business Collaborator : http://www.quantisci.co.uk/bc + + + + + diff --git a/demo/ermis-f/python_m/cur/0975 b/demo/ermis-f/python_m/cur/0975 new file mode 100644 index 00000000..671a2269 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0975 @@ -0,0 +1,32 @@ +From: neelk at brick.cswv.com (Neel Krishnaswami) +Date: 28 Apr 1999 19:34:24 -0500 +Subject: Python IS slow ! [was] Re: Python too slow for real world +References: <613145F79272D211914B0020AFF6401914DAD8@gandalf.digicool.com> <372769B0.3CE8C0F3@prescod.net> +Message-ID: <7g89eg$vb0$1@brick.cswv.com> +X-UID: 975 + +In article <372769B0.3CE8C0F3 at prescod.net>, +Paul Prescod wrote: +>William Tanksley wrote: +>> +>> And Oberon (SlimBinaries), and Eiffel (typing and general compile-time +>> error catching), and ... +> +>Actually, isn't Eiffel's type system famous for being full of holes? +> +>Regardless, wouldn't a better source of inspiration on typing be a +>language with *optional* compile-time error checking? + +I've been playing around with Dylan recently, and it seems like what +Python would be if you added "end" blocks and mated it with CLOS. Since +Dylan is nearly as dynamic as Python, I think it might be a good source +of inspiration for Python 2. (And it might even be the case that the +Dylan-to-C compiler might be a source of good bits to improve Python's +speed. I haven't looked at the source yet, though.) + + +Neel + + + + diff --git a/demo/ermis-f/python_m/cur/0976 b/demo/ermis-f/python_m/cur/0976 new file mode 100644 index 00000000..c521b445 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0976 @@ -0,0 +1,46 @@ +From: ivanlan at callware.com (Ivan Van Laningham) +Date: Wed, 28 Apr 1999 20:49:24 GMT +Subject: Maximize Benefit when Purchasing Learning Python +References: <9FJV2.153$pX2.88806@news.shore.net> +Message-ID: <37277454.19DE2FDB@callware.com> +Content-Length: 1125 +X-UID: 976 + +Hi All-- + +"Michael P. Reilly" wrote: +> +> David Ascher wrote: +> : On Wed, 28 Apr 1999 jkraai at murl.com wrote: +> +> :> How can I help whom when purchasing Python books? +> +> : I'll dare to speak for Mark, and say that you should feel free to send +> : either Mark or I (or both) checks for any amount whatsoever. Skip the +> : middleman. Save trees -- don't buy the book, just send us cash. Don't +> : hesitate for a minute. +> +> Better yet. Secure web credit-card transfers? Saves the paper from the +> envelopes and checks/bills. ;) +> +> -Arcege + +People wonder what attracts me to Python. I claim it's the genteel +comportment, sophisticated manner, and air of refined ennui projected by +the participants in the online discussion. + +-ly y'rs, +Ivan +---------------------------------------------- +Ivan Van Laningham +Callware Technologies, Inc. +ivanlan at callware.com +http://www.pauahtun.org +See also: +http://www.foretec.com/python/workshops/1998-11/proceedings.html +Army Signal Corps: Cu Chi, Class of '70 +---------------------------------------------- + + + + diff --git a/demo/ermis-f/python_m/cur/0977 b/demo/ermis-f/python_m/cur/0977 new file mode 100644 index 00000000..4ea09cbb --- /dev/null +++ b/demo/ermis-f/python_m/cur/0977 @@ -0,0 +1,40 @@ +From: aaron_watters at my-dejanews.com (aaron_watters at my-dejanews.com) +Date: Mon, 26 Apr 1999 13:13:37 GMT +Subject: Python and "Hand held" computers +References: <318D8A1FC77AD211A3110080C83DFC6403139F@comsrv.sowatec.com> +Message-ID: <7g1opt$9li$1@nnrp1.dejanews.com> +Content-Length: 1170 +X-UID: 977 + + +> What about Palm Pilot ? + +I think the answer still is "It should be possible, but in +practice the Palm Pilot doesn't have enough memory to make +it an interesting proposition, unless you upgrade it to non-standard +sizes." While it is possible to upgrade the memory (I think) +this means that the audience for palm/Python would probably +be limited to the developers of palm/Python and certain other +hobbiests. For windows CE, by contrast, many machines come with +enough memory (32meg ram/24meg rom in mine, with 10 hours +of uptime) to make python-ce interesting. + +Hope I'm wrong, or the Palm folks change the situation. We've +seen this situation before in other markets and it doesn't harbor +well for the Palm Pilot (cool as it undeniably is). +Please correct me!!! + +btw: gadfly runs on python-ce (with some mods) :) I think it +is the most fully featured sql implementation that runs on wince. +(pocketAccess is braindead.) + -- Aaron Watters http://www.chordate.com + +=== +History: read it and weep. -- Kurt Vonnegut + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/0978 b/demo/ermis-f/python_m/cur/0978 new file mode 100644 index 00000000..6d98131b --- /dev/null +++ b/demo/ermis-f/python_m/cur/0978 @@ -0,0 +1,35 @@ +From: fpinel at fedex.com (frederic pinel) +Date: Fri, 16 Apr 1999 03:21:32 +0200 +Subject: Different methods with same name but different signature? +Message-ID: <3716909C.D8D1B372@fedex.com> +X-UID: 978 + +Hello, + +While trying to implement the visitor pattern in Python, I ran into the +following problem: + +My class needs to have 2 (or more) different methods, but with the same +name, the difference being the signature (an object in my case), +unfortunately Pyhton interprets this as an overidding, and only +considers the last method defined. +C++ being able to switch to the right method, based on the signature, I +thought Python would. + +Being new to Python, is this a limitation or am I missing something? +(Python being great I suspect -and hope- it's my ignorance!) + +Any help would be great! + +PS: as a workaround, I tried: +- using a single method, but checking isinstance() of the object passed +to switch to the right code, +- using different names for the methods, +which both work. + +regards, +frederic + + + + diff --git a/demo/ermis-f/python_m/cur/0979 b/demo/ermis-f/python_m/cur/0979 new file mode 100644 index 00000000..eeb7afbf --- /dev/null +++ b/demo/ermis-f/python_m/cur/0979 @@ -0,0 +1,31 @@ +From: tratt at dcs.kcl.ac.uk (Laurence Tratt) +Date: Tue, 20 Apr 1999 13:45:28 +0100 +Subject: bzip2 module for Python +References: +Message-ID: +X-UID: 979 + +In message + Oleg Broytmann wrote: + +> On Tue, 20 Apr 1999, Laurence Tratt wrote: +>> pyBZlib +> What is it? Sounds good! Where is it? + +pyBZlib is my quick attempt to create a Python interface to the bzip2 +compression library after a 'request' on c.l.p yesterday; I must stress that +it is experimental, incomplete and definitely not for the feint hearted yet. + +It also has a temporary home for a few days until the server I normally use +is back on line. Until then: + + http://yi.com/home/TrattLaurence/pybzlib.tar + +will get you the latest version. + + +Laurie + + + + diff --git a/demo/ermis-f/python_m/cur/0980 b/demo/ermis-f/python_m/cur/0980 new file mode 100644 index 00000000..05399bc5 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0980 @@ -0,0 +1,53 @@ +From: olipt at mayo.edu (Travis Oliphant) +Date: Wed, 14 Apr 1999 17:01:02 -0500 +Subject: python interface to c++ class +In-Reply-To: <3714E388.CD434E8A@pk.highway.ne.jp> +References: <3714E388.CD434E8A@pk.highway.ne.jp> +Message-ID: +X-UID: 980 + +> for example In C++,we can enjoy following +> operations. +> (f_matrix: matrix class for float, d_matrix: for +> double) +> +> 1. f_matrix x1,x2; float y; x2=y*x1; (operation +> between different types) + +The Numeric module has these types of object defined (but extended to N-D +arrays). Operations between different types is supported by +sophisticated broadcasting rules. + +> 2. x1(1,2)=3.4; (substitution for matrix +> element) + +With Numeric one can substitute for array (matrix) elements or array +slices (start, stop, step). + +> 3. d_matrix z; z=x1; +> (auto conversion from float matrix to another +> type(d_matrix)) +> + +Since Python is not a staticly typed language, typing z = x1 when x1 is a +Numeric multiarray object will just bind the name z to the object x1. If +x1 is a Float array and you want a double array, you say. + +z = x1.astype('d') + + +It sounds like you should really check out the Numeric module and see if +it doesn't fit your needs. It is quite a useful tool. + + +Best, + +Travis + + + + + + + + diff --git a/demo/ermis-f/python_m/cur/0981 b/demo/ermis-f/python_m/cur/0981 new file mode 100644 index 00000000..11f0cd73 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0981 @@ -0,0 +1,27 @@ +From: vdkoijk at linux01.prc.tno.nl (John van der Koijk) +Date: 20 Apr 1999 15:41:57 +0200 +Subject: Tkinter canvas scaling does not work for Images?? +Message-ID: <87hfqbjtne.fsf@linux01.prc.tno.nl> +X-UID: 981 + +Hi There, + +I'm playing around with Pmw and (thus Tkinter). After some +experiments, I found out that I can scale lines and such, but Images +do not seem to respond to similar requests. The docs don't seem to +mention this interesting limitation. + +Any clues? + +Regards, +-- +John van der Koijk. +-- +TNO Institute of Industrial Technology + +PO Box 5073, 2600 GB, Delft, The Netherlands +Phone +31 15 2608833, Fax +31 15 2608846 + + + + diff --git a/demo/ermis-f/python_m/cur/0982 b/demo/ermis-f/python_m/cur/0982 new file mode 100644 index 00000000..85695b98 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0982 @@ -0,0 +1,26 @@ +From: jbauer at rubic.com (Jeff Bauer) +Date: Thu, 22 Apr 1999 11:45:22 GMT +Subject: Directory of current file +References: +Message-ID: <371F0BD2.7D40A957@rubic.com> +X-UID: 982 + +David Ascher wrote: +> Tip: To find out the directory of the currently executing program, use: +> +> import sys, os +> if __name__ == '__main__': +> _thisDir = '' +> else: +> _thisDir = os.path.split(sys.modules[__name__].__file__)[0] + +David, what are the advantages over this? + + _thisDir = os.path.split(sys.argv[0])[0] + +Jeff Bauer +Rubicon, Inc. + + + + diff --git a/demo/ermis-f/python_m/cur/0983 b/demo/ermis-f/python_m/cur/0983 new file mode 100644 index 00000000..958b5e67 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0983 @@ -0,0 +1,23 @@ +From: bwinton at tor.dhs.org (Blake Winton) +Date: Mon, 05 Apr 1999 03:23:02 GMT +Subject: help +References: <7e1fr0$6cio$1@titan.xtra.co.nz> +Message-ID: +X-UID: 983 + +On Fri, 2 Apr 1999 15:58:52 +1200, nfbb wrote: +>Hi there - I'm running Windows 98 and was wondering what the best program +>for writing python Source code is under this operating system? + +I like vim, but I come from a Unix background, and if you don't already +know vim, you'ld probably be better starting off with something else. + +IDLE (Guido's IDE) is also up on my favourites list. + +Later, +Blake. + + + + + diff --git a/demo/ermis-f/python_m/cur/0984 b/demo/ermis-f/python_m/cur/0984 new file mode 100644 index 00000000..90c46ae7 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0984 @@ -0,0 +1,26 @@ +From: charles.choi at computer.org (Charles Y. Choi) +Date: Fri, 23 Apr 1999 08:19:37 -0700 +Subject: 1.5.2 Build Snag +Message-ID: +X-UID: 984 + +Folks- + +Found out my problem was with a bad build of gcc2.8.1 here and _not_ the +release of +Python 1.5.2 - Much thanks to Oleg for his feedback on this - + + +-Charles + + + + + + + + + + + + diff --git a/demo/ermis-f/python_m/cur/0985 b/demo/ermis-f/python_m/cur/0985 new file mode 100644 index 00000000..06b9eb6d --- /dev/null +++ b/demo/ermis-f/python_m/cur/0985 @@ -0,0 +1,30 @@ +From: fdrake at cnri.reston.va.us (Fred L. Drake) +Date: Fri, 30 Apr 1999 20:37:20 GMT +Subject: [PSA MEMBERS ANNOUNCE] Python documentation updated! +In-Reply-To: <372A1374.6405E48B@callware.com> +References: <14122.3325.631762.383828@weyr.cnri.reston.va.us> + <372A1374.6405E48B@callware.com> +Message-ID: <14122.5248.11057.171391@weyr.cnri.reston.va.us> +X-UID: 985 + +Ivan Van Laningham writes: + > Clicking on the HTML link gets me a 404 Doc not found error. ... + +Ivan, + I can't reproduce this. Is it the http://www.python.org/doc/ URL +that's causing this, or something else off of this page? (If the +later, you may need to reload the page before following any links from +there.) + If it's a link within the page, it would really help if I knew +exactly what URL is failing. + + + -Fred + +-- +Fred L. Drake, Jr. +Corporation for National Research Initiatives + + + + diff --git a/demo/ermis-f/python_m/cur/0986 b/demo/ermis-f/python_m/cur/0986 new file mode 100644 index 00000000..48bee484 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0986 @@ -0,0 +1,44 @@ +From: quinn at cruzeiro.ugcs.caltech.edu (Quinn Dunkan) +Date: 8 Apr 1999 02:45:40 GMT +Subject: povray.py +References: <__YN2.30200$FZ5.11443@news.rdc1.sfba.home.com> +Message-ID: +Content-Length: 1701 +X-UID: 986 + +On 06 Apr 1999 15:46:12 -0500, David Steuber wrote: +>mlh at idt.ntnu.no (Magnus L. Hetland) writes: +> +>-> "TM" writes: +>-> +>-> > Has anyone created a pov ray module for python? +>-> +>-> I have been thinking about it, but haven't done it yet... What do you +>-> think it should contain? +> +>This is a relatively off the cuff response. But I think such a module +>should provide python classes for the POV types. Then, instead of +>using the POV scene description language, you would use Python. You +>could algorithmicly create a scene or animation sequence. Then you +>would pass the data structure (a list or other sequence) to a Python +>function that renders it in POV scene description language for POV to +>digest and render. +> +>Another thing I would like to see is a module for generating RIB +>files. In fact, a Python RenderMan module would be quite nice, +>complete with shading language support. Anything out there like that? + +Well, I don't have RenderMan, but I did write a pov.py module. It does +basically what you described, and eventually I'm going to add animation +features and basic physics (the ocaml module I wrote before did that) and +stuff like "magic" transforms that align one object with another, spline +curves etc. I've designed some scenes in it, and it's wordier than pov, but +has all the benefits of a real language. It doesn't do the new halo syntax +because the pov people have yet to release an updated unix version +(grumblegripegrunt). It's incomplete, and written when I was first learning +python, and I haven't worked on it for a while, but I'll send it to anyone +interested. Perhaps we could collaborate? + + + + diff --git a/demo/ermis-f/python_m/cur/0987 b/demo/ermis-f/python_m/cur/0987 new file mode 100644 index 00000000..2be79bdb --- /dev/null +++ b/demo/ermis-f/python_m/cur/0987 @@ -0,0 +1,16 @@ +From: my at efes.net.tr (Murat Yeneroglu) +Date: Tue, 20 Apr 1999 07:19:32 GMT +Subject: unsubscribe +Message-ID: <371C2A84.1385D490@efes.net.tr> +X-UID: 987 + +Pls unsubscribe me. + + +my at efes.net.tr +yenerm at efes.net.tr + + + + + diff --git a/demo/ermis-f/python_m/cur/0988 b/demo/ermis-f/python_m/cur/0988 new file mode 100644 index 00000000..de6dd7e2 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0988 @@ -0,0 +1,32 @@ +From: faassen at pop.vet.uu.nl (Martijn Faassen) +Date: Wed, 07 Apr 1999 22:56:24 +0200 +Subject: Crappy Software was Re: [OffTopic: Netscape] Re: How should +References: <1288614834-78399188@hypernet.com> <370B993C.8DFFB4A4@appliedbiometrics.com> +Message-ID: <370BC677.6C6A82D7@pop.vet.uu.nl> +X-UID: 988 + +Christian Tismer wrote: + +[netscape plugin maddness] +> They should rewrite the whole crap, presumably +> build it from the bones of Grail :-)) + +It is my understanding that they *are* rewriting the whole crap. The new +crap looks pretty nice, at least the layout pre-alphas I tried grokked +CSS 1 pretty well (though there were some bugs left in stress tests at +the time I tried those some months ago). I don't know about the plugin +architecture, but I think they're rewriting everything. It being open +source would help as well with debugging, and if you don't like their +plugin architecture you can try to introduce your own (yeah, that was +easily said and not easily done, I know, I know :) + +Anyway, I'm sorry to hear about the hellish pains you underwent! Perhaps +you can give some input to the Mozilla people working on this, though. + +Regards, + +Martijn + + + + diff --git a/demo/ermis-f/python_m/cur/0989 b/demo/ermis-f/python_m/cur/0989 new file mode 100644 index 00000000..ea0c41e2 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0989 @@ -0,0 +1,94 @@ +From: landrum at foreman.ac.rwth-aachen.de (Greg Landrum) +Date: Tue, 27 Apr 1999 14:44:11 +0200 +Subject: sharing variables in fortran +References: <3725643A.734B9F06@crystal.uwa.edu.au> +Message-ID: <3725B11B.F44244FF@foreman.ac.rwth-aachen.de> +Content-Length: 2728 +X-UID: 989 + +Douglas du Boulay wrote: +> +> I am wondering if it is possible to coerce python to use +> memory addresses corresponding to a fortran common block (by way of a c +> extension) +> for storage of certain variables. + +I can't speak to the python part of things, but there is a dirty +way to allow a C program to access fortran common blocks. I imagine +that this would allow you to solve your python problem fairly easily +by having your C wrapper muck around with the common blocks. + +Before I tell you how to do it, I want to emphasize strongly that +this may not work with every compiler/OS combination. I figured +this out a while ago by playing around with the output of nm, +but I've never seen it written down anywhere. I've made this work +under AIX, Linux, HPUX, and IRIX, but that's no guarantee +that it'll go with everything. + +Now that I have fired a healthy salvo of disclaimers, here's +the unpleasant method of solving the problem. + +Here's a fragment of fortran code which uses a common block: + subroutine test_mod + real var1 + integer var2 + common /testblock/ var1,var2 + + print *, var1, var2 + end +You can get at the contents of testblock by defining a global structure +in your C program which has exactly the same contents as testblock. +So, for example, this C program: +#include + +typedef struct { + float var1; + int var2; +} common1; + +common1 testblock; + +void main() +{ + testblock.var1 = 1.034; + testblock.var2 = 2; + + test_mod(); +} + +sets the members of the common block, then calls the fortran subroutine +which prints out its members. + +Of course this repellant bit of magic doesn't work "as is" on every +system. Some f77 compilers like to stick one or more underscores after +subroutine and common block names. On those, you will have to change +the names of the common blocks in order to match. For example, g77 +(at least my version) produces a .o file which has these symbols: + +00000000 T test_mod__ +00000008 C testblock_ + +(that's output from nm), so I have to change the call to test_mod +in the C part from test_mod() -> test_mod__(). +Correspondingly, the name of testblock needs to be changed to +testblock_. It just can't be too easy. + +Anyway, I hope that this type of trickery allows you to solve +your problems. + +ly yours, [1] +-greg +[1] okay, okay, I haven't been following the group long enough +to have earned the right to do that, but I need to do *something* +to relieve the tension after thinking about these foul things +again. + +--------------------- +Dr. Greg Landrum (landrumSPAM at foreman.ac.rwth-aachen.de) +Institute of Inorganic Chemistry +Aachen University of Technology +Prof.-Pirlet-Str. 1, D-52074 Aachen, Germany + + + + diff --git a/demo/ermis-f/python_m/cur/0990 b/demo/ermis-f/python_m/cur/0990 new file mode 100644 index 00000000..a0f4803c --- /dev/null +++ b/demo/ermis-f/python_m/cur/0990 @@ -0,0 +1,29 @@ +From: ljz at asfast.com (Lloyd Zusman) +Date: 28 Apr 1999 23:01:08 -0400 +Subject: Pmw, threads, Linux, and 1.5.2 +Message-ID: +X-UID: 990 + +I have a Pmw application that I'm running under version 1.5.2, and I +would like to break this application up into a couple threads (Pmw_0_8 +and RedHat Linux 5.0). + +However, Pmw makes use of the `update' and `update_idletasks' Tkinter +methods, and according to the documentation, using these methods +within threads will cause a deadlock under Unix. + +I actually see this deadlock behavior, and so I assume that this +documentation is correct. But before I give up hope altogether, +I'm wondering if anyone has found any way around this restriction? +I'd really like to continue using Pmw and to make use of threads, +if at all possible. + +Thanks in advance. + +-- + Lloyd Zusman + ljz at asfast.com + + + + diff --git a/demo/ermis-f/python_m/cur/0991 b/demo/ermis-f/python_m/cur/0991 new file mode 100644 index 00000000..3ca45c6a --- /dev/null +++ b/demo/ermis-f/python_m/cur/0991 @@ -0,0 +1,78 @@ +From: jefftc at leland.Stanford.EDU (Jeffrey Chang) +Date: Mon, 19 Apr 1999 16:07:26 -0700 +Subject: race condition in popen2._test() +Message-ID: +Content-Length: 1778 +X-UID: 991 + +Hello, + +I am compiling Python v1.52c1 on a Sun Ultra-4 and am failing the test on +popen2.py (this test was not included in earlier distributions): + +taiyang:~/src/Python-1.5.2c1> ./python Lib/popen2.py +testing popen2... +testing popen3... +Traceback (innermost last): + File "Lib/popen2.py", line 99, in ? + _test() + File "Lib/popen2.py", line 95, in _test + assert not _active +AssertionError + + +Looking at the code in popen2.py: +92 assert r.read() == teststr +93 assert e.read() == "" +94 _cleanup() +95 assert not _active +96 print "All OK" + + +_active is a list of all the instances of Popen3. The _cleanup function +iterates through this list and polls each instance to see if it's done. + +def _cleanup(): + for inst in _active[:]: + inst.poll() + + +The poll function does a 'waitpid' on its child, and if it's exit status +is available, then it removes itself from the list. + + def poll(self): + if self.sts < 0: + try: + pid, sts = os.waitpid(self.pid, os.WNOHANG) + if pid == self.pid: + self.sts = sts + _active.remove(self) + except os.error: + pass + return self.sts + + +I believe that the error I am seeing is because the child processes do not +have enough time to close before they're polled in _cleanup. If I insert +some code so that it pauses before _cleanup: + +** import time + +92 assert r.read() == teststr +93 assert e.read() == "" +** start = time.time() +** while time.time() < start + 0.1: pass +94 _cleanup() +95 assert not _active +96 print "All OK" + +the exception goes away and I pass the tests. I would argue against this +going inside _cleanup because _cleanup is called every time a new pipe is +created. + +Jeff + + + + + diff --git a/demo/ermis-f/python_m/cur/0992 b/demo/ermis-f/python_m/cur/0992 new file mode 100644 index 00000000..b3492934 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0992 @@ -0,0 +1,101 @@ +From: jmrober1 at ingr.com (Joseph Robertson) +Date: Fri, 09 Apr 1999 09:47:19 -0500 +Subject: Q on Tkinter Scrollbar +References: <370CFAC8.32EB0B29@ingr.com> <370DE495.E98111E3@mindspring.com> +Message-ID: <370E12F7.11E9D9E4@ingr.com> +Content-Length: 2995 +X-UID: 992 + +No thats a scale. + +Picture a scrollable canvas spreadsheet table of 58 cols and 90,000+ rows. +Now picture tkinter trying to create that grid, if it doesn't bomb from the +strain it would still take it literally hours to create it. But since you +can't 'see' anything outside the scrollwindow of at most 60 rows, why try to +create it? A thermometer or scale looks out of place. A scrollbar is +expected. Now let the vertical scrollbar track the 'dataset' and simply show +the 60 rows that the scrollbar points to. I've done all this in VB, using +Python-Com as the underlying dataset. Now I am trying to ditch the vb gui +(and its horrible overhead). + +Thanks, +Joe Robertson +jmrober1 at ingr.com + + +Doug Hellmann wrote: + +> Hi, Joseph, +> +> I can't give you any useful tips on the scrollbar, but if I was writing +> this I think I would probably subclass the canvas to create a "meter" or +> "thermometer" widget to do what you need. Create a rectangular canvas +> (taller than wide), draw the scale (lines and text), then create an +> indicator (a triangle?) to point the current value. +> +> In fact, if you're not against using Pmw, there is just such a beast in +> the demos or contrib directory. Now that I think of it, you might find +> some useful examples of the scrollbar elsewhere in the Pmw code. Take a +> look http://www.dscpl.com.au/pmw/. +> +> Doug +> +> Joseph Robertson wrote: +> > +> > Hi everyone, +> > +> > I want to manually control the scrollbar in a tkinter app, i.e. I don't +> > want to tie it to another widget as a child. Below is what I have so +> > far. I can't figure how to make the 'thumb' stay at the returned +> > position, or the point where the user drags it. Right now it always +> > pops back to the top. +> > +> > I want it to behave like a Scale, but look like a scrollbar. Think of a +> > virtual window on a dataset, where I don't want to load the contents of +> > the data set into a listbox (not enough memory). +> > +> > Anyone do this before, know of any similar examples, or give me a clue +> > where to look next. I don't want to use extensions or another GUI, it +> > needs to be Tkinter. +> > +> > Thanks in advance, +> > Joe Robertson +> > jmrober1 at ingr.com +> > +> > >----begin code +> > # a manual scrollbar +> > # +> > # Joe Robertson, jmrober1 at ingr.com +> > # +> > from Tkinter import * +> > +> > class Manual(Frame): +> > +> > def __init__(self, master, **kw): +> > apply(Frame.__init__, (self, master), kw) +> > vscrollbar = Scrollbar(self, orient=VERTICAL) +> > self.canvas = Canvas(self) +> > vscrollbar.config(command=self._vscroll) +> > vscrollbar.pack(fill=Y, side=RIGHT) +> > self.canvas.pack(expand=1, fill=BOTH, side=LEFT) +> > +> > def _vscroll(self, type, *arg): +> > print type +> > if type == 'moveto': +> > for each in arg: +> > print each +> > +> > # doit +> > root = Tk() +> > f = Manual(root) +> > f.pack(expand=1, fill=BOTH) +> > root.mainloop() +> > +> > >----end code + + + + + + + diff --git a/demo/ermis-f/python_m/cur/0993 b/demo/ermis-f/python_m/cur/0993 new file mode 100644 index 00000000..6188e306 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0993 @@ -0,0 +1,20 @@ +From: xzvffz at my-dejanews.com (xzvffz at my-dejanews.com) +Date: Thu, 22 Apr 1999 20:39:07 GMT +Subject: Problems compiling 1.5.2 on linux 2.0.27 -- Parser +Message-ID: <7fo1db$5ok$1@nnrp1.dejanews.com> +X-UID: 993 + +I can not compile python 1.5.2 on my linux system (Slackware 2.0.27). It +dies while compiling in the Parser directory. First it could not find some +.h files but that path was corrected. Upon re - make - ing the distribution +I get about two or three pages of warnings and/or errors involving undefined +sysmols. Configure runs fine. The previous make steps run fine. + +Has anyone else had this problem and how was it corrected? + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/0994 b/demo/ermis-f/python_m/cur/0994 new file mode 100644 index 00000000..54a8afa4 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0994 @@ -0,0 +1,24 @@ +From: bernhard at alpha1.csd.uwm.edu (Bernhard Reiter) +Date: 9 Apr 1999 23:08:52 GMT +Subject: pythonwin COM Update link out of date +Message-ID: +X-UID: 994 + +http://www.python.org/ftp/python/pythonwin/pwindex.html#oadist + +Gives a bad link to the MS Microsoft Knowledge Base article Q164529. +The link is bad and I cannot relocate the article with the search +engine on that site and other methods... :( + +The closest I could get was: + http://support.microsoft.com/support/kb/articles/Q139/4/32.asp +from + http://support.microsoft.com/support/downloads/LNP195.asp + +Hmmmm.... is there a potential danger in installing oadist.exe? + + Bernhard + + + + diff --git a/demo/ermis-f/python_m/cur/0995 b/demo/ermis-f/python_m/cur/0995 new file mode 100644 index 00000000..eec0f052 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0995 @@ -0,0 +1,15 @@ +From: cmedcoff at my-dejanews.com (cmedcoff at my-dejanews.com) +Date: Fri, 23 Apr 1999 14:05:24 GMT +Subject: help with os.popen() +References: <7fomaj$oo9$1@nnrp1.dejanews.com> +Message-ID: <7fpun1$rmn$1@nnrp1.dejanews.com> +X-UID: 995 + +Please disregard my post. I blew it. I found the answer in the FAQ. + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/0996 b/demo/ermis-f/python_m/cur/0996 new file mode 100644 index 00000000..97e56cfd --- /dev/null +++ b/demo/ermis-f/python_m/cur/0996 @@ -0,0 +1,79 @@ +From: cingram at my-dejanews.com (cingram at my-dejanews.com) +Date: Wed, 07 Apr 1999 20:51:00 GMT +Subject: COM Event Sinks and Connection Points in Python +Message-ID: <7eggfh$o0f$1@nnrp1.dejanews.com> +Content-Length: 2843 +X-UID: 996 + +I am trying to use functionality from a DLL that requires me to create a COM +event sink so that it can call back with events. I am trying to write this +event sink in Python. However, when I try to create a SimpleConnection +object, it gives this exception: "Unable to open the access token of the +current thread". + +In the source code for testPyComTest.py (which is the only thing I could find +that uses the SimpleConnection object) that comes with the win32all +distribution, the following three lines exist right above code that would test +the connection point functionality: + +# AAARG - why do connection points fail? +print "Skipping connection points as we have a threading bug somewhere :-(" +return + +Now, this comment leads me to believe that Mark Hammond, the author of the +Python Win32 stuff, has the same problem. Does anyone know how to get around +this problem? Below is the sample code I am trying to use. + +#---- test.py +import pythoncom + +# The GUID was retrieved from the IDL file of an external DLL. +# Is there a better way to get these without hard coding? +IID_DEMEvents = pythoncom.MakeIID ("{7BAE0700-E7D5-11d0-9C22-0020AFF2B0F5}") + +class MonitorEvents: + """Event Sink for Test.DEM""" + _reg_clsid_ = "{554A2C64-EC50-11D2-BD51-006097B6AF50}" + _reg_desc_ = "PythonTest.MonitorEvents" + _reg_progid_ = "PythonTest.MonitorEvents" + _reg_class_spec_ = "test.MonitorEvents" + _public_methods_ = ["onSubscribe"] + _public_attrs_ = [] + _readonly_attrs_ = [] + _com_interfaces_ = [IID_DEMEvents] + + def onSubscribe (self): + # Not implemented yet. + pass + +if __name__ == "__main__": + import win32com.server.register + import win32com.client + import win32com.client.connect + + # Test.DEM is the ProgID of the event source. (This is an + # external DLL.) + dem = win32com.client.Dispatch ("Test.DEM") + + # MonitorEvents is the Python class that implements the Event Sink. + meobj = MonitorEvents() + + # The following line causes an exception. + s = win32com.client.connect.SimpleConnection (dem, meobj, IID_DEMEvents) + + # Creating the SimpleConnection object fails with: # #Traceback +(innermost last): # File "T:\Playground\Python\Monitor\monitor.py", line +54, in ? # s = win32com.client.connect.SimpleConnection (dem, meobj, +IID_DEMEvents) # File "C:\Tools\Python\win32com\client\connect.py", line +10, in __init__ # self.Connect(coInstance , eventInstance, eventCLSID) # +File "C:\Tools\Python\win32com\client\connect.py", line 27, in Connect # +self.cookie = self.cp.Advise(comEventInstance) #pywintypes.com_error: +(-2147220990, 'Unable to open the access token of the current thread', None, +None) + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/0997 b/demo/ermis-f/python_m/cur/0997 new file mode 100644 index 00000000..f3092be6 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0997 @@ -0,0 +1,27 @@ +From: mlv at pobox.com (Michael Vezie) +Date: 26 Apr 1999 15:49:35 -0400 +Subject: Q on Tkinter Scrollbar +References: <370CFAC8.32EB0B29@ingr.com> +Message-ID: <7g2g0f$km7$1@mlv.mit.edu> +X-UID: 997 + +In article <370CFAC8.32EB0B29 at ingr.com>, +Joseph Robertson wrote: +>Hi everyone, +> +>I want to manually control the scrollbar in a tkinter app, i.e. I don't +>want to tie it to another widget as a child. Below is what I have so +>far. I can't figure how to make the 'thumb' stay at the returned +>position, or the point where the user drags it. Right now it always +>pops back to the top. + +I think you need to, in _vscroll, set the position of the scrollbar. +I did this exact thing in a tcl app once, so I know it's possible. +It's a bit of work to figure out where things are supposed to be, but +you're going to have to tell it what being halfway down means anyway. + +Michael + + + + diff --git a/demo/ermis-f/python_m/cur/0998 b/demo/ermis-f/python_m/cur/0998 new file mode 100644 index 00000000..45be02a0 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0998 @@ -0,0 +1,32 @@ +From: scothrell at austin.rr.com (Scott C) +Date: Fri, 16 Apr 1999 03:26:48 GMT +Subject: Change for compiling 1.5.2 on Windows NT Alpha +Message-ID: +X-UID: 998 + +Guido and fellow pythoneers... + +There needs to be the following change in file fpectlmodule.c, line 163: + +Line currently reads: #elif defined(__alpha) + +line should read: #elif defined(__alpha) && !defined(_MSC_VER) + + +Rationale: The original line correctly identifies the DEC Alpha processor, +but not the OS. Consequently, when compiled under NT 4 Alpha using MSVC +5.0, which defines __alpha (apparently), the wrong section is processed. +The additional logic prevents the Microsoft compiler from processing the +wrong section. + +Scott Cothrell + +PS: I have Alpha NT versions compiled for python15.dll and python.exe + + + + + + + + diff --git a/demo/ermis-f/python_m/cur/0999 b/demo/ermis-f/python_m/cur/0999 new file mode 100644 index 00000000..4f94c445 --- /dev/null +++ b/demo/ermis-f/python_m/cur/0999 @@ -0,0 +1,88 @@ +From: mal at lemburg.com (M.-A. Lemburg) +Date: Wed, 14 Apr 1999 21:32:31 GMT +Subject: python interface to c++ class +References: <3714E388.CD434E8A@pk.highway.ne.jp> +Message-ID: <3715096F.798B1EBC@lemburg.com> +Content-Length: 2042 +X-UID: 999 + +Thooney Millennier wrote: +> +> Hello, everyone. +> I am now working on building Python interface +> to my C++ matrix library. + +Maybe you could use the NumPy extension as basis for +this... I guess integrating your lib there should be +doable (though they already have an multi-dimensional array). + +> for example In C++,we can enjoy following +> operations. +> (f_matrix: matrix class for float, d_matrix: for +> double) +> +> 1. f_matrix x1,x2; float y; x2=y*x1; (operation +> between different types) + +Implementing mixed type numerics is no fun when done in +C (there's no real support for it; I have a patch though, +that I would like to see in Python1.6 and which I will +update now that 1.5.2 is out). + +In Python it's a piece of cake: just use the __op__ +and __rop__ methods. + +So if you are using SWIG to wrap your C++ classes +with shadow classes, you're lucky. To see how the +current C implementation can be tweaked to do +mixed number operations look at the source code of +mxDateTime (available from the link below). + +> 2. x1(1,2)=3.4; (substitution for matrix +> element) + +You can do this with __set/getitem__: + +class C: + def __getitem__(self,what): + print 'get',repr(what),type(what) + def __setitem__(self,what,to): + print 'set',repr(what),type(what),to + + +o = C() + +o[1,2] +o[1,...,3] + +o[1,2] = 3 +o[1,2,3] = 4 +o[1,...,3] = 5 + +gives: + +get (1, 2) +get (1, Ellipsis, 3) +set (1, 2) 3 +set (1, 2, 3) 4 +set (1, Ellipsis, 3) 5 + +> 3. d_matrix z; z=x1; +> (auto conversion from float matrix to another +> type(d_matrix)) + +Python uses name bindings. z=x1 will only bind +the name 'z' to the object referenced as 'x1'. +You'll have to use explicit conversion, e.g. +z = toDMatrix(x1). + +-- +Marc-Andre Lemburg Y2000: 261 days left +--------------------------------------------------------------------- + : Python Pages >>> http://starship.skyport.net/~lemburg/ : + --------------------------------------------------------- + + + + + diff --git a/demo/ermis-f/python_m/cur/1100 b/demo/ermis-f/python_m/cur/1100 new file mode 100644 index 00000000..0a5f6a0d --- /dev/null +++ b/demo/ermis-f/python_m/cur/1100 @@ -0,0 +1,16 @@ +From: BRUNO_MONNET at Non-HP-France-om1.om.hp.com (Monnet) +Date: Fri, 9 Apr 1999 17:31:29 +0200 +Subject: formating string like sprintf +Message-ID: <370e1d60@isoit370.bbn.hp.com> +X-UID: 1100 + +How can I format a string like using sprintf (mybuffer, "%02x", myhex_value) +? + +Bruno + + + + + + diff --git a/demo/ermis-f/python_m/cur/1101 b/demo/ermis-f/python_m/cur/1101 new file mode 100644 index 00000000..ab1807ba --- /dev/null +++ b/demo/ermis-f/python_m/cur/1101 @@ -0,0 +1,19 @@ +From: zorro at zipzap.ch (Boris Borcic) +Date: Tue, 13 Apr 1999 15:56:58 +0200 +Subject: Python as an ODBC *source* on windoze ? +Message-ID: <37134D2A.60D62AEE@zipzap.ch> +X-UID: 1101 + +Is there a way to have Python on windows +to act as an ODBC source (server) on windoze ? + +Reason : to use the MS Access report generator +component. + +Thanks for hints, + +Boris Borcic + + + + diff --git a/demo/ermis-f/python_m/cur/1102 b/demo/ermis-f/python_m/cur/1102 new file mode 100644 index 00000000..e87ee39f --- /dev/null +++ b/demo/ermis-f/python_m/cur/1102 @@ -0,0 +1,59 @@ +From: MHammond at skippinet.com.au (Mark Hammond) +Date: Thu, 15 Apr 1999 16:01:10 +1000 +Subject: Freezing an App +References: <7f15dj$bq4$1@m2.c2.telstra-mm.net.au> +Message-ID: <7f3v96$g88$1@m2.c2.telstra-mm.net.au> +Content-Length: 1760 +X-UID: 1102 + +Calishar wrote in message ... +>okay, basically I am using Python to automate a process at a client site. +in +>this application, I have about 4 different functions which each get called +>by button clicks. One of the routines is supposed to set a registry key +>based on an environment variable. The lines follow: +> +> +>the_key=win32api.RegCreateKey(win32con.HKEY_LOCAL_MACHINE,"Software\Stac\Re +a +>chout\8.0") +> win32api.RegSetValueEx(the_key,"Computer +Name",0,win32con.REG_SZ,mac_name) +> +>At the moment, this is the only part of the application I dont have working +>on my non-development system, unfortunately it happens to be kind of +>important. + +Are you sure the code is being executed at all? I cant imagine how these +could silently do nothing. + +> This was my first thought, I made sure that I had the .pyd file in the +>same directory as the program I am running. It doesnt do it. + +Why not? I would bet its not on the sys.path. Just before the import, add +a "print sys.path". Frozen programs can use .pyd files fine. + +> Tried doing this, then copying the files needed over to my '95 test +system +>(not the same OS,but should be close enough for this part) and when I ran +>it, it crashed at line 3 of the code (import win32api) + +Im sure that it is just path fiddling. (OK - I hope it is :-) + +>generating table of frozen modules +>No definition of module _tkinter in any specified map file. +>No definition of module win32api in any specified map file. +>Warning: unknown modules remain: _tkinter win32api + +OK - the .ini file may not have an entry for win32api. Im afraid I havent +use the latest version of freeze, and cant recall exactly what is in it, but +basically you need to have freeze find a [win32api] section in one of the +.ini files. + +Mark. + + + + + + diff --git a/demo/ermis-f/python_m/cur/1103 b/demo/ermis-f/python_m/cur/1103 new file mode 100644 index 00000000..360da013 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1103 @@ -0,0 +1,41 @@ +From: cgw at fnal.gov (Charles G Waldman) +Date: Thu, 29 Apr 1999 23:12:12 GMT +Subject: while (a=b()) ... +In-Reply-To: <19990430000141.A5867@shalott> +References: <19990430000141.A5867@shalott> +Message-ID: <14120.59212.758142.722755@buffalo.fnal.gov> +X-UID: 1103 + +Marco Mariani writes: + > + > Which one is more ugly? + +Version #1 is exactly 2/3 as ugly as version #2. + +"$_" is 887 times more ugly; it looks very non-Pythonic to me. + + + > ===== + > + > c = curs.fetchone() + > while c: + > print c + > c = curs.fetchone() + > + > ===== + > + > while 1: + > c = curs.fetchone() + > if c: + > print c + > else: + > break + > + > ===== + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1104 b/demo/ermis-f/python_m/cur/1104 new file mode 100644 index 00000000..00d374c7 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1104 @@ -0,0 +1,45 @@ +From: tim_one at email.msn.com (Tim Peters) +Date: Mon, 26 Apr 1999 00:45:32 GMT +Subject: Handling backspace chars in a string... +In-Reply-To: <37239c48.594910176@news2.bga.com> +References: <37239c48.594910176@news2.bga.com> +Message-ID: <000301be8f7e$16b89780$669e2299@tim> +Content-Length: 1038 +X-UID: 1104 + +[Purple] +> I'm in the poistion of having to process strings with arbitrary +> numbers of backspace and newline characters in them. + +Your code doesn't appear to care about newlines one way or t'other. Do you +? + +> The backspaces actually get put in the string, so I have to handle +> removing the characters that are backspaced over. +> ... [rather sprawling string + indexing code] ... +> This just looked rather messy to me -- I was curious if anyone know a +> better way? + +Assuming "better" means "less messy" here, lists support appending and +deleting quite naturally and efficiently; like + +def stripbs(sin): + import string + sout = [] + for ch in sin: + if ch == '\b': + del sout[-1:] # a nop if len(sout) == 0 + else: + sout.append(ch) + return string.join(sout, '') + +This essentially treats the input string as a sequence of opcodes for a +stack machine, where "\b" means "pop" and anything else means "push me!". + +don't-use-any-indices-and-you-can't-screw-'em-up-ly y'rs - tim + + + + + + diff --git a/demo/ermis-f/python_m/cur/1105 b/demo/ermis-f/python_m/cur/1105 new file mode 100644 index 00000000..9e58f79d --- /dev/null +++ b/demo/ermis-f/python_m/cur/1105 @@ -0,0 +1,37 @@ +From: claird at Starbase.NeoSoft.COM (Cameron Laird) +Date: 24 Apr 1999 00:10:03 -0500 +Subject: The Future of Tk? +References: <371E964F.C531C2A@istar.ca> <7fmruj$gtm@cpca3.uea.ac.uk> <37208205.A94D0BC2@istar.ca> +Message-ID: <7frjnb$qko$1@Starbase.NeoSoft.COM> +Content-Length: 1034 +X-UID: 1105 + +In article <37208205.A94D0BC2 at istar.ca>, +Eugene Dragoev wrote: +>Emulating native components makes the code slower - no doubt about that. +>I was not questioning the use of native widgets in Tcl/Tk but just +>wondering if all the languages that use Tk (Perl/Python etc.) will have +>harder time following the current Tcl/Tk. + . + . + . +You also write, in a related article, that "I just +thought that porting GUI library that contains native +widgets is more difficult." I believe that both of +these perceptions are factually incorrect. As much +as possible (and more as time goes on?), native com- +ponents (in the sense of user interface) are +implemented as native components (that is, by invo- +cation of low-level OS-specific facilities). + +In any case, I'm not aware of any particular impact +any of this has on the ease of binding "foreign" +languages such as Perl and Python to Tk. +-- + +Cameron Laird http://starbase.neosoft.com/~claird/home.html +claird at NeoSoft.com +1 281 996 8546 FAX + + + + diff --git a/demo/ermis-f/python_m/cur/1106 b/demo/ermis-f/python_m/cur/1106 new file mode 100644 index 00000000..1b97b7b5 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1106 @@ -0,0 +1,23 @@ +From: Lance_Ellinghaus at marshall.com (Lance Ellinghaus) +Date: Wed, 7 Apr 1999 22:30:35 GMT +Subject: oracledb-0.1.2 and python 1.5.2b2 +Message-ID: <8825674C.007BA8E4.00@marshall.com> +X-UID: 1106 + +Has anyone gotten these two things to compile together and run? +I am having trouble with the compile. Looks like something changed in the +Makefile on Python 1.5.2b2 from +previous python make files that makes oracledb-0.1.2 not compile. + + +Can anyone help?? + +Thanks, + +Lance + + + + + + diff --git a/demo/ermis-f/python_m/cur/1107 b/demo/ermis-f/python_m/cur/1107 new file mode 100644 index 00000000..fbc69e66 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1107 @@ -0,0 +1,39 @@ +From: aa8vb at vislab.epa.gov (Randall Hopper) +Date: Mon, 5 Apr 1999 14:44:08 GMT +Subject: Subattributes of classes +Message-ID: <19990405104408.A807008@vislab.epa.gov> +X-UID: 1107 + + class A: + def __init__( self ): + self.attr = 123 + self.attr.subattr = 456 # <--------- Error! + + a = A() + + +This generates an error as I would have expected. + +However, I see the same syntax in: + demos/tkinter/matt/canvas-with-scrollbars.py + +and it works: + + self.draw = Canvas(self, width="5i", height="5i", + background="white", + scrollregion=(0, 0, "20i", "20i")) + self.draw.scrollX = Scrollbar(self, orient=HORIZONTAL) + self.draw.scrollY = Scrollbar(self, orient=VERTICAL) + + ^^^^^^^^^^^^ + +Why? + +Randall + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1108 b/demo/ermis-f/python_m/cur/1108 new file mode 100644 index 00000000..5603c85b --- /dev/null +++ b/demo/ermis-f/python_m/cur/1108 @@ -0,0 +1,31 @@ +From: blipf at yahoo.com (Flbill Blipf) +Date: Wed, 07 Apr 1999 09:33:19 -0700 +Subject: Tkinter and centering +Message-ID: <370B88CF.993D8847@yahoo.com> +X-UID: 1108 + +Hi, + +How do I center a window with Tkinter? If I use this: + +from Tkinter import * + +root = Tk() +Label(root,text="Cough Cough Cough").pack() +root.update() +sw = root.winfo_screenwidth() +sh = root.winfo_screenheight() +w = root.winfo_width() +h = root.winfo_height() +newGeometry='+%d+%d' % ((sw/2)-(w/2), (sh/2)-(h/2)) +root.geometry(newGeometry=newGeometry) +root.mainloop() + +The window appears in a semi-random location and then staggers to the +center. + +If I remove root.update(), winfo_width and winfo_height both return 1. + + + + diff --git a/demo/ermis-f/python_m/cur/1109 b/demo/ermis-f/python_m/cur/1109 new file mode 100644 index 00000000..cc136ab3 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1109 @@ -0,0 +1,24 @@ +From: wc at zyan.com (John B. Williston) +Date: Wed, 07 Apr 1999 03:53:41 GMT +Subject: Crappy Software was Re: [OffTopic: Netscape] Re: How should Python be evangelized? +References: <7dos4m$usi$1@nnrp1.dejanews.com> <7dqs0h$lcq$1@nnrp1.dejanews.com> <2_6M2.30$Kj1.679@198.235.216.4> <37019F42.EA55CA8@kanga.org> <009d01be7b47$8a9a6020$f29b12c2@pythonware.com> <7dtmso$7u6$1@news.clarkson.edu> <3703ca33.9749737@news.bctel.ca> <37089dcb@fermi.armored.net> +Message-ID: <370bd698.137859911@news.dslspeed.com> +X-UID: 1109 + +On Tue, 06 Apr 1999 04:40:22 GMT, wtanksle at dolphin.openprojects.net +(William Tanksley) wrote: + +>The one reason I like Opera (I'm not using it now because I'm a cheapskate): +>it fully and nearly correctly supports the keyboard. Oh, it's CSS is better +>than anything else, but like you said I don't code for the best, I code for +>_everything_. + +Just FYI, I purchased Opera as a student and paid only $18 for it. And +if you *really* want to see IE lose, your best bet is to put your +money where your mouth is. Opera has a chance to dethrone IE. + +John + + + + diff --git a/demo/ermis-f/python_m/cur/1110 b/demo/ermis-f/python_m/cur/1110 new file mode 100644 index 00000000..f51bed63 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1110 @@ -0,0 +1,24 @@ +From: ben_darnell at hotmail.com (Ben Darnell) +Date: Mon, 26 Apr 1999 19:44:37 -0500 +Subject: Launching web browser programmatically +References: <3724EB92.248E7933@hotmail.com> <7g2rm1$t8i$1@m2.c2.telstra-mm.net.au> +Message-ID: <37250874.1F93A13B@hotmail.com> +X-UID: 1110 + +Mark Hammond wrote: + +> If you have the win32 extensions, you can use win32api.ShellExecute() +> +> Anything you can use after "start" you can pass to ShellExecute - ie, a URL, +> a document file, .exe, etc. +> +> + +Thanks. That's just what I'm looking for. + +Ben + + + + + diff --git a/demo/ermis-f/python_m/cur/1111 b/demo/ermis-f/python_m/cur/1111 new file mode 100644 index 00000000..5354a516 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1111 @@ -0,0 +1,155 @@ +From: your at email.com (your at email.com) +Date: 10 Apr 1999 08:41:23 GMT +Subject: #INCREDIBILE NON CI CREDEVO!!!!! +Message-ID: <7en2rj$lej$181@fe2.cs.interbusiness.it> +Content-Length: 5694 +X-UID: 1111 + +Hi! I posted this using an unregistered copy of Newsgroup AutoPoster 95! +You can download your own copy for FREE from: http://www.autoposter.cc +or just click this line: http://www.autoposter.cc/files/news200.exe +--- +NON E' UNA TRUFFA:ESISTE LA POSSIBILITA' DI ARRICCHIRTI CON SEMPLICISSIMO +SCAMBIO DI MESSAGGI VIA RETE!! + Rasmus Lino ? un ragazzo danese che ha incassato in 5 mesi la bella +cifra di 64.700.000.000? !!!!!!!!!! +Una notizia del genere non passa inosservata!!!!se vuoi sapere come ha fatto +questo simpatico giovanotto ad arricchirsi cosi in fretta eccoti la +spiegazione, ma prima di tutto sappi : +Non mi interessa stare qui a convincerti sulla bont? o meno di questo +metodo. +IO APPENA LO PRESO HO DECISO DI PROVARCI !! +Questa catena si differenzia dalle altre per la sua potenzialit? di guadagno +con un ingresso pari al costo di DIECI CAFFE'. +STAMPA SUBITO QUESTO MESSAGGIO :Ti servir? in futuro. +Tutto ci? che ti serve sono : +-6 banconote da 2.000 lire +-6 francobolli per lettera. +CHE COSA HAI DA PERDERE ? Telo dico io N-I-E-N-T-E.Sarebbe da stupidi non +provarci !! +ED ORA ECCO COME PARTECIPARE: + +1?PASSO: +Prendi 6 fogli di carta separati e scrivi ci? che segue : +HO PARTECIPATO ANCH'IO. +HO ALLEGATO 2.000 LIRE. +BEVI UN CAFFE' ALLA MIA SALUTE. +Ora prendi le banconote da 2.000 Lire e mettine una in ognuno dei fogli di +carta che hai preparato prima, opportunamente piegati in modo da non +rendere visibile la banconota dall' esterno (per evitare accidentali furti). + +2? PASSO: +Inserisci il foglio con la banconota da 2.000 lire in una busta e chiudila +(fai lo stesso con gli altri 5 fogli). +Se non lo farai le tue possibilit? di guadagno si ridurrebbero moltissimo. +Ci? che stai facendo ? OFFRIRE 6 CAFFE' : PER QUESTO E' ASSOLUTAMENTE LEGALE +!!! + +3?PASSO: +Spedisci le 6 buste ai seguenti indirizzi: + +#1 R. Biancofiore + Via Gaet. Grassi, 8/3 + 74015 Martina Franca (TA) + + +#2 S. Carpina + Via Friuli, 5 + 56124 Pisa + + +#3 Marta Carletti + Via Marcelletta, 13 + 60027 Osimo (AN) + + +#4 Giulio Debbia + Via Tirelli, + 41040 Corlo (MO) + + +#5 F.Giovanetti + Via Batezzate, 127 + 41040 Formigine (Mo) + + +#6 G.Smiriglia + Via Strada 31, n?7 + 87010 Terranova da Sibari (Cs) (Italy) + +4? PASSO: +Ora cancella il nominativo #1 dalla lista che vedi sopra, e sposta in alto +gli altri nominativi (il #6 diventa #5 il, #5 diventa #4 ecc.) e aggiungi li +tuo nominativo come #6 nella lista. + +5? PASSO: +Spedisci questo messaggio ricordando di inserire il tuo nome al #6 ad almeno +200 newsgroup(ce ne sono almeno 50.000 !!!!). Te ne bastano 200, e perch? +no, invia anche ad amici che hai in chat, ma ricorda pi? mail spedisci pi? +ti arrivano soldi!!!! +ORA IL DISCORSO SI FA INTERESSANTE +Di 200 contatti con diversi newsgroup, ipotizziamo pessimisticamente che tu +riceva solo 5 adesioni. Quindi con il tuo nome al #6 posto su ogni messaggio +ricevi in tutto 10.000 lire. +Ogni persona che ti ha spedito 2.000 lire spedisce anche lei 200 messaggi ad +altrettanti newsgroup, ciascuna con il tuo nome al #5 posto, supponendo che +anche loro ricevano 5 adesioni,questa fase porta altre 50.000 lire a te. +Queste 25 persone fanno almeno 200 messaggi con il tuo nome al #4 posto e +nelle medesime sfortunate persone solo 5 persone aderiscono questo ti porta +altre 250.000 lire. +ora queste 125 persone continuano con la medesima procedura (il tuo +nominativo ora ? al #3 posto) ancora solo 5 adesioni ci? porta altre 625 +persone e quindi 1.250.000 lire a te!!! +ORA ARRIVA LA PARTE PIU' INTERESSANTE : +Queste 625 persone spediscono 200 messaggi con il tuo nominativo al 2? posto +questo ti porta altre 6.250.000 lire!!!! +Infine queste 3125 persone scrivono 200 messaggi con il tu nome al #1 posto +e riceverai come prima 5 adesioni questo ti porta 31.250.000 lire !!! +tutto con un investimento iniziale di solo 12.000 lire +e tutto ci? ipotizzando solo 5 adesioni che ? davvero un numero molto basso +di solito sono 20-30 ;ora eccoti una media con 15 adesioni +al posto#6 30.000 lire +al posto #5 450.000 lire +al posto #4 6.750.000 lire +al posto #3 101.250.000 lire +al posto #2 1.518.750.000 lire +al posto #1 22.781.750.000 lire +=========================== +TOTALE 23.008.480.000 LIRE INCREDIBILE!!!!!!!!!!!!!!! +Senza sperare in tanta grazia . perch? non provate a vedere se funziona?? +questa catena conviene a me, a te, e a tutti quelli che leggono : in pratica +tutti ci arricchiremo con sole 12.000 lire , 6 francobolli, E SENZA RECARE +DANNO A NESSUNO . +ORA STA A TE DECIDERE !!! +(ma credo che tu l'abbia gi? fatto) +il meccanismo ? chiaro i ragionamenti sopra riportati sono ineccepibili!!! +Che cosa sono poi 12.000 lire ?? Sicuramente ti divertirai e avrai di sicuro +molta pi? possibilit? di fare soldi rispetto agli sconvenientissimi giochi +statali. +poi non serve fortuna perch? ? un gioco puramente statistico + +Ma ricorda : se vuoi che tutto funzioni devi essere ONESTO (anche perch? ce +n'? per tutti !!! cambiare le modalit? porterebbe danno a te e agli altri + +seguono due lettere per raccontarti di se che hanno provato: + +....un giorno navigando leggo questo messaggio provo e dopo 4 settimane non +mi ricordavo pi? del gioco fin quando arrivarono le prime buste e manmano le +altre.era incredibile posso dire di avere guadagnato sicuramente 60.000.000 +lire . adesso possiedo una nuova macchina e quest'estate sono stato in +vacanza in Australia wow !!! +Sono un ragazzo di 24 anni e 2 mesi fa ero un po' accorto di soldi e +essendo un appassionato di comp. mi imbattei in questa lettera che diceva +vuoi vincere tanti soldi?? perch? non provare .. +.. e adesso ho un computer nuovissimo e mi avanzano ancora tanti soldi. + +PROVA E VEDRAI COME IL TUO PORTAFOGLIO SI GONFIA + + + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1112 b/demo/ermis-f/python_m/cur/1112 new file mode 100644 index 00000000..b2c2d216 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1112 @@ -0,0 +1,29 @@ +From: fredrik at pythonware.com (Fredrik Lundh) +Date: Wed, 21 Apr 1999 12:03:30 GMT +Subject: Tkinter Q +References: <7fkcg3$61o$1@news.rz.uni-karlsruhe.de> +Message-ID: <00f701be8bee$f9cf9200$f29b12c2@pythonware.com> +X-UID: 1112 + +Bjoern Giesler wrote: +> whenever I try to construct a slightly more complicated Tkinter test at +> the Python console, I get a FloatingPointError. The same program written +> to a file works flawlessly. Is that a known bug? + +answer 1: no. + +answer 2: what console? the plain interpreter command +line interface? if so, don't. that interface doesn't keep +the Tkinter event loop going, so it's kinda impossible to do +any meaningful Tkinter programming from it. + +(on the other hand, if you're using IDLE or any other Tkinter- +based environment which sports a console window, please +consider posting some sample code...) + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1113 b/demo/ermis-f/python_m/cur/1113 new file mode 100644 index 00000000..703e6051 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1113 @@ -0,0 +1,28 @@ +From: bhowes at cssun3.corp.mot.com (Brad Howes) +Date: 14 Apr 1999 10:02:32 -0700 +Subject: simple indexed file module? +References: +Message-ID: +X-UID: 1113 + +>>>> 'Joe Strout (joe at strout.net)' asked the following: + + JS> For a CGI script I'm working on, I need to keep a couple of indexed + JS> files.[snip] + +I have good luck with the `anydbm' module. This gives you keyed indexing +into a data file. It attempts to import dbhash, gdbm, dbm, or dumbdbm as +a backend. On my Windows/NT box, there is dbhash. I've used gdbm on +Unix. Not sure what comes with the Macintosh install. + +Brad + + +-- +Brad Howes bhowes at motorola.com +Principal Compass Hacker Work: +1 602 446 5219 +Motorola Cell: +1 602 768 0735 + + + + diff --git a/demo/ermis-f/python_m/cur/1114 b/demo/ermis-f/python_m/cur/1114 new file mode 100644 index 00000000..5b887179 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1114 @@ -0,0 +1,25 @@ +From: tim_one at email.msn.com (Tim Peters) +Date: Sat, 17 Apr 1999 05:25:43 GMT +Subject: restore sources from PYC [Q] +In-Reply-To: <7f84mq$a7c@chronicle.concentric.net> +References: <7f84mq$a7c@chronicle.concentric.net> +Message-ID: <000901be8892$bd97d680$ee9e2299@tim> +X-UID: 1114 + +[Christopher Petrilli] +> ... in fact many companies put some bizarre constructions in their code +> so they can prove in court that someone "stole" the code... + +When I was in grade school, I noticed that a map of my neighborhood showed a +non-existent road going smack thru the middle of a large non-acknowledged +pond. Investigation revealed that map makers insert deliberate errors for +the same reason: to prove that someone else copied their work. That was +the day I decided to become a programmer . + +all-of-the-intrigue-with-none-of-the-tedious-surveying-ly y'rs - tim + + + + + + diff --git a/demo/ermis-f/python_m/cur/1115 b/demo/ermis-f/python_m/cur/1115 new file mode 100644 index 00000000..eaa5a89a --- /dev/null +++ b/demo/ermis-f/python_m/cur/1115 @@ -0,0 +1,52 @@ +From: lutz at rmi.net (Mark Lutz) +Date: Sun, 4 Apr 1999 13:42:41 -0600 +Subject: Is Python dying? +References: <7dos4m$usi$1@nnrp1.dejanews.com><7e30fp$8vf$1@news1.rmi.net> <14085.18282.936883.727575@bitdiddle.cnri.reston.va.us> +Message-ID: <7e8f25$ejm$1@news1.rmi.net> +Content-Length: 1538 +X-UID: 1115 + +Sidebar: you have to be careful with amazon's numbers, +because they tend to change too fast to be very useful. +I've seen Programming Python go from #500 to #5000 in +a day or two; Learning Python changes just as fast (in +fact, it was ranked #409 as I wrote this). + +Their numbers are probably okay as a quick-and-dirty +estimate; but for a better picture, you'd have to take +an average over a long period of time, and then take +into consideration that their numbers are skewed towards +online shopper's interests. Publishers get much more +useful sales information from the big distributors. + +OTOH, I wouldn't mind seeing Python in the top 100 ;-). + +--Mark Lutz (http://rmi.net/~lutz) + + +Jeremy Hylton wrote in message +<14085.18282.936883.727575 at bitdiddle.cnri.reston.va.us>... +>This is really useless information, but I guess I along with most +>other people are fascinated by top ten lists and movie grosses and +>... Amazon.com sales ranks. +> +>Title Amazon.com Sales Rank +>Learning Python 1,570 +>Programming Python 1,685 +>Python : Pocket Reference 3,218 +>Internet Programming With Python 8,720 +>Mastering Regular Expressions 931 +>Programming Perl, 2nd ed. 81 +>Perl Cookbook 136 +>The C Programming Language 478 +>The C++ Programming Language 1,003 +>Tcl and the Tk Toolkit 3,362 +> +>Learning Python seems to be selling well for a book that hasn't been +>shipped. :-) + + + + + + diff --git a/demo/ermis-f/python_m/cur/1116 b/demo/ermis-f/python_m/cur/1116 new file mode 100644 index 00000000..4fd140ab --- /dev/null +++ b/demo/ermis-f/python_m/cur/1116 @@ -0,0 +1,20 @@ +From: bkhunter at best.com (Bill) +Date: Wed, 28 Apr 1999 18:07:51 GMT +Subject: Designing Large Systems with Python +References: <3725CA37.2027327D@lemburg.com> +Message-ID: <37274e10.12544588@nntp1.ba.best.com> +X-UID: 1116 + +On Tue, 27 Apr 1999 16:31:19 +0200, "M.-A. Lemburg" +wrote: +>Projects around 50k are still well manageable using an editor +>like Xemacs; larger projects probably need the help of systems +>like SNIFF (which offers Python support). + +Are you talking about SNIFF+ from TakeFive Software? I browsed their +site and could only find mention of C++ and Java support. Any +pointers? + + + + diff --git a/demo/ermis-f/python_m/cur/1117 b/demo/ermis-f/python_m/cur/1117 new file mode 100644 index 00000000..3cf3e943 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1117 @@ -0,0 +1,50 @@ +From: landrum at foreman.ac.rwth-aachen.de (Greg Landrum) +Date: Mon, 19 Apr 1999 17:26:49 +0200 +Subject: Tkinter performance +Message-ID: <371B4B39.8B78BC7A@foreman.ac.rwth-aachen.de> +Content-Length: 1508 +X-UID: 1117 + +While I'm at it, I have a performance question about Tkinter. + +I am thinking about doing a python/Tkinter port of a program +which currently uses C/Xlib (or C/quickdraw on the Mac). I'd +love to get this to work because then I would (finally) have +a version which could work under Win95/98/NT. But I'm worried +about performance issues. + +The program does 3D graphics (molecular/crystal visualization +and orbital plots). I handle all of the perspective/transformation +stuff myself, so I don't need any 3D functionality. I do need +something which can draw reasonably quickly however. + +Suppose I need to draw a couple hundred circles and several +thousand line segments (these are mostly connected, so I can +use things like XDrawLines to cut down function calls) at +every update. +1) Can Tkinter on a "typical" PC (say a P200) deliver a +"reasonable" update rate (a couple of frames per second +would probably cut it)? +2) Is there anyway to do double-buffering to avoid flashing +during redraws? + +I am guessing that the answer to both of these of these questions +is "No", but I'd love to hear a contrary opinion. + +I have considered using something like wxPython, but that cuts +the portability of the application down rather than increasing +it. At least until there are bindings for the Motif/Lesstif +versions of wxWindows. + +thanks for any help, +-greg + +-- +--------------------- +Dr. Greg Landrum (landrum.NOSPAM at foreman.ac.rwth-aachen.de) +Institute of Inorganic Chemistry +Aachen University of Technology + + + + diff --git a/demo/ermis-f/python_m/cur/1118 b/demo/ermis-f/python_m/cur/1118 new file mode 100644 index 00000000..cd6a5d01 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1118 @@ -0,0 +1,78 @@ +From: phd at sun.med.ru (Oleg Broytmann) +Date: Wed, 28 Apr 1999 19:07:44 +0400 (MSD) +Subject: 'sourcing' Python scripts? +In-Reply-To: <372713AD.6ABA444@cern.ch> +Message-ID: +Content-Length: 2587 +X-UID: 1118 + +Hello! + +On Wed, 28 Apr 1999, Haimo G. Zobernig wrote: +> this might be a unix rather than a Python problem, but I need to set + + Yes, it is of unix... + +> environment variables from a Python program *in the parent process* +> that is running the Python script ( a la os.environ['BAR'] = 'foo' ). +> In other words, I want to achieve the equivalent of 'sourcing' the +> Python script. Can this be done? Even better would be a solution that +> also works on the various WinAbominations... (well, NT at least) + + Don't know about NT, sorry. Will talk about unix. + + Preface. + When you run a program (python script, e.g.), shell (that run the +program) forks and looses any connection to running program. The program +may do anything it wants (change current directory, for example), but all +chnages are local to the program's process (and children). Parent shell +does not know anything. This is the nature of multitasking environment. + For the shell, the only way to set environment (change directory, etc.) +is to give commands to that shell. + + Well, now you want to run a program, and pass the results to a parent +shell. Here is how you should do it. + First, your program should write the shell commands to stdout. Second, +you need to ask the shell to process these commands: + (in shell command line) eval `myscript.py` +Note "eval" and backticks. Backticks in most (if not all) unix shells mean +"run the command and save its stdout". Eval processes saved stdout as +shell commnads. + + Please note. There are two different kinds of shell syntax - Bourne +shell and C shell. + Usually any program that intended to run under such conditions, can +output two different set of commands - for Bourne shell and for C shell. +Some programs parse SHELL env var (if it matches /bin/*csh - it is a +C-shell variant, else it is Bourne shell), some programs can be controlled +with command line switch (-c for c-shell, nothing for bourne shell). Choose +your method, but please do not force your users to switch a shell just +because your program can only work with one shell but not another. + + Example: + + (in python program my_prog.py): + +if under_cshell: # expect C shell + print "setenv MY_VAR1 value1" + print "setenv MY_VAR2 value2" +else: # expect Bourne shell + print "MY_VAR1=value1" + print "MY_VAR2=value2" + print "export MY_VAR1 MY_VAR2" + + (in shell): +eval `my_prog.py` + +> Haimo G. Zobernig +> Haimo.Zobernig at cern.ch + +Oleg. +---- + Oleg Broytmann National Research Surgery Centre http://sun.med.ru/~phd/ + Programmers don't die, they just GOSUB without RETURN. + + + + + diff --git a/demo/ermis-f/python_m/cur/1119 b/demo/ermis-f/python_m/cur/1119 new file mode 100644 index 00000000..3d9502f4 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1119 @@ -0,0 +1,44 @@ +From: ddb at crystal.uwa.edu.au (Douglas du Boulay) +Date: Tue, 27 Apr 1999 15:16:10 +0800 +Subject: sharing variables in fortran +Message-ID: <3725643A.734B9F06@crystal.uwa.edu.au> +Content-Length: 1252 +X-UID: 1119 + +I am wondering if it is possible to coerce python to use +memory addresses corresponding to a fortran common block (by way of a c +extension) +for storage of certain variables. + +I am looking (still) at converting a large fortran program to use +python/tkinter/pyOpenGL with an +intermediate C-interface to the more numerically intensive fortran +OpenGL rendering routines. +Currently it looks like there are around 500 variables controlling +various aspects of the rendering +which need to be set and adjusted in python/tkinter routines, and whose +values are needed by the +fortran code. If it is possible to avoid using 500 Py_PassTuple() etc. +C routines every time the user +moves the mouse, it would be very useful to know. + +I am sure it is possible to get the tkinter widgets to read current +state before being invoked and then +call another C function to copy it back, but if there was a way to share +the fortran/C variable address space +so that the tkinter widgets changed them directly .... + +Thanks in advance for any info. +Doug +(still a python beginner) + +P.S. if you are interested to see what a beast the gui really is take a +look at part of it here: +http://www.crystal.uwa.edu.au/~ddb/panels.py +(it doesn't actually do anything constructive yet) + + + + + + diff --git a/demo/ermis-f/python_m/cur/1120 b/demo/ermis-f/python_m/cur/1120 new file mode 100644 index 00000000..f841702e --- /dev/null +++ b/demo/ermis-f/python_m/cur/1120 @@ -0,0 +1,37 @@ +From: akuchlin at cnri.reston.va.us (Andrew M. Kuchling) +Date: Wed, 21 Apr 1999 16:49:09 -0400 (EDT) +Subject: Project for newbie +In-Reply-To: <70alf7.qc6.ln@loopback> +References: <70alf7.qc6.ln@loopback> +Message-ID: <14110.12533.232498.655489@amarok.cnri.reston.va.us> +Content-Length: 1094 +X-UID: 1120 + +Pete Jewell writes: +>I've read my way through the tutorial, and am now stuck - where do I go +>from here? I want to learn how to use Python, but don't have any +>pressing projects at the moment - can anyone suggest a program I should +>have a go at writing, to help me learn the language further? + + Having third parties provide ideas usually doesn't result in +anything interesting. I have a list of projects on my Web page, but +they're all extremely unlikely to appeal to anyone who isn't me (and +even I'm a bit cool on some of them). + + It's much better to ask what are you interested in. GUIs? +You could write a simple game or application with Tkinter, Swing, GTk, +or whatever toolkit you want to learn, or join an existing effort like +PyRPG. Command-line stuff? Perhaps there's some system +administration script you could write; for example, I have a PPP +startup script for my own use; maybe there's something you do often +that could be automated. + +-- +A.M. Kuchling http://starship.python.net/crew/amk/ +When cryptography is outlawed, bayl bhgynjf jvyy unir cevinpl. + -- Anonymous + + + + + diff --git a/demo/ermis-f/python_m/cur/1121 b/demo/ermis-f/python_m/cur/1121 new file mode 100644 index 00000000..77de8ed4 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1121 @@ -0,0 +1,27 @@ +From: alrice at swcp.com (Alex Rice) +Date: Fri, 09 Apr 1999 23:10:07 -0600 +Subject: disenchanted java user mumbles newbie questions +References: <3705980A.1C7E9512@swcp.com> <000101be7d9a$e1ae88a0$879e2299@tim> +Message-ID: <370EDD2F.21310047@swcp.com> +X-UID: 1121 + + +Tim Peters wrote: +[tons of excellent pointers] + +> Why do I suspect you're a Windows programmer ? + +Thanks for all the suggestions. Python rocks. I really like wxPython +too. + +As far as me being a Windows programmer, well not really. I'm equally at +home thrashing around in Windows and Unix. In fact this evening I +discovered your python-mode.el. What a great Emacs mode! + +Thanks again, + +Alex Rice -- MindLube Software + + + + diff --git a/demo/ermis-f/python_m/cur/1122 b/demo/ermis-f/python_m/cur/1122 new file mode 100644 index 00000000..ce475ad5 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1122 @@ -0,0 +1,29 @@ +From: dozier at bellatlantic.net (Bill Dozier) +Date: Tue, 20 Apr 1999 17:58:49 -0400 +Subject: unpickling an NT object in Solaris? +References: +Message-ID: +X-UID: 1122 + +Problem solved. It seems that the cPickle module is not sufficiently +cross-platform. + +The text mode of pickling is not cross-platform and seems to expect UNIX +linefeeds. :P + +If I use the binary mode, everything's OK. + + +In article +, +dozier at bellatlantic.net (Bill Dozier) wrote: + +>I created an object running python on NT and pickled it. I have no problem +>unpickling on NT, but when I ftp'd the file over to Solaris, I get an +>ImportError exception ("No module named __main__^M") when I try to +>unpickle it. +> + + + + diff --git a/demo/ermis-f/python_m/cur/1123 b/demo/ermis-f/python_m/cur/1123 new file mode 100644 index 00000000..b3081a27 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1123 @@ -0,0 +1,22 @@ +From: arw at ifu.net (arw) +Date: Mon, 5 Apr 1999 20:32:00 GMT +Subject: GadFly - MemoryError +Message-ID: <199904052036.QAA22515@ifu.ifu.net> +X-UID: 1123 + +Whoops. I didn't notice the python-list was cc'd on the last message +oops. Sorry, I didn't see the cc to the python list on the last message. +Please also make sure you are using the kjbuckets extension module, as it +significantly improves both speed and memory usage. Lemme know... +As I say, I've run some pretty large gadfly databases on some pretty +mediocre machines... + -- Aaron Watters + +=== +time flies like an arrow. +fruit flies like a banana. + + + + + diff --git a/demo/ermis-f/python_m/cur/1124 b/demo/ermis-f/python_m/cur/1124 new file mode 100644 index 00000000..c5100fcd --- /dev/null +++ b/demo/ermis-f/python_m/cur/1124 @@ -0,0 +1,25 @@ +From: nelson at crynwr.com (Russell Nelson) +Date: 25 Apr 1999 09:23:35 -0400 +Subject: GUI other than Tkinter +References: <3721567f.1748033@news> +Message-ID: +X-UID: 1124 + +mrfusion at bigfoot.com writes: + +> Well, I've just about given up on EVER getting Tkinter to work on my +> Win98 machine. Is there any other GUI module that I can get that +> doesn't require TCL/TK to be installed on my machine? Isn't there +> something called GD? + +There's pygtk, which uses the gtk toolkit. + +-- +-russ nelson http://crynwr.com/~nelson +Crynwr supports Open Source(tm) Software| PGPok | There is good evidence +521 Pleasant Valley Rd. | +1 315 268 1925 voice | that freedom is the +Potsdam, NY 13676-3213 | +1 315 268 9201 FAX | cause of world peace. + + + + diff --git a/demo/ermis-f/python_m/cur/1125 b/demo/ermis-f/python_m/cur/1125 new file mode 100644 index 00000000..f62245a6 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1125 @@ -0,0 +1,37 @@ +From: tim_one at email.msn.com (Tim Peters) +Date: Sat, 17 Apr 1999 05:20:02 GMT +Subject: restore sources from PYC [Q] +In-Reply-To: <37177D8E.FF43BF65@bigfoot.com> +References: <37177D8E.FF43BF65@bigfoot.com> +Message-ID: <000801be8891$f238d980$ee9e2299@tim> +X-UID: 1125 + +[Hoon Yoon] +> What happens if you do NOT want your pyc codes to be reverse +> engineered? + +You would have to add a layer of encryption to the .pyc files, and +decryption to the interpreter. I'm sure the U.S. govt would be delighted to +help . + +> Can you prevent someone from doing this type of rev eng? + +Nope. You can strive to make it more difficult, but you can't stop it. + +> Some members in my IT committee always have a problem with this +> ability and often used as excuse to kill any new tech adoption. + +How do they feel about old tech? Like, say, C or C++? It's no great +achievement to reverse-engineer algorithms from a binary native machine-code +distribution either; in fact, there are a thousand people who can read Intel +machine code in their sleep for everyone who can reverse-engineer .pyc files +. + +unless-you-can-hide-your-code-from-the-cpu-a-human-can- + watch-it-work-too-ly y'rs - tim + + + + + + diff --git a/demo/ermis-f/python_m/cur/1126 b/demo/ermis-f/python_m/cur/1126 new file mode 100644 index 00000000..f9105fd7 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1126 @@ -0,0 +1,37 @@ +From: Scott.Kelley at Colorado.edu (KELLEY SCOTT T) +Date: Fri, 23 Apr 1999 16:08:52 -0600 +Subject: Efficient List Subtraction +Message-ID: <3720EF73.CA7DDEFF@Colorado.edu> +X-UID: 1126 + +Does anyone out there have a simple way to compare two lists (some operator perhaps) and +return +a list of *differences*? By differences, I mean the following: If had two +lists like, + +a = [1, 4, 5, 100] +b = [4, 5] + +the difference between a and b (a-b) would be [1, 100]. I suppose you could +write a couple of for loops to go through each list and compare them, but I +thought there might be a simple way to do this. + +I'm also interested in a simple way to returning a list of what is identical between the +two lists. +In the case of the above lists, a and b, they both contain [4, 5]. + +If anyone out there has a suggestion (or two) I would very much appreciate it. + +Cheers! -Scott + +------------------------------------------------------------------- +Scott Kelley Phone: 303-492-1474 +Dept. MCD Biology Fax: 303-492-7744 +Campus Box 347 E-mail: Scott.Kelley at Colorado.edu +University of Colorado +Boulder, CO 80309-0347 + + + + + diff --git a/demo/ermis-f/python_m/cur/1127 b/demo/ermis-f/python_m/cur/1127 new file mode 100644 index 00000000..a881158c --- /dev/null +++ b/demo/ermis-f/python_m/cur/1127 @@ -0,0 +1,50 @@ +From: tville at earthlink.net (susan e paolini) +Date: Wed, 14 Apr 1999 14:43:37 -0400 +Subject: Tutorial Python +References: <3714BAA0.12F180F3@xs4all.nl> +Message-ID: <3714E1D8.AE305670@earthlink.net> +Content-Length: 1628 +X-UID: 1127 + + + Python + KDE Tutorial + +Perhaps this will help Frank + + +Frank de Bot wrote: + +> Does somebody knows a good tutorial on the internet especialy for python +> - CGI Aplications. Currently I have several websites running on PERL (As +> you can see at the bottom of this mail). Currently the searchengine has +> 4100 sites and it takes about 0.80 cpu to search. This is now not a +> problem, because I rarely get visitors. But I realy like to get +> something that's working fast and good. (Ps I've already checked +> python.org, but they aren't giving any examples (And I need them hard to +> understand the language)) +> Thanks in advance... +> +> Frank de Bot. +> +> -- +> \\\|/// +> \\ - - // +> ( @ @ ) +> /----------------------oOOo-(_)-oOOo--------------------\ +> | | +> | | +> | My Email: debot at xs4all.nl | +> | Homepages: http://www.searchy.net/ | +> | http://www.debot.nl/ppi/ | +> | | +> | | +> \-------------------------------Oooo--------------------/ +> oooO ( ) +> ( ) ) / +> \ ( (_/ +> \_) +-------------- next part -------------- +An HTML attachment was scrubbed... +URL: + + diff --git a/demo/ermis-f/python_m/cur/1128 b/demo/ermis-f/python_m/cur/1128 new file mode 100644 index 00000000..da807014 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1128 @@ -0,0 +1,31 @@ +From: trashcan at david-steuber.com (David Steuber) +Date: 07 Apr 1999 22:38:44 -0500 +Subject: povray.py +References: <__YN2.30200$FZ5.11443@news.rdc1.sfba.home.com> +Message-ID: +X-UID: 1128 + +quinn at cruzeiro.ugcs.caltech.edu (Quinn Dunkan) writes: + +-> (grumblegripegrunt). It's incomplete, and written when I was first learning +-> python, and I haven't worked on it for a while, but I'll send it to anyone +-> interested. Perhaps we could collaborate? + +I'd love too except that I am so new to Python that I haven't written +anything in it yet. + +I was going to have a go at reproducing the functionality of +leafnode. + +-- +David Steuber +http://www.david-steuber.com + +s/trashcan/david/ to reply by mail +If you don't, I won't see it. + +As long as the answer is right, who cares if the question is wrong? + + + + diff --git a/demo/ermis-f/python_m/cur/1129 b/demo/ermis-f/python_m/cur/1129 new file mode 100644 index 00000000..00aca98a --- /dev/null +++ b/demo/ermis-f/python_m/cur/1129 @@ -0,0 +1,68 @@ +From: bhuzyk at kodak.com (Bruce Huzyk) +Date: 13 Apr 1999 13:01:39 GMT +Subject: Converting a string to a tuple +References: <01be8530$65bb7120$52037e81@saints> <14098.28727.245158.616727@buffalo.fnal.gov> <00f501be857f$ff636f40$f29b12c2@pythonware.com> +Message-ID: <01be85b5$f7197c90$52037e81@saints> +Content-Length: 1253 +X-UID: 1129 + +I will now take this opportunity to revise my original post. +I wish to convert a string to a tuple. +My sample string should have been: + s = '(1, "abc\\tef", 2)' +instead of: + s = '(1, "abc\\def", 2)' + +The problem is that the \\t part of the string gets expanded to a \011 + +Only the eval(string.replace(s, '\\', '\\\\')) seems to do the job. Any +comments? + +sample code: +>>> s = '(1, "abc\\tef", 2)' +>>> eval(s) +(1, 'abc\011ef', 2) + +s = '(1, "abc\\tef", 2)' +>>> eval(string.replace(s, '\\', '\\\\')) +(1, 'abc\\tef', 2) + + +>>> s = '(1, "abc\\tef", 2)' +>>> eval(s, {"__builtins__": {}}) +(1, 'abc\011ef', 2) + + +>>> s = '(1, "abc\\tef", 2)' +>>> r = rexec.RExec() +>>> s = '(1, "abc\\tef", 2)' +>>> r = rexec.RExec() +>>> r.r_eval(s) +(1, 'abc\011ef', 2) + + + +Fredrik Lundh wrote in article +<00f501be857f$ff636f40$f29b12c2 at pythonware.com>... +> Charles G Waldman wrote: +> > If you're concerned about safety (the "eval" could be evaluating any +> > Python code, possibly a hazard if the string is coming from user +> > input) then you don't want to use eval at all. +> +> try: +> +> result = eval(string, {"__builtins__": {}}) +> +> or: +> +> import rexec +> r = rexec.RExec() +> result = r.r_eval(string) +> +> +> +> + + + + diff --git a/demo/ermis-f/python_m/cur/1130 b/demo/ermis-f/python_m/cur/1130 new file mode 100644 index 00000000..f008182b --- /dev/null +++ b/demo/ermis-f/python_m/cur/1130 @@ -0,0 +1,38 @@ +From: dfan at harmonixmusic.com (Dan Schmidt) +Date: 30 Apr 1999 10:18:14 -0400 +Subject: while (a=b()) ... +References: +Message-ID: +Content-Length: 1161 +X-UID: 1130 + +Nathan Clegg writes: + +| I have some deep-rooted "hates" in programming and don't even know +| where some of them came from. One of them is "while 1" loops. They +| seem somehow at the same level as goto statements and should be +| used, in my mind, about as rarely. +| +| The ideal, of course, would be: +| +| while (c = curs.fetchone()): ... +| +| That is my only complaint about python, that statements cannot be +| expressions. + +Everyone who is at all interested in loops should read Knuth's article +"Structured programming with go to statements", found in his book +"Literate Programming". Don't be fooled by the title or the fact that +it was written in 1974. It's a comprehensive (70 pages) overview of +looping constructs, including convincing proposals for some new ones. +Certainly all language designers owe it to themselves to read it. + +-- + Dan Schmidt -> dfan at harmonixmusic.com, dfan at alum.mit.edu +Honest Bob & the http://www2.thecia.net/users/dfan/ +Factory-to-Dealer Incentives -> http://www2.thecia.net/users/dfan/hbob/ + Gamelan Galak Tika -> http://web.mit.edu/galak-tika/www/ + + + + diff --git a/demo/ermis-f/python_m/cur/1131 b/demo/ermis-f/python_m/cur/1131 new file mode 100644 index 00000000..6bc6ea59 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1131 @@ -0,0 +1,24 @@ +From: da at ski.org (David Ascher) +Date: Wed, 21 Apr 1999 22:10:28 -0700 (Pacific Daylight Time) +Subject: Directory of current file +Message-ID: +X-UID: 1131 + +Tip: To find out the directory of the currently executing program, use: + +import sys, os +if __name__ == '__main__': + _thisDir = '' +else: + _thisDir = os.path.split(sys.modules[__name__].__file__)[0] + +(note that this is a relative path). + +--david + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1132 b/demo/ermis-f/python_m/cur/1132 new file mode 100644 index 00000000..0e07362b --- /dev/null +++ b/demo/ermis-f/python_m/cur/1132 @@ -0,0 +1,35 @@ +From: mrfusion at bigfoot.com (mrfusion at bigfoot.com) +Date: Wed, 21 Apr 1999 04:05:56 GMT +Subject: Tkinter hangs on mainloop +References: <371c19bb.60709557@news> <008a01be8b11$e17fb320$f29b12c2@pythonware.com> <371d3ae9.134747887@news> +Message-ID: <371d4d4a.435769@news> +X-UID: 1132 + +On Wed, 21 Apr 1999 02:49:43 GMT, mrfusion at bigfoot.com wrote: + + +>>> It hangs. + + +I think I've narrowed it down the the tcl\tk installation. The wish80 +program doesn't seem to work correctly. If I double click on the +program, nothing happens. I downloaded an earlier version of tcl\tk, +installed it and that version of wish worked just fine. I've also +noticed that when I try to start my "hello world" python\TK scipt, +while it's hanging there it seems to keep spawning wish80 processes. +If I kill them in the task switcher, another one (or two or three) +keeps showing up. + +I've tried downloading the latest install (8.0.5) files directly from +http://www.scriptics.com but that didn't seem to fix anything. + +Does this shed any light on the problem??? + + +Thanks, +Tom + + + + + diff --git a/demo/ermis-f/python_m/cur/1133 b/demo/ermis-f/python_m/cur/1133 new file mode 100644 index 00000000..262b4bf8 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1133 @@ -0,0 +1,19 @@ +From: scrompton at quantisci.co.uk (Stephen Crompton) +Date: Thu, 15 Apr 1999 19:51:44 +0100 +Subject: Whoops. (was timezone stuff driving me bonkers) +Message-ID: <37163540.6D692E8@quantisci.co.uk> +X-UID: 1133 + +Sorry folks. + +That was meant to be a personal response to Marc. + +Apologies. + +Steve. + + + + + + diff --git a/demo/ermis-f/python_m/cur/1134 b/demo/ermis-f/python_m/cur/1134 new file mode 100644 index 00000000..6a04a809 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1134 @@ -0,0 +1,50 @@ +From: S.I.Reynolds at cs.bham.ac.uk (Stuart I Reynolds) +Date: Sun, 18 Apr 1999 19:44:11 +0100 +Subject: Install trouble +Message-ID: <371A27FB.5166@cs.bham.ac.uk> +Content-Length: 1077 +X-UID: 1134 + +Dear all, + +I'm having trouble installing the latest Python release. I'm also trying +to install for multiple platforms (Solaris and DEC OSF1). Here's what +happens when I try to do the Solaris installation: + +% cd ~/tmp/ +% tar -xvf py152.tar +% cd Python-1.5.2/ +% mkdir /bham/ums/solaris/pd/packages/Python-1.5.2/ +% cd /bham/ums/solaris/pd/packages/Python-1.5.2/ + +#This is how the README instructs X-platform installs +#These options worked with the 1.5.1 install +% /home/pg/sir/tmp/Python-1.5.2/configure +--exec-prefix=/bham/ums/solaris/pd/packages/Python-1.5.2 +--prefix=/bham/ums/common/pd/packages/Python-1.5.2 --with-gcc +--with-thread +% make +[. + . + . +gcc -c -g -O2 -I/home/pg/sir/tmp/Python-1.5.2/Python/../Include -I.. +-DHAVE_CONFIG_H -DPLATFORM='"sunos5"' \ + /home/pg/sir/tmp/Python-1.5.2/Python/getplatform.c +make: Fatal error: Don't know how to make target +`../Include/patchlevel.h' +Current working directory +/bham/ums/solaris/pd/packages/Python-1.5.2/Python +*** Error code 1 +make: Fatal error: Command failed for target `Python' + . + . + .] + + +Cheers, + +Stuart + + + + diff --git a/demo/ermis-f/python_m/cur/1135 b/demo/ermis-f/python_m/cur/1135 new file mode 100644 index 00000000..3d1d279e --- /dev/null +++ b/demo/ermis-f/python_m/cur/1135 @@ -0,0 +1,52 @@ +From: tismer at appliedbiometrics.com (Christian Tismer) +Date: Fri, 23 Apr 1999 19:15:58 GMT +Subject: Python too slow for real world +References: <372068E6.16A4A90@icrf.icnet.uk> <3720A21B.9C62DDB9@icrf.icnet.uk> <3720C4DB.7FCF2AE@appliedbiometrics.com> +Message-ID: <3720C6EE.33CA6494@appliedbiometrics.com> +Content-Length: 1407 +X-UID: 1135 + +Just did a little more cleanup to the code. +This it is: + +def read_write_bulk(input, output, exclude): + bufsize = 1 << 16 ; splitter = ">" + ignore=exclude.has_key ; split=string.split ; No = None + + buffer = input.read(bufsize) + got = len(buffer) + while 1 : + pieces = split(buffer, splitter) + idx = 0 + inner = pieces[1:-1] + for piece in inner: + idx = idx+1 ; key = split(piece, No, 1)[0] + if ignore(key): + del inner[idx] ; idx = idx-1 + output.write(splitter) + output.write(string.join(inner, splitter)) + if got==0: + break + chunk = input.read(bufsize) + buffer = splitter+pieces[-1] + chunk + got = len(chunk) + if got==0: + buffer = buffer+splitter # spill last one + +Also, I think with this I/O layout, buffering of the +files doesn't count any more at all. +Let me know if it is still much slower than Perl. + +ciao - chris + +-- +Christian Tismer :^) +Applied Biometrics GmbH : Have a break! Take a ride on Python's +Kaiserin-Augusta-Allee 101 : *Starship* http://starship.python.net +10553 Berlin : PGP key -> http://wwwkeys.pgp.net +PGP Fingerprint E182 71C7 1A9D 66E9 9D15 D3CC D4D7 93E2 1FAE F6DF + we're tired of banana software - shipped green, ripens at home + + + + diff --git a/demo/ermis-f/python_m/cur/1136 b/demo/ermis-f/python_m/cur/1136 new file mode 100644 index 00000000..6229e762 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1136 @@ -0,0 +1,53 @@ +From: quinn at agora.ugcs.caltech.edu (Quinn Dunkan) +Date: 12 Apr 1999 22:08:58 GMT +Subject: povray.py +References: <__YN2.30200$FZ5.11443@news.rdc1.sfba.home.com> <370E4F3E.F9C2CD07@lockstar.com> +Message-ID: +Content-Length: 2155 +X-UID: 1136 + +On Fri, 09 Apr 1999 13:48:46 -0700, Joe Strout wrote: +>In article , Quinn Dunkan +> wrote: +> +>> pov.py v0.0: +>> http://www.calarts.edu/~elaforge/pov/ +>> +>> I guess it's released now :) +> +>Cool! Looks very neat. I'm not quite clear on how you're planning to +>handle animations. Will your Python script spit out a different +>POV-Ray script for each time point? Or will it spit out a whole series +>of them? Some things, like flocking behavior, are really hard to +>implement in a clock-independent way. + +Um, I guess I'm not understanding what you mean... "will it spit out a bunch of +pov scripts or will it spit out a bunch of pov scripts?" Er, yes :) (different +script for each time point). I see no reason to use pov's animation features +(clock, etc) we can do all that from python better. One of my original +frustrations with animation under pov was that you couldn't keep a state +between frames. While it's an elegant approach in theory, I don't want to do +calculus to drop a ball, and huge #case #range etc. to have it bounce :) So I +think my approach to clock independence would be to have stateful objects that +when you tell them advance time_interval they modify their velocity and advance +themselves. Pre-Newtonian physics, I guess, but I'm still a physics idiot :) +I'm sure someone more math-minded than myself could come up with some cool +ideas / code. + +>Also, I see matrix transforms are on your to-do list. I suggest you +>use the Numeric module. Use dot(m1,m2) or dot(m1,v) to combine +>matrices or apply a transformation matrix to a vector, respectively. + +Hmm... I'd rather not require external packages if it can be avoided. If +the matrix stuff is trivial, I'll reinvent it. But it's a good idea to look +at NumPy anyway because there's probably some stuff in there that will be +useful in other ways too. I've already made my own vectors, but it was a +Learning Experience :) + + +BTW, the initial release had some minor code rot that made it non-functional +(transforms in the wrong place, etc.) but I replaced it pretty quickly. + + + + diff --git a/demo/ermis-f/python_m/cur/1137 b/demo/ermis-f/python_m/cur/1137 new file mode 100644 index 00000000..9e234fd7 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1137 @@ -0,0 +1,85 @@ +From: mnot at pobox.com (Mark Nottingham) +Date: Mon, 12 Apr 1999 21:50:02 GMT +Subject: ConfigParser module and alternatives (flad, flan) +References: <19990331160323.21601.00000471@ng-fi1.aol.com><7du3ab$3ag@chronicle.concentric.net> <371219E9.9EA91839@home.com> +Message-ID: <003801be852e$6b8f5d20$0301a8c0@cbd.net.au> +Content-Length: 2010 +X-UID: 1137 + +Just to jump in here (haven't read the whole thread, I've been away for a +while and BOY is my mail piled up), you might have some luck the +underdeveloped Conf.py module if ConfigParser doesn't do it for you -- + +http://www.pobox.com/~mnot/script/python/ + + +----- Original Message ----- +From: Jim Meier +Newsgroups: comp.lang.python +To: +Sent: Tuesday, April 13, 1999 1:59 +Subject: Re: ConfigParser module and alternatives (flad, flan) + + +> +> +> Mike Orr wrote: +> +> > I'm not sure if I'll use ConfigParser for the next version. I don't +> > really need the sections (multiple files work just fine, using the +filename +> > for the section name), and I haven't found a use for the the +%(other_key)s +> > substitutions. On the other hand, it doesn't handle multiple values +(the +> > same key repeated within a record), which I sometimes need. +> > +> > Attached is a wrapper class for ConfigParser which supports booleans +> > and can also return an entire section as a dictionary (or all the +sections +> > as nested dictionaries). I find these make it a little more convenient. +> > +> +> Why not simply use a file of python expressions? Like this: +> +> {'section1': { +> 'key1':[1,2,3,'value',['useful','nesting','eh?']], +> 'key2':'anotherval' +> }, +> 'section2': { +> 'subsection':{ +> 'subkey':5 +> } +> } +> } +> +> I beleive you can even use variable names in such files for +application-specified +> substitutions, like this: +> +> (python app defines variable "rootdir") +> +> {'pathssection': { +> 'fontpath': rootdir+'/font/' +> } +> } +> +> This introduces some major security problems, and is a little difficult to +edit, +> but there is very little parsing needed to make it usable. Does anyone +know of a +> way to limit the damage a user can do to such a file? +> +> Another idea is to run your config file through a simple macro utility (or +do the +> macro conversion in python itself) to convert it into python code to eval. +> +> Jim Meier +> +> +> + + + + + diff --git a/demo/ermis-f/python_m/cur/1138 b/demo/ermis-f/python_m/cur/1138 new file mode 100644 index 00000000..c22d63cf --- /dev/null +++ b/demo/ermis-f/python_m/cur/1138 @@ -0,0 +1,50 @@ +From: mal at lemburg.com (M.-A. Lemburg) +Date: Tue, 13 Apr 1999 15:46:39 GMT +Subject: rfc822 date header +References: <3712D863.2A8148BC@rubic.com> <3712F4C1.52327AF4@lemburg.com> <371318BC.E131EDF0@oratrix.com> +Message-ID: <371366DF.DE55B6@lemburg.com> +Content-Length: 1387 +X-UID: 1138 + +Jack Jansen wrote: +> +> "M.-A. Lemburg" wrote: +> > +> > Jeff Bauer wrote: +> > > +> > > Is there a reasonably bulletproof way to generate an +> > > rfc822-compliant date header using the time module? +> > > +> > > The reason I ask is I recall a number of subtle +> > > errors in this regard, reported by Chris Lawrence, +> > > among others. +> > +> > According to the RFC, time.ctime() should do the trick... +> > but it's probably locale aware which the RFC doesn't account +> > for. +> +> Which RFC are you referring to? time.ctime() output is definitely *not* +> compatible with RFC822. But it should be easy enough to come up with a +> time.strftime() format that does the right thing... + +Ah, sorry, I mixed up HTTP and RFC822. According to RFC 2068 (HTTP 1.1) +the result of time.asctime() is a valid date header. + +Since time.ctime() is short for time.asctime(time.localtime(ticks)) +it would not result in the correct value for HTTP either (:-/ second +Ooops). You'd have to use time.asctime(time.gmtime(ticks)). + +Oh well. Anyway, mxDateTime does the right thing (and also allows +parsing those beasts). + +Cheers, +-- +Marc-Andre Lemburg Y2000: 262 days left +--------------------------------------------------------------------- + : Python Pages >>> http://starship.skyport.net/~lemburg/ : + --------------------------------------------------------- + + + + + diff --git a/demo/ermis-f/python_m/cur/1139 b/demo/ermis-f/python_m/cur/1139 new file mode 100644 index 00000000..f4e76238 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1139 @@ -0,0 +1,28 @@ +From: aahz at netcom.com (Aahz Maruch) +Date: Wed, 28 Apr 1999 18:18:19 GMT +Subject: converting perl to python - simple questions. +References: <7fvagp$8lm$1@nnrp1.dejanews.com> +Message-ID: +X-UID: 1139 + +In article , +Florian Weimer wrote: +> +>(Quotation from the Perl 4 manpage. This version doesn't have an +>`exists' function.) + +Then you've just made a completely irrelevant comment, on the order of +referring to Python 1.2. Perl 5 has been out for more than two years, +and there are so many improvements that I don't know of *anyone* who's +doing new work in Perl 4. +-- + --- Aahz (@netcom.com) + +Hugs and backrubs -- I break Rule 6 <*> http://www.rahul.net/aahz/ +Androgynous poly kinky vanilla queer het + +Hi! I'm a beta for SigVirus 2000! Copy me into your .sigfile! + + + + diff --git a/demo/ermis-f/python_m/cur/1140 b/demo/ermis-f/python_m/cur/1140 new file mode 100644 index 00000000..5e82f0d3 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1140 @@ -0,0 +1,39 @@ +From: vkolosov at unitedmedia.com (Kolosov, Victor) +Date: Fri, 16 Apr 1999 21:40:39 GMT +Subject: smtplib error in 1.5.2 +Message-ID: <461182F0B9B7D111B4000008C7282ADC22B04E@nynt04.umny.scripps.com> +Content-Length: 1115 +X-UID: 1140 + +Hi, + +Everything has seemed to work in 1.5.1 but after installing 1.5.2 on our +Unix box running Solaris 2.5 I get this error when trying to use smtplib + +>>> import rfc822, string, sys +>>> import smtplib +>>>msg='Test Message' +>>>s = smtplib.SMTP('localhost') +>>> s.sendmail('me at my.com',['me at my.com'],msg) +Traceback (innermost last): + File "", line 1, in ? + File "/usr/local/lib/python1.5.2/smtplib.py", line 480, in sendmail + (code,resp)=self.data(msg) + File "/usr/local/lib/python1.5.2/smtplib.py", line 374, in data + self.send(quotedata(msg)) + File "/usr/local/lib/python1.5.2/smtplib.py", line 134, in quotedata + re.sub(r'(?:\r\n|\n|\r(?!\n))', CRLF, data)) + File "/usr/local/lib/python1.5.2/re.py", line 48, in sub + return pattern.sub(repl, string, count) + File "/usr/local/lib/python1.5.2/re.py", line 133, in sub + return self.subn(repl, string, count)[0] + File "/usr/local/lib/python1.5.2/re.py", line 167, in subn + regs = match(source, pos, end, 0) +TypeError: argument 1: expected read-only character buffer, list found + +====== +Is there something obvious I do not see? + + + + diff --git a/demo/ermis-f/python_m/cur/1141 b/demo/ermis-f/python_m/cur/1141 new file mode 100644 index 00000000..9692e0f7 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1141 @@ -0,0 +1,27 @@ +From: pkleynjan at my-dejanews.com (pkleynjan at my-dejanews.com) +Date: Sat, 24 Apr 1999 21:55:00 GMT +Subject: Beginner - Tkinter info +References: <371c59e9.2723125@news.tin.it> <371B453E.C3F83831@foreman.ac.rwth-aachen.de> <004301be8a99$0faf7920$f29b12c2@pythonware.com> +Message-ID: <7ftejj$pb9$1@nnrp1.dejanews.com> +X-UID: 1141 + +Fredrik et al, + +> there's something called websucker.py down in the Tools +> directory in the Python distribution: + +Call me stupid... I can't find websucker.py in either the +Windows or Linux 1.5 distributions... Python.org and starship +come up empty as well... + +Any pointers..? + +Thanks, +-Peter + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/1142 b/demo/ermis-f/python_m/cur/1142 new file mode 100644 index 00000000..c28df2c3 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1142 @@ -0,0 +1,93 @@ +From: befletch at my-dejanews.com (Bruce Fletcher) +Date: Fri, 30 Apr 1999 21:07:21 GMT +Subject: Trouble with proxies +References: <7gasj8$g79$1@nnrp1.dejanews.com> <5lzp3qafkj.fsf@eric.cnri.reston.va.us> <7gd0dh$add$1@nnrp1.dejanews.com> +Message-ID: <7gd626$fcf$1@nnrp1.dejanews.com> +Content-Length: 2968 +X-UID: 1142 + +In article <7gd0dh$add$1 at nnrp1.dejanews.com>, + befletch at my-dejanews.com wrote: +> In article <5lzp3qafkj.fsf at eric.cnri.reston.va.us>, +> Guido van Rossum wrote: +> > A quick lookup in errno.errorcode shows that that error is +> > WSAECONNRESET, in other words the connection is reset by the server. +> > This apparently happens after the proxy has read your headers. Could +> > it be that the proxy server requires some kind of magic header? Ask +> > the sysadmin who is responsible for the proxy. At least find out what +> > the proxy software is, you can probably find the specs on the web.... +> > +> > If you have a way to snoop network packets, it would be interesting to +> > see what traffic happens when your regular browser (IE or netscape) +> > connects to the proxy from the same client machine (I'm assuming that +> > works!). +> +> The proxy server is WinProxy Lite, V2.1. It is running on an NT4 server. +> Yes, IE and Netscape both work fine through the proxy server, and no, the +> sysadmin doesn't know anything more about WinProxy than how to install it +> and configure it for normal http/ftp/smtp/pop3 clients. +> +> Following suggestions from several kind people, I have also tried the +> following: + +[snip] + +Ok, I have expanded my test and come up with some interesting results. +I'm using IDLE now too, if that matters. Slick program. Anyway, consider +the following script: + + import os, urllib + + #os.environ['http_proxy'] = "http(colon-slash-slash)10.187.200.230:80/" + #os.environ['http_proxy'] = "http(colon-slash-slash)1.2.3.4:5/" + os.environ['http_proxy'] = "" + # (colon-slash-slash) means :// but DejaNews won't post without the + # translation. Dunno why not. + + print os.environ['http_proxy'] + + #f = urllib.urlopen('http://www.python.org/') + #f = urllib.urlopen('http://www.nonexisting.site/') + f = urllib.urlopen('http://www.ibm.com/') + + print f + + data = f.readline() + + while len(data)>0: + print data + data = f.readline() + +No matter which proxy string I use, or which URL, I get the following: + + + > + 403 Forbidden + +

+> tags (the default alignment _is_ left). The unnecessary tags are +> consistent and easy to identify, and a routine should be writable that +> will automate the removal of them. +> +> I created a Macro in Visual SlickEdit that automatically opens all these +> HTML files, finds and deletes all the tags that can be deleted, saves the +> changes and closes them. I originally wanted to do this in Python, and I +> would still like to know how, but time constraints prevented it at the +> time. Now I want to work on how to create a Python program that will do +> this. Can anyone help? Has anyone written anything like this in Python +> already that they can point me too? I would really appreciate it. +> + +Well, it wouldn't be that hard in Python to parse the HTML files and reformat +them in various ways. You can either go the route of straight text +substitution using regular expressions, or you could use htmllib to actually +parse the HTML files into a data structure, and the write them back out +again. + +However, may I suggest a different method? + +You've got your original data in Access. There are several different ways to +talk to Access from Python. You could pull your data directly from Access +using Python and skip Excel all together. And Python's got some great modules +for generating HTML. Heck, add CGI or Zope to the mix and you could generate +your inventory lists at the web server on the fly! + +Ok, I'll calm down now. + +-Chris + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/1343 b/demo/ermis-f/python_m/cur/1343 new file mode 100644 index 00000000..dbff0d41 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1343 @@ -0,0 +1,38 @@ +From: dfan at harmonixmusic.com (Dan Schmidt) +Date: 28 Apr 1999 16:15:17 -0400 +Subject: converting perl to python - simple questions. +References: <7fvagp$8lm$1@nnrp1.dejanews.com> +Message-ID: +Content-Length: 1168 +X-UID: 1343 + +aahz at netcom.com (Aahz Maruch) writes: + +| In article , +| Florian Weimer wrote: +| > +| >(Quotation from the Perl 4 manpage. This version doesn't have an +| >`exists' function.) +| +| Then you've just made a completely irrelevant comment, on the order +| of referring to Python 1.2. Perl 5 has been out for more than two +| years, and there are so many improvements that I don't know of +| *anyone* who's doing new work in Perl 4. + +Four and a half, actually; Perl 5.000 was released in October 1994, +exactly a week after Python 1.1. In fact, Perl 5 has been the current +version longer than Perl 4 was (Perl 4 was released in March 1991, so +it was the newest version for only three and a half years). + +(References: perlhist manpage, and Misc/HISTORY in the Python source +distribution.) + +-- + Dan Schmidt -> dfan at harmonixmusic.com, dfan at alum.mit.edu +Honest Bob & the http://www2.thecia.net/users/dfan/ +Factory-to-Dealer Incentives -> http://www2.thecia.net/users/dfan/hbob/ + Gamelan Galak Tika -> http://web.mit.edu/galak-tika/www/ + + + + diff --git a/demo/ermis-f/python_m/cur/1344 b/demo/ermis-f/python_m/cur/1344 new file mode 100644 index 00000000..f6a21202 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1344 @@ -0,0 +1,80 @@ +From: nathan at islanddata.com (Nathan Clegg) +Date: Thu, 29 Apr 1999 16:48:39 -0700 (PDT) +Subject: while (a=b()) ... +In-Reply-To: <19990430000141.A5867@shalott> +Message-ID: +Content-Length: 1214 +X-UID: 1344 + +I have some deep-rooted "hates" in programming and don't even know where +some of them came from. One of them is "while 1" loops. They seem +somehow at the same level as goto statements and should be used, in my +mind, about as rarely. + +The ideal, of course, would be: + +while (c = curs.fetchone()): ... + +That is my only complaint about python, that statements cannot be +expressions. + + + +On 30-Apr-99 Marco Mariani wrote: +> Hi all language lawyers! +> +> Which one is more ugly? +> +> +> +> ===== +> +> c = curs.fetchone() +> while c: +> print c +> c = curs.fetchone() +> +> ===== +> +> while 1: +> c = curs.fetchone() +> if c: +> print c +> else: +> break +> +> ===== +> +> Is there an elegant way? +> +> +> while curs.fetchone() +> print $_ +> +> +>:-))) +> +> +> +> -- +> "If you're going to kill someone there isn't much reason to get all +> worked +> up about it and angry. Any discussions beforehand are a waste of time. +> We need to smile at Novell while we pull the trigger." +> +> - Jim Allchin, Microsoft corp. - +> +> -- +> http://www.python.org/mailman/listinfo/python-list + + + +---------------------------------- +Nathan Clegg + nathan at islanddata.com + + + + + + diff --git a/demo/ermis-f/python_m/cur/1345 b/demo/ermis-f/python_m/cur/1345 new file mode 100644 index 00000000..1480196b --- /dev/null +++ b/demo/ermis-f/python_m/cur/1345 @@ -0,0 +1,51 @@ +From: mwh21 at cam.ac.uk (Michael Hudson) +Date: 14 Apr 1999 16:44:27 +0100 +Subject: REPOST:pretty please - Help re libpython1.5.so +References: <3714B9F9.30285D74@earth.ox.ac.uk> +Message-ID: +Content-Length: 1301 +X-UID: 1345 + +Nick Belshaw writes: +> I'm gonna start taking this personally soon !!! + +1) You've not been very specific wrt platform, hardware. +2) I was getting there! Give us 24 hours! + +> You bright guys out there..................................... +> +> If anyone can spare a second - +> +> Whilst trying to get Python plugins to work on Gnumeric-0.23 I bumped up +> +> against the need for libpython1.5.so.0.0.0 +> +> I have 'The Full Python' ( - thats the sequel to 'The Full Monty' !!! ) +> +> and can build xxxx.a no problem but what do I have to do to get xxxx.so +> Can't seem to find anything specific on it in the docs or readme or +> Setup and my knowledge is too superficial to allow me to be clever. + +Are you sure it's exactly libpython1.5.so.0.0.0 it's asking for? I've +just compiled this bit of gnumeric (succesfully) and it's created +libpython.la, which references libpython.so.0.0.0 and libpython.a, +both of which are linked to libpython1.5.a. This is all on a redhat +5.2/i386 with slap bang up to date python and gnumeric from their +respective CVS repositories. + +> Help anyone? + +I'd try updating your gnumeric, and if that fails, email me more +details & what make says as it fails and I'll have a think. + +> cheers +> Nick/Oxford Geochemistry + +Michael/"the other place" + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1346 b/demo/ermis-f/python_m/cur/1346 new file mode 100644 index 00000000..7069cf8e --- /dev/null +++ b/demo/ermis-f/python_m/cur/1346 @@ -0,0 +1,22 @@ +From: rasumner at bach.wisdom.weizmann.ac.il (Reuben Sumner) +Date: 12 Apr 1999 21:38:23 GMT +Subject: role of semilcolon +Message-ID: +X-UID: 1346 + +In the python interpreter doing 'a=1;b=2;b=3' does what I would +expect, three seperate assignments. However ; doesn't seem to appear +in the language reference except in the list of delimeters. Is the +above example formally valid python? + +BTW as you can tell I am a newbie but I am impressed with the ease at +which I was able to implement some number theoretic algorithms +(gcd, primaility testing, pollard rho factoring, jacobian...) +Is there a big practical difference between using long numbers and +the mpz package? (is the latter faster) + +Reuben + + + + diff --git a/demo/ermis-f/python_m/cur/1347 b/demo/ermis-f/python_m/cur/1347 new file mode 100644 index 00000000..6db4a4c2 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1347 @@ -0,0 +1,29 @@ +From: Noway at inhell.net (Stone Cold) +Date: Mon, 26 Apr 1999 19:18:13 GMT +Subject: help +Message-ID: +X-UID: 1347 + +I just got python and I need some help getting started. I have no +programing knowlodge yet but I want to know all the languges. can someone +help? + + +P.S +I have a web site you can hit a link to earn money and more crazy shit +http://members.tripod.com/web_4/index.html + + + + + + + +-- +http://members.tripod.com/web_4/index.html + + + + + + diff --git a/demo/ermis-f/python_m/cur/1348 b/demo/ermis-f/python_m/cur/1348 new file mode 100644 index 00000000..99eedeac --- /dev/null +++ b/demo/ermis-f/python_m/cur/1348 @@ -0,0 +1,53 @@ +From: Jean-Michel.Bruel at univ-pau.fr (Jean-Michel BRUEL) +Date: Wed, 14 Apr 1999 16:09:51 GMT +Subject: [CFP] <>'99 +Message-ID: <199904141609.SAA29230@crisv4.univ-pau.fr> +Content-Length: 1646 +X-UID: 1348 + +[apologies if you receive multiple copies of this announcement] + +================================================================= + 3rd Call for Papers <>'99 +================================================================= + + Second International Conference on the + Unified Modeling Language + + October 28-30, 1999, Fort Collins, Colorado, USA + (just before OOPSLA) +================================================================= + http://www.cs.colostate.edu/UML99 +================================================================= + +Important dates (deadlines are hard!): + Deadline for abstract 05 May 1999 + Deadline for submission 15 May 1999 + Notification to authors 15 July 1999 + Final version of accepted papers 25 August 1999 + +Submissions: + Submit your 10-15 page manuscript electronically in Postscript + or pdf using the Springer LNCS style. Details are available at + the conference web page. The <>'99 proceedings will be + published by Springer-Verlag in the LNCS series. + +Further Information: + Robert B. France E-mail: france at cs.colostate.edu + Computer Science Department Tel: 970-491-6356 + Colorado State University Fax: 970-491-2466 + Fort Collins, CO 80523, USA + + Bernhard Rumpe E-mail: rumpe at in.tum.de + Institut fuer Informatik Tel: 0049-89-289-28129 + T. Universitaet Muenchen Fax: 0049-89-289-28183 + 80290 Muenchen, Germany + +Sponsored by IEEE Computer Society Technical Committee on Complexity in Computing +In Cooperation with ACM SIGSOFT +With the Support of OMG + + + + + diff --git a/demo/ermis-f/python_m/cur/1349 b/demo/ermis-f/python_m/cur/1349 new file mode 100644 index 00000000..ae18efaa --- /dev/null +++ b/demo/ermis-f/python_m/cur/1349 @@ -0,0 +1,38 @@ +From: quinn at necro.ugcs.caltech.edu (Quinn Dunkan) +Date: 9 Apr 1999 18:40:20 GMT +Subject: povray.py +References: <__YN2.30200$FZ5.11443@news.rdc1.sfba.home.com> <370E4F3E.F9C2CD07@lockstar.com> +Message-ID: +Content-Length: 1215 +X-UID: 1349 + +On 09 Apr 1999 09:07:30 PDT, Mordy Ovits wrote: +>Quinn Dunkan wrote: +>> Well, I don't have RenderMan, but I did write a pov.py module. It does +>> basically what you described, and eventually I'm going to add animation +>> features and basic physics (the ocaml module I wrote before did that) and +>> stuff like "magic" transforms that align one object with another, spline +>> curves etc. I've designed some scenes in it, and it's wordier than pov, but +>> has all the benefits of a real language. It doesn't do the new halo syntax +>> because the pov people have yet to release an updated unix version +>> (grumblegripegrunt). It's incomplete, and written when I was first learning +>> python, and I haven't worked on it for a while, but I'll send it to anyone +>> interested. Perhaps we could collaborate? +> +>I'd like a copy of your pov.py module, please. I'm an experienced Python +>programmer, and raytracing hobbyist. If I made any additions to it, I'd gladly +>send them along to you. +>Thanks! +>Mordy + +pov.py v0.0: +http://www.calarts.edu/~elaforge/pov/ + +I guess it's released now :) + +Also, the pov people just released pov 3.1e for linux, so what I said before +is no longer accurate. + + + + diff --git a/demo/ermis-f/python_m/cur/1350 b/demo/ermis-f/python_m/cur/1350 new file mode 100644 index 00000000..9d777212 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1350 @@ -0,0 +1,15 @@ +From: cgw at fnal.gov (Charles G Waldman) +Date: Sat, 10 Apr 1999 18:48:59 GMT +Subject: WinZip vs 0-length files (was RE: trivial import question) +In-Reply-To: <000201be8308$8b824520$ac9e2299@tim> +References: <000401be7808$6105e3c0$549e2299@tim> + <000201be8308$8b824520$ac9e2299@tim> +Message-ID: <14095.40219.501277.258165@buffalo.fnal.gov> +X-UID: 1350 + +would it work to make the __init__.py files just have a #comment in +them so that they wouldn't be 0 bytes? might save some confusion. + + + + diff --git a/demo/ermis-f/python_m/cur/1351 b/demo/ermis-f/python_m/cur/1351 new file mode 100644 index 00000000..090e3b6d --- /dev/null +++ b/demo/ermis-f/python_m/cur/1351 @@ -0,0 +1,34 @@ +From: tismer at appliedbiometrics.com (Christian Tismer) +Date: Fri, 23 Apr 1999 19:27:03 GMT +Subject: Python too slow for real world +References: <372068E6.16A4A90@icrf.icnet.uk> + <3720A21B.9C62DDB9@icrf.icnet.uk> +Message-ID: <3720C987.748312F8@appliedbiometrics.com> +X-UID: 1351 + + +"Steven D. Majewski" wrote: +... +> My guess would be that a difference this big is due to the file +> buffering mode. + +This seems to be true. +After removing line I/O at all and doing some optimization, +the Python program now runs more than twice as fast than +the Perl version on my Linux box. +Although unfair, since I would have to optimize the latter +as well :-) + +ciao - chris + +-- +Christian Tismer :^) +Applied Biometrics GmbH : Have a break! Take a ride on Python's +Kaiserin-Augusta-Allee 101 : *Starship* http://starship.python.net +10553 Berlin : PGP key -> http://wwwkeys.pgp.net +PGP Fingerprint E182 71C7 1A9D 66E9 9D15 D3CC D4D7 93E2 1FAE F6DF + we're tired of banana software - shipped green, ripens at home + + + + diff --git a/demo/ermis-f/python_m/cur/1352 b/demo/ermis-f/python_m/cur/1352 new file mode 100644 index 00000000..739bb66d --- /dev/null +++ b/demo/ermis-f/python_m/cur/1352 @@ -0,0 +1,17 @@ +From: bernhard at alpha1.csd.uwm.edu (Bernhard Reiter) +Date: 6 Apr 1999 00:07:28 GMT +Subject: Is Python dying? +References: <7dos4m$usi$1@nnrp1.dejanews.com> <37009C12.4C0E6B0B@earth.ox.ac.uk> <922837384snz@vision25.demon.co.uk> <7dtbu1$rpn$1@nnrp1.dejanews.com> <37025110.1BA742B@appliedbiometrics.com> +Message-ID: +X-UID: 1352 + +On 4 Apr 1999 17:45:54 GMT, Jim Richardson wrote: +> I would have printed 4 to a page +>but I couldn't figure how to make mpage do the registering properly for +>2 stage double sided printing. +Tried psnup or psbook? + Bernhard + + + + diff --git a/demo/ermis-f/python_m/cur/1353 b/demo/ermis-f/python_m/cur/1353 new file mode 100644 index 00000000..7abd956f --- /dev/null +++ b/demo/ermis-f/python_m/cur/1353 @@ -0,0 +1,48 @@ +From: davidtmoore at my-dejanews.com (davidtmoore at my-dejanews.com) +Date: Fri, 23 Apr 1999 21:17:10 GMT +Subject: Style/efficiency question using 'in' +References: <3720B3B9.98BED320@earth.ox.ac.uk> +Message-ID: <7fqo0i$k85$1@nnrp1.dejanews.com> +X-UID: 1353 + +In article <3720B3B9.98BED320 at earth.ox.ac.uk>, + Nick Belshaw wrote: +> If someone could spare a mo to clarify - +> +> If I do something like :- +> +> ------------------ +> def func1(): +> return 1,2,3,4,5,6,7,8 +> +> for x in func1(): +> print x +> ------------------ + +This may not be appropriate to the problem that you are really trying to +solve, but are you aware of this (range(n) will make your list for you): + +>>> range(8) +[0, 1, 2, 3, 4, 5, 6, 7] +>>> for x in range(8): +... print x+1 +... +1 +2 +3 +4 +5 +6 +7 +8 +>>> + +---- +David Moore + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/1354 b/demo/ermis-f/python_m/cur/1354 new file mode 100644 index 00000000..9fceb0bb --- /dev/null +++ b/demo/ermis-f/python_m/cur/1354 @@ -0,0 +1,50 @@ +From: faassen at pop.vet.uu.nl (Martijn Faassen) +Date: Mon, 26 Apr 1999 13:44:04 +0200 +Subject: Emulating C++ coding style +References: <371F8FB7.92CE674F@pk.highway.ne.jp> <371F9D0C.4F1205BB@pop.vet.uu.nl> <7foe7r$15mi$1@nntp6.u.washington.edu> +Message-ID: <37245184.3AADF34D@pop.vet.uu.nl> +Content-Length: 1043 +X-UID: 1354 + +Donn Cave wrote: +> +> Martijn Faassen writes: +> | A static value can be created like this (besides using a global variable +> | in a module): +> | +> | class Foo: +> | self.shared = 1 +> | +> | def __init__(self): +> | print self.shared +> +> Just a nit-pick on this particular item - I tried that already, a +> couple of days ago, so I know it won't work! You meant to say, +> +> class Foo: +> shared = 1 + +Whoops, yes, that makes sense. :) Sorry. + +> Now a couple of further observations. Per the question, yes, that +> variable ("attribute") is accessible in the class scope: +> +> print Foo.shared +> +> As well as in the instance scope, as shown in Martijn's example. + +[snip surprise] +> It's not much like C++ here, but it's uncanny how it reeks of Python! +> Namespaces, references! + +Indeed. Not having used that class attribute trick often myself, I +wasn't aware of this surprising behavior. I suppose in order to get the +C++ behavior it's best to use a module global variable. + +Regards, + +Martijn + + + + diff --git a/demo/ermis-f/python_m/cur/1355 b/demo/ermis-f/python_m/cur/1355 new file mode 100644 index 00000000..3fe1e1d5 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1355 @@ -0,0 +1,22 @@ +From: claird at Starbase.NeoSoft.COM (Cameron Laird) +Date: 24 Apr 1999 05:32:45 -0500 +Subject: The Future of Tk? +References: <371E964F.C531C2A@istar.ca> <7fmv24$agu$1@m1.cs.man.ac.uk> <3721631D.8642F0AA@istar.ca> +Message-ID: <7fs6kd$6ic$1@Starbase.NeoSoft.COM> +X-UID: 1355 + +In article <3721631D.8642F0AA at istar.ca>, +Eugene Dragoev wrote: +>Where could I find more info about TkGS? + . + . + . + +-- + +Cameron Laird http://starbase.neosoft.com/~claird/home.html +claird at NeoSoft.com +1 281 996 8546 FAX + + + + diff --git a/demo/ermis-f/python_m/cur/1356 b/demo/ermis-f/python_m/cur/1356 new file mode 100644 index 00000000..23cc69be --- /dev/null +++ b/demo/ermis-f/python_m/cur/1356 @@ -0,0 +1,47 @@ +From: aahz at netcom.com (Aahz Maruch) +Date: Sun, 25 Apr 1999 15:51:29 GMT +Subject: converting perl to python - simple questions. +References: <7fvagp$8lm$1@nnrp1.dejanews.com> +Message-ID: +X-UID: 1356 + +In article <7fvagp$8lm$1 at nnrp1.dejanews.com>, + wrote: +> +>a) Perl's "defined". +> [perl] +> if (defined($x{$token}) +> +> [python] +> if (x.has_key(token) and x[token]!=None) : + +That looks correct. Thankfully Python does have short-circuit +evaluation. Note that if you normally expect x[token] to have a value, +you might restructure the code a bit to use try/except. + +>b) RE's. +> [perl] +> if ($mytext !~ /^\s$/) +> +> [python] +> if not (re.match('^\s$'), mytext) + +I think you want + + if not (re.match('^\s$', mytext)) : +or + if not (re.match('^\s*$', mytext)) : + +(I think that Perl code has a bug in it by not including '*', but I +could be wrong.) +-- + --- Aahz (@netcom.com) + +Hugs and backrubs -- I break Rule 6 <*> http://www.rahul.net/aahz/ +Androgynous poly kinky vanilla queer het + +Hi! I'm a beta for SigVirus 2000! Copy me into your .sigfile! + + + + diff --git a/demo/ermis-f/python_m/cur/1357 b/demo/ermis-f/python_m/cur/1357 new file mode 100644 index 00000000..0957693f --- /dev/null +++ b/demo/ermis-f/python_m/cur/1357 @@ -0,0 +1,71 @@ +From: olipt at mayo.edu (Travis Oliphant) +Date: Mon, 5 Apr 1999 22:18:36 -0500 +Subject: building python from the tarball on RedHat +In-Reply-To: <3709464A.7C5F02D1@ablecommerce.com> +References: <3709464A.7C5F02D1@ablecommerce.com> +Message-ID: +Content-Length: 2443 +X-UID: 1357 + +> Howdy All! +> +> Hopefully that subject will narrow down those looking at this message +> and save everyone some time. +> +> First, a confession. I've got a wierd (i think) linux setup. I'm +> running the RedHat 5.2 distribution, but I'm using several applications +> from source; I'm bypassing the RPM mechanism. This may be the cause of +> my troubles, but.... I want to be able to build from tar balls, so... + +This shouldn't be a problem --- rpm's are just easier. One thing you +might try is downloading a source RPM and building the binary yourself -- +it will do the equivalent of a make, but then you'll have a binary package +that you can manage and will fit in your system. I've done this several +times and could answer questions about this approach. + +> +> I need to have my system setup to run apache (1.3.6), php3 (3.05) and +> MySQL (3.22.20a). Using the default RPM's for each of these didn't get +> me a working system in which php would talk to mysql. To make that much +> work, I downloaded the tar balls for each app, ungzip'd and did the +> usual ./configure; make; make install; process. +> + +Are the "default" RPMS the ones that come from RedHat? I get very +up-to-date RPMS (or I rebuild new ones using the src.rpm which is also +easy) from http://www.andrich.net/python). He has a slew of other +extensions, too. + +> +> './python: error in loading shared libraries +> libmysqlclient.so.6: cannot open shared object file: No such file or +> directory +> make: *** [libinstall] Error 127' + +Is the makefile running python? It looks like the dynamic linker is not +finding libmysqlclient.so.6, right? It will only find it if it's internal +cache has been updated with ldconfig. This is necessary if shared +libraries are installed outside of "standard directories" + +> +> The file 'libmysqlclient.so.6' is in /usr/local/lib/mysql and that +> directory is named in the Modules/Setup file. Not sure about pasting +> that section in here, but let me know if that info would help as well. +> I just pulled the block from the readme. + +If as you say the libmysqlclient.so.6 file is in /usr/local/lib/mysql +then I would try running +/sbin/ldconfig /usr/local/lib/mysql + +and then see if the dynamic linker can load the shared library when python +is run. When you install RPMS that included shared libraries this program +is often run for you after installation. + +Good luck. I'm a python user on RedHat 5.2 myself. I love it. + +--Travis + + + + + diff --git a/demo/ermis-f/python_m/cur/1358 b/demo/ermis-f/python_m/cur/1358 new file mode 100644 index 00000000..17410908 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1358 @@ -0,0 +1,47 @@ +From: jwtozer at my-dejanews.com (jwtozer at my-dejanews.com) +Date: Fri, 16 Apr 1999 12:12:55 GMT +Subject: Novice Question: two lists -> dictionary +References: <7f3j1v$f6j$1@nnrp1.dejanews.com> +Message-ID: <7f79g1$kac$1@nnrp1.dejanews.com> +X-UID: 1358 + +Thanks to Blake Winton, Quinn Dunkan, frederic pinel, and Alex for your +timely and useful help. What my associates Visual Basic/Access application +produced in hours, my little Python script produces in seconds. + +Jeff + + + + +In article , + Alex wrote: +> +> You could do something like +> +> ************************************************** +> ListA = ['10', '10', '20', '20', '20', '24'] +> ListB = ['23', '44', '11', '19', '57', '3'] +> +> Dict = {} +> for (key, value) in map (None, ListA, ListB): +> Dict [key] = Dict.get (key, []) +> Dict [key].append (value) +> +> print Dict +> ************************************************** +> +> The result is +> +> {'24': ['3'], '10': ['23', '44'], '20': ['11', '19', '57']} +> +> See you. +> Alex. +> + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/1359 b/demo/ermis-f/python_m/cur/1359 new file mode 100644 index 00000000..e1c38261 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1359 @@ -0,0 +1,43 @@ +From: dalke at bioreason.com (Andrew Dalke) +Date: Thu, 22 Apr 1999 13:07:50 -0600 +Subject: Reversing Long integers +References: <371E0C46.E6FA76A9@princeton.edu> +Message-ID: <371F7386.92B1BB3C@bioreason.com> +X-UID: 1359 + +Ira H. Fuchs wrote: +> Can anyone think of a particularly clever way to [add a [long] +> integer to its reverse] + +Nothing cleverer than + +import string +def add_reverse(n): + x = map(None, str(long(n))[:-1]) + x.reverse() + return n + long(string.join(x,'')) + + +>>> add_reverse(11111111111111L) +22222222222222L +>>> add_reverse(11111111111119L) +102222222222230L +>>> add_reverse(876437643654354239321L) +1000370097110700973999L + + +The long(n) is to enforce that the L exists as otherwise this won't +work for regular integers. + + +> the loop must include moving the L to the end of the reversed string +> prior to summing. + +No need, long("123456789123487") == 123456789123487L . + + Andrew + dalke at acm.org + + + + diff --git a/demo/ermis-f/python_m/cur/1360 b/demo/ermis-f/python_m/cur/1360 new file mode 100644 index 00000000..b8444022 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1360 @@ -0,0 +1,23 @@ +From: ppc at redix.com (Pen Chiang) +Date: Mon, 26 Apr 1999 09:40:58 -0400 +Subject: freeze problem, please help +Message-ID: <7g1qac$f9e@nnrp2.farm.idt.net> +X-UID: 1360 + +I was trying to use the python freeze module, and got the error message: + + Error: needed directory not found. + +Even I tried to use the sample "hello.py" in the freeze directory, I still +got the same error message. Can someone help? + +Thanks, +P. Chiang + + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1361 b/demo/ermis-f/python_m/cur/1361 new file mode 100644 index 00000000..5484127d --- /dev/null +++ b/demo/ermis-f/python_m/cur/1361 @@ -0,0 +1,85 @@ +From: spamfranke at bigfoot.de (Stefan Franke) +Date: Sat, 17 Apr 1999 17:27:52 GMT +Subject: sys.path.insert - how to make it global? +References: <19990416172011.A1551755@vislab.epa.gov> <3718a8aa.4229211@news.omnilink.de> <19990417113121.A1627033@vislab.epa.gov> +Message-ID: <3718c0a3.10366776@news.omnilink.de> +Content-Length: 1705 +X-UID: 1361 + +In that case the problem seems to be somewhere else. Can +you post the traceback, your directory layout and perhaps +some isolated code? + +Your code snippet says : + # Augment search path to pull in our C library wrappers + +Maybe importing C extensions makes your program fail? + + +The following example should resemble your situation (let +me know if it doesn't): + +-------- file a.py in some_directory + +# First, you can't import c +try: + import c +except ImportError: + print "import c failed" + +# Patch sys.path +import sys +sys.path.append ("new_directory") + +# b imports c with the new path +import b + +-------- file b.py in some_directory + +import sys +print sys.path + +import c + +-------- file c.py in some_directory/new_directory + +print "This is c" + +--------------------------- + +When I run this from the Python console it prints: + +Python 1.5.2 (#0, Apr 13 1999, 10:51:12) [MSC 32 bit (Intel)] on win32 +Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam +>>> import a +import c failed +['', 'D:\\Programme\\Python', 'D:\\Programme\\Pythonwin', 'D:\\Programme\\Python + [... long path snipped...] +me\\Python\\lib\\plat-win', 'D:\\Programme\\Python\\lib\\lib-tk', 'D:\\Programme +\\Python', 'D:\\Programme\\Python\\lib\\site-python', 'new_directory'] +This is c + + +Stefan + + * * * + +On Sat, 17 Apr 1999 15:31:21 GMT, Randall Hopper wrote: + +>I'd already tried that. It's effect doesn't appear to be global: +> +> # Augment search path to pull in our C library wrappers +> sys.path.insert( 0, '/home/mylogin/Wrappers' ) +> +> import MapFile +> +>This allows Python to find MapFile, but this doesn't allow MapFile to +>import other modules in that same Wrappers directory. +> +>Randall +> + + + + + diff --git a/demo/ermis-f/python_m/cur/1362 b/demo/ermis-f/python_m/cur/1362 new file mode 100644 index 00000000..122a5037 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1362 @@ -0,0 +1,29 @@ +From: cmedcoff at my-dejanews.com (cmedcoff at my-dejanews.com) +Date: Wed, 21 Apr 1999 14:23:25 GMT +Subject: PythonWin Debugger comments +Message-ID: <7fkn0n$37v$1@nnrp1.dejanews.com> +X-UID: 1362 + +I am quite new to Python. I've just started tinkering with the PythonWin +environment and would like to make the following comments. I'd like to hear +some feedback on them. (I'm using build 123.) + +1)Syntax highlighting in the debugger needs to go one step further. While +one can change the color of the "current line" it would be nicer if one could +change background color of the "current line" also. It would make it much +more obvious what the current execution point is. Lots of other debuggers do +this. + +2)I've had problem with both the PythonWin debugger and the IDLE debugger. +Both seem to have problems stepping out of a function call. Usually this +results in hanging the debugger (Windows NT 4.0 Service Pack 4). + +Regards, +Chuck + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/1363 b/demo/ermis-f/python_m/cur/1363 new file mode 100644 index 00000000..fa7c5cd1 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1363 @@ -0,0 +1,16 @@ +From: hew at hons.cs.usyd.edu.au (Matthew Robert Gallagher) +Date: Tue, 20 Apr 1999 15:13:28 +1000 +Subject: Can't work this XDR out +Message-ID: <371C0CF7.2D1260D7@hons.cs.usyd.edu.au> +X-UID: 1363 + +Whilst trying to pack a list xdr packer asks for + +(list, pack_item) + +what is the pack_item can't work this out as there are no examples + + + + + diff --git a/demo/ermis-f/python_m/cur/1364 b/demo/ermis-f/python_m/cur/1364 new file mode 100644 index 00000000..e7c0b292 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1364 @@ -0,0 +1,33 @@ +From: petrilli at trump.amber.org (Christopher Petrilli) +Date: 16 Apr 1999 11:46:42 PDT +Subject: restore sources from PYC [Q] +References: <000101be879c$8aed0670$6eba0ac8@kuarajy.infosys.com.ar> <37177D8E.FF43BF65@bigfoot.com> +Message-ID: <7f80ii$7m0@journal.concentric.net> +X-UID: 1364 + +Hoon Yoon wrote: + +> What happens if you do NOT want your pyc codes to be reverse engineered? +> Can you prevent someone from doing this type of rev eng? + +You can obscure it, but never more than that... you can reverse out C +code too... at some point it must be executable, that's the point. Maybe +you won't get the exact code back, but you will get something close. + +> Some members in my IT committee always have a problem with this ability +> and often used as excuse to kill any new tech adoption. + +Then you better throw out all your compilres :-) Oh, and Java too :-) + +Seriously, this is a non-event that people use to spread FUD, but it +exists in all languages. The simplicity with which it can be done +changes, but it's never more than a freshman college project. + +Chris +-- +| Christopher Petrilli ``Television is bubble-gum for +| petrilli at amber.org the mind.''-Frank Lloyd Wright + + + + diff --git a/demo/ermis-f/python_m/cur/1365 b/demo/ermis-f/python_m/cur/1365 new file mode 100644 index 00000000..44312262 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1365 @@ -0,0 +1,39 @@ +From: gherron at aw.sgi.com (Gary Herron) +Date: Tue, 20 Apr 1999 18:43:44 GMT +Subject: opening more than 1 file +References: <371CB255.5FCAFBAF@solair1.inter.NL.net> +Message-ID: <371CCAE0.7DE87F8A@aw.sgi.com> +X-UID: 1365 + +martin van nijnatten wrote: +> +> I have a variable, which can have a value in the range from 1 to 20. +> +> If the value is 7, I have to open 7 files. +> +> What could be an elegant way of doing this? +> +> Martin + + +If your definition of `elegant' includes `short', here is a one-liner to +do this. It maps a list [0,1,2,...] to a list of open files: + +[, + , + , + ...] + +files = map(lambda i: open("file%02d"%i, 'w'), range(N)) + +Then, files[i] gives the i'th file. + +-- +Dr. Gary Herron +206-287-5616 +Alias | Wavefront +1218 3rd Ave, Suite 800, Seattle WA 98101 + + + + diff --git a/demo/ermis-f/python_m/cur/1366 b/demo/ermis-f/python_m/cur/1366 new file mode 100644 index 00000000..139765bb --- /dev/null +++ b/demo/ermis-f/python_m/cur/1366 @@ -0,0 +1,32 @@ +From: dalke at bioreason.com (Andrew Dalke) +Date: Thu, 22 Apr 1999 19:15:19 -0600 +Subject: try vs. has_key() +References: +Message-ID: <371FC9A7.D3C77413@bioreason.com> +X-UID: 1366 + +Aahz Maruch asked: +> Can people explain their preferences [for try/except over has_key]? + +As I recall, has_key is a relatively new addition to Python +so older code (and people who learned from older code) will +use try/except. + +I usually use has_key because coming from a shop where most +people have C experience, it's easier to explain that than using +what it in essense the side effect of exceptions. + +Also, I believe Barry Warsaw did a benchmark on the tradeoffs of +when you do one over the other. The exception case of a try/except +has some pretty high overhead, while the has_key call is slightly +worse than the non-exception case of the try/except. Barry's +results showed that if 5% of the cases or less were "exceptional" +then try/except is faster, otherwise, use has_key. Alas, I cannot +find the URL for that paper. + + Andrew + dalke at acm.org + + + + diff --git a/demo/ermis-f/python_m/cur/1367 b/demo/ermis-f/python_m/cur/1367 new file mode 100644 index 00000000..4a72f97d --- /dev/null +++ b/demo/ermis-f/python_m/cur/1367 @@ -0,0 +1,34 @@ +From: dnagata at creo.com (Dale Nagata) +Date: Sun, 11 Apr 1999 15:53:07 -0700 +Subject: Does the standard ftplib module support proxies? +References: <37110c85.7753709@news.demon.co.uk> +Message-ID: <371127D3.5BD2@creo.com> +X-UID: 1367 + +Paul Moore wrote: +> +> The header says it all... I've looked in the manual, but I can't see +> anything about proxy (firewall) support, one way or another. +> +> Actually, the same question applies to httplib and urllib. +> +> Thanks, +> Paul Moore. + +It depends on what kind of proxy. +I've found it works fine if the proxy is the nice simple kind +that lets you connect to the proxy host on FTP port 21 and specify +the remote ftp location using the form user at site. +I haven't tried to make it work with any other kind (and there +are quite a few). + + +-- +Dale Nagata | tel : +1 604.451.2700 ext. 2254 (UTC-0800) +Software Developer | fax : +1 604.437.9891 +Creo Products Inc. | pgr : +1 604.691.8279 +Burnaby BC Canada | http://www.creo.com/ + + + + diff --git a/demo/ermis-f/python_m/cur/1368 b/demo/ermis-f/python_m/cur/1368 new file mode 100644 index 00000000..fb21ba8d --- /dev/null +++ b/demo/ermis-f/python_m/cur/1368 @@ -0,0 +1,25 @@ +From: dptaylor3 at my-dejanews.com (dptaylor3 at my-dejanews.com) +Date: Tue, 20 Apr 1999 18:06:28 GMT +Subject: smtplib.SMTP.sendmail always fails on Win95 machine. +Message-ID: <7fifn1$58d$1@nnrp1.dejanews.com> +X-UID: 1368 + +This is the first time I've used winsock. +I had to add/edit the following lines to smtplib.SMTP.sendmail to get it to +work on my win95 box. + + destaddr=self.sock.getpeername()[0] #remote mail server name + if not self.helo_resp and not self.ehlo_resp: + if self.ehlo(destaddr) >= 400: + self.helo(destaddr) + +I have no idea what this change does to winNT. +Perhaps some winsock guru can look this over and put some cleaned up and +bulletproofed version of this change into the next win95 release of python? + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/1369 b/demo/ermis-f/python_m/cur/1369 new file mode 100644 index 00000000..196a3e3b --- /dev/null +++ b/demo/ermis-f/python_m/cur/1369 @@ -0,0 +1,28 @@ +From: larsga at ifi.uio.no (Lars Marius Garshol) +Date: 17 Apr 1999 17:13:18 +0200 +Subject: Why no "=" in if? (was Re: Quick fix to add "+=") +References: <3717EE20.41343593@mediaone.net> <000701be888f$12fe2920$ee9e2299@tim> +Message-ID: +X-UID: 1369 + +* Aahz Maruch +| +| x = foo() +| if x: +| ... +| +| instead of +| +| if x = foo(): +| ... +| +| Why doesn't Guido get off his duff and fix this?????????! + +What's so wrong about it? Personally I seriously dislike assignments +that return values (at least in conventional languages). + +--Lars M. + + + + diff --git a/demo/ermis-f/python_m/cur/1370 b/demo/ermis-f/python_m/cur/1370 new file mode 100644 index 00000000..068b686d --- /dev/null +++ b/demo/ermis-f/python_m/cur/1370 @@ -0,0 +1,22 @@ +From: cs at spock.rhein-neckar.de (Carsten Schabacker) +Date: 15 Apr 1999 09:41:30 +0200 +Subject: forking + stdout = confusion +References: <87n20caldg.fsf@spock.localnet.de> +Message-ID: <877lrejpp1.fsf@spock.localnet.de> +X-UID: 1370 + +clarence at silcom.com (Clarence Gardner) writes: + +> Roy Smith (roy at popmail.med.nyu.edu) wrote: + +> parent and child processes. Also, in case you're not aware of it, the +> distinguishing feature of a nph-type CGI program is that its output does +> not go through the web server. +Could you please explain me what a nph-type CGI is ? I know only +regular CGI-Scripts where stdout goes through the webserver. + +Thanx Carsten. + + + + diff --git a/demo/ermis-f/python_m/cur/1371 b/demo/ermis-f/python_m/cur/1371 new file mode 100644 index 00000000..3f04712a --- /dev/null +++ b/demo/ermis-f/python_m/cur/1371 @@ -0,0 +1,62 @@ +From: scrompton at quantisci.co.uk (Stephen Crompton) +Date: Fri, 16 Apr 1999 12:28:30 +0100 +Subject: HTML Authentication with Python +References: <7f5iru$rlm@news.acns.nwu.edu> <14102.27498.772779.5941@bitdiddle.cnri.reston.va.us> <7f6577$8kp@news.acns.nwu.edu> +Message-ID: <37171EDE.9DFD027A@quantisci.co.uk> +Content-Length: 1757 +X-UID: 1371 + +Matthew T Lineen wrote: + +> Jeremy Hylton (jeremy at cnri.reston.va.us) wrote: +> > If you configure the server properly, users won't be able to run your +> > CGI scripts until the server has checked their username and password. +> +> Actually, I want the script to run because it pulls the "REMOTE_USER" key +> and populates a field in a form. If I knew that authentication through the +> server would allow me to pull this key, I wouldn't be authenticating through +> the script. Maybe the question / issue is that I don't understand the use +> of the REMOTE_USER key. + + +I think that is the issue here. The previous poster is correct, but it needs a +little explaining. If you set up a web-server with no authentication then +environ['REMOTE_USER'] is not set. The 'REMOTE_USER' environment variable is +set after client-server authentication has been performed. Basically it works +as follows + +The user ask for a URL + +..../name.cgi + +The server sees that authentication is required and sends back a 401 error. + +The client receives this a pops up an authentication window. + +The user enters their details and the request is passed back to the server with +the Authorization information in plain text (well base64) in the header. + +If this information is accurate (userid and password match) then the server +sets the environ['REMOTE_USER'] to the userid. + +This is all that is passed to the cgi script, so all you have to do is set up +the web server correctly and then use the value of REMOTE_USER in your script. + +Any further requests to a URL which is part of the same path (ie. +.../name.cgi/0/30/1?dothis) results in the client sending back the +Authorization header each time stopping the authentication window repeatedly +popping up. + +Hope this helps. + +Steve. + + + + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1372 b/demo/ermis-f/python_m/cur/1372 new file mode 100644 index 00000000..cb75a35f --- /dev/null +++ b/demo/ermis-f/python_m/cur/1372 @@ -0,0 +1,45 @@ +From: fuzz at sys.uea.ac.uk (Farzad Pezeshkpour) +Date: Thu, 22 Apr 1999 10:54:08 +0100 +Subject: The Future of Tk? +References: <371E964F.C531C2A@istar.ca> +Message-ID: <7fmruj$gtm@cpca3.uea.ac.uk> +Content-Length: 1119 +X-UID: 1372 + +> I don't want to say that this is bad for Tcl users but what about all +> the other languages that use Tk? Isn't writting multiplatform GUI +harder +> using native components. + +I don't think that implementing all widgets using custom code on all +platforms is 'lightweight' at +all. The issues about lightweight components for me are performance and +cross-platform +compatibility. By using native components, Tk has moved closer to this +goal. Yes, the differences in +look (and to some extent, feel) of components, when usig native widgets, +can be every-so-slightly +compromised - however, in the case of Tk, I don't find this a major +worry, irrespective of the +manner by which I access Tk (Tcl, Perl, C etc). + +> I think Java made big step forward in +> abandoning the native components and using lightweight > ones in +Swing. + +I've got a lot good words to say about Swing, but I don't think that +it's too smart to emulate the + look'n'feel on the same os/toolkit. The results are +typically a poor imitation +and always slow. It reminds me of the days when I used ParcPlace's +Smalltalk - very bad! + +Fuzz + + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1373 b/demo/ermis-f/python_m/cur/1373 new file mode 100644 index 00000000..d623809b --- /dev/null +++ b/demo/ermis-f/python_m/cur/1373 @@ -0,0 +1,66 @@ +From: scott at chronis.pobox.com (scott cotton) +Date: 29 Apr 1999 06:28:45 GMT +Subject: Emacs' python-mode buggy? +References: <199904282340.TAA19934@python.org> <3727E329.2E8F3C31@digicool.com> +Message-ID: +Content-Length: 2003 +X-UID: 1373 + +I've often noticed that emacs font locking is weird with +TQS's. the strangest thing is that with one TQS, the next +line of code can end up in string color, but if you move +that line of code around by temporarily adding leading +whitespace or moving further down the file, it will change +to regular code fonts without me ever changing the TQS above +it. + +while i haven't looked closely at the pymode code, i do +think that emac's fontifying stuff works on a certain +limited amount of context only (in terms of surrounding +characters to the cursor). with such a contstraint, it +seems amazing to me that pymode does as well it does +fontifying stuff. + +at any rate, i'll opt for a little sporadic twiddling of +source code over using vi(m) or something anyday. + +scott + +On 29 Apr 1999 07:48:21 +0300, Markus Stenberg wrote: +>Ken Manheimer writes: +>> Markus Stenberg wrote: +>> I can't speak to the intimacy issue, but the python-mode syntax recognition +>> may be due to having a leading '(' open paren in the first column in one of +>> your docstrings. If so, emacs' syntax confusion (not to be mistaken for +>> poor gender identification) can be remedied by escaping the leading open +>> paren with a '\' backslash, like so: +> +>Ah, what's causing that problem? +> +>> \(this is what to do with parens in docstrings.) +>> +>> If it is the problem, well, it's emacs' problem, not pymode. If it's not, +>> well, do track it down. +>> +>> Oh, does that bug constitute the "tons" you mention, or were there others? +>> I never was good at estimating the weight of bugs - all that chiton, you +>> know. +> +>Think there is two, as one of my (moderately large) modules has no +>docstrings with ('s yet still exhibits that behavior. (ok, I got carried +>away, but I was moderately frustrated over the feature :-P) +> +>> Ken Manheimer +>> klm at digicool.com +> +>-Markus +> +>-- +> Markus Stenberg +>Finger fingon at mpoli.fi for PGP key -- PGP key id: 1024/5DAC7D21 +> +> + + + + diff --git a/demo/ermis-f/python_m/cur/1374 b/demo/ermis-f/python_m/cur/1374 new file mode 100644 index 00000000..a8c2f9df --- /dev/null +++ b/demo/ermis-f/python_m/cur/1374 @@ -0,0 +1,63 @@ +From: tim_one at email.msn.com (Tim Peters) +Date: Wed, 7 Apr 1999 06:05:12 GMT +Subject: Chaning instance methods +In-Reply-To: <199904070524.HAA12210@axil.hvision.nl> +References: <199904070524.HAA12210@axil.hvision.nl> +Message-ID: <000401be80bc$999f1820$699e2299@tim> +Content-Length: 1269 +X-UID: 1374 + +[Jody Winston] +> I don't understand how to change instance methods. + +That's good, because Python doesn't have such a thing . Direct +attributes of instances are never methods without extreme trickery. A +function becomes a method by virtue of being found in an instance's +*class's* dict. Python was designed to allow overriding methods at the +class level, but not at the instance level. + +> For example: +> +> class Foo: +> def __init__(self): +> self.data = 42 +> def m(self): +> print "Foo.m" +> print dir(self) +> +> def m2(self): +> print "m2" +> print dir(self) +> +> f = Foo() +> f.m() +> # this fails +> # f.m = m2 +> # f.m() + +Right, a direct attribute of an instance is never a method. Except that +this "works": + +import new +f.m = new.instancemethod(m2, f, Foo) +f.m() + +This sets f.m to a *bound* instance method that refers to f, which Python +treats as an ordinary function when later referenced via f.m. Without using +the "new" module, you can get the same effect via e.g. + +old_Foo_m = Foo.m +Foo.m = m2 +f.m = f.m # heh heh +Foo.m = old_Foo_m + +In either case, though, the value of f.m now contains a hidden reference to +f, so you've created a piece of immortal cyclic trash. + +subclassing-is-a-lot-easier-ly y'rs - tim + + + + + + diff --git a/demo/ermis-f/python_m/cur/1375 b/demo/ermis-f/python_m/cur/1375 new file mode 100644 index 00000000..bbb0fe23 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1375 @@ -0,0 +1,34 @@ +From: joe at strout.net (Joe Strout) +Date: Thu, 15 Apr 1999 12:51:05 -0700 +Subject: PIL fonts - Where are you? +References: <7jbR2.3071$YU1.5576@newsr2.twcny.rr.com> <002c01be8744$4a7af2d0$f29b12c2@pythonware.com> +Message-ID: +X-UID: 1375 + +In article <002c01be8744$4a7af2d0$f29b12c2 at pythonware.com>, Fredrik +Lundh wrote: + +> pilfont has been tested with all files from the standard distribution, +> but the version shipped with 1.0b1 fails on fonts generated by some +> other tools. most notable, it assumes that the FONT field is a full +> X11 font specifier, e.g: +> +> FONT -Adobe-Times-Medium-R-Normal--11-80-100-100-P-54-ISO8859-1 + +I note that in the fonts used with Snow, the above information is the +filename. But such filenames are too long for MacOS. Please consider +storing this info elsewhere, and using shorter file names. + +Cheers, +-- Joe + +-- +,------------------------------------------------------------------. +| Joseph J. Strout Biocomputing -- The Salk Institute | +| joe at strout.net http://www.strout.net | +`------------------------------------------------------------------' +Check out the Mac Web Directory! http://www.strout.net/macweb.cgi + + + + diff --git a/demo/ermis-f/python_m/cur/1376 b/demo/ermis-f/python_m/cur/1376 new file mode 100644 index 00000000..885cfd18 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1376 @@ -0,0 +1,39 @@ +From: skip at mojam.com (Skip Montanaro) +Date: Sat, 17 Apr 1999 14:24:09 GMT +Subject: Python/XML release 0.5.1 +References: +Message-ID: <7fa5i3$2q8$1@nnrp1.dejanews.com> +X-UID: 1376 + + + +AMK wrote: + +> * Added marshalling into various XML-based formats: a generic +> one for Python objects, WDDX, and XML-RPC. The generic marshaller can +> be subclassed to implement marshalling into a specific DTD; both the +> WDDX and XML-RPC marshallers were implemented in this fashion. + +Does the XML-RPC marshaller drop into Fredrik Lundh's xmlrpclib module in an +obvious way, or is this a complete XML-RPC interface module that would replace +xmlrpclib altogether (or is it neither)? + +(BTW, the "archives" link on the Python/XML page: + + http://www.python.org/pipermail/xml-sig.html + +is a broken link.) + +Thx, + +-- +Skip Montanaro (skip at mojam.com, 518-372-5583) +Mojam: "Uniting the World of Music" http://www.mojam.com/ +Musi-Cal: http://www.musi-cal.com/ + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/1377 b/demo/ermis-f/python_m/cur/1377 new file mode 100644 index 00000000..475d6b35 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1377 @@ -0,0 +1,31 @@ +From: tim_one at email.msn.com (Tim Peters) +Date: Wed, 28 Apr 1999 19:39:35 -0400 +Subject: Emacs' python-mode buggy? +In-Reply-To: +Message-ID: <000401be91d0$5faab280$199e2299@tim> +X-UID: 1377 + +[Markus Stenberg] +> At least by my experiences the Emacs mode (at least, two versions I +> tried, 3.75 and whatever came with Python 1.5.2) seems to have tons of +> bugs; + +Yes, that would be entirely Barry Warsaw's fault -- pymode had no bugs when +I worked on it, and Barry is a known drug addict. Well, all right, I was +the drug addict, and I lied about Barry -- but I'm sure it's still all his +fault . + +> to be more precise, it seems to think a lot more of my code than should +> be is string (and therefore is green and indentation doesn't work). + +Offhand, that sounds like one bug. Try posting a minimal failing example? +Amorphous griping doesn't help. If you searched DejaNews before posting, +you may have noticed that reports of pymode bugs are conspicuous by absence. + +things-are-fishier-than-you-suspect-ly y'rs - tim + + + + + + diff --git a/demo/ermis-f/python_m/cur/1378 b/demo/ermis-f/python_m/cur/1378 new file mode 100644 index 00000000..187c4aa4 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1378 @@ -0,0 +1,86 @@ +From: llwo (Karl & Mel) +Date: Mon, 19 Apr 1999 20:42:44 -0500 +Subject: calldll windll instantiation +Message-ID: <371bdd70.0@news.dbtech.net> +Content-Length: 1737 +X-UID: 1378 + +Need some help. +I think?(scarry moment)? that I need to create more that one instance of a +dll. + +1. Can this be done? +2. Is my sample even close? + + + +"""gm_class quick wrapper of dll functions""" + +import windll +import time + +class test: + + def __init__(self): + self.gm=windll.module('GM4S32') + + def load_bde(self, SysDir='c:\\program files\\goldmine', + GoldDir='c:\\program files\\goldmine\\gmbase', + CommonDir='c:\\program files\\goldmine\\demo', + User='PERACLES', + Password=''): + start=time.time() + (SysDir, GoldDir, CommonDir, + User, Password)=map(windll.cstring,(SysDir, GoldDir, CommonDir, + User, Password)) + return (self.gm.GMW_LoadBDE(SysDir, GoldDir, CommonDir, User, +Password), "Startup Time: " + str(time.time()-start)) + + def unload_bde(self): + return self.gm.GMW_UnloadBDE() + +...other defs... + + +>>> import gm_class +>>> a=gm_class.test() +>>> b=gm_class.test() +>>> a + +>>> b + +>>> a.gm + +>>> b.gm + +>>> a.load_bde() # This works +(1, 'Startup Time: 0.490000009537') +>>> a.gm + +>>> b.gm + +>>> b.load_bde() # This fails but should work ;-( +(0, 'Startup Time: 0.0') +>>> a.gm + +>>> b.gm + +>>> a.gm==b.gm # Don't know if this is correct +1 +>>> a==b +0 +>>> +>>> gm_class.windll.dump_module_info() +-------------------- +WINDLL Function Call Stats: +--- --- +2 GMW_LoadBDE +>>> + + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1379 b/demo/ermis-f/python_m/cur/1379 new file mode 100644 index 00000000..358ee826 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1379 @@ -0,0 +1,26 @@ +From: achrist at easystreet.com (Al Christians) +Date: Fri, 02 Apr 1999 16:50:09 -0800 +Subject: string.join() vs % and + operators +References: <37054490.E79ADCC9@easystreet.com> +Message-ID: <370565C1.7DD4D7D0@easystreet.com> +X-UID: 1379 + +Aahz Maruch wrote: +> +> Yup. Using '+' for strings really bites when you've got long (or +> potentially long) strings. The average size of the string you're +> concatenating is about a hundred characters; suppose you're doing CGI +> work with redirects, and you're looking at closer to three hundred +> characters a pop. +> +> Try adding a 1K pre-string to the front of each of your Ways and see +> what happens to the speed. + +Time went up from 69 secondes to 115. So it takes only a little bit +longer to join the strings than it does to skip over 1k exach time. + +Al + + + + diff --git a/demo/ermis-f/python_m/cur/1380 b/demo/ermis-f/python_m/cur/1380 new file mode 100644 index 00000000..26887dab --- /dev/null +++ b/demo/ermis-f/python_m/cur/1380 @@ -0,0 +1,31 @@ +From: evan at tokenexchange.com (Evan Simpson) +Date: Fri, 23 Apr 1999 17:01:55 -0500 +Subject: Windows install has problems. Guido asked that I use this newsgroup to discus further +References: <924039873.18221.0.nnrp-12.9e982a40@news.demon.co.uk> <924040766.18823.0.nnrp-12.9e982a40@news.demon.co.uk> <371FAE0F.43B33158@siosistemi.it> <924903282.24080.0.nnrp-10.9e982a40@news.demon.co.uk> +Message-ID: +X-UID: 1380 + +Perhaps I'm missing some context here, but doesn't this thread refer to the +Windows Python Install program generated by Wise? If so, Wise *by default* +fetches %PROGRAM_FILES% on systems which support it. + +Barry Scott wrote in message +<924903282.24080.0.nnrp-10.9e982a40 at news.demon.co.uk>... +Mauro Cicognini wrote in message +news:371FAE0F.43B33158 at siosistemi.it... +> Mmm, since I'm not an English-language OS user, I'd rather see that as +> %programfolder%\tcl\bin\tcl80.dll (I don't remember exactly, but I'm sure +there +> is a way to refer in a language-independent way to the folder that the US +> version calls "Program Files" since we use it in our installations. + + Its in the registry - but python cannot access the registry. So this +hack would not + work for none english systems. + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1381 b/demo/ermis-f/python_m/cur/1381 new file mode 100644 index 00000000..ff42b57b --- /dev/null +++ b/demo/ermis-f/python_m/cur/1381 @@ -0,0 +1,46 @@ +From: Brian at digicool.com (Brian Lloyd) +Date: Thu, 22 Apr 1999 20:04:40 GMT +Subject: Reversing Long integers +Message-ID: <613145F79272D211914B0020AFF6401914DAD5@gandalf.digicool.com> +Content-Length: 1043 +X-UID: 1381 + +> I am attempting to write an efficient Python program which +> can add an integer to +> its reverse. This is quite easy to do in Lisp and Mathematica +> but (mostly out of +> curiosity) I wanted to see how one might do this in Python. +> Converting an +> integer to a string and reversing it and converting back is +> quite easy (although +> not all of these ops are primitives) but the fact that Long +> integers have the +> letter L appended means that the loop must include moving the +> L to the end of +> the reversed string prior to summing. Can anyone think of a +> particularly clever +> way to do this? + + +Ok, I'll bite :) I don't know if this is particularly clever, +but it works and should be pretty fast... + + +import string +def addrev(num, join=string.join, atol=string.atol): + """Add a long to its reverse""" + rev=list(str(num)[:-1]) + rev.reverse() + return num + atol(join(rev, '')) + + + +Brian Lloyd brian at digicool.com +Software Engineer 540.371.6909 +Digital Creations http://www.digicool.com + + + + + + diff --git a/demo/ermis-f/python_m/cur/1382 b/demo/ermis-f/python_m/cur/1382 new file mode 100644 index 00000000..abb624d1 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1382 @@ -0,0 +1,38 @@ +From: Gaetan_Corneau at baan.com (Gaetan Corneau) +Date: Tue, 13 Apr 1999 14:59:00 GMT +Subject: Python as an ODBC *source* on windoze ? +Message-ID: <816010E2456BD111A48700805FBBE2EEA63EDE@ex-quebec-u1.baan.com> +X-UID: 1382 + +Boris, + +> Is there a way to have Python on windows +> to act as an ODBC source (server) on windoze ? +[GC] +I'm not absolutely sure, but I don't think so. You could always create a new +ODBC driver to interface the Python interpretor, but that would require much +work. + +> Reason : to use the MS Access report generator +> component. +[GC] +The easy way is just to dump your data to a text file (comma or tab +delimited) and read it with MS Access: there is a Text ODBC driver that +works well. + +Hope this helps, +______________________________________________________ + Gaetan Corneau + Software Developer (System integration Team) + BaaN Supply Chain Solutions + E-mail: Gaetan_Corneau at baan.com + Compuserve: Gaetan_Corneau at compuserve.com + ICQ Number: 7395494 + Tel: (418) 654-1454 ext. 252 +______________________________________________________ +"Profanity is the one language all programmers know best" + + + + + diff --git a/demo/ermis-f/python_m/cur/1383 b/demo/ermis-f/python_m/cur/1383 new file mode 100644 index 00000000..32188020 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1383 @@ -0,0 +1,27 @@ +From: pbrinton at wco.com (pbrinton at wco.com) +Date: Tue, 06 Apr 1999 22:45:16 -0700 +Subject: DO YOU BELIEVE IN REINCARNATION? 1942 +References: <37067552.2@193.75.226.254> +Message-ID: +X-UID: 1383 + +well, I didn't believe in reincarnation in any of my past lives, so why +should I start now? + +In article <37067552.2 at 193.75.226.254>, wwrqcg at starmedia.com wrote: + +>Do you believe in reincarnation? +> +>Do you want to know who you were and where you lived in your past life? +> +>Click here -> http://orbita.starmedia.com/~luizhenrique/reincarnation.html +>gbsljtpzdgfkpbjjrjebunfthqothunlsjwtu +**************************************************************** +Patrick Brinton pbrinton at wco.com + vox: (707) 874 1898 +A Brown Electronic, Inc. +**************************************************************** + + + + diff --git a/demo/ermis-f/python_m/cur/1384 b/demo/ermis-f/python_m/cur/1384 new file mode 100644 index 00000000..cb95d9f6 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1384 @@ -0,0 +1,76 @@ +From: gmcm at hypernet.com (Gordon McMillan) +Date: Tue, 13 Apr 1999 22:10:51 GMT +Subject: threads +In-Reply-To: <80BFA4D02E598C65.76C7CFE2D53BC9F1.ECCA6CF6DE46FB03@library-proxy.airnews.net> +References: <80BFA4D02E598C65.76C7CFE2D53BC9F1.ECCA6CF6DE46FB03@library-proxy.airnews.net> +Message-ID: <1288080841-20523503@hypernet.com> +Content-Length: 1950 +X-UID: 1384 + +Eric Lee Green wonders about Python threads: + +> My question is this: How "atomic" are basic Python variable +> operations? + +This exact question was asked not long ago. My reply, and Guido's +clarifications follow: + +--------------------------------------------------------------------- + +Gordon McMillan replies: + +> In general, Python will switch between threads every N (10, unless +> you've rebuilt with another constant) byte code instructions. Any +> byte-code instruction is therefore atomic. +> +> > For examples: +> > +> > Can I safely create/update a global variable from a thread or do I +> > risk breaking any dictionary implementation stuff (pointers/hash +> > table slots etc)? [Empirical evidence suugests this is OK]. +> +> Dictionaries are dandy. Updating a single global is fine. +> +> > Can I append to a list without various pointers getting messed up? +> > [Prolly not, huh? Otherwise we wouldn't need the queue module .. +> > or is this just a hangover from earlier days?] +> +> Lists are trickier. Individual operations are atomic, but most of +> the time, doing something with a list takes more than one op. You're +> normally dealing with the list and an index, so you're better off +> protecting the list. That is, you can "safely" append, but even that +> may screw up someone else who is iterating. + +Some examples will clarify also. + +These are atomic (L, L1, L2 are lists, D, D1, D2 are dicts, x, y +are objects, i, j are ints): + + L.append(x) + L1.extend(L2) + L1[i:j] = L2 + x = y + x.field = y + D[x] = y + D1.update(D2) + +These aren't: + + i = i+1 + L.append(L[-1]) + L[i] = L[j] + D[x] = D[x] + 1 + +Note: operations that replace other objects may invoke those other +objects' __del__ method when their reference count reaches zero, and +that can affect things. This is especially true for the mass updates +to dictionaries and lists. + +--Guido van Rossum (home page: http://www.python.org/~guido/) + + +- Gordon + + + + diff --git a/demo/ermis-f/python_m/cur/1385 b/demo/ermis-f/python_m/cur/1385 new file mode 100644 index 00000000..eb743f2f --- /dev/null +++ b/demo/ermis-f/python_m/cur/1385 @@ -0,0 +1,25 @@ +From: fcolaco at wolf.fis.uc.pt (Francisco Cola�o) +Date: Mon, 12 Apr 1999 15:22:27 +0100 +Subject: Where is module 'thread'? +Message-ID: <371201A3.10E82C4F@wolf.fis.uc.pt> +X-UID: 1385 + +I need to use lightweight threads on a application, and tried to +use 'threading'. Unfortunately, it asks for a module 'thread' which I +cannot find. + + I use RedHat 5.2 Linux and python 1.5.1 (RPM release 5). I wish to +keep the application able to run on MS Windows (at the least the client +side). + + Where can I find the module or is there another module I could use? + + Francisco + +-- +Francisco Miguel Pedroso Hon?rio Cola?o + fcolaco at wolf.fis.uc.pt + + + + diff --git a/demo/ermis-f/python_m/cur/1386 b/demo/ermis-f/python_m/cur/1386 new file mode 100644 index 00000000..11b6136a --- /dev/null +++ b/demo/ermis-f/python_m/cur/1386 @@ -0,0 +1,60 @@ +From: bill_seitz at my-dejanews.com (bill_seitz at my-dejanews.com) +Date: Wed, 14 Apr 1999 15:47:55 GMT +Subject: stupid Win-CGI getting started question +References: <7f0f0h$pfb$1@nnrp1.dejanews.com> <8DA86302Bduncanrcpcouk@news.rmplc.co.uk> +Message-ID: <7f2db8$dev$1@nnrp1.dejanews.com> +Content-Length: 1939 +X-UID: 1386 + +In article <8DA86302Bduncanrcpcouk at news.rmplc.co.uk>, + Duncan Booth wrote: +> seitz at mail.medscape.com wrote in <7f0f0h$pfb$1 at nnrp1.dejanews.com>: +> +> >...But not clear on +> >getting it configured properly to talk CGI with my WinNT Netscape Enterprise +> >server. +> > +> >How should that first #! be changed for Windows users? Could that be it? +> > +> >Could the fact that all my Python stuff is under +> >d:\program files\python\ +> >be part of the problem (the long folder name with a space in it)? +> +> I tried all sorts of configuration changes to get it to run .py files +directly, +> and eventually gave it up as a bad job (mostly because I didn't want to risk +> breaking the server). +> +> The way I get CGI scripts to run with Netscape Enterprise server on NT is to +> put them in .cmd files instead of .py files. For example: +> +> ---------test.cmd---------------- +> @c:\Progra~1\Python\python -x "%~f0" %* & goto :EOF +> import os +> +> print "Content-type: text/html" +> print +> print "Test" +> print "Hello world from python.

" +> +> for k in os.environ.keys(): +> print k, os.environ[k], "
" +> print "" +> ---------end of test.cmd--------- +> You would need to change the path to reflect the location of your copy of +> Python, either use the 8.3 filename as above, or put the filename in quotes: +> @"c:\Program Files\Python\python" -x "%~f0" %* & goto :EOF +> works. + +I tried your test.cmd (after changing the first line, using your quoted path +and making it my path of course). Now I get a response back of internal or +external command, operable program or batch file. The server acts shows this +as a successful delivery (no error in the logs, status=200). Does that mean +the problem is now within Python? + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/1387 b/demo/ermis-f/python_m/cur/1387 new file mode 100644 index 00000000..c998f73a --- /dev/null +++ b/demo/ermis-f/python_m/cur/1387 @@ -0,0 +1,34 @@ +From: mstenber at cc.Helsinki.FI (Markus Stenberg) +Date: 28 Apr 1999 14:16:24 +0300 +Subject: try vs. has_key() +References: <7g51q6$1pt$1@vvs.superst.iae.nl> +Message-ID: +X-UID: 1387 + +aahz at netcom.com (Aahz Maruch) writes: +> It appears that the second parameter for get() (to specify a value +> different from None when the key is not found) is new to 1.5.2. In +> 1.5.1 you still have to do the following: + +Not quite. + +mstenber at melkki ~>python +Python 1.5.1 (#1, Nov 10 1998, 13:21:44) [GCC 2.7.2.3] on linux2 +Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam +>>> {}.get("foo","bar") +'bar' +>>> + +-Python 1.5-ly yours, Markus + +-- +"Schizophrenia, like the Unicorn, is described in various ways by +various people. And its elimination, like the capture of the Unicorn, +appears to require some special conditions, not all of which have yet +been specified. Finally, whether or not those conditions exist, belief +in their existence has had significant consequences." + - Schizophrenia, Behavioural Aspects (Salzinger, 1972) + + + + diff --git a/demo/ermis-f/python_m/cur/1388 b/demo/ermis-f/python_m/cur/1388 new file mode 100644 index 00000000..89b00586 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1388 @@ -0,0 +1,28 @@ +From: jeremy at cnri.reston.va.us (Jeremy Hylton) +Date: Thu, 29 Apr 1999 18:57:19 -0400 (EDT) +Subject: Errors +In-Reply-To: <3728CD26.907ED9A1@geocities.com> +References: <3728CD26.907ED9A1@geocities.com> +Message-ID: <14120.58236.608143.792577@bitdiddle.cnri.reston.va.us> +X-UID: 1388 + +You need to initialize tally first. You're getting a NameError +because the first reference to tally is on the right hand side of the +first assignment. Python is looking up tally and not finding it, +because you haven't assigned to it yet. + +>>> tally = tally + 1 +Traceback (innermost last): + File "", line 1, in ? +NameError: tally + +vs. + +>>> tally = 0 +>>> tally = tally + 1 + +Jeremy + + + + diff --git a/demo/ermis-f/python_m/cur/1389 b/demo/ermis-f/python_m/cur/1389 new file mode 100644 index 00000000..c5e98b23 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1389 @@ -0,0 +1,71 @@ +From: gmcm at hypernet.com (Gordon McMillan) +Date: Mon, 19 Apr 1999 02:30:25 GMT +Subject: NT: win32api and win32ui import error +In-Reply-To: <7fdgj4$nnl$1@nnrp1.dejanews.com> +References: <7fdgj4$nnl$1@nnrp1.dejanews.com> +Message-ID: <1287633267-17041836@hypernet.com> +Content-Length: 1826 +X-UID: 1389 + +Hung Jung writes: + +> No luck. I downloaded some more recent versions of ole32.dll +> and oleaut32.dll from http://solo.abac.com/dllarchive/, (their +> msvcrt.dll is older, from VC5 instead of VC6). I also tried +> those DLLs from my Windows 98 System folder. I tried many +> combinations. Here is the list of the versions: +> +> msvcrt.dll: +> 5.00.7303 (solo.abac.com) +> 5.00.7128 (my Windows 98) +> 6.00.8267.0 (my Windows NT) +> +> ole32.dll: +> 4.71.1120 (solo.abac.com) +> 4.71.1719 (my Windows 98) +> 4.00 (my Windows NT) +> +> oleaut32.dll: +> 2.20.4122 (solo.abac.com) +> 2.20.4122 (my Windows 98) +> 2.20.4118 (my Windows NT) + +... +> NT has had persistent problem with the Pythonwin +> extensions. This is not the first time. I have +> never been able to run Pythonwin or use its +> extensions modules (e.g: win32api, win32ui) on NT, +> and we have quite a few NT machines here. +> +> The current real status is: PYTHONWIN DOES NOT +> RUN ON NT. At least not on modern NT versions +> (our msvcrt.dll is dated 9/23/98, this should be +> considered fairly recent.) + +While I'm still on 1.5b2 and build 123 of Mark's stuff, I've had no +problem on NT SP3 and 4. My versions: + +msvcrt.dll v 5.00.7303 +ole32.dll v 4.00 +oleaut32.dll v 2.30.4265 + +I have (some time ago) had problems with the "not registered" +messages on install, but they went away when I de-installed the +extensions, de-installed Python then reinstalled Python and the +extensions. + +(However, to get IE 4 to install, I had to de-install almost +everything network related...) + +Just to make sure you haven't overlooked anything basic, you do +realize that you have to have administrative priveleges to install +the extensions? + +In a direct reply, I'll attach a copy of the HKLM\Software\Python +portion of my registry. + +- Gordon + + + + diff --git a/demo/ermis-f/python_m/cur/1390 b/demo/ermis-f/python_m/cur/1390 new file mode 100644 index 00000000..dbf6e2bc --- /dev/null +++ b/demo/ermis-f/python_m/cur/1390 @@ -0,0 +1,34 @@ +From: phd at sun.med.ru (Oleg Broytmann) +Date: Tue, 27 Apr 1999 13:55:08 +0400 (MSD) +Subject: examples of parsing html? +In-Reply-To: <764sm3pbfb.fsf@zero.npl.uiuc.edu> +Message-ID: +X-UID: 1390 + +On 26 Apr 1999, M.A.Miller wrote: +> Can anyone point me to examples of how to parse html files? I +> want to extract urls from an index so I can use those urls to get +> data files. + + Look into my "Bookmarks database" programs at +http://members.xoom.com/phd2/Software/Python/ +http://www.fortunecity.com/skyscraper/unix/797/Software/Python + + These programs split navigator's bookmarks.html into a databse and +restore them back into html. + +> Mike +> +> -- +> Michael A. Miller miller5 at uiuc.edu +> Department of Physics, University of Illinois, Urbana-Champaign + +Oleg. +---- + Oleg Broytmann National Research Surgery Centre http://sun.med.ru/~phd/ + Programmers don't die, they just GOSUB without RETURN. + + + + + diff --git a/demo/ermis-f/python_m/cur/1391 b/demo/ermis-f/python_m/cur/1391 new file mode 100644 index 00000000..9d395e32 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1391 @@ -0,0 +1,26 @@ +From: smee at iquest.net (Scott Meyers) +Date: Fri, 16 Apr 1999 11:21:05 -0500 +Subject: Looking potential Python authors. +Message-ID: <37176371.310E0C6C@iquest.net> +X-UID: 1391 + +Hello, + +I am looking for people who would be interested in writing an in depth +tutorial on the Python language. The ideal candidate would have some +previous writing experience (or at least some verifiable writing +skills), and the ability to clearly explain the python language by +guiding the reader through real life programming examples. Anyone with +any such interest please contact me directly at smeyers at mcp.com or +smee at iquest.net. + +Thanks, + +Scott Meyers, +Sams Publishing +smeyers at mcp.com +(317) 817-7276 + + + + diff --git a/demo/ermis-f/python_m/cur/1392 b/demo/ermis-f/python_m/cur/1392 new file mode 100644 index 00000000..a2cee7d2 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1392 @@ -0,0 +1,40 @@ +From: wtanksle at dolphin.openprojects.net (William Tanksley) +Date: Fri, 30 Apr 1999 17:27:35 GMT +Subject: Using Python for Modular Artificial Intelligence code +References: <7g94lp$mdu$1@news.worldonline.nl> +Message-ID: +Content-Length: 1146 +X-UID: 1392 + +On Fri, 30 Apr 1999 23:07:45 +0930, Tim Auld wrote: + +>>>I've started looking into Python as the AI scripting language for this +>>>purpose, but I'm having trouble seeing exactly how I could do this. I + +>>Where do you use C++ for anyway? GUI's? Build them in Python, forget C++ +>>until you are done and than use C++ to speed up critical sections + +>system further. The reason I'm using C++ is mainly because I'm familiar +>with it, and because of speed. I'm aware that Python is relatively slow, so +>I would rather use C++ as a base from the start, and save myself the trouble +>of rewriting it all later. + +If you write everything in Python, you will wind up with a program which +works far sooner than if you'd written it in C++ (unless you're _REALLY_ +good at C++). You can then pull out the parts which need speedup into C +or C++. + +It won't be that much trouble to rewrite -- it seldom is, really. The +hard part is getting the design, not writing the program. Python offers +the ideal design language, because it's executable. + +>Tim + +-- +-William "Billy" Tanksley +"But you shall not escape my iambics." + -- Gaius Valerius Catullus + + + + diff --git a/demo/ermis-f/python_m/cur/1393 b/demo/ermis-f/python_m/cur/1393 new file mode 100644 index 00000000..70cd7c1b --- /dev/null +++ b/demo/ermis-f/python_m/cur/1393 @@ -0,0 +1,30 @@ +From: carol at parkey.com (Carol Parkey) +Date: Tue, 06 Apr 1999 09:23:46 +0100 +Subject: Python under ASP/MTS +Message-ID: <3709C492.EED3BF03@parkey.com> +X-UID: 1393 + +We have to build something quickly for a client, but we have to fit +within their ASP/MTS mandate. + +I have developed the first cut of a Python COM object which sits under +Microsoft Transaction Server, and can be called from an Active Server +Page in VBScript/JavaScript (thanks to Mark Hammond and all the FAQ +writers). The requirement is perfect for Python, since it has to +convert between user requests in XML and mainframe messages in some +hideous format, plus some other fiddly bits. + +I am concerned, though, about whether I will experience performance +problems, with the interpreter being loaded and unloaded. Am I worrying +needlessly, or is there something I should be doing (like forcing the +COM object's reference count to never drop to zero)? + +All suggestions gratefully received + +regards + +jp + + + + diff --git a/demo/ermis-f/python_m/cur/1394 b/demo/ermis-f/python_m/cur/1394 new file mode 100644 index 00000000..419d175b --- /dev/null +++ b/demo/ermis-f/python_m/cur/1394 @@ -0,0 +1,26 @@ +From: KUNCEJ at mail.conservation.state.mo.us (Jeffrey Kunce) +Date: Wed, 21 Apr 1999 14:36:37 GMT +Subject: Bit Arrays +Message-ID: +X-UID: 1394 + +Take a look at ./Demo/classes/bitvec.py in the python source distribution. It may be what you want, or at least give you some ideas. + + --Jeff + +>>> "Laura Paterno" 04/20/99 11:21am >>> +Hello all, + +I want to write a python program that has 26 Bit Arrays that each contain +1113 bits. Is there a structure in python that one can use to represent a +bit array? + +Laura Paterno + + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1395 b/demo/ermis-f/python_m/cur/1395 new file mode 100644 index 00000000..1fc76088 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1395 @@ -0,0 +1,42 @@ +From: pchristo at ic.sunysb.edu (Pavlos Christoforou) +Date: Tue, 13 Apr 1999 13:46:17 -0400 +Subject: ConfigParser module and alternatives (flad, flan) +In-Reply-To: +References: <19990331160323.21601.00000471@ng-fi1.aol.com> <7du3ab$3ag@chronicle.concentric.net> +Message-ID: +Content-Length: 1341 +X-UID: 1395 + +On Sat, 10 Apr 1999, Mike Orr wrote: + +> I use ConfigParser to parse the data files in a Mad Lib CGI program. +> See it at http://mso.oz.net/python/madbibs/ +> (When I add/change a story, I run a script that parses the files, +> creates the HTML, and stores the preprocessed data structures in a +> cPickle file for the CGI script.) + +Sounds like you might benefit from Zope, or at least ZPublisher. + + +> +> I'm not sure if I'll use ConfigParser for the next version. I don't +> really need the sections (multiple files work just fine, using the filename +> for the section name), and I haven't found a use for the the %(other_key)s +> substitutions. On the other hand, it doesn't handle multiple values (the +> same key repeated within a record), which I sometimes need. + +Last time I needed to use configuration files I wrote an XML module that +maps XML files onto python dictionaries. Changes to either the python +dictionary during run-time or to the file are synchronized automatically +(not good for huge configuration files that are modified frequently). The +standard python distribution comes with a good XML parser so you can do +pretty cool things. Mapping onto dictionaries creates the same problem +that you mentioned (no multiple values withing the same sectrion +(dictionary)). If anyone is interested I can send her/him a copy. + +Pavlos + + + + + diff --git a/demo/ermis-f/python_m/cur/1396 b/demo/ermis-f/python_m/cur/1396 new file mode 100644 index 00000000..bf192cd8 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1396 @@ -0,0 +1,20 @@ +From: bryanv at arlut.utexas.edu (Bryan VanDeVen) +Date: Tue, 13 Apr 1999 15:51:03 -0500 +Subject: real time scheduler +Message-ID: <3713AE36.A1EA255B@arlut.utexas.edu> +X-UID: 1396 + +Is there a module for scheduling events in real time? I have events +that need to be repeated indefinitely, each at a given time period. The +periods are large (at least one minute) and precision requirements are +not that great (within a few seconds). Is anyone aware of code to do +this? + +-- +Bryan Van de Ven +Applied Research Labs +University of Texas, Austin + + + + diff --git a/demo/ermis-f/python_m/cur/1397 b/demo/ermis-f/python_m/cur/1397 new file mode 100644 index 00000000..b3dd4500 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1397 @@ -0,0 +1,22 @@ +From: morse at harborcom.net (Kevin Dahlhausen) +Date: Wed, 14 Apr 1999 13:51:35 GMT +Subject: Python + KDE tutorial +References: +Message-ID: <37149d49.183049300@news.oh.verio.com> +X-UID: 1397 + +boud at rempt.xs4all.nl wrote: + +>Since I mentioned my attempts at the translation +>of Daniel Marjam?ki's c++ KDE tutorial +>(http://www.dormnet.his.se/~a96danma) into Python, +>I thought it a good idea to mention that it is now +>up at: +> +>http://www.xs4all.nl/~bsarempt/python/tutorial.html + +Thanks. It's a nice intro to Qt. + + + + diff --git a/demo/ermis-f/python_m/cur/1398 b/demo/ermis-f/python_m/cur/1398 new file mode 100644 index 00000000..47db00c5 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1398 @@ -0,0 +1,35 @@ +From: pat at ktgroup.co.uk (Pat Knight) +Date: Tue, 20 Apr 1999 16:20:57 GMT +Subject: Tkinter hangs in Emacs in 1.5.2 on Win32 +Message-ID: <371ca96f.0@nnrp1.news.uk.psi.net> +X-UID: 1398 + +I often prototype fragments of Tkinter code using the interactive Python mode +in NT emacs. Since installing 1.5.2 the interpreter hangs when run +interactively inside Emacs. + +If I type +from Tkinter import * +r = Tk() +r.title('pat') + +I never get a >>> prompt from the interpreter after entering the r.title() +call. + +The same sequence of commands works fine in the regular stand-alone +interpreter. + +Does anyone know what's going on before I prepare a bug report? + +I'm using Python 1.5.2 on Windows 98 and Windows NT with the Tcl/Tk that comes +with Python 1.5.2 and NT Emacs 20.3.1 with the python-mode.el that comes with +Python 1.5.2. + + +Pat Knight +VCS Development Manager, The Knowledge Group, Bristol, UK ++44-117-900-7500 Corporate Web: http://www.ktgroup.co.uk + + + + diff --git a/demo/ermis-f/python_m/cur/1399 b/demo/ermis-f/python_m/cur/1399 new file mode 100644 index 00000000..e1bfdaf1 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1399 @@ -0,0 +1,44 @@ +From: aahz at netcom.com (Aahz Maruch) +Date: Sat, 17 Apr 1999 13:33:47 GMT +Subject: #!/usr/bin/env python -u +References: <37175574.25EBDDBE@stuco.uni-klu.ac.at> +Message-ID: +Content-Length: 1440 +X-UID: 1399 + +In article , +Bill Janssen wrote: +> +>I'm not a big fan of the /usr/bin/env approach for Python scripts, +>because at PARC many people run without having Python on their paths. +>Many, many packages at PARC, including Python and ILU, are installed in +>their own directory tree under either /project (/project/ILU/) or +>/import (/import/python-1.5/). People enable or disable various +>packages depending on what they're up to. +> +>So I tend to depend on GNU configure when I'm installing a script. I +>actually look for Python in the user's environment, then use sed to +>hard-code that path into the scripts before installing them. Can this +>be done with RPM? + +Back when I was working at a software company with a real build +environment, we had a system where we used shell scripts to call Perl +and make scripts. You can do some pretty sophisticated parsing in a +shell script; up to you whether you want to do the perverse option of +installing a global python that system calls other python scripts.... + +I really loathe hard-coded paths unless they're truly global. + +(Let me know if this isn't clear.) +-- + --- Aahz (@netcom.com) + +Hugs and backrubs -- I break Rule 6 <*> http://www.rahul.net/aahz/ +Androgynous poly kinky vanilla queer het + +Sometimes, you're not just out of left field, you're coming in +all the way from outer space. + + + + diff --git a/demo/ermis-f/python_m/cur/1400 b/demo/ermis-f/python_m/cur/1400 new file mode 100644 index 00000000..3d932d08 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1400 @@ -0,0 +1,33 @@ +From: MHammond at skippinet.com.au (Mark Hammond) +Date: Mon, 19 Apr 1999 09:24:04 +1000 +Subject: win32api and win32ui import error +References: <7fbcpq$2jb$1@nnrp1.dejanews.com> +Message-ID: <7fdpi8$lvg$1@m2.c2.telstra-mm.net.au> +X-UID: 1400 + +hj_ka at my-dejanews.com wrote in message <7fbcpq$2jb$1 at nnrp1.dejanews.com>... +>>>> import win32api +> +>"exceptions.ImportError: DLL load failed: The process cannot access +>the file because it is being used by another process." + +This is a stragne one. Never ever seen anything like this. + +First step: Does "import pywintypes" work? If not, the problem is related +to "pywintypes15.dll", otherwise the problem is related to win32api.pyd. My +guess is the former, as win32ui fails in the same way. + +Only thing I can suggest is removing pywintypes15.dll from the system +directory, then re-extracting it using winzip from win32all-124.exe. + +That is the only thing I can think off. The error message implies some +other process has it open for "write" - or it is corrupted in some way? + +Mark. + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1401 b/demo/ermis-f/python_m/cur/1401 new file mode 100644 index 00000000..63b9701d --- /dev/null +++ b/demo/ermis-f/python_m/cur/1401 @@ -0,0 +1,30 @@ +From: thomas at xs4all.nl (Thomas Wouters) +Date: 8 Apr 1999 08:10:17 GMT +Subject: DNS module ? +Message-ID: +X-UID: 1401 + +I'm looking for a DNS module. Actually, I'm looking for Anthony Baxters' DNS +module, from what I've read on dejanews :) However, the URL he gives in +the link in those posts, and all others I could find, point to a machine +that no longer exists (alumni.dgs.monash.edu.au) and I cannot find a similar +module anywhere else (except for the Demo DNS module, which, frankly, wont +do :) + +Am I looking in the wrong places ? Mind you, I started looking into python +less than 24 hours ago, but I did check www.python.org, starship python, +dejanews and altavista (though the starship python searchengine was showing +a lack of voom when I tried it -- I think it was stunned) + +I would be _very_ grateful for any pointers to the damned module, before I +write it myself, out of frustration, burning desire and the sublimal +messages... Must... ...write... ...Python... + +-- +Thomas Wouters + +Hi! I'm a .signature virus! copy me into your .signature file to help me spread! + + + + diff --git a/demo/ermis-f/python_m/cur/1402 b/demo/ermis-f/python_m/cur/1402 new file mode 100644 index 00000000..17b03fe4 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1402 @@ -0,0 +1,52 @@ +From: nascheme at ucalgary.ca (Neil Schemenauer) +Date: 28 Apr 1999 18:40:24 GMT +Subject: Moving Numeric arrays into the core +References: <37208E69.4B022E0C@mediaone.net> <7fr3eg$bqr@world1.bellatlantic.net> <7g4jkg$llc@ds2.acs.ucalgary.ca> <14119.2301.611044.266704@amarok.cnri.reston.va.us> +Message-ID: <7g7kmo$cm0@ds2.acs.ucalgary.ca> +Content-Length: 1340 +X-UID: 1402 + +On Wed, 28 Apr 1999 09:29:53 -0400 (EDT), +Andrew M. Kuchling wrote: +> I think the idea is to include only the basic NumPy types +>(multiarray and whatever the rest are). BLAS, LAPACK, or whatever, +>would still be add-ons. + +I've looked into this and it should be pretty easy to split up NumPy. +Here is what I got: + + 332 1075 11818 Include/arrayobject.h + 190 585 6704 Include/ufuncobject.h + 86 264 3585 Src/_numpymodule.c + 2037 6451 53891 Src/arrayobject.c + 615 2690 28201 Src/arraytypes.c + 2 2 24 Src/multiarray.def + 1208 3818 31603 Src/multiarraymodule.c + 39 36 639 Src/numpy.def + 968 3129 26291 Src/ufuncobject.c + 2 2 19 Src/umath.def + 2013 10754 95932 Src/umathmodule.c + 213 847 7904 Lib/ArrayPrinter.py + 29 76 767 Lib/Matrix.py + 342 1190 9632 Lib/Numeric.py + 80 271 2468 Lib/Precision.py + 103 235 2964 Lib/UserArray.py + 8259 31425 282442 total + + +On a Intel Linux box I get the following libraries: + + 163996 _numpymodule.so + 69147 multiarraymodule.so + 159556 umathmodule.so + 392699 total + +I wonder if this is too large. Maybe umath should be left out. Also, +how would the existing array module fix in with this? + + + Neil + + + + diff --git a/demo/ermis-f/python_m/cur/1403 b/demo/ermis-f/python_m/cur/1403 new file mode 100644 index 00000000..f9184481 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1403 @@ -0,0 +1,27 @@ +From: fdrake at cnri.reston.va.us (Fred L. Drake) +Date: Thu, 22 Apr 1999 14:07:52 GMT +Subject: Need someone to try some rarely used bsddb methods +In-Reply-To: <371E9326.8472D97@mojam.com> +References: <7fa14m$vfm$1@nnrp1.dejanews.com> + <371E9326.8472D97@mojam.com> +Message-ID: <14111.11576.76622.745554@weyr.cnri.reston.va.us> +X-UID: 1403 + +Skip Montanaro writes: + > I wound up writing the section for the library reference as well. I + > believe it's in the CVS repository now. + + It's there, along with modifications I just added to indicate the +lack of support for last() and previous() on hashtable databases. + Thanks for supporting the Python documentation efforts! + + + -Fred + +-- +Fred L. Drake, Jr. +Corporation for National Research Initiatives + + + + diff --git a/demo/ermis-f/python_m/cur/1404 b/demo/ermis-f/python_m/cur/1404 new file mode 100644 index 00000000..d8f80a06 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1404 @@ -0,0 +1,18 @@ +From: jbauer at rubic.com (Jeff Bauer) +Date: Tue, 13 Apr 1999 05:38:43 GMT +Subject: rfc822 date header +Message-ID: <3712D863.2A8148BC@rubic.com> +X-UID: 1404 + +Is there a reasonably bulletproof way to generate an +rfc822-compliant date header using the time module? + +The reason I ask is I recall a number of subtle +errors in this regard, reported by Chris Lawrence, +among others. + +-Jeff Bauer + + + + diff --git a/demo/ermis-f/python_m/cur/1405 b/demo/ermis-f/python_m/cur/1405 new file mode 100644 index 00000000..a8f91fe0 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1405 @@ -0,0 +1,27 @@ +From: phd at sun.med.ru (Oleg Broytmann) +Date: Mon, 19 Apr 1999 10:29:55 GMT +Subject: Database search engine +In-Reply-To: <7ferls$qrj$1@nnrp1.dejanews.com> +References: <7ferls$qrj$1@nnrp1.dejanews.com> +Message-ID: +X-UID: 1405 + +On Mon, 19 Apr 1999 davidcuny at yahoo.fr wrote: +> Where can I find an algorithm or, the best, Perl code for that kind of work? +> Is Perl the good tool to do that (Perl??,java)?? + + http://perlfect.com/freescripts/search/ + +> thanks +> +> David + +Oleg. +---- + Oleg Broytmann National Research Surgery Centre http://sun.med.ru/~phd/ + Programmers don't die, they just GOSUB without RETURN. + + + + + diff --git a/demo/ermis-f/python_m/cur/1406 b/demo/ermis-f/python_m/cur/1406 new file mode 100644 index 00000000..8950b753 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1406 @@ -0,0 +1,74 @@ +From: schliep at octopussy.mi.uni-koeln.de (Alexander Schliep) +Date: 07 Apr 1999 23:44:39 +0200 +Subject: Tkinter and centering +References: <370B88CF.993D8847@yahoo.com> + <370BC217.FFF53A35@vision.arc.nasa.gov> +Message-ID: +Content-Length: 1971 +X-UID: 1406 + +Chad Netzer writes: + +> Well, I don't know if you can ever get the window width and height without +> first mapping it (displaying). One option is to open it completely off the + +I found a solution in Effective Tcl/Tk. You have to call update_idletasks() +which forces geometry calculations first and then you can move the window. + +Here is some sample code I wrote for a splash screen. + +Alexander + + + + +class SplashScreen(Toplevel): + """ + Subclass and override 'CreateWidgets()' + + In constructor of main window/application call + - S = SplashScreen(main=self) (if caller is Toplevel) + - S = SplashScreen(main=self.master) (if caller is Frame) + - S.Destroy() after you are done creating your widgets etc. + """ + + def __init__(self, master=None): + Toplevel.__init__(self, master, relief=RAISED, borderwidth=5) + self.main = master + if self.main.master != None: # Why ? + self.main.master.withdraw() + self.main.withdraw() + self.overrideredirect(1) + self.CreateWidgets() + self.after_idle(self.CenterOnScreen) + self.update() + + def CenterOnScreen(self): + self.update_idletasks() + xmax = self.winfo_screenwidth() + ymax = self.winfo_screenheight() + x0 = (xmax - self.winfo_reqwidth()) / 2 + y0 = (ymax - self.winfo_reqheight()) / 2 + self.geometry("+%d+%d" % (x0, y0)) + + def CreateWidgets(self): + # Need to fill in here + + def Destroy(self): + self.main.update() + self.main.deiconify() + self.withdraw() + + + + +-- +Alexander Schliep schliep at zpr.uni-koeln.de +ZPR/ZAIK Tel: +49-221-470-6011 (w) +University of Cologne FAX: +49-221-470-5160 +Weyertal 80 http://www.zpr.uni-koeln.de/~schliep +50931 Cologne, Germany Tel: +49-231-143083 (h) + + + + diff --git a/demo/ermis-f/python_m/cur/1407 b/demo/ermis-f/python_m/cur/1407 new file mode 100644 index 00000000..e82628ba --- /dev/null +++ b/demo/ermis-f/python_m/cur/1407 @@ -0,0 +1,19 @@ +From: thantos at lucifer.gw.total-web.net (Alexander Williams) +Date: Sun, 04 Apr 1999 02:37:29 GMT +Subject: [IRC] Has anyone created a useful IRC module? +Message-ID: +X-UID: 1407 + +Has anyone written a module in the spirit of telnetlib that would +facilitate writing an IRC bot that connects to the server and can +communicate with the core? Such a beast would definitely facilitate +writing decent Bots ... such as the one I'd like to put together. + +-- +Alexander Williams (thantos at gw.total-web.net) +"Absolute power applied to limited problems. Incidental damage negligable." + + + + + diff --git a/demo/ermis-f/python_m/cur/1408 b/demo/ermis-f/python_m/cur/1408 new file mode 100644 index 00000000..be373e3c --- /dev/null +++ b/demo/ermis-f/python_m/cur/1408 @@ -0,0 +1,36 @@ +From: fredrik at pythonware.com (Fredrik Lundh) +Date: Wed, 21 Apr 1999 21:42:00 GMT +Subject: How do I use proxies with httplib? +References: <7fl97e$lnc$1@nnrp1.dejanews.com> +Message-ID: <099101be8c3f$cb6206e0$f29b12c2@pythonware.com> +X-UID: 1408 + + wrote: +> I want to use httplib through a proxy server and I can't seem to get +> it to work. + +that's probably because it doesn't work: + +[Lib]$ grep proxy httplib.py +[Lib]$ + +you might be able to use urllib instead: + +[Lib]$ grep proxy urllib.py + proxy = self.proxies[type] + type, proxy = splittype(proxy) + host, selector = splithost(proxy) + #print "proxy via http:", host, selector + """Return a dictionary of scheme -> proxy server URL mappings. + proxies. An HTTP proxy, for instance, is stored under + """Return a dictionary of scheme -> proxy server URL mappings. + Scan the environment for variables named _proxy; + if value and name[-6:] == '_proxy': +[Lib]$ + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1409 b/demo/ermis-f/python_m/cur/1409 new file mode 100644 index 00000000..068ca2fd --- /dev/null +++ b/demo/ermis-f/python_m/cur/1409 @@ -0,0 +1,28 @@ +From: brunomadv at ciudad.com.ar (Bruno Mattarollo) +Date: Wed, 21 Apr 1999 03:27:56 GMT +Subject: permissions on win32 [Q] +Message-ID: <001201be8ba6$f2f706e0$6eba0ac8@kuarajy.infosys.com.ar> +X-UID: 1409 + +Hi! + + I have to do a little script for a customer that will copy files from an NT +server to another. I need to change the permissions on those files and +directories. I mean, I need to give privileges to groups like +Administrators, the user that owns the files (changes from file to file) and +other special groups. Anyone knows how to do this with Python? We have the +following env: NT4SP4, Python 1.5.1, Win32All 124 ... the lastest one. I +have already done the script that copies the files, I just need to know how +to set this permissions. + + TIA + +/B + +Bruno Mattarollo +... proud to be a PSA member + + + + + diff --git a/demo/ermis-f/python_m/cur/1410 b/demo/ermis-f/python_m/cur/1410 new file mode 100644 index 00000000..3594c5ce --- /dev/null +++ b/demo/ermis-f/python_m/cur/1410 @@ -0,0 +1,28 @@ +From: kaz at ashi.FootPrints.net (Kaz Kylheku) +Date: 22 Apr 1999 20:01:30 GMT +Subject: The Future of Tk? +References: <371E964F.C531C2A@istar.ca> <371F11C2.3162025@ciril.fr> <4fv$ECA+JyH3EwbN@jessikat.demon.co.uk> +Message-ID: <7fnv6q$2g5$44@newsread.f.de.uu.net> +X-UID: 1410 + +On Thu, 22 Apr 1999 18:01:27 GMT, Barry Margolin wrote: +>In article <4fv$ECA+JyH3EwbN at jessikat.demon.co.uk>, +>Robin Becker wrote: +>>I take this completely differently; least astonishment for me is if +>>program X looks and behaves the same way no matter what keyboard, mouse +>>and screen I'm using. As a 'user' of the program X it shouldn't matter +>>what OS/WM is executing the code. I certainly don't want vi or emacs to +>>be different on the mac why should I treat word or excel differently? +> +>I would be very surprised if Netscape on the Macintosh presented a +>Windows-like user interface, rather than adopting the standard Macintosh + +I'd be very surprised if even 10% of, say, comp.lang.c gave a damn. The pitiful +dumbfuck who started this thread made a severe mistake in constructing the +Newsgroups: header line, the moment he put in the first comma. + +I am setting Followup-to: to comp.lang.tcl. + + + + diff --git a/demo/ermis-f/python_m/cur/1411 b/demo/ermis-f/python_m/cur/1411 new file mode 100644 index 00000000..c4976d4a --- /dev/null +++ b/demo/ermis-f/python_m/cur/1411 @@ -0,0 +1,14 @@ +From: wwyruygt at jizm.net (wwyruygt at jizm.net) +Date: Tue, 27 Apr 1999 22:32:18 GMT +Subject: Awsome live video sex @ www.xxxsizzle.com! +Message-ID: +X-UID: 1411 + +An unregistered copy of Newsgroup AutoPoster 95 was used to post this article! +--- +This has got to be the best adult website I've seen. www.xxxsizzle.com kicks ass! Don't take my word for it, cum see yourself. + + + + + diff --git a/demo/ermis-f/python_m/cur/1412 b/demo/ermis-f/python_m/cur/1412 new file mode 100644 index 00000000..f8341daa --- /dev/null +++ b/demo/ermis-f/python_m/cur/1412 @@ -0,0 +1,34 @@ +From: jwbaxter at olympus.net (John W. Baxter) +Date: Sat, 17 Apr 1999 07:18:50 -0700 +Subject: Why no "=" in if? (was Re: Quick fix to add "+=") +References: <3717EE20.41343593@mediaone.net> <000701be888f$12fe2920$ee9e2299@tim> +Message-ID: +X-UID: 1412 + +In article , aahz at netcom.com (Aahz Maruch) wrote: + +> I'm getting really sick of the way I have to use this stupid construct: +> +> x = foo() +> if x: +> ... +> +> instead of +> +> if x = foo(): +> ... +> +> Why doesn't Guido get off his duff and fix this?????????! + +Because it's not broken. + + --John + +-- +If nothing is pressing, putter about with this or that. + (Fortune cookie) +John W. Baxter Port Ludlow, WA USA jwb at olympus.net + + + + diff --git a/demo/ermis-f/python_m/cur/1413 b/demo/ermis-f/python_m/cur/1413 new file mode 100644 index 00000000..73675d0f --- /dev/null +++ b/demo/ermis-f/python_m/cur/1413 @@ -0,0 +1,26 @@ +From: jwpolley at collins.rockwell.com (Jonathan Polley) +Date: Fri, 23 Apr 1999 10:36:00 -0500 +Subject: Proposed Change for sys.exitfunc for version 1.6 +Message-ID: <37209360.2FB8E145@collins.rockwell.com> +X-UID: 1413 + +I would like to propose adding a function to the module 'sys' that would +change (slightly) the behavior of sys.exitfunc. I would like to add a +method that performs the same function as UNIX's 'atexit ()' function. +The reason is that I have some modules that would like to do some +cleanup when python terminates, but I don't want to have to add the code +required for them to remember the previous value of sys.exitfunc so they +can call that function (if present). A method sys.atexit () would work +nicely. It would allow me to add a series of exit functions and be +guaranteed that they would all be called at the termination of python +(so I can close files, purge queues, close sockets, etc.). Does anyone +else think this would be a good idea??? + + +Jonathan Polley +jwpolley at collins.rockwell.com + + + + + diff --git a/demo/ermis-f/python_m/cur/1414 b/demo/ermis-f/python_m/cur/1414 new file mode 100644 index 00000000..4dea2fc7 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1414 @@ -0,0 +1,35 @@ +From: parkw at better.net (William Park) +Date: Mon, 26 Apr 1999 18:34:28 -0400 +Subject: Launching web browser programmatically +In-Reply-To: <3724EB92.248E7933@hotmail.com>; from Ben Darnell on Mon, Apr 26, 1999 at 05:41:22PM -0500 +References: <3724EB92.248E7933@hotmail.com> +Message-ID: <19990426183428.A770@better.net> +X-UID: 1414 + +On Mon, Apr 26, 1999 at 05:41:22PM -0500, Ben Darnell wrote: +> [I seem to remember a recent thread about this, but I can't find it on +> DejaNews. I apologize for any redundancy] +> +> How do I launch the the user's web browser programmatically on Win9x? I +> can use "start http://www.python.org" at the command line, but +> "os.system('start http://www.python.org')" doesn't work properly. The +> python process seems to hang. When I kill python with the task manager, +> the web browser does appear. What is going wrong here? +> +> Ben Darnell +> ben_darnell at hotmail.com +> +> +> -- +> http://www.python.org/mailman/listinfo/python-list + +Not knowing too much about Win9x, my guess would be that os.system() +is waiting for stdin to close, since the web browser does appear after +you kill python. Try Window's equivalent to + os.system('start http://www.python.org /dev/null 2>/dev/null &') + +William Park + + + + diff --git a/demo/ermis-f/python_m/cur/1415 b/demo/ermis-f/python_m/cur/1415 new file mode 100644 index 00000000..00937845 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1415 @@ -0,0 +1,91 @@ +From: morse at harborcom.net (Kevin Dahlhausen) +Date: Fri, 09 Apr 1999 11:37:54 GMT +Subject: Python for embedded controllers? +References: +Message-ID: <370de606.77891472@news.oh.verio.com> +Content-Length: 3239 +X-UID: 1415 + +I know you already mentioned the mentioning of Python on this mailing list, but +this was really exciting to me and rest of the snake pit might like it too: + + +SO, maybe when it's available, their microPython source can serve +as the basis for other embedded systems. + +--------------------------------------------------- + +Date sent: Thu, 8 Apr 1999 11:34:15 -0700 +To: ucsimm at uClinux.org +From: Michael Gorlick +Subject: Re: [uCsimm] Scripting Languages on uCSIMM +Send reply to: ucsimm at uClinux.org + +At 10:03 AM -0700 4/8/99, William Ware wrote: + +>Python uses a compiled bytecode which is executed by a virtual +>machine, like Java. It might be nice to be able to bring up just +>the VM on a target board, and download compiled bytecode to it, +>rather than running a full interpreter on the board. I would +>also think that for a cpu with no floating-point unit (I don't +>think the dragonball has one), you'd want a Python build that +>avoids any use of floats or doubles. I haven't looked closely +>enough at the Python source to see how feasible that would be. +>The few times I've tried building a 68K gcc cross-compiler, I've +>never been able to get the floating-point library (libgcc1.s?) +>to plug in correctly. I don +>t have any experience trying to build ecgs as a cross-compiler. + +Be assured that we are acutely aware of the limitations of the DragonBall +processor and have been completely ruthless in stripping it down to the +bare minimum +(truth in advertising requires that I disclose that in the interest of time +a few extraneous bits and pieces have been left in --- these were components +that were easier to ignore than remove). We estimate that with more work +we can reduce +our version of Python down from its current measly 124 kB to about 110 kB. +Further +reductions may be possible but with correspondingly greater effort. + +I have also been a little sloppy with terminology. We are not running the +full interpreter +but just the Python virtual machine and a spare framework around it. For +example, +the interactive, command-line front end is history along with the builtin +compiler. +Users will use a "full up" Python interpreter to produce VM bytecode files +(*.pyc) +which will then be downloaded onto the Palm Pilot. + +On another note, many interested users have contacted me personally to +enquire further or +to offer their assistance. Your interest and enthusiasm is greatly +appreciated, however, +at this point in time no further information is available. We are doing +this as quickly as our +congested and conflicted schedules permit. We anticipate having an alpha +version in house by +the end of April. We plan to make the source code and prebuilt binaries +publically available, +although the exact timing of the distribution is unclear. We will make +announcements +on this and other mailing lists when the distribution is packaged and ready +to go. + +We recognize the value and potential of Python on platforms like the uCsimm +and are anxious +to have it in the hands of users such as yourselves. Please be patient +with us. + + __ + _/mg\__ +... /o-----o> + + +This message resent by the ucsimm at uclinux.org list server +http://ryeham.ee.ryerson.ca/uClinux + + + + + diff --git a/demo/ermis-f/python_m/cur/1416 b/demo/ermis-f/python_m/cur/1416 new file mode 100644 index 00000000..9754df78 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1416 @@ -0,0 +1,25 @@ +From: wtanksle at dolphin.openprojects.net (William Tanksley) +Date: Sun, 04 Apr 1999 05:49:07 GMT +Subject: Why are they? Re: Module Documentation Strings +References: +Message-ID: +X-UID: 1416 + +On Sat, 3 Apr 1999 20:38:37 -0500, evil Japh wrote: +>Why are there documentation strings? +>I mean, granted it would be very bad if the next version of python did not +>support them, but why not just use comment lines? + +Because comment lines are only visible within the source. Docstrings may be +accessed from anywhere, without any knowledge of the source. + +>Jeff Pinyan (jeffp at crusoe.net) + +-- +-William "Billy" Tanksley +"But you shall not escape my iambics." + -- Gaius Valerius Catullus + + + + diff --git a/demo/ermis-f/python_m/cur/1417 b/demo/ermis-f/python_m/cur/1417 new file mode 100644 index 00000000..2cebd104 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1417 @@ -0,0 +1,29 @@ +From: markus_kohler at hp.com (Markus Kohler) +Date: 30 Apr 1999 13:56:31 +0200 +Subject: Python IS slow ! [was] Re: Python too slow for real world +References: <613145F79272D211914B0020AFF6401914DAD8@gandalf.digicool.com> +Message-ID: +X-UID: 1417 + +The numbers for tak(18, 12, 6) see my previous post. + +Python-1.5.2c1 compiled with HP compiler "cc -O" +0.52 seconds + +Squeak (www.squeak.org) 2.4 running with a 2.3 virtual machine compiled with gcc (egcs 1.02) -O +0.13 seconds. this is compiled with gcc since it uses some gcc extensions that speed up the the +case statement for the byte code dispatching. Even the HP compiler produces much better code +than gcc, in this case the gcc compiled squeak is usally faster. + +Of course the comparsion is not really fair because squeak might +or might not run a the garbage collector during the test (probably not). + +But I doubt that this would explain a factor of 4. + +Markus +-- +Markus Kohler mailto:markus_kohler at hp.com + + + + diff --git a/demo/ermis-f/python_m/cur/1418 b/demo/ermis-f/python_m/cur/1418 new file mode 100644 index 00000000..7f373baf --- /dev/null +++ b/demo/ermis-f/python_m/cur/1418 @@ -0,0 +1,24 @@ +From: jbauer at rubic.com (Jeff Bauer) +Date: Tue, 13 Apr 1999 12:42:57 GMT +Subject: rfc822 date header +References: <3712D863.2A8148BC@rubic.com> + <3712F4C1.52327AF4@lemburg.com> +Message-ID: <37133BD1.5FF0C763@rubic.com> +X-UID: 1418 + +>>> Is there a reasonably bulletproof way to generate an +>>> rfc822-compliant date header using the time module? + +Chris, + +Thanks for your response. (Also, thanks to Jack Jansen and +M.A. Lemburg for responding too.) + +I'd like to lobby for a strdate() convenience method to be +added to rfc822.py, provided it's sufficiently controversial. + +-Jeff Bauer + + + + diff --git a/demo/ermis-f/python_m/cur/1419 b/demo/ermis-f/python_m/cur/1419 new file mode 100644 index 00000000..f6f08d8b --- /dev/null +++ b/demo/ermis-f/python_m/cur/1419 @@ -0,0 +1,39 @@ +From: jean at stat.ubc.ca (Jean Meloche) +Date: Sun, 25 Apr 1999 16:47:14 +0000 +Subject: possible bug in 1.5.1 +Message-ID: <37234712.2E95BC37@stat.ubc.ca> +X-UID: 1419 + +I am using python to import a SAS database into a +relational database and I'm running into some trouble +with the real number Infinity. I've had trouble with +it before... SAS uses -Infinity to signal exceptional +cases. + +One of my functions tests to a Infinity field: + + Infinity=1e1000 + if rec['HC4']==Infinity: do_something + +The code fails because *sometimes* Infinity takes +value Inf and *sometimes* it takes value 0.0... +I've also added the line + + print 1e1000 + +and it sometimes print Inf and sometimes print 0.0. + +How can I create a Infinite float in python with +certainty? I'm using a RedHat 5.2 system on Intel. + + +Many thanks and please reply to + +jean at stat.ubc.ca + +-- +Jean Meloche + + + + diff --git a/demo/ermis-f/python_m/cur/1420 b/demo/ermis-f/python_m/cur/1420 new file mode 100644 index 00000000..30f54b21 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1420 @@ -0,0 +1,32 @@ +From: akuchlin at cnri.reston.va.us (Andrew M. Kuchling) +Date: Wed, 14 Apr 1999 16:47:50 GMT +Subject: How libpython1.5.so +In-Reply-To: <371320F4.5338600B@earth.ox.ac.uk> +References: <371320F4.5338600B@earth.ox.ac.uk> +Message-ID: <14100.50513.166352.167346@amarok.cnri.reston.va.us> +X-UID: 1420 + +Nick Belshaw writes: +>Whilst trying to get Python plugins to work on Gnumeric-0.23 I bumped up +>against the need for libpython1.5.so.0.0.0 + + Python doesn't build a .so file, so I think the Gnumeric +people must have hacked Python to build one; you may want to check +with them and see if they have build instructions or an RPM available. +Alternatively, you can make a shareable libpython by setting the +CFLAGS environment variable to "-fPIC" before running ./configure and +compiling Python. Then, turn libpython.a into libpython.so with "gcc +-shared -o libpython.so libpython.a" (the exact command may require +some tweaking), and copy libpython.so to wherever you like. + +-- +A.M. Kuchling http://starship.python.net/crew/amk/ +I think he expected me to agree enthusiastically, but I didn't. Nor did I +contradict him; I have had too much experience of life to attempt to tell a +really rich person anything. + -- Robertson Davies, _The Rebel Angels_ + + + + + diff --git a/demo/ermis-f/python_m/cur/1421 b/demo/ermis-f/python_m/cur/1421 new file mode 100644 index 00000000..f8ed0719 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1421 @@ -0,0 +1,35 @@ +From: mlh at idt.ntnu.no (Magnus L. Hetland) +Date: 23 Apr 1999 23:40:17 +0200 +Subject: Python too slow for real world +References: <372068E6.16A4A90@icrf.icnet.uk> <3720A21B.9C62DDB9@icrf.icnet.uk> <3720C4DB.7FCF2AE@appliedbiometrics.com> <3720C6EE.33CA6494@appliedbiometrics.com> +Message-ID: +X-UID: 1421 + +Christian Tismer writes: + +> Just did a little more cleanup to the code. +> This it is: + +Hm. This code is nice enough (although not very intuitive...) But +isn't it a bit troublesome that this sort of thing (which in many ways +is a natural application for Python) is so much simpler to implement +(in an efficient enough way) in Perl? + +Can something be done about it? Perhaps a buffering parameter to +fileinput? In that case, a lot of the code could be put in that +module, as part of the standard distribution... Even so -- you would +somehow have to be able to treat the buffers as blocks... Hm. + +(And... How about builtin regexes in P2?) + +> ciao - chris + +-- + > Hi! I'm the signature virus 99! + Magnus > Copy me into your signature and join the fun! + Lie + Hetland http://arcadia.laiv.org + + + + diff --git a/demo/ermis-f/python_m/cur/1422 b/demo/ermis-f/python_m/cur/1422 new file mode 100644 index 00000000..b4c9cbdc --- /dev/null +++ b/demo/ermis-f/python_m/cur/1422 @@ -0,0 +1,30 @@ +From: bkc at murkworks.com (Brad Clements) +Date: Wed, 7 Apr 1999 16:37:03 -0400 +Subject: SNMPy update +References: <7e1hiq$a71$1@Starbase.NeoSoft.COM> <7ear25$ksf$1@news-sj-3.cisco.com> <14089.11820.416453.80124@bitdiddle.cnri.reston.va.us> <3709C8BE.4257C9F1@lemburg.com> <14090.16807.950025.496495@bitdiddle.cnri.reston.va.us> <370A78B6.2C18D10F@lockstar.com> +Message-ID: <7egflp$843$1@news.clarkson.edu> +X-UID: 1422 + +Mordy Ovits wrote in message <370A78B6.2C18D10F at lockstar.com>... + +>I have a fairly complete SWIGing of OpenSSL/SSleay working. I made it on + +>company time, so I have to get company permission to release it. If there +is +>real interest, I'll push for us to release it. It does all the X.509 +stuff, is +>very OO, and builds on win32 and unices. +>Interested? +>Mordy + +> + + +Definately interested! + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1423 b/demo/ermis-f/python_m/cur/1423 new file mode 100644 index 00000000..74ad2a6e --- /dev/null +++ b/demo/ermis-f/python_m/cur/1423 @@ -0,0 +1,92 @@ +From: tismer at appliedbiometrics.com (Christian Tismer) +Date: Sat, 24 Apr 1999 13:58:57 GMT +Subject: Python too slow for real world +References: <372068E6.16A4A90@icrf.icnet.uk> + <3720A21B.9C62DDB9@icrf.icnet.uk> + <3720C4DB.7FCF2AE@appliedbiometrics.com> + <3720C6EE.33CA6494@appliedbiometrics.com> +Message-ID: <3721CE21.5B881A10@appliedbiometrics.com> +Content-Length: 3393 +X-UID: 1423 + + +"Magnus L. Hetland" wrote: +> +> Christian Tismer writes: +> +> > Just did a little more cleanup to the code. +> > This it is: +> +> Hm. This code is nice enough (although not very intuitive...) But +> isn't it a bit troublesome that this sort of thing (which in many ways +> is a natural application for Python) is so much simpler to implement +> (in an efficient enough way) in Perl? + +Well, Python has its trouble with its generalism, all the +object protocols, the stack machine, the name lookups, which +all apply even for simplest problems like Arne's. +This leads to non-intutive optimization tricks which I showed. +Although my buffering techique applies to other languages as +well. The brain damaging concept is running over big, partial +chunks of memory, trying to process them effectively without +much object creation, and making sure that the parts glue +together correctly, the last record isn't missing and so on. +The real work is hidden somewhere between like a side effect. + +> Can something be done about it? Perhaps a buffering parameter to +> fileinput? In that case, a lot of the code could be put in that +> module, as part of the standard distribution... Even so -- you would +> somehow have to be able to treat the buffers as blocks... Hm. + +I think someting can be done. +First, I think I can set up a framework for this class of +problems, which takes a line oriented algorithm and spits +out such a convoluted thing which does the same. + +Another thing which appears worthwhile is generalizing the +realine function. I used that in my own buffered files, +but this would be twice as fast if readline/s could do +this alone. + +What I need is a variable line delimiter which can be set +as a property for a file object. In this case, I would +use ">" as delimiter. For a fast XML scanner (which just +works right partitioning of XML pieces, nothing else), +I would use "<" as delimiter, read such chunks and break +them on ">", with a little repair code for comments, +">" appearing in attributes etc. + +Conclusion: +My readline would be parameterized by a delimiter string. +I would *not* leave it attached to a line (like the CR's), +instead I would return the delimiter as EOF indicator. + +> (And... How about builtin regexes in P2?) + +No. Noo! Please never! :-) +I really hate them from design, and they shouldn't imfluence +Python in any way. What I likemuch better is Marc Lemburg's +tagging engine, which could have been used for this problem. +One should think of a nicer interface, which allows it to +build readable, efficient tagging engines from Python code, +since at the moment, this is a little at the assembly level :-) +All in all, I'd like to express little engines in Python, +but not these ugly undebuggable unreadable flie dirt strings +which they call "regexen". +But that's my private opinion which should not be an attack +to anybody. I just prefer little machines whcih can interact +with Python directly. + +ciao - chris + +-- +Christian Tismer :^) +Applied Biometrics GmbH : Have a break! Take a ride on Python's +Kaiserin-Augusta-Allee 101 : *Starship* http://starship.python.net +10553 Berlin : PGP key -> http://wwwkeys.pgp.net +PGP Fingerprint E182 71C7 1A9D 66E9 9D15 D3CC D4D7 93E2 1FAE F6DF + we're tired of banana software - shipped green, ripens at home + + + + diff --git a/demo/ermis-f/python_m/cur/1424 b/demo/ermis-f/python_m/cur/1424 new file mode 100644 index 00000000..2ddb1dfe --- /dev/null +++ b/demo/ermis-f/python_m/cur/1424 @@ -0,0 +1,58 @@ +From: Friedrich.Dominicus at inka.de (Friedrich Dominicus) +Date: Thu, 15 Apr 1999 07:45:11 +0200 +Subject: for in benchmark interested +Message-ID: <37157CE7.EFB470CA@inka.de> +Content-Length: 2147 +X-UID: 1424 + +Some time ago I have opened a thread about optimization in Python. I +have now done a simple benchmark and used Python for that too. If s.o is +interested, take a look at: http://edt.vol.cz:81/bench + +Any comment is very welcome. I got an answer from the ISE-Eiffel guys +this morning ;-) You might imagine what they think. If any of you have +simular tests, pleas let me know, allow me to put that copy onto that +page. I hope we can found some points which speak for one language under +certain conditions. It would be really helpful if you would include +information about +1) implementation time +2) debug time +3) sort of bug +4) maybe a short estimate how important speed is for that special test + + + +I didn't have done that very detailed. And I now regret that. I just can +give a rought scetch +1) Perl (stolen from an implementation form Markus Mottl on the +OCAML-Mailing-list) +2) OCAML (the same as for Perl) +3) Python first solution < 3 Minutes I guess, If I remember correctly +no bug at all (sheer luck, normally I produce at most on typo ;-)) +4) optimizations (<1 minute each, but the last)(typos) +5) fastest solution (point of discussion in this group so this take +quite some time but not for implementation but discussion) +6) Eiffel sol. Because I didn't know gelex to that time I need some more +time the source was done very fast, but not very Eiffelish. No +assertions and the like + (but all implemantations take me more than a week). Some parts have to +be completely new written (split_string which is of course easy to use +in Python) +7) C. This was not difficult to do after all the other stuff, but I +didn't have a hash-table implementation at hand. Found one in the conde +snippets. But found too bugs in it. So adaption take me quite a while. + +I can't tell how much time I need for debugging. Either estimate would +be much to low (I woul look like a hacker, I'm not) or to high (would +look like an idiot, but who cares ;-) And I'm using a debugger just to +look into the code that I can see if anything works as inteded even +without a direct bug. I don't know if that is good style, but I feel +comfortable with that. + + +Regards +Friedrich + + + + diff --git a/demo/ermis-f/python_m/cur/1425 b/demo/ermis-f/python_m/cur/1425 new file mode 100644 index 00000000..32982fc4 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1425 @@ -0,0 +1,39 @@ +From: movits at lockstar.com (Mordy Ovits) +Date: 09 Apr 1999 09:07:30 PDT +Subject: povray.py +References: <__YN2.30200$FZ5.11443@news.rdc1.sfba.home.com> +Message-ID: <370E4F3E.F9C2CD07@lockstar.com> +Content-Length: 1402 +X-UID: 1425 + +Quinn Dunkan wrote: +> Well, I don't have RenderMan, but I did write a pov.py module. It does +> basically what you described, and eventually I'm going to add animation +> features and basic physics (the ocaml module I wrote before did that) and +> stuff like "magic" transforms that align one object with another, spline +> curves etc. I've designed some scenes in it, and it's wordier than pov, but +> has all the benefits of a real language. It doesn't do the new halo syntax +> because the pov people have yet to release an updated unix version +> (grumblegripegrunt). It's incomplete, and written when I was first learning +> python, and I haven't worked on it for a while, but I'll send it to anyone +> interested. Perhaps we could collaborate? + +I'd like a copy of your pov.py module, please. I'm an experienced Python +programmer, and raytracing hobbyist. If I made any additions to it, I'd gladly +send them along to you. +Thanks! +Mordy +-- +o Mordy Ovits +o Cryptographic Engineer +o LockStar Inc. +--------------------------------------------------------------------------- +#!/usr/local/bin/python +from sys import*;from string import*;a=argv;[s,p,q]=filter(lambda x:x[:1]!= +'-',a);d='-d'in a;e,n=atol(p,16),atol(q,16);l=(len(q)+1)/2;o,inb=l-d,l-1+d +while s:s=stdin.read(inb);s and map(stdout.write,map(lambda i,b=pow(reduce( +lambda x,y:(x<<8L)+y,map(ord,s)),e,n):chr(b>>8*i&255),range(o-1,-1,-1))) + + + + diff --git a/demo/ermis-f/python_m/cur/1426 b/demo/ermis-f/python_m/cur/1426 new file mode 100644 index 00000000..606d9ad6 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1426 @@ -0,0 +1,44 @@ +From: Norbert.Klamann at pobox.com (Norbert.Klamann at pobox.com) +Date: Wed, 28 Apr 1999 05:28:28 GMT +Subject: Designing Large Systems with Python +References: +Message-ID: <7g669p$aer$1@nnrp1.dejanews.com> +X-UID: 1426 + +In article , + David Steuber wrote: + +> Meanwhile, languages like Ansi Common Lisp have had features that +> allow you to prototype and build a large system at the same time. +> That is, the specification of the system becomes the system. + +A good principle for this would be 'Design by Contract'. + +The ideal language for that IMHO would be Eiffel. +See http://www.eiffel.com/doc/manuals/language/intro/ +for an introduction by the inventor of the language, Bertrand Meyer +see also +http://www.eiffel-forum.org/ +and the links at http://www.elj.com/ + +> People +> have done the same thing with Visual Basic, so I am told. +> +Very bad idea, as already pointed out + +> +So long ! + +Norbert +-- +Norbert Klamann +Klamann Software & Beratung +Erftstadt Germany +Klamann.Software at pobox.com + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/1427 b/demo/ermis-f/python_m/cur/1427 new file mode 100644 index 00000000..5e516c66 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1427 @@ -0,0 +1,33 @@ +From: r.hooft at euromail.net (Rob Hooft) +Date: Fri, 16 Apr 1999 12:30:12 GMT +Subject: Pmw: Fooling around with the busy window stack. +Message-ID: <14103.11604.912185.852847@octopus.chem.uu.nl> +X-UID: 1427 + +I've been trying to fool around a bit with the Pmw busy window stack, +but I can't manage without some help.... + +I have an application of which the main window is a PmwDialog. In the +dialog window there are a number of variables that can be edited by +the user. All user changes are sent in command form over a pipe to a +subprocess (using subproc.py), which is controlled by a CLI. The +output of the CLI is shown in a different Toplevel window in a +PmwScrolledText widget. + +My question to you: How can I avoid the ScrolledText widget from being +blocked by the blt_busy system during the active phase of the PmwDialog? +Is there a way to selectively release the lock on a specified Toplevel? + +Regards, + +Rob Hooft. + +-- +===== R.Hooft at EuroMail.net http://www.xs4all.nl/~hooft/rob/ ===== +===== R&D, Nonius BV, Delft http://www.nonius.nl/ ===== +===== PGPid 0xFA19277D ========================== Use Linux! ========= + + + + + diff --git a/demo/ermis-f/python_m/cur/1428 b/demo/ermis-f/python_m/cur/1428 new file mode 100644 index 00000000..ef9e4b39 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1428 @@ -0,0 +1,40 @@ +From: olipt at mayo.edu (Travis Oliphant) +Date: Tue, 20 Apr 1999 14:01:22 -0500 +Subject: Bit Arrays +In-Reply-To: <7fi9i8$n2u$1@info3.fnal.gov> +References: <7fi9i8$n2u$1@info3.fnal.gov> +Message-ID: +X-UID: 1428 + +> Hello all, +> +> I want to write a python program that has 26 Bit Arrays that each contain +> 1113 bits. Is there a structure in python that one can use to represent a +> bit array? +> +> Laura Paterno + +This could be done in a variety of ways. It depends on what you want to +do with the bit arrays. + +Python has a bitwise OR (|), a bitwise AND (&), and a bitwise XOR (^) +operator so you could easily make a Bit Array class that does what you +need to do from either a list object, and array object, or the Numeric +extenstions (multi)array object. + +If you use the Numeric extensions I have C-methods called packbits and +unpackbits in a module called numpyio as part of the signaltools package +at http://oliphant.netpedia.net/ that take 2-D arrays of 1's and 0's and +pack them into 8-bit bytes. This may be overkill for you, though. + + +Sincerely, + + +Travis + + + + + + diff --git a/demo/ermis-f/python_m/cur/1429 b/demo/ermis-f/python_m/cur/1429 new file mode 100644 index 00000000..8e9ebe8e --- /dev/null +++ b/demo/ermis-f/python_m/cur/1429 @@ -0,0 +1,52 @@ +From: scrompton at quantisci.co.uk (Stephen Crompton) +Date: Thu, 15 Apr 1999 16:24:38 +0100 +Subject: timezone stuff driving me bonkers!!! +Message-ID: <371604B6.C6267011@quantisci.co.uk> +Content-Length: 1040 +X-UID: 1429 + +Pretty obvious from the header I guess. + +I want to convert from a UTC tuple to the time since the epoch. As far +as I can tell this should definitely be timezone, DST, etc. independent. +However, there is a notable absence of this functionality in the time +module (presumably due to C library absences ?) + +Anyway, I keep seeing mention that + +time.mktime(tpl)-time.timezone - (1) + +should work if the timezone is working correctly, + +but why isn't it + +time.mktime(tpl)-time.altzone ? - +(2) + +I merely observe that + + time.mktime(time.localtime(time.time())) + +is (near enough) time.time() + +So, surely in the above example (1), tpl would have to be in localtime +for the above to make sense. Writing as somebody who is currently +observing DST (UK), this is clearly the case as time.timezone = 0. + +So, entering a UTC tuple in (1) would not give me the equivalent of +time.time() !! (though (2) would) + +Somebody must be able to point out a flaw in my logic ? + +Cheers, + +Steve. + + + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1430 b/demo/ermis-f/python_m/cur/1430 new file mode 100644 index 00000000..dcba66c3 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1430 @@ -0,0 +1,53 @@ +From: spamfranke at bigfoot.de (Stefan Franke) +Date: Tue, 13 Apr 1999 15:24:21 GMT +Subject: ZopeHTTP speed problem. +References: <7etton$j4q$1@nnrp1.dejanews.com> +Message-ID: <371358fb.4741377@news.omnilink.de> +Content-Length: 1408 +X-UID: 1430 + +[This is a crossposting from c.l.p to the zope at zope.org mailing list, +since it contains a problem report and a proposal/question +concerning both] + +On Mon, 12 Apr 1999 22:57:32 GMT, befletch at my-dejanews.com wrote: + +[...] +> I found I have to use +>my machine's numeric IP address, not 'localhost' as the docs indicate. + +Do you get the long response times even *with* using your +localhost's IP address? + +I once had a similar problem with response times even up to +a minute for each HTTP request, and I found out that it was +due to the logging mechanism in the standard library's +BaseHTTPServer.py: + +BaseHTTPRequestHandler.log_message calls the +address_string function, which does a reverse name lookup +of the request's IP address. If neither yout DNS nor the +etc/hosts table (it lives in \WINNT\system32\drivers\etc\hosts +on a NT machine, don't know about 95/98) are configured +correctly, timeouts occur on each request. + +There are two calls to address_string in Zope, one in +BaseHTTPRequestHandler.log_message and one in +ZopeHTTPServer.BoboRequestHandler.get_environment + +Both can be changed to self.client_address[0], so that +only IP addresses are used for logging and the +REMOTE_HOST environment variable is never set. + +What I would appreciate is to make this behaviour +configurable, but it would require changes to both +BaseHTTPRequestHandler and BoboRequestHandler. + +Any ideas? + +Stefan + + + + + diff --git a/demo/ermis-f/python_m/cur/1431 b/demo/ermis-f/python_m/cur/1431 new file mode 100644 index 00000000..8e6dc311 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1431 @@ -0,0 +1,48 @@ +From: arw at ifu.net (arw) +Date: Fri, 9 Apr 1999 18:14:00 GMT +Subject: GadFly - MemoryError +Message-ID: <199904091818.OAA01334@ifu.ifu.net> +Content-Length: 1294 +X-UID: 1431 + +Sorry to reply again, but I replied a bit too quickly last +time. + +Could it be that a large number (say 1000) records +have a default URL value of the null string generating +1000000 matching record pairs? this would explain the +behavior you see. In this case rewriting the query is in order +see below. + +----Original Message----- + >From: Oleg Broytmann + > I freed some memory and the program worked. It ate 30 Megs while running, + >so I was in need of memory. But it ran 30 minutes (on 3000 rows!) + +My feeling is that you are not using gadfly appropriately. +For example if what you want is to identify rows with matching +urls a join is not the best way to do it by far. Try this method +instead. + + select * from bookmarks order by url, recno + +This query also should be fairly fast. + +Take the result of that query and loop through it +in a python "for" loop to find the matching urls grouped together +in the sequence. This is the way I'd recommend you do it +using gadfly, oracle, sybase, mysql, etc... + +You can also potentially use "group by URL" with max() or +min() to good effect, depending on what you want. + +Sorry for the fuss and Best regards, Aaron Watters + +=== +Please come back another day, and another person. + -- from a story told by Erdos + + + + + diff --git a/demo/ermis-f/python_m/cur/1432 b/demo/ermis-f/python_m/cur/1432 new file mode 100644 index 00000000..318f43c6 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1432 @@ -0,0 +1,45 @@ +From: Michael.Scharf at kosmos.rhein-neckar.de (Michael Scharf) +Date: Fri, 23 Apr 1999 00:32:54 +0200 +Subject: Programming variability experiment [was: Re: Pointers to variables] +References: <19990422121403.A279051@vislab.epa.gov> +Message-ID: <371FA396.B8194FB0@kosmos.rhein-neckar.de> +Content-Length: 1036 +X-UID: 1432 + +Randall Hopper wrote: +> How can I cause a reference to the variables to be stored in the tuples +> instead of their values? + +Impressive! All four solutions look the same! + +This reminds me of an experiment I would like +to see: + +- Take a few simple (scripting) problems. +- Give it to some (3,5,10,100 the more the better) + programmers with different levels of experience. +- Let them write little programs and tell them + they should find a simple solution + (no optimization tricks, no unnecessary + generalizations etc.). +- Do this for different languages and compare + the variability and readability (by letting a + control group try to read and understand the + code) of the solutions. + +This would be another quality criterion for +languages. It would be also interesting how +the solutions of experienced programmers +differ from beginners (for one language). + + +Michael +-- + ''''\ Michael Scharf + ` c-@@ TakeFive Software + ` > http://www.TakeFive.com + \_ V mailto:Michael_Scharf at TakeFive.co.at + + + + diff --git a/demo/ermis-f/python_m/cur/1433 b/demo/ermis-f/python_m/cur/1433 new file mode 100644 index 00000000..d8aff77b --- /dev/null +++ b/demo/ermis-f/python_m/cur/1433 @@ -0,0 +1,49 @@ +From: bwarsaw at cnri.reston.va.us (Barry A. Warsaw) +Date: Thu, 29 Apr 1999 11:36:16 -0400 (EDT) +Subject: Emacs' python-mode buggy? +References: <7g8np4$kvf@chronicle.concentric.net> + <000901be9203$b4c32e40$199e2299@tim> +Message-ID: <14120.31856.181562.574382@anthem.cnri.reston.va.us> +Content-Length: 1100 +X-UID: 1433 + +>>>>> "TP" == Tim Peters writes: + + | """ + | "Hi!" I'm a doc string + | """ + + TP> Emacs "sees" it as a sequence of 4 strings with some crap in + TP> the middle: + + | "" + | "\n " + | Hi! + | " I'm a doc string\n " + | "" + + TP> elisp is too slow to do the character-at-a-time parsing that + TP> would be needed to fix cases like this, so-- like all other + TP> language modes --pymode settles for what it can get. AFAIK it + TP> should *never* screw up in the absence of triple-quoted + TP> strings, though, and you can help it make sense of those by + TP> pretending you're the Emacs C parsing function, using + TP> judicious backslash escapes until you stop confusing yourself + TP> . + +Try something like the following for fun + +-------------------- snip snip -------------------- +'''Hey! I thought I warned you. +Don't even think about it! +''' +# yikes! Emacs thinks this is a string +# add a turd ' +# now we're happy again +-------------------- snip snip -------------------- + +-B + + + + diff --git a/demo/ermis-f/python_m/cur/1434 b/demo/ermis-f/python_m/cur/1434 new file mode 100644 index 00000000..dad95b0a --- /dev/null +++ b/demo/ermis-f/python_m/cur/1434 @@ -0,0 +1,74 @@ +From: arcege at shore.net (Michael P. Reilly) +Date: Mon, 12 Apr 1999 17:56:33 GMT +Subject: extending questions +References: <371220AD.6C3B0B5@home.com> +Message-ID: +Content-Length: 1985 +X-UID: 1434 + +Jim Meier wrote: +: I have two questions, one simple, one a little bit whiny. + +: Firstly, I'm looking for a quick and easy way for a PyCFunction to +: accept as an argument either an integer or a floating point number, so +: that the function can be called as + +: func(1,1,1) + +: or as + +: func(0.5,0,2/3) + +: because python doesn't seem to let me consider an integer as a float. +: I've tried using some of the conversion functions in the abstract +: numeric suite and the PyFloat_GetDouble (or some similar name), but with +: no luck - it always returned -1 for me. Any ideas? + +My best suggestion would be to use the PyInt_Check and PyFloat_check +functions. + + PyObject *func(PyObject *self, PyObject *args) + { PyObject *arg1, *arg2, *arg3; + double a1, a2, a3; + + if (!PyArg_ParseTuple(args, "OOO", &arg1, &arg2, &arg3)) + return NULL; + /* get the double from the first argument */ +#define py_to_double(a, var) \ + if (PyInt_Check(a)) (var) = (double)PyInt_AS_LONG(a); \ + else if (PyFloat_Check(a)) (var) = PyFloat_AS_DOUBLE(a); \ + else { PyErr_SetString(PyExc_TypeError, "must supply a number"); \ + return NULL; } + + py_to_double(arg1, a1); + py_to_double(arg2, a2); + py_to_double(arg3, a3); +#undef py_to_double + +: Also, ust a suggestion, but would it be possible to add a +: PyNumber_GetDouble(PyObject*n) function to the absract numberic +: interface? This would be useful for this sort of situation. + +There already is a PyNumber_Float(PyObject *) function; since the +purpose of the PyNumber_* functions is to make abstract numbers (classes, +builtins, etc.), you don't want to assume it is a double, but to +coerce it into a double. + + PyObject *temp; + double result; + + if ((temp = PyNumber_Float(number)) != NULL) { + result = PyFloat_AS_DOUBLE(temp); + Py_DECREF(temp); + } else + return NULL; + +This is the same as "result = float(number)" in python, except that you +get the C result. + + -Arcege + + + + + diff --git a/demo/ermis-f/python_m/cur/1435 b/demo/ermis-f/python_m/cur/1435 new file mode 100644 index 00000000..d67577eb --- /dev/null +++ b/demo/ermis-f/python_m/cur/1435 @@ -0,0 +1,20 @@ +From: loewis at informatik.hu-berlin.de (Martin von Loewis) +Date: 26 Apr 1999 13:08:59 +0200 +Subject: Beginner Needs Help Compiling/Running Module +References: <3723a436.9965940@news.earthlink.net> +Message-ID: +X-UID: 1435 + +pfjakub at earthlink.net (Peter Jakubowicz) writes: + +> When I am in that directory I try to invoke python by typing python +> MyModule.py and an command line arguments, as in Java, but +> apparently I cannot do this. Alternatively, when I have the python +> window console open I cannot get at my module at all, tho I can +> invoke the python interpreter. + +Both methods should work. What are the error messages you see? + + + + diff --git a/demo/ermis-f/python_m/cur/1436 b/demo/ermis-f/python_m/cur/1436 new file mode 100644 index 00000000..67834542 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1436 @@ -0,0 +1,35 @@ +From: martinb at talx.com.no.spam (Martin Bertolino) +Date: Thu, 8 Apr 1999 09:19:01 -0500 +Subject: COM Event Sinks and Connection Points in Python +References: <7eggfh$o0f$1@nnrp1.dejanews.com> <7egnl2$ca5$1@m2.c2.telstra-mm.net.au> +Message-ID: <7eie3h$sr$1@newsin-1.starnet.net> +X-UID: 1436 + +Some of COM features (especially when running in a Single Threaded Apartment +(STA)) depend on the application having an event loop. I have not looked at +the sources for PythonWin, but I have looked at the Python ones, and I did +not see any event loop servicing the event queue. This would explain why you +don't see the fired events. + +Martin + +Mark Hammond wrote in message <7egnl2$ca5$1 at m2.c2.telstra-mm.net.au>... +> +>cingram at my-dejanews.com wrote in message +><7eggfh$o0f$1 at nnrp1.dejanews.com>... +>>I am trying to use functionality from a DLL that requires me to create a +>COM +>>event sink so that it can call back with events. I am trying to write +this +> +>There appears to be some problem using connection points from Python.exe. +> +>Events seem a black art. Im happy to help you track this down, but I +havent +>much time... + + + + + + diff --git a/demo/ermis-f/python_m/cur/1437 b/demo/ermis-f/python_m/cur/1437 new file mode 100644 index 00000000..6be6b3af --- /dev/null +++ b/demo/ermis-f/python_m/cur/1437 @@ -0,0 +1,28 @@ +From: fm at synchrologic.com (fm at synchrologic.com) +Date: Sat, 24 Apr 1999 11:28:58 GMT +Subject: GUI other than Tkinter (wxPython) +References: <3721567f.1748033@news> +Message-ID: <7fs9to$rlr$1@nnrp1.dejanews.com> +X-UID: 1437 + +I am a real big fan of wxPython. I've gotten everyone at our company hooked on +it. We use it for prototyping apps now because it's so much faster than any +other tool (that is, VB). It has a full set of controls (tree, list, grid). +Actually, wxWindows on which it's based is pretty nice as well (though C++ +requires 10-20 times more typing). Check out http://www.alldunn.com/wxPython/ +and http://web.ukonline.co.uk/julian.smart/wxwin/. I think you'll be pretty +happy with it. Good luck. + +In article <3721567f.1748033 at news>, + mrfusion at bigfoot.com wrote: +> Well, I've just about given up on EVER getting Tkinter to work on my +> Win98 machine. Is there any other GUI module that I can get that +> doesn't require TCL/TK to be installed on my machine? Isn't there +> something called GD? + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/1438 b/demo/ermis-f/python_m/cur/1438 new file mode 100644 index 00000000..e87eaac2 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1438 @@ -0,0 +1,26 @@ +From: annis at biostat.wisc.edu (William Annis) +Date: 29 Apr 1999 14:53:25 -0500 +Subject: SWIGgy Goodness, or, Where to Install Software +Message-ID: +X-UID: 1438 + + I'm currently polishing up a module which is an interface to +the Solaris kstat(3k) interface. Those people who get giddy at the +idea of computing a machine's load by hand or pondering the minutiae +of kernel memory allocation statistics will like this module. + + However, one of the things I'm trying to make more pleasant is +the installation. The module will require the installation of two +files: one in Python, and one a .so (dynamic library). Do I put both +in the PREFIX../site-packages directory, or should I put the .so with +the rest in PREFIX../lib-dynload? Or, is lib-dynload supposed to be +reserved for modules bunlded with the core distribution? + +-- +William Annis - System Administrator - Biomedical Computing Group +annis at biostat.wisc.edu PGP ID:1024/FBF64031 +Mi parolas Esperanton - La Internacia Lingvo www.esperanto.org + + + + diff --git a/demo/ermis-f/python_m/cur/1439 b/demo/ermis-f/python_m/cur/1439 new file mode 100644 index 00000000..1c97ebe9 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1439 @@ -0,0 +1,31 @@ +From: garryh at att.com (Garry Hodgson) +Date: Fri, 9 Apr 1999 17:45:07 GMT +Subject: Is Python Dying? +References: <370D36ED.8A270DE9@ome.com> +Message-ID: <370E3CA3.951C2DE5@att.com> +X-UID: 1439 + +John Grayson wrote: + +> I don't know about *that* one, but I can say there are two new Python +> books on the way from Manning Publications. +> +> Ken MacDonald's "The Quick Python Book" has been through its reviews and +> has been revised. Right now it is in final technical review and once +> complete the Publisher will begin production... +... +> I'm at various stages of completion of chapters for "Python and Tkinter +> Programming", which has just completed a review of the partial +> manuscript... + +is there a timeline for either of these release yet? + +-- +Garry Hodgson seven times down +garry at sage.att.com eight times up +Software Innovation Services +AT&T Labs - zen proverb + + + + diff --git a/demo/ermis-f/python_m/cur/1440 b/demo/ermis-f/python_m/cur/1440 new file mode 100644 index 00000000..cba09534 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1440 @@ -0,0 +1,34 @@ +From: olipt at mayo.edu (Travis Oliphant) +Date: Sat, 10 Apr 1999 10:47:43 -0500 +Subject: Idiom for Getting Slices of a List +In-Reply-To: +References: +Message-ID: +X-UID: 1440 + +> I want a clean, and relatively efficient method to do the following: +> I have an array of length, n*m and I want to make it an array of +> length m, where each member is an array of length n. +> +> Example: n=2, m=3 +> [0, 1, 2, 3, 4, 5] ==> [[0, 1], [2, 3], [4, 5]] + +If you have the Numeric extension: + +from Numeric import reshape + +>>> d = [0,1,2,3,4,5] +>>> n,m = 2,3 +>>> f = reshape(d,(m,n)).tolist() +>>> print f +[[0, 1], [2, 3], [4, 5]] + +Best, + +Travis Oliphant + + + + + + diff --git a/demo/ermis-f/python_m/cur/1441 b/demo/ermis-f/python_m/cur/1441 new file mode 100644 index 00000000..28b50f60 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1441 @@ -0,0 +1,35 @@ +From: akuchlin at cnri.reston.va.us (Andrew M. Kuchling) +Date: Fri, 30 Apr 1999 10:49:00 -0400 (EDT) +Subject: pil vs gd +In-Reply-To: <37299C02.4095E584@vic.bigpond.net.au> +References: <37299C02.4095E584@vic.bigpond.net.au> +Message-ID: <14121.47115.859663.399018@amarok.cnri.reston.va.us> +X-UID: 1441 + +John Leach writes: +>gd does what I need; but in order to get some sort of context - does pil +>provide, or is intended to provide one day, a superset of gd - or are +>they separate beasts? + + PIL is far more powerful than gd, and is aiming at a more +ambitious target; it can handle formats other than GIF, for a +start. PIL can also do image-processing things like adjusting image +brightness or contrast, blurring or sharpening, and all that sort of +thing. + +>Can pil for example create gif images from text? And with a choice of +>fonts? + + Yes, but the font support isn't very well-documented, at least +in 1.0b1, so learning to use it requires poking around in the source +code. + +-- +A.M. Kuchling http://starship.python.net/crew/amk/ +You shouldn't trust the story-teller; only trust the story + -- The grandfather in SANDMAN #38: "The Hunt" + + + + + diff --git a/demo/ermis-f/python_m/cur/1442 b/demo/ermis-f/python_m/cur/1442 new file mode 100644 index 00000000..d4eaba9d --- /dev/null +++ b/demo/ermis-f/python_m/cur/1442 @@ -0,0 +1,22 @@ +From: larsga at ifi.uio.no (Lars Marius Garshol) +Date: 09 Apr 1999 19:04:13 +0200 +Subject: Lexical analyzers and parsers +References: <7jn20jmxsw.fsf@gandalf.midearth.fuzzys.org> <14092.48400.954787.617539@amarok.cnri.reston.va.us> +Message-ID: +X-UID: 1442 + +* Andrew M. Kuchling +| +| There are actually a bunch of different systems available; see +| http://starship.python.net/crew/amk/python/string.html#parsing for a +| list. (If I've missed any, let me know.) + +TRAP was recently announced: + + + +--Lars M. + + + + diff --git a/demo/ermis-f/python_m/cur/1443 b/demo/ermis-f/python_m/cur/1443 new file mode 100644 index 00000000..9618a6cb --- /dev/null +++ b/demo/ermis-f/python_m/cur/1443 @@ -0,0 +1,29 @@ +From: JamesL at Lugoj.Com (James Logajan) +Date: Mon, 26 Apr 1999 19:59:34 -0700 +Subject: Python too slow for real world +References: <372068E6.16A4A90@icrf.icnet.uk> <3720A21B.9C62DDB9@icrf.icnet.uk> <3720C4DB.7FCF2AE@appliedbiometrics.com> <3720C6EE.33CA6494@appliedbiometrics.com> <37215EFB.433AFCA6@prescod.net> <3724B2D6.B468687A@prescod.net> +Message-ID: <37252816.42634501@Lugoj.Com> +X-UID: 1443 + +Roy Smith wrote: +[elided] +> I hope this doesn't sound as bad as I fear it might, but part of being a +> good programmer (or at least a good computer scientist) is to understand +> performance issues like this. +[elided] + +I disagree with the assumption behind that statement. The assumption Roy +makes is that only trained programmers or computer scientists will be using +a tool like Python. I believe the audience that would benefit most from an +easy to use language like Python are "Subject Matter Experts" (SMEs). An SME +knows their field (e.g. accountant, biologist, physicist, network manager, +etc.) and may find need to automate or compute something whose scope or size +does not justify calling in a computer programmer or scientist. This is +where a simple to learn language such as Python finds a ready home. + +When an SME finds the tool too slow, it would be nice if they could post +their problem to a group like this without fear of insult, intended or not. + + + + diff --git a/demo/ermis-f/python_m/cur/1444 b/demo/ermis-f/python_m/cur/1444 new file mode 100644 index 00000000..e0be0fcf --- /dev/null +++ b/demo/ermis-f/python_m/cur/1444 @@ -0,0 +1,43 @@ +From: aaron_watters at my-dejanews.com (aaron_watters at my-dejanews.com) +Date: Mon, 12 Apr 1999 13:52:53 GMT +Subject: Help (PLEASE) CGI on 98/NT +References: <370E9024.6D256DE8@bullfrog-tech.com> +Message-ID: <7estrh$m0f$1@nnrp1.dejanews.com> +Content-Length: 1171 +X-UID: 1444 + +In article <370E9024.6D256DE8 at bullfrog-tech.com>, + manus at python.net wrote: +> I had my Win95 Personal Web Server (PWS) up and running +> just fine, having merely followed the simple instructions on +> Aaron's pws.html page at the starship. +> +> So they go and give me a 98 machine. Well, it has PWS, so +> you'd THINK it'd work if I did the same thing. Nope. +> +> I get "500 Server Error" and NO other help from Mr. Gates. + +Generally, whatever works for Perl should work for Python also +with few changes. Maybe take a look at this + + http://www.DynamicNet.net/support/fp/perlwithPWS.htm + +And lemme know if anything there helps, or search around using +dejanews, microsoft.com, lycos etc. for additional help, keywords="perl...". + +When you fix it propose patches to +my page, please (or, I think there was a python-cgi faq somewhere +that could be updated too). The problem may have to do with +mime type registration... +-- Aaron Watters + +=== +q: What do you call a drummer who's split with his girlfriend? +a: homeless. + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/1445 b/demo/ermis-f/python_m/cur/1445 new file mode 100644 index 00000000..f4f0710b --- /dev/null +++ b/demo/ermis-f/python_m/cur/1445 @@ -0,0 +1,17 @@ +From: downstairs at home.com (TM) +Date: Mon, 05 Apr 1999 06:46:18 GMT +Subject: povray.py +Message-ID: <__YN2.30200$FZ5.11443@news.rdc1.sfba.home.com> +X-UID: 1445 + +Has anyone created a pov ray module for python? + +Thanks, +Tom + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1446 b/demo/ermis-f/python_m/cur/1446 new file mode 100644 index 00000000..cb607d8d --- /dev/null +++ b/demo/ermis-f/python_m/cur/1446 @@ -0,0 +1,61 @@ +From: kajiyama at grad.sccs.chukyo-u.ac.jp (Tamito Kajiyama) +Date: 12 Apr 1999 19:29:03 GMT +Subject: Python 1.5.2c1 -- What if long long not supported? +In-Reply-To: Guido van Rossum's message of Fri, 09 Apr 1999 11:21:19 -0400 +References: <199904091521.LAA00858@eric.cnri.reston.va.us> +Message-ID: +Content-Length: 1979 +X-UID: 1446 + +Guido van Rossum writes: +| +| I received a bug report that if the (unnamed) platform doesn't support +| the "long long" type, the configure script dies. The logic in +| configure.in looks correct to me and I don't have any such Unix +| platforms handy myself... Could someone who does investigate whether +| there is truth in this complaint? + +I was able to reproduce this problem on SunOS 4.1.4_JL. + +In the configure script, if the C compiler does not support the "long +long" type, the variable `ac_cv_sizeof_long_long' is not defined. This +variable is referenced later for checking large file support, and the +test command fails due to the lack of the expected argument that follows +the second -a option. That's why the configure script dies. + +The attached is a context diff for fixing the problem. (I'm not +familiar with autoconf, so please consider the way of fixing ;-) + +diff -cr Python-1.5.2c1.orig/configure Python-1.5.2c1/configure +*** Python-1.5.2c1.orig/configure Tue Apr 13 02:16:45 1999 +--- Python-1.5.2c1/configure Tue Apr 13 02:16:08 1999 +*************** +*** 2034,2039 **** +--- 2034,2040 ---- + echo $ac_n "checking for long long support""... $ac_c" 1>&6 + echo "configure:2036: checking for long long support" >&5 + have_long_long=no ++ ac_cv_sizeof_long_long=undefined + cat > conftest.$ac_ext < + + + + diff --git a/demo/ermis-f/python_m/cur/1447 b/demo/ermis-f/python_m/cur/1447 new file mode 100644 index 00000000..2432c7e5 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1447 @@ -0,0 +1,79 @@ +From: alrice at swcp.com (Alex Rice) +Date: Fri, 16 Apr 1999 13:19:39 -0600 +Subject: Zope question +Message-ID: <37178D4B.7D933209@swcp.com> +Content-Length: 2256 +X-UID: 1447 + +Hi, this was a question I posted to the Zope mailing list, but no +responses yet. I'm having trouble getting a source installation of Zope +running on a Cobalt RaQ. TIA for any suggestions you might have! + +Date: Mon, 12 Apr 1999 13:31:56 -0600 (MDT) +Message-Id: <199904121931.NAA22117 at tora.swcp.com> + From: Alex Rice +To: zope at zope.org +Subject: [Zope] Zope startup problems + +Hi, after a great experience with the Zope Linux/x86 binaries, I am now +trying to get a source installation running for the first time, but seem +to have overlooked something. + +This is on a Cobalt RaQ. This is a MIPS processor with Linux +2.0.34. Basically a RedHat box. I built Python 1.5.1 and Zope-1.10.2-src +with no problems. I'm using Apache. When I go to this URL: + +http://zope.swcp.com/Zope/ + +I see Zope.cgi process, then I see in my browser after about 15 sec: + + ! Temporarily Unavailable + The resource you requested is temporarily unavailable - please + try again later. + + (102) failure during connect + + +In /usr/share/zope/var, I have only + + Data.bbb Data.bbb.in + +(pcgi.* seem to be missing?) + +Also, I do not see suspicious entries in apache's access and error logs. +Below is the relevant section in my Apache config. But the rewrite rule +seems to be working since the Zope.cgi process is getting started. Would +really appreciate any suggestions. Thanks! + + +ServerName zope.swcp.com +ServerAdmin admin +DocumentRoot /home/sites/home/web/zope + +ScriptAlias /zope-bin/ /home/sites/home/web/zope/cgi-bin/ + +AllowOverride None +Options FollowSymLinks ExecCGI + + +# Zope configuration maps everything to the Zope.cgi CGI script +RewriteEngine on +RewriteCond %{HTTP:Authorization} ^(.*) +# this is actually all one line: +RewriteRule ^/Zope/(.*) /home/sites/home/web/zope/cgi-bin/Zope.cgi/$1 +[e=HTTP_CGI_AUTHORIZATION:%1,t=application/x-httpd-cgi,l] + + + +Please cc: alrice at swcp.com on your reply since I'm only in the list +digest. TIA + +Alex Rice | alrice at swcp.com | http://www.swcp.com/~alrice + Current Location: N. Rio Grande Bioregion, Southwestern USA + + + + diff --git a/demo/ermis-f/python_m/cur/1448 b/demo/ermis-f/python_m/cur/1448 new file mode 100644 index 00000000..4830f4d6 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1448 @@ -0,0 +1,25 @@ +From: hannu at trust.ee (Hannu Krosing) +Date: Mon, 05 Apr 1999 18:22:49 +0300 +Subject: Python and Qt+KDE +References: <36F940DC.44F08BDF@druga.com> + <7dbtb8$38j$1@nnrp1.dejanews.com> + <7dec78$977$1@Starbase.NeoSoft.COM> + <36FB0C5F.E6CE768D@zarlut.utexas.edu> <199903290118.UAA05150@mira.erols.com> +Message-ID: <3708D549.12844324@trust.ee> +X-UID: 1448 + +"A.M. Kuchling" wrote: +> +> (I'm looking into GUI alternatives to Tkinter, having looked +> at PyGTK, but haven't yet examined PyKDE to any significant degree; +> comments on it would probably be helpful for many people interested in +> writing desktop apps in Python.) + +You should check also wxPython at http://www.alldunn.com/wxPython/ + +------------- +Hannu + + + + diff --git a/demo/ermis-f/python_m/cur/1449 b/demo/ermis-f/python_m/cur/1449 new file mode 100644 index 00000000..6ca9b850 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1449 @@ -0,0 +1,41 @@ +From: moshez at math.huji.ac.il (Moshe Zadka) +Date: Thu, 29 Apr 1999 20:29:45 +0300 +Subject: converting perl to python - simple questions. +In-Reply-To: +References: <000101be8f62$b66e4700$669e2299@tim> +Message-ID: +Content-Length: 1065 +X-UID: 1449 + +On 29 Apr 1999, Randal L. Schwartz wrote: + +> >>>>> "Tim" == Tim Peters writes: +> +> Tim> Perl actually has the same problem, but it's *usually* hidden by "regexp +> Tim> context"; e.g.; + + +> Yes, Perl is heavily context sensitive... and so are human beings. :) + +I wonder if Randal came here (2 messages in this group) to spread the +regular Perl propaganda (summarized by "This language is icky because +programmers are icky").... + +Randal, while I'm sure you're a good guy, and I liked ``Learning Perl'', +most of us at c.l.py heard more about Perl then we'll ever want to -- +in fact, I think many of us moved to Python from Perl, and never looked +back. (Or we'd turn into salt) + +(And hey, Randal, when you wake up and start using Python, I'm sure you'll +be one of the best c.l.py posters <0.5 wink>) + +and-one-day-larry-wall-will-help-maintain-python-too-ly y'rs, Z. +-- +Moshe Zadka . +QOTD: My own exit is more likely to be horizontal then perpendicular. + + + + + + diff --git a/demo/ermis-f/python_m/cur/1450 b/demo/ermis-f/python_m/cur/1450 new file mode 100644 index 00000000..eb12db5a --- /dev/null +++ b/demo/ermis-f/python_m/cur/1450 @@ -0,0 +1,30 @@ +From: kernr at mail.ncifcrf.gov (Robert Kern) +Date: Sun, 04 Apr 1999 20:09:15 -0400 +Subject: plea for kjbuckets for pywin +References: <7e8hds$5i7$1@nnrp1.dejanews.com> +Message-ID: <3707FF2B.874E95C9@mail.ncifcrf.gov> +X-UID: 1450 + +bgue at my-dejanews.com wrote: +> +> Has anybody compiled kjbuckets against Pywin 1.5 or 1.5.1, and if so, could I +> trouble you for a copy? I lack a compiler on my Windows partition. + +http://www.chordate.com/kwParsing/kjbuckets.pyd + +> Thanks, +> +> Brian + +You're welcome. + +-- +Robert Kern | +----------------------|"In the fields of Hell where the grass grows high +This space | Are the graves of dreams allowed to die." +intentionally | - Richard Harter +left blank. | + + + + diff --git a/demo/ermis-f/python_m/cur/1451 b/demo/ermis-f/python_m/cur/1451 new file mode 100644 index 00000000..ab86b7df --- /dev/null +++ b/demo/ermis-f/python_m/cur/1451 @@ -0,0 +1,80 @@ +From: stadt at cs.utwente.nl (Richard van de Stadt) +Date: Mon, 26 Apr 1999 14:29:58 +0200 +Subject: Kosovo database; Python speed +References: <371DAAC2.D9046550@cs.utwente.nl> <371DB480.32947654@appliedbiometrics.com> +Message-ID: <37245C46.C13AAB62@cs.utwente.nl> +Content-Length: 2739 +X-UID: 1451 + +Christian Tismer wrote: +> +> Richard van de Stadt wrote: +> > +> > Suppose we were going to make a database to help Kosovars locate +> > their family members. This would probably result in hundreds of +> > thousands of records (say 1 record (file) per person). +> > +> > Would Python be fast enough to manage this data, make queries on +> > the data, or should compiled programs be used? +> +> Dependant of the operating system, I'd suggest to use a +> database extension. +> Controlling this database from Python will give you +> enough speed. If I had to do this, my preferences are +> +> mySQL for Linux, with its interface, +> MS-Access for Windows, with a COM interface. +> +> The latter is not since I like it so much, but we have +> used it before, and the interfaces are there. +> +> Since the Kosovars need help quickly, I'd use this combination +> instead of writing something special. + +I developed a system over the last few years which allows online +paper submission and retrieval, which we expect can quite easily +be transformed and reused to create a first prototype. On an old +system (SS10, 128MB RAM), Python is able to copy a test file +about 25000 times per minute, so I expect Python to be fast +enough, but wondered if other projects exist which also use +several 100.000's of records. + +> Python alone will not +> be too easy, since your data will probably not fit into memory. + +We were donated a system that is, I think, used for videoconferencing. +This probably is a Sun system, running Solaris, with Python 2.5.1 +available. I expect at least .5 GB of RAM. + +> You will also have lots of edits, so I think using a true +> database is the better choice here. (Not saying that Access is +> a true database, but it works fine with several 100000 records). +> +> But two single columns with a name and a record ID will fit, +> so your code might extract this info as a whole, map it to a dict +> and search it in some sophisticated manner. This can be even faster +> than the database. +> Do you have more info on the amount of data, fields per record, +> and what search capabilities are needed? Is it designed as a web +> based application? Are there on-line updates and such? + +We intend to store any data that might be helpful, which includes photos. +Online submissions may not always be possible from within the camps, +but as refugees are being spread all over Europe, we think that it +could be used more often. + +We'd like to collect existing databases, merge them, and provide all +kinds of name matching possibilities. Offline consulting and submission +should also be available, so probably there Access might then be used. + +> ciao - chris +> +> -- +> Christian Tismer :^) +[...] + +Richard. + + + + diff --git a/demo/ermis-f/python_m/cur/1452 b/demo/ermis-f/python_m/cur/1452 new file mode 100644 index 00000000..52d595cc --- /dev/null +++ b/demo/ermis-f/python_m/cur/1452 @@ -0,0 +1,57 @@ +From: stephan at pcrm.win.tue.nl (Stephan Houben) +Date: 29 Apr 1999 15:49:55 +0200 +Subject: HTML "sanitizer" in Python +References: +Message-ID: +Content-Length: 1629 +X-UID: 1452 + +"Scott Stirling" writes: + + +> 1) What is the Python syntax for opening a file in MS Windows? I was following Guido's tutorial yesterday, but I could not figure out how to open a file in Windows. + +??? I don't think it's different on windows than on linux. +Just do: + +f = open("my_file.html", "rt") + +(OK, there *is* a difference, I guess; you really need the "t" in "rt". + Otherwise the carriage returns show up in your file.) + +> 2) How do I find a string of text in the open file and delete it iteratively? + +Check out the "string" module. + +> 3) How do I save the file in Windows after I have edited it with the Python program? How do I close it? + +Well you open a second file, for writing this time: + f2 = open("output.html", "wt") + +Then you write to it to your heart's content: + f2.write("blahblahblah") + +Then you close it: + f2.close() + +But all this is in the Python docs, so perhaps you should try to read them. + +> 4) If someone helps me out, I think I should be able to use this info. and the tutorial and the Lutz book to loop the process and make the program run until all *.htm files in a folder have been handled once. + +Well, if I understand correctly, the *only* thing you're trying to do +is to remove some specific strings from a bunch of files. Now if I +were you, I wouldn't even bother to use Python on something that +simple; I would just use sed. With sed, you could do: + + sed 'g/string_to_be_eliminated//g' my_file.html > output.html + +Presto, that's it. I think that there is a version for GNU sed for +Windows somewhere out there; do yourself a favour and get it. + +Greetings, + +Stephan + + + + diff --git a/demo/ermis-f/python_m/cur/1453 b/demo/ermis-f/python_m/cur/1453 new file mode 100644 index 00000000..72660957 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1453 @@ -0,0 +1,24 @@ +From: retrev at razor (Trevor Clarke) +Date: 23 Apr 1999 17:29:19 GMT +Subject: Pythonized Shell +Message-ID: +X-UID: 1453 + +Here it is....another Pythonized shell....this one is really simple(for now at +least). It reads input from stdin and try's to eval() it. If that fails, it +try's to exec() it. If that fails, it os.system()'s it. It also has support for +simple alias'ing of commands. You can import and cd(1) is part of the +shell(so it actually works :) ) I'm working on a faster C version that will +look a lot like csh(1) except programming is done in python and all the python +interactive interpreter features will be there. Let me know what you think... + +ftp://ftp.csh.rit.edu/csh/retrev/psh +-- +Trevor R.H. Clarke Computer Science House +Rochester Institute of Technology Scientific Programmer for CIS +retrev at csh.rit.edu trcpci at cis.rit.edu +http://www.csh.rit.edu/~retrev/ finger retrev at csh.rit.edu for PGP key + + + + diff --git a/demo/ermis-f/python_m/cur/1454 b/demo/ermis-f/python_m/cur/1454 new file mode 100644 index 00000000..796603c4 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1454 @@ -0,0 +1,73 @@ +From: SSTirlin at holnam.com (Scott Stirling) +Date: Thu, 29 Apr 1999 12:20:27 -0400 +Subject: HTML "sanitizer" in Python +Message-ID: +Content-Length: 2606 +X-UID: 1454 + +On opening files in Windows--I was hoping there was a way to give python the full file path. Everything I have seen so far just tells me how to open a file if it's in the same directory I am running python from. + +I don't have sed on my MS Windows PC at work. This was part of the initial explanation--I am working for a company where we have DOS, Windows and Office 97. No sed, no Unix. This is a Y2K Project too, so we are on a budget with little leeway for new ideas that weren't included in the original statement of work and project plan. + +Scott +>>> Stephan Houben 04/29 9:49 AM >>> +"Scott Stirling" writes: + + +> 1) What is the Python syntax for opening a file in MS Windows? I was following Guido's tutorial yesterday, but I could not figure out how to open a file in Windows. + +??? I don't think it's different on windows than on linux. +Just do: + +f = open("my_file.html", "rt") + +(OK, there *is* a difference, I guess; you really need the "t" in "rt". + Otherwise the carriage returns show up in your file.) + +> 2) How do I find a string of text in the open file and delete it iteratively? + +Check out the "string" module. + +> 3) How do I save the file in Windows after I have edited it with the Python program? How do I close it? + +Well you open a second file, for writing this time: + f2 = open("output.html", "wt") + +Then you write to it to your heart's content: + f2.write("blahblahblah") + +Then you close it: + f2.close() + +But all this is in the Python docs, so perhaps you should try to read them. + +> 4) If someone helps me out, I think I should be able to use this info. and the tutorial and the Lutz book to loop the process and make the program run until all *.htm files in a folder have been handled once. + +Well, if I understand correctly, the *only* thing you're trying to do +is to remove some specific strings from a bunch of files. Now if I +were you, I wouldn't even bother to use Python on something that +simple; I would just use sed. With sed, you could do: + + sed 'g/string_to_be_eliminated//g' my_file.html > output.html + +Presto, that's it. I think that there is a version for GNU sed for +Windows somewhere out there; do yourself a favour and get it. + +Greetings, + +Stephan + +-- +http://www.python.org/mailman/listinfo/python-list + +________________________________________________________________ +Scott M. Stirling +Visit the HOLNAM Year 2000 Web Site: http://web/y2k +Keane - Holnam Year 2000 Project +Office: 734/529-2411 ext. 2327 fax: 734/529-5066 email: sstirlin at holnam.com +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + + + + diff --git a/demo/ermis-f/python_m/cur/1455 b/demo/ermis-f/python_m/cur/1455 new file mode 100644 index 00000000..eb915db8 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1455 @@ -0,0 +1,44 @@ +From: tim_one at email.msn.com (Tim Peters) +Date: Fri, 16 Apr 1999 03:02:20 GMT +Subject: forking + stdout = confusion +In-Reply-To: +References: +Message-ID: <001d01be87b5$8b3529a0$ada22299@tim> +Content-Length: 1209 +X-UID: 1455 + +[Clarence Gardner] +>> Mea culpa. The os.close() *is* still necessary. Is there yet another +>> copy of these file objects? I tried to find that function that returns +>> the reference count, but don't see it in the manual. + +[Michael Hudson] +> It's sys.getrefcount: +> +> Python 1.5.2 (#2, Apr 14 1999, 13:02:03) [GCC egcs-2.91.66 +> 19990314 (egcs-1.1.2 on linux2 +> Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam +> >>> import sys +> >>> sys.getrefcount (sys.stdout ) +> 5 +> +> Five! I don't know where all of those are... + +Two are in sys (sys.stdout & sys.__stdout__), two more are in a hidden copy +of the initial contents of sys used to keep extension modules sane, and the +fifth is-- in effect --a temporary side-effect of passing the object to +sys.getrefcount itself (you may have noticed that sys.getrefcount never +returns a count less than 2!). + +It doesn't matter, though, because unlike file objects you create with +"open", Python won't close the file descriptor underlying the default +binding for sys.stdout (or .stdin or .stderr) even if all references do go +away. Those three file objects are initialized specially (in _PySys_Init). + +2-plus-2-equals-5-and-0-equals-3-ly y'rs - tim + + + + + + diff --git a/demo/ermis-f/python_m/cur/1456 b/demo/ermis-f/python_m/cur/1456 new file mode 100644 index 00000000..c40c9087 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1456 @@ -0,0 +1,49 @@ +From: steve at blighty.com (Steve Atkins) +Date: Sun, 11 Apr 1999 02:42:56 GMT +Subject: Internet Robot +References: <7ehe9m$hbs$1@nnrp1.dejanews.com> <7emldl$rh9$1@nnrp1.dejanews.com> +Message-ID: <37160aeb.268054642@192.168.1.1> +Content-Length: 1359 +X-UID: 1456 + +On 10 Apr 1999 19:53:18 -0500, David Steuber + wrote: + +>gscot at my-dejanews.com writes: + +>-> You mentioned that it might be helpful to capture and look at the client's +>-> out put. How do I do that. +> +>This can be tricky. Idealy, when talking to the server, you want an +>HTTP client that will show you all the headers. When talking to the +>client, you want the server to display all the headers (or send them +>back to the client). I've always done this the hardway. You can + +netcat, 'nc', can be a very handy tool for client debugging. You can +easily setup a microserver that'll dump requests from the client to +the console. It's a standard networking swiss-army tool - it shouldn't +be too hard to find the source code on the 'net (it has versions for +*nix and windows). + +>actually talk to an HTTP server with telnet if you are desperate +>enough. I don't recomend it because one typo and you have to do the +>request over again. + +http://samspade.org/t/safe.cgi is a web based http client that shows +the whole transaction. Handy for initial debugging of servers, and +less painful than telnet. + +>Other people responding mentioned a url package for python. I would +>take a look at that to see just what it can do. It may make the job a +>lot easier. + +Seconded. + +Cheers, + Steve +-- +-- Steve Atkins -- steve at blighty.com + + + + diff --git a/demo/ermis-f/python_m/cur/1457 b/demo/ermis-f/python_m/cur/1457 new file mode 100644 index 00000000..407ff4ad --- /dev/null +++ b/demo/ermis-f/python_m/cur/1457 @@ -0,0 +1,13 @@ +From: blipf at yahoo.com (Flbill Blipf) +Date: Wed, 07 Apr 1999 18:33:09 -0700 +Subject: Tkinter and centering +References: <370B88CF.993D8847@yahoo.com> + <370BC217.FFF53A35@vision.arc.nasa.gov> <370BDBD0.5657AC26@vision.arc.nasa.gov> +Message-ID: <370C0755.940F9AFF@yahoo.com> +X-UID: 1457 + +Thanks guys! + + + + diff --git a/demo/ermis-f/python_m/cur/1458 b/demo/ermis-f/python_m/cur/1458 new file mode 100644 index 00000000..ed3414ab --- /dev/null +++ b/demo/ermis-f/python_m/cur/1458 @@ -0,0 +1,51 @@ +From: tismer at appliedbiometrics.com (Christian Tismer) +Date: Wed, 7 Apr 1999 17:43:24 GMT +Subject: Crappy Software was Re: [OffTopic: Netscape] Re: How should +References: <1288614834-78399188@hypernet.com> +Message-ID: <370B993C.8DFFB4A4@appliedbiometrics.com> +Content-Length: 1405 +X-UID: 1458 + + +Gordon McMillan wrote: +> +> guppy wrote: +> +> > And another kick at Netscape: +> +> +> Having recently ported a sophisticated applet using JNI (Sun's new +> native interface) to JRI (older Netscape) and RNI (older IE), I too +> can kick and scream. + +Same here. In my recent plugin project, I had to support +both Netscape and MSIE. The hard thing was supposed to +be MSIE, Netscape was done last year already. + +But, instead, MSIE had its problems, but porting +the plugin from NS4.0 to NS4.5 took me full 10 days +and nights! They messed such a lot of things up. +Now I can sing a lot of Netscape dll entry points +which I became very accustomed to from my debug sessions! +Code which needed to sens a JavaScript URL to one frame +window caused crashes at random time, and I had to +completely circumvent this. They're going nuts. + +They should rewrite the whole crap, presumably +build it from the bones of Grail :-)) + +> Sheesh. + +Gosh - chris + +-- +Christian Tismer :^) +Applied Biometrics GmbH : Have a break! Take a ride on Python's +Kaiserin-Augusta-Allee 101 : *Starship* http://starship.python.net +10553 Berlin : PGP key -> http://wwwkeys.pgp.net +PGP Fingerprint E182 71C7 1A9D 66E9 9D15 D3CC D4D7 93E2 1FAE F6DF + we're tired of banana software - shipped green, ripens at home + + + + diff --git a/demo/ermis-f/python_m/cur/1459 b/demo/ermis-f/python_m/cur/1459 new file mode 100644 index 00000000..88350bbe --- /dev/null +++ b/demo/ermis-f/python_m/cur/1459 @@ -0,0 +1,13 @@ +From: uffe at data-dealeren.dk (Uffe Koch) +Date: Mon, 19 Apr 1999 12:49:36 GMT +Subject: How alter maximum recurtion depth +Message-ID: <371B2660.ECE4660A@data-dealeren.dk> +X-UID: 1459 + +How do I alter the maximum recursion depth for my Python interpreter? +-- +/Uffe Overgaard Koch + + + + diff --git a/demo/ermis-f/python_m/cur/1460 b/demo/ermis-f/python_m/cur/1460 new file mode 100644 index 00000000..fa589fd0 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1460 @@ -0,0 +1,64 @@ +From: aa8vb at vislab.epa.gov (Randall Hopper) +Date: Mon, 19 Apr 1999 13:50:13 GMT +Subject: Tkinter - the app that wouldn't quit +In-Reply-To: ; from Rob Hooft on Mon, Apr 19, 1999 at 08:42:51AM +0200 +References: <19990416144831.A1548022@vislab.epa.gov> +Message-ID: <19990419095013.A62714@vislab.epa.gov> +Content-Length: 1685 +X-UID: 1460 + +Rob Hooft: + |The problem in your current program appears to be that when your + |application window is destroyed, "root" is still an active window, + |although it is invisible. + | + |The WM_DELETE protocol is never called, because you're not + |"destroying" the window using the window manager. + +Ok. That makes sense. + + |The smallest change would be to make the "Quit" button run "sys.exit" + |immediately instead of "self.destroy". + +The problem here is that this is supposed to be a reusable dialog which +doesn't exit the app. In reality, the button says "Dismiss" not "Quit". +Hitting it just destroys the dialog (and all the processing guts inside, +which I've deleted) and the app continues. + +Only for the test wrapper do I want to exit the app -- since it's the only +window displayed. + +Do I need to add special testing-harness hooks into the dialog class, or is +there a general way to determine when a dialog destroys/unmaps itself from +outside of the dialog code? + +Randall +-------------- next part -------------- +#!/usr/bin/env python + +import sys +from Tkinter import * +from ScrolledText import ScrolledText + +class CommandWindow(ScrolledText): + + def __init__(self, master=None, **cnf): + apply(ScrolledText.__init__, (self, master), cnf) + +class CommandWindowDialog(Toplevel): + + def __init__(self, master=None, **cnf): + apply(Toplevel.__init__, (self, master), cnf ) + self.title( 'COMMAND OUTPUT' ) + win = CommandWindow( self ) + win.pack(expand=1, fill=X) + btn = Button( self, text="Quit", command=self.destroy ) + btn.pack() + +root = Tk() +w = CommandWindowDialog( root ) +w.protocol( 'WM_DELETE_WINDOW', sys.exit ) +root.wm_withdraw() +w.mainloop() + + diff --git a/demo/ermis-f/python_m/cur/1461 b/demo/ermis-f/python_m/cur/1461 new file mode 100644 index 00000000..0df50aa2 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1461 @@ -0,0 +1,67 @@ +From: jeremy at cnri.reston.va.us (Jeremy Hylton) +Date: Thu, 15 Apr 1999 22:39:11 GMT +Subject: for in benchmark interested +In-Reply-To: <14102.20958.460408.832042@buffalo.fnal.gov> +References: <37157CE7.EFB470CA@inka.de> + <14102.15523.573321.443195@bitdiddle.cnri.reston.va.us> + <14102.20958.460408.832042@buffalo.fnal.gov> +Message-ID: <14102.20968.308910.844571@bitdiddle.cnri.reston.va.us> +Content-Length: 1237 +X-UID: 1461 + +Doh! + +I guess you could read it all at once, which would be fine for a file +that's only 6MB or so. If you wanted correctness (how important is +that in a benchmark anyway?) and still want to read fixed-size chunks, +then you need to see if the buffer that is read ends in the middle of +a word or between words. If you add that checking, the code is a bit +more complex but still about 20% faster. + +#!/usr/local/bin/python +import sys +import string + + +def run(): + dict={} + dict_get = dict.get + read = sys.stdin.read + string_split = string.split + prev = '' + while 1: + buf = read(500000) + if buf: + parts = string_split(buf) + + # did buffer start with whitespace? + if buf[0] == parts[0][0]: + parts[0] = prev + parts[0] + elif prev: + dict[prev] = dict_get(prev, 0) + 1 + + for key in parts[:-1]: + dict[key] = dict_get(key, 0) + 1 + + # buffer end with whitespace? + if buf[-1] != parts[-1][-1]: + key = parts[-1] + dict[key] = dict_get(key, 0) + 1 + prev = '' + else: + prev = parts[-1] + else: + return dict + + +dict = run() +write = sys.stdout.write +for word in dict.keys(): + write("%4d\t%s\n" % (dict[word], word)) + + +Jeremy + + + + diff --git a/demo/ermis-f/python_m/cur/1462 b/demo/ermis-f/python_m/cur/1462 new file mode 100644 index 00000000..ae5125d7 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1462 @@ -0,0 +1,22 @@ +From: petrilli at trump.amber.org (Christopher Petrilli) +Date: 15 Apr 1999 13:07:00 PDT +Subject: Fnorb for JPython ? (WAS: Fnorb 1.0 - A Python CORBA ORB) +References: <371619a4.1287080@news.cybercity.dk> +Message-ID: <7f5gt4$33q@chronicle.concentric.net> +X-UID: 1462 + +Morten Christensen wrote: + +> I would like to suggest support for JPython (for pure java) !!! + +Wouldn't it make sense to use a Java based CORBA ORB? This would be MUCH +faster and I think there are more than few out there. + +Chris +-- +| Christopher Petrilli ``Television is bubble-gum for +| petrilli at amber.org the mind.''-Frank Lloyd Wright + + + + diff --git a/demo/ermis-f/python_m/cur/1463 b/demo/ermis-f/python_m/cur/1463 new file mode 100644 index 00000000..2598b96b --- /dev/null +++ b/demo/ermis-f/python_m/cur/1463 @@ -0,0 +1,71 @@ +From: quango at watervalley.net (Chris Lawrence) +Date: 13 Apr 1999 09:41:14 GMT +Subject: rfc822 date header +References: <3712D863.2A8148BC@rubic.com> <3712F4C1.52327AF4@lemburg.com> +Message-ID: +Content-Length: 2558 +X-UID: 1463 + +On Tue, 13 Apr 1999 07:39:45 GMT, M.-A. Lemburg wrote: +>Jeff Bauer wrote: +>> +>> Is there a reasonably bulletproof way to generate an +>> rfc822-compliant date header using the time module? +>> +>> The reason I ask is I recall a number of subtle +>> errors in this regard, reported by Chris Lawrence, +>> among others. + +[Eeek! I'm famous!] + +>According to the RFC, time.ctime() should do the trick... +>but it's probably locale aware which the RFC doesn't account +>for. + +time.ctime() will throw you off (it will generate Unix timestamps, which are +decidedly non-RFC-compliant in any number of ways). Try: + +time.strftime('%a, %d %b %Y %H:%M:%S GMT', time.gmtime(timeval)) + +where timeval is a time.time() result. If you already have the tuple form, +you may need to coax it into gmt-relative tuple form first (see the tz-aware +functions in rfc822). Actually, here you're getting a GMT RFC-compliant +header, which is a subset of the universe of allowed headers, but if you're +dumping HTTP output this is what you need. + +Cheap hack for other timezones (untested, ugly, but probably right): + +ttuple = time.localtime(timeval) +x = time.strftime('%a, %d %b %Y %H:%M:%S ', ttuple) +if ttuple[8] == 1: + x = x + ('%04d' % (-time.altzone)) +else: + x = x + ('%04d' % (-time.timezone)) + +Note that locales will screw up the %a (weekday) and make it +non-RFC-compliant (though whether anything in the real world will CARE is +another question entirely). You may need to bracket this with some +locale.setlocale() calls if you're using locale != "C". + +Incidentally, the locale issue even affects GNU date. Try 'LC_ALL=fr_FR +date --rfc --utc' sometime on Linux ;-) I made a patch but dunno if it ever +made it upstream... + +The "subtle errors" were mainly in parsing the damn things, and in Linux's +implementation of the time functions in libc6 (which drove me crazy until I +finally figured out what was going on a few weeks ago ;-). + + +Chris, exploring the minutae of the topic (as per clp tradition) +-- +============================================================================= +| Chris Lawrence | Get your Debian 2.1 CD-ROMs | +| | http://www.lordsutch.com/ | +| | | +| Grad Student, Pol. Sci. | Do you want your bank to snoop? | +| University of Mississippi | http://www.defendyourprivacy.com/ | +============================================================================= + + + + diff --git a/demo/ermis-f/python_m/cur/1464 b/demo/ermis-f/python_m/cur/1464 new file mode 100644 index 00000000..b4643e81 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1464 @@ -0,0 +1,119 @@ +From: tim_one at email.msn.com (Tim Peters) +Date: Sun, 25 Apr 1999 19:47:17 -0400 +Subject: Time complexity of dictionary insertions +In-Reply-To: +Message-ID: <000201be8f75$f3e3f0e0$669e2299@tim> +Content-Length: 2845 +X-UID: 1464 + +[someone asks about the time complexity of Python dict insertions] +[Tim] +> Min O(1), Max O(N), Ave O(1). If the hash function is doing +> a terrible job (e.g. maps every key to the same hash value), make +> those all O(N). + +[Moshe Zadka, gets back to the topic ] +> This is interesting. What is the WCS behaviour of Python dicts? + +"If the hash function is doing a terrible job (e.g. maps every key to the +same hash value), make those all O(N)." That implies O(N**2) for a sequence +of N inserts. + +> but-it-doesn't-really-matter-'cause-it-takes-finite-time-anyway-ly y'rs, +> Z. + +Oh, it matters a lot! I'll attach a test case, showing how to consume 4 +minutes with about 2000 measily inserts. Python's tuple hash function once +did a very poor job on int 2-tuples of the form (i, i+-1), which made +marching over diagonals of sparse 2D arrays (represented as dicts) a major +exercise in faith . + +if-it-weren't-for-probability-we'd-all-be-dead-ly y'rs - tim + +Output from a careless (non-quiet) run, 1.5.2, Win95, P5-166: + +Timings for horrid = 0 +total # dict entries; elapsed time; ratio to last elapsed + 1 0.00 + 2 0.00 1.17 + 4 0.00 1.23 + 8 0.00 1.36 + 16 0.00 2.46 + 32 0.00 1.29 + 64 0.01 1.46 + 128 0.01 1.58 + 256 0.02 1.76 + 512 0.03 1.94 + 1024 0.06 1.91 + 2048 0.11 1.96 + +Timings for horrid = 1 +total # dict entries; elapsed time; ratio to last elapsed + 1 0.00 + 2 0.00 2.91 + 4 0.00 3.35 + 8 0.00 3.81 + 16 0.02 4.14 + 32 0.06 3.90 + 64 0.28 4.76 + 128 1.20 4.25 + 256 3.91 3.26 + 512 14.66 3.75 + 1024 57.85 3.95 + 2048 231.16 4.00 + +Code: + +import time + +class Horrid: + N = 0 + + def __init__(self, horrid=1): + self.value = Horrid.N + Horrid.N = Horrid.N + 1 + self.horrid = horrid + + def __hash__(self): + if self.horrid: + return 42 + else: + return hash(self.value) + + def __cmp__(self, other): + return cmp(self.value, other.value) + +MAX = 2**11 + +def timeit(horrid): + clock = time.clock + d = {} + elapsed = 0.0 + numtoadd = 1 + while 1: + if numtoadd + len(d) > MAX: + break + stufftoadd = map(Horrid, [horrid] * numtoadd) + start = clock() + for thing in stufftoadd: + d[thing] = 1 + finish = clock() + lastelapsed = elapsed + elapsed = elapsed + (finish - start) + print "%7d %8.2f" % (len(d), elapsed), + if lastelapsed: + print "%5.2f" % (elapsed / lastelapsed) + else: + print + numtoadd = len(d) + +for horrid in 0, 1: + print "\nTimings for horrid =", horrid + print "total # dict entries; elapsed time; ratio to last elapsed" + timeit(horrid) + + + + + + diff --git a/demo/ermis-f/python_m/cur/1465 b/demo/ermis-f/python_m/cur/1465 new file mode 100644 index 00000000..8b842bf8 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1465 @@ -0,0 +1,20 @@ +From: john at mankato.msus.edu (John) +Date: Tue, 20 Apr 1999 10:06:39 -0500 +Subject: Telnetlib error +Message-ID: +X-UID: 1465 + +I am running python 1.5.2 (final release downloaded 19Apr1999) on: +Linux version 2.0.34 (gcc version egcs-2.90.29 980515 (egcs-1.0.3 release)) + +Has anyone else run into this problem? + + File "./telnet_test.py", line 86, in ? + initial_data = tn.expect('->') + File "/usr/local/lib/python1.5/telnetlib.py", line 450, in expect + list[i] = re.compile(list[i]) +TypeError: object doesn't support item assignment + + + + diff --git a/demo/ermis-f/python_m/cur/1466 b/demo/ermis-f/python_m/cur/1466 new file mode 100644 index 00000000..38cc0647 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1466 @@ -0,0 +1,39 @@ +From: faassen at pop.vet.uu.nl (Martijn Faassen) +Date: Mon, 12 Apr 1999 17:09:07 +0200 +Subject: Python Chip +References: <3709CFC0.BCB0990A@pop.vet.uu.nl> <000a01be845b$de38b020$2a9e2299@tim> +Message-ID: <37120C93.FB587563@pop.vet.uu.nl> +X-UID: 1466 + +Tim Peters wrote: +> +> [Martijn Faassen] +> > For those who are still anxiously itching to get their hands on a Python +> > machine, this was of course an April Fool's joke. :) +> +> Oh, *now* you tell me, just hours before we were to tape out final silicon! +> Wonder whether I can get my money back. + +Sorry. :) Actually it thought it was a nice example of +comp.lang.python's flame/spam immune system that this thread immediately +mutated into a quite serious discussion on Forth/Java/Pascal/etc chips. + +> > You can now all come to destroy me now. (any other jokes in this +> > newsgroup which I missed?) +> +> Marc posted a nice amendment to his conference's menu, but all in all c.l.py +> was a deadly serious gaggle of humorless geekoids this year. Maybe that's +> appropriate, though, since Guido *was* run over by an April 1st bus. + +I missed this one. :) + +> thank-god-for-the-fully-automated-python-release-process-ly y'rs - tim + +yeah-good-thing-Guido's-time-machine-can-travel-forward-in-time-too-ly +yours, + +Martijn + + + + diff --git a/demo/ermis-f/python_m/cur/1467 b/demo/ermis-f/python_m/cur/1467 new file mode 100644 index 00000000..61319986 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1467 @@ -0,0 +1,60 @@ +From: francois.bedard at usa.net (Francois Bedard) +Date: Mon, 12 Apr 1999 01:49:46 GMT +Subject: Python's object model +References: <37102ED0.933EDDA6@usa.net> +Message-ID: <37115155.2B3D6B12@usa.net> +Content-Length: 1337 +X-UID: 1467 + +Thank you both, Charles and Florent. I'm most familiar with Eiffel's +object model and apparently generalized a bit hastily, but your answers +did clarify things... + +Francois + +Francois Bedard wrote : +> +> I'm new at Python. In the following program, "stack_1 pops stack_2's +> content" (that's actually what it prints), which is obviously not what +> I'm after - nor would expect. [...] +> +> class Stack: +> stack = [] +> [...] +> +> class System: +> stack_1 = Stack() +> stack_2 = Stack() +> [...] + +Charles G Waldman wrote : +> +> This "Stack" class [...] +> doesn't work as you expected because the way you've declared it, the +> ".stack" attribute is a class attribute (shared by all instances of +> the class) rather than an instance attribute. To create instance +> attriubtes, create them in the initializer, like this: +> +> class Stack: +> def __init__(self): +> self.stack = () +> [...] + +Florent Heyworth wrote : +> +> what you're seeing is the difference between a class and an +> instance variable. To see the behaviour you want you need to +> modify your stack class as follows: +> +> class Stack: +> def __init__(self): +> self.stack = [] +> [...] +> +> Otherwise the stack is a class variable which can be referred as +> Stack.stack() (this would then act as a class global). +> [...] + + + + diff --git a/demo/ermis-f/python_m/cur/1468 b/demo/ermis-f/python_m/cur/1468 new file mode 100644 index 00000000..72feb8c6 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1468 @@ -0,0 +1,86 @@ +From: arcege at shore.net (Michael P. Reilly) +Date: Tue, 06 Apr 1999 14:50:13 GMT +Subject: Tkinter bug in Misc.tkraise, Canvas.tkraise +References: <7eaoop$leq$1@news-2.news.gte.net> +Message-ID: +Content-Length: 2470 +X-UID: 1468 + +John Michelsen wrote: +: The following got posted in a reply tree by mistake: + +: I found a bug in using Tkinter to raise a canvas widget above later +: packed (etc.) widgets. It seems Tkinter gets confused between the +: Misc.tkraise() method and the Canvas.tkraise(item) methods. +: The following script shows the problem: + +: from Tkinter import * + +: def raiseCanvas(): +: canvas1.lift() +: #canvas1.tkraise() +: #canvas1.widgetlift() + +: root = Tk() +: canvas1 = Canvas(root, bg='blue') +: canvas1.place(x=10, y=10, anchor=NW) +: canvas2 = Canvas(root, bg='red') +: canvas2.place(x=20, y=20, anchor=NW) +: raiseButton = Button(root, text='raiseCanvas', command=raiseCanvas) +: raiseButton.pack() +: root.geometry("%dx%d" % (100,100)) +: root.mainloop() + +: which gives the following error: + +: Exception in Tkinter callback +: Traceback (innermost last): +: File "C:\Program Files\Python\Lib\lib-tk\Tkinter.py", line 764, in +: __call__ +: return apply(self.func, args) +: File "C:\PROGRA~1\PYTHON\RAISEC~1.PY", line 4, in raiseCanvas +: canvas1.lift() +: File "C:\Program Files\Python\Lib\lib-tk\Tkinter.py", line 1287, in +: tkraise +: self.tk.call((self._w, 'raise') + args) +: TclError: wrong # args: should be ".8249616 raise tagOrId ?aboveThis?" + +: I made Tkinter do what I want by adding a method to the Misc +: class and not the Canvas class: + +: class Misc... +: def tkraise(self, aboveThis=None): +: self.tk.call('raise', self._w, aboveThis) +: lift = widgetlift = tkraise + +: so that widgetlift will call the tkraise in Misc and not the tkraise in +: Canvas. + +: I discovered the error in developing a multiple document interface for +: Tkinter +: which can be found on: http://www2.zyvex.com/OpenChem/index.htm +: Dockable toolbars and a tree widget can also be found there. +: They probably don't look very good on unix yet. + +It is not a bug with either code, it is a naming problem. The +Canvas.tkraise is calling the correct code, but it should be called +tag_raise, not tkraise (see the Text widget for naming choice). + +Fredrik or Guido, is this something you can change for before 1.5.2 is +released? (I don't see anything on www.python.org/1.5/ that says when +1.5.2 will be done except "mid March", which has gone by.) + +Until then, I would suggest the following fix: + + from Tkinter import Canvas + Canvas.tag_raise = Canvas.tkraise + del Canvas.tkraise, Canvas.lift + +This should correct the problem. + + -Arcege + + + + + diff --git a/demo/ermis-f/python_m/cur/1469 b/demo/ermis-f/python_m/cur/1469 new file mode 100644 index 00000000..19dd3ec2 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1469 @@ -0,0 +1,36 @@ +From: petrilli at trump.amber.org (Christopher Petrilli) +Date: 16 Apr 1999 12:57:14 PDT +Subject: restore sources from PYC [Q] +References: <000101be879c$8aed0670$6eba0ac8@kuarajy.infosys.com.ar> <37177D8E.FF43BF65@bigfoot.com> <7f80ii$7m0@journal.concentric.net> <61r9pk1h2t.fsf@anthem.cnri.reston.va.us> +Message-ID: <7f84mq$a7c@chronicle.concentric.net> +X-UID: 1469 + +Barry A. Warsaw wrote: + +>>>>>> "CP" == Christopher Petrilli writes: + +> CP> Seriously, this is a non-event that people use to spread FUD, +> CP> but it exists in all languages. The simplicity with which it +> CP> can be done changes, but it's never more than a freshman +> CP> college project. + +> Which is why almost every binary license I've ever stayed awake to +> fully read includes text like "you may not decompile, disassemble, +> reverse-engineer" blah, blah, blah! :-) + +Get a life, Barry ;-) + +Seriously, this is exactly the situation... in fact many companies put +some bizarre constructions in their code so they can prove in court that +someone "stole" the code... + + "Judge, no sane person would use a bubble sort!" ;-) + +Chris +-- +| Christopher Petrilli ``Television is bubble-gum for +| petrilli at amber.org the mind.''-Frank Lloyd Wright + + + + diff --git a/demo/ermis-f/python_m/cur/1470 b/demo/ermis-f/python_m/cur/1470 new file mode 100644 index 00000000..e07fd7bd --- /dev/null +++ b/demo/ermis-f/python_m/cur/1470 @@ -0,0 +1,32 @@ +From: MHammond at skippinet.com.au (Mark Hammond) +Date: Sat, 24 Apr 1999 09:51:18 +1000 +Subject: PythonWin/ActiveX-Script Question +References: <37214562@news1.jps.net> +Message-ID: <7fr0vi$539$1@m2.c2.telstra-mm.net.au> +X-UID: 1470 + +This is a bug that must have appeared recently. Sigh. Should be fixed next +build... + +Mark. + +Zigron wrote in message <37214562 at news1.jps.net>... +> I recently installed PythonWin/et al, and went into the +>win32comext/axscript/demos/client/ie directory, and found that basically +>none of the demos worked at alllllll. +> After fiddling with 'foo2.html', I found that all the references to +>'MyForm.whatever' or 'Form2.whatever' were resulting in NameErrors..and +that +>if I put 'window.' onto the front of all the references they then worked. +> +> I'm just wondering if that's how it's susposed to be? +> +>--Stephen +> +> + + + + + + diff --git a/demo/ermis-f/python_m/cur/1471 b/demo/ermis-f/python_m/cur/1471 new file mode 100644 index 00000000..2400c3e3 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1471 @@ -0,0 +1,56 @@ +From: robin at jessikat.demon.co.uk (Robin Becker) +Date: 22 Apr 1999 18:50:51 GMT +Subject: The Future of Tk? +References: <371E964F.C531C2A@istar.ca> <371F11C2.3162025@ciril.fr> +Message-ID: <7fnr2b$mrt$19@newsread.f.de.uu.net> +Content-Length: 1892 +X-UID: 1471 + +In article <371F11C2.3162025 at ciril.fr>, Frederic BONNET + writes +>Hi, +> +>Eugene Dragoev wrote: +>[...] +>> But I also found that while older versions of Tk were using lightweight +... +>> Is there going to be any Tk implementation that will continue using +>> lightweight components? +> +>By lightweight I guess you mean emulated in some way. I don't think that +>cross-platform look&feel consistency is a good thing. As a GUI designer +>I'd rather follow the principle of least astonishment: an app running on +>Windows should look and feel like a Windows app. The same app running on +>MacOS and X should do the same on the respective platforms. Such a +>cross-platform application is not supposed to look and feel the same on +>all platforms. If users want to use the same app on several platforms, +... +I take this completely differently; least astonishment for me is if +program X looks and behaves the same way no matter what keyboard, mouse +and screen I'm using. As a 'user' of the program X it shouldn't matter +what OS/WM is executing the code. I certainly don't want vi or emacs to +be different on the mac why should I treat word or excel differently? + +Another reason for having a Tk look and feel is that it allows widget +behaviours different from those allowed by the underlying 'convention'. + +Of course those with an interest in the survival of rigid wm systems +prefer we should adhere to their conventions. The only changes then come +from the suppler of such systems and are introduced to make us by new +versions etc. + +Competition between different WM's is currently almost impossible +because of the original model ie the 'toplevel' is controlled and +decorated by the WM. We don't have to do that with the widgets inside +the 'toplevel' so why do we? Let 100 flowers bloom etc. +... +>And I don't speak about look differences. +> +>See you, Fred + +-- +Robin Becker + + + + diff --git a/demo/ermis-f/python_m/cur/1472 b/demo/ermis-f/python_m/cur/1472 new file mode 100644 index 00000000..db80a617 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1472 @@ -0,0 +1,34 @@ +From: aa8vb at vislab.epa.gov (Randall Hopper) +Date: Sat, 17 Apr 1999 15:31:21 GMT +Subject: sys.path.insert - how to make it global? +In-Reply-To: <3718a8aa.4229211@news.omnilink.de>; from Stefan Franke on Sat, Apr 17, 1999 at 03:30:26PM +0000 +References: <19990416172011.A1551755@vislab.epa.gov> <3718a8aa.4229211@news.omnilink.de> +Message-ID: <19990417113121.A1627033@vislab.epa.gov> +X-UID: 1472 + +Stefan Franke: + |Randall Hopper: + |> If I want to augment my Python module search path inside a Python + |>script (so that it affects itself and imported modules), what's the best + |>way to do this? + | + |sys.path *is* already global, though only accessible via the + |sys module's namespace. Just give it a try. + +I'd already tried that. It's effect doesn't appear to be global: + + # Augment search path to pull in our C library wrappers + sys.path.insert( 0, '/home/mylogin/Wrappers' ) + + import MapFile + +This allows Python to find MapFile, but this doesn't allow MapFile to +import other modules in that same Wrappers directory. + +Randall + + + + + + diff --git a/demo/ermis-f/python_m/cur/1473 b/demo/ermis-f/python_m/cur/1473 new file mode 100644 index 00000000..e3fcc564 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1473 @@ -0,0 +1,43 @@ +From: guido at CNRI.Reston.VA.US (Guido van Rossum) +Date: Sat, 03 Apr 1999 08:11:40 -0500 +Subject: fix for posix_fsync under SunOS 4.1.x +In-Reply-To: Your message of "Sat, 03 Apr 1999 07:29:50 GMT." + <199904030729.XAA24695@igce.igc.org> +References: <199904030729.XAA24695@igce.igc.org> +Message-ID: <199904031311.IAA11599@eric.cnri.reston.va.us> +Content-Length: 1043 +X-UID: 1473 + +> Here's a patch to make sure that posix_fsync will compile on all operating +> systems (specifically needed for SunOS 4.1.x). +> +> This unified diff was made against Python 1.5.2 beta 2 . +> +> -scott +> +> --- Modules/posixmodule.c~ Tue Feb 16 11:38:04 1999 +> +++ Modules/posixmodule.c Fri Apr 2 22:18:03 1999 +> @@ -647,6 +647,8 @@ +> "fsync(fildes) -> None\n\ +> force write of file with filedescriptor to disk."; +> +> +extern int fsync(int); /* Prototype just in case */ +> + +> static PyObject * +> posix_fsync(self, args) +> PyObject *self; + +On how many other operating systems have you tried this patch? I have +found that almost invariably when you use an extern declaration of a +standard function that is defined in the system headers on most modern +systems, there's at least one system out there where what they have in +the headers causes a conflict with what you declare! It would be +better if you put it insude an #ifdef specific for the SunOS 4.x +platform. + +--Guido van Rossum (home page: http://www.python.org/~guido/) + + + + + diff --git a/demo/ermis-f/python_m/cur/1474 b/demo/ermis-f/python_m/cur/1474 new file mode 100644 index 00000000..8153f7c6 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1474 @@ -0,0 +1,32 @@ +From: nospam at bitbucket.com (Phil Mayes) +Date: Thu, 8 Apr 1999 23:08:18 -0700 +Subject: Pythonwin problem in HookNotify +Message-ID: +X-UID: 1474 + +The PythonWin documentation for PyCCmdTarget.HookNotify talks of +returning + "an integer containing the address of the first byte of + the extended information [following the normal struct]." + +but the code (win32notify.cpp line 284) is: + ob2 = PyInt_FromLong((int)pHdr + 1); +and should be: + ob2 = PyInt_FromLong((int)(pHdr + 1)); + +So the dread spectre of backwards compatibility arises: +if this is fixed, whose code will it break? Note that +code that is aware of this problem could check for it by +testing bit 0, but that doesn't help code that _isn't_ aware +of it. What are the odds of anyone using this rather obscure +area? Any opinions on the best way to handle this? Mark? +-- +Phil Mayes pmayes AT olivebr DOT com +Olive Branch Software - home of Arranger - http://www.olivebr.com/ +Check out our PalmPilot news page at http://www.olivebr.com/pilot/news.htm + + + + + + diff --git a/demo/ermis-f/python_m/cur/1475 b/demo/ermis-f/python_m/cur/1475 new file mode 100644 index 00000000..5d9c7950 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1475 @@ -0,0 +1,19 @@ +From: gony at my-dejanews.com (gony at my-dejanews.com) +Date: Tue, 27 Apr 1999 01:01:11 GMT +Subject: HELP - FTP seesions using python???????? +Message-ID: <7g328l$hga$1@nnrp1.dejanews.com> +X-UID: 1475 + + + +any links or tips etc on how to tackle automation of FTP sessions using python +would be most appreciated. + + + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/1476 b/demo/ermis-f/python_m/cur/1476 new file mode 100644 index 00000000..be7db2cb --- /dev/null +++ b/demo/ermis-f/python_m/cur/1476 @@ -0,0 +1,76 @@ +From: mal at lemburg.com (M.-A. Lemburg) +Date: Sat, 03 Apr 1999 10:59:36 +0200 +Subject: add type predicates to types module? +References: <14085.18842.492142.484721@bitdiddle.cnri.reston.va.us> +Message-ID: <3705D878.4454DBEB@lemburg.com> +Content-Length: 2384 +X-UID: 1476 + +Jeremy Hylton wrote: +> +> This is a really good idea. I know I've got type predicates of many +> different flavors in code I've been working on recently. The tough +> question, I think, is how to decide which predicates are needed and +> how to implement them. +> +> The folkloric "file-like object" type is a good example. When people +> say "file-like object" they mean an object that responds in a +> reasonable way to the particular subset of methods on a builtin file +> object that they are interested in. +> +> isSequence might be a better example, since you want to capture +> instances that implement the sequence protocol along with tuples, +> lists, and strings. I use: +> +> def isSequence(s): +> try: +> 0 in s +> except TypeError: +> return 0 +> else: +> return 1 + +I tried this a while back but then concluded that the meaning +of "is sequence" can mean different things in different situations, +e.g. sometimes I need the object to have a length, at other times +I need __getitem__ (this is what "in" uses). + +Note that the above test fails for dictionary types, but let's +dictionary like instances pass. + +I think a more generic API is needed; one that allows you to +define the slots/special methods you really need (we'd have to +map the special methods to slots for simplicity). Something +like + has_interface(obj,('__getitem__','__len__')) + +> def isCallable(obj): +> if type(obj) in (types.BuiltinFunctionType, +> types.BuiltinMethodType, types.LambdaType, +> types.MethodType): +> # XXX could include types.UnboundMethodType +> return 1 +> if type(obj) == types.InstanceType: +> return hasattr(obj, '__call__') +> return 0 + +There already is a builtin function iscallable() that does pretty +much what you've coded in Python. + +> In the particular application I needed, I know I would not want to +> include UnboundMethodTypes. In the general case, though, I think it +> should be included. + +... this is a special case I guess. iscallable(obj) and a type +check could be combined to handle it. + +-- +Marc-Andre Lemburg Y2000: 272 days left +--------------------------------------------------------------------- + : Python Pages >>> http://starship.skyport.net/~lemburg/ : + --------------------------------------------------------- + + + + + diff --git a/demo/ermis-f/python_m/cur/1477 b/demo/ermis-f/python_m/cur/1477 new file mode 100644 index 00000000..16955566 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1477 @@ -0,0 +1,86 @@ +From: MHammond at skippinet.com.au (Mark Hammond) +Date: Mon, 19 Apr 1999 09:35:18 +1000 +Subject: Embedded Late Binding +References: <3719D318.1267@iname.com> +Message-ID: <7fdq7b$mpm$1@m2.c2.telstra-mm.net.au> +Content-Length: 2186 +X-UID: 1477 + +2 things come to mind here. + +* Simplest may be to use the pre-processor. something like: +#define MAKE_FUNC(FuncName) \ +static PyObject *Py##FuncName(PyObject *self, PyObject *args) \ +blah blah \ +rc = FuncName() \ +blah blah\ + +MAKE_FUNC(OnFileNew); +MAKE_FUNC(OnFileSave); + +You still have 400 methods to expose, but they get a lot smaller :-) + +Alternatively, this is a bit more complex: +* Create a new "editor function" object. This would be a Python object that +has a tp_call slot. The module or object getattr() call could create and +return one of these objects. Eg: +PyObject *getattr(char *attr) +{ + if (IsEditorFuncName(attr)) + return PyEditorFunction(attr); +} + +The 3rd of the 2 alternatives :-) +* Provide a Python wrapper class. Instead of dealing with Python modules +and functions natively, work with classes. This is similar to the above +option, but you move the logic into the Python code. + +Hope this makes some sense, and at least points you to the right path for +your project... + +Mark. + +Jussi Jumppanen wrote in message <3719D318.1267 at iname.com>... +> static struct PyMethodDef editor_functions[] = +> { +> { "get_line_number", MacroPython::get_line_number, 1 }, +> { "set_line_number", MacroPython::set_line_number, 1 }, +> { "FileClose" , MacroPython::edit_func , 1 }, +> { "FileEdit" , MacroPython::edit_func , 1 }, +> { "FileNew" , MacroPython::edit_func , 1 }, +> { ......................... }, +> { 0, 0, 0 }, +> }; +> +>and then somehow in the C source: +> +> PyObject *MacroPython::edit_func(PyObject *self, PyObject *args) +> { +> PyObject *pObject = 0; +> +> if (PyArg_ParseTuple(args, "")) +> { +> /* somehow get the function name???? */ +> char *function_name = ???? (ie FileNew, FileOpen etc); +> +> /* this part is easy enough todo */ +> call editor passing(function_name); +> } +> return pObject; +> } +> +> +>Can anyone tell me if this possible with Python 1.5.1? +> +>Or is there a better way to achieve a similar result? +> +>Thanks in advance. +> +>Jussi Jumppanen +>Home Page: http://ourworld.compuserve.com/homepages/jussi/ + + + + + + diff --git a/demo/ermis-f/python_m/cur/1478 b/demo/ermis-f/python_m/cur/1478 new file mode 100644 index 00000000..d2e2daab --- /dev/null +++ b/demo/ermis-f/python_m/cur/1478 @@ -0,0 +1,20 @@ +From: rhww at erols.com (R Wentworth) +Date: Tue, 20 Apr 1999 00:12:14 -0400 +Subject: Date/Time conversions +References: <371BEBA7.5DBC1B0F@qut.edu.au> +Message-ID: <371BFE9E.B0B576EA@erols.com> +X-UID: 1478 + + +Rico Albanese wrote: +> thesql=thesql + frontpar + logtime + "," +> The inclusion of this variable ^ (ie logtime) causes this script to fail. +> When it is removed, it works ok. + +Use backquotes to turn the integer into a string, i.e., + + thesql=thesql + frontpar + `logtime` + "," + + + + diff --git a/demo/ermis-f/python_m/cur/1479 b/demo/ermis-f/python_m/cur/1479 new file mode 100644 index 00000000..4ef295f8 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1479 @@ -0,0 +1,44 @@ +From: news at dorb.com (Darrell) +Date: Fri, 2 Apr 1999 19:40:26 -0500 +Subject: string.join() vs % and + operators +References: <37054490.E79ADCC9@easystreet.com> +Message-ID: +Content-Length: 1230 +X-UID: 1479 + +We have an application where many thousands of small strings are to be +inserted and deleted from a very large buffer. +When you have 100k different small strings to replace in 4meg of text the +string.join seems to work well. +I don't know where the trade off is but you could use re.sub + +One problem I still don't know how best to avoid is extreme memory +consumption. When you have these large objects around they can be referenced +from higher level objects and not get destroyed until the program exits. We +should have thought about this from the begining of our project. + +def insertDeleteList(inbuf, l): + """ Insert and delete segments in a buffer + l is a list of (start, string, end) The input 'l' must be sorted + If start and end are equal then string is inserted at that point + If end > start then this range is deleted. + If end < start then this range is duplicated + """ + splitBuf=[] + last=0 + for i in l: + b=inbuf[last:i[0]] + splitBuf.append(b) + splitBuf.append(i[1]) + last=i[2] # Advance past some buffer here + splitBuf.append(inbuf[last:]) + return string.join(splitBuf,'') + + + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1480 b/demo/ermis-f/python_m/cur/1480 new file mode 100644 index 00000000..e2b1d36c --- /dev/null +++ b/demo/ermis-f/python_m/cur/1480 @@ -0,0 +1,102 @@ +From: mlv at pobox.com (Michael Vezie) +Date: 26 Apr 1999 15:35:18 -0400 +Subject: Pointers to variables +References: <19990422121403.A279051@vislab.epa.gov> <371F6124.48EA9794@pop.vet.uu.nl> +Message-ID: <7g2f5m$kl6$1@mlv.mit.edu> +Content-Length: 3364 +X-UID: 1480 + +In article <371F6124.48EA9794 at pop.vet.uu.nl>, +Martijn Faassen wrote: +>But, if you'd use a mutable list, you still run into trouble. If you say +>this: +> +> mylist = [None] # list with a single element +>None +> variable_i_want_to_change = "Foo" # a variable I want to +>change +> mylist[0] = variable_i_want_to_change # okay, mylist[0] points to +>same data +> mylist[0] = "Bar" # now mylist[0] points to +>different data +> +>then 'variable_i_want_to_change' won't change. You've simply changed +>what value mylist[0] points at. This is because a string (and integers +>etc) are immutable values in Python. If you use a mutable value such as +>a dictionary, you get this: + +I don't think it has anything to do with mutable or not. mylist[0] +simply points (at first) to the same object (string) that +variable_i_want_to_change (hereafter called 'var2chg'). Then, +at the second assignment, mylist[0] points to something different. +If var2chg were an array or dictionary, it would make no difference; +mylist[0] would still, after the second assignment, be "Bar". + + +> mylist = [None] +> variable_i_want_to_change = {} +> mylist[0] = variable_i_want_to_change +> mylist[0]["some key"] = "bar" # indeed changes +>variable_i_want_to_change! + +This is different from the other examples. Here, you dereference +mylist[0] (which is still pointing to the same object that var2chg +points to). So the common object that they both point to changes. +Strictly speaking, you aren't changing var2chg, just that which it +(and mylist[0]) points to. + + +> # mylist[0] = "Bar" -- doesn't work, makes mylist[0] point elsewhere + +Well, it works as expected. It changes mylist[0], not what mylist[0] +references. + + +>I suspect I'm making things sound horribly complicated when they aren't +>really. I can keep all this in my head easily, it's just hard +>communicating it. I can understand the confusion with pointers from C, +>but note that this is the actual semi-equivalent C code (of the first +>fragment, not the dict one, and using ints instead of strings): +> +>/* Initialize the variables, assume easy allocate functions which do all +>the +> malloc() calls I don't want to figure out right now */ +>int** mylist = allocate_list(); +>*mylist[0] = 0; +>/* now we have a list with a pointer to an int value, which is 0 */ +> +>int* variable_i_want_to_change = allocate_int(); +>*variable_i_want_to_change = 1; +>/* now we have a variable which points to an int value, which is 1 */ +> +>*mylist[0] = *variable_i_want_to_change; +>/* now the data mylist[0] points at becomes 1 too */ +> +>*mylist[0] = 2; +>/* now the data mylist[0] points at becomes 2 */ + +I wonder if this is how it goes. I've not dived into the python +engine code, so I don't know. Are immutable objects stored as +objects or just as the data? In the grand scheme of things, it +really makes no difference. If there were an "add" method for +ints (so you could say: + + var2chg = 5 + var2chg.add(3) + +and have var2chg have a value of 8), then it would obviously be +a concern. But you can't, so it really doesn't matter at the +python level whether: + + a = 5 + b = a + +means that b and a point to the same object, or to separate +values of 5. If you could do b.add(3) and suddenly have a +with a value of 8, then it would. + +Michael + + + + diff --git a/demo/ermis-f/python_m/cur/1481 b/demo/ermis-f/python_m/cur/1481 new file mode 100644 index 00000000..15659dfe --- /dev/null +++ b/demo/ermis-f/python_m/cur/1481 @@ -0,0 +1,30 @@ +From: sdm7g at virginia.edu (Steven D. Majewski) +Date: Wed, 21 Apr 1999 19:33:40 GMT +Subject: How many of us are there? +In-Reply-To: <371E2648.DED123AE@callware.com> +References: <371E2648.DED123AE@callware.com> +Message-ID: +X-UID: 1481 + +"How many of us are there?" + +Do you mean counting the elevator boy ? +Is he part of your family ? + + +Oh -- sorry, that's not Python. Oops. + + +---| Steven D. Majewski (804-982-0831) |--- +---| Department of Molecular Physiology and Biological Physics |--- +---| University of Virginia Health Sciences Center |--- +---| P.O. Box 10011 Charlottesville, VA 22906-0011 |--- + + Caldera Open Linux: "Powerful and easy to use!" -- Microsoft(*) + (*) + + + + + + diff --git a/demo/ermis-f/python_m/cur/1482 b/demo/ermis-f/python_m/cur/1482 new file mode 100644 index 00000000..4b66d03e --- /dev/null +++ b/demo/ermis-f/python_m/cur/1482 @@ -0,0 +1,23 @@ +From: news at dorb.com (Darrell) +Date: Tue, 6 Apr 1999 12:18:04 -0400 +Subject: SWIG, Modulator, BGEN, etc. - which? (Re: swig or not to swig ?) +References: <4p6O2.1348$8m5.2126@newsr1.twcny.rr.com> <3709f149.2262513@news.oh.verio.com> <19990406103412.A869943@vislab.epa.gov> <002b01be803c$635a54d0$6fc6a8c0@rochester.rr.com> <19990406111950.A870049@vislab.epa.gov> +Message-ID: +X-UID: 1482 + +Randall, you are way ahead of me. +And it sounds like SWIG is the good solution. Modulator doesn't parse header +files and it's not obvious how to get BGEN working. Although BGEN looks +promising if I had time. + +This time I'll use Modulator and hand code the rest. My application isn't +very complex at all and the interface should be stable. + +Thanks for the responses. +Darrell + + + + + + diff --git a/demo/ermis-f/python_m/cur/1483 b/demo/ermis-f/python_m/cur/1483 new file mode 100644 index 00000000..11b6ee3c --- /dev/null +++ b/demo/ermis-f/python_m/cur/1483 @@ -0,0 +1,55 @@ +From: chad at vision.arc.nasa.gov (Chad Netzer) +Date: Fri, 09 Apr 1999 12:03:23 -0700 +Subject: import from user input? What about 'from'? +References: <816010E2456BD111A48700805FBBE2EEA63EB9@ex-quebec-u1.baan.com> <370E0F51.E1D33D6@appliedbiometrics.com> +Message-ID: <370E4EFB.3D9355BF@vision.arc.nasa.gov> +Content-Length: 1091 +X-UID: 1483 + +Gaetan Corneau wrote: + + +> I want to import modules at runtime, and get the module name from the user. +> Is that possible? How? +> +> +Christian Tismer wrote: + +> Instead, one should cut off the first name before the first dot +> and put that into globals(). +> +> import string +> globals()[string.split(modname, ".")[0]] = __import__(modname) +> +> seems to do it better. + +Hmm, what if I want to do something like: + +exec 'from ' + module_name + ' import ' + class_name + +Can I use the __import__call, and then just save the specific module name in globals()? +ie. (minus exception checking): + + globals()[class_name] = getattr(__import__(module_name), class_name) + +Hell, I can just try it... + +% python +Python 1.5.2b2 (#2, Apr 2 1999, 17:30:13) [C] on irix6 +Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam +>>> globals()['strip'] = getattr(__import__('string'), 'strip') +>>> globals() +{'strip': , '__doc__': None, '__name__': '__main__', '__builtins__': } + + +Looks ok to me... Neat!. + +Chad Netzer +chad at vision.arc.nasa.gov + + + + + + diff --git a/demo/ermis-f/python_m/cur/1484 b/demo/ermis-f/python_m/cur/1484 new file mode 100644 index 00000000..d4c8e951 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1484 @@ -0,0 +1,29 @@ +From: mal at lemburg.com (M.-A. Lemburg) +Date: Fri, 16 Apr 1999 12:36:40 GMT +Subject: ANN: mxStack Package - Version 0.3.0 +References: <37171CCE.656F3EF6@lemburg.com> +Message-ID: <37172ED8.26CC1110@lemburg.com> +X-UID: 1484 + +Oops, just found a bug in the release. I've just updated +the package archive on starship: there was a bug in the +non-zero testing code. + +With the updated version, this should now work correctly: + +s = Stack() +while s: + obj = s.pop() + # do something with obj +assert len(s) == 0 + +-- +Marc-Andre Lemburg Y2000: 259 days left +--------------------------------------------------------------------- + : Python Pages >>> http://starship.skyport.net/~lemburg/ : + --------------------------------------------------------- + + + + + diff --git a/demo/ermis-f/python_m/cur/1485 b/demo/ermis-f/python_m/cur/1485 new file mode 100644 index 00000000..a7242824 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1485 @@ -0,0 +1,25 @@ +From: dkuhlman at netcom.com (G. David Kuhlman) +Date: Wed, 28 Apr 1999 15:12:14 GMT +Subject: decompiling python +References: <3724E41E.D3730480@jpl.nasa.gov> +Message-ID: +X-UID: 1485 + +First thing, look at 'dis' in the standard library reference. + +But, remember, Python is compiled to byte code for the Python +virtual machine. 'dis' displays that byte code, *not* machine +code for your microprocessor. + + - Dave + + + +Jeff Saenz wrote: +> Does anyone know of a decompilation tool for python? + +> -jm + + + + diff --git a/demo/ermis-f/python_m/cur/1486 b/demo/ermis-f/python_m/cur/1486 new file mode 100644 index 00000000..65a9e98b --- /dev/null +++ b/demo/ermis-f/python_m/cur/1486 @@ -0,0 +1,39 @@ +From: tbryan at zarlut.utexas.edu (Tom Bryan) +Date: Sun, 25 Apr 1999 18:48:18 -0500 +Subject: Beginner - Tkinter info +References: <371c59e9.2723125@news.tin.it> <371B453E.C3F83831@foreman.ac.rwth-aachen.de> <004301be8a99$0faf7920$f29b12c2@pythonware.com> <7ftejj$pb9$1@nnrp1.dejanews.com> +Message-ID: <3723A9C1.1CFEDBC6@zarlut.utexas.edu> +X-UID: 1486 + +pkleynjan at my-dejanews.com wrote: +> +> > there's something called websucker.py down in the Tools +> > directory in the Python distribution: +> +> Call me stupid... + +Stupid! Oops...maybe you didn't really mean that. ;-) + +> I can't find websucker.py in either the +> Windows or Linux 1.5 distributions... + +I don't see it in my Windows version either. If you're talking about +a Linux version that came with your distribution, then they might +not have saved the Tools directory. To check for certain, you +could run +find / -name websucker.py + +If you download the Python source and unpack it, websucker.py +should be in Tools/webchecker/ under the Python source directory. + +still-waiting-for-an-excuse-to-use-websucker-ly yours +---Tom + +-- +tbryan at zarlut.utexas.edu +Remove the z from this address to reply. +Stop spam! http://spam.abuse.net/spam/ + + + + diff --git a/demo/ermis-f/python_m/cur/1487 b/demo/ermis-f/python_m/cur/1487 new file mode 100644 index 00000000..0592a92a --- /dev/null +++ b/demo/ermis-f/python_m/cur/1487 @@ -0,0 +1,26 @@ +From: news at helen.demon.nl (Ilja Heitlager) +Date: Thu, 29 Apr 1999 09:58:44 +0200 +Subject: Designing Large Systems with Python +References: <3725CA37.2027327D@lemburg.com> +Message-ID: <7g939e$la5$1@news.worldonline.nl> +X-UID: 1487 + +David Steuber wrote in message ... +>Try to imagine object oriented spaghetti. This is what happens when +>analysis, design, and coding all happen at the same time. + + +I do not believe that all software can be build in an ADC or waterfallwise +manner, +but as it seems there is more a problem of lack of management and lack of +people. +Sounds like a university project ;-) + + +Ilja + + + + + + diff --git a/demo/ermis-f/python_m/cur/1488 b/demo/ermis-f/python_m/cur/1488 new file mode 100644 index 00000000..561eb9ef --- /dev/null +++ b/demo/ermis-f/python_m/cur/1488 @@ -0,0 +1,25 @@ +From: faassen at pop.vet.uu.nl (Martijn Faassen) +Date: Mon, 19 Apr 1999 15:14:17 +0200 +Subject: Why no "=" in if? (was Re: Quick fix to add "+=") +References: <3717EE20.41343593@mediaone.net> <000701be888f$12fe2920$ee9e2299@tim> +Message-ID: <371B2C29.594AE647@pop.vet.uu.nl> +X-UID: 1488 + +Blake Winton wrote: + +[assignment in expression rears its head again] + +> Hitler! Hitler! Hitler! +> You're all Hitler! + +Hey, that doesn't work; intentional calling upon Nazis to end a thread +isn't support to work. I read it in a FAQ on this (I forget the name for +the 'law') just recently. :) + +Regards, + +Martijn + + + + diff --git a/demo/ermis-f/python_m/cur/1489 b/demo/ermis-f/python_m/cur/1489 new file mode 100644 index 00000000..e76d864b --- /dev/null +++ b/demo/ermis-f/python_m/cur/1489 @@ -0,0 +1,32 @@ +From: hj_ka at my-dejanews.com (hj_ka at my-dejanews.com) +Date: Thu, 15 Apr 1999 02:10:10 GMT +Subject: Tkinter: making a window unresizable (Win 95) +Message-ID: <7f3hpt$e64$1@nnrp1.dejanews.com> +X-UID: 1489 + +Hi, + +Toplevels in Tkinter in Windows-95 come with +the resizing button on the upper-right corner, +next to the iconify and close buttons. + +Even if I use resizable(0,0) method of the +Tkinter.Toplevel class, the resizing button +still persists. And when I click on it, although the +window now does not resize, it still flickers and +moves around. This is kind of annoying. + +Is there a way of creating a non-resizable +Toplevel in Tkinter more easily? Namely, is there +a way to eliminate the resizing button completely? + +regards, + +HJ + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/1490 b/demo/ermis-f/python_m/cur/1490 new file mode 100644 index 00000000..7a855882 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1490 @@ -0,0 +1,48 @@ +From: mnot at pobox.com (Mark Nottingham) +Date: Mon, 12 Apr 1999 21:51:31 GMT +Subject: hey advocates +References: <7etg59$6mt$1@nnrp1.dejanews.com> +Message-ID: <003f01be852e$a0125b60$0301a8c0@cbd.net.au> +Content-Length: 1145 +X-UID: 1490 + +I had a program that I wrote in Perl and had no problem getting into +cgi-resources. Then, when I rewrote it in Python and released it (while +still making the original available; different uses), he wouldn't create a +category for Python, and he wouldn't even put it somewhere else. Grrr... + + +----- Original Message ----- +From: +Newsgroups: comp.lang.python +To: +Sent: Tuesday, April 13, 1999 5:05 +Subject: hey advocates + + +> I don't know whether it really matters or not, but aren't there +> any CGI or web applications written in Python? +> +> http://cgi-resources.com/Programs_and_Scripts/ +> +> [Actually, my experience has been that sites like this one +> don't actually accept submissions they have no exterior interest +> in, but it might be worth a try. Let's harass the poor bugger, +> shall we?] +> +> -- Aaron Watters +> +> ==== +> +> It's humbling to think that when Mozart was my age +> he'd been dead for 3 years. -- Tom Lehrer +> +> -----------== Posted via Deja News, The Discussion Network ==---------- +> http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own +> +> + + + + + diff --git a/demo/ermis-f/python_m/cur/1491 b/demo/ermis-f/python_m/cur/1491 new file mode 100644 index 00000000..745d9604 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1491 @@ -0,0 +1,23 @@ +From: aa8vb at vislab.epa.gov (Randall Hopper) +Date: Fri, 23 Apr 1999 07:27:10 -0400 +Subject: Callbacks and "callable" objects +In-Reply-To: ; from Michael Hudson on Thu, Apr 22, 1999 at 05:54:03PM +0100 +References: <19990422113516.A278137@vislab.epa.gov> +Message-ID: <19990423072710.A344288@vislab.epa.gov> +X-UID: 1491 + +Michael Hudson: + (wrapper class) + (default-arg lambda/function wrapper) + +Christian Tismer: + (functor module) + (default-arg lambda/function wrapper) + +Thanks for the responses. I now have several good ways to approach this. + +Randall + + + + diff --git a/demo/ermis-f/python_m/cur/1492 b/demo/ermis-f/python_m/cur/1492 new file mode 100644 index 00000000..c8d51bab --- /dev/null +++ b/demo/ermis-f/python_m/cur/1492 @@ -0,0 +1,33 @@ +From: nagwa at math.ephouse.com (Nagwa Abdel-Mottaleb) +Date: 22 Apr 1999 20:35:26 GMT +Subject: >>> Down-Translation? <<< +Message-ID: <7fo16e$810$1@usenet49.supernews.com> +X-UID: 1492 + +Greetings: + +I am looking for a suitable language that will enable me to +down-translate XML files into something like LaTeX files. +Is it easy to use Python for this process? For example, +how easy it is to write code segments that enable to +translate + +foo + +in the xml input file into + +\begin{tag} +foo +\end{tag} + +and things like that in the tex output file? + +Any pointers and/or sample code will be appreciated. +(Please e-mail me if possible.) + +--Nagwa Abdel-Mottaleb + + + + + diff --git a/demo/ermis-f/python_m/cur/1493 b/demo/ermis-f/python_m/cur/1493 new file mode 100644 index 00000000..64e4355d --- /dev/null +++ b/demo/ermis-f/python_m/cur/1493 @@ -0,0 +1,25 @@ +From: justin at linus.mitre.org (Justin Sheehy) +Date: 23 Apr 1999 17:40:21 -0400 +Subject: Time complexity of dictionary insertions +References: <371F2125.BEC5F892@fzi.de> <7fo08u$4j2$1@nnrp1.dejanews.com> <37207005.1CC60E1B@palladion.com> +Message-ID: +X-UID: 1493 + +Tres Seaver writes: + +> > Min O(1), Max O(N), Ave O(1). If the hash function is doing a terrible job +> > (e.g. maps every key to the same hash value), make those all O(N). +> +> C++ STL junkies know this as "amortized constant time". + +So does anyone who has ever studied much at all about algorithms, data +structures, and optimization. + +It's not a C++ thing. It's a computer science thing. + +-Justin + + + + + diff --git a/demo/ermis-f/python_m/cur/1494 b/demo/ermis-f/python_m/cur/1494 new file mode 100644 index 00000000..4747bf34 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1494 @@ -0,0 +1,62 @@ +From: gmcm at hypernet.com (Gordon McMillan) +Date: Sat, 24 Apr 1999 15:21:03 GMT +Subject: wrapped around the axle on regexpressions and file searching +In-Reply-To: <7frhe0$8g1$1@nnrp1.dejanews.com> +References: <7frhe0$8g1$1@nnrp1.dejanews.com> +Message-ID: <1287155028-45807148@hypernet.com> +Content-Length: 1723 +X-UID: 1494 + +msrisney writes: +> +> I'm attemtping to locate log files on my drive(s), and do some +> comparison. here's a simplified snippet where I'm getting +> bottlenecked. +> +> >>>import os,re +> >>>regexp = re.compile('.log') +> >>>def find_log_files(arg, directory, names): +> ...for name in os.listdir(directory): +> if regexp.search(name): +> print directory + "\\" + name +> >>>os.path.walk('D:\\',find_log_files,None) +> +> +> here are my questions: 1. this prints out not only files with the +> file extensions ".log" but also any file name that has "log" in it's +> name. how would I rewrite to avoid?? + +In a regex, a "." is a wildcard character. If you want a literal "." +you need to escape it: + re.compile('\\.log') +or + re.compile(r'\.log') + +> 2. is there a better, faster way of doing this??, my end goal is to +> open the files and compare time sequences to one another. + +Any number of ways that would be faster. Since you've already got +os imported, you could use os.path.splitext() + if os.path.splitext(name)[1] == '.log': + +> 3. Is ther any way to determine the number of drives on a system, +> obviuosly I am hardcoding the top level drive letter "D:\", is there +> any way to search the entire system much like win32's find file +> search?? + +Do you know how to search multiple drives with FindxxxFIle()? I've +always thought that you either got the current drive or specified the +drive to search. + +At any rate, os.path.exists('e:/') is an effective way of finding out +if e: exists. Though specifying 'a:/' will pop up one of those lovely +Abort/Retry/Fail dialogs if nothing is in the drive. + +in-nearly-20-years-I-still-haven't-figured-out-the-difference-between + -Abort-and-Fail-ly y'rs + +- Gordon + + + + diff --git a/demo/ermis-f/python_m/cur/1495 b/demo/ermis-f/python_m/cur/1495 new file mode 100644 index 00000000..eea47b61 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1495 @@ -0,0 +1,34 @@ +From: tismer at appliedbiometrics.com (Christian Tismer) +Date: Wed, 21 Apr 1999 10:58:32 GMT +Subject: WINNT/9X patch for errors.c +References: <371CF528.532DB5C@appliedbiometrics.com> <199904202239.SAA11014@eric.cnri.reston.va.us> <371DADAC.AF549EC0@appliedbiometrics.com> +Message-ID: <371DAF58.70794C81@appliedbiometrics.com> +X-UID: 1495 + +Sorry, I forgot to change this: + +Instead of _WIN32, one should use MS_WIN32 which has the +same meaning, but is the correct convention for Python. +Please adjust the 3 places in the diff from + +> + #ifndef _WIN32 + +to + +> + #ifndef MS_WIN32 + +(it has no other effect, just a matter of style) + +ciao - chris + +-- +Christian Tismer :^) +Applied Biometrics GmbH : Have a break! Take a ride on Python's +Kaiserin-Augusta-Allee 101 : *Starship* http://starship.python.net +10553 Berlin : PGP key -> http://wwwkeys.pgp.net +PGP Fingerprint E182 71C7 1A9D 66E9 9D15 D3CC D4D7 93E2 1FAE F6DF + we're tired of banana software - shipped green, ripens at home + + + + diff --git a/demo/ermis-f/python_m/cur/1496 b/demo/ermis-f/python_m/cur/1496 new file mode 100644 index 00000000..474929fd --- /dev/null +++ b/demo/ermis-f/python_m/cur/1496 @@ -0,0 +1,52 @@ +From: jkraai at murl.com (jkraai at murl.com) +Date: Tue, 6 Apr 1999 16:27:54 GMT +Subject: Rat sighting online +Message-ID: <004001be804a$86f8cc60$8b7125a6@cpda6686.mcit.com> +Content-Length: 1156 +X-UID: 1496 + +Gee, didn't know anyone'd take this as bad. Just thought it +deserved a catchy moniker. + +I really like it, too. When I was young, I used to catch these +rodents (well, one anyway :). + +I like the cover, I like Mark's work, I like Python, I think the Python +community's the best of its kind on the planet, I'll be buying two +copies of the book as gifts. + +I'll hide my feelings on Nixon (hint: he was probably less flawed +than me). + +I guess next time I'll sprinkle it with '< 1 spoonful wink>' and the +medicine will go down better. ;) + +--jim + +-----Original Message----- +From: Tom Fenn +Newsgroups: comp.lang.python +To: python-list at cwi.nl +Date: Tuesday, April 06, 1999 11:08 AM +Subject: Re: Rat sighting online + + +>I actually like the cover. It has that "There everywhere but you can't +>see them" +>idea that I associate with Python. +> +>Mark Lutz wrote: +>> +>> jkraai at murl.com writes about Learning Python: +>> > I can't resist, can we refer to it as: +>> > +>> > _Nixon_in_a_Nutshell_? +>> +>> I don't care how you refer to it, as long as you do ;-). +>> +>> --Mark Lutz (http://rmi.net/~lutz) + + + + + diff --git a/demo/ermis-f/python_m/cur/1497 b/demo/ermis-f/python_m/cur/1497 new file mode 100644 index 00000000..d2eac7ac --- /dev/null +++ b/demo/ermis-f/python_m/cur/1497 @@ -0,0 +1,59 @@ +From: akuchlin at cnri.reston.va.us (Andrew M. Kuchling) +Date: Fri, 2 Apr 1999 21:59:08 GMT +Subject: Python books +In-Reply-To: +References: + <7dtsa4$b6p$1@nnrp1.dejanews.com> + + <7e0t19$1de$1@nnrp1.dejanews.com> + <7e2vol$8c6$1@news1.rmi.net> + +Message-ID: <14085.14480.691560.774349@amarok.cnri.reston.va.us> +Content-Length: 1802 +X-UID: 1497 + +evil Japh writes: +>Python" is more a book to be read through, rather than a reference; I'm +>not saying I expected it to be a reference, but that I would like a book +>that was a reference. + + I think the existing free documentation at +http://www.python.org/doc/ is fine for reference purposes, and +multiple reference guides aren't needed. Reference docs have the most +complete and detailed coverage, and are subject to the most nitpicking +flaws, so the division of effort resulting from two different sets of +reference docs costs you a lot of accuracy and completeness. We +should concentrate on improving them. + + For an example of why this is bad, look at some of the +O'Reilly Java books, such as the Swing book. Some of the material +essentially duplicates the Swing API docs, but you can't trust that +material because, given the lead time required for book publication, +some details may have changed, so you have to look at Sun's docs for +definitive information anyway; having another reference-like work +doesn't help anything, because it might be wrong. The reference-like +material also makes the Swing book painfully dull to read, and +probably soul-destroyingly boring to write, too. Focusing on tutorial +aspects would have made the book smaller, less likely to get out of +date, and more readable. + + Multiple *tutorials* and other learning documentation, on the +other hand, are definitely good, since different people like different +presentations. + +-- +A.M. Kuchling http://starship.python.net/crew/amk/ + "Where does this one come from? Have you been raiding poor Holinshed +again? Or does Plutarch bear the brunt of your depredations?" + "Bits of things, here and there, but it's mostly mine, for once." + -- Ben Jonson and William Shakespeare, in SANDMAN #75, "The Tempest" + + + + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1498 b/demo/ermis-f/python_m/cur/1498 new file mode 100644 index 00000000..024c53ea --- /dev/null +++ b/demo/ermis-f/python_m/cur/1498 @@ -0,0 +1,36 @@ +From: Martin.Preishuber at stuco.uni-klu.ac.at (Martin Preishuber) +Date: Fri, 23 Apr 1999 08:33:42 +0000 +Subject: Strange fork() behaviour +Message-ID: <37203066.6B4A58D9@stuco.uni-klu.ac.at> +X-UID: 1498 + +Hi, + +There are some strange things with fork() and python 1.5.2 going +on here. + +I do have some main program which is basically + +while 1: + fork() + +The program forks under certain conditions and works as expected +but somewhen the main process dies even though it is in the +while 1: loop ... there's no error message ... did anyone +see anything similar ? the program worked fine with 1.5.1 +(this is all on a linux box running rh 5.2 and kernel 2.2.6-ac1) + +Martin + +-- +Martin Preishuber - Student, ECLiPt Core Member, SysAdmin +http://eclipt.uni-klu.ac.at, +mailto:Martin.Preishuber at stuco.uni-klu.ac.at + +Quigley's Law: +Whoever has any authority over you, no matter how small, will +atttempt to use it. + + + + diff --git a/demo/ermis-f/python_m/cur/1499 b/demo/ermis-f/python_m/cur/1499 new file mode 100644 index 00000000..51d92eb7 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1499 @@ -0,0 +1,18 @@ +From: max at rightworks.com (max at rightworks.com) +Date: Tue, 27 Apr 1999 22:50:02 GMT +Subject: smtplib hang on send "data " to MS SMTP server +Message-ID: <7g5euo$m7e$1@nnrp1.dejanews.com> +X-UID: 1499 + +code which works fine with netscape SMTP mail server, fails (hangs) when +attempting to send mail to a MicroSoft SMTP server. In the module following +the call to putcmd("data") the data() calls getreply and never returns. Does +anyone have an idea what is happening here? The server seems to work with +other clients. thanks max + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/1500 b/demo/ermis-f/python_m/cur/1500 new file mode 100644 index 00000000..c7137ce0 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1500 @@ -0,0 +1,48 @@ +From: bernhard at alpha1.csd.uwm.edu (Bernhard Reiter) +Date: 5 Apr 1999 18:19:02 GMT +Subject: gzip/zlib module Doc bug (1.5.2b2 Library Reference) +Message-ID: +Content-Length: 1577 +X-UID: 1500 + +I probably encountered a Python Library Reference Documentation bug: + +The documentation version February 19, 1999 Release 1.5.2 +coming with the windows packages in module gzip reads as follows: + +| 7.11 gzip -- gzip compression and +| decompression using files. +| +| The data compression provided by the zlib module is compatible with +| that used by the GNU compression program gzip. Accordingly, the gzip +| module provides the GzipFile class to read and write gzip-format +| files, automatically compressing or decompressing the data so it +| looks like an ordinary file object. + +This leaves the impression that the gzip module can decompress +all the files the gzip program can decompress, which is not true. +The gzip program can also deflate data compressed with "compress" +and "pack". The python module cannot do this. + + +Another weakness in ether the documentation or the module itself is: + +| GzipFile ([filename[, mode[, compresslevel[, fileobj]]]]) +[..] +| The mode argument can be either 'r' or 'w', depending on +| whether the file will be read or written. The default is the mode of +| fileobj if discernible; otherwise, the default is 'r'. + +This is not true for Windows, where you need and have to use an +additional "b" in the mode argument. At least I needed to do it, +because otherwise I got an Error -5: Hit EOF when reading one file. There was +probably a binary ^Z in the compressed file that the windows read rountines +took for an EOF, because they were used in text mode. + +Both bugs sucked in some of my time. +I hope this helps to improve! ;-> + Bernhard + + + + diff --git a/demo/ermis-f/python_m/cur/1501 b/demo/ermis-f/python_m/cur/1501 new file mode 100644 index 00000000..68c39164 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1501 @@ -0,0 +1,69 @@ +From: mwh21 at cam.ac.uk (Michael Hudson) +Date: 22 Apr 1999 17:54:03 +0100 +Subject: Callbacks and "callable" objects +References: <19990422113516.A278137@vislab.epa.gov> +Message-ID: +Content-Length: 1968 +X-UID: 1501 + +Randall Hopper writes: +> A while back I asked how to pass parameterized callbacks to Tkinter. +> Now I need to explore how best to do partial resolution of callback +> arguments. For example, define values for arguments 1 and 2 at +> registration time, but leave argument 3 to be populated by Tkinter. +> +> Probably makes no sense. So let me use an example: + +I don't think that you've described your problem too well here, but I +understand the problem faced in the example well enough. + +What you want is a callable object with state indpendent of the +parameters it's passed by whatever's calling it. In your example +below, you want the callback to have a `color' state. + +The most Pythonic way of doing this is to define a class like this: + +class ColorCallback: + def __init__(self,color): + self.color=color + def callback(self,event): + print self.color + +wgt1.configure( command = ColourCallback("blue").callback ) + +This can be a lot of typing for a measly little callback however, +leading to the dreaded `default argument hack': + +def make_color_callback(color): + def _(event,color=color): + print color + return _ + +This is less typing (& quicker) but it is sneaky. Tim Peters once +said: + +> Not at all, although I agree here too . It's like saying a +> fork is broken just because it's not that handy for jacking up a +> car. That is, Guido implemented the syntax to support default +> arguments, and it works great for that purpose! Using it to fake +> closures is a hack, and the "hey, this is cool!" / "hey, this really +> sucks!" mixed reaction thus follows, much as pain follows a car +> falling on your skull. Stick to stabbing peas, or even teensy +> pea-sized closures, and a fork serves very well. + +which sums it up far better than I ever could. + +(Pay a visit to +http://starship.python.net/crew/amk/quotations/python-quotes.html +somtime...) + +HTH + +Michael Hudson +Jesus College +Cambridge +CB5 8BL + + + + diff --git a/demo/ermis-f/python_m/cur/1502 b/demo/ermis-f/python_m/cur/1502 new file mode 100644 index 00000000..fea1e851 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1502 @@ -0,0 +1,38 @@ +From: tim_one at email.msn.com (Tim Peters) +Date: Sun, 25 Apr 1999 22:26:03 -0400 +Subject: converting perl to python - simple questions. +In-Reply-To: +Message-ID: <000101be8f8c$21a1d540$d5a02299@tim> +Content-Length: 1073 +X-UID: 1502 + +[about Perl "if (defined($x{$token})"] + +[Tim sez "under the probably-correct theory that the Perl is just + asking "does hash 'x' have key 'token'?"] + +[Aahz Maruch] +> Try "definitely wrong theory" ;-). In Perl, exists($x{$token}) is +> precisely equivalent to Pyton's x.has_key(token), and you can either use +> defined($x{$token}) or $x{$token}!=undef to make sure that a value +> exists for that key. Thing is, in Perl you can go straight to checking +> the value because a non-existant key is not an error. +> +> (I won't quite call myself a Perl expert, but I'm pretty close to an +> expert on Perl hashes.) + +But most Perl programmers aren't, and I've suffered thru enormous piles of +Perl code that used "defined" where "exists" was appropriate. That's where +my "probably" comes from: not talking about what the language does, but +what the programmer probably *intended*. In the absence of more information +about what the original script does, my guess is still that the author +*intended* "exists" == has_key. + +not-all-perl-code-is-well-written-ly y'rs - tim + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1503 b/demo/ermis-f/python_m/cur/1503 new file mode 100644 index 00000000..d344c95b --- /dev/null +++ b/demo/ermis-f/python_m/cur/1503 @@ -0,0 +1,90 @@ +From: dalke at bioreason.com (Andrew Dalke) +Date: Thu, 29 Apr 1999 18:26:56 -0600 +Subject: while (a=b()) ... +References: <19990430000141.A5867@shalott> +Message-ID: <3728F8D0.5E91C0F5@bioreason.com> +Content-Length: 1611 +X-UID: 1503 + +Marco Mariani +> Which one is more ugly? + +> c = curs.fetchone() +> while c: +> print c +> c = curs.fetchone() + +> while 1: +> c = curs.fetchone() +> if c: +> print c +> else: +> break + + The usual answers when this is asked (quick, checking if this is +in the FAQ as it is a faq -- nope) are: + +1) "The first is uglier as you have needless duplication of +code" + +2) """I wish Python could do + + while (c = curs.fetchone()): + print c +""" + + To which the response is, it isn't worth the consequences of +making hard-to-catch errors like + + while (c == curs.fetchone()): + print c + +3) "You quickly get used to it" + + +4) "Try rewriting your code to use __getitem__" + +For you specific example you really want to have something like: + +a) + for c in curs: + print c + +b) or maybe + + for c in curs.fetchall() + +c) or how about (warning: untested code ahead) + +class ForwardIterate: + def __init__(self, callable): + self._callable = callable + self._i = 0 + def __getitem__(self, n): + assert(self._i == n) # probably being overly paranoid... + self._i = self._i + 1 + return callable() + +for c in ForwardIterate(curs.fetchone): + print c + + +5) "Oh, and then there's Evan Simpson's PITA" + + http://www.dejanews.com/getdoc.xp?AN=429491196 + + +6) "This has been discussed many times in the newsgroup before so stop +the thread." + +In other words, searching DejaNews for the thread "Assignment in +Conditional" I found 248 articles in it. + + + Andrew Dalke + "And hi to you Jeff!" + dalke at bioreason.com + + + + diff --git a/demo/ermis-f/python_m/cur/1504 b/demo/ermis-f/python_m/cur/1504 new file mode 100644 index 00000000..b4e50469 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1504 @@ -0,0 +1,34 @@ +From: joe at strout.net (Joe Strout) +Date: Mon, 12 Apr 1999 10:08:35 -0700 +Subject: simple indexed file module? +Message-ID: +Content-Length: 1157 +X-UID: 1504 + +For a CGI script I'm working on, I need to keep a couple of indexed +files. These will contain variable-length data (descriptions), which +may be changed fairly frequently. So I imagine that in addition to the +data file, there will be an index file that keeps track of the position +and length of each record. New or expanded records will be stuffed in +wherever there is free space, or at the end if no sufficient free chunk +is available. + +Is there already a module out there that does this? I know I could use +some sort of SQL interface, but I don't want to take up space on my web +site host for such a database engine. For this application, a little +Python implementation should work fine (and besides, that way I can +test it in the comfort of my Mac). Anybody have such a beast? + +Thanks, +-- Joe + +-- +,------------------------------------------------------------------. +| Joseph J. Strout Biocomputing -- The Salk Institute | +| joe at strout.net http://www.strout.net | +`------------------------------------------------------------------' +Check out the Mac Web Directory! http://www.strout.net/macweb.cgi + + + + diff --git a/demo/ermis-f/python_m/cur/1505 b/demo/ermis-f/python_m/cur/1505 new file mode 100644 index 00000000..83f8a5a4 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1505 @@ -0,0 +1,22 @@ +From: MHammond at skippinet.com.au (Mark Hammond) +Date: Sat, 10 Apr 1999 10:28:05 +1000 +Subject: Possible 1.5.2 bug +References: <370E1DC7.BC2574B5@freemail.nl> +Message-ID: <7em5tv$fkb$1@m2.c2.telstra-mm.net.au> +X-UID: 1505 + +Richard van de Stadt wrote in message <370E1DC7.BC2574B5 at freemail.nl>... + +>I just stick a picture of a face on my monitor and talk to +>it to find bugs. + +Then my girlfriend would _definately_ leave me :-) + +Mark. + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1506 b/demo/ermis-f/python_m/cur/1506 new file mode 100644 index 00000000..0781f40c --- /dev/null +++ b/demo/ermis-f/python_m/cur/1506 @@ -0,0 +1,74 @@ +From: mlh at idt.ntnu.no (Magnus L. Hetland) +Date: 25 Apr 1999 21:45:17 +0200 +Subject: Efficient List Subtraction +References: <3720EF73.CA7DDEFF@Colorado.edu> +Message-ID: +Content-Length: 1599 +X-UID: 1506 + +"Steven D. Majewski" writes: + +> On Fri, 23 Apr 1999, KELLEY SCOTT T wrote: +> +> > +> > Does anyone out there have a simple way to compare two lists (some operator perhaps) and +> > return +> > a list of *differences*? By differences, I mean the following: If had two +> > lists like, +[...] +> +> Well -- it's probably not the most efficient, but the simplest +> list intersection is probably: + +OK... Posted an efficient version earlier -- now for the simple ones... + +(Assuming that there are no duplicates in the original lists...) + +> +> >>> a = [1,4,5,100] +> >>> b = [4,5] +> >>> filter( lambda x: x in a, b ) +> [4, 5] +> >>> filter( lambda x: x in b, a ) # order doesn't matter +> [4, 5] # for intersection +> +> # but it does for set-difference +> >>> filter( lambda x: x not in a, b ) # b - a +> [] +> >>> filter( lambda x: x not in b, a ) # a - b +> [1, 100] +> +> I don't think union or XOR can be done as concisely. + +Let's do union first: + +>>> a + filter(lambda x: x not in a, b) + +Then XOR: + +>>> filter(lambda x: x not in b, a) + filter(lambda x: x not in a, b) + +*If* we had an xor operator, we might say: + +>>> filter(lambda x: x in a xor x in b, a+b) + +Even though we don't, we might settle for: + +>>> filter(lambda x: (x in a and not (x in b)) or \ + (x in b and not (x in a)), a+b) + +Or, actually: + +>>> filter(lambda x: not (x in a and x in b), a+b) + +Not too bad, is it? + +-- + > Hi! I'm the signature virus 99! + Magnus > Copy me into your signature and join the fun! + Lie + Hetland http://arcadia.laiv.org + + + + diff --git a/demo/ermis-f/python_m/cur/1507 b/demo/ermis-f/python_m/cur/1507 new file mode 100644 index 00000000..a3a606b4 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1507 @@ -0,0 +1,26 @@ +From: zigron at jps.net (Zigron) +Date: Fri, 23 Apr 1999 23:08:09 -0700 +Subject: GUI other than Tkinter +References: <3721567f.1748033@news> +Message-ID: <3721d516@news1.jps.net> +X-UID: 1507 + + If you don't want to learn MFC (which is a headache!), there's wxPython, +which i'm looking at now.. its very nice. :) Check the contributed download +part of the python website... + +--Stephen + wrote in message news:3721567f.1748033 at news... +> Well, I've just about given up on EVER getting Tkinter to work on my +> Win98 machine. Is there any other GUI module that I can get that +> doesn't require TCL/TK to be installed on my machine? Isn't there +> something called GD? +> +> Thanks, +> Frustrated in Frisco..... + + + + + + diff --git a/demo/ermis-f/python_m/cur/1508 b/demo/ermis-f/python_m/cur/1508 new file mode 100644 index 00000000..2d701e5b --- /dev/null +++ b/demo/ermis-f/python_m/cur/1508 @@ -0,0 +1,41 @@ +From: MHammond at skippinet.com.au (Mark Hammond) +Date: Sun, 11 Apr 1999 08:57:49 +1000 +Subject: Python without registry entries +References: <370fb711.28093946@news.demon.co.uk> +Message-ID: <7eol16$1l2$1@m2.c2.telstra-mm.net.au> +Content-Length: 1165 +X-UID: 1508 + +Paul Moore wrote in message <370fb711.28093946 at news.demon.co.uk>... + +>However, it would be nice to be able to run Python, at some level, +>without *any* configuration changes (registry entries, environment +>variables) at all. (Perl runs fine from a CD binary distribution, with +>no registry settings). Can I do this? If so, what (if any) changes are +>needed to the basic installed distribution? + +You can. Python does not _need_ the registry for anything. Python can +build a default sys.path when it starts, so assuming your .py files are in a +"standard" place (eg, a .\lib directory off you executable) no additional +paths are needed. + +pywintypes and pythoncom do need special treatment without the registry. If +you do a dejanews search, I posted some code that can load these 2 modules +without the registry. + +Further, you can change a string in your compiled python15.dll, and you can +ensure that it will not conflict with other versions of Python the user may +already have... + +Ive packaged Python like this a number of times. + +Easiest way to go: Rename your Python registry key, then start Python.exe +and print sys.path. Then work from that :-) +Mark. + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1509 b/demo/ermis-f/python_m/cur/1509 new file mode 100644 index 00000000..0fc73613 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1509 @@ -0,0 +1,45 @@ +From: kiffney at my-dejanews.com (Gustin Kiffney) +Date: Fri, 23 Apr 1999 17:26:10 GMT +Subject: pythonwin/mapi crystal ball needed +References: <7fnbks$ga1$1@nnrp1.dejanews.com> <7foapn$iij$1@m2.c2.telstra-mm.net.au> +Message-ID: <7fqafc$7b3$1@nnrp1.dejanews.com> +Content-Length: 1534 +X-UID: 1509 + +Thanks, your answer is in fact very helpful, since I don't know enough about +MAPI yet to figure out which way to go (in terms of least effort). Perhaps +when I'm done I can help w/ the python extensions - if I ever return alive! + +BTW, pythonwin is a very neat job. Someday I hope it will make VB go away ... + + "Mark Hammond" wrote: +> Gustin Kiffney wrote in message <7fnbks$ga1$1 at nnrp1.dejanews.com>... +> +> >Anyway I've long put off learning much about MFC/COM/MAPI because +> >it looked too hard, but now have to find a way to implement a MAPI +> >service provider (an address book). I've looked at the MAPI stuff +> >in the python win32all distribution and it looks pretty complete (anyway, +> >it looks like lots of stuff that I don't understand yet is there). +> +> Unfortunately, Python can not do this. The MAPI support allows us to _use_ +> MAPI objects, whereas implementing an Address Book provider requires you to +> implement them. +> +> The only way to go this route is to enhance the MAPI support to be able to +> do this. This would not be trivial - I would allow myself 1 week to do +> this. However, as writing an Address Book provider is very hard, and lots +> of code, I personally would probably still go this route - I think the week +> invested would buy me time... +> +> Sorry I can't be more help, or give better news... +> +> Mark. +> +> + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/1510 b/demo/ermis-f/python_m/cur/1510 new file mode 100644 index 00000000..bbf8abc4 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1510 @@ -0,0 +1,20 @@ +From: barry at scottbb.demon.co.uk (Barry Scott) +Date: Sun, 11 Apr 1999 15:51:02 +0100 +Subject: 1.5.2c1 will not compile on Windows NT SP4 with VC++ 6.0 SP1 +References: <923765974.19722.0.nnrp-03.9e982a40@news.demon.co.uk> <000001be83b4$65c95d80$7fa22299@tim> +Message-ID: <923842373.6258.0.nnrp-10.9e982a40@news.demon.co.uk> +X-UID: 1510 + +Yep I saw and mis understood that redirect to pcbuild. + +I suggest in mail to Guido that vc40.mak is removed from the kit +and that the top level readme point windows builders to the +pcbuild dir. + + BArry + + + + + + diff --git a/demo/ermis-f/python_m/cur/1511 b/demo/ermis-f/python_m/cur/1511 new file mode 100644 index 00000000..9b75cd1b --- /dev/null +++ b/demo/ermis-f/python_m/cur/1511 @@ -0,0 +1,54 @@ +From: andrew at starmedia.net (Andrew Csillag) +Date: Fri, 16 Apr 1999 15:57:57 GMT +Subject: Bug with makesetup on FreeBSD +Message-ID: <37175E05.4CF3C68@starmedia.net> +Content-Length: 1499 +X-UID: 1511 + +makesetup in Python 1.5.1 and 1.5.2 bombs on lines in the Setup file +that use backslash continuation to break a module spec across lines on +FreeBSD. + +FreeBSD's /bin/sh is the culprit. It's read function doesn't continue +reading a line if the last char is a backslash. For example: +input being: +somemodule somemodule.c \ + -lsomelib +doing a read line only gets the first line and makesetup barfs on line +154 with invalid word on \ (as opposed to bash (or other sh's) that get +"somemodule somemodule.c -lsomelib" back from read). + +This patch to this works with both FreeBSD's sh and bash. What it does +is this: +While the last char of $line is a \, read another line and glue it to +the original minus the \. + +*** makesetup Fri Apr 16 11:43:55 1999 +--- makesetup Fri Apr 16 11:43:12 1999 +*************** +*** 104,107 **** +--- 104,115 ---- + while read line + do ++ #to handle backslashes for sh's that don't automatically ++ #continue a read when the last char is a backslash ++ while echo $line | grep '\\$' > /dev/null ++ do ++ read extraline ++ line=`echo $line| sed s/.$//`$extraline ++ done ++ + # Output DEFS in reverse order so first definition +overrides + case $line in + +Cheers, +Drew Csillag +-- +"There are two major products that come out of Berkeley: +LSD and UNIX. We don't believe this to be a coincidence." +- Jeremy S. Anderson + + + + diff --git a/demo/ermis-f/python_m/cur/1512 b/demo/ermis-f/python_m/cur/1512 new file mode 100644 index 00000000..9361039b --- /dev/null +++ b/demo/ermis-f/python_m/cur/1512 @@ -0,0 +1,30 @@ +From: news at dorb.com (Darrell) +Date: Sat, 3 Apr 1999 15:43:36 -0500 +Subject: Rat sighting online +References: <19990403170011.21264.rocketmail@web602.mail.yahoo.com> +Message-ID: +X-UID: 1512 + +I created the struct.py module and got this error. Guess I'll wait for the +next version of Jpython. +JPython 1.0.3 on java1.1.4 +Copyright 1997-1998 Corporation for National Research Initiatives +>>> import sys +>>> sys.path.append('d:\\python\\lib') +>>> import graph +Traceback (innermost last): + File "", line 1, in ? + File "D:\at\sched\.\graph.py", line 202, in ? + File "D:\at\sched\.\graph.py", line 116, in __init__ + File "D:\at\sched\.\graph.py", line 131, in do_layout +TypeError: can't assign to this attribute in java instance: size + + + + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1513 b/demo/ermis-f/python_m/cur/1513 new file mode 100644 index 00000000..f8a3f193 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1513 @@ -0,0 +1,60 @@ +From: satyan at ppllc.com (Sunil Satyan) +Date: Fri, 30 Apr 1999 12:53:59 -0400 +Subject: CORBA IDL AND SCRIPTS +Message-ID: <3729E026.D9D29B1@ppllc.com> +Content-Length: 2196 +X-UID: 1513 + +Hi All, + Hi. I was looking for someone to speak to regarding a few questions +that I had about IDL. I would be glad if someone can aswer my +question: + + a) Given that we are moving towards CORBA, we would like to specify all +our interfaces ( all of them not + necessarily pertaining to client/server) in IDL. i.e., the +interfaces we specify must be capable of being used + by CORBA (which is OK) AND be available in any scripting language - +PERL, PYTHON, TCL etc. I recently + evaluated an open system tool called SWIG (Simplfied Wrapper and +Interface Generator) that allows one + to define classes or C-functions in an interface file (with ANSI +C/C++ syntax). After the SWIG generator + is run on the interface, it outputs the bindings required for a +particular target scripting language - tcl, + python, perl, etc. These interface defined classes/functions are +then directly available in the target scripting + language. For instance, if example.i contained a function "int +fact(int);" and example.c contained the + implementation for the function, running SWIG on example.i will +produce a wrapper file that, when + built together with the implementation file, makes the function +available in the target scripting language. + Thats SWIG in a nutshell and fits well with our needs. + + Now, with CORBA's IDL in the picture, we are faced with defining +client/server interfaces in CORBA + specific IDL. But, we'd like to define ALL interfaces - be it +scripting languare interfaces, CORBA interfaces + - in ONE type of IDL and generate either a) Scriping language +bindings or b) CORBA client/server bindings. + This allows for consistency in interface definition even for +disparate usage of these interfaces. + + My question is: Is there any support for generating Scripting +language bindings from CORBA IDL or a + translator (less preferable) that can translate from CORBA IDL to a +scripting language IDL ?? + + I realize that I may have to direct these questions to the +appropriate CORBA implementation Vendor. + But, I figured I would turn turn here for any suggestions! + + Thanks a million! + Sunil . + satyan at ppllc.com + + + + + diff --git a/demo/ermis-f/python_m/cur/1514 b/demo/ermis-f/python_m/cur/1514 new file mode 100644 index 00000000..518b42fa --- /dev/null +++ b/demo/ermis-f/python_m/cur/1514 @@ -0,0 +1,48 @@ +From: crowland at cisco.com (Craig H. Rowland) +Date: Mon, 5 Apr 1999 12:17:35 -0500 +Subject: SNMPy update +References: <7e1hiq$a71$1@Starbase.NeoSoft.COM> +Message-ID: <7ear25$ksf$1@news-sj-3.cisco.com> +Content-Length: 1474 +X-UID: 1514 + +A co-worker has written an SNMP library *entirely* in Python. It works on +every platform Python runs under (well, we haven't tried every platform, but +it does work under Unix and Windows). Unfortunately it can't be released +publicly. I only say this because it *is* possible to write an SNMP client +in 100% Python and this is a much better solution IMHO than using a Python +wrapper around C based libraries that aren't very portable such as the +current SNMPY solution. Conflict of interest issues keep us from releasing +the code, but I'm sure anyone interested in taking up the project (which +isn't difficult, it is just tedious how SNMP does things) can get questions +answered by the author which should make things much easier. If you are +interested in doing this let me know and I'll give you his e-mail address. + +-- Craig + + + + +> SNMPy interests quite a few people. I've reluctantly +> concluded that I can't be much of a leader in its near- +> term future; all I can afford for now is to report the +> little I know, and give a few personal suggestions on +> what we might do next. +> +> Thanks to the generosity of a correspondent, I can offer +> +, +> from last fall. I'd happily host more documents; what I +> think is healthiest for all, though, is that one of us +> organize an SNMP SIG, +> and immediately put up a few informative pages at +> python.org. +> + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1515 b/demo/ermis-f/python_m/cur/1515 new file mode 100644 index 00000000..fed611c4 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1515 @@ -0,0 +1,37 @@ +From: MHammond at skippinet.com.au (Mark Hammond) +Date: Tue, 6 Apr 1999 09:45:04 +1000 +Subject: win32pipe.popen2 file objects: How to use advanced operations? +References: +Message-ID: <7ebhtj$a3l$1@m2.c2.telstra-mm.net.au> +X-UID: 1515 + +Milton L. Hankins wrote in message ... +>I'm trying to use win32pipe.popen2(). +> +>I'd like to be able to set the buffer size of one or more of the file +>objects returned by it. How does one do this? + +Im not sure? + +>Also, how does one perform a non-blocking read or write on such a file +>object? + +Im pretty sure you can't. + +To have this level of control, you probably need to emulate win32popen +yourself - ie, use win32process.CreateProcess, etc. Then you can use +win32file.CreateFile to perform overlapped IO to perform the non-blocking +reads. + +This isnt covered in detail by the win32 extensions help files - all the +functions you need to use are covered, but for the specific techniques of +how to use overlapped IO you must use the windows documentation. + +Mark. + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1516 b/demo/ermis-f/python_m/cur/1516 new file mode 100644 index 00000000..da58896c --- /dev/null +++ b/demo/ermis-f/python_m/cur/1516 @@ -0,0 +1,43 @@ +From: aahz at netcom.com (Aahz Maruch) +Date: Mon, 26 Apr 1999 21:22:24 GMT +Subject: converting perl to python - simple questions. +References: <7fvagp$8lm$1@nnrp1.dejanews.com> +Message-ID: +Content-Length: 1024 +X-UID: 1516 + +In article , +Chad McDaniel wrote: +>aahz at netcom.com (Aahz Maruch) writes: +>> In article <7fvagp$8lm$1 at nnrp1.dejanews.com>, +>> wrote: +>>> +>>>a) Perl's "defined". +>>> [perl] +>>> if (defined($x{$token}) +>>> +>>> [python] +>>> if (x.has_key(token) and x[token]!=None) : +>> +>> That looks correct. Thankfully Python does have short-circuit +>> evaluation. Note that if you normally expect x[token] to have a value, +>> you might restructure the code a bit to use try/except. +> +>wouldn't x.get() work more elegantly: +>--- +>if (x.get(token)) : +> [do stuff] + +Yup. I keep forgetting about that one. Note that (cf recent thread) +"if ( not x.get(token) is None ) :" is faster in many cases. +-- + --- Aahz (@netcom.com) + +Hugs and backrubs -- I break Rule 6 <*> http://www.rahul.net/aahz/ +Androgynous poly kinky vanilla queer het + +Hi! I'm a beta for SigVirus 2000! Copy me into your .sigfile! + + + + diff --git a/demo/ermis-f/python_m/cur/1517 b/demo/ermis-f/python_m/cur/1517 new file mode 100644 index 00000000..9eaa8ad0 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1517 @@ -0,0 +1,30 @@ +From: phd at sun.med.ru (Oleg Broytmann) +Date: Sun, 11 Apr 1999 13:41:34 GMT +Subject: Processing time +In-Reply-To: <37109636.1FF246CB@xs4all.nl> +References: <37109636.1FF246CB@xs4all.nl> +Message-ID: +X-UID: 1517 + +Hi! + +On Sun, 11 Apr 1999, Frank de Bot wrote: +> How can I get the Processing time of a script? + +from time import time +start_time = time() + +Do_Processing() + +end_time = time() +print "The program spents", end_time - start_time, "seconds" + +Oleg. +---- + Oleg Broytmann National Research Surgery Centre http://sun.med.ru/~phd/ + Programmers don't die, they just GOSUB without RETURN. + + + + + diff --git a/demo/ermis-f/python_m/cur/1518 b/demo/ermis-f/python_m/cur/1518 new file mode 100644 index 00000000..d63b931a --- /dev/null +++ b/demo/ermis-f/python_m/cur/1518 @@ -0,0 +1,32 @@ +From: trashcan at david-steuber.com (David Steuber) +Date: 30 Apr 1999 17:47:18 -0400 +Subject: Designing Large Systems with Python +References: <372599D6.C156C996@pop.vet.uu.nl> <7g4a3l$atk$1@news.worldonline.nl> +Message-ID: +X-UID: 1518 + +Alex writes: + +-> Is this the sort of thing you want? +-> +-> Try C-c ! to create a python shell, C-c C-c to evaluate a buffer in that +-> shell, or C-c | to evaluate a marked region. Then you can execute +-> commands interactively in that shell. + +Yes! It looks like I need to pay more attention in Python mode to see +what options are made available to me. + +-- +David Steuber +http://www.david-steuber.com + +If you wish to reply by mail, _please_ replace 'trashcan' with 'david' +in the e-mail address. The trashcan account really is a trashcan. + +Ask not for whom the telephone bell tolls ... if thou art in the +bathtub, it tolls for thee. + + + + + diff --git a/demo/ermis-f/python_m/cur/1519 b/demo/ermis-f/python_m/cur/1519 new file mode 100644 index 00000000..2dc22e3a --- /dev/null +++ b/demo/ermis-f/python_m/cur/1519 @@ -0,0 +1,36 @@ +From: spamfranke at bigfoot.de (Stefan Franke) +Date: Mon, 19 Apr 1999 14:55:52 GMT +Subject: How to add data in a existant file ? +References: <7fepse$pff$1@nnrp1.dejanews.com> +Message-ID: <371b4310.32549353@news.omnilink.de> +X-UID: 1519 + +Use the "a" mode for appending. The complete documentation +of the open() function can be found in the Library Reference: + + http://www.python.org/doc/lib/built-in-funcs.html#l2h-213 + +Regards, +Stefan + + +On Mon, 19 Apr 1999 08:35:26 GMT, kiket at my-dejanews.com wrote: + +>Hi, +> +>I use python to developp a script and I want to know which is the fonction +>that permit to add data in a existant file. I know already how to write data +>in a new file -----> f=open('file.name','w') f.write('data') f.close() +> +>But how to merge data in a existant file ? +> +>Mail your response to fquiquet at lemel.fr +>Thank's a lot for your help. +> +>-----------== Posted via Deja News, The Discussion Network ==---------- +>http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + + diff --git a/demo/ermis-f/python_m/cur/1520 b/demo/ermis-f/python_m/cur/1520 new file mode 100644 index 00000000..72c5d105 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1520 @@ -0,0 +1,63 @@ +From: MHammond at skippinet.com.au (Mark Hammond) +Date: Wed, 21 Apr 1999 20:22:09 +1000 +Subject: permissions on win32 [Q] +References: <001201be8ba6$f2f706e0$6eba0ac8@kuarajy.infosys.com.ar> +Message-ID: <7fk8r0$7ng$1@m2.c2.telstra-mm.net.au> +Content-Length: 1677 +X-UID: 1520 + +NT security is a bit of a black art. Build 124 has +win32security.SetFileSecurity(). + +The next question will be how to create a security descriptor - here is some +sample code. + +[Oh damn - just realised that pywintypes.SECURITY_DESCRIPTOR() doesnt +actually exist in 124 - it will in 125. sorry - you will probably get stuck +here... But Ill still post it as reference for build 125 and later] + +Mark. + +def CreateSD(userName): + sd = pywintypes.SECURITY_DESCRIPTOR() + + sidUser = win32security.LookupAccountName(None,userName)[0] + sidCreator = pywintypes.SID() + sidCreator.Initialize(ntsecuritycon.SECURITY_CREATOR_SID_AUTHORITY,1) + sidCreator.SetSubAuthority(0, ntsecuritycon.SECURITY_CREATOR_OWNER_RID) + + acl = pywintypes.ACL() + acl.AddAccessAllowedAce(win32file.FILE_ALL_ACCESS, sidUser) + acl.AddAccessAllowedAce(win32file.FILE_ALL_ACCESS, sidCreator) + + sd.SetSecurityDescriptorDacl(1, acl, 0) + return sd + +Bruno Mattarollo wrote in message +<001201be8ba6$f2f706e0$6eba0ac8 at kuarajy.infosys.com.ar>... +>Hi! +> +> I have to do a little script for a customer that will copy files from an +NT +>server to another. I need to change the permissions on those files and +>directories. I mean, I need to give privileges to groups like +>Administrators, the user that owns the files (changes from file to file) +and +>other special groups. Anyone knows how to do this with Python? We have the +>following env: NT4SP4, Python 1.5.1, Win32All 124 ... the lastest one. I +>have already done the script that copies the files, I just need to know how +>to set this permissions. +> +> TIA +> +>/B +> +>Bruno Mattarollo +>... proud to be a PSA member +> + + + + + + diff --git a/demo/ermis-f/python_m/cur/1521 b/demo/ermis-f/python_m/cur/1521 new file mode 100644 index 00000000..78abbdeb --- /dev/null +++ b/demo/ermis-f/python_m/cur/1521 @@ -0,0 +1,76 @@ +From: bernhard at alpha1.csd.uwm.edu (Bernhard Reiter) +Date: 30 Apr 1999 04:26:34 GMT +Subject: win32com function<->propterty problem +Message-ID: +Content-Length: 1805 +X-UID: 1521 + +Controlling SPSS for windows with python here, I run into +the following problem: + +My OLE object an instance of ISpssDataCells +should have an array as property. From the SPSS documentation: + + ValueAt Property + Returns or sets the value of the current data cell or row/column label. + + Syntax + object.ValueAt (row,column) [=value] + + Settings + row Row index (Long) + column Column index (Long) + value Variant (String or Binary) + + +Python win32com provides that as a function. +And I can perfectly get the values like + value=object.ValueAt(1,1) +but setting ist a problem: + +>>> d + +>>> d.ValueAt + +>>> d.ValueAt(1,1) +>>> d.ValueAt(1,1)=123 +Error pulling apart exceptionTraceback (innermost last): + File "C:\Python\Pythonwin\pywin\framework\interact.py", line 345, in keyhandler_enter + message, (filename, lineno, offset, text) = exc_value +ValueError: unpack sequence of wrong size +SyntaxError: can't assign to function call + + +The Python Com Browser shows me, that there are two entries in +the Registered Spss Pivot Table Type Library, ISpssDataCells as +function: + ValueAt - Function + Dispatch ID=26 + Named Params ='row,col' + Return Type ='Variant' + Argument = 'Integer 4 (Flags=1)' + Argument = 'Integer 4(Flags=1)' + Function Kind ='Dispatch' + Invoke Kind = 'Property Get' + Number Optimal Params=0 + ValueAt - Function + Dispatch ID=26 + Named Params ='row,col' + Return Type ='Void' + Argument = 'Integer 4 (Flags=1)' + Argument = 'Integer 4(Flags=1)' + Argument = 'Variant (Flags=1)' + Function Kind ='Dispatch' + Invoke Kind = 'Property Put' + Number Optimal Params=0 + +Okay, python seems to know about both possibilities, but how do +I use them? + +advaTHANKnce + Bernhard + + + + + diff --git a/demo/ermis-f/python_m/cur/1522 b/demo/ermis-f/python_m/cur/1522 new file mode 100644 index 00000000..92c04e75 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1522 @@ -0,0 +1,49 @@ +From: planders at mail.utexas.edu (Preston Landers) +Date: 24 Apr 1999 12:15:39 -0500 +Subject: controling a Python daemon with mail +References: <84k8v3t4sw.fsf@mail.utexas.edu> +Message-ID: <84wvz2szwk.fsf@mail.utexas.edu> +Content-Length: 1531 +X-UID: 1522 + +"Steven D. Majewski" writes: + +> Yeah -- mailbox and rfc822 aren't the prettiest modules in the Python +> libraries! Here's where the class browser in the Mac Python IDE comes +> in handy, along with some interactive snooping. + +Thank you! Your message was most helpful. Unlike a snotty reply I +recieved in email that just said "You didn't read the docs." + +> Thus you don't have to check the spool periodically -- the program +> gets triggered as part of the mail delivery. There are unix programs +> like procmail & filter that already do this. ( and procmail has + +Yeah, I considered this. I actually use fetchmail & procmail for my +day to day email. It does have advantages, particularly like you +describe ... the script isn't running continuously but is invoked for +each message. + +> Or, you can use procmail to selectively send particular messages to +> another script. + +Right, right. I'd want some kind of validation on who's allowed to +send messages to this script. + +> You might also want to look a Mailman -- which is a mailing list +> manager written in Python. It may already have most of the tools +> you need for your responder. + +I only glanced briefly at that package but I may go back and look at +it again more carefully. At the time, it seemed like overkill. In +fact, since my needs aren't very complicated, and I already know a bit +about procmail, I may just go with that. + +Once again, your message was quite helpful and pointed me in the right +direction. Thanks a lot!!!! + +--Preston + + + + diff --git a/demo/ermis-f/python_m/cur/1523 b/demo/ermis-f/python_m/cur/1523 new file mode 100644 index 00000000..5cb62965 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1523 @@ -0,0 +1,37 @@ +From: ivanlan at callware.com (Ivan Van Laningham) +Date: Tue, 27 Apr 1999 15:25:30 GMT +Subject: help +References: + <19990426163014.B20207@toast.internal> + <3724D1C3.8BFA2C5B@pop.vet.uu.nl> + <3724DEFC.A01E93C2@callware.com> <37257B0A.AF4C8E4C@pop.vet.uu.nl> +Message-ID: <3725D6EA.E2DFB853@callware.com> +X-UID: 1523 + +Pythonistas-- + +Martijn Faassen wrote: +> +[snip] +> Yeah, that happened to me for a while - I had to cut down drastically on +> the use of the word 'Python'. :) So *do* they use Python over there? I +> mean, now that they all know they should? +> + +Ha. No. I'm sure that they just think of me as that nut in the corner. + +ly y'rs, +Ivan +---------------------------------------------- +Ivan Van Laningham +Callware Technologies, Inc. +ivanlan at callware.com +http://www.pauahtun.org +See also: +http://www.foretec.com/python/workshops/1998-11/proceedings.html +Army Signal Corps: Cu Chi, Class of '70 +---------------------------------------------- + + + + diff --git a/demo/ermis-f/python_m/cur/1524 b/demo/ermis-f/python_m/cur/1524 new file mode 100644 index 00000000..3aee53ca --- /dev/null +++ b/demo/ermis-f/python_m/cur/1524 @@ -0,0 +1,39 @@ +From: barry at scottbb.demon.co.uk (Barry Scott) +Date: Fri, 23 Apr 1999 22:29:58 +0100 +Subject: Windows install has problems. Guido asked that I use this newsgroup to discus further +References: <924039873.18221.0.nnrp-12.9e982a40@news.demon.co.uk> <924040766.18823.0.nnrp-12.9e982a40@news.demon.co.uk> <371FAE0F.43B33158@siosistemi.it> +Message-ID: <924903282.24080.0.nnrp-10.9e982a40@news.demon.co.uk> +X-UID: 1524 + +Mauro Cicognini wrote in message +news:371FAE0F.43B33158 at siosistemi.it... +> Mmm, since I'm not an English-language OS user, I'd rather see that as +> %programfolder%\tcl\bin\tcl80.dll (I don't remember exactly, but I'm sure +there +> is a way to refer in a language-independent way to the folder that the US +> version calls "Program Files" since we use it in our installations. + + Its in the registry - but python cannot access the registry. So this +hack would not + work for none english systems. + +> We use Mark Hammond's extensions and have no problem at all in fetching +things +> from the registry. Might just ask him and fold in the registry-access +stuff. + + Mark's nice extensions are not in the base kit so cannot be used to +solve + problems requiring registry access. + + I think its important that python without add on's can access the +registry under + Windows. It is a fundamental requirement on Windows. + + BArry + + + + + + diff --git a/demo/ermis-f/python_m/cur/1525 b/demo/ermis-f/python_m/cur/1525 new file mode 100644 index 00000000..094c8660 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1525 @@ -0,0 +1,136 @@ +From: mso at oz.net (Mike Orr) +Date: 13 Apr 1999 09:26:20 -0500 +Subject: README: Python-URL! - the weekly guide to Python resources (Apr 13) +Message-ID: <7evk6c$k6d$1@Starbase.NeoSoft.COM> +Content-Length: 4773 +X-UID: 1525 + +Subject: README: Python-URL! guide to Python resources (Apr 10 1999) + +Python-URL is still alive and well, although it will be coming out only +once or twice a month until we have the resources to return to a weekly +schedule. If anyone wishes to be weekly editor for a month, contact +Cameron . + +** ANY URL STARTING WITH "http://search.dejanews.com/msgid.xp?MID=", +ENDS IN "%3e" **, even if it appears split into two lines on your screen. + +--------------- +Python 1.5.2c1 (gamma) released April 8. Guido hopes to have the final +1.5.2 out April 13. + http://www.python.org/1.5 + +--------------- +Python Topic Guides are *THE* place to get an overview on alternatives +are available re web programming, database connectivity, XML and +scientific computing in Python. + http://www.python.org/topics/ + +--------------- +Numerical Python documentation and tutorial. + http://xfiles.llnl.gov + ftp://ftp-icf.llnl.gov/pub/python/README.html + +--------------- +KOffice uses Python as an extension language for creating spreadsheet +functions. (requires KDE) + http://search.dejanews.com/msgid.xp?MID=%3cmt2.0-4385-922320483%40news.informatik.uni-bonn.de%3e + http://www.mieterra.com/article/koffice.html + http://koffice.kde.org/ + +--------------- +Cooledit 3.9.0 is a text editor with an embedded Python interpreter. +(requires X-windows) + http://search.dejanews.com/msgid.xp?MID=%3cmt2.0-3341-922315351%40news.informatik.uni-bonn.de%3e + ftp://metalab.unc.edu/pub/Linux/apps/editors/X/ + http://www.netins.net/showcase/Comput-IT/cooledit/src/ + +--------------- +Python's source code for the unreleased versions are now available on +CVS. + http://www.python.org/download/cvs.html + +--------------- +Stathosts 1.5 graphically displays on a webpage the status of your +servers. + http://www.nerv-un.net/projects/ + ftp://ftp.nerv-un.net/pub/source/stathosts-1.5.tar.gz + +--------------- +libretto is a shell script to print the Python documentation (or other +Postscript files) while killing the fewest number of trees. (requires a +UNIX-like system) + http://search.dejanews.com/msgid.xp?MID=%3c370cfb74.23483%40194.247.160.50%3e + +--------------- +Humor re a chip in the Netherlands that runs native Python. NOT. + http://search.dejanews.com/msgid.xp?MID=%3c3703C591.FE65E94D%40pop.vet.uu.nl + +--------------- +"Embed this!" Demonstration of a webserver smaller than a matchbox. +Anybody want to get Python running on it? + http://search.dejanews.com/msgid.xp?MID=%3c3703CF56.60DAFCD7%40yahoo.com%3e + http://wearables.stanford.edu/ + +--------------- +Grail 0.6 is a web browser written in Python which runs Python applets. +It is now orphaned. It will take a lot of work to bring it up to +Netscape 4.5 standards. Does anybody wish to step up and maintain it? + http://search.dejanews.com/msgid.xp?MID=%3c14084.3974.729389.832651%40weyr.cnri.reston.va.us%3e + http://grail.cnri.reston.va.us/grail/ + +--------------- +SNMPy and other SNMP clients written in Python. Choose the "thread" +link to see all the messages. Subject: SNMPy update. + http://search.dejanews.com/msgid.xp?MID=%3c7e1hiq%24a71%241%40Starbase.NeoSoft.COM%3e +-- + +========================================================================= +Everything you want is probably one or two clicks away in these pages: + + Python.org's Python Language Website is the center of Pythonia + http://www.python.org + + Much of Python's real work takes place on Special-Interest Group + mailing lists http://www.python.org/sigs/ + + Python Consortium emerges as an independent nexus of activity + http://www.python.org/consortium + + Python To-Do List anticipates some of Python's future direction + http://www.python.org/cgi-bin/todo.py + + Python Journal is at work on its second issue + http://www.pythonjournal.com + + Links2Go is a new semi-automated link collection; it's impressive + what AI can generate + http://www.links2go.com/search?search=python + + Archive probing trick of the trade: + http://www.dejanews.com/dnquery.xp?QRY=&DBS=2&ST=PS&defaultOp=AND&LNG=ALL&format=threaded&showsort=date&maxhits=100&groups=comp.lang.python + + +Previous - (U)se the (R)esource, (L)uke! - messages are listed here: + http://purl.org/thecliff/python/url.html +or + http://www.dejanews.com/dnquery.xp?QRY=~g%20comp.lang.python%20Python-URL%21 + + +Suggestions/corrections for next week's posting are always welcome. + http://www.egroups.com/list/python-url-leads/ + +To receive a new issue of this posting in e-mail each Monday morning +(once we resume), ask to subscribe. + + +-- The Python-URL! Team-- +-Mike Orr, mso at jimpick.com +-- + +Cameron Laird http://starbase.neosoft.com/~claird/home.html +claird at NeoSoft.com +1 281 996 8546 FAX + + + + diff --git a/demo/ermis-f/python_m/cur/1526 b/demo/ermis-f/python_m/cur/1526 new file mode 100644 index 00000000..4875d9d3 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1526 @@ -0,0 +1,45 @@ +From: arcege at shore.net (Michael P. Reilly) +Date: Fri, 30 Apr 1999 20:36:37 GMT +Subject: Extension Doc bug +References: <14120.52559.376120.364972@weyr.cnri.reston.va.us> +Message-ID: +Content-Length: 1316 +X-UID: 1526 + +Michael P. Reilly wrote: +: Fred L. Drake wrote: + +: : Michael P. Reilly writes: +: : > I just spent the morning trying to find a very obscure bug related to +: : > the passing keyword arguments to a builtin method/function. + +: : Michael, +: : You didn't post your original code that exhibited the bug, so I +: : can't be sure of my conclusions. If you can send source for enough of +: : your extension module that someone can compile it, that would be +: : helpful. +: : My first inclination, however, is that you passed in illegal +: : arguments to PyArg_ParseTupleAndKeywords(). Passing NULL for the +: : keywords dictionary is allowed; I've been looking at the +: : implementation and don't see a way for that to be a problem (but I +: : might have missed something). + +Some additional information: the exc_value that I got was 'bad argument +to internal function' which is set by PyErr_BadInternalCall(). The +only location inside the calling routines for this exception to be +raised is inside ceval.c:call_function() (true for 1.5.1 and 1.5.2): + + if (kw != NULL && !PyDict_Check(kw)) { + PyErr_BadInternalCall(); + return NULL; + } + +Hopefully, I will be able to recreate and debug this further this +weekend. + + -Arcege + + + + + diff --git a/demo/ermis-f/python_m/cur/1527 b/demo/ermis-f/python_m/cur/1527 new file mode 100644 index 00000000..40a67ee3 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1527 @@ -0,0 +1,43 @@ +From: catlee at globalserve.net (Chris AtLee) +Date: Fri, 23 Apr 1999 03:53:05 -0400 +Subject: stdout in a restricted environment +References: <7fn3rs$1v9$1@whisper.globalserve.net> +Message-ID: <7fp92n$9fb$1@whisper.globalserve.net> +Content-Length: 1100 +X-UID: 1527 + +Michael P. Reilly wrote in message +news:MXET2.15$7j4.3896 at news.shore.net... +... +> I would suggest making a subclass of RExec that redefines the +> make_delegate_files method. +> +> def __init__(self, socket, hooks = None, verbose = 0): +> RExec.__init__(self, hooks=hooks, verbose=verbose) +> self._data_socket = socket +> +> def make_delegate_files(self): +> reader = self._data_socket.makefile('r') +> writer = self._data_socket.makefile('w') +> s = self.modules['sys'] +> self.delegate_stdin = FileDelegate(s, 'stdin') +> self.delegate_stdout = FileDelegate(s, 'stdout') +> self.delegate_stderr = FileDelegate(s, 'stderr') +> self.restricted_stdin = FileWrapper(reader) +> self.restricted_stdout = FileWrapper(writer) +> self.restricted_stderr = FileWrapper(writer) +> +> Granted, I haven't tried this, but it looks correct. :) + +This works, after I put in some code to flush the writer when something +happens...I think I may have had a working solution before but never knew it +because my output wasn't getting flushed :) + +Cheers, +Chris + + + + + + diff --git a/demo/ermis-f/python_m/cur/1528 b/demo/ermis-f/python_m/cur/1528 new file mode 100644 index 00000000..13b5021c --- /dev/null +++ b/demo/ermis-f/python_m/cur/1528 @@ -0,0 +1,40 @@ +From: olipt at mayo.edu (Travis Oliphant) +Date: Tue, 27 Apr 1999 02:45:58 -0500 +Subject: sharing variables in fortran +In-Reply-To: <3725643A.734B9F06@crystal.uwa.edu.au> +References: <3725643A.734B9F06@crystal.uwa.edu.au> +Message-ID: +X-UID: 1528 + +> I am wondering if it is possible to coerce python to use +> memory addresses corresponding to a fortran common block (by way of a c +> extension) +> for storage of certain variables. + +Yes, but you won't find a ton of information about it. Be prepared to +experiment a little. + +I would suggest using the Numeric module with it's C-API. + +There is an exported function you can call from C called +PyArray_FromDimsAndData that creates a NumPy array from some dimension +information and a pointer to already allocated memory. There is some +improving documentation on the C-API to Numeric in the documentation +recently released for NumPy. See the scientific computing topic section +of www.python.org + +I'm not sure how to access a Fortran common block from C at the moment. + +Have you heard about the PyOpenGL interface? + +Good luck. + +Travis + + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1529 b/demo/ermis-f/python_m/cur/1529 new file mode 100644 index 00000000..6b9e5bb0 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1529 @@ -0,0 +1,17 @@ +From: bill_seitz at my-dejanews.com (bill_seitz at my-dejanews.com) +Date: Thu, 15 Apr 1999 23:02:18 GMT +Subject: stupid Win-CGI getting started question +References: <7f0f0h$pfb$1@nnrp1.dejanews.com> +Message-ID: <7f5r5l$dh2$1@nnrp1.dejanews.com> +X-UID: 1529 + +I gave up, installed Apache, and got it (and the .py CGI) running in 10 +minutes. + + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/1530 b/demo/ermis-f/python_m/cur/1530 new file mode 100644 index 00000000..0b5b46c6 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1530 @@ -0,0 +1,72 @@ +From: eric at linux-hw.com (Eric Lee Green) +Date: 13 Apr 1999 18:05:08 GMT +Subject: threads +Message-ID: <80BFA4D02E598C65.76C7CFE2D53BC9F1.ECCA6CF6DE46FB03@library-proxy.airnews.net> +Content-Length: 3429 +X-UID: 1530 + +I am working on a program that has a) a main thread that accepts +incoming socket connections, and b) an array of threads, each of which +sucks on a Queue to get its socket/address pair and which sets a flag +and goes back to sucking when it's finished processing. I.e., a +permenant set of threads each sucking on its own queue waiting for +incoming connections, rather than the temporary threads supported by +the default SocketServer class. (I do superclass the SocketServer +class though -- __init__ and handle_request were the only two methods +I had to override! Though I added a couple more methods to deal with +allocating and starting threads). + +The only thing that is worrying me is the state of the Python threads +implementation under Linux libc6 (GNU libc). I keep having nightmarish +thoughts about what happens if the process scheduler kicks a thread out +and another one in halfway through Python's internal 'guts' updating an +object in the internal object depository, thereby corrupting things +badly. + +So: + 1) do I have to set a semaphor on ALL data structures that are + altered? For example, a slave thread sets a flag in an array to let + the master know that it's available, then goes and starts sucking + on the Queue for its next job. When the master sends it a new job + on the Queue, the master clears the flag first so that it knows that + this thread is no longer available (until the thread sets the flag + later signalling otherwise, right?). What happens if the process + scheduler kicks in halfway through setting that flag?! Do I get + data corruption? (In "C" all that happens is that the master thread + doesn't see the flag being set until the next time through, no big + deal). + + My question is this: How "atomic" are basic Python variable operations? + I understand about protecting transactions upon variables with semaphors + (thus if I want to add 5 to a counter accessible from other threads, + I want to semaphor it so that another thread adding 5 to that counter + can't "lose" its addition due to a change of context). + The question is whether the Python object depository is protected. + + 2) Any other "gotchas" that I need to be worrying about? Other than the + obvious ones that go with any multi-threaded program in any language? + +I must say that this program is turning out to be a lot easier than I +expected, other than my concerns above. The core classes take up +barely two pages of printout! I'd still be working on the first class +if I'd tried doing it in C++. + +The most interesting thing is that this looks like it will turn out to +be the fastest way of doing this kind of server on Linux. The aio_ +(asynchronous I/O) approach doesn't have as great of performance on +Linux (since Linux does not yet support the aio_ system calls, the +libc6 library spawns off an entire thread for each asynchronous +operation -- and spawning threads is a lot more time consuming than +sending a message to an already-existing thread). Not to mention that +since I'm not serving files with this server, the aio_ approach +wouldn't work anyhow. The only real problems are the same ones that +face Medusa on Linux -- the fact that Linux, like most Unixes, has a +low per-process file handle limit. + +-- +Eric Lee Green eric at linux-hw.com http://www.linux-hw.com/~eric + Defend the 2nd Amendment. Fight for the right to arm bears. + + + + diff --git a/demo/ermis-f/python_m/cur/1531 b/demo/ermis-f/python_m/cur/1531 new file mode 100644 index 00000000..6b674b38 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1531 @@ -0,0 +1,23 @@ +From: R.Hooft at EuroMail.com (Rob Hooft) +Date: 26 Apr 1999 08:57:10 +0200 +Subject: wrapped around the axle on regexpressions and file searching +References: <7frhe0$8g1$1@nnrp1.dejanews.com> +Message-ID: +X-UID: 1531 + +>>>>> "m" == msrisney writes: + + m> here are my questions: 1. this prints out not only files with the + m> file extensions ".log" but also any file name that has "log" in + m> it's name. how would I rewrite to avoid?? + +How about using "fnmatch.fnmatch" instead of a regular expression? + +-- +===== R.Hooft at EuroMail.net http://www.xs4all.nl/~hooft/rob/ ===== +===== R&D, Nonius BV, Delft http://www.nonius.nl/ ===== +===== PGPid 0xFA19277D ========================== Use Linux! ========= + + + + diff --git a/demo/ermis-f/python_m/cur/1532 b/demo/ermis-f/python_m/cur/1532 new file mode 100644 index 00000000..d2971bd4 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1532 @@ -0,0 +1,17 @@ +From: e9025657 at stud3.tuwien.ac.at (Kaweh Kazemi) +Date: Sun, 25 Apr 1999 18:35:42 GMT +Subject: GUI other than Tkinter +References: <3721567f.1748033@news> +Message-ID: <372360df.5406764@news.teleweb.at> +X-UID: 1532 + +>As far as I know, GTk has not been ported to the Win32 platform, yet. +thats not correct. have a look at + +http://user.sgic.fi/~tml/gimp/win32/ + +kaweh + + + + diff --git a/demo/ermis-f/python_m/cur/1533 b/demo/ermis-f/python_m/cur/1533 new file mode 100644 index 00000000..e02543ca --- /dev/null +++ b/demo/ermis-f/python_m/cur/1533 @@ -0,0 +1,15 @@ +From: zorro at zipzap.ch (Boris Borcic) +Date: Mon, 19 Apr 1999 09:34:36 +0200 +Subject: IDLE ! +Message-ID: <371ADC8C.54C4CDBE@zipzap.ch> +X-UID: 1533 + +I am having my first look at 1.5.2 and IDLE (on Win95). + +Very nice. Thank you (once again), Guido. + +Boris Borcic + + + + diff --git a/demo/ermis-f/python_m/cur/1534 b/demo/ermis-f/python_m/cur/1534 new file mode 100644 index 00000000..502b2eae --- /dev/null +++ b/demo/ermis-f/python_m/cur/1534 @@ -0,0 +1,40 @@ +From: godzilla at netmeg.net (Les Schaffer) +Date: Mon, 12 Apr 1999 15:43:35 GMT +Subject: Python without registry entries +References: <370fb711.28093946@news.demon.co.uk> <7eol16$1l2$1@m2.c2.telstra-mm.net.au> +Message-ID: <37121820.3758204@news.netmeg.net> +Content-Length: 1076 +X-UID: 1534 + +On Sun, 11 Apr 1999 08:57:49 +1000, "Mark Hammond" wrote: + +>You can. Python does not _need_ the registry for anything. + +a followup question: + +I just switched over our windows machine to NT from win98, and did a +clean install so the registry is fresh spanking new... + +is there some way to restore the registry settings for python and the +win32 extensions without downloading the whole darn thing again? +pythonwin doesnt run right now because win32ui.pyd is not found. in +lieu of remaking the registry entries are there a handful of env. +variables that can be set to keep python humming along? + +in other words, since i come from linux and know about the env +variables there, does ALL one need to do on windows is have the +appropriate env. variables set, or is there something more to the slew +of registry entries i see were made from the original install logs for +python 1.5.2c and win32 extensions. + +said differently, if one doesnt need the registry entries for anything +pythonic, why are there these whole slew of entries made when its +installed? + +thanks + +les schaffer + + + + diff --git a/demo/ermis-f/python_m/cur/1535 b/demo/ermis-f/python_m/cur/1535 new file mode 100644 index 00000000..d32e610f --- /dev/null +++ b/demo/ermis-f/python_m/cur/1535 @@ -0,0 +1,32 @@ +From: hyoon at bigfoot.com (Hoon Yoon) +Date: Fri, 16 Apr 1999 14:16:39 -0400 +Subject: Python slowness on NT. +Message-ID: <37177E87.D9F7179@bigfoot.com> +X-UID: 1535 + +Hi, + + Post install of 1.5.2 into my computer. The python interpreter seems a +lot slow to execute/compile programs. Simple Tkinter._test() takes good +5+ sec get anywhere. I do have to admit that I am running alot of +Realtime pricing stuff on my PC. Anyway to make Python gain more +attention from CPU? + TIA, +-- +***************************************************************************** +S. Hoon Yoon (Quant) Merrill Lynch Equity Trading, +yelled at yahoo.com hoon at bigfoot.com(w) +"Miracle is always only few standard deviations away, but so is +catastrophe." +* Expressed opinions are often my own, but NOT my employer's. +"I feel like a fugitive from the law of averages." Mauldin +***************************************************************************** +-------------- next part -------------- +A non-text attachment was scrubbed... +Name: vcard.vcf +Type: text/x-vcard +Size: 202 bytes +Desc: Card for Hoon Yoon +URL: + + diff --git a/demo/ermis-f/python_m/cur/1536 b/demo/ermis-f/python_m/cur/1536 new file mode 100644 index 00000000..b609b8da --- /dev/null +++ b/demo/ermis-f/python_m/cur/1536 @@ -0,0 +1,22 @@ +From: jkraai at murl.com (jkraai at murl.com) +Date: Wed, 21 Apr 1999 15:02:52 GMT +Subject: HTTP-NG Support? +Message-ID: <002201be8c08$1969e570$8b7125a6@cpda6686.mcit.com> +X-UID: 1536 + +Been looking over http-ng ( http://www.w3.org/HTTP-NG/ ) for +the last couple of days. + +Wondering if anything has been done via Python. + +Of course, this looks like a job for Zope ... + +Opinions? + +--jim + + + + + + diff --git a/demo/ermis-f/python_m/cur/1537 b/demo/ermis-f/python_m/cur/1537 new file mode 100644 index 00000000..338923db --- /dev/null +++ b/demo/ermis-f/python_m/cur/1537 @@ -0,0 +1,58 @@ +From: basv at sara.nl (basv at sara.nl) +Date: Mon, 26 Apr 1999 15:38:33 GMT +Subject: Trouble with httplib and IRIX +Message-ID: <7g219p$hvb$1@nnrp1.dejanews.com> +Content-Length: 1491 +X-UID: 1537 + +Hello, + + I'm running python 1.5.2 and running it on IRIX 6.5.3 systems. + + I have the following problem when i'm trying to connect to an + non-existing machine the program hangs forever. When i kill ,restart and run + it again, it gives an error message that it couldn't find the host. This is + the behaviour that i would expect the first time. + + My question is does somebody else have encounter the same problems on a + IRIX machine? + + -------------------- Python programm ------------------------ + +#!/usr/local/bin/python + +import socket +import httplib + + +def main(): + + + h = httplib.HTTP() + h.set_debuglevel(100) + + try: + h.connect("www.nsrc.nus.sg") + + except socket.error, detail: + print 'Connect failed: %s' %detail + + +main() + +-- +******************************************************************** +* * +* Bas van der Vlies e-mail: basv at sara.nl * +* SARA - Academic Computing Services phone: +31 20 592 8012 * +* Kruislaan 415 fax: +31 20 6683167 * +* 1098 SJ Amsterdam * +* * +******************************************************************** + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/1538 b/demo/ermis-f/python_m/cur/1538 new file mode 100644 index 00000000..9f65dccf --- /dev/null +++ b/demo/ermis-f/python_m/cur/1538 @@ -0,0 +1,60 @@ +From: fpinel at fedex.com (frederic pinel) +Date: Fri, 16 Apr 1999 05:48:49 +0200 +Subject: Novice Question: two lists -> dictionary +References: <7f3j1v$f6j$1@nnrp1.dejanews.com> +Message-ID: <3716B321.A0652382@fedex.com> +Content-Length: 1249 +X-UID: 1538 + +Here is a quick and dirty answer! Sorry... + +ListA = ['10', '10', '20', '20', '20', '24'] +ListB = ['23', '44', '11', '19', '57', '3'] + +ListT = [] # temporary list +Dict = {} + +for i in range(len(ListA)): + ListT = key_values(i, ListA, ListB) + if (Dict.has_key(ListT[0]) == 0): + Dict[ListT[0]] = ListT[1:] + +print Dict # print results, for test purposes. + + +def key_values(i, l_key, l_val): + " returns a list with the first item being the l_key[i] (ListA), + " and the values after for that key (ListB) + resultat = [] + for j in range(len(l_key)): + if (l_key[j] == l_key[i]): + result[0] = l_key[i] + result.append(l_val[j]) + + return result + +regards, +frederic + +jwtozer at my-dejanews.com wrote: +> +> How do I make the members of one list the key of a dictionary and the members +> of a second list the members of list values associated with with those keys? +> +> Given: +> +> ListA = ['10', '10', '20', '20', '20', '24'] +> ListB = ['23', '44', '11', '19', '57', '3'] +> +> Desired Result: +> +> Dict = {'10': ['23','44'],'20': ['11','19','57'], '24': ['3']} +> +> Any help will be much appreciated. +> +> -----------== Posted via Deja News, The Discussion Network ==---------- +> http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/1539 b/demo/ermis-f/python_m/cur/1539 new file mode 100644 index 00000000..2974f302 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1539 @@ -0,0 +1,33 @@ +From: thooney at pk.highway.ne.jp (Thooney Millennier) +Date: Mon, 19 Apr 1999 03:02:14 +0900 +Subject: what is reloc error ? +Message-ID: <371A1E26.846AF8B6@pk.highway.ne.jp> +X-UID: 1539 + +Hello, everyone. +I am now working on building Python interface +to my C++ matrix library. + +I have a problem. +After compiling and when trying to import my +module +I get following message. + + % gcc -c XXXtype.cc + % gcc -c subXXXtype.cc + ....................... + % ld -o XXXtype.so -dy -G -g *.o -lstdc++ + % python -c "import XXXtype" + python: can't handle reloc type +<====this!!! + +I don't understand why this occurs. +Please help me! +(Platform: python 1.5.2, Linux 2.0.34 with gcc.) + + +Thooney Millennier. + + + + diff --git a/demo/ermis-f/python_m/cur/1540 b/demo/ermis-f/python_m/cur/1540 new file mode 100644 index 00000000..1e76826e --- /dev/null +++ b/demo/ermis-f/python_m/cur/1540 @@ -0,0 +1,39 @@ +From: vkolosov at unitedmedia.com (Kolosov, Victor) +Date: Wed, 14 Apr 1999 13:25:01 GMT +Subject: Windows install has problems. Guido asked that I use this new + sgroup to discus further +Message-ID: <461182F0B9B7D111B4000008C7282ADC22B048@nynt04.umny.scripps.com> +Content-Length: 1137 +X-UID: 1540 + +> -----Original Message----- +> From: Barry Scott [SMTP:barry at scottbb.demon.co.uk] +> Sent: Tuesday, April 13, 1999 5:42 PM +> To: python-list at cwi.nl +> Subject: Windows install has problems. Guido asked that I use this +> newsgroup to discus further +> +> THis is Guido's reply to my comments that tcl80.dll is not found +> by IDLE on a default installation. +> +> > > > Running "IDLE (Python GUI)" reports that tcl80.dll is +> > > > not in my path then the shell comes up and I can +> > > > use Tkinter from the shell. +> +> + I've got NT at home and had the same very message after installation +of Tkinter. + I know that nobody wants to full around with the registry and in +your case you do not need to. Just go to Control Panels it has System +control panel, open it. One of the tabs is environment and it has different +parameters one of which is Path, click on it and in one of the two single +line edits you can edit it, so just stick your - G:\Program Files\Tcl\bin\ - +at the end of it, apply you change, log out/in and you'll be set. + I hope you can figure the whole thing out, since I'm writing from my +memory right now. + + Victor + + + + diff --git a/demo/ermis-f/python_m/cur/1541 b/demo/ermis-f/python_m/cur/1541 new file mode 100644 index 00000000..0ee6deac --- /dev/null +++ b/demo/ermis-f/python_m/cur/1541 @@ -0,0 +1,32 @@ +From: liw at iki.fi (Lars Wirzenius) +Date: 25 Apr 1999 06:53:11 GMT +Subject: rfc822 date header +References: <37136310.62A6BE1A@rubic.com> <7f07n7$7pqv$1@midnight.cs.hut.fi> +Message-ID: <7fue4n$ekuj$1@midnight.cs.hut.fi> +X-UID: 1541 + +Lars Wirzenius : +> Here's what I wrote for Slime (thhe mailer I'm writing): + +How embarrassing, the code I posted doesn't work. I'm pretty sure it +did work, at some point in time, but either I misremember, or I broke +it, or the stuff within rfc822 I use changed. Never mind, here is the +new version: + + def _date_header(self): + """Return Date header reflecting current time.""" + # XXX this should probably communicate the local time zone + # somehow + t = time.gmtime(time.time()) + return "Date: %s, %02d %s %04d %02d:%02d:%02d GMT\n" % \ + (string.capitalize(rfc822._daynames[t[6]]), + t[2], + string.capitalize(rfc822._monthnames[t[1] - 1]), + t[0], + t[3], + t[4], + t[5]) + + + + diff --git a/demo/ermis-f/python_m/cur/1542 b/demo/ermis-f/python_m/cur/1542 new file mode 100644 index 00000000..55283688 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1542 @@ -0,0 +1,19 @@ +From: hniksic at srce.hr (Hrvoje Niksic) +Date: 13 Apr 1999 12:21:27 +0200 +Subject: Python 1.5.2c1 -- What if long long not supported? +References: <199904091521.LAA00858@eric.cnri.reston.va.us> +Message-ID: <87hfqkx1lk.fsf@pc-hrvoje.srce.hr> +X-UID: 1542 + +Guido van Rossum writes: + +> I received a bug report that if the (unnamed) platform doesn't +> support the "long long" type, the configure script dies. The logic +> in configure.in looks correct to me and I don't have any such Unix +> platforms handy myself... + +You can "create" such a platform by using `-pedantic-errors'. + + + + diff --git a/demo/ermis-f/python_m/cur/1543 b/demo/ermis-f/python_m/cur/1543 new file mode 100644 index 00000000..a6677dff --- /dev/null +++ b/demo/ermis-f/python_m/cur/1543 @@ -0,0 +1,45 @@ +From: tavares at connix.com (tavares at connix.com) +Date: Mon, 26 Apr 1999 13:31:16 GMT +Subject: Python and "Hand held" computers +References: <318D8A1FC77AD211A3110080C83DFC6403139F@comsrv.sowatec.com> <7g1opt$9li$1@nnrp1.dejanews.com> +Message-ID: <7g1pr5$an8$1@nnrp1.dejanews.com> +Content-Length: 1307 +X-UID: 1543 + +In article <7g1opt$9li$1 at nnrp1.dejanews.com>, + aaron_watters at my-dejanews.com wrote: +> +> +> > What about Palm Pilot ? +> +> I think the answer still is "It should be possible, but in +> practice the Palm Pilot doesn't have enough memory to make +> it an interesting proposition, unless you upgrade it to non-standard +> sizes." + +"It's worse than that, he's dead Jim!" + +Even if you do upgrade a pilot to have more RAM (the new Palm IIIx comes with +4 MB, and you can get an 8 MB upgrade), the Pilot OS's memory architecture is +also a problem. Palm apps typically get a very small heap - 64k or less, if +memory serves me correctly. The rest of RAM is accessed using the "database +manager" functions, which chops RAM up into records defined by the app. + +This is very useful when writing an address book or shopping list program. It +is significantly LESS useful when you're trying to implement an interpreter. + +I'm sure that this can be worked around (heck, someone's implemented Smalltalk +on the pilot) but I suspect the amount of changes to the core Python sources +would be significant enough to discourage the attempt. + +[ ...Remainder snipped... ] + +-Chris + + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/1544 b/demo/ermis-f/python_m/cur/1544 new file mode 100644 index 00000000..18ca64d7 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1544 @@ -0,0 +1,41 @@ +From: kc5tja at bigfoot.com (Samuel A. Falvo II) +Date: Mon, 5 Apr 1999 12:15:17 -0700 +Subject: Crappy Software was Re: [OffTopic: Netscape] Re: How should Python be evangelized? +References: <7dos4m$usi$1@nnrp1.dejanews.com> <7dqs0h$lcq$1@nnrp1.dejanews.com> <2_6M2.30$Kj1.679@198.235.216.4> <37019F42.EA55CA8@kanga.org> <009d01be7b47$8a9a6020$f29b12c2@pythonware.com> <7dtmso$7u6$1@news.clarkson.edu> <3703ca33.9749737@news.bctel.ca> +Message-ID: <37089dcb@fermi.armored.net> +Content-Length: 1121 +X-UID: 1544 + +>Er, that'd be the same Netscape that has such broken CSS that it is +>absolutely unuseable? + +While I understand that Netscape's CSS implementation is not the best, I +have to take an opposing view as to it not being usable. Netscape's CSS is +more than adequate for the vast majority of the web sites out there. They +provide my web sites with a good, professional appearance under both +Netscape and MSIE. + +>Myself, I prefer Opera; at least it meets standards. MSIE runs a close +>second these days. Netscape is horrendously buggy. + + +And Mozilla will decimate MSIE. The trick, of course, is them actually +releasing it as a finished product. :-) + +However, when I actually see Opera for Linux, I'll be sure to give it a +shot. I've used Opera for Windows, and was only mildly impressed. It was a +blazingly fast web browser, but it didn't have the feature set that MSIE had +at the time. A lot has changed since then, I know -- which is why I'm +willing to give it another shot. + +As a matter of fact, I'll go an download the latest release right now... +:-) + +(I'll be REALLY happy when they port Opera to AmigaOS 5.) + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1545 b/demo/ermis-f/python_m/cur/1545 new file mode 100644 index 00000000..89187e7f --- /dev/null +++ b/demo/ermis-f/python_m/cur/1545 @@ -0,0 +1,33 @@ +From: gmcm at hypernet.com (Gordon McMillan) +Date: Tue, 13 Apr 1999 00:34:47 GMT +Subject: how to use exec +In-Reply-To: <7etm5o$bvm$1@nnrp1.dejanews.com> +References: <7etm5o$bvm$1@nnrp1.dejanews.com> +Message-ID: <1288158605-15845960@hypernet.com> +X-UID: 1545 + +Jaeho Lee asks: + +> Hi folks, I'm making test tools based on python. I want to test +> script includes python script and test tools execute the command +> dynamically. "exec" is good for this. But if exec runs assign +> statement, it stores the variable in local area. I want to put the +> variable in global area. How can I do this? I saw this in python +> pocket reference. exec codestring [in globaldict [, localdict]] But +> this syntax does not work. Could somebody let me know how to use +> exec? + +Perhaps you are interpreting the "[" and "]" as literals, not as +indicators that the enclosed is optional? + + exec codestring + exec codestring in myglobals + exec codestring in myglobals, mylocals + + + +- Gordon + + + + diff --git a/demo/ermis-f/python_m/cur/1546 b/demo/ermis-f/python_m/cur/1546 new file mode 100644 index 00000000..b149c418 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1546 @@ -0,0 +1,19 @@ +From: kevin at cocreator.com (Kevin K. Ehmka) +Date: Wed, 14 Apr 1999 21:37:54 -0400 +Subject: PIL fonts - Where are you? +Message-ID: <7jbR2.3071$YU1.5576@newsr2.twcny.rr.com> +X-UID: 1546 + +Does anybody have some ready made fonts in PIL format they want to share? A +web site maybe? I was unsuccessful today creating any. + +Thanks + +-- +Kevin + + + + + + diff --git a/demo/ermis-f/python_m/cur/1547 b/demo/ermis-f/python_m/cur/1547 new file mode 100644 index 00000000..bf4c5d97 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1547 @@ -0,0 +1,13 @@ +From: trajce at rsc.com.mk (Trajce) +Date: Wed, 7 Apr 1999 03:00:37 GMT +Subject: For list +Message-ID: <370ACA53.DC922A74@rsc.com.mk> +X-UID: 1547 + +Please entires list. + + + + + + diff --git a/demo/ermis-f/python_m/cur/1548 b/demo/ermis-f/python_m/cur/1548 new file mode 100644 index 00000000..c254f5c3 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1548 @@ -0,0 +1,33 @@ +From: rparra at abo.fi (Raul Parra Bacete FS) +Date: Wed, 28 Apr 1999 16:30:31 +0300 +Subject: I need test my .py files again +Message-ID: <37270D77.969235F0@abo.fi> +X-UID: 1548 + +Hi, + +I have ported the python interpreter to the sh1 hitachi, and now I would + +like to get .py programs to test my python interpreter... that programs +should not have any import statment or any reference to files, so I need + +some BASIC .py programs to test my python interpreter, I know that in +the sources of python, there is some test programs but i need a kind of +test programs that doesn't use the IMPORT statment, and also complex, +long, file, and float objects, so the python test programs doesn't help +me. + +I wonder if you could give me any addres where I can get some of them or + +send me some of them by e-mail.... + +Thanks. + +Raul Parra Bacete +?bo Akademi +rparra at abo.fi + + + + + diff --git a/demo/ermis-f/python_m/cur/1549 b/demo/ermis-f/python_m/cur/1549 new file mode 100644 index 00000000..1bc23f5c --- /dev/null +++ b/demo/ermis-f/python_m/cur/1549 @@ -0,0 +1,31 @@ +From: bernhard at alpha1.csd.uwm.edu (Bernhard Reiter) +Date: 19 Apr 1999 01:45:07 GMT +Subject: NT: win32api and win32ui import error +References: <7fbcpq$2jb$1@nnrp1.dejanews.com> <7fdgj4$nnl$1@nnrp1.dejanews.com> +Message-ID: +X-UID: 1549 + +On Sun, 18 Apr 1999 20:50:45 GMT, hj_ka at my-dejanews.com wrote: +>In article , +> bernhard at alpha1.csd.uwm.edu (Bernhard Reiter) wrote: + +>> Mark said, that the following dll and their versions might +>> be relevant: + +>No luck. I downloaded some more recent versions of ole32.dll +>and oleaut32.dll from http://solo.abac.com/dllarchive/, (their +>msvcrt.dll is older, from VC5 instead of VC6). I also tried +>those DLLs from my Windows 98 System folder. I tried many +>combinations. + +Sad to hear. +As we both got that problem with unregistered services +when installing, I think somebody has to find out what that means. + +I certainly do not know much about this in Windows. + + Bernhard + + + + diff --git a/demo/ermis-f/python_m/cur/1550 b/demo/ermis-f/python_m/cur/1550 new file mode 100644 index 00000000..ac26813b --- /dev/null +++ b/demo/ermis-f/python_m/cur/1550 @@ -0,0 +1,88 @@ +From: dkuhlman at netcom.com (G. David Kuhlman) +Date: Wed, 7 Apr 1999 00:23:34 GMT +Subject: Chaning instance methods +References: +Message-ID: +Content-Length: 1458 +X-UID: 1550 + +Is this what you are looking for? + +--------- + +# testchangemethod.py: + +class Test: + def m(self): + pass + def m1(self): + print 'I am Test.m1' + def m2(self): + print 'I am Test.m2' + +--------- + +>>> from testchangemethod import Test +>>> +>>> t = Test() +>>> Test.m = Test.m1 +>>> t.m() +I am Test.m1 +>>> Test.m = Test.m2 +>>> t.m() +I am Test.m2 + +-------- + +I don't understand this too well myself. However, note that if you +evaluate 'type(Test.m1)' you get something different from what you +get if your evaluate 'type(f)' where f is a function (not a method). + + - Dave + + +Jody Winston wrote: +> I don't understand how to change instance methods. For example: + +> class Foo: +> def __init__(self): +> self.data = 42 +> def m(self): +> print "Foo.m" +> print dir(self) + +> def m2(self): +> print "m2" +> print dir(self) + +> f = Foo() +> f.m() +> # this fails +> # f.m = m2 +> # f.m() +> Foo.m = m2 # Changes all instances of Foo.m +> f.m() + +> f2 = Foo() +> f2.m() + +> What am I forgetting? + +> -- +> Jody Winston +> Manager SeisRes +> Lamont-Doherty Earth Observatory +> RT 9W, Palisades, NY 10964 +> jody at ldeo.columbia.edu, 914 365 8526, Fax 914 359 1631 + +> Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email +> address may not be added to any commercial mail list with out my +> permission. Violation of my privacy with advertising or SPAM will +> result in a suit for a MINIMUM of $500 damages/incident, $1500 for +> repeats. + + + + + + diff --git a/demo/ermis-f/python_m/cur/1551 b/demo/ermis-f/python_m/cur/1551 new file mode 100644 index 00000000..cfc4b25e --- /dev/null +++ b/demo/ermis-f/python_m/cur/1551 @@ -0,0 +1,56 @@ +From: tim_one at email.msn.com (Tim Peters) +Date: Sat, 24 Apr 1999 04:42:21 GMT +Subject: help with os.popen() +In-Reply-To: <7fomaj$oo9$1@nnrp1.dejanews.com> +References: <7fomaj$oo9$1@nnrp1.dejanews.com> +Message-ID: <000301be8e0c$d71ff4a0$f09e2299@tim> +Content-Length: 1391 +X-UID: 1551 + +[cmedcoff at my-dejanews.com] +> I'm new to python and need a bit of help with os.popen(). What +> is wrong with the following? What am I doing wrong? (I'm running +> 1.52 on WinNT 4.0) +> +> >>>import os +> >>> p = os.popen("dir", "rt", 1024) +> Traceback (innermost last): +> File "", line 1, in ? +> p = os.popen("dir", "rt", 1024) +> OSError: (0, 'Error') +> >>> + +[... and later] +> Please disregard my post. I blew it. I found the answer in the FAQ. + +No you didn't . Seriously, the FAQ talks about PythonWin, but the +"pyshell#4" above suggests you're running IDLE. Different beasts! + +popen is a nightmare under Windows regardless, and I doubt it will ever work +without surprises. If you try e.g. + +f = os.popen("dir") + +in an interactive DOS-box Python, at least under Win95 it freezes the +interpreter solid. Run it under the MS debugger to find out why, and it +freezes the debugger solid too. The popen call returns without incident, +but stdin and stdout are screwed up beyond recognition. This is related to +"dir" being a command.com builtin, btw -- you don't get this problem if you +popen a random .exe. + +OTOH, + +f = os.popen("dir"); lines = f.readlines() + +(all on one line) does work OK from a DOS-box Python. But not under IDLE or +PythonWin. + +I'll figure this all out if I ever get a free year <0.7 wink>. + +pipes-break-windows-in-real-life-too-ly y'rs - tim + + + + + + diff --git a/demo/ermis-f/python_m/cur/1552 b/demo/ermis-f/python_m/cur/1552 new file mode 100644 index 00000000..47affa9f --- /dev/null +++ b/demo/ermis-f/python_m/cur/1552 @@ -0,0 +1,34 @@ +From: tville at earthlink.net (G O Economou) +Date: Fri, 02 Apr 1999 21:20:20 -0500 +Subject: learning... +References: +Message-ID: <37057AE3.401F4943@earthlink.net> +X-UID: 1552 + +Costas -- +www.python.org has most of what you need. They have lots of links & much +to download. I have used it exclusively to learn and practice Python. + +Kali Anastasi Georgia + +"Constantinos A. Kotsokalis" wrote: + +> Dear all, +> do you believe the python manuals (tutorial, too) are sufficient +> for someone trying to learn python, or should I go out looking for +> some book on it? In such case, which one do you suggest? +> +> Thanks, +> Costas +> +> -- +> Constantinos A. Kotsokalis || c.kotsokalis at noc.ntua.gr +> National Technical University of Athens +> Network Management Center +> Tel. No: +30 01 7721861 + + + + + + diff --git a/demo/ermis-f/python_m/cur/1553 b/demo/ermis-f/python_m/cur/1553 new file mode 100644 index 00000000..360c8e65 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1553 @@ -0,0 +1,44 @@ +From: tim_one at email.msn.com (Tim Peters) +Date: Sun, 25 Apr 1999 17:29:31 -0400 +Subject: help with os.popen() +In-Reply-To: <87yajhxm52.fsf@psyche.evansnet> +Message-ID: <000001be8f62$b5494f00$669e2299@tim> +Content-Length: 1388 +X-UID: 1553 + +[Tim, wrt popen() on Win32] +> I'll figure this all out if I ever get a free year <0.7 wink>. + +[Carey Evans] +> Why bother? The Tcl people have done it already, I've had very few +> problems with pipes there, and it's under a generous license. There's +> some interesting comments in tclWinPipe.c and stub16.c too, and an +> amazing number of special cases. +> +> I'd be eternally grateful[1] if pipes worked as well in Python as they +> do in Tcl, although I suppose I could try rewriting tclWinPipe.c using +> the Win32 extensions. Actually, it would be quite nice if I could +> just get the return value from os.system() or os.spawnv() like I can +> from Tcl's "exec". +> +> [1] I'd buy the author a drink if I met them, anyway. + +So, Carey, this particular problem bothers you, and you believe you know how +to fix it. How about buying yourself a drink <0.9 wink>? + +After staring at the ~2,700 lines of Tcl source you referenced, my reaction +remains "I'll figure this all out if I ever get a free year". + +Hip's original Perl-for-Win32 port shipped its own (non-interactive) 32-bit +shell, so that Perl popen/backtick/system constructs stood some chance of +working. The latest Perl-for-Win32 source appears to have dropped that, +though, with scattered vague recommendations that you install your own +non-brain-dead PERL5SHELL (4DOS/NT?). + +about-to-boost-it-to-two-years-ly y'rs - tim + + + + + + diff --git a/demo/ermis-f/python_m/cur/1554 b/demo/ermis-f/python_m/cur/1554 new file mode 100644 index 00000000..0bcfc0c3 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1554 @@ -0,0 +1,62 @@ +From: roger.burnham at gte.net (Roger Burnham) +Date: Tue, 13 Apr 1999 20:16:07 GMT +Subject: Using SioModule.zip under Win32 +References: <7f06ds$hmb$1@nnrp1.dejanews.com> +Message-ID: <7f07k6$88l$1@news-1.news.gte.net> +Content-Length: 1714 +X-UID: 1554 + +On Tue, 13 Apr 1999 19:37:33 GMT, jwinkelman at my-dejanews.com wrote: + +>I have downloaded the SIO-151.ZIP to do some serial IO under Win32. +> +>Does anyone know if it can handle port numbers higher than COM9? +> +>I tried modifying the dictionary in the serial.py file to add constants for +>COM10, etc., but when I load the module, I get a NameError for COM10. +> +>Being new to python, I'm not sure where to go from here. +> +>Any help is appreciated. +> + +The DLL that Sio wraps, from + + MarshallSoft Computing, Inc. + POB 4543 Huntsville AL 35815. 205-881-4630. + Email: mike at marshallsoft.com + www.marshallsoft.com + +only defines constants up to COM9, but they are simple integers. + +No idea if it will break anything in the WSC32.dll, but you could try: + +PythonWin 1.5.2b2 (#0, Mar 4 1999, 16:07:53) [MSC 32 bit (Intel)] on win32 +Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam +Portions Copyright 1994-1999 Mark Hammond (MHammond at skippinet.com.au) +>>> import Serial +>>> cfg = Serial.PortDict() +>>> cfg._dict['port'] = 9 # should be COM10... +>>> fd = Serial.Port(cfg) +>>> fd.open() +Traceback (innermost last): + File "", line 0, in ? + File "Serial.py", line 343, in open + self._chkSioExec(SioReset, (port, self._bufSize,self.cfg['txBufSize'])) + File "Serial.py", line 326, in _chkSioExec + raise SioError, '%s: %s' % (func.__name__, SioErrorText(status)) +SioError: SioReset: No such port +>>> + + +Roger Burnham +Cambridge Research & Instrumentation +rburnham at cri-inc.com +http://www.cri-inc.com/ +http://starship.python.net/crew/roger/ +PGP Key: http://www.nai.com/default_pgp.asp +PGP Fingerprint: 5372 729A 9557 5F36 177F 084A 6C64 BE27 0BC4 CF2D + + + + diff --git a/demo/ermis-f/python_m/cur/1555 b/demo/ermis-f/python_m/cur/1555 new file mode 100644 index 00000000..a25bad16 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1555 @@ -0,0 +1,30 @@ +From: c.evans at clear.net.nz (Carey Evans) +Date: 26 Apr 1999 22:05:22 +1200 +Subject: help with os.popen() +References: <000001be8f62$b5494f00$669e2299@tim> +Message-ID: <87eml7y9wd.fsf@psyche.evansnet> +X-UID: 1555 + +"Tim Peters" writes: + +> So, Carey, this particular problem bothers you, and you believe you know how +> to fix it. How about buying yourself a drink <0.9 wink>? +> +> After staring at the ~2,700 lines of Tcl source you referenced, my reaction +> remains "I'll figure this all out if I ever get a free year". + +Umm, OK. + +I may have to think about it for a while, though. Python's +requirements aren't as bad as Tcl's, so it might stand a chance of +becoming a reality. + +-- + Carey Evans http://home.clear.net.nz/pages/c.evans/ + +"Try explaining a syn-ack-fin-rst scan to a dialup provider abuse drone. You +can almost hear the belt slip off the brain drive shaft." - Strange in asr + + + + diff --git a/demo/ermis-f/python_m/cur/1556 b/demo/ermis-f/python_m/cur/1556 new file mode 100644 index 00000000..a4b19b0b --- /dev/null +++ b/demo/ermis-f/python_m/cur/1556 @@ -0,0 +1,71 @@ +From: arcege at shore.net (Michael P. Reilly) +Date: Fri, 23 Apr 1999 21:35:05 GMT +Subject: Proposed Change for sys.exitfunc for version 1.6 +References: <37209360.2FB8E145@collins.rockwell.com> +Message-ID: +Content-Length: 2193 +X-UID: 1556 + +Jonathan Polley wrote: +: I would like to propose adding a function to the module 'sys' that would +: change (slightly) the behavior of sys.exitfunc. I would like to add a +: method that performs the same function as UNIX's 'atexit ()' function. +: The reason is that I have some modules that would like to do some +: cleanup when python terminates, but I don't want to have to add the code +: required for them to remember the previous value of sys.exitfunc so they +: can call that function (if present). A method sys.atexit () would work +: nicely. It would allow me to add a series of exit functions and be +: guaranteed that they would all be called at the termination of python +: (so I can close files, purge queues, close sockets, etc.). Does anyone +: else think this would be a good idea??? + +Files and sockets will be closed (and flushed), and if you have a queue +it is problem an instance of a class and an appropriate __del__ method +can be created. + + import os + class LockFile: + os_remove = os.remove # do not rely on os still existing + def __del__(self): + if self.locked: + self.os_remove(self.file) + +Then if the os module is destroyed during exit clean-up, my class (and +the instances) still have access to the functions it needs. + +There is little need in the object-oriented world to have atexit +functionality. There used to be some race-condition problems with this +as well (I explained one of them above). However, the C API does have +the function Py_AtExit() which does this (C modules aren't quite the +same as Python modules ;). + +But if you want to make a atexit callback subsystem: + + class SysAtExit: + def __init__(self): + self.callbacks = [] + # the instance is callable itself + def __call__(self, func): + if callable(func): + self.callbacks.append(func) + else: + raise TypeError, "not a callable" + def on_exit(self): + for func in self.callbacks: + func() + import sys + sys.atexit = SysAtExit() + sys.exitfunc = sys.atexit.on_exit + del SysAtExit, sys + +Then in your own code, call: + sys.atexit(my_func_to_call_at_exit) + +There is (almost) always a way. ;) + + -Arcege + + + + + diff --git a/demo/ermis-f/python_m/cur/1557 b/demo/ermis-f/python_m/cur/1557 new file mode 100644 index 00000000..c9bd3377 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1557 @@ -0,0 +1,41 @@ +From: news at dorb.com (Darrell) +Date: Thu, 22 Apr 1999 20:16:51 -0400 +Subject: try vs. has_key() +References: +Message-ID: +X-UID: 1557 + +My experience shows that throwing an exception is slower. + +Aahz Maruch wrote in message +news:aahzFAM4oJ.M7M at netcom.com... +> I've seen roughly half the people here doing +> +> try: +> dict[key].append(foo) +> except: +> dict[key]=[foo] +> +> with the other half doing +> +> if dict.has_key(key): +> dict[key].append(foo) +> else: +> dict[key]=[foo] +> +> Can people explain their preferences? +> -- +> --- Aahz (@netcom.com) +> +> Hugs and backrubs -- I break Rule 6 <*> +http://www.rahul.net/aahz/ +> Androgynous poly kinky vanilla queer het +> +> "You often don't really understand the problem until after the first +> time you implement a solution." - Eric S. Raymond + + + + + + diff --git a/demo/ermis-f/python_m/cur/1558 b/demo/ermis-f/python_m/cur/1558 new file mode 100644 index 00000000..e3131d6d --- /dev/null +++ b/demo/ermis-f/python_m/cur/1558 @@ -0,0 +1,32 @@ +From: piet at cs.uu.nl (piet at cs.uu.nl) +Date: 20 Apr 1999 17:18:38 +0200 +Subject: Database search engine +References: <7ferls$qrj$1@nnrp1.dejanews.com> +Message-ID: +X-UID: 1558 + +>>>>> davidcuny at yahoo.fr (D) writes: + +D> Hello, +D> I'm doing an Intranet Web site with a database (Apache, DB2 and NT). +D> I'd like to realize a quite complex search engine on the database : +D> - the user enters mutli keywords +D> - there exists a table of non significant words +D> - there exists a table of words that have meaning: "kind" and "sort" +D> Where can I find an algorithm or, the best, Perl code for that kind of work? +D> Is Perl the good tool to do that (Perl??,java)?? +D> thanks + +Dr Dobbs had a couple of articles on this subject, I think in Jan and Feb +this year. They also have downloadable code in Perl and Java, which you can +use as a start. It would be nice if somebody translated it in Python (this +last sentence is mainly to make this message on-topic :=) +They use a btree (Berkeley DB 1.85) to store the index. +-- +Piet van Oostrum +URL: http://www.cs.uu.nl/~piet [PGP] +Private email: Piet.van.Oostrum at gironet.nl + + + + diff --git a/demo/ermis-f/python_m/cur/1559 b/demo/ermis-f/python_m/cur/1559 new file mode 100644 index 00000000..2761cd87 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1559 @@ -0,0 +1,45 @@ +From: news at helen.demon.nl (Ilja Heitlager) +Date: Thu, 29 Apr 1999 10:21:54 +0200 +Subject: Designing Large Systems with Python +References: <7g669p$aer$1@nnrp1.dejanews.com> +Message-ID: <7g94b7$m31$1@news.worldonline.nl> +Content-Length: 1218 +X-UID: 1559 + +>A good principle for this would be 'Design by Contract'. +> +>The ideal language for that IMHO would be Eiffel. +>See http://www.eiffel.com/doc/manuals/language/intro/ +>for an introduction by the inventor of the language, Bertrand Meyer +>see also +>http://www.eiffel-forum.org/ +>and the links at http://www.elj.com/ + + +DbC is a good idea anyway, but don't just use Eiffel to use the principle. +Python has assertions and and there are some nice assertionpackages for Java +(using preprocessors +to insert/hide). In other words: assertions can be mimiced in (probably) +every language + +Make your choice based on language constructs like modules or classes (for +modularity and abstraction ---> large systems), script or system language +(for fast code-debug cycles) and available packages. If speed is a problem +most languages offer a C-escape. + +also check +http://www.python.org/workshops/1997-10/proceedings/cunningham.html +and guido's http://www.developer.com/journal/techfocus/081798_jpython.html +for the Two-language approach (HYPE!) + +Anyway for large systems use something like OO language (Python and Java?), +UML (or something) and a good IDE (love to see a class browser for Python), +(re)use existing packages. + +Ilja + + + + + + diff --git a/demo/ermis-f/python_m/cur/1560 b/demo/ermis-f/python_m/cur/1560 new file mode 100644 index 00000000..8db99bf6 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1560 @@ -0,0 +1,48 @@ +From: tim_one at email.msn.com (Tim Peters) +Date: Thu, 29 Apr 1999 20:21:25 -0400 +Subject: string.atoi('-') +In-Reply-To: <372894B5.78F68430@embl-heidelberg.de> +Message-ID: <000101be929f$6258e180$5fa02299@tim> +X-UID: 1560 + +[Jens Linge] +> With python 1.51 running on a SGI: +> >>> string.atoi('-') +> Traceback (innermost last): +> File "", line 1, in ? +> ValueError: invalid literal for atoi(): - +> >>> +> +> But with python 1.52 running on a SGI: +> >>> string.atoi('-') +> 0 +> >>> + +1.5.2 on Windows: + +D:\Python>python +Python 1.5.2 (#0, Apr 13 1999, 10:51:12) [MSC 32 bit (Intel)] on win32 +Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam +>>> import string +>>> string.atoi('-') +Traceback (innermost last): + File "", line 1, in ? +ValueError: invalid literal for atoi(): - +>>> + +> Does it depend on the compilation? + +I'd try recompiling Python with optimization disabled and see whether that +it makes it go away. If so, you're looking at a compiler bug. + +> WHAT IS THE RULE? + +Do unto others as you would have them do unto you? Something like that. + +but-so-far-as-ints-go-"-"-ain't-one-ly y'rs - tim + + + + + + diff --git a/demo/ermis-f/python_m/cur/1561 b/demo/ermis-f/python_m/cur/1561 new file mode 100644 index 00000000..39622a9a --- /dev/null +++ b/demo/ermis-f/python_m/cur/1561 @@ -0,0 +1,26 @@ +From: tim_one at email.msn.com (Tim Peters) +Date: Sun, 18 Apr 1999 20:55:45 GMT +Subject: interfacing to Dragon from a Python app +In-Reply-To: +References: +Message-ID: <000801be89dd$d407a0c0$ed9e2299@tim> +X-UID: 1561 + +FYI, people curious about speech recognition under Windows might want to +give Microsoft's implementation a try; see the little-known + + http://www.microsoft.com/iit/ + +This is not for the Windows-ignorant, weak-hearted, or slow-modem'ed , +but (at least for now) it's all free, and you'll face the same irksome +issues with microphones, sound cards and multimedia drivers you'll hit with +anyone's offering. + +pioneers-don't-ask-for-help-because-they're-too-obsessed-to-conceive- + of-failing-ly y'rs - tim + + + + + + diff --git a/demo/ermis-f/python_m/cur/1562 b/demo/ermis-f/python_m/cur/1562 new file mode 100644 index 00000000..9cf34faa --- /dev/null +++ b/demo/ermis-f/python_m/cur/1562 @@ -0,0 +1,41 @@ +From: dan at control.com (Dan L. Pierson) +Date: Fri, 23 Apr 1999 14:47:25 GMT +Subject: Embedding Python - Win32 - Request for Info/Opinions +References: <371f32af.0@news.inet-systems.net> +Message-ID: <37218679.236666031@news.randori.com> +Content-Length: 1373 +X-UID: 1562 + +"Frank McGeough" wrote: + +> What do I need to install when I put this on a target machine? I start off +> with creating a Python directory. If I put my COM dll, atl.dll and the +> python15.dll in this directory I can get my wrapper to register...but do I +> need to set PythonPath? do I need to install common py files? Where would I +> put these? Do I just mirror (in a very small way) what the Python install +> does? What is commonly done by people who are using Python commercially? + +What we do (thanks to Mark Hammond), is change PC/python_nt.rc to +create a new registry base for our python: + +//#define MS_DLL_ID "1.5.1" +#define MS_DLL_ID "QuickStep" + +Then we create path and module subkeys under that, all of which point +to our install directory. We then copy all of the (many) needed .pyc +files (and the .pyd, etc.) into the install directory. We don't ship +the .py files by default, but I do have another kit that adds them. + +The advantage of this is that our app is independant of whatever +version of Python may also be installed on the machine. The +disadvantage is that we need our own compile of the main Python dll. +Actually, we could probably get by with just editing the official +dll's embedded resources, but that makes me queasy just thinking about +it... + +Dan Pierson, Control Technology Corporation +dan at control.com + + + + diff --git a/demo/ermis-f/python_m/cur/1563 b/demo/ermis-f/python_m/cur/1563 new file mode 100644 index 00000000..31d5cd45 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1563 @@ -0,0 +1,51 @@ +From: hyoon at bigfoot.com (Hoon Yoon) +Date: Wed, 14 Apr 1999 11:47:12 -0400 +Subject: TCL_LIBRARARY and making it work +Message-ID: <3714B880.22F87048@bigfoot.com> +Content-Length: 1600 +X-UID: 1563 + +Hi, + + I forgot how to set up my TCL_LIBRARY and TK_LIBRARY env variables on +NT to make it work. + +Directory of C:\Python\Tcl\lib\tcl8.0 +02/10/99 07:06p 47,407 init.tcl + 1 File(s) 47,407 bytes + +C:\Python>tcltst.py +Traceback (innermost last): + File "C:\Python\tcltst.py", line 2, in ? + Tkinter._test() + File "C:\Python\Lib\lib-tk\Tkinter.py", line 1947, in _test + root = Tk() + File "C:\Python\Lib\lib-tk\Tkinter.py", line 886, in __init__ + self.tk = _tkinter.create(screenName, baseName, className) +TclError: Can't find a usable init.tcl in the following directories: + {C:\Python\TCL\lib} {} ./lib/tcl8.0 C:/tcl8.0/library C:/library +This probably means that Tcl wasn't installed properly. + + I thought this was right on Control Panel System Properties: +TCL_LIBRARY +C:\Python\TCL\lib\tcl8.0 + Can someone tell me how it's set up again? + +-- +***************************************************************************** +S. Hoon Yoon (Quant) Merrill Lynch Equity Trading, +yelled at yahoo.com hoon at bigfoot.com(w) +"Miracle is always only few standard deviations away, but so is +catastrophe." +* Expressed opinions are often my own, but NOT my employer's. +"I feel like a fugitive from the law of averages." Mauldin +***************************************************************************** +-------------- next part -------------- +A non-text attachment was scrubbed... +Name: vcard.vcf +Type: text/x-vcard +Size: 202 bytes +Desc: Card for Hoon Yoon +URL: + + diff --git a/demo/ermis-f/python_m/cur/1564 b/demo/ermis-f/python_m/cur/1564 new file mode 100644 index 00000000..45f25bc8 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1564 @@ -0,0 +1,57 @@ +From: MHammond at skippinet.com.au (Mark Hammond) +Date: Mon, 19 Apr 1999 13:38:11 +1000 +Subject: NT: win32api and win32ui import error +References: <7fdgj4$nnl$1@nnrp1.dejanews.com> <1287633267-17041836@hypernet.com> +Message-ID: <7fe8dq$bdi$1@m2.c2.telstra-mm.net.au> +Content-Length: 1743 +X-UID: 1564 + +Gordon McMillan wrote in message <1287633267-17041836 at hypernet.com>... +> msvcrt.dll v 5.00.7303 +> ole32.dll v 4.00 +> oleaut32.dll v 2.30.4265 + +Mine for NT are identical, except msvcrt, where Gordon's is MSVC 5 and mine +is MSVC6. Build 124 will install MSVC6 DLLs, and Gordon stated he isnt +there yet. + +For Windows 98, I have: +ole32.dll 4.71.26.12 +oleaut32.dll 2.30.4261 + + +What I know is: +* Anyone who sees during installation something like "The COM object could +not be registered" will have some problem once installed. This problem can +be boiled down to: +- "import pythoncom" fails - COM wont work, but most other things will. +- "import pywintypes" fails - almost every other "import win32*" statement +will also fail. Almost nothing installed will work correctly. + +My anecdotal evidence so far is: +* Many people who encounter this error do so because old versions of +pythoncom15.dll and pywintypes15.dll are still hanging around. I dont +understand why the installer is doing this to me :-( +* Almost all the rest are solved by installing the OLE update referenced at +my pages, or installing IE4. +* Bernhard is the only other case. He seemed to have 1 machine where +ole32.dll was version 2, and whatever he did, the DLL could not be upgraded, +deleted or removed. We both gave up there. + +No one else has given me any information to believe there is more to it than +that. If people have problems that can't be explained by the above, then I +really want to hear from them. + +Ive attempted to put all this into a new "Installation Problems" document, +linked from the downloads page. The address is +http://starship.python.net/crew/mhammond/bigpond/InstallationProblems.html +for any constructuve (or otherwise :-) comments... + +Mark. + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1565 b/demo/ermis-f/python_m/cur/1565 new file mode 100644 index 00000000..f831dd8b --- /dev/null +++ b/demo/ermis-f/python_m/cur/1565 @@ -0,0 +1,94 @@ +From: aa8vb at vislab.epa.gov (Randall Hopper) +Date: Fri, 30 Apr 1999 17:08:07 GMT +Subject: Python IS slow ! [was] Re: Python too slow for real world +In-Reply-To: <3729CD92.43477316@appliedbiometrics.com>; from Christian Tismer on Fri, Apr 30, 1999 at 05:34:42PM +0200 +References: <613145F79272D211914B0020AFF6401914DAD8@gandalf.digicool.com> <7g9qmo$luf$1@news.udel.edu> <372965CA.2B3FD2FE@appliedbiometrics.com> <19990430080805.B776752@vislab.epa.gov> <3729A9F3.75B2692B@appliedbiometrics.com> <19990430101215.A806665@vislab.epa.gov> <3729CD92.43477316@appliedbiometrics.com> +Message-ID: <19990430130807.A812795@vislab.epa.gov> +Content-Length: 2525 +X-UID: 1565 + +Christian Tismer: + |[tismer().chris about locking] + | + |> A command-line option (-w), or something like Perl's "use strict" + |> declaration would be a reasonable way to enable this behavior. + | + |Now, well, but Perl is quite different here. As I remember, + |it doesn't have all the dynamic features of Python. + +My point was not to imply "what" would be done by the switch, only "how" it +could be flipped ;-) + + |> |Then, what would you do with classes which depend on each + |> |other? You cannot lock them immediately, this would fail. + |> + |> Could you give an example? + | + |class abstractparser: + | magic = 42 + | pass # numerous default and stub methods + | + |class parserops: + | "mixin class" + | def general_method1(self, *args): + | self.parser_method(self.scanner, args) + | def funky_method(self, *args): + | #some code there + | return self.magic + | + |class someparser(abstractparser, parserops): + | def parser_method(self, scanner, *args): + | # do something, and then use the mixin + | self.funky_method(2, 3, 5) + | + |Sorry about my lack of spirit today, this example is bad. + |But, if you lock class parserops after it is created, + |it will barf, since parser_method cannot be resolved yet. + +Well, I personally would call this "broken". :-) +Base class A calling subclass B's method M without declaring a virtual +method M itself is very perverse IMO. + +If we have: + class parserops: + "mixin class" + def general_method1(self, *args): + self.parser_method(self.scanner, args) + def parser_method(self,...) + """ Pure virtual method """ + pass + ... + +Then there's no problem. self.parse_method will always resolve, possibly +to a subclass method but at least to this pure virtual stub. + + |It will also not resolve self.magic, since it doesn't + |inherit from abstractparser. + +I bet you 5 bucks you know what I'm going to say. :-) +Accessing attributes of a sibling base class united by a future subclass? +[Cringe!] Sheesh. I wouldn't want to try to follow _that_ code, much less +debug it. + + + |Yes, but this would limit Python down to Pascal like name spaces. + |You would need all kinds of tricks to write recoursions like + | + |def two(arg): + | if arg % 2 == 0: + | return three(arg-1) + | return arg + | + |def three(arg): + | if arg % 3 == 0: + | return two(arg-1) + | return arg + +Good point for deferring resolution until the end of the module. +I'm sold. I'd prefer this to having to use forward declarations. + +Randall + + + + diff --git a/demo/ermis-f/python_m/cur/1566 b/demo/ermis-f/python_m/cur/1566 new file mode 100644 index 00000000..f0e0b278 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1566 @@ -0,0 +1,33 @@ +From: bbaetz at ug.cs.su.oz.au (Baetz; Bradley Michael) +Date: Fri, 30 Apr 1999 02:19:09 GMT +Subject: Q on Tkinter Scrollbar +Message-ID: +X-UID: 1566 + + you can use the "@x,y" index syntax for this; the + start of the visible text is "@0,0", the end is "@x,y" + where x and y is the window size (or anything + larger, like "@10000,10000"). + + also see the attached example. + + .... + + def report_position(): + + # get (beginning of) first visible line + top = text.index("@0,0") + + # get (end of) last visible line + bottom = text.index("@0,%d" % text.winfo_height()) + +Thanks a lot for your help. The only thing I don't understand is why the above line returns the position of the _end_ of the line. I know it does (I tried it), but wouldn't the "@0,%d" mean that text.index returns the absolute index to the position where x=0 (ie the beginning of the line), not the end? Now looking at your comments :), I would have got the absolute line number, and then used lineno.end as the index. What did I miss? + +Thanks a lot, + + +Bradley + + + + diff --git a/demo/ermis-f/python_m/cur/1567 b/demo/ermis-f/python_m/cur/1567 new file mode 100644 index 00000000..760a3c99 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1567 @@ -0,0 +1,15 @@ +From: alhopiteau at aol.com (Alhopiteau) +Date: 19 Apr 1999 11:34:13 GMT +Subject: Problem with FNORB +Message-ID: <19990419073413.22923.00002720@ng-fz1.aol.com> +X-UID: 1567 + +i have a problem with fnorb, running the example i get a error while the script +try to import the Fnorb.cdr module, this module is developped using C, how to +manage this? + +thanks + + + + diff --git a/demo/ermis-f/python_m/cur/1568 b/demo/ermis-f/python_m/cur/1568 new file mode 100644 index 00000000..f07d1a35 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1568 @@ -0,0 +1,27 @@ +From: ntpwme at starmedia.com (ntpwme at starmedia.com) +Date: 10 Apr 1999 19:04:55 GMT +Subject: DO YOU BELIEVE IN REINCARNATION? 1843 +Message-ID: <7eo7cn$91u$349@news3.Belgium.EU.net> +X-UID: 1568 + +************************************************************ + DO YOU BELIEVE IN REINCARNATION? +************************************************************ + +Do you want to know who you were and where you lived in your +past life? + +http://orbita.starmedia.com/~luizhenrique/reincarnation.html + +************************************************************ + +This message was posted with POST AGENT +The BEST bulk news poster +Download your FREE copy now at: +http://postagent.com/default.asp?fromAgentID=1819 +kckpihergfqukjjgmfdkvqemocjmbmyoksimyiykuhzwvfqdxszokefntjujqwfqwjnqddueneg + + + + + diff --git a/demo/ermis-f/python_m/cur/1569 b/demo/ermis-f/python_m/cur/1569 new file mode 100644 index 00000000..066ee462 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1569 @@ -0,0 +1,32 @@ +From: paul at prescod.net (Paul Prescod) +Date: Fri, 30 Apr 1999 14:25:27 GMT +Subject: Python IS slow ! [was] Re: Python too slow for real world +References: <613145F79272D211914B0020AFF6401914DAD8@gandalf.digicool.com> + <37272CA0.3F3F02A2@prescod.net> +Message-ID: <3729BD57.9F7C1CF3@prescod.net> +X-UID: 1569 + +Reimer Behrends wrote: +> +> > Is there any languge that is as easy to embed as Python, and also has +> > full garbage collection? +> +> Ruby. (Was discussed here before.) See + +Maybe you can describe its embedding API. How does it handle the issue of +C pointers to objects that are moving around? How does it know if the +embedding code has buried a pointer away somewhere? + +-- + Paul Prescod - ISOGEN Consulting Engineer speaking for only himself + http://itrc.uwaterloo.ca/~papresco + +"Microsoft spokesman Ian Hatton admits that the Linux system would have +performed better had it been tuned." +"Future press releases on the issue will clearly state that the research +was sponsored by Microsoft." + http://www.itweb.co.za/sections/enterprise/1999/9904221410.asp + + + + diff --git a/demo/ermis-f/python_m/cur/1570 b/demo/ermis-f/python_m/cur/1570 new file mode 100644 index 00000000..1d4cd752 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1570 @@ -0,0 +1,75 @@ +From: aa8vb at vislab.epa.gov (Randall Hopper) +Date: Tue, 6 Apr 1999 15:19:50 GMT +Subject: SWIG, Modulator, BGEN, etc. - which? (Re: swig or not to swig ?) +In-Reply-To: <002b01be803c$635a54d0$6fc6a8c0@rochester.rr.com>; from Darrell on Tue, Apr 06, 1999 at 10:47:26AM -0400 +References: <4p6O2.1348$8m5.2126@newsr1.twcny.rr.com> <3709f149.2262513@news.oh.verio.com> <19990406103412.A869943@vislab.epa.gov> <002b01be803c$635a54d0$6fc6a8c0@rochester.rr.com> +Message-ID: <19990406111950.A870049@vislab.epa.gov> +Content-Length: 2603 +X-UID: 1570 + +Darrell: + |> I'm also interested in what wrapping options folks like best. + |> Roll-your-own, SWIG, Modulator, BGEN? (Do others not listed exist for + |UNIX?) + | + |These are the only options I've found. I just started playing with Modulator + |and it will very much simplify a Roll-your-own approach. BGEN is my next + |option to try. + | + |I believe that BGEN is the only one that tries to parse .h files, which + |sounds like what you want. + |I'll let you know how it goes. + +Thanks. I'd appreciate that. + +BTW, SWIG parses header files as well. Of the 3, it is the only one I've +used, and I haven't spent a lot of time with it yet. + + It does a good bit, and it supports generating a Python "shadow class" +for structures it encounters which can be convenient. Also, once you get +the .i file cooked, ideally you can generate wrappers for Python, Perl, +Tcl, and others coming down the pike no more modificiation. + + Of the 2 small C libraries I've wrapped for Python thus far, I had to +augment it's default behavior in a couple ways by customizing the +SWIG configuration (.i) file for the libraries: + + 1) For struct parameters, explicitly define wrapper "constructor" and + "destructor" methods for the struct. These are exposed as new + functions that are named new_ and delete_. + + 2) Define access routines in the wrapper for struct members. + (These communicate errors to exception wrappers using an ad-hoc + wrapper-module-scope variable.) + + 3) Define a number of exception wrappers to turn C function errors + and even wrapper function errors into script language exceptions. + + (Unfortunately, new functions defined in the wrapper can't throw their + own exceptions. They have to communicate these out-of-line to + exception wrappers which then trigger the scripting language + exceptions.) + + 4) Define which function parameter names are output parameters. + + 5) Double wrap functions which return values in arguments and + success/failure in the return value, so I can get a tuple in Python. + + E.g.: %apply float *OUTPUT { float *x, float *y }; + int GetPoint( struct S *s, int *x, int *y ) + + By default this returns a 3-tuple. We don't care about the function + return value in Python (it's translated into an exception by the + exception wrapper) so we must double-wrap to toss it. + +It works. However, there is enough non-trivial wrapper code (123 lines for +one of these libraries; a maintenance issue) that I thought it'd be +worthwhile to survey what other options are out there. + +Randall + + + + + + diff --git a/demo/ermis-f/python_m/cur/1571 b/demo/ermis-f/python_m/cur/1571 new file mode 100644 index 00000000..9c87bd29 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1571 @@ -0,0 +1,119 @@ +From: dalke at bioreason.com (Andrew Dalke) +Date: Thu, 15 Apr 1999 17:35:51 -0600 +Subject: for in benchmark interested +References: <37157CE7.EFB470CA@inka.de> +Message-ID: <371677D7.EACDA7B7@bioreason.com> +Content-Length: 3368 +X-UID: 1571 + +Friedrich Dominicus said: +> Some time ago I have opened a thread about optimization in Python. I +> have now done a simple benchmark and used Python for that too. If +> s.o is interested, take a look at: http://edt.vol.cz:81/bench + +How about a unix command line implementation, like + + cat file | tr " \t\r" "\n\n\n" | sort | uniq -c | tail +2 + +It's a bit slower than the C version, but only by a factor of +two or so, and a lot easier to write. + + +Another solution might be: + echo "" | spellin > myhlist + spell -d myhlist < file | sort | uniq -c + +but that strips punctuation so doesn't give the same results. + +A third is: + deroff -w file | sort | uniq -c + +which also doesn't give exactly what you want. Still, it is +arguable that both these cases are better than the other solutions +given different definitions of the word "word." + + +BTW, the C code has some problems: + +*** add (char *) + +"count_words.l", line 34: error(3232): a value of type "void *" +cannot be used to initialize an entity of type "char *" + char* str = malloc(yyleng+1); strcpy(str, yytext); + ^ + +There are a few problems with "inline" that my non-gcc C compiler +doesn't like. I'm not sure that inline is a C keyword. + +I also get a core dump when I run it: + +bioreason8> ./count_words_c ./count_words.c +Bus error (core dumped) +bioreason8> dbx ./count_words_c core +dbx version 7.1 Dec 3 1996 17:03:19 +Core from signal SIGBUS: Bus error +(dbx) where +> 0 hash(string = 0x100170e9 = "line") ["/home/u05/dalke/tmp/hash.c":104, 0x100037c8] + 1 search(table = 0x10017010, key = 0x100170e8 = "#line") +["/home/u05/dalke/tmp/hash.c":181, 0x10003b00] + 2 run() ["/home/u05/dalke/tmp/count_words.l":35, 0x100033e0] + 3 yylex() ["/home/u05/dalke/tmp/count_words.l":27, 0x1000198c] + 4 main(argc = 2, argv = 0x7fff2f24) ["/home/u05/dalke/tmp/count_words.l":59, +0x100034fc] + 5 __start() +["/vince/6.2-mar09/work/irix/lib/libc/libc_n32_M3/csu/crt1text.s":166, +0x100015e8] +(dbx) list 92 + 92 /* + 93 Hashes a string to produce an unsigned short, which should be + 94 sufficient for most purposes. + 95 */ + 96 + 97 unsigned hash(char *string) + 98 { + 99 unsigned int ret_val = 0; + 100 int i; + 101 +(dbx) l + 102 while (*string) + 103 { + * 104 i = *( int *)string; + 105 ret_val ^= i; + 106 ret_val <<= 1; + 107 string ++; + 108 } + 109 return ret_val; + 110 } + 111 + + +The conversion on line 104 is really wrong. It should likely be + + i = (int)(*string) + +Also, I tried it (with the fix) against a core dump: +bioreason8> ls -l /usr/tmp/core +-rw-r--r-- 1 root sys 5357568 Apr 8 00:45 /usr/tmp/core +bioreason8> ./count_words_c /usr/tmp/core > /dev/null + +After about 6 minutes I killed the job. Probably doesn't like the +embedded NULs. This is an example of "fuzz" testing. See +http://www.cs.wisc.edu/Dienst/UI/2.0/Describe/ncstrl.uwmadison/CS-TR-95-1268 + + +Finally, I see the lex code is processed with: + +count_words.c: count_words.l + flex -B -ocount_words.c count_words.l + +You should add a "-f" to that. That gave me a 15% speedup over just -B, against +the code at http://caml.inria.fr/caml-list/0899.html, from whence +you based this thread originally. + + + Andrew + dalke at acm.org + + + + diff --git a/demo/ermis-f/python_m/cur/1572 b/demo/ermis-f/python_m/cur/1572 new file mode 100644 index 00000000..4406fe4d --- /dev/null +++ b/demo/ermis-f/python_m/cur/1572 @@ -0,0 +1,44 @@ +From: downstairs at home.com (TM) +Date: Thu, 08 Apr 1999 05:21:29 GMT +Subject: povray.py +References: <__YN2.30200$FZ5.11443@news.rdc1.sfba.home.com> +Message-ID: +Content-Length: 1213 +X-UID: 1572 + +I would love a copy. I've only written a few (simple) modules, +but I'd sure like to try and help you out. + + Please let me know where I can download it or send it to my +other e-mail address: mrfusion at home.com + +Thanks! +Tom + +P.S. By the way, there is a module called terry that generates renderman +code. +I think they even list it on python.org. What I'd REALLY rather see is a +module +that could manipulate pre generated .rib files. God that would make my life +easier...... + + +> Well, I don't have RenderMan, but I did write a pov.py module. It does +> basically what you described, and eventually I'm going to add animation +> features and basic physics (the ocaml module I wrote before did that) and +> stuff like "magic" transforms that align one object with another, spline +> curves etc. I've designed some scenes in it, and it's wordier than pov, +but +> has all the benefits of a real language. It doesn't do the new halo +syntax +> because the pov people have yet to release an updated unix version +> (grumblegripegrunt). It's incomplete, and written when I was first +learning +> python, and I haven't worked on it for a while, but I'll send it to anyone +> interested. Perhaps we could collaborate? + + + + + + diff --git a/demo/ermis-f/python_m/cur/1573 b/demo/ermis-f/python_m/cur/1573 new file mode 100644 index 00000000..bc222162 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1573 @@ -0,0 +1,64 @@ +From: aa8vb at vislab.epa.gov (Randall Hopper) +Date: Fri, 23 Apr 1999 08:07:21 -0400 +Subject: Pointers to variables +In-Reply-To: ; from Dan Schmidt on Thu, Apr 22, 1999 at 01:30:53PM -0400 +References: <19990422121403.A279051@vislab.epa.gov> +Message-ID: <19990423080721.A344578@vislab.epa.gov> +Content-Length: 1407 +X-UID: 1573 + + Thanks for the replies and suggestions to use setattr to set variables +by name. + + I think I understand the source of my confusion. This construct: + + for ( var, val ) in [( min, 1 ), ( max, 100 )]: + +isn't pairwise assignment to all the values of the list. If it were, val +would be an alias for the variable min, then an alias for max, etc. + +This actually builds a completely new list: + + [( valueof(min), 1 ), ( valueof(max), 100 )] + +in memory first, which is then iterated over. This is why my original +example didn't work. + + Also, the "valueof()" relation for some types in python (apparently) +is a reference rather than a value (lists, objects, etc.) which explains +why these examples work: + + (1) min = [ 0 ] + max = [ 0 ] + + for ( var, val ) in [( min, 1 ), ( max, 100 )]: + var[0] = val + + (2) class Val: + def __init__( self, num ): + self.num = num + + min = Val(0) + max = Val(0) + + for ( var, val ) in [( min, 1 ), ( max, 100 )]: + var.num = val + +but this one doesn't: + + (3) min = 0 + max = 0 + for ( var, val ) in [( min, 1 ), ( max, 100 )]: + var = val + +So basically this is just a little asymmetry in the language. Putting a +variable in a list/tuple (valueof(var)) performs a shallow copy rather than +a deep copy. + +Does this sound about right? + +Randall + + + + diff --git a/demo/ermis-f/python_m/cur/1574 b/demo/ermis-f/python_m/cur/1574 new file mode 100644 index 00000000..0c36398c --- /dev/null +++ b/demo/ermis-f/python_m/cur/1574 @@ -0,0 +1,61 @@ +From: jeremy at cnri.reston.va.us (Jeremy Hylton) +Date: Tue, 6 Apr 1999 13:24:16 -0400 (EDT) +Subject: SNMPy update +In-Reply-To: <3709C8BE.4257C9F1@lemburg.com> +References: <7e1hiq$a71$1@Starbase.NeoSoft.COM> + <7ear25$ksf$1@news-sj-3.cisco.com> + <14089.11820.416453.80124@bitdiddle.cnri.reston.va.us> + <3709C8BE.4257C9F1@lemburg.com> +Message-ID: <14090.16807.950025.496495@bitdiddle.cnri.reston.va.us> +Content-Length: 2162 +X-UID: 1574 + +>>>>> "MAL" == M -A Lemburg writes: + + MAL> Jeremy Hylton wrote: + >> I'll second your sentiment! I did some work on an X.509 library + >> written entirely in Python. Like you friend's SNMP code, it will + >> probably never be released; I don't have time to finish it nor + >> did I expect that I'd want to release it given the export control + >> hassles. + + MAL> Just want to note that SSLeay/OpenSSL includes a pretty + MAL> complete X.509 lib and also routines to do ASN.1 encoding an + MAL> decoding. The main argument for using OpenSSL in this context + MAL> is, of course, that no export control restrictions apply. + +Absolutely! There are a number of good reasons for using OpenSSL +other than export control as well. OpenSSL buys you all of SSL as +well as a lot of X.509 (and more of that every day). A Python +application built on a SWIGed OpenSSL, however, has a *lot* of C code +underneath it -- with all the problems a large C program has. A pure +Python implementation of X.509 could be easier to understand, debug, +and maintain. + + >> However, it seemed clear to me that an ASN.1 compiler could be + >> written to generate the encode/decode routines. If someone is + >> interested in that, I've got some design notes and rough code on + >> how to do the encode/decode and on how to build a backend for + >> SNACC. (A free-ish ASN.1 compiler; the only one?) + + MAL> Not sure what you mean with "ASN.1" compiler. If you want a + MAL> compiler that does ASN.1 description -> Python function calling + MAL> de/encoding routines kind of thing, then I guess the ASN.1 + MAL> stuff in OpenSSL could help you getting started quite fast. + +It seems awfully hard to separate the ASN.1 specific stuff out of +OpenSSL. It uses it owns I/O abstractions and some moderately hair C +data structures to manage the results. It's a lot simpler to just +write the encode/decode routines in pure Python. + + MAL> Note that I have a project running with the intention to wrap + MAL> OpenSSL in an OO manner called mxCrypto (see the link below). + +Looking forward to seeing it. When do you think you might have an +alpha release ready? + +Jeremy + + + + diff --git a/demo/ermis-f/python_m/cur/1575 b/demo/ermis-f/python_m/cur/1575 new file mode 100644 index 00000000..bc013d66 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1575 @@ -0,0 +1,48 @@ +From: clarence at silcom.com (Clarence Gardner) +Date: Fri, 16 Apr 1999 15:04:12 GMT +Subject: forking + stdout = confusion +References: <001d01be87b5$8b3529a0$ada22299@tim> +Message-ID: +Content-Length: 1644 +X-UID: 1575 + +Tim Peters (tim_one at email.msn.com), as usual, knew the answer: +: It doesn't matter, though, because unlike file objects you create with +: "open", Python won't close the file descriptor underlying the default +: binding for sys.stdout (or .stdin or .stderr) even if all references do go +: away. Those three file objects are initialized specially (in _PySys_Init). + +I promise this will be my last posting in this thread :) +Tim: + Thanks! + +Carsten, et al.: + The Apache, CERN and Netscape HTTP servers (at least for Unix) treat + any CGI program differently if its name begins with 'nph-'. Normally, + stdout in a CGI is a pipe into the web server, which copies the data + to the client. Before the data, however, it also includes the HTTP + response headers (though it requires you to supply the Content-Type). + It may also buffer the entire response so that it can include a + Content-Length. + + Technically, the difference in the NPH environment is that the server + does not add any headers, so the entire HTTP response must be provided + by the CGI program. (One of the reasons NPH is necessary is if you + want to provide an unusual HTTP response code. The server normally + takes care of Success and, if you provide a Location: or URI: header, + Redirection statuses.) (NPH supposedly means 'non parsed headers'.) + + In practice, the server also does away with the buffering in the NPH + case, and sets the stdout for the CGI program to be the connection to + the client. + +-- +-=-=-=-=-=-=-=-= +Clarence Gardner +AvTel Communications +Software Products and Services Division +clarence at avtel.com + + + + diff --git a/demo/ermis-f/python_m/cur/1576 b/demo/ermis-f/python_m/cur/1576 new file mode 100644 index 00000000..50fcf6e5 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1576 @@ -0,0 +1,40 @@ +From: matt at mondoinfo.com (Matthew Dixon Cowles) +Date: Sat, 24 Apr 1999 17:27:08 -0500 +Subject: CSV Module +References: +Message-ID: +Content-Length: 1034 +X-UID: 1576 + +In article +, +Moshe Zadka wrote: + +> I wonder if there is some standard module out there that can parse +> ``CSV'' files. Or, if anyone knows where the documentation of that format +> can be had. +> +> Here is my meek attempt at an answer. It is not certain to work, as I am +> not sure about the format -- I was guessing from looking at the file + +[snip] + +Moshe, +I'm pretty sure that there isn't a standard module since I had a look for +one a month or two ago and didn't find one. I ended up doing just what +you did -- hacking up something that worked on the file I needed to +convert. I have no idea if there's something in the spec that mine doesn't +take into account since I've never seen the spec. Mine will handle +double-quotes embedded in a field since there were some in the data I had +to parse. + +In case it's of any interest to anyone, I've uploaded mine to my FTP site: + +ftp://ftp.visi.com/users/mdc/csvsplit.py + +Regards, +Matt + + + + diff --git a/demo/ermis-f/python_m/cur/1577 b/demo/ermis-f/python_m/cur/1577 new file mode 100644 index 00000000..3b84bcc3 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1577 @@ -0,0 +1,31 @@ +From: akuchlin at cnri.reston.va.us (Andrew M. Kuchling) +Date: Tue, 6 Apr 1999 15:18:21 GMT +Subject: SWIG, Modulator, BGEN, etc. - which? (Re: swig or not to swig ?) +In-Reply-To: <19990406103412.A869943@vislab.epa.gov> +References: <4p6O2.1348$8m5.2126@newsr1.twcny.rr.com> + + + <3709f149.2262513@news.oh.verio.com> + <19990406103412.A869943@vislab.epa.gov> +Message-ID: <14090.9566.560801.949551@amarok.cnri.reston.va.us> +X-UID: 1577 + +Randall Hopper writes: +>I'm also interested in what wrapping options folks like best. +>Roll-your-own, SWIG, Modulator, BGEN? (Do others not listed exist for UNIX?) + + There's also SIP for C++ libraries, written for wrapping the +Qt/KDE libraries. http://www.river-bank.demon.co.uk/software/ +(It's named "SIP" because it's a small "SWIG".) + +-- +A.M. Kuchling http://starship.python.net/crew/amk/ +Blossom for a lady -- Rain in the doorway -- Not her sister -- Want/not want +-- The views from the backs of mirrors -- Journal of the plague year -- "The +number you have dialled..." + -- Title of SANDMAN #41: "Brief Lives:1" + + + + + diff --git a/demo/ermis-f/python_m/cur/1578 b/demo/ermis-f/python_m/cur/1578 new file mode 100644 index 00000000..c66a8404 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1578 @@ -0,0 +1,34 @@ +From: fred at sunrise.com (Fred Sells) +Date: Fri, 16 Apr 1999 20:47:56 -0400 +Subject: Motif GUI Builder +References: +Message-ID: <3717DA3C.8D91A592@sunrise.com> +X-UID: 1578 + +We have developed a C, C++, Ada GUI builder for +Motif 1.2 many years ago. The product is ezX. + +We had also developed, but never released a Python +interface. + +Is there any interest in a Motif GUI builder that +includes a Python interface???. + +If you are interested, please email to fred at sunrise.com +with a few words about how you could use it. + +To put it in perspective. the C/C++ version sold for $3500 +per user. The Python would be freebie or shareware depending +on what I need to do to support it and if there is any real interest +in a Motif GUI. + + +I need to decide whether to get it out there on the web +or deep six it. + +Fred Sells, Sunrise Software International. + + + + + diff --git a/demo/ermis-f/python_m/cur/1579 b/demo/ermis-f/python_m/cur/1579 new file mode 100644 index 00000000..0267a8c3 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1579 @@ -0,0 +1,39 @@ +From: jamz at my-dejanews.com (jamz at my-dejanews.com) +Date: Tue, 27 Apr 1999 15:52:47 GMT +Subject: JPython 64K limit on source-code size? +Message-ID: <7g4mgd$uo7$1@nnrp1.dejanews.com> +Content-Length: 1177 +X-UID: 1579 + +I have a JPython program I'm using as a test suite. It's generated code and +around 74K long. When I try to run it with JPython I get this message: + +Traceback (innermost last): + (no code object) at line 0 +java.lang.ClassFormatError: org/python/pycode/_pyx0 (Code of a method longer +than 65535 bytes) + at java.lang.ClassLoader.defineClass0(Native Method) + at java.lang.ClassLoader.defineClass(ClassLoader.java:382) + at org.python.core.BytecodeLoader.loadClass(BytecodeLoader.java:12) + at org.python.core.BytecodeLoader.loadBytes(BytecodeLoader.java:23) + at org.python.core.BytecodeLoader.makeCode(BytecodeLoader.java:41) + at org.python.core.Py.compile(Py.java:997) + at org.python.core.Py.compile(Py.java:1007) + at org.python.core.__builtin__.execfile(__builtin__.java:220) + at org.python.core.jpython.main(jpython.java:141) + + +If this 64K ceiling is indeed a basic limitation of JPython because of Java, +I'm wondering if there is an easy way to split the file into pieces in a +chain-like fashion. Any ideas? + +Thanks, + +Monty + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/1580 b/demo/ermis-f/python_m/cur/1580 new file mode 100644 index 00000000..e542456f --- /dev/null +++ b/demo/ermis-f/python_m/cur/1580 @@ -0,0 +1,26 @@ +From: boud at rempt.xs4all.nl (boud at rempt.xs4all.nl) +Date: Tue, 13 Apr 1999 21:01:37 GMT +Subject: Python + KDE tutorial +Message-ID: +X-UID: 1580 + +Since I mentioned my attempts at the translation +of Daniel Marjam?ki's c++ KDE tutorial +(http://www.dormnet.his.se/~a96danma) into Python, +I thought it a good idea to mention that it is now +up at: + +http://www.xs4all.nl/~bsarempt/python/tutorial.html + +It offers both of Daniels lessons and some explanatory +text. I'm sure I not an experienced Python programmer, +but the examples seem to work... + +Boudewijn Rempt +-- + +Boudewijn Rempt | www.xs4all.nl/~bsarempt + + + + diff --git a/demo/ermis-f/python_m/cur/1581 b/demo/ermis-f/python_m/cur/1581 new file mode 100644 index 00000000..9c910077 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1581 @@ -0,0 +1,64 @@ +From: mike.steed at natinst.com (Mike Steed) +Date: Wed, 07 Apr 1999 12:21:24 -0500 +Subject: File objects in extension module +Message-ID: <370B9414.68053816@natinst.com> +Content-Length: 1064 +X-UID: 1581 + +Hi, + +I am trying to use a file object passed from Python to a C extension +module (Windows 98). All the C runtime calls crash when I pass them the +FILE pointer (fwrite, fflush, etc.) + +The pointer I get back from PyFile_AsFile seems okay -- the struct +members have reasonable values, etc. + +I have seen the same behavior with MS VC++ (4.2) and egcs/mingw32 +(1.1.2), and with Python-1.5.1 and 1.5.2b2. + +What am I missing? + +Here is a minimal code snippet, without the error checking code: + +----- example.c +#include "Python.h" + +static PyObject * +ex_flush(PyObject *self, PyObject *args) +{ + PyObject *file; + + /* ... code to check arg count and types removed ... */ + + file = PyTuple_GetItem(args, 0); + fflush(PyFile_AsFile(file)); + + Py_INCREF(Py_None); + return Py_None; +} + +static PyMethodDef example_methods[] = { + {"flush", ex_flush, 1}, + {NULL, NULL} +}; + +void +initexample() +{ + Py_InitModule("example", example_methods); +} + + +----- on the Python side: +>>> import example +>>> f = open('test', 'w') +>>> example.flush(f) --> crash! + + +Puzzled, +Mike + + + + diff --git a/demo/ermis-f/python_m/cur/1582 b/demo/ermis-f/python_m/cur/1582 new file mode 100644 index 00000000..eb48f308 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1582 @@ -0,0 +1,37 @@ +From: MHammond at skippinet.com.au (Mark Hammond) +Date: Wed, 14 Apr 1999 09:39:50 +1000 +Subject: site.py & COM startup +References: +Message-ID: <7f0kin$ben$1@m2.c2.telstra-mm.net.au> +X-UID: 1582 + +Robin Becker wrote in message ... +>using Mark Hammond's win32com for a server I find that the installation +path is not +>automatically in sys.path so my base .pth files are missed and I get +troubles. +> +>I hacked site.py to fix this using the fact that sys.prefix == '' when +running a com +>server (I guess inproc). + +It is indeed when run as an inproc. The problem is that Python uses the +current executable to try and deduce the Python home. When Python is being +used as a COM server, the host executable could be _anything_, and therefore +cant be used to locate the Python home. + +So, I would like to fix this once and for all in the COM stuff, but I cant +work out a reasonable strategy for locating the Python home. + +Also, FYI: As of build 124 and later of my extensions, when you register a +COM object its path is now also automatically saved away, and automatically +used as the object is created - thus, no more errors due to your COM object +not being on the PythonPath... + +Mark. + + + + + + diff --git a/demo/ermis-f/python_m/cur/1583 b/demo/ermis-f/python_m/cur/1583 new file mode 100644 index 00000000..c5f7a905 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1583 @@ -0,0 +1,220 @@ +From: scott at chronis.pobox.com (scott cotton) +Date: 8 Apr 1999 20:27:41 GMT +Subject: another lock module +Message-ID: +Content-Length: 6218 +X-UID: 1583 + +i got tired of worrying about whether or not a system does +flock, of thinking that posix fcntl might not work on all +systems due to the differences in the struct flock, and +certainly not nfs, so i took the file locking locking module +from mailman (locks with link() so it _should_ work on NFS, +i think), added shared vs exclusive locking, and made the +interface something i like. + +hope someone else finds it handy, and thanx josh for adding +the timeouts! + +file lock.py: +---------------------------------------------------------------------- +""" +unix portable file locking, reportedly works even on NFS file +systems. + +usage: shared and exclusive locking (read and write locks) + +import lock +shl = lock.shlock() +shl.release() + +exl = lock.exlock() +exl.release() + +try: + shl = lock.shlock(, ) +except lock.TimeoutError: + # SOL, no lock + +try: + exl = lock.exlock(, ) +except lock.TimeoutError: + # no lock + +# +# By default, all locks will be stored in files in +# the /tmp directory. this may not be desirable. +# the user can change the lock directory from the +# default '/tmp' using the setlockdir() function. +# +lock.setlockdir("/tmp/lock") + +# +# it is recommended that users of this module +# surround code between obtaining and releasing +# a lock with a try: ... finally:. This will +# help guarantee that an application using this +# module will never deadlock. system crashes may +# cause deadlock, but that is fairly unlikely. +# +shl = lock.shlock() +try: + # do stuff with the lock +finally: + shl.release() + +""" +# +# system mods +# +import os +from stat import ST_NLINK +import string +import socket +import time + +# +# how frequently to retry obtaining locks in seconds +# +retry_intv = 0.3 + +# +# the default directory in which locks are +# housed. +# +lockdir = "/tmp" + +class TimeoutError(StandardError): + pass + +def setlockdir(newlockdir): + global lockdir + lockdir = newlockdir + +class _lock: + + def __init__(self, resource, lockdir): + + self.resource = resource + self.lockpath = os.path.join(lockdir, + "%s.lock" % (self.resource)) + self.tmpfname = os.path.join(lockdir, + "%s.lock.%s.%d" % (self.resource, + socket.gethostname(), + os.getpid())) + if not os.path.exists(self.lockpath): + open(self.lockpath, "a+").close() + self.type = "unknown" + + def release(self): + if not self.locked(): + return + if self.type == "ex" \ + or os.stat(self.lockpath)[ST_NLINK] == 2: + open(self.lockpath, "w").close() # remove the info in the lock file + os.unlink(self.tmpfname) + + def __del__(self): + self.release() + + def locked(self): + return os.path.exists(self.tmpfname) + + # + # can raise ValueError or IOError, ValueError is handled further up. + # + def _getlockdata(self): + fp = open(self.lockpath, 'r') + try: + raw = fp.read() + ltype, host, pid = string.split(string.strip(raw)) + pid = string.atoi(pid) + finally: + fp.close() + return ltype, host, pid + + def _setlockdata(self): + s = "%s %s %d\n" % (self.type, socket.gethostname(), os.getpid()) + fp = open(self.lockpath, "w") + try: + fp.write(s) + finally: + fp.close() + + +class exlock(_lock): + + def __init__(self, resource, timeout = 0): + _lock.__init__(self, resource, lockdir) + self.type = "ex" + starttime = time.time() + while 1: + os.link(self.lockpath, self.tmpfname) + if os.stat(self.lockpath)[ST_NLINK] == 2: + # we have the exclusive lock + self._setlockdata() + break + os.unlink(self.tmpfname) + time.sleep(retry_intv) + time_elapsed = time.time() - starttime + if (timeout) and (time_elapsed > timeout): + raise TimeoutError("Timeout limit of %d seconds" + " has been reached" % timeout) + + +class shlock(_lock): + + # + # in order to allow a single process + # to acquire multiple shared locks + # on a single resource, we must supplant + # the pid part of the tmpfname with a counter. + # this information in stored in the dict shared_ct + # keyed by resource name and valued by counter. + # this is not thread safe. + shared_ct = {} + + def __init__(self, resource, timeout = 0): + _lock.__init__(self, resource, lockdir) + self.type = "sh" + if not self.shared_ct.has_key(resource): + self.shared_ct[resource] = 1 + else: + self.shared_ct[resource] = self.shared_ct[resource] + 1 + self.tmpfname = self.tmpfname + "-%d" % (self.shared_ct[resource]) + starttime = time.time() + while 1: + os.link(self.lockpath, self.tmpfname) + nlink = os.stat(self.lockpath)[ST_NLINK] + if nlink == 2: + # first shared lock + self._setlockdata() + break + elif nlink > 2: + # is it shared or exclusive? + # we have to read from the lock file + # here, so if a read happens after + # another process has truncated the file, + # it'll raise ValueError, in which case we just + # keep on tryin' + try: + ltype, host, pid = self._getlockdata() + except ValueError: + # read after other lock erased lockinfo from file + ltype = "unknown" + if ltype == "sh": + break + os.unlink(self.tmpfname) + time.sleep(retry_intv) + time_elapsed = time.time() - starttime + if (timeout) and (time_elapsed > timeout): + raise TimeoutError("Timeout limit of %d seconds" + "has been reached" % timeout) + + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1584 b/demo/ermis-f/python_m/cur/1584 new file mode 100644 index 00000000..0729e983 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1584 @@ -0,0 +1,25 @@ +From: roy at popmail.med.nyu.edu (Roy Smith) +Date: Tue, 27 Apr 1999 08:54:48 -0400 +Subject: Python too slow for real world +References: <372068E6.16A4A90@icrf.icnet.uk> <3720A21B.9C62DDB9@icrf.icnet.uk> <3720C4DB.7FCF2AE@appliedbiometrics.com> <3720C6EE.33CA6494@appliedbiometrics.com> <37215EFB.433AFCA6@prescod.net> <3724B2D6.B468687A@prescod.net> <37252816.42634501@Lugoj.Com> +Message-ID: +X-UID: 1584 + +James Logajan wrote: +> When an SME finds the tool too slow, it would be nice if they could post +> their problem to a group like this without fear of insult, intended or not. + +There was no intent to insult. + +The thread was moving in the direction of "my program using regex is too +slow, and I think the solution would be to move regex into the python core +to make it faster". I was just pointing out why that is flawed reasoning. + +-- +Roy Smith +New York University School of Medicine + + + + + diff --git a/demo/ermis-f/python_m/cur/1585 b/demo/ermis-f/python_m/cur/1585 new file mode 100644 index 00000000..cb28d986 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1585 @@ -0,0 +1,32 @@ +From: ciupke at fzi.de (Oliver Ciupke) +Date: Thu, 22 Apr 1999 15:16:21 +0200 +Subject: Time complexity of dictionary insertions +Message-ID: <371F2125.BEC5F892@fzi.de> +X-UID: 1585 + +As I understood from the Python documentation, dictionaries are +implemented as +extensible hash tables. What I didn't find either in the references or +in the FAQ is: what is the +actual time complexity for an insertion into a dictionary? + +Do the old contents (probably references) have to be copied when +extending (doubling?) the +dictionary? + +I guess updates and deletions have constand complexity, right? + +If the complexity of insertion is something like n*log(n), does anyone +know measurements "how +linear" the real measured times are? + + +Thanks in advance +--Oliver + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1586 b/demo/ermis-f/python_m/cur/1586 new file mode 100644 index 00000000..03781c21 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1586 @@ -0,0 +1,80 @@ +From: wtanksle at dolphin.openprojects.net (William Tanksley) +Date: Wed, 28 Apr 1999 22:54:30 GMT +Subject: Python IS slow ! [was] Re: Python too slow for real world +References: <613145F79272D211914B0020AFF6401914DAD8@gandalf.digicool.com> <372769B0.3CE8C0F3@prescod.net> +Message-ID: +Content-Length: 2994 +X-UID: 1586 + +On Wed, 28 Apr 1999 20:04:00 GMT, Paul Prescod wrote: +>William Tanksley wrote: + +>> And Oberon (SlimBinaries), and Eiffel (typing and general compile-time +>> error catching), and ... + +>Actually, isn't Eiffel's type system famous for being full of holes? + +I'm familiar with the covariance/contravariance argument, but I've never +before heard anyone say anything about Eiffel being full of holes. What +problems have you heard of? + +>Regardless, wouldn't a better source of inspiration on typing be a +>language with *optional* compile-time error checking? + +Good question. I don't know the answer, but I can point out the dangers +of not planning our path. + +One dangerous side of allowing flexibility is that we could be like C++, +where the safe way of doing anything requires more typing and often causes +incompatibilities. Examples range from virtual functions; through inline +functions, templates, single-root object hierarchy, and garbage +collection; to covariance/contravariance. + +The other dangerous side, of course, is being one of the languages which +are so safe you can't use them without a huge manual and pages of UML. +Python can NOT wind up like this, regardless of the dangers obvious in the +other side. + +Let me expand a little on the dangers of C++. + + - virtual functions. It shouldn't be my job to tell the compiler when +virtual lookups are the only thing to do; the compiler ought to be able to +tell. For performance gurus, a way to hint to the compiler that virtual +lookups were _not_ needed might be useful -- but what if the programmer +was wrong? + + - inline functions. Again, a good compiler HAS to make this decision for +itself, and in a good compiler, whether or not this decision was made +should be transparent to the programmer. + + - templates. Generic functions are a very good thing, and with Python +2's type support we might wind up needing them. In C++, templates are +also a very good thing, but thanks to the C model of seperate compilation, +no two C++ compilers handle templates compatibly. + + - single-root object hierarchy -- this is a must when the default binding +is virtual. + + - GC -- hard to add after the fact. No worry with Python, but what if +there are other issues like it? + + - covariance/contravariance/"no"variance -- when a subclass redefines a +function, what types of input parameters can the redefinition accept? In +C++, you can't accept a different type without overloading the function. +With covariance (in Sather) you can allow the redefined function to accept +a parent class, which allows the new function to handle more subclasses +(including all the ones the old function handled). With contravariance +you can require the redefinition to be more specific, accepting fewer +classes. Aside from my obvious dislike of novariance, I'm not going to +take sides ;-). + +> Paul Prescod - ISOGEN Consulting Engineer speaking for only himself + +-- +-William "Billy" Tanksley +"But you shall not escape my iambics." + -- Gaius Valerius Catullus + + + + diff --git a/demo/ermis-f/python_m/cur/1587 b/demo/ermis-f/python_m/cur/1587 new file mode 100644 index 00000000..ca747a63 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1587 @@ -0,0 +1,27 @@ +From: duncan at rcp.co.uk (Duncan Booth) +Date: 27 Apr 1999 10:31:10 GMT +Subject: Python and "Hand held" computers +References: <37222AE6.E6C8F713@weihenstephan.org> <7g2l65$92k$1@minus.oleane.net> +Message-ID: <8DB575576duncanrcpcouk@news.rmplc.co.uk> +X-UID: 1587 + +Fred Pacquier wrote in +<7g2l65$92k$1 at minus.oleane.net>: + +>In article <37222AE6.E6C8F713 at weihenstephan.org>, +>peter.stoehr at weihenstephan.org wrote: +>Python 1.5.1 was ported last year +>to the Psion Series 5 by an Englishman, and it works quite well. I can +>find the Web site if you're interested... +> +Scotsman, please. + +-- +Duncan Booth duncan at dales.rmplc.co.uk +int month(char *p){return(124864/((p[0]+p[1]-p[2]&0x1f)+1)%12)["\5\x8\3" +"\6\7\xb\1\x9\xa\2\0\4"];} // Who said my code was obscure? +http://dales.rmplc.co.uk/Duncan + + + + diff --git a/demo/ermis-f/python_m/cur/1588 b/demo/ermis-f/python_m/cur/1588 new file mode 100644 index 00000000..e5a9c1a9 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1588 @@ -0,0 +1,78 @@ +From: fredrik at pythonware.com (Fredrik Lundh) +Date: Fri, 23 Apr 1999 07:17:32 GMT +Subject: >>> Down-Translation? <<< +References: <7fo16e$810$1@usenet49.supernews.com> +Message-ID: <00d601be8d5b$ccf76be0$f29b12c2@pythonware.com> +Content-Length: 1561 +X-UID: 1588 + +Nagwa Abdel-Mottaleb wrote: +> I am looking for a suitable language that will enable me to +> down-translate XML files into something like LaTeX files. +> Is it easy to use Python for this process? For example, +> how easy it is to write code segments that enable to +> translate +> +> foo +> +> in the xml input file into +> +> \begin{tag} +> foo +> \end{tag} +> +> and things like that in the tex output file? +> +> Any pointers and/or sample code will be appreciated. +> (Please e-mail me if possible.) + +Python comes with an XML parser: +http://www.python.org/doc/lib/module-xmllib.html + +here's some code to start with: + +--- + +import sys, xmllib + +class myParser(xmllib.XMLParser): + + _eoln = 1 + + def __init__(self, out): + xmllib.XMLParser.__init__(self) # initiate base class + self.write = out.write + # for special tags, initiate self.elements here: + # self.elements = { + # "mytag": (self.start_mytag, self.end_mytag) + # } + + def handle_data(self, data): + self.write(data) + self._eoln = (data[:-1] == "\n") + + def unknown_starttag(self, tag, attributes): + # default is to map tags to begin/end constructs + if not self._eoln: + self.write("\n") + self.write("begin{%s}\n" % tag) + self._eoln = 1 + + def unknown_endtag(self, tag): + if not self._eoln: + self.write("\n") + self.write("end{%s}\n" % tag) + self._eoln = 1 + +p = myParser(sys.stdout) +p.feed("text") +p.close() + +--- + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1589 b/demo/ermis-f/python_m/cur/1589 new file mode 100644 index 00000000..e53b74a1 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1589 @@ -0,0 +1,59 @@ +From: knotwell at my-dejanews.com (knotwell at my-dejanews.com) +Date: Fri, 16 Apr 1999 17:19:21 GMT +Subject: 1.5.2, threading and sockets +Message-ID: <7f7ref$5fg$1@nnrp1.dejanews.com> +Content-Length: 1675 +X-UID: 1589 + +Hello all-- + +I'm looking at the 1.5.2 version of python. I've noticed that +sockets and threads seem to work together much more slowly than in +1.5.1. + +I've done a good number of timings using the following snippet of +code (or something quite similar to rule out urllib as the problem): +import urllib +import threading +def traffic_gen(url): + for i in range(0,10): + z = urllib.URLopener() + s = z.open(url) + s.read() + s.close() + + print 'done' + return + +map(lambda x: x.start(), \ map(lambda x: +threading.Thread(target=traffic_gen,kwargs={'url':'http:// +www.myurl.here'}),range(0,5))) + +The problem is that this code was between 2-7 times (1.5.2) slower +in my tests (the range appears to depend on the number of threads +as well as network latency). The call order was also much more "jerky." + +It appeared to me that the socket/threading routines (standing alone) +were slightly faster in 1.5.2. I can only guess there is some kind +of a resource issue for threads using the socket module. + +I've only tried this on machines running Redhat5.2 (Linux2.0.36 +and Linux2.2.5) so I don't know if this a Redhat problem. + +The only thing I see that looks suspicious is the hocus-pocus with +gethostbyname (v. gethostbyname_r) in socketmodule.c. However, I +tried compiling with -DHAVE_GETHOSTYBNAME_R_6_ARG and +-DUSE_GETHOSTBYNAME_LOCK. Neither option made it any speedier or +smoother. +Does anyone have any idea what I should do about this? + +Thanks. + +--Brad + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/1590 b/demo/ermis-f/python_m/cur/1590 new file mode 100644 index 00000000..e09f3b27 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1590 @@ -0,0 +1,49 @@ +From: piers at cs.su.oz.au (Piers Lauder) +Date: Sun, 18 Apr 1999 01:03:45 GMT +Subject: Python-1.5.2 testing zlib +Message-ID: +Content-Length: 1263 +X-UID: 1590 + +My "make check" fails with a core dump after "test_zlib". +Runng that test by hand shows: + + : s Python-1.5.2 ; ./python Lib/test/test_zlib.py + 0xe5c1a120 0x43b6aa94 + 0xbd602f7 0xbd602f7 + expecting Bad compression level + expecting Invalid initialization option + expecting Invalid initialization option + normal compression/decompression succeeded + compress/decompression obj succeeded + decompress with init options succeeded + decompressobj with init options succeeded + Bus error - core dumped + +Adding a print at the start of the last loop: + : s Python-1.5.2 ; ./python Lib/test/test_zlib.py + 0xe5c1a120 0x43b6aa94 + 0xbd602f7 0xbd602f7 + expecting Bad compression level + expecting Invalid initialization option + expecting Invalid initialization option + normal compression/decompression succeeded + compress/decompression obj succeeded + decompress with init options succeeded + decompressobj with init options succeeded + Decompress: flush mode=0, level=0 + Memory fault - core dumped + +Anyone else seen this? + +(My system: + : s Python-1.5.2 ; uname -a + SunOS staff 5.6 Generic_105181-05 sun4u sparc SUNW,Ultra-2 + : s Python-1.5.2 ; ./python + Python 1.5.2 (#2, Apr 17 1999, 20:08:31) [GCC 2.8.1] on sunos5 + Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam +) + + + + diff --git a/demo/ermis-f/python_m/cur/1591 b/demo/ermis-f/python_m/cur/1591 new file mode 100644 index 00000000..eafd7ee4 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1591 @@ -0,0 +1,36 @@ +From: jkraai at murl.com (jkraai at murl.com) +Date: Wed, 28 Apr 1999 14:10:14 -0500 +Subject: Maximize Benefit when Purchasing Learning Python +Message-ID: <010701be91aa$d1267960$8b7125a6@cpda6686.mcit.com> +X-UID: 1591 + +I'll, eh, need valid street addresses for the both of you. + *heh heh* + +I just really like the whole Python experience. Thanks for +making my day! + +--jim + + +-----Original Message----- +From: David Ascher +Date: Wednesday, April 28, 1999 1:53 PM + + +>On Wed, 28 Apr 1999 jkraai at murl.com wrote: +> +>> How can I help whom when purchasing Python books? +> +>I'll dare to speak for Mark, and say that you should feel free to send +>either Mark or I (or both) checks for any amount whatsoever. Skip the +>middleman. Save trees -- don't buy the book, just send us cash. Don't +>hesitate for a minute. +> +>David Ascher + + + + + + diff --git a/demo/ermis-f/python_m/cur/1592 b/demo/ermis-f/python_m/cur/1592 new file mode 100644 index 00000000..1229963d --- /dev/null +++ b/demo/ermis-f/python_m/cur/1592 @@ -0,0 +1,79 @@ +From: doughellmann at mindspring.com (Doug Hellmann) +Date: Fri, 09 Apr 1999 07:29:25 -0400 +Subject: Q on Tkinter Scrollbar +References: <370CFAC8.32EB0B29@ingr.com> +Message-ID: <370DE495.E98111E3@mindspring.com> +Content-Length: 2155 +X-UID: 1592 + +Hi, Joseph, + +I can't give you any useful tips on the scrollbar, but if I was writing +this I think I would probably subclass the canvas to create a "meter" or +"thermometer" widget to do what you need. Create a rectangular canvas +(taller than wide), draw the scale (lines and text), then create an +indicator (a triangle?) to point the current value. + +In fact, if you're not against using Pmw, there is just such a beast in +the demos or contrib directory. Now that I think of it, you might find +some useful examples of the scrollbar elsewhere in the Pmw code. Take a +look http://www.dscpl.com.au/pmw/. + +Doug + +Joseph Robertson wrote: +> +> Hi everyone, +> +> I want to manually control the scrollbar in a tkinter app, i.e. I don't +> want to tie it to another widget as a child. Below is what I have so +> far. I can't figure how to make the 'thumb' stay at the returned +> position, or the point where the user drags it. Right now it always +> pops back to the top. +> +> I want it to behave like a Scale, but look like a scrollbar. Think of a +> virtual window on a dataset, where I don't want to load the contents of +> the data set into a listbox (not enough memory). +> +> Anyone do this before, know of any similar examples, or give me a clue +> where to look next. I don't want to use extensions or another GUI, it +> needs to be Tkinter. +> +> Thanks in advance, +> Joe Robertson +> jmrober1 at ingr.com +> +> >----begin code +> # a manual scrollbar +> # +> # Joe Robertson, jmrober1 at ingr.com +> # +> from Tkinter import * +> +> class Manual(Frame): +> +> def __init__(self, master, **kw): +> apply(Frame.__init__, (self, master), kw) +> vscrollbar = Scrollbar(self, orient=VERTICAL) +> self.canvas = Canvas(self) +> vscrollbar.config(command=self._vscroll) +> vscrollbar.pack(fill=Y, side=RIGHT) +> self.canvas.pack(expand=1, fill=BOTH, side=LEFT) +> +> def _vscroll(self, type, *arg): +> print type +> if type == 'moveto': +> for each in arg: +> print each +> +> # doit +> root = Tk() +> f = Manual(root) +> f.pack(expand=1, fill=BOTH) +> root.mainloop() +> +> >----end code + + + + diff --git a/demo/ermis-f/python_m/cur/1593 b/demo/ermis-f/python_m/cur/1593 new file mode 100644 index 00000000..fc17907d --- /dev/null +++ b/demo/ermis-f/python_m/cur/1593 @@ -0,0 +1,32 @@ +From: MHammond at skippinet.com.au (Mark Hammond) +Date: Fri, 9 Apr 1999 11:15:02 +1000 +Subject: COM Event Sinks and Connection Points in Python +References: <7eggfh$o0f$1@nnrp1.dejanews.com> <7egnl2$ca5$1@m2.c2.telstra-mm.net.au> <7eie3h$sr$1@newsin-1.starnet.net> +Message-ID: <7ejk9j$5tn$1@m2.c2.telstra-mm.net.au> +X-UID: 1593 + +Martin Bertolino wrote in message <7eie3h$sr$1 at newsin-1.starnet.net>... +>Some of COM features (especially when running in a Single Threaded +Apartment +>(STA)) depend on the application having an event loop. I have not looked at +>the sources for PythonWin, but I have looked at the Python ones, and I did +>not see any event loop servicing the event queue. This would explain why +you +>don't see the fired events. + +I have tried that - although without a window (note pythoncom exposes enough +to run a message loop - win32event an even better one :) + +Also tried running within Pythonwin (so it has a window), but not as a +control - still didnt work. Seemed to need some of the control container +plumbing to be in place. + +Dont think I tried all of the threading models tho... + +Mark. + + + + + + diff --git a/demo/ermis-f/python_m/cur/1594 b/demo/ermis-f/python_m/cur/1594 new file mode 100644 index 00000000..f017f262 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1594 @@ -0,0 +1,34 @@ +From: evan at tokenexchange.com (Evan Simpson) +Date: Fri, 23 Apr 1999 10:18:21 -0500 +Subject: Suggestion for alternative to map/filter functions +References: +Message-ID: +X-UID: 1594 + +Albert Hofkamp wrote: +> Hello all, + +Hi, Albert! + +> While reading the tutorial, I noticed that Python has map and filter +> functions. In our language we also had them, but they were replaced by +> another language construct. +> Unfortunately, I don't have time and experience enough to put this in +> python myself, but if people are interested in it, I can provide details. + +What language are we speaking of here? I'm sure somebody here would be +interested in a description of this mystery construct, if it's sufficiently +elegant. Sorry, I find your post amusingly cryptic. + +It should be mentioned that map and filter (and especially their buddy +lambda) are lonely immigrants from the land of functional programming, and +are regarded with suspicion by many of the natives. + +a-construct-proposed-by-Fermat-in-the-margin?-ly y'rs +Evan + + + + + + diff --git a/demo/ermis-f/python_m/cur/1595 b/demo/ermis-f/python_m/cur/1595 new file mode 100644 index 00000000..de6c0a02 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1595 @@ -0,0 +1,17 @@ +From: Webmaster at cybersystems2000.com (Webmaster at cybersystems2000.com) +Date: Tue, 27 Apr 1999 23:49:49 GMT +Subject: Msg for Moderator/Flamers +Message-ID: +X-UID: 1595 + +I am a small business owner just trying to make a buck. I have attempted to filter out +moderated news groups in an attempt to isolate only newsgroups that may not mind my +unobtrusive, and occasional advertisement for http://cybersystems2000.com posted here. +I sell a how to help style book. If I have been mis-informed and this is in fact a +moderated news group, or you frequent this site and are offended by my request for +visitors, PLEASE respond kindly to mailto:unsubscribe at cybersystems2000.com +I will in turn immediately remove this news group from any further postings. + + + + diff --git a/demo/ermis-f/python_m/cur/1596 b/demo/ermis-f/python_m/cur/1596 new file mode 100644 index 00000000..fcb1fa5b --- /dev/null +++ b/demo/ermis-f/python_m/cur/1596 @@ -0,0 +1,12 @@ +From: hew at hons.cs.usyd.edu.au (Matthew Robert Gallagher) +Date: Sat, 17 Apr 1999 13:46:53 +1000 +Subject: Sleeping threads +Message-ID: <3718042D.EE5D36A8@hons.cs.usyd.edu.au> +X-UID: 1596 + +I've been looking at threads and time but how do you sleep threads + + + + + diff --git a/demo/ermis-f/python_m/cur/1597 b/demo/ermis-f/python_m/cur/1597 new file mode 100644 index 00000000..972e777c --- /dev/null +++ b/demo/ermis-f/python_m/cur/1597 @@ -0,0 +1,31 @@ +From: justin at linus.mitre.org (Justin Sheehy) +Date: 15 Apr 1999 14:54:53 -0400 +Subject: Different methods with same name but different signature? +References: <3716909C.D8D1B372@fedex.com> +Message-ID: +X-UID: 1597 + +frederic pinel writes: + +> My class needs to have 2 (or more) different methods, but with the same +> name, the difference being the signature (an object in my case), + +Since you don't need to specify argument types in Python function +definitions, what you describe is not reasonably possible. Python +functions do not have signatures in the way that a C++ programmer +means that term. In any case, I'd be willing to bet that you don't +really need to have multiple functions with one name. + +You can simply make one function of that name, and have it branch or +otherwise act appropriately based on the argument types. Not only is +this nicer than the C++ way, it will probably be easier for someone +else to understand when they read your code. + +I'll take Python's flavor of polymorphism over C++'s any day. No contest. + +-Justin + + + + + diff --git a/demo/ermis-f/python_m/cur/1598 b/demo/ermis-f/python_m/cur/1598 new file mode 100644 index 00000000..01e31f78 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1598 @@ -0,0 +1,30 @@ +From: faassen at pop.vet.uu.nl (Martijn Faassen) +Date: Thu, 22 Apr 1999 22:57:22 +0200 +Subject: What is it ? How can I learn it ? Where should I start ? Wha +References: <371F7DB9.E7E48A82@callware.com> <1287305973-36728049@hypernet.com> +Message-ID: <371F8D32.20535332@pop.vet.uu.nl> +X-UID: 1598 + +Gordon McMillan wrote: +> +> Ivan remembers... +> +> > ... and most of the real +> > cannibals have been muzzled (Gordon excepted, so don't put any parts +> > of you through his cage bars that you want to keep). ... +> +> and then forgets that I'm not poikilothermophagic... + +Another problem of Python is that it can be affected by evil alien white +space eating nanoviruses. Anyway, the Python newsgroup has the right +balance between civilized mature debate and complete whimsical fun. I +supply the complete whimsicalness, others supply the maturity and fun. +:) + +Regards, + +Martijn + + + + diff --git a/demo/ermis-f/python_m/cur/1599 b/demo/ermis-f/python_m/cur/1599 new file mode 100644 index 00000000..ba0301a5 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1599 @@ -0,0 +1,33 @@ +From: nickb at earth.ox.ac.uk (Nick Belshaw) +Date: Fri, 23 Apr 1999 18:54:01 +0100 +Subject: Style/efficiency question using 'in' +Message-ID: <3720B3B9.98BED320@earth.ox.ac.uk> +X-UID: 1599 + +If someone could spare a mo to clarify - + +If I do something like :- + +------------------ +def func1(): + return 1,2,3,4,5,6,7,8 + +for x in func1(): + print x +------------------ + +it works as expected but is the use of a function in a loop undesirable? +Is the function called once to build the loop or is it called each loop +increment and therefore undesirable if there is much overhead? + +greatful for any comments + +cheers +Nick/Oxford + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1600 b/demo/ermis-f/python_m/cur/1600 new file mode 100644 index 00000000..86f6829e --- /dev/null +++ b/demo/ermis-f/python_m/cur/1600 @@ -0,0 +1,46 @@ +From: f.geiger at vol.at (Franz GEIGER) +Date: Sat, 24 Apr 1999 15:36:23 +0200 +Subject: PythonCE +Message-ID: <7fshcn$68n$1@pollux.ip-plus.net> +Content-Length: 2022 +X-UID: 1600 + +Spam detection software, running on the system "albatross.python.org", has +identified this incoming email as possible spam. The original message +has been attached to this so you can view it (if it isn't spam) or label +similar future email. If you have any questions, see +the administrator of that system for details. + +Content preview: Is there a chance to have Tkinter someday on a CE machine. + Or is it too mem consuming and impossible therefore? Regards Franz GEIGER + Jeff Bauer wrote in message <3721380C.C545A15 at rubic.com>... >Rich Holm wrote: + >> Does anyone know the status of PythonCE? I would like to get >> an updated + copy, 1.5.2? Also, where is the source? I wouldn't >> mind recompiling and + extending it. > >Brian Lloyd's original PythonCE port: > > http://www.digicool.com/~brian/PythonCE/ + > >Mark Hammond has extended it: > > http://starship.python.net/crew/mhammond/ce/ + > >PythonCE is stable, even useful for certain tasks, >especially http/ftp + communication with your handheld. >The only drawback (IMO) is that a GUI + application >will require you to write directly to the Win32/CE >API. Mark + provides an excellent example of how >to do this -- he includes a shell written + completely >in Python. > >Best regards, > >Jeff Bauer >Rubicon, Inc. [...] + + +Content analysis details: (5.6 points, 5.0 required) + + pts rule name description +---- ---------------------- -------------------------------------------------- + 2.0 FH_DATE_IS_19XX The date is not 19xx. + 3.6 TVD_SPACED_SUBJECT_WORD3 TVD_SPACED_SUBJECT_WORD3 +-0.0 NO_RELAYS Informational: message was not relayed via SMTP +-0.0 NO_RECEIVED Informational: message has no Received headers + + +-------------- next part -------------- +An embedded message was scrubbed... +From: "Franz GEIGER" +Subject: Re: PythonCE +Date: Sat, 24 Apr 1999 15:36:23 +0200 +Size: 1895 +URL: + + diff --git a/demo/ermis-f/python_m/cur/1601 b/demo/ermis-f/python_m/cur/1601 new file mode 100644 index 00000000..3aaa1aef --- /dev/null +++ b/demo/ermis-f/python_m/cur/1601 @@ -0,0 +1,42 @@ +From: jeremy at cnri.reston.va.us (Jeremy Hylton) +Date: Tue, 13 Apr 1999 22:04:41 GMT +Subject: bug in PyGreSQL module +In-Reply-To: +References: <14099.24295.229214.504295@bitdiddle.cnri.reston.va.us> + +Message-ID: <14099.48588.851795.102448@bitdiddle.cnri.reston.va.us> +Content-Length: 1302 +X-UID: 1601 + +I'm using PyGreSQL 2.3, Postgres 6.4.2, and Python 1.5.2b2 on RedHat +Linux 5.2. (That's a lot of version numbers!) + +Here's an example of the error. I've extracted the three rows from a +table (and gotten ride of the date because it's too wide). As you +can see, in the first two rows the min, average, and max fields are +empty. + +source|source_addr|dest|dest_addr|when|size|sent|recv|min|average|max +------+-----------+----+---------+----+----+----+----+---+-------+--- + 19| 41| 6| 6|XXXX| 100| 10| 0| | | + 19| 41| 6| 6|XXXX|1000| 10| 0| | | + 19| 41| 6| 6|XXXX| 100| 10| 4|120| 184|245 + +If I perform the query in Python and then call the getresult method, I +get back the following list: + +[(19, 41, 6, 6, 'Tue Apr 13 00:46:05 1999 EDT', 100, 10, 0, 0, 0, 0), +(19, 41, 6, 6, 'Tue Apr 13 00:45:14 1999 EDT', 1000, 10, 0, 0, 0, 0), +(19, 41, 6, 6, 'Tue Apr 13 00:16:05 1999 EDT', 100, 10, 4, 120, 184, 245)] + +The nulls have been converted to 0. This seems straightforward given +the C code in getresult. If the field is an integer, the libpq value +is always handed off to PyInt_FromLong. I would think that there +should be an explicit check for NULLs in pg_getresult that converts +them to None. + +Jeremy + + + + diff --git a/demo/ermis-f/python_m/cur/1602 b/demo/ermis-f/python_m/cur/1602 new file mode 100644 index 00000000..28669032 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1602 @@ -0,0 +1,34 @@ +From: evan at tokenexchange.com (Evan Simpson) +Date: Thu, 22 Apr 1999 12:52:51 -0500 +Subject: Pointers to variables +References: <19990422121403.A279051@vislab.epa.gov> +Message-ID: <8lJT2.17$eD1.14436@news.corridex.com> +X-UID: 1602 + +Randall Hopper wrote in message <19990422121403.A279051 at vislab.epa.gov>... +[snip] +> How can I cause a reference to the variables to be stored in the tuples +instead of their values? + +You can't, or at least not directly. What you *can* do, in the case you +provided, is something like this: + +for ( attrname, k ) in [( 'min', 'min_units' ), ( 'max', 'max_units' )]: + if cnf.has_key( k ): + setattr(self, attrname, cnf[ str ]) + del cnf[ str ] + +Python simply doesn't *have* variables in the sense you're thinking of, with +the exception of function-local variables. Instead it has namespaces, such +as modules, classes, and instances. These can be usefully be thought of as +dictionaries with efficient string-only keys, and can be manipulated as such +using getattr, setattr, delattr, etc. + +Function-local-variables-are-a-whole-nother-alien-world-ly yrs, +Evan Simpson + + + + + + diff --git a/demo/ermis-f/python_m/cur/1603 b/demo/ermis-f/python_m/cur/1603 new file mode 100644 index 00000000..e166e920 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1603 @@ -0,0 +1,109 @@ +From: markus_kohler at hp.com (Markus Kohler) +Date: 29 Apr 1999 10:35:50 +0200 +Subject: Python IS slow ! [was] Re: Python too slow for real world +References: <613145F79272D211914B0020AFF6401914DAD8@gandalf.digicool.com> <372769B0.3CE8C0F3@prescod.net> +Message-ID: +Content-Length: 4434 +X-UID: 1603 + +>>>>> "William" == William Tanksley writes: + + William> On Wed, 28 Apr 1999 20:04:00 GMT, Paul Prescod wrote: + >> William Tanksley wrote: + + >>> And Oberon (SlimBinaries), and Eiffel (typing and general + >>> compile-time error catching), and ... + + >> Actually, isn't Eiffel's type system famous for being full of + >> holes? + + William> I'm familiar with the covariance/contravariance argument, + William> but I've never before heard anyone say anything about + William> Eiffel being full of holes. What problems have you heard + William> of? + +As far as I remember Eiffel requires a global system analysis to be type +safe at compile time. + + >> Regardless, wouldn't a better source of inspiration on typing + >> be a language with *optional* compile-time error checking? + + William> Good question. I don't know the answer, but I can point + William> out the dangers of not planning our path. + + William> One dangerous side of allowing flexibility is that we + William> could be like C++, where the safe way of doing anything + William> requires more typing and often causes incompatibilities. + William> Examples range from virtual functions; through inline + William> functions, templates, single-root object hierarchy, and + William> garbage collection; to covariance/contravariance. + + William> The other dangerous side, of course, is being one of the + William> languages which are so safe you can't use them without a + William> huge manual and pages of UML. Python can NOT wind up + William> like this, regardless of the dangers obvious in the other + William> side. + +Agreed. The main problem with todays statically typed languages is that +they are too restrictive and to complicated. + + William> Let me expand a little on the dangers of C++. + + William> - virtual functions. It shouldn't be my job to tell the + William> compiler when virtual lookups are the only thing to do; + William> the compiler ought to be able to tell. For performance + William> gurus, a way to hint to the compiler that virtual lookups + William> were _not_ needed might be useful -- but what if the + William> programmer was wrong? + +True, SmallEiffel inlines most of the virtual function calls automatically. +This is the way to go. + + William> - inline functions. Again, a good compiler HAS to make + William> this decision for itself, and in a good compiler, whether + William> or not this decision was made should be transparent to + William> the programmer. + +Agreed. + + William> - templates. Generic functions are a very good thing, + William> and with Python 2's type support we might wind up needing + William> them. In C++, templates are also a very good thing, but + William> thanks to the C model of seperate compilation, no two C++ + William> compilers handle templates compatibly. + +The C/C++ compilation model is outdated. Python should *never* adapt that. + + William> - single-root object hierarchy -- this is a must when the + William> default binding is virtual. + + William> - GC -- hard to add after the fact. No worry with + William> Python, but what if there are other issues like it? + +I'm not sure if I understand this sentence. Do you mean GC is hard to add +to python without breaking existing code ? +I would agree with that. And why do you say "no worry" +Do you mean GC is not worth the effort ? + + William> - covariance/contravariance/"no"variance -- when a + William> subclass redefines a function, what types of input + William> parameters can the redefinition accept? In C++, you + William> can't accept a different type without overloading the + William> function. With covariance (in Sather) you can allow the + William> redefined function to accept a parent class, which allows + William> the new function to handle more subclasses (including all + William> the ones the old function handled). With contravariance + William> you can require the redefinition to be more specific, + William> accepting fewer classes. Aside from my obvious dislike + William> of novariance, I'm not going to take sides ;-). + + You may have a look at Strongtalk a Smalltalk with static (optional) type checking. + Sorry no links, but if a www search does not work I can sent you a document about it. + + Markus +-- +Markus Kohler mailto:markus_kohler at hp.com + + + + diff --git a/demo/ermis-f/python_m/cur/1604 b/demo/ermis-f/python_m/cur/1604 new file mode 100644 index 00000000..c4e11cad --- /dev/null +++ b/demo/ermis-f/python_m/cur/1604 @@ -0,0 +1,11 @@ +From: sandsmark at iname.com (Even) +Date: Mon, 26 Apr 1999 00:30:17 GMT +Subject: unsubscribe +Message-ID: <3723B399.2494EA2E@iname.com> +X-UID: 1604 + +unsubscribe + + + + diff --git a/demo/ermis-f/python_m/cur/1605 b/demo/ermis-f/python_m/cur/1605 new file mode 100644 index 00000000..43e1611c --- /dev/null +++ b/demo/ermis-f/python_m/cur/1605 @@ -0,0 +1,152 @@ +From: jmrober1 at ingr.com (Joseph Robertson) +Date: Fri, 23 Apr 1999 08:32:53 -0500 +Subject: Python too slow for real world +References: <372068E6.16A4A90@icrf.icnet.uk> +Message-ID: <37207685.F29BE1AB@ingr.com> +Content-Length: 4202 +X-UID: 1605 + +Hi, + +For what you state here, you don't even really need to read the 'data' at +all. +Just read your descriptors, and store the offsets and len of the data in a +dictionary (i.e. index it). + +readline +if first char == > + get id + get current position using seek method + store id, pos in dict + #for each id, we now have its byte posisition in the file + +Then have a filter method which keeps or discards the records by criteria. + +for each key in dict + if key passes filter test + store key in filtered dict + +Then only at the time you really need that data do you go get it. +for each in filtered_dict + use seek to position + read data until next line with > at 0 + +This way you can create views on your data without actually trying to load it +all. The tradeoff of course is memory for fileaccess time, but I found +fileaccess to be faster than doing all the work 'up front'. Besides my +project reached the point where we ran out of memory often, some datasets are +on 8+ cdroms! + +Hope that was relevant, but maybe I misunderstood the question. +Joe Robertson, +jmrobert at ro.com + + + + +Arne Mueller wrote: + +> Hi All, +> +> first off all: Sorry for that slightly provoking subject ;-) ... +> +> I just switched from perl to python because I think python makes live +> easyer in bigger software projects. However I found out that perl is +> more then 10 times faster then python in solving the following probelm: +> +> I've got a file (130 MB) with ~ 300000 datasets of the form: +> +> >px0034 hypothetical protein or whatever description +> LSADQISTVQASFDKVKGDPVGILYAVFKADPSIMAKFTQFAGKDLESIKGTAPFETHAN +> RIVGFFSKIIGELPNIEADVNTFVASHKPRGVTHDQLNNFRAGFVSYMKAHTDFAGAEAA +> WGATLDTFFGMIFSKM +> +> The word floowing the '>' is an identifier, the uppercase letters in the +> lines following the identifier are the data. Now I want to read and +> write the contens of that file excluding some entries (given by a +> dictionary with identifiers, e.g. 'px0034'). +> +> The following python code does the job: +> +> from re import * +> from sys import * +> +> def read_write(i, o, exclude): +> name = compile('^>(\S+)') # regex to fetch the identifier +> l = i.readline() +> while l: +> if l[0] == '>': # are we in new dataset? +> m = name.search(l) +> if m and exclude.has_key(m.group(1)): # excluding current +> dataset? +> l = i.readline() +> while l and l[0] != '>': # skip this dataset +> l = i.readline() +> pass +> o.write(l) +> l = i.readline() +> +> f = open('my_very_big_data_file','r') # datafile with ~300000 records +> read_write(f, stdout, {}) # for a simple test I don't exclude anything! +> +> It took 503.90 sec on a SGI Power Challange (R10000 CPU). An appropiate +> perl script does the same job in 32 sec (Same method, same loop +> structure)! +> +> Since I've to call this routine about 1500 times it's a very big +> difference in time and not realy accaptable. +> +> I'd realy like to know why python is so slow (or perl is so fast?) and +> what I can do to improove speed of that routine. +> +> I don't want to switch back to perl - but honestly, is python the right +> language to process souch huge amount of data? +> +> If you want to generate a test set you could use the following lines to +> print 10000 datasets to stdout: +> +> for i in xrange(1, 10001): +> print +> '>px%05d\nLSADQISTVQASFDKVKGDPVGILYAVFKADPSIMAKFTQFAGKDLESIKGTAPFETHAN\n\ +> RIVGFFSKIIGELPNIEADVNTFVASHKPRGVTHDQLNNFRAGFVSYMKAHTDFAGAEAA\n\ +> WGATLDTFFGMIFSKM\n' % i +> +> And if you don't believe me that perl does the job quicker you can try +> the perl code below: +> +> #!/usr/local/bin/perl -w +> open(IN,"test.dat"); +> my %ex = (); +> read_write(%ex); +> +> sub read_write{ +> +> $l = ; +> OUTER: while( defined $l ){ +> if( (($x) = $l =~ /^>(\S+)/) ){ +> if( exists $ex{$x} ){ +> $l = ; +> while( defined $l && !($l =~ /^>(\S+)/) ){ +> $l = ; +> } +> next OUTER; +> } +> } +> print $l; +> $l = ; +> } +> } +> +> Please do convince me being a python programmer does not mean being slow +> ;-) +> +> Thanks very much for any help, +> +> Arne + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1606 b/demo/ermis-f/python_m/cur/1606 new file mode 100644 index 00000000..12999f3f --- /dev/null +++ b/demo/ermis-f/python_m/cur/1606 @@ -0,0 +1,44 @@ +From: tim_one at email.msn.com (Tim Peters) +Date: Sun, 25 Apr 1999 15:00:03 -0400 +Subject: possible bug in 1.5.1 +In-Reply-To: <37234712.2E95BC37@stat.ubc.ca> +Message-ID: <000401be8f4d$d3ac70e0$d39e2299@tim> +X-UID: 1606 + +[Tim] +> ... +> What you can do is save away the attached as (e.g.) ieee.py, then +> in your code do +> +> from ieee import PINF # positive infinity, if it exists + +Oops -- the attachment got lost due to a rounding error . Here: + +def _make_inf(): + x = 2.0 + x2 = x * x + i = 0 + while i < 100 and x != x2: + x = x2 + x2 = x * x + i = i + 1 + if x != x2: + raise ValueError("This machine's floats go on forever!") + return x + +PINF = _make_inf() +MINF = -PINF +NAN = PINF - PINF +if 1.0 + NAN == 1.0: + raise ValueError("This machine doesn't have NaNs, " + "'overflows' to a finite number, " + "or is 754-conformant but is using " + "a goofy rounding mode.") +PZERO = 0.0 +MZERO = -PZERO + + + + + + diff --git a/demo/ermis-f/python_m/cur/1607 b/demo/ermis-f/python_m/cur/1607 new file mode 100644 index 00000000..e3839c1f --- /dev/null +++ b/demo/ermis-f/python_m/cur/1607 @@ -0,0 +1,54 @@ +From: akuchlin at cnri.reston.va.us (Andrew M. Kuchling) +Date: Mon, 26 Apr 1999 11:11:14 -0400 (EDT) +Subject: Python too slow for real world +In-Reply-To: +References: <372068E6.16A4A90@icrf.icnet.uk> + <3720A21B.9C62DDB9@icrf.icnet.uk> + <3720C4DB.7FCF2AE@appliedbiometrics.com> + <3720C6EE.33CA6494@appliedbiometrics.com> + + + + +Message-ID: <14116.27076.739392.393714@amarok.cnri.reston.va.us> +Content-Length: 1588 +X-UID: 1607 + +Moshe Zadka writes: +>2. re.py is a (very thin) wrapper around pcre, a C extension module for +>Perl Compatible Regular Expressions. +> +>Which just goes to say that while pcre can certainly be optimized, it +>can't be done by simply rewriting it in C. + + Things like search-and-replace, though, take substantial hits +from being implemented in Python code; rewriting re.py in C is one of +the top items on my TODO list for the regex code. + + I also want some sort of code generation interface so that +custom syntaxes can be implemented. The problem there is how to do it +safely so that it's not possible to crash the interpreter by +generating buggy expressions. (We'd want the re module usable by code +in a restricted execution environment, after all.) + +>but-we-can-always-call-Perl-on-the-fly-to-evaluate-regular-expression-ly +>y'rs, + +In one early experiment, there was a version of the regex module that +used Perl's pregcomp() and pregexec() functions. It worked fine in +some admittedly limited testing, but the compiled module was something +like 500K because the regex code pulled in the rest of Perl. I +couldn't figure out how to extract the regex code to fix this, so that +experiment came to a quick end. Pity, really. + +-- +A.M. Kuchling http://starship.python.net/crew/amk/ +You see, you're all wrong. My name isn't Brain Eater. I am the Head. And I +don't simply eat brains. It's something deeper than that. Something magical. +Something transubstantiational. Excuse me one moment while I ... + -- The first villain, in ENIGMA #1: "The Lizard, The Head, The Enigma" + + + + + diff --git a/demo/ermis-f/python_m/cur/1608 b/demo/ermis-f/python_m/cur/1608 new file mode 100644 index 00000000..4affa445 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1608 @@ -0,0 +1,39 @@ +From: SSTirlin at holnam.com (Scott Stirling) +Date: Wed, 28 Apr 1999 12:49:55 -0400 +Subject: HTML "sanitizer" in Python +Message-ID: +Content-Length: 3052 +X-UID: 1608 + +Hi, + +I am new to Python. I have an idea of a work-related project I want to do, and I was hoping some folks on this list might be able to help me realize it. I have Mark Lutz' _Programming Python_ book, and that has been a helpful orientation. I like his basic packer and unpacker scripts, but what I want to do is something in between that basic program and its later, more complex manifestations. + +I am on a Y2K project with 14 manufacturing plants, each of which has an inventory of plant process components that need to be tested and/or replaced. I want to put each plant's current inventory on the corporate intranet on a weekly or biweekly basis. All the plant data is in an Access database. We are querying the data we need and importing into 14 MS Excel 97 spreadsheets. Then we are saving the Excel sheets as HTML. The HTML files bloat out with a near 100% increase in file size over the original Excel files. This is because the HTML converter in Excel adds all kinds of unnecessary HTML code, such as for every single cell in the table. Many of these tables have over 1000 cells, and this code, along with its accompanying closing FONT tag, add up quick. The other main, unnecessary code is the ALIGN="left" attribute in

tags (the default alignment _is_ left). The unnecessary tags are consistent and easy to identify, and a routine should be writable that will automate the removal of them. + +I created a Macro in Visual SlickEdit that automatically opens all these HTML files, finds and deletes all the tags that can be deleted, saves the changes and closes them. I originally wanted to do this in Python, and I would still like to know how, but time constraints prevented it at the time. Now I want to work on how to create a Python program that will do this. Can anyone help? Has anyone written anything like this in Python already that they can point me too? I would really appreciate it. + +Again, the main flow of the program is: + +>> Open 14 HTML files, all in the same folder and all with the .html extension. +>> Find certain character strings and delete them from the files. In one case (the tags) it is easier to find the whole tag with attributes and then _replace_ the original tag with a plain . +>> Save the files. +>> Close the files. +>> Exit the program. + +More advanced options would be the ability for the user to set parameters for the program upon running it, to keep from hard-coding the find and replace parms. + +OK, thanks to any help you can provide. I partly was turned on to Python by Eric Raymond's article, "How to Become a Hacker" (featured on /.). I use Linux at home, but this program would be for use on a Windows 95 platform at work, if that makes any difference. I do have the latest Python interpreter and editor for Windows here at work. + +Yours truly, +Scott + +Scott M. Stirling +Visit the HOLNAM Year 2000 Web Site: http://web/y2k +Keane - Holnam Year 2000 Project +Office: 734/529-2411 ext. 2327 fax: 734/529-5066 email: sstirlin at holnam.com + + + + + diff --git a/demo/ermis-f/python_m/cur/1609 b/demo/ermis-f/python_m/cur/1609 new file mode 100644 index 00000000..51e4ca08 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1609 @@ -0,0 +1,87 @@ +From: mark at chem.uwa.edu.au (Mark C Favas) +Date: 28 Apr 99 04:42:36 GMT +Subject: FP exception, core dump in Python 1.5.2 (Tim's doing ) +Message-ID: +Content-Length: 2561 +X-UID: 1609 + +[Tim Peters suggests some code to generate INFs and NANs] + +>def _make_inf(): +> x = 2.0 +> x2 = x * x +> i = 0 +> while i < 100 and x != x2: +> x = x2 +> x2 = x * x +> i = i + 1 +> if x != x2: +> raise ValueError("This machine's floats go on forever!") +> return x + +>PINF = _make_inf() +>MINF = -PINF +>NAN = PINF - PINF +>if 1.0 + NAN == 1.0: +> raise ValueError("This machine doesn't have NaNs, " +> "'overflows' to a finite number, " +> "or is 754-conformant but is using " +> "a goofy rounding mode.") +>PZERO = 0.0 +>MZERO = -PZERO + +[Mark tries it, and...] + +On my platform, (DEC Alpha, Digital Unix 4.0D, Python 1.5.2) I get... a core +dump! (exclamation because it's one of the few Python core dumps I've seen). + +[code modified to print i, x, x2] + +python ieee.py +0 2.0 4.0 +1 4.0 16.0 +2 16.0 256.0 +3 256.0 65536.0 +4 65536.0 4294967296.0 +5 4294967296.0 1.84467440737e+19 +6 1.84467440737e+19 3.40282366921e+38 +7 3.40282366921e+38 1.15792089237e+77 +8 1.15792089237e+77 1.34078079299e+154 +Floating exception (core dumped) + +Python 1.5.2 (#1, Apr 17 1999, 05:27:57) [C] on osf1V4 +Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam +>>> + +dbx /usr/local/bin/python core +dbx version 3.11.10 +Type 'help' for help. +Core file created by program "python" + +thread 0x5 signal Floating point exception at >*[nxm_thread_kill, 0x3ff8058a608] ret r31, (r26), 1 +(dbx) where +> 0 nxm_thread_kill(0x140081940, 0x0, 0x1400b13c0, 0x0, 0x3ff00000000) [0x3ff8058a608] + 1 pthread_kill(0x0, 0x0, 0x11fffef20, 0x3ffc018a888, 0x3ff00000000) [0x3ff80577998] + 2 (unknown)() [0x3ff8056c234] + 3 (unknown)() [0x3ff807b22d8] + 4 (unknown)() [0x3ff807b3824] + 5 exc_unwind(0x3ff800d4544, 0x11fffdfe0, 0xabadabad00beed00, 0x1400b13c0, 0x3ff807b3af4) [0x3ff807b3864] + 6 exc_raise_signal_exception(0x86, 0x0, 0x12005b218, 0x1, 0x8) [0x3ff807b3af0] + 7 (unknown)() [0x3ff80578cc8] + 8 PyFloat_FromDouble(0x0, 0x0, 0x12006f404, 0x14005c770, 0x1200533cc) [0x12005b214] + 9 PyNumber_Multiply(0x1400b2988, 0x1400b13c0, 0x1400b13c0, 0x0, 0x3) [0x12006f400] +(dbx) + + + + +-- +Email - mark at chem.uwa.edu.au ,-_|\ Mark C Favas +Phone - +61 9 380 3482 / \ Department of Chemistry +Fax - +61 9 380 1005 ---> *_,-._/ The University of Western Australia + v Nedlands +Loc - 31.97 S, 115.81 E Western Australia 6009 + + + + diff --git a/demo/ermis-f/python_m/cur/1610 b/demo/ermis-f/python_m/cur/1610 new file mode 100644 index 00000000..1c081a31 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1610 @@ -0,0 +1,30 @@ +From: email at domain.com (SH) +Date: Mon, 05 Apr 1999 04:39:21 GMT +Subject: help +References: <7e1fr0$6cio$1@titan.xtra.co.nz> +Message-ID: +X-UID: 1610 + +In article , bwinton at iname.com wrote: + +> On Fri, 2 Apr 1999 15:58:52 +1200, nfbb wrote: +> >Hi there - I'm running Windows 98 and was wondering what the best program +> >for writing python Source code is under this operating system? +> +> I like vim, but I come from a Unix background, and if you don't already +> know vim, you'ld probably be better starting off with something else. +> +> IDLE (Guido's IDE) is also up on my favourites list. +> +> Later, +> Blake. + +Where do you find the latest IDLE? +Searches on the web are not helpful, and on the Python.org site the search +points to the CVS directories? + +thanks + + + + diff --git a/demo/ermis-f/python_m/cur/1611 b/demo/ermis-f/python_m/cur/1611 new file mode 100644 index 00000000..f9c8e9dd --- /dev/null +++ b/demo/ermis-f/python_m/cur/1611 @@ -0,0 +1,47 @@ +From: ivanlan at callware.com (Ivan Van Laningham) +Date: Tue, 27 Apr 1999 21:42:29 GMT +Subject: Long integers getting short shrift? +References: <14118.9093.292465.438475@buffalo.fnal.gov> +Message-ID: <37262F45.2473F5A5@callware.com> +Content-Length: 1323 +X-UID: 1611 + +Hi All-- + +Charles G Waldman wrote: +> +> The functions Py_BuildValue and PyArg_ParseTuple don't seem to be +> listed in the index of the Python/C API documentation. They are only +> described in the Embedding and Extending docs. +> +> The "L" format code for Long integers is not described anywhere, +> AFAICT. I discovered it by reading source. +> +> It seems that if you are on a system without the "long long" type then +> the "L" format char is not available. + +???? I have Python running on my UnixWare system at home, and the long +types are easily accessible. Python's been running on it since 1.3, and +UnixWare has no long long type. Long doubles, but no long long. (By +the way, the UnixWare system is going to die on 10 May, when Redhat 6.0 +with 2.2 kernel and SMP out of the box appears in the stores.) + +Now, possibly this is a difference between the running interpreter and +the functions available for building extensions, but if so, why the +difference? + +-ly y'rs, +Ivan +---------------------------------------------- +Ivan Van Laningham +Callware Technologies, Inc. +ivanlan at callware.com +http://www.pauahtun.org +See also: +http://www.foretec.com/python/workshops/1998-11/proceedings.html +Army Signal Corps: Cu Chi, Class of '70 +---------------------------------------------- + + + + diff --git a/demo/ermis-f/python_m/cur/1612 b/demo/ermis-f/python_m/cur/1612 new file mode 100644 index 00000000..ff76dace --- /dev/null +++ b/demo/ermis-f/python_m/cur/1612 @@ -0,0 +1,31 @@ +From: fredrik at pythonware.com (Fredrik Lundh) +Date: Tue, 13 Apr 1999 15:58:41 GMT +Subject: Help: Tkinter, bad event type +References: <37134F3B.8C583E0@btk.utu.fi> +Message-ID: <002b01be85c6$8d62bdf0$f29b12c2@pythonware.com> +X-UID: 1612 + +M?rten Hedman wrote: +> I'm running Python 1.5.2c1 under Win NT with SP4 and Tcl/Tk 8.05. When I +> try to run any script that uses Tkinter, even hello.py from the Tkinter +> Life Preserver, I get two identical error messages: +> +> bad event type or keysym "MouseWheel" +> while executing "bind Listbox ..." invoked from +> /listbox.tcl +> ... +> invoked from /tk.tcl +> +> I can work around this by editing listbox.tcl and commenting out the +> "bind Listbox ..." statement, but I have to do this every +> time I install a new version of Tcl/Tk, and it's annoying. + +looks like you pick up the wrong Tcl/Tk DLL's when running +Python. better double-check your installation. + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1613 b/demo/ermis-f/python_m/cur/1613 new file mode 100644 index 00000000..d6d55265 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1613 @@ -0,0 +1,23 @@ +From: bwarsaw at cnri.reston.va.us (Barry A. Warsaw) +Date: Thu, 29 Apr 1999 18:24:44 -0400 (EDT) +Subject: Emacs' python-mode buggy? +References: <7g8np4$kvf@chronicle.concentric.net> + <000901be9203$b4c32e40$199e2299@tim> + <14120.31856.181562.574382@anthem.cnri.reston.va.us> + +Message-ID: <14120.56364.428261.2514@anthem.cnri.reston.va.us> +X-UID: 1613 + +For some reason you're still using hilite to do your syntax coloring. +You should trash hilite immediately and start using font-lock, which +is standard in Emacs and XEmacs now. + +Unfortunately I can't help you much with the transition. I don't use +Emacs and I never used hilite (XEmacs never had it). Check on +comp.emacs or gnu.emacs.help for details. + +-Barry + + + + diff --git a/demo/ermis-f/python_m/cur/1614 b/demo/ermis-f/python_m/cur/1614 new file mode 100644 index 00000000..97edac6f --- /dev/null +++ b/demo/ermis-f/python_m/cur/1614 @@ -0,0 +1,70 @@ +From: markus_kohler at hp.com (Markus Kohler) +Date: 30 Apr 1999 09:31:51 +0200 +Subject: Python IS slow ! [was] Re: Python too slow for real world +References: <613145F79272D211914B0020AFF6401914DAD8@gandalf.digicool.com> +Message-ID: +Content-Length: 1619 +X-UID: 1614 + +>>>>> "Mitchell" == Mitchell Morris writes: + +[deletia] + + Mitchell> If it's not too much trouble, could you post your + Mitchell> benchmark code and results, either here or on a web + Mitchell> page? + + Of course I only did useless microbenchmarks ;-) + +One was : +# benchmark in Python +# see +# Keith Waclena + +def tak (x, y, z): + if not(y < x): + return z + else: + return tak(tak(x-1, y, z), tak(y-1, z, x), tak(z-1, x, y)) + + +this is usally a pretty good tests of function call speed. +Since in Smalltalk really everything is object oriented I could not +just define a global function that is not a method of some class. +Therefore I decided to use class methods and introduce a class TestRec +just for that : + +takx: x y: y z:z +"Test function call speed" +^(y +Message-ID: +X-UID: 1615 + +On Mon, 26 Apr 1999, Ivan Van Laningham wrote: + +> > I always sound like that too, don't worry. :) (they're calling me a +> > Python preacher these days, at work) +> > +> > Regards, +> > +> > Martijn +> +> Oh, they won't even let me talk in meetings around here anymore. I just +> *look* like I'm going to open my mouth and they all yell, ``Yes, we +> *know* we should use Python!'' + +Don't we all know that feeling? Just to contribute to the ``preaching +python and getting hit for it'' thread, I wanted to mention that I managed +to create a position which will need Python knowledge, and now some people +are learning Python, just to make sure they can maintain my code. + +And they don't even know I'm doing them a favour... +-- +Moshe Zadka . +QOTD: My own exit is more likely to be horizontal then perpendicular. + + + + + + diff --git a/demo/ermis-f/python_m/cur/1616 b/demo/ermis-f/python_m/cur/1616 new file mode 100644 index 00000000..dc5c0869 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1616 @@ -0,0 +1,67 @@ +From: claird at Starbase.NeoSoft.COM (Cameron Laird) +Date: 2 Apr 1999 15:56:58 -0600 +Subject: Dealing with faults matters (was: Is Python dying?) +References: <7ds2g4$cm8$1@Starbase.NeoSoft.COM> <000901be7b41$cdc84f20$f19e2299@tim> <7dt2pv$1mj$1@Starbase.NeoSoft.COM> <3706f449.12085377@news.cybercity.dk> +Message-ID: <7e3efa$j7v$1@Starbase.NeoSoft.COM> +Content-Length: 1940 +X-UID: 1616 + +In article <3706f449.12085377 at news.cybercity.dk>, +Morten Christensen wrote: +>On 31 Mar 1999 06:01:03 -0600, claird at Starbase.NeoSoft.COM (Cameron +>Laird) wrote: +>>*I* certainly discuss it. Anyone who understands +>>that exception-handling is important I invite to +>>realize that exception-handling on the sociologi- +>>cal-organizational dimension has an even bigger +>>multiplier. +>> +>>This is a plank of my "Visual C considered profes- +>>sional malpractice" campaign. +> +>??? +> +>...I understand exception handling and regard it as very important, +>although the (Visual) C++ implementation is really awful (as everyone +>who have experienced "unexplainable" Visual C++ exceptions of unknown +>origin and type knows ).... I also know a lot about how exception +>handling is actually implemented in modern OO languages such as C++ +>(this was the subject I wrote my master thesis on).... +> +>HOWEVER, I have NO clue about what you mean by exception-handling as a +>multiplier on the sociological-organization dimension :-) I would like +>to find out. Can you explain? + . + . + . +Happily. + +Excuse my giddiness, please; I see that that +last message *did* wander too far into the +land of obscurity. + +Here's what I was saying: exception-handling +is important. Programs that intelligently +use exception-handling mechanisms are better +programs. + +Exception-handling is even more important to +people. People and organizations that deal +with exceptions intelligently, and don't pre- +tend that everything should be without fault, +are better people and organizations. + +In fact, a correct computer program often +has over half its lines devoted to accomo- +dating error. A wise person will have good +ways to respond to criticism/problems/diffi- +culties/...; dealing with success is +relatively easier. +-- + +Cameron Laird http://starbase.neosoft.com/~claird/home.html +claird at NeoSoft.com +1 281 996 8546 FAX + + + + diff --git a/demo/ermis-f/python_m/cur/1617 b/demo/ermis-f/python_m/cur/1617 new file mode 100644 index 00000000..1689fbbc --- /dev/null +++ b/demo/ermis-f/python_m/cur/1617 @@ -0,0 +1,25 @@ +From: morse at harborcom.net (Kevin Dahlhausen) +Date: Thu, 22 Apr 1999 11:28:33 GMT +Subject: Controlling Linux serial port w/ Python ... - posixport.py (0/1) +References: <924762349.809295488@news.intergate.bc.ca> +Message-ID: <371f0721.156454028@news.oh.verio.com> +X-UID: 1617 + +Gerald Gutierrez wrote: + +>I'd like to do some modem I/O via Python. Mostly, the interactions would be +>similar to what "chat" in the ppp package may do; send/recv data, flipping DTR, +>setting speed, etc. +> +>I understand that POSIX termios, for which Python has a binding, may be able to +>do this. Can someone point me to an example somewhere? Alternatively, can +>someone direct me to where this type of information is available? + +Here's some code that will get you partially there. +It doesn't handle the control lines though. + + + + + + diff --git a/demo/ermis-f/python_m/cur/1618 b/demo/ermis-f/python_m/cur/1618 new file mode 100644 index 00000000..ae69cee0 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1618 @@ -0,0 +1,24 @@ +From: seitz at mail.medscape.com (seitz at mail.medscape.com) +Date: Tue, 13 Apr 1999 22:04:06 GMT +Subject: stupid Win-CGI getting started question +Message-ID: <7f0f0h$pfb$1@nnrp1.dejanews.com> +X-UID: 1618 + +Installed the basic Python stuff. I can run the interpreter. But not clear on +getting it configured properly to talk CGI with my WinNT Netscape Enterprise +server. I set a CGI folder path properly, but I get a nasty error message. +But it's not a file-not-found, so I know it's finding the .py file. So I'm +guessing it's not finding the executable. + +How should that first #! be changed for Windows users? Could that be it? + +Could the fact that all my Python stuff is under +d:\program files\python\ +be part of the problem (the long folder name with a space in it)? + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/1619 b/demo/ermis-f/python_m/cur/1619 new file mode 100644 index 00000000..ffa91d88 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1619 @@ -0,0 +1,27 @@ +From: mss at anguish.transas.com (Michael Sobolev) +Date: 13 Apr 1999 11:59:43 GMT +Subject: CVS module +Message-ID: <7evbjf$85f$1@anguish.transas.com> +X-UID: 1619 + +My quick attempt to find something that would help me to cope with CVS files +failed. Could anybody advise me whether such a module exist? Under "such a +module" I mean something that permits to get the complete information about the +given file: + + cvsfile = CVSFile () + + from pprint import pprint + + pprint (cvsfile.revisions) + +or something alike. + +Thanks, + +-- +Mike + + + + diff --git a/demo/ermis-f/python_m/cur/1620 b/demo/ermis-f/python_m/cur/1620 new file mode 100644 index 00000000..4c625662 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1620 @@ -0,0 +1,37 @@ +From: gmcm at hypernet.com (Gordon McMillan) +Date: Wed, 7 Apr 1999 01:26:23 GMT +Subject: Unable to register TclNotifier window class +Message-ID: <1288673916-74845510@hypernet.com> +X-UID: 1620 + +OK Tk wizards (hi, /F-bot!) + +I'm getting "Unable to register TclNotifier window class". +What does this mean? + +Details: + Python 1.5.2b2 on NT SP4 + +I'm doing a tree control / form style window: + a big frame + another frame, packed 'left' with a Pmw.ScrolledListBox acting as a +tree control. + Then I have three different frames, each holding a "form" for +displaying / editing a particular record type. + When a new item in the tree control is selected, I "pack_forget" (if +the record type has changed) the right hand frame, then "pack" the +appropriate frame and fill the form. + + Works dandy for 2 of the three forms. Actually, the problem form +fills properly, too, it just does a St Vitus dance until I kill the +whole app (it appears to be continually re-packing itself). My +console window has the mystery error. + + The problem form is the most complex (has the most widgets), but +otherwise they are all clones of each other. + +- Gordon + + + + diff --git a/demo/ermis-f/python_m/cur/1621 b/demo/ermis-f/python_m/cur/1621 new file mode 100644 index 00000000..3b747f77 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1621 @@ -0,0 +1,31 @@ +From: joe at strout.net (Joe Strout) +Date: Tue, 27 Apr 1999 13:06:20 -0700 +Subject: examples for beginners +References: <3724e511.441513@news.tin.it> +Message-ID: +X-UID: 1621 + +In article <3724e511.441513 at news.tin.it>, Kranio + wrote: + +> Could you suggest me where to find some script just for studying? + + http://www.strout.net/python/tidbits.html + +Cheers, +-- Joe + +P.S. I'd send you a private reply, but it looks like your return +address is bogus. Please don't munge headers; it's very rude, in +violation of Internet standards, and mostly pointless anyway. + +-- +,------------------------------------------------------------------. +| Joseph J. Strout Biocomputing -- The Salk Institute | +| joe at strout.net http://www.strout.net | +`------------------------------------------------------------------' +Check out the Mac Web Directory! http://www.strout.net/macweb.cgi + + + + diff --git a/demo/ermis-f/python_m/cur/1622 b/demo/ermis-f/python_m/cur/1622 new file mode 100644 index 00000000..081f4109 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1622 @@ -0,0 +1,30 @@ +From: tim_one at email.msn.com (Tim Peters) +Date: Sat, 3 Apr 1999 07:54:56 GMT +Subject: Lauch program in the same shell +In-Reply-To: <816010E2456BD111A48700805FBBE2EEBBC0AA@ex-quebec-u1.baan.com> +References: <816010E2456BD111A48700805FBBE2EEBBC0AA@ex-quebec-u1.baan.com> +Message-ID: <000401be7da7$43f20ee0$879e2299@tim> +X-UID: 1622 + +[Martin Tremblay] +> Version: 1.51 +> Env: Nt +> +> In a script, I want to lauch an executable in the same shell, +> wait that this executable finish and launch another executable. +> I've try with execlp but the executable isn't lauch in the same +> shell as the script and the script exit when the exec is launch +> (so I can't lauch any other executable in this script). +> +> I'm sure there is an easy way to do what I want... + +Try os.system("some command"), or if that doesn't work either be very +specific by posting executable code that demonstrates your problem. + +i-thought-execlp-would-be-useful-until-it-was-added-ly y'rs - tim + + + + + + diff --git a/demo/ermis-f/python_m/cur/1623 b/demo/ermis-f/python_m/cur/1623 new file mode 100644 index 00000000..aa5946dd --- /dev/null +++ b/demo/ermis-f/python_m/cur/1623 @@ -0,0 +1,42 @@ +From: MHammond at skippinet.com.au (Mark Hammond) +Date: Wed, 7 Apr 1999 09:36:21 +1000 +Subject: Embedding python question: PyRun_String only returns None not what I calculate +References: <923433832.14002.0.nnrp-07.9e982a40@news.demon.co.uk> +Message-ID: <7ee5pk$qkm$1@m2.c2.telstra-mm.net.au> +X-UID: 1623 + +Hopefully someone with more time can give a better answer... + +But the short story is that PyRun_String works with statements, not +expressions. You can use it to, eg, import modules, and even call +functions, but you cant get the result. + +To see the difference, try from a Python prompt: +>>> cmd = "1+1" +>>> exec cmd +>>> eval(cmd) + +You will notice that the functionality you are after is by evaluating +objects. Thus, you need to use a different Python API. + +Mark. + +Barry Scott wrote in message +<923433832.14002.0.nnrp-07.9e982a40 at news.demon.co.uk>... +>What I want to do is call python to run python code and return the results +>to +>my app. But I cannot find anyway to do this. +> +>It would seem that I should be using PyRun_String to run a piece of python +>and return a result object to me. But I can only get a return value of +None. +>NULL is returned if the code does not run. +> +>How do I get python to return 2 to me when I ask it what 1+1 is? + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1624 b/demo/ermis-f/python_m/cur/1624 new file mode 100644 index 00000000..e5b7dfa0 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1624 @@ -0,0 +1,30 @@ +From: jbauer at rubic.com (Jeff Bauer) +Date: Thu, 29 Apr 1999 23:54:33 GMT +Subject: Python and Perl (was: converting perl to python) +References: +Message-ID: <3728F139.75BD1D6B@rubic.com> +X-UID: 1624 + +Ben Caradoc-Davies wrote: +> Perl is a fertile breeding ground for Pythonistas. I'm sure +> many expand into Python from Perl. + +Count me as one such user. I started using Perl for sysadmin +tasks back in the early 90's. From there I expanded to +database management, text-mode UI's, code generation, etc. + +My experience with Perl gave me the courage to "bet the farm" +on business projects with Python, starting in 1994. + +One other debt I must acknowledge. Prior even to Perl, I +had many pleasant experiences using Awk. Does anyone remember +Jon Bentley's "Confessions of a Coder" books? Marvelous stuff. + +all-this-and-C++-too-ly yr's + +Jeff Bauer +Rubicon, Inc. + + + + diff --git a/demo/ermis-f/python_m/cur/1625 b/demo/ermis-f/python_m/cur/1625 new file mode 100644 index 00000000..9d358976 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1625 @@ -0,0 +1,35 @@ +From: gornauth at dds.nl (Gornauth) +Date: Fri, 23 Apr 1999 15:37:20 +0200 +Subject: opening more than 1 file +References: <371CB255.5FCAFBAF@solair1.inter.NL.net> <371CCAE0.7DE87F8A@aw.sgi.com> +Message-ID: <7fpteh$cik$1@news1.xs4all.nl> +X-UID: 1625 + +Gary Herron wrote in message <371CCAE0.7DE87F8A at aw.sgi.com>... + +>If your definition of `elegant' includes `short', here is a one-liner to +>do this. It maps a list [0,1,2,...] to a list of open files: +> +>[, +> , +> , +> ...] +> +>files = map(lambda i: open("file%02d"%i, 'w'), range(N)) + +I'm not completely sure how that one-liner works. To be honest, I have no +clue whatsoever. + +Could someone more python-literate please be so kind as to give a couple of +examples on how to use 'map' and 'lamba'? + +Met vriendelijke groeten, + Hans + + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1626 b/demo/ermis-f/python_m/cur/1626 new file mode 100644 index 00000000..e8b61b6d --- /dev/null +++ b/demo/ermis-f/python_m/cur/1626 @@ -0,0 +1,31 @@ +From: fredrik at pythonware.com (Fredrik Lundh) +Date: Thu, 15 Apr 1999 08:52:38 GMT +Subject: Tkinter: making a window unresizable (Win 95) +References: <7f3hpt$e64$1@nnrp1.dejanews.com> +Message-ID: <005901be871d$ecf7b290$f29b12c2@pythonware.com> +X-UID: 1626 + + wrote: +> Toplevels in Tkinter in Windows-95 come with +> the resizing button on the upper-right corner, +> next to the iconify and close buttons. +> +> Even if I use resizable(0,0) method of the +> Tkinter.Toplevel class, the resizing button +> still persists. And when I click on it, although the +> window now does not resize, it still flickers and +> moves around. This is kind of annoying. +> +> Is there a way of creating a non-resizable +> Toplevel in Tkinter more easily? Namely, is there +> a way to eliminate the resizing button completely? + +not sure, but I think this has been fixed in a recent +version of Tk (8.0.5? 8.1b3?). + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1627 b/demo/ermis-f/python_m/cur/1627 new file mode 100644 index 00000000..57406508 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1627 @@ -0,0 +1,18 @@ +From: kranio at nospam.nospam.it (Kranio) +Date: Wed, 21 Apr 1999 10:36:04 GMT +Subject: Beginner - Tkinter info +References: <371c59e9.2723125@news.tin.it> <371B453E.C3F83831@foreman.ac.rwth-aachen.de> +Message-ID: <371da9f4.287834@news.tin.it> +X-UID: 1627 + +On Mon, 19 Apr 1999 17:01:18 +0200, Greg Landrum + wrote: + +tnx for your support + +Marco + + + + + diff --git a/demo/ermis-f/python_m/cur/1628 b/demo/ermis-f/python_m/cur/1628 new file mode 100644 index 00000000..fba7cc96 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1628 @@ -0,0 +1,16 @@ +From: gscot at my-dejanews.com (gscot at my-dejanews.com) +Date: Thu, 08 Apr 1999 05:19:55 GMT +Subject: Internet Robot +Message-ID: <7ehe9m$hbs$1@nnrp1.dejanews.com> +X-UID: 1628 + +To All, I would like to write a Python robot to play an Internet +game. I do not know how to make a POST request. Thanks to anyone in advance +that can point me in the right direction. Gary + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/1629 b/demo/ermis-f/python_m/cur/1629 new file mode 100644 index 00000000..8803bb48 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1629 @@ -0,0 +1,75 @@ +From: arw at ifu.net (arw) +Date: Fri, 9 Apr 1999 16:20:00 GMT +Subject: GadFly - MemoryError +Message-ID: <199904091623.MAA24288@ifu.ifu.net> +Content-Length: 2193 +X-UID: 1629 + +My guess is that you have a lot of url matches and +gadfly is doing what you ask it to do. Could be wrong. +Rewriting the query might help, as suggested elsewhere. +If you want to discuss this further I don't think we need +copy the list. With 3000 entries you have a potential +9M matches. + +Please try this + + select url, count(*) from table group by url order by 1 desc + +And have a look at how many redundancies you have. This +query should run faster, I hope. + +We could take this kind of discussion offline, if you like. :) + -- Aaron Watters + +----Original Message----- + >From: Oleg Broytmann + >To: arw + >Cc: Python Mailing List + >Subject: RE: GadFly - MemoryError + >Reply-To: phd at sun.med.ru + >Date: Wednesday, April 07, 1999 4:16 AM + > + >Hello! + > + >On Mon, 5 Apr 1999, arw wrote: + >> I don't know why you have this problem. + >> Gadfly should not construct the cross product with + >> the equality you mention present. + >> (b1.URL = b2.URL) + > + > I freed some memory and the program worked. It ate 30 Megs while running, + >so I was in need of memory. But it ran 30 minutes (on 3000 rows!) + > + >> Please try adding an index on URL on the table + >> in question. Also, maybe try increasing your virtual + >> memory (page file size, or whatever). + > + > Indices or compiled kjbuckets was not of big help - instead of running + >35 minutes the program ran 30. I think, my computer spent more time + >swapping, not working. + > + >> Good luck. fwiw, I've definitely run tables with + >> 100k rows in Gadfly on a 64Meg machine. + >> -- Aaron Watters + > + > You are in luck. + > + >> ps: let me know how it goes. + > + > Not so good. I think I would not use gadfly, at least for this project + >(currently I am using very simple "database", that stored in text files. Of + >course, I cannot make complex requests, sucj as joins). + > + >Oleg. + >---- + > Oleg Broytmann National Research Surgery Centre http://sun.med.ru/~phd/ + > Programmers don't die, they just GOSUB without RETURN. + > + > + > + + + + + diff --git a/demo/ermis-f/python_m/cur/1630 b/demo/ermis-f/python_m/cur/1630 new file mode 100644 index 00000000..92c88c1e --- /dev/null +++ b/demo/ermis-f/python_m/cur/1630 @@ -0,0 +1,677 @@ +From: ping at lfw.org (Ka-Ping Yee) +Date: 13 Apr 1999 12:38:40 GMT +Subject: Python console (please play) +Message-ID: <7evdsg$sfh$1@camel29.mindspring.com> +Content-Length: 23917 +X-UID: 1630 + +Hi, all. + +I know it's been a long while since i last posted here, +but i have been hacking lots of Python all the while. +It's just that i mostly don't get to give it away. + +Well, here's a little late-night hack i whipped up. +Thought you might enjoy it, so i'll post it here. + +It all started with my annoyance at being forced to +paste code into the Python interpreter one line at a +time because the prompts foul things up. But there is +plenty of boasting in the doc string, so i'll not add +any more words here. + +Do let me know how you like it. + + + + +!ping + + I never dreamt that i would get to be + The creature that i always meant to be + But i thought, in spite of dreams, + You'd be sitting somewhere here with me. + +----------%<----------%<-------Console.py--------%<----------%<---------- + +"""A Tkinter-based console for conversing with the Python interpreter, +featuring more tolerant pasting of code from other interactive sessions, +better handling of continuations than the standard Python interpreter, +highlighting of the most recently-executed code block, the ability to +edit and reexecute previously entered code, a history of recently-entered +lines, and automatic multi-level completion with pop-up menus. + +Ka-Ping Yee , 10 April 1999. This software is in the public +domain and is provided without express or implied warranty. Permission to +use, modify, or distribute the software for any purpose is hereby granted.""" + +# TODO: autoindent to matching bracket after an unbalanced line (hard) +# TODO: outdent after line starting with "break", "raise", "return", etc. +# TODO: keep a stack of indent levels for backspace to jump back to +# TODO: blink or highlight matching brackets +# TODO: delete the prompt when joining lines; allow a way to break lines + +from Tkinter import * +import sys, string, traceback, types + +REVISION = "$Revision: 1.3 $" +VERSION = string.split(REVISION)[1] + +class OutputPipe: + """A substitute file object for redirecting output to a function.""" + + def __init__(self, writer): + self.writer = writer + self.closed = 0 + + def __repr__(self): + return "" % repr(self.writer) + + def read(self, length): + return "" + + def write(self, data): + if not self.closed: self.writer(data) + + def close(self): + self.closed = 1 + + +class Console(Frame): + def __init__(self, parent=None, dict={}, **options): + """Construct from a parent widget, an optional dictionary to use + as the namespace for execution, and any configuration options.""" + Frame.__init__(self, parent) + + if not hasattr(sys, "ps1"): sys.ps1 = ">>> " + if not hasattr(sys, "ps2"): sys.ps2 = "... " + self.prefixes = [sys.ps1, sys.ps2, ">> ", "> "] + self.startup = "Python %s\n%s\n" % (sys.version, sys.copyright) + \ + "Python Console v%s by Ka-Ping Yee \n" % VERSION + self.dict = dict + + # The text box. + + self.text = Text(self) + self.text.insert("end", self.startup) + self.text.insert("end", sys.ps1) + self.text.bind("", self.cb_return) + self.text.bind("", self.cb_select) + self.text.bind("", self.cb_paste) + self.text.bind("", self.cb_back) + self.text.bind("", self.cb_forward) + self.text.bind("", self.cb_hidecompletions) + self.text.bind("", self.cb_complete) + self.text.bind("", self.cb_backspace) + self.text.bind("", self.cb_nothing) + + # The scroll bar. + + self.scroll = Scrollbar(self, command=self.text.yview) + self.text.config(yscrollcommand=self.scroll.set) + self.scroll.pack(side=RIGHT, fill=Y) + self.text.pack(fill=BOTH, expand=1) + self.text.focus() + + # Continuation state. + + self.continuation = 0 + self.error = 0 + self.intraceback = 0 + + # The command history. + + self.history = [] + self.historyindex = None + self.current = "" + + # Completion state. + + self.compmenus = [] + self.compindex = None + self.compfinish = "" + + # Redirection. + + self.stdout = OutputPipe(lambda data, w=self.write: w(data, "stdout")) + self.stderr = OutputPipe(lambda data, w=self.write: w(data, "stderr")) + + # Configurable options. + + self.options = {"stdoutcolour": "#7020c0", + "stderrcolour": "#c03020", + "morecolour": "#a0d0f0", + "badcolour": "#e0b0b0", + "runcolour": "#90d090"} + apply(self.config, (), self.options) + apply(self.config, (), options) + + def __getitem__(self, key): + return self.options[key] + + def __setitem__(self, key, value): + if not self.options.has_key(key): + raise KeyError, 'no such configuration option "%s"' % key + self.options[key] = value + if key == "stdoutcolour": + self.text.tag_configure("stdout", foreground=value) + if key == "stderrcolour": + self.text.tag_configure("stderr", foreground=value) + + def config(self, *args, **dict): + """Get or set configuration options in a Tkinter-like style.""" + if args == () and dict == {}: + return self.options + if len(args) == 1: + return self.options[args[0]] + for key, value in dict.items(): + self[key] = value + + # Text box routines. + + def trim(self, command): + """Trim any matching prefix from the given command line, returning + the amount trimmed and the trimmed result.""" + for prefix in self.prefixes: + if command[:len(prefix)] == prefix: + return len(prefix), command[len(prefix):] + return 0, command + + def getline(self, line=None, trim=0): + """Return the command on the current line.""" + if line is None: + line, pos = self.cursor() + command = self.text.get("%d.0" % line, "%d.end" % line) + if trim: + trimmed, command = self.trim(command) + return command + + def cursor(self): + """Get the current line and position of the cursor.""" + cursor = self.text.index("insert") + [line, pos] = map(string.atoi, string.split(cursor, ".")) + return line, pos + + def write(self, data, tag=None): + """Show output from stdout or stderr in the console.""" + if self.intraceback and data[-2:] == "\n ": data = data[:-1] + start = self.text.index("insert") + self.text.insert("insert", data) + end = self.text.index("insert") + if tag: self.text.tag_add(tag, start, end) + + # History mechanism. + + def cb_back(self, event): + """Step back in the history.""" + if self.history: + if self.historyindex == None: + self.current = self.getline(trim=1) + self.historyindex = len(self.history) - 1 + elif self.historyindex > 0: + self.historyindex = self.historyindex - 1 + self.recall() + + return "break" + + def cb_forward(self, event): + """Step forward in the history.""" + if self.history and self.historyindex is not None: + self.historyindex = self.historyindex + 1 + if self.historyindex < len(self.history): + self.recall() + else: + self.historyindex = None + self.recall(self.current) + + return "break" + + def recall(self, command=None): + """Show a command from the history on the current line.""" + if command is None: + command = self.history[self.historyindex] + line, pos = self.cursor() + current = self.getline(line) + trimmed, trimmedline = self.trim(current) + cutpos = "%d.%d" % (line, trimmed) + self.text.delete(cutpos, "%d.end" % line) + self.text.insert(cutpos, command) + self.text.mark_set("insert", "%d.end" % line) + + # Completion mechanism. + + def cb_complete(self, event): + """Attempt to complete the identifier currently being typed.""" + if self.compmenus: + if self.cursor() == self.compindex: + # Second attempt to complete: add finishing char and continue. + self.text.insert("insert", self.compfinish) + self.compindex = None + self.unpostmenus() + return "break" + + # Scan back for the identifier currently being typed. + line, pos = self.cursor() + command = self.getline() + preceding = command[:pos] + startchars = string.letters + "_" + identchars = string.letters + string.digits + "_" + while pos > 0 and preceding[pos-1] in identchars: + pos = pos - 1 + preceding, ident = preceding[:pos], preceding[pos:] + preceding = string.strip(preceding) + if not ident or ident[0] in startchars: + # Look for context before the start of the identifier. + context = "" + while preceding[-1:] == ".": + preceding = string.strip(preceding[:-1]) + if preceding[-1] in identchars: + pos = len(preceding)-1 + while pos > 0 and preceding[pos-1] in identchars: + pos = pos - 1 + if preceding[pos] in startchars: + context = preceding[pos:] + "." + context + preceding = string.strip(preceding[:pos]) + else: break + else: break + + # Get the list of possible choices. + if context: + object = eval(context[:-1], self.dict) + keys = members(object) + else: + class Lookup: + def __init__(self, dicts): + self.dicts = dicts + + def __getattr__(self, key): + for dict in self.dicts: + if dict.has_key(key): return dict[key] + return None + object = Lookup([self.dict, __builtins__.__dict__]) + keys = self.dict.keys() + dir(__builtins__) + keys = matchingkeys(keys, ident) + skip = len(ident) + + # Produce the completion. + line, pos = self.cursor() + endpos = pos + while endpos < len(command) and command[endpos] in identchars: + endpos = endpos + 1 + cut = "%d.%d" % (line, endpos) + + if len(keys) == 1: + # Complete with the single possible choice. + if self.cursor() == self.compindex: + # Second attempt to complete: add a dot and continue. + self.text.insert("insert", ".") + self.compindex = None + else: + self.text.delete("insert", cut) + self.text.insert("insert", keys[0][skip:]) + try: + # Completed with a valid choice; next try can finish. + 1 / len(members(getattr(object, keys[0]))) + self.compindex = self.cursor() + except: + # Object has no members; finish here. + self.text.insert("insert", " ") + elif len(keys) > 1: + # Present a menu. + prefix = commonprefix(keys) + keys.sort() + if len(prefix) > skip: + self.text.delete("insert", cut) + self.text.insert("insert", keys[0][skip:len(prefix)]) + skip = len(prefix) + + if len(keys[0]) == skip: + # Common prefix is a valid choice; next try can finish. + self.compindex = self.cursor() + self.compfinish = " " + try: + if members(getattr(object, keys[0])): + # Object has members within; continue with a dot. + self.compfinish = "." + except: pass + + self.postmenus(keys, skip, cut) + + return "break" + + def postmenus(self, keys, skip, cut): + """Post a series of menus listing all the given keys, given the + length of the existing part so we can position the menus under the + cursor, and the index at which to insert the completion.""" + width = self.winfo_screenwidth() + height = self.winfo_screenheight() + bbox = self.text.bbox("insert - %d c" % skip) + x = self.text.winfo_rootx() + bbox[0] - 5 + y = self.text.winfo_rooty() + bbox[1] + bbox[3] + + self.compmenus = [] + menufont = self.text.cget("font") + menu = Menu(font=menufont, bd=1, tearoff=0) + self.compmenus.append(menu) + while keys: + def complete(s=self, k=keys[0][skip:], c=cut): + s.text.delete("insert", c) + s.text.insert("insert", k + " ") + s.unpostmenus() + menu.add_command(label=keys[0], command=complete) + menu.update() + if y + menu.winfo_reqheight() >= height: + menu.delete("end") + x = x + menu.winfo_reqwidth() + y = 0 + menu = Menu(font=menufont, bd=1, tearoff=0) + self.compmenus.append(menu) + else: + keys = keys[1:] + if x + menu.winfo_reqwidth() > width: + menu.destroy() + self.compmenus = self.compmenus[:-1] + self.compmenus[-1].delete("end") + self.compmenus[-1].add_command(label="...") + break + + x = self.text.winfo_rootx() + bbox[0] - 5 + y = self.text.winfo_rooty() + bbox[1] + bbox[3] + for menu in self.compmenus: + maxtop = height - menu.winfo_reqheight() + if y > maxtop: y = maxtop + menu.post(x, y) + x = x + menu.winfo_reqwidth() + self.text.focus() + self.text.grab_set() + + def unpostmenus(self): + """Unpost the completion menus.""" + for menu in self.compmenus: + menu.unpost() + menu.destroy() + self.compmenus = [] + self.incompmenu = 0 + self.text.grab_release() + + def cb_hidecompletions(self, event): + if self.compmenus: + self.unpostmenus() + + def cb_select(self, event): + """Handle a menu selection event. We have to check and invoke the + completion menus manually because we are grabbing events to give the + text box keyboard focus.""" + if self.compmenus: + for menu in self.compmenus: + x, y = menu.winfo_rootx(), menu.winfo_rooty() + w, h = menu.winfo_width(), menu.winfo_height() + if x < event.x_root < x + w and \ + y < event.y_root < y + h: + item = menu.index("@%d" % (event.y_root - y)) + menu.invoke(item) + break + else: + self.unpostmenus() + return "break" + + # Entering commands. + + def cb_backspace(self, event): + """Avoid backspacing over the prompt.""" + if self.compmenus: + self.unpostmenus() + line, pos = self.cursor() + trimmed, command = self.trim(self.getline()) + if pos == trimmed: return "break" + + # Extremely basic outdenting. Needs more work here. + if not string.strip(command[:pos-trimmed]): + cut = pos - 4 + if cut < trimmed: cut = trimmed + self.text.delete("%d.%d" % (line, cut), "%d.%d" % (line, pos)) + return "break" + + def cb_nothing(self, event): + return "break" + + def cb_return(self, event): + """Handle a keystroke by running from the current line + and generating a new prompt.""" + self.text.tag_delete("compiled") + self.historyindex = None + command = self.getline(trim=1) + self.history.append(command) + + line, pos = self.cursor() + self.text.mark_set("insert", "%d.end" % line) + self.text.insert("insert", "\n") + self.runline(line) + + line, pos = self.cursor() + self.text.mark_set("insert", "%d.end" % line) + prompt = self.continuation and sys.ps2 or sys.ps1 + if pos > 0: + self.text.insert("insert", "\n" + prompt) + else: + self.text.insert("insert", prompt) + + # Extremely basic autoindenting. Needs more work here. + indent = len(command) - len(string.lstrip(command)) + if string.lstrip(command): + self.text.insert("insert", command[:indent]) + if string.rstrip(command)[-1] == ":": + self.text.insert("insert", " ") + self.text.see("insert") + + return "break" + + def cb_paste(self, event): + """Handle a paste event (middle-click) in the text box. Pasted + text has any leading Python prompts stripped (at last!!).""" + self.text.tag_delete("compiled") + self.error = 0 + + try: lines = string.split(self.selection_get(), "\n") + except: return + + for i in range(len(lines)): + trimmed, line = self.trim(lines[i]) + line = string.rstrip(line) + if not line: continue + + self.text.insert("end", line) + self.text.mark_set("insert", "end") + if i < len(lines) - 1: + self.cb_return(None) + + if self.error: break + + return "break" + + # Executing commands. + + def runline(self, line): + """Run some source code given the number of the last line in the + text box. Scan backwards to get the entire piece of code to run + if the line is a continuation of previous lines. Tag the compiled + code so that it can be highlighted according to whether it is + complete, incomplete, or illegal.""" + lastline = line + lines = [self.getline(line)] + while lines[0][:len(sys.ps2)] == sys.ps2: + trimmed, lines[0] = self.trim(lines[0]) + self.text.tag_add( + "compiled", "%d.%d" % (line, trimmed), "%d.0" % (line+1)) + line = line - 1 + if line < 0: break + lines[:0] = [self.getline(line)] + if lines[0][:len(sys.ps1)] == sys.ps1: + trimmed, lines[0] = self.trim(lines[0]) + self.text.tag_add( + "compiled", "%d.%d" % (line, trimmed), "%d.0" % (line+1)) + else: + self.text.tag_add("compiled", "%d.0" % line, "%d.0" % (line+1)) + + source = string.join(lines, "\n") + if not source: + self.continuation = 0 + return + + status, code = self.compile(source) + + if status == "more": + self.text.tag_configure("compiled", background=self["morecolour"]) + self.continuation = 1 + + elif status == "bad": + self.text.tag_configure("compiled", background=self["badcolour"]) + self.error = 1 + self.continuation = 0 + self.intraceback = 1 + oldout, olderr = sys.stdout, sys.stderr + sys.stdout, sys.stderr = self.stdout, self.stderr + traceback.print_exception(SyntaxError, code, None) + self.stdout, self.stderr = sys.stdout, sys.stderr + sys.stdout, sys.stderr = oldout, olderr + self.intraceback = 0 + + elif status == "okay": + if self.getline(lastline) == sys.ps2: + self.text.tag_remove("compiled", "%d.0" % lastline, "end") + self.text.tag_configure("compiled", background=self["runcolour"]) + self.continuation = 0 + self.run(code) + + def compile(self, source): + """Try to compile a piece of source code, returning a status code + and the compiled result. If the status code is "okay" the code is + complete and compiled successfully; if it is "more" then the code + can be compiled, but an interactive session should wait for more + input; if it is "bad" then there is a syntax error in the code and + the second returned value is the error message.""" + err = err1 = err2 = None + code = code1 = code2 = None + + try: + code = compile(source, "", "single") + except SyntaxError, err: + pass + else: + return "okay", code + + try: + code1 = compile(source + "\n", "", "single") + except SyntaxError, err1: + pass + else: + return "more", code1 + + try: + code2 = compile(source + "\n\n", "", "single") + except SyntaxError, err2: + pass + + if err1 != err2: + return "more", None + + try: + code3 = compile(source + "\n", "", "exec") + except SyntaxError, err3: + pass + else: + return "okay", code3 + + try: + code4 = compile(source + "\n\n", "", "exec") + except SyntaxError, err4: + pass + + if err3 != err4: + return "more", None + else: + return "bad", err + + def run(self, code): + """Run a code object within the sandbox for this console. The + sandbox redirects stdout and stderr to the console, and executes + within the namespace associated with the console.""" + oldout, olderr = sys.stdout, sys.stderr + sys.stdout, sys.stderr = self.stdout, self.stderr + + try: + exec code in self.dict + except: + self.error = 1 + sys.last_type = sys.exc_type + sys.last_value = sys.exc_value + sys.last_traceback = sys.exc_traceback.tb_next + self.intraceback = 1 + traceback.print_exception( + sys.last_type, sys.last_value, sys.last_traceback) + self.intraceback = 0 + + self.stdout, self.stderr = sys.stdout, sys.stderr + sys.stdout, sys.stderr = oldout, olderr + + +# Helpers for the completion mechanism. + +def scanclass(klass, result): + for key in klass.__dict__.keys(): result[key] = 1 + for base in klass.__bases__: scanclass(base, result) + +def members(object): + result = {} + try: + for key in object.__members__: result[key] = 1 + result["__members__"] = 1 + except: pass + try: + for key in object.__methods__: result[key] = 1 + result["__methods__"] = 1 + except: pass + try: + for key in object.__dict__.keys(): result[key] = 1 + result["__dict__"] = 1 + except: pass + if type(object) is types.ClassType: + scanclass(object, result) + result["__name__"] = 1 + result["__bases__"] = 1 + if type(object) is types.InstanceType: + scanclass(object.__class__, result) + return result.keys() + +def matchingkeys(keys, prefix): + prefixmatch = lambda key, l=len(prefix), p=prefix: key[:l] == p + return filter(prefixmatch, keys) + +def commonprefix(keys): + if not keys: return '' + max = len(keys[0]) + prefixes = map(lambda i, key=keys[0]: key[:i], range(max+1)) + for key in keys: + while key[:max] != prefixes[max]: + max = max - 1 + if max == 0: return '' + return prefixes[max] + + +# Main program. + +if __name__ == "__main__": + c = Console(dict={}) + c.dict["console"] = c + c.pack(fill=BOTH, expand=1) + c.master.title("Python Console v%s" % VERSION) + mainloop() +-- +!ping + + I never dreamt that i would get to be + The creature that i always meant to be + + + + diff --git a/demo/ermis-f/python_m/cur/1631 b/demo/ermis-f/python_m/cur/1631 new file mode 100644 index 00000000..a2a42d45 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1631 @@ -0,0 +1,28 @@ +From: MHammond at skippinet.com.au (Mark Hammond) +Date: Sat, 24 Apr 1999 09:44:44 +1000 +Subject: Embedding Python - Win32 - Request for Info/Opinions +References: <371f32af.0@news.inet-systems.net> <37218679.236666031@news.randori.com> +Message-ID: <7fr0j7$4l1$1@m2.c2.telstra-mm.net.au> +X-UID: 1631 + +Dan L. Pierson wrote in message <37218679.236666031 at news.randori.com>... + +> +>What we do (thanks to Mark Hammond), is change PC/python_nt.rc to +>create a new registry base for our python: +> +>//#define MS_DLL_ID "1.5.1" +>#define MS_DLL_ID "QuickStep" +> + +Just a minor clarification. If you have MSVC, it is possible to change this +value _without_ recompiling Python itself. So it is possible to make this +change at the source level (as Dan mentions) and also at the binary level. + +Mark. + + + + + + diff --git a/demo/ermis-f/python_m/cur/1632 b/demo/ermis-f/python_m/cur/1632 new file mode 100644 index 00000000..a627e911 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1632 @@ -0,0 +1,20 @@ +From: aa8vb at vislab.epa.gov (Randall Hopper) +Date: Mon, 5 Apr 1999 12:58:16 GMT +Subject: nested map() ? +Message-ID: <19990405085816.A787115@vislab.epa.gov> +X-UID: 1632 + +To generate all permutations of list elements in Perl, it's sometimes +useful to do this: + + @result = map { $a = $_ ; map{ "$a$_" } @B } @A + +Is there a relatively short way to do this in Python? + +Thanks, + +Randall + + + + diff --git a/demo/ermis-f/python_m/cur/1633 b/demo/ermis-f/python_m/cur/1633 new file mode 100644 index 00000000..843c73da --- /dev/null +++ b/demo/ermis-f/python_m/cur/1633 @@ -0,0 +1,28 @@ +From: egibson at connect.com.au (Evan Gibson) +Date: Sat, 3 Apr 1999 02:12:40 GMT +Subject: Is Python dying? +In-Reply-To: ; from Lars Marius Garshol on Thu, Apr 01, 1999 at 02:00:53PM +0200 +References: <7dos4m$usi$1@nnrp1.dejanews.com> <37009C12.4C0E6B0B@earth.ox.ac.uk> <922837384snz@vision25.demon.co.uk> <19990331124736.46416@connect.com.au> +Message-ID: <19990403121240.18381@connect.com.au> +X-UID: 1633 + +> | I never understood how people can actually read programming books. +> | A very basic tutorial can teach the syntax, and after that all you +> | need is a library reference and a news group... +> +> As long as the language is relatively similar to the ones you already +> know this approach works fine. But if you only know, say, Algol-like +> languages and C, try learning Lisp, Standard ML or BETA from a very +> basic tutorial. I would not recommend it. :) + +Smile. Maybe that's my problem... I know Scheme and Red Code as well... + +> --Lars M. + +-- + Evan ~ThunderFoot~ Gibson ~ nihil mutatem, omni deletum ~ + May the machines watch over you with loving grace. + + + + diff --git a/demo/ermis-f/python_m/cur/1634 b/demo/ermis-f/python_m/cur/1634 new file mode 100644 index 00000000..01f581c7 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1634 @@ -0,0 +1,63 @@ +From: robin at alldunn.com (Robin Dunn) +Date: Mon, 26 Apr 1999 19:31:50 -0700 +Subject: GUI other than Tkinter (wxPython) +References: <3721567f.1748033@news> <7fs9to$rlr$1@nnrp1.dejanews.com> +Message-ID: +Content-Length: 1872 +X-UID: 1634 + +It's always amazing to me that somebody else has already given wxPython a +plug before I have a chance to get to it. :-) + +BTW, Cameron, your page needs it's wxPython link updated. + +-- +Robin Dunn +robin at AllDunn.com +http://AllDunn.com/robin/ +http://AllDunn.com/wxPython/ Check it out! +Try http://AllDunn.com/laughworks/ for a good laugh. + + +fm at synchrologic.com wrote in message <7fs9to$rlr$1 at nnrp1.dejanews.com>... +>I am a real big fan of wxPython. I've gotten everyone at our company hooked +on +>it. We use it for prototyping apps now because it's so much faster than any +>other tool (that is, VB). It has a full set of controls (tree, list, grid). +>Actually, wxWindows on which it's based is pretty nice as well (though C++ +>requires 10-20 times more typing). Check out +http://www.alldunn.com/wxPython/ +>and http://web.ukonline.co.uk/julian.smart/wxwin/. I think you'll be pretty +>happy with it. Good luck. +> +>In article <3721567f.1748033 at news>, +> mrfusion at bigfoot.com wrote: +>> Well, I've just about given up on EVER getting Tkinter to work on my +>> Win98 machine. Is there any other GUI module that I can get that +>> doesn't require TCL/TK to be installed on my machine? Isn't there +>> something called GD? +> +>-----------== Posted via Deja News, The Discussion Network ==---------- +>http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + +And also + +In article <3721567f.1748033 at news>, wrote: +>Well, I've just about given up on EVER getting Tkinter to work on my +>Win98 machine. Is there any other GUI module that I can get that +>doesn't require TCL/TK to be installed on my machine? Isn't there +. +. +. + +-- + +Cameron Laird http://starbase.neosoft.com/~claird/home.html +claird at NeoSoft.com +1 281 996 8546 FAX + + + + + + diff --git a/demo/ermis-f/python_m/cur/1635 b/demo/ermis-f/python_m/cur/1635 new file mode 100644 index 00000000..704a9eec --- /dev/null +++ b/demo/ermis-f/python_m/cur/1635 @@ -0,0 +1,15 @@ +From: mspal at sangria.harvard.edu (Michael Spalinski) +Date: 12 Apr 1999 23:47:54 -0400 +Subject: simple indexed file module? +References: +Message-ID: <876771kwph.fsf@schwinger.harvard.edu> +X-UID: 1635 + +I'll suggest the obvious - Aaron Watters' Gadfly. It may be a bit of an +overkill, but it is python, and not very big either. + +M. + + + + diff --git a/demo/ermis-f/python_m/cur/1636 b/demo/ermis-f/python_m/cur/1636 new file mode 100644 index 00000000..a82c7709 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1636 @@ -0,0 +1,42 @@ +From: akuchlin at cnri.reston.va.us (Andrew M. Kuchling) +Date: Tue, 27 Apr 1999 12:07:04 -0400 (EDT) +Subject: Directories +In-Reply-To: <3725DDD2.149DF47F@geocities.com> +References: <3725DDD2.149DF47F@geocities.com> +Message-ID: <14117.57115.810107.332251@amarok.cnri.reston.va.us> +X-UID: 1636 + +smoothasice at geocities.com writes: +>Hi, i'm curious if there is a python command or set of commaneds that +>could be used like the dir() command in dos prompt. I am trying to +>write a program in python that would allow me to list the files of a +>certain data type in a few directories but I need to know how I would do + + There are a few ways of doing this. + + * os.listdir(path) returns a list containing the names of all +the files in the directory specified by path. + +>>> import os +>>> os.listdir('.') +['Group.java', 'Group.class', 'User.java', ... ] + + So you can do os.listdir('C:/whatever/sub/dir/ectory'), and +then loop over each filename with a for loop. + + * The glob module returns a list of filenames matching a +wildcard pattern. + +>>> import glob +>>> glob.glob('*.java') +['Group.java', 'User.java', 'GroupWrapper.java', ... ] + +-- +A.M. Kuchling http://starship.python.net/crew/amk/ +The chaos of our lives suited me; I don't think I wanted it to end. + -- Tom Baker, in his autobiography + + + + + diff --git a/demo/ermis-f/python_m/cur/1637 b/demo/ermis-f/python_m/cur/1637 new file mode 100644 index 00000000..eb7567eb --- /dev/null +++ b/demo/ermis-f/python_m/cur/1637 @@ -0,0 +1,34 @@ +From: bill_seitz at my-dejanews.com (bill_seitz at my-dejanews.com) +Date: Thu, 15 Apr 1999 14:43:33 GMT +Subject: stupid Win-CGI getting started question +References: <7f0f0h$pfb$1@nnrp1.dejanews.com> <8DA86302Bduncanrcpcouk@news.rmplc.co.uk> <7f2db8$dev$1@nnrp1.dejanews.com> <8DA96361Fduncanrcpcouk@news.rmplc.co.uk> +Message-ID: <7f4tuj$in6$1@nnrp1.dejanews.com> +Content-Length: 1222 +X-UID: 1637 + +In article <8DA96361Fduncanrcpcouk at news.rmplc.co.uk>, + Duncan Booth wrote: +> It sounds like you still don't have the right path to python, or it is +> protected so you can't access it. I would check the file permissions: you +> probably need to give SYSTEM (or whatever user the CGI process is running as) +> on the web server full access to the python directory. +> +> Try creating a CGI cmd file like this: +> ----access.cmd--------- + +Ugh, pardon my sloppiness. Your access.cmd worked fine. Then I went back to +the previous file, took off the stuff on your first line after the Python +path, and got the same error message followed by the rest of the contents of +the file. So that told me that the path was the offending line. I looked more +carefully, and realized (d'oh) that the path was not just a folder path to +your code files, or the path to the Python executable, but the actual path +including the executable filename itself. Once I adjusted my first line to +match that, it started working fine. Now, if only I could get .py files to +work... + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/1638 b/demo/ermis-f/python_m/cur/1638 new file mode 100644 index 00000000..52625f23 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1638 @@ -0,0 +1,33 @@ +From: chadm at sgi.com (Chad McDaniel) +Date: 09 Apr 1999 10:29:53 -0700 +Subject: POST request +References: <7eilen$g9o$1@nnrp1.dejanews.com> +Message-ID: +Content-Length: 1044 +X-UID: 1638 + +gscot at my-dejanews.com writes: + +> To All: I would like to write a short program that would play a game +> found on the Internet. I cannot find any documentation on how to make a POST +> request. It is a stock market game. You fill out a form with the symbol and +> number of share you want to buy or sell. The form uses the POST method to +> send the data. Since I cannot just put this information in the url I am not +> sure how to write a program to automate this procese. Is there any way to do +> that with Python. Thank you for your help. Gary +> + +If you are asking how you can make a POST request to a HTTP web server +using python as the client then yes, you can do this with urllib which +should be part of your python installation. urllib.urlopen() normally +uses GET, but if you supply a second data argument it will send that +data along as the body of a POST. With python 1.5.2 there is also a +very hand urllib.urlencode() function to transform a python +dictionary into something suitable for the body of a POST request. + +-- +-chad + + + + diff --git a/demo/ermis-f/python_m/cur/1639 b/demo/ermis-f/python_m/cur/1639 new file mode 100644 index 00000000..102ce9b0 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1639 @@ -0,0 +1,19 @@ +From: frneh at wmdata.com (Fredrik Nehr) +Date: Thu, 15 Apr 1999 12:07:21 +0200 +Subject: 1.5.2 install problems on NT +References: <3714D8FF.634655C5@ina.fr> +Message-ID: <7f4dor$kt4@news3.newsguy.com> +X-UID: 1639 + +> Registry problems: +I have the exact same problems, I removed the previous version (1.5.1) of +Python before I installed 1.5.2. + + +/FN + + + + + + diff --git a/demo/ermis-f/python_m/cur/1640 b/demo/ermis-f/python_m/cur/1640 new file mode 100644 index 00000000..735542bf --- /dev/null +++ b/demo/ermis-f/python_m/cur/1640 @@ -0,0 +1,27 @@ +From: robin at jessikat.demon.co.uk (Robin Becker) +Date: Tue, 13 Apr 1999 13:32:44 +0100 +Subject: site.py & COM startup +Message-ID: +X-UID: 1640 + +using Mark Hammond's win32com for a server I find that the installation path is not +automatically in sys.path so my base .pth files are missed and I get troubles. + +I hacked site.py to fix this using the fact that sys.prefix == '' when running a com +server (I guess inproc). + +the code I used inside site.py at line 93 looks like + +if sys.prefix == '': + from imp import find_module + prefixes = [os.path.normpath(os.path.dirname(find_module('site')[1])+'/..')] +else: + prefixes = [sys.prefix] + +but I guess this isn't really how it should be done. Any suggestions? +-- +Robin Becker + + + + diff --git a/demo/ermis-f/python_m/cur/1641 b/demo/ermis-f/python_m/cur/1641 new file mode 100644 index 00000000..f9bfbf41 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1641 @@ -0,0 +1,40 @@ +From: quinn at cruzeiro.ugcs.caltech.edu (Quinn Dunkan) +Date: 8 Apr 1999 02:43:02 GMT +Subject: povray.py +References: <__YN2.30200$FZ5.11443@news.rdc1.sfba.home.com> +Message-ID: +Content-Length: 1115 +X-UID: 1641 + +On 06 Apr 1999 15:46:12 -0500, David Steuber wrote: +>mlh at idt.ntnu.no (Magnus L. Hetland) writes: +> +>-> "TM" writes: +>-> +>-> > Has anyone created a pov ray module for python? +>-> +>-> I have been thinking about it, but haven't done it yet... What do you +>-> think it should contain? +> +>This is a relatively off the cuff response. But I think such a module +>should provide python classes for the POV types. Then, instead of +>using the POV scene description language, you would use Python. You +>could algorithmicly create a scene or animation sequence. Then you +>would pass the data structure (a list or other sequence) to a Python +>function that renders it in POV scene description language for POV to +>digest and render. +> +>Another thing I would like to see is a module for generating RIB +>files. In fact, a Python RenderMan module would be quite nice, +>complete with shading language support. Anything out there like that? +> +>-- +>David Steuber +>http://www.david-steuber.com +> +>s/trashcan/david/ to reply by mail +>If you don't, I won't see it. + + + + diff --git a/demo/ermis-f/python_m/cur/1642 b/demo/ermis-f/python_m/cur/1642 new file mode 100644 index 00000000..6c38e83d --- /dev/null +++ b/demo/ermis-f/python_m/cur/1642 @@ -0,0 +1,36 @@ +From: phd at sun.med.ru (Oleg Broytmann) +Date: Tue, 13 Apr 1999 16:27:15 GMT +Subject: bug in PyGreSQL module +In-Reply-To: <14099.24295.229214.504295@bitdiddle.cnri.reston.va.us> +References: <14099.24295.229214.504295@bitdiddle.cnri.reston.va.us> +Message-ID: +X-UID: 1642 + +On Tue, 13 Apr 1999, Jeremy Hylton wrote: +> I found an apparent bug in the Python interface to PostgreSQL. I +> tried sending a query to the author but haven't heard back, so I'm +> looking for other users to see if they have run into the problem. +> I have a table with lots of int fields, some of which of NULL. When I +> do a Python query, the PyGreSQL module converts the NULL to 0 instead +> of None, which is the value I expected. Is that a reasonable +> expectation? + + I have not noted such problem, I am using PyGres quite happily. Which +version you are using? + +> The PyGreSQL module doesn't implement the DB API, but I checked there +> anyway. Alas, it didn't say anything about how to handle NULL. + + DB API will be implemented in the upcominh PyGres 3.0. + +> Jeremy + +Oleg. +---- + Oleg Broytmann National Research Surgery Centre http://sun.med.ru/~phd/ + Programmers don't die, they just GOSUB without RETURN. + + + + + diff --git a/demo/ermis-f/python_m/cur/1643 b/demo/ermis-f/python_m/cur/1643 new file mode 100644 index 00000000..f1f6bc6f --- /dev/null +++ b/demo/ermis-f/python_m/cur/1643 @@ -0,0 +1,24 @@ +From: mlh at idt.ntnu.no (Magnus L. Hetland) +Date: 08 Apr 1999 14:21:01 +0200 +Subject: Cygnus Java Compiler and JPython +References: <199904072138.RAA25670@shell.clark.net> +Message-ID: +X-UID: 1643 + +Tom Culliton writes: + +> A story on the GCJ announement can be seen at: + +The GCJ assumes that the entire program will be compiled, i.e. no +bytecode interpreter... Doesn't JPython use dynamic compilation into +bytecode as a part of its Python interpretation? + +-- + + Magnus + Lie + Hetland http://arcadia.laiv.org + + + + diff --git a/demo/ermis-f/python_m/cur/1644 b/demo/ermis-f/python_m/cur/1644 new file mode 100644 index 00000000..6faf7f0b --- /dev/null +++ b/demo/ermis-f/python_m/cur/1644 @@ -0,0 +1,27 @@ +From: tjreedy at udel.edu (Terry Reedy) +Date: 6 Apr 1999 01:37:36 GMT +Subject: Is Python dying? +References: <7dos4m$usi$1@nnrp1.dejanews.com> <3700528A.3F0C047D@Lugoj.Com> <009e01be7a80$b20299b0$f29b12c2@pythonware.com> <7e1ju7$17k$1@eskinews.eskimo.com> +Message-ID: <7eboh0$rec$1@news.udel.edu> +X-UID: 1644 + +Hardly. Until about a year and a half ago, there were no mentions in +Dr. Dobb's Journal of Python (that I noticed). Since then, it has +appeared in several articles. Some non-obvious examples: + +1998 Dec page 101 in article on XLink: references to resources includes +several documents, Visual Basic application, Java application, and two! +python items - Garshol's XPointer implementation + +and Meginnson's (spelling correct?) Document Architecture processor. +(url given in DD incorrect or obsolete). + +1999 Jan page 94 in article on Matlab: reference to three Matlab-like +languages - Octave, SciLab, and NumPy. + +TJR + + + + + diff --git a/demo/ermis-f/python_m/cur/1645 b/demo/ermis-f/python_m/cur/1645 new file mode 100644 index 00000000..fb9f48f7 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1645 @@ -0,0 +1,36 @@ +From: rholm at mcs.com (Rich Holm) +Date: 23 Apr 1999 20:49:08 -0500 +Subject: PythonCE +Message-ID: +Content-Length: 1233 +X-UID: 1645 + +Spam detection software, running on the system "albatross.python.org", has +identified this incoming email as possible spam. The original message +has been attached to this so you can view it (if it isn't spam) or label +similar future email. If you have any questions, see +the administrator of that system for details. + +Content preview: Hello, Does anyone know the status of PythonCE? I would like + to get an updated copy, 1.5.2? Also, where is the source? I wouldn't mind + recompiling and extending it. Cheers, Rich [...] + +Content analysis details: (5.6 points, 5.0 required) + + pts rule name description +---- ---------------------- -------------------------------------------------- + 2.0 FH_DATE_IS_19XX The date is not 19xx. + 3.6 TVD_SPACED_SUBJECT_WORD3 TVD_SPACED_SUBJECT_WORD3 +-0.0 NO_RELAYS Informational: message was not relayed via SMTP +-0.0 NO_RECEIVED Informational: message has no Received headers + + +-------------- next part -------------- +An embedded message was scrubbed... +From: Rich Holm +Subject: PythonCE +Date: 23 Apr 1999 20:49:08 -0500 +Size: 943 +URL: + + diff --git a/demo/ermis-f/python_m/cur/1646 b/demo/ermis-f/python_m/cur/1646 new file mode 100644 index 00000000..cfbd903d --- /dev/null +++ b/demo/ermis-f/python_m/cur/1646 @@ -0,0 +1,30 @@ +From: stadt at freemail.nl (Richard van de Stadt) +Date: Fri, 09 Apr 1999 17:33:27 +0200 +Subject: Possible 1.5.2 bug +References: +Message-ID: <370E1DC7.BC2574B5@freemail.nl> +X-UID: 1646 + +Darrell wrote: +> +> I guess writing this message was all that was required to track down a +> common temp file. So why does such clear thinking sometimes require posting +> the problem to the world ? + +That is to make you feel much more silly that you didn't +see what you were doing wrong. Usually this clear thinking +happens about 5 minutes after posting. So, in fact, you +were late :-) + +But it's a general way to debug: tell someone what right things +your program is doing. Chances are that you will see the wrong +thing(s) before the other person has said anything... + +I just stick a picture of a face on my monitor and talk to +it to find bugs. + +Richard. + + + + diff --git a/demo/ermis-f/python_m/cur/1647 b/demo/ermis-f/python_m/cur/1647 new file mode 100644 index 00000000..16c8d9e3 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1647 @@ -0,0 +1,36 @@ +From: aa8vb at vislab.epa.gov (Randall Hopper) +Date: Tue, 6 Apr 1999 11:39:17 GMT +Subject: Possible regex match bug (re module) +In-Reply-To: <000001be7fc9$bdb0fec0$65a22299@tim>; from Tim Peters on Mon, Apr 05, 1999 at 09:06:45PM -0400 +References: <19990405084819.B802985@vislab.epa.gov> <000001be7fc9$bdb0fec0$65a22299@tim> +Message-ID: <19990406073917.B867123@vislab.epa.gov> +X-UID: 1647 + +Tim Peters: + |Same as in Perl, you're going to have to write a hairier regexp with only + |one interesting group, or give the interesting groups different names and + |sort them out after the match (in an alternation involving named groups, at + |most one will be non-None after a match). Here's a discouraging + |example of the former approach: + | + |>>> p = re.compile(r"([-=])\1\1(?P((?!\1).)*)\1\1\1").match + +I didn't parse your reply carefully enough. The "interesting groups +different names" approach is the one I took, and you're not advocating the +"hairier" form. + +I guess what threw me with named groups is that they are identified by +names (like variables) and not position numbers ($1,$2,...), so +context-sensitive assignment seemed to make sense. E.g.: +"if a == b { id = b } else { id = c }" + +I'll use different names in the future, and just be thinking numbers. ;-) + +Thanks, + +Randall + + + + + diff --git a/demo/ermis-f/python_m/cur/1648 b/demo/ermis-f/python_m/cur/1648 new file mode 100644 index 00000000..95f78725 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1648 @@ -0,0 +1,36 @@ +From: tseaver at palladion.com (Tres Seaver) +Date: Wed, 28 Apr 1999 23:21:41 -0500 +Subject: Emulating C++ coding style +References: <371F8FB7.92CE674F@pk.highway.ne.jp> <3720675C.FF7A9E99@gssec.bt.co.uk> +Message-ID: <3727DE55.EA5B4BAF@palladion.com> +X-UID: 1648 + +William Tanksley wrote: +> +> On Fri, 23 Apr 1999 13:28:12 +0100, Alan Gauld wrote: + +<> + +> +> >> In proper C++, your const will be contained inside a class (probably +> >> static) to keep it out of the global namespace. +> +> >Hopefully not. It should be contained within a C++ namespace. +> +> Okay, I'll bite. Why "hopefully not" a class? I know namespaces are new +> and cool, but classes seem to have done the job very well in the past. +> Have they been secretly causing bloat in our code all along ;-)? + +Classes are semantically "heavier" than namespaces: by design, they exist to +classify objects. Classes which exist only to scope other names (typedefs, +constants, free functions), while a decent workaround before the ANSI standard, +are now less attractive (they can't be reopened, for one thing). + +-- +========================================================= +Tres Seaver tseaver at palladion.com 713-523-6582 +Palladion Software http://www.palladion.com + + + + diff --git a/demo/ermis-f/python_m/cur/1649 b/demo/ermis-f/python_m/cur/1649 new file mode 100644 index 00000000..ae0e818f --- /dev/null +++ b/demo/ermis-f/python_m/cur/1649 @@ -0,0 +1,31 @@ +From: fredrik at pythonware.com (Fredrik Lundh) +Date: Wed, 21 Apr 1999 08:26:07 GMT +Subject: Raw binary string --> long integer? +References: <7fjrar$avb$1@nnrp1.dejanews.com> +Message-ID: <002901be8bd0$ebef75b0$f29b12c2@pythonware.com> +X-UID: 1649 + + wrote: +> I'm looking for a way to do the following in pure Python. +> +> Given a binary string, e.g., '\003\004\005', convert the string into a long. +> So the example should become (3<<8|4)<<8|5 == 110000010000000101 == 197,637. +> +> The binary strings can be arbitrarily long. (Ok, up to about 256 bytes for an +> RSA public key. ;-) + +here's one way to do it: + +v = 0L +for i in map(ord, "\003\004\005"): + v = v<<8 | i +print v + +for short integers, use the struct module instead. + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1650 b/demo/ermis-f/python_m/cur/1650 new file mode 100644 index 00000000..18a5b3c9 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1650 @@ -0,0 +1,36 @@ +From: faassen at pop.vet.uu.nl (Martijn Faassen) +Date: Tue, 27 Apr 1999 18:14:57 +0200 +Subject: help +References: + <19990426163014.B20207@toast.internal> + <3724D1C3.8BFA2C5B@pop.vet.uu.nl> + <3724DEFC.A01E93C2@callware.com> <37257B0A.AF4C8E4C@pop.vet.uu.nl> <3725D6EA.E2DFB853@callware.com> +Message-ID: <3725E281.A83DBBF@pop.vet.uu.nl> +X-UID: 1650 + +Ivan Van Laningham wrote: +> +> Pythonistas-- +> +> Martijn Faassen wrote: +> > +> [snip] +> > Yeah, that happened to me for a while - I had to cut down drastically on +> > the use of the word 'Python'. :) So *do* they use Python over there? I +> > mean, now that they all know they should? +> > +> +> Ha. No. I'm sure that they just think of me as that nut in the corner. + +You can take some comfort from the fact that here I've made a few people +quite excited about Zope. If Python doesn't work, you could try Zope. At +least it's a different word -- when they find out it's written in Python +it might already be too late. :) + +Regards, + +Martijn + + + + diff --git a/demo/ermis-f/python_m/cur/1651 b/demo/ermis-f/python_m/cur/1651 new file mode 100644 index 00000000..55f21f83 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1651 @@ -0,0 +1,70 @@ +From: arcege at shore.net (Michael P. Reilly) +Date: Fri, 23 Apr 1999 16:34:46 GMT +Subject: Suggestion for easier c/c++ interfacing +References: +Message-ID: +Content-Length: 2131 +X-UID: 1651 + +Albert Hofkamp wrote: +: Hello all, + +: I have been experimenting with c++ and Python, and am working on +: attaching generated c++ module-code to python. + +: In the EXT document, it is explained how to parse arguments from python +: in c code using PyTuple_ParseArgs(). This is really easy to use. + +I think you mean PyArg_ParseTuple(). + +: However, the same kind of parsing must occur after a call from c to a +: python function. The return value from that function is again a Python +: object, and needs to be decoded before it can be used in c. +: Unfortunately, the returned value is not a tuple, so PyTuple_ParseArgs() +: cannot be used. A shortcut would be to wrap the result in a tuple with 1 +: argument, and then call the decoding function, but I consider that a hack. + +: Wouldn't it be possible to create a PyTuple_ParseArgs()-like function to +: parse return results from python functions ? + +Gee... that is what happens when you take something out of the doc. + +There is indeed a function that you describe. It is not used often, +but "in the old days" it was used instead of PyArg_ParseTuple(). The +function is called PyArg_Parse() and works identically to the function +PyArg_ParseTuple(), except that it does not expect a tuple, it expects +any Python object. + + PyObject *function; + PyObject *result, *args; + char *street, *town, *city; + int zipcode; + + args = Py_BuildValue("ss", "name", "Arcege"); + /* returns a list of four elements */ + result = PyObject_CallObject(function, args); + Py_DECREF(args); + if (!PyArg_Parse(result, "[sssi]", &street, &town, &city, &zipcode)) + return NULL; + +Often, it is better to determine the type of the return value in the C +code manually - making it more robust and extensible. + + result = PyObject_CallObject(function, args); + if (result == Py_None) { + printf("No address found\n"); + Py_DECREF(Py_None); + } else if (!PyList_Check(result)) { + PyErr_SetString(PyExc_TypeError, "expecting a list (or None)") + return NULL; + } + +A good idea is to go thru the Python sources and see how PyArg_Parse +is still being used. + + -Arcege + + + + + diff --git a/demo/ermis-f/python_m/cur/1652 b/demo/ermis-f/python_m/cur/1652 new file mode 100644 index 00000000..30057522 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1652 @@ -0,0 +1,24 @@ +From: hniksic at srce.hr (Hrvoje Niksic) +Date: 13 Apr 1999 17:56:38 +0200 +Subject: Python 1.5.2c1 -- What if long long not supported? +References: <199904091521.LAA00858@eric.cnri.reston.va.us> <87hfqkx1lk.fsf@pc-hrvoje.srce.hr> +Message-ID: <87g164tsy1.fsf@pc-hrvoje.srce.hr> +X-UID: 1652 + +Hrvoje Niksic writes: + +> Guido van Rossum writes: +> +> > I received a bug report that if the (unnamed) platform doesn't +> > support the "long long" type, the configure script dies. The logic +> > in configure.in looks correct to me and I don't have any such Unix +> > platforms handy myself... +> +> You can "create" such a platform by using `-pedantic-errors'. + +This was supposed to say "by using `gcc -pedantic-errors' as the +compiler." + + + + diff --git a/demo/ermis-f/python_m/cur/1653 b/demo/ermis-f/python_m/cur/1653 new file mode 100644 index 00000000..79f9a9c4 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1653 @@ -0,0 +1,51 @@ +From: trashcan at david-steuber.com (David Steuber) +Date: 22 Apr 1999 23:00:24 -0400 +Subject: Built-in Modules gl, GL for SGI IRIX +Message-ID: +Content-Length: 2106 +X-UID: 1653 + +While perusing the documentation that came with Python (1.5.1 on SuSE +6.0 Linux distribution), I noticed pythong modules for interfacing +with OpenGL. I am running Linux on an Intel, not IRIX on an SGI +MIPS. I was wondering if anyone has patched the modules to work with +Mesa, an OpenGL clone. + +I am still very new to Python, and haven't been through the C linkage +referance yet. How difficult is it to set up the gl and GL modules to +look on the system for Mesa, GL or Windows OpenGL dlls and use the +appropriate shared objects for a Python program? + +I would like to use Python for a program that will need to display 3D +graphics using OpenGL. I would like the program to work on all POSIX +compliant systems and possibly Windows as well if the GUI elements (I +haven't looked into that yet either) are portable. + +-- +David Steuber +http://www.david-steuber.com + +If you wish to reply by mail, _please_ replace 'trashcan' with 'david' +in the e-mail address. The trashcan account really is a trashcan. + + The big problem with pornography is defining it. You can't +just say it's pictures of people naked. For example, you have these +primitive African tribes that exist by chasing the wildebeest on foot, +and they have to go around largely naked, because, as the old tribal +saying goes: "N'wam k'honi soit qui mali," which means, "If you think +you can catch a wildebeest in this climate and wear clothes at the same +time, then I have some beach front property in the desert region of +Northern Mali that you may be interested in." + So it's not considered pornographic when National Geographic +publishes color photographs of these people hunting the wildebeest +naked, or pounding one rock onto another rock for some primitive reason +naked, or whatever. But if National Geographic were to publish an +article entitled "The Girls of the California Junior College System +Hunt the Wildebeest Naked," some people would call it pornography. But +others would not. And still others, such as the Spectacularly Rev. +Jerry Falwell, would get upset about seeing the wildebeest naked. + -- Dave Barry, "Pornography" + + + + diff --git a/demo/ermis-f/python_m/cur/1654 b/demo/ermis-f/python_m/cur/1654 new file mode 100644 index 00000000..5a3750b6 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1654 @@ -0,0 +1,30 @@ +From: fdrake at cnri.reston.va.us (Fred L. Drake) +Date: Tue, 13 Apr 1999 13:15:26 GMT +Subject: ANNOUNCEMENT: Some Python Documentation in Hungarian language +In-Reply-To: +References: +Message-ID: <14099.17262.158344.777419@weyr.cnri.reston.va.us> +X-UID: 1654 + +Hever Zsolt writes: + > I am writing my diploma work in Python. I made two enclosures to it and + > converted them into HTML format. Now I put them out on the Internet with a + > Python home page together all in Hungarian language. I hope this + > documentation will help Python to be better known in Hungary. + + I have added a link to this from: + + http://www.python.org/doc/NonEnglish.html + + Thanks for your efforts! + + + -Fred + +-- +Fred L. Drake, Jr. +Corporation for National Research Initiatives + + + + diff --git a/demo/ermis-f/python_m/cur/1655 b/demo/ermis-f/python_m/cur/1655 new file mode 100644 index 00000000..5f2fb9b7 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1655 @@ -0,0 +1,53 @@ +From: aa8vb at vislab.epa.gov (Randall Hopper) +Date: Mon, 19 Apr 1999 13:14:38 GMT +Subject: sys.path.insert - how to make it global? +In-Reply-To: <01E40461E003D21195CC0080296495D80B1309@gates.cdc-group.com>; from Stefan Franke on Sat, Apr 17, 1999 at 06:35:32PM +0200 +References: <01E40461E003D21195CC0080296495D80B1309@gates.cdc-group.com> +Message-ID: <19990419091438.A59861@vislab.epa.gov> +Content-Length: 1331 +X-UID: 1655 + +Stefan Franke: + |Your code snippet says : + | # Augment search path to pull in our C library wrappers + | + |Maybe importing C extensions makes your program fail? + +Yes, exactly. + + |The following example should resemble your situation (let + |me know if it doesn't): + | + |-------- file a.py in some_directory + |-------- file b.py in some_directory + |-------- file c.py in some_directory/new_directory + +This works fine here as well. At the time I'd suspected that this was an +issue with importing in general, but it's actually shared library importing- +specific. + +Simplifying my situation and drawing parallels to yours, my case was: + + -------- file A.py in some_directory + -------- file B.py in some_directory/new_directory + -------- file C.so in some_directory/new_directory + -------- file D.so in some_directory/new_directory + +A imports B which imports C which is linked with D. It failed pulling in +D. B are SWIG shadow classes, C.so is the SWIG Python wrappers for a C +library, and D.so is the C library itself (several of them actually). + +Augmenting the RPATH established when C is built to include where D lives +resolved my problem not being able to import B from A. + +So I know now that augmenting sys.path isn't sufficient when some of the +Python modules have dependent shared libraries. + +Thanks for your help, + +Randall + + + + + diff --git a/demo/ermis-f/python_m/cur/1656 b/demo/ermis-f/python_m/cur/1656 new file mode 100644 index 00000000..4b4ac8c8 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1656 @@ -0,0 +1,16 @@ +From: cgw at fnal.gov (Charles G Waldman) +Date: Fri, 23 Apr 1999 02:47:43 GMT +Subject: try vs. has_key() +Message-ID: <199904230247.VAA10380@buffalo.fnal.gov> +X-UID: 1656 + +Personally I really like the new-ish "get" method of dictionaries, which lets you write + + dict[key] = dict.get(key,[]) + [foo] + +I don't know about performance implications but it's a nice terse construct. + + + + + diff --git a/demo/ermis-f/python_m/cur/1657 b/demo/ermis-f/python_m/cur/1657 new file mode 100644 index 00000000..8dd3b881 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1657 @@ -0,0 +1,103 @@ +From: martin at dstc.edu.au (Martin Chilvers) +Date: Wed, 14 Apr 1999 00:28:23 GMT +Subject: ANNOUNCE - Fnorb 1.0 - A Python CORBA ORB +Message-ID: <199904140028.KAA23849@piglet.dstc.edu.au> +Content-Length: 3656 +X-UID: 1657 + +Announcing the release of version 1.0 of 'Fnorb' a Python CORBA ORB. + +Thanks to all those people who tried out 1.0b1 and submitted bug reports - +here is the detailed list of the changes since the last release as found +in the CHANGES file:- + +Fnorb 1.0 +--------- + +1) The Windows NT/95 installation has been changed to make the setting of the +FNORB_HOME, PATH and PYTHONPATH environment variables up to the user (ie. the +installation no longer updates the registry or autoexec.bat). + +For convenience, an additional batch file ('...\Fnorb\script\fnvars.bat') is +created which can be run from a command prompt to set the variables +appropriately. To repeat, this is for convenience only - it works on NT with +Python 1.5.2c1 - but there are no guarantees beyond that! Win 95 users need to +edit the file, remove any spaces in directory names, and wish they had a +decent shell ;^) + +2) The CORBA type 'unsigned long' is now mapped (as per the draft) to the +Python *long* integer type. This has some effect as Python sequences cannot be +indexed with these values without an explicit conversion (int(x)). + +3) Added support for the CORBA 'long long' and 'unsigned long long' (64-bit +integer) types - they are also mapped to Python long integers. + +4) The stubs and skeletons generated by 'fnidl' now reference all Fnorb +modules explicitly, hence removing possible name clashes with user IDL files. + +5) Ugly bug in the parsing/marshalling of recursive types fixed. + +6) Locking bug in '_narrow' fixed. + +7) Bug in interface repository fixed so that 'fnfeed' now works as expected! + +8) A few other minor bug fixes from 1.0b1! + + +Things on the TODO RSN list:- + +1) Implement the POA +2) Implement the rest of the CORBA 2.1 datatypes +3) Move documentation to PDF format. + +Get more details and download Fnorb from:- + + http://www.dstc.edu.au/Fnorb + +The Fnorb Development Team + +c/o + +Martin + + _--_|\ Martin Chilvers, Voice: +61-7-3365-4310 +/ * Research Scientist, Architectures Unit, Fax: +61-7-3365-4311 +\_.--._/ DSTC, Level 7, GP South, Staff House Road, Email: martin at dstc.edu.au + v The University of Queensland, QLD 4072. + +---- From the Fnorb README ---- + +What is Fnorb? + +Fnorb is a CORBA 2.0 ORB written in Python (with just the eensiest-teensiest +bit of C code for marshalling and parsing ;^). Python is a mature, +interpreted, object-oriented programming language with powerful high-level +datatypes that make it ideally suited as a scripting language for CORBA. +Best of all Python is free so check it out! + +Like ILU from Xerox PARC, Fnorb gives the Python programmer access to the +wonderful world of CORBA. It supports all CORBA 2.0 datatypes (including +Any's) and provides a full implementation of IIOP. Unlike ILU, Fnorb is +Python and CORBA/IDL specific which makes it simple, light-weight, and easy +to install and use. + +Using Fnorb, you no longer have to use to write CORBA clients and servers - you can now +use, yep you guessed it, Python! This makes Fnorb ideal for prototyping +complex CORBA architectures, for use as a scripting tool, and for building +test harnesses for all your CORBA development projects. + +The Python language mapping used by Fnorb is based on the 'living' document +that is being prepared by members of the DO-SIG. One goal of Fnorb is to +allow the Python community to experiment with the mapping before we attempt +to set it in stone via the OMG standardisation process. + +Fnorb is being developed as part of the Hector project at the CRC for +Distributed Systems Technology based at the University of Queensland in +Brisbane, Australia. + + + + + + diff --git a/demo/ermis-f/python_m/cur/1658 b/demo/ermis-f/python_m/cur/1658 new file mode 100644 index 00000000..ae099e63 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1658 @@ -0,0 +1,49 @@ +From: boud at rempt.xs4all.nl (boud at rempt.xs4all.nl) +Date: Tue, 27 Apr 1999 15:00:19 GMT +Subject: Designing Large Systems with Python +References: +Message-ID: +Content-Length: 1790 +X-UID: 1658 + +David Steuber wrote: + +: Meanwhile, languages like Ansi Common Lisp have had features that +: allow you to prototype and build a large system at the same time. +: That is, the specification of the system becomes the system. People +: have done the same thing with Visual Basic, so I am told. +: + +Yes, they do. I should know - I'm working on a whopping great +big laboratory erp system built in Visual Basic. First there was +the prototype and it looked like a Windows program. Then there wasn't +enough time to start again and discard the prototype, so the prototype +became the specification, and in time, the system. Then the project +was delayed by about a year. Then there were performance problems +caused by conceptual errors that had to be rectified by hacking around. +Then suddenly, the whole blasted !@#$%^&* was more than ten million +lines, more than hundred dll's, numerous OCX'es, and countless forms, +all built by twenty to thirty novices in the art of programming, of whom +fifteen had left the company. It's more than painful or embarrasing... +And it's not the first time I've seen that happen. Sorry for the rant - +I just had to get it of my chest. I don't think Python really insures +you against these mistakes. + +: +: One other thing. Is the documentation that comes with Python +: sufficient to gain mastery of the language, or should I consider +: buying (yet) another book? +: + +I didn't find the online information quite enough - but the book +I got, Internet Programming with Python, isn't much better. It's a +bit too fond of telling me how not to do things, instead of how +things work. But that's just personal prejudice, and I think I just +should have bought Programming Python instead. +-- + +Boudewijn Rempt | www.xs4all.nl/~bsarempt + + + + diff --git a/demo/ermis-f/python_m/cur/1659 b/demo/ermis-f/python_m/cur/1659 new file mode 100644 index 00000000..f2662f41 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1659 @@ -0,0 +1,74 @@ +From: arcege at shore.net (Michael P. Reilly) +Date: Fri, 30 Apr 1999 20:17:24 GMT +Subject: Extension Doc bug +References: <14120.52559.376120.364972@weyr.cnri.reston.va.us> +Message-ID: +Content-Length: 2347 +X-UID: 1659 + +Fred L. Drake wrote: + +: Michael P. Reilly writes: +: > I just spent the morning trying to find a very obscure bug related to +: > the passing keyword arguments to a builtin method/function. + +: Michael, +: You didn't post your original code that exhibited the bug, so I +: can't be sure of my conclusions. If you can send source for enough of +: your extension module that someone can compile it, that would be +: helpful. +: My first inclination, however, is that you passed in illegal +: arguments to PyArg_ParseTupleAndKeywords(). Passing NULL for the +: keywords dictionary is allowed; I've been looking at the +: implementation and don't see a way for that to be a problem (but I +: might have missed something). + + +I don't have the code anymore, I took a more rudimentary approach. + +I wanted something to emulate PyArg_ParseTuple(args, ""); the documentation +for PyArg_ParseTupleAndKeywords() states that the format is exactly as +documented for PyArg_ParseTuple() ('A format string of zero or more "format +units"'), so I wrote something along the lines of: + + { static char *kwlist[] = { NULL }; + if (PyArg_ParseTupleAndKeywords(args, keywds, "", kwlist)) { + /* process no arguments */ + } else { + /* process arguments */ + } + } + +My current code is: + /* are there arguments? keywds might be NULL */ + if (PyTuple_Size(args) > 0 || + (keywds != NULL && PyDict_Size(keywds) > 0)) { + PyErr_Clear(); + if (ExpPy_stty(self->id, args, keywds)) { + result = Py_None; + Py_INCREF(Py_None); + } + } else + result = ExpPy_unparse_stty_tuple(self->id); + return result; + +And this seems to do me well enough. + +Still, regardless of there being a source bug (and my original posting +suggested that there was no bug), API users should be told that kwdict +might be passed NULL. Currently the doc only states (based on the +contents of http://www.python.org/doc/ext/parseTupleAndKeywords.html at +Fri Apr 30 16:14:26 EDT 1999): + The arg and format parameters are identical to those of the + PyArg_ParseTuple() function. The kwdict parameter is a dictionary of + keywords received as the third parameter from the Python runtime. + +Nothing is mentioned about the kwdict parameter being NULL, and that is +a documentation error (and the jist of my posting). + + -Arcege + + + + + diff --git a/demo/ermis-f/python_m/cur/1660 b/demo/ermis-f/python_m/cur/1660 new file mode 100644 index 00000000..27f90490 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1660 @@ -0,0 +1,33 @@ +From: befletch at my-dejanews.com (befletch at my-dejanews.com) +Date: Mon, 12 Apr 1999 22:57:32 GMT +Subject: ZopeHTTP speed problem. +Message-ID: <7etton$j4q$1@nnrp1.dejanews.com> +Content-Length: 1066 +X-UID: 1660 + +I downloaded Zope to kick the tires a bit. It looks very interesting, +but I am having a small problem with the ZopeHTTP server being really +slow. It is taking about 5 seconds per HTTP request. Does anyone have +an idea of what might be wrong here? + +Here's some details; ZopeHTTP is running on my 300Mhz W95 box. This +machine is on a LAN behind an NT proxy-server, but I don't think the +server is involved in anyway because even if I disable the server in +my (Netscape) browser and disconnect my machine from the LAN, I get +the same slow response time. So far, I am just messing with the Zope +management pages, unmodified out-of-the-box. I found I have to use +my machine's numeric IP address, not 'localhost' as the docs indicate. + +Hmm. That's all the potentially relevant details I can think of at +the moment. Aside from this speed problem, I am encouraged by what I +see here. + +Thanks for any help, +- Bruce + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/1661 b/demo/ermis-f/python_m/cur/1661 new file mode 100644 index 00000000..ede34ab1 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1661 @@ -0,0 +1,55 @@ +From: guido at CNRI.Reston.VA.US (Guido van Rossum) +Date: Tue, 13 Apr 1999 10:00:26 -0400 +Subject: Python console (please play) +In-Reply-To: Your message of "Tue, 13 Apr 1999 09:25:18 EDT." + <199904131325.JAA08848@python.org> +References: <199904131325.JAA08848@python.org> +Message-ID: <199904131400.KAA13455@eric.cnri.reston.va.us> +Content-Length: 1886 +X-UID: 1661 + +> I know it's been a long while since i last posted here, +> but i have been hacking lots of Python all the while. +> It's just that i mostly don't get to give it away. + +Hello Ka-Ping, glad to hear from you again! + +> Well, here's a little late-night hack i whipped up. +> Thought you might enjoy it, so i'll post it here. +> +> It all started with my annoyance at being forced to +> paste code into the Python interpreter one line at a +> time because the prompts foul things up. But there is +> plenty of boasting in the doc string, so i'll not add +> any more words here. +> +> Do let me know how you like it. + +Aww, I can see you've been away for a while! You're trying to +recreate the functionality of IDLE, the Interactive DeveLopment +Environment for Python that I've been hacking on lately, now that PTUI +seems no longer maintained. IDLE sports a colorizing, multiple-undo +Python source editor and an interactive shell that acts a lot like +yours (except that it subclasses from the source editor code so it +also has colorizing and multi-undo). + +If you want to play with IDLE, get the 1.5.2 distribution. A release +candidate is on the website, I'll probably post the final release +tonight. Go look in Tools/idle/. Also, the (admittedly painful) code +to parse a string of Python source and find out whether it is correct, +incorrect or incomplete has been codified in the new library module +codeop.py, and the logic of the command line interpreter has been +reimplemented in code.py. + +I did notice that you have one feature that IDLE doesn't have yet; +identifier completion based on the contents of the current namespace. +(It does have completion based on the current edit buffer, but that's +not the same.) Perhaps you could hack that feature into IDLE? + +Sorry to steal your thunder; I like your code a lot nevertheless! + +--Guido van Rossum (home page: http://www.python.org/~guido/) + + + + diff --git a/demo/ermis-f/python_m/cur/1662 b/demo/ermis-f/python_m/cur/1662 new file mode 100644 index 00000000..5fe61863 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1662 @@ -0,0 +1,45 @@ +From: mal at lemburg.com (M.-A. Lemburg) +Date: Tue, 06 Apr 1999 10:41:34 +0200 +Subject: SNMPy update +References: <7e1hiq$a71$1@Starbase.NeoSoft.COM> + <7ear25$ksf$1@news-sj-3.cisco.com> <14089.11820.416453.80124@bitdiddle.cnri.reston.va.us> +Message-ID: <3709C8BE.4257C9F1@lemburg.com> +Content-Length: 1512 +X-UID: 1662 + +Jeremy Hylton wrote: +> +> I'll second your sentiment! I did some work on an X.509 library +> written entirely in Python. Like you friend's SNMP code, it will +> probably never be released; I don't have time to finish it nor did I +> expect that I'd want to release it given the export control hassles. + +Just want to note that SSLeay/OpenSSL includes a pretty complete +X.509 lib and also routines to do ASN.1 encoding an decoding. +The main argument for using OpenSSL in this context is, of course, +that no export control restrictions apply. + +> However, it seemed clear to me that an ASN.1 compiler could be written +> to generate the encode/decode routines. If someone is interested in +> that, I've got some design notes and rough code on how to do the +> encode/decode and on how to build a backend for SNACC. (A free-ish +> ASN.1 compiler; the only one?) + +Not sure what you mean with "ASN.1" compiler. If you want a compiler +that does ASN.1 description -> Python function calling de/encoding +routines kind of thing, then I guess the ASN.1 stuff in OpenSSL +could help you getting started quite fast. + +Note that I have a project running with the intention to wrap OpenSSL +in an OO manner called mxCrypto (see the link below). + +-- +Marc-Andre Lemburg Y2000: 269 days left +--------------------------------------------------------------------- + : Python Pages >>> http://starship.skyport.net/~lemburg/ : + --------------------------------------------------------- + + + + + diff --git a/demo/ermis-f/python_m/cur/1663 b/demo/ermis-f/python_m/cur/1663 new file mode 100644 index 00000000..5e45b27a --- /dev/null +++ b/demo/ermis-f/python_m/cur/1663 @@ -0,0 +1,24 @@ +From: bernhard at alpha1.csd.uwm.edu (Bernhard Reiter) +Date: 6 Apr 1999 00:25:31 GMT +Subject: Is Python dying? +References: <7dos4m$usi$1@nnrp1.dejanews.com> <3700528A.3F0C047D@Lugoj.Com> <009e01be7a80$b20299b0$f29b12c2@pythonware.com> <7e1ju7$17k$1@eskinews.eskimo.com> +Message-ID: +X-UID: 1663 + +On 2 Apr 1999 05:17:59 GMT, Jonathon wrote: +> 5: O'Reilly is _not_ the only publisher of computer +> books. Find a publisher of either popular +> "easy" computer books, or one who likes niche +> markets. _An Idiot's Guide To Python_ would +> satisfy the first one. + +You cannot teach idiots programming. +I refuse buying any idiot's or for dummies guide, because +what can a book be good for that treats you as a dummy or idiot? + +Justmy 0.02 Euros + Bernhard + + + + diff --git a/demo/ermis-f/python_m/cur/1664 b/demo/ermis-f/python_m/cur/1664 new file mode 100644 index 00000000..32c320d2 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1664 @@ -0,0 +1,63 @@ +From: achrist at easystreet.com (Al Christians) +Date: Fri, 02 Apr 1999 14:28:32 -0800 +Subject: string.join() vs % and + operators +Message-ID: <37054490.E79ADCC9@easystreet.com> +Content-Length: 1668 +X-UID: 1664 + +Whereas Python's strings are immutable, there is potentially a strong +incentive to get them right the first time. In my applications, I +want to create strings that have many fields within them. I assume that +it would be nice to be able to modify the fields without creating a new +string any time its contents get changed, but I don't think that Python +gives any nice way to do this. So, I'm stuck with building the string +from many little pieces. The 'many' part of this gives me some worry +about efficiency, which it is better not to worry about, so I did a +brief test to see if there is ugly downside to this. I ran the +following script: + +# Start of Script +import string +# Create an array of little strings and a format to join them +s = [] +f = '' +for i in range(100): + s.append(`i`) + f = f + '%s' + +print "Start of Way 1 -- Create with a big format" +for i in range(100000): + z = f % tuple(s) +print "end of Way 1" +print z +raw_input() +print "Start of Way 2 -- Create with a join" +for i in range(100000): + z = string.join(s, '') +print "End of Way 2" +print z +raw_input() +print "Start of Way 3" +for i in range(100000): + z = '' + for j in s: + z = z + j +print "End of Way 3" +print z + +# End of Script + +This ran amazingly fast on my Pentium 200 Mhz -- around 11 seconds for +Way 1, and 7 for Way 2. So, either way, Python can put together about +1 million little strings in a second. Way 3, the way that one would +expect to be bad, recreating the string with each concatenation, was +much slower, but only took about 1 minute. Surprisingly swift as well. + +Anybody have anything to add to this? Are there any related pitfalls +that I may have missed? + +Al + + + + diff --git a/demo/ermis-f/python_m/cur/1665 b/demo/ermis-f/python_m/cur/1665 new file mode 100644 index 00000000..9faceb89 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1665 @@ -0,0 +1,36 @@ +From: wware-nospam at world.std.com (Will Ware) +Date: Wed, 28 Apr 1999 04:13:23 GMT +Subject: Python and C +References: <37243B44.AE6231AE@serop.abb.se> <7g5bom$g4n$1@Starbase.NeoSoft.COM> +Message-ID: +Content-Length: 1163 +X-UID: 1665 + +In article <37243B44.AE6231AE at serop.abb.se>, thstr wrote: +>I would like to add some kind of command interpreter to which you can +>type commands like "test functionA(arg1, arg2, ...)"... +>For some reasons I'd like this interpreter in Python (like a static +>module), linked with C at compile time, is this possible?? + +Some resources for this: + +Go to www.python.org and look under "Documentation", somewhere there +is a tutorial on embedding and extending the Python interpreter. This +describes how to write a C/Python interface. Doing this by hand is a +bit daunting, consider Swig (mentioned below). + +Look for the book "Programming Python" (author Mark Lutz, publisher +O'Reilly). This book may appear a little imposing but it has a lot +of good information, including writing C interfaces. + +Go to www.swig.org, which is about a program called Swig which will +automatically generate C/Python interface code from a very simple +description of your C functions. +-- + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Will Ware email: wware[at]world[dot]std[dot]com +PGP fp (new key 07/15/97) 67683AE2 173FE781 A0D99636 0EAE6117 + + + + diff --git a/demo/ermis-f/python_m/cur/1666 b/demo/ermis-f/python_m/cur/1666 new file mode 100644 index 00000000..dfb71e8b --- /dev/null +++ b/demo/ermis-f/python_m/cur/1666 @@ -0,0 +1,102 @@ +From: aa8vb at vislab.epa.gov (Randall Hopper) +Date: Tue, 20 Apr 1999 12:37:59 GMT +Subject: Tkinter performance +In-Reply-To: <371B4B39.8B78BC7A@foreman.ac.rwth-aachen.de>; from Greg Landrum on Mon, Apr 19, 1999 at 05:26:49PM +0200 +References: <371B4B39.8B78BC7A@foreman.ac.rwth-aachen.de> +Message-ID: <19990420083759.A133486@vislab.epa.gov> +Content-Length: 3994 +X-UID: 1666 + +Greg Landrum: + |I am thinking about doing a python/Tkinter port of a program +... + |The program does 3D graphics (molecular/crystal visualization + |and orbital plots). I handle all of the perspective/transformation + |stuff myself, so I don't need any 3D functionality. I do need + |something which can draw reasonably quickly however. + | + |Suppose I need to draw a couple hundred circles and several + |thousand line segments (these are mostly connected, so I can + |use things like XDrawLines to cut down function calls) at + |every update. + | + |1) Can Tkinter on a "typical" PC (say a P200) deliver a + |"reasonable" update rate (a couple of frames per second + |would probably cut it)? + +A few folks already mentioned PyOpenGL and VTK. The plus for OpenGL is of +course the use of its display lists which makes redraws much faster. +Hopefully TkGS will take off in the Tk world and OpenGL-accelerate the +canvas by default when OpenGL is available. + +VTK is a good option, but just to give you a flavor of raw canvas +performance, I can give you some samplings from my experiments. + +The canvas seems to have good internal optimizations. Given variability of +usage (not to mention different platforms which is also an issue), this is +just to give you a ballpark idea for performance on UNIX. + +Using Tk8.0 under Tkinter, here are some times for loading and drawing map +lines using Tkinter (under SGI IRIX): + +Load Times (approx): + + #lines (#vertices) Onyx Indigo2 + 600 ( 1,200) 0:02 0:18 + 2,000 ( 15,000) 0:05 0:30 + 30,000 (180,000) 0:52 6:00 + +Draw Rates (worst case - approx): + + #lines (#vertices) Onyx Indigo2 + 600 ( 1,200) 6-7 fps 6-7 fps + 2,000 ( 15,000) 5-6 fps 5-6 fps + 30,000 (180,000) 1 fps 0.4 fps + + Onyx - 195MHz R10000 + Indigo2 - 100Mhz R4000 + +I should mention that the Indigo2 is local. The Onyx X redraws are +traversing a 10base ethernet to get here, so frame rates take a hit there. + +Note that the canvas seems to have respectable optimizations in place so +the less that is visible (e.g. the more you're zoomed in, the faster +redraws get. Also if only a partial area needs redrawn, it redraws it +fairly quickly relative to the full-expose frame rate. It's obvious +there's some optimization going on when you load to make drawing faster. I +wish there were a "bulk-load" feature so this loading would be faster. + +Also, operations which can occur in C code are quick. E.g. telling the +canvas to scale and translate all 180,000 vertices (used for zooming the +canvas) occurs in around 1-2 seconds even on the slower Indigo2. + + |2) Is there anyway to do double-buffering to avoid flashing + |during redraws? + +It may be completely different on your OS, but here on SGI IRIX, redraws +appear all at once. It may be drawing into an off-screen pixmap/image, and +blitting to the screen. At any rate, no flashing occurs. YMMV. + +You might just try loading up some of your data. It really takes very few +lines of code to load up the canvas and play with performance. Be sure to +set width=0 for your lines. This appears to enable some internal +optimizations for drawing lines: + + canvas.create_line( vertices, width=0, fill="white" ) + +If the performance you see appears marginal, you might look into using VTK. +It's got good coverage of visualization primitives and operations. It will +use OpenGL when present (so you get use of your hardware display lists for +fast redrawing). It also supports (unlike the canvas) level-of-detail +rendering. So if the refresh rate isn't up to a certain threshold, it will +render objects using a simpler representation (bounding box, etc). to keep +interactivity up during pans, zooms, etc. and then render in full detail +when the "render-barrage" quits. I've worked with these same datasets in +VTK, registering them as PolyData with LODActors and gotten much better +interactive performance. + +Randall + + + + diff --git a/demo/ermis-f/python_m/cur/1667 b/demo/ermis-f/python_m/cur/1667 new file mode 100644 index 00000000..7becb5d1 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1667 @@ -0,0 +1,27 @@ +From: billtut at microsoft.com (Bill Tutt) +Date: Tue, 13 Apr 1999 16:22:26 GMT +Subject: site.py & COM startup +Message-ID: <4D0A23B3F74DD111ACCD00805F31D8100DB90B2B@RED-MSG-50> +X-UID: 1667 + +I typically do something like: + +k_strModuleName = "swv2Phoenix" + +if __name__ == "__main__": + import win32com.server.register + import sys, regsetup + # The next line is the equivalent of regsvr32 for a Python COM server. + win32com.server.register.UseCommandLine(swMapping) + # Tell the python DLL where to find this .py file + regsetup.FindRegisterModule(k_strModuleName, k_strModuleName + '.py', +sys.path) + +The call into regsetup, alters the Python registry settings to register +where the .py file is located at. + +Bill + + + + diff --git a/demo/ermis-f/python_m/cur/1668 b/demo/ermis-f/python_m/cur/1668 new file mode 100644 index 00000000..1738baf1 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1668 @@ -0,0 +1,61 @@ +From: dalke at bioreason.com (Andrew Dalke) +Date: Thu, 15 Apr 1999 11:04:38 -0600 +Subject: 1.5.2 broke IRIX module loading +References: <19990414110116.A1374923@vislab.epa.gov> +Message-ID: <37161C26.C121CA1E@bioreason.com> +Content-Length: 1940 +X-UID: 1668 + +Randall Hopper said: +> I built and tried 1.5.2 this morning, and it failed to load a module +> that worked fine on 1.5.1. + + We had the same problem on our SGIs. In our case, our vendors +accidentally shipped .a files with functions which reference other +functions of theirs which they didn't ship. + + We used SWIG to create a .so files from the .a, and with the +removal of RTLD_GLOBAL, this means we can no longer import our +module with 1.5.2 . + + This change was discuessed on the newsgroup some months back (sorry, +don't have a DejaNews reference handy) and the outcome was that +libraries shipped in this form are broken, and it must be done this +way so different shared libraries don't get namespace collisions. + + For us there were two ways around it: + 1) upgrade to our vendor's newest libraries + 2) create dummmy C functions which resolve the functions + +> "currstep" is the internal FORTRAN routine which has been zeroed-out. + + But I don't know what zeroed-out means in this context. For me +I found which were missing with "nm library.so | grep UNDEFINED" + + + I mentioned this problem to Guido when I tested 1.5.2c1 on our +SGIs; not that it had to be changed back but that people were going +to find this change unexpected. Here are his comments: + +Guido said: +| Unfortunately the conclusion of the debate about this was unanimously +| that using RTLD_GLOBAL is evil; even though it solves some real +| practical problems in some cases (like yours), it can break other +| things for which the only fix is to remove RTLD_GLOBAL. The cases +| where it is needed are always caused by bad programming (e.g. your +| vendor's). Sorry. +| +| [....] +| +| > And, if not, I'll just put "| RTLD_GLOBAL" into my dlopen. +| +| That would be the easiest solution for you, as long as you don't run +| into the other problem (conflicting externals defined in two +| libraries). + + Andrew Dalke + dalke at bioreason.com + + + + diff --git a/demo/ermis-f/python_m/cur/1669 b/demo/ermis-f/python_m/cur/1669 new file mode 100644 index 00000000..5a1d918a --- /dev/null +++ b/demo/ermis-f/python_m/cur/1669 @@ -0,0 +1,33 @@ +From: bernhard at alpha1.csd.uwm.edu (Bernhard Reiter) +Date: 11 Apr 1999 04:22:20 GMT +Subject: pythonwin COM Update link out of date +References: <7em639$fto$1@m2.c2.telstra-mm.net.au> +Message-ID: +X-UID: 1669 + +On Sat, 10 Apr 1999 10:30:55 +1000, Mark Hammond wrote: +>Bernhard Reiter wrote in message ... +>>http://www.python.org/ftp/python/pythonwin/pwindex.html#oadist +>Hmmmm.... is there a potential danger in installing oadist.exe? +>There _shouldnt_ be any danger! +Okay, I will try it, after I have mae a full backup in a few days. + +>These days it is getting quite unnecessary. If you have (I believe) IE4 or +>Office 97, you are pretty up-to-date, and that includes many PCs these days. +Hmm Excel'97 is on this machine, but not IE4? + +>You could try installing the Python stuff, and see if it works. +Most works, but the win32 stuff doesn't. + +> Also, see +>my other post this morning as to why the install may fail - try this out +>first. + +Both libraries are excactly the ones in the .zip archive. +Version 1.5.0.124 + + Bernhard + + + + diff --git a/demo/ermis-f/python_m/cur/1670 b/demo/ermis-f/python_m/cur/1670 new file mode 100644 index 00000000..b1e86436 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1670 @@ -0,0 +1,19 @@ +From: news at dorb.com (Darrell) +Date: Sat, 3 Apr 1999 10:45:47 -0500 +Subject: Rat sighting online +References: <199904021940.MAA04204@shell.rmi.net> +Message-ID: +X-UID: 1670 + +I don't knowing much about Java so I tried the Jpython example and got +stuck. It imports pickle which imports struct. Jpython doesn't seem to have +struct ? + + + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1671 b/demo/ermis-f/python_m/cur/1671 new file mode 100644 index 00000000..8a215076 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1671 @@ -0,0 +1,48 @@ +From: aa8vb at vislab.epa.gov (Randall Hopper) +Date: Fri, 16 Apr 1999 12:29:19 +0200 +Subject: 1.5.2 broke IRIX module loading +In-Reply-To: <37161C26.C121CA1E@bioreason.com>; from Andrew Dalke on Thu, Apr 15, 1999 at 11:04:38AM -0600 +References: <19990414110116.A1374923@vislab.epa.gov> <37161C26.C121CA1E@bioreason.com> +Message-ID: <199904161054.GAA09635@ethyl.rtpnc.epa.gov> +Content-Length: 1425 +X-UID: 1671 + +Thanks for the reply. + + |> "currstep" is the internal FORTRAN routine which has been zeroed-out. + | + | But I don't know what zeroed-out means in this context. For me + |I found which were missing with "nm library.so | grep UNDEFINED" + +I don't know exactly how they built this library, but somehow they +internalized the FORTRAN function names so that they are not exported by +the FORTRAN objects (e.g. currstep in currstep.o), while a dangling +reference exists to them in the C wrapper object (e.g. currstepc.o): + +Symbols from currstep.o: + + [Index] Value Size Class Type Section Name + + [0] | 0| |File |ref=16 |Text | /tmp_mnt/pub/storage/xcc/work/m3io/currstep.f + [1] | 0| |Proc |end=15 unsigned long |Text | currstep_ +->[2] | -8| |Local |unsigned long |Abs | currstep + + Symbols frstepc + + [Index] Class Type Section Name + + [0] | 0| |File |ref=15 |Text | /tmp_mnt/pub/storage/xcc/work/m3io/currstepc.c + [1] | 0| |Proc |end=14 int |Text | currstepc + [13] | 420| |End |ref=1 |Text | currstepc +->[101] | 0| |Proc | |Undefined| currstep + + +If one links with and calls any of these wrappers (e.g. currstepc()), it +works fine. + +Randall + + + + + diff --git a/demo/ermis-f/python_m/cur/1672 b/demo/ermis-f/python_m/cur/1672 new file mode 100644 index 00000000..5f6bb09d --- /dev/null +++ b/demo/ermis-f/python_m/cur/1672 @@ -0,0 +1,33 @@ +From: ajung at sz-sb.de (Andreas Jung) +Date: Thu, 8 Apr 1999 05:21:27 GMT +Subject: oracledb-0.1.2 and python 1.5.2b2 +In-Reply-To: <8825674C.007BA8E4.00@marshall.com>; from Lance Ellinghaus on Wed, Apr 07, 1999 at 03:30:35PM -0700 +References: <8825674C.007BA8E4.00@marshall.com> +Message-ID: <19990408072127.A6184@sz-sb.de> +X-UID: 1672 + +On Wed, Apr 07, 1999 at 03:30:35PM -0700, Lance Ellinghaus wrote: +> +> Has anyone gotten these two things to compile together and run? +> I am having trouble with the compile. Looks like something changed in the +> Makefile on Python 1.5.2b2 from +> previous python make files that makes oracledb-0.1.2 not compile. +> +> +Why don?t you use DCOracle available on www.zope.org ? + + +-- + _\\|//_ + (' O-O ') +------------------------------ooO-(_)-Ooo-------------------------------------- + Andreas Jung, Saarbr?cker Zeitung Verlag und Druckerei GmbH + Saarbr?cker Daten-Innovations-Center + Gutenbergstr. 11-23, D-66103 Saarbr?cken, Germany + Phone: +49-(0)681-502-1528, Fax: +49-(0)681-502-1509 + Email: ajung at sz-sb.de (PGP key available) +------------------------------------------------------------------------------- + + + + diff --git a/demo/ermis-f/python_m/cur/1673 b/demo/ermis-f/python_m/cur/1673 new file mode 100644 index 00000000..8f779b3d --- /dev/null +++ b/demo/ermis-f/python_m/cur/1673 @@ -0,0 +1,33 @@ +From: vkolosov at usa.net (VICTOR KOLOSOV) +Date: Tue, 13 Apr 1999 03:28:55 GMT +Subject: Error loading 'binascii' +Message-ID: <19990413032855.10759.qmail@nw179.netaddress.usa.net> +X-UID: 1673 + +Hi all, + +It seems like I've got this error already on two boxes, one runs FreeBSD and +the other one runs Solaris2.6 +Could anyone try it on his/her machine and see if it works or may be it is +damaged in distributions +installed here. Before trying the below 'import binascii' I've tried to encode +a file with mimetools.py +module and it gave me a core dump write in this 'import binascii' place. + +% python +Python 1.5.1 (#2, Oct 12 1998, 15:11:45) [GCC 2.7.2.1] on freebsd3 +Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam +>>> import binascii +Traceback (innermost last): + File "", line 1, in ? +ImportError: /usr/local/lib/python1.5/lib-dynload/binascii.so: Undefined +symbol "PyDict_SetItemString" +>>> + + +____________________________________________________________________ +Get free e-mail and a permanent address at http://www.netaddress.com/?N=1 + + + + diff --git a/demo/ermis-f/python_m/cur/1674 b/demo/ermis-f/python_m/cur/1674 new file mode 100644 index 00000000..a246a479 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1674 @@ -0,0 +1,24 @@ +From: faassen at pop.vet.uu.nl (Martijn Faassen) +Date: Wed, 21 Apr 1999 22:00:02 +0200 +Subject: How many of us are there? +References: <371E2648.DED123AE@callware.com> +Message-ID: <371E2E42.AF36F73C@pop.vet.uu.nl> +X-UID: 1674 + +Ivan Van Laningham wrote: +> +> Hello, Pythonistas-- +> Does anyone out there have some idea how many people subscribe to the +> mailing list, or read the newsgroup? +> +> -ly y'rs, + +Okay, I read the newsgroup. I'm here! Count me in! :) + +Okay-I-guess-that-wasn't-helpful-ly yours, + +Martijn + + + + diff --git a/demo/ermis-f/python_m/cur/1675 b/demo/ermis-f/python_m/cur/1675 new file mode 100644 index 00000000..ce11a631 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1675 @@ -0,0 +1,45 @@ +From: tim_one at email.msn.com (Tim Peters) +Date: Sat, 17 Apr 1999 17:08:41 GMT +Subject: Why no "=" in if? (was Re: Quick fix to add "+=") +In-Reply-To: +References: +Message-ID: <000401be88f4$f126c440$ee9e2299@tim> +X-UID: 1675 + +> can't-wait-for-a-resumption-of-the-assignment-expression-thread-ly +> y'rs - tim + +[Aahz Maruch] +> I'm getting really sick of the way I have to use this stupid construct: +> +> x = foo() +> if x: +> ... +> +> instead of +> +> if x = foo(): +> ... +> +> Why doesn't Guido get off his duff and fix this?????????! + +[John Baxter] +> Because it's not broken. + +[Aahz] +> Yes, it is. + +Excellent! We've now summarized in just 3 brief messages just about +everything that was said over the course of (literally) hundreds of msgs the +last time this came up <0.1 wink>. + +If anyone wants to continue this now, consider just posting a link to the +DejaNews article you would have otherwise rewritten. + +can't-wait-for-the-resumption-of-the-indexing-thread-ly y'rs - tim + + + + + + diff --git a/demo/ermis-f/python_m/cur/1676 b/demo/ermis-f/python_m/cur/1676 new file mode 100644 index 00000000..d1446464 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1676 @@ -0,0 +1,22 @@ +From: hat at se-46.wpa.wtb.tue.nl (Albert Hofkamp) +Date: 23 Apr 1999 14:22:07 GMT +Subject: Suggestion for alternative to map/filter functions +Message-ID: +X-UID: 1676 + +Hello all, + +While reading the tutorial, I noticed that Python has map and filter +functions. In our language we also had them, but they were replaced by +another language construct. +Unfortunately, I don't have time and experience enough to put this in +python myself, but if people are interested in it, I can provide details. + + +Albert +--- +Look ma, windows without Windows !! + + + + diff --git a/demo/ermis-f/python_m/cur/1677 b/demo/ermis-f/python_m/cur/1677 new file mode 100644 index 00000000..4609cbe4 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1677 @@ -0,0 +1,27 @@ +From: you at you.com (Gambler) +Date: Tue, 27 Apr 1999 09:48:32 GMT +Subject: Free US$5 for your gambling +Message-ID: <3725B240.52CED5E8@you.com> +X-UID: 1677 + +Hello everybody, + Once you sign-up and register for a new user, you will have US$5 for + +gambling! You ONLY download the setup file and install it. + +or try to visit these sites: +Cyber Thrill Casino +Avatar Casino + +-------------- next part -------------- +An HTML attachment was scrubbed... +URL: +-------------- next part -------------- +A non-text attachment was scrubbed... +Name: casino.exe +Type: application/octet-stream +Size: 69155 bytes +Desc: not available +URL: + + diff --git a/demo/ermis-f/python_m/cur/1678 b/demo/ermis-f/python_m/cur/1678 new file mode 100644 index 00000000..73f0a2c1 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1678 @@ -0,0 +1,41 @@ +From: invalid.address at do.not.email (guppy) +Date: Thu, 08 Apr 1999 21:25:44 GMT +Subject: Crappy Software was Re: [OffTopic: Netscape] Re: How should +References: <370c7a2d.35857749@news.bctel.ca> <1288614834-78399188@hypernet.com> +Message-ID: <37111e88.2387062@news.bctel.ca> +X-UID: 1678 + +On Thu, 8 Apr 1999 06:39:21 GMT, boud at rempt.xs4all.nl wrote: + +>Gordon McMillan wrote: +>: +>: There's even a difference between exiting from the file menu and +>: closing from the title bar. +>: +>: When's the last time you closed a GUI from the file menu?? +>: +>: Sheesh. +>: +> +>That rings a bell - it also occurred in the last version of Oracle +>Forms 4.5 I had the misfortune to work with. Worse, closing the app +>with alt-spacebar (for the system menu) would hang the whole of +>Windows. + + +Gahd. Yet another way to do it. The guy at Mackido (dunno the URL +offhand) documents twenty-odd other ways to close an app. + +Macintosh has three or four. + +One can develop quite a significant despisal of Windows when one starts +realizing just how lousy an interface it has... + +-- +MSpeak: in-no-va-tion, n. 1. extending or modifying +existing standards in undocumented ways. 2. creating +new, undocumented standards. --de-com-mod-it-ize, v. + + + + diff --git a/demo/ermis-f/python_m/cur/1679 b/demo/ermis-f/python_m/cur/1679 new file mode 100644 index 00000000..55996e88 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1679 @@ -0,0 +1,55 @@ +From: tim_one at email.msn.com (Tim Peters) +Date: Thu, 8 Apr 1999 06:26:17 GMT +Subject: Chaning instance methods +In-Reply-To: <370C2904.A6F4BD54@inrialpes.fr> +References: <370C2904.A6F4BD54@inrialpes.fr> +Message-ID: <000801be8188$b59aa9a0$749e2299@tim> +X-UID: 1679 + +[Vladimir Marangozov, with much good advice] +> ... +> Thus we arrive at the easy & boring solution, which goes along +> these lines: +> (it's an instance hack too, but a recognized one in metaobject +> communities) +> +> >>> class Foo: +> ... def m(self): +> ... print "Foo.m" +> ... +> >>> f = Foo() +> >>> f.m() +> Foo.m +> >>> +> >>> def m2(self): +> ... print "m2" +> ... +> >>> class Bar(f.__class__): pass +> ... +> >>> Bar.m = m2 +> >>> +> >>> f.__class__ = Bar # f changes its camp +> >>> f.m() +> m2 + +When I signed my exposition of instance-method trickery "subclassing-is- +a-lot-easier-ly y'rs", I had exactly this in mind: + +class Bar(Foo): + def m(self): + print "m2" + +f = Bar() + +Over the years, *most* people who have asked questions akin to Jody's really +could have done this-- the *wholly* obvious thing! --from the start. Maybe +it's a "define a whole new class just to change one method?!" reluctance +left over from C++ <0.9 wink>. + +catering-to-laziness-can-be-counterproductive-ly y'rs - tim + + + + + + diff --git a/demo/ermis-f/python_m/cur/1680 b/demo/ermis-f/python_m/cur/1680 new file mode 100644 index 00000000..5e45f7cc --- /dev/null +++ b/demo/ermis-f/python_m/cur/1680 @@ -0,0 +1,43 @@ +From: heinkel at embl-heidelberg.de (Ralph Heinkel) +Date: 12 Apr 1999 06:50:42 GMT +Subject: bug report: profiler +Message-ID: <7es542$94v$1@beta.EMBL-Heidelberg.DE> +X-UID: 1680 + +Hi, + +when trying to run the profiler calibration explained in the python +documentation, I got the following error: + + +Python 1.5.1 (#8, Dec 18 1998, 09:42:46) [GCC 2.7.2.1] on linux2 +Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam +>>> import profile +>>> pr = profile.Profile() +>>> print pr.calibrate(100) +Traceback (innermost last): + File "", line 1, in ? + File "/usr/local/lib/python1.5/profile.py", line 498, in calibrate + self.instrumented() + File "/usr/local/lib/python1.5/profile.py", line 515, in instrumented + self.profiler_simulation(a, a, a) + File "/usr/local/lib/python1.5/profile.py", line 520, in profiler_simulation + t = t[0] + t[1] +AttributeError: __getitem__ + + +Ralph +-- +------------------------------------------------------ +Ralph Heinkel +European Molecular Biology Laboratory (EMBL) +Meyerhofstr. 1 +69012 Heidelberg +Tel. +49 6221/387 529 +eMail: heinkel at dummy.embl-heidelberg.de + +Please remove the 'dummy' from my email address. + + + + diff --git a/demo/ermis-f/python_m/cur/1681 b/demo/ermis-f/python_m/cur/1681 new file mode 100644 index 00000000..ec205471 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1681 @@ -0,0 +1,25 @@ +From: aa8vb at vislab.epa.gov (Randall Hopper) +Date: Wed, 14 Apr 1999 12:10:51 GMT +Subject: Python 1.5.2 Build Caveat +Message-ID: <19990414081051.A1364941@vislab.epa.gov> +X-UID: 1681 + + Just got it built this morning. + + If $PYTHONPATH (used to "augment" the Python run-time module search +path) is set when building Python v1.5.2, this "overrides" the default +search path and prevents Python from finding it's own modules unaided. + + This wasn't intuitive behavior to me. $PYTHONPATH needs to be set to +add run-time search directories. If used by the build process at all, it +should be for adding default search directories, not overriding the +default. + + Personally, I'd favor not even using $PYTHONPATH in the build process. +That's the function of configure --prefix. + +Randall + + + + diff --git a/demo/ermis-f/python_m/cur/1682 b/demo/ermis-f/python_m/cur/1682 new file mode 100644 index 00000000..9f2f5ccd --- /dev/null +++ b/demo/ermis-f/python_m/cur/1682 @@ -0,0 +1,32 @@ +From: aa8vb at vislab.epa.gov (Randall Hopper) +Date: Mon, 19 Apr 1999 14:24:06 GMT +Subject: 'import exceptions' failed +In-Reply-To: <371B1201.392B@iname.com>; from Jussi Jumppanen on Mon, Apr 19, 1999 at 10:22:41PM +1100 +References: <371B1201.392B@iname.com> +Message-ID: <19990419102406.B62714@vislab.epa.gov> +X-UID: 1682 + +Jussi Jumppanen: + |I have compiled the python source into a Windows DLL and using +... + |the macro runs fine and produces the expected ouput in the + |text editor, but I also get the following messages sent to + |stderr: + | + | 'import exceptions' failed; use -v for traceback + | defaulting to old style exceptions + | 'import site' failed; use -v for traceback + +I don't know if your case is the same, but when I saw this, I discovered +that if $PYTHONPATH (normally used to augment Python's run-time module +search path) is defined when Python is built. This completely overrides +the default Python search path which it uses to find its own modules. + +As I recall, "import exceptions" was the first thing it complained about. +I think site was the second but I'm not certain. + +Randall + + + + diff --git a/demo/ermis-f/python_m/cur/1683 b/demo/ermis-f/python_m/cur/1683 new file mode 100644 index 00000000..5cb1599b --- /dev/null +++ b/demo/ermis-f/python_m/cur/1683 @@ -0,0 +1,215 @@ +From: mfletch at vrtelecom.com (Mike Fletcher) +Date: Sat, 24 Apr 1999 22:08:00 GMT +Subject: Some win32 registry functions (black, dangerous magic) +Message-ID: +Content-Length: 7147 +X-UID: 1683 + +I often have the desire to create/modify registry entries which are not the +"default" entries, and until today I've always considered this stuff very +black magic (why two types of every function, why do I need to open a key, +yada, yada). + +The following is a module which provides a few features beyond the +regutil.py package distributed with win32all... + + 1) You specify keys as single paths, not root-key+path + 2) You can store non-int/non-string objects (pickled) + 3) You can store named values with the same command as default +values + 4) Has a "register python scripts as executables" function +(example, NT only) + 5) Has an "add directory to system path" function (example, NT +only) + +I'd appreciate it if the Windows gurus could take a look and point out +anything I've done which might scramble someone's registry. This is a +blatant rip-off of Mark Hammond's regutil.py . + +Hereby released for whatever purpose, but at your own risk. No warranties +expressed, implied or scandalised. + +8<____________________ regutilsex.py _____ + +import win32api, win32con, string, types + +def _getDataType( data, coerce = 1 ): + ''' + Return a tuple of dataType, data for a given object + automatically converts non-string-or-tuple-data into + strings by calling pickle.dumps + ''' + if type( data ) is types.StringType: + return win32con.REG_SZ, data + elif type( data ) is types.IntType: + return win32con.REG_DWORD, data + # what about attempting to convert Longs, floats, etceteras to ints??? + elif coerce: + import pickle + return win32con.REG_SZ, pickle.dumps( data ) + else: + raise TypeError, '''Unsupported datatype for registry, use +getDataType( data, coerce=1) to store types other than string/int.''' + +def _getBaseKey( fullPathSpec ): + ''' + Split a "full path specification" registry key + into its root and subpath components + ''' + key = '' + subkey = fullPathSpec + # while loop will strip off preceding \\ characters + while subkey and not key: + key, subkey = string.split( fullPathSpec, '\\', 1 ) + try: + return getattr( win32con, key ), subkey + except AttributeError: + raise '''Unknown root key %s in registry path %s'''% (key, +fullPathSpec) + +def RegSetValue( key, valuename='', data='', allowPickling=1 ): + ''' + Set a registry value by providing a fully-specified + registry key (and an optional sub-key/value name), + and a data element. If allowPickling is true, the + data element can be any picklable element, otherwise + data element must be a string or integer. + ''' + root, subkey = _getBaseKey( key ) + dataType, data = _getDataType( data, allowPickling ) + try: + hKey = win32api.RegOpenKeyEx( root , subkey, 0, +win32con.KEY_ALL_ACCESS) # could we use a lesser access model? + except: + hKey = win32api.RegCreateKey( root, subkey ) + try: + if not valuename: # the default value + win32api.RegSetValue( hKey, valuename, dataType, data ) + else: # named sub-value + win32api.RegSetValueEx( hKey, valuename, 0, dataType, data ) + finally: + win32api.RegCloseKey( hKey) + +def RegQueryValue( key, valuename='', pickling=0 ): + ''' + Get a registry value by providing a fully-specified + registry key (and an optional sub-key/value name) + If pickling is true, the data element will be + unpickled before being returned. + ''' + #print 'key', key + root, subkey = _getBaseKey( key ) + if not valuename: # the default value + data, type = win32api.RegQueryValue( root , subkey) + else: + try: + #print root, subkey + hKey = win32api.RegOpenKeyEx( root, subkey, 0, +win32con.KEY_READ) + #print hKey, valuename + try: + data, type = win32api.RegQueryValueEx( hKey, valuename ) + except: # + data, type = None, 0 # value is not available... should we +raise an error here instead??? + pickling = None + finally: + win32api.RegCloseKey( hKey) + if pickling: + import pickle + data = pickle.loads( data ) + return data + + +################## EXAMPLES FOLLOW +def AddPathEntry( newEntry, user = 1, prepend=0 ): + ''' + Add or remove path entry on NT, use prepend == -1 for removal, + use prepend == 0 for append, prepend= 1 for prepending to the + current path. + ''' + if user: + user = 'USER' + else: + user = 'MACHINE' + key, valuename = COMMON_KEYS[ (user, 'PATH') ] + _PathManager( key, valuename, newEntry, prepend ) + +def PyExecutables( user = 1, prepend=0 ): + ''' + Register/Deregister Python files as executables + ''' + if user: + user = 'USER' + else: + user = 'MACHINE' + key, valuename = COMMON_KEYS[ (user, 'PYEXECUTABLES') ] + # the default executables + Python scripts... + if prepend < 0: # are to eliminate only .py + newEntry = '.PY' + else: + newEntry = '.PY;.COM;.EXE;.BAT;.CMD' + _PathManager( key, valuename, newEntry, prepend ) + +def _PathManager( key, valuename, newEntry, prepend=0, +eliminate_duplicates=1 ): + ''' + Create a new Path entry on NT machines (or kill an old one) + user determines whether to alter the USER or the Machine's path + prepend + 1 -> add newEntry to start + 0 -> add newEntry to end + -1 -> don't add newEntry + eliminate_duplicates determines whether to kill equal paths + + All values are converted to lower case + ''' + # get current value... + curval = RegQueryValue( key, valuename ) or '' + # split into elements + curval = string.split( string.lower(curval), ';' ) + if type( newEntry ) not in (types.ListType, types.TupleType): + newEntry = string.split( string.lower(newEntry), ';' ) + # eliminate duplicates of the newEntry + curval = map( None, curval) # strip out null entries + if eliminate_duplicates: + newval = [] + for p in curval: + if p not in newEntry: + newval.append( p ) + curval = newval + if prepend == 1: + curval = list(newEntry) + curval + elif prepend == 0: + curval = curval + list( newEntry ) + elif prepend == -1: # this call is just killing the path entry + pass + #now do the recombination + curval = string.join( curval, ';' ) + RegSetValue( key, valuename, curval ) + +# following constants seem to reflect where path data is stored on NT +machines +# no idea if it'll work on a 95 machine + +COMMON_KEYS = { +('USER','PATH') : ('''HKEY_CURRENT_USER\\Environment''', 'path'), +('MACHINE','PATH') : +('''HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session +Manager\\Environment''', 'path'), +('USER','PYEXECUTABLES') : ('''HKEY_CURRENT_USER\\Environment''', +'pathext'), +('MACHINE','PYEXECUTABLES') : +('''HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session +Manager\\Environment''', 'pathext') +} + +____________________________________________________ + Mike C. Fletcher -- Virtual Environment Designer + mcfletch at vrtelecom.com + http://www.vrtelecom.com + + + + + diff --git a/demo/ermis-f/python_m/cur/1684 b/demo/ermis-f/python_m/cur/1684 new file mode 100644 index 00000000..cb3250f9 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1684 @@ -0,0 +1,29 @@ +From: aa8vb at vislab.epa.gov (Randall Hopper) +Date: Fri, 16 Apr 1999 21:40:16 GMT +Subject: Tkinter Canvas & Fast Scrolling/Dragging +Message-ID: <19990416174016.A1559856@vislab.epa.gov> +X-UID: 1684 + +Since the Canvas doesn't implement a "level of detail" control, I'd like +implement it. + +Basically, what I want to do is turn off filling of canvas objects +temporarily while the user is scrolling the canvas or they're dragging one +of the shapes. When the operation is finished (user releases the mouse), +I'll turn fill back on. + +The idea here being that the canvas seems to be pretty responsive for me +until it has to draw stipple shapes. Then it's painfully slow. + +I know how to do this for dragging, but I don't know where to "hook in" for +scrolling. + +Any suggestions? + +Thanks, + +Randall + + + + diff --git a/demo/ermis-f/python_m/cur/1685 b/demo/ermis-f/python_m/cur/1685 new file mode 100644 index 00000000..6c7a6249 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1685 @@ -0,0 +1,45 @@ +From: donn at u.washington.edu (Donn Cave) +Date: 12 Apr 1999 17:38:45 GMT +Subject: forking + stdout = confusion +References: <7jlnfyowd3.fsf@gandalf.midearth.fuzzys.org> +Message-ID: <7etb35$16v2$1@nntp6.u.washington.edu> +Content-Length: 1482 +X-UID: 1685 + +Julien Oster writes: +... +| I ran in exactly the same problem. I tried closing all stdxxx-filedescriptors, +| setting a new session id with setsid, also tried it with setting a new +| progress groups, and I even tried to reopen stdin, stderr and stdout to +| /dev/null, but nothing helped. Then I saw that in OpenBSD, there's a function +| in stdlib.h called "daemon()". You simply call it, and it puts the running +| program in the background (it forks and exits the parent), redirects the +| stdxxx-descriptors, sets a new session ID etc... and with this function, it +| works! + +I wonder if you could get the effect by iteratively closing all potential +file descriptors? This is a pretty common sight in service daemon programs. +In Python it's a little more awkward because you have to guess the range +of possible descriptors, which a C program could get from getdtablesize(). + + wereopen = [] + for i in range(128): + try: + os.close(i) + wereopen.append(i) + except os.error: + pass + fp = open('log', 'w') + fp.write('closed units %s\n' % repr(wereopen)) + +The other things I've seen daemon() do are basically Berkeley terminal +driver issues, to drop the controlling terminal and isolate the program +from the job control session that started it -- not relevant there, since +the HTTP service daemon didn't start it that way. + + Donn Cave, University Computing Services, University of Washington + donn at u.washington.edu + + + + diff --git a/demo/ermis-f/python_m/cur/1686 b/demo/ermis-f/python_m/cur/1686 new file mode 100644 index 00000000..4435a052 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1686 @@ -0,0 +1,37 @@ +From: bwizard at bga.com (Purple) +Date: Sun, 25 Apr 1999 23:01:34 GMT +Subject: Handling backspace chars in a string... +Message-ID: <37239c48.594910176@news2.bga.com> +X-UID: 1686 + +I'm in the posistion of having to process strings with arbitrary +numbers of backspace and newline characters in them. The backspaces +actually get put in the string, so I have to handle removing the +characters that are backspaced over. Currently I'm doing this +something like this (hastily retyped mostly from memory so forgive any +small errors and/or typos) : + + i = len(str) + while ktr < i: + if string[ktr] == '\b': + bBegin = ktr + backs = 0 + while string[ktr] == '\b': + backs = backs + 1 + ktr = ktr + 1 + if backs > (ktr - backs - 1): # backs > prior chars + string = string[bBegin+backs:] + ktr = 0 + else: + string = string[:bBegin-backs] + string[ktr:] + ktr = bBegin - backs + i = len(str) + ktr = ktr + 1 + +This just looked rather messy to me -- I was curious if anyone know a +better way? + + + + + diff --git a/demo/ermis-f/python_m/cur/1687 b/demo/ermis-f/python_m/cur/1687 new file mode 100644 index 00000000..fbc83a66 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1687 @@ -0,0 +1,52 @@ +From: ivnowa at hvision.nl (Hans Nowak) +Date: Tue, 20 Apr 1999 22:14:50 GMT +Subject: User-defined variables / compilation +In-Reply-To: <371C92BA.2C6C883F@igd.fhg.de> +References: <371C92BA.2C6C883F@igd.fhg.de> +Message-ID: <199904202112.XAA21411@axil.hvision.nl> +Content-Length: 1369 +X-UID: 1687 + +On 20 Apr 99, Ce'Nedra took her magical amulet and heard Jan Thomczek say: + +>Hello, +> +>I?m new to this newsgroup and maybe you?ll say "Wow! What a stupid +>question..." I think you?re right- + +No way... There are no stupid questions... Although that "why no +=" question +comes pretty close... ;^) + +>I used to program in Turbo-Pascal 6. I installed Python on my NT +>4.0-machine. +> +>I wonder how is the procedure to define the varibles by a user like +>"readln(x);" I?m sure there is a simple way to do so. + +I'm not sure what you mean... do you mean, how to write a function that is +able to change the value of x? Since that's what ReadLn does... + +Th answer is: you can't. You can use a function instead; in this case, Python +has raw_input for this, and you just call it like this: + +myname = raw_input("Hi! What's your name? ") + +which is more or less equivalent to Turbo's + +Write('What''s your name? '); ReadLn(MyName); + +>Another question is: How do I *compile* the lines I have written to an +>*.exe-file? + +There are some tools for this... I never used them myself though. Look into +DejaNews for 'freeze'. I'm sure others can tell you more about this. + + ++ Hans Nowak (Zephyr Falcon) ++ Homepage (under construction): http://www.cuci.nl/~hnowak/ ++ You call me a masterless man. You are wrong. I am my own master. ++ May a pirate chase you for your mashed potatoes! + + + + diff --git a/demo/ermis-f/python_m/cur/1688 b/demo/ermis-f/python_m/cur/1688 new file mode 100644 index 00000000..ea98f259 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1688 @@ -0,0 +1,75 @@ +From: rhww at erols.com (R Wentworth) +Date: Mon, 19 Apr 1999 19:21:22 -0400 +Subject: Using JPython in servlets? +Message-ID: <371BBA72.5D24945F@erols.com> +Content-Length: 1853 +X-UID: 1688 + +I don't know if this newsgroup is intended to deal with +issues regarding JPython (implementation of Python +that is tightly coupled to Java and runs under the JVM), +but if this is an appropriate forum... + +Can anyone tell me the secret(s) to getting JPython servlets +to run, or even allowing JPython classes to successfully be +accessed from a Java servlet? (This is under JRun, latest version, +and Java 1.1.7, running under Solaris.) I'm running into +a seemingly bizarre problem. + +Here is a simple example of what I'm seeing: + +-- J.java -- + + public abstract interface J {} + +-- X.py -- + + import J + class X(J): + pass + +-- Test.java -- + + ...working servlet code... + new X(); + ...working servlet code continued... + +---------------- + +Symptom. Access the servlet GET method via the web, and see +a page titled "JRun Servlet Error": + + Test: + + Traceback (innermost last): + (no code object) at line 0 + AttributeError: class 'X' has no attribute 'X' + +---------------- + +I *have* managed to discover one other circumstance +that produces this same type of error. Suppose I +have a Java application (as opposed to a servlet) +which tries to do "new X()". This works just fine +if CLASSPATH is set to the value seen by servlets, +i.e., a CLASSPATH including "jpython.jar"; however, +if I alter the CLASSPATH so that it points to either +no jpython libraries, or to an unzipped version of +jpython.jar, then I get a "class 'X' has no attribute 'X'" +error. So it seems like the error may have something +to do with not being able to get at appropriate JPython +library code. But the servlet CLASSPATH *does* include +"jpython.jar", so this wouldn't seem to explain the +problem. + +Anyone have any clue whatsoever about what might be +wrong with the configuration, or how I might go +about debugging this?? + +Thanks in advance, +Robert Wentworth +rhww at erols.com + + + + diff --git a/demo/ermis-f/python_m/cur/1689 b/demo/ermis-f/python_m/cur/1689 new file mode 100644 index 00000000..763f7338 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1689 @@ -0,0 +1,38 @@ +From: nathan.froyd at rose-hulman.edu (Nathan Froyd) +Date: 25 Apr 1999 01:10:54 -0500 +Subject: pickling and unpickling on the same file? +References: <01c001be8edb$066c5ea0$0301a8c0@cbd.net.au> +Message-ID: +X-UID: 1689 + +"Mark Nottingham" writes: +> Have you looked at the shelve module? +> > Is there any way to implement the above beast? Something like: +> > +> > p = Pickler(file) +> > u = Unpickler(file) +> > +> > file.seek(random_pos) +> > x = u.load() +> > +> > z = [7, 8, 9] +> > p.dump(z) +> > +> > would be perfect + +No, I haven't -- I have to implement a weenie database on my own, and +I thought that anything that interfaced to an already-written database +would not be good. :) + +But the point is moot, because the above code does work in my example +file. It didn't work before. I'm not sure what I changed, but I'm +happy that it did! +-- +Nathan | nathan.froyd at rose-hulman.edu | http://www.rose-hulman.edu/~froydnj/ +God went through hell so we don't have to. ICQ:18861764 | AOL:myrlyn007 +Avoid the gates of hell. Use Linux. Python:"x='x=%s;x%%`x`';x%`x`" +Evolution is a million line computer program falling into place by accident. + + + + diff --git a/demo/ermis-f/python_m/cur/1690 b/demo/ermis-f/python_m/cur/1690 new file mode 100644 index 00000000..e3f0e821 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1690 @@ -0,0 +1,50 @@ +From: francois.bedard at usa.net (Francois Bedard) +Date: Sun, 11 Apr 1999 05:10:09 GMT +Subject: Python's object model +Message-ID: <37102ED0.933EDDA6@usa.net> +X-UID: 1690 + +Hello, + +I'm new at Python. In the following program, "stack_1 pops stack_2's +content" (that's actually what it prints), which is obviously not what +I'm after - nor would expect. Is this how Python's object model really +works (kindly explain), is there some arcane rule that I've missed, or +is there some obvious mistake I just can't see? + +Aside from a few such quirks, it's quite an interesting language (I'm +using 1.5.1 - on both Linux and NT). + +Thanks, + +Francois + +------------------------------------- + +class Stack: + stack = [] + + def push(self, value): + self.stack.append(value) + + def pop(self): + result = self.stack[-1] + del self.stack[-1] + return result + +class System: + stack_1 = Stack() + stack_2 = Stack() + + def __init__(self): + self.stack_1.push('stack_1\'s content') + self.stack_2.push('stack_2\'s content') + print 'stack_1 pops', self.stack_1.pop() + +# 'main' + +system = System() + + + + diff --git a/demo/ermis-f/python_m/cur/1691 b/demo/ermis-f/python_m/cur/1691 new file mode 100644 index 00000000..6b268162 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1691 @@ -0,0 +1,25 @@ +From: palpa at bogus.bogus.com (Henrique Almeida) +Date: Fri, 16 Apr 1999 14:24:44 -0300 +Subject: pty, qwsv and Python +Message-ID: <3717725B.34F2E34A@bogus.bogus.com> +X-UID: 1691 + +Warning: NO native speaker ahead. + +Hi. + +I'm new to Python (only started looking at the docs yesterday). I want +to know if it is possible to control a qwsv (quake world linux server) +using Python: ie do a "status" command in the qwsv every 5 minutes, +process the returned code, watch for some string in the pty... + +After searching the Python home page it looks like popen2() is the way +to go. Is it? Also, is it possible to use "screen" (a program that let +me "detach" the server) and "popen2" at the same time? I would like have +a interactive session to qwsv to do administration. + +Thanks. + + + + diff --git a/demo/ermis-f/python_m/cur/1692 b/demo/ermis-f/python_m/cur/1692 new file mode 100644 index 00000000..a72962d0 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1692 @@ -0,0 +1,47 @@ +From: paul at prescod.net (Paul Prescod) +Date: Mon, 26 Apr 1999 18:39:18 GMT +Subject: Python too slow for real world +References: <372068E6.16A4A90@icrf.icnet.uk> + <3720A21B.9C62DDB9@icrf.icnet.uk> + <3720C4DB.7FCF2AE@appliedbiometrics.com> + <3720C6EE.33CA6494@appliedbiometrics.com> + + + <37215EFB.433AFCA6@prescod.net> +Message-ID: <3724B2D6.B468687A@prescod.net> +Content-Length: 1190 +X-UID: 1692 + +Roy Smith wrote: +> +> It is extremely rare that regex compilation time is a major issue. + +I didn't mean to imply it was. Justin asked about the benefits +of "first class regexps" so I pointed out one. + +> If +> you're using a regex inside your inner loop and the amount of data you +> feed through it is large enough to matter, you should be compiling it +> yourself outside the loop. It's still done at run-time, but it's only +> done once so it's almost certainly a trivial amount of time devoted to +> that. + +It is a performance issue if you don't know that regexps are supposed to +be compiled. Plus it is a code complexity issue. Having the language +handle it for you automatically is in keeping with other aspects of +Python's design. Heck, I don't even have to compile Python *programs*. + +-- + Paul Prescod - ISOGEN Consulting Engineer speaking for only himself + http://itrc.uwaterloo.ca/~papresco + +Company spokeswoman Lana Simon stressed that Interactive +Yoda is not a Furby. Well, not exactly. + +"This is an interactive toy that utilizes Furby technology," +Simon said. "It will react to its surroundings and will talk." + - http://www.wired.com/news/news/culture/story/19222.html + + + + diff --git a/demo/ermis-f/python_m/cur/1693 b/demo/ermis-f/python_m/cur/1693 new file mode 100644 index 00000000..e4d9ccf7 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1693 @@ -0,0 +1,23 @@ +From: roy at popmail.med.nyu.edu (Roy Smith) +Date: Wed, 14 Apr 1999 13:04:23 -0400 +Subject: forking + stdout = confusion +References: <87n20caldg.fsf@spock.localnet.de> +Message-ID: +X-UID: 1693 + +> >>> import sys +> >>> sys.getrefcount (sys.stdout ) +> 5 +> +> Five! I don't know where all of those are... + +Yowza! That certainly explains a lot of the problems I had! + +-- +Roy Smith +New York University School of Medicine + + + + + diff --git a/demo/ermis-f/python_m/cur/1694 b/demo/ermis-f/python_m/cur/1694 new file mode 100644 index 00000000..19921434 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1694 @@ -0,0 +1,17 @@ +From: ajung at sz-sb.de (Andreas Jung) +Date: Mon, 19 Apr 1999 07:25:25 GMT +Subject: bzip2 module for Python +Message-ID: +X-UID: 1694 + +Is there a module for the bzip2 compression library available +or in the making ? + +Thanks +Andreas + + + + + + diff --git a/demo/ermis-f/python_m/cur/1695 b/demo/ermis-f/python_m/cur/1695 new file mode 100644 index 00000000..5b803ed1 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1695 @@ -0,0 +1,42 @@ +From: olipt at mayo.edu (Travis Oliphant) +Date: Tue, 20 Apr 1999 07:54:26 -0500 +Subject: what is reloc error ? +In-Reply-To: <371A1E26.846AF8B6@pk.highway.ne.jp> +References: <371A1E26.846AF8B6@pk.highway.ne.jp> +Message-ID: +X-UID: 1695 + +> Hello, everyone. +> I am now working on building Python interface +> to my C++ matrix library. +> +> I have a problem. +> After compiling and when trying to import my +> module +> I get following message. +> +> % gcc -c XXXtype.cc +> % gcc -c subXXXtype.cc +> ....................... +> % ld -o XXXtype.so -dy -G -g *.o -lstdc++ +> % python -c "import XXXtype" +> python: can't handle reloc type +> <====this!!! + +I'm not entirely sure if this will fix your problem, but +I think you need to give a flag to gcc to tell it to make a shared +library. + +Try gcc -fPIC -c *.cc # not sure if this is necessary with gcc +and ld -shared -o XXXtype.so *.o + + +Good luck, + + +Travis + + + + + diff --git a/demo/ermis-f/python_m/cur/1696 b/demo/ermis-f/python_m/cur/1696 new file mode 100644 index 00000000..5f9467c0 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1696 @@ -0,0 +1,19 @@ +From: fredrik at pythonware.com (Fredrik Lundh) +Date: Fri, 30 Apr 1999 12:15:47 GMT +Subject: info +References: <37260fc0.3063146@news.tiscalinet.it> +Message-ID: <002801be9303$2fb1a9b0$f29b12c2@pythonware.com> +X-UID: 1696 + +> Where I can find any docs about Python' semantics ? + +http://www.python.org +http://www.python.org/doc/ + + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1697 b/demo/ermis-f/python_m/cur/1697 new file mode 100644 index 00000000..d6942b38 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1697 @@ -0,0 +1,45 @@ +From: duncan at rcp.co.uk (Duncan Booth) +Date: 15 Apr 1999 08:45:36 GMT +Subject: stupid Win-CGI getting started question +References: <7f0f0h$pfb$1@nnrp1.dejanews.com> <8DA86302Bduncanrcpcouk@news.rmplc.co.uk> <7f2db8$dev$1@nnrp1.dejanews.com> +Message-ID: <8DA96361Fduncanrcpcouk@news.rmplc.co.uk> +Content-Length: 1413 +X-UID: 1697 + +bill_seitz at my-dejanews.com wrote in <7f2db8$dev$1 at nnrp1.dejanews.com>: +>I tried your test.cmd (after changing the first line, using your quoted path +>and making it my path of course). Now I get a response back of internal or +>external command, operable program or batch file. The server acts shows this +>as a successful delivery (no error in the logs, status=200). Does that mean +>the problem is now within Python? + +Looks like you are getting the second line of the message: +The name specified is not recognized as an +internal or external command, operable program or batch file. + +It sounds like you still don't have the right path to python, or it is +protected so you can't access it. I would check the file permissions: you +probably need to give SYSTEM (or whatever user the CGI process is running as) +on the web server full access to the python directory. + +Try creating a CGI cmd file like this: +----access.cmd--------- +@echo Content-type: text/plain +@echo "" +@echo on +dir d:\ +dir "d:\program files" +dir "d:\program files\python" +----end of access.cmd--------- +That should show you the python directory, if not, you need to change the +permissions. + +-- +Duncan Booth duncan at dales.rmplc.co.uk +int month(char *p){return(124864/((p[0]+p[1]-p[2]&0x1f)+1)%12)["\5\x8\3" +"\6\7\xb\1\x9\xa\2\0\4"];} // Who said my code was obscure? +http://dales.rmplc.co.uk/Duncan + + + + diff --git a/demo/ermis-f/python_m/cur/1698 b/demo/ermis-f/python_m/cur/1698 new file mode 100644 index 00000000..c7964327 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1698 @@ -0,0 +1,36 @@ +From: heather at thalamus.wustl.edu (Heather A. Drury) +Date: 12 Apr 1999 16:22:08 -0500 +Subject: event loops using tkinter & VTK +Message-ID: <7eto60$bgi@thalamus.wustl.edu> +Content-Length: 1027 +X-UID: 1698 + +Hi, + +I'm trying to write of a general-purpose volume slice viewer +using VTK and python with Tkinter. I've got most of it working +(with David Gobbi's vtkImageReslice). + +I am trying to design the software so that the current slice can be +changed using a slider (this works) and the slice image can +be zoomed/panned by clicking in the vtkRender window and continuously +capturing mouse events (middle mouse = zoom, for example). +Currently, I can *either* use the tkinter slider to change the slice +*or* remap the buttons in the vtkRenderWindowInteractor function to +zoom/pan (although how do I do continuous polling?), but not both +simultaneously (as they have independent event loops). + +Can I create one big event loop that can deal with both continuous +cursor reading from the vtkRender window and interactions with the tkinter +slider window? + +I hope this is somewhat clear. I'm also not sure if this should be posted +in the python or vtk groups, so I'm posting to both... + +TIA for any pointers/suggestions, + +Heather + + + + diff --git a/demo/ermis-f/python_m/cur/1699 b/demo/ermis-f/python_m/cur/1699 new file mode 100644 index 00000000..1f013603 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1699 @@ -0,0 +1,80 @@ +From: chadm at sgi.com (Chad McDaniel) +Date: 22 Apr 1999 10:34:05 -0700 +Subject: How do I use proxies with httplib? +References: <7fl97e$lnc$1@nnrp1.dejanews.com> <099101be8c3f$cb6206e0$f29b12c2@pythonware.com> <7flr4l$6bc$1@nnrp1.dejanews.com> +Message-ID: +Content-Length: 2397 +X-UID: 1699 + +Proxy configuration with urllib in Python 1.5.1 is broken. If my memory +serves correctly it gives just the error you describe. Upgrade to the +newly-hatched 1.5.2 and everything should be peachy. + +You can download it from: +http://www.python.org/1.5/ + +On a completely different note: can anyone out there explain what +1.5.1p1 is? + +befletch at my-dejanews.com writes: + +> In article <099101be8c3f$cb6206e0$f29b12c2 at pythonware.com>, +> "Fredrik Lundh" wrote: +> > wrote: +> > > I want to use httplib through a proxy server and I can't seem to get +> > > it to work. +> [...] +> > you might be able to use urllib instead: +> [...] +> +> When I first looked at this I thought it wouldn't do the trick either, +> since I wanted to use the HTTP POST protocol. On further inspection +> I see that urllib has that covered. So I tried it out, only to run up +> against a problem that I want to blame on urllib; it claims to not +> recognize the http url type: +> +> Python 1.5.1 (#0, Nov 18 1998, 12:17:58) [MSC 32 bit (Intel)] on win32 +> Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam +> >>> import urllib +> >>> connection=urllib.urlopen('http://www.yahoo.com') +> +> Traceback (innermost last): File "", line 1, in ? File "C:\PROGRAM +> FILES\HOMERUN\lib\python1.5\urllib.py", line 59, in urlopen return +> _urlopener.open(url) File "C:\PROGRAM +> FILES\HOMERUN\lib\python1.5\urllib.py", line 155, in open return +> self.open_unknown(fullurl) File "C:\PROGRAM +> FILES\HOMERUN\lib\python1.5\urllib.py", line 169, in open_unk nown raise +> IOError, ('url error', 'unknown url type', type) IOError: ('url error', +> 'unknown url type', 'http') +> +> >>> +> +> As a test, I hacked urllib by forcing it to think all url's are http +> url's, like so: +> +> # name = 'open_' + type +> name = 'open_http' +> +> This gets past the url type only to fail on the urllib line: +> +> if not host: raise IOError, ('http error', 'no host given') +> +> Hacking in a host doesn't help much either. Is there something wrong +> with my proxy 'set' command? (This is under W95) +> +> SET http_proxy="100.287.14.130:80" +> +> Thanks again, +> - Bruce +> +> (emailed & posted) +> +> -----------== Posted via Deja News, The Discussion Network ==---------- +> http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + +-- +-chad + + + + diff --git a/demo/ermis-f/python_m/cur/1700 b/demo/ermis-f/python_m/cur/1700 new file mode 100644 index 00000000..66a5bde2 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1700 @@ -0,0 +1,44 @@ +From: tim_one at email.msn.com (Tim Peters) +Date: Sun, 11 Apr 1999 19:45:07 GMT +Subject: best way to copy a file [Q] +In-Reply-To: <000201be8441$7965d4d0$6eba0ac8@kuarajy.infosys.com.ar> +References: <000201be8441$7965d4d0$6eba0ac8@kuarajy.infosys.com.ar> +Message-ID: <000901be8453$cd7e21a0$2a9e2299@tim> +Content-Length: 1051 +X-UID: 1700 + +[Bruno Mattarollo] +> I need to copy a file (can be binary or ascii) from one +> path to another. I have tryied to do: +> line = fd.readline() +> while line: +> fd2.write(line) +> line = fd.readline() +> fd.close() +> fd2.close() +> +> It only works for ascii file ... How can I do a 'copy' +> ...? I need to run this on NT ...:( + +If it's to run only under Windows systems, will go fastest to build up an +xcopy command line and pass it to os.system. + +> And I don't want to open a shell to do a copy from there... I also tryied +> fd.read() ... No success neither. + +Oh sure -- that works fine. The raw "no success" conveys no information, +though, so not enough clues to guess what part you didn't get right. The +most common cause for screwing this up is forgetting to open Windows files +in binary mode. + +To see how it's done, look at the source code for shutil.py in your Python's +Lib directory. shutil.copyfile is what you're looking for, if you need a +cross-platform function. + +all-obvious-to-everyone-who-already-knows-it-ly y'rs - tim + + + + + + diff --git a/demo/ermis-f/python_m/cur/1701 b/demo/ermis-f/python_m/cur/1701 new file mode 100644 index 00000000..0cc55e3b --- /dev/null +++ b/demo/ermis-f/python_m/cur/1701 @@ -0,0 +1,54 @@ +From: klm at digicool.com (Ken Manheimer) +Date: Thu, 29 Apr 1999 10:24:09 -0400 +Subject: Emacs' python-mode buggy? +References: <199904282340.TAA19934@python.org> <3727E329.2E8F3C31@digicool.com> +Message-ID: <37286B89.FC61DF02@digicool.com> +Content-Length: 1879 +X-UID: 1701 + +Markus Stenberg wrote: + +> Ken Manheimer writes: +> > Markus Stenberg wrote: +> > I can't speak to the intimacy issue, but the python-mode syntax recognition +> > may be due to having a leading '(' open paren in the first column in one of +> > your docstrings. If so, emacs' syntax confusion (not to be mistaken for +> > poor gender identification) can be remedied by escaping the leading open +> > paren with a '\' backslash, like so: +> +> Ah, what's causing that problem? + +I can't recall exactly, but what i've retained is that it's inherent in the +emacs syntax parsing mechanism, and not surmountable in any apparant way by +an application like emacs-mode. + +> > \(this is what to do with parens in docstrings.) +> > +> > If it is the problem, well, it's emacs' problem, not pymode. If it's not, +> > well, do track it down. +> > +> > Oh, does that bug constitute the "tons" you mention, or were there others? +> > I never was good at estimating the weight of bugs - all that chiton, you +> > know. +> +> Think there is two, as one of my (moderately large) modules has no +> docstrings with ('s yet still exhibits that behavior. (ok, I got carried +> away, but I was moderately frustrated over the feature :-P) + +I've been there! After tripping over the problem a few times (and probably +being told the fix on a few occasions), the last time i did a binary-style +hunt for the culprit by removing and reinserting chunks of text until i +found the line that was responsible. It was a bit painful, but once i +found a repeatable test for the problem i pinpointed the cause, bopped my +forehead and said "that again", and have recognized it since. + +If the other file is showing the same symptom without the same cause, i +suggest that you try a similar hunting expedition, and report back the +cause if you turn up anything interesting... + +Ken Manheimer +klm at digicool.com + + + + diff --git a/demo/ermis-f/python_m/cur/1702 b/demo/ermis-f/python_m/cur/1702 new file mode 100644 index 00000000..da016c93 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1702 @@ -0,0 +1,34 @@ +From: cgw at fnal.gov (Charles G Waldman) +Date: Mon, 5 Apr 1999 16:04:18 GMT +Subject: Subattributes of classes +In-Reply-To: <19990405104408.A807008@vislab.epa.gov> +References: <19990405104408.A807008@vislab.epa.gov> +Message-ID: <14088.57090.644687.407420@buffalo.fnal.gov> +X-UID: 1702 + +Randall Hopper wrote: + + > Why? + +Because "attr" in class A is just an int, and has no attributes, +whereas "draw" in the Tkinter demo is a Canvas object, which has a +scrollX and scrollY attribute. + +Consider this example: + +class B: + def __init__(self): + self.subattr = None + +class A: + def __init__(self): + self.attr = B() + self.attr.subattr = 456 + +a = A() + +print a.attr.subattr + + + + diff --git a/demo/ermis-f/python_m/cur/1703 b/demo/ermis-f/python_m/cur/1703 new file mode 100644 index 00000000..7e9b5b89 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1703 @@ -0,0 +1,31 @@ +From: alex at somewhere.round.here (Alex) +Date: 15 Apr 1999 12:11:04 -0400 +Subject: Novice Question: two lists -> dictionary +References: <7f3j1v$f6j$1@nnrp1.dejanews.com> +Message-ID: +X-UID: 1703 + +You could do something like + +************************************************** +ListA = ['10', '10', '20', '20', '20', '24'] +ListB = ['23', '44', '11', '19', '57', '3'] + +Dict = {} +for (key, value) in map (None, ListA, ListB): + Dict [key] = Dict.get (key, []) + Dict [key].append (value) + +print Dict +************************************************** + +The result is + +{'24': ['3'], '10': ['23', '44'], '20': ['11', '19', '57']} + +See you. +Alex. + + + + diff --git a/demo/ermis-f/python_m/cur/1704 b/demo/ermis-f/python_m/cur/1704 new file mode 100644 index 00000000..d8a215ca --- /dev/null +++ b/demo/ermis-f/python_m/cur/1704 @@ -0,0 +1,63 @@ +From: arw at ifu.net (arw) +Date: Mon, 5 Apr 1999 16:37:00 GMT +Subject: GadFly - MemoryError +Message-ID: <199904051641.MAA12603@ifu.ifu.net> +Content-Length: 1862 +X-UID: 1704 + +I don't know why you have this problem. +Gadfly should not construct the cross product with +the equality you mention present. +(b1.URL = b2.URL) + +Please try adding an index on URL on the table +in question. Also, maybe try increasing your virtual +memory (page file size, or whatever). + +Good luck. fwiw, I've definitely run tables with +100k rows in Gadfly on a 64Meg machine. + -- Aaron Watters + +ps: let me know how it goes. + +----Original Message----- + >From: Oleg Broytmann + >To: arw at ifu.net + >Cc: Python Mailing List + >Subject: GadFly - MemoryError + >Reply-To: phd at sun.med.ru + >Date: Saturday, April 03, 1999 9:35 AM + > + >Hello! + > + > I tried to add yeat another database backend to my project "Bookmarks + >database". My database contains now about 3000 URLs, not too much, I think. + >I subclass by BookmarksParser to parse bookmarks.html into gadfly database + >and got a database of 500 Kbytes - very small database, I hope. + > Then I tried to find duplicates (there are duplicates). I ran the query: + > + >SELECT b1.rec_no, b2.rec_no, b1.URL + > FROM bookmarks b1, bookmarks b2 + >WHERE b1.URL = b2.URL + >AND b1.rec_no < b2.rec_no + > + > GadFly eats all memory and fails with MemoryError. Is it that gadfly + >really constructs multiplication of b1 and b2, thus getting 3000*3000 + >pairs? Or I just did something wrong? + > I tried to create indicies, but this was not of any help. + > + > BTW, where are indicies stored? After creating ones I didn't find + >additional files - only one file in the database changed. + > + >Oleg. + >---- + > Oleg Broytmann National Research Surgery Centre http://sun.med.ru/~phd/ + > Programmers don't die, they just GOSUB without RETURN. + > + > + > + + + + + diff --git a/demo/ermis-f/python_m/cur/1705 b/demo/ermis-f/python_m/cur/1705 new file mode 100644 index 00000000..0b364a3b --- /dev/null +++ b/demo/ermis-f/python_m/cur/1705 @@ -0,0 +1,27 @@ +From: gmcm at hypernet.com (Gordon McMillan) +Date: Sat, 24 Apr 1999 03:26:49 GMT +Subject: Efficient List Subtraction +In-Reply-To: +References: +Message-ID: <1287197880-43229653@hypernet.com> +X-UID: 1705 + +Jonothan Farr wrote: + +> I have also longed for built in support for the union and +> intersection of two sequences. +> +> Perhaps: +> list.union(list2) +> and +> list.intersection(list2) + +While not exactly what you're looking for, I suggest going to +chordate.com and looking for kjbuckets. It's got sets and graphs; you +can do intersections and closures... + +- Gordon + + + + diff --git a/demo/ermis-f/python_m/cur/1706 b/demo/ermis-f/python_m/cur/1706 new file mode 100644 index 00000000..aa02d021 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1706 @@ -0,0 +1,20 @@ +From: victor at idaccr.org (Victor S. Miller) +Date: 27 Apr 1999 14:49:03 -0400 +Subject: Python classes for postscript +Message-ID: +X-UID: 1706 + +Are there packages available for formatted output (with nice fonts, +etc.)? Presumably one could create individual pages use some sort of +GUI like tkinter, but that would be one page at a time. Also, the XML +stuff only seems to talk about creating and parsing XML documents -- +what about stuff that actually renders them? Where would I look? +-- +Victor S. Miller | " ... Meanwhile, those of us who can compute can hardly +victor at idaccr.org | be expected to keep writing papers saying 'I can do the +CCR, Princeton, NJ | following useless calculation in 2 seconds', and indeed + 08540 USA | what editor would publish them?" -- Oliver Atkin + + + + diff --git a/demo/ermis-f/python_m/cur/1707 b/demo/ermis-f/python_m/cur/1707 new file mode 100644 index 00000000..3e85c43b --- /dev/null +++ b/demo/ermis-f/python_m/cur/1707 @@ -0,0 +1,62 @@ +From: neelk at alum.mit.edu (Neelakantan Krishnaswami) +Date: Tue, 06 Apr 1999 23:12:04 GMT +Subject: Python and the Singleton Pattern +References: <37048D53.5D1ED05F@lemburg.com> +Message-ID: <7ee4si$sec$2@antiochus.ultra.net> +Content-Length: 1152 +X-UID: 1707 + +In article , mlh at idt.ntnu.no (Magnus L. Hetland) wrote: +> +>But isn't the point that people should be able to use the singleton +>instantiator without knowing if it already has been instantiated, and +>always get the same instance? + +Isn't it possible to make use of Python's dynamism to turn any +class into a singleton class, as needed? + +For example: + +class Singletonizer: + def __init__(self, base_class): + self.base_class = base_class + self.obj = None + def __call__(self, *args, **kw): + if self.obj is None: + self.obj = apply(self.base_class, args, kw) + return self.obj + +# Now a test... + +class Foo: + pass + +Bar = Singletonizer(Foo) + +x = Foo() +y = Foo() + +a = Bar() +b = Bar() + +if x is not y: + print "x and y are different objects" + +if a is b: + print "a and b are the same object" + +Which yields the right: + +x and y are different objects +a and b are the same object + +Then you can write your Foo class as usual, and then Singletonize +it as needed. If you are paranoid, you can name Foo "_Foo" so +that it won't be part of the module's exported interface. + + +Neel + + + + diff --git a/demo/ermis-f/python_m/cur/1708 b/demo/ermis-f/python_m/cur/1708 new file mode 100644 index 00000000..1fd6687b --- /dev/null +++ b/demo/ermis-f/python_m/cur/1708 @@ -0,0 +1,41 @@ +From: fatjim at home.com (Jim Meier) +Date: Mon, 12 Apr 1999 16:27:58 GMT +Subject: extending questions +Message-ID: <371220AD.6C3B0B5@home.com> +Content-Length: 1090 +X-UID: 1708 + +I have two questions, one simple, one a little bit whiny. + +Firstly, I'm looking for a quick and easy way for a PyCFunction to +accept as an argument either an integer or a floating point number, so +that the function can be called as + + func(1,1,1) + +or as + + func(0.5,0,2/3) + +because python doesn't seem to let me consider an integer as a float. +I've tried using some of the conversion functions in the abstract +numeric suite and the PyFloat_GetDouble (or some similar name), but with +no luck - it always returned -1 for me. Any ideas? + +Also, ust a suggestion, but would it be possible to add a +PyNumber_GetDouble(PyObject*n) function to the absract numberic +interface? This would be useful for this sort of situation. + +My second question is, is there any work being done towards +updating/completing "Extending and Embedding" and "The Python C API" in +the standard documentation? As it is, the C API is just barely +useful.Wonderfully written, though. So can anyone offer a guess on when +peeking in the source will be mostly outmoded? + +Anyways, thanks in advance for your help. +Jim Meier. + + + + + diff --git a/demo/ermis-f/python_m/cur/1709 b/demo/ermis-f/python_m/cur/1709 new file mode 100644 index 00000000..dba553b9 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1709 @@ -0,0 +1,33 @@ +From: Jack.Jansen at oratrix.com (Jack Jansen) +Date: Tue, 13 Apr 1999 12:13:16 +0200 +Subject: rfc822 date header +References: <3712D863.2A8148BC@rubic.com> <3712F4C1.52327AF4@lemburg.com> +Message-ID: <371318BC.E131EDF0@oratrix.com> +X-UID: 1709 + +"M.-A. Lemburg" wrote: +> +> Jeff Bauer wrote: +> > +> > Is there a reasonably bulletproof way to generate an +> > rfc822-compliant date header using the time module? +> > +> > The reason I ask is I recall a number of subtle +> > errors in this regard, reported by Chris Lawrence, +> > among others. +> +> According to the RFC, time.ctime() should do the trick... +> but it's probably locale aware which the RFC doesn't account +> for. + +Which RFC are you referring to? time.ctime() output is definitely *not* +compatible with RFC822. But it should be easy enough to come up with a +time.strftime() format that does the right thing... +-- +Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++ +Jack.Jansen at oratrix.com | ++++ if you agree copy these lines to your sig ++++ +www.oratrix.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm + + + + diff --git a/demo/ermis-f/python_m/cur/1710 b/demo/ermis-f/python_m/cur/1710 new file mode 100644 index 00000000..68cae3bc --- /dev/null +++ b/demo/ermis-f/python_m/cur/1710 @@ -0,0 +1,43 @@ +From: cgw at fnal.gov (Charles G Waldman) +Date: Mon, 12 Apr 1999 21:07:04 GMT +Subject: Stupid Tkinter question +In-Reply-To: <99041222110400.01382@dominion> +References: <99041222110400.01382@dominion> +Message-ID: <14098.24696.77181.178918@buffalo.fnal.gov> +X-UID: 1710 + +Bjoern Giesler writes: + + > I'm going crazy. Why does this fragment work (adapted from imageview.py + > in Guido's Tkinter demos): + > [snip] + > .... but this doesn't: + > [snip] + > + > def makeToolbar(aFrame): + > toolbar = Frame(aFrame) + > markimage = BitmapImage(file = "Mark.xbm") + > markbutton = Button(toolbar, + > image = markimage, + > command = exit) + > + > markbutton.pack() + > return toolbar + +The "markimage" object goes out of scope when makeToolbar exits, and +storage for the image automatically gets cleared up. You need to +cause there to be a persistent reference to the image object. +Fortunately this is pretty easy to do. Try this: + +def makeToolbar(aFrame): + toolbar = Frame(aFrame) + toolbar.markimage = BitmapImage(file = "Mark.xbm") + markbutton = Button(toolbar, + image = toolbar.markimage, + command = exit) + + markbutton.pack() + return toolbar + + + diff --git a/demo/ermis-f/python_m/cur/1711 b/demo/ermis-f/python_m/cur/1711 new file mode 100644 index 00000000..1de8c4db --- /dev/null +++ b/demo/ermis-f/python_m/cur/1711 @@ -0,0 +1,45 @@ +From: amk1 at erols.com (A.M. Kuchling) +Date: Sat, 29 May 1999 22:34:37 -0400 +Subject: Python 2.0 +Message-ID: <199905300234.WAA14276@207-172-52-51.s51.tnt1.brd.va.dialup.rcn.com> +Content-Length: 1807 +X-UID: 1711 + +Spam detection software, running on the system "albatross.python.org", has +identified this incoming email as possible spam. The original message +has been attached to this so you can view it (if it isn't spam) or label +similar future email. If you have any questions, see +the administrator of that system for details. + +Content preview: Michael P. Reilly writes: > There are often better mechanisms + in the systems than to use ORBs and > the like. The applications usually + use them. It's not that UNIX is > "behind," it's that UNIX apps utilize the + system.. just as Windows apps > utilize that system's components (and that + the Windows systems isn't as > "open" as UNIX). [...] + +Content analysis details: (10.7 points, 5.0 required) + + pts rule name description +---- ---------------------- -------------------------------------------------- + 0.5 RCVD_IN_PBL RBL: Received via a relay in Spamhaus PBL + [207.172.52.51 listed in zen.spamhaus.org] + 4.4 HELO_DYNAMIC_IPADDR2 Relay HELO'd using suspicious hostname (IP addr + 2) + 0.5 FH_HELO_EQ_D_D_D_D Helo is d-d-d-d + 1.6 TVD_RCVD_IP TVD_RCVD_IP + 2.0 FH_DATE_IS_19XX The date is not 19xx. + 1.6 RCVD_IN_SORBS_DUL RBL: SORBS: sent directly from dynamic IP address + [207.172.52.51 listed in dnsbl.sorbs.net] + 0.1 RDNS_DYNAMIC Delivered to trusted network by host with + dynamic-looking rDNS + + +-------------- next part -------------- +An embedded message was scrubbed... +From: "A.M. Kuchling" +Subject: Re: Python 2.0 +Date: Sat, 29 May 1999 22:34:37 -0400 +Size: 2083 +URL: + + diff --git a/demo/ermis-f/python_m/cur/1712 b/demo/ermis-f/python_m/cur/1712 new file mode 100644 index 00000000..e3b3677e --- /dev/null +++ b/demo/ermis-f/python_m/cur/1712 @@ -0,0 +1,61 @@ +From: wtanksle at dolphin.openprojects.net (William Tanksley) +Date: Sat, 15 May 1999 19:54:38 GMT +Subject: python hack of the day -- "listable" functions +References: <373c22bf.6287591@news.omnilink.de> <373e4c42.16914501@news.omnilink.de> <7hi1bb$4ne$1@holly.prod.itd.earthlink.net> <373DB6F4.3E64A8A2@home.com> +Message-ID: +Content-Length: 1822 +X-UID: 1712 + +On Sat, 15 May 1999 18:01:10 GMT, Jim Meier wrote: +>William Tanksley wrote: + +>> Now, consider this. +>> x = o.verb(a,b,c) + +>> You've created a language feature where the action of the verb depends not +>> on the single object it's attached to, but on EACH of the parts of speech +>> in its parameter list. + +>> After that change, Python wouldn't be object oriented. It'd be grammar +>> oriented. + +>> Let that one sink in for a while. + +>I think grammar-oriented languages are a very, very interesting idea. I saw a +>posting somewhere(freshmeat.net?) about a language whose modules were allowed +>to define and maybe redefine syntax. struck me as neat, but to wrap it together +>and call it "grammar".. could we "conjugate" verbs for different effect?? wow.. + +Conjugation isn't an aspect of grammar in general. It's only part of +certain languages. Lojban isn't conjugated at all (but then Lojban is an +artificial language). + +>> Ouch. Has anyone done work on how to do that? It's polymorphism, but +>> with the action depending on every parameter rather than just one. + +>How is it different from normal polymorhpism? + +It's different because normal polymorphism dispatches to only one object. +This would be dispatching to several. + +>The language (if it cares) would +>dispatch to the member function whose signature matched the parameters. This is +>normal in many OO languages (C++ being the first to come to mind) + +This is called "overloading", not polymorphism. As a matter of fact, +overloading makes OO _very_ difficult, and makes it easy to make bad +mistakes which the compiler and runtime can't catch. + +Overloading looks like multiple dispatch but isn't, just like static +binding looks like OO but isn't. + +>-Jim. + +-- +-William "Billy" Tanksley +"But you shall not escape my iambics." + -- Gaius Valerius Catullus + + + + diff --git a/demo/ermis-f/python_m/cur/1713 b/demo/ermis-f/python_m/cur/1713 new file mode 100644 index 00000000..26638a3e --- /dev/null +++ b/demo/ermis-f/python_m/cur/1713 @@ -0,0 +1,47 @@ +From: mike.steed at natinst.com (Mike Steed) +Date: Fri, 07 May 1999 09:13:31 -0700 +Subject: A Python take on "Programming Web Graphics with Perl and..." +References: <3732720F.DCDA68BB@webone.com.au> +Message-ID: <3733112B.1D8BBAC6@natinst.com> +X-UID: 1713 + +Stuart Hungerford wrote: + +> I know there's a Python topic guide for web programming, +> but I was wondering if there's an equivalent set of +> Python libraries for doing everything the book contains +> but with Python? +> +> In my reading so far, that's: +> +> - Using GD for generating GIFs + +http://starship.python.net/crew/richard/gdmodule/ + +> - PerlMagick for controlling ImageMagick + +Don't know about this. + +> - Charts and graphs with GIFgraph + +Don't know about this. But you might like GDChart: + +http://www.fred.net/brv/chart/ + +The C library is in beta. I have written a Python interface to it, +which I will make available if there is interest. + +> - Scripting the Gimp +> - Creating Postscript documents via Perl + +Don't know about these. + +> +> Thanks, + +Don't know much, +Mike. + + + + diff --git a/demo/ermis-f/python_m/cur/1714 b/demo/ermis-f/python_m/cur/1714 new file mode 100644 index 00000000..644531c8 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1714 @@ -0,0 +1,40 @@ +From: davis at space.mit.edu (John E. Davis) +Date: 19 May 1999 10:47:27 GMT +Subject: my loop is too slow +References: +Message-ID: +X-UID: 1714 + +On Tue, 11 May 1999 14:24:39 -0600, Tim Hochberg +wrote: +>FWIW: Taking into account Michael Haggerty's observation on that this is +>really a matrixmultiply of (c.f)(c.transpose(f)), I reimplemented the +>original loop as: +> +>from Numeric import * +>a = a + dot(c, f) * dot(c, transpose(f)) + +Are you sure about this? The original code was + + a[k,i]=a[k,i]+c[k,h]*c[k,j]*f[j,i]*f[i,h] + +summed over all indices. I would write this as: + + a_ki = a_ki + c_kh c_kj f_ji f_ih + = a_ki + c_kh (c#f)_ki f_ih + = a_ki + (c#f)_ki (c#f')_ki + +where `#' denotes matrix multiplication and ' represents the +transpose. So, I would code this as: + + a = a + (c#f)*(c#f') + +where `*' represents an element by element multiply and `+' represents +an element by element addition. + +--John + + + + + diff --git a/demo/ermis-f/python_m/cur/1715 b/demo/ermis-f/python_m/cur/1715 new file mode 100644 index 00000000..f2589f3a --- /dev/null +++ b/demo/ermis-f/python_m/cur/1715 @@ -0,0 +1,35 @@ +From: aahz at netcom.com (Aahz Maruch) +Date: Mon, 10 May 1999 20:22:53 GMT +Subject: while (a=b()) ... +References: <3736ED9B.515704AF@starmedia.net> +Message-ID: +X-UID: 1715 + +In article , +scott cotton wrote: +> +>while (c=curs.fetchone(); c): +> +>is not redundant, nor does it have the '=' != '==' problem. + +What you really want is this: + +class Foo : + .... + +curs=Foo() + +while curs.fetchone() : + print curs.value() +-- + --- Aahz (@netcom.com) + +Hugs and backrubs -- I break Rule 6 <*> http://www.rahul.net/aahz/ +Androgynous poly kinky vanilla queer het + +"In the end, outside of spy agencies, people are far too trusting and +willing to help." -- Ira Winkler + + + + diff --git a/demo/ermis-f/python_m/cur/1716 b/demo/ermis-f/python_m/cur/1716 new file mode 100644 index 00000000..72df4fef --- /dev/null +++ b/demo/ermis-f/python_m/cur/1716 @@ -0,0 +1,31 @@ +From: Michael.Scharf at kosmos.rhein-neckar.de (Michael Scharf) +Date: Fri, 07 May 1999 03:17:07 +0200 +Subject: Q: How to convert long Win95 paths to 8.3 dos paths? +Message-ID: <37323F13.21DEF314@kosmos.rhein-neckar.de> +X-UID: 1716 + +Hello, + +I am looking for a function, that can convert +long NT or Win95 names to 8.3 dos names +(the same name that 'dir /x' would show). +I could not find anything relevant in the +with dejanews nor on the python pages... + +This would convert + C:\Program Files +to + C:\PROGRA~1 + +Thank you for your help + +Michael +-- + ''''\ Michael Scharf + ` c-@@ TakeFive Software + ` > http://www.TakeFive.com + \_ V mailto:Michael_Scharf at TakeFive.co.at + + + + diff --git a/demo/ermis-f/python_m/cur/1717 b/demo/ermis-f/python_m/cur/1717 new file mode 100644 index 00000000..eba64a31 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1717 @@ -0,0 +1,19 @@ +From: alex at somewhere.round.here (Alex) +Date: 09 May 1999 15:02:26 -0400 +Subject: help with simple regular expression grouping with re +References: <000001be99ea$640811c0$ee9e2299@tim> +Message-ID: +X-UID: 1717 + +> The source for findall is in re.py -- it's just a loop written in +> Python. You can easily (provided you understand all the pieces +> first!) write the same thing yourself. + +You can also simply get a copy of the new re module and put it somewhere +easy to import. I did that for a while, and it worked pretty well. + +Alex. + + + + diff --git a/demo/ermis-f/python_m/cur/1718 b/demo/ermis-f/python_m/cur/1718 new file mode 100644 index 00000000..58e2e6f0 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1718 @@ -0,0 +1,21 @@ +From: jabba at hotmail.com (jabba at hotmail.com) +Date: 7 May 1999 01:03:03 GMT +Subject: Found this new amateur site ! +Message-ID: <7gte47$25cs277@news.gomontana.com> +X-UID: 1718 + +Hi Newsgroup users ! + +I stumbled right into this interesting looking new amateur site from europe: + +http://www.girls-next-door.net + +They have some free sample pictures and videos. The site has not started yet but looks +extremly interesting. I have not seen any of these pictures or movies on the web before. + +Take a look ! + + + + + diff --git a/demo/ermis-f/python_m/cur/1719 b/demo/ermis-f/python_m/cur/1719 new file mode 100644 index 00000000..c93be28a --- /dev/null +++ b/demo/ermis-f/python_m/cur/1719 @@ -0,0 +1,29 @@ +From: tseaver at palladion.com (Tres Seaver) +Date: Mon, 17 May 1999 21:33:27 -0500 +Subject: Oracle and Unix +References: +Message-ID: <3740D177.D02A63DE@palladion.com> +X-UID: 1719 + +Alexander Staubo wrote: +> +> I'm looking for something which would allow me to use Oracle through +> Python on a DEC Unix system. +> +> Assume that no ODBC support is available (we can't afford the OpenLink +> stuff, which are insanely, outlandishly expensive; and afaik there are no +> alternative, free ODBC solutions that support Oracle). +> +> I'm not choosy about the interface -- it doesn't need to be DB API- +> compliant or anything. + +Digital Creations (the Zopemeisters) publishes DCOracle, which works nicely for +me. http://www.zope.org/Download/DCOracle/ +-- +========================================================= +Tres Seaver tseaver at palladion.com 713-523-6582 +Palladion Software http://www.palladion.com + + + + diff --git a/demo/ermis-f/python_m/cur/1720 b/demo/ermis-f/python_m/cur/1720 new file mode 100644 index 00000000..d300b84b --- /dev/null +++ b/demo/ermis-f/python_m/cur/1720 @@ -0,0 +1,61 @@ +From: emile at fenx.com (Emile van Sebille) +Date: Sun, 16 May 1999 12:35:08 -0700 +Subject: How to add a key:datum pair to the dictionary +References: <373f0ee9.30600632@news.tpnet.pl> +Message-ID: +Content-Length: 1062 +X-UID: 1720 + +You can use update: + +>>> a={1:1,2:2} +>>> a.update({3:3}) +>>> a +{3: 3, 2: 2, 1: 1} + + +-- + +Emile van Sebille +emile at fenx.com +------------------- + + +MK wrote in message +news:373f0ee9.30600632 at news.tpnet.pl... +> Hello everyone, +> +> I have stumbled across a stupid problem: how to add a pair to +> dictionary like +> +> {'mk': {'repetitions': 20, 'no match': 10}} +> +> I have not found the method for this anywhere in documentation. +> Dictionary is mutable, but neither Library Reference nor Language +> Reference give information on how to _add_ something to dictionary. +> It seems strange -- I mean, is creating dictionary and then changing +> items in it the only possible method of changing dictionary? Can it be +> enlarged? +> +> +> +> +> +> +> +> +> MK +> +> +> -------------------------------------------------- +> Reality is something that does not disappear after +> you cease believing in it - VALIS, Philip K. Dick +> -------------------------------------------------- +> +> Delete _removethis_ from address to email me + + + + + + diff --git a/demo/ermis-f/python_m/cur/1721 b/demo/ermis-f/python_m/cur/1721 new file mode 100644 index 00000000..71158a38 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1721 @@ -0,0 +1,48 @@ +From: alrice at swcp.com (Alex Rice) +Date: Sat, 01 May 1999 20:41:23 -0600 +Subject: python-mode.el and wxPython app +Message-ID: <372BBB53.AA58FF4B@swcp.com> +Content-Length: 1127 +X-UID: 1721 + +Hi, I'm using python-mode 3.90, Emacs 20.3.1 (win32) and Python 1.5.1 +Can't get my GUI app to display when I C-c C-c it from within Emacs. + +Here is what I am doing: + +C-c C-! to start Python interpreter buffer +C-c C-c in my source code buffer +Then I see this in python buffer: + + Python 1.5.1 (#0, Apr 13 1998, 20:22:04) [MSC 32 bit (Intel)] on win32 + Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam + >>> ## working on region in file d:/tmp/python--248317Wgx... + starting main()... + +Then my app never appears. However, if from a dos command prompt, I do + + >>> python d:/tmp/python--248317Wgx + starting main()... + +then I see my app appear. This is a wxPython GUI app. + +Here is from my .emacs + + (setq auto-mode-alist + (cons '("\\.py$" . python-mode) auto-mode-alist)) + (setq interpreter-mode-alist + (cons '("python" . python-mode) + interpreter-mode-alist)) + (autoload 'python-mode "python-mode" "Python editing mode." t) + (setq py-python-command "d:/Program Files/Python/python.exe") + (setq py-temp-directory "d:/tmp") + +What am I doing wrong here? TIA! + +(lisp-illiterate'ly-yours) + +Alex Rice + + + + diff --git a/demo/ermis-f/python_m/cur/1722 b/demo/ermis-f/python_m/cur/1722 new file mode 100644 index 00000000..615d5c75 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1722 @@ -0,0 +1,28 @@ +From: news at helen.demon.nl (Ilja Heitlager) +Date: Mon, 3 May 1999 13:24:00 +0200 +Subject: PROPOSAL: Packages in Python lib +References: <372B5CB7.66DBB930@prescod.net> <199905020817.KAA29168@axil.hvision.nl> +Message-ID: <7gk0g3$q8c$1@news.worldonline.nl> +X-UID: 1722 + +Hans Nowak wrote in message <199905020817.KAA29168 at axil.hvision.nl>... + +>I think it will be very hard to make a package hierarchy that is logical to +>all users (or most of them). That does not mean your proposal isn't good... +>I'm just wondering how these problems will be solved. It makes me wish +that +>there was a different approach to grouping of modules... something non- +>hierarchical. + +I love Paul's Idea. It worked for Java, so why not for Python? But please... +no Poldermodels +here. Just let Guido pickup the idea and implement it. +Hierarchy not perfect? Ok, but it's better than linear organisation. + +Ilja + + + + + + diff --git a/demo/ermis-f/python_m/cur/1723 b/demo/ermis-f/python_m/cur/1723 new file mode 100644 index 00000000..4f327fff --- /dev/null +++ b/demo/ermis-f/python_m/cur/1723 @@ -0,0 +1,32 @@ +From: greg.ewing at compaq.com (Greg Ewing) +Date: Wed, 05 May 1999 10:31:10 +1200 +Subject: Python IS slow ! [was] Re: Python too slow for real world +References: <613145F79272D211914B0020AFF6401914DAD8@gandalf.digicool.com> +Message-ID: <372F752E.DD8875E0@compaq.com> +X-UID: 1723 + +Markus Kohler wrote: +> +> From profiling python 1.5.2c I found that python's main problem is that +> calling functions seems to be very costly. + +This is just a guess, but one contributor to that might be +the way that it packs all the arguments up into a tuple, +and then immediately unpacks them again upon entering +the function. + +Also, it allocates each stack frame as a separate object. +So that's at least two memory allocation/free operations +per procedure call. + +A more efficient way would be to use one big stack for +all procedure calls, and just leave the parameters on +the stack in the usual case where a procedure with a +fixed number of arguments is called without any keyword +args, etc. + +Greg + + + + diff --git a/demo/ermis-f/python_m/cur/1724 b/demo/ermis-f/python_m/cur/1724 new file mode 100644 index 00000000..c9a7b72b --- /dev/null +++ b/demo/ermis-f/python_m/cur/1724 @@ -0,0 +1,22 @@ +From: guido at eric.cnri.reston.va.us (Guido van Rossum) +Date: 04 May 1999 10:56:13 -0400 +Subject: mktime() like function to produce GMT? +References: <00be01be9308$c649cf60$0301a8c0@cbd.net.au> <3729B855.3A7C6B5A@lemburg.com> <5lu2ty9lpx.fsf@eric.cnri.reston.va.us> <372D60B3.58DE3818@lemburg.com> <003d01be954d$f22230e0$0301a8c0@cbd.net.au> <372D9DAC.2BD7C604@lemburg.com> <5laevm9doj.fsf@eric.cnri.reston.va.us> <372EB855.DF47D72@lemburg.com> <372EB98F.58F9931@lemburg.com> +Message-ID: <5l7lqoanoy.fsf@eric.cnri.reston.va.us> +X-UID: 1724 + +"M.-A. Lemburg" writes: +> The last short sentence pretty nicely covers up the problems with timegm() +> :-) "POSIX algorithm" means that leap seconds are not accounted for. + +And what's wrong with that? The Unix time is just as much an +*encoding* of time values as any other. Few clocks in the world are +accurate enough to care about leap seconds. The rest of us +occasionally synchronize with a master clock. I don't care about leap +seconds and never will. + +--Guido van Rossum (home page: http://www.python.org/~guido/) + + + + diff --git a/demo/ermis-f/python_m/cur/1725 b/demo/ermis-f/python_m/cur/1725 new file mode 100644 index 00000000..df5950a5 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1725 @@ -0,0 +1,56 @@ +From: takeuchi at isl.ntt.co.jp (takeuchi at isl.ntt.co.jp) +Date: Mon, 17 May 1999 08:03:22 GMT +Subject: NumericalPy Tutorial __init__.py +In-Reply-To: <373E1F03.E2DE0B94@swcp.com> +References: <373E1F03.E2DE0B94@swcp.com> +Message-ID: <7hoiga$jn1c@eGroups.com> +Content-Length: 1666 +X-UID: 1725 + + <373e1f03.e2de0b9- at swcp.com> wrote: +Original Article: http://www.egroups.com/list/python-list/?start=58960 +> Having trouble loading the NumTut module (tutorial for Numerical Python +> package) I think I have all the appropriate files installed. Any +> suggestions would be appreciated! Here is some interactive which +> illustrates the problem +> +> Python 1.5.2 (#0, Apr 13 1999, 10:51:12) [MSC 32 bit (Intel)] on win32 +> Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam +> >>> array_constructor +> Traceback (innermost last): +> File "", line 1, in ? +> NameError: array_constructor +> >>> from Numeric import * +> >>> array_constructor +> +> >>> from NumTut import * +> Traceback (innermost last): +> File "", line 1, in ? +> File "D:\Program Files\Python\NumTut\__init__.py", line 15, in ? +> greece = pickle.load(open(os.path.join(_dir, 'greece.pik'), 'rb')) / +> 256.0 +> File "D:\Program Files\Python\Lib\pickle.py", line 826, in load +> return Unpickler(file).load() +> File "D:\Program Files\Python\Lib\pickle.py", line 495, in load +> dispatch[key](self) +> File "D:\Program Files\Python\Lib\pickle.py", line 659, in load_global +> klass = self.find_class(module, name) +> File "D:\Program Files\Python\Lib\pickle.py", line 669, in find_class +> raise SystemError, \ +> SystemError: Failed to import class array_constructor +> from module Numeric +> +> +> >>> +> +This may be a cure. +Change 'rb' to 'r' in the 14th line of __init__.py like this. +pickle.load(open(os.path.join(_dir, 'greece.pik'), 'r')) + ^^^^^ +-- +takeuchi + + + + + diff --git a/demo/ermis-f/python_m/cur/1726 b/demo/ermis-f/python_m/cur/1726 new file mode 100644 index 00000000..40eda4bd --- /dev/null +++ b/demo/ermis-f/python_m/cur/1726 @@ -0,0 +1,74 @@ +From: pete-python at kazmier.com (Peter Kazmier) +Date: 19 May 1999 23:36:44 GMT +Subject: Python/beeper connectivity +References: +Message-ID: +Content-Length: 2433 +X-UID: 1726 + +On 19 May 1999 23:54:26 +0200, Magnus L. Hetland wrote: +>Sarino Suon writes: +> +>> Hi there: +>> +>> In one of the Python books, the author refers to an anecdote in ANOTHER +>> Python book about a guy who created a Python program to beep him whenever +>> an exception occurred. I thought that was neat when I first read about it. +>> Has anyone done anything like this? I would like to explore using my +>> computer to talk to household appliances and other electronic +>> devices, which I assume are especially designed to interface with a PC. +>> +>> Since I now trust Python to take over my computer, I wouldn't mind letting +>> it run my house. :-) +>> +>> Is anyone into this sort of thing? Would love to hear from you. +> +>Well... there are services where you can send mail to your cellphone +>etc. This could easily be done by a Python program. There might be a +>way to do something timilar with a beeper too, although I don't know +>much about that... :) + +As far as the pager goes, I've written a small generic Pager class +with a few sub-classes that are designed to send pages to different +types of pagers. You can find it at: + + http://www.kazmier.com/computer/#python + +Please keep in mind, I just started learning Python about a week ago, +and this is my first attempt at a class so be gentle (suggestions are +definitely welcome). I haven't even gotten to the chapter on Classes +yet in the Learning Python book (which btw is a great book). + +The sub-classes defined so far are: + +SkyWordPager Supports SkyTel SkyWord pager customers +SkyWordPlusPager Supports SkyTel SkyWordPlus pager customers +ATTPager Supports ATT Digital One Rate Cell Phone pagers +MailPager Supports any email based pager + +Here's an example of use: + +p = SkyWordPager() +p.addr = 1234567 # Not my pin for obvious reasons +p.mesg = "This is a test" +p.send() + +or simply: + +SkyWordPager(1031080, "This is a test").send() + +The base Pager class must be sub-classed. Its supposed to provide +some general functions like the send() function which checks the +maximum message length for the given pager sub-class (each one is +different), and then breaks the mesg into multiple pages if +neccessary. The doc string has more info on extending the class. + +-- +Peter Kazmier http://www.kazmier.com +PGP Fingerprint 4FE7 8DA3 D0B5 9CAA 69DC 7243 1855 BC2E 4B43 5654 + + + + + + diff --git a/demo/ermis-f/python_m/cur/1727 b/demo/ermis-f/python_m/cur/1727 new file mode 100644 index 00000000..40790b36 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1727 @@ -0,0 +1,40 @@ +From: mlh at idt.ntnu.no (Magnus L. Hetland) +Date: 19 May 1999 13:50:51 +0200 +Subject: Concrete Proposal: while ... and while ... +References: <7hsv80$g9j$1@news.tamu.edu> +Message-ID: +X-UID: 1727 + +cwebster at math.tamu.edu (Corran Webster) writes: + +> Last night, after reading the latest assignment in expressions thread, I +> went and hacked together a patch which implements the proposed +> +> while: +> ... +> and while test: +> ... + +I thought the Guido-approved version had a condition on the first as +well (i.e. an expansion of the standard while loop)? + +Thus: + +while 1: + ... +and while something: + ... + +Of course, that doesn't remove the ugliness of the "while 1" but it +does alleviate the use of "break". I guess your suggestion actually +adds the syntax of "while:" for "while 1:" as well -- or is it only in +the use with "and while" that it is permitted? +-- + + Magnus + Lie + Hetland http://arcadia.laiv.org + + + + diff --git a/demo/ermis-f/python_m/cur/1728 b/demo/ermis-f/python_m/cur/1728 new file mode 100644 index 00000000..fa2f9500 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1728 @@ -0,0 +1,30 @@ +From: mlh at idt.ntnu.no (Magnus L. Hetland) +Date: 10 May 1999 20:30:13 +0200 +Subject: while (a=b()) ... +References: <7h4mq2$675$1@holly.csv.warwick.ac.uk> +Message-ID: +X-UID: 1728 + +esuzm at primrose.csv.warwick.ac.uk (Andrew Clover) writes: + +> Nathan Clegg (nathan at islanddata.com) wrote: +> +> > The ideal, of course, would be: + +[Lots of stuff that has been debated to death several times already] + +> c= a+b: (a= 1; b= 2) + +The use of a colon would probably make the parser very confused in +structures like while and if, where the colon is already part of the +syntax... + +-- + + Magnus + Lie + Hetland http://arcadia.laiv.org + + + + diff --git a/demo/ermis-f/python_m/cur/1729 b/demo/ermis-f/python_m/cur/1729 new file mode 100644 index 00000000..6155cd9c --- /dev/null +++ b/demo/ermis-f/python_m/cur/1729 @@ -0,0 +1,25 @@ +From: doughellmann at mindspring.com (Doug Hellmann) +Date: Mon, 24 May 1999 16:12:07 GMT +Subject: I need an Oracle database access module +Message-ID: <37497B1C.626DF041@mindspring.com> +X-UID: 1729 + +I'm trying to track down a copy of a module I can use to access an +Oracle database on Solaris, without having to rely on ODBC (which the +boss&admins won't install). + +Searching on python.org and google.com, I found a variety of references +to DCOracle and oracledb. I can't get to the page on the Digital +Creations web site referenced by the link to DCOracle because it looks +like the site is being renovated and the page has moved. The server +that appears to contain oracledb isn't showing up in DNS when I try to +go there (http://alumni.dgs.monash.edu.au/~anthony/oracledb). + +Can anyone help? Do these modules have new homes? Are they obsolete? + +Thanks, +Doug + + + + diff --git a/demo/ermis-f/python_m/cur/1730 b/demo/ermis-f/python_m/cur/1730 new file mode 100644 index 00000000..2b8b90d8 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1730 @@ -0,0 +1,46 @@ +From: robin at alldunn.com (Robin Dunn) +Date: Thu, 20 May 1999 23:26:14 -0700 +Subject: wxPython [was Re: How does Tk compare to Swing for GUI for Python] +References: <37419d2a.54410905@news.bctel.ca> <7hseml$2cq$2@cronkite.cc.uga.edu> <374322f5.58380444@news.bctel.ca> +Message-ID: +Content-Length: 1139 +X-UID: 1730 + +guppy wrote in message <374322f5.58380444 at news.bctel.ca>... +>On 18 May 1999 19:23:01 GMT, graham at sloth.math.uga.edu (Graham Matthews) +>wrote: +> +>>guppy (invalid.address at do.not.email) wrote: +>>: Any reason you wouldn't stay sane, and use wxPython? It does what you +>>: want, and extremely well. +>> +>>What platforms dows wxPython run on? +> +>Hit http://alldunn.com/wxPython/ and follow the link to the wxWindows site. +>Platforms will be listed there. Windows, X, Mac are three of them. I +>believe there are others. +> + + +wxPython currently runs on *nix with GTK and on Win32. If somebody asks +real nice I can probably make it work for Motif as well. (As soon as some +recent changes to wxWindows are propogated to the Motif port.) + +The good news is that a beta for wxWindows on the Mac was announced today so +if someone will volunteer to maintain that version of wxPython (or give me a +Mac and a C++ compiler) then we may soon have that platform nailed down as +well. + +-- +Robin Dunn +robin at AllDunn.com +http://AllDunn.com/robin/ +http://AllDunn.com/wxPython/ Check it out! +Try http://AllDunn.com/laughworks/ for a good laugh. + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1731 b/demo/ermis-f/python_m/cur/1731 new file mode 100644 index 00000000..128f4cca --- /dev/null +++ b/demo/ermis-f/python_m/cur/1731 @@ -0,0 +1,43 @@ +From: aa8vb at yahoo.com (Randall Hopper) +Date: Thu, 20 May 1999 10:52:16 -0400 +Subject: Sorry, another simple question +In-Reply-To: <7huq5u$hsb@wapping.ecs.soton.ac.uk>; from Joseph Kuan on Wed, May 19, 1999 at 04:51:10PM +0000 +References: <7huq5u$hsb@wapping.ecs.soton.ac.uk> +Message-ID: <19990520105216.A421239@vislab.epa.gov> +X-UID: 1731 + +Joseph Kuan: + | How to derive the range function for a particular class? + | + |I tried with __range__ but it doesn't work. + +Joseph, do you want to do something like this? + + mylist = MyList() + + for element in mylist: + ... + +Or something like this: + + mylist = MyList() + + print mylist[5:10] + +If the former, __getitem__ is the method you need. It's called with +successively increasing index values in the for loop until an IndexError +exception is triggered (IIRC): + + http://www.python.org/doc/current/ref/sequence-types.html + +If the latter, look at __getslice__: + + http://www.python.org/doc/current/ref/sequence-methods.html + +Randall + + + + + + diff --git a/demo/ermis-f/python_m/cur/1732 b/demo/ermis-f/python_m/cur/1732 new file mode 100644 index 00000000..bf5cb337 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1732 @@ -0,0 +1,82 @@ +From: tbryan at arlut.utexas.edu (Thomas A. Bryan) +Date: Sun, 09 May 1999 09:39:09 -0400 +Subject: using python in www site +References: <3732fd89.446889923@news.vbs.at> <373316D9.AB851DC5@zarlut.utexas.edu> <373317F6.737B4D40@zarlut.utexas.edu> <7h2v9m$ls1$1@agate.berkeley.edu> <37355EEC.2E537D9C@lemburg.com> <37357519.608573842@news.vbs.at> +Message-ID: <37358FFD.9AAB4C6A@arlut.utexas.edu> +Content-Length: 2150 +X-UID: 1732 + +Kaweh Kazemi wrote: +> +> >To install the binary you only need FTP access and an cgi-bin +> >directory that executes .cgi as CGI programs. Here are the +> >steps needed: +> > +> > [steps] +> > +> >That's all -- you don't even need a TELNET access. +> +> well, my ISP gave me access to a ftp directory which also has a +> cgi-bin directory, and on login the system says: +> +> "UNIX(r) System V Release 4.0" +> +> there doesn't seem to be a compatible cgipython archive, am i right? +> +> well, if someone has access to a machine using this type of unix and +> could create a compatible cgipython archive, this would help me very +> much. i even don't know, if this information is enough to create a +> cgipython-archive (same unix, different hardware-platforms?), but +> that's all i have at this time (if someone is willing to help and +> needs more information, i will check with my ISP, just tell me what +> you need to know). + +Situation: +Your ISP permits Perl cgi scripts. +You'd like to use Python, but they don't intend to install Python. +You decide to use mxCGIPython, but you don't know enough information + about the ISP's platform. + +Solution: +Change the first line of the script at the bottom of the page + to point to your ISP's Perl. +Upload the script to your cgi-bin directory. + (Make script executable if necessary) +Point your browser to the script. + +I use uname -a to get all of the information the machine can provide. +You should be able to parse out the UNIX variant and version and +the machine architecture. + +Marc-Andre, maybe you could include this on the mxCGIPython page +for those in Kaweh's situation. + +#!/usr/bin/perl +# uname -a should work on all UNIX machines +$info = `uname -a`; +# get rid of the newline and split the output on whitespace +chomp($info); +@info = split(/\s+/,$info); +# print the static part of the HTML page +print < +System Information + +

+Output of uname -a: +

+

    +EOF +# print the dynamic part of the page, +# using a list for legibility +foreach $el (@info) { + print "
  • $el\n"; +} +# finish up +print "<\UL>\n\n"; + + + + diff --git a/demo/ermis-f/python_m/cur/1733 b/demo/ermis-f/python_m/cur/1733 new file mode 100644 index 00000000..39605b7c --- /dev/null +++ b/demo/ermis-f/python_m/cur/1733 @@ -0,0 +1,101 @@ +From: sdm7g at virginia.edu (Steven D. Majewski) +Date: Wed, 12 May 1999 00:59:56 GMT +Subject: while (a=b()) ... +In-Reply-To: <033101be9bf4$d1ed7c00$f29b12c2@pythonware.com> +References: <033101be9bf4$d1ed7c00$f29b12c2@pythonware.com> +Message-ID: +Content-Length: 2920 +X-UID: 1733 + +On Tue, 11 May 1999, Fredrik Lundh wrote: + +> scott cotton wrote: +> > >c=curs.fetchone() +> > >while c: +> > > do something with c +> > > c=curs.fetchone() +> > > +> > >Is it a little redundant? Yes. Error prone? No. +> > +> > Error prone it is - by virtue of being redundant. changes to +> > the loop may require changing two code lines, and it's easy +> > to forget to update redundant code. +> +> so don't use it. use the Standard Python Idiom +> That Everyone Else Uses instead (see below). +> +> > while (c=curs.fetchone(); c): +> > +> > is not redundant, nor does it have the '=' != '==' problem. +> +> it has one big problem: it's impossible to understand. +> doesn't look like any other mainstream programming +> language (as is the case for most Python features), +> and definitely doesn't look like anything a non-pro- +> grammer have ever seen (like prominent Python +> features such as indentation, colon after if/while, +> etc). if we really need a special syntax for this (no, +> we don't), I've seen better proposals... +> +> but I still claim that this whole issue is just a big +> time sink. just READING a single post on this topic +> (including this one) takes more time than you'll +> ever spend typing: +> +> while 1: +> c = curs.fetchone() +> if not c: +> break +> # process c +> +> instead of any sugared version of this idiom. +> +> ...and don't tell me that anyone smart enough to operate +> a contemporary computer cannot train her/his brain to +> quickly identify the above as an instance of a commonly +> used pattern, rather than a number of individual state- +> ments whose purpose needs to be carefully analyzed one +> by one... +> +> face it: this idiom is used all over the place (found some +> 80 places in the standard library, for example), so you +> need to learn it anyway if you're ever going to look at +> code written by anyone else. and when you've done +> that, you might as well use it yourself. +> +> now, has anyone written any useful Python code today? +> +> +> +> + + +OK -- new suggested idiom for those folks who Really, Really have +to have it all in one statement (It *could* be on one line, but you +wouldn't be able to read it): + + +import sys,string + +while setattr( sys.modules[__name__], 'LINE', + getattr( sys.modules[__name__], 'FILE', + setattr( sys.modules[__name__], 'FILE', + getattr( sys.modules[__name__], 'FILE', + open('ReadMe')))).readline()) or LINE: print string.strip(LINE) + + + + +---| Steven D. Majewski (804-982-0831) |--- +---| Department of Molecular Physiology and Biological Physics |--- +---| University of Virginia Health Sciences Center |--- +---| P.O. Box 10011 Charlottesville, VA 22906-0011 |--- + + Caldera Open Linux: "Powerful and easy to use!" -- Microsoft(*) + (*) + + + + + + diff --git a/demo/ermis-f/python_m/cur/1734 b/demo/ermis-f/python_m/cur/1734 new file mode 100644 index 00000000..1fb69021 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1734 @@ -0,0 +1,42 @@ +From: xbouska at infima.cz (Richard Bouska) +Date: Thu, 06 May 1999 15:24:56 +0200 +Subject: string containing raw data - PyArg_ParseTuple() bug? +Message-ID: <37319827.A0CA404@infima.cz> +X-UID: 1734 + +I have a problem with when I want to copy a file to databaze: + lo=db.locreate(pg.INV_READ|pg.INV_WRITE) + lo.open(pg.INV_WRITE) + buf=f.read(8192) + while buf: + lo.write(buf) + buf=f.read(8192) + lo.close() + +but I got the folowing error: + +lo.write(buf) +TypeError: write(buffer), with buffer (sized string) + +The proble arises only if the source file are raw data for ASCII texts +is the script working well. + +The part of the c underlying c code: + /* gets arguments */ + if (!PyArg_ParseTuple (args, "s", &buffer)) + { + PyErr_SetString(PyExc_TypeError, + "write(buffer), with buffer (sized +string)."); + return NULL; + } + +If I understat it corectly thr problem is in the PyArg_ParseTuple +function. + +Richard Bouska +Richard at Bouska.cz + + + + diff --git a/demo/ermis-f/python_m/cur/1735 b/demo/ermis-f/python_m/cur/1735 new file mode 100644 index 00000000..e27b3152 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1735 @@ -0,0 +1,49 @@ +From: def-p at usa.net (Def P) +Date: Wed, 19 May 1999 12:44:54 +0200 +Subject: Defining VCL-like framework for Python +References: +Message-ID: <7hu4sg$16r$1@freyja.bart.nl> +Content-Length: 1406 +X-UID: 1735 + +Alexander Staubo wrote... + +>Delphi is particularly good -- especially compared to such toolkits as +>Microsoft's MFC -- because it offers clean OOP concepts, + +Hmm, it's not that clean, but that's not the point here... :) + +>Imho, Python needs a better windowing toolkit than is provided by +>Tcl/Tkinter today. That's just me. + +While you are of course entitled to your opinion, I beg to differ... I've +been using both: Delphi at work, Python for kicks, and while Tkinter had a +bit of learning curve (also because it's so different from Delphi) I now +find that developing in Python & Tkinter is not significantly slower, or +more painful, than in Delphi. + +>Furthermore, Python does not have (at +>least afaik) a component-based system for building applications. + +True, and a library or package with Tkinter "components" would be nice. I, +for one, miss a "component" consisting of two listboxes where you can move +data from one to the other. Fortunately, this is fairly easy to code, so +I'll eventually write it myself. + +I think designing all-new components (not constructed from existing ones) +won't be that easy, though. Is it possible? *looks expectantly at Tkinter +demigods* + +[other ideas snipped because I don't have much to say about them :-] + +I do agree something like "Visual Python" would be a nice thing to have... +it's also a helluva lot of work... Maybe a SIG for this would be a good +idea? + + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1736 b/demo/ermis-f/python_m/cur/1736 new file mode 100644 index 00000000..9db90001 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1736 @@ -0,0 +1,35 @@ +From: clift at mail.anacapa.net (Steve Clift) +Date: Wed, 26 May 1999 19:34:16 -0700 +Subject: Python 1.5.2 and large files (Solaris 7) +In-Reply-To: <000301bea731$df6496a0$529e2299@tim> +References: <3.0.6.32.19990525184325.0094e100@mail.anacapa.net> +Message-ID: <3.0.6.32.19990526193416.00960c10@mail.anacapa.net> +X-UID: 1736 + +At 12:40 AM 1999-05-26 -0400, the night watchman wrote: + +>[about whether integer-yielding ops on huge files should always return long, +> or cut back to int when they're small enough] + +[snip] + +>When I get back a position from f.tell() and add 1017 to it, knowing a +>priori that the sum is also a valid position for the file, I don't ever want +>to see an OverflowError. I hope Python2 obliterates the user-visibile +>distinction between ints and longs, but in Python1 int arithmetic can +>overflow, and file positions (whether computed or revealed) are expected to +>overflow an int in the presence of huge files. +> +>all-long-all-the-time-so-long-as-it-matters-ly y'rs - tim + +Checkmate. Now I feel strongly about it. + +How do you come up with this sort of stuff at such an hour? + +-Steve + + + + + + diff --git a/demo/ermis-f/python_m/cur/1737 b/demo/ermis-f/python_m/cur/1737 new file mode 100644 index 00000000..0509e1ff --- /dev/null +++ b/demo/ermis-f/python_m/cur/1737 @@ -0,0 +1,23 @@ +From: fredrik at pythonware.com (Fredrik Lundh) +Date: Tue, 4 May 1999 12:55:55 GMT +Subject: The way to a faster python [was Python IS slow !] +References: +Message-ID: <005701be962d$7416f970$f29b12c2@pythonware.com> +X-UID: 1737 + +Markus Kohler wrote: +> 1. One can use a dispatch table instead of a case statement by using +> an extension of gnu C. For squeak (www.squeak.org) that gave me a speedup +> of almost a factor of 2 in message sending speed on a HP-UX machine. +> The statement used is a goto(address). Some other C compilers might be +> able to do that as well, and for those you don't have it the old code +> should still be there. + +http://starship.skyport.net/crew/vlad/archive/threaded_code/ + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1738 b/demo/ermis-f/python_m/cur/1738 new file mode 100644 index 00000000..c9bc120b --- /dev/null +++ b/demo/ermis-f/python_m/cur/1738 @@ -0,0 +1,29 @@ +From: shecter at darmstadt.gmd.de (Robb Shecter) +Date: Mon, 03 May 1999 14:20:55 +0200 +Subject: Python too slow for real world +References: <372068E6.16A4A90@icrf.icnet.uk> <3720A21B.9C62DDB9@icrf.icnet.uk> <3720C4DB.7FCF2AE@appliedbiometrics.com> <3720C6EE.33CA6494@appliedbiometrics.com> <37215EFB.433AFCA6@prescod.net> <3724B2D6.B468687A@prescod.net> +Message-ID: <372D94A7.A008DA0A@darmstadt.gmd.de> +X-UID: 1738 + +Roy Smith wrote: + +> Paul Prescod wrote: +> > It is a performance issue if you don't know that regexps are supposed to +> > be compiled. +> + +Hi, + +Sorry if this is obvious, but does the Regex class cache compilations? I +couldn't find any info on this. If it was, it would support subject matter +experts nicely, like someone else mentioned. But even as a CS person, I like +how the Java "ORO" Regex Library has automatic Least Recently Used caching. +This lets application code be simpler, as well as making it easier to share +compiled expressions much more easily between objects. + +- Robb + + + + + diff --git a/demo/ermis-f/python_m/cur/1739 b/demo/ermis-f/python_m/cur/1739 new file mode 100644 index 00000000..8cc8c948 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1739 @@ -0,0 +1,37 @@ +From: MHammond at skippinet.com.au (Mark Hammond) +Date: Thu, 20 May 1999 19:41:08 +1000 +Subject: COM Shutdown +References: <374370AB.E285C993@prescod.net> +Message-ID: <7i0lac$c51$1@m2.c2.telstra-mm.net.au> +X-UID: 1739 + +You can find out how many PythonCOM objects are alive at any time by calling +pythoncom._GetInterfaceCount(). If this is zero, shutdown should always be +OK. If not, you have some immortal objects for some reason... + +Alternatively, just try calling pythoncom.CoUninitialize() on the way out. +In builds 124 and before, the hang is almost certainly when PythonCOM is +calling this (but at an inopportune time, causing the hang) + +Mark. + +Paul Prescod wrote in message <374370AB.E285C993 at prescod.net>... +>I have an app using Automation to talk to Office 2000. It doesn't shut +>down properly. It just hangs when it is done. I'm creating and accessing a +>lot of objects so debugging this will be pretty painful. Does anyone out +>there have any tips? +> +>I can delete everything in the local namespace and it doesn't help: +> +>for key in locals().keys(): +> del locals()[key] +> +>So it doesn't seem to be object deletion but some other shutdown issue. +>Any ideas? + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1740 b/demo/ermis-f/python_m/cur/1740 new file mode 100644 index 00000000..19a752cb --- /dev/null +++ b/demo/ermis-f/python_m/cur/1740 @@ -0,0 +1,29 @@ +From: phd at sun.med.ru (Oleg Broytmann) +Date: Sat, 22 May 1999 15:03:37 +0400 (MSD) +Subject: Changes to Python. +In-Reply-To: <37457C37.33BF1583@prescod.net> +Message-ID: +X-UID: 1740 + +Hi! + +On Fri, 21 May 1999, Paul Prescod wrote: +> "You don't need classes. You can do the same thing with dictionaries and +> functions!" + + You don't need anything at all - you can do the same with assembler (but +not as easy, sure :) + +> -- +> Paul Prescod - ISOGEN Consulting Engineer speaking for only himself +> http://itrc.uwaterloo.ca/~papresco + +Oleg. +---- + Oleg Broytmann http://sun.med.ru/~phd/ phd2 at mail.com + Programmers don't die, they just GOSUB without RETURN. + + + + + diff --git a/demo/ermis-f/python_m/cur/1741 b/demo/ermis-f/python_m/cur/1741 new file mode 100644 index 00000000..af05604f --- /dev/null +++ b/demo/ermis-f/python_m/cur/1741 @@ -0,0 +1,128 @@ +From: kiki at pixar.com (kiki) +Date: Tue, 25 May 1999 09:13:46 -0700 +Subject: [tkinter] Event from menu event? +References: <3749FE8A.9DD61AB4@pixar.com> <374A8853.F71C7218@earth.ox.ac.uk> +Message-ID: <374ACC3A.223E32BD@pixar.com> +Content-Length: 3154 +X-UID: 1741 + +So far, no luck... + +This is proving to be very tricky!! + +I got this suggestion: + +---- +def myfunc(label): + print label + +mymenu.add_command(label = "foo", command = lambda: myfunc("foo")) +---- + +Which works, but does NOT work if I'm doing something like this: + +for each_class in draw_class_name: + mymenu.add_command(label = each_class, command = lambda: +myfunc(each_class)) + +I get this error: + +Exception in Tkinter callback +Traceback (innermost last): + File "/usr/local/lib/python1.5/lib-tk/Tkinter.py", line 726, in __call__ + return apply(self.func, args) + File "Haiku.py", line 167, in + lambda: mondo_menu_call(each_class)) +NameError: each_class + + +hee-hee!! Tricky! [This also applies to trying to pass integer index +parameters, of course. By the time it gets around to the menu call, the +context of the variable name is lost...] + + +Remember, since I'm loading modules dynamically, I can't know how many I have, +nor what their names are. I have a *list* of *strings* [or eval(draw_name) or +whatever you like) and have to build my menu based on variables, not +constants... + +Nick Belshaw wrote:> + +> and identify which menu-selection was made inside that function +> +> def commonfunc(): +> called_index = mymenu.menu.index('active') +> operation = function_list[called_index] + +This is the error [unfortunately] I get with that: + +Menu selected Exception in Tkinter callback +Traceback (innermost last): + File "/usr/local/lib/python1.5/lib-tk/Tkinter.py", line 726, in __call__ + return apply(self.func, args) + File "Haiku.py", line 134, in mondo_menu_call + print "Menu selected",pattern_data.haiku_menu.index('active') +AttributeError: index + +Arg! Arg! + +---Here is how I'm creating my menu [note, the names don't make any sense, +bare with me]: + +class Haiku_Menu: + + def __init__(self, master): + self.menubar = master + + # Add the Haiku menu to the menubar [items will be added later in +Haiku.main] + self.haikumenu = Menu(self.menubar) + mbutton = Menubutton (self.menubar, text="Haiku", menu=self.haikumenu) + mbutton.pack(side=LEFT) + self.haikumenu = Menu(mbutton) + mbutton ['menu'] = self.haikumenu + + def add_haiku_item(self, item_name, cmnd): + self.haikumenu.add_command(label = item_name, command = cmnd) + +---main() +def main(): + root = Tk() + + pattern_data.hoop = Canvas(root, width = '4i', height = '4i') + + # Make a bar separated from the drawing area + menubar = Frame (root, relief=RAISED, bd=2) + menubar.pack (side=TOP, fill=X) + # Add the relevent menu items + pattern_data.haiku_menu = Haiku_Menu.Haiku_Menu(menubar) + + for stitch_name in stitch_class_list: + + # Add the menu item for this stitch class and bind + # to the created function + pattern_data.haiku_menu.add_haiku_item( + eval(stitch_name).__name__, + mondo_menu_call) + + pattern_data.hoop.pack(side = RIGHT) + root.mainloop() + + +---And here's my menu function: + +def mondo_menu_call(): #\n"%eval(each_stitch_class).__name__, + global pattern_data + print "Menu selected",pattern_data.haiku_menu.index('active') + +Thanx for your suggestions. They all work, just not with an unknown list of +strings. + +Anybody else? + +Kiki + + + + + diff --git a/demo/ermis-f/python_m/cur/1742 b/demo/ermis-f/python_m/cur/1742 new file mode 100644 index 00000000..0b961b5d --- /dev/null +++ b/demo/ermis-f/python_m/cur/1742 @@ -0,0 +1,29 @@ +From: fredrik at pythonware.com (Fredrik Lundh) +Date: Tue, 4 May 1999 13:33:45 GMT +Subject: Productivity and the two language approach (was: Using Python for Modular Artificial Intelligence code) +References: <7g94lp$mdu$1@news.worldonline.nl> <925677195.13550.0.rover.c3ade4b2@news.demon.nl> <925758153.6563.0.muttley.c3ade4b2@news.demon.nl> <7gml1n$khd$1@news.worldonline.nl> +Message-ID: <009001be9633$e3875bf0$f29b12c2@pythonware.com> +X-UID: 1742 + +Ilja Heitlager wrote: +> >http://www.scriptics.com/people/john.ousterhout/scripting.html +> +> Thanks. Note for Tim (I am becoming evangelistic) productivity increase +> measured from 4-60 for 8 different projects! + +careful with those figures. iirc, they describe existing +projects that were rewritten in Tcl by experienced +programmers, and seem to focus on coding and code +debugging efforts only. there's a lot more to take into +account out in the real world... + +python's no silver bullet, you know... + +(but it's a damned good tool!) + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1743 b/demo/ermis-f/python_m/cur/1743 new file mode 100644 index 00000000..1b185c6f --- /dev/null +++ b/demo/ermis-f/python_m/cur/1743 @@ -0,0 +1,29 @@ +From: skip at mojam.com (Skip Montanaro) +Date: Sat, 22 May 1999 22:09:50 GMT +Subject: Bytecode optimisation +References: <000901bea1ba$41ad0680$2e9e2299@tim> + <7hue8m$gsh$1@cronkite.cc.uga.edu> + <927215048snz@vision25.demon.co.uk> + <7i1ko4$l8p$1@cronkite.cc.uga.edu> <37454451.28108DE0@appliedbiometrics.com> +Message-ID: <37472C0D.7130C362@mojam.com> +X-UID: 1743 + +Christian Tismer wrote: + +> Please, to all speedy gonzales addictives, before +> digging into "new" areas, read all of this: +> ... [snip] ... + +Also, take a look at Python2C (written by Bill Tutt and Greg Stein) at + + http://lima.mudlib.org/~rassilon/p2c + +-- +Skip Montanaro | Mojam: "Uniting the World of Music" +http://www.mojam.com/ +skip at mojam.com | Musi-Cal: http://www.musi-cal.com/ +518-372-5583 + + + + diff --git a/demo/ermis-f/python_m/cur/1744 b/demo/ermis-f/python_m/cur/1744 new file mode 100644 index 00000000..f1f3ab3f --- /dev/null +++ b/demo/ermis-f/python_m/cur/1744 @@ -0,0 +1,37 @@ +From: faassen at pop.vet.uu.nl (Martijn Faassen) +Date: Tue, 04 May 1999 10:46:43 +0200 +Subject: Python T-shirt +References: <372B7136.4A561EF4@weihenstephan.org> <19990503122701.B972647@vislab.epa.gov> <372DF1F5.66CD0294@pop.vet.uu.nl> <000f01be95a5$89143d20$f29b12c2@pythonware.com> +Message-ID: <372EB3F3.C5F14639@pop.vet.uu.nl> +X-UID: 1744 + +Fredrik Lundh wrote: +> +> Martijn Faassen wrote: +> > We need a mascot! I thought it was a python? +> +> http://www.python.org/doc/FAQ.html#1.2 +> +> "Python is not a joke. And don't you associate it +> with dangerous reptiles either! (If you need an +> icon, use an image of the 16-ton weight from the +> TV series or of a can of SPAM)." + +I know this, but of course nobody cares and everybody uses the dangerous +reptiles anyway. :) + +"So, what language are you using?" + +"Python" + +"So I know what your mascot is, wink wink nudge nudge?" + +"Yeah, our mascot is a 16-ton weight." + +Anyway-penguins-are-dangerous-too-ask-Linus-Torvalds-ly yours, + +Martijn + + + + diff --git a/demo/ermis-f/python_m/cur/1745 b/demo/ermis-f/python_m/cur/1745 new file mode 100644 index 00000000..7e7f62d8 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1745 @@ -0,0 +1,46 @@ +From: MHammond at skippinet.com.au (Mark Hammond) +Date: Tue, 25 May 1999 09:47:30 +1000 +Subject: Module initialization problem when using COM +References: <0E16861EE7BCD111BE9400805FE6841F0949A5B2@c1s5x001.cor.srvfarm.origin-it.com> <7i4sgb$3c5$1@m2.c2.telstra-mm.net.au> <0E16861EE7BCD111BE9400805FE6841F09581422@c1s5x001.cor.srvfarm.origin-it.com> <37495899.62DA32ED@appliedbiometrics.com> +Message-ID: <7icobr$9o$1@m2.c2.telstra-mm.net.au> +Content-Length: 1457 +X-UID: 1745 + +[From comp.lang.python; cc to the PythonCOM developers mailing list] +Christian Tismer wrote in message +<37495899.62DA32ED at appliedbiometrics.com>... + +>Without having tried, here my guess: (may be very wrong) + +Also without trying, here is my guess, which is very close to yours. + +When Python is hosting a COM object, it tries to be a good citizen by +cleaning up. When the last PythonCOM object destructs, Python is finalized. +When the first PythonCOM object is created, Python is initialized. + +This means that the process of creating one COM object, freeing it, then +creating another is transitioning between these states. As Python has been +finalized and reinitialized, the imports are indeed happening again, as you +would expect in this scenario. + +It is unclear if this behaviour of PythonCOM is desirable; if it is not, I +cant see a better way to determine that Python should be finalized - so we +could simply _never_ finalize Python. However, this is not nice for a long +running process (eg, IIS) that happens to use a Python COM object once. +Ideally (but probably not realistically) finalizing Python should remove +_all_ traces that it ever existed (ie, every scrap of memory should be +freed) + +Either way, it does appear that this is the underlying ILU problem. I would +guess we could invoke the same behaviour from a test program that init'd +then finalized then re-init'd Python before again using ILU. Is this +possible to confirm? + +Mark. + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1746 b/demo/ermis-f/python_m/cur/1746 new file mode 100644 index 00000000..a09fc53b --- /dev/null +++ b/demo/ermis-f/python_m/cur/1746 @@ -0,0 +1,19 @@ +From: mjackson at wc.eso.mc.xerox.com (Mark Jackson) +Date: 5 May 1999 14:52:37 GMT +Subject: One more T-shirt idea. . . +Message-ID: <7gplvl$g84$1@news.wrc.xerox.com> +X-UID: 1746 + +"I want to see John the Baptist impersonatin' Bill Gates" + +-- +Mark Jackson - http://www.alumni.caltech.edu/~mjackson + The data structures of the code require some degree + higher than a PhD to understand, since we've got PhDs + and we can't figure them out. - J. A. Templon + + + + + + diff --git a/demo/ermis-f/python_m/cur/1747 b/demo/ermis-f/python_m/cur/1747 new file mode 100644 index 00000000..13216dbc --- /dev/null +++ b/demo/ermis-f/python_m/cur/1747 @@ -0,0 +1,33 @@ +From: never at mail.matav.hu (Hever Zsolt) +Date: Fri, 7 May 1999 19:35:23 +0200 +Subject: Tk Canvas objects - Deletable? +Message-ID: <199905071752.NAA04106@python.org> +X-UID: 1747 + +>I actually meant the Tkinter Canvas objects, not the Tk canvas items under +>the hood. + +Your immortal.py code has been changed. It is a very bad code, but I hope +this is what you would like to do. + +I think visiting the would help you +to understand the philosophy of Tkinter. + +The following is from there: +'The source. When all else fails: Read The Source, +Luke! +Demo/tkinter/ in the Python source +distribution. This contains many helpful +examples, including updated versions of Matt +Conway's examples." + +Zsolt +-------------- next part -------------- +A non-text attachment was scrubbed... +Name: immortal.py +Type: application/octet-stream +Size: 1684 bytes +Desc: immortal (Python File) +URL: + + diff --git a/demo/ermis-f/python_m/cur/1748 b/demo/ermis-f/python_m/cur/1748 new file mode 100644 index 00000000..8c769b0e --- /dev/null +++ b/demo/ermis-f/python_m/cur/1748 @@ -0,0 +1,50 @@ +From: gherron at aw.sgi.com (Gary Herron) +Date: Tue, 25 May 1999 18:22:52 GMT +Subject: Python 152 & Tkinter install problems... +References: <01bea6ce$f2c4a540$0201a8c0@alfred95.gsf.com> +Message-ID: <374AEA7B.21C24505@aw.sgi.com> +Content-Length: 1216 +X-UID: 1748 + +Greg Foltz wrote: +> +> Grrrr!!!! Help... +> +> 3 hours of installing is enough... trying to get Py152.exe w/ Tkinter > +> Tcl805 installed on my Micron portable that had a running PythonWin older +> version. I've installed 5x and still get the following message even though +> I've got identical installs on 2 other W95 desktop machines working great. +> +> Again, trying to get Py152.exe & Tcl/Tkinter running on W95 Micron +> Portable. Tcl seems to be running fine by itself. Command line python +> looks good too. I've played pathgames and everything I could think of but +> still get this: + +I just hit this same problem minutes ago. Fortunately the fix is easy, +if a little heavy handed. + +In directory: + C:\Program Files\Tcl\tk8.0 +find two files: + listbox.tcl, and + text.tcl +and comment out the lines having to do with binding . In +both files those lines look like this: + + bind ... { + %W yview ... + } + +Now ... Does anyone know enough tcl to do this correctly? (For example, +check for the validity of the event and do this binding +conditionally.) + +-- +Dr. Gary Herron +206-287-5616 +Alias | Wavefront +1218 3rd Ave, Suite 800, Seattle WA 98101 + + + + diff --git a/demo/ermis-f/python_m/cur/1749 b/demo/ermis-f/python_m/cur/1749 new file mode 100644 index 00000000..f4beaf9c --- /dev/null +++ b/demo/ermis-f/python_m/cur/1749 @@ -0,0 +1,69 @@ +From: xbouska at bsdi.infima.cz (Richard Bouska) +Date: Fri, 7 May 1999 06:15:21 GMT +Subject: string containing raw data - PyArg_ParseTuple() bug? +In-Reply-To: <3731C590.96D52B64@appliedbiometrics.com> +References: <3731C590.96D52B64@appliedbiometrics.com> +Message-ID: +Content-Length: 1768 +X-UID: 1749 + +Well the db is the postgresql ver 6.4-2 and the interface I am using is +PyGreSQL-2.3. I made the changes you suggested and I will send them to the +author. + +Thank You very much for Your assistance. +I am not the autor of the PyGreSQL and did not expect "feature" like that. + +Richard Bouska +Richard at Bouska.cz + + +On Thu, 6 May 1999, Christian Tismer wrote: + +> +> +> Richard Bouska wrote: +> > +> > I have a problem with when I want to copy a file to databaze: +> > lo=db.locreate(pg.INV_READ|pg.INV_WRITE) +> > lo.open(pg.INV_WRITE) +> > buf=f.read(8192) +> > while buf: +> > lo.write(buf) +> > buf=f.read(8192) +> > lo.close() +> > +> > but I got the folowing error: +> > +> > lo.write(buf) +> > TypeError: write(buffer), with buffer (sized string) +> +> Could you please provide us with more info about "db"? +> Did you write the interface yourself? +> +> > if (!PyArg_ParseTuple (args, "s", &buffer)) +> +> This has the semantics that the string must be a properly +> zero terminated string. If you call this with a string +> object with zeroes, PyArg_ParseTuple correctly complains. +> +> If your intent is to work with raw strings which can +> contain anything, use +> +> > if (!PyArg_ParseTuple (args, "s#", &buffer, &buflen)) +> +> ciao - chris +> +> -- +> Christian Tismer :^) +> Applied Biometrics GmbH : Have a break! Take a ride on Python's +> Kaiserin-Augusta-Allee 101 : *Starship* http://starship.python.net +> 10553 Berlin : PGP key -> http://wwwkeys.pgp.net +> PGP Fingerprint E182 71C7 1A9D 66E9 9D15 D3CC D4D7 93E2 1FAE F6DF +> we're tired of banana software - shipped green, ripens at home +> + + + + + diff --git a/demo/ermis-f/python_m/cur/1750 b/demo/ermis-f/python_m/cur/1750 new file mode 100644 index 00000000..3339aa76 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1750 @@ -0,0 +1,51 @@ +From: phd at sun.med.ru (Oleg Broytmann) +Date: Fri, 7 May 1999 12:04:43 +0400 (MSD) +Subject: Percent indication in place +In-Reply-To: <14129.58440.971497.903286@amarok.cnri.reston.va.us> +Message-ID: +Content-Length: 1360 +X-UID: 1750 + +Hi! + + For DOS/UNIX comsoles I wrote ttyProgressBar: +http://sun.med.ru/~phd/Software/Python/misc.html + Download pbar.tgz. + +On Thu, 6 May 1999, Andrew M. Kuchling wrote: +> colmconn at my-dejanews.com writes: +> >How can I display a percentage-done indication that updates itself in place, +> >or show a "twirling baton" progress indicator? +> +> On a Unix terminal (and probably on an MS-DOS console), you +> can just print chr(8) to backspace, so a twirling display would look +> something like this: +> +> import time, sys +> sys.stdout.write(' ') +> +> for i in '|/-\|': +> sys.stdout.write( chr(8)+i ) ; sys.stdout.flush() ; time.sleep(1) +> print +> +> You have to flush standard output after each character so it gets +> immediately printed; otherwise they'll be buffered up, and the user +> won't see them. +> +> -- +> A.M. Kuchling http://starship.python.net/crew/amk/ +> You didn't join the rebellion, not because you felt I was wrong, but because +> you were too damned scared. What would you have done, had I won? Told me that +> you'd always supported me ideologically? That you were secretly cheering me on +> the whole time? +> -- Lucifer berates Remiel, in SANDMAN #60: "The Kindly Ones:4" + +Oleg. +---- + Oleg Broytmann National Research Surgery Centre phd2 at email.com + Programmers don't die, they just GOSUB without RETURN. + + + + + diff --git a/demo/ermis-f/python_m/cur/1751 b/demo/ermis-f/python_m/cur/1751 new file mode 100644 index 00000000..6406f028 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1751 @@ -0,0 +1,45 @@ +From: gmcm at hypernet.com (Gordon McMillan) +Date: Mon, 3 May 1999 14:07:12 GMT +Subject: Indentation on WinNT +In-Reply-To: <372D7DDB.CF5C5588@t-online.de> +References: <372D7DDB.CF5C5588@t-online.de> +Message-ID: <1286381846-92313087@hypernet.com> +X-UID: 1751 + +Monika G?hmann writes: +> +> the concept of using indentation-only structuring in Python code is +> very nice -- as long as everybody uses Unix and/or reasonable +> settings with their editor. +> +> I have to work with WinNT and when I display code which was +> developed on Unix it sometimes is all messed up looking like this: +> +> if something: +> if something_else: +> do this +> do that +> +> So what does this code do ? +> +> Is there any way to get this displayed correctly with Vim5.3 or any +> other editor ? + +This is certainly not a general problem of WIndows vs *nix, both of +which defer all misconceptions about tabs to the viewer / editor. +(Many email clients are totally brain dead about tabs, and show +a leading tab as one space.) + +My guess is that you're looking at something written as tab=8, +indent=4 with an editor set for tab=4. If you're using vim, just +reset your tabstops and see if it looks right. + +You could also try: + http://www.mcmillan-inc.com/dnld/tabcleaner.py + + +- Gordon + + + + diff --git a/demo/ermis-f/python_m/cur/1752 b/demo/ermis-f/python_m/cur/1752 new file mode 100644 index 00000000..69074a2e --- /dev/null +++ b/demo/ermis-f/python_m/cur/1752 @@ -0,0 +1,26 @@ +From: pioneer at wam.umd.edu (Sarino Suon) +Date: Wed, 19 May 1999 12:39:10 -0400 +Subject: Python/beeper connectivity +Message-ID: +X-UID: 1752 + +Hi there: + +In one of the Python books, the author refers to an anecdote in ANOTHER +Python book about a guy who created a Python program to beep him whenever +an exception occurred. I thought that was neat when I first read about it. +Has anyone done anything like this? I would like to explore using my +computer to talk to household appliances and other electronic +devices, which I assume are especially designed to interface with a PC. + +Since I now trust Python to take over my computer, I wouldn't mind letting +it run my house. :-) + +Is anyone into this sort of thing? Would love to hear from you. + + --- Sarino + + + + + diff --git a/demo/ermis-f/python_m/cur/1753 b/demo/ermis-f/python_m/cur/1753 new file mode 100644 index 00000000..7526e113 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1753 @@ -0,0 +1,37 @@ +From: mjackson at wc.eso.mc.xerox.com (Mark Jackson) +Date: 11 May 1999 15:05:33 GMT +Subject: Python T-shirt +References: <37383E31.17FA064C@callware.com> +Message-ID: <7h9gvt$bvc$1@news.wrc.xerox.com> +X-UID: 1753 + +Ivan Van Laningham writes: + +> James wrote: + +> > And the impressive sorcerer called .... Tim. +> > +> > (spooky, isn't it?) + +> I kind of like the ferocious bunny T-shirt idea, myself, but I'd like to +> correct a small error perpetrated by the movie. The bunny that lops off +> arms etc. is at one point described as a ``rodent.'' In point of fact, +> rabbits are lagomorphs, _not_ rodents. +> +> Someone more artistically talented than I am should ``penguinize'' a +> bunny. Perhaps it could be wearing an impressive sorcerer T-shirt. ... + +Forget the bunny. Visualize the impressive sorcerer, levitating +(with evident ease) the 16-ton weight. . . + +-- +Mark Jackson - http://www.alumni.caltech.edu/~mjackson + The data structures of the code require some degree + higher than a PhD to understand, since we've got PhDs + and we can't figure them out. - J. A. Templon + + + + + + diff --git a/demo/ermis-f/python_m/cur/1754 b/demo/ermis-f/python_m/cur/1754 new file mode 100644 index 00000000..f8e20f14 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1754 @@ -0,0 +1,29 @@ +From: graham at sloth.math.uga.edu (Graham Matthews) +Date: 23 May 1999 20:16:37 GMT +Subject: Defining VCL-like framework for Python +References: <1284777593-1647219@hypernet.com> +Message-ID: <7i9nn5$a9m$1@cronkite.cc.uga.edu> +X-UID: 1754 + +Gordon McMillan (gmcm at hypernet.com) wrote: +: Tk is a GUI toolkit. You are completely in charge of creating your +: widgets and making things interact. Complete control, lots of code. +: +: A GUI framework is a pre-built skeleton. Much less code (usually): +: you override this here and that there and if you're lucky, that's all +: there is to it. + +So how does a framework differ from a GUI toolkit with several abstraction +layers? + +graham + +-- + As you grow up and leave the playground + where you kissed your prince and found your frog + Remember the jester that showed you tears + the script for tears + + + + diff --git a/demo/ermis-f/python_m/cur/1755 b/demo/ermis-f/python_m/cur/1755 new file mode 100644 index 00000000..0d3daf1c --- /dev/null +++ b/demo/ermis-f/python_m/cur/1755 @@ -0,0 +1,22 @@ +From: Brian at digicool.com (Brian Lloyd) +Date: Tue, 25 May 1999 20:41:03 GMT +Subject: What does this statement do??? +Message-ID: <613145F79272D211914B0020AFF6401914DB3D@gandalf.digicool.com> +X-UID: 1755 + +> #if sys.argv[1:]: n = int(sys.argv[1]) +> +> Thanks + +Technically, nothing - it would be a comment. ;^) + + +Brian Lloyd brian at digicool.com +Software Engineer 540.371.6909 +Digital Creations http://www.digicool.com + + + + + + diff --git a/demo/ermis-f/python_m/cur/1756 b/demo/ermis-f/python_m/cur/1756 new file mode 100644 index 00000000..07c57697 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1756 @@ -0,0 +1,34 @@ +From: skott1870 at my-dejanews.com (skott1870 at my-dejanews.com) +Date: Tue, 04 May 1999 16:32:55 GMT +Subject: Using os.popen with other python scripts +Message-ID: <7gn7fo$fqs$1@nnrp1.dejanews.com> +X-UID: 1756 + + +I'm having trouble using os.popen within a script to capture the output of +another script. +For example: + +Script 1: + +print "this is a test" + +Script 2: + +import os +x = os.popen('script1.py').readlines() +print x + +Script2's output is just an empty list. I'm working on an NT system, through a +dos window. +Does anyone know what could be causing this behavior? + +Thanks, +TST + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/1757 b/demo/ermis-f/python_m/cur/1757 new file mode 100644 index 00000000..2053f67e --- /dev/null +++ b/demo/ermis-f/python_m/cur/1757 @@ -0,0 +1,41 @@ +From: neelk at brick.cswv.com (Neel Krishnaswami) +Date: 26 May 1999 21:47:26 -0500 +Subject: Evil hack of the day +References: <7ihvh9$1bm$1@brick.cswv.com> +Message-ID: <7iibnu$1ph$1@brick.cswv.com> +X-UID: 1757 + +In article , +Dan Eble wrote: +>On 26 May, Neel Krishnaswami wrote in comp.lang.python: +> +>NK> This leads to the evil version: +>NK> +>NK> >>> def evil(n=0): +>NK> ... n = n + 1 +>NK> ... globals()['evil'].func_defaults = (n,) +>NK> ... return n +>NK> ... +> +> +>That doesn't work for me. Observe, +> +> +>Python 1.5.1 [...rest snipped...] + ^^^^^^^^^^^^ + +There's the reason right there. Python 1.5.2 shows some rather +noticeable increases in dynamism over the previous version. Another +example: you can reassign the __bases__ attribute of a class in 1.5.2, +and you can't in 1.5.1. + +It makes sense, in a perverse sort of way: since Python is already +too dynamic to optimize efficiently, there's no real cost to going +whole-hog on making the language changeable at run-time. + + +Neel + + + + diff --git a/demo/ermis-f/python_m/cur/1758 b/demo/ermis-f/python_m/cur/1758 new file mode 100644 index 00000000..a029655c --- /dev/null +++ b/demo/ermis-f/python_m/cur/1758 @@ -0,0 +1,139 @@ +From: no at any.com (Roy) +Date: 10 May 1999 01:09:10 GMT +Subject: make your first $1 million +Message-ID: <7h5bjm$kg7$11125@hfc.pacific.net.hk> +Content-Length: 4806 +X-UID: 1758 + +make your first $1 million + + HANG CHEONG INTERNATIONAL + +A new successful marketing tactic to increase your sales : + + Do you always have problems to find channels to increase your sales? +The advertise in newspapers, magazines and doing some Direct Mailing, but +still can not achieve you goal, so why still dumping your money to a media +that could not help your sales and not using the most efficient and modern +way of selling stragies E-MAIL.Now many big companies are using this, +because it is economical, fast and efficient, and the other way is selling +by fax through the internets, and the result are remarkable. + + According to report pointed out that the ratio of internet selling is +1,000:1.5 that is 20,000,000 names x 0.0015 = 30,000. These 30,000 clients +will buy from you and if your net profit is $50 that is to say your total +profit is: + + HK$50 x 30,000 = HK$1,500,000. 1.5 Million Dollars !!! + +How to make your first 1 million in your life, now it is quite possible that +you can make your first 1 million within one month. But the thing is ??Are +you selling the right products, through the right media.?? + +*************************************************************************** +A full set of sales tool with 20 million of client??s names will make you a SUPER SALES. + +A professional mail software (no need to go through any ISP Mail Server,making your computer +as the professional Mail Server, its super speed. Easy to use. + +* 500,000 E-mail addresses in Hong Kong +* 1,000,000 E-mail address in Taiwan +* 20,000,000 E-mail address in the World + (latest revised on 1-5-1999.) + +* A free revision one year (around 100,000 every month) + +* Free of charge of 200,000 names of fax addresses in Hong Kong for 1999. + +* Door to door installation * Technical support * software replacement. + +* Using CD-R dish and CD-AutoRun Menu. + +(Only HK$680 for one full set) for unlimited use. + +HK$680 is very small amount, you may not need it now but you will sure to use it when you +have every thing ready. + +*************************************************************************** +If you need any E-mail address, call us any time!! +*************************************************************************** +Don??t miss this chance, you may make lots of money with this new marketing technique. + +Booking Hotline : (852) 8333 1002 Mr Wong + +2ND FL.FRONT BLOCK HING YIP HOUSE.24,SAI YEE ST,HK +_________________________________________________________________________________________ + + + ???????? + HANG CHEONG INTERNATIONAL + +?s???\???????P:???A?H???????@???@???U. + + ?z?O?_?g?`???p?????i???P???D??????? +?Z?n????,???x?s?i???l?H???? (Direct Mail)?O?_?w?g?L?k?F???z?w?????s?i???G? +?P???N?????M???????O?b?????????????????P?????W,?????z?????t?M?s?n???k?? +???N?{?????s?i???P????.?????s?i???P???????O???h?H?O???O???s?i?O???M?s?i +???q????????????,?]???\?h?j???q?g?L?f?V?????????w?????????g?????t?B???G +???n??"?????????????s?i???P ?? ???u?s?i???P" ?]?N?O--?????????????o?e?s?i, +?]?????T???g?????t???B?Q???????I + + ?g???i???????????P???C1000?? 1.5 . +???Y,20000000?U???W???? 0.0015????30000 +?]?N?O?T?U???????|???z?R,?p?z???f?~???b?Q??50??,???A?i???? +50??30000??1500000,?@?????Q?U!!!!! + +?????H???????@???@???U?A?n?p????,?{?b?N???i???@?????N???@???U. +?Q?????h???????g?P???~????.?u?n???????~.???P?????S???D. +__________________________________________________________________________ +???M???P?u???X??,2000?U??????E-MAIL?a?}.???A????????SUPER SALESMAN. + +?M?~???t?o?q?l?n??.(?????n?z?L????ISP??MAIL SERVER,???A???q?????M?~ +MAIL SERVER?t???W??).????????. + +*???????Q?U??????E-MAIL?H?c?a?}. +*?x?W?@???U??????E-MAIL?H?c?a?}. +*?@???G?d?U??????E-MAIL?H?c?a?}. + (???????s??????99?~5??1??) + +*???i1?~?K?O???s(???C???Q?U??)* + +*(?A?e????99?~?u???~20?U?????????u???X(?????~,?a??,???q?W,?s?n??)* + +*?s?W???w?? *???N???? *?n?????s * + +*????CD-R??????????.(????CD-AutoRun??????????????) + +(???M?u?? $680 ) ???[?L?????????C + +680???u???L?O???p?????A?]?\?A?{?b?????n?A?????O?H???n???P?u?@?W?? +???~???A???????n?I +************************************************************************** +?????q???????j?????A???A?M???????????U???U?~ Email Address?A + +?{???????????h?????~?????q?l?a?}.???w?????a??,???z???s?i?????T???e. + +?U,Bag 11,000 Address (???????s??????99?~4??13??) $1000 +?????~,Textile 10,000 Address (???????s??????99?~3??28??) $1000 +???A,Garment 6,800 Address (???????s??????99?~1??4??) $1000 +????????,Furniture 5,500 Address (???????s??????98?~11??10??) $1000 + +???n?U???U?~???? Email Address?A???H???p???????I +************************************************************************** +???n???????L?o???????????|???I + +(?q?????u)-(852)-83331002?????? + +?a?}:?????E?s?????~????24?????~??3?? + + + + + + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1759 b/demo/ermis-f/python_m/cur/1759 new file mode 100644 index 00000000..5a937f7b --- /dev/null +++ b/demo/ermis-f/python_m/cur/1759 @@ -0,0 +1,47 @@ +From: jeremy at cnri.reston.va.us (Jeremy Hylton) +Date: Tue, 18 May 1999 10:56:25 -0400 (EDT) +Subject: while (a=b()) ... (transmogrified to a range thread) +In-Reply-To: <000801bea0e9$597de6c0$829e2299@tim> +References: <14144.26371.38718.411863@bitdiddle.cnri.reston.va.us> + <000801bea0e9$597de6c0$829e2299@tim> +Message-ID: <14145.32200.922535.384322@bitdiddle.cnri.reston.va.us> +Content-Length: 1281 +X-UID: 1759 + +>>>>> "TP" == Tim Peters writes: + + TP> [Tim] + >> You need to be much clearer about your claim here; certainly + >> xrange(1000000) runs much faster than range(1000000) on anyone's + >> machine (the former is constant time regardless of argument and + >> the latter at best takes time proportional to a million), so your + >> real complaint is about something else. + + TP> [Jeremy Hylton] [mailto:jeremy at cnri.reston.va.us] + >> Actually, range(1000000) is faster on my machine. Something like + >> 3% faster, but still faster. Of course, if the program can + >> amortize the cost of creation/deletion across multiple + >> iterations, it will be substantially faster. + +TP> from time import clock +TP> N = 1000000 +TP> start1 = clock(); x = xrange(N); finish1 = clock() +TP> start2 = clock(); y = range(N); finish2 = clock() +TP> print "xrange time", finish1 - start1 +TP> print " range time", finish2 - start2 + +Right. I was timing an iteration over the range -- + for i in xrange(N): pass +vs. + for i in range(N): pass +In this case, range nearly always wins -- even for N == 1000000. + +I see now that your point was a bit different than I took it to be. +So the original comment about range was really a complaint about +something else. + +Jeremy + + + + diff --git a/demo/ermis-f/python_m/cur/1760 b/demo/ermis-f/python_m/cur/1760 new file mode 100644 index 00000000..2ea33c7a --- /dev/null +++ b/demo/ermis-f/python_m/cur/1760 @@ -0,0 +1,47 @@ +From: aa8vb at yahoo.com (Randall Hopper) +Date: Mon, 24 May 1999 09:10:24 -0400 +Subject: Loading modules on a DEC - error +Message-ID: <19990524091024.A761962@vislab.epa.gov> +Content-Length: 1089 +X-UID: 1760 + +Does anyone have some tips for building a Python C module on a DEC? + +This is code that works just fine as a module on SGI and Solaris. +So it could be due to DEC's dlopen ideosyncracies. + +Randall + + +------------------------------------------------------------------------------ +> uname -s -p -r -v -m +OSF1 V4.0 386 alpha + +> ld -shared -rpath /home/rhh/test -L/home/rhh/test \ + -o A.so TMP/*.o \ + -lXext -lXm -lXt -lX11 -lfor -lUfor -lots -lm -lrpcsvc -lc -lm + +> ld -shared -rpath /home/rhh/test -L/home/rhh/test \ + -o Bc.so Bc_wrap.o \ + A.so -lXext -lXm -lXt -lX11 -lfor -lUfor \ + -lots -lm -lc; rm -f so_locations + + +> file Bc.so +Bc.so: COFF format alpha shared library, demand paged executable \ +or object module not stripped - version 3.11-10 + +> python +Python 1.5.2 (#1, May 20 1999, 13:33:13) [C] on osf1V4 +Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam + +>>> import Bc +Traceback (innermost last): + File "", line 1, in ? +ImportError: dlopen: cannot load ./Bc.so +>>> +------------------------------------------------------------------------------ + + + + diff --git a/demo/ermis-f/python_m/cur/1761 b/demo/ermis-f/python_m/cur/1761 new file mode 100644 index 00000000..0762172f --- /dev/null +++ b/demo/ermis-f/python_m/cur/1761 @@ -0,0 +1,35 @@ +From: thomas at xs4all.nl (Thomas Wouters) +Date: Thu, 27 May 1999 12:50:42 +0200 +Subject: Type Error when running Tkinter tutorial's hello2.py example +In-Reply-To: <7ij6m3$djt$1@nnrp1.deja.com>; from tlng@phileo.com.my on Thu, May 27, 1999 at 10:27:16AM +0000 +References: <7ij6m3$djt$1@nnrp1.deja.com> +Message-ID: <19990527125042.M29147@xs4all.nl> +X-UID: 1761 + +On Thu, May 27, 1999 at 10:27:16AM +0000, tlng at phileo.com.my wrote: + + +> Hi! I going through the draft Tkinter tutorial from Pythonware.com, and +> I'm trying to run its hello2.py example program:- + +> class App: +> def _init_(self, master): + +You need + def __init__(self, master): + +Double underscores ('underbars') on each side of 'init'. This goes for all +the magically-called functions, by the way. + +> File "F:\PALRES~1\PALDIR~1\DEVELO~1\test.py", line 19, in ? +> app = App(root) +> TypeError: this constructor takes no arguments + +-- +Thomas Wouters + +Hi! I'm a .signature virus! copy me into your .signature file to help me spread! + + + + diff --git a/demo/ermis-f/python_m/cur/1762 b/demo/ermis-f/python_m/cur/1762 new file mode 100644 index 00000000..412d14fe --- /dev/null +++ b/demo/ermis-f/python_m/cur/1762 @@ -0,0 +1,49 @@ +From: Michel at idtech.be (Michel Vanaken) +Date: 20 May 1999 10:32:20 GMT +Subject: problems with Python cgi web counter and (g)dbm +References: +Message-ID: <7i0obk$hh4@news.idtech.be> +Content-Length: 1205 +X-UID: 1762 + +In article , +harmsPOST at mbnet.mb.ca says... +> +>I have adapted the Python counter cgi script of Sabine Appelmans, +> http://www.ping.be/sabine-appelmans/home/python/index.html +> + +Well, first, thx for visiting my home page (btw the poor Sabine has nothing to +do with that script :-). + +>However when I try to make the database online, I get the following errors: +> +>>>> import dbm +>Traceback (innermost last): +> File "", line 1, in ? +>ImportError: No module named dbm + +Obviously, your Python is not configured to use gdbm. + +This was stated in the introduction : + +""" +And of course, you should have installed Python on your system. You'll need to +configure it to use the gdbm module, since it's used in count.py. +""" + +But you should follow the advice of Frederick. +That page is quite outdated. For example, the cgi module has changed a lot +since I wrote that article (it was in august 96, for Python 1.3, and 1.4 was +released short after). +See also the note about debugging in the text of the article. + +HT(script)H, +Michel +-------------------------------------------------------------------- +http://www.ping.be/~ping0200/home/ + + + + + diff --git a/demo/ermis-f/python_m/cur/1763 b/demo/ermis-f/python_m/cur/1763 new file mode 100644 index 00000000..d627970d --- /dev/null +++ b/demo/ermis-f/python_m/cur/1763 @@ -0,0 +1,28 @@ +From: nathan at islanddata.com (Nathan Clegg) +Date: Fri, 14 May 1999 11:17:59 -0700 (PDT) +Subject: Bug or feature? +In-Reply-To: +Message-ID: +X-UID: 1763 + +>> Really? Because class variables are a feature found in other OO +>> languages. +> +> Python is not those langauges. + +I think the idea here is not that "python should follow the example of +other languages" but that OO, as a principle, contains several concepts, +including that of class variables vs. instance variables. Both the +definition and behavior of python's class-scoped variables match those of +C++ and other languages' class variables. So...why aren't they class +variables?? + +---------------------------------- +Nathan Clegg + nathan at islanddata.com + + + + + + diff --git a/demo/ermis-f/python_m/cur/1764 b/demo/ermis-f/python_m/cur/1764 new file mode 100644 index 00000000..068f5834 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1764 @@ -0,0 +1,78 @@ +From: robin.boerdijk at nl.origin-it.com (Robin Boerdijk) +Date: Wed, 26 May 1999 20:06:53 +0200 +Subject: Module initialization problem when using COM +References: <0E16861EE7BCD111BE9400805FE6841F0949A5B2@c1s5x001.cor.srvfarm.origin-it.com><7i4sgb$3c5$1@m2.c2.telstra-mm.net.au><0E16861EE7BCD111BE9400805FE6841F09581422@c1s5x001.cor.srvfarm.origin-it.com><37495899.62DA32ED@appliedbiometrics.com><7icobr$9o$1@m2.c2.telstra-mm.net.au><0E16861EE7BCD111BE9400805FE6841F095B82D4@c1s5x001.cor.srvfarm.origin-it.com><7ifioj$rhi$1@m2.c2.telstra-mm.net.au> +Message-ID: <0E16861EE7BCD111BE9400805FE6841F09626536@c1s5x001.cor.srvfarm.origin-it.com> +Content-Length: 2356 +X-UID: 1764 + +I tried Marks suggestion and it behaves as expected: the initialization +function is called multiple times within the same DLL instance. Apperently, +Robin was right all along. Sorry it took so long for me to catch up, I had +to climb the DLL learning curve first. + +My conclusion is that we need to do the following: + +1. Record somewhere that module initialization functions should be +re-executable. Currently, the Python documentation only states: "When the +Python program imports module spam for the first time, initspam() is +called." This is what made me believe that an initialization function could +never be called more than once. I don't know what the correct place for this +is, the FAQ or the Python documentation itself. + +2. I'll ask the ILU guys to make their initialization function re-executable +(as suggested by Robin in the first place). + +Thanks for your help everyone, + +Robin Boerdijk + +Robin Becker wrote in message +news:hR9ZnGAiR8S3EwQ0 at jessikat.demon.co.uk... +> In article <7ifioj$rhi$1 at m2.c2.telstra-mm.net.au>, Mark Hammond +> writes +> >Robin Boerdijk wrote in message +> > +> >>But you would also expect the .dll of the extension module to be +unloaded +> >>and reloaded so that the state of the .dll is cleared. As Christian +> >>suggests, the .dll somehow doesn't get unloaded and reloaded an I +wonder +> >if +> > +> ... probably good stuff :) +> >IMO, the _real_ issue is that Python (and/or its modules) are not capable +of +> >being reinitialized without the DLL being "physically" unloaded, and it +> >should be. It is unclear to me if anything other than ILU is seriously +> >upset that this happens. +> > +> >So the real question is: "yes, this happens, and for good reason. Who is +it +> >a problem for and why?" +> > +> >[Other than PythonCOM itself probably - this may well cause some leaks in +> >the PythonCOM module init function - which brings me back to a different +> >issue - how does a module know it is being cleaned up by Python? +> >Aaarrrggg... :-] +> > +> yep we discussed this before; I asked then if modules couldn't have +> special named functions apart from __init__ ie __del__ etc. I tried a +> couple of times to use the deletion of globals to check when a module +> was being cleaned up, but it wasn't real reliable. +> >Mark. +> > +> > +> +> -- +> Robin Becker + + + + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1765 b/demo/ermis-f/python_m/cur/1765 new file mode 100644 index 00000000..7ade8300 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1765 @@ -0,0 +1,21 @@ +From: pvorishatesspam at earthlink.net (Phil Voris) +Date: Sun, 02 May 1999 10:08:16 -0700 +Subject: Books on Python (for OO merit) +References: <372BEA9D.CAA0A5B7@earthlink.net> <7ghscn$337@chronicle.concentric.net> +Message-ID: <372C8680.90FBDBD1@earthlink.net> +X-UID: 1765 + +This is exactly the sort of advice I'm looking for! Thank you. + +See, as I stated before, I've been trying (struggling?) to learn OOP. +I've messed with Java, and more recently with OO Perl. Without a +fundamental understanding of these issues, even simple issues like GUI / +implimentation separation are a struggle. + +That aside, I've read strong positive reviews of both the learning and +programming Python books. Which one gives a better OO perspective? + + + + + diff --git a/demo/ermis-f/python_m/cur/1766 b/demo/ermis-f/python_m/cur/1766 new file mode 100644 index 00000000..6874b7d8 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1766 @@ -0,0 +1,199 @@ +From: pdfernhout at kurtz-fernhout.com (Paul Fernhout) +Date: Sat, 29 May 1999 10:17:25 -0400 +Subject: How to port Python to VxWorks +Message-ID: <374FF6F5.E9C72AF3@kurtz-fernhout.com> +Content-Length: 9821 +X-UID: 1766 + +Pythonistas- + +I just got a bare bones port of Python running on VxWorks and thought +I'd share some insights in how to do it (OK, and brag a bit too. :-). +For various reasons (the work was done for a client) I can't make the +code available. Still, I thought some general comments on this process +might be useful. Previous postings indicate that there have been at +least two other ports of Python to VxWorks. However, I haven't seen any +code for this anywhere or a discussion of the specific issues for +VxWorks. + +Background: + +VxWorks is a Real Time Operating System (RTOS), meaning that you can in +theory make "real time" applications on it that respond to time critical +events in a (guaranteed) timely fashion. It is typically used to develop +applications for embedded computing devices like cell phones, Mars +rovers, and other "invisible" computers. To the developer, VxWorks looks +a lot like UNIX(tm). VxWorks has been called the "Cadillac" of embedded +OSs. + +VxWorks development is often done using a cross compiler, typically +using a product from WindRiver Systems called Tornado, which is a +development shell around the GNU tool suite (GCC, GDB). The board you +are developing for is commonly called the "target"; the workstation you +develop on is called the "host". You download the code compiled on the +host to the target (via serial, ethernet, or whatever). + +Why Python on VxWorks? Because there is quite a bit of things to know to +compile under VxWorks, the developer license are expensive, and the +turnaround time to download to a target is long. Python allows one to +prototype under for example Windows and then run the prototype on the +target. It also allows rapid development and refinement of test code, +which can just be downloaded via a terminal emulator to the Python +command prompt on the target (or via other means). Naturally, there is +still lots of stuff to do in C (especially Interrupt Service Routines +(ISRs) and code that must operate quickly). + +Note that Java and Smalltalk on the target would also offer these +advantages. However, Python is a true OO language that is comfortable +looking to C coders, and the Python license is easier to deal with in +many ways for embedded systems than the Java or Smalltalk licenses, and +of course Python has many other uses as well. + +Issues: + +The Python source for 1.5.2 comes complete with pretty much everything +you need for the port. However, naturally you will have to already be +able to do serial I/O on your hardware and have your own make files. + +Because of cross compiling approach (host != target), the normal Python +"configure" script concept doesn't work. Under a typical UNIX, the +configure script will create a bunch of C files, compile them, and +evaluate the results to see how long integers are, what header files are +present, and additional system dependent information -- all +automatically. The output is a "configure.h" file, produced by that +script modifying "configure.h.in". + +Since VxWorks is typically hosted on a machine other than the target +board, this approach won't work, since at best you'd get settings for +the host, not the target. So, you have to go in and manually change +"configure.h", starting from "configure.h.in". + +My initial attempt a while back to start with the Windows version of +configure.h file led to great confusion. I'd strongly suggest there is +no substitute for going line by line down that file and set the proper +flags. That's what I did that worked. + +I referred to the online documentation to determine what +functions are supported. I looked for each header file in the Tornado +directory. I put in type (int, long, long long) sizes from knowledge of +the target processor. This process took several hours (after a first +false start a while back). I commented out undefs I didn't want; +otherwise I #define constants to 1 in most cases. + +I used an existing VxWorks makefile, and modified it to compile all the +*.c files in a directory and link them together with a main program +which called the code in "python.c". + +One of the problems with porting to VxWorks I had the first time I tried +it was not knowing what modules to include. I had first tried a +subtractive approach starting from including everything, and was +overwhelmed with errors. + +This time I tried for the minimal set, by copying files as the compiler +wanted me about missing items, starting from just having "Python.c". I +faked the argv, argc arguments, passing an argc of 0 and an argv of an +array with a "python.exe" string and a 0. (Just a null for argv ends up +with a crash after starting.) + +After some experimentation, I ended up with a directory that had +just about all the files from the python directory, the compiler +directory, and a few from the module directory. A few files needed to be +removed, because they duplicate VxWorks functionality; you'll see errors +when you try to link. + +Now that I know what files are needed for a minimal build, I could +create a VxWorks make file that would use the files in place in the +conventional Python directory hierarchy. It would make sense to have a +list like this somewhere. + +I was very surprised when it booted the second time. (The first time it +crashed due to passing a null for argv and I had to debug it). It gave +several error messages, due to not having file support on the target (I +think). But it ran interactively on the serial port, and I was able to +add numbers, define functions, and print results. I now can try adding +in more modules. The first time I tried linking in all the modules a +while back (when trying a subtractive approach to porting) I had all +sorts of compile errors in various modules, so I expect getting other +facilities like TCP/IP working may be a bit of a further adventure. + +What surprised me most was that I did not have to do anything special +about "freezing" the application. I did not use freezemain.c or run any +special converters. Of course, as I want more library support from *.py +files, I may have to do this. I'm not even sure at this point what +builtin modules I have to work with. + +Overall, this minimal port was doable in a day, but only after much +previous time spent learning about the source, and also learning from a +previous failed attempt. Obviously, getting more Python facilities +operational under VxWorks will take longer. + +Particular stumbling blocks: + +I didn't know what thread choice to make. I ended up not including a +thread file at all and turning the thread option off. I would like to +improve on this, so I could have real Python threads under VxWorks. + +"dup2.c" gave me problems because I didn't have a fcntl function. I +ended up making this just return BAD_RETURN (or whatever the error +constant was in that function). Since I don't have file support anyway +(I think the calls just fail), I figured this would not hurt. + +Note, this is written from home from memory. There may have been some +other minor hurdles overcome in the process. + +Some architectural suggestions for Python 2 based on Squeak Smalltalk: + +Squeak is a portable Smalltalk. I have also put Squeak on embedded +hardware. From this and other experience, I would suggest a few things +to consider for Python architecture in the future (Python 2)? + +* Consider having a clear separation between C that does library calls +(files, threads, network, any i/o) and code that does not. When writing +code to do file stuff for example, have it call something like +"PyOS_Open()", where that is defined elsewhere, (as opposed to just +doing an ANSI "open"). This would allow the bulk of the files to be pure +C, and only a few files to have these OS calls. This would localize +porting issues and make the whole task more approachable. Platform +specific modules might not sensibly be done this way; my emphasis here +is on easily porting the core Python system. Obviously, in some cases +this woudl have a perfomance impact; one apporach is to typedef some of +these calls so they can be relaces by ANSI or POSIX calls in place. + +In the case of Squeak Smalltalk, the pure C code is actually generated +from a Smalltalk simulator of the VM (written in a Smalltalk subset that +mainly manipulates byte arrays and dispatches bytecodes). The actual +machine dependent part of Squeak (as of about a year ago) is only about +2000 lines of C (implementing bitmap display, file handling, mouse +handling, sound, and networking). This porting task is relatively +straightforward -- just modify these 2000 lines for your system. Note +that Squeak also provides a complete GUI, but with emulated widgets. + +* Consider having the Python compiler implemented in Python. It can then +be compiled to Python byte code, so it doesn't have to be linked in. +It can just be loaded at startup. Of course, this will be slower, but it +will remove one more porting hurdle. + +* Size. Squeak can deliver an entire system with GUI, decompiled source +code browsing, compiler, development tools, debugger, and more in a +complete package of about 1 MB to 2 MB. Python seems to be much bigger +(0.5 MB non-debug DLL for Windows, and many MB of source). I think the +complete package was about 600K for the core Python (and VxWorks w/ WDB +debugger agent) without extra modules. That is going to grow rapidly if +I link in more modules. Clearly there is more that can be done to shrink +the base Python system implementation for embedded targets. Some of this +may be a time/space tradeoff. For example, the previous suggestion +regarding the compiler might result in a smaller but slower compiler +system. + +Anyhow, thanks to Guido and others for such a wonderful system! + +-Paul Fernhout +Kurtz-Fernhout Software +========================================================= +Developers of custom software and educational simulations +Creators of the GPL Garden with Insight(TM) garden simulator +http://www.kurtz-fernhout.com + + + + diff --git a/demo/ermis-f/python_m/cur/1767 b/demo/ermis-f/python_m/cur/1767 new file mode 100644 index 00000000..4a852b70 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1767 @@ -0,0 +1,36 @@ +From: zigron at jps.net (Zigron) +Date: Mon, 17 May 1999 14:31:16 -0700 +Subject: Path problem and Idle vs shell difference +References: <4b%%2.425$VL2.68019@news.direcpc.com> +Message-ID: <3740f7ed@news1.jps.net> +X-UID: 1767 + +Emile van Sebille wrote in message +news:4b%%2.425$VL2.68019 at news.direcpc.com... +> [Windows 95] D:\Program Files\Python>python +> Python 1.5.2 (#0, Apr 13 1999, 10:51:12) [MSC 32 bit (Intel)] on win32 +> Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam +> >>> import sys +> >>> for i in sys.path: +> ... print i +> File "", line 2 +> print i +> ^ +> SyntaxError: invalid syntax +> >>> + For some reason, I don't know why, you must specifically press 'tab' in +the windows +command prompt when you are doing a compound statement like that. IDLE and +PythonWin automatically put a tab in there; the prompt does not. + +So, just press print i in the windows prompt to make it work. + +I think :) + +--Stephen + + + + + + diff --git a/demo/ermis-f/python_m/cur/1768 b/demo/ermis-f/python_m/cur/1768 new file mode 100644 index 00000000..670c898f --- /dev/null +++ b/demo/ermis-f/python_m/cur/1768 @@ -0,0 +1,64 @@ +From: gmcm at hypernet.com (Gordon McMillan) +Date: Fri, 7 May 1999 13:41:41 GMT +Subject: Embedded/Extended w/C++ - Thread error +In-Reply-To: +References: +Message-ID: <1286037772-113008713@hypernet.com> +Content-Length: 2380 +X-UID: 1768 + +Mary Austin writes: + +> Hi! I'm attempting to have python call functions in C++ and have +> methods in C++ call functions in Python (all from the same C++ dll). +> The first direction, I have working just fine (Python calling C++ +> functions). However, the other direction is not so easy. Whenever I +> attempt to call PyImport_ImportModule(""), +> it bombs completely - abnormal program termination. + +> The error I get just before python.exe dies is "Fatal Python error: +> PyThreadState_Get: no current thread". + +> I'm creating threads from within C++ (the code creates a thread for +> a socket to accept connections as well as a thread for each client +> that's connected), but Python shouldn't care about them, as the C++ +> threads are created by another class than what's calling all the +> Python commands. (At least I don't think python should care about +> them.) + +> Anyone have any idea why PyImport_ImportModule, PyEval_CallObject, +> and PyObject_CallFunction would cause a thread error when I'm not +> using Python threads (only C++ threads from within classes that +> don't talk to Python)? + +There's a couple possibilities here. The most likely is that, in +fact, you are calling into Python from a different (C++) thread +than the thread that created the Python interpreter. Since your code +is all in a dll, you might not be aware of this - it might be a +thread created in the .exe. + +You say that the "extending" direction works, which means that you +got one C++ to Python call working. The thread that made that call is +the _only_ thread the can safely make further calls without creating +a Python thread state. + +This is a very hairy area of the API, which was recently discussed on +the Thread SIG. You should probably download the archive for April +when this problem was discussed in (gory) detail. + +As a general outline, you will need to capture the interpreter state +once you've started Python. Then you'll need to use that to create +new thread states for each C++ thread. In the archive, you'll find +some pointers to working code. + +Your other possibility is to marshall everything to the one and only +Python-running thread. Since you're in a dll, that probably means +doing TLS, or otherwise managing thread ids yourself. Which is +probably equally as hairy, and won't take advantage of Python's +ability to multithread. + +- Gordon + + + + diff --git a/demo/ermis-f/python_m/cur/1769 b/demo/ermis-f/python_m/cur/1769 new file mode 100644 index 00000000..b9ea13ef --- /dev/null +++ b/demo/ermis-f/python_m/cur/1769 @@ -0,0 +1,51 @@ +From: nospam at mop.no (Alexander Staubo) +Date: Wed, 19 May 1999 15:04:43 +0200 +Subject: Defining VCL-like framework for Python +References: <7hu4qu$16m$1@freyja.bart.nl> +Message-ID: +Content-Length: 1631 +X-UID: 1769 + +In article <7hu4qu$16m$1 at freyja.bart.nl>, def-p at usa.net says... +> +> Alexander Staubo wrote... +> +> >Delphi is particularly good -- especially compared to such toolkits as +> >Microsoft's MFC -- because it offers clean OOP concepts, +> +> Hmm, it's not that clean, but that's not the point here... :) + +It's arguably cleaner and more robust than Python's OO implementation, +but possibly that's just me. + +For example, and I might have this wrong (ie., there could be +workarounds), Python has problems with cyclic references. If two objects +have references to each other, you need to delete both objects to resolve +the link: There's no support for weak connections to objects, other than +inane workarounds such as factory functions or referring to objects by +string names. + +> While you are of course entitled to your opinion, I beg to differ... +> I've been using both: Delphi at work, Python for kicks, and while +> Tkinter had a bit of learning curve (also because it's so different from +> Delphi) I now find that developing in Python & Tkinter is not +> significantly slower, or more painful, than in Delphi. + +And there are even people who like the MFC. :) + +[snip] +> I think designing all-new components (not constructed from existing ones) +> won't be that easy, though. Is it possible? *looks expectantly at Tkinter +> demigods* + +But worth it. + +-- +Alexander Staubo http://www.mop.no/~alex/ +"Give me an underground laboratory, half a dozen atom smashers and a beautiful +girl in a diaphanous veil waiting to be turned into a chimpanzee, and I care +not who writes the nation's laws." --S. J. Perelman + + + + diff --git a/demo/ermis-f/python_m/cur/1770 b/demo/ermis-f/python_m/cur/1770 new file mode 100644 index 00000000..fb7824c4 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1770 @@ -0,0 +1,23 @@ +From: pkoren at hex.net (Peter A. Koren) +Date: Sat, 01 May 1999 15:54:06 +0000 +Subject: Is Tcl/Tk8.1 compatible with Python? +Message-ID: <372B239E.D59F62C9@hex.net> +X-UID: 1770 + +Does the just released Tcl/Tk 8.1 work with Python for those using +that Gui interface? + +Thanks, + +Pete Koren + +-- +Remove the '.zap-this' from the email address to reach me. + +"One may proceed from absurd premise to ridiculous conclusion with +impeccable +logic." -- Santayana + + + + diff --git a/demo/ermis-f/python_m/cur/1771 b/demo/ermis-f/python_m/cur/1771 new file mode 100644 index 00000000..b27e6fe6 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1771 @@ -0,0 +1,36 @@ +From: mlh at idt.ntnu.no (Magnus L. Hetland) +Date: 04 May 1999 12:40:28 +0200 +Subject: perl "-n" option in python? +References: +Message-ID: +X-UID: 1771 + +wtanksle at dolphin.openprojects.net (William Tanksley) writes: + +> On 03 May 1999 14:32:37 +0200, Magnus L. Hetland wrote: +[...] +> >What do you mean by this? Python has the notion of default arguments... +> +> Certainly. Python has @default arguments, but it doesn't have the $default +> argument. You snipped the context. + +OK. Sorry for not reading your posting properly. (Being lazy, I'd much +rather have you explain it ;) + +> +> He was saying that he wanted to use $_. I was saying he couldn't. + +Right. + +> +> > Magnus + +-- + + Magnus + Lie + Hetland http://arcadia.laiv.org + + + + diff --git a/demo/ermis-f/python_m/cur/1772 b/demo/ermis-f/python_m/cur/1772 new file mode 100644 index 00000000..5017d91c --- /dev/null +++ b/demo/ermis-f/python_m/cur/1772 @@ -0,0 +1,33 @@ +From: dfan at harmonixmusic.com (Dan Schmidt) +Date: 05 May 1999 11:45:41 -0400 +Subject: The Very High Layer and friends +References: <37304719.C258AEFB@serop.abb.se> +Message-ID: +X-UID: 1772 + +"G. David Kuhlman" writes: + +| > Now I have some question about the Python/C API. +| > In the Python/C API Reference Manual chapter 2 mentions The Very High +| > Layer, very brief. +| +| Make sure that you have the very latest downloadable documentation. +| This section in particular has a few more details. The latest is +| (I believe): +| +| "Python Documentation" Release 1.5.2, April 30, 1999 + +I see that all of the forms of documentation have been updated except +for the GNU Info format, which of course is the one that I use. Are +the Info files difficult to generate automatically, or were they just +left out by mistake? + +-- + Dan Schmidt -> dfan at harmonixmusic.com, dfan at alum.mit.edu +Honest Bob & the http://www2.thecia.net/users/dfan/ +Factory-to-Dealer Incentives -> http://www2.thecia.net/users/dfan/hbob/ + Gamelan Galak Tika -> http://web.mit.edu/galak-tika/www/ + + + + diff --git a/demo/ermis-f/python_m/cur/1773 b/demo/ermis-f/python_m/cur/1773 new file mode 100644 index 00000000..4fb6bd1f --- /dev/null +++ b/demo/ermis-f/python_m/cur/1773 @@ -0,0 +1,54 @@ +From: dick.wall at nospam.bigfoot.com (Richard Wall) +Date: Tue, 25 May 1999 17:09:12 GMT +Subject: Cross platform serial library? +References: <927031287.495012173@client1.news.psi.net><14145.26380.455559.698878@amarok.cnri.reston.va.us><199905211336.IAA04855@Starbase.NeoSoft.COM> <14149.26778.52076.845079@amarok.cnri.reston.va.us> <7i4t0o$422$1@m2.c2.telstra-mm.net.au> +Message-ID: <927652151.614401606@client1.news.psi.net> +Content-Length: 1867 +X-UID: 1773 + +On Fri, 21 May 1999, Mark Hammond wrote: +>Andrew M. Kuchling wrote in message +><14149.26778.52076.845079 at amarok.cnri.reston.va.us>... +>> I don't think a cross-platform C library is required; at least +>>on Unix, most of the pieces are already implementable in a scripting +>>language, because all you need is access to open(2), read(2), and + +This is my original point I think. The unix does it fine and hence I have never +bothered before, but I happen to have a non-unix machine which would be ideal +for this application sitting unused, and with no real standard way to use the +serial port (how is it done on MacOS anyway?). It would also be very painful to +develop on this machine, I would ideally like to develop the app on linux and +just run it on the old mac later. This is why the cross platform library would +be very useful. + +> +>Indeed. One of the problems I see with this is asynchronous serial IO. +>read/write etc is fine, but for many applications, a notification based +>scheme is required. +> +>Therefore, I would think a cross-platform serial module should not attempt +>any languages other than Python, and that we use Python concepts - eg, +>threading.Lock() interface to notify a thread a character is available etc. +> +>Mark. + +It does sound like there is no such thing as a cross platform serial library +for python at present. Someone sent me a framework for using one under win32 and +the API looked pretty good so maybe this would be a good starting point. I will +look at it some more. Seem like it might be an interesting project, I just did +not want to re-invent the wheel. Anyone got any input (if none I shall take the +current API sent to me and see what I can do with that). + +If anyone else wants to get involved, drop me an email. My real address is: + +dick.wall at bigfoot.com + +the nospam is in the auto-reply for obvious reasons. + +Cheers + +Dick + + + + diff --git a/demo/ermis-f/python_m/cur/1774 b/demo/ermis-f/python_m/cur/1774 new file mode 100644 index 00000000..e72a87ea --- /dev/null +++ b/demo/ermis-f/python_m/cur/1774 @@ -0,0 +1,47 @@ +From: jennifer at usenix.org (Jennifer Radtke) +Date: Tue, 25 May 1999 21:51:44 GMT +Subject: Tcl/2k : The 7th USENIX Tcl/Tk Conference Call for Papers +Message-ID: +Content-Length: 1636 +X-UID: 1774 + +Tcl/2k : The 7th USENIX Tcl/Tk Conference +February 14-18, 2000 +Austin, Texas, USA + +Sponsored by USENIX, The Advanced Computing Systems Association +---------------------------------------------------------- +Please find the Call for Papers at +http://www.usenix.org/events/tcl2k/cfp +---------------------------------------------------------- +Paper submissions due: September 1, 1999 +Demonstration and Panel Proposals due: September 1, 1999 +Poster submissions due: December 8, 1999 + +The 7th USENIX Tcl/Tk Conference is a forum to: +* bring together Tcl/Tk researchers and practitioners +* publish and present current work involving Tcl/Tk +* learn about the latest developments in Tcl/Tk +* plan for future Tcl/Tk related developments + +The conference program will include formal paper and panel presentations, +poster and both reviewed and informal demonstrations, works-in-progress, +Birds-of-a-Feather sessions, and two-days of high-quality tutorials. All +forms of participation provide an opportunity to report on original Tcl/Tk +research. + +Formal papers should address topics of interest to experienced Tcl/Tk +programmers; posters and informal demos may be geared to any level of user +from beginner to expert. Best Paper Awards will be given for the best +paper and best student paper at the conference. +========================================================================== +The USENIX Association's international membership includes engineers, +system administrators, and computer scientists working on the cutting edge +of systems and software. Our conferences are recognized for their +technical excellence and pragmatic emphases. + + + + + + diff --git a/demo/ermis-f/python_m/cur/1775 b/demo/ermis-f/python_m/cur/1775 new file mode 100644 index 00000000..606e5b81 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1775 @@ -0,0 +1,29 @@ +From: guido at eric.cnri.reston.va.us (Guido van Rossum) +Date: 04 May 1999 23:46:29 -0400 +Subject: Python 1.5.2 failes tests +References: <88256767.0066DED3.00@marshall.com> <372F4BAA.4D341196@appliedbiometrics.com> +Message-ID: <5liua889gq.fsf@eric.cnri.reston.va.us> +X-UID: 1775 + +Christian Tismer writes: + +> Lance Ellinghaus wrote: +[...] +> > Has anyone solved this? +> +> I think that has been solved. An update to the CVS tree has been +> made on Apr. 20, which means it isn't in the 1.5.2 distribution. + +Which reminds me. I am very soon going to disappear on a +series of trips that will take me mostly off-line until June 1. (See +you in Paris! http://www.onera.fr/congres/jpf001/) + +Could someone with access to the CVS tree create a selection of +essential patches and put it up on e.g. starship? +The webmaster at python.org will gladly link to it. + +--Guido van Rossum (home page: http://www.python.org/~guido/) + + + + diff --git a/demo/ermis-f/python_m/cur/1776 b/demo/ermis-f/python_m/cur/1776 new file mode 100644 index 00000000..1a9f36d8 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1776 @@ -0,0 +1,19 @@ +From: rfreedm1 at nospam.rochester.rr.com (Benjamin Schollnick) +Date: Mon, 31 May 1999 20:21:17 GMT +Subject: Python & IRC? +Message-ID: +X-UID: 1776 + +Folks, + + Has anyone done anything in regards to making a IRC +daemon/server in Python? + + I'm thinking about sitting down and doing some socket +work with Python, and I wouldn't want to reproduce the wheel again... + + Benjamin + + + + diff --git a/demo/ermis-f/python_m/cur/1777 b/demo/ermis-f/python_m/cur/1777 new file mode 100644 index 00000000..c7d8c83e --- /dev/null +++ b/demo/ermis-f/python_m/cur/1777 @@ -0,0 +1,25 @@ +From: nickb at earth.ox.ac.uk (Nick Belshaw) +Date: Thu, 20 May 1999 16:56:08 +0100 +Subject: Defining VCL-like framework for Python +References: <37437C55.3E49@cosc.canterbury.ac.nz> +Message-ID: <37443098.B54A4380@earth.ox.ac.uk> +X-UID: 1777 + +Greg Ewing wrote: + +> Alexander, I'd like to put in a vote of support +> for your Python VCL project. +> +> I, for one, agree that there is a need for a +> cross-platform GUI *framework* for Python (as + +so Frederik - when will we be seeing Pythonware stuff ? + +- or is that Pythonwhere !!!! :-) + +nick/oxford + + + + + diff --git a/demo/ermis-f/python_m/cur/1778 b/demo/ermis-f/python_m/cur/1778 new file mode 100644 index 00000000..c1572617 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1778 @@ -0,0 +1,54 @@ +From: MHammond at skippinet.com.au (Mark Hammond) +Date: Sat, 8 May 1999 09:46:50 +1000 +Subject: newbie: on winnt - Do I something wrong, or is there just nothing +References: <7gvedu$1cl$1@news.vossnet.de> +Message-ID: <7gvtus$ivc$1@m2.c2.telstra-mm.net.au> +Content-Length: 1625 +X-UID: 1778 + +Florian W. wrote in message <7gvedu$1cl$1 at news.vossnet.de>... +>Hello Python-people +> +>Now at the office, i have to use win-N(o)T. Specially the wsh +>But VBScript is an ugly language, i would like to use something like +>PythonScript. But I don't managed to let it work (win32all, Build 123) :-( + +If you are using Python 1.5.2, you should try using win32all build 125 - +especially if you are trying to use debugging. + +Otherwise, can you give me an idea of _how_ it fails? + +(As an aside, I cant see the advantage of using Python in WSH - why not just +use Python itself - you can still use the WSH object model from standard +Python using COM - just use "win32com.client.Dispatch()" instead of +"wsh.CreateObject()" + +>cscript debugTest.pys does just nothing - not even an error message + +This is in the axdebug\test directory. It is part of a larger test suite, +and isnt designed to use used stand-alone. You should be looking in the +demo directory (and if you find it lacking, feel free to contribute more +samples :-) + +>And why is PyCOMTest not part of the package ? + +It is a test harness only. Most people wont want it. The sources are +delivered in the COM sources, and you are free to build them. Ditto the VB +test harness - the VB project and sources are shipped, but not the binaries. + +>Have I have to switch to perl ? +Why? Because you cant make all my test harnesses run first time? If you +are having trouble making "normal" things work I could sympathise, but I +can't see any specific problems here... Do any of the WSH Python samples +work for you? If not, can you provide specific details? + +Thanks, + +Mark. + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1779 b/demo/ermis-f/python_m/cur/1779 new file mode 100644 index 00000000..1e2dd8dd --- /dev/null +++ b/demo/ermis-f/python_m/cur/1779 @@ -0,0 +1,48 @@ +From: tbryan at zarlut.utexas.edu (Tom Bryan) +Date: Tue, 18 May 1999 06:46:46 -0500 +Subject: Accessing REMOTE_ADDR from web page +References: <374112A2.9CC3B6F@qut.edu.au> +Message-ID: <37415326.F0CA811E@zarlut.utexas.edu> +Content-Length: 1220 +X-UID: 1779 + + +Rico Albanese wrote: + +> Can someone tell me how to access the REMOTE_ADDR shell environment +> variable which is sent with a web page request to a web server. +[...detailed description and code cut...] +> My question is how do I access the REMOTE_ADDR?? Is "theenviron" a +> string,list, tuple what?? + +This is one of the places where the source is your friend! I have +found most of the Python library source code to be very clear. +On my machine, I have something like the following definition in +cgi.py + +def print_environ(environ=os.environ): + """Dump the shell environment as HTML.""" + keys = environ.keys() + keys.sort() + print + print "

    Shell Environment:

    " + print "
    " + for key in keys: + print "
    ", escape(key), "
    ", escape(environ[key]) + print "
    " + print + +Thus, you can see that the cgi script's "shell environment" is +accessed just like the environment *always* is....through os.environ. +os.environ is a dictionary of all of the available environment +variables. Try printing os.environ['REMOTE_ADDR']. Is that what you +were looking for? + +-- +tbryan at zarlut.utexas.edu +Remove the z from this address to reply. +Stop spam! http://spam.abuse.net/spam/ + + + + diff --git a/demo/ermis-f/python_m/cur/1780 b/demo/ermis-f/python_m/cur/1780 new file mode 100644 index 00000000..b26683bd --- /dev/null +++ b/demo/ermis-f/python_m/cur/1780 @@ -0,0 +1,27 @@ +From: goran.allerbo at carmenta.se (Goran Allerbo) +Date: Thu, 27 May 1999 14:23:25 +0200 +Subject: Inter Process Communication with python +References: <7ij9s2$fhh$1@nnrp1.deja.com> +Message-ID: <374D393D.AA5F3503@carmenta.se> +X-UID: 1780 + +atheunissen at hotmail.com wrote: +> +> I'm looking for some information concerning Inter Process Communication +> with Python. How is't possible to implement it with Python ??? +> +> Thank you for sending me some info about this question. +> +> --== Sent via Deja.com http://www.deja.com/ ==-- +> ---Share what you know. Learn what you don't.--- + +One way of doing it is to send pickled objects +over socket connections. I'm doing that in a +multiprocess Python server app. and it works +just fine. + +/ga + + + + diff --git a/demo/ermis-f/python_m/cur/1781 b/demo/ermis-f/python_m/cur/1781 new file mode 100644 index 00000000..abd86890 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1781 @@ -0,0 +1,70 @@ +From: htrd90 at zepler.org (Toby Dickenson) +Date: Tue, 04 May 1999 21:53:55 GMT +Subject: Freeze bug? +Message-ID: <37323a53.784594@news.freeserve.net> +Content-Length: 2078 +X-UID: 1781 + +I've been seeing an exception freezing a Windows COM server, although it does +not seem to be Windows related. Freezing a one-liner script fails with the +exception below. This is in 1.5.2, with build 124 of Mark's win32 extensions. + +Any thoughts? + +The script is: + +import win32com.server.dispatcher + +With the command line: + +%pythonex%\python %pythonex%\tools\freeze\freeze.py -x pywintypes -x +pythoncom -x win32dbg mysscript.py + + + +(Using Python source directory) +Traceback (innermost last): +File "q:\python\tools\freeze\freeze.py", line 461, in ? +main() +File "q:\python\tools\freeze\freeze.py", line 337, in main +mf.run_script(scriptfile) +File "q:\python\tools\freeze\modulefinder.py", line 94, in run_script +self.load_module('__main__', fp, pathname, stuff) +File "q:\python\tools\freeze\modulefinder.py", line 263, in +load_module +self.scan_code(co, m) +File "q:\python\tools\freeze\modulefinder.py", line 283, in scan_code +self.import_hook(name, m) +File "q:\python\tools\freeze\modulefinder.py", line 107, in +import_hook +m = self.load_tail(q, tail) +File "q:\python\tools\freeze\modulefinder.py", line 169, in load_tail +m = self.import_module(head, mname, m) +File "q:\python\tools\freeze\modulefinder.py", line 235, in +import_module +m = self.load_module(fqname, fp, pathname, stuff) +File "q:\python\tools\freeze\modulefinder.py", line 263, in +load_module +self.scan_code(co, m) +File "q:\python\tools\freeze\modulefinder.py", line 305, in scan_code +self.scan_code(c, m) +File "q:\python\tools\freeze\modulefinder.py", line 305, in scan_code +self.scan_code(c, m) +File "q:\python\tools\freeze\modulefinder.py", line 283, in scan_code +self.import_hook(name, m) +File "q:\python\tools\freeze\modulefinder.py", line 106, in +import_hook +q, tail = self.find_head_package(parent, name) +File "q:\python\tools\freeze\modulefinder.py", line 154, in +find_head_package +q = self.import_module(head, qname, parent) +File "q:\python\tools\freeze\modulefinder.py", line 224, in +import_module +self.badmodules[fqname][parent.__name__] = None +AttributeError: 'None' object has no attribute '__name__' + + + + + + diff --git a/demo/ermis-f/python_m/cur/1782 b/demo/ermis-f/python_m/cur/1782 new file mode 100644 index 00000000..8187be48 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1782 @@ -0,0 +1,74 @@ +From: fatjim at home.com (Jim Meier) +Date: Wed, 05 May 1999 17:01:32 GMT +Subject: Productivity and the two language approach +References: <7g94lp$mdu$1@news.worldonline.nl> <925677195.13550.0.rover.c3ade4b2@news.demon.nl> <925758153.6563.0.muttley.c3ade4b2@news.demon.nl> +Message-ID: <37307A6E.6502B8A3@home.com> +Content-Length: 3061 +X-UID: 1782 + + +Tim Auld wrote: + +> I can continue using and learning a language I have a reasonable amount of +> experience with already, building on my skills and becoming faster at a +> language that is sure to be useful for a good time to come, and will +> compliment the work I do at the company I am currently employed at. Start +> coding straight away with all the APIs I wish to use - OpenGL, Winsock, +> DirectX, and use a modular AI system I am confident of working well. Know I +> will have code that will run at respectable speed (provided I don't do any +> British Museum searching ;). Use tools that I am already familiar with, and +> use code I've developed previously. Knowing what I'm in for and that +> there's a reasonable chance of successfully finishing the project while +> enjoying it. + +But what happens when you want to script or extend your game? I'm working on +something (very, very vaguely) warcraft-like, and I'm letting everything be +extensible in python, as well as the entire story engine (other than the trigger +events themselves.) This means that me and the other guy fiddling with this can +make new behaviors and storylines without much fuss. Plus, with a good design, +you can allow your users to do things like define their own behaviors for +NPCs/units, generate graphs/reports, customize user interfaces, etc, etc, +etc... My point is that this fits like a glove your desire for a "modular AI +system I am confident of working well." As for tools you are alread familiar +with, go ahead and keep using them. The python stuff doesn't need any special +tools, as far as I've seen! + +> The Python option: +> -------------------------- +> I'd have to throw a lot of that away and learn it all again. Maybe I would +> become proficient in Python, and increase my relative productivity, but +> there would be no guarantee that it would be useful in a work place +> environment (I can hear all you Python people ready to prove me wrong!). +> +> Besides, productivity doesn't really matter when it's a casual project, but +> enjoyment does (IMHO). I'd rather get straight to the fun part than enduring +> the frustration of learning another environment. + +(I'll leave it to the c.l.p regulars to get into the workplace part, I wouldn't +know - just a weekend hack{er}) + +You're right - productivity doesn't matter, and enjoyment does. Which is why +I'd encourage you to learn a new language. In fact, learn many new languages. +Actually, learn as much of everything as possible. That's what I've always found +enjoyable! :) + +Seriously, Python takes all of ten minutes to begin coding in, all of an hour to +link into your C code (can't comment on c++, anyone else?), and c.l.p, +www.python.org and other resources from there will help you along with the +rest-- if you regulary read/write/breathe large C++ programs, absorbing this +material would be like pausing from sucking on a firehose to have a sip from a +dixie cup. (You can quote that if you're not embarassed about dixie cups. :) + + +> +> Peace brothers :) +> +> Tim + +The perfect interjection in a language war! +-Jim. + + + + + diff --git a/demo/ermis-f/python_m/cur/1783 b/demo/ermis-f/python_m/cur/1783 new file mode 100644 index 00000000..f8f494ef --- /dev/null +++ b/demo/ermis-f/python_m/cur/1783 @@ -0,0 +1,35 @@ +From: daz at exelixis.com (Darren Platt) +Date: Sun, 16 May 1999 14:26:55 -0700 +Subject: Oracle and Unix +References: +Message-ID: <373F381F.6C5E4944@exelixis.com> +X-UID: 1783 + +The Python web site has links to native Oracle modules for Python that work pretty +well. + +www.python.org (look under modules, database). + +Darren. + +Alexander Staubo wrote: + +> I'm looking for something which would allow me to use Oracle through +> Python on a DEC Unix system. +> +> Assume that no ODBC support is available (we can't afford the OpenLink +> stuff, which are insanely, outlandishly expensive; and afaik there are no +> alternative, free ODBC solutions that support Oracle). +> +> I'm not choosy about the interface -- it doesn't need to be DB API- +> compliant or anything. +> +> -- +> Alexander Staubo http://www.mop.no/~alex/ +> "It has taken the planet Earth 4.5 billion years to discover it is 4.5 billion +> years old." --George Wald + + + + + diff --git a/demo/ermis-f/python_m/cur/1784 b/demo/ermis-f/python_m/cur/1784 new file mode 100644 index 00000000..770eec12 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1784 @@ -0,0 +1,17 @@ +From: linge at embl-heidelberg.de (Jens Linge) +Date: Thu, 06 May 1999 18:51:43 +0200 +Subject: ID of os.system jobs +Message-ID: <3731C89F.1FCF54B8@embl-heidelberg.de> +X-UID: 1784 + +How can I get the UNIX job ID of os.system() calls? + +Any idea? + +Thank you in advance. + +Jens + + + + diff --git a/demo/ermis-f/python_m/cur/1785 b/demo/ermis-f/python_m/cur/1785 new file mode 100644 index 00000000..0b084c33 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1785 @@ -0,0 +1,57 @@ +From: gerrit at nl.linux.org (Gerrit Holl) +Date: 29 May 1999 20:01:03 GMT +Subject: Teaching python to beginners +References: <7ipbca$4jh$2@news.islandnet.com> +Message-ID: +Content-Length: 1613 +X-UID: 1785 + +Deryk Barker wrote: +> Does anyone have any experience with teaching Python as a *first* +> programming language. +> +> I'm looking into the feasbility of this and would like to discuss it +> with anyone who has experience or thoughts in the area. +> + +Hi Deryk, + +First, I'll tell something about me and my python experience. + +I'm a Dutch 13-year-old-boy and I've about half a year programming +experience with Python onder Linux. It was lucky for me that I had a +father who was also going to learn python with lots of programming +experience to teach me some things. + +After half a year experience, my father and I (me?) have concluded that +python is quite suitable for a beginning language. You shouldn't begin with +OOP and lambda stuff, but you shouldn't construct it too fast. Just +start woth reading tutorials, and get a book about python. I only read +"programming python" by Mark Lutz, and that's just a bit too hard for me. + + +But I think it will be easier for you, because of two reasons: + +I've the disadvantage of being Dutch: however there are many +Dutch readers in this newsgroup, and even Guido van Rossum is Dutch, there's +no Dutch python documentation (I've also thought about setting up a Dutch +python mailinglist, any comments?). + +The second reason is my age. I'm only 13, and I think you're older. + + +Conclusion: yes, I suggest trying python. + + +regards, +Gerrit Holl. + +-- +The Dutch Linuxgames website. De Nederlandse Linuxgames pagina. +Everything about games on Linux. Alles over spelletjes onder Linux. +Site address: http://linuxgames.nl.linux.org +Personal homepage: http://nl.linux.org/~gerrit/ + + + + diff --git a/demo/ermis-f/python_m/cur/1786 b/demo/ermis-f/python_m/cur/1786 new file mode 100644 index 00000000..2bcc16d7 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1786 @@ -0,0 +1,27 @@ +From: alex at somewhere.round.here (Alex) +Date: 04 May 1999 19:50:41 -0400 +Subject: [Question] Functional style with lists +References: <372F2B01.25E0ECDD@lirmm.fr> +Message-ID: +X-UID: 1786 + +You might want to look into the operator module. Instead of + +>>> map(lamda x,y:x+y,map(L.getitem,(1,)*len(L))) + +the commands + +>>> L = [ ("John",40), ("Monthy",35)] +>>> import operator +>>> reduce (operator.add, \ + map (operator.getitem, L, len(L) * (1, )), \ + 0) +75 + +perhaps does what you expected. Gets messy very fast, though... + +Alex. + + + + diff --git a/demo/ermis-f/python_m/cur/1787 b/demo/ermis-f/python_m/cur/1787 new file mode 100644 index 00000000..a93ec57d --- /dev/null +++ b/demo/ermis-f/python_m/cur/1787 @@ -0,0 +1,69 @@ +From: fdrake at cnri.reston.va.us (Fred L. Drake) +Date: Thu, 27 May 1999 17:31:56 GMT +Subject: Lesser evil hack? (static data) +In-Reply-To: +References: +Message-ID: <14157.33164.738492.657883@weyr.cnri.reston.va.us> +Content-Length: 1816 +X-UID: 1787 + +D. Michael McFarland writes: + > I've followed the "how to imitate a C static variable" thread with + > some interest, and now feel compelled to float my attempt at it for + + I've missed the whole thing. Whew! + This should do what you want; there's no need for C's "static" +variables. There's no support for keyword parameters to the function; +it could be done but would be more expensive and would rely more on +the caller to always use the same syntax. This ensures that only +positional parameter syntax is used. + The same memo() function can be used for any function for which this +is useful, and can be tossed in a separate module. + +------------------------------------------------------------------------ +class MemoizedFunction: + def __init__(self, function): + self.function = function + self.memo = {} + + def __call__(self, *args): + try: + return self.memo[args] + except KeyError: + # uncomputed value + v = apply(self.function, args) + self.memo[args] = v + return v + except TypeError: + # args was not hashable; don't cache the result + return apply(self.function, args) + + +def memo(function): + return MemoizedFunction(function).__call__ + + +def GaussPointsAndWeights(order): + """Return Gauss integration points (in [-1, 1]) and weights.""" + if order == 2: + ... + elif order == 4: + ... + ... # Create pairs (a list of tuples), + # possibly at great expense. + return pairs + + +GaussPointsAndWeights = memo(GaussPointsAndWeights) +------------------------------------------------------------------------ + + + -Fred + +-- +Fred L. Drake, Jr. +Corporation for National Research Initiatives + + + + diff --git a/demo/ermis-f/python_m/cur/1788 b/demo/ermis-f/python_m/cur/1788 new file mode 100644 index 00000000..4a75285a --- /dev/null +++ b/demo/ermis-f/python_m/cur/1788 @@ -0,0 +1,47 @@ +From: paul at prescod.net (Paul Prescod) +Date: Tue, 4 May 1999 00:54:27 GMT +Subject: Parsing +Message-ID: <372E4543.68A125EC@prescod.net> +Content-Length: 1609 +X-UID: 1788 + +I am using Aycock's package to handle some parsing but I am having trouble +because the language I am parsing is highly context sensitive. I don't +have any trouble dealing with the context-sensitivity in the so-called +"context free grammar" part of the package (the parser) but in the scanner +it is killing me. + +Let's pretend I am parsing a tagged (but non-SGML) language where there is +an element "URL". Within "URL" elements, the characters < and > are +illegal: they must be escaped as \< and \>. + +Elsewhere they are not. Here is the grammar I would *like* to write +(roughly): + +Element ::= urlcontent +urlcontent = (([^<>\/:]* ("\<"|"\>"|":"|"/"|"\\"))* +Element ::= anychar* + +Of course this is a made-up syntax because I don't think you can put +regular expressions in Aycock's BNF. I've used tools that do allow this so +I'm not sure how to handle it. This is also a made-up (simplified) example +so demonstrating how I can do it all in the scanner is probably not +helpful. + +I could handle it if I could switch scanners mid-stream (for URL elements) +but Aycock's scanner finishes up before the parser even gets under way! +Should I scan and then parse (at a high level) and then rescan and reparse +the URLs? Is there a package that allows me to mix the lexical and +syntactic levels more? + +-- + Paul Prescod - ISOGEN Consulting Engineer speaking for only himself + http://itrc.uwaterloo.ca/~papresco + +Diplomatic term: "We had a frank exchange of views." +Translation: Negotiations stopped just short of shouting and + table-banging. (Brill's Content, Apr. 1999) + + + + diff --git a/demo/ermis-f/python_m/cur/1789 b/demo/ermis-f/python_m/cur/1789 new file mode 100644 index 00000000..8fe577fc --- /dev/null +++ b/demo/ermis-f/python_m/cur/1789 @@ -0,0 +1,43 @@ +From: claird at Starbase.NeoSoft.COM (Cameron Laird) +Date: 17 May 1999 16:38:54 -0500 +Subject: Python vs. VB +References: <37407bc5.343558265@news.esinet.net> +Message-ID: <7hq29e$kgs$1@Starbase.NeoSoft.COM> +Content-Length: 1217 +X-UID: 1789 + +In article <37407bc5.343558265 at news.esinet.net>, +Roy Stephan wrote: +>My company is mostly a VB shop. Web Development has gotten away with +>Perl in a corner but we are now being urged to move to ASP. I am +>pushing for PerlScript interfacing heavily with COM. +> +>I would like the COM objects to be implimented in Python rather than +>VB. +> +>I was wondering if people on this list could provide me with some +>amunition against the managment onslaught that will surely ensue in +>favour of all things Microsoft. +> +>Are there any existing comparisons/benchmarks? Is there anyone out +>there who has won a similar battle? + . + . + . +Yes, but most interesting are the pertinent ones. +What matters to your decision-makers beside the +Microsoft label--reliability? Time-to-develop? +Object orientation? Performance? If they are +truly committed to Microsoft in an irreversible +way, there's perhaps little profit in fighting an +unwinnable battle. If, on the other hand, there's +some existing issue with VB, perhaps we can +address it specifically and concretely. +-- + +Cameron Laird http://starbase.neosoft.com/~claird/home.html +claird at NeoSoft.com +1 281 996 8546 FAX + + + + diff --git a/demo/ermis-f/python_m/cur/1790 b/demo/ermis-f/python_m/cur/1790 new file mode 100644 index 00000000..96ec52bc --- /dev/null +++ b/demo/ermis-f/python_m/cur/1790 @@ -0,0 +1,73 @@ +From: tismer at appliedbiometrics.com (Christian Tismer) +Date: Fri, 07 May 1999 17:20:57 +0200 +Subject: Python IS slow ! [was] Re: Python too slow for real world +References: <000401be9831$a0ac04c0$979e2299@tim> +Message-ID: <373304D9.65EA0AD6@appliedbiometrics.com> +Content-Length: 2445 +X-UID: 1790 + + +Tim Peters wrote: +> +> [various, about malloc/free performance] +> +> [Christian Tismer] +> > ... +> > A malloc just for Python - would it need locking at all? +> > Since the interpreter is locking already, I guess malloc +> > would be always called in a safe way. +> +> Right. Note that Vladimir has already put a great deal of work into this +> area; see +> +> http://starship.python.net/crew/vlad/pymalloc/ +> +> IIRC, paradoxically this yielded bigger speedups on non-Windows systems. +> +> windows-vm-flushes-most-recently-used<0.9-wink>-ly y'rs - tim + +Thanks a lot. Now I have so many ways to go that I cannot +decide. Vlad uses explicit bins, dedicated storage. While +this can be very fast, it is a generalization of Guido's +pre-allocated arrays for some kinds of objects. Nobody +can tell me if this is the way to go, or if it will +under circumstances yield much fragmentation. Doug Lea's +code is more general, since his bins are linked lists of +free space which can coalesce again. Takes more time and +less fragmentation. And J.C. Wippler gave me a very fast +allocator for small objects which uses a power of two +size scheme, with memory blocks arranged in a way that +their size is encoded in the address (portable!). + +I guess finding out "the right way"(TM) is NP-complete. + +If I knew in advance how long certain objects will live, +then I would be able to put them into the proper place. +Does it make sense to do statistics on object lifetime? +But the only known thing is allocation size. + +Also, Python knows a lot more than malloc: A list(dict) +is always two things: A header which cannot move, and +a body which can move and grow and shrink. Could make +sense to use different strategies for heads and bodies. +Bad again with strings and tuples which have varying +size and are not moveable. I would be much happier if +we would pay the one level of indirection, but we +had all the varying sizes moveable, since this would +allow for some compaction as well. + +But I know it is too late :-) + +ciao - chris + +-- +Christian Tismer :^) +Applied Biometrics GmbH : Have a break! Take a ride on Python's +Kaiserin-Augusta-Allee 101 : *Starship* http://starship.python.net +10553 Berlin : PGP key -> http://wwwkeys.pgp.net +PGP Fingerprint E182 71C7 1A9D 66E9 9D15 D3CC D4D7 93E2 1FAE F6DF + we're tired of banana software - shipped green, ripens at home + + + + diff --git a/demo/ermis-f/python_m/cur/1791 b/demo/ermis-f/python_m/cur/1791 new file mode 100644 index 00000000..65aac8e8 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1791 @@ -0,0 +1,59 @@ +From: aa8vb at vislab.epa.gov (Randall Hopper) +Date: Tue, 4 May 1999 12:08:03 -0400 +Subject: How to kill an object? (or Debugging reference counts) +Message-ID: <19990504120803.A55620@vislab.epa.gov> +Content-Length: 1287 +X-UID: 1791 + +I've attached a simple Tk script that illustrates the problem. + +How do I kill "group"? + +Something is hanging onto it for dear life and won't let go. +I want to delete group (a PlaceableGroup instance), and let it delete its +Tk representation. + +Randall +-------------- next part -------------- +#!/usr/bin/env python + +from Tkinter import * +from Canvas import * + +class PlaceableGroup( Group ): + + def __init__( self, canvas, tag = None ): + Group.__init__( self, canvas, tag ) + self.canvas = canvas + Widget.bind( self.canvas, "", self.__MouseDownCB ) + + def __del__( self ): + print "del method invoked" + self.unbind() + self.delete() + + def unbind( self ): + Widget.unbind( self.canvas, "" ) + + def __MouseDownCB( self, event ): + rect = Rectangle( self.canvas, event.x-5, event.y-5, + event.x+5, event.y+5 ) + self.addtag_withtag( rect ) + +root = Tk() +canvas = Canvas( root ) +canvas.pack() +btn = Button( text="Click canvas, and hit me to destroy the group", + command=root.quit ) +btn.pack() +group = PlaceableGroup( canvas ) +root.mainloop() + +# +# We would like to kill "group" here, but no such luck +# +group = None +btn.configure( text="You'd think the group wasn't bound anymore, but..." ) +root.mainloop() + + diff --git a/demo/ermis-f/python_m/cur/1792 b/demo/ermis-f/python_m/cur/1792 new file mode 100644 index 00000000..9ba3a373 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1792 @@ -0,0 +1,51 @@ +From: tim_one at email.msn.com (Tim Peters) +Date: Sun, 16 May 1999 14:59:07 -0400 +Subject: How to add a key:datum pair to the dictionary +In-Reply-To: <373f0ee9.30600632@news.tpnet.pl> +Message-ID: <000001be9fce$2cb9b540$fb9e2299@tim> +Content-Length: 1090 +X-UID: 1792 + +[MK] +> I have stumbled across a stupid problem: how to add a pair to +> dictionary like +> +> {'mk': {'repetitions': 20, 'no match': 10}} +> +> I have not found the method for this anywhere in documentation. +> Dictionary is mutable, but neither Library Reference nor Language +> Reference give information on how to _add_ something to dictionary. +> It seems strange -- I mean, is creating dictionary and then changing +> items in it the only possible method of changing dictionary? Can it be +> enlarged? + +Oh sure. Just assign: + +>>> d = {} +>>> d['hi'] = 'ho' +>>> d +{'hi': 'ho'} +>>> d['another'] = (1,2,3) +>>> d +{'hi': 'ho', 'another': (1, 2, 3)} +>>> d[(1,2,3)] = (3,2,1) +>>> d +{'hi': 'ho', 'another': (1, 2, 3), (1, 2, 3): (3, 2, 1)} +>>> d.keys() +['hi', 'another', (1, 2, 3)] +>>> d.values() +['ho', (1, 2, 3), (3, 2, 1)] +>>> d.items() +[('hi', 'ho'), ('another', (1, 2, 3)), ((1, 2, 3), (3, 2, 1))] +>>> + +Your copy of Python should have come with a Tutorial, which you should find +and work your way through. A brief intro to dicts is in section 5.4. + +not-only-possible-but-easy!-ly y'rs - tim + + + + + + diff --git a/demo/ermis-f/python_m/cur/1793 b/demo/ermis-f/python_m/cur/1793 new file mode 100644 index 00000000..5b49cfaf --- /dev/null +++ b/demo/ermis-f/python_m/cur/1793 @@ -0,0 +1,22 @@ +From: garry at sage.att.com (Garry Hodgson) +Date: Tue, 4 May 1999 13:22:16 GMT +Subject: Designing Large Systems with Python +References: <372599D6.C156C996@pop.vet.uu.nl> <7g4a3l$atk$1@news.worldonline.nl> <7g99pj$b1$1@news.worldonline.nl> +Message-ID: <372EF488.4D630077@sage.att.com> +X-UID: 1793 + +Ilja Heitlager wrote: + +> OK, A UNIX guy (that will change ;-) + +when you pry it from my cold, dead fingers. + +-- +Garry Hodgson seven times down +garry at sage.att.com eight times up +Software Innovation Services +AT&T Labs - zen proverb + + + + diff --git a/demo/ermis-f/python_m/cur/1794 b/demo/ermis-f/python_m/cur/1794 new file mode 100644 index 00000000..6ba8ead3 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1794 @@ -0,0 +1,31 @@ +From: MGoehmann at t-online.de (Monika =?iso-8859-1?Q?G=F6hmann?=) +Date: Mon, 03 May 1999 12:43:39 +0200 +Subject: Indentation on WinNT +Message-ID: <372D7DDB.CF5C5588@t-online.de> +X-UID: 1794 + +Hi, + +the concept of using indentation-only structuring in Python code is very +nice -- as long as everybody uses Unix and/or reasonable settings with +their editor. + +I have to work with WinNT and when I display code which was developed on +Unix it sometimes is all messed up looking like this: + + if something: + if something_else: + do this + do that + +So what does this code do ? + +Is there any way to get this displayed correctly with Vim5.3 or any +other editor ? + +Thanks for your help, Monika G?hmann + + + + + diff --git a/demo/ermis-f/python_m/cur/1795 b/demo/ermis-f/python_m/cur/1795 new file mode 100644 index 00000000..8e4bdcd8 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1795 @@ -0,0 +1,40 @@ +From: fredrik at pythonware.com (Fredrik Lundh) +Date: Sun, 23 May 1999 13:45:56 GMT +Subject: Newbie question... +References: <7i3hg0$3mi$1@elle.eunet.no> +Message-ID: <020901bea522$b07a78c0$f29b12c2@pythonware.com> +X-UID: 1795 + +Christian Tellefsen wrote: +> ... I just started programming in Python (today!) +> +> I want to run a few OS commands from python (on Win NT), +> but I cannot find a way to wait for the commands to finish. +> +> Source: +> ** +> os.system ('c:\ntreskit\sc stop "' + serviceA + '"') +> os.system ('c:\ntreskit\sc stop "' + serviceB + '"') +> os.system ('c:\ntreskit\sc stop "' + serviceC + '"') +> ** + +oops. did you forget that \n is a newline? + +> +> Is there a way I can ensure that each command finishes before the next line +> in the script is executed? + +starting with Python 1.5.2, you can use os.spawnv: + +status = os.spawnv(os.P_WAIT, "c:\\ntreskit\\sc", ("stop", serviceA)) +(untested) + +http://www.python.org/doc/current/lib/os-process.html +has the full story. + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1796 b/demo/ermis-f/python_m/cur/1796 new file mode 100644 index 00000000..06ea33bb --- /dev/null +++ b/demo/ermis-f/python_m/cur/1796 @@ -0,0 +1,45 @@ +From: aa8vb at yahoo.com (Randall Hopper) +Date: Fri, 21 May 1999 11:18:36 -0400 +Subject: Newbie:Considering using Python. Arrays?, Pointers? +In-Reply-To: <374569FC.D7EC5984@verio.com>; from Tom on Fri, May 21, 1999 at 02:09:12PM +0000 +References: <374569FC.D7EC5984@verio.com> +Message-ID: <19990521111836.A500702@vislab.epa.gov> +Content-Length: 1592 +X-UID: 1796 + +Tom: + |I am considering using Python for some programming tasks as opposed to + |C, C++ etc, which I have used in the past. I bought the book, + |"Programming Python" and I was attempting to find out what kind of + |"structure/function" Python uses in terms of indexing data arrays which + |is equivalent to "C" pointers. I did not read the book thoroughly but I + |did not come up with anything. So, what does Python use for indexing + |arrays? + +I hear what you're saying, but I'm not to sure what the real underlying +question is. In C, you can use pointers and integers to access arrays +(a[3], *(a+3), a[2][5], etc.). In Python, you'd write this similarly: +a[3], a[2][5]. Pointers aren't exposed as a programmer mungable (mutable) +data type. + +Possibly you could rephrase with some short example code and we could draw +some parallels. + + |Also, Since Python is an interperted language, as is , say, Java, then + |what would be the advantage of using Python instead of Java? + +I'm assuming this isn't flame bait :-) It's not really fruitful to try and +give a meaningful answer to this question without more details. What class +of applications are we talking about? What is the required set of +architectures you need to support? How much time is available for the +project, or is this a personal learning project? What is the expected +lifetime of the product? Do we need to be able to interface with legacy C +or C++ code libraries? Does it need to run in web browser? Does it have a +GUI? etcetc. More details would allow folks to give some specific advice +and offer comparisons. + +Randall + + + + diff --git a/demo/ermis-f/python_m/cur/1797 b/demo/ermis-f/python_m/cur/1797 new file mode 100644 index 00000000..45c596ee --- /dev/null +++ b/demo/ermis-f/python_m/cur/1797 @@ -0,0 +1,18 @@ +From: miller at uinpluxa.npl.uiuc.edu (M.A.Miller) +Date: 10 May 1999 12:16:02 -0500 +Subject: Is there a Python class browser? +References: +Message-ID: <76zp3club1.fsf@one.npl.uiuc.edu> +X-UID: 1797 + +I think that SNiFF+ [1] will do what you want. I've fiddled with +it enough to make class hierarchy diagrams for some existing +python projects but have not used it for more than that. + +Mike + +[1] http://starship.python.net/crew/scharf/sn4py + + + + diff --git a/demo/ermis-f/python_m/cur/1798 b/demo/ermis-f/python_m/cur/1798 new file mode 100644 index 00000000..0d9d0b04 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1798 @@ -0,0 +1,55 @@ +From: alan.gauld at gssec.bt.co.uk (Alan Gauld) +Date: Thu, 13 May 1999 12:46:40 +0100 +Subject: Class vs instance variables? +References: <373A30F0.7E61E813@rd.fujitec.co.jp> +Message-ID: <373ABBA0.5E7AA7DD@gssec.bt.co.uk> +Content-Length: 1092 +X-UID: 1798 + +Sandor Markon wrote: +> I am trying to figure out what data is shared btw instances +> and what not. Could someone please explain this behavior: + +I'll try but I'm relatively new to python too... + +> class c: +> a=[] + +This is a class variable referencing a list + +> x=0 + +This is a class variable referencing an int + +> def __init__(self,x): +> self.x=x + +This creates a new instance variable which 'hides' the +class variable and has value x. +Assignment in python creates a new reference. + +> self.a.append(x) + +This *modifies* the existing reference(the class variable) +If you had done self.a = [1,2,3] you would have gotten +an instance based list + +> # ??? Why is this list shared while the scalars are separate? + +Its nothing to do with the list/scalar asp[ects its to do +with assignment versus modification. +- assignment creates a new instance variable. + +At least thats hiw I underSTAND IT... + +Alan g. + +-- +================================================= +This post represents the views of the author +and does not necessarily accurately represent +the views of BT. + + + + diff --git a/demo/ermis-f/python_m/cur/1799 b/demo/ermis-f/python_m/cur/1799 new file mode 100644 index 00000000..2a7334db --- /dev/null +++ b/demo/ermis-f/python_m/cur/1799 @@ -0,0 +1,16 @@ +From: colmconn at my-dejanews.com (colmconn at my-dejanews.com) +Date: Thu, 06 May 1999 17:08:53 GMT +Subject: Percent indication in place +Message-ID: <7gsib0$733$1@nnrp1.deja.com> +X-UID: 1799 + +How can I display a percentage-done indication that updates itself in place, +or show a "twirling baton" progress indicator? + + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/1800 b/demo/ermis-f/python_m/cur/1800 new file mode 100644 index 00000000..81656a36 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1800 @@ -0,0 +1,36 @@ +From: kiki at pixar.com (kiki) +Date: Mon, 24 May 1999 21:27:35 -0700 +Subject: [tkinter] Event from menu event? +References: <3749FE8A.9DD61AB4@pixar.com> +Message-ID: <374A26B6.82ECB6AE@pixar.com> +X-UID: 1800 + +Here's some incentive :-) + + +for each_draw_class in draw_class_list: + + menu_func_lines = [ "def +%s_menu_call():\n"%eval(each_draw_class).__name__, + "\tglobal canvas_data\n", + "\tnew_draw_obj = +%s(canvas_data)\n"%each_draw_class, + +"\tcanvas_data.list.append(new_draw_obj)\n\n"] + menu_func_str = "" + for each_line in menu_func_lines: + menu_func_str = menu_func_str + each_line + + exec( compile( stitch_func_str, +eval(each_stitch_class).__name__,"exec" )) + + +My code aesthetic-sense is convulsing and has swallowed its tongue! Help! +:-) + +Kiki -- ow. + + + + + diff --git a/demo/ermis-f/python_m/cur/1801 b/demo/ermis-f/python_m/cur/1801 new file mode 100644 index 00000000..cd02d3c1 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1801 @@ -0,0 +1,72 @@ +From: arcege at shore.net (Michael P. Reilly) +Date: Fri, 07 May 1999 13:42:06 GMT +Subject: Tk communications between frames? +References: +Message-ID: +Content-Length: 2375 +X-UID: 1801 + +David Miller wrote: +: The application I'm developing in python/Tkinter needs to have +: a parent frame start some number of child browser frames. When the +: user double clicks on a file listed in a child listbox I want to +: insert the selection in a different listbox on the parent. + +: Specifically, the parent is a master scheduling window. The child +: browsers drill down N directories deep, and there may be and number +: of child browsers. This is to let someone program video for playback +: at a TV station - pick a video from this category (sports tip, child1) +: a video from another category (athlete profile, child 2), then an ad +: from child 3. + +: Is this easily doable? Doable without the security problems of send()? + +Are the child frames seperate processes? Just toplevel windows within +the same process? If so, then there is no need to communicate over a +socket. Below assumes that the child frames are not seperate +processes. + +I'm not sure how you would want to proceed, but my best suggestion +would be to take a more object oriented approach and less of a GUI +approach. + +class Scheduler: + # no locking in this schedule, very simple + def __init__(self, master_frame): + self.queue = [] + self.frame = Frame(master_frame) + self.create_widgets() + self.child_browser = Browser(self, self.frame) + self.frame.after_idle(self.do_work) + def add_workitem(self, item): + self.queue.append(item) + def do_work(self): + self.process_queue() + +class Browser(Toplevel): + def __init__(self, scheduler, master): + Toplevel.__init__(self, master, bd=2) + self.scheduler = scheduler + self.listbox = Listbox(self, setgrid=1, relief=SUNKEN) + scroll = Scrollbar(self, command=self.listbox.yview, relief=SUNKEN) + self.listbox['yscrollcommand'] = scroll.set + self.bind('', self.select) + scroll.pack(side=RIGHT, fill=Y, expand=YES) + self.listbox.pack(side=LEFT, fill=BOTH, expand=YES) + def select(self, event): + items = self.listbox.curselection() + # some versions of Tkinter do not convert to Python integers + try: items = map(string.atoi, items) + except ValueError: pass + itempos = items[0] + self.scheduler.add_workitem(self.listbox.get(itempos)) + +This lets you use the parent as a workhouse instead of as just a +widget, which may be more appropriate. + + -Arcege + + + + + diff --git a/demo/ermis-f/python_m/cur/1802 b/demo/ermis-f/python_m/cur/1802 new file mode 100644 index 00000000..f55bc0d1 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1802 @@ -0,0 +1,41 @@ +From: enigma at tcct.nmt.edu (SysProg - Nathan Paul Simons) +Date: 18 May 1999 17:36:40 GMT +Subject: TkInter: class Grid missing remove? +Message-ID: <7hs8f8$3d2$1@newshost.nmt.edu> +Content-Length: 1232 +X-UID: 1802 + + I tried posting this once already, but apparently it didn't get +posted, or if it did, nobody replied, so I'm posting it again. + + Apparently, class Grid in tkinter (Tkinter.py) is missing the +grid_remove method. Here is the relevant code, including the change: + +class Grid: + # Thanks to Masazumi Yoshikawa (yosikawa at isi.edu) + def grid_configure(self, cnf={}, **kw): + apply(self.tk.call, + ('grid', 'configure', self._w) + + self._options(cnf, kw)) + grid = configure = config = grid_configure + bbox = grid_bbox = Misc.grid_bbox + columnconfigure = grid_columnconfigure = Misc.grid_columnconfigure + def grid_forget(self): + self.tk.call('grid', 'forget', self._w) + # AMS 10/28/98: was missing! Added, following grid_forget(). + def grid_remove(self): + self.tk.call('grid', 'remove', self._w) + +I actually didn't find it. Credit for this fix goes to +Prof. Al Stavely . + +---------------------------------------------------------------- +Nathan Paul Simons enigma at nmt.edu http://www.nmt.edu/~enigma +New Mexico Tech Computer Center Speare 20 x5748 +Systems Programmer - Macs, Linux/UNIX apps, printing, ftp, etc +---------------------------------------------------------------- + + + + + diff --git a/demo/ermis-f/python_m/cur/1803 b/demo/ermis-f/python_m/cur/1803 new file mode 100644 index 00000000..c21b5cee --- /dev/null +++ b/demo/ermis-f/python_m/cur/1803 @@ -0,0 +1,167 @@ +From: tim_one at email.msn.com (Tim Peters) +Date: Sun, 2 May 1999 12:10:00 -0400 +Subject: Newbie Threads question +In-Reply-To: <7gfdrm$69t$1@nnrp1.dejanews.com> +Message-ID: <000401be942b$b22f4720$499e2299@tim> +Content-Length: 4409 +X-UID: 1803 + +[mbf2y at my-dejanews.com] +> ... +> What I'd like to do is learn how to use threads by "parallelizing" a +> simple set of now currently serialized tasks. +> ... +> hypothetically my code looks like this: +> +> def func1(param): +> result = [] +> # do a bunch of work, takes about 3 seconds of wall-clock time +> return result + +When a thread function returns, the thread dies, and the return value is +tossed into the bit bucket. You'll need to stuff the result away in a +non-local vrbl of some kind. + +> def func2(param): +> result = [] +> # do a bunch of work, takes about 5 seconds of wall-clock time +> return result + +Ditto. + +> def func3(list1, list2): +> result = [] +> # does work on the two lists passed in, takes 0.5 secs of +> wall-clock time +> return result +> +> +> #my main loop simplified +> list1 = func1(x) +> list2 = func2(y) +> reallist = func3(list1,list2) +> #do something with reallist. +> +> Since func1 and func2 are completely independent - IE do not use +> any of the same resources, to me this would be a great place to do +> the work in parallel. + +Yup! In the biz, this is what's called "embarrassingly parallel". I worked +for at least one now-defunct startup that tried to get rich off non-problems +exactly like that . + +> What I want to do is something like this: +> +> #my new main loop +> list1 = thread.start_new_thread(func1,(x)) +> list2 = thread.start_new_thread(func2,(y)) +> reallist = func3(list1,list2) +> +> I have read the documentation a couple of times, but what I don't know: +> +> A) Is the return value of start_new_thread the same as the return +> value of the function it calls? + +Expanding on Gordon's hint, if start_new_thread waited for func1 to return a +value, nothing at all would happen in parallel (the second call to +start_new_thread couldn't begin before func1 returned). + +Note too that you need to pass a tuple of arguments in the call, and (x) +isn't a tuple. A 1-tuple is a degenerate case that needs to be spelled (x,) +(note the silly-looking trailing comma there). + +> B) Do I need to do anything fancy to make the func3 call wait +> until the calls to func1 and func2 have both returned? + +Absolutely. + +> For example, should I have the func1 and func2 calls aquire a lock at +> the start of the function and release it at the end, and then make the +> main loop try to acquire both locks before proceeding to the +> reallist = func3() call? + +What you "should do" is use the higher-level threading module's "join" +method. Rolling your own is fraught with peril. For example, consider your +suggestion: + +def func1(...): + acquire lock1 + do work + release lock1 + +# func2 similarly, but with lock2 + +# main loop + start func1 + start func2 + acquire lock1 + acquire lock2 + +It's quite possible that the main thread will start func1 and func2, and +acquire both lock1 and lock2 before any code in func1 or func2 gets a chance +to execute. Then func1 and func2 hang waiting to acquire locks that will +never get released, and your main loop hangs too on the next trip around. + +The kind of gimmick you're thinking of *can* work, but requires acquiring +the locks in the main loop *before* starting the threads; then it's +guaranteed that the thread function is entered with its lock in the acquired +state: + +def func1(...): + do work + release lock1 + +# func2 similarly, but with lock2 + +acquire lock1 +acquire lock2 +# main loop + start func1 + start func2 + acquire lock1 + acquire lock2 + +I'll attach a less painful alternative using the "threading" module. +"threading" presents a scheme more-or-less like Java's thread API, so +getting a book on Java threads would be a good idea. + +threads-tend-to-unravel-ly y'rs - tim + +This is executable as-is: + +from threading import Thread +import time + +def square(n, answer): + print "in square" + for i in range(n): + answer.append(i**2) + time.sleep(3) + print "returning from square" + +def cube(n, answer): + print "in cube" + for i in range(n): + answer.append(i**3) + time.sleep(5) + print "returning from cube" + +for i in range(4): + t1result = [] + t2result = [] + t1 = Thread(target=square, args=(2*i, t1result)) + t2 = Thread(target=cube, args=(3*i, t2result)) + print "starting threads with i =", i + t1.start(); t2.start() + t1.join(); t2.join() + print "back from joins" + print "square returned", t1result + print "cube returned", t2result + + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1804 b/demo/ermis-f/python_m/cur/1804 new file mode 100644 index 00000000..977092b4 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1804 @@ -0,0 +1,30 @@ +From: aahz at netcom.com (Aahz Maruch) +Date: Mon, 10 May 1999 19:03:19 GMT +Subject: dictionary object +References: +Message-ID: +X-UID: 1804 + +In article , +Diego Dainese wrote: +> +>I have a question regarding the dictionary objects: in a dictionary +>where the values are tuples, is it possible to get the tuple with a +>given key and to change the value of one element of this tuple using +>only one key lookup? + +No, because tuples are "immutable" (cannot be changed). If you want to +do this trick, you'll need to use lists instead (then you can use +standard array notation). +-- + --- Aahz (@netcom.com) + +Hugs and backrubs -- I break Rule 6 <*> http://www.rahul.net/aahz/ +Androgynous poly kinky vanilla queer het + +"In the end, outside of spy agencies, people are far too trusting and +willing to help." -- Ira Winkler + + + + diff --git a/demo/ermis-f/python_m/cur/1805 b/demo/ermis-f/python_m/cur/1805 new file mode 100644 index 00000000..102057aa --- /dev/null +++ b/demo/ermis-f/python_m/cur/1805 @@ -0,0 +1,34 @@ +From: Cepl at fpm.cz (Matej Cepl) +Date: Mon, 31 May 1999 14:09:19 +0100 +Subject: Gzip.py +Message-ID: <1318D78C9072D11195C9006094EA98A72C2081@ocesrv> +X-UID: 1805 + +Hi, + +I tried to play with gzip.py and it doesn't seem to work. Enclosed +module produced output which Windows Commander as well as gzip refused +to accept as correct gzip archive. + +Have you any idea, what's wrong? + + Matthew +------------------------------------------------------------------------ +-------- +import gzip +import os + +inf = open('fre-en_2.htm','r') +outf = gzip.open('fre-en_2.htm.gz','w') +content = inf.read() +inf.close() +print "Debug: content is:" +print content +outf.write(content) +outf.flush() +outf.close() +print "Debug: END" + + + + diff --git a/demo/ermis-f/python_m/cur/1806 b/demo/ermis-f/python_m/cur/1806 new file mode 100644 index 00000000..92097adc --- /dev/null +++ b/demo/ermis-f/python_m/cur/1806 @@ -0,0 +1,48 @@ +From: kaweh at frodo.sil.at (Kaweh Kazemi) +Date: Sun, 09 May 1999 11:54:14 GMT +Subject: using python in www site +References: <3732fd89.446889923@news.vbs.at> <373316D9.AB851DC5@zarlut.utexas.edu> <373317F6.737B4D40@zarlut.utexas.edu> <7h2v9m$ls1$1@agate.berkeley.edu> <37355EEC.2E537D9C@lemburg.com> +Message-ID: <37357519.608573842@news.vbs.at> +Content-Length: 1299 +X-UID: 1806 + +>To install the binary you only need FTP access and an cgi-bin +>directory that executes .cgi as CGI programs. Here are the +>steps needed: +> +> [steps] +> +>That's all -- you don't even need a TELNET access. I've used this +>approach a couple of times already, and yes, this is the main point +>in the mxCGIPython project. +thanx for your help. i was aware of mxCGIPython, which is a cool +project IMHO. but there is one problem (or correct me, if i am wrong): +i need a cgipython archive which was made for my ISPs machine? + +well, my ISP gave me access to a ftp directory which also has a +cgi-bin directory, and on login the system says: + + "UNIX(r) System V Release 4.0" + +there doesn't seem to be a compatible cgipython archive, am i right? + +well, if someone has access to a machine using this type of unix and +could create a compatible cgipython archive, this would help me very +much. i even don't know, if this information is enough to create a +cgipython-archive (same unix, different hardware-platforms?), but +that's all i have at this time (if someone is willing to help and +needs more information, i will check with my ISP, just tell me what +you need to know). + +btw: i asked my ISP, if they could install python for me. i am waiting +for an answer. + +anyway, thanx for your help and time ... + +kaweh + + + + + + diff --git a/demo/ermis-f/python_m/cur/1807 b/demo/ermis-f/python_m/cur/1807 new file mode 100644 index 00000000..eb6f89fb --- /dev/null +++ b/demo/ermis-f/python_m/cur/1807 @@ -0,0 +1,34 @@ +From: greg.ewing at compaq.com (Greg Ewing) +Date: Tue, 04 May 1999 15:30:14 +1200 +Subject: Python IS slow ! [was] Re: Python too slow for real world +References: <613145F79272D211914B0020AFF6401914DAD8@gandalf.digicool.com> <37272CA0.3F3F02A2@prescod.net> +Message-ID: <372E69C6.752A1164@compaq.com> +X-UID: 1807 + +Paul Prescod wrote: +> +> Is there any languge that is as easy to embed as Python, and also has +> full garbage collection? + +Before I discovered Python, I played around with +Elk Scheme quite a lot. Its extension/embedding +interface is very nice - perhaps even nicer than +Python's, since there are no refcounts to lose +sleep over. And, like all Lisp/Scheme variants, +it has full GC. + +I don't know how its speed compares with Python. +In principle, I imagine that a bytecoded Scheme +implementation could be made somewhat faster than +Python, because Scheme isn't quite so pathologically +dynamic - global var references can be implemented +without requiring a dictionary lookup on every +access, for example. But then Scheme doesn't +have modules or classes as part of the core language, +so it's hard to compare them directly. + +Greg + + + + diff --git a/demo/ermis-f/python_m/cur/1808 b/demo/ermis-f/python_m/cur/1808 new file mode 100644 index 00000000..0587127d --- /dev/null +++ b/demo/ermis-f/python_m/cur/1808 @@ -0,0 +1,25 @@ +From: peter.sommerfeld at gmx.de (Peter Sommerfeld) +Date: Mon, 3 May 1999 22:55:29 +0200 +Subject: Python T-shirt +Message-ID: +X-UID: 1808 + +Martijn Faassen wrote: +>Is he thin and legless? Does he strangle his prey? I thought he was a +>robot, anyway. :) +> +>A-robotic-python-now-that's-something-ly yours, +> +>Martijn + +Robot or not, there is no difference. It's all imagination ... + +-- Peter + +BTW: a good looking robot (Tim?) would be a nice moscot :) + + + + + + diff --git a/demo/ermis-f/python_m/cur/1809 b/demo/ermis-f/python_m/cur/1809 new file mode 100644 index 00000000..eb742d89 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1809 @@ -0,0 +1,40 @@ +From: aa8vb at yahoo.com (Randall Hopper) +Date: Wed, 19 May 1999 08:32:14 -0400 +Subject: Separating GUI and code +Message-ID: <19990519083214.A320451@vislab.epa.gov> +Content-Length: 1120 +X-UID: 1809 + +William Tanksley: + | + |On Fri, 14 May 1999 11:11:47 +1200, Greg Ewing wrote: + |>You might like to have a look at: + |>http://www.cosc.canterbury.ac.nz/~greg/python_gui/ + | + |>It's an attempt at a GUI framework for Python that's + |>not oriented towards any particular GUI toolkit. + |>The idea was to implement versions of it on different + |>platforms, to give people an easier-to-use alternative + |>to Tkinter for cross-platform GUI Python apps. + | + |Why? We already have wxWindows. + | + |No disrespect intended, just curious what it offers that wxWindows doesn't. + + For one thing, Python/Tkinter (& Tcl/Tk) is easier to build, and there +is one coordinated distribution of all of them. + + I didn't get to using wxWindows, so I can't comment on that. I just +pulled down one of the number of varients of the latest version off the GTK +home page this morning. configure tripped several times on a stock IRIX +system. I tweaked a few of these, but nuked it when it refused to use +SGI's stock make. + + Unlike most GNU configure-enabled progs, this one doesn't look at your +system and use what you have. + +Randall + + + + diff --git a/demo/ermis-f/python_m/cur/1810 b/demo/ermis-f/python_m/cur/1810 new file mode 100644 index 00000000..08e3b7fb --- /dev/null +++ b/demo/ermis-f/python_m/cur/1810 @@ -0,0 +1,19 @@ +From: kuncej at mail.conservation.state.mo.us (Jeffrey Kunce) +Date: Mon, 24 May 1999 17:22:59 GMT +Subject: getting tables out +Message-ID: +X-UID: 1810 + +>I would like to write a Python script that would read an HTML +>document and extract table contents from it. ... + +Take a look at htmlTableParse.py at http://starship.python.net/~jjkunce/ + +It may work for you, or at least give you some ideas. + + --Jeff + + + + + diff --git a/demo/ermis-f/python_m/cur/1811 b/demo/ermis-f/python_m/cur/1811 new file mode 100644 index 00000000..64a7056f --- /dev/null +++ b/demo/ermis-f/python_m/cur/1811 @@ -0,0 +1,41 @@ +From: dfan at harmonixmusic.com (Dan Schmidt) +Date: 10 May 1999 12:26:36 -0400 +Subject: An efficient split function +References: <14134.64897.771093.125780@amarok.cnri.reston.va.us> +Message-ID: +Content-Length: 1301 +X-UID: 1811 + +"Andrew M. Kuchling" writes: + +| William S. Lear writes: +| +| >Surprisingly, to me, the Python version far outperformed the Perl +| >version. Running on 1 million lines of input of 9 fields each, the +| >Python version ran in just under 20 seconds, the Perl version in +| >just under 40 seconds (this on a 400Mhz Pentium Linux box). +| +| Note that your use of split(/\|/) in Perl requires using the +| regular expression engine, instead of a simple C splitting loop . +| Try using a literal string instead of a regex, as in split('|', +| ...); that will probably even out the speeds. + +The first argument to Perl's split() is a regular expression. If +it's a string, it'll just get converted into a regexp (except for the +special case ' '; it's Perl, there had to be a special case). So + + - You actually need to use '\|', not '|', if you're going to use a + string instead of a regexp (try it and see); + + - '\|' isn't actually any faster than /\|/ (I benchmarked it to + check). + +-- + Dan Schmidt -> dfan at harmonixmusic.com, dfan at alum.mit.edu +Honest Bob & the http://www2.thecia.net/users/dfan/ +Factory-to-Dealer Incentives -> http://www2.thecia.net/users/dfan/hbob/ + Gamelan Galak Tika -> http://web.mit.edu/galak-tika/www/ + + + + diff --git a/demo/ermis-f/python_m/cur/1812 b/demo/ermis-f/python_m/cur/1812 new file mode 100644 index 00000000..faae260d --- /dev/null +++ b/demo/ermis-f/python_m/cur/1812 @@ -0,0 +1,43 @@ +From: tim_one at email.msn.com (Tim Peters) +Date: Tue, 18 May 1999 00:46:10 -0400 +Subject: while (a=b()) ... +In-Reply-To: <14144.26371.38718.411863@bitdiddle.cnri.reston.va.us> +Message-ID: <000801bea0e9$597de6c0$829e2299@tim> +Content-Length: 1048 +X-UID: 1812 + +[Tim] +> You need to be much clearer about your claim here; certainly +> xrange(1000000) runs much faster than range(1000000) on anyone's +> machine (the former is constant time regardless of argument and +> the latter at best takes time proportional to a million), so +> your real complaint is about something else. + +[Jeremy Hylton] [mailto:jeremy at cnri.reston.va.us] +> Actually, range(1000000) is faster on my machine. Something like 3% +> faster, but still faster. Of course, if the program can amortize the +> cost of creation/deletion across multiple iterations, it will be +> substantially faster. + +from time import clock +N = 1000000 +start1 = clock(); x = xrange(N); finish1 = clock() +start2 = clock(); y = range(N); finish2 = clock() +print "xrange time", finish1 - start1 +print " range time", finish2 - start2 + +That prints + +xrange time 0.000689753432005 + range time 1.05385775826 + +for me, the third time I run it. The first time, range is 10000x slower +than xrange while Win95 swaps the world out to disk . + +clearer?-ly y'rs - tim + + + + + + diff --git a/demo/ermis-f/python_m/cur/1813 b/demo/ermis-f/python_m/cur/1813 new file mode 100644 index 00000000..cecec317 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1813 @@ -0,0 +1,26 @@ +From: achatham5 at my-dejanews.com (achatham5 at my-dejanews.com) +Date: Tue, 25 May 1999 16:12:39 GMT +Subject: pygtk documentation? +References: <7ic6s3$cma$1@nnrp1.deja.com> <3749B507.69A29A12@bc.edu> +Message-ID: <7iei5l$224$1@nnrp1.deja.com> +X-UID: 1813 + +In article <3749B507.69A29A12 at bc.edu>, + "J.W. Bizzaro" wrote: +> BTW, pygtk is for now a UNIX toolset. It appears you are using +MICROS~1 IE by +> the "?" inserted as apostrophies. Tk is probably the best toolset +for Win +> systems. + +Oops, you caught me! I'm at work, where we've ''standardized.'' I use +Linux at home. I should have tried to hide the quotes. There, the ones +around standardized should look decent now . . . I hope. + + +--== Sent via Deja.com http://www.deja.com/ ==-- +---Share what you know. Learn what you don't.--- + + + + diff --git a/demo/ermis-f/python_m/cur/1814 b/demo/ermis-f/python_m/cur/1814 new file mode 100644 index 00000000..9c78c6d1 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1814 @@ -0,0 +1,25 @@ +From: graham at sloth.math.uga.edu (Graham Matthews) +Date: 20 May 1999 01:08:33 GMT +Subject: Defining VCL-like framework for Python +References: <199905191942.VAA26784@axil.hvision.nl> +Message-ID: <7hvnah$ern$1@cronkite.cc.uga.edu> +X-UID: 1814 + +Hans Nowak (ivnowa at hvision.nl) wrote: +: It seems that cyclic references are one of Python's problems, yes. So you +: need to avoid those. :^) + +The problem is that as I understand the Python implementation you can +very easily make circular refs the without even knowing you are doing +it via globals. Or has this been changed? + +graham +-- + Like a bird on a wire + Like a drunk in a midnight choir + I have tried in my way + To be free + + + + diff --git a/demo/ermis-f/python_m/cur/1815 b/demo/ermis-f/python_m/cur/1815 new file mode 100644 index 00000000..1b607b8b --- /dev/null +++ b/demo/ermis-f/python_m/cur/1815 @@ -0,0 +1,84 @@ +From: landrum at foreman.ac.rwth-aachen.de (Gregory A. Landrum) +Date: 14 May 1999 13:16:27 +0200 +Subject: Bug or feature? +Message-ID: +Content-Length: 2347 +X-UID: 1815 + +Hi, + +After spending an hour chasing down a problem in my code last +night, I ran across something that made me curse. At first I thought +"Ha! I found a bug!" Then I thought about it a little bit more and +decided "Mabye it's a feature." Then I thought about it a little more +and realized that I can think of no good reason for this "feature" +to exist. Now I'm posting in hopes of obtaining enlightenment. + +Here's a short section of code which demonstrates the "problem": + +#---------------------------- +class hasarray: + data1 = [1,2,3]; + + def __init__(self): + self.data3 = [1,2,3]; + + +if __name__=="__main__": + obj1 = hasarray(); + obj2 = hasarray(); + + print "before:"; + print "\tobj1:", obj1.data1,obj1.data3; + print "\tobj2:", obj2.data1,obj2.data3; + + obj1.data1[0] = -1; + obj1.data3[2] = -1; + + print "after:"; + print "\tobj1:", obj1.data1,obj1.data3; + print "\tobj2:", obj2.data1,obj2.data3; +#---------------------------- + +And here's what happens when I run it: +---------------------------- +foreman ~/python python arrs.py +before: + obj1: [1, 2, 3] [1, 2, 3] + obj2: [1, 2, 3] [1, 2, 3] +after: + obj1: [-1, 2, 3] [1, 2, -1] + obj2: [-1, 2, 3] [1, 2, 3] +---------------------------- + +So, if I initialize an array variable within the "class scope" (for +want of knowing the proper word) by simple assignment, this same array +is shared between *all* instances of the class. If I do the same +initialization within a class method (like __init__), then each +instance has its own copy of the array. I like the second case much +better... having the array shared between all instances just strikes +me as wrong. + +If this behavior is indeed what is intended, I'm really curious to +know why. Why is this confusing (to me at least) behavior considered +desirable? + +In case this is actually a bug (I don't think it's likely... this +seems like a design decision), I've reproduced the behavior on: +v1.5.1 under AIX 4.2 and linux (2.0.36) +v1.5.2 under Win95 + +Thanks in advance for any clues! + +-greg + +--------------------- +Dr. Greg Landrum (landrumSPAM at foreman.ac.rwth-aachen.de) +Institute of Inorganic Chemistry +Aachen University of Technology +Prof.-Pirlet-Str. 1, D-52074 Aachen, Germany + + + + + diff --git a/demo/ermis-f/python_m/cur/1816 b/demo/ermis-f/python_m/cur/1816 new file mode 100644 index 00000000..3874e107 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1816 @@ -0,0 +1,26 @@ +From: arcege at shore.net (Michael P. Reilly) +Date: Thu, 13 May 1999 01:22:02 GMT +Subject: while (a=b()) ... +References: <37397620.9887F8B4@infercor.no> <199905130024.KAA01250@koro.off.connect.com.au> +Message-ID: <_Op_2.127$9x5.36539@news.shore.net> +X-UID: 1816 + +Rod Palmer wrote: + +: The main issue seems to be the wording. +: I propose a wibble/fuckoffski construct. + +: wibble: +: if whatever: fuckoffski + +: This makes it clear that what you are doing is wibbling, +: and when you dont want to wibble anymore you fuckoffski. + +"Wibble".... isn't that one of the seven words you can't say on TV? ;) + + -Arcege + + + + + diff --git a/demo/ermis-f/python_m/cur/1817 b/demo/ermis-f/python_m/cur/1817 new file mode 100644 index 00000000..6f31a0a9 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1817 @@ -0,0 +1,42 @@ +From: mnot at pobox.com (Mark Nottingham) +Date: Wed, 5 May 1999 20:50:27 GMT +Subject: searching and indexing engine [Q] +References: <002d01be971b$b55832c0$6eba0ac8@kuarajy.infosys.com.ar> +Message-ID: <016001be9738$e808b4c0$0301a8c0@cbd.net.au> +X-UID: 1817 + +ht://dig is what you need; + +http://www.htdig.org/ + + +----- Original Message ----- +From: Bruno Mattarollo +To: Python list +Sent: Thursday, May 06, 1999 3:21 +Subject: searching and indexing engine [Q] + + +> Hi! +> +> Does anyone knows of a free searching engine I could use to add "search +> possibility" to an intranet? I mean, I used Excite I didn't like it very +> much and tryed Infoseek and love it, but to expensive... +> +> If it was something that I could control from python that would be really +> nice... And better if it could index not just plain text files but also +PDF. +> +> Thanks in advance. +> +> /B +> +> Bruno Mattarollo +> ... proud to be a PSA member +> +> + + + + + diff --git a/demo/ermis-f/python_m/cur/1818 b/demo/ermis-f/python_m/cur/1818 new file mode 100644 index 00000000..797dd928 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1818 @@ -0,0 +1,31 @@ +From: news at helen.demon.nl (Ilja Heitlager) +Date: Thu, 13 May 1999 11:01:36 +0200 +Subject: another Python convert +References: <37399D97.C93E4DB0@swcp.com> <926525216.20798.0.pluto.c3ade4b2@news.demon.nl> <3739B2A6.95F07053@earth.ox.ac.uk> +Message-ID: <926586177.21455.0.pluto.c3ade4b2@news.demon.nl> +X-UID: 1818 + +Nick Belshaw wrote in message <3739B2A6.95F07053 at earth.ox.ac.uk>... +>- just really painful to see what those guys are playing with. Real heros - +>we have it too easy over here. +> +>Seeing the high rate of postings on that group is initially a shock, but +>then you see the problems they are trying to deal with and you want to say +>- hey, its much easier over here, do it this way. + +In the netherlands PERL == $$$$, guess it's the same everywhere. I am not +anti-M$, +but somehow $$ = 1/IQ + +>thank heavens I found Python - +Funny you mention it, I was just thinking ........ ;-) + +'We all follow the shoe' + +Ilja + + + + + + diff --git a/demo/ermis-f/python_m/cur/1819 b/demo/ermis-f/python_m/cur/1819 new file mode 100644 index 00000000..21a2a976 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1819 @@ -0,0 +1,34 @@ +From: duncan at rcp.co.uk (Duncan Booth) +Date: 12 May 1999 08:03:59 GMT +Subject: catching results of ping on NT +References: <7ha62g$8fd$1@birch.prod.itd.earthlink.net> +Message-ID: <8DC45CD21duncanrcpcouk@news.rmplc.co.uk> +X-UID: 1819 + +[posted and mailed] + +Benjamin Derstine wrote in +<7ha62g$8fd$1 at birch.prod.itd.earthlink.net>: + +>I'm trying to write a script that saves the results of the ping command on +>NT. I can make the ping command happen with os.system('ping...') . +>However, I can't figure out how to get the results of this command into a +>Python data structure. I've studied the os and sys modules but they don't +>seem to have anything that can do this. +>Thanks, +> +>Ben +> +Try using popen: + result = os.popen('ping -n 3 localhost').readlines() + + +-- +Duncan Booth duncan at dales.rmplc.co.uk +int month(char *p){return(124864/((p[0]+p[1]-p[2]&0x1f)+1)%12)["\5\x8\3" +"\6\7\xb\1\x9\xa\2\0\4"];} // Who said my code was obscure? +http://dales.rmplc.co.uk/Duncan + + + + diff --git a/demo/ermis-f/python_m/cur/1820 b/demo/ermis-f/python_m/cur/1820 new file mode 100644 index 00000000..30d97539 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1820 @@ -0,0 +1,126 @@ +From: arcege at shore.net (Michael P. Reilly) +Date: Wed, 26 May 1999 22:17:56 GMT +Subject: Bug report: memory leak in python 1.5.2 +References: <19990526160643.54023@nms.otc.com.au> <374BAB31.2F8FA25C@lemburg.com> <14156.1920.64148.193367@weyr.cnri.reston.va.us> <14156.25520.795257.69628@weyr.cnri.reston.va.us> +Message-ID: +Content-Length: 5456 +X-UID: 1820 + +Fred L. Drake wrote: + +: Michael P. Reilly writes: +: > There is also the situation where some UNIX systems put the environment +: > initially in the u area, and it is difficult to programmatically determine +: > where different runtime segments are (where is the heap vs. where is the +: > u area). +: > +: > Fred, your solution should work because it takes the problem case: what +: > to do with the string initially, but I think it might be better to copy +: > the values at module initialization time. I've included an addition to +: > Fred's patch to be called instead of the PyDict_New() function (in the +: > module init function). +: +: If I understand correctly, your patch avoids the problem of memory +: leaked from the initial environment (a static size). Is this correct? + +My initializer only deals with the possible UNIX implimentations of the +environment, by copying the environment (supposedly) before it is +used. There are no guarantees how putenv will modify the environment. +AIX 4.2.1 states that the environment is expanded as needed for new +values, but with some tests, it still shows that putenv/getenv is using +passed (borrowed) values. If we mix Python-changed environment +variables with some that are not as a blanket system-independant +implimentation, I foresee problems. If it is going to be treated as +volitile memory, we should initialize it in a more appropriate manner +(in my thinking). + +Remember that the original definition of UNIX put the environment (and +argument list) in the u area, in-accessible to the process without the +passed copies (in main()) and using putenv/getenv. I've never used +Linux, but I wouldn't be surprised if it used something along those +lines. Mixing dynamic string with static could get dangerous (I +recently debugged a library that would return malloc'd string or a +static string indiscriminantly). + +Regardless, it was just a suggestion for consistancy, your patch would +work except on a few, very odd systems where the environment isn't +quite what people expect, I was trying to handle that case. But.. read +on, MacDuff. + +: If so, I'm not sure it's worth the extra code. My intention was to +: avoid the Python-induced leak that would allow a long-running Python +: script that occaisionally created a subprocess to become a MemoryError +: traceback. ;-) In the case of systems without a lot of memory +: available, the environment should be kept small to begin with (making +: the additional data structures created by the startup code more of a +: problem). +: I don't think I've ever checked the size of the "typical" UNIX +: environment; "printenv | wc -c" tells me I'm running under 2Kb in a +: fresh shell. Is that enough to worry about, and slow down +: initialization? + +A common bare minimum environment is: HOME, USER, SHELL, MAIL. That's +not all that much (should be less then 256 on virtually every system). + +Most systems have an upper bound based on a limit of the argument list +and the environment (ARG_MAX). POSIX limits this at 4k, but most +systems have it larger (SunOS is at 1Mb). This means that there's a +limit to how much we would be initializing anyway (with my addition). + +: > Also, how should we deal with this in terms of C applications who might +: > change the environment? (Embedders beware!) +: +: In this case, we may not clear all the possible garbage, but we only +: leak for keys that are: +: +: 1. Changed from Python at least once, then +: 2. Changed from C, and +: 3. Never changed from Python again. +: +: Note that only one copy of the variable gets leaked, not an infinite +: succession. +: In the case of two Python putenv() calls with C putenv() calls +: inbetween, we don't introduce any new leaks; the effect is that the +: data from the first Python putenv() isn't collected until the second +: Python putenv(). This is acceptable. + +True; my thought was in some system where you get a cowboy programmer +who decides to take control of the environment making everything +borrowed in his library. Then you get: + + * cowboy initializes + * python changes (with borrowed memory) + * cowboy frees python-borrowed memory and makes change + * python changes again attempting to free already freed memory + ... + +My point wasn't that we should handle this case, just to make it known +somewhere that Python is now attempting to borrow some aspects of the +environment (depending on the platform). We can't babysit everything, +but taking control of a system managed facility does takes +responsibility. + +(I try not to go so far as making these types of statements anymore, +however hypothetical - too many "people" take it personally. It's +better to let intelligent people read and make there own conclusions.) + +: > From a programming standpoint, I don't think that it should be "proper" +: > to be changing the environment all that much. It's purpose is to +: > propragate values to child processes, not to store runtime values. +: +: I agree. Processes that run a lot of children, like HTTP servers +: running CGI scripts, won't be using their own environment to do this, +: but will create the desired environments on the fly. (Especially if +: they're threaded!) + +Yes, my point to the statement was that people shouldn't be leaking +much from using the current implimentation we have - assuming they use +it "properly". Maybe there should be better education in the docs of +its purpose. + + -Arcege + + + + + diff --git a/demo/ermis-f/python_m/cur/1821 b/demo/ermis-f/python_m/cur/1821 new file mode 100644 index 00000000..41e82bb5 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1821 @@ -0,0 +1,12 @@ +From: svandong at uniserve.com (Steve van Dongen) +Date: Wed, 05 May 1999 23:34:16 -0700 +Subject: Get Lost. This is off topic in every group you've posted to. +References: <3764acce.5879494@news.earthlink.net> +Message-ID: <373137E8.64E864D8@uniserve.com> +X-UID: 1821 + +[cut] + + + + diff --git a/demo/ermis-f/python_m/cur/1822 b/demo/ermis-f/python_m/cur/1822 new file mode 100644 index 00000000..b28d0e18 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1822 @@ -0,0 +1,45 @@ +From: paul at prescod.net (Paul Prescod) +Date: Sun, 2 May 1999 14:42:05 GMT +Subject: PROPOSAL: Packages in Python lib +References: <199905020817.KAA29168@axil.hvision.nl> +Message-ID: <372C643D.C43D47E1@prescod.net> +Content-Length: 1560 +X-UID: 1822 + +Hans Nowak wrote: +> +> I think it will be very hard to make a package hierarchy that is logical to +> all users (or most of them). That does not mean your proposal isn't good... +> I'm just wondering how these problems will be solved. It makes me wish that +> there was a different approach to grouping of modules... something non- +> hierarchical. + +For human beings, hierarchy is the simplest organization after a flat +list. A hierarchy doesn't have to be perfect to be usable. Looking for +HTML? Check out the Internet package and then the formats package. I +already have to do that with the Python library anyhow -- sometimes I +don't know if a thing is in os or os.path, re or string, glob or fnmatch, +zlib or gzip, etc. You just have to look around. + +Anyhow, the existence of hierarchy in the standard library does not +preclude a flat representation of it. The Python library documentation is +already hierarchical but you can find HTML in the table of contents, the +module list or the index. + +Overall, I don't see it as a big problem. I mean if it became a problem we +could easily add a concept of symlinks to the package mechanism but I +don't think that we need that. + +-- + Paul Prescod - ISOGEN Consulting Engineer speaking for only himself + http://itrc.uwaterloo.ca/~papresco + +"Microsoft spokesman Ian Hatton admits that the Linux system would have +performed better had it been tuned." +"Future press releases on the issue will clearly state that the research +was sponsored by Microsoft." + http://www.itweb.co.za/sections/enterprise/1999/9904221410.asp + + + + diff --git a/demo/ermis-f/python_m/cur/1823 b/demo/ermis-f/python_m/cur/1823 new file mode 100644 index 00000000..493d7458 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1823 @@ -0,0 +1,72 @@ +From: mlh at idt.ntnu.no (Magnus L. Hetland) +Date: 19 May 1999 23:50:06 +0200 +Subject: Concrete Proposal: while ... and while ... +References: <7hsv80$g9j$1@news.tamu.edu> <7hufdb$rrh$1@news.tamu.edu> +Message-ID: +Content-Length: 1539 +X-UID: 1823 + +cwebster at math.tamu.edu (Corran Webster) writes: + +> In article , +> Magnus L. Hetland wrote: +> >cwebster at math.tamu.edu (Corran Webster) writes: +> > +[...] +> +> It might be the Guido-approved version - I can't recall the exact form +> of the approved form. If this is in fact it, then I think my proposal +> has a slight advantage over this in simplicity. This form allows two +> tests (presuming something other than '1' is permitted after the first +> while), where my proposal has precisely one test for the loop, which +> seems more natural to me. + +Maybe -- but then the keyword "while" seems a bit strange... + +while: + line = readline() +and while line: + print line + +To me, the "while: line=readline()" sounds like some kind of +condition, and it certainly isn't... I would find this more +understandable: + +repeat: + line = readline() +and while line: + print line + +But then we have another keyword again... + +> +> No, "while:" is not permitted without the "and while" later. The precise +> grammar is +> +> while [':' suite 'and' 'while'] test ':' suite ['else' ':' suite] +> + +OK - I see. + +[snip] + +> It seems to me that with this change, 'while 1:' will be used much +> less often, and it's not worth the additional complexity to make +> the '1' optional. + +I agree... I think I meant it should be obligatory, since I find +"while:" even more meaningless . Oh, well... + +> +> Corran +> + +-- + + Magnus + Lie + Hetland http://arcadia.laiv.org + + + + diff --git a/demo/ermis-f/python_m/cur/1824 b/demo/ermis-f/python_m/cur/1824 new file mode 100644 index 00000000..13f5ea6c --- /dev/null +++ b/demo/ermis-f/python_m/cur/1824 @@ -0,0 +1,23 @@ +From: ken at _nospam_ken.x13.com (Ken Kinder) +Date: Tue, 25 May 1999 22:49:42 -0600 +Subject: Quick question: forcing exec() within a specific namespace +References: +Message-ID: <374B7D66.7CCAAA17@_nospam_ken.x13.com> +X-UID: 1824 + +Sarino Suon wrote: +> +> In the interactive interpreter, when I call exec(), whatever objects are +> created belong to the __main__ module. What if I need the objects to be +> attached to a specific object, such as a class instance? Can this be done? +> +> --- Sarino + +Yeah, it can. Here's how it works: exec(code, [, globals [, locals ] ]) + +Globals and locals are namespaces, in dictionary form. By default, the +name space of the calling code is used. + + + + diff --git a/demo/ermis-f/python_m/cur/1825 b/demo/ermis-f/python_m/cur/1825 new file mode 100644 index 00000000..72b2de01 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1825 @@ -0,0 +1,23 @@ +From: jblaine at shell2.shore.net (Jeff Blaine) +Date: Wed, 19 May 1999 16:36:15 GMT +Subject: An uname - like call? +References: +Message-ID: +X-UID: 1825 + +>elvira:~(ndgy)python +>Python 1.5.1 (#1, Jan 20 1999, 20:01:05) [GCC egcs-2.91.60 19981201 (e +>on linux2 +>Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam +>>>> +> +>How can I get this string in a script? It should be annoying to fork a +>os.system("uname -a") since the OS ID is already in the interpreter +>somehow. + +import sys +print sys.version + + + + diff --git a/demo/ermis-f/python_m/cur/1826 b/demo/ermis-f/python_m/cur/1826 new file mode 100644 index 00000000..30899b69 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1826 @@ -0,0 +1,21 @@ +From: hniksic at srce.hr (Hrvoje Niksic) +Date: 25 May 1999 15:28:14 +0200 +Subject: O_NONBLOCK vs. O_NDELAY for non-blocking sockets +In-Reply-To: "Gordon McMillan"'s message of "Tue, 25 May 1999 08:59:39 -0500" +References: <1284481487-19457784@hypernet.com> +Message-ID: <87hfp19t3l.fsf@pc-hrvoje.srce.hr> +X-UID: 1826 + +"Gordon McMillan" writes: + +> All these flavors of sockets are available on HPUX. Python manages +> to build with BSD semantics. Maybe it's just dumb luck though +> , when I glance at configure, I don't see anything that sets +> this. + +Huh? Just look at Modules/socketmodule.c, the definition of +setblocking(), and use of O_NDELAY is right there. + + + + diff --git a/demo/ermis-f/python_m/cur/1827 b/demo/ermis-f/python_m/cur/1827 new file mode 100644 index 00000000..30e17f44 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1827 @@ -0,0 +1,24 @@ +From: tom22 at verio.com (Tom) +Date: Fri, 28 May 1999 21:41:27 GMT +Subject: Help:I upgraded to Python 1.5.2 on Redhat 5.2 and things stopped + working. +Message-ID: <374F0E7D.247AC607@verio.com> +X-UID: 1827 + +Hi, + +I have been using redhat 5.2 . I recently loaded and upgraded python +1.5.2 and some utilities that depended upon python, such as the +graphical network configurator, have stopped working. Does anyone know +why? And can I get back my configuration without having to uninstall the +new python and reinstall the older one? + +Thanks +Tom +tomcip at concentric.net + + + + + + diff --git a/demo/ermis-f/python_m/cur/1828 b/demo/ermis-f/python_m/cur/1828 new file mode 100644 index 00000000..63c4ba89 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1828 @@ -0,0 +1,19 @@ +From: fredrik at pythonware.com (Fredrik Lundh) +Date: Fri, 14 May 1999 09:20:22 GMT +Subject: Running a file, with a relative filename +References: <926371468snz@vision25.demon.co.uk> <926634830snz@vision25.demon.co.uk> +Message-ID: <009001be9ded$06223e30$f29b12c2@pythonware.com> +X-UID: 1828 + +Phil Hunt wrote: +> Is there a way of saying ``import "../yyy/prog2.py"''? + +sys.path.insert(0, "../yyy") +import prog2 + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1829 b/demo/ermis-f/python_m/cur/1829 new file mode 100644 index 00000000..2be65d2b --- /dev/null +++ b/demo/ermis-f/python_m/cur/1829 @@ -0,0 +1,51 @@ +From: fredrik at pythonware.com (Fredrik Lundh) +Date: Thu, 13 May 1999 17:24:46 GMT +Subject: Class vs instance variables? +References: <373A30F0.7E61E813@rd.fujitec.co.jp> +Message-ID: <014e01be9d65$80944150$f29b12c2@pythonware.com> +Content-Length: 1155 +X-UID: 1829 + +Sandor Markon wrote: +> Sorry if this is a FAQ item but . +> I am trying to figure out what data is shared btw instances +> and what not. Could someone please explain this behavior: +> +> class c: +> a=[] +> x=0 +> def __init__(self,x): +> self.x=x +> self.a.append(x) + +> # ??? Why is this list shared while the scalars are separate? + +BOTH are shared. + +it's just that you REPLACE the binding for the integer +(self.x = x creates a new instance binding for x, hiding +the one in the class), while you MODIFY the list in place. + +no magic involved. + +> # How do I tell Python to make the list an instance var, +> # or the scalar a class var? + +to make class variables behave like class variables, you +need to access them through the class' namespace (use +c.a or c.x instead of self.a and self.x). + +but you may wish to avoid class variables if you possibly +can. "global" (that is, module variables, not program globals) +variables are often easier to use. + + + +PS. no chance you can teach your newsreader not to +mark your messages as "iso-2022-jp" when they only con- +tain plain ASCII? + + + + + diff --git a/demo/ermis-f/python_m/cur/1830 b/demo/ermis-f/python_m/cur/1830 new file mode 100644 index 00000000..b681a633 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1830 @@ -0,0 +1,38 @@ +From: fredrik at pythonware.com (Fredrik Lundh) +Date: Sun, 16 May 1999 13:54:16 GMT +Subject: help please- ftplib +References: <7hmdlc$kk1$1@nnrp1.deja.com> +Message-ID: <004a01be9fa3$976c5ee0$f29b12c2@pythonware.com> +X-UID: 1830 + + wrote: +> oky doky, form my last post i have progressed +> +> I can now retrieve files from the server using "retrbinary" +> +> now i'm trying to send files to the server from my machine heress the +> code i'm using and the error i get: +> +> >>> from ftplib import FTP +> >>> ftp = FTP('s3.virtualave.net','gony','********') +> >>> ftp.storbinary('STOR test.txt', open('test.txt', 'r').read) +> Traceback (innermost last): +> File "", line 1, in ? +> ftp.storbinary('STOR test.txt', open('test.txt', 'r').read) +> TypeError: not enough arguments; expected 4, got 3 + +use: + + file = "test.txt" + ftp.storbinary("STOR " + file, open(file, "rb"), 1024) + +or to upload a text file, + + ftp.storlines("STOR " + file, open(file)) + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1831 b/demo/ermis-f/python_m/cur/1831 new file mode 100644 index 00000000..91f4daa7 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1831 @@ -0,0 +1,86 @@ +From: tismer at appliedbiometrics.com (Christian Tismer) +Date: Mon, 10 May 1999 20:30:13 GMT +Subject: The way to a faster python [was Python IS slow !] +References: <004f01be9b0c$ac5d6fb0$8d84b2d8@linwin.token.hapenney.com> +Message-ID: <373741D5.E05E4749@appliedbiometrics.com> +Content-Length: 3465 +X-UID: 1831 + + +Evan Simpson wrote: +> +> Consider a VM for SPython/Swallow code which is linked to standard CPython. +> S-code can manipulate raw integers, floats, arrays, etc which are statically +> typed due to some kind of declaration, inference, or C interface. Untyped +> objects are simply normal Python objects, and all operations on them are +> handed off to CPython. You can mix & match equivalent types by +> automatically casting them static or dynamic. Anything imported from a *.py +> module is dynamic, anything from a *.spy is static. Probably CPython code +> could only import (auto-wrapped) classes, instances, and functions from +> S-modules. S-code can import anything from CPython modules, S-modules, or C +> headers (with SWIGgish limitations). S-namespaces are fixed at creation, +> but if you need to use dynamic objects in some S-code, simply import them +> from a helper module written in CPython. + +Huh? How do you import into a fixed-at-creation namespace. +What do you mean by casting into static or dynamic. +Isn't that exactly what I pointed out: Everything must be turned +into something different. + +So neiher is a subset of the other. + +> Food for thought: Should "x = int(42)" in S-code create an integer object +> and imply that "x" is dynamic, or should it imply that "x" is an integer +> variable with value 42? Whichever one you picked, how would you spell the +> other? How should C declarations be "imported"? In comments? As CPython-ly +> illegal identifiers (eg. quoted strings)? Would it make sense to define +> S-type namespaces as ordinary CPython extension types? + +I have the impression that it should work this way. +An S-type should be from a special, imported CPython module +with the property of S-ness. Everything must be coerced +from dynamic to static to make this coexist. +This seems to be the easist for me to imagine. +S-Python must not be able to use CPython's objects freely +with a different semantic, or we will get into trouble +with threading. +This is already the case with objects shared the wron way, +but would give you just a traceback. +If S-Python is really efficient, it would give a core dump. + +C-Python must pack things up into S-Python world and back. +S-Python may reach out, but this always forces it to use +coercions to local copies. + +Could be a little much to implement. +I fear we must throw a lot away, or we get a different language +instead of an embedded tool. + +If we just forget about classes and modules, and just think +of some basic S-objects for S-functions? +Strings already carry S-ness. Lists don't, but the arraymodule +has it. Tuples must once be checked for their elements type, +and if they are all the same and not mutable, the work. +Lists could be handled similar, but only if there is no other +reference to them, meaning to pass a copy, or loose all +outer references by that. + +So far if we don't want to write new types, +and that's what I'd start to play with. + +ciao - chris + +[well I'm so tired that S_Python might become as + empty as my brain, so better another day :-] + +-- +Christian Tismer :^) +Applied Biometrics GmbH : Have a break! Take a ride on Python's +Kaiserin-Augusta-Allee 101 : *Starship* http://starship.python.net +10553 Berlin : PGP key -> http://wwwkeys.pgp.net +PGP Fingerprint E182 71C7 1A9D 66E9 9D15 D3CC D4D7 93E2 1FAE F6DF + we're tired of banana software - shipped green, ripens at home + + + + diff --git a/demo/ermis-f/python_m/cur/1832 b/demo/ermis-f/python_m/cur/1832 new file mode 100644 index 00000000..df449456 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1832 @@ -0,0 +1,25 @@ +From: stephensong at iname.com (Gary Stephenson) +Date: Mon, 17 May 1999 21:40:56 +1000 +Subject: Bug or feature? +References: <000901be9efe$617e46e0$659e2299@tim> +Message-ID: <37400048.8B38FED1@iname.com> +X-UID: 1832 + +Tim Peters wrote: + +> when-i'm-on-my-deathbed-i'm-sure-i'll-look-back-and-wish-i'd-spent- +> more-time-on-c.l.py-ly y'rs - tim + +So will we all - wish *you* had spent more time on c.l.py that is! Quite +honestly, I have learnt more about Python from your posts to this group than +from any other single source (apart from writing it of course). At the same +time I have been constantly entertained and amused by your unfailing humour. + +I-think-I-want-to-have-your-baby-ly yours + +gary + + + + + diff --git a/demo/ermis-f/python_m/cur/1833 b/demo/ermis-f/python_m/cur/1833 new file mode 100644 index 00000000..62f9dc4d --- /dev/null +++ b/demo/ermis-f/python_m/cur/1833 @@ -0,0 +1,55 @@ +From: donn at u.washington.edu (Donn Cave) +Date: 7 May 1999 16:46:53 GMT +Subject: os.system() or os.execv() w/stdout redirect and PID tracking +References: <3731CDAD.E4A07C5F@iname.com> <1286105051-108961965@hypernet.com> <37326CF4.EAB6A0FD@iname.com> +Message-ID: <7gv5dt$jn0$1@nntp6.u.washington.edu> +Content-Length: 2129 +X-UID: 1833 + +Michael Olivier writes: +... +| Thanks a lot, Gordon! This really helps. It took a little to +| understand the magic hacks going on... is there any cleaner way to refer +| to stdout than as '1'? I'm also trapping stderr as '2' ... and I +| modified for the output to go to a file I open instead of piped back to +| the original process. + +You can't get any cleaner than 1. 1 (like any file descriptor) is the +real thing - an abstraction like stdout that supports device independent +I/O operations, but is unburdened by the complications of a C library +process-internal buffer. It's brilliantly simple, especially on UNIX +where it's consistently implemented. (Some systems hack in a device, +like the socket in particular, as an afterthought without integrating +it as a true file descriptor, sort of missing the point.) + +| You close stdout with os.close(1) -- os.dup() then just happens to fill +| in the stdout slot in the table because it's available? Scary coding if +| true, but if it gets me what I need... how much can I count on this +| staying the same for future Linux & Sun implementations? + +It's a given, but as Gordon already allowed in a followup, you could as +well use dup2() to say exactly what you want. You're right about how +the slot works, so the burden of dup() is that you have to account for +0 as well as 1, i.e., all the units below the slot you're aiming at. + +These are (normally?) both covers for the F_DUPFD fcntl(), which works +like this: + + newfd = fcntl.fcntl(oldfd, FCNTL.F_DUPFD, lowfd) + assert newfd >= lowfd + +I understand all three of these functions appear in the XPG4 standard, +but I don't think they're in POSIX 1003.1. Some information here that +probably no one wanted, but hoping that a little light shed on these +things will dispell the aura of magic. + +Maybe a better way to say it: Yes, these are low level primitives in the +sense that stdio etc. build on top of them, but on the other hand they're +very high level abstractions that are there for your direct use too. + + Donn Cave, University Computing Services, University of Washington + donn at u.washington.edu + + + + diff --git a/demo/ermis-f/python_m/cur/1834 b/demo/ermis-f/python_m/cur/1834 new file mode 100644 index 00000000..54cc19f5 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1834 @@ -0,0 +1,14 @@ +From: jk94r at ecs.soton.ac.uk (Joseph Kuan) +Date: 19 May 1999 08:23:09 GMT +Subject: Help, how to override <= operator +Message-ID: <7htsdd$6kd@wapping.ecs.soton.ac.uk> +X-UID: 1834 + + What's the function name for overriding the <= operator? + +Thanks a lot +Joe + + + + diff --git a/demo/ermis-f/python_m/cur/1835 b/demo/ermis-f/python_m/cur/1835 new file mode 100644 index 00000000..dfdb942a --- /dev/null +++ b/demo/ermis-f/python_m/cur/1835 @@ -0,0 +1,31 @@ +From: dkuhlman at netcom.com (G. David Kuhlman) +Date: Tue, 4 May 1999 14:31:16 GMT +Subject: Indentation on WinNT +References: <372D7DDB.CF5C5588@t-online.de> +Message-ID: +X-UID: 1835 + +Monika G?hmann wrote: +> Hi, + +> the concept of using indentation-only structuring in Python code is very +> nice -- as long as everybody uses Unix and/or reasonable settings with +> their editor. + +> I have to work with WinNT and when I display code which was developed on +> Unix it sometimes is all messed up looking like this: + +I work on both Linux and WinNT, too. Some of us could help +ourselves on this kind of problem if we had the equivalent of the +UNIX expand and unexpand commands for WinNT. Does anyone know +where we can find ports of these tools for WinNT or can find +similar tools? I'm hoping that my shop will soon be using Python +more extensively, and it would be nice if I could make this kind of +tool available to our people. They are WinNT people, but even they +can be trained to use a command line. + + - Dave + + + + diff --git a/demo/ermis-f/python_m/cur/1836 b/demo/ermis-f/python_m/cur/1836 new file mode 100644 index 00000000..9866a511 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1836 @@ -0,0 +1,24 @@ +From: gmcm at hypernet.com (Gordon McMillan) +Date: Mon, 24 May 1999 22:59:59 -0500 +Subject: Error during installation/uUpgrade +In-Reply-To: <374935F8.B015FB4F@technologist.com> +Message-ID: <1284517468-17293472@hypernet.com> +X-UID: 1836 + +Evan Panagiotopoulos asks: + +> I want to upgrade from python version 1.5.1 to 1.5.2 because the new +> version is needed from a PyGreSQL rpm module. I'm using RedHat 5.2 +> and while I'm executing rpm -Uhv of python I get the +> following error: python 1.5.1 is needed by python-devel-1.5.1_5. Any +> suggestions? + +More of an RPM question. De-install the 1.5.1 development RPM. You +can install a 1.5.2 development RPM later, or just download the +source from python.org. + +- Gordon + + + + diff --git a/demo/ermis-f/python_m/cur/1837 b/demo/ermis-f/python_m/cur/1837 new file mode 100644 index 00000000..fccb680e --- /dev/null +++ b/demo/ermis-f/python_m/cur/1837 @@ -0,0 +1,28 @@ +From: jlittler at silas-2.cc.monash.edu.au (Mr J Littler) +Date: 27 May 1999 12:14:38 GMT +Subject: beginners Q: CGI and file paths +Message-ID: <7ijcve$o4o$1@towncrier.cc.monash.edu.au> +X-UID: 1837 + +Hi, +I've written a cgi script that outputs a couple of files. +The default placement is in the cgi-bin directory and +I want them to go elsewhere. I've tried ... + +filename = "/proper_path_here/c_list.html" +append = open(filename, 'a') + +but putting the path in front of the filename makes no +difference (and doesn't generate an error) +I read thro cgi.py but can't see what to do. +Any help appreciated... +Cheers +John +-- +jlittler at silas.cc.monash.edu.au +http://jlittler.cjb.net +http://linuxmusic.cjb.net + + + + diff --git a/demo/ermis-f/python_m/cur/1838 b/demo/ermis-f/python_m/cur/1838 new file mode 100644 index 00000000..9fadb771 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1838 @@ -0,0 +1,43 @@ +From: tavares at connix.com (Chris Tavares) +Date: Tue, 18 May 1999 22:19:15 -0400 +Subject: Python vs. VB +References: <37407bc5.343558265@news.esinet.net> <3740E23C.B0769241@swcp.com> +Message-ID: <37421FA3.48E831A1@connix.com> +Content-Length: 1103 +X-UID: 1838 + +Alex Rice wrote: + +> Roy Stephan wrote: +> +> > I was wondering if people on this list could provide me with some +> > amunition against the managment onslaught that will surely ensue in +> > favour of all things Microsoft. +> +> Not too long ago, I read a scathing report by a former big-time VB +> advocate. Basically this guy, after having being a longtime user and +> having written several editions of "visual basic master secret" books, +> got totally fed up and decided to quit using the language and let alone +> to write another book about it again! +> +> Of course, I cannot find the web article now, but I suspect the author +> was Gary Entsminger (wrote Secrets of the Visual Basic for Windows +> Masters, among other titles). Don't quote me on this :-) +> + +[... SNIP ...] + +Actually, the author in question is Bruce McKinney, author of "Hardcore +Visual Basic". And the article in question would be very good ammo. + +The ultimate gist of it was that: VB will very easily let you do 90% of your +application. However, it will fight you fang and claw to prevent you from +getting that last 10% done. + +-Chris + + + + + + diff --git a/demo/ermis-f/python_m/cur/1839 b/demo/ermis-f/python_m/cur/1839 new file mode 100644 index 00000000..d4c080eb --- /dev/null +++ b/demo/ermis-f/python_m/cur/1839 @@ -0,0 +1,31 @@ +From: Franz.Lehner at t-online.de (N.N) +Date: 04 May 99 20:10:05 +Subject: S: Piano f. WIN +Message-ID: <925870205mnewsNobody@t-online.de> +X-UID: 1839 + +Hallo zusammen! + +Ich suche ein Freeware-Proggie, mit dem ich mittels +Tastatur Musiknoten (Viertel, Halbe...) eingeben kann. + +Diese sollen mir dann im richtigen Rhythmus ueber die +Soundkarte abgespielt werden. + +Welches Programm ist geeignet? +Unter welcher FTP kann ich mir das Ding saugen? + +Antwort bitte an meine email-Adresse, da ich in +diesem Brett nicht regelmaessig mitlese. + +Herzlichen Dank im voraus + + + +Franz.Lehner at t-online.de + + + + + + diff --git a/demo/ermis-f/python_m/cur/1840 b/demo/ermis-f/python_m/cur/1840 new file mode 100644 index 00000000..ff8ea88d --- /dev/null +++ b/demo/ermis-f/python_m/cur/1840 @@ -0,0 +1,20 @@ +From: greg.ewing at compaq.com (Greg Ewing) +Date: Tue, 04 May 1999 13:11:24 +1200 +Subject: Loop and a half +Message-ID: <372E493C.26F14E33@compaq.com> +X-UID: 1840 + +I've just had another idea for a loop-and-a-half syntax: + + while: + line = f.readline() + gives line: + frobulate(line) + +Just another possible idea for 2.0, perhaps. Maybe. + +Greg + + + + diff --git a/demo/ermis-f/python_m/cur/1841 b/demo/ermis-f/python_m/cur/1841 new file mode 100644 index 00000000..8cb5690c --- /dev/null +++ b/demo/ermis-f/python_m/cur/1841 @@ -0,0 +1,48 @@ +From: jim at interet.com (James C. Ahlstrom) +Date: Thu, 06 May 1999 10:11:16 -0400 +Subject: Windows 3.11 +References: <925985990.1205.0.nnrp-02.c224787d@news.demon.co.uk> +Message-ID: <3731A304.DF9B9B2D@interet.com> +Content-Length: 1447 +X-UID: 1841 + +Zacharias Pigadas wrote: +> +> Hello, +> I am trying to install python in a windows 3.11 machine but I run accross +> some problems. I may be a bit thick but I could not import string not import +> os but can import time. The machine was clean, no python installed to it +> previously, nothing. When editing the autoexec.bat file I found out that it +> was referencing one other directory called lib15 that does not exist on my +> machine. I tried looking for the libraries only distribution of python but +> everything came with the equivalent pytohn distribution(win32,linus, etc). I +> have python in WinNT I just need it on 3.11 as well. If I copy my lib +> directory from NT will it work then?? + +It sounds like your Windows 3.1 machine lacks a copy of the Python +library +files. Just copy the whole library tree including the subdirectory +structure +from your NT machine. If you use pkzip, be sure to unzip with the "-d" +option +so you preserve the subdirectories. + +When you start the Python binary, import sys, and then enter "print +sys.path". +This shows you what your PYTHONPATH is, and your library directory must +be on +this list. Otherwise, you can set the environment variable PYTHONPATH +to change +this list. It may be easier to just choose to use the default +PYTHONPATH. + +You should now be able to import "string", but may have problems +importing +long names such as "regex_syntax". If so, add /lib/dos-8x3 to your +PYTHONPATH. + +Jim Ahlstrom + + + + diff --git a/demo/ermis-f/python_m/cur/1842 b/demo/ermis-f/python_m/cur/1842 new file mode 100644 index 00000000..ce46bc59 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1842 @@ -0,0 +1,24 @@ +From: wware-nospam at world.std.com (Will Ware) +Date: Tue, 11 May 1999 22:43:18 GMT +Subject: Wrapping C++ code for python. +References: +Message-ID: +X-UID: 1842 + +Alex (alex at somewhere.round.here) wrote: +: Hi. Could someone please point me to some examples of Gnu C++ code +: wrapped up for Python? I am finding the documents rather heavy going, +: because they don't give any good examples. + +I don't have any, being a C guy rather than a C++ guy, but you might +want to look at Swig (www.swig.org), which automates the construction +of interfaces between C/C++ and Python/Tcl/Perl/etc. If I recall, the +handling of C++ is quite elegant and straightforward. +-- + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Will Ware email: wware[at]world[dot]std[dot]com +PGP fp (new key 07/15/97) 67683AE2 173FE781 A0D99636 0EAE6117 + + + + diff --git a/demo/ermis-f/python_m/cur/1843 b/demo/ermis-f/python_m/cur/1843 new file mode 100644 index 00000000..0dd410a8 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1843 @@ -0,0 +1,57 @@ +From: tim_one at email.msn.com (Tim Peters) +Date: Sat, 29 May 1999 23:27:29 -0400 +Subject: Using Tkinter in windows 98 +In-Reply-To: +Message-ID: <000701beaa4c$58bbed60$9b9e2299@tim> +Content-Length: 1693 +X-UID: 1843 + +[Dennis Wilson] +> My machine is an ibm aptive with windows 98 installed. I have a +> beautifully running tcl and perl with tk. I have tried to install +> and get to work python with tkinter. What an adventure. +> +> This final error message has me stymied. +> in python +> >>> import _tkinter; +> ImportError: DLL Load: a device attached to the system is not functioning. +> +> Like which device. The system is working fine. Python is not functioning. +> +> Just an aside, these kinds of vacuous error messages are part of +> what gives software a bad name. + +That's a Windows msg. From Microsoft's winerror.h: + +// MessageId: ERROR_GEN_FAILURE +// +// MessageText: +// +// A device attached to the system is not functioning. +// + +#define ERROR_GEN_FAILURE 31L + +Python tried to load a dll, Windows refused, Windows gave Python +ERROR_GEN_FAILURE as its reason for refusing, and Python passed the msg on +to you. That's the only clue Windows gave it! So it's the only clue Python +can give you. + +Haven't heard of this happening before, and don't have a guess as to the +real problem. It's odd right from the start that you called this "an +adventure", though, because most people running Windows appear to have no, +or very little, trouble installing Python+Tcl/Tk. + +A decent guess is that your previous installation of Tcl/Tk is incompatible +with the version Python is trying to use, and Tk is tying itself into knots +as a result. Many mysterious problems go away by magic after people +ruthlessly track down and eliminate all but one copy of the Tcl and Tk dlls +from their entire disk. See the Python FAQ for more. + +python-so-rarely-gets-blamed-for-a-python-problem<0.9-wink>-ly y'rs - tim + + + + + + diff --git a/demo/ermis-f/python_m/cur/1844 b/demo/ermis-f/python_m/cur/1844 new file mode 100644 index 00000000..b6a8b369 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1844 @@ -0,0 +1,35 @@ +From: aahz at netcom.com (Aahz Maruch) +Date: Fri, 14 May 1999 17:55:54 GMT +Subject: while (a=b()) ... +References: <01e701be9be9$15dad220$8d84b2d8@linwin.token.hapenney.com> <373B53E3.D43BA334@compaq.com> +Message-ID: +X-UID: 1844 + +In article <373B53E3.D43BA334 at compaq.com>, +Greg Ewing wrote: +> +> while: +> line = f.readline() +> gives line <> "": +> frobulate(line) + +What does this give you that + + for line in f.readline() + frobulate(line) + +does not? (Assuming the necessary semantic changes to permit this to +work *well*.) +-- + --- Aahz (@netcom.com) + +Hugs and backrubs -- I break Rule 6 <*> http://www.rahul.net/aahz/ +Androgynous poly kinky vanilla queer het + +'It's odd, and a little unsettling, to reflect upon the fact that English is +the only major language in which "I" is capitalized; in many other languages +"You" is capitalized and the "i" is lower case.' -- Sydney J. Harris + + + + diff --git a/demo/ermis-f/python_m/cur/1845 b/demo/ermis-f/python_m/cur/1845 new file mode 100644 index 00000000..25f6f3bc --- /dev/null +++ b/demo/ermis-f/python_m/cur/1845 @@ -0,0 +1,26 @@ +From: tim_one at email.msn.com (Tim Peters) +Date: Thu, 27 May 1999 22:16:36 -0400 +Subject: Recursion in Python grammar +In-Reply-To: +Message-ID: <000201bea8b0$1d525cc0$bd9e2299@tim> +X-UID: 1845 + +[G. David Kuhlman] +> ... +> By the way, anyone who would explain the differences between +> antlr's approach to generating parsers (antlr generates recursive +> descent parsers with look-ahead) and the Python parser approach ... +> would gain my thanks. + +Then thank Dick Grune and Ceriel J.H. Jacobs for making their excellent book +available on the web: + + http://www.cs.vu.nl/~dick/PTAPG.html + +big-topic-sidestepping-ly y'rs - tim + + + + + + diff --git a/demo/ermis-f/python_m/cur/1846 b/demo/ermis-f/python_m/cur/1846 new file mode 100644 index 00000000..7802137a --- /dev/null +++ b/demo/ermis-f/python_m/cur/1846 @@ -0,0 +1,47 @@ +From: kernr at mail.ncifcrf.gov (Robert Thomas Kern) +Date: Tue, 11 May 1999 00:38:22 GMT +Subject: Numeric.tostring() ? +References: <7h7k9h$dme@cocoa.brown.edu> +Message-ID: <37377a46.10698636@news.erols.com> +Content-Length: 1183 +X-UID: 1846 + +On Mon, 10 May 1999 17:50:28 -0400, "Tom Lukasiak" + wrote: + +>Hi, +> I have found that the best way (or maybe the only way) to read a binary +>image into an array is to do something like this: +> +>f = open(filename) +>data = f.read() +>f.close() +>dataArray = Numeric.fromstring(data, Numeric.Int16) +> +> +>However, I run into trouble when I want to convert a Numeric array into a +>data string, so that I could save my array as a binary image file. This is +>because there is no Numeric.tostring() method. What is the best way to fix +>this problem? + +tostring() is not a function in the Numeric module. Rather, it is a +method of NumPy arrays. Use dataArray.tostring(). + +>Thanks for any help. + +Any time. + +BTW, if you are reading from a file instead of from a PIL Image +instance, you can try Travis Oliphant's NumpyIO extension module. It +allows you to read a file straight into a NumPy array rather than +going through a string intermediate. Saves on memory. It is part of +his signaltools package although it can be compiled separately. +(http://oliphant.netpedia.net/packages/signaltools-0.5.tgz) A Linux +RPM is also available at the root page. + +>Tom + + + + + diff --git a/demo/ermis-f/python_m/cur/1847 b/demo/ermis-f/python_m/cur/1847 new file mode 100644 index 00000000..f4ac95f6 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1847 @@ -0,0 +1,96 @@ +From: asang at yahoo.com (Asang Dani) +Date: Mon, 24 May 1999 18:44:52 GMT +Subject: win32netapi module -version 1.0beta1 (on Windows NT4/5) +References: <7ibdu5$bhe$1@m2.c2.telstra-mm.net.au> +Message-ID: <7ic6n4$cjv$1@nnrp1.deja.com> +Content-Length: 2667 +X-UID: 1847 + +hi Mark, + + It really looks quite similar. I looked at your *win32net* module and +found that some of the interfaces are not present in your module, but +are part of *win32netapi* (my module). + +1. NetLocalGroupDelMembers +2. NetWkstaUserEnum +3. NetWkstaGetInfo +4. NetWkstaSetInfo +5. NetWkstaTRansportAdd +6. NetWkstaTransportEnum +7. NetServerDiskEnum +8. NetGroupAddMembers +9. NetGroupDelMembers +10. NetShareCheck +11. NetUseAdd +12. NetUseDel +13. NetUseEnum +14. NetUseGetInfo + +The only API that is present in *win32net* but not present in my +module - + + NetMessageBufferSend. + +Please correct me if I am wrong about these differences. About the +info. level param, I think that the info. level numbers in most of +these APIs are really crazy in base APIs. (101, 102, 1024, 512 ...). So +I return dictionaries with keys for maximum possible info level +(constranied by the privileges of user executing the API), in most of +the cases. It's upto the user to choose which key/values he is +interested in. I think it is better to free the programmer from the +burden of remembering which fielss are present in which info. level +and refer constantly to MSDN to find this info. + +regards, +asang.. + + +In article <7ibdu5$bhe$1 at m2.c2.telstra-mm.net.au>, + "Mark Hammond" wrote: +> I hate to tell you this, but the Win32 Extensions build 125 and later +> includes an almost identical interface to this in the win32net module; +> indeed win32net is arguably better as it allows arbitary "information +> levels", whereas yours only supports single info levels per data +structure. +> +> The interface is almost identical - except win32net functions take an +extra +> integer param which indicates the information level requested/being +set... +> +> Mark. +> +> Asang Dani wrote in message ... +> >hi, +> > I have written a module win32netapi to provide simplified access +to +> >various networking APIs (Net* functions) on windows NT. The module +can +> >be downloaded from +> > +> > http://members.tripod.com/asangdani/public/ +> > +> >It includes extensive documentation (html and ASCII) and examples. +> > +> >Following are the contents of README included with the release :- +> > +> > This python module is inspired by 'Win32::Lanman' module for +Perl +> >written by Jens Helberg (jens.helberg at bosch.com). I have made no +changes +> >to the basic interface. It's a port from perl XS to python +extensions. I +> >have also used SWIG (Simple Wrapper Interface Generator) to simplify +> >some of the type mappings. SWIG can be freely downloaded from +> >(http://www.swig.org). +> +> + + +--== Sent via Deja.com http://www.deja.com/ ==-- +---Share what you know. Learn what you don't.--- + + + + diff --git a/demo/ermis-f/python_m/cur/1848 b/demo/ermis-f/python_m/cur/1848 new file mode 100644 index 00000000..d06c0ecb --- /dev/null +++ b/demo/ermis-f/python_m/cur/1848 @@ -0,0 +1,54 @@ +From: bend at realeducation.com (Benjamin Derstine) +Date: Thu, 20 May 1999 08:48:59 -0600 +Subject: pickle and module package +References: +Message-ID: <7i174k$75c$1@ash.prod.itd.earthlink.net> +Content-Length: 1546 +X-UID: 1848 + +Jeffrey Kunce wrote in message ... +Python is very flexible about importing modules from +different locations. For example: + + try: from MyPackage.MySubPackage import MyModule + except ImportError: import MyModule + MyInstance = MyModule.MyClass() + ... + +will first try to import MyModule from a specific package. If +that fails, python will attempt to import MyModule from anywhere +on thes pythonpath. Regardless of where MyModule comes +from, MyInstance will behave the same for any following code. + +*Except* for the pickle module. pickle (and cPickle) store each +class instance with the full package-class-name. As far as pickle is +concerned: + MyPackage.MySubPackage.MyModule.MyClass +and + MyModule.MyClass +are completely different animals. When you unpickle +these instances, you are required to have imported the +modules from the same location as when you pickled them. + +Is this a problem for anyone besides me? Does anyone have +an easy workaround? Thanks. + + --Jeff + +I've been running into this problem while using Zope. I wanted to run +Python code through Zope that unpickled some classes. For the sake of Zope +the modules have to be contained in packages. When I would run the code +from the Python interpreter without the packaged version of the code it +worked fine. Then when I would try to run it from Zope everything worked +fine until it got to my unpickle statement. I had no idea what was going on +until I saw your post. I have no idea how to get around this except to +pickle and unpickle in the same place. + +Ben + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1849 b/demo/ermis-f/python_m/cur/1849 new file mode 100644 index 00000000..b5671b29 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1849 @@ -0,0 +1,104 @@ +From: earlybird at mop.no (Alexander Staubo) +Date: Tue, 25 May 1999 06:24:46 +0200 +Subject: Defining VCL-like framework for Python +References: <37437C55.3E49@cosc.canterbury.ac.nz> <7i4bnp$kh0$1@cronkite.cc.uga.edu> <7i9nq5$a9m$2@cronkite.cc.uga.edu> +Message-ID: +Content-Length: 4634 +X-UID: 1849 + +In article <7i9nq5$a9m$2 at cronkite.cc.uga.edu>, graham at sloth.math.uga.edu +says... +> Alexander Staubo (nospam-alex at mop.no) wrote: +> : For example, JavaBeans gives you nonvisual JDBC beans for +> : feeding data to a set of "database-aware" controls. Since a database is a +> : high-level, non-visual construct, you can't put it on the screen, but you +> : can interact with it through a standard set of properties (eg., +> : "TableName"), methods ("Open") and events ("OnChange"). +> +> So I must be missing something. How does defining all these components +> differ from defining implementations of interfaces (the interfaces tell +> you the standard properties). + +In Python, the distinction between class instances and a +"component" fortunately is much less present than in Delphi, which uses +ObjectPascal. + +The core of Delphi's component architecture is its RTTI [Run-Time Type +Information] support, which consists partly of an API for extracting type +info from classes, types, etc. There is a class-level counterpart to this +API, which lets you obtain the identity of a class, its name, etc. This +architecture is arguably not ideally elegant, but it works surprisingly +well. It permits you, for example, to enumerate the properties of a +class, or get a string representing the name of an enumerated type. + +How is this stuff used in practice? When you define a component, you +typically designate a set of properties (attributes) as being +"published". This tells Delphi a few things, such as that the properties +should be visible for editing, and that the properties such be +persistent. Whenever Delphi streams you component, it stores the +properties well. (There's a storage modifier for disabling this.) + +Properties need not be just simply data members, like C++: Delphi +supports accessor methods tied to properties, so "o.Width = 1" might +translate to a call to "o.SetWidth(1)". + +Oh, and events are also properties. This part of Delphi is admittedly +somewhat simplistic, and compared to the JavaBeans event system +(for example) (which Borland actually designed), actually a tad +primitive. But again, it works surprisingly well. Components typically +export function pointer properties. At design time, Delphi shows these +properties in a separate list and permits you to assign code snippets to +them, implicitly associating the code snippet (function) as a pointer to +the property. + +The "magic" of Delphi is perhaps in the persistence mechanism. Whenever +you a design a form, the form and its components are stored in a +separate, proprietary-formatted binary file. This process is almost +identical to Python's pickling except Delphi does it "the hard way", by +using the RTTI APIs to discover properties, and then store them. Classes +can overload the I/O functions for properties that require special +handling. + +I'm puzzled by what you mean by... + +> defining implementations of interfaces (the interfaces tell you the +> standard properties). + +...though. Interface as in a Python class decl? + +One reason I believe we need an additional layer or two of abstraction -- +what I'm proposing as the "VCL-like framework" -- is that you would never +ever want to stream _all_ attributes when streaming a "component" +(whatever it is, and however it is implemented); only a well-defined +subset. + +A second reason is that I'd like to use acquisition as the inheritance +model for properties. Not something that you'd easily graft onto +toolkits like wxPython or tkinter, afaik. + +A third reason is that in order to wrap a nice, warm development +environment around the whole thing, a protocol needs to exist for +importing controls and component-like thingies into the system. They need +to follow a specific protocol designed for this purpose, and none of the +GUI toolkits have that. + +There are other reasons, too. I'm considering delineating them formally +in a proposal document rather than throwing around loosely connected +thoughts here. Those that know Delphi seem to have grasped the idea +pretty quickly, though. :-) + +As to what is a framework, various people have explained this concept +pretty well. I'm not sure that the distinction is significant; I for one +would not like a totalitarian framework that imposes a completely new +application model -- I believe we can avoid that, just as the VCL avoids +it [pretty well]. + +-- +Alexander Staubo http://www.mop.no/~alex/ +"Give me an underground laboratory, half a dozen atom smashers and a beautiful +girl in a diaphanous veil waiting to be turned into a chimpanzee, and I care +not who writes the nation's laws." --S. J. Perelman + + + + diff --git a/demo/ermis-f/python_m/cur/1850 b/demo/ermis-f/python_m/cur/1850 new file mode 100644 index 00000000..88d00d6c --- /dev/null +++ b/demo/ermis-f/python_m/cur/1850 @@ -0,0 +1,23 @@ +From: thecrow at cyberdude.com (bryce) +Date: Thu, 06 May 1999 00:05:22 GMT +Subject: reading PDF using Python [Q] +References: <000901be9661$02989220$6eba0ac8@kuarajy.infosys.com.ar> +Message-ID: <3730dc0f.834996@news.prodigy.net> +X-UID: 1850 + +This site has a C PDF lib. + +http://www.ifconnection.de/~tm/ + + +>Hi! +> +> I need to read some PDF files and look through them for some keywords I +>have in a list. Is there a python module to read inside a PDF file? If there +>isn't one, is there one in C that you may be aware of? +> + + + + + diff --git a/demo/ermis-f/python_m/cur/1851 b/demo/ermis-f/python_m/cur/1851 new file mode 100644 index 00000000..dd92c66f --- /dev/null +++ b/demo/ermis-f/python_m/cur/1851 @@ -0,0 +1,36 @@ +From: andrew at andrewcooke.free-online.co.uk (Andrew Cooke) +Date: Mon, 31 May 1999 10:24:03 GMT +Subject: proposal: new mailing list +References: <37519172.55C86D95@acm.org> +Message-ID: <7ito03$892$1@nnrp1.deja.com> +Content-Length: 1053 +X-UID: 1851 + +On the Python web site, in the docs section, in Guido's essays, there is +a grant proposal that you might find interesting reading. I read it +yesterday and it sets the background for Idle (I presume - the name of +the environment isn't mentioned) as an environment intended for +teaching. It also has a long discussion of teaching languages and +Python - I don't know to what extent it is grant babble and to what +extent it reflects the driving forces behind Python, but it made some +things clear to me. I don't have the exact URL, but I hope you'll be +able to fid it easily from the description above. + +Andrew + + +In article <37519172.55C86D95 at acm.org>, + "Max M. Stalnaker" wrote: +> I have taught some programming classes. It seems to me python is a +good +> choice for an introductory CS class since it has minimal key words, a +> clean syntax, and lots of CS structures available. It also has good +> object orientation.. No texts, though. + + +Sent via Deja.com http://www.deja.com/ +Share what you know. Learn what you don't. + + + + diff --git a/demo/ermis-f/python_m/cur/1852 b/demo/ermis-f/python_m/cur/1852 new file mode 100644 index 00000000..b7e6cab1 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1852 @@ -0,0 +1,47 @@ +From: cgw at fnal.gov (Charles G Waldman) +Date: Tue, 11 May 1999 15:35:14 GMT +Subject: Python T-shirt [OFFTOPIC] +In-Reply-To: <37383E31.17FA064C@callware.com> +References: + <000801be9b19$e471bf20$6eba0ac8@kuarajy.infosys.com.ar> + <7h88vp$baj$1@emu.cs.rmit.edu.au> + <37383E31.17FA064C@callware.com> +Message-ID: <14136.20018.932693.362303@buffalo.fnal.gov> +Content-Length: 1152 +X-UID: 1852 + +Ivan Van Laningham writes: + > + > I'd like to correct a small error perpetrated by the movie. The + > bunny that lops off arms etc. is at one point described as a + > ``rodent.'' In point of fact, rabbits are lagomorphs, _not_ + > rodents. + +This mailing list is so educational, I learn something here every day, +and often it has nothing to do with computers. Your posting sent me +off to my Webster's to look up "lagomorph" and "rodent" to see what +the difference is. Here's the Webster's entry for "rodent": + + + Main Entry: ro?dent + Function: noun + Etymology: ultimately from Latin rodent-, rodens, present participle + of rodere to gnaw; akin to Latin radere to scrape, scratch, Sanskrit + radati he gnaws + Date: 1859 + 1 : any of an order (Rodentia) of relatively small gnawing mammals + (as a mouse, a squirrel, or a beaver) that have in both jaws a single + pair of incisors with a chisel-shaped edge + 2 : a small mammal (as a rabbit or a shrew) other than a true rodent + + +So at least according to Webster's sense 2, it's legitimate to call a +rabbit a rodent, even though it's not a "true" rodent. Gnaw on that! + +didactically yours, + cgw + + + + + diff --git a/demo/ermis-f/python_m/cur/1853 b/demo/ermis-f/python_m/cur/1853 new file mode 100644 index 00000000..acc553be --- /dev/null +++ b/demo/ermis-f/python_m/cur/1853 @@ -0,0 +1,42 @@ +From: aahz at netcom.com (Aahz Maruch) +Date: Sat, 15 May 1999 15:48:46 GMT +Subject: Python mailing list vs. References: (was Re: My quarterly question on Design by Contract in Python...) +References: <000301be9ea7$a798f960$159e2299@tim> +Message-ID: +Content-Length: 1300 +X-UID: 1853 + +In article <000301be9ea7$a798f960$159e2299 at tim>, +Tim Peters wrote: +> +>I believe Aahz is suggesting: +> +>1. Never change a References header if there is one. +>2, Never change a In-Reply-To header if there is one. +>3. Never create a In-Reply-To header if there isn't one. +>4. If there isn't a References header, but there is a In-Reply-To that +> appears to hold a sensible msg ID, then-- and only then --synthesize +> a References header from that. + +5. Only do this from mail to news, not the other direction. + +(I think it was Lars who pointed out that RFC-822 specifically allows +both References and In-Reply-To, but I did some more digging and +verified that RFC-1036 permits only References; this to me implies that +unidirectional munging is acceptable and appropriate.) + +((As Barry requested, I have moved the main line of discussion to the +mailman-developers list.)) +-- + --- Aahz (@netcom.com) + +Hugs and backrubs -- I break Rule 6 <*> http://www.rahul.net/aahz/ +Androgynous poly kinky vanilla queer het + +'It's odd, and a little unsettling, to reflect upon the fact that English is +the only major language in which "I" is capitalized; in many other languages +"You" is capitalized and the "i" is lower case.' -- Sydney J. Harris + + + + diff --git a/demo/ermis-f/python_m/cur/1854 b/demo/ermis-f/python_m/cur/1854 new file mode 100644 index 00000000..b53993ab --- /dev/null +++ b/demo/ermis-f/python_m/cur/1854 @@ -0,0 +1,34 @@ +From: robin at alldunn.com (Robin Dunn) +Date: Tue, 25 May 1999 09:21:24 -0700 +Subject: wxpython +References: +Message-ID: +X-UID: 1854 + +Jeffrey Kunce wrote in message ... +>May I add to vlachidis costas' list of wxPython questions? +> +>7. Is it possible to print from wxPython? There is definitely some +>support for printing there, but I'm not clear on how to use it. +>Any examples or demos? + +I am working on the wrapping wxWindows' Printing Framework classes right +now, so it will be available in the next release, along with a demo. The +classes there already are simply the Common Dialogs and such related to +printing, and a Printer DC. You could probably make it work with those +classes, but I don't think I would want to. + +-- +Robin Dunn +robin at AllDunn.com +http://AllDunn.com/robin/ +http://AllDunn.com/wxPython/ Check it out! +Try http://AllDunn.com/laughworks/ for a good laugh. + + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1855 b/demo/ermis-f/python_m/cur/1855 new file mode 100644 index 00000000..10b344f0 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1855 @@ -0,0 +1,62 @@ +From: gherman at my-dejanews.com (Dinu C. Gherman) +Date: Wed, 12 May 1999 12:41:06 GMT +Subject: reading PDF using Python [Q] +References: <000901be9661$02989220$6eba0ac8@kuarajy.infosys.com.ar> <3736A340.A056EA0C@ibm.net> +Message-ID: <7hbst2$ut1$1@nnrp1.deja.com> +Content-Length: 1507 +X-UID: 1855 + +In article <3736A340.A056EA0C at ibm.net>, + l.szyster at ibm.net wrote: +> This is a multi-part message in MIME format. +> --------------33948AEAB9B83FECD4C036D1 +> Content-Type: text/plain; charset=us-ascii +> Content-Transfer-Encoding: 7bit +> +> Nick Moon wrote: +> > +> > If it weren't for the encryption and compression options you could +> > simply work on the files directly. +> +> Do you know more about PDF encryption and compression? + +You may want to check the following paper below, also +discussing PDF, if only briefly and basically about +image compression. I'd assume, though, that algorithms +like LZW are also used for textual compression. + +Regards, + +Dinu + + + +Information Architecture White Paper +IA-6801: Electronic Image Formats and +Compression Algorithms + +http://www.lanl.gov/projects/ia/stds/ia680120.html + +Abstract + +This white paper discusses relative strengths and weaknesses +of image formats and corresponding compression algorithms +well suited to the sharing of simple graphical images across +multiple platforms. It does not address formats for specialized +applications such as GIS, CAD, three-dimensional modeling, +scientific visualization, atmospheric/environmental modeling, +or tools used to create/process graphics primarily intended +for printing. + +The specific formats discussed are TIFF, JPEG/JFIF, GIF, PNG, +and PDF; the compression algorithms are CCITT 3 and 4, JPEG, +LZW, and PNG 0. + + + +--== Sent via Deja.com http://www.deja.com/ ==-- +---Share what you know. Learn what you don't.--- + + + + diff --git a/demo/ermis-f/python_m/cur/1856 b/demo/ermis-f/python_m/cur/1856 new file mode 100644 index 00000000..7a595113 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1856 @@ -0,0 +1,51 @@ +From: wtanksle at dolphin.openprojects.net (William Tanksley) +Date: Sun, 30 May 1999 03:34:46 GMT +Subject: Any advice for a beginner? +References: <3750869a.0@ecn.ab.ca> <877lprbacm.fsf@mail.utexas.edu> +Message-ID: +Content-Length: 1571 +X-UID: 1856 + +On 29 May 1999 20:43:53 -0500, Preston Landers wrote: +>"Simon Speichert" writes: + +>> My point is this; it's a *huge* language, and I have no idea where to start. +>> I'm past "Hello, world!" and I don't know where to go next. Any advice would +>> be much appreciated. + +>Well, I guess it all depends on what you want to do! :-) + +Also, how far past "hello, world" are you? The language itself isn't +huge, but the libraries available are truly gargantuan, and growing every +day. If you want to learn all of them, just give up now ;-). + +OTOH, if you're just trying to learn the language itself, the end is in +sight. + +>Seriously, my advice to you is to identify some kind of project or +>goal and work towards it and learn Python along the way. + +Agreed. That way you'll not bore yourself with libraries which do things +you don't need. + +>I can't really give you any suggestions for what to work on; that +>entirely depends on your temperment and desires. Is there any kind of +>system administration problem you would like solved? Recently I +>decided there wasn't a good facility for searching Debian's (Linux) +>availible package archives, so I wrote one. (It's actually decently +>implemented. I use it myself all the time but I haven't released it +>yet mainly because no one seems to have any interest. [hint hint]) + +A Debian search? That's really cool! I get annoyed only being able to +search through the names in dselect. + +>---Preston + +-- +-William "Billy" Tanksley +"But you shall not escape my iambics." + -- Gaius Valerius Catullus + + + + diff --git a/demo/ermis-f/python_m/cur/1857 b/demo/ermis-f/python_m/cur/1857 new file mode 100644 index 00000000..9dc05762 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1857 @@ -0,0 +1,44 @@ +From: mss at kepler.de (Michael S. Schliephake) +Date: Wed, 26 May 1999 22:11:20 +0200 +Subject: Tcl/Tk clipboard under Windows +References: +Message-ID: <374C5568.A38DA335@kepler.de> +Content-Length: 1207 +X-UID: 1857 + +David Ascher wrote: +> +> On Wed, 26 May 1999, Michael S. Schliephake wrote: +> +> > Has anyone remarked the following problem and possibly a solution? +> > +> > (Win-NT 4, W98 - Python 1.5.2, Tk 8.05) +> > If you copy some text from a Tkinter-prog to the clipboard and the +> > program is finished immediately, one cannot paste the clipboard content +> > into another programm. If you paste before finishing the Python-program, +> > the clipboard content is how intended and remains there. +> > +> > ... +> +> ... is this what you're doing? +> +> Tkinter._default_root.clipboard_clear() +> Tkinter._default_root.clipboard_append(errmsg) +> +> --david ascher + +Yes, except that I did not use the default_root until now. I just +repeated it with a small script, which I append here. The problem is +"persistent", if you exit before pasting into another program, I cannot +find usable data in the clipboard. + +Michael Schliephake +-------------- next part -------------- +A non-text attachment was scrubbed... +Name: clipboard.pyw +Type: application/x-unknown-content-type-python.noconfile +Size: 445 bytes +Desc: not available +URL: + + diff --git a/demo/ermis-f/python_m/cur/1858 b/demo/ermis-f/python_m/cur/1858 new file mode 100644 index 00000000..8641467d --- /dev/null +++ b/demo/ermis-f/python_m/cur/1858 @@ -0,0 +1,28 @@ +From: jbauer at rubic.com (Jeff Bauer) +Date: Sun, 23 May 1999 14:37:31 GMT +Subject: pointers to compiling 1.5.2. on SunOS 5.7 +References: <7i8f2l$3nr$1@ucsnew1.ncl.ac.uk> +Message-ID: <374812AB.D4A46B6B@rubic.com> +X-UID: 1858 + +Tony McDonald wrote: +> Can anyone point me to resources that detail how to compile 1.5.2 for SunOS +> 5.7? (or indeed any site that details peoples' problems with making the +> software?). I'm having a terrible time trying to get 1.5.2 built correctly +> (my problem appears to be shared modules). + +Have your tried this link yet? + + http://www.sunfreeware.com/ + +It has the latest compiled versions of gcc, make, and +the python 1.5.1 binary for Solaris 7. + +still-using-sunos5.6-here-ly yr's + +Jeff Bauer +Rubicon, Inc. + + + + diff --git a/demo/ermis-f/python_m/cur/1859 b/demo/ermis-f/python_m/cur/1859 new file mode 100644 index 00000000..b4313c29 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1859 @@ -0,0 +1,33 @@ +From: fdrake at cnri.reston.va.us (Fred L. Drake) +Date: Mon, 3 May 1999 18:38:08 GMT +Subject: Extension Doc bug +In-Reply-To: +References: + <14120.52559.376120.364972@weyr.cnri.reston.va.us> + +Message-ID: <14125.60688.169996.626573@weyr.cnri.reston.va.us> +X-UID: 1859 + +Michael P. Reilly writes: + > Nothing is mentioned about the kwdict parameter being NULL, and that is + > a documentation error (and the jist of my posting). + + I must have misunderstood your original post; I thought you meant +that passing NULL instead of a keywords dictionary caused a core +dump. (Or did I get that part right?) + If passing a NULL for the keyword dict caused a core dump, there's +definately space for a check to be made in the runtime. + I will make the possibility of NULL for the keywords dictionary +clear in the documentation after I've had a chance to verify the +intent with Guido; maybe he'd expect a core dump even if I don't. ;-) + + + -Fred + +-- +Fred L. Drake, Jr. +Corporation for National Research Initiatives + + + + diff --git a/demo/ermis-f/python_m/cur/1860 b/demo/ermis-f/python_m/cur/1860 new file mode 100644 index 00000000..4c5ce8c6 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1860 @@ -0,0 +1,44 @@ +From: gmcm at hypernet.com (Gordon McMillan) +Date: Tue, 18 May 1999 09:48:14 -0500 +Subject: Bug? On WindowsNT, f.seek() and f.tell() aren't symmetric +In-Reply-To: <7hrhns$7o4@senator-bedfellow.MIT.EDU> +Message-ID: <1285083374-170414649@hypernet.com> +Content-Length: 1505 +X-UID: 1860 + +Oliver Steele writes: + +> My reading of the Python Library documentation +> is that, +> regardless of file modes, f.seek(f.tell()) should be a noop +> (assuming f is bound to an open file): +/snip/ +> Not so. On a Windows machine (specifically, an SGI running WindowsNT +> and Python 1.5.2 final), the function below prints 'a\012' for the +> first line and '\012' for the second. Changing the file open mode +> to 'rb' or running the program on a Mac or UNIX machine works fine. +/snip/ +> The upshot of this is that it's possible to develop a Python program +> under MacOS or UNIX, using the documentation available on those +> platforms, that fails under NT -- in other words, it demotes Python +> to the status of a 'write once test everywhere language'. + +I'm sorry that you got the impression that Python promises WORE. In +general, Python is ever-so-slightly more portable than the underlying +c runtime libs are conformant. WIth the low-level routines, you +generally get your c runtime lib's behavior, warts and all. It's true +that only a subset of the gotchas are documented, but that's a never +ending task. + +Someplace (probably the MSVC docs) I've seen the warning that seek +and tell are may be less-than-useful on a file opened in text mode. + +Languages which promise WORE are no more successful overall. And +Python has the advantage that it's easy to work around the problem, +while in that other language it's damn near impossible. + +- Gordon + + + + diff --git a/demo/ermis-f/python_m/cur/1861 b/demo/ermis-f/python_m/cur/1861 new file mode 100644 index 00000000..0585339d --- /dev/null +++ b/demo/ermis-f/python_m/cur/1861 @@ -0,0 +1,24 @@ +From: davecook at home.com (David M. Cook) +Date: Fri, 21 May 1999 05:38:54 GMT +Subject: anydbm on RH6 +Message-ID: +X-UID: 1861 + +I'm getting the following error when trying to use anydbm on a RedHat 6 +system. Is anyone else having the same problem? + +>>> import anydbm +>>> file = anydbm.open("foo") +Traceback (innermost last): + File "", line 1, in ? + File "/usr/lib/python1.5/anydbm.py", line 54, in open + return _mod.open(file, flag, mode) + File "/usr/lib/python1.5/dbhash.py", line 8, in open + return bsddb.hashopen(file, flag, mode) +bsddb.error: (2, 'No such file or directory') + +Dave Cook + + + + diff --git a/demo/ermis-f/python_m/cur/1862 b/demo/ermis-f/python_m/cur/1862 new file mode 100644 index 00000000..fbb7efc7 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1862 @@ -0,0 +1,58 @@ +From: kiffney at my-dejanews.com (Gustin Kiffney) +Date: Wed, 19 May 1999 14:13:16 GMT +Subject: Python vs. VB +References: <37407bc5.343558265@news.esinet.net> +Message-ID: <7hugtp$2e6$1@nnrp1.deja.com> +Content-Length: 1761 +X-UID: 1862 + +As far as 'talking points' on how Python and COM work +together, you could look at + +http://www.python.org/windows/win32com/COMTutorial/index.htm + +which Mark Hammond and Greg Stein put together. + +My suggestion is to just redo something you already have +with Python and COM and show them the clean, slick, +readable code. + +Then point out how many things you could do in VB3 won't +work in VB5, and VB5 things won't work in VB6. + +Then you could show them the bald spot on my head where +I tore out all the hair trying to get something simple +to work between VB and Access, to the point of rewriting +hundreds of lines of code, then giving up, then finding +a bug report posted (dated after I'd figuratively jumped out +the window) that said yes, it's a bug, no, they're not +going to fix it, upgrade to VBx+1. + +Then note that when you have a problem with how Python +works, or aren't sure what's happening behind the scenes, +*you*CAN*LOOK*AT*THE*PYTHON*SOURCE. I'm telling you, when +all else fails, and that last 10% or 1% isn't working, +the source will save you. + + roystephan at yahoo.com (Roy Stephan) wrote: +> My company is mostly a VB shop. Web Development has gotten away with +> Perl in a corner but we are now being urged to move to ASP. I am +> pushing for PerlScript interfacing heavily with COM. +> +> I would like the COM objects to be implimented in Python rather than +> VB. +> +> I was wondering if people on this list could provide me with some +> amunition against the managment onslaught that will surely ensue in +> favour of all things Microsoft. +> +> Are there any existing comparisons/benchmarks? Is there anyone out +> there who has won a similar battle? + + +--== Sent via Deja.com http://www.deja.com/ ==-- +---Share what you know. Learn what you don't.--- + + + + diff --git a/demo/ermis-f/python_m/cur/1863 b/demo/ermis-f/python_m/cur/1863 new file mode 100644 index 00000000..4f4a9d21 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1863 @@ -0,0 +1,48 @@ +From: pointal at lure.u-psud.fr (Laurent POINTAL) +Date: Tue, 04 May 1999 14:53:44 GMT +Subject: Productivity and the two language approach +References: <7g94lp$mdu$1@news.worldonline.nl> <925677195.13550.0.rover.c3ade4b2@news.demon.nl> <925758153.6563.0.muttley.c3ade4b2@news.demon.nl> +Message-ID: <372f09cb.373170911@news.u-psud.fr> +Content-Length: 1060 +X-UID: 1863 + +Continue with C++, learn Python (its really easy), then look at CORBA +and link C++ to Python with it (see fnorb as Python ORB, and look at +www.omg.org for free C++ ORBs - I use omniORB2 but there are many +other ORBs). + +With that, you can define your work with IDL, start prototyping with +Python, translate what is needed to C++... and call all that from any +other langage and from any other computer. + +Its the way I go. + +A+ + +Laurent. + + +On Tue, 4 May 1999 22:27:25 +0930, "Tim Auld" + wrote: + +... +>: I'll put it into perspective :) +>: +>: The C/C++ option: +>: ------------------------- +... +>: The Python option: +>: -------------------------- +... +>: Besides, productivity doesn't really matter when it's a casual project, but +>: enjoyment does (IMHO). I'd rather get straight to the fun part than enduring +>: the frustration of learning another environment. + +--- +Laurent POINTAL - CNRS/LURE - Service Informatique Experiences +Tel/fax: 01 64 46 82 80 / 01 64 46 41 48 +email : pointal at lure.u-psud.fr ou lpointal at planete.net + + + + diff --git a/demo/ermis-f/python_m/cur/1864 b/demo/ermis-f/python_m/cur/1864 new file mode 100644 index 00000000..7bdbca4a --- /dev/null +++ b/demo/ermis-f/python_m/cur/1864 @@ -0,0 +1,31 @@ +From: akuchlin at cnri.reston.va.us (Andrew M. Kuchling) +Date: Tue, 18 May 1999 09:37:32 -0400 (EDT) +Subject: Gettin regular Python and JPython to communicate interproces +In-Reply-To: <37416661.91D1DBBD@horvath.com> +References: <1285126785-167803504@hypernet.com> + <37416661.91D1DBBD@horvath.com> +Message-ID: <14145.27330.923118.459205@amarok.cnri.reston.va.us> +X-UID: 1864 + +Bob Horvath writes: +>interested in that Swing then becomes an option. If I can learn only one +>GUI, then Swing would probably be of more use to me, as then I could +>leverage that knowledge when writing Java, or even if I wanted to do some +>JPython applets. + + Note that no browsers currently come with Swing, so writing +applets using Swing is impractical, unless you have the user add +swing.jar to the jar files for their browser or download the 1.4Mb of +Swing code when running the applet. It's highly aggravating, because +Swing is much more flexible than AWT, but AWT is really your only +choice when writing applets. + +-- +A.M. Kuchling http://starship.python.net/crew/amk/ +_Prospero's Books_ is the _Terminator 2_ for intellectuals. + -- Peter Greenaway + + + + + diff --git a/demo/ermis-f/python_m/cur/1865 b/demo/ermis-f/python_m/cur/1865 new file mode 100644 index 00000000..a29caec4 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1865 @@ -0,0 +1,38 @@ +From: aa8vb at yahoo.com (Randall Hopper) +Date: Wed, 26 May 1999 14:01:37 -0400 +Subject: .pyo's without .pyc's? +Message-ID: <19990526140137.A66609@vislab.epa.gov> +X-UID: 1865 + +I'm trying to cook a minimalist Python install, and I find that python -O +won't run without .pyc's in-place, even when there are pyo's. + +I thought pyc's were the straight-compiled version, pyo's were the +optimized version, and they were independent. Is this correct? + +To be specific: + + Python-1.5.2 > ff 'os.*' + ./lib/python1.5/os.pyo + ./lib/python1.5/os.pyc + + Python-1.5.2 > python + Python 1.5.2 (#2, May 26 1999, 12:25:54) [C] on irix646-n32 + Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam + >>> ^D + + Python-1.5.2 > find . -name '*.pyc' | xargs rm + + Python-1.5.2 > python -O + 'import exceptions' failed; use -v for traceback + Warning! Falling back to string-based exceptions + +Trying to run a python script with -O fails on other modules (os for example). + +-- +Randall Hopper +aa8vb at yahoo.com + + + + diff --git a/demo/ermis-f/python_m/cur/1866 b/demo/ermis-f/python_m/cur/1866 new file mode 100644 index 00000000..169357dd --- /dev/null +++ b/demo/ermis-f/python_m/cur/1866 @@ -0,0 +1,15 @@ +From: alex_c at puffin.lcs.mit.edu (Alex S Coventry) +Date: 11 May 1999 21:48:01 -0400 +Subject: Wrapping C++ code for python. -- Still not quite solved +References: +Message-ID: +X-UID: 1866 + +Ah, well I upgraded to egcs-2.91.57, but I'm still getting the same +error... + +Alex. + + + + diff --git a/demo/ermis-f/python_m/cur/1867 b/demo/ermis-f/python_m/cur/1867 new file mode 100644 index 00000000..ab6ab8c4 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1867 @@ -0,0 +1,36 @@ +From: trashcan at david-steuber.com (David Steuber) +Date: 30 Apr 1999 18:27:48 -0400 +Subject: running application config files written in Python +References: +Message-ID: +Content-Length: 1031 +X-UID: 1867 + +Bjoern Giesler writes: + +-> PS David: a) Faking headers is Not A Good Thing. b) 12 lines of signature +-> (even more in your previous mails) are Not A Good Thing Either. + +a) Which headers are you referring too? The return address I am +using is valid. However, I get so much spam that I rarely check it +any more. I basicly expect replys to go the the news groups so that +everyone may benifit if by some miracle I ask a good question. + +b) I still have some wrinkles to work out with my signature. I have +a fixed portion of text followed by the output of the fortune +program. I can shorten the fixed portion easily enough. However, I +don't know how to make fortune grab only short quotes. It is pot luck +whether it is one line or ten. + +In the interim, I'll knock out four lines. + +-- +David Steuber | s/trashcan/david/ if you wish to reply by mail + + Overheard in a bar: +Man: "Hey, Baby, I'd sure like to get in your pants!" +Woman: "No, thanks, I've already got one ass-hole in there now." + + + + diff --git a/demo/ermis-f/python_m/cur/1868 b/demo/ermis-f/python_m/cur/1868 new file mode 100644 index 00000000..ab8eacd6 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1868 @@ -0,0 +1,49 @@ +From: jam at newimage.com (jam) +Date: Sat, 15 May 1999 10:56:50 -0400 +Subject: help - ftplib +In-Reply-To: <7hju1e$2bs$1@nnrp1.deja.com>; from gony@my-dejanews.com on Sat, May 15, 1999 at 01:49:34PM +0000 +References: <7hju1e$2bs$1@nnrp1.deja.com> +Message-ID: <19990515105650.B2435@toast.internal> +Content-Length: 1208 +X-UID: 1868 + +On Sat, May 15, 1999 at 01:49:34PM +0000, gony at my-dejanews.com wrote: +> +> transfering files???? +> +> all i can find in the documentation is stuff about binary transfers +> which doesn't mean a hell of alot to me. +> +> I need to be able to use the ftp module to transfer a specifed file from +> my comp to the server and also retrieve files from the server. +> +> any help anyone could give me would be most appreciated +> + +greetings, + +the documentation is referring to 'binary file transfers' to differentiate +them from 'ascii file transfers'. + +you can do a 'binary' file transfer of any type of file-- the 'binary' means +that it saves the file unchanged (without the 8th bit stripped), this means +you can transfer *anything* (pdf, html, text, windows binaries, linux +binaries, zip files, tar files, etc etc). have a look at the docs, and try +it out.. substitute your own URL in the examples, and see if you can make +it work. + +if you post code, this newsgroup is *great* for getting help from the +community. + +give it a shot. ;) + +regards, +J +-- +|| visit gfd +|| psa member #293 +|| New Image Systems & Services, Inc. + + + + diff --git a/demo/ermis-f/python_m/cur/1869 b/demo/ermis-f/python_m/cur/1869 new file mode 100644 index 00000000..adc3594a --- /dev/null +++ b/demo/ermis-f/python_m/cur/1869 @@ -0,0 +1,27 @@ +From: Robert.Meegan at wcom.com (Robert Meegan) +Date: Wed, 12 May 1999 12:24:42 GMT +Subject: Python T-shirt +In-Reply-To: <7h9gvt$bvc$1@news.wrc.xerox.com> +References: <7h9gvt$bvc$1@news.wrc.xerox.com> +Message-ID: +X-UID: 1869 + +On Tue, 11 May 1999, Mark Jackson wrote: + +> +> Forget the bunny. Visualize the impressive sorcerer, levitating +> (with evident ease) the 16-ton weight. . . +> + +Not just a 16-ton weight. It's a 16-ton *object*! + + +-------------------------------- +Robert Meegan +MCIWorldCom - Cedar Rapids, Iowa +319.375.2416 + + + + + diff --git a/demo/ermis-f/python_m/cur/1870 b/demo/ermis-f/python_m/cur/1870 new file mode 100644 index 00000000..a23beb69 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1870 @@ -0,0 +1,20 @@ +From: NOSPAMbruce_wheeler at hp.com.NOSPAM (Bruce Wheeler) +Date: Fri, 14 May 1999 13:13:55 -0700 +Subject: Whence went the dlls? +References: <7hhl78$122a$1@rtpnews.raleigh.ibm.com> +Message-ID: <373C8403.F0011CE0@hp.com.NOSPAM> +X-UID: 1870 + +Jr. King wrote: +> +> I just download 1.5.2 for Windows. I am trying to embed python in a simple +> app. It compiles good, but when I try to run it I get some stuff about a +> missing dll. python15_d.dll is the one it is looking for where can I get +> it? + +Your app was probably built in debug mode. You need to either build +python from the source or build your app in release mode. + + + + diff --git a/demo/ermis-f/python_m/cur/1871 b/demo/ermis-f/python_m/cur/1871 new file mode 100644 index 00000000..1559756f --- /dev/null +++ b/demo/ermis-f/python_m/cur/1871 @@ -0,0 +1,55 @@ +From: r.albanese at qut.edu.au (Rico Albanese) +Date: Tue, 18 May 1999 17:11:30 +1000 +Subject: Accessing REMOTE_ADDR from web page +Message-ID: <374112A2.9CC3B6F@qut.edu.au> +Content-Length: 1126 +X-UID: 1871 + +Hi everyone, + +Can someone tell me how to access the REMOTE_ADDR shell environment +variable which is sent with a web page request to a web server. I have +a job logging application which uses a web page which calls a Python +script to enter a request into a database. I wish to collect also the +ip address of the workstation that is making the requesting so that we +may better manage a our ip addresses in our faculty. + +I have used the following code : + +import cgi +. +. +. +theenviron=cgi.print_environ() +. +. +print theenviron + +This produces the following output: + +
    PATH
    C:\Python;C:\Perl\bin;C:\WINNT\system32;C:\WINNT; +
    PYTHONPATH
    c:\python +
    QUERY_STRING
    +Name=&PhNumb=&Locn=&Schl=NS&urgency=D&JobDesc=& +
    REMOTE_ADDR
    131.181.38.141 +
    REMOTE_PORT
    1288 +
    REQUEST_METHOD
    POST +
    REQUEST_URI
    /cgi-bin/ra2jblog.py + +My question is how do I access the REMOTE_ADDR?? Is "theenviron" a +string,list, tuple what?? + +I have tried doing a string search, but to no avail. I still get the +same printout above. + +Any help would be appreciated. + +Thanks + +Rico + + + + + + diff --git a/demo/ermis-f/python_m/cur/1872 b/demo/ermis-f/python_m/cur/1872 new file mode 100644 index 00000000..ec8118f1 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1872 @@ -0,0 +1,58 @@ +From: gmcm at hypernet.com (Gordon McMillan) +Date: Thu, 27 May 1999 10:15:38 -0500 +Subject: Stupid Windows Question +In-Reply-To: <927772969.756087@meusis3> +Message-ID: <1284304128-4799717@hypernet.com> +Content-Length: 1277 +X-UID: 1872 + +Mark Nottingham writes: + +> What's the equivalent of an alarm() on Windows? I need to time out a +> httplib fetch of a URL... + +Hee hee. I love signals on WIndows. + +The following signals are defined (MSVC docs): +-------------------------------------- +SIGABRT + Abnormal termination + +SIGFPE + Floating-point error + +SIGILL + Illegal instruction + +SIGINT + CTRL+C signal + +SIGSEGV + Illegal storage access + +SIGTERM + Termination request +-------------------------------------------- +but you'll never get a SIGINT, because WIndows spawns a new thread to +handle it. However: +---------------------------------------- +The SIGILL, SIGSEGV, and SIGTERM signals are not generated under +Windows NT. They are included for ANSI compatibility [editor's note: +har de har har har]. Thus you can set signal handlers for these +signals with signal, and you can also explicitly generate these +signals by calling raise. +---------------------------------------- + +So, on NT at least (who knows about the others) you could emulate +SIGALRM with a windows timer and a raise(). Snort. + +More straightforward would be to use select with a timeout on the +socket, but that's more hackery of a different sort... Or use +threads, and just kiss off the thread if it doesn't respond within +your timeout. + +- Gordon + + + + diff --git a/demo/ermis-f/python_m/cur/1873 b/demo/ermis-f/python_m/cur/1873 new file mode 100644 index 00000000..b453554a --- /dev/null +++ b/demo/ermis-f/python_m/cur/1873 @@ -0,0 +1,61 @@ +From: graham at sloth.math.uga.edu (Graham Matthews) +Date: 28 May 1999 21:21:18 GMT +Subject: Python 2.0 +References: <7ik6mi$lbk$1@cronkite.cc.uga.edu> <7imr6b$1s0$1@nnrp1.deja.com> +Message-ID: <7in1ce$o51$2@cronkite.cc.uga.edu> +Content-Length: 1887 +X-UID: 1873 + +Graham Matthews: +: > true compilation, the +Vadim Chugunov (chega at my-deja.com) wrote: +: Why would JVM generate a better code than Py2C does? + +Sure one can use Py2C. But with Java you get dynamic compilation of +all your code with no need to use some auxiliary program like Py2C. +cf. HotSpot. + +Graham Matthews: +: > ability to write statically typed code (just write that part in +: > Java!), +Vadim Chugunov (chega at my-deja.com) wrote: +: Just write that part in C ! + +Techically you are correct that C is statically typed. But my post +clearly implies that I am interested in strong static typing. That +is type systems that ensure that code cannot have type errors at +runtime. You cannot do this in C. You can't quite do it in Java yet +either, but I am confident that will be so in the future via the +facilities for parametic polymorphism. + +Graham Matthews: +: > access to Swing, promoting Python on the coat-tails of Java +Vadim Chugunov (chega at my-deja.com) wrote: +: What makes Swing to be better than any of the existing Python GUI +: bindings ? + +Have you ever used Swing for anything? It is much cleaner that Tkinter +for example. It has a huge range of widgets, etc -- much more than +other toolkits. etc. etc. Sure there are bugs etc but Java is a new +product. Give it a few years and they will have gone away. + +Graham Matthews: +: > (free publicity and hype), etc. +Vadim Chugunov (chega at my-deja.com) wrote: +: Yeah. Right. Let's rewrite everything using the hottest +: language of the day! ;-) + +At this point it's the end of the thread for me. I was making a +serious suggestion that Python's use could be improved by pig +backing off the hype for Python. And you ... + +graham +-- + Je suis pour le communisme + Je suis pour le socialisme + Je suis pour le capitalisme + Parce que je suis opportuniste + + + + diff --git a/demo/ermis-f/python_m/cur/1874 b/demo/ermis-f/python_m/cur/1874 new file mode 100644 index 00000000..e6bed0a7 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1874 @@ -0,0 +1,58 @@ +From: cle at qiao.in-berlin.de (Clemens Hintze) +Date: Sun, 23 May 1999 21:33:00 GMT +Subject: Help, how to override <= operator +References: <7htsdd$6kd@wapping.ecs.soton.ac.uk> <7i0eao$b4l@cs.vu.nl> <7i3gbf$eo7@cs.vu.nl> +Message-ID: +Content-Length: 1322 +X-UID: 1874 + +Michael Hudson writes: + +>cle at qiao.in-berlin.de (Clemens Hintze) writes: + +[...] + +>> No I meant EVER! :-) + +>"always" is a more English word in this context. "ever" does mean the +>same, but it's a bit archaic. I thought I knew what you meant the +>first time, for what it's worth. + +Oops :-} English is not my mothertongue as you have already guessed +for sure. So I didn't know, that "ever" is not the right word here. +Sorry! + +> +>> [...] +>> +>> >I'm a bit confused about what you here. +>> + +[...] + +>Fine, just don't ever do this when you are initializing a variable +>with a mutable value or you're likely to confuse yourself. This was +>the source of my recent diatribe against class variables on this list +>(although I've moderated my position a little since then). + +Oh, I think that is one of the typically Python traps. Everybody has +to step in one time, at least :-))) + +As I also trapped in, I have learnt my lesson already :-}} + +So I only initialize them with immutable values. Except I really need +a mutable. So I am trained to pay attention if I see mutables in class +definition statements. :-) + +[...] + +>I-apologize-if-you-knew-this-already-ly y'rs Michael + +These is nothing to apologize. I every day learn new things, and I +welcome it. :-))) + +We-cannot-all-named-Tim-Peters-ly y'rs Clemens. + + + + diff --git a/demo/ermis-f/python_m/cur/1875 b/demo/ermis-f/python_m/cur/1875 new file mode 100644 index 00000000..589c35ac --- /dev/null +++ b/demo/ermis-f/python_m/cur/1875 @@ -0,0 +1,33 @@ +From: kumar*xspam* at *xspam*rtp.ericsson.se (Kumar Balachandran) +Date: 28 May 1999 11:20:14 -0400 +Subject: Problems with Install of LLNLDistribution11 (beginner) +Message-ID: <02k8ttz0ep.fsf@rtp.ericsson.se> +X-UID: 1875 + +I am trying to install the Numeric and Graphics packages and I have +the follwing problems +1. The numeric package was installed as + $PREFIX/lib/python1.5/site-packages/numeric + However, I am not able to import numeric using + from numeric import * + +2. My make of Graphics fails at + gcc -I$PREFIX/lib/yorick/1.4/h -I../Numeric/Include/. -g -O2 + -I$PREFIX/include/python1.5 + -I/apps/public/solaris2.5.1/include/python1.5 -DHAVE_CONFIG_H + -c ./Gist/Src/gistCmodule.c ./Gist/Src/gistCmodule.c:75: + arrayobject.h: No such file or directory + ./Gist/Src/gistCmodule.c:88: warning: `PyFPE_END_PROTECT' + redefined + /apps/public/solaris2.5.1/include/python1.5/pyfpe.h:169: + warning: this is the location of the previous definition make: + *** [gistCmodule.o] Error 1 + +I am trying this on solaris 2.5.1 on a Sun Ultra 30. Does anyone have +clues I can use? + +Kumar. + + + + diff --git a/demo/ermis-f/python_m/cur/1876 b/demo/ermis-f/python_m/cur/1876 new file mode 100644 index 00000000..83195b03 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1876 @@ -0,0 +1,80 @@ +From: graham at sloth.math.uga.edu (Graham Matthews) +Date: 27 May 1999 14:47:03 GMT +Subject: Python Scalability +References: <7i9l2l$5fu@world1.bellatlantic.net> <7ignk0$k18$1@nnrp1.deja.com> <7igu3d$3db$1@cronkite.cc.uga.edu> <7iic8e$rgt$1@nnrp1.deja.com> +Message-ID: <7ijlt7$mp8$1@cronkite.cc.uga.edu> +Content-Length: 3448 +X-UID: 1876 + +graham at sloth.math.uga.edu (Graham Matthews) wrote: +> a) it does not provide any form of static typing, something I have +> found to be essential on larger projects. +dacut at kanga.org wrote: +: It's not so much static typing (though that is the easiest to think +: about and the easiest to implement), but static interface checking. + +Just a minor point but static checking of interfaces is static type +checking. Interfaces are essentially existential types, so checking +interfaces is checking existential types, and hence is type checking. +So if I say "type checking" that includes interface checking :-) + +graham at sloth.math.uga.edu (Graham Matthews) wrote: +> b) it does't provide proper garbage collection (almost all my larger +> Python apps leaked memory). +dacut at kanga.org wrote: +: I would even argue that manual resource management is better than +: reference counting for this very reason. Reference counting is fine +: when you have written all of the classes; in reality, this is never the +: case (e.g., I use Tkinter, and it holds a few references that I can't +: get at without reading the source). + +Yes this is pretty much the problem I had with Python memory management. +No matter how careful I was someone else's code always leaked. Or I made +very unexpected circular references due to some implementation detail +of the Python interpreter. + +dacut at kanga.org wrote: +: Personally, I'd like to see a Lins partial mark-sweep allocator; this +: is documented in Richard Jones and Rafael Lins' book _Garbage +: Collection: Algorithms for Automatic Dynamic Memory Management_. It +: essentially combines reference counting (so if a ref count *does* drop +: to zero, an object is deallocated) with garbage collection (so those +: icky cycles get collected). + +Yes I would like to see a mark and sweep collector added to Python too. +Note that reference counting is actually coming back into favour as a +memory management scheme because it is good in distributed and real time +environments (since the cost of mem management is spread almost uniformly +across the code). In this context adding a fast mark and sweep collector +seems a natural thing to do. + +graham at sloth.math.uga.edu (Graham Matthews) wrote: +> For a): +> Allow the user to "declare" types and object fields. Write a tool that +> uses these "declaration" to check Python code *as if* it were statically +> typed. Ignore these type "declarations" when generating code so as to +> retain the current semantics. "Declarations" don't have to be anything +> more than stylised comments (just something that the tool can extract +> easily). The tool will not provide a guarantee of type correctedness +> (that is not possible in Python), but will provide programming support +> for types. +dacut at kanga.org wrote: +: And, frankly, this is all that you really need. Just something to flag +: silly errors that may be difficult/tedious to test at run time. + +Yes this seems like the minimalist position -- you don't change the current +semantics, nor get into difficulties with how to correctly type check +Python (a much harder issue than people seem to think). Instead you +accept a less than perfect type checking tool that does a lot of what +you want, without changing the current semantics. + +graham +-- + Where do you think you're going + Don't you know it's dark outside + Where do you think you're going + Don't you care about my pride + + + + diff --git a/demo/ermis-f/python_m/cur/1877 b/demo/ermis-f/python_m/cur/1877 new file mode 100644 index 00000000..120d3902 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1877 @@ -0,0 +1,30 @@ +From: bwarsaw at cnri.reston.va.us (Barry A. Warsaw) +Date: Fri, 14 May 1999 11:10:28 -0400 (EDT) +Subject: Python mailing list vs. References: (was Re: My quarterly question on Design by Contract in Python...) +References: <000301be99ea$673e84a0$ee9e2299@tim> + + <7hf69q$5h10$1@midnight.cs.hut.fi> + + <7hfm5d$62ng$1@midnight.cs.hut.fi> +Message-ID: <14140.15588.710617.691293@anthem.cnri.reston.va.us> +X-UID: 1877 + +>>>>> "LW" == Lars Wirzenius writes: + + LW> (On the other hand, almost all mail software is broken, + LW> although not necessarily because of this. + +John Viega said it best at LISA '98 when he was giving his Mailman +talk (sorry if I'm paraphrasing): "All mailing list software sucks, +Mailman just sucks less". :-) + +But I agree with the sentiment that says Mailman should be mucking +with headers as little as possible. I don't think rewriting +References: and In-Reply-to: falls under the category of "as little as +possible". + +-Barry + + + + diff --git a/demo/ermis-f/python_m/cur/1878 b/demo/ermis-f/python_m/cur/1878 new file mode 100644 index 00000000..a44664f6 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1878 @@ -0,0 +1,22 @@ +From: news at dorb.com (Darrell) +Date: Mon, 10 May 1999 16:47:50 -0400 +Subject: sgrep +Message-ID: +X-UID: 1878 + +Updated the sgrep wrappers at www.dorb.com/darrell +sgrepVC6.zip has the work space and the .pyd +sgrepLinux.zip is the same for Linux. + +This was a very crude proof of concept that we aren't going to use it seems. +But if anyone has some suggestions I could put some effort into it. + +--Darrell + + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1879 b/demo/ermis-f/python_m/cur/1879 new file mode 100644 index 00000000..38f87d47 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1879 @@ -0,0 +1,77 @@ +From: faassen at pop.vet.uu.nl (Martijn Faassen) +Date: Wed, 19 May 1999 10:50:45 +0200 +Subject: Bytecode optimisation +References: <7hq7qc$itn$1@news.tamu.edu> <7hsqim$8kr$1@news.tamu.edu> <37420CBD.FF15564@appliedbiometrics.com> <7ht6g1$rn0$1@news.tamu.edu> <37426993.D952585B@home.com> +Message-ID: <37427B65.BBA6A970@pop.vet.uu.nl> +Content-Length: 2562 +X-UID: 1879 + +Jim Meier wrote: + +> The thread on "swallow" seems to have dried up; maybe they've gone out to +> experiment with it? + +I haven't *exactly* experimented yet, though I'm thinking about the C +generating part of Swallow now. Basically Swallow (internally) could +look like this: + +Python code (in Swallow subset) + Static type info (for instance in +dicts) -> +Python parse tree with type annotations (error if type annotations are +missing or conflicting). + +Now, from that Python parse tree with type annotations (in fact a +Swallow parse tree) we need to go to a 'parse' tree that can generate C +code. Note that the C tree doesn't have to be able to generate any +construct possible in C, just the parts necessary for Swallow. + +I think the tricky parts are adding the type info to Swallow parse tree +(along with the type info for lots of builtin stuff), and then turning +this tree into the C tree. + +Perhaps someone already has a python module that can generate C code +from some tree structure? + +Random note: I think we need a form of C++ templates or generic +classes/types in order to do enough of Swallow. For instance, we need a +list(integer) and list(float) and list(fooClass). Some system of generic +programming seems necessary here. + +> In any case, these ideas and the ideas from that thread are +> butting head-on. If a satisfactory way of finding "static" functions and +> type-constant variables, then that markup could be used both to optimise the +> python byte-codes and to generate native code directly. + +Swallow in my view initially depends on manually adding this static type +info (and then Swallow assumes it's correct!). + +> Depending on the speed +> of the system and how often the optomisation is done, this could be done +> automatically in the interpreter. + +Not if you have to add static type info manually. Of course type +inference engines can always be added to Swallow later. :) + +> It may be nescessary to keep two or more copies of a function around (if you +> want both speed and flexibility).. one optimized to flash powder in native +> code, one in the original python bytecode. + +Yes, I had the same idea. + +> When doing it's lookups, a quick +> second check for a) known types and b) if the types are known, then if they +> match the types assumed in the optimisation. If the check passes, it runs the +> optimised version. If not, it runs the standard version. +> +> (this might mean that only "swallowed" code can call other "swallowed" code +> without wrappers. I don't think this is a big deal?) + +No, this sounds like a good idea. + +Regards, + +Martijn + + + + diff --git a/demo/ermis-f/python_m/cur/1880 b/demo/ermis-f/python_m/cur/1880 new file mode 100644 index 00000000..629f3b63 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1880 @@ -0,0 +1,40 @@ +From: hochberg at psn.net (Tim Hochberg) +Date: Mon, 10 May 1999 15:18:00 -0600 +Subject: Numeric.tostring() ? +References: <7h7k9h$dme@cocoa.brown.edu> +Message-ID: +X-UID: 1880 + + + +Tom Lukasiak wrote in message <7h7k9h$dme at cocoa.brown.edu>... +>Hi, +> I have found that the best way (or maybe the only way) to read a binary +>image into an array is to do something like this: +> +>f = open(filename) +>data = f.read() +>f.close() +>dataArray = Numeric.fromstring(data, Numeric.Int16) +> +> +>However, I run into trouble when I want to convert a Numeric array into a +>data string, so that I could save my array as a binary image file. This is +>because there is no Numeric.tostring() method. What is the best way to fix +>this problem? + + +There is a tostring method on array objects. For example: + +dataArray.tostring() + +should do what you want. + +-tim + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1881 b/demo/ermis-f/python_m/cur/1881 new file mode 100644 index 00000000..2900e47b --- /dev/null +++ b/demo/ermis-f/python_m/cur/1881 @@ -0,0 +1,32 @@ +From: siona at chiark.greenend.org.uk (Sion Arrowsmith) +Date: 10 May 1999 16:54:52 +0100 (BST) +Subject: An efficient split function +References: +Message-ID: +Content-Length: 1035 +X-UID: 1881 + +In article , +William S. Lear wrote: +>Previous tests of mine comparing the getline() version that works +>with C++ strings and that which works with character arrays showed me +>that the latter was much faster, albeit less flexible. + +My experience with string v. char* getline() in a real-world log- +file handler is that the speed up is insignificant compared to the +processing of the data, and that the char* version has big +problems unless you can absolutely guarantee a maximum line- +length on your input. Your code doesn't have the buffer-overrun +problems the stuff I was cleaning up did, but it is going to lose +data on lines >1k. (Q. Who'd give you an input line that long? A. +Never underestimate the perversity of users.) + +-- +\S -- siona at chiark.greenend.org.uk -- http://www.chaos.org.uk/~sion/ + ___ | "Frankly I have no feelings towards penguins one way or the other" + \X/ | -- Arthur C. Clarke + | If music be the food of love, bring me a doggie bag. + + + + diff --git a/demo/ermis-f/python_m/cur/1882 b/demo/ermis-f/python_m/cur/1882 new file mode 100644 index 00000000..a463b0b3 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1882 @@ -0,0 +1,104 @@ +From: mso at oz.net (Mike Orr) +Date: 24 May 1999 03:32:42 -0500 +Subject: README: Python-URL! - the weekly guide to Python resources (May 24) +Message-ID: <7ib2ra$15b$1@Starbase.NeoSoft.COM> +Content-Length: 3624 +X-UID: 1882 + +Python-URL is still looking for volunteers willing to create a weekly +edition of this document. This will be a one- to two-month commitment. +If interested, contact Mike Orr . + +** ANY URL STARTING WITH "http://search.dejanews.com/msgid.xp?MID=", +ENDS IN "%3e" **, even if it appears split into two lines on your screen. + +--------------- +Python 1.5.2 (13-Apr-1999) is the current version. This, the new JPython +website and the new Starship site are linked from the main Python page. + http://www.python.org/ + http://www.python.org/1.5/ + http://www.jpython.org/ + http://starship/python.net/ + +--------------- +HTMLGen discussion group. Creating webpages from within a program. + http://www.egroups.com/group/htmlgen/info.html + + +--------------- +CSV.py is a simple library for reading/writing comma-separated value +files, which can be imported/exported from most databases. + http://search.dejanews.com/msgid.xp?MID=%3cmt2.0-27216-926930575%40news.informatik.uni-bonn.de%3e + http://yi.com/home/TrattLaurence/comp/python/csv/ + + +--------------- +Zope news (12-May-1999). Also, an alpha release of Zope 2 (2.0.0a1). + http://search.dejanews.com/msgid.xp?MID=%3cmt2.0-27216-926930730%40news.informatik.uni-bonn.de%3e + http://search.dejanews.com/msgid.xp?MID=%3cmt2.0-24223-927475324%40news.informatik.uni-bonn.de%3e + http://www.zope.org/ + + +--------------- +Mahogany 0.22a is an open-source cross-platform mail & news client with +a built-in Python interpreter for extensions. + http://search.dejanews.com/msgid.xp?MID=%3cmt2.0-24223-927475400%40news.informatik.uni-bonn.de%3e + +--------------- +Assignment operators (the "x += 1" syntax). Fredrik Lundh reposts an old +message from Guido on one of those Controversies that Never Die. + http://search.dejanews.com/msgid.xp?MID=%3c015301be9eeb%245dfc1fa0%24f29b12c2%40pythonware.com%3e + +--------------- +Pager class for sending a message to different types of pagers. + http://www.kazmier.com/computer/#python + +========================================================================= +Everything you want is probably one or two clicks away in these pages: + + Python.org's Python Language Website is the center of Pythonia + http://www.python.org + + Much of Python's real work takes place on Special-Interest Group + mailing lists http://www.python.org/sigs/ + + Python Consortium emerges as an independent nexus of activity + http://www.python.org/consortium + + Python To-Do List anticipates some of Python's future direction + http://www.python.org/cgi-bin/todo.py + + Python Journal is at work on its second issue + http://www.pythonjournal.com + + Links2Go is a new semi-automated link collection; it's impressive + what AI can generate + http://www.links2go.com/search?search=python + + Archive probing trick of the trade: + http://www.dejanews.com/dnquery.xp?QRY=&DBS=2&ST=PS&defaultOp=AND&LNG=ALL&format=threaded&showsort=date&maxhits=100&groups=comp.lang.python + + +Previous - (U)se the (R)esource, (L)uke! - messages are listed here: + http://purl.org/thecliff/python/url.html +or + http://www.dejanews.com/dnquery.xp?QRY=~g%20comp.lang.python%20Python-URL%21 + + +Suggestions/corrections for next week's posting are always welcome. + http://www.egroups.com/list/python-url-leads/ + +To receive a new issue of this posting in e-mail each Monday morning +(once we resume), ask to subscribe. + + +-- The Python-URL! Team-- +-Mike Orr, mso at jimpick.com +-- + +Cameron Laird http://starbase.neosoft.com/~claird/home.html +claird at NeoSoft.com +1 281 996 8546 FAX + + + + diff --git a/demo/ermis-f/python_m/cur/1883 b/demo/ermis-f/python_m/cur/1883 new file mode 100644 index 00000000..536cb9fa --- /dev/null +++ b/demo/ermis-f/python_m/cur/1883 @@ -0,0 +1,15 @@ +From: lqnppn at wank.com (lqnppn at wank.com) +Date: 29 May 1999 10:20:19 GMT +Subject: FREE HARDCORE XXX SEX PICTURES! 8386 +Message-ID: <7iof13$aqh$4642@nclient1-gui.server.virgin.net> +X-UID: 1883 + +free no bullshit xxx sex pictures visit + +http://www.users.globalnet.co.uk/~nigel32/freepictures.htm +iubosqvkrvdgqvxuivwhywgzjxhhpnyiqfstlsseedhusdiupzlmtkzuxomjfwfltmcduexgxsrvp + + + + + diff --git a/demo/ermis-f/python_m/cur/1884 b/demo/ermis-f/python_m/cur/1884 new file mode 100644 index 00000000..a3f50d87 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1884 @@ -0,0 +1,60 @@ +From: tim_one at email.msn.com (Tim Peters) +Date: Mon, 3 May 1999 23:36:00 -0400 +Subject: string-based tokenizer? +In-Reply-To: <01be95d2$3959a680$5c9508d1@TheBlueWizard> +Message-ID: <000401be95df$3a86a1e0$dca22299@tim> +Content-Length: 1395 +X-UID: 1884 + +[The Blue Wizard] +> I was looking for a quick way to tokenize the Python and Python-like +> expressions, and I found the tokenizer.py. It is quite nice, but there +> is one little ugly fact: it is dependent on datastream. + +Nope: it depends on something (anything!) that "acts like a stream". With +enough Pythonistic cleverness, you can feed it a disguised integer . + +> I want to be able to just type tokenize('a cute string known as 3+4') +> and get a series of tokens directly from it. + +Well, that's not what it does-- so you write a class to take what it does do +and turn that into what you want it to do: + +import tokenize + +class TokenWrapper: + def __init__(self, lines): + self.lines = lines + self.i = 0 + self.tokens = [] + + def run(self): + tokenize.tokenize(self.readline, self.tokeneater) + return self.tokens + + def tokeneater(self, type, token, (srow, scol), + (erow, ecol), line): + self.tokens.append(token) + + def readline(self): + if self.i >= len(self.lines): + return "" + line = self.lines[self.i] + self.i = self.i + 1 + return line + +def blue(astring): + return TokenWrapper([astring]).run() + +print blue('a cute string known as 3+4') + +If you write a different TokenWrapper class for each string, you're missing +the point . + +write-once-use-twice-ly y'rs - tim + + + + + + diff --git a/demo/ermis-f/python_m/cur/1885 b/demo/ermis-f/python_m/cur/1885 new file mode 100644 index 00000000..b23c09d4 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1885 @@ -0,0 +1,25 @@ +From: brunomadv at ciudad.com.ar (Bruno Mattarollo) +Date: Wed, 19 May 1999 03:06:54 GMT +Subject: threaded python code example needed +Message-ID: <000601bea1a4$a5e920e0$6eba0ac8@kuarajy.infosys.com.ar> +X-UID: 1885 + +Hi! + + I may need in the near future to develop some app that will certainly need +some thread support... I am a devoted Python fan so ... I am in the need of +some threaded python code to use as tutorial... :-) + + Can anyone send me or give me URL's to download some...? + + TIA + +/B + +Bruno Mattarollo +... proud to be a PSA member + + + + + diff --git a/demo/ermis-f/python_m/cur/1886 b/demo/ermis-f/python_m/cur/1886 new file mode 100644 index 00000000..5e8564a6 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1886 @@ -0,0 +1,25 @@ +From: MHammond at skippinet.com.au (Mark Hammond) +Date: Mon, 10 May 1999 19:48:28 +1000 +Subject: frontend for net send in NT +References: <7h5aum$8s7$1@kraken.itc.gu.edu.au> +Message-ID: <7h6aq5$gmp$1@m2.c2.telstra-mm.net.au> +X-UID: 1886 + +In the Python win32 extensions you will find win32net.NetMessageBufferSend() + +Mark. + +Hamish McKenzie wrote in message <7h5aum$8s7$1 at kraken.itc.gu.edu.au>... +>I was thinking of writing a front-end, like a simple little interface in +>which to send messages with (and possibly recieve them too) for the net +send +>command. Does anyone know where I might be able to get started? I'm not +>really a programmer, but I've written a few little things before with +>smalltalk, and javascript. + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1887 b/demo/ermis-f/python_m/cur/1887 new file mode 100644 index 00000000..02377581 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1887 @@ -0,0 +1,24 @@ +From: tratt at dcs.kcl.ac.uk (Laurence Tratt) +Date: Fri, 07 May 1999 19:58:39 +0100 +Subject: The Very High Layer and friends +References: <37304719.C258AEFB@serop.abb.se> + <14129.52261.257488.662964@weyr.cnri.reston.va.us> +Message-ID: <613d9bfe48.tratt@tratt.freeserve.co.uk> +X-UID: 1887 + +In message <14129.52261.257488.662964 at weyr.cnri.reston.va.us> + "Fred L. Drake" wrote: + +[Documentation] +> On the other hand, the info conversion may become a lot easier later this +> year. ;-) + +Is this when the documentation will be converted into SGML or some other +reasonably-easy-to-parse-compared-to-latex format? + + +Laurie + + + + diff --git a/demo/ermis-f/python_m/cur/1888 b/demo/ermis-f/python_m/cur/1888 new file mode 100644 index 00000000..d937b89f --- /dev/null +++ b/demo/ermis-f/python_m/cur/1888 @@ -0,0 +1,28 @@ +From: astro at nospam.tne.net.au (Tim Auld) +Date: Mon, 3 May 1999 21:43:52 +0930 +Subject: Using Python for Modular Artificial Intelligence code +References: <1286466145-87242670@hypernet.com> +Message-ID: +X-UID: 1888 + +>> ... The multi-threading with socket +>> communication would have been too slow. +> +>Snicker. You can saturate a LAN connection from a Python socket. +>Granted, if you rewrite in C, you'll use a bit less CPU. + + +The "multi-threading with socket" solution I was talking about refered to +using sockets between C/C++ program threads, not Python. Just about +anything can saturate a network. It would have been slow for the game due +to the task switching and that Windows doesn't handle lots of threads well, +as well as the unnecessary data transfer. + +Regards, +Tim + + + + + + diff --git a/demo/ermis-f/python_m/cur/1889 b/demo/ermis-f/python_m/cur/1889 new file mode 100644 index 00000000..a5d3c987 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1889 @@ -0,0 +1,38 @@ +From: scott at chronis.pobox.com (scott cotton) +Date: 27 May 1999 04:03:43 GMT +Subject: Python Scalability +References: <7i9l2l$5fu@world1.bellatlantic.net> <7ignk0$k18$1@nnrp1.deja.com> <7igu3d$3db$1@cronkite.cc.uga.edu> <7iic8e$rgt$1@nnrp1.deja.com> +Message-ID: +Content-Length: 1075 +X-UID: 1889 + +On Thu, 27 May 1999 02:56:15 GMT, dacut at kanga.org wrote: +>And, frankly, this is all that you really need. Just something to flag +>silly errors that may be difficult/tedious to test at run time. + +There are indeed lots of these errors in the development of +medium/largish python apps. The approach I've taken is to +integrate testing with development, on a fine-grained +level. I begin testing code as soon as it is testable, and +then make sure that I test all of it. If you make this a +regular habit, it becomes a bit less tedious. You should +try the doc-string testing code that Tim Peters put up on +the python contributed ftp site, as one way to do this. + +While this stuff may not be as easy to do with a gui like +TKinter, it can sure beat tracebacks a mile long that arise +from overall testing. And if you're using emacs, +hippie-expand won't make typos while remembering names like +you and I do. + +There are some things you can do to make python more +scaleable without an entire optional typing system -- though +that'd be nice too. + +scott + + + + + + diff --git a/demo/ermis-f/python_m/cur/1890 b/demo/ermis-f/python_m/cur/1890 new file mode 100644 index 00000000..c16a06e1 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1890 @@ -0,0 +1,57 @@ +From: moshez at math.huji.ac.il (Moshe Zadka) +Date: Thu, 27 May 1999 08:51:27 +0300 (IDT) +Subject: problem with variable scoping +In-Reply-To: <000301bea7fd$59bee600$a49e2299@tim> +Message-ID: +X-UID: 1890 + +On Thu, 27 May 1999, Tim Peters wrote: + +> > def process(line): +> > ... +> > if last_line_empty: +> > pass +> > else: +> > print "

    " +> > last_line_empty = 1 +> +> C: +> +> int last_line_empty = 0; +> +> void process(const char* line) +> { +> int last_line_empty; +> if (last_line_empty) +> ; +> else +> printf("

    \n"); +> last_line_empty = 1; +> } + +Ummmm.....Tim, I beg to differ: it is more like the C++ + +void process(const char *line) +{ + if (last_line_empty) + ; + else + printf("

    \n"); + int last_line_empty; + + last_line_empty = 1; +} + +The Python code shadows last_line_empty only *after* the "decleration" + +would-be-interesting-if-python-had-set!-and-not-just-define-ly y'rs, Z. + +-- +Moshe Zadka . +QOTD: My own exit is more likely to be horizontal then perpendicular. + + + + + + diff --git a/demo/ermis-f/python_m/cur/1891 b/demo/ermis-f/python_m/cur/1891 new file mode 100644 index 00000000..107bd674 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1891 @@ -0,0 +1,29 @@ +From: dkuhlman at netcom.com (G. David Kuhlman) +Date: Tue, 4 May 1999 14:34:38 GMT +Subject: Validating XML? +References: <372EF7DD.4F430D0D@darmstadt.gmd.de> +Message-ID: +X-UID: 1891 + +I'm not sure which of the SAX drivers are validating parsers. But, +you can find out about them by going to http://www.python.org, +clicking on "sigs", then clicking on XML-SIG. + + - Dave + +Robb Shecter wrote: + + +> Hi, + +> I saw something somewhere that said that Python has a validating XML +> parser. I couldn't find anything about this though in the online docs. +> Can someone give an example of validating a piece of XML? + +> Thanks, +> Robb + + + + + diff --git a/demo/ermis-f/python_m/cur/1892 b/demo/ermis-f/python_m/cur/1892 new file mode 100644 index 00000000..16d14a6c --- /dev/null +++ b/demo/ermis-f/python_m/cur/1892 @@ -0,0 +1,64 @@ +From: wtanksle at dolphin.openprojects.net (William Tanksley) +Date: Sun, 02 May 1999 23:47:02 GMT +Subject: Books on Python (for OO merit) +References: <372BEA9D.CAA0A5B7@earthlink.net> <7ghscn$337@chronicle.concentric.net> <372C8680.90FBDBD1@earthlink.net> +Message-ID: +Content-Length: 2280 +X-UID: 1892 + +On Sun, 02 May 1999 21:47:49 GMT, David M. Cook wrote: +> wrote: + +>>That aside, I've read strong positive reviews of both the learning and +>>programming Python books. Which one gives a better OO perspective? + +>I recommend the rat book over the snake book as a better introduction to the +>language. + +I liked Programming Python a lot, but then that's all that there was at +the time :-). + +>For a better understanding of OO I recommend Bertrand Meyer's OOSC2 tome and +>the Design Patterns book. Most of the other OO books I've seen have been a +>waste of paper. + +OOSC2 is interesting, but IMO it's more of an advert for Meyer's company +(and the language they sell, Eiffel) than anything else. It could be used +to design a nice OO language which looked like Eiffel, but I didn't find +any useful OO design information in it at all -- the closest I could see +was "write your design in Eiffel and then translate it over to whatever +language you're forced to actually use." + +Don't let me dis it too much. It's a good book, but I just found it to be +impractical. + +Design Patterns is great, no two ways about it. However, it's not about +OO design; it's about patterns. Every OO designer should use it, but I'm +not sure it's that good of an intro. + +I have to agree that all of the OO design books I can think of weren't +worth anything. But then I haven't read some of the great originals -- +I'm sure that some of the UML books must be decent. Does anyone have some +recommendations? I'm NOT looking for a novice book; at the same time, I +don't want raw theory. Just OO Design. + +One good way to start, and a book which you HAVE to get if you work with +C++, is Large-scale C++ Software Design, by John Lakos. It's for people +who are familiar with C++, but my own light acquaintance was enough. In +spite of the very practical focus on C++, the techniques and ways of +thinking are very helpful in general OO design. + +>Rat book: http://www.bestbookbuys.com/cgi-bin/bbb.cgi?ISBN=1565924649 +>OOSC2: http://www.bestbookbuys.com/cgi-bin/bbb.cgi?ISBN=0136291554 +>Patterns: http://www.bestbookbuys.com/cgi-bin/bbb.cgi?ISBN=0201633612 + +>Dave Cook + +-- +-William "Billy" Tanksley +"But you shall not escape my iambics." + -- Gaius Valerius Catullus + + + + diff --git a/demo/ermis-f/python_m/cur/1893 b/demo/ermis-f/python_m/cur/1893 new file mode 100644 index 00000000..b67c694e --- /dev/null +++ b/demo/ermis-f/python_m/cur/1893 @@ -0,0 +1,36 @@ +From: guido at eric.cnri.reston.va.us (Guido van Rossum) +Date: 04 May 1999 11:00:18 -0400 +Subject: Interpreter fussy about line endings? +References: <372E4C7B.346A942@compaq.com> +Message-ID: <5lzp3k98xp.fsf@eric.cnri.reston.va.us> +X-UID: 1893 + +Greg Ewing writes: + +> Python 1.5.1 on my Mac refuses to run code +> written using PythonWin's built-in editor, +> apparently because of different CR/LF +> conventions. I have to load it into Alpha +> and save it in Mac format before it will +> work! +> +> Is it meant to be like this? Why should +> it care? How is one supposed to write +> cross-platform Python code if it does +> things like this? + +Python (by virtue of the C stdio library) expects the line ending +convention of the platform. Typically, file transfer utilities +(e.g. FTP) take care of translating line ending conventions for text +files. + +For future versions, I may adapt the Java convention (lines are ended +by CR, LF or CRLF) but for now, you have to translate line endings +when you transfer files. And yes, I know that is sometimes a pain. +Live with it. + +--Guido van Rossum (home page: http://www.python.org/~guido/) + + + + diff --git a/demo/ermis-f/python_m/cur/1894 b/demo/ermis-f/python_m/cur/1894 new file mode 100644 index 00000000..9f719d5e --- /dev/null +++ b/demo/ermis-f/python_m/cur/1894 @@ -0,0 +1,67 @@ +From: thstr at serop.abb.se (Thomas S. Strinnhed) +Date: Thu, 20 May 1999 08:57:15 +0200 +Subject: The Very High Layer and friends +References: <37304719.C258AEFB@serop.abb.se> <14129.52530.662084.712010@weyr.cnri.reston.va.us> +Message-ID: <3743B24B.4F694D86@serop.abb.se> +Content-Length: 1908 +X-UID: 1894 + +Hi + +I just might do as you say and ask again, beeing more specific. +(I've downloaded the new manuals, but I still can't figure it out.) + +The thing is: I'v taken the Demo/Embed example from the distribution +(demo.c) and added calls to PyRun_SimpleFile() which causes the +application to crash (using NT) and saying that memory can't be read. + +Here are the few lines i added to demo.c + +FILE *fp = NULL; /* First of all a FILE-pointer */ +... +if(!(fp = fopen("test2.py", "r"))) /* Open file */ + printf("\nError: can't open file test2.py\n"); +... +PyRun_SimpleFile(fp, "test2.py"); /* B A N G */ +... + +Here is the file i want to execute, test2.py +print 'test2.py' + +I must have missed something about the FILE-pointer. I've tried +different modes to open the file in r, rt, r+, a but the same problem +occurs. I've verified that the FILE-pointer is correct by reading it +with fgets() a couple of times and that works, I get the text from the +file. + +So I *think* the questions should be: +* What kind of FILE-pointer does PyRun_SimpleFile() expect?? +* If the FILE-pointer is OK, what causes the error?? + +Thanks + -- Thomas S. Strinnhed, thstr at serop.abb.se + +Fred L. Drake wrote: +> +> Thomas S. Strinnhed writes: +> > (I have all the downloadable manuals; Embedding..., Library Reference, +> > Tutorial, Python/C API Reference, Python Reference.) +> +> Thomas, +> As Dave Kuhlman pointed out, a newer version of the manuals probably +> has enough information to answer your questions about the functions +> you're asking about. +> If the information isn't sufficient, please don't hesitate to ask +> again, explaining what you're looking for in more detail. +> The HTML distribution can be unpacked directly in your installation dir>\Doc\ directory to update the installed manuals. +> +> -Fred +> +> -- +> Fred L. Drake, Jr. +> Corporation for National Research Initiatives + + + + diff --git a/demo/ermis-f/python_m/cur/1895 b/demo/ermis-f/python_m/cur/1895 new file mode 100644 index 00000000..3eca0dc4 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1895 @@ -0,0 +1,27 @@ +From: tallard at sagem.fr (Stephane Tallard) +Date: Wed, 5 May 1999 12:23:50 GMT +Subject: ddd on aix +Message-ID: <37303856.86DFF6A2@sagem.fr> +X-UID: 1895 + +Hi all, + +I'am trying to use ddd to debug my python files. Unfortunatly , this +doesn't work : it seems that ddd doesn't know how to +talk to pdb, the python interactive debugger. + +The command I use is : +/tools/ddd3.1.1/bin/ddd --debugger /tools/.../pdb.py --pdb myscript.py + + +Thanks for your help, +Stephane +-------------- next part -------------- +A non-text attachment was scrubbed... +Name: tallard.vcf +Type: text/x-vcard +Size: 197 bytes +Desc: Carte pour Stephane Tallard +URL: + + diff --git a/demo/ermis-f/python_m/cur/1896 b/demo/ermis-f/python_m/cur/1896 new file mode 100644 index 00000000..ce36e556 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1896 @@ -0,0 +1,91 @@ +From: seant at iname.com (Sean True) +Date: Fri, 28 May 1999 23:40:32 GMT +Subject: Help with PIL +References: <374cd368.10153309@news> +Message-ID: <37502931.242178903@news.ne.mediaone.net> +Content-Length: 2238 +X-UID: 1896 + +mrfusion at bigfoot.com wrote: + +>HI, +> +> I've just installed the PIL library on my win98 machine. I +>can open a file and see it's size, but when I try to show it +>(im.show()) I get a blank TK window and an error on the command line +>that says : Bad command or File name. +> +>Any idea what's wrong? I can import Image and ImageTk without any +>errors. +> +>Thanks for any help. +> +>Tom + +For those of us on Windows who still like to keep programming in +console mode, and who therefore avoid TK, the following example +shows one way of getting an image up on the screen. It's neither +idiomatic nor elegant, but I do use it a lot. The kludge about the +temp files keeps them from being deleted too soon, at the expense +of not deleting them at all if the program fails to exit cleanly. + + +# Hacked version of show in image.py from pil +# Uses irfan's view, and makes the image small enough to fit on my +# screen + def show(self, title = None): + "Display image (for debug purposes only)" + + try: + import ImageTk + ImageTk._show(self, title) + # note: caller must enter mainloop + except: + #_showxv(self, title) + showirfan(self, title) + +import os,sys +tempfiles = [] +def showcleanuponexit(): + raw_input("Hit enter to continue and delete image temp files") + for file in tempfiles: + if os.path.exists(file): + command = "del "+file + os.system(command) + +sys.exitfunc = showcleanuponexit + +def showirfan(im,label = None): + import tempfile + maxdim = 1024 + if label <> None: + xsize, ysize = im.size + print "Showing %s (%ix%i)" % (label, xsize, ysize) + filename = tempfile.mktemp() + ".bmp" + tempfiles.append(filename) + width, height = im.size + if width > height: + if width > maxdim: + height = int((height * maxdim) / width) + width = maxdim + else: + if height > maxdim: + width = int ((width *maxdim) / height) + height = maxdim + im = im.resize((width, height)) + im.load() + if im.mode == "P": + file = im.convert("RGB").save(filename) + else: + file = im.save(filename) + command = "i_view32 "+filename + os.system(command) + + +Sean True +seant at iname.com +http://striper.ne.highway1.com + + + + diff --git a/demo/ermis-f/python_m/cur/1897 b/demo/ermis-f/python_m/cur/1897 new file mode 100644 index 00000000..b8f48818 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1897 @@ -0,0 +1,55 @@ +From: da at ski.org (David Ascher) +Date: Fri, 21 May 1999 12:15:31 -0700 (Pacific Daylight Time) +Subject: Defining VCL-like framework for Python +In-Reply-To: +Message-ID: +Content-Length: 1617 +X-UID: 1897 + +> Do you happen to know where I could read what "environmental acquisition" +> is? Or, if you have a spare minute and the concept happens to be +> explainable in a sentence or two... + +There's a URL, but it's gone (temporarily, I'm sure). Jim gave a talk at +the DC FedUnix IPC on it, there might be something on www.python.org... . +(can't find anything detailed). + +The idea is that one can set things up so that instances get attributes +from their parents in a containment (has-a) hierarchy, not just the +inheritance (is-a) hierarchy. This makes sense for things like background +colors in GUI elements, for example -- the color of a widget should by +default be the color of the parent widget. That way you change the color +of the toplevel window, and all subwidgets get that color, except if they +override it "locally". + +Jim has some tools which use ExtensionClasses to make that happen: + +>>> class Window(Acquisition.Implicit): +... background = 'white' +... def __init__(self): +... self.menubar = MenuBar() +... +>>> class MenuBar(Acquisition.Implicit): +... def report(self): +... print "self.background =", self.background +... +>>> w = Window() +>>> w.menubar.report() +self.background = white + +It's very cool, somewhat non-trivial to use right (it affects the way one +designs massively), and requires a fairly deep brain-tweak. Still, worth +knowing about when designing a new framework where containment is such an +important notion. It's one of the few "new" concepts in programming that +I've seen in the last few years which I think has huge potential for +simplifying complex designs. + +--david + + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1898 b/demo/ermis-f/python_m/cur/1898 new file mode 100644 index 00000000..e69f13df --- /dev/null +++ b/demo/ermis-f/python_m/cur/1898 @@ -0,0 +1,136 @@ +From: MHammond at skippinet.com.au (Mark Hammond) +Date: Wed, 26 May 1999 11:11:00 +1000 +Subject: [Pythonwin] Help needed creating a Window +References: <374a6d02.4533518@NNRP.UK.INSNET.NET> +Message-ID: <7ifhkt$q4v$1@m2.c2.telstra-mm.net.au> +Content-Length: 3929 +X-UID: 1898 + +Dave Kirby wrote in message <374a6d02.4533518 at NNRP.UK.INSNET.NET>... +> +>>>> win = win32ui.CreateWnd() +>>>> win.CreateWindow( None, "", win32con.WS_CHILD, (0,0, 10,10), None, 0 ) +>Traceback (innermost last): +> File "", line 0, in ? +>SystemError: NULL result without error in call_object +> +>What am I doing wrong here? + +Damn. This is a stupid bug in Pythonwin. It is objecting to Parent being +None (although that is clearly valid). Fixed here, but that doesnt help you +for now :-( + +However, there are 2 other options. If the Pythonwin environment is +running, win32ui.GetMainFrame() will give you a window object. + + +>Once I have created the window, how do I +>get at its HWND? As far as I can tell there is no way to access it +>from a PyCWnd. Alternatively does the win32ui.Shell_NotifyIcon +>function accept a PyCWnd? (From a quick experiment it doesnt seem +>too). + +Once you have a Window object, wnd.GetSafeHwnd() will return an integer +handle. + +>As an alternative I tried the win32gui.CreateWindow function which +>does return a handle, but I got the following: +> +>>>> h = win32gui.CreateWindow( 0, "wibble", 0, 0,0, 10,10, 0, None) +>Traceback (innermost last): +> File "", line 1, in ? +>TypeError: CreateWindow requires exactly 11 arguments; 9 given +> +>The documentation only specifies 9 arguments, so I am stumped. I also + +Double-damn. The documentation is wrong. The correct signature is: + +int = CreateWindow( className, windowTitle , style , x , y , width , height +, parent , menu , hinstance , reserved ) + +eg: +>>> h = win32gui.CreateWindow( "edit", "wibble", 0, 0,0, 10,10, 0, 0, 0, +None) +>>> h + +>assume that if I got a HWND this way I would not be able to specify +>python message handlers for the window, which would defeat the whole +>point. + +Nope - you can: + +>>> w=win32ui.CreateWindowFromHandle(h) +>>> w +object 'PyCEdit' - assoc is 00832EE0, vf=False, notify=0,ch/u=0/0, mh=0, +kh=0 +>>> + +>Any help would be greatly appreciated, even if only to tell me that +>what I am doing is not possible in pythonwin. + +If you dont mind going a lower level still, I suggest the win32gui module - +only because it has everything needed for shell support built-in (and is +used for Windows CE). + +Below is a task-bar demo using win32gui: +# Creates a task-bar icon. Run from Python.exe to see the +# messages printed. +from win32api import * +from win32gui import * +import win32con + +class MainWindow: + def __init__(self): + message_map = { + win32con.WM_DESTROY: self.OnDestroy, + win32con.WM_USER+20 : self.OnTaskbarNotify, + } + # Register the Window class. + wc = WNDCLASS() + hinst = wc.hInstance = GetModuleHandle(None) + wc.lpszClassName = "PythonTaskbarDemo" + wc.style = win32con.CS_VREDRAW | win32con.CS_HREDRAW; + wc.hCursor = LoadCursor( 0, win32con.IDC_ARROW ) + wc.hbrBackground = win32con.COLOR_WINDOW + wc.lpfnWndProc = message_map # could also specify a wndproc. + classAtom = RegisterClass(wc) + # Create the Window. + style = win32con.WS_OVERLAPPED | win32con.WS_SYSMENU + self.hwnd = CreateWindow( classAtom, "Taskbar Demo", style, \ + 0, 0, win32con.CW_USEDEFAULT, win32con.CW_USEDEFAULT, \ + 0, 0, hinst, None) + UpdateWindow(self.hwnd) + + # Add the taskbar icon + hicon = LoadIcon(0, win32con.IDI_APPLICATION) + flags = NIF_ICON | NIF_MESSAGE | NIF_TIP + nid = (self.hwnd, 0, flags, win32con.WM_USER+20, hicon, "Python Demo") + Shell_NotifyIcon(NIM_ADD, nid) + + def OnDestroy(self, hwnd, msg, wparam, lparam): + nid = (self.hwnd, 0) + Shell_NotifyIcon(NIM_DELETE, nid) + PostQuitMessage(0) # Terminate the app. + + def OnTaskbarNotify(self, hwnd, msg, wparam, lparam): + if lparam==win32con.WM_LBUTTONUP: + print "You clicked me." + elif lparam==win32con.WM_LBUTTONDBLCLK: + print "You double-clicked me - goodbye" + PostQuitMessage(0) + return 1 + +def main(): + w=MainWindow() + PumpMessages() + +if __name__=='__main__': + main() +> +> Dave Kirby + + + + + + diff --git a/demo/ermis-f/python_m/cur/1899 b/demo/ermis-f/python_m/cur/1899 new file mode 100644 index 00000000..31bd6b5f --- /dev/null +++ b/demo/ermis-f/python_m/cur/1899 @@ -0,0 +1,38 @@ +From: just at letterror.com (Just van Rossum) +Date: Sun, 2 May 1999 00:42:59 GMT +Subject: Python T-shirt +In-Reply-To: <372B7136.4A561EF4@weihenstephan.org> +References: <372B7136.4A561EF4@weihenstephan.org> +Message-ID: +X-UID: 1899 + +At 11:25 PM +0200 5/1/99, Dr. Peter Stoehr wrote: +>Hi out there, +> +>I'm a great fan of python and try to use it as often as possible. +> +>Based on that, I'm looking for some "fan-articles" e.g. +> Python T-shirts +> Python pens +> Python coffee mugs +> ... + +As far as I know all conference t-shirts are sold out. + +>Is there something like this available ? +>If not, is there a bigger Python logo available than the one presented +>at +> http://www.python.org/psa/Logo.html +>so that I can use it to create my own T-shirt ? + +There's an EPS version at my own logo page: + + http://starship.python.net/~just/pythonpowered/ + +Just + + + + + + diff --git a/demo/ermis-f/python_m/cur/1900 b/demo/ermis-f/python_m/cur/1900 new file mode 100644 index 00000000..ec0f7d97 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1900 @@ -0,0 +1,49 @@ +From: dmiller at gwi.net (David Miller) +Date: Tue, 04 May 1999 02:57:10 GMT +Subject: ORA Programming Python sample problem +Message-ID: +Content-Length: 1170 +X-UID: 1900 + +I'm trying to run the demo code which came with the O'Reilly +Programming Python book. Specifically the "formgui.py" program +in the dbase directory. + +When I try the "next" button I get this error message on stdout: + +Exception in Tkinter callback +Traceback (innermost last): + File "/usr/local/lib/python1.5/lib-tk/Tkinter.py", line 752, in __call__ + return apply(self.func, args) + File "formgui.py", line 51, in onNext + self.display() + File "formgui.py", line 61, in display + self.keytext(key) # change key in main box +AttributeError: no __call__ method defined + + +The "next" method given in the book and source sample, in its +entirety is: + + def onNext(self): + if self.cursor >= len(self.index)-1: + self.infobox('Advance', "End of table") + else: + self.cursor = self.cursor + 1 + self.display() + + +And at this point I'm lost:( I'm assuming that this was valid +code under 1.3, the version used in the book, and that it's +no longer valid. But I'd love to have someone tell me why:) + +All hints, clues, comments welcome. Python 1.5.1, FreeBSD 2.2.7R. + + +Thanks, + +David Miller + + + + diff --git a/demo/ermis-f/python_m/cur/1901 b/demo/ermis-f/python_m/cur/1901 new file mode 100644 index 00000000..f369ecc8 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1901 @@ -0,0 +1,54 @@ +From: shecter at darmstadt.gmd.de (Robb Shecter) +Date: Thu, 27 May 1999 13:51:35 +0200 +Subject: Help: Have an instance, but can't access its info +Message-ID: <374D31C7.80437A60@darmstadt.gmd.de> +Content-Length: 1143 +X-UID: 1901 + +Hi, + +I'm having a strange problem, and it'd be great if someone has an +idea... I have the following code, which (I believe) returns a "Cookie" +object: + +db = CookieDB(filename='/path/to/cookies') +cookie = db.lookup(domain='hostname.de', path='/servlet') +print cookie +print cookie.name + +.....and here's the output: + +[] +Traceback (innermost last): + File "", line 15, in ? +AttributeError: name + +.....The source code (from Grail) for Cookie is: + + +class Cookie: + max_age = None + + def __init__(self, domain, path, secure, expires, + name, value, others=None): + self.domain = domain and string.lower(domain) + self.isdomain = domain and domain[0] == '.' + self.path = path + self.secure = secure + self.expires = expires and long(expires) or None + self.name = name + self.value = value + if others: + for k, v in others.items(): + setattr(self, k, v) + +....The strange thing is that there are other places where I get a +Cookie instance, and I have no problem accessing the object's fields. + +Thanks! +- Robb + + + + + diff --git a/demo/ermis-f/python_m/cur/1902 b/demo/ermis-f/python_m/cur/1902 new file mode 100644 index 00000000..29668759 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1902 @@ -0,0 +1,26 @@ +From: fredrik at pythonware.com (Fredrik Lundh) +Date: Mon, 10 May 1999 07:55:38 GMT +Subject: Python Basic Authentication source? +References: +Message-ID: <009501be9aba$7ffaa5c0$f29b12c2@pythonware.com> +X-UID: 1902 + +Sean Hummel wrote: +> I am looking for code which can generate the HTTP Basic authentication +> header, from a user name and header. Anyone have any such code? + +import base64, string +auth = string.strip(base64.encodestring("%s:%s" % (user, password))) +print "Authorization: Basic %s" % auth + +btw, urllib can handle basic authentication for you, if you give +the URL as: + + http://user:password at host/... + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1903 b/demo/ermis-f/python_m/cur/1903 new file mode 100644 index 00000000..e4583073 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1903 @@ -0,0 +1,57 @@ +From: gmcm at hypernet.com (Gordon McMillan) +Date: Fri, 7 May 1999 03:30:05 GMT +Subject: Variable 'superclass'es? +In-Reply-To: <37329e5c@news1.jps.net> +References: <37329e5c@news1.jps.net> +Message-ID: <1286074466-110801589@hypernet.com> +X-UID: 1903 + +Zigron writes: + +> I think the word is 'superclass'..hm. Anyways. +> +> What I want is a class, that inherits from a variable class. +> +> For instance: +> +> _Parent = ParentClass1 +> +> class FirstParent: +> ... +> +> class SecondParent: +> ... +> +> class Child(_Parent): +> ... +> +> class Invoker: +> def __init__(self): +> if expression = 1: +> _Parent = SecondParent +> kid = Child() +> +> --------- +> Seeeeee what i'm trying to do? Can it be done? + +Sure can, but not quite like that. The problem is that when the +"class Child..." statement is hit, _Parent is FirstParent. +Reassigning to _Parent doesn't work, because the "class" statement +has already been executed. + +Under 1.5.1 and prior, you would have to use some obtuse hackery to +get this to work, (like the metaclass hook, or building the class def +in a string, and eval-ing it...). + +Under 1.5.2, it's a piece of cake. + +c = Child() +c.__class__.__bases__ = (SecondParent,) + +Voila. + +- Gordon + + + + diff --git a/demo/ermis-f/python_m/cur/1904 b/demo/ermis-f/python_m/cur/1904 new file mode 100644 index 00000000..1b36f6fc --- /dev/null +++ b/demo/ermis-f/python_m/cur/1904 @@ -0,0 +1,47 @@ +From: gmcm at hypernet.com (Gordon McMillan) +Date: Tue, 18 May 1999 23:55:04 -0500 +Subject: while (a=b()) ... infinite sets digression +In-Reply-To: <3742228D.7B5C@cosc.canterbury.ac.nz> +Message-ID: <1285032566-173470670@hypernet.com> +Content-Length: 1154 +X-UID: 1904 + +Greg Ewing wrote: + +> Chad Netzer wrote: +> > +> > So, there are infinitely more strings which start with underscores than do not, +> +> Hmmm... this would seem to imply that there are +> infinitely many more strings starting with any +> given character than any other character. +> +> Which seems absurd. Although where infinities +> are involved, that doesn't necessarily mean it's +> not true... +> +> Tricky and dangerous beasts, these infinities! + +Unfortunately, Chad mispoke. For any string beginning with an +underscrore there are (num_possible_characters-1) strings not +beginning with an underscore (just replace that first character). + +But if there are Aleph-nought strings beginning with underscore, +there are N*Aleph-nought == Aleph-nought not beginning with +underscore. + +Chad's trickery is in trying to get you to assume that Aleph-nough +minus Aleph-nought is 0. Nice try. + +All this assumes, of course, that you allow strings of infinte +length. Personally, I don't. And since strings don't have sides, you +can't even fake one by folding a finite-lengthed one into a Mobius +string. + +though-some-forms-of-Unicode-come-close-ly y'rs + +- Gordon + + + + diff --git a/demo/ermis-f/python_m/cur/1905 b/demo/ermis-f/python_m/cur/1905 new file mode 100644 index 00000000..bcb02df4 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1905 @@ -0,0 +1,119 @@ +From: pointal at lure.u-psud.fr (Laurent POINTAL) +Date: Tue, 11 May 1999 12:37:45 GMT +Subject: My quarterly question on Design by Contract in Python... +References: <000701be9925$4690ffa0$bd9e2299@tim> <373439CB.BA8A94CE@webone.com.au> <19990511065256.B552436@vislab.epa.gov> +Message-ID: <37382397.969598328@news.u-psud.fr> +Content-Length: 2933 +X-UID: 1905 + +On Tue, 11 May 1999 06:52:56 -0400, Randall Hopper + wrote: + +>: In this case, if -O is given, will PRE/POST functions be generated, and +>: called when invoked? Is there a way to have PRE and POST invocations +>: effectively be no-ops? Ala: +>: +>: #ifdef DEBUG +>: # define PRE(x) assert(x) +>: #else +>: # define PRE(x) +>: #endif +>: + +I wrote a small tool to automatically comment/uncomment blocs of code +between balises like # and #. +Not perfect (especially if the two balises are not set +correspondingly). Maybe can be optimized. But it does its job and it +took only on quarter of hour to write. + +A+ + +Laurent. + + +Here my conditional.py file: +------------------------------------------------------------------ +"""Change comments status on conditional code in Python. + +Generally used to automatically comment/uncomment a serial of lines +between two marks, generally debugging lines. + +To comment : python conditional.py COND_SYMB fileName +To uncomment : python conditional.py /COND_SYMB fileName +""" + +from sys import argv, exit +from string import find, whitespace + +def CountSpaces (l) : + cpt = 0 + for c in l : + if (not c in whitespace) : return cpt + cpt = cpt + 1 + +def Work (lines, symbol, bComment) : + niv = 0 # Number of symbol counted. + blancs = 0 + for i in range(len(lines)) : + l = lines[i] + + # Search # + if (find (l, "#") != -1) : + niv = niv-1 + if (niv == 0) : + blancs = 0 + continue + + # Search # + if (find (l, "#<"+symbol+">") != -1) : + niv = niv+1 + if (niv == 1) : + blancs = CountSpaces (l) + continue + + # Process lines between symbols. + if (niv > 0) : + if (bComment) : + l = l[0:blancs] + "#" + l[blancs:] + else : + l = l[0:blancs] + l[blancs+1:] + lines[i] = l + + return lines + +if __name__ == '__main__' : + if (len (argv) != 3) : + print "Usage: python conditional.py symbol fileName" + print " If symbol is in the form SYMBOL, conditional lines +are commented." + print " If symbol is in the form /SYMBOL, conditional lines +are uncommented." + exit () + + # Get symbol. + symb = argv[1] + if (symb[0]=='/') : + symb = symb[1:] + bComment = 0 + else : + bComment = 1 + + # Read file. + lines = open (argv[2], "r").readlines () + + # Work. + lines = Work (lines, symb, bComment) + + # Write file. + open (argv[2], "w").writelines (lines) +------------------------------------------------------------------ + + +--- +Laurent POINTAL - CNRS/LURE - Service Informatique Experiences +Tel/fax: 01 64 46 82 80 / 01 64 46 41 48 +email : pointal at lure.u-psud.fr ou lpointal at planete.net + + + + diff --git a/demo/ermis-f/python_m/cur/1906 b/demo/ermis-f/python_m/cur/1906 new file mode 100644 index 00000000..eef30e82 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1906 @@ -0,0 +1,44 @@ +From: earlybird at mop.no (Alexander Staubo) +Date: Mon, 24 May 1999 06:17:04 +0200 +Subject: Defining VCL-like framework for Python +References: <1284777593-1647219@hypernet.com> <7i9nn5$a9m$1@cronkite.cc.uga.edu> <3748B569.3973A8E4@palladion.com> +Message-ID: +Content-Length: 1645 +X-UID: 1906 + +In article <3748B569.3973A8E4 at palladion.com>, tseaver at palladion.com says... +> Graham Matthews wrote: +[snip] +> > So how does a framework differ from a GUI toolkit with several abstraction +> > layers? +> +> A toolkit is like a box of Legos: you snap the supplied pieces together as you +> see fit, supplying all the "structure" of you app de novo; a frameword IS that +> structure, prebuilt, with pre-defined "hotspots" at which you can plug in +> specializations of a set of interfaces defined by the framework. If the +> framework's internal model of the problem domain is appropriate to your +> application, you write maybe 10% or less of the code required to implement the +> same app using the toolkit; this is the classic "programming by difference." +> Mismatches between the framework's paradigm and your needs are VERY hard to work +> around, however (you can't add unforeseen hotspots to a framework without +> hacking into it). + +Actually, the Delphi VCL is pretty good at avoiding this problem, as it is +extremely open-ended and doesn't exclusively subscribe to the "black box" +philosophy of (eg.) Visual Basic. Otoh, it _can_ be viewed as a black box, an +intensional side-effect of its strict component/publishing design. + +Incidentally, the VCL does not preclude mixing frameworks. It's possible to +write programs that utilize the Win32 API, and then have one deeply implemented +function bring up a Delphi form. Delphi's VCL structure does not force the +framework on you. + +Imho a good Python GUI framework should not limit your application to using +only that one framework. + +-- +Alexander Staubo http://www.mop.no/~alex + + + + diff --git a/demo/ermis-f/python_m/cur/1907 b/demo/ermis-f/python_m/cur/1907 new file mode 100644 index 00000000..b68346c7 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1907 @@ -0,0 +1,38 @@ +From: ddainese40x at x44dsi.unive.it (Diego Dainese) +Date: 10 May 1999 18:03:48 GMT +Subject: dictionary object +Message-ID: +X-UID: 1907 + +Hi, + +I have a question regarding the dictionary objects: in a dictionary +where the values are tuples, is it possible to get the tuple with a +given key and to change the value of one element of this tuple using +only one key lookup? + +In example, if dict is defined like this: + + value1 = "hello one" + value2 = "hello two" + dict = { "pluto" : (10, value1), "pippo" : (20, value2) } + +And I want to get the first element of the tuple with the key "pluto" +and change the second element of this same tuple, I must do something +like this: + + num = dict["pluto"][0] + dict["pluto"]= (num, "hello three") + +Thus making two key lookups. There is a better way to do it? + +Thanks in advance, + +-- +Diego Dainese +To reply me, remove the numbers and the `x' from my address +Sorry for my bad English! + + + + diff --git a/demo/ermis-f/python_m/cur/1908 b/demo/ermis-f/python_m/cur/1908 new file mode 100644 index 00000000..b5a9f1f0 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1908 @@ -0,0 +1,28 @@ +From: philh at vision25.demon.co.uk (Phil Hunt) +Date: Sun, 23 May 99 01:29:00 GMT +Subject: Python: performance, footprint, multi-threading, etc. +References: <37458E5F.78B3A88D@tdv.com> +Message-ID: <927422940snz@vision25.demon.co.uk> +X-UID: 1908 + +In article <37458E5F.78B3A88D at tdv.com> timb at tdv.com "Tim Browse" writes: +> Performance +> +> I haven't checked the performance of Python yet - I don't know if it +> will be fast enough for our purposes. This isn't a question about +> Python speed etc.; I'm merely stating this now to pre-empt any "You +> lamer! Python is too slow for games" responses :). + +Persumably, you won't be writing all the game in Python, just some +of it. + +So I don't think there will be in practice any problems with speed -- +because if there are problems, you just rewrite those bits in C++. + +-- +Phil Hunt....philh at vision25.demon.co.uk + + + + + diff --git a/demo/ermis-f/python_m/cur/1909 b/demo/ermis-f/python_m/cur/1909 new file mode 100644 index 00000000..548794c4 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1909 @@ -0,0 +1,22 @@ +From: wpeterson at cfa.harvard.edu (William Peterson) +Date: Tue, 18 May 1999 18:00:50 -0400 +Subject: Tkinter book listed on books.com +References: <3741907E.26DF7890@cfa.harvard.edu> <039701bea160$814d9430$f29b12c2@pythonware.com> +Message-ID: <3741E311.D5ED6380@cfa.harvard.edu> +X-UID: 1909 + +Are you just going to tease us with this, or can you post some +information about the other "tkinter book in production..."? + +Fredrik Lundh wrote: + +> despite what they say, grayson's book isn't the only non- +> source code documentation. nor is it the only tkinter +> book in production... +> +> + + + + + diff --git a/demo/ermis-f/python_m/cur/1910 b/demo/ermis-f/python_m/cur/1910 new file mode 100644 index 00000000..723e8f5a --- /dev/null +++ b/demo/ermis-f/python_m/cur/1910 @@ -0,0 +1,34 @@ +From: fredrik at pythonware.com (Fredrik Lundh) +Date: Fri, 7 May 1999 10:48:21 GMT +Subject: A Catch-all Exception-Handler +References: <7gu39c$i63$1@nnrp1.deja.com> +Message-ID: <009001be987b$a46081a0$f29b12c2@pythonware.com> +X-UID: 1910 + +Norbert Klamann wrote: +> since some weeks I do serious work with Python and I like it very much. +> I wrote some scripts which run nightly in batch . At the moment I don't +> see a possibility to make any unforeseen exceptions visible. +> +> The scripts print to stdout and in case of an exceptional exception I would +> like to see a traceback on Stdout. +> +> If possible I wouldn't like to clutter the code with try's and except's at +> every second line. + +import traceback, sys + +for stuff in things_to_do(): + try: + do(stuff) + print stuff, "ok" + except: + print stuff, "FAILED" + traceback.print_exc(file=sys.stdout) + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1911 b/demo/ermis-f/python_m/cur/1911 new file mode 100644 index 00000000..47380813 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1911 @@ -0,0 +1,18 @@ +From: achrist at easystreet.com (Al Christians) +Date: Sun, 02 May 1999 17:19:26 -0700 +Subject: Books on Python (for OO merit) +References: <372BEA9D.CAA0A5B7@earthlink.net> <7ghscn$337@chronicle.concentric.net> <372C8680.90FBDBD1@earthlink.net> +Message-ID: <372CEB8E.F0B8B44A@easystreet.com> +X-UID: 1911 + +William Tanksley wrote: + +> Does anyone have some recommendations? + +The first edition of OOD by Booch. Object Oriented Methods by Graham. + +Al + + + + diff --git a/demo/ermis-f/python_m/cur/1912 b/demo/ermis-f/python_m/cur/1912 new file mode 100644 index 00000000..c5416bbb --- /dev/null +++ b/demo/ermis-f/python_m/cur/1912 @@ -0,0 +1,28 @@ +From: Cepl at fpm.cz (=?iso-8859-2?Q?Mat=ECj_Cepl?=) +Date: Mon, 10 May 1999 09:48:01 +0100 +Subject: A Python take on "Programming Web Graphics with Perl and..." +Message-ID: <1318D78C9072D11195C9006094EA98A7298D40@ocesrv> +X-UID: 1912 + +> -----Original Message----- +> From: Stuart Hungerford +> Subject: Re: A Python take on "Programming Web Graphics with Perl +> and..." +> Date: Sat, 08 May 1999 09:55:02 +1000 +> Organization: Web One Internet http://webone.com.au +> To: Joe Strout +> +> > still... check out PIDDLE, which can directly create documents in a +> > variety of formats (when it's done, which it is not quite yet): +> > +> > http://www.strout.net/python/piddle/ +> + [MCepl] Is there anybody considering Python rewrite of HTML2Ps +(which needs rewrite anyway, according to its author)? + + +Matthew + + + + diff --git a/demo/ermis-f/python_m/cur/1913 b/demo/ermis-f/python_m/cur/1913 new file mode 100644 index 00000000..36879aec --- /dev/null +++ b/demo/ermis-f/python_m/cur/1913 @@ -0,0 +1,27 @@ +From: bwarsaw at cnri.reston.va.us (Barry A. Warsaw) +Date: Mon, 24 May 1999 17:23:26 -0400 (EDT) +Subject: Reporting bugs in a specific module? +References: <87zp2ucn5q.fsf@pc-hrvoje.srce.hr> +Message-ID: <14153.49998.125977.668943@anthem.cnri.reston.va.us> +X-UID: 1913 + +>>>>> "HN" == Hrvoje Niksic writes: + + HN> What is the canonical procedure for reporting bugs in a + HN> specific python module? Is there a "maintainer address" for + HN> modules? + + HN> Specifically, I've noticed several deficiencies in the CGI + HN> module which I would like to report and possibly fix. + HN> However, I don't know who to talk to about them. + +I don't have a good answer for the specific issue you raise, however +when Guido gets back, I'll try to reach closure on getting the +Jitterbug database for Python online. Each module or suite of modules +could have it's own folder. + +-Barry + + + + diff --git a/demo/ermis-f/python_m/cur/1914 b/demo/ermis-f/python_m/cur/1914 new file mode 100644 index 00000000..63b8f87e --- /dev/null +++ b/demo/ermis-f/python_m/cur/1914 @@ -0,0 +1,84 @@ +From: emile at fenx.com (Emile van Sebille) +Date: Tue, 4 May 1999 18:17:41 -0700 +Subject: Newbie asks about static variables... +References: <7gn9a7$hg9$1@nnrp1.dejanews.com> <372F3FFF.E247C288@pop.vet.uu.nl> <8sHX2.66$eD1.21692@news.corridex.com> +Message-ID: <01NX2.25$VL2.3392@news.direcpc.com> +Content-Length: 1712 +X-UID: 1914 + +Being also new at Python, doesn't your example follow the example from +section 4.7 of the tutorial? + +Why is this *evil*? It's right there in the tutorial. What is Guido not saying? What are the +dangers? Where is the case study? + + +Important warning: The default value is evaluated only once. This makes a +difference when the default is a mutable object such as a list or +dictionary. For example, the following function accumulates the arguments +passed to it on subsequent calls: + + +def f(a, l = []): + l.append(a) + return l +print f(1) +print f(2) +print f(3) + +This will print + + +[1] +[1, 2] +[1, 2, 3] + +If you don't want the default to be shared between subsequent calls, you can +write the function like this instead: + + +def f(a, l = None): + if l is None: + l = [] + l.append(a) + + + +trying-my-best-to-keep-up-and-make-sense-of-it-all-ly y'rs + +Emile van Sebille +emile at fenx.com +------------------- + + +Evan Simpson wrote in message +news:8sHX2.66$eD1.21692 at news.corridex.com... +> If you *really*, *really* want a function-private static, you could write +> this: +> +> def killParrot(no_of_calls=[0]): +> # do stuff +> print "Number of calls is %d" % no_of_calls[0] +> no_of_calls[0] = no_of_calls[0] + 1 +> +> >>> killParrot() +> Number of calls is 0 +> >>> killParrot() +> Number of calls is 1 +> >>> +> +> This is also a case study in the dangers of mutable default parameters. +> +> I wouldn't normally mention a wierd idiom like this in the presence of a +> newbie, but I'm feeling evil. +> +> with-a-stomach-flu-and-in-the-mood-to-spread-the-suffering-ly y'rs +> Evan Simpson +> + + + + + + diff --git a/demo/ermis-f/python_m/cur/1915 b/demo/ermis-f/python_m/cur/1915 new file mode 100644 index 00000000..2ce35da8 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1915 @@ -0,0 +1,53 @@ +From: Matt at mpcm.com (MPCM) +Date: Sun, 09 May 1999 20:56:28 -0400 +Subject: Pentium III Chips Released with IDs - Intel won't budge +References: <3764acce.5879494@news.earthlink.net> +Message-ID: <37362EBC.8D020ECA@mpcm.com> +Content-Length: 1683 +X-UID: 1915 + +Think about this, if you want privacy don't go online. In order to exist +in this wonderful cyber space, energy has to be sent back to you to +complete the circuit (communication at the simplest level). They know +where you are anyway, I am all for the boycott and other things, but the +truth is people don't care and would rather be ignorant, so lay off. + +Intel No Privacy wrote: +> +> Pentium III chip with the individual serial number that can +> track your web surfing and buying habits can now have the ID number +> turned on and off by software. Following some links I found the +> www.fightdivx.com website and noticed that they have a Intel Boycott +> page with links, quotes and info on why you should boycott the +> invasion of privacy Pentium III chips. Just like everyone suspected, +> the ID number can be taken without a customers knowledge. Just like +> cellular phone fraud, once someone has your unique ID number, they +> could pose as you on the internet. Do not be fooled by reports that +> this problem is fixed because Intel disabled this feature by software +> on their up coming chips. Information is power. They want to know +> your surfing and buying habits. That is what this is all about. Here +> is the link to the page with the boycott info and links. +> +> http://www.fightdivx.com/intelboycott.htm +> +> Also you will find a Boycott Intel screen saver and banner on their +> page above. Spread it around. + +-- +Sincerely, + +Matt Morley +c/o MPCM Graphics + +http://www.mpcm.com +"Creating a reality that others only dream of" +-MPCM Graphics + +AOL Instant Messenger Screen Name: MPCMGrafix +ICQ Number: 9399711 + +Custom Designed Computer Graphics and Web Solutions. + + + + diff --git a/demo/ermis-f/python_m/cur/1916 b/demo/ermis-f/python_m/cur/1916 new file mode 100644 index 00000000..316b4fde --- /dev/null +++ b/demo/ermis-f/python_m/cur/1916 @@ -0,0 +1,18 @@ +From: bouncing at _nospam_velocitypenguin.com (Ken Kinder) +Date: Thu, 20 May 1999 21:46:42 -0600 +Subject: Sorry, another simple question +References: <7huq5u$hsb@wapping.ecs.soton.ac.uk> +Message-ID: <927258465.456687922@news.plinet.com> +X-UID: 1916 + +On Wed, 19 May 1999, Joseph Kuan wrote: +>How to derive the range function for a particular class? +> +>I tried with __range__ but it doesn't work. + +Be more descripte; what does range() have to do with any classes? It returns a +list of numbers. + + + + diff --git a/demo/ermis-f/python_m/cur/1917 b/demo/ermis-f/python_m/cur/1917 new file mode 100644 index 00000000..8c18206a --- /dev/null +++ b/demo/ermis-f/python_m/cur/1917 @@ -0,0 +1,55 @@ +From: tismer at appliedbiometrics.com (Christian Tismer) +Date: Thu, 13 May 1999 17:50:58 GMT +Subject: How to compile a multi-line function definition ? +References: <373B0720.FE771511@unice.fr> +Message-ID: <373B1102.DE2EA277@appliedbiometrics.com> +Content-Length: 1596 +X-UID: 1917 + + +Jerome ALET wrote: +> +> Hi there, +> +> I've just read the complete Python's documentation (well, almost :-) and +> I've found nothing to solve my problem. This doc is very good but lacks +> examples, IMHO. +> +> Given the following sample of code which works fine in Python 1.5.2, I +> want to know how to define a multi-line "my_function". Every time I try +> something I get a syntaxerror or something similar. +> +> -------- CUT ------------ +> # mytest.py +> # module to do some testing +> class MyClass : +> loc = locals() +> def __init__(self) : +> exec(compile("def my_function(self, a, b) : print a, b, +> '<==>', b, a""", "", "exec"), self.loc) +> ---------- CUT ---------- + +Your code string is missing a "\n" at its end. + +BTW, what are you trying to achieve? It doesn't look like +the right path, I guess. Where do you want to put "my_function", +shall that become a new method for your instance? +Will not work, although there are ways to do this. + +But before, I suggest to play more with classes and instances +in the way they are designed for, then you might be able to +avoid tricks like generating code. + +cheers - chris + +-- +Christian Tismer :^) +Applied Biometrics GmbH : Have a break! Take a ride on Python's +Kaiserin-Augusta-Allee 101 : *Starship* http://starship.python.net +10553 Berlin : PGP key -> http://wwwkeys.pgp.net +PGP Fingerprint E182 71C7 1A9D 66E9 9D15 D3CC D4D7 93E2 1FAE F6DF + we're tired of banana software - shipped green, ripens at home + + + + diff --git a/demo/ermis-f/python_m/cur/1918 b/demo/ermis-f/python_m/cur/1918 new file mode 100644 index 00000000..89c86691 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1918 @@ -0,0 +1,60 @@ +From: quinn at necro.ugcs.caltech.edu (Quinn Dunkan) +Date: 3 May 1999 18:49:27 GMT +Subject: Indentation on WinNT +References: <372D7DDB.CF5C5588@t-online.de> <1286381846-92313087@hypernet.com> +Message-ID: +Content-Length: 1911 +X-UID: 1918 + +On Mon, 3 May 1999 14:07:12 GMT, Gordon McMillan wrote: +>Monika G?hmann writes: +>> +>> the concept of using indentation-only structuring in Python code is +>> very nice -- as long as everybody uses Unix and/or reasonable +>> settings with their editor. +>> +>> I have to work with WinNT and when I display code which was +>> developed on Unix it sometimes is all messed up looking like this: +>> +>> if something: +>> if something_else: +>> do this +>> do that +>> +>> So what does this code do ? +>> +>> Is there any way to get this displayed correctly with Vim5.3 or any +>> other editor ? +> +>This is certainly not a general problem of WIndows vs *nix, both of +>which defer all misconceptions about tabs to the viewer / editor. +>(Many email clients are totally brain dead about tabs, and show +>a leading tab as one space.) +> +>My guess is that you're looking at something written as tab=8, +>indent=4 with an editor set for tab=4. If you're using vim, just +>reset your tabstops and see if it looks right. +> +>You could also try: +> http://www.mcmillan-inc.com/dnld/tabcleaner.py + +In my .vimrc I have: + +se et ts=8 sw=4 softtabstop=4 smarttab + +This means that reading files with 8 char tabs will work fine, and all tabs I +enter are 4 chars, all spaces (which is recommended python style). Without +softtabstop, smarttab will alternately insert tabs and spaces which looks wacky +on an editor with ts != 8. Also, in vim, the :retab command can be useful for +this sort of thing. Also, :se list will show you which whitespace is tabs and +which is just space. + +And, of course, this thread wouldn't be complete without the admonition to +avoid spreading the evil whitespace-virus. If you think you have it, stay in +your room, burn your clothes, set the thermostat way up, and program +exclusively in tcl. Hopefully this will create a hostile enough environment to +kill it or drive it off. + + + + diff --git a/demo/ermis-f/python_m/cur/1919 b/demo/ermis-f/python_m/cur/1919 new file mode 100644 index 00000000..2e587b0b --- /dev/null +++ b/demo/ermis-f/python_m/cur/1919 @@ -0,0 +1,45 @@ +From: robin.boerdijk at nl.origin-it.com (Robin Boerdijk) +Date: Mon, 24 May 1999 13:59:11 +0200 +Subject: Module initialization problem when using COM +References: <0E16861EE7BCD111BE9400805FE6841F0949A5B2@c1s5x001.cor.srvfarm.origin-it.com><7i4sgb$3c5$1@m2.c2.telstra-mm.net.au> +Message-ID: <0E16861EE7BCD111BE9400805FE6841F0958133E@c1s5x001.cor.srvfarm.origin-it.com> +Content-Length: 1172 +X-UID: 1919 + +Bill Janssen wrote in message +news:UrFUybMB0KGWE_eBR4 at holmes.parc.xerox.com... +> The ILU module initialization doesn't do anything much. It only makes +> two calls into the ILU library itself, and both are minor calls that can +> be made indefinitely often. I wouldn't expect it to crash if it was +> called more than once, unless perhaps Python itself objects to calling +> things like Py_InitModule() more than once. +> +> Bill + +Well, actually, the crash is caused by the + + _ilu_Assert(theNoters[lang]==NULLFN, "SetNoter: already set"); + +assertion in ilu_SetNoter() in ILU2.0alpha13\runtime\kernel\object.c(57), +which is called from the initiluPr() initialization function of the iluPr +module. I'm quite happy with this assertion because the initiluPr() function +should really be called only once. This assertion caught a bug that is +probably somewhere outside of ILU, as I tried to demonstrate in my original +post. To me, this shows the quality of the ILU code: it even catches +external bugs (albeit at the price of crashing itself ). + +Robin + +"Good software catches its own bugs. Excellent software also catches the +others." + + + + + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1920 b/demo/ermis-f/python_m/cur/1920 new file mode 100644 index 00000000..f65a6964 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1920 @@ -0,0 +1,37 @@ +From: olipt at mayo.edu (Travis Oliphant) +Date: Fri, 30 Apr 1999 23:11:18 -0500 +Subject: Vtk works fine, but not with Python ... ??? +In-Reply-To: +References: +Message-ID: +X-UID: 1920 + +> I'm using Python 1.5.2 under RedHat Linux 5.0. I have recently +> downloaded and built vtk, including the Python wrappers. I have +> followed the instructions given on the vtk web site (summarized +> below), and the result is a version of vtk which works fine under tcl +> and as a stand-alone. All example scripts I try to run via vtk work +> perfectly. +> +> However, when I try to run any vtk Python examples, I get the +> following error no matter what script I try to run: +> +> % python earth.py +> Traceback (innermost last): +> File "earth.py", line 4, in ? +> from libVTKGraphicsPython import * +> ImportError: /usr/local/lib/python1.5/lib-dynload/libVTKGraphicsPython.so: +> undefined symbol: XtStrings + +No ideas but I'm in the same boat and get the same error, this under +Redhat 5.2. + +I'd love to hear from somebody who's fixed this problem. + + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1921 b/demo/ermis-f/python_m/cur/1921 new file mode 100644 index 00000000..351d86ca --- /dev/null +++ b/demo/ermis-f/python_m/cur/1921 @@ -0,0 +1,57 @@ +From: wtanksle at dolphin.openprojects.net (William Tanksley) +Date: Sun, 02 May 1999 20:14:22 GMT +Subject: Emulating C++ coding style +References: <371F8FB7.92CE674F@pk.highway.ne.jp> <3720675C.FF7A9E99@gssec.bt.co.uk> <3727DE55.EA5B4BAF@palladion.com> +Message-ID: +Content-Length: 1939 +X-UID: 1921 + +On Wed, 28 Apr 1999 23:21:41 -0500, Tres Seaver wrote: +>William Tanksley wrote: + +>> On Fri, 23 Apr 1999 13:28:12 +0100, Alan Gauld wrote: + +>> >> In proper C++, your const will be contained inside a class (probably +>> >> static) to keep it out of the global namespace. + +>> >Hopefully not. It should be contained within a C++ namespace. + +>> Okay, I'll bite. Why "hopefully not" a class? I know namespaces are new +>> and cool, but classes seem to have done the job very well in the past. +>> Have they been secretly causing bloat in our code all along ;-)? + +>Classes are semantically "heavier" than namespaces: by design, they exist to +>classify objects. Classes which exist only to scope other names (typedefs, +>constants, free functions), while a decent workaround before the ANSI standard, +>are now less attractive (they can't be reopened, for one thing). + +Now that makes a lot of sense. + +However, investigating my code for compliance with this statement, I find +that every time I've declared consts or enums it's always been part of a +class's state. So I can't just move it out into a namespace without +having it look odd. + +In the future, though, my design will include the use of namespaces for +inherited state enumerations (i.e. ones which descendant classes may be +expected to use). + +What does THIS, you ask, have to do with Python? Well, it serves to +reiterate my point: don't break a cool feature by not planning it out +completely. C++ broke a LOT of things that way. + +Speaking of which, I'm kind of wondering how to take the address of a +function in C++ in the presence of overloading. In C it was trivial, but +in C++ you can't distinguish between different functions based only on +names. Odd... I can't find anything which mentions how to do that. + +>Tres Seaver tseaver at palladion.com 713-523-6582 + +-- +-William "Billy" Tanksley +"But you shall not escape my iambics." + -- Gaius Valerius Catullus + + + + diff --git a/demo/ermis-f/python_m/cur/1922 b/demo/ermis-f/python_m/cur/1922 new file mode 100644 index 00000000..01ca50ca --- /dev/null +++ b/demo/ermis-f/python_m/cur/1922 @@ -0,0 +1,52 @@ +From: rstephan at yahoo.com (Roy Stephan) +Date: Tue, 18 May 1999 12:05:04 GMT +Subject: Python vs. VB +References: <37407bc5.343558265@news.esinet.net> <7hq29e$kgs$1@Starbase.NeoSoft.COM> <7hqk21$55l$1@Starbase.NeoSoft.COM> +Message-ID: <3741546e.399023875@news.esinet.net> +Content-Length: 1559 +X-UID: 1922 + +On 17 May 1999 21:42:09 -0500, claird at Starbase.NeoSoft.COM (Cameron +Laird) wrote: + +>In article , +>Tom Culliton wrote: + +>I wasn't clear. I agree there is a plethora of exist- +>ing issues with VB. I intended to write, "If your +>organization already has a particular concern about +>VB, ..." +>-- + +great stuff so far! + +more our particular situation: +We were suprised at how difficult it was to include DLL's from VB into +Delphi. Python has a 'simple example' that does just that. + + We have already decided to use C++ for time intensive execution, +what we are concerned with now is our higher level +business/COM/'logic' objects. We are writting a thin interface layer +in ASP (perlscript, most likely) which will connect to deeper logic +COM objects. I think that Python would be perfect. Unfortunately VB +has a lot of momentum here. + + Basically we are looking for a high speed of development and an +ability to go back and change the logic quickly and easily as +specifications shift like sand dunes. VB seems to offer these things +but the structures are not as reliable as Python's. Also they are +based towards the Visual, which does not even play in this equation. +I shudder whenever I look at what passes for an object in VB, and +Python just seems so smooth in all respects. + +Thanks for all the help so far! I welcome any new angles/comments. +--Roy + +> +>Cameron Laird http://starbase.neosoft.com/~claird/home.html +>claird at NeoSoft.com +1 281 996 8546 FAX + + + + + diff --git a/demo/ermis-f/python_m/cur/1923 b/demo/ermis-f/python_m/cur/1923 new file mode 100644 index 00000000..2c5e908a --- /dev/null +++ b/demo/ermis-f/python_m/cur/1923 @@ -0,0 +1,23 @@ +From: mstenber at cc.Helsinki.FI (Markus Stenberg) +Date: 10 May 1999 08:23:22 +0300 +Subject: Is there a Python class browser? +Message-ID: +X-UID: 1923 + +And to clarify, I mean multi-file/module browser; like OO-Browser from +altrasoft, but something with slightly more student-friendly licensing +system (or even free). Idle looked good but afaik does it only for one +module (and has editor built-in; I'd rather use XEmacs, thankyouverymuch) + +I've gotten desperate enough that I've actually thought of writing one :P +I'd like to hear of such beast before I hit JPython and well, once you've +done that, there is no going back ;-) + +-- +UNIX sysadmin's day: + gawk; talk; date; wine; grep; touch; unzip; touch; gasp; finger; gasp; + mount; fsck; more; yes; gasp; umount; make clean; make mrproper; sleep + + + + diff --git a/demo/ermis-f/python_m/cur/1924 b/demo/ermis-f/python_m/cur/1924 new file mode 100644 index 00000000..b266d168 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1924 @@ -0,0 +1,22 @@ +From: sasha at tunes.com (Voynow, Sasha) +Date: Wed, 19 May 1999 21:18:25 -0800 +Subject: trying to get started with PIL +References: +Message-ID: +X-UID: 1924 + +Oops, nevermind. +Serves me right for not doing a dejanews search before posting. It was the +package install problem. Sorry to trouble you good folks. + +Sasha Voynow + +sasha at tunes.com + + + +**** Posted from RemarQ - http://www.remarq.com - Discussions Start Here (tm) **** + + + + diff --git a/demo/ermis-f/python_m/cur/1925 b/demo/ermis-f/python_m/cur/1925 new file mode 100644 index 00000000..0065bb11 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1925 @@ -0,0 +1,33 @@ +From: boud at rempt.xs4all.nl (Boudewijn Rempt) +Date: Fri, 14 May 1999 18:11:57 GMT +Subject: Bug or feature? +References: <001201be9e0b$eb455150$f29b12c2@pythonware.com> +Message-ID: +X-UID: 1925 + +Fredrik Lundh wrote: +> +> maybe some of the recent posters could shed some light on +> this: where did you learn about class variables in the first +> place? and if you used them in an earlier life, what made +> you start using them in Python? +> + +Well, I'm not a recent poster - more like a recent convert. I guess +I did learn about class variables in Internet Programming with Python, +but I didn't understand the implications until I came across the +task of building a reference counter in Visual Basic. Anyway, the +confusion was of a short duration. The tutorial did little for me, +however, it's often only after I've figured something out for myself +that it begins to make sense. + +I've still got some trouble wrapping my mind around not being able +to assign names to elements of tuples, though. Nothing that time +and more knowledge won't heal, I'm sure. +-- + +Boudewijn Rempt | www.xs4all.nl/~bsarempt + + + + diff --git a/demo/ermis-f/python_m/cur/1926 b/demo/ermis-f/python_m/cur/1926 new file mode 100644 index 00000000..86cca592 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1926 @@ -0,0 +1,15 @@ +From: guido at eric.cnri.reston.va.us (Guido van Rossum) +Date: 30 Apr 1999 23:46:16 -0400 +Subject: Python documentation updated! +References: <14122.3325.631762.383828@weyr.cnri.reston.va.us> +Message-ID: <5liuada1vb.fsf@eric.cnri.reston.va.us> +X-UID: 1926 + +Congratulations with the release of the documentation, Fred! +The new version really looks very slick. + +--Guido van Rossum (home page: http://www.python.org/~guido/) + + + + diff --git a/demo/ermis-f/python_m/cur/1927 b/demo/ermis-f/python_m/cur/1927 new file mode 100644 index 00000000..8363a595 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1927 @@ -0,0 +1,24 @@ +From: greg.ewing at compaq.com (Greg Ewing) +Date: Tue, 04 May 1999 13:25:15 +1200 +Subject: Interpreter fussy about line endings? +Message-ID: <372E4C7B.346A942@compaq.com> +X-UID: 1927 + +Python 1.5.1 on my Mac refuses to run code +written using PythonWin's built-in editor, +apparently because of different CR/LF +conventions. I have to load it into Alpha +and save it in Mac format before it will +work! + +Is it meant to be like this? Why should +it care? How is one supposed to write +cross-platform Python code if it does +things like this? + +Bewilderedly, +Greg + + + + diff --git a/demo/ermis-f/python_m/cur/1928 b/demo/ermis-f/python_m/cur/1928 new file mode 100644 index 00000000..de624d56 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1928 @@ -0,0 +1,96 @@ +From: david.stegbauer at cz.opel.com (david.stegbauer at cz.opel.com) +Date: Tue, 18 May 1999 14:02:09 +0000 +Subject: Bug? On WindowsNT, f.seek() and f.tell() aren't symmetric +Message-ID: +Content-Length: 1700 +X-UID: 1928 + + +Oliver Steele write: +> +> regardless of file modes, f.seek(f.tell()) should be a noop +> +> Not so. On a Windows machine the function below prints 'a\012' for the first +> line and '\012' for the second. Changing the file open mode to 'rb' or +> running the program on a Mac or UNIX machine works fine. +> +> f = open('test.txt', 'wb') +[snip] +> NT>>> testseek() +> 'a\012' +> '\012' +> +> UNIX>>> testseek() +> 'b\012' +> 'b\012' +> +> MacOS>>> testseek() +> '' +> '' + +You HAVE TO read file consistently: if created in binary mode has to be read in +binary mode. If created in text mode, has to be read in text mode. On unix and +mac are both the same not in M$. + +M$ DOS and its successors stores new line as 0x0d 0x0a in text mode and only as +0x0a in binary mode. Text mode is default. So with f = open('test.txt', 'wb'); +f.write('a\nb\n'); f.close() you will create 4-bytes file only (hex "61 0A 62 +0A") instead of 6-bytes. + +So open(..., 'wb') --> open(..., 'rb') + open(..., 'wt') --> open(..., 'rt') + + + +def testseek(): + # create a two-line file + f = open('d:\\test.txt', 'wb') + f.write('a\nb\n') + f.close() + # read it + f = open('d:\\test.txt', 'r') + print "\nline A" + f.seek(0); print `f.readline()`; print `f.tell()` + print `f.readline()`; print `f.tell()` + print "\nline B" + f.seek(0); print `f.readline()`; print `f.tell()`; + f.seek(f.tell()); print `f.tell()`; + print `f.readline()`;print `f.tell()` + f.close() + +>>> testseek() + +line A +'a\012' +1 +'b\012' +4 + +line B +'a\012' +1 +1 +'\012' +1 + +now, if I replace 'wb' mode with 'w' (for creating file) I'll get: +>>> testseek() + +line A +'a\012' +3 +'b\012' +6 + +line B +'a\012' +3 +3 +'b\012' +6 + + + + + + diff --git a/demo/ermis-f/python_m/cur/1929 b/demo/ermis-f/python_m/cur/1929 new file mode 100644 index 00000000..00a21cd4 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1929 @@ -0,0 +1,55 @@ +From: psoares at consiste.pt (Paulo Soares) +Date: Mon, 17 May 1999 16:40:00 GMT +Subject: Scripting Windows GUI application with Python (SendKeys) +Message-ID: <51998F46F8B7D011BF7C0060B03502AD0EA990@orion.consiste.pt> +Content-Length: 1558 +X-UID: 1929 + +The WIN32 API function to send keys to an application that has the focus +is keybd_event in win9X/NT and SendInput in win98/NT. +You can also have a look at John Robbins' Feb '99 Microsoft Systems +Journal Bugslayer Column where he describes a way to parse the keys as +Visual Basic does. +I have altered this code to provide very simple scripting to a tape +backup procedure. +I can send it if you want it. Is is written in Visual C++ 6.0 but it is +trivial to extract the needed parts and make a python extension. + +Best Regards, +Paulo Soares + +> -----Original Message----- +> From: Christian Lemer [SMTP:Christian.Lemer at usrconsult.be] +> Sent: Monday, May 17, 1999 15:12 +> To: python-list at cwi.nl +> Subject: Scripting Windows GUI application with Python (SendKeys) +> +> Dear all, +> +> Currently we use WinBatch to automate some tests and productions +> application under Windows NT. +> +> One year ago, we switched from Perl to Pyton as script language under +> unix. +> +> I wonder if it is possible to drive a Windows GUI application (using +> keybord commands) like it is possible in Winbatch with Python under +> Windows? +> +> I installed also the windows extensions but couldn't find the correct +> way to send a key to an application. +> +> Thanks in advance for your help. +> +> Chris. +> +> -- +> Christian LEMER tel +32.10.65.44.11 +> UsrConsult S.P.R.L fax +32.10.65.44.10 +> rue Margot, 37 +> http://www.usrconsult.be +> B-1457 Nil St Vincent mailto:Christian.Lemer at usrconsult.be + + + + diff --git a/demo/ermis-f/python_m/cur/1930 b/demo/ermis-f/python_m/cur/1930 new file mode 100644 index 00000000..7d58892a --- /dev/null +++ b/demo/ermis-f/python_m/cur/1930 @@ -0,0 +1,53 @@ +From: mal at lemburg.com (M.-A. Lemburg) +Date: Tue, 18 May 1999 19:07:44 GMT +Subject: pickle and module package +References: + <37408338.41341C94@lemburg.com> + <37415299.1269044@news.omnilink.de> + <37416997.3810214C@lemburg.com> <14145.40544.797779.223676@weyr.cnri.reston.va.us> +Message-ID: <3741BA80.3FA2AD1D@lemburg.com> +Content-Length: 1588 +X-UID: 1930 + +Fred L. Drake wrote: +> +> M.-A. Lemburg writes: +> > I'd say, there's no way for the import logic to tell whether +> > you are about to import the same module a second time... unless +> > maybe, if it scans the sys.modules dict for filenames of the modules +> > and then checks for identical files. But that would reduce import +> > performance dramatically and not be worth it. +> +> A dictionary could be used that maps filenames to modules; this can +> simply be checked and updated during the slow path through import. +> This shouldn't be much slower than it already is. ;-) +> The filesnames would have to be absolute for it to work; there's +> currently nothing that does this for pathnames in the core +> interpreter. I'd be quite happy if __file__ could be relied on to be +> absolute as well! + +Hmm, so maybe there's a chance after all... a dictionary lookup +would certainly not effect the import performance in any +noticable way. + +That would also provide a chance to get that fastpath hook into +the mechanism to eliminate at least a few of the stat() calls +done at startup. + +Just wish I had some time to look into this a bit further... +if anyone wants to try, here is the fastpath stuff I've +written some time ago: + + http://starship.skyport.net/~lemburg/fastpath.zip + +-- +Marc-Andre Lemburg +______________________________________________________________________ +Y2000: 227 days left +Business: http://www.lemburg.com/ +Python Pages: http://www.lemburg.com/python/ + + + + + diff --git a/demo/ermis-f/python_m/cur/1931 b/demo/ermis-f/python_m/cur/1931 new file mode 100644 index 00000000..64285e6a --- /dev/null +++ b/demo/ermis-f/python_m/cur/1931 @@ -0,0 +1,28 @@ +From: tim_one at email.msn.com (Tim Peters) +Date: Thu, 20 May 1999 13:39:55 -0400 +Subject: Dylan (was RE: Python vs. VB) +In-Reply-To: <7i1bgl$6v8$1@mach.vub.ac.be> +Message-ID: <000401bea2e7$c6867c00$9d9e2299@tim> +X-UID: 1931 + +[Thomas Hamelryck, replying to Jason Trenouth] +> Dylan looks very nice, but there is only a commercial package +> available for W95 and a very preliminary free version for +> Unix (Gwydion). Rather limited, IMO. + +If you follow the link at the bottom of Jason's post: + +> : PS Oh and our product happens to be here: +> : http://www.harlequin.com/products/ads/dylan/ + +you'll find a "Latest Free Version" link to a Dylan development environment +for Windows. By "free" they don't mean "non-commercial", but they do mean +it doesn't cost you anything except download time . + +so-many-electrons-so-little-time-ly y'rs - tim + + + + + + diff --git a/demo/ermis-f/python_m/cur/1932 b/demo/ermis-f/python_m/cur/1932 new file mode 100644 index 00000000..37e0e91b --- /dev/null +++ b/demo/ermis-f/python_m/cur/1932 @@ -0,0 +1,29 @@ +From: aahz at netcom.com (Aahz Maruch) +Date: Thu, 13 May 1999 19:00:15 GMT +Subject: Python mailing list vs. References: (was Re: My quarterly question on Design by Contract in Python...) +References: <000301be99ea$673e84a0$ee9e2299@tim> <19990511063619.A552436@vislab.epa.gov> +Message-ID: +X-UID: 1932 + +In article <19990511063619.A552436 at vislab.epa.gov>, +Randall Hopper wrote: +> +>No problem with threading here, on this thread for example, but I'm using +>mutt (http://www.mutt.org/). + +Yes, but I'm using a newsreader, which wants a References: line. +-- + --- Aahz (@netcom.com) + +Hugs and backrubs -- I break Rule 6 <*> http://www.rahul.net/aahz/ +Androgynous poly kinky vanilla queer het + +"Tonight on NewsHype, we'll talk to the experts about whether youth +violence is most easily blamed on guns, movies, video games, or the +internet. But first, we'll show you the latest footage of the US +military bombing the shit out of the enemy. Right after this message ..." +-- Bearpaw + + + + diff --git a/demo/ermis-f/python_m/cur/1933 b/demo/ermis-f/python_m/cur/1933 new file mode 100644 index 00000000..a9d6921d --- /dev/null +++ b/demo/ermis-f/python_m/cur/1933 @@ -0,0 +1,27 @@ +From: bwarsaw at cnri.reston.va.us (Barry A. Warsaw) +Date: Thu, 27 May 1999 11:20:34 -0400 (EDT) +Subject: Python 1.5.2 and large files (Solaris 7) +References: <3.0.6.32.19990525184325.0094e100@mail.anacapa.net> + <3.0.6.32.19990526193416.00960c10@mail.anacapa.net> +Message-ID: <14157.25282.902519.781906@anthem.cnri.reston.va.us> +X-UID: 1933 + +>>>>> "SC" == Steve Clift writes: + + SC> How do you come up with this sort of stuff at such an hour? + +The Timbot has no need of sleep. Time for the Timbot is just a 32 bit +value, ever incrementing. Timbot desires a 64 bit upgrade of this +counter the way Walt Disney craved viable human brain transplant +technology. At least with the Timbot, it's much easier to dump a +snapshot of his running image to a CDROM than it is to keep ol' Walt's +head in a freezer. + +good-to-know-timbot's-subject-to-the-same-laws-of-nature- +as-the-rest-of-us-ly y'rs + +-Barry + + + + diff --git a/demo/ermis-f/python_m/cur/1934 b/demo/ermis-f/python_m/cur/1934 new file mode 100644 index 00000000..e776d4c8 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1934 @@ -0,0 +1,58 @@ +From: fatjim at home.com (Jim Meier) +Date: Sat, 15 May 1999 18:41:26 GMT +Subject: while (a=b()) ... +References: <000601be9ea7$ab329ae0$159e2299@tim> <373DB58C.97C54370@home.com> <005b01be9f02$c3892a90$f29b12c2@pythonware.com> +Message-ID: <373DC05B.AD80AAC1@home.com> +Content-Length: 1291 +X-UID: 1934 + + +Fredrik Lundh wrote: + +> Jim Meier wrote: +> > This use of "*" is nicer, but not legible.. "*" is a shell term or a geek +> > term, but not a fluid english term. It's not apparent what it means by +> > looking at it unless. +> +> it's already a Python term. as far as I can tell, +> it means everything that doesn't start with an +> underscore: +> +> from foo.baz import * +> + +.. And I don't really like it's use there, either, as it's a special symbol +otherwise unused in the language! Of course, if it was made part of the +language, I'd have no legs to stand on here (but i'm sitting on a chair and +feeling boisterous anyways.. :P ) + + +> +> and I'm pretty sure the subset of infinity that +> doesn't start with an underscore is a decent +> approximation... +> + +The subset of infinity that does not start with an underscore is exactly 50%. +(every item that does has a corresponding item that doesn't.) +1/2 of infinity is not a very good approximation, I'd say! + + +> +> > Can we make "for" into "for each"? +> +> why not? (as long as you don't name the result +> Python, I don't mind ;-). change "and" to "and +> then" and "or" to "or else" at the same time! +> +> + +I vote for the Intercal convention of prefixing lines with "please", "do", or +"please do" for legibility. + +-Jim + + + + + diff --git a/demo/ermis-f/python_m/cur/1935 b/demo/ermis-f/python_m/cur/1935 new file mode 100644 index 00000000..e0ea6ec3 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1935 @@ -0,0 +1,25 @@ +From: akuchlin at cnri.reston.va.us (Andrew M. Kuchling) +Date: Tue, 4 May 1999 09:13:21 -0400 (EDT) +Subject: Bug in module gzip +In-Reply-To: +References: +Message-ID: <14126.60755.866272.266591@amarok.cnri.reston.va.us> +X-UID: 1935 + +Konrad Hinsen writes: +>The attribute unused_data is in fact never set. It should thus be +>impossible to read any file at all, which makes me wonder if nobody +>noticed this before... and perhaps has a fix! + + unused_data is an attribute added to the zlib module in 1.5.2, +so Python code can get access to data after the end of a compressed +stream. Therefore you'll also need to use the zlib module from 1.5.2. + +-- +A.M. Kuchling http://starship.python.net/crew/amk/ +Despair says little, and is patient. + -- From SANDMAN: "Season of Mists", episode 0 + + + + diff --git a/demo/ermis-f/python_m/cur/1936 b/demo/ermis-f/python_m/cur/1936 new file mode 100644 index 00000000..ae755f23 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1936 @@ -0,0 +1,28 @@ +From: akuchlin at cnri.reston.va.us (Andrew M. Kuchling) +Date: Tue, 4 May 1999 13:28:13 -0400 (EDT) +Subject: [Question] Functional style with lists +In-Reply-To: <372F2B01.25E0ECDD@lirmm.fr> +References: <372F2B01.25E0ECDD@lirmm.fr> +Message-ID: <14127.11676.996615.798921@amarok.cnri.reston.va.us> +X-UID: 1936 + +David Berthelot writes: +>I would like to sum the numeric values by using map. +>I've tried this: +>>>> map(lamda x,y:x+y,map(L.getitem,(1,)*len(L))) +>But of course it doesn't work... + + The reduce() built-in does this sort of thing. Try: +>>> reduce(lambda total,(name,amt): total + amt, L, 0) +75 + +-- +A.M. Kuchling http://starship.python.net/crew/amk/ +I'm an excuse for medical experiments and art theory. You must get me out of +here and out of the hospital. + -- Peter Greenaway, _A Zed and Two Noughts_ (1986) + + + + + diff --git a/demo/ermis-f/python_m/cur/1937 b/demo/ermis-f/python_m/cur/1937 new file mode 100644 index 00000000..33c0df22 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1937 @@ -0,0 +1,45 @@ +From: nospam at bitbucket.com (Phil Mayes) +Date: Sat, 1 May 1999 18:39:35 -0700 +Subject: Newbie Threads question +References: <7gfdrm$69t$1@nnrp1.dejanews.com> +Message-ID: +Content-Length: 1208 +X-UID: 1937 + +Michael "Fred" Fredericks wrote in message +<7gfdrm$69t$1 at nnrp1.dejanews.com>... +>What I'd like to do is learn how to use threads by "parallelizing" a simple +>set of now currently serialized tasks. +> [sample code snipped] +>#my new main loop +>list1 = thread.start_new_thread(func1,(x)) +>list2 = thread.start_new_thread(func2,(y)) +>reallist = func3(list1,list2) +> +>I have read the documentation a couple of times, but what I don't know: +>[...] +>B) Do I need to do anything fancy to make the func3 call wait until the +calls +>to func1 and func2 have both returned? For example, should I have the func1 +>and func2 calls aquire a lock at the start of the function and release it +at +>the end, and then make the main loop try to acquire both locks before +>proceeding to the reallist = func3() call? If I did this, could the main +>loop acquire the locks before the new threads do, causing deadlock? + + +There is a nifty class called WorkQ that will wait on N threads in + python\python-1.5.2\demo\threads\find.py +courtesy of Guido. You may need to download the source-code to get this -- +not sure. +-- +Phil Mayes pmayes AT olivebr DOT com +Olive Branch Software - home of Arranger http://www.olivebr.com/ + + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1938 b/demo/ermis-f/python_m/cur/1938 new file mode 100644 index 00000000..e92cdc18 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1938 @@ -0,0 +1,67 @@ +From: tim_one at email.msn.com (Tim Peters) +Date: Sun, 30 May 1999 18:18:51 -0400 +Subject: Fatal bug in gzip.py +In-Reply-To: <199905301902.PAA02121@207-172-122-115.s274.tnt7.brd.va.dialup.rcn.com> +Message-ID: <000501beaaea$66018f40$b09e2299@tim> +Content-Length: 2339 +X-UID: 1938 + +[A.M. Kuchling] +> ... +> gzip.py contains loops like this: +> try: +> while 1: +> self._read(readsize) +> readsize = readsize * 2 +> except EOFError: +> size = self.extrasize +> +> The intention is to progressively increase the amount of data that's +> read at each iteration, to avoid many iterations when reading a large +> file. However, when a file has so many members, it will have to go +> through this loop 378 times, but 378 doublings causes an +> OverflowError. The fix is to increase readsize more slowly, but I'm +> not sure what the right rate of increase is. Perhaps simply adding +> 1024 bytes at a time will do; does anyone have another suggestion? + +Sure! + +1) Abstract the readsize-bumping logic, replacing the inline "* 2", "+ +1024", etc with calls to a new module-level function: + + readsize = _bump_readsize(readsize) + +2) Now that you're no longer paralyzed by the prospect of needing to track +down and change scattered instances by hand repeatedly , experiment. +One thing I'd try: + +def _bump_readsize(readsize, limit=1024**2): + assert readsize > 0 + return min(readsize * 2, limit) + +That is, doubling seemed like a fine idea, and must be better-behaved than ++1024 for the usual case with a single large member. OTOH, looks like +making readsize "too big" will cause lots of extra work, reading excess +stuff then seeking back to read it all over again. + +3) So now that you've abstracted and experimented, abstract some more! How +about a shared ReadSize object, methods of which are called by both "_read" +and "read" so that "read" can adapt its requests to the file structure +"_read" is discovering empirically? For example, the shared object and +"_read" can conspire to remember the size of the last member read, and +influence "read" to keep its requests near that size so long as members keep +popping up with that size. + +IOW, "read" is flying blind now; "_read" is the only guy who knows what the +file is turning out to look like. _read would probably like its first +new-member call to match the size the of previous member, and double +thereafter (up to a limit) until the new member is fully read. Change those +event descriptions into method names. Rinse. Repeat. + +just-keep-it-out-of-your-eyes-ly y'rs - tim + + + + + + diff --git a/demo/ermis-f/python_m/cur/1939 b/demo/ermis-f/python_m/cur/1939 new file mode 100644 index 00000000..bf7d2c1d --- /dev/null +++ b/demo/ermis-f/python_m/cur/1939 @@ -0,0 +1,15 @@ +From: dlee3030 at aol.com (DLee3030) +Date: 9 May 1999 04:41:53 GMT +Subject: CGI setup for Win95 +Message-ID: <19990509004153.07985.00000984@ng-cl1.aol.com> +X-UID: 1939 + +I have difficulties with useing python as a CGI script for a http server on +windows 95 (I have OmniHTTP v. 1.01). It has a problem with launching a python +interpreter. I followed an advice in faq in setting up a value in registry +without success. ( I guess it only works for Windows 95 Personal Server.) And I +want to keep OmniHttp. Does anybody has experience with that? + + + + diff --git a/demo/ermis-f/python_m/cur/1940 b/demo/ermis-f/python_m/cur/1940 new file mode 100644 index 00000000..aba029f2 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1940 @@ -0,0 +1,31 @@ +From: JamesL at Lugoj.Com (James Logajan) +Date: Wed, 12 May 1999 21:21:37 -0700 +Subject: A Summary: Expression-Assignments. (Very Long) +References: +Message-ID: <373A5351.A808930D@Lugoj.Com> +X-UID: 1940 + +[Posted and e-mailed] +With all due respect, you missed my way (Way 4): + +import sys + +def Set(a, b): + a[0] = b + return b + +a = [None] +while Set(a, sys.stdin.readline()): + print repr(a[0]) + +print "EOF:", repr(a[0]) + +I like it, I posted it elsewhere, but I guess it got lost in the noise or +something. + +Moshe Zadka wrote: +[Summary elided for brevity.] + + + + diff --git a/demo/ermis-f/python_m/cur/1941 b/demo/ermis-f/python_m/cur/1941 new file mode 100644 index 00000000..288db0b3 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1941 @@ -0,0 +1,26 @@ +From: moshez at math.huji.ac.il (Moshe Zadka) +Date: Sat, 22 May 1999 18:13:53 +0300 (IDT) +Subject: Python Articles Downloader +Message-ID: +X-UID: 1941 + +Looking at the wonderful www.findmail.com/listsaver/python-list/ site, +I noticed that "there must be an easier way of downloading articles". + +Well, there is: just use the script available from +http://www.geocities.com/TheTropics/Island/2932/download.txt +(Had to put in the .txt because of geocities rules) + +It is not in usable form (e.g., it only works with proxies which must be +manually configured), but some customization and ... it works. + +Any comments are, of course, very welcome. +-- +Moshe Zadka . +QOTD: My own exit is more likely to be horizontal then perpendicular. + + + + + + diff --git a/demo/ermis-f/python_m/cur/1942 b/demo/ermis-f/python_m/cur/1942 new file mode 100644 index 00000000..118f2542 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1942 @@ -0,0 +1,34 @@ +From: cgw at fnal.gov (Charles G Waldman) +Date: Mon, 10 May 1999 22:13:17 GMT +Subject: Error setting sys.path & friends on RedHat Linux 5.2, Python 1.5.1? +In-Reply-To: <37374958.57906AE4@mojam.com> +References: <37374958.57906AE4@mojam.com> +Message-ID: <14135.23037.732495.162339@buffalo.fnal.gov> +X-UID: 1942 + +Skip Montanaro writes: + > I recently upgraded to RedHat 5.2. It comes with Python 1.5.1 in + > /usr/bin. Coincidentlly, I have Python 1.5.1 installed in + > /usr/local/bin, with all the attendant directories in /usr/local/lib. I + > don't want to mix the two so as not to break anything the RH folks might + > rely on. + +IMHO you are making your life more difficult trying to maintain two +installations of python. I recently installed RH6.0 and put Python +1.5.2 on top of that without problems. Just do + +configure --prefix=/usr + +make sure you build with Tkinter turned on + +and go ahead and install it over the RedHat preinstalled Python 1.5.1 + +At least on RedHat 6.0 (can't speak for 5.2) all of RedHats Python +addons are in /usr/lib/python1.5/site-packages, so it's safe to +install 1.5.2 right over the 1.5.1 that's already installed. If +you're the cautious type you might back up your /usr/lib/python1.5 +directory first. + + + + diff --git a/demo/ermis-f/python_m/cur/1943 b/demo/ermis-f/python_m/cur/1943 new file mode 100644 index 00000000..af5b857d --- /dev/null +++ b/demo/ermis-f/python_m/cur/1943 @@ -0,0 +1,40 @@ +From: TVMktg at netscape.com (James Scott) +Date: 7 May 1999 05:50:00 GMT +Subject: Luxury Back Massage at SUPER Below market price for internet ONLY +Message-ID: <7gtuu8$jv5$418@news.ctimail.com> +X-UID: 1943 + + Dear Friends, + + Luxury Back Massage + + Real Leather, Light Weight, Portable, 100 finger-massage with handy cigeratte lighter plug for home, +office car or anywhere. + + US$62 ONLY + For Internet ONLY (Retail Price US$90, but now you get it at US$62) +This special offer remains valid within these 4 weeks only + +Order Now / For Details of the Product: + +http://member.ctinets.com/~mottatc/shopping/automoti.htm + +We are also selling other innovative consumer products at BELOW MARKET PRICE, just simply bookmark the following wesite. + +http://member.ctinets.com/~mottatc/shopping/index.htm + +(For Innovative Car Accessories, click below:) +http://member.ctinets.com/~mottatc/shopping/automoti.htm + +(For Innovative Environmental Health Products, click below:) +http://member.ctinets.com/~mottatc/shopping/environm.htm + +Now just sit back and relax, enjoy your shopping + +James Scott +TV Marketing Inc. + + + + + diff --git a/demo/ermis-f/python_m/cur/1944 b/demo/ermis-f/python_m/cur/1944 new file mode 100644 index 00000000..15380ce2 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1944 @@ -0,0 +1,16 @@ +From: morse at harborcom.net (Kevin Dahlhausen) +Date: Wed, 26 May 1999 12:07:42 GMT +Subject: Does PIL still support wmf graphics format? +References: <7icpca$qbn$1@nnrp1.deja.com> <14154.56779.294602.309130@buffalo.fnal.gov> +Message-ID: <374be3cc.176540361@news.oh.verio.com> +X-UID: 1944 + +>As far as I know the WMF plugin was never completely implemented. If +>you know a lot about WMF you could step up to the plate and make a +>working WMF plugin, I'm sure the overly-busy F-bot would appreciate + +www.wotsit.org has a link to the WMF file format + + + + diff --git a/demo/ermis-f/python_m/cur/1945 b/demo/ermis-f/python_m/cur/1945 new file mode 100644 index 00000000..46ab6905 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1945 @@ -0,0 +1,32 @@ +From: gmcm at hypernet.com (Gordon McMillan) +Date: Mon, 24 May 1999 09:21:39 -0500 +Subject: Defining VCL-like framework for Python +In-Reply-To: <7i9nn5$a9m$1@cronkite.cc.uga.edu> +Message-ID: <1284566566-14340165@hypernet.com> +X-UID: 1945 + +Graham asks: +> Gordon McMillan (gmcm at hypernet.com) wrote: +> : Tk is a GUI toolkit. You are completely in charge of creating +> your : widgets and making things interact. Complete control, lots of +> code. : : A GUI framework is a pre-built skeleton. Much less code +> (usually): : you override this here and that there and if you're +> lucky, that's all : there is to it. +> +> So how does a framework differ from a GUI toolkit with several +> abstraction layers? + +A Framework abstracts the app (all the way up to main()). If the +model fits, you can have complete working apps with amazingly little +code. Some frameworks are more adaptable than others. + +wxWindows is an example of a good one (from my limited experience +with it). I won't name any bad ones, because people get as religious +about frameworks as they do about editors. + + +- Gordon + + + + diff --git a/demo/ermis-f/python_m/cur/1946 b/demo/ermis-f/python_m/cur/1946 new file mode 100644 index 00000000..ee87dd77 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1946 @@ -0,0 +1,27 @@ +From: spamfranke at bigfoot.de (Stefan Franke) +Date: Wed, 12 May 1999 15:55:17 GMT +Subject: while (a=b()) ... +References: <7h4mq2$675$1@holly.csv.warwick.ac.uk> <3736ED9B.515704AF@starmedia.net> <7ha231$hsb$1@nnrp1.deja.com> <37397620.9887F8B4@infercor.no> <199905121351.OAA11436@lsls4k.lsl> +Message-ID: <373aa357.20071911@news.omnilink.de> +X-UID: 1946 + +>Paul Boddie wrote: +> Of course, the "while 1" is a bit "ugly", but then it merely causes the +> reader to go looking for the exit points. We could change that to a +> single keyword acting as a synonym if it really bothered a significant +> number of people, but I don't see too much of a need for that. + +I would even go further: The use of "while 1:" as a substitute for other control +structures outnumbers its use for endless loops *by far* (at least 20:1 in the +standard libs, as a quick grep shows). + +So IMO this idiom should be taught as early as possible, Unluckily the Python +tutorial mentions "while 1:" only three times: Two times for endless loops, one +time to demonstrate syntax errors... + +Stefan + + + + + diff --git a/demo/ermis-f/python_m/cur/1947 b/demo/ermis-f/python_m/cur/1947 new file mode 100644 index 00000000..506cb235 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1947 @@ -0,0 +1,63 @@ +From: news at dorb.com (Darrell) +Date: Thu, 27 May 1999 14:03:24 -0400 +Subject: Interpolation (was: Keyword calling gotcha ?) +References: <7ijqr6$pd7$1@rzsun02.rrz.uni-hamburg.de> +Message-ID: +Content-Length: 1658 +X-UID: 1947 + +Let me show my ignorance a bit. + def a(**x): +... print x + +>>> def b(**x): +... a(x) + +When 'b' calls 'a' it is passing a dictionary while 'a' wants a keyword +thing +that it resolves to a dictionary. Wouldn't be nice if the keyword thing +could +mark the dictionaries it creates. Then just pass them though when it sees +one if the only other choice was an error. + +Yes this sounds like a possible programmer trap. Like one of those silent +C++ type conversions. + +So as Marko said come up with interpolate(args). + +Humm. Marko do you have such a function ? + +Thanks +--Darrell + +Marko Schulz <4mschulz at informatik.uni-hamburg.de> wrote in message +news:7ijqr6$pd7$1 at rzsun02.rrz.uni-hamburg.de... +> It would be nice to have a way of interpolating sequences in parameter +> lists. In Perl it is done automatically, which causes confusion +> regularly, but it would be nice in Python sometimes too. +> +> If it were done with a new function one could also write a function, +> that computes all base_classes to a class on-the-fly: +> class Derived( interpolate(base_classes(args)) ): +> : +> : +> +> At the moment base_classes may only return one base class. Many +> apply(function,args) could be turned into function( interpolate(args) ) +> +> This would be especially nice for those (self,)-Tupels, as it was used +> in the original posting above. +> +> Of cause a nicer syntax oder name than interpolate() might be found. +> +> -- +> marko schulz +> "Die Welt ist gut, die Welt ist schlecht. +> Ich seh' mehr als ich begreifen kann. Ich sehe in 3-D." +> '3-D', Extrabreit + + + + + + diff --git a/demo/ermis-f/python_m/cur/1948 b/demo/ermis-f/python_m/cur/1948 new file mode 100644 index 00000000..67adb5c9 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1948 @@ -0,0 +1,46 @@ +From: petrilli at trump.amber.org (Christopher Petrilli) +Date: 02 May 1999 08:52:55 PDT +Subject: Books on Python now vs in 8 months. +References: <372BEA9D.CAA0A5B7@earthlink.net> +Message-ID: <7ghscn$337@chronicle.concentric.net> +Content-Length: 1692 +X-UID: 1948 + +Phil Voris wrote: +>I've been considering learning Python as a means of getting insight into +>OO thinking. I have been reluctant to by the snake or rat books because +>I have read that future versions of Python -- mayber even versions as +>early as later this year -- will be radicaly different and in some ways +>backwards incompatible. I ask myself if it's worthwhile to learn it one +>way if it will change so quickly. Does anyone have insight as to how +>much it's _really_ going to change...? + +Well, I'd use my crystal ball to tell you, but the proximity to Guido's +time machine has caused it to show me Dan Quayle as president, so you +know you just can't trust it! + +Seriously, while Python2 is bantied around a lot, it's still stuck somewhere +in the flying Dutchman's head, and nobody else really know what will +change. Having said that, I'm willing ot bet nothing Earth shattering +will occur, a lot of niggling problems will be fixed, some new "optional" +features (maybe pseudo-static types for performance) will reappear, +the libraries might be reoganized (see Paul Prescod's thread on hierarchical +packages), etc etc, but I don't htink you're going to see: + + * Curly braces + * 1/2 = 0.5 :-) + +Seriously, the basic syntax and structure won't change... you'll be able to +take all knowledge and work with it... there will just be some small +adjustments to things here and there. This won't be like your standard +Java x.x.1->x.x.2 release where everything changes, and 1->2 where nothing +significant happens :-) + +Chris +-- +| Christopher Petrilli ``Television is bubble-gum for +| petrilli at amber.org the mind.''-Frank Lloyd Wright + + + + diff --git a/demo/ermis-f/python_m/cur/1949 b/demo/ermis-f/python_m/cur/1949 new file mode 100644 index 00000000..8c8e213a --- /dev/null +++ b/demo/ermis-f/python_m/cur/1949 @@ -0,0 +1,47 @@ +From: olipt at mayo.edu (Travis Oliphant) +Date: Thu, 13 May 1999 22:20:29 -0500 +Subject: python hack of the day -- "listable" functions +In-Reply-To: <373e4c42.16914501@news.omnilink.de> +References: <373c22bf.6287591@news.omnilink.de> <373e4c42.16914501@news.omnilink.de> +Message-ID: +X-UID: 1949 + +> > +> >This isn't true -- there are languages which do exactly this. I think +> >Icon is one, and I know APL, J, and K are + +Add the Numeric extensions (umath) in particular and you get this behavior +now. +> 1) we had an aditional builtin type 'dollar', so we could write +> >>> x = $[1, 2, 3, 4] +> >>> type(x) +> +> >>> x +> $[1, 2, 3, 4] +> >>> 2*x+1 +> $[3, 5, 7, 9] +> >>> undollar (x) +> [1, 2, 3, 4] +> + +Go get the Numeric extensions, + +>>> from Numeric import * +>>> x = array([1,2,3,4]) +>>> 2*x + 1 +>>> array([3,5,7,9]) +>>> x.tolist() +>>> [1, 2, 3, 4] + +You can also do some clever things with multidimensional arrays. It's +pretty much equivalent to what's available in J (as far as I know). + +But, there are no $ signs.... + +Travis + + + + + + diff --git a/demo/ermis-f/python_m/cur/1950 b/demo/ermis-f/python_m/cur/1950 new file mode 100644 index 00000000..5e4bc813 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1950 @@ -0,0 +1,18 @@ +From: Hans-Christian.Holm at nrk.no (Hans-Christian Holm) +Date: Tue, 25 May 1999 17:41:59 +0200 +Subject: "?:", "a and b or c" or "iif" +References: <7ieg4q$fhu$1@elle.eunet.no> +Message-ID: <7ieg7v$fl7$1@elle.eunet.no> +X-UID: 1950 + +Got my name right in the header now, I hope... + +Hans-Christan Holm +NRK Interaktiv + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1951 b/demo/ermis-f/python_m/cur/1951 new file mode 100644 index 00000000..39714f0c --- /dev/null +++ b/demo/ermis-f/python_m/cur/1951 @@ -0,0 +1,21 @@ +From: vorname.nachname at mchf.siemens.de (vorname.nachname at mchf.siemens.de) +Date: Mon, 10 May 1999 12:24:00 +0200 +Subject: import a dll +Message-ID: <3736B3C0.D92B0627@mchf.siemens.de> +X-UID: 1951 + +Hallo! +I work with windowsNT 4.0 and pythonwin. +I have a short script: +import sys +sys.path.append('C:\\WINNT40.DE\\system32') +import PythonDataLinkLayer +PythonDataLinkLayer.Sleep() +#end of script +PythonDataLinkLayer is my own PythonDataLinkLayer.dll +When i execute this line by line it is good. +When i let run the script it fails at import PythonDataLinkLayer. + + + + diff --git a/demo/ermis-f/python_m/cur/1952 b/demo/ermis-f/python_m/cur/1952 new file mode 100644 index 00000000..88893120 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1952 @@ -0,0 +1,25 @@ +From: MHammond at skippinet.com.au (Mark Hammond) +Date: Sat, 22 May 1999 10:14:16 +1000 +Subject: New Book? +References: <374474E5.855E25F@prescod.net> <7i25as$c5u$1@m2.c2.telstra-mm.net.au> <7i3l45$o7s$1@nnrp1.deja.com> +Message-ID: <7i4sql$3mt$1@m2.c2.telstra-mm.net.au> +X-UID: 1952 + +Andy Robinson and I are writing "Python Programming on Win32" for O'Reilly. +We are still hoping for a launch at the Open Source Software conference in +August... + +Im sure we will bombard everyone with details a little closer to the launch +:-) + + +Mark. +Curtis Yanko wrote in message <7i3l45$o7s$1 at nnrp1.deja.com>... +>New book! ooh... ooh... Tell me more! + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1953 b/demo/ermis-f/python_m/cur/1953 new file mode 100644 index 00000000..d13c554e --- /dev/null +++ b/demo/ermis-f/python_m/cur/1953 @@ -0,0 +1,35 @@ +From: helge at mdlink.de (Helge Hess) +Date: Fri, 28 May 1999 03:18:02 +0200 +Subject: Python 2.0 +References: <7ik6mi$lbk$1@cronkite.cc.uga.edu> <374ead6b.7456872@news.demon.co.uk> +Message-ID: <374DEECA.7845DFC7@mdlink.de> +X-UID: 1953 + +Paul Moore wrote: +> +> How would I embed Python in a C application, without a C API? + +Java has JNI which also allows embedding in C applications. This works +quite well for me (at least as good as embedding, personally I even like +it a bit more). + +> And how +> would I distribute a C application with embedded (Java-) Python to +> machines with no JVM, assuming I don't want to (or don't have the +> capability to) distribute a JVM. + +What's the difference between distributing a JVM or a PyVM ? This is +pretty much the same. Java bytecode also has the advantage that native +compilers are becoming real, eg the gcj compiler of Cygnus. + +Maybe Python could use a lightweight/extended JVM, that is, Python could +use Java bytecodes but the JVM native interface could be done more (C) +Python like. This way one could have shared code between (C)Python and +JPython. + +Hm, anyway ... + Helge + + + + diff --git a/demo/ermis-f/python_m/cur/1954 b/demo/ermis-f/python_m/cur/1954 new file mode 100644 index 00000000..c130d753 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1954 @@ -0,0 +1,231 @@ +From: jj at inter.net (jj at inter.net) +Date: Sun, 16 May 1999 01:22:26 +0300 +Subject: EASY MONEY +Message-ID: <373DF3A2.2174F93C@inter.net> +Content-Length: 9196 +X-UID: 1954 + +***THIS TIP WILL BLOW YOU AWAY*** +I found this on a bulletin board and decided to try it. A little while +back, I was browsing through newsgroups, just like you are now, and came + +across an article similar to this that said you could make thousands of +dollars within weeks +with only an initial investment of $6.00! So I thought, "Yeah right, +this must be a scam", but like most of us, I was curious, so I kept +reading. Anyway, it said that you send $1.00 to each of the 6 names and +address stated in the article. You then place your own name and address +in the bottom of the list at #6, and post the article in at least 200 +newsgroups. +(There are thousands) No catch, that was it. So after thinking it over, +and talking to a few people first, I thought about trying it. I figured: + +"what have I got to lose except 6 stamps and $6.00, right?" +why don't try it Universal and not only in USA, like WWW experiment !!! + +Then I invested the measly $6.00. Well GUESS WHAT!?... within 7 days, I +started getting money in +the mail! I was shocked! I figured it would end soon, but the money just + +kept coming in. In my first week, I made about $25.00. By the end of the + +second week I had made a total of over $1,000.00! In the third week I +had over $10,000.00 and it's still growing. + +It's certainly worth $6.00, and 6 stamps, I have spent more than that on + +the lottery!! Let me tell you how this works and most importantly, WHY +it works... Also, make sure you print a copy of this article NOW, so you + +can get the information off of it as you need it. I promise you that if +you follow the directions exactly, that you will start making more money + +than you thought possible by doing something so easy! Suggestion: Read +this entire message carefully! (print it out or download it.) +Follow the simple directions and watch the money come in! It's easy. +It's legal. And, your investment is only $6.00 (Plus postage) + +IMPORTANT: This is not a rip-off; it + +is not indecent; it is not illegal; and it is 99% no risk - it really +works! +If all of the following instructions are adhered to, you will receive +extraordinary dividends. PLEASE NOTE: Please follow these directions +EXACTLY, and $50,000 or more can be yours in 20 to 60 days. This program + +remains successful because of the honesty and integrity of the +participants. +Please continue its success by carefully adhering to the instructions. +You will now become part of the Mail Order business. In this business +your product is not solid and tangible, it's a service. You are in the +business of developing Mailing Lists. Many large corporations are happy +to pay big bucks for quality lists. However, the money made from the +mailing lists is +secondary to the income which is made from people like you and me asking + +to be included in that list.Here are the 4 easy steps to success: + + STEP 1: +Get 6 separate pieces of paper and write the following on each piece of +paper "PLEASE PUT ME ON YOUR MAILING LIST."Now get 6 US $1.00 bills, +place ONE inside EACH of the 6 pieces of paper so the bill will not be +seen through +the envelope (to prevent (thievery). Next, place one paper in each of +the 6 envelopes and seal them. You should now have 6 sealed envelopes, +each with a piece of paper stating the above phrase, your name and +address, and a $1.00 bill. What you are doing is creating a service. + +THIS IS ABSOLUTELY LEGAL! + +You are requesting a legitimate service and you are paying for it! Like +most of us I was a little skeptical and a little worried about the legal + +aspects +of it all. So I checked it out with the U.S. Post Office +(1-800-725-2161) +and they confirmed that it is indeed legal. Mail the 6 envelopes to the +following addresses: + + +#1) C Markel 220 E Yeasting St Gibsonbury, OH 43431 +#2) ARTHUR SMITH 4118 LINNFIELD HOUSTON,TX.77016 +#3) Verman Amir, Ben zeav 4 , Rishon lzion, Israel 75289 +#4) Ofer grundman ,Shfira arman 16 Rishon lzion, Israel , 75284 +#5) Micha haviv, kfar angid 202 Israel ,76875 +#6) Guy Levin, 15 Hazon-Ish, Petach-Tikva, 49280, Israel + +STEP2 +: Now take the #1 name off the list that you see above, move the other +namers up (6 becomes 5, 5 becomes 4, etc...) and add YOUR Name as number + +6 on the list. + +STEP 3: +Change anything you need to, but try to keep this article +as close to original as possible. Now, post your amended article to at +least 200 newsgroups. (I think there are close to 24,000 groups) All you + +need is 200, but remember, the more you post, the more money you make! +You won't get +very much unless you post like crazy. :) This is perfectly legal! +If you have any doubts, refer to Title 18 Sec. 1302 & 1341 of the Postal + +lottery +laws. +Keep a copy of these steps for yourself and, whenever you need +money, you can use it again, and again. PLEASE REMEMBER that this +program remains successful because of the honesty and integrity of the +participants and by their carefully adhering to the directions. Look at +it this way. If you are +of integrity, the program will continue and the money that so many +others have received will come your way. NOTE: You may want to retain +every name and address sent to you, either on a computer or hard copy +and keep the notes people send you. This VERIFIES that you are truly +providing a service. + +(Also, it might be a good idea to wrap the $1 bill in dark paper to +reduce the risk of mail theft.) So, as each post is downloaded and the +directions carefully followed, six members will be reimbursed for their +participation +as a List Developer with one dollar each. Your name will move up the +list geometrically so that when your name reaches the #1 position you +will be receiving thousands of dollars in CASH!!! What an opportunity +for only $6.00 +($1.00 for each of the first six people listed above) Send it now, add +your own name to the list and you're in business! + + ---DIRECTIONS ----- FOR HOW TOPOST TO NEWSGROUPS------------ + +Step 1) You do not need to re-type this +entire letter to do your own posting. Simply put your cursor at the +beginning of this letter and drag your cursor to the bottom of this +document, and select 'copy' from the edit menu. This will copy the +entire +letter into the computer's memory. + Step 2) Open a blank 'notepad' file and +place your cursor at the top of the blank page. From the 'edit' menu +select +'paste'. This will paste a copy of the letter into notepad so that you +can +add your name to the list. + Step 3) Save your new notepad file as a .txt +file. If you want to do your postings in different settings, you'll +always +have this file to go back to. +Step 4) Use Netscape or Internet explorer and +try searching for various newsgroups (on-line forums, message boards, +chat +sites, discussions.) +Step 5) Visit these message boards and post this +article as a new message by highlighting the text of this letter and +selecting paste from the edit menu. Fill in the Subject, this will be +the +header that everyone sees as they scroll through the list of postings in + +a +particular group, click the post message button. You're done with your +first +one! Congratulations.. +.THAT'S IT! All you have to do is jump to different +newsgroups and post away, after you get the hang of it, it will take +about +30 seconds for each newsgroup! **REMEMBER, THE MORE NEWSGROUPS YOU POST +IN, +THE MORE MONEY YOU WILL MAKE! BUT : YOU HAVE TO POST A MINIMUM OF 200** +That's it! You willbegin receiving money from around the world within +days! +You may eventually want to rent a P.O.Box due to the large amount of +mail +you will receive. If you wish to stay anonymous, you can invent a name +to +use, as long as the postman will deliver it. **JUST MAKE SURE ALL THE +ADDRESSES ARE CORRECT.** Now, each of the 5 persons who just sent me +$1.00 +make the MINIMUM 200 postings, each with my name at #5 and only 5 +persons +respond to each of the original 5, that is another $25.00 for me, now +those +25 each make 200 MINIMUM posts with my name at #4 and only 5 +replieseach, I +will bring in an additional $125.00! Now, those 125 persons turn around +and +post the MINIMUM 200 with my name at #3 and onlyreceive 5 replies each, +I +will make an additional $625.00! OK, now here is the fun part, each of +those +625 persons post a MINIMUM 200 letters with my name at #2 and they each +only +receive 5 replies, that just made me $3,125.00!!! Those 3,125 persons +will +all deliver this message to 200 newsgroups with my name at #1 and if +still 5 +persons per 200 newsgroups react I will receive $15,625,00! With an +original +investment of only $6.00! AMAZING! When your name is no longer onthe +list, +you just take the latest posting in the newsgroups, and send out another + +$6.00 to names on the list, putting your name at number 6 again. And +start +posting again. The thing to remember is: do you realize that thousands +of +people all over the world are joining the internet and reading these +articles everyday?, JUST LIKE YOU are now!! So, can you afford $6.00 and + +see +if it really works?? I think so... People have said, "what if the plan +is +played out and no one sends you the money? So what! What are the chances + +of +that happening when there are tons of new honest users and new honest +people +who are joining the internet and newsgroups everyday and a are willing +to +give it a try. + +GO,GO,GO + + + + diff --git a/demo/ermis-f/python_m/cur/1955 b/demo/ermis-f/python_m/cur/1955 new file mode 100644 index 00000000..b314fb6d --- /dev/null +++ b/demo/ermis-f/python_m/cur/1955 @@ -0,0 +1,27 @@ +From: fredrik at pythonware.com (Fredrik Lundh) +Date: Tue, 4 May 1999 13:24:59 GMT +Subject: Python T-shirt, mascot +References: <199905032111.XAA15770@kalvermarkt.denhaag.dataweb.net> <372EEEC1.BCD0097E@cfa.harvard.edu> +Message-ID: <008001be9631$864d9d70$f29b12c2@pythonware.com> +X-UID: 1955 + +William Peterson wrote: +> What, pray tell, is the "Knuth indentation quote"? + +http://starship.python.net/crew/amk/quotations/python-quotes.html + + "We will perhaps eventually be writing only small modules which + are identified by name as they are used to build larger ones, so + that devices like indentation, rather than delimiters, might be- + come feasible for expressing local structure in the source + language." + + -- Donald E. Knuth, "Structured Programming with goto State- + ments", Computing Surveys, Vol 6 No 4, Dec. 1974 + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1956 b/demo/ermis-f/python_m/cur/1956 new file mode 100644 index 00000000..15d74779 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1956 @@ -0,0 +1,57 @@ +From: graham at sloth.math.uga.edu (Graham Matthews) +Date: 27 May 1999 19:33:38 GMT +Subject: Python 2.0 +Message-ID: <7ik6mi$lbk$1@cronkite.cc.uga.edu> +Content-Length: 2017 +X-UID: 1956 + +I read the following interesting snippet at + + http://www.python.org/workshops/1997-10/proceedings/hugunin.html + +>6.2. Python in Java's Advantages +> +>Using Java as the underlying systems language for Python has a number of +>advantages over the current implementation of Python in C. First and +>foremost of these in my mind is the opportunity to ride the Java +>popularity wave and let Python code run everywhere there's a Java VM. +>It also makes the rich set of portable Java API's available from within +>Python. +> +>There is also a nice collection of technical reasons why Java is a +>superior implementation language for Python than C. These include +>Java's binary portability, thread-safety, object-orientation, true +>exceptions, garbage collection, and friendliness to glue languages. +>More questions need to be answered before I can make a convincing +>argument that Python 2.0 should be implemented in Java rather than C. +>Nonetheless, I think that Java offers many advantages for Python as +>both an implementation language and a widely available run-time platform. + +What particular intrigues me here is the sentence + +>More questions need to be answered before I can make a convincing +>argument that Python 2.0 should be implemented in Java rather than C. + +I was wondering if this is seriously being considered -- that is +implementing Python 2.0 in Java rather than C. While I understand +that there are some technical challenges with this (notably interfacing +to the existing C implemented extensions), I personally think there +is a lot to be said for compiling Python to the JVM. For example: +access to the Java apis, garbage collection, true compilation, the +ability to write statically typed code (just write that part in Java!), +access to Swing, promoting Python on the coat-tails of Java (free +publicity and hype), etc. + +Comments? + +graham + + +-- + Thanks for the trouble you took from her eyes + I thought it was there for good + So I never really tried + + + + diff --git a/demo/ermis-f/python_m/cur/1957 b/demo/ermis-f/python_m/cur/1957 new file mode 100644 index 00000000..514a2b42 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1957 @@ -0,0 +1,50 @@ +From: JamesL at Lugoj.Com (James Logajan) +Date: Tue, 11 May 1999 21:08:40 -0700 +Subject: A modest solution to the madness. Was: while (a=b()) ... +References: <033101be9bf4$d1ed7c00$f29b12c2@pythonware.com> +Message-ID: <3738FEC8.E8873916@Lugoj.Com> +Content-Length: 1225 +X-UID: 1957 + +Steven D. Majewski wrote: +> OK -- new suggested idiom for those folks who Really, Really have +> to have it all in one statement (It *could* be on one line, but you +> wouldn't be able to read it): +[Ugly code elided to protect "the children[tm]".] + +I haven't waded through all the postings on this perennial discussion, so +perhaps this solution has been posted before, but in case it hasn't, what +(other than perhaps execution speed) is wrong with the following solution: +--------------------------------------------------------------------------- +# Classic loop until EOF. +import sys + +# Creative use of mutable list and dynamic typing to do assignment in while. +def Set(a, b): + a[0] = b + return b + +a = [None] +while Set(a, sys.stdin.readline()): + # Do something with a[0]. Here we just print it. + print repr(a[0]) + +print "EOF:", repr(a[0]) +---------------------------------------------------------------------------- + +Which yields what I would expect (dialogue cut and pasted; terminated with +control-d): + +--------------------------------- +Hey, does this thing work? +'Hey, does this thing work?\012' + +'\012' +My god, it's full of stars! +"My god, it's full of stars!\012" +EOF: '' +--------------------------------- + + + + diff --git a/demo/ermis-f/python_m/cur/1958 b/demo/ermis-f/python_m/cur/1958 new file mode 100644 index 00000000..7728ee9a --- /dev/null +++ b/demo/ermis-f/python_m/cur/1958 @@ -0,0 +1,52 @@ +From: arcege at shore.net (Michael P. Reilly) +Date: Fri, 14 May 1999 14:40:38 GMT +Subject: A Summary: Expression-Assignments. (Very Long) +References: <000f01be9c77$dd284e00$2bcbd9c2@optichrome.com> <3739D550.6845EAFD@appliedbiometrics.com> <926651803snz@vision25.demon.co.uk> +Message-ID: +Content-Length: 1695 +X-UID: 1958 + +Phil Hunt wrote: +: In article <3739D550.6845EAFD at appliedbiometrics.com> +: tismer at appliedbiometrics.com "Christian Tismer" writes: +:> Anyway it is great as it is, please don't ever change it, +:> and no assignment expressions, no +=, all crap. + +: I'd like to see += in Python. + +Since assignment works on references to variables, this can lead to some +complications. Also, there are a good number of ambiguities that result +from working with overloaded objects. + +There was a whole thread on this that is probably still on dejanews +(don't have a reference point for that tho). But one example of this +ambiguity is: + + x = 1 # simple assignment + x += 2 # simple: x = ( x + 2 ) + x += B() # should x now result in an integer or an instance of B? + +Is it safe to make some assumptions? Granted, this is a simple +example, and the assumption is probably clear (hey, I've only had one +cup of coffee, my examples can't get too complex yet ;). But there are +plenty of other situations where the semantics wouldn't be clear from +the statement. + +More importantly, how many times does "x" get evaluated in such a +statement? And with some objects that can become important (database +objects, etc.). Is += implimented as a new syntax to evaluate to "x = +x + y" or as a new special method like __add__, or as a combination? + +Usually it is better to be clear and more verbose (the age old wisdom +of "When in doubt, parenthesize"). This is a basic tenet of Python +(correct me if I'm getting off the mark, Guido :). + +I'm not suggesting we revisit the debate (I saw enough of that debate, +thank you ;), just explaining to someone who asked. + + -Arcege + + + + + diff --git a/demo/ermis-f/python_m/cur/1959 b/demo/ermis-f/python_m/cur/1959 new file mode 100644 index 00000000..02cdca30 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1959 @@ -0,0 +1,88 @@ +From: nospam at mop.no (Alexander Staubo) +Date: Wed, 19 May 1999 15:04:40 +0200 +Subject: Defining VCL-like framework for Python +References: <374286A0.77374B26@infercor.no> +Message-ID: +Content-Length: 3974 +X-UID: 1959 + +In article <374286A0.77374B26 at infercor.no>, paulb at infercor.no says... +[snip] +> > Imho, Python needs a better windowing toolkit than is provided by +> > Tcl/Tkinter today. That's just me. Furthermore, Python does not have (at +> > least afaik) a component-based system for building applications. Python +> > provides many facilities that the VCL defines -- such as persistence and +> > RTTI-like mechanisms -- but afaik there is no well-defined protocol for +> > creating cross-module components. +> +> Could you clarify what you mean by "cross-module components"? As for the Tkinter +> issue, surely there are now more than ever some real alternatives to Tkinter for +> developing graphical user interfaces. I note that wxWindows is now at version 2 +> and gaining some momentum - wxPython is even promoted on the wxWindows home +> page. + +By cross-module components I mean a defined protocol for publishing +component-like objects. Think "like JavaBeans" and we're getting closer. + +> [Description of goals cut] +> +> > One definite guideline here is not to rely on third-party windowing +> > system support: in other words, the project will not use wxPython, +> > Tkinter or any other library, although not precluding the ability to +> > write controls that use such libraries internally. +> +> Could you explain this decision a bit more? It would seem to me that taking +> advantage of one of the more established toolkits would save a lot of extra work +> and allow you to concentrate on the "higher level" aspects of such a project. + +Indeed, although I don't agree that the project should be written around +a specific toolkit. Certainly, the base controls could be written using +Tkinter/GTK/QT/wxPython/whatever on one platform (eg., UNIX); on another +platform, such as Windows, it would probably be more efficient _and_ +cleaner to have the controls write "directly to the metal". + +Most windowing toolkits introduce their specific paradigm for creating +visual "widgets", and they keep you enclosed within the limits of this +paradigm. I'd like a system where I could write a part of my +application with Windows-specific code, or X-specific code, or both (eg., +"if windows:"), with the aim to milk a platform's GUI support for +everything it's worth. For example, OLE-based drag and drop support is +unlikely to exist for UNIX: But I might want that in. Or perhaps I'd like +to trap specific control messages that do not exist on the Mac. + +Afaik, things like Tkinter are "widget libraries". I'm aiming for both a +higher level of abstraction, and a more complete approach -- cover more +bases, so to speak. + +[snip] +> Arguably, Tkinter doesn't even "suck". Yes, people do wonder about the Tcl +> dependence from time to time, but this is only really a consideration where +> installation issues (restrictions, managing versions of lots of different +> packages) are more important than usual. + +Different strokes for different folks, I guess. A big beef with Tkinter +is that it requires 1.4MB worth of runtime DLLs to be bundled with any +application. + +> > Note that the project I have delineated here is not about "reproducing +> > Delphi in Python". At least not yet. :) I want mainly to steal a few good +> > ideas, improve others, and create something that makes Python more +> > valuable to those "visual" programmers out there -- one of whom I don't +> > necessarily count myself, although I sure miss a good windowing toolkit +> > in Python; it deserves one. +> +> It would indeed be good to create such a tool, but I do question the need to +> write an entirely new toolkit to achieve this. + +Actually I did expect the Spanish Inquisition when I wrote my proposal, +but I'm still surprised by the response. + +-- +Alexander Staubo http://www.mop.no/~alex/ +"Give me an underground laboratory, half a dozen atom smashers and a beautiful +girl in a diaphanous veil waiting to be turned into a chimpanzee, and I care +not who writes the nation's laws." --S. J. Perelman + + + + diff --git a/demo/ermis-f/python_m/cur/1960 b/demo/ermis-f/python_m/cur/1960 new file mode 100644 index 00000000..0356b5d2 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1960 @@ -0,0 +1,26 @@ +From: steeds at ccms.net (Mike Steed) +Date: Sun, 02 May 1999 21:45:10 -0500 +Subject: while (a=b()) ... +References: +Message-ID: <372D0DB6.6349@ccms.net> +X-UID: 1960 + +Derek T. Jones wrote: + +> The solution where the test method and the result method of the object +> in the loop are separate is, I believe, the nicest. But when the object +> you're working with doesn't provide that, then I vote for the "forever" +> loop. + +Three cheers for separating the test and the result methods! When the +object you're working with doesn't provide that, my vote is for wrapping +the object with an interface that *does* provide that. Python makes +this especially easy to do. :-) + +My $.02. + +-Mike + + + + diff --git a/demo/ermis-f/python_m/cur/1961 b/demo/ermis-f/python_m/cur/1961 new file mode 100644 index 00000000..426c382f --- /dev/null +++ b/demo/ermis-f/python_m/cur/1961 @@ -0,0 +1,24 @@ +From: fredrik at pythonware.com (Fredrik Lundh) +Date: Wed, 19 May 1999 09:19:50 GMT +Subject: beginers documentation +References: <7ht8ie$7j8$1@bgtnsc02.worldnet.att.net> +Message-ID: <009101bea1da$4158e580$f29b12c2@pythonware.com> +X-UID: 1961 + +Quasar627 wrote: +> where can i get some basic docs about the correct syntax and operands. I +> know qbasic, fortran and pascal, and want to learn python. +> any help is appreciated.... + +http://www.python.org/ (the site) +http://www.python.org/doc/ (pointers to tons of docs) +http://www.python.org/doc/Intros.html (various intros) +http://www.python.org/doc/current/tut/tut.html +(the official tutorial) + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1962 b/demo/ermis-f/python_m/cur/1962 new file mode 100644 index 00000000..fb64fa42 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1962 @@ -0,0 +1,41 @@ +From: paul at prescod.net (Paul Prescod) +Date: Sun, 2 May 1999 21:58:11 GMT +Subject: PROPOSAL: Packages in Python lib +References: <372B5CB7.66DBB930@prescod.net> + <199905020817.KAA29168@axil.hvision.nl> <372C6C01.421B1E3F@hex.net> +Message-ID: <372CCA73.45D0D21D@prescod.net> +Content-Length: 1207 +X-UID: 1962 + +"Peter A. Koren" wrote: +> +> Hans Nowak wrote: +> > +> I have been trying +> > myself to organize all kinds of modules in a package collection, and a +> > problem that occurs quite often is, that a module can logically belong in +> > more than one package. For instance, modules dealing with HTML parsing, do +> > they belong in the Internet package, or in the Text package? (Yes, you don't +> > have those packages here... but I do. :^) +> +> Hmmmmm, it sounds like we need some conditional import mechanism. + +I interpreted Hans' message as reporting the usual problem with building +ontologies -- the world isn't strictly hierarchical and people wouldn't +agree on the hierarchy even if it was. I think you interpred his message +differently, because I don't see how a conditional import mechanism would +help this problem. + +-- + Paul Prescod - ISOGEN Consulting Engineer speaking for only himself + http://itrc.uwaterloo.ca/~papresco + +"Microsoft spokesman Ian Hatton admits that the Linux system would have +performed better had it been tuned." +"Future press releases on the issue will clearly state that the research +was sponsored by Microsoft." + http://www.itweb.co.za/sections/enterprise/1999/9904221410.asp + + + + diff --git a/demo/ermis-f/python_m/cur/1963 b/demo/ermis-f/python_m/cur/1963 new file mode 100644 index 00000000..e96262d9 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1963 @@ -0,0 +1,32 @@ +From: faassen at pop.vet.uu.nl (Martijn Faassen) +Date: Mon, 10 May 1999 22:19:17 +0200 +Subject: Newbie asks about static variables... +References: <000901be9925$48bae480$bd9e2299@tim> +Message-ID: <37373F45.56A9845B@pop.vet.uu.nl> +X-UID: 1963 + +Moshe Zadka wrote: +[big snip] +> notice-that-legalising-class-abuse-and-drug-abuse-were-both-legalized-in- +> amsterdam-which-is-probably-good-ly y'rs, Z. + +legalising class abuse and drug abuse were both legalized -- parse +error! + +> (Note: any discussions about drug abuse do *not* belong on c.l.py -- mail +> me directly if you wish) + +Oooh, those Dutch people, those narco state irresponsible libertarians! +They invent languages are way too addictive and liberal, and I just get +high on the whitespace (though some of it has bad-trip tabs mixed +in..ugh). + +> forstalling-political-flamewars-on-my-favourite-group-ly y'rs, Z. + +:)-ly yours, + +Martijn + + + + diff --git a/demo/ermis-f/python_m/cur/1964 b/demo/ermis-f/python_m/cur/1964 new file mode 100644 index 00000000..72b7b6f8 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1964 @@ -0,0 +1,52 @@ +From: cwebster at math.tamu.edu (Corran Webster) +Date: 19 May 1999 13:47:23 GMT +Subject: Concrete Proposal: while ... and while ... +References: <7hsv80$g9j$1@news.tamu.edu> +Message-ID: <7hufdb$rrh$1@news.tamu.edu> +Content-Length: 1420 +X-UID: 1964 + +In article , +Magnus L. Hetland wrote: +>cwebster at math.tamu.edu (Corran Webster) writes: +> +>I thought the Guido-approved version had a condition on the first as +>well (i.e. an expansion of the standard while loop)? +> +>Thus: +> +>while 1: +> ... +>and while something: +> ... + +It might be the Guido-approved version - I can't recall the exact form +of the approved form. If this is in fact it, then I think my proposal +has a slight advantage over this in simplicity. This form allows two +tests (presuming something other than '1' is permitted after the first +while), where my proposal has precisely one test for the loop, which +seems more natural to me. + +>Of course, that doesn't remove the ugliness of the "while 1" but it +>does alleviate the use of "break". I guess your suggestion actually +>adds the syntax of "while:" for "while 1:" as well -- or is it only in +>the use with "and while" that it is permitted? + +No, "while:" is not permitted without the "and while" later. The precise +grammar is + +while [':' suite 'and' 'while'] test ':' suite ['else' ':' suite] + +and it's implemented by simply inserting the optional suite before +the test - this means the changes to the source are fairly simple. + +It seems to me that with this change, 'while 1:' will be used much +less often, and it's not worth the additional complexity to make +the '1' optional. + +Corran + + + + + diff --git a/demo/ermis-f/python_m/cur/1965 b/demo/ermis-f/python_m/cur/1965 new file mode 100644 index 00000000..68de8341 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1965 @@ -0,0 +1,30 @@ +From: MHammond at skippinet.com.au (Mark Hammond) +Date: Sat, 15 May 1999 10:51:07 +1000 +Subject: Set Pythonpath on NT/95/98 without Win32 extensions +References: <8269DB660804D3119F8F00C04F795FC2016184@vrtmail.vrtelecom.com> <373c1781.68945458@news.omnilink.de> <5l90ar7er1.fsf@eric.cnri.reston.va.us> +Message-ID: <7higbi$hcj$1@m2.c2.telstra-mm.net.au> +X-UID: 1965 + +Guido van Rossum wrote in message <5l90ar7er1.fsf at eric.cnri.reston.va.us>... +>spamfranke at bigfoot.de (Stefan Franke) writes: +> +>> What about installing a .pth file in some directory of sys.path? +> +>Actually, on Windows, the .pth file should be in the toplevel Python +>installation directory, typically C:\Program Files\Python\. + +And even then it doesnt always work :-( This working is dependant on +sys.exc_prefix being set, and if Python is being embedded in another app it +isnt (mainly because in that case, the Python home directory is not easily +deducible) ! For example, if you attempt to use a .pth file to point to a +COM server, it wont be found as the host process usually is something other +than Python. + +Mark. + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1966 b/demo/ermis-f/python_m/cur/1966 new file mode 100644 index 00000000..4a917983 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1966 @@ -0,0 +1,17 @@ +From: dabunny at iav.com (Chuck & Amy Hoskins) +Date: Sat, 29 May 1999 12:38:19 -1000 +Subject: Help for beginner +Message-ID: <7ipplg$31d7@enews3.newsguy.com> +X-UID: 1966 + +I just flat out need to learn how to use Python. I am really interested in +getting into programming and I don't find many sites to help out the common +Moron (myself in this case). Please help!!! + +Chuck + + + + + + diff --git a/demo/ermis-f/python_m/cur/1967 b/demo/ermis-f/python_m/cur/1967 new file mode 100644 index 00000000..fdfe3d38 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1967 @@ -0,0 +1,73 @@ +From: ivnowa at hvision.nl (Hans Nowak) +Date: Sun, 2 May 1999 09:20:18 GMT +Subject: PROPOSAL: Packages in Python lib +In-Reply-To: <372B5CB7.66DBB930@prescod.net> +References: <372B5CB7.66DBB930@prescod.net> +Message-ID: <199905020817.KAA29168@axil.hvision.nl> +Content-Length: 2404 +X-UID: 1967 + +On 1 May 99, Ce'Nedra took her magical amulet and heard Paul Prescod say: + +>I would like to suggest a package organization for the standard modules. +>The package directories should all be in sys.path so that older modules +>would continue to work. Import syntax could become more consistent: +> +>from sys import types +>from sys import path +> +>This would make the shift between using the standard libraries and using +>packages easier. Consistency! +> +>Other benefits: responsibility for packages would be easier. Migration of +>packages into and out of the Python standard library would be easier. +>Platform unportable and implementation unportable code could be more +>cleanly segmented: ("compiler" is implementation unportable, "win" is +>platform unportable). +> +>Over time, (or in the move to Python 2) these packages would migrate to +>real, cohesive packages with consistent internal interfaces (i.e. among +>formats and protocols) and some consistent interfaces at the package level +>(e.g. __all__) +> +>Main benefit: It would be easier to find things in the standard library +>and to document the library! +> +>Downsides: +> +> * slightly more typing on import. +> +>Here is a rough example of what I am thinking of: +> +>sys: +> except +> traceback +> types + +Wouldn't a package sys clash with the builtin module sys? A package with the +same name could never be imported...? + +I guess this is a trivial problem, because you could call it 'system' or +something instead. What bothers me more is the following. I have been trying +myself to organize all kinds of modules in a package collection, and a +problem that occurs quite often is, that a module can logically belong in +more than one package. For instance, modules dealing with HTML parsing, do +they belong in the Internet package, or in the Text package? (Yes, you don't +have those packages here... but I do. :^) + +I think it will be very hard to make a package hierarchy that is logical to +all users (or most of them). That does not mean your proposal isn't good... +I'm just wondering how these problems will be solved. It makes me wish that +there was a different approach to grouping of modules... something non- +hierarchical. + +Veel liefs, + ++ Hans Nowak (Zephyr Falcon) ++ Homepage (under construction): http://www.cuci.nl/~hnowak/ ++ You call me a masterless man. You are wrong. I am my own master. ++ May a dead president sit on your hard body! + + + + diff --git a/demo/ermis-f/python_m/cur/1968 b/demo/ermis-f/python_m/cur/1968 new file mode 100644 index 00000000..085e13d8 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1968 @@ -0,0 +1,25 @@ +From: pj at sgi.com (Paul Jackson) +Date: 4 May 1999 14:51:49 GMT +Subject: Productivity and the two language approach +References: <925758153.6563.0.muttley.c3ade4b2@news.demon.nl> +Message-ID: <7gn1i5$6682v@fido.engr.sgi.com> +X-UID: 1968 + +Tim writes of: +|> enduring the frustration of learning another environment. + +Well, I suppose if you consider learning neat computer languages +frustration to be endured, you can easily enough find reasons +not to do it. + +Just as I can easily enough manufacture reasons _to_ do it, +and even get paid for my fun. +-- + +======================================================================= +I won't rest till it's the best ... Software Production Engineer +Paul Jackson (pj at sgi.com; pj at usa.net) 3x1373 http://sam.engr.sgi.com/pj + + + + diff --git a/demo/ermis-f/python_m/cur/1969 b/demo/ermis-f/python_m/cur/1969 new file mode 100644 index 00000000..9d2a6c39 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1969 @@ -0,0 +1,44 @@ +From: mhagger at blizzard.harvard.edu (Michael Haggerty) +Date: 15 May 1999 17:54:24 -0400 +Subject: `Parallel' lists (index and value of list) +References: <000a01be9f04$d3c2d800$659e2299@tim> <373DCED3.53BB1A9A@home.com> +Message-ID: +X-UID: 1969 + +> The latter is what Python lacks today, and the source of the frequent +> +> for i in range(len(seq)): +> element = seq[i] +> +> idiom. + +What if lists had a `values' member like dictionaries do? Then you +could write + +for (i,element) in seq.values(): + print 'Element %d is %s.' % (i, element) + +seq.values() would return a list of (index, value) tuples just as it +does for dictionaries (of course for lists they would be in order). +Its implementation would be equivalent to + +class UserList: + ... + def values(self): + return map(None, range(len(l)), l) + +The advantage is that it requires no new syntax in the language, just +an additional member function for lists which is intuitively analogous +to a member function already present for dictionaries. It might even +be possible to optimize this construct when used in a for statement. + +Just a thought... +Michael + +-- +Michael Haggerty +mhagger at blizzard.harvard.edu + + + + diff --git a/demo/ermis-f/python_m/cur/1970 b/demo/ermis-f/python_m/cur/1970 new file mode 100644 index 00000000..b51f7719 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1970 @@ -0,0 +1,79 @@ +From: mwh21 at cam.ac.uk (Michael Hudson) +Date: 28 May 1999 07:02:15 +0100 +Subject: Rebinding 0 (was Re: "?:", "a and b or c" or "iif") +References: <000001bea7ee$3a542280$459e2299@tim> <7ikkha$24g$1@brick.cswv.com> +Message-ID: +Content-Length: 2181 +X-UID: 1970 + +neelk at brick.cswv.com (Neel Krishnaswami) writes: + +> In article <000001bea7ee$3a542280$459e2299 at tim>, +> Tim Peters wrote: +> > +> >If the revolting "(x and [a] ..." got popular, a peephole optimizer could +> >get rid of the list ops -- but only at the cost of frustrating Michael and +> >Neel's attempts to change what the generated code maps "0" to <0.9 wink>. +> +> How *would* you rebind 0 without hacking the parser? + +Like this: + +>>> from bytecodehacks.code_editor import Function +>>> def f(): return 0 +... +>>> f=Function(f) +>>> f.func_code.co_consts +[None, 0] +>>> f.func_code.co_consts[1]="cabbage" +>>> f=f.make_function() +>>> f() +'cabbage' +>>> + +Though, to be fair, I don't understand what Tim was on about either... + +> This currently works for legal variable identifiers: +> +> >>> x +> Traceback (innermost last): +> File "", line 1, in ? +> NameError: x +> >>> globals()['x'] = 3 +> >>> x +> 3 +> +> IOW, the dictionary returned by globals() is the actual global symbol +> table used by the Python interpreter. + +You'd need to be careful to get that to work inside a function, +because of the way local variables work. bytecodehacks works on a +rather different level. + +[snip] + +> Now, I'm not asking this simply to prove my bad character, but because +> I am thinking that this might make it simpler to implement a macro +> system for Python (in Python, preferably). By that I don't mean a +> simple text preprocessor like C's, but an honest-to-god hygienic macro +> facility, because I could create symbols and manipulate symbols that +> aren't legal Python identifiers. (And then all I need are +> continuations, and I'll be happy. Honest.) + +You should definitely look at bytecodehacks. It has a macro facility +of sorts, though it can't be used to define new syntax. + +> If it does take hacking the parser, where should I begin playing +> around to learn how to change things? It looks like I can simply edit +> the file Grammar/Grammar, but what else do I need to change? (I'm +> thinking of altering Python to have block delimiters as a test +> project.) + +Hacking the interpreter is an area I haven't entered yet (eugh! C!). + +Hav a nice day! +Michael + + + + diff --git a/demo/ermis-f/python_m/cur/1971 b/demo/ermis-f/python_m/cur/1971 new file mode 100644 index 00000000..f562385a --- /dev/null +++ b/demo/ermis-f/python_m/cur/1971 @@ -0,0 +1,51 @@ +From: srenner at lycosmail.com (srenner at lycosmail.com) +Date: Thu, 06 May 1999 16:59:56 GMT +Subject: PyOpenGL on Linux: MesaGL3: undefined: XFreePixmap +References: <87g15ai97a.fsf@linux01.prc.tno.nl> +Message-ID: <7gshq8$6ga$1@nnrp1.deja.com> +Content-Length: 1481 +X-UID: 1971 + +In article <87g15ai97a.fsf at linux01.prc.tno.nl>, + John van der Koijk wrote: +> Hi There, +> +> I'm having trouble getting PyOpenGL to work. Compilation went well +> after I left Togl out. Anyone have a clue what is going on here? +> +> 95 linux01:~/uitpak/PyOpenGL-1.5.5/OpenGL/Demo/srenner $ python ./cursor.py +> Traceback (innermost last): +> File "./cursor.py", line 1, in ? +> from objex import * +> File "./objex.py", line 1, in ? +> from att_obj import * +> File "./att_obj.py", line 3, in ? +> from oglpm import * +> File "./oglpm.py", line 4, in ? +> from OpenGL.GL import * +> File "/usr/lib/python1.5/site-packages/OpenGL/GL/__init__.py", line 4, in ? +> from _opengl_num import * +> ImportError: /usr/lib/libMesaGL.so.3: undefined symbol: XFreePixmap +> +> Greetings, +> -- +> John van der Koijk. +> -- +> + +First, let me say that I am extremely pleased that someone - anyone - is +trying to run my demos. Second, about the XFreePixmap business, I have +definitely encountered the same problem, but never learned what causes it. +Somehow I managed to get everything to run by repeatedly recompiling with +slight changes in the setup file. It's something about the Mesa libraries. + +Perhaps you will have better luck with the next release, which should be +out within a few days. sr + + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/1972 b/demo/ermis-f/python_m/cur/1972 new file mode 100644 index 00000000..af1fcb2a --- /dev/null +++ b/demo/ermis-f/python_m/cur/1972 @@ -0,0 +1,28 @@ +From: befletch at my-dejanews.com (Bruce Fletcher) +Date: Tue, 04 May 1999 17:10:43 GMT +Subject: Trouble with proxies +References: <7gasj8$g79$1@nnrp1.dejanews.com> <5lzp3qafkj.fsf@eric.cnri.reston.va.us> <7gd0dh$add$1@nnrp1.dejanews.com> <7gd626$fcf$1@nnrp1.dejanews.com> <14123.28729.404968.815913@bitdiddle.cnri.reston.va.us> <199905031752.MAA19893@x3.dejanews.com> <14126.21006.876632.122249@bitdiddle.cnri.reston.va.us> +Message-ID: <7gn9mg$i0b$1@nnrp1.dejanews.com> +X-UID: 1972 + +In article <14126.21006.876632.122249 at bitdiddle.cnri.reston.va.us>, + jeremy at cnri.reston.va.us wrote: +> So here's the problem: There is a bug in the WinProxy. It will return +> the 403 error you are getting whenever the initial packet from the +> client does not contain a full HTTP request. + +Cool. Thanks a lot for all the work you've done tracking this one down. +Definitely above and beyond the call. I have added your analysis to my +'incident report' with the WinProxy folks, so hopefully they will consider +fixing this. In the meantime, I will try to get things working with your +work-around code. + +Thanks again for the help (everybody), +- Bruce + +-----------== Posted via Deja News, The Discussion Network ==---------- +http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own + + + + diff --git a/demo/ermis-f/python_m/cur/1973 b/demo/ermis-f/python_m/cur/1973 new file mode 100644 index 00000000..6694fc73 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1973 @@ -0,0 +1,41 @@ +From: srenner at lycosmail.com (srenner at lycosmail.com) +Date: Mon, 24 May 1999 19:10:30 GMT +Subject: Pickling Recalcitrance +Message-ID: <7ic874$dsi$1@nnrp1.deja.com> +X-UID: 1973 + +>From the 'Python Pocket Reference': + +"PICKLE INTERFACE Converts (nearly) arbitrary Python objects to/from +serialized byte streams." + +What is the (nearly) for? And why does this little caveat crop up +as follows: + + File "./Lib/pickle.py", line 406, in save_inst + save(stuff) + File "./Lib/pickle.py", line 197, in save + f(self, object) + File "./Lib/pickle.py", line 357, in save_dict + save(value) + File "./Lib/pickle.py", line 158, in save + raise PicklingError, \ +pickle.PicklingError: can't pickle 'instance method' objects + + +I should mention that almost all my objects do pickle, and I can look +closely at those which don't if I know what to look for. + +'Virtual Reality -- it's like reality, only, like, more.' + +sr + + + + +--== Sent via Deja.com http://www.deja.com/ ==-- +---Share what you know. Learn what you don't.--- + + + + diff --git a/demo/ermis-f/python_m/cur/1974 b/demo/ermis-f/python_m/cur/1974 new file mode 100644 index 00000000..2f5a4a3d --- /dev/null +++ b/demo/ermis-f/python_m/cur/1974 @@ -0,0 +1,14 @@ +From: guido at eric.cnri.reston.va.us (Guido van Rossum) +Date: 05 May 1999 19:06:00 -0400 +Subject: method grid_remove in class Grid +References: <7gqadi$ari$1@newshost.nmt.edu> +Message-ID: <5ld80f86cm.fsf@eric.cnri.reston.va.us> +X-UID: 1974 + +Thanks -- it was just an oversight. Fixed in the CVS copy! + +--Guido van Rossum (home page: http://www.python.org/~guido/) + + + + diff --git a/demo/ermis-f/python_m/cur/1975 b/demo/ermis-f/python_m/cur/1975 new file mode 100644 index 00000000..d6415b03 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1975 @@ -0,0 +1,98 @@ +From: bob at horvath.com (Bob Horvath) +Date: Tue, 11 May 1999 02:41:51 -0500 +Subject: help with simple regular expression grouping with re +References: <000401be9b6e$cf1c5180$569e2299@tim> +Message-ID: <3737DF3F.4FE9E3AF@horvath.com> +Content-Length: 3672 +X-UID: 1975 + +Tim Peters wrote: + +> [Tim] +> > | import re +> > | pattern = re.compile(r""" +> > | " # match an open quote +> > | ( # start a group so re.findall returns only this part +> > | [^"]*? # match shortest run of non-quote characters +> > | ) # close the group +> > | " # and match the close quote +> > | """, re.VERBOSE) +> > | +> > | answer = re.findall(pattern, your_example) +> > | for field in answer: +> > | print field +> +> [Dan Schmidt] +> > This works for a tricky reason, which people should be aware of. +> +> *All* regexps work for a tricky reason -- or, at least, the ones that +> actually do work . +> +> > I had just written the following response to your code: +> > +> > Not that it's important, but technically, what you did was overkill. +> > Because *? is non-greedy, it won't match any quote characters, +> > because it will be happy to hand off the quote to the next element +> > of the regexp, which does match it. +> > +> > So "(.*?)" and "([^"]*)" both solve the problem; you don't need to +> > disallow quotes _and_ match non-greedily. +> > +> > And then I decided to test it, just to make sure (replacing '[^"]' +> > with '.'), and... it failed. Because '.' doesn't match newlines by +> > default. When I added re.DOTALL to the options at the end, it worked +> > fine. +> > +> > Your example works because the character class [^"] (everything +> > but a double quote) happens to include newlines too. (Actually, I +> > think you took the newlines out of the input string before you tested +> > it, so maybe you were just lucky). +> +> I tested it both ways, reported on one, and have no idea which way is +> correct: every time CSV parsing comes up, the questioner is unable to +> define what (exactly) the rules are, and the appearance of line breaks in +> the original example could simply be an artifact of a transport or mailer +> breaking a long line. In the face of the unknown, seemed better to be +> permissive. + +Being the original poster.... + +My problem has CSV that does not cross word boundaries, and does not contain +quotes within the fields (I had to check), but probably could some day. I'll +have to try it and see what it does. + +The line crossing will never happen though. + + +> +> +> > So my new claim is that the following is the 'best' regexp, for my +> > personal definition of best (internal comments deleted): +> > +> > pattern = re.compile(r'"(.*?)"', re.VERBOSE | re.DOTALL) +> +> The original was indeed overkill, but for another reason : it's also +> the case that whenever CSV parsing comes up, a later msg in the thread goes +> "oh! I forgot -- it can have *embedded* quotes too". Writing it [^"] is +> anticipating a step in how the regexp will need to be changed anyway to +> accommodate whichever escape convention they think they've +> reverse-engineered <0.1 wink>. +> +> Even without that prognostication, though, a greedy "([^"]*)" is (as Aahz +> said) likely to run faster than a non-greedy "(.*?)". [^"]* is also more +> robust, in that it unconditionally forbids matching a double quote in the +> guts; what .*? matches depends on context, and will happily chew up double +> quotes too if the context requires it for the *context* to match. In this +> particular regexp as a whole that won't happen, but under *modification* +> context-sensitive submatches are notoriously prone to surprises. +> +> In any case, I certainly didn't need to do both [^"] and *? in the original! +> My "best" would consist of removing the question mark . +> +> otoh-if-embedded-quotes-are-really-illegal-string.split-with-a-little- +> post-processing-would-be-best-of-all-ly y'rs - tim + + + + + diff --git a/demo/ermis-f/python_m/cur/1976 b/demo/ermis-f/python_m/cur/1976 new file mode 100644 index 00000000..a3a03253 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1976 @@ -0,0 +1,26 @@ +From: fredrik at pythonware.com (Fredrik Lundh) +Date: Sat, 15 May 1999 15:15:32 GMT +Subject: [Tkinter] Drag & drop? +References: <19990515091701.7031.qmail@nw178.netaddress.usa.net> +Message-ID: <015001be9eeb$5d432fe0$f29b12c2@pythonware.com> +X-UID: 1976 + +> My question is easy, the answer possibly not... How can I do drag & drop in +> Tkinter? I know from PySol that it's possible... + +does pysol use real drag and drop, or does it just move items +around on a canvas? two radically different things. + +>can't figure out how to do it though. :( Anybody have a clue? + +Tk doesn't support DnD at all, but you can do your own +inter-widget intra-application DnD with a bit of wizardry. +see the Tkdnd.py module in the standard distribution for +one way to do it. + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1977 b/demo/ermis-f/python_m/cur/1977 new file mode 100644 index 00000000..d4641dfe --- /dev/null +++ b/demo/ermis-f/python_m/cur/1977 @@ -0,0 +1,73 @@ +From: markus_kohler at hp.com (Markus Kohler) +Date: Tue, 4 May 1999 13:21:54 GMT +Subject: How slow? (was Re: Python IS slow !) +References: + <1286467371-87168848@hypernet.com> + + <372ED403.1EECB02B@lemburg.com> <372ED5B6.2DE0C9A2@hp.com> <372EEF20.16744BF2@appliedbiometrics.com> +Message-ID: <372EF472.E4CA47BE@hp.com> +Content-Length: 1888 +X-UID: 1977 + +Christian Tismer wrote: +> +> Markus Kohler wrote: +> > +> > M.-A. Lemburg wrote: +> > > +> > > Markus Kohler wrote: +> > > > +> > > > >>>>> "Gordon" == Gordon McMillan writes: +> +> [much deleted] +> +> > > Have you tried the P2C "compiler" ? +> > > +> > > http://lima.mudlib.org/~rassilon/p2c/ +> > +> > Yes, the speedup is not that great. As far as I can remember not more +> > tham 30%. +> > >From what quantify tells me it's still spending a lot of time in +> > function calling code. +> +> P2C does all it can do to get the interpreter overhead away. +> For me this turns out as a nice try but the wrong idea. +> These 30% generate a C code bloat of hundreds of kilobytes +> of C code, while the internal function call overhead is still +> there, eating probably at least as much. + +Yes. Could it be that the problem is that for the CALL_FUNCTION byte +code +call code_eval2 is called recursively ? + + +> +> If such code could be generated in memory on the fly, well +> then I'd consider it. Perhaps we should provide a C compiler +> as an optional extension module for a couple of platforms +> and use it just for time critical cases. +> +> Still there is the 30% limitation which makes me doubt +> if it makes sense to us this approach at all. If we were +> able to break the C API after certain objects are known, +> and if we had access to some processable description of +> their functionality at run time, then this limitation +> could be overcome. + +IMHO the 30% are not worth the code bloat most times. + +> This is one advantage of JPython which has no internal +> language barrier. A good JIT can optimize away, since +> everything is Java machine code internally. And as I read +> in the JPython list, with the latest compilers JPython +> turns out to be slightly faster than CPython for some tests. +> +Interesting ... + +Markus +-- +Markus Kohler mailto:markus_kohler at hp.com + + + + diff --git a/demo/ermis-f/python_m/cur/1978 b/demo/ermis-f/python_m/cur/1978 new file mode 100644 index 00000000..bc7a153b --- /dev/null +++ b/demo/ermis-f/python_m/cur/1978 @@ -0,0 +1,79 @@ +From: arcege at shore.net (Michael P. Reilly) +Date: Tue, 11 May 1999 16:57:13 GMT +Subject: ExpectPy 1.8 - Expect extension for Python +Message-ID: +Content-Length: 3206 +X-UID: 1978 + +[ This is a repost of the following article: ] +[ From: "Michael P. Reilly" ] +[ Subject: ExpectPy 1.8 - Expect extension for Python ] +[ Newsgroups: comp.lang.python.announce ] +[ Message-ID: ] + +[This was originally posted April 26th, but didn't get to the moderator.] + +I've finally gotten time to work on the next release of ExpectPy; the +release is also delayed so I could test against Python 1.5.2. The +major change is the addition of a simple interact function (and method) +which links the I/O of two data streams (sockets, file, spawned +objects, etc.). There is also a new interface for accessing the Expect +variables and a stty method. + +The documentation is bundled alongside the extension tarfile. I'll be +making Python-standard (LaTeX based) docs soon. + +The new version replaces the old at the URL + http://www.shore.net/~arcege/python/ExpectPy/. +My address is arcege at shore.net. I'm sure there will be some bugs (I +just found a minor one this morning and have already documented it); +please let me know what they are. + +I have been asked if ExpectPy runs on NT. There is no official, +supported version of Expect on NT, but someone has ported it; I have +no plans to port ExpectPy to a NT release. I'm neither a NT +programmer, nor (as a release manager) do I like the idea of making an +unofficial port on top of an unofficial port. + + -Arcege + +Changes since 1.7.1: +* Move shared declarations into header files (a sign that the module is + getting larger). +* Fix a number of pathname problems within the configure.in and + Makefile.in files. +* Allow --with-python=

    to specify a build directory instead of an + installation. +* Add a rudimentary version of Expect's interact function. This is + added as a module function and a method to spawn and spawnfile + objects. +* The module is now "Python-thread safe". +* Add new interface to Expect variables: settings. The old function + "set" still exists for backward compatibility. +* Add a method to allow changes to terminal parameters (baudrate, raw, + no-echo). +* Use patchlevel.h protocol for version number changes. +* Have configure better determine what can be built. +* Bring documentation up to date and fix some typos. +* Add more __doc__ strings. + +

    ExpectPy +1.8 - Python adaptation of Don Libes's "Expect" library for automation +of interactive UNIX processes. (10-May-99) + +== +------------------------------------------------------------------------ +| Michael P. Reilly, Release Engineer | Email: arcege at shore.net | +| Salem, Mass. USA 01970 | | +------------------------------------------------------------------------ + +-- +----------- comp.lang.python.announce (moderated) ---------- +Article Submission Address: python-announce at python.org +Python Language Home Page: http://www.python.org/ +Python Quick Help Index: http://www.python.org/Help.html +------------------------------------------------------------ + + + + diff --git a/demo/ermis-f/python_m/cur/1979 b/demo/ermis-f/python_m/cur/1979 new file mode 100644 index 00000000..cef56d82 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1979 @@ -0,0 +1,24 @@ +From: mss at kepler.de (Michael S. Schliephake) +Date: Wed, 26 May 1999 20:36:52 +0200 +Subject: Tcl/Tk clipboard under Windows +Message-ID: <374C3F44.537DED3E@kepler.de> +X-UID: 1979 + +Has anyone remarked the following problem and possibly a solution? + +(Win-NT 4, W98 - Python 1.5.2, Tk 8.05) +If you copy some text from a Tkinter-prog to the clipboard and the +program is finished immediately, one cannot paste the clipboard content +into another programm. If you paste before finishing the Python-program, +the clipboard content is how intended and remains there. + +The problem seems to be in the Tcl/Tk implementation because Tcl/Tk +standalone behaves in the same way. Has anyone enough knowledge of the +Tk-implementation to help with a correction? + +Thanks, +Michael Schliephake. + + + + diff --git a/demo/ermis-f/python_m/cur/1980 b/demo/ermis-f/python_m/cur/1980 new file mode 100644 index 00000000..15da9f45 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1980 @@ -0,0 +1,52 @@ +From: mlh at idt.ntnu.no (Magnus L. Hetland) +Date: 04 May 1999 12:47:41 +0200 +Subject: An Iterator Idiom +References: +Message-ID: +X-UID: 1980 + +Moshe Zadka writes: + +> Hi! +> +> I've seen the ``How do you do while(<>) in Python? We need assignment +> in conditionals...No we don't...yes we do....while 1 is evil....is +> not...'' thread once more, I decided to do something about it. +> +[...] +> +> How do I use it? +> +> Well, something like +> +> for line in iterator(sys.stdin.readline): +> sys.stdout.write(line) +> +> as well as +> +> for buff in iterator(sys.stdin.read, 1024): +> sys.stdout.write(buff) + +Nice -- but it has been done before, by several people. (Myself +included, if I am not mistaken). Check out dejanews. I think I called +it repeat. So: + + for line in repeat(sys.stdin.readline): + process(line) + +or something is what you should look for. + +(I think it was even suggested as a built-in function.) + +> +> Should work. + +-- + + Magnus + Lie + Hetland http://arcadia.laiv.org + + + + diff --git a/demo/ermis-f/python_m/cur/1981 b/demo/ermis-f/python_m/cur/1981 new file mode 100644 index 00000000..3c6691dd --- /dev/null +++ b/demo/ermis-f/python_m/cur/1981 @@ -0,0 +1,52 @@ +From: joe at strout.net (Joe Strout) +Date: Tue, 11 May 1999 13:25:42 -0700 +Subject: my loop is too slow +References: +Message-ID: +Content-Length: 1808 +X-UID: 1981 + +In article , SC Zhong + wrote: + +> I tried to learn and use python a week ago, and wrote +> a small application. When it run the loop: +> +> for k in range(dimension): +> for i in range(dimension): +> for j in range(dimension): +> for h in range(dimension): +> a[k,i]=a[k,i]+c[k,h]*c[k,j]*\ +> f[j,i]*f[i,h] +> +> it took very long time (may be 10 hours in my HP workstation). dimension +> is 142 and a,c,f are all complex. + +There are several things you can do. + +1. Change your loop structure. Compute partial results as much as +possible. E.g., part of your product is c[k,j]*f[j,i]; this does not +change inside the j loop, so you should not be recomputing it on every +iteration of the 'h' loop. + +2. If you're doing something that can be expressed in linear algebra, +consider using the Numeric module; it is MUCH faster than standard +Python at such operations. + +3. You could write just the number-crunching routine in C or FORTRAN or +whatever, as a Python extension. This is a very powerful technique. + +I'm still amazed that it took 10 hours for this. That seems unusually +slow, though a 4D array does get rather large... about half a million +elements. Could it be you were short on RAM, and swapping to disk? + +-- +,------------------------------------------------------------------. +| Joseph J. Strout Biocomputing -- The Salk Institute | +| joe at strout.net http://www.strout.net | +`------------------------------------------------------------------' +Check out the Mac Web Directory! http://www.strout.net/macweb.cgi + + + + diff --git a/demo/ermis-f/python_m/cur/1982 b/demo/ermis-f/python_m/cur/1982 new file mode 100644 index 00000000..4f5d2890 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1982 @@ -0,0 +1,70 @@ +From: gmcm at hypernet.com (Gordon McMillan) +Date: Thu, 20 May 1999 15:00:03 -0500 +Subject: Circular references (was: Defining VCL-like framework for Py +In-Reply-To: <199905201737.TAA28177@axil.hvision.nl> +References: <7hvnah$ern$1@cronkite.cc.uga.edu> +Message-ID: <1284891865-6060292@hypernet.com> +Content-Length: 2413 +X-UID: 1982 + +Ce'Nedra, er, Hans wrote: + +> On 20 May 99, Ce'Nedra took her magical amulet and heard Graham +> Matthews say: + +> >The problem is that as I understand the Python implementation you can very +> >easily make circular refs the without even knowing you are doing it via +> >globals. Or has this been changed? +> +> I don't know very much about this subject... I know it can be a +> problem with deleting objects... they sit in memory because there's +> still a reference to them, while you thought you deleted it. I can't +> really give an example though. I didn't hear about circular +> references via globals without even knowing it. +> +> I'm sure there are people who have more to say on this... *hint* + +Oh all right. + +I'm not sure where "globals" crept into this. If you have a global +reference, the referenced object ain't going away. You can have +*hidden* global references, but that's another problem, and it's not +particular to Python's ref counting scheme. + +The problem is _usually_ a parent / child thing, where each has a +reference to the other. You cut them loose, but they don't go away +because each has another object (the other) referencing them. + +You don't need to break _both_ references, just one of them. Simple +way out: give one of the objects a free() method which just says +"self.parent = None". Now you need to remember to call free() when +you're done with it. + +Another way is to put one of them (the parent, normally) in some +kind of collection, (say, a dict keyed by a name, like id(parent)). +Tell the child the parent's name and the collection. When you cut the +parent loose from the dict, it goes away (the child does not directly +reference it). Then the child goes away (nobody is referencing it). + +You can probably think of other ways of dealing with it. The +important part is recognizing them. Some of them can be subtle. + + class LivesForever: + def __init__(self): + self.me = self + +Despite these drawbacks, I generally prefer ref counting to garbage +collection. GC is generally nondeterminant - you know it _will_ +happen, but you have no idea _when_. So if your objects have some +kind of outside resource open, you need to have a special free() +method anyway instead of relying on freeing it in the destructor. + +I realize many people feel strongly the other way, and I'm not going +to fight about it. Neither solution is perfect. I'm just stating my +preference. + +- Gordon + + + + diff --git a/demo/ermis-f/python_m/cur/1983 b/demo/ermis-f/python_m/cur/1983 new file mode 100644 index 00000000..c800da09 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1983 @@ -0,0 +1,19 @@ +From: shecter at darmstadt.gmd.de (Robb Shecter) +Date: Tue, 04 May 1999 15:36:29 +0200 +Subject: Validating XML? +Message-ID: <372EF7DD.4F430D0D@darmstadt.gmd.de> +X-UID: 1983 + +Hi, + +I saw something somewhere that said that Python has a validating XML +parser. I couldn't find anything about this though in the online docs. +Can someone give an example of validating a piece of XML? + +Thanks, +Robb + + + + + diff --git a/demo/ermis-f/python_m/cur/1984 b/demo/ermis-f/python_m/cur/1984 new file mode 100644 index 00000000..428b083c --- /dev/null +++ b/demo/ermis-f/python_m/cur/1984 @@ -0,0 +1,32 @@ +From: gmcm at hypernet.com (Gordon McMillan) +Date: Thu, 27 May 1999 10:15:38 -0500 +Subject: problem with variable scoping +In-Reply-To: +References: <006e01bea81c$fafdcbc0$f29b12c2@pythonware.com> +Message-ID: <1284304127-4799811@hypernet.com> +X-UID: 1984 + +Moshe Zadka writes: + +> > > Ummmm.....Tim, I beg to differ: it is more like the C++ +> +> +> I humble myself before Fredrik and the Tim, and ask their +> forgiveness for the nonsense I have said. I vow that from now on I +> will not post without checking my programs... +> +> now-who-can-be-mad-at-me-after-a-self-abasement-like-that-ly +> y'rs, Z. + +Nah, bots don't get mad, they don't respond to begging and they +don't grant forgiveness. They just relentlessly correct mistakes, +and sometimes go loopy. Not surprising - I understand the original +Timbot was written in Basic. + +At one point (at least) things worked as you expected under JPython. + +- Gordon + + + + diff --git a/demo/ermis-f/python_m/cur/1985 b/demo/ermis-f/python_m/cur/1985 new file mode 100644 index 00000000..471571dc --- /dev/null +++ b/demo/ermis-f/python_m/cur/1985 @@ -0,0 +1,65 @@ +From: tismer at appliedbiometrics.com (Christian Tismer) +Date: Mon, 10 May 1999 17:03:40 GMT +Subject: my loop is too slow +References: +Message-ID: <3737116C.B24D3F83@appliedbiometrics.com> +Content-Length: 1768 +X-UID: 1985 + + +Tim Hochberg wrote: +> +> SC Zhong wrote in message ... +> > +> >I tried to learn and use python a week ago, and wrote +> >a small application. When it run the loop: +> > +> > for k in range(dimension): +> > for i in range(dimension): +> > for j in range(dimension): +> > for h in range(dimension): +> > a[k,i]=a[k,i]+c[k,h]*c[k,j]*\ +> > f[j,i]*f[i,h] +> +> Are you using Numeric Python? The array notation ([x,y]) would indicate that +> you are either using Numeric or your are using dictionaries to represent +> arrays. If you are doing the second, it is likely to be quite slow. +> +> If you are using or can use Numeric, something like the following (untested) +> code should speed things up significantly. +> +> from Numeric import * +> dimRange = range(dimension) +> # Make sure a is an array. +> a = asarray(a) +> for j in dimRange: +> for h in dimRange: +> a = a + (c[:,h]*c[:,j])[:,NewAxis] * (f[j,:]*f[:,h])[NewAxis,:] + + +def hochberg(a, c, f, dim_range): + from Numeric import * + # Make sure a is an array. + a, c, f = map(asarray, (a, c, f)) + for j in dim_range: + for h in dim_range: + a = a + (c[:,h]*c[:,j])[:,NewAxis] * +(f[j,:]*f[:,h])[NewAxis,:] + +worked 17 times faster than the iterative complex version, tested +with n=30. +And with n=142, it ran in 444 seconds on a P233 machine. + +ciao - chris + +-- +Christian Tismer :^) +Applied Biometrics GmbH : Have a break! Take a ride on Python's +Kaiserin-Augusta-Allee 101 : *Starship* http://starship.python.net +10553 Berlin : PGP key -> http://wwwkeys.pgp.net +PGP Fingerprint E182 71C7 1A9D 66E9 9D15 D3CC D4D7 93E2 1FAE F6DF + we're tired of banana software - shipped green, ripens at home + + + + diff --git a/demo/ermis-f/python_m/cur/1986 b/demo/ermis-f/python_m/cur/1986 new file mode 100644 index 00000000..a4e8071b --- /dev/null +++ b/demo/ermis-f/python_m/cur/1986 @@ -0,0 +1,29 @@ +From: angus at BloodyVikings.dedekind.freeserve.co.uk (Angus Rodgers) +Date: Tue, 4 May 1999 18:24:32 +0100 +Subject: Python documentation updated! +References: <14122.3325.631762.383828@weyr.cnri.reston.va.us> +Message-ID: <7gnafe$4m2$1@news8.svr.pol.co.uk> +X-UID: 1986 + +Fred L. Drake wrote in message +<14122.3325.631762.383828 at weyr.cnri.reston.va.us>... + +> The documentation for Python 1.5.2 is now available. + +Are there substantial differences between the April 13 and the +April 30 versions? Both of them are subtitled "Release 1.5.2". +(The earlier version came with the installation program which +I downloaded on 25 April.) + +-- +Angus Rodgers --Expel Norse invaders from my e-mail address-- +cynical and drunk and boring someone in some iNTeRnEt caf\'{e} + + + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1987 b/demo/ermis-f/python_m/cur/1987 new file mode 100644 index 00000000..63d45d33 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1987 @@ -0,0 +1,29 @@ +From: moshez at math.huji.ac.il (Moshe Zadka) +Date: Sun, 23 May 1999 09:45:31 +0300 +Subject: Python Articles Downloader +In-Reply-To: +References: +Message-ID: +X-UID: 1987 + + +Hi. + +I rewrote my Python articles downloader, making a better and much more +versatile tool. + +Comment, as always, are welcome. + +Get it from: +http://www.geocities.com/TheTropics/Island/2932/download.txt + +just-learning-to-use-urllib-ly y'rs, Z. +-- +Moshe Zadka . +QOTD: My own exit is more likely to be horizontal then perpendicular. + + + + + + diff --git a/demo/ermis-f/python_m/cur/1988 b/demo/ermis-f/python_m/cur/1988 new file mode 100644 index 00000000..002fed04 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1988 @@ -0,0 +1,31 @@ +From: sdm7g at Virginia.EDU (Steven D. Majewski) +Date: Tue, 4 May 1999 12:45:31 -0400 (EDT) +Subject: Python T-shirt, mascot +In-Reply-To: <14127.2366.191322.504900@anthem.cnri.reston.va.us> +References: <199905032111.XAA15770@kalvermarkt.denhaag.dataweb.net> + <14127.2366.191322.504900@anthem.cnri.reston.va.us> +Message-ID: +X-UID: 1988 + +On Tue, 4 May 1999, Barry A. Warsaw wrote: + +> +> >>>>> "BW" == Blake Winton writes: +> +> BW> Combine the two! Eric the half a tab. +> +> LOL! That does seem somehow appropriate. +> +> -Barry + +Great! but: + +[1] Half a tab : what is that is spaces ? +[2] Can we get this character assigned into unicode space somewhere ? + + +- Steve M. + + + + diff --git a/demo/ermis-f/python_m/cur/1989 b/demo/ermis-f/python_m/cur/1989 new file mode 100644 index 00000000..4d065ef4 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1989 @@ -0,0 +1,52 @@ +From: philh at vision25.demon.co.uk (Phil Hunt) +Date: Mon, 03 May 99 01:36:15 GMT +Subject: % +References: <925435812snz@vision25.demon.co.uk> +Message-ID: <925695375snz@vision25.demon.co.uk> +Content-Length: 1487 +X-UID: 1989 + +In article + quinn at photo.ugcs.caltech.edu "Quinn Dunkan" writes: +> On Fri, 30 Apr 99 01:30:12 GMT, Phil Hunt wrote: +> >Consider the % operator, eg: +> > +> > 'All %(a)s eat %(b)s' % {'a':'cows', 'b':'grass'} +> > +> >If the dictionary doesn't have all the relevant keys, an error +> >occurs. Is it possible for me to change the behaviour of this so that +> >if a key doesn't occur a default value of '' is assumed? +> +> Well, my way is to make my own dictionary: +> +> import UserDict +> class DefaultDict(UserDict.UserDict): +> def __init__(self, dict, default=''): +> self.default = default +> self.data = dict +> def __getitem__(self, key): +> return self.data.get(key, self.default) + +That's neat. + +One of the nice things about Python is that you can write stuff like +this in a small amount of code -- I bet the equivalent in C++ or Java +would be somewhat longer. + +This answers the other question I had: how do I run a for loop over +a dictionary so that it loops over the elements sorted by key. Presumably +I'd just override the items() method in DefaultDict. + +> 'All %(a)s eat %(b)s' % DefaultDict({'a': 'cows', 'b': 'grass'}) +> +> Union dictionaries (search through several dicts) are particularly useful for +> %. There's even an implementation in C from DC (MultiMapping.so) +> + +-- +Phil Hunt....philh at vision25.demon.co.uk + + + + + diff --git a/demo/ermis-f/python_m/cur/1990 b/demo/ermis-f/python_m/cur/1990 new file mode 100644 index 00000000..474b9a87 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1990 @@ -0,0 +1,37 @@ +From: herzog at online.de (Bernhard Herzog) +Date: 20 May 1999 01:21:56 +0200 +Subject: Concrete Proposal: while ... and while ... +References: <7hsv80$g9j$1@news.tamu.edu> <7hufdb$rrh$1@news.tamu.edu> +Message-ID: +X-UID: 1990 + +mlh at idt.ntnu.no (Magnus L. Hetland) writes: + +> Maybe -- but then the keyword "while" seems a bit strange... +> +> while: +> line = readline() +> and while line: +> print line +> +> To me, the "while: line=readline()" sounds like some kind of +> condition, and it certainly isn't... I would find this more +> understandable: +> +> repeat: +> line = readline() +> and while line: +> print line +> +> But then we have another keyword again... + +Well, you could perhaps use 'exec' instead of 'while' or 'repeat'. Of +course, exec doesn't really indicate that the suite following is a loop. + +-- +Bernhard Herzog | Sketch, a python based drawing program +herzog at online.de | http://www.online.de/home/sketch/ + + + + diff --git a/demo/ermis-f/python_m/cur/1991 b/demo/ermis-f/python_m/cur/1991 new file mode 100644 index 00000000..772682a3 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1991 @@ -0,0 +1,19 @@ +From: shecter at darmstadt.gmd.de (Robb Shecter) +Date: Mon, 03 May 1999 14:28:20 +0200 +Subject: HTTP cookies? +Message-ID: <372D9664.8D4011F@darmstadt.gmd.de> +X-UID: 1991 + +Hi, + +I need to write an HTTP client that can handle cookies. From looking +through the docs, I didn't see if the standard Python HTTP classes have +any cookie code. + +Thanks for any pointers, +- Robb + + + + + diff --git a/demo/ermis-f/python_m/cur/1992 b/demo/ermis-f/python_m/cur/1992 new file mode 100644 index 00000000..057221ea --- /dev/null +++ b/demo/ermis-f/python_m/cur/1992 @@ -0,0 +1,39 @@ +From: rael at see.sig (William S. Lear) +Date: 10 May 1999 12:06:36 -0500 +Subject: An efficient split function +References: <14134.64897.771093.125780@amarok.cnri.reston.va.us> +Message-ID: +Content-Length: 1218 +X-UID: 1992 + +"Andrew M. Kuchling" writes: +> William S. Lear writes: +> >Surprisingly, to me, the Python version far outperformed the Perl +> >version. Running on 1 million lines of input of 9 fields each, the +> >Python version ran in just under 20 seconds, the Perl version in just +> >under 40 seconds (this on a 400Mhz Pentium Linux box). +> +> Note that your use of split(/\|/) in Perl requires using the +> regular expression engine, instead of a simple C splitting loop . Try +> using a literal string instead of a regex, as in split('|', ...); that +> will probably even out the speeds. + +Thanks for the suggestion, which I had tried originally, but got +marginally worse performance than with the regexp. For some reason, I +did have to do split('\|') instead of split('|'), which I found curious. + +As long as I'm not doing something entirely ridiculous... + +Thanks again. + + +Bill +-- +William S. Lear | Who is there that sees not that this inextricable labyrinth +r a e l @ | of reasons of state was artfully invented, lest the people +d e j a . | should understand their own affairs, and, understanding, +c o m | become inclined to conduct them? ---William Godwin, 1793 + + + + diff --git a/demo/ermis-f/python_m/cur/1993 b/demo/ermis-f/python_m/cur/1993 new file mode 100644 index 00000000..09a51b03 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1993 @@ -0,0 +1,113 @@ +From: mwh21 at cam.ac.uk (Michael Hudson) +Date: 18 May 1999 09:13:53 +0100 +Subject: Bytecode optimisation +References: <7hq7qc$itn$1@news.tamu.edu> +Message-ID: +Content-Length: 3546 +X-UID: 1993 + +cwebster at math.tamu.edu (Corran Webster) writes: +> I've been mucking around with the bytecodehacks modules of Michael Hudson +> this past weekend, and have used it to hack up an ad hoc bytecode +> optimiser. I'm posting this to stimulate a bit of interest from others, +> since I have zero experience in building optimising compilers - my knowledge +> is all gathered from reading the dragon book. + +I'm impressed (and slightly scared - people are actually *using* my +code...). + +> This is proof-of-concept stuff at present, I intend a complete +> re-write, and this code almost certainly is incorrect - it has not been +> seriously tested. Use it at your own risk. + +Well, that's what I thought the status of bytecodehacks was... + +> However, it can: +> * precalculate constants: 8 + 4 gets replaced by 12. +> * remove redundant code: strip SET_LINENO bytecodes and unreachable code. +> * simplify jumps-to-jumps and jumps-to-breaks. + +Have you looked at Skip Montanaro's optimizer: + +http://www.automatrix.com/~skip/python/spam7/optimizer.html + +This does some similar work. Unfortunately is distributed as a patch +against Python 1.4 sources, so I had to hack at it with sed to get the +bits I was interested in out. + +> The morals of this hack are: +> +> * Michael's bytecode hacks _enormously_ simplify this sort of thing +> because they track jump destinations, and allow easy editing of code +> objects. +> +> * There's considerable room for peephole type optimization. +> +> * Optimisation is probably only worthwhile when speed is essential. + +Isn't this a tautology? Repest after me "Premature optimization is +..." + +> * More complex optimisation is certainly possible, although a lot more +> work would be required. I've made a first stab at block-level analysis +> and it seems feasible. In particular it would be nice to detect and +> shift loop invariant code. + +The problem is you can't, at least not without potentially changing +the meaning of the code. + +You might think + +while c < 10: + c = c + a + b + +is equivalent to: + +d = a + b +while c < 10: + c = c + d + +but there's not the least guarantee that a + b return sthe same value +each time. + +I was thinking that maybe you could `tag' variables as numeric or +commutative or whatever like so: + +def func(x): + numeric(x) + c = 0 + while c < 1: + c = c + (x*x - 2) # could be hoisted + +Then a bytecodehacks optimizer would strip the tags out but could use +the information so gleaned to perform more sophisticated +optimizations. + +> * If type information could be guessed, then more might be able to be +> squeezed. At the moment I can't simplify something like 0 * x, +> because x could be anything, and could call an arbitrary function to +> perform the operation. If it was known that x was an integer, then we +> could safely replace it with 0. Assert statements could be used for +> this sort of thing. + +This sort of consideration is the fundamental problem with optimizing +Python. + +> * If you really need to make your code run faster, you're still better +> off squeezing the Python source; if that doesn't work, then you +> probably want to re-write in C. However, there is hope for us lazy +> coders in the future. +> +> I must warn again that this code is ugly-mindbending-probably-wrong-pre- +> -alpha-use-it-at-your-own-risk-has-to-be-rewritten-evil-nasty stuff. +> +> But-it-is-fun-to-play-with-ly yours, +> Corran +> + +if-you-get-better-than-twenty-percent-speed-up-I'll-be-impressed-ly y'rs +Michael + + + + diff --git a/demo/ermis-f/python_m/cur/1994 b/demo/ermis-f/python_m/cur/1994 new file mode 100644 index 00000000..5d76ccaf --- /dev/null +++ b/demo/ermis-f/python_m/cur/1994 @@ -0,0 +1,31 @@ +From: graham at sloth.math.uga.edu (Graham Matthews) +Date: 28 May 1999 21:14:07 GMT +Subject: Python 2.0 +References: <7ik6mi$lbk$1@cronkite.cc.uga.edu> <199905280534.HAA13311@axil.hvision.nl> <7imelb$55r$2@cronkite.cc.uga.edu> <%kA33.1062$nn.303934@news.shore.net> +Message-ID: <7in0uv$o51$1@cronkite.cc.uga.edu> +X-UID: 1994 + +Michael P. Reilly (arcege at shore.net) wrote: +: But I do have to ask, what do you find lacking with JPython, Graham? +: It is Python written in Java, on the JVM, with full API support (as far +: as I have determined), and supposed "true garbage collection". JPython +: functions/methods are written in Java bytecode, not in Python bytecode +: (according to the docs). + +I have used JPython (that's where the orginal quote that started this +message came from). My point is that I think implementation via Java is +a good idea and I am wondering if that is being considered for the +future of CPython. ie. abandoning the CPython implementation as the +main Python and adopting a Java implementation instead (reversing the +status of CPython and JPython). + +graham +-- + Je suis pour le communisme + Je suis pour le socialisme + Je suis pour le capitalisme + Parce que je suis opportuniste + + + + diff --git a/demo/ermis-f/python_m/cur/1995 b/demo/ermis-f/python_m/cur/1995 new file mode 100644 index 00000000..d1665f9c --- /dev/null +++ b/demo/ermis-f/python_m/cur/1995 @@ -0,0 +1,24 @@ +From: bbaetz at ug.cs.usyd.edu.au (Bradley Baetz) +Date: Sun, 16 May 1999 17:52:54 +1000 +Subject: dump() for python 1.5.2? +Message-ID: <373E7955.2DA10A1B@ug.cs.usyd.edu.au> +X-UID: 1995 + +I need a way to find out the locations of any embedded widgets in a text +widget. + +The tkinter documentation at www.pythonware.com has a dump() method +which would do what I want, but it "is not implimented in python 1.5.2 +and earlier". It also has a note: "FIXME: add material on the dump +method, and how to use it is 1.5.2 and earlier" + +Does anyone know? + +Thanks, + + +Bradley + + + + diff --git a/demo/ermis-f/python_m/cur/1996 b/demo/ermis-f/python_m/cur/1996 new file mode 100644 index 00000000..c5e3182b --- /dev/null +++ b/demo/ermis-f/python_m/cur/1996 @@ -0,0 +1,25 @@ +From: fredrik at pythonware.com (Fredrik Lundh) +Date: Thu, 13 May 1999 17:27:34 GMT +Subject: while (a=b()) ... (famous last words, or something) +References: +Message-ID: <015901be9d65$f71fd9b0$f29b12c2@pythonware.com> +X-UID: 1996 + +Nathan Clegg wrote: +> Do we investigate (even continually investigate) +> improvements to our favorite tool? Damn right. + +I actually mentioned numerous potential improvements +in my message. I consider many of them being critical +for Python's future, but they don't seem to get as much +attention as the "python doesn't include a certain feature +from my other favourite language" stuff. I wonder why... + +[no you don't! --ed.] + + + + + + + diff --git a/demo/ermis-f/python_m/cur/1997 b/demo/ermis-f/python_m/cur/1997 new file mode 100644 index 00000000..2957cd43 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1997 @@ -0,0 +1,58 @@ +From: brunomadv at ciudad.com.ar (Bruno Mattarollo) +Date: Mon, 10 May 1999 19:18:32 GMT +Subject: Python T-shirt +In-Reply-To: +References: +Message-ID: <000801be9b19$e471bf20$6eba0ac8@kuarajy.infosys.com.ar> +Content-Length: 1165 +X-UID: 1997 + +Please... use the ferocious beast from the film "the Quest of Holly Grail" +... well, I don't know the original title, but it's the movie where the +knight that says "Ni" appears... :-) That white little bunny that looked so +nice ... :-) + +/B + +Bruno Mattarollo +... proud to be a PSA member + +> -----Original Message----- +> From: python-list-request at cwi.nl [mailto:python-list-request at cwi.nl]On +> Behalf Of Magnus L. Hetland +> Sent: Monday, May 10, 1999 3:18 PM +> To: python-list at cwi.nl +> Subject: Re: Python T-shirt +> +> +> Jonne Itkonen writes: +> +> > Magnus wrote: +> > > No! Remember -- Python is named after Monty Python, not after the... +> > +> > Ashton MacAndrews wrote: +> > +> > > >Rubbish. We don't even *have* a mascot. +> > +> > > A giant foot? A crunchy frog? A newt that got better? +> > +> > How about a telly with an exploding penguin on it? =) +> +> Yeah -- and with a big foot in the TV :) +> +> ("Make your linux explode with Python"... Er...) +> +> > +> > Jonne +> +> -- +> +> Magnus +> Lie +> Hetland http://arcadia.laiv.org +> + + + + + diff --git a/demo/ermis-f/python_m/cur/1998 b/demo/ermis-f/python_m/cur/1998 new file mode 100644 index 00000000..7a4e21fe --- /dev/null +++ b/demo/ermis-f/python_m/cur/1998 @@ -0,0 +1,21 @@ +From: swingkid at yahoo.com (Mark Tagawa) +Date: Fri, 21 May 1999 16:20:15 GMT +Subject: Binhex module in JPython? +Message-ID: <3745870e.5519436@news.newsguy.com> +X-UID: 1998 + +Hi, + +I just installed JPython hoping that I would be able to call the +binhex module from my Java application. I was unable to import the +module. Does anyone know whether this module has been ported? Am I +doing something wrong? + +Thanks in advance for any help. + +Mark Tagawa +swingkid at yahoo.com + + + + diff --git a/demo/ermis-f/python_m/cur/1999 b/demo/ermis-f/python_m/cur/1999 new file mode 100644 index 00000000..b4f90ce8 --- /dev/null +++ b/demo/ermis-f/python_m/cur/1999 @@ -0,0 +1,35 @@ +From: timd at macquarie.com.au (Timothy Docker) +Date: 11 May 1999 09:24:43 +1000 +Subject: PyOpenGL on Linux: waiting for hardware acceleration +References: <7h7eg1$h8s$1@nnrp1.deja.com> +Message-ID: +Content-Length: 1049 +X-UID: 1999 + +srenner at lycosmail.com writes: + +> Does anyone have hardware acceleration working with Linux yet? I have +> been waiting for over a year -- it is always reputed to be just +> around the corner. If anyone wants to do complete 3d toy world/game +> prototyping in Python, the tools are already in place. I should know, +> since that's what I've been spending all my time on. + +If you are have a 3dfx based graphics card, then 3d hardware +acceleleration+linux+mesa+python works fine. I've had this working for +some time now (toy usage only though). + +There were no tricks to getting this to work, just build mesa with +3dfx support, build python, build pyOpenGL, and start coding python. + +The major drawback - with the card that I have 3d can only be fully +accellerated with full screen output. Output to a window requires a +copy of the frame, which slows things down alot (but it still much +faster than software only mesa). + + +-------------------------------------------------------------- +Tim Docker timd at macquarie.com.au + + + + diff --git a/melib/build.rs b/melib/build.rs index 882fd718..12375308 100644 --- a/melib/build.rs +++ b/melib/build.rs @@ -22,14 +22,51 @@ #[cfg(feature = "unicode_algorithms")] include!("src/text_processing/types.rs"); +use std::fs::{self, File}; +use std::io::prelude::*; +use std::io::BufReader; +use std::path::{Path, PathBuf}; +use std::process::Command; +fn build_mailbox( + mailbox_path: &[u8], + mailbox_name: &[u8], + fs_mailbox_path: Option<&Path>, + file: &mut File, +) -> Result<(), std::io::Error> { + file.write_all( + br##" ( + ""##, + )?; + file.write_all(mailbox_path)?; + file.write_all( + br##"", + ""##, + )?; + file.write_all(mailbox_name)?; + file.write_all( + br##"", + &[ + "##, + )?; + if let Some(mailbox_path) = fs_mailbox_path { + for entry in fs::read_dir(&mailbox_path)? { + let entry = entry?; + let path = entry.path(); + if !path.is_dir() { + file.write_all(b"include_str!(\"../../../")?; + file.write_all(path.display().to_string().as_bytes())?; + file.write_all(b"\"),\n")?; + } + } + } + file.write_all(b"]), \n") +} + fn main() -> Result<(), std::io::Error> { println!("cargo:rerun-if-changed=./../demo/"); println!("cargo:rerun-if-changed=build.rs"); { - use std::fs::{self, File}; - use std::io::prelude::*; - use std::path::Path; - let mod_path = Path::new("src/backends/demo/demo_corpus.rs"); + let mod_path: &Path = Path::new("src/backends/demo/demo_corpus.rs"); if mod_path.exists() { eprintln!( "{} already exists, delete it if you want to replace it.", @@ -40,81 +77,28 @@ fn main() -> Result<(), std::io::Error> { println!("cwd: {:?}", std::env::current_dir()); println!("mod_path: {:?}", &mod_path); let mut file = File::create(&mod_path)?; - file.write_all(br##"pub static DEMO_MAILBOXES: &'static [(&'static str, &'static str, &'static [&'static str])] = &[ - ( - "INBOX", - "INBOX", - &[ - "##)?; + file.write_all(br##"pub static DEMO_MAILBOXES: &'static [(&'static str, &'static str, &'static [&'static str])] = &["##)?; let demo_path = Path::new("./../demo/ermis-f/cur"); println!("demo_path: {:?}", &demo_path); assert!(demo_path.is_dir()); - for entry in fs::read_dir(&demo_path)? { - let entry = entry?; - let path = entry.path(); - if !path.is_dir() { - file.write_all(b"include_str!(\"../../../")?; - file.write_all(path.display().to_string().as_bytes())?; - file.write_all(b"\"), \n")?; - } - } - file.write_all(b"], \n")?; - file.write_all( - br##" - ), - ("INBOX/All", "All", &[]), - ("INBOX/Discussion Threads", "Discussion Threads", &[]), - ("INBOX/Sent", "Sent", &[ - "##, - )?; - + build_mailbox(b"INBOX", b"INBOX", Some(demo_path), &mut file)?; + let demo_path = Path::new("./../demo/ermis-f/python_m/cur"); + build_mailbox(b"INBOX/Python", b"Python", Some(demo_path), &mut file)?; + //build_mailbox(b"INBOX/All", b"All", None, &mut file)?; + //build_mailbox(b"INBOX/Discussion Threads", b"Discussion Threads", None, &mut file)?; let demo_path = Path::new("./../demo/ermis-f/Sent/cur"); - println!("demo_path: {:?}", &demo_path); - assert!(demo_path.is_dir()); - for entry in fs::read_dir(&demo_path)? { - let entry = entry?; - let path = entry.path(); - if !path.is_dir() { - file.write_all(b"include_str!(\"../../../")?; - file.write_all(path.display().to_string().as_bytes())?; - file.write_all(b"\"), \n")?; - } - } - - file.write_all( - br##" - ]), - ("INBOX/Notes", "Notes", &[]), - ("INBOX/Trash", "Trash", &[ - "##, - )?; + build_mailbox(b"INBOX/Sent", b"Sent", Some(demo_path), &mut file)?; + //build_mailbox(b"INBOX/Notes", b"Notes", None, &mut file)?; let demo_path = Path::new("./../demo/ermis-f/Trash/cur"); - println!("demo_path: {:?}", &demo_path); - assert!(demo_path.is_dir()); - for entry in fs::read_dir(&demo_path)? { - let entry = entry?; - let path = entry.path(); - if !path.is_dir() { - file.write_all(b"include_str!(\"../../../")?; - file.write_all(path.display().to_string().as_bytes())?; - file.write_all(b"\"), \n")?; - } - } - + build_mailbox(b"INBOX/Trash", b"Trash", Some(demo_path), &mut file)?; file.write_all( br##" - ]), ]; "##, )?; } #[cfg(feature = "unicode_algorithms")] { - use std::fs::File; - use std::io::prelude::*; - use std::io::BufReader; - use std::path::{Path, PathBuf}; - use std::process::Command; const LINE_BREAK_TABLE_URL: &str = "http://www.unicode.org/Public/UCD/latest/ucd/LineBreak.txt"; diff --git a/melib/src/backends/demo/demo_corpus.rs b/melib/src/backends/demo/demo_corpus.rs index a5cdba7c..2e7bb4d1 100644 --- a/melib/src/backends/demo/demo_corpus.rs +++ b/melib/src/backends/demo/demo_corpus.rs @@ -1,429 +1,2332 @@ -pub static DEMO_MAILBOXES: &'static [(&'static str, &'static str, &'static [&'static str])] = &[ - ( +pub static DEMO_MAILBOXES: &'static [(&'static str, &'static str, &'static [&'static str])] = &[ ( "INBOX", "INBOX", &[ - include_str!("../../.././../demo/ermis-f/cur/27847073.1075855167976.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/14868182.1075861338166.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/2011572.1075861338235.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/6673313.1075855166695.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/12037233.1075855168071.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/3200651.1075861339184.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/19548825.1075855167201.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/15778635.1075861336191.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/5130739.1075855166105.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/24286527.1075861339965.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/7976222.1075861336049.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/33538700.1075855169184.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/22515050.1075861336808.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/2646725.1075861340254.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/8433743.1075861340921.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/25609768.1075855167869.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/19423957.1075861339337.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/8232630.1075855166602.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/15607903.1075862655245.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/20683529.1075855167894.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/19827443.1075861336693.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/4818264.1075861337397.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/33203232.1075861339415.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/24362835.1075861338947.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/28411928.1075861334813.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/29349376.1075861337074.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/24201779.1075855166950.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/10940241.1075855166230.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/6713247.1075855167178.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/30966468.1075855166920.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/14215113.1075859150873.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/13397914.1075861337233.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/18446640.1075855166156.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/24988647.1075861340608.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/1434339.1075861338976.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/3614690.1075855168172.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/24826179.1075861337097.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/27554432.1075855165960.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/4632773.1075861339556.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/9190722.1075861339485.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/6073973.1075861338730.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/17459166.1075855165142.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/7977874.1075855169586.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/6422082.1075861336073.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/6902675.1075861341109.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/2256814.1075855168510.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/19743679.1075861341335.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/23936330.1075861339888.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/18173893.1075861338421.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/24690486.1075855167562.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/314349.1075861335613.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/9690915.1075861338208.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/4293577.1075861337522.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/6090011.1075855167364.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/15233052.1075861335637.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/21857215.1075861338522.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/2882539.1075861337634.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/11510169.1075861338322.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/28068718.1075861339461.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/14864700.1075861339002.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/10430272.1075861334560.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/17969911.1075855169399.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/6895070.1075861334680.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/29091198.1075855166319.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/2708769.1075861334433.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/30414661.1075861336378.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/29528847.1075855167734.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/24038452.1075861338602.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/2697913.1075861340338.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/1378999.1075861339937.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/21446473.1075855165426.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/2414125.1075861334648.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/19111374.1075855167661.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/24565297.1075855168293.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/12925516.1075861336856.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/24489685.1075855165861.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/15225924.1075861338658.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/20230588.1075861340894.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/24676092.1075861335860.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/25007296.1075855169027.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/10125224.1075861338344.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/31080154.1075861340763.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/31945973.1075861338297.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/21469528.1075855165936.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/12259029.1075861339616.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/16935956.1075861340635.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/30559528.1075855169455.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/23064445.1075855166463.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/345807.1075855165473.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/26917265.1075861340542.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/9833916.1075855166415.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/17798744.1075855168440.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/15717563.1075861336502.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/31655445.1075855165240.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/12407325.1075861335057.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/3587322.1075855165038.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/3222258.1075861339390.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/4401397.1075855170453.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/32197777.1075861341198.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/17857511.1075861337878.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/254613.1075855170241.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/15496121.1075859150827.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/22681428.1075861335087.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/31004059.1075855166131.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/12897459.1075861339795.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/2167584.1075861338571.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/14244203.1075855169000.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/20521740.1075861337611.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/30375076.1075855169694.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/24436331.1075861340149.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/16990554.1075855168041.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/3356145.1075861341288.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/29390631.1075861340462.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/22305081.1075861334487.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/8991858.1075855168242.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/7847445.1075861338838.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/30097492.1075859150787.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/26433813.1075861336564.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/13442327.1075861339154.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/12599237.1075861340516.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/3289075.1075861337738.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/20322315.1075855170476.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/16018435.1075861338682.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/68049.1075855169291.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/2245451.1075855170634.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/19475550.1075861335688.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/5862380.1075859150896.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/25050679.1075861337448.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/15903927.1075861334393.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/4982442.1075855168725.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/6152588.1075861334846.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/970477.1075861341264.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/5591087.1075861339208.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/5294586.1075861336265.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/132454.1075861337315.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/17666933.1075855168699.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/625724.1075855169611.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/24477392.1075855165357.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/24595911.1075861336528.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/25726.1075861337982.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/16269037.1075861341159.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/12694194.1075861338758.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/7793205.1075855165120.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/13323139.1075861338094.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/1100065.1075861335576.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/12288697.1075861340055.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/26848357.1075861340836.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/20126175.1075861337548.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/22350323.1075861337951.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/21849842.1075855167686.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/2825983.1075861334918.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/20299842.1075861337015.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/10418976.1075855169865.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/18273866.1075861339024.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/25810313.1075855170604.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/6764267.1075861339533.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/27409349.1075861337289.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/25357853.1075861334869.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/8826031.1075855166808.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/20900630.1075855166625.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/32885543.1075861334977.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/17126366.1075861336832.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/27371397.1075855166857.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/6565803.1075855165837.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/7659171.1075861339771.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/6564888.1075855169923.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/32321684.1075861337854.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/32227944.1075861339314.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/32803045.1075855165911.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/29559114.1075861335530.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/14610231.1075861334894.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/527379.1075861336241.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/28092732.1075855169792.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/15566855.1075855166579.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/5941235.1075855165188.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/16379304.1075855168566.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/6813190.1075861340968.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/26128330.1075855165580.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/7493164.1075861335965.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/2711540.1075855165165.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/23261149.1075861335138.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/6774163.1075861335196.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/29912783.1075855165211.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/24988798.1075855167273.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/20771660.1075855169099.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/10774140.1075861336719.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/1602316.1075861335663.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/6513489.1075855168677.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/5975399.1075861339818.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/18915327.1075861338634.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/25664518.1075855167228.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/17177896.1075855165813.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/17869404.1075855170266.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/2179790.1075855167951.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/32309712.1075855169374.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/20122265.1075861338375.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/4626635.1075855168969.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/26323334.1075861341017.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/21747660.1075861336453.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/14151835.1075855166345.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/13780512.1075855168544.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/18311052.1075861334734.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/5746820.1075855168353.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/22773245.1075855169769.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/13232231.1075861334593.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/4170725.1075855167918.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/10858754.1075861336217.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/26401326.1075861337711.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/1510254.1075861335402.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/1960384.1075855170349.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/2329626.1075861335506.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/33515772.1075861335308.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/23090941.1075861338867.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/15691549.1075861335433.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/8328864.1075855166741.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/22202925.1075855170118.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/21992049.1075861334703.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/11442162.1075861336024.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/9111018.1075855169951.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/20648454.1075861339266.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/1795248.1075855170406.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/2852493.1075855165556.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/23887584.1075861340278.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/20012421.1075855169979.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/14730260.1075855170052.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/4161320.1075861341521.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/23453834.1075855167537.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/12007090.1075861340945.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/25414695.1075861336352.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/3183998.1075861335236.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/23292931.1075855166180.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/14781038.1075855165403.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/27705296.1075861335261.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/30023147.1075861335926.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/12135954.1075855168861.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/2840495.1075855170577.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/31952499.1075861337582.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/10651018.1075861337829.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/17592906.1075861335482.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/14007895.1075855169634.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/25427135.1075855168937.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/21267809.1075861336761.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/4037448.1075855169208.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/7393067.1075861339362.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/28520999.1075855166832.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/11997233.1075855165603.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/27364268.1075859150850.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/17160569.1075855168377.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/4804926.1075861340124.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/12249455.1075861338790.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/19177858.1075861338267.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/3537035.1075855167107.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/30411832.1075855169432.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/21285631.1075855167758.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/15718153.1075861341230.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/27102362.1075861339106.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/28503033.1075861337258.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/19740046.1075855165758.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/8993435.1075855169129.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/22063169.1075855167132.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/15495290.1075861337195.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/7309286.1075855170430.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/2866511.1075861340812.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/19303845.1075861337474.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/4283336.1075861336158.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/10602937.1075855167708.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/23337497.1075855166501.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/20207444.1075855170192.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/4807720.1075861336131.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/10231298.1075855167022.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/20154687.1075861338813.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/8915075.1075855165635.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/4502942.1075861336478.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/26164164.1075861334765.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/33353871.1075861338398.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/4797081.1075862655316.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/31840312.1075855169527.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/26476326.1075861334457.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/7064667.1075855165508.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/28566081.1075861338071.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/31549740.1075861337042.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/13733113.1075861337421.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/20278170.1075855165533.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/11574209.1075861337339.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/31965991.1075861335034.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/7992612.1075861339130.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/28366262.1075855165066.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/13558853.1075861337158.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/4245271.1075861337122.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/10535454.1075861340214.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/16778174.1075861334952.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/27560234.1075855165265.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/1989982.1075855168913.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/21575267.1075861340991.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/31139126.1075855167441.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/12426910.1075861336590.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/17003045.1075861339242.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/29964320.1075861336314.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/20351910.1075861337900.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/17490652.1075861338036.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/15341399.1075861337771.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/22106769.1075855170217.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/18759906.1075861336975.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/12699741.1075861337374.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/18636835.1075861339291.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/26833815.1075861338924.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/17429461.1075861339510.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/11171080.1075861340693.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/21339736.1075861335342.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/19465939.1075855166718.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/16195175.1075855169350.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/7764461.1075861336881.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/4121857.1075861336924.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/21597519.1075855168766.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/18936135.1075861340435.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/33406854.1075861340308.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/6585561.1075855170504.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/19287969.1075855167078.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/33362618.1075855166892.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/9577395.1075855166672.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/12799088.1075855169660.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/131395.1075855168616.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/6582170.1075855167418.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/8071668.1075861335284.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/32284591.1075861335011.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/33316640.1075861336289.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/4736244.1075855166205.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/29104901.1075855166649.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/31861227.1075861335901.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/13829531.1075861339912.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/7832776.1075861335991.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/26668721.1075861335553.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/15601273.1075861341133.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/6895082.1075855170082.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/32449992.1075861338898.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/16747000.1075861339581.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/295604.1075861338546.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/10400001.1075855165096.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/15221320.1075855168318.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/15129340.1075855165667.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/3735103.1075855166286.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/5163039.1075861339048.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/28723635.1075861340188.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/28420931.1075861335115.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/14195679.1075855165380.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/27100195.1075855166054.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/60478.1075855166391.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/1920845.1075861337498.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/1306137.1075861339749.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/28894847.1075861334622.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/4572614.1075861340029.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/1341108.1075855167251.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/27177842.1075861335367.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/3443502.1075861339081.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/26268708.1075861336785.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/13546701.1075861340486.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/13813869.1075855167394.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/23585178.1075861335458.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/2972396.1075861339438.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/16087444.1075855166368.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/7397489.1075861334532.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/346590.1075861340866.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/8543845.1075855168012.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/22320545.1075861340787.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/27553358.1075861340004.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/27797336.1075861337664.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/13302462.1075861339651.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/7459161.1075861335171.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/10273455.1075861334788.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/19489356.1075855165884.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/9171738.1075855165449.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/119215.1075861339850.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/32846990.1075861338489.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/24888103.1075861336097.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/18288556.1075855165782.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/17628194.1075861340582.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/5660351.1075855167156.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/11392216.1075861334509.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/cur/381987.1075861340669.JavaMail.evans@thyme:2,S"), -], + include_str!("../../.././../demo/ermis-f/cur/27847073.1075855167976.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/14868182.1075861338166.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/2011572.1075861338235.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/6673313.1075855166695.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/12037233.1075855168071.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/3200651.1075861339184.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/19548825.1075855167201.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/15778635.1075861336191.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/5130739.1075855166105.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/24286527.1075861339965.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/7976222.1075861336049.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/33538700.1075855169184.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/22515050.1075861336808.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/2646725.1075861340254.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/8433743.1075861340921.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/25609768.1075855167869.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/19423957.1075861339337.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/8232630.1075855166602.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/15607903.1075862655245.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/20683529.1075855167894.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/19827443.1075861336693.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/4818264.1075861337397.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/33203232.1075861339415.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/24362835.1075861338947.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/28411928.1075861334813.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/29349376.1075861337074.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/24201779.1075855166950.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/10940241.1075855166230.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/6713247.1075855167178.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/30966468.1075855166920.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/14215113.1075859150873.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/13397914.1075861337233.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/18446640.1075855166156.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/24988647.1075861340608.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/1434339.1075861338976.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/3614690.1075855168172.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/24826179.1075861337097.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/27554432.1075855165960.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/4632773.1075861339556.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/9190722.1075861339485.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/6073973.1075861338730.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/17459166.1075855165142.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/7977874.1075855169586.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/6422082.1075861336073.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/6902675.1075861341109.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/2256814.1075855168510.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/19743679.1075861341335.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/23936330.1075861339888.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/18173893.1075861338421.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/24690486.1075855167562.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/314349.1075861335613.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/9690915.1075861338208.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/4293577.1075861337522.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/6090011.1075855167364.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/15233052.1075861335637.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/21857215.1075861338522.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/2882539.1075861337634.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/11510169.1075861338322.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/28068718.1075861339461.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/14864700.1075861339002.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/10430272.1075861334560.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/17969911.1075855169399.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/6895070.1075861334680.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/29091198.1075855166319.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/2708769.1075861334433.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/30414661.1075861336378.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/29528847.1075855167734.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/24038452.1075861338602.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/2697913.1075861340338.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/1378999.1075861339937.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/21446473.1075855165426.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/2414125.1075861334648.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/19111374.1075855167661.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/24565297.1075855168293.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/12925516.1075861336856.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/24489685.1075855165861.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/15225924.1075861338658.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/20230588.1075861340894.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/24676092.1075861335860.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/25007296.1075855169027.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/10125224.1075861338344.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/31080154.1075861340763.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/31945973.1075861338297.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/21469528.1075855165936.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/12259029.1075861339616.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/16935956.1075861340635.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/30559528.1075855169455.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/23064445.1075855166463.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/345807.1075855165473.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/26917265.1075861340542.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/9833916.1075855166415.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/17798744.1075855168440.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/15717563.1075861336502.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/31655445.1075855165240.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/12407325.1075861335057.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/3587322.1075855165038.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/3222258.1075861339390.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/4401397.1075855170453.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/32197777.1075861341198.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/17857511.1075861337878.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/254613.1075855170241.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/15496121.1075859150827.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/22681428.1075861335087.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/31004059.1075855166131.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/12897459.1075861339795.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/2167584.1075861338571.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/14244203.1075855169000.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/20521740.1075861337611.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/30375076.1075855169694.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/24436331.1075861340149.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/16990554.1075855168041.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/3356145.1075861341288.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/29390631.1075861340462.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/22305081.1075861334487.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/8991858.1075855168242.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/7847445.1075861338838.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/30097492.1075859150787.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/26433813.1075861336564.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/13442327.1075861339154.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/12599237.1075861340516.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/3289075.1075861337738.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/20322315.1075855170476.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/16018435.1075861338682.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/68049.1075855169291.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/2245451.1075855170634.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/19475550.1075861335688.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/5862380.1075859150896.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/25050679.1075861337448.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/15903927.1075861334393.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/4982442.1075855168725.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/6152588.1075861334846.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/970477.1075861341264.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/5591087.1075861339208.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/5294586.1075861336265.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/132454.1075861337315.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/17666933.1075855168699.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/625724.1075855169611.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/24477392.1075855165357.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/24595911.1075861336528.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/25726.1075861337982.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/16269037.1075861341159.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/12694194.1075861338758.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/7793205.1075855165120.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/13323139.1075861338094.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/1100065.1075861335576.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/12288697.1075861340055.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/26848357.1075861340836.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/20126175.1075861337548.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/22350323.1075861337951.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/21849842.1075855167686.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/2825983.1075861334918.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/20299842.1075861337015.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/10418976.1075855169865.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/18273866.1075861339024.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/25810313.1075855170604.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/6764267.1075861339533.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/27409349.1075861337289.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/25357853.1075861334869.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/8826031.1075855166808.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/20900630.1075855166625.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/32885543.1075861334977.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/17126366.1075861336832.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/27371397.1075855166857.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/6565803.1075855165837.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/7659171.1075861339771.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/6564888.1075855169923.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/32321684.1075861337854.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/32227944.1075861339314.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/32803045.1075855165911.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/29559114.1075861335530.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/14610231.1075861334894.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/527379.1075861336241.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/28092732.1075855169792.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/15566855.1075855166579.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/5941235.1075855165188.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/16379304.1075855168566.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/6813190.1075861340968.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/26128330.1075855165580.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/7493164.1075861335965.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/2711540.1075855165165.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/23261149.1075861335138.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/6774163.1075861335196.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/29912783.1075855165211.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/24988798.1075855167273.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/20771660.1075855169099.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/10774140.1075861336719.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/1602316.1075861335663.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/6513489.1075855168677.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/5975399.1075861339818.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/18915327.1075861338634.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/25664518.1075855167228.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/17177896.1075855165813.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/17869404.1075855170266.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/2179790.1075855167951.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/32309712.1075855169374.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/20122265.1075861338375.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/4626635.1075855168969.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/26323334.1075861341017.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/21747660.1075861336453.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/14151835.1075855166345.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/13780512.1075855168544.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/18311052.1075861334734.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/5746820.1075855168353.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/22773245.1075855169769.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/13232231.1075861334593.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/4170725.1075855167918.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/10858754.1075861336217.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/26401326.1075861337711.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/1510254.1075861335402.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/1960384.1075855170349.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/2329626.1075861335506.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/33515772.1075861335308.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/23090941.1075861338867.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/15691549.1075861335433.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/8328864.1075855166741.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/22202925.1075855170118.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/21992049.1075861334703.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/11442162.1075861336024.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/9111018.1075855169951.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/20648454.1075861339266.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/1795248.1075855170406.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/2852493.1075855165556.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/23887584.1075861340278.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/20012421.1075855169979.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/14730260.1075855170052.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/4161320.1075861341521.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/23453834.1075855167537.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/12007090.1075861340945.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/25414695.1075861336352.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/3183998.1075861335236.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/23292931.1075855166180.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/14781038.1075855165403.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/27705296.1075861335261.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/30023147.1075861335926.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/12135954.1075855168861.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/2840495.1075855170577.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/31952499.1075861337582.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/10651018.1075861337829.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/17592906.1075861335482.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/14007895.1075855169634.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/25427135.1075855168937.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/21267809.1075861336761.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/4037448.1075855169208.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/7393067.1075861339362.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/28520999.1075855166832.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/11997233.1075855165603.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/27364268.1075859150850.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/17160569.1075855168377.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/4804926.1075861340124.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/12249455.1075861338790.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/19177858.1075861338267.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/3537035.1075855167107.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/30411832.1075855169432.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/21285631.1075855167758.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/15718153.1075861341230.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/27102362.1075861339106.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/28503033.1075861337258.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/19740046.1075855165758.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/8993435.1075855169129.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/22063169.1075855167132.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/15495290.1075861337195.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/7309286.1075855170430.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/2866511.1075861340812.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/19303845.1075861337474.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/4283336.1075861336158.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/10602937.1075855167708.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/23337497.1075855166501.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/20207444.1075855170192.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/4807720.1075861336131.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/10231298.1075855167022.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/20154687.1075861338813.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/8915075.1075855165635.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/4502942.1075861336478.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/26164164.1075861334765.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/33353871.1075861338398.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/4797081.1075862655316.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/31840312.1075855169527.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/26476326.1075861334457.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/7064667.1075855165508.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/28566081.1075861338071.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/31549740.1075861337042.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/13733113.1075861337421.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/20278170.1075855165533.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/11574209.1075861337339.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/31965991.1075861335034.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/7992612.1075861339130.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/28366262.1075855165066.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/13558853.1075861337158.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/4245271.1075861337122.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/10535454.1075861340214.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/16778174.1075861334952.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/27560234.1075855165265.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/1989982.1075855168913.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/21575267.1075861340991.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/31139126.1075855167441.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/12426910.1075861336590.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/17003045.1075861339242.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/29964320.1075861336314.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/20351910.1075861337900.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/17490652.1075861338036.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/15341399.1075861337771.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/22106769.1075855170217.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/18759906.1075861336975.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/12699741.1075861337374.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/18636835.1075861339291.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/26833815.1075861338924.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/17429461.1075861339510.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/11171080.1075861340693.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/21339736.1075861335342.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/19465939.1075855166718.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/16195175.1075855169350.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/7764461.1075861336881.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/4121857.1075861336924.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/21597519.1075855168766.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/18936135.1075861340435.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/33406854.1075861340308.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/6585561.1075855170504.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/19287969.1075855167078.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/33362618.1075855166892.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/9577395.1075855166672.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/12799088.1075855169660.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/131395.1075855168616.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/6582170.1075855167418.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/8071668.1075861335284.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/32284591.1075861335011.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/33316640.1075861336289.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/4736244.1075855166205.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/29104901.1075855166649.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/31861227.1075861335901.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/13829531.1075861339912.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/7832776.1075861335991.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/26668721.1075861335553.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/15601273.1075861341133.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/6895082.1075855170082.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/32449992.1075861338898.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/16747000.1075861339581.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/295604.1075861338546.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/10400001.1075855165096.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/15221320.1075855168318.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/15129340.1075855165667.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/3735103.1075855166286.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/5163039.1075861339048.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/28723635.1075861340188.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/28420931.1075861335115.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/14195679.1075855165380.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/27100195.1075855166054.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/60478.1075855166391.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/1920845.1075861337498.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/1306137.1075861339749.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/28894847.1075861334622.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/4572614.1075861340029.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/1341108.1075855167251.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/27177842.1075861335367.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/3443502.1075861339081.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/26268708.1075861336785.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/13546701.1075861340486.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/13813869.1075855167394.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/23585178.1075861335458.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/2972396.1075861339438.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/16087444.1075855166368.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/7397489.1075861334532.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/346590.1075861340866.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/8543845.1075855168012.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/22320545.1075861340787.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/27553358.1075861340004.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/27797336.1075861337664.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/13302462.1075861339651.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/7459161.1075861335171.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/10273455.1075861334788.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/19489356.1075855165884.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/9171738.1075855165449.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/119215.1075861339850.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/32846990.1075861338489.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/24888103.1075861336097.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/18288556.1075855165782.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/17628194.1075861340582.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/5660351.1075855167156.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/11392216.1075861334509.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/cur/381987.1075861340669.JavaMail.evans@thyme:2,S"), +]), + ( + "INBOX/Python", + "Python", + &[ + include_str!("../../.././../demo/ermis-f/python_m/cur/0720"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1813"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0200"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0628"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0462"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1257"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0065"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1321"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1820"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1977"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1410"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0513"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1185"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0443"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0471"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0876"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0815"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0697"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1169"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0483"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1957"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1912"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0957"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0025"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0106"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0531"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1587"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0823"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0283"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1222"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0804"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1424"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1395"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0658"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0994"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0094"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1746"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1278"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0590"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0346"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1816"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0409"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0188"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1344"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0405"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1732"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1831"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1270"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1269"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0349"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0357"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1998"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1490"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1291"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1463"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1164"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0860"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0109"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0576"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1705"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1917"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1125"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1324"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0983"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0774"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0911"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0019"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1355"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1994"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1190"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1522"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1175"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1217"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1529"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1960"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0469"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1719"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1658"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0062"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1518"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1196"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0861"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1124"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0087"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1666"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0878"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1155"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1990"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0167"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1682"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0449"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0545"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1638"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1118"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1945"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0032"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1947"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0378"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1867"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0144"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0785"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1314"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0673"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0934"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1517"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1901"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0332"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1915"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1603"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1471"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1121"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0128"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1393"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1144"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0557"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1827"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1955"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0978"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1796"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0583"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1243"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0787"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0138"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1793"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0428"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0345"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0422"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0368"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1689"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1767"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1219"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1659"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1553"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1443"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0328"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1665"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0550"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0533"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0541"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1711"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1341"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0389"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0702"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0724"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1784"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1168"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0813"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0827"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0450"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0442"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1704"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0072"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0302"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1229"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0196"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1773"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1359"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0263"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0269"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1848"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0581"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0264"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1807"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0714"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0979"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0277"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1256"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0193"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1575"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0857"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0485"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1880"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0257"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1971"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1281"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0402"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0866"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1841"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0631"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1747"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0660"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1789"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1926"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1733"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1537"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0843"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1478"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1520"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0300"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0208"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0239"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1448"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0966"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0895"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0204"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1725"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1542"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1758"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0276"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0723"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1454"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1318"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0320"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0863"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0793"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0213"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0537"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1716"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0881"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0595"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0690"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0299"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1879"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0238"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1536"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1686"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1245"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1249"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0028"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0039"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1615"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0761"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1592"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0100"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1500"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1109"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0693"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0181"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0662"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0526"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1213"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1928"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0701"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1102"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0988"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1163"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0740"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0741"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1958"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0297"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1972"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0411"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1519"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1394"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1304"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1474"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0093"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1312"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1134"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0952"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0995"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0027"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1208"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0148"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1444"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1446"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0831"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1101"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0915"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1508"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1731"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0898"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0629"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1389"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0964"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0312"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0493"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0293"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0173"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0564"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0250"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0445"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1268"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0261"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0955"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0507"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1933"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1139"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0168"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0610"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0253"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1654"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1763"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0705"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0330"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0172"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0110"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0033"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1137"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0715"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0194"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1369"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0280"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1554"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0596"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1675"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1174"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1913"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1678"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1895"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0207"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1400"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1987"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1135"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0918"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0497"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1561"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0460"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0392"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0372"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0231"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1469"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0875"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1826"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1650"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1250"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1835"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0989"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1734"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1434"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1531"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1380"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0163"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0883"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1404"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0779"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1477"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1877"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1377"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0877"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0562"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0385"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0351"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0836"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0486"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0980"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0566"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0066"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0427"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0821"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1483"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0592"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0190"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1548"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1191"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1932"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1973"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1712"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0305"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0501"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0259"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0488"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1129"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1488"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0722"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1833"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0814"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0721"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0676"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0908"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1623"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1839"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0217"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0319"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1983"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1248"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0906"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0294"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1240"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1320"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0682"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0457"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1506"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1187"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0266"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0083"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0281"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0992"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0518"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1752"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0765"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0652"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0759"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1939"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0229"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0282"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1811"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1391"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0523"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1273"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1806"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1152"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1853"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0465"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1277"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0059"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1597"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0344"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0040"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0325"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0331"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0511"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0081"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0791"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1940"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1461"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0757"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1735"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1276"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1177"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0917"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1141"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0056"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1195"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1347"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1491"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1924"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0811"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0642"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0999"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1382"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1403"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0553"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1340"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0321"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1771"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1556"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0582"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1927"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0879"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0967"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0327"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0931"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1984"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1421"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0750"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1645"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1527"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0096"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0310"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1938"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1515"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0118"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0826"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0288"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0728"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1692"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0830"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0982"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0525"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1509"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0007"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1687"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0220"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0634"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1608"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0865"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1655"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1345"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0611"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0473"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1467"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1357"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0333"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0929"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1610"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1331"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0158"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1253"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1769"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0166"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1918"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1707"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1589"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0035"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1661"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0580"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1133"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1247"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1117"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1942"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1329"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0366"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1937"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0594"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0371"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0355"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0687"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1860"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0161"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0278"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1573"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1428"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0292"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0146"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0080"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0683"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0569"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1921"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0698"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0064"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1889"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0622"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0092"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1969"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1116"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0326"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0441"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1557"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0778"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0318"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1890"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1787"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1817"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0607"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1328"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1472"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0735"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0500"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0801"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0155"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0324"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1151"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0716"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1209"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0670"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0439"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1679"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1322"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1262"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1214"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1723"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1751"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0227"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0901"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0712"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0755"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0598"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0677"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0240"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1131"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0178"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1325"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0112"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0423"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1709"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1308"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1846"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0990"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0243"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0132"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1799"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1639"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0739"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0737"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1375"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0692"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0136"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1593"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1616"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1630"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1119"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0412"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0189"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1405"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0848"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0296"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0061"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1303"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0015"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0544"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1975"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1898"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1634"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0487"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0502"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1828"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1544"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1349"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1292"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0363"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0091"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1293"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1601"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0053"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0973"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0216"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1774"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0265"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0839"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0338"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0897"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0946"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1965"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1929"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1551"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1745"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0950"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0763"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1563"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0050"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1374"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1176"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0842"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1132"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0362"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0026"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1863"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1739"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0674"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0802"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0773"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1896"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1167"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1261"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1145"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0873"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0012"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1420"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0738"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1857"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1223"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1694"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0068"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1701"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1868"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0618"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0396"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0221"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1765"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1244"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1285"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1409"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1748"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0160"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1526"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0984"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1233"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1438"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0241"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0452"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1533"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0436"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1883"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1897"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0126"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1156"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0482"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1900"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0521"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1541"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0529"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1470"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1795"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0353"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1433"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0447"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1894"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1511"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1632"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0071"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0347"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0927"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0018"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1611"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0554"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0198"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1306"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1672"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0515"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0069"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0854"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1978"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1834"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0517"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1387"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0270"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0718"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1432"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1559"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0844"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0805"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1147"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1974"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1365"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0185"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0228"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1968"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0568"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1824"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0394"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0633"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1362"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1717"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0887"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0105"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1930"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0689"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1228"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1967"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0489"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0940"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1450"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0960"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1956"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1427"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0341"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0686"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1591"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1358"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0543"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1525"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1381"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0710"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1792"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0104"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1578"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1464"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1120"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0369"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1319"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1507"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0454"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1641"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1171"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1910"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0947"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0556"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1114"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1430"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1459"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0455"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0707"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0176"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1238"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1809"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1614"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1330"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0588"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0419"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0985"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0760"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0896"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1864"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0317"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0573"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1962"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0274"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1744"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1510"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0395"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0872"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1294"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1920"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0535"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1283"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0933"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0084"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0077"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1908"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1255"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0404"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1104"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0868"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1888"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0393"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0606"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0601"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1449"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1441"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1730"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0700"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0245"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0640"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0140"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1440"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0534"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1602"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0869"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0975"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0143"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0036"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1265"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1663"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1337"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0654"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1791"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1598"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0287"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0926"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0893"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1300"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1586"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0131"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1801"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1205"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1447"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1698"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1466"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0986"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1750"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1695"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1905"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0051"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0365"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1162"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0074"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1301"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0130"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1105"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1702"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0273"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0902"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0029"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0528"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0788"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0145"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1390"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0011"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1419"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1180"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0832"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1482"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1313"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1788"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1976"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1272"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1202"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0233"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0480"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0119"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1263"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1852"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1936"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1486"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1770"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0159"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0121"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0885"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1149"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1966"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1485"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1183"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1112"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0655"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0506"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0038"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0928"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0678"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0384"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1465"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0874"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1624"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0339"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1590"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1179"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0663"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1514"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0352"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0919"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0942"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1385"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0209"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0845"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0078"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0495"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0577"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1743"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0225"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0822"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0170"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1178"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1979"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1875"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0150"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1193"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0803"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1727"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0290"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1414"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1797"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0003"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0085"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0829"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1959"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0996"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0661"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0177"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1892"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0191"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0323"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1489"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1651"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0203"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0046"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0672"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1130"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0055"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0864"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0458"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0205"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0922"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0335"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0924"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0819"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1100"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0833"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0415"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0643"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1140"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1560"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1194"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0847"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0800"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0448"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0620"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0762"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1577"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0256"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0981"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0174"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0494"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0322"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0614"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0165"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1690"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1628"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1821"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0195"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1206"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1282"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0157"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0608"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0251"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0797"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0466"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0609"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1364"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1212"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0468"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1594"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1885"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1700"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0370"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1501"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1231"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0636"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0398"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0993"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1154"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1350"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1670"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1543"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0374"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0298"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0584"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1260"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1363"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1549"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0561"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0726"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0972"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0451"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0516"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0870"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1367"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1859"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1207"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1252"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0766"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0418"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0958"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1502"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0417"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1953"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1676"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0616"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0807"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0635"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1493"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0536"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1200"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1643"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0391"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1662"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1668"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1814"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0905"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1274"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0484"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0367"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1886"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1609"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0470"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1532"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1600"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0951"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1876"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1299"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0049"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1790"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0768"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0943"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0764"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1649"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1546"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0753"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0920"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0491"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1342"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1259"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1480"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0790"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1882"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1107"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0625"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0252"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0948"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0565"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0666"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1738"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0903"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0567"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0044"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1656"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0808"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1858"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1451"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1949"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1838"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1777"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0490"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0935"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1360"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0820"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0890"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0431"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0142"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0045"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0746"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1323"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0348"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1413"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1907"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0825"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1397"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0816"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0014"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0399"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0047"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0360"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0426"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1881"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0974"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0073"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0575"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0438"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0254"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1241"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0058"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1631"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1673"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1495"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1481"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1220"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0681"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1931"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1279"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1555"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0907"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1436"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1674"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1226"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0180"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1227"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1271"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0729"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1224"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1332"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0307"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1296"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0137"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0476"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0953"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1776"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1872"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1856"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1143"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1843"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0771"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0650"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0504"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1783"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0255"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0079"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1993"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1906"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1840"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0649"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0704"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0542"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0688"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0959"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0309"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0479"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0796"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1166"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1995"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0388"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0286"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0432"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0945"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0789"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1780"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0977"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1850"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1111"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1579"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0685"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0262"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1999"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1126"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1235"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0679"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1108"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0696"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1165"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0909"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0437"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1595"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1418"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1425"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0657"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0853"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0237"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1647"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1399"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0752"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0187"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0668"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1398"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0108"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0226"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0941"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1812"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1353"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0914"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1370"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0852"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0579"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1110"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0817"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1521"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1818"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0892"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0792"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1160"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0440"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1159"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0856"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1756"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1290"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0001"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0505"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0599"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0034"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0961"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1513"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0586"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0303"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0828"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0835"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0503"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1837"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1980"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0364"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1242"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0783"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1622"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0223"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1401"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1646"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0197"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0127"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1494"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0910"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0020"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1703"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0754"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1225"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0054"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0963"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0570"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0342"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1302"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0420"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1621"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0510"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1680"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0246"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0151"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0390"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1189"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1914"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0659"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0758"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0671"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1475"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0538"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1396"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1386"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0555"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0382"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0855"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0242"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1803"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0358"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0871"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0923"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0900"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0088"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1963"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1115"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0784"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0453"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1607"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1146"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1815"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1148"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0313"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1246"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0572"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1429"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0258"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1819"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1211"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0725"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1497"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0430"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0641"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1802"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0834"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1923"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1172"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1232"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0013"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0314"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1487"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0416"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1315"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1402"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1685"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0976"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1437"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1503"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0694"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0117"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0154"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1412"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0894"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1891"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0122"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0082"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0684"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0691"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0600"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0009"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1688"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1619"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0125"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0997"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1782"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0512"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1612"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0169"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1844"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0434"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1136"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0558"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1142"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1775"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0201"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1138"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0496"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0603"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1280"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0578"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1626"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0005"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0615"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0492"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1757"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0103"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1830"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1635"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1715"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0149"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1800"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0429"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0520"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0838"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0937"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0234"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0397"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1552"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0559"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0291"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1822"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0798"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0474"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1677"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1696"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0099"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1865"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0350"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0164"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0730"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1804"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1869"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0916"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0882"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0115"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0461"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0548"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1230"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1540"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0267"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1644"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0621"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0152"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0552"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1684"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0224"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1492"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0308"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0708"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0799"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1426"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1351"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1916"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1123"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0954"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1439"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0147"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1568"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0413"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1476"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1683"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1951"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1580"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1778"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0605"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1588"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0612"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0591"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0921"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0777"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1565"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0617"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1786"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1435"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0904"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1499"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1423"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0107"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0400"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0481"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0153"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1496"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0275"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1904"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1669"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1317"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1170"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1722"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0199"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0624"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0192"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0709"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0076"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1981"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0743"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0236"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1106"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1376"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0522"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1239"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0889"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1352"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1534"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0182"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1203"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0424"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1693"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1286"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0316"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0260"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0549"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0386"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0380"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0376"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1736"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1754"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1691"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1713"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0574"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0756"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1721"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0057"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1264"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1660"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0932"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1569"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0776"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1504"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1411"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0215"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0111"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1706"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0222"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1153"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0604"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0508"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1289"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1297"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1911"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0272"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0124"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0769"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1606"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1254"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1737"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1922"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0731"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1361"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0113"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1584"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0410"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1371"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1866"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1388"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0031"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1442"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1564"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1113"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0477"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1849"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0749"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0772"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0781"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1158"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1991"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0421"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1851"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1946"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1810"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0711"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1845"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0912"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0648"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0235"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1528"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0075"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1182"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0008"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0271"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0010"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1871"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0202"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0116"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1197"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0043"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1505"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0956"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0644"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1653"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0632"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0812"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1462"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0703"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1729"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1184"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1772"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0249"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1637"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1383"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1599"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1198"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1326"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1287"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1372"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0381"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0063"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1456"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1473"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1961"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1150"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1392"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0713"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0546"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1571"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0775"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0742"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0810"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1234"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0795"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0858"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0770"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0651"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1576"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1878"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0184"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1944"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0699"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0939"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1740"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1333"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0021"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0002"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1173"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0456"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1724"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0733"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1316"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0379"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0232"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0141"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1964"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0387"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0519"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1642"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1348"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1445"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0880"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0949"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1498"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0041"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0407"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0969"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1516"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1460"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1558"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0727"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1861"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0359"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0030"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1785"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0133"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0971"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0886"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0023"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1574"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0315"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0539"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0645"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1523"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1407"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0780"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0340"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0403"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1567"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1870"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0751"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1538"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0782"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1468"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0732"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1384"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1251"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1562"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0656"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1671"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1798"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1539"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0016"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1652"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1218"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0162"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1720"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0498"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0406"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0818"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0361"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1943"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1181"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1336"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1266"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1127"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1188"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1759"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0669"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0343"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0006"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0004"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0467"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1431"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1605"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1992"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0408"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0337"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0183"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0179"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0230"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0675"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0646"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0475"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0129"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0899"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1216"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1604"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0597"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1452"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1854"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1925"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1708"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0301"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0334"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0747"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1453"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1422"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0095"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0841"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0289"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1535"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0987"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0998"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1288"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1547"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1760"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1354"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0134"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0186"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0295"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1583"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0859"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1103"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0653"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0097"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1781"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1805"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0944"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1236"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1681"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1884"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0268"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1697"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1258"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1343"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1766"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1762"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1909"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0175"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1379"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1633"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1714"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1237"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0248"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1874"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0279"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0090"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1948"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0884"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0218"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0551"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0806"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1356"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0824"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0336"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0991"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0509"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1902"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0745"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0139"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1201"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0375"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1378"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0247"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1346"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1305"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0377"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0304"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1204"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0135"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1585"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0206"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0499"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0627"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0589"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0433"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0936"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0070"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1873"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1566"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1755"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1408"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1954"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1327"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1935"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1648"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0540"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1855"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1741"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0446"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0212"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0042"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1335"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0114"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0585"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1210"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0373"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0123"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0048"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0401"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1373"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1934"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0637"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0120"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1484"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0017"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0665"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1620"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1334"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0211"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0478"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1903"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0547"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0794"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0022"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1842"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1764"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1836"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1298"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0638"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0284"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0623"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0435"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1627"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0695"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1596"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1887"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0329"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0156"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0867"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1726"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1997"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1530"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0459"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1718"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0098"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0563"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0613"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1952"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0037"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1122"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0888"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0846"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1989"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0086"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1581"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0285"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0925"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0089"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0626"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1636"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1699"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0767"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0913"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1640"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0734"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0463"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0593"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1416"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1295"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0560"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1215"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0171"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1582"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0850"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0587"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0837"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0667"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0930"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0311"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1982"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0938"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1479"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0639"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1986"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0719"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1368"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1617"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1823"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1825"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0219"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1545"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0664"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1267"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0210"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0060"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1829"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1550"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1366"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1284"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0680"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1625"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0891"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0786"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0024"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1524"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1309"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0630"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0571"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0706"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1192"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0472"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1455"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0425"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0527"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0962"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0717"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1808"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1629"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0102"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1749"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1199"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1728"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1307"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0444"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1161"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0524"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1710"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1415"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0619"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1128"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1157"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0101"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0532"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0414"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0602"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0383"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1768"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0067"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1338"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1186"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1457"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1970"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1572"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0965"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1667"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0736"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1988"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1406"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0748"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1996"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1950"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0052"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1742"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1417"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1832"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1310"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1919"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1570"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0862"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1941"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1512"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1657"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1847"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0244"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0968"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1893"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0514"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1339"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0647"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0530"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0849"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1664"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0306"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0970"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1311"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1779"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0356"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1458"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1221"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1862"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1761"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0744"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0354"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0214"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1753"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1985"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1794"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0464"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1618"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0840"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1613"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1899"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0851"), +include_str!("../../.././../demo/ermis-f/python_m/cur/0809"), +include_str!("../../.././../demo/ermis-f/python_m/cur/1275"), +]), + ( + "INBOX/Sent", + "Sent", + &[ + include_str!("../../.././../demo/ermis-f/Sent/cur/32217640.1075852314422.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/Sent/cur/8806962.1075852314861.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/Sent/cur/21003046.1075852314466.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/Sent/cur/22524399.1075855487777.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/Sent/cur/6483900.1075855487799.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/Sent/cur/24624686.1075852314533.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/Sent/cur/2089632.1075855487755.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/Sent/cur/23668222.1075855487820.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/Sent/cur/6747425.1075852314570.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/Sent/cur/8012373.1075852314703.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/Sent/cur/5369934.1075852314511.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/Sent/cur/10746181.1075852314378.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/Sent/cur/5580413.1075852314489.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/Sent/cur/30249743.1075855499568.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/Sent/cur/6266690.1075852314636.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/Sent/cur/32726201.1075855499483.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/Sent/cur/27910773.1075861342042.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/Sent/cur/24243685.1075855499589.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/Sent/cur/9082204.1075855499526.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/Sent/cur/21112440.1075852314400.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/Sent/cur/23546562.1075852314592.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/Sent/cur/5502035.1075855499547.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/Sent/cur/14018365.1075852314444.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/Sent/cur/24127062.1075855170660.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/Sent/cur/10020042.1075852314884.JavaMail.evans@thyme:2,S"), +]), + ( + "INBOX/Trash", + "Trash", + &[ + include_str!("../../.././../demo/ermis-f/Trash/cur/10238426.1075852314265.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/Trash/cur/6997933.1075852314333.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/Trash/cur/10106181.1075852314287.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/Trash/cur/5990006.1075852314356.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/Trash/cur/30712088.1075852314241.JavaMail.evans@thyme:2,S"), +include_str!("../../.././../demo/ermis-f/Trash/cur/2062755.1075852314310.JavaMail.evans@thyme:2,S"), +]), - ), - ("INBOX/All", "All", &[]), - ("INBOX/Discussion Threads", "Discussion Threads", &[]), - ("INBOX/Sent", "Sent", &[ - include_str!("../../.././../demo/ermis-f/Sent/cur/32217640.1075852314422.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/Sent/cur/8806962.1075852314861.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/Sent/cur/21003046.1075852314466.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/Sent/cur/22524399.1075855487777.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/Sent/cur/6483900.1075855487799.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/Sent/cur/24624686.1075852314533.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/Sent/cur/2089632.1075855487755.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/Sent/cur/23668222.1075855487820.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/Sent/cur/6747425.1075852314570.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/Sent/cur/8012373.1075852314703.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/Sent/cur/5369934.1075852314511.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/Sent/cur/10746181.1075852314378.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/Sent/cur/5580413.1075852314489.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/Sent/cur/30249743.1075855499568.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/Sent/cur/6266690.1075852314636.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/Sent/cur/32726201.1075855499483.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/Sent/cur/27910773.1075861342042.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/Sent/cur/24243685.1075855499589.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/Sent/cur/9082204.1075855499526.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/Sent/cur/21112440.1075852314400.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/Sent/cur/23546562.1075852314592.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/Sent/cur/5502035.1075855499547.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/Sent/cur/14018365.1075852314444.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/Sent/cur/24127062.1075855170660.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/Sent/cur/10020042.1075852314884.JavaMail.evans@thyme:2,S"), - - ]), - ("INBOX/Notes", "Notes", &[]), - ("INBOX/Trash", "Trash", &[ - include_str!("../../.././../demo/ermis-f/Trash/cur/10238426.1075852314265.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/Trash/cur/6997933.1075852314333.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/Trash/cur/10106181.1075852314287.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/Trash/cur/5990006.1075852314356.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/Trash/cur/30712088.1075852314241.JavaMail.evans@thyme:2,S"), -include_str!("../../.././../demo/ermis-f/Trash/cur/2062755.1075852314310.JavaMail.evans@thyme:2,S"), - - ]), ]; \ No newline at end of file diff --git a/melib/src/logging.rs b/melib/src/logging.rs index 9698c195..2de92f60 100644 --- a/melib/src/logging.rs +++ b/melib/src/logging.rs @@ -19,9 +19,6 @@ * along with meli. If not, see . */ -use crate::shellexpand::ShellExpandTrait; -use std::fs::OpenOptions; -use std::io::{BufWriter, Write}; use std::path::PathBuf; use std::sync::{Arc, Mutex}; @@ -54,6 +51,21 @@ impl std::fmt::Display for LoggingLevel { } } +mod helpers { + #[allow(unused_variables)] + extern crate wasm_bindgen; + + use wasm_bindgen::prelude::*; + #[wasm_bindgen] + extern "C" { + #[wasm_bindgen(js_namespace = console)] + pub fn log(s: &str); + } + + pub(super) use log as js_console; +} +use helpers::js_console; + impl Default for LoggingLevel { fn default() -> Self { LoggingLevel::INFO @@ -63,38 +75,27 @@ impl Default for LoggingLevel { use LoggingLevel::*; struct LoggingBackend { - dest: BufWriter, level: LoggingLevel, } thread_local!(static LOG: Arc> = Arc::new(Mutex::new({ //let data_dir = xdg::BaseDirectories::with_prefix("meli").unwrap(); - let data_dir = std::env::current_dir().unwrap(); - let log_file = OpenOptions::new().append(true) /* writes will append to a file instead of overwriting previous contents */ - .create(true) /* a new file will be created if the file does not yet already exist.*/ - .read(true) - .open(data_dir).unwrap(); LoggingBackend { - dest: BufWriter::new(log_file), level: LoggingLevel::default(), }})) ); pub fn log>(val: S, level: LoggingLevel) { LOG.with(|f| { - let mut b = f.lock().unwrap(); + let b = f.lock().unwrap(); + let val = val.as_ref(); if level <= b.level { - b.dest - .write_all( - crate::datetime::timestamp_to_string(crate::datetime::now(), None).as_bytes(), - ) - .unwrap(); - b.dest.write_all(b" [").unwrap(); - b.dest.write_all(level.to_string().as_bytes()).unwrap(); - b.dest.write_all(b"]: ").unwrap(); - b.dest.write_all(val.as_ref().as_bytes()).unwrap(); - b.dest.write_all(b"\n").unwrap(); - b.dest.flush().unwrap(); + js_console(&format!( + "{} [{}]: {}\n", + crate::datetime::timestamp_to_string(crate::datetime::now(), None), + level.to_string(), + val + )); } }); } @@ -108,14 +109,7 @@ pub fn get_log_level() -> LoggingLevel { } pub fn change_log_dest(path: PathBuf) { - LOG.with(|f| { - let path = path.expand(); // expand shell stuff - let mut backend = f.lock().unwrap(); - backend.dest = BufWriter::new(OpenOptions::new().append(true) /* writes will append to a file instead of overwriting previous contents */ - .create(true) /* a new file will be created if the file does not yet already exist.*/ - .read(true) - .open(path).unwrap()); - }); + LOG.with(|f| {}); } pub fn change_log_level(new_val: LoggingLevel) { diff --git a/pkg/98.css b/pkg/98.css new file mode 100644 index 00000000..ce25addb --- /dev/null +++ b/pkg/98.css @@ -0,0 +1,560 @@ +/** + * 98.css + * Copyright (c) 2020 Jordan Scales + * https://github.com/jdan/98.css/blob/master/LICENSE + */ + +:root { + /* Color */ + --surface: #c0c0c0; + --button-highlight: #ffffff; + --button-face: #dfdfdf; + --button-shadow: #808080; + --window-frame: #0a0a0a; + --dialog-blue: #000080; + --dialog-blue-light: #1084d0; + --link-blue: #0000ff; + + /* Spacing */ + --element-spacing: 8px; + --grouped-button-spacing: 4px; + --grouped-element-spacing: 6px; + --radio-width: 12px; + --checkbox-width: 13px; + --radio-label-spacing: 6px; + + /* Some detailed computations for radio buttons and checkboxes */ + --radio-total-width-precalc: 12px + 6px; + --radio-total-width: 18px; + --radio-left: -6px; + --radio-dot-width: 4px; + --radio-dot-top: 4px; + --radio-dot-left: -14px; + + --checkbox-total-width-precalc: 13px + + 6px; + --checkbox-total-width: 19px; + --checkbox-left: -7px; + --checkmark-width: 7px; + --checkmark-top: 3px; + --checkmark-left: 3px; + + /* Borders */ + --border-width: 1px; + --border-raised-outer: inset -1px -1px #0a0a0a, + inset 1px 1px #ffffff; + --border-raised-inner: inset -2px -2px #808080, + inset 2px 2px #dfdfdf; + --border-sunken-outer: inset -1px -1px #ffffff, + inset 1px 1px #0a0a0a; + --border-sunken-inner: inset -2px -2px #dfdfdf, + inset 2px 2px #808080; + + /* Field borders (checkbox, input, etc) flip window-frame and button-shadow */ + --border-field: inset -1px -1px #ffffff, + inset 1px 1px #808080, inset -2px -2px #dfdfdf, + inset 2px 2px #0a0a0a; +} + +@font-face { + font-family: "Pixelated MS Sans Serif"; + src: url("ms_sans_serif.woff") format("woff"); + src: url("ms_sans_serif.woff2") format("woff2"); + font-weight: normal; + font-style: normal; +} + +@font-face { + font-family: "Pixelated MS Sans Serif"; + src: url("ms_sans_serif_bold.woff") format("woff"); + src: url("ms_sans_serif_bold.woff2") format("woff2"); + font-weight: bold; + font-style: normal; +} + +body { + font-family: Arial; + font-size: 12px; + color: #222222; +} + +button, +label, +input, +textarea, +select, +option, +ul.tree-view, +.window, +.title-bar { + font-family: "Pixelated MS Sans Serif", Arial; + -webkit-font-smoothing: none; + font-size: 11px; +} + +h1 { + font-size: 5rem; +} + +h2 { + font-size: 2.5rem; +} + +h3 { + font-size: 2rem; +} + +h4 { + font-size: 1.5rem; +} + +u { + text-decoration: none; + border-bottom: 0.5px solid #222222; +} + +button { + box-sizing: border-box; + border: none; + background: #c0c0c0; + box-shadow: inset -1px -1px #0a0a0a, + inset 1px 1px #ffffff, inset -2px -2px #808080, + inset 2px 2px #dfdfdf; + border-radius: 0; + + min-width: 75px; + min-height: 23px; + padding: 0 12px; +} + +button:not(:disabled):active { + box-shadow: inset -1px -1px #ffffff, + inset 1px 1px #0a0a0a, inset -2px -2px #dfdfdf, + inset 2px 2px #808080; +} + +button:focus { + outline: 1px dotted #000000; + outline-offset: -4px; +} + +:disabled { + color: #808080; + text-shadow: 1px 1px 0 #ffffff; +} + +:disabled + label { + color: #808080; + text-shadow: 1px 1px 0 #ffffff; +} + +.window { + box-shadow: inset -1px -1px #0a0a0a, + inset 1px 1px #ffffff, inset -2px -2px #808080, + inset 2px 2px #dfdfdf; + background: #c0c0c0; + padding: 3px; +} + +.title-bar { + background: linear-gradient( + 90deg, + #000080, + #1084d0 + ); + padding: 2px; + display: flex; + justify-content: space-between; + align-items: center; +} + +.title-bar-text { + font-weight: bold; + color: white; + letter-spacing: 0; + margin-right: 24px; +} + +.title-bar-controls { + display: flex; +} + +.title-bar-controls button { + padding: 0; + display: block; + min-width: 14px; + min-height: 12px; +} + +.title-bar-controls button:focus { + outline: none; +} + +.title-bar-controls button[aria-label="Minimize"] { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg width='6' height='2' viewBox='0 0 6 2' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Crect width='6' height='2' fill='black'/%3E %3C/svg%3E"); + background-repeat: no-repeat; + background-position: bottom 2px left 3px; +} + +.title-bar-controls button[aria-label="Maximize"] { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg width='9' height='8' viewBox='0 0 9 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M0 2V7V8H1H8H9V7V2V0H8H1H0V2ZM8 7V2H1V7H8Z' fill='black'/%3E %3C/svg%3E"); + background-repeat: no-repeat; + /* Off by 1px because contents can't go above the inner shadow */ + /* Should be 9px by 9px, with top 1px */ + background-position: top 2px left 2px; +} + +.title-bar-controls button[aria-label="Close"] { + margin-left: 2px; + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg width='8' height='7' viewBox='0 0 8 7' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M0 0H1H2V1H3V2H4H5V1H6V0H7H8V1H7V2H6V3H5V4H6V5H7V6H8V7H7H6V6H5V5H4H3V6H2V7H1H0V6H1V5H2V4H3V3H2V2H1V1H0V0Z' fill='black'/%3E %3C/svg%3E"); + background-repeat: no-repeat; + background-position: top 2px center; +} + +.window-body { + margin: 8px; +} + +fieldset { + border: none; + box-shadow: inset -1px -1px #ffffff, + inset 1px 1px #0a0a0a, inset -2px -2px #808080, + inset 2px 2px #dfdfdf; + padding: 10px; + padding-block-start: 8px; + margin: 0; +} + +legend { + background: #c0c0c0; +} + +.field-row { + display: flex; + align-items: center; +} + +[class^="field-row"] + [class^="field-row"] { + margin-top: 6px; +} + +.field-row * + * { + margin-left: 6px; +} + +.field-row-stacked { + display: flex; + flex-direction: column; +} + +.field-row-stacked * + * { + margin-top: 6px; +} + +label { + display: inline-flex; + align-items: center; +} + +input[type="radio"], +input[type="checkbox"] { + appearance: none; + -webkit-appearance: none; + -moz-appearance: none; + margin: 0; + border: none; +} + +input[type="radio"] + label, +input[type="checkbox"] + label { + line-height: 13px; +} + +input[type="radio"] + label { + position: relative; + margin-left: 18px; +} + +input[type="radio"] + label::before { + content: ""; + position: absolute; + top: 0; + left: -18px; + display: inline-block; + width: 12px; + height: 12px; + margin-right: 6px; + background: url("data:image/svg+xml;charset=utf-8,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M8 0H4V1H2V2H1V4H0V8H1V10H2V8H1V4H2V2H4V1H8V2H10V1H8V0Z' fill='%23808080'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M8 1H4V2H2V3V4H1V8H2V9H3V8H2V4H3V3H4V2H8V3H10V2H8V1Z' fill='black'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M9 3H10V4H9V3ZM10 8V4H11V8H10ZM8 10V9H9V8H10V9V10H8ZM4 10V11H8V10H4ZM4 10V9H2V10H4Z' fill='%23DFDFDF'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M11 2H10V4H11V8H10V10H8V11H4V10H2V11H4V12H8V11H10V10H11V8H12V4H11V2Z' fill='white'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M4 2H8V3H9V4H10V8H9V9H8V10H4V9H3V8H2V4H3V3H4V2Z' fill='white'/%3E %3C/svg%3E"); +} + +input[type="radio"]:checked + label::after { + content: ""; + display: block; + width: 4px; + height: 4px; + top: 4px; + left: -14px; + position: absolute; + background: url("data:image/svg+xml;charset=utf-8,%3Csvg width='4' height='4' viewBox='0 0 4 4' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M3 0H1V1H0V2V3H1V4H3V3H4V2V1H3V0Z' fill='black'/%3E %3C/svg%3E"); +} + +input[type="radio"]:focus + label, +input[type="checkbox"]:focus + label { + outline: 1px dotted #000000; +} + +input[type="radio"][disabled] + label::before { + background: url("data:image/svg+xml;charset=utf-8,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M8 0H4V1H2V2H1V4H0V8H1V10H2V8H1V4H2V2H4V1H8V2H10V1H8V0Z' fill='%23808080'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M8 1H4V2H2V3V4H1V8H2V9H3V8H2V4H3V3H4V2H8V3H10V2H8V1Z' fill='black'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M9 3H10V4H9V3ZM10 8V4H11V8H10ZM8 10V9H9V8H10V9V10H8ZM4 10V11H8V10H4ZM4 10V9H2V10H4Z' fill='%23DFDFDF'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M11 2H10V4H11V8H10V10H8V11H4V10H2V11H4V12H8V11H10V10H11V8H12V4H11V2Z' fill='white'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M4 2H8V3H9V4H10V8H9V9H8V10H4V9H3V8H2V4H3V3H4V2Z' fill='%23C0C0C0'/%3E %3C/svg%3E"); +} + +input[type="radio"][disabled]:checked + label::after { + background: url("data:image/svg+xml;charset=utf-8,%3Csvg width='4' height='4' viewBox='0 0 4 4' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M3 0H1V1H0V2V3H1V4H3V3H4V2V1H3V0Z' fill='%23808080'/%3E %3C/svg%3E"); +} + +input[type="checkbox"] + label { + position: relative; + margin-left: 19px; +} + +input[type="checkbox"] + label::before { + content: ""; + position: absolute; + left: -19px; + display: inline-block; + width: 13px; + height: 13px; + background: #ffffff; + box-shadow: inset -1px -1px #ffffff, + inset 1px 1px #808080, inset -2px -2px #dfdfdf, + inset 2px 2px #0a0a0a; + margin-right: 6px; +} + +input[type="checkbox"]:checked + label::after { + content: ""; + display: block; + width: 7px; + height: 7px; + position: absolute; + top: 3px; + left: -16px; + background: url("data:image/svg+xml;charset=utf-8,%3Csvg width='7' height='7' viewBox='0 0 7 7' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M7 0H6V1H5V2H4V3H3V4H2V3H1V2H0V5H1V6H2V7H3V6H4V5H5V4H6V3H7V0Z' fill='black'/%3E %3C/svg%3E"); +} + +input[type="checkbox"][disabled] + label::before { + background: #c0c0c0; +} + +input[type="checkbox"][disabled]:checked + label::after { + background: url("data:image/svg+xml;charset=utf-8,%3Csvg width='7' height='7' viewBox='0 0 7 7' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M7 0H6V1H5V2H4V3H3V4H2V3H1V2H0V5H1V6H2V7H3V6H4V5H5V4H6V3H7V0Z' fill='%23808080'/%3E %3C/svg%3E"); +} + +input[type="text"] { + padding: 3px 4px; + border: none; + box-shadow: inset -1px -1px #ffffff, + inset 1px 1px #808080, inset -2px -2px #dfdfdf, + inset 2px 2px #0a0a0a; + background-color: #ffffff; + box-sizing: border-box; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + border-radius: 0; +} + +select { + padding: 3px 4px; + border: none; + box-shadow: inset -1px -1px #ffffff, + inset 1px 1px #808080, inset -2px -2px #dfdfdf, + inset 2px 2px #0a0a0a; + background-color: #ffffff; + box-sizing: border-box; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + border-radius: 0; +} + +textarea { + padding: 3px 4px; + border: none; + box-shadow: inset -1px -1px #ffffff, + inset 1px 1px #808080, inset -2px -2px #dfdfdf, + inset 2px 2px #0a0a0a; + background-color: #ffffff; + box-sizing: border-box; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + border-radius: 0; +} + +input[type="text"], +select { + height: 21px; +} + +input[type="text"] { + /* For some reason descenders are getting cut off without this */ + line-height: 2; +} + +select { + appearance: none; + -webkit-appearance: none; + -moz-appearance: none; + position: relative; + padding-right: 32px; + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='17' viewBox='0 0 16 17' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M15 0H0V1V16H1V1H15V0Z' fill='%23DFDFDF'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M2 1H1V15H2V2H14V1H2Z' fill='white'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M16 17H15H0V16H15V0H16V17Z' fill='black'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M15 1H14V15H1V16H14H15V1Z' fill='%23808080'/%3E %3Crect x='2' y='2' width='12' height='13' fill='%23C0C0C0'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M11 6H4V7H5V8H6V9H7V10H8V9H9V8H10V7H11V6Z' fill='black'/%3E %3C/svg%3E"); + background-position: top 2px right 2px; + background-repeat: no-repeat; + border-radius: 0; +} + +select:focus, +input[type="text"]:focus, +textarea:focus { + outline: none; +} + +select:focus { + color: #ffffff; + background-color: #000080; +} +select:focus option { + color: #000; + background-color: #fff; +} + +select:active { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='17' viewBox='0 0 16 17' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M0 0H15H16V17H15H0V16V1V0ZM1 16H15V1H1V16Z' fill='%23808080'/%3E %3Crect x='1' y='1' width='14' height='15' fill='%23C0C0C0'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M12 7H5V8H6V9H7V10H8V11H9V10H10V9H11V8H12V7Z' fill='black'/%3E %3C/svg%3E"); +} + +a { + color: #0000ff; +} + +a:focus { + outline: 1px dotted #0000ff; +} + +ul.tree-view { + display: block; + background: #ffffff; + box-shadow: inset -1px -1px #ffffff, + inset 1px 1px #808080, inset -2px -2px #dfdfdf, + inset 2px 2px #0a0a0a; + padding: 6px; + margin: 0; +} + +ul.tree-view li { + list-style-type: none; +} + +ul.tree-view a { + text-decoration: none; + color: #000; +} + +ul.tree-view a:focus { + background-color: #000080; + color: #ffffff; +} + +ul.tree-view ul, +ul.tree-view li { + margin-top: 3px; +} + +ul.tree-view ul { + margin-left: 16px; + padding-left: 16px; + /* Goes down too far */ + border-left: 1px dotted #808080; +} + +ul.tree-view ul > li { + position: relative; +} +ul.tree-view ul > li::before { + content: ""; + display: block; + position: absolute; + left: -16px; + top: 6px; + width: 12px; + border-bottom: 1px dotted #808080; +} + +/* Cover the bottom of the left dotted border */ +ul.tree-view ul > li:last-child::after { + content: ""; + display: block; + position: absolute; + left: -20px; + top: 7px; + bottom: 0px; + width: 8px; + background: #ffffff; +} + +pre { + display: block; + background: #ffffff; + box-shadow: inset -1px -1px #ffffff, + inset 1px 1px #808080, inset -2px -2px #dfdfdf, + inset 2px 2px #0a0a0a; + padding: 12px 8px; + margin: 0; +} + +code, +code * { + font-family: monospace; +} + +summary:focus { + outline: 1px dotted #000000; +} + +::-webkit-scrollbar { + width: 16px; +} +::-webkit-scrollbar:horizontal { + height: 17px; +} + +::-webkit-scrollbar-corner { + background: #dfdfdf; +} + +::-webkit-scrollbar-track { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg width='2' height='2' viewBox='0 0 2 2' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M1 0H0V1H1V2H2V1H1V0Z' fill='%23C0C0C0'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M2 0H1V1H0V2H1V1H2V0Z' fill='white'/%3E %3C/svg%3E"); +} + +::-webkit-scrollbar-thumb { + background-color: #dfdfdf; + box-shadow: inset -1px -1px #0a0a0a, + inset 1px 1px #ffffff, inset -2px -2px #808080, + inset 2px 2px #dfdfdf; +} + +::-webkit-scrollbar-button:vertical:start { + height: 17px; + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='17' viewBox='0 0 16 17' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M15 0H0V1V16H1V1H15V0Z' fill='%23DFDFDF'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M2 1H1V15H2V2H14V1H2Z' fill='white'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M16 17H15H0V16H15V0H16V17Z' fill='black'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M15 1H14V15H1V16H14H15V1Z' fill='%23808080'/%3E %3Crect x='2' y='2' width='12' height='13' fill='%23C0C0C0'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M8 6H7V7H6V8H5V9H4V10H11V9H10V8H9V7H8V6Z' fill='black'/%3E %3C/svg%3E"); +} +::-webkit-scrollbar-button:vertical:end { + height: 17px; + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='17' viewBox='0 0 16 17' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M15 0H0V1V16H1V1H15V0Z' fill='%23DFDFDF'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M2 1H1V15H2V2H14V1H2Z' fill='white'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M16 17H15H0V16H15V0H16V17Z' fill='black'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M15 1H14V15H1V16H14H15V1Z' fill='%23808080'/%3E %3Crect x='2' y='2' width='12' height='13' fill='%23C0C0C0'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M11 6H4V7H5V8H6V9H7V10H8V9H9V8H10V7H11V6Z' fill='black'/%3E %3C/svg%3E"); +} +::-webkit-scrollbar-button:horizontal:start { + width: 16px; + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='17' viewBox='0 0 16 17' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M15 0H0V1V16H1V1H15V0Z' fill='%23DFDFDF'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M2 1H1V15H2V2H14V1H2Z' fill='white'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M16 17H15H0V16H15V0H16V17Z' fill='black'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M15 1H14V15H1V16H14H15V1Z' fill='%23808080'/%3E %3Crect x='2' y='2' width='12' height='13' fill='%23C0C0C0'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M9 4H8V5H7V6H6V7H5V8H6V9H7V10H8V11H9V4Z' fill='black'/%3E %3C/svg%3E"); +} +::-webkit-scrollbar-button:horizontal:end { + width: 16px; + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='17' viewBox='0 0 16 17' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M15 0H0V1V16H1V1H15V0Z' fill='%23DFDFDF'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M2 1H1V15H2V2H14V1H2Z' fill='white'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M16 17H15H0V16H15V0H16V17Z' fill='black'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M15 1H14V15H1V16H14H15V1Z' fill='%23808080'/%3E %3Crect x='2' y='2' width='12' height='13' fill='%23C0C0C0'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M7 4H6V11H7V10H8V9H9V8H10V7H9V6H8V5H7V4Z' fill='black'/%3E %3C/svg%3E"); +} diff --git a/pkg/index.html b/pkg/index.html index 30b86f43..b5506e76 100644 --- a/pkg/index.html +++ b/pkg/index.html @@ -3,7 +3,7 @@ meli interactive demo - +