Add folder with Python mailing list messages
parent
3a1bf315aa
commit
6d39a20d84
|
@ -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]]
|
||||
|
|
|
@ -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: <mailman.0.1433094741.31156.python-list@python.org>
|
||||
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
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -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: <mailman.3.1433095024.31156.python-list@python.org>
|
||||
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
|
||||
|
||||
|
||||
|
||||
|
|
@ -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: <http://mail.python.org/pipermail/python-list/attachments/19990327/b369b473/attachment.html>
|
||||
|
||||
|
|
@ -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" <shippy at cs.nmt.edu>
|
||||
Newsgroups: comp.lang.python To: <python-list at python.org> 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" <python at rose164.wuh.wustl.edu>
|
||||
Subject: Re: Simple tuple question
|
||||
Date: Sat, 20 Mar 1999 19:48:27 -0600
|
||||
Size: 1894
|
||||
URL: <http://mail.python.org/pipermail/python-list/attachments/19990320/1ce203c0/attachment.mht>
|
||||
|
||||
|
|
@ -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" <gmcm at hypernet.com>
|
||||
To: "David Fisher" <python at rose164.wuh.wustl.edu>; <python-list at python.org>
|
||||
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" <python at rose164.wuh.wustl.edu>
|
||||
Subject: Re: making py modules with C
|
||||
Date: Sun, 21 Mar 1999 11:37:38 -0600
|
||||
Size: 2969
|
||||
URL: <http://mail.python.org/pipermail/python-list/attachments/19990321/3f73cd3d/attachment.mht>
|
||||
|
||||
|
|
@ -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" <shogan at iel.ie>
|
||||
To: "python" <python-list at cwi.nl> 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" <python at rose164.wuh.wustl.edu>
|
||||
Subject: Re: making py modules with C
|
||||
Date: Sat, 20 Mar 1999 20:32:35 -0600
|
||||
Size: 3327
|
||||
URL: <http://mail.python.org/pipermail/python-list/attachments/19990320/fbf53fd2/attachment.mht>
|
||||
|
||||
|
|
@ -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" <a.eyre at optichrome.com>
|
||||
To: "JJ" <joacim at home.se>; <python-list at python.org> 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" <python at rose164.wuh.wustl.edu>
|
||||
Subject: Re: Importing "Modules"
|
||||
Date: Sun, 21 Mar 1999 10:37:41 -0600
|
||||
Size: 3255
|
||||
URL: <http://mail.python.org/pipermail/python-list/attachments/19990321/d1654221/attachment.mht>
|
||||
|
||||
|
|
@ -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" <python at rose164.wuh.wustl.edu>
|
||||
Subject: Re: Code basics
|
||||
Date: Wed, 17 Mar 1999 09:31:02 -0600
|
||||
Size: 2336
|
||||
URL: <http://mail.python.org/pipermail/python-list/attachments/19990317/a65f1127/attachment.mht>
|
||||
|
|
@ -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.
|
||||
===========
|
||||
|
||||
|
||||
|
||||
|
|
@ -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
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -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
|
||||
|
||||
|
||||
|
||||
|
|
@ -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
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -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: <roy-2904991402400001@qwerky.med.nyu.edu>
|
||||
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 <roy at popmail.med.nyu.edu>
|
||||
New York University School of Medicine
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -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: <wkiubacnze.fsf@ifi.uio.no>
|
||||
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.
|
||||
|
||||
|
||||
|
||||
|
|
@ -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<wink>-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
|
||||
|
||||
|
||||
|
||||
|
|
@ -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: <s72703fc.021@holnam.com>; from Scott Stirling on Wed, Apr 28, 1999 at 12:49:55PM -0400
|
||||
References: <s72703fc.021@holnam.com>
|
||||
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 <FONT FACE="Times New Roman"> 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 <TD> 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 <TD> tags) it is easier to find the
|
||||
> >> whole tag with attributes and then _replace_ the original tag
|
||||
> >> with a plain <TD>. Save the files. Close the files. Exit the
|
||||
> >> program.
|
||||
|
||||
Hi Scott,
|
||||
|
||||
I shall assume that a <TD ...> tag occurs in one line. Try 'sed',
|
||||
for i in *.html
|
||||
do sed -e 's/<TD ALIGN="left">/<TD>/g" $i > /tmp/$i && mv /tmp/$i $i
|
||||
done
|
||||
or, in Python,
|
||||
for s in open('...', 'r').readlines():
|
||||
s = string.replace('<TD ALIGN="left">', '<TD>', s)
|
||||
print string.strip(s)
|
||||
|
||||
If <TD ...> 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('<TD %s>' % sys.argv[1], '<TD>', 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
|
||||
|
||||
|
||||
|
||||
|
|
@ -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
|
||||
|
||||
|
||||
|
||||
|
|
@ -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> <Pine.GSO.3.96.990430003346.3541A-100000@saga1.Stanford.EDU> <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 <tseaver at palladion.com> 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
|
||||
|
||||
|
||||
|
||||
|
|
@ -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: <GIOP2.37825$A6.19136587@news1.teleport.com>
|
||||
References: <GIOP2.37825$A6.19136587@news1.teleport.com>
|
||||
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 <wink>.
|
||||
|
||||
> 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
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
From: paul at prescod.net (Paul Prescod)
|
||||
Date: Thu, 29 Apr 1999 19:00:33 GMT
|
||||
Subject: padding strings
|
||||
References: <roy-2904991402400001@qwerky.med.nyu.edu>
|
||||
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
|
||||
|
||||
|
||||
|
||||
|
|
@ -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: <cr7YEI0B0KGW10rKZr@holmes.parc.xerox.com>
|
||||
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
|
||||
|
||||
|
||||
|
||||
|
|
@ -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 <faassen at pop.vet.uu.nl> 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
|
||||
|
||||
|
||||
|
||||
|
|
@ -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: <m3vhew1u40.fsf@delorges.in-berlin.de>
|
||||
X-UID: 23
|
||||
|
||||
|
||||
Stephen Crompton <scrompton at quantisci.co.uk> 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.
|
||||
|
||||
|
||||
|
||||
|
|
@ -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 (<full path to file>)
|
||||
>
|
||||
> from pprint import pprint
|
||||
>
|
||||
> pprint (cvsfile.revisions)
|
||||
>
|
||||
> or something alike.
|
||||
|
||||
maybe
|
||||
|
||||
Demo/pdist/cvslib.py
|
||||
|
||||
(in the Python source distribution) could be a start?
|
||||
|
||||
</F>
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -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
|
||||
<wink>.
|
||||
|
||||
> 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 <wink>.
|
||||
|
||||
> 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 <wink>? 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" <wink>.
|
||||
|
||||
soon-even-light-bulbs-will-have-20Gb-hard-drives-ly y'rs - tim
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -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> <m2g15oygtk.fsf@desk.crynwr.com>
|
||||
Message-ID: <FArE96.5A@rempt.xs4all.nl>
|
||||
X-UID: 26
|
||||
|
||||
Russell Nelson <nelson at crynwr.com> 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
|
||||
|
||||
|
||||
|
||||
|
|
@ -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> <y0jaevznhha.fsf@vier.idi.ntnu.no>
|
||||
Message-ID: <glmvhemn4zx.fsf@caffeine.mitre.org>
|
||||
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
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -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 <wink>]
|
||||
|
||||
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 <wink>.
|
||||
|
||||
right-next-to-my-reboot-foot-pedal-ly y'rs - tim
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -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: <m34smeyek3.fsf@atrus.jesus.cam.ac.uk>
|
||||
Content-Length: 1063
|
||||
X-UID: 29
|
||||
|
||||
Gerald Gutierrez <gutier at intergate.bc.ca> 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")
|
||||
<module 'sys' (built-in)>
|
||||
>>> s=__import__("sys")
|
||||
>>> s
|
||||
<module 'sys' (built-in)>
|
||||
>>>
|
||||
|
||||
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.
|
||||
|
||||
|
||||
|
||||
|
|
@ -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: <slrn7gt244.3s6.bernhard@alpha1.csd.uwm.edu> <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
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -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: <slrn7hio0v.vlp.bernhard@alpha1.csd.uwm.edu>
|
||||
Content-Length: 1230
|
||||
X-UID: 31
|
||||
|
||||
On Sun, 18 Apr 1999 01:33:46 GMT, hj_ka at my-dejanews.com <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
|
||||
|
||||
|
||||
|
||||
|
|
@ -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 <duncan at rcp.co.uk> 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
|
||||
|
||||
|
||||
|
||||
|
|
@ -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> <e5XO2.32678$FZ5.12416@news.rdc1.sfba.home.com> <19990408075544.B983383@vislab.epa.gov>
|
||||
Message-ID: <370E3AD7.16C48C5F@att.com>
|
||||
X-UID: 33
|
||||
|
||||
Randall Hopper wrote:
|
||||
|
||||
> I believe that was Fredrik Lundh <fredrik at pythonware.com>.
|
||||
>
|
||||
> 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
|
||||
|
||||
|
||||
|
||||
|
|
@ -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. <fdrake at acm.org>
|
||||
Corporation for National Research Initiatives
|
||||
|
||||
|
||||
|
||||
|
|
@ -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
|
||||
|
||||
|
||||
|
||||
|
|
@ -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: <m37lqz0yoa.fsf@solo.david-steuber.com> <372599D6.C156C996@pop.vet.uu.nl> <7g4a3l$atk$1@news.worldonline.nl> <m3vhehxjhr.fsf@solo.david-steuber.com>
|
||||
Message-ID: <glm1zh3h1ld.fsf@caffeine.mitre.org>
|
||||
X-UID: 36
|
||||
|
||||
David Steuber <trashcan at david-steuber.com> 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
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -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 "<stdin>", line 1, in ?
|
||||
ImportError: cannot import name tzname
|
||||
>>>
|
||||
|
||||
Does anybody know why this happens? timemodule is included
|
||||
of course..
|
||||
|
||||
best,
|
||||
Christian
|
||||
|
||||
|
||||
|
||||
|
|
@ -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 = <IN>;
|
||||
OUTER: while( defined $l ){
|
||||
if( (($x) = $l =~ /^>(\S+)/) ){
|
||||
if( exists $ex{$x} ){
|
||||
$l = <IN>;
|
||||
while( defined $l && !($l =~ /^>(\S+)/) ){
|
||||
$l = <IN>;
|
||||
}
|
||||
next OUTER;
|
||||
}
|
||||
}
|
||||
print $l;
|
||||
$l = <IN>;
|
||||
}
|
||||
}
|
||||
|
||||
Please do convince me being a python programmer does not mean being slow
|
||||
;-)
|
||||
|
||||
Thanks very much for any help,
|
||||
|
||||
Arne
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -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"
|
||||
|
||||
|
||||
|
||||
|
|
@ -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)
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
|
|
@ -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: <dozier-2004991057490001@client-151-200-124-68.bellatlantic.net>
|
||||
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
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -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: <RUgQ2.31$Oq4.32657@newsfeed.avtel.net> <87n20caldg.fsf@spock.localnet.de> <roy-1304991155360001@qwerky.med.nyu.edu> <ne2R2.33$xa5.26667@newsfeed.avtel.net> <ru3R2.1$3m6.35@newsfeed.avtel.net>
|
||||
Message-ID: <m3btgrnqif.fsf@atrus.jesus.cam.ac.uk>
|
||||
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
|
||||
|
||||
|
||||
|
||||
|
|
@ -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
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -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: <Pine.SOL2.3.96.SK.990409141315.6969H-100000@sun.med.ru>
|
||||
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.
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -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&<U'..XXG3YN[Y
|
||||
M_#@4"<D\4R2/A&RK&?_O;W<!D"!%V4G'Z;WW)NQ$%H'%8K'8;T!]ZUWQ21CQ
|
||||
M[[[B,^CWGVUOL^\88\^>#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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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<N)-6CT2QJK&TSV^S8<K%U,J.-@"&GM)W(RJX4'&=#5:+XBET=
|
||||
MQD"'&#IY%%A;7),JJ]D]-(5+"''$S6?"?MH(#NVM435:52)WU02WAV[U_7&:
|
||||
M?.S=!8(;JF[^&4I\FC1Y^TV$A<A2G))+9UZ@#3$D%>+8)SBY,.:`2F0;5Q[4
|
||||
MO;)>("TC:<IU5<QKO91*9D09VG[$`NS2*Y4^=MD(GR3LH2+!-Q:31/"(=8F=
|
||||
MO![%Y#G6%;^1]/0+_`EA"+.[QSW]F;S^7ZPOZOG_TF(-SW_BU7+_;R;!/=#'
|
||||
M*3R^5\/_^</SK^X:M,=F;D5:Y[9^I3`I2X"W\X/%L`$H^D<>2!QE@/!G+BD$
|
||||
FXF@=\Z]O<64H0QG*4(8RE*$,92A#&<I0AC+,/OP-U`GR>0"@````
|
||||
`
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
|
@ -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
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -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)
|
||||
|
||||
|
||||
|
||||
|
|
@ -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 <faassen at pop.vet.uu.nl> 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
|
||||
|
||||
|
||||
|
||||
|
|
@ -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> <m3d817nr3u.fsf@atrus.jesus.cam.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
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -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: <Pine.SOL2.3.96.SK.990406161212.28161D-100000@sun.med.ru>
|
||||
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.
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -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: <Pine.GSO.3.96.990427143251.9096A-100000@saga15.Stanford.EDU>
|
||||
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
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -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: <Pine.GSO.3.96.990416210940.14063D-101000@crusoe.crusoe.net>
|
||||
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: <http://mail.python.org/pipermail/python-list/attachments/19990416/ac0f5938/attachment.obj>
|
||||
|
||||
|
|
@ -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
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -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> <m3emluaecc.fsf@solo.david-steuber.com> <7emldl$rh9$1@nnrp1.dejanews.com>
|
||||
Message-ID: <m3hfqo7zb5.fsf@solo.david-steuber.com>
|
||||
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."
|
||||
|
||||
|
||||
|
||||
|
|
@ -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: <p5k8vdnc6n.fsf@bidra241.bbn.hp.com>
|
||||
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
|
||||
|
||||
|
||||
|
||||
|
|
@ -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: <s7259011.050@mail.conservation.state.mo.us> <m3zp3txlem.fsf@solo.david-steuber.com>
|
||||
Message-ID: <013301be9256$07e03710$f29b12c2@pythonware.com>
|
||||
X-UID: 56
|
||||
|
||||
David Steuber <trashcan at david-steuber.com> 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...
|
||||
|
||||
</F>
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -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 :^) <mailto:tismer at appliedbiometrics.com>
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -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> <y0jaevznhha.fsf@vier.idi.ntnu.no> <glmvhemn4zx.fsf@caffeine.mitre.org> <37215EFB.433AFCA6@prescod.net>
|
||||
Message-ID: <aahzFApB65.2JK@netcom.com>
|
||||
X-UID: 58
|
||||
|
||||
In article <37215EFB.433AFCA6 at prescod.net>,
|
||||
Paul Prescod <paul at prescod.net> 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.
|
||||
|
||||
<shrug> 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!
|
||||
|
||||
|
||||
|
||||
|
|
@ -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 :^) <mailto:tismer at appliedbiometrics.com>
|
||||
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
|
||||
|
||||
|
||||
|
||||
|
|
@ -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
|
||||
|
||||
|
||||
|
||||
|
|
@ -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 <time.h> */
|
||||
>
|
||||
> On Linux, strptime() IS declared in <time.h>. However, I find nothing in
|
||||
> timemodule.c that would cause <time.h> to be included for Linux. configure
|
||||
> does find strptime and does cause HAVE_STRPTIME to be defined in config.h.
|
||||
|
||||
Rest assured, <time.h> 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
|
||||
> <time.h>, 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/)
|
||||
|
||||
|
||||
|
||||
|
|
@ -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: <m4izp3rc21l.fsf@macquarie.com.au>
|
||||
Message-ID: <V8_V2.7141$YU1.12575@newsr2.twcny.rr.com>
|
||||
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 <timd at macquarie.com.au> 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("<Destroy>", 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
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -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: <QIQU2.1834$gv5.1244@news.rdc1.sfba.home.com>
|
||||
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
|
||||
|
||||
|
||||
|
||||
<mrfusion at bigfoot.com> 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
|
||||
>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -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: <glmpv4vnhh6.fsf@caffeine.mitre.org> <000901be8e11$b4842560$f09e2299@tim>
|
||||
Message-ID: <Pine.SUN.3.95-heb-2.07.990426011503.1244D-100000@sunset.ma.huji.ac.il>
|
||||
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).
|
||||
|
||||
<snipped discussion whether Amortized Constant Time is a C++/STL/CS
|
||||
concept>
|
||||
|
||||
> 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 <mzadka at geocities.com>.
|
||||
QOTD: What fun to me! I'm not signing permanent.
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -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: <m37lqz0yoa.fsf@solo.david-steuber.com> <372599D6.C156C996@pop.vet.uu.nl> <7g4a3l$atk$1@news.worldonline.nl> <m3vhehxjhr.fsf@solo.david-steuber.com>
|
||||
Message-ID: <etd4slza36a.fsf@m2-225-12.mit.edu>
|
||||
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.
|
||||
|
||||
|
||||
|
||||
|
|
@ -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
|
||||
|
||||
|
||||
|
||||
|
|
@ -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 <tismer at appliedbiometrics.com> wrote:
|
||||
> > due to a question which came up in the tutor list, I'd like
|
||||
> > to ask if somebody can explain the following:....
|
||||
>
|
||||
> <chomp><chomp>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 :^) <mailto:tismer at appliedbiometrics.com>
|
||||
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
|
||||
|
||||
|
||||
|
||||
|
|
@ -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
|
||||
|
||||
|
||||
|
||||
|
|
@ -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
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -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 <linge at embl-heidelberg.de>, the author of)
|
||||
> With python 1.51 running on a SGI:
|
||||
> >>> string.atoi('-')
|
||||
> Traceback (innermost last):
|
||||
> File "<stdin>", 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 "<stdin>", 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 "<stdin>", 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
|
||||
|
||||
|
||||
|
||||
|
|
@ -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 *
|
||||
************************************************
|
||||
________________________________________________________________________________
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -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: <m37lqz0yoa.fsf@solo.david-steuber.com> <372599D6.C156C996@pop.vet.uu.nl> <7g4a3l$atk$1@news.worldonline.nl> <m3vhehxjhr.fsf@solo.david-steuber.com>
|
||||
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???? <choke!> 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.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -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: <dkuhlmanF9w7zo.n3o@netcom.com>
|
||||
X-UID: 73
|
||||
|
||||
Daye <daye at earthling.net> 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
|
||||
|
||||
|
||||
|
||||
|
|
@ -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: <s72703fc.021@holnam.com> <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 <FONT> 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!)
|
||||
|
||||
|
||||
|
||||
|
|
@ -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>
|
||||
<m3emluaecc.fsf@solo.david-steuber.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
|
||||
|
||||
|
||||
|
||||
|
|
@ -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.
|
||||
|
||||
|
||||
|
||||
|
|
@ -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: <m3u2u47hod.fsf@deneb.cygnus.stuttgart.netsurf.de>
|
||||
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. ;)
|
||||
|
||||
|
||||
|
||||
|
|
@ -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.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -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: <F9HuLr.KwL@world.std.com> <370de606.77891472@news.oh.verio.com> <F9xpnF.GFq.0.spadina@torfree.net>
|
||||
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
|
||||
|
||||
|
||||
|
||||
|
|
@ -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 <jschiotz at hotmail.com> 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
|
||||
|
||||
|
||||
|
||||
|
|
@ -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/)
|
||||
|
||||
|
||||
|
||||
|
|
@ -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/)
|
||||
|
||||
|
||||
|
||||
|
|
@ -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: <dkuhlmanF9sLro.IGx@netcom.com>
|
||||
References: <dkuhlmanF9sLro.IGx@netcom.com>
|
||||
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
|
||||
|
||||
|
||||
|
||||
|
|
@ -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: <Pine.GSO.3.96.990430003346.3541A-100000@saga1.Stanford.EDU>
|
||||
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
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -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.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -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: <wjyk8uvxrrc.fsf@cssun3.corp.mot.com>
|
||||
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
|
||||
|
||||
|
||||
|
||||
|
|
@ -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
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -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
|
||||
_________________________________________________________________________________________
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -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 <ciupke at fzi.de> 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-code<wink>ly y'rs - tim
|
||||
|
||||
-----------== Posted via Deja News, The Discussion Network ==----------
|
||||
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
|
||||
|
||||
|
||||
|
||||
|
|
@ -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/)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -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
|
||||
|
||||
|
||||
|
||||
|
|
@ -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
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -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: <aahzFAM4oJ.M7M@netcom.com>
|
||||
References: <aahzFAM4oJ.M7M@netcom.com>
|
||||
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
|
||||
|
||||
|
||||
|
||||
|
|
@ -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: <aahzFAM4oJ.M7M@netcom.com>
|
||||
<yWOT2.6007$8m5.9320@newsr1.twcny.rr.com>
|
||||
<Pine.SUN.3.95-heb-2.07.990423140345.21577A-100000@sunset.ma.huji.ac.il>
|
||||
<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
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -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
|
||||
|
||||
|
||||
|
||||
|
|
@ -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: <yWOT2.6007$8m5.9320@newsr1.twcny.rr.com>
|
||||
References: <aahzFAM4oJ.M7M@netcom.com> <yWOT2.6007$8m5.9320@newsr1.twcny.rr.com>
|
||||
Message-ID: <Pine.SUN.3.95-heb-2.07.990423140345.21577A-100000@sunset.ma.huji.ac.il>
|
||||
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 <aahz at netcom.com> wrote in message
|
||||
> news:aahzFAM4oJ.M7M at netcom.com...
|
||||
> > I've seen roughly half the people here doing
|
||||
> >
|
||||
<snipped try/except idiom for updating a dictionary>
|
||||
<snipped has_key idiom for updating a dictionary>
|
||||
|
||||
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 <mzadka at geocities.com>.
|
||||
QOTD: What fun to me! I'm not signing permanent.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -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: <BBn/2Yv1uoIN084yn@eskimo.com> <000801be89dd$d407a0c0$ed9e2299@tim> <HCLH3Yv1uQ4H084yn@eskimo.com>
|
||||
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" <tim_one at email.msn.com> 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
|
||||
<wink>,
|
||||
>
|
||||
>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
|
||||
>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -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
|
||||
<gm_class.test instance at 856fd0>
|
||||
>>> b
|
||||
<gm_class.test instance at 85b140>
|
||||
>>> a.gm
|
||||
<win32 module 'GM4S32' (0 functions)>
|
||||
>>> b.gm
|
||||
<win32 module 'GM4S32' (0 functions)>
|
||||
>>> a.load_bde() # This works
|
||||
(1, 'Startup Time: 0.490000009537')
|
||||
>>> a.gm
|
||||
<win32 module 'GM4S32' (1 functions)>
|
||||
>>> b.gm
|
||||
<win32 module 'GM4S32' (1 functions)>
|
||||
>>> b.load_bde() # This fails but should work ;-(
|
||||
(0, 'Startup Time: 0.0')
|
||||
>>> a.gm
|
||||
<win32 module 'GM4S32' (1 functions)>
|
||||
>>> b.gm
|
||||
<win32 module 'GM4S32' (1 functions)>
|
||||
>>> 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:
|
||||
--- <win32 module 'GM4S32' (1 functions)> ---
|
||||
2 GMW_LoadBDE
|
||||
>>>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -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
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue