Digest Number 2945

Michael Robin vimakefile at yahoo.com
Fri Aug 3 15:52:47 EDT 2001


I'll be here this weekend (except for tomo during the day)
and most of next week...

How are the preperations going???

m

-----Original Message-----
From: python-list at yahoogroups.com [mailto:python-list at yahoogroups.com]
Sent: Friday, August 03, 2001 2:17 AM
To: python-list at yahoogroups.com
Subject: Digest Number 2945


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Small business owners...
Tell us what you think!
http://us.click.yahoo.com/vO1FAB/txzCAA/ySSFAA/saFolB/TM
---------------------------------------------------------------------~->

There are 25 messages in this issue.

Topics in this digest:

      1. Re: PSP, Cheetah, PTL, ZOPE, etc ...
           From: ChuckEsterbrook at yahoo.com (Chuck Esterbrook)
      2. Re: Arg decoding with a template?
           From: "Chui Tey" <teyc at bigfoot.com>
      3. Re: Language Niches (long)
           From: James Logajan <JamesL at Lugoj.Com>
      4. Re: Deposing Dictators
           From: dirck at pacbell.net (Dirck Blaskey)
      5. PyQt for win32
           From: Adonis Vargas <deltapigz at telocity.com>
      6. Re: Typing system vs. Java
           From: Greg Ewing <greg at cosc.canterbury.ac.nz>
      7. Nested generators is the python equivalent of unix pipe cmds.
           From: "Steven D. Majewski" <sdm7g at Virginia.EDU>
      8. Is it new style or just lack of style?
           From: Roman Suzi <rnd at onego.ru>
      9. Re: SSL_connect error in Python 2.1.1 on IRIX 6.5
           From: Albert Chin-A-Young <china at foo.com>
     10. Re: Python threads with suncc (Forte 6.1) compiler
           From: Albert Chin-A-Young <china at foo.com>
     11. Re: The error of building Python on HP UX
           From: Albert Chin-A-Young <china at foo.com>
     12. MySQL module
           From: Andrey Revyakin <revyakag at umdnj.edu>
     13. curses-library bug? Help!
           From: teo at crepido.com (teo)
     14. Re: MySQL module
           From: "Guillermo Kim" <zual at gh21.net>
     15. Re: (in)exactness of complex numbers
           From: bokr at accessone.com (Bengt Richter)
     16. Re: Is it new style or just lack of style?
           From: "Danyel Fisher" <danyelf at ics.uci.edu>
     17. RE: Deposing Dictators
           From: lomax at pumpichank.com (Frank "Sticky Shift" Lomax)
     18. Re: Question about nested lists!
           From: "Alex Martelli" <aleaxit at yahoo.com>
     19. Re: (in)exactness of complex numbers
           From: bokr at accessone.com (Bengt Richter)
     20. Re: OT: Map generation/plotting
           From: Pat Knight <pknight at eurologic.com>
     21. Re: 2.2 features
           From: delgado at eva17.Mathematik.Uni-Bielefeld.DE (Olaf Delgado)
     22. Re: Language Niches (long)
           From: Robin Becker <robin at jessikat.fsnet.co.uk>
     23. Re: Unicode File Conversion
           From: Martin von Loewis <loewis at informatik.hu-berlin.de>
     24. Re: https proto module?
           From: Martin von Loewis <loewis at informatik.hu-berlin.de>
     25. Re: wierd asp problem
           From: "Volucris" <volucris at hotmail.com>


________________________________________________________________________
________________________________________________________________________

Message: 1
   Date: 2 Aug 2001 21:42:14 -0700
   From: ChuckEsterbrook at yahoo.com (Chuck Esterbrook)
Subject: Re: PSP, Cheetah, PTL, ZOPE, etc ...

paul at boddie.net (Paul Boddie) wrote in message
news:<23891c90.0108020149.1c07ddfa at posting.google.com>...
> Andrew Kuchling <akuchlin at mems-exchange.org> wrote in message
news:<3dofpzk3vq.fsf at ute.cnri.reston.va.us>...
> > ChuckEsterbrook at yahoo.com (Chuck Esterbrook) writes:
> > > The *ML camp uses XML or XML-like tags for all instructions and
> > > substitutions. These include ZPT, Ehydra and others. There is a *ML
> > > like kit for Webware, but I don't think any serious time was put into
> > > it, hence it is hard to recommend (for Webware).
>
> You might be referring to my package, which I would like to develop
> further if I only had the time. I get the feeling that it's too
> different from what people expect in a template system, though.

Actually I was referring to "TALKit" which I think was an attempt to
have something like ZPT for Webware. (I think.)

I actually forgot that XMLForms could be used for templating, which
you pointed out earlier, and hence, wasn't thinking of it. I suppose
the name throws me off.


> > I've become quite fond of PTL's Python-based syntax.  Here's an
> > explanation of why (quoting from a not-yet-public article):
> >
> >         This syntax is quite different from most HTML templating
> >         languages, which usually look like HTML with magical
> >         delimiters (e.g. <%...%>, <?...?>, <!--#... -->) sprinkled
>
> Horrible, isn't it? ;-)

In Cheetah, the only escape code for substitution is $. The only code
for directives like "if" and "for" is #. Therefore, Cheetah doesn't
suffer from the problem that PTL is solving (for ASP, JSP, PHP, etc.)


> What would be interesting is a template environment where one can
> visualise the final form of the template and interact with it, without
> having to go through stages of rebuilding and refreshing it, along
> with the potential of the document "breaking" and requiring low-level
> intervention.

A GUI IDE for Templates? Interesting.


> I thought that W3C's Amaya might lend itself to such applications, but
> that just has to be added to my list of things that I would like to do
> if I only had the time.

Hey, I've got one of those too!

;-)


-Chuck
--
http://mail.python.org/mailman/listinfo/python-list


________________________________________________________________________
________________________________________________________________________

Message: 2
   Date: Fri, 3 Aug 2001 14:12:59 +1000
   From: "Chui Tey" <teyc at bigfoot.com>
Subject: Re: Arg decoding with a template?

How about exploiting the python parser ?

>>> args="arg1, arg2, arg3='world'"
>>> s='def f(%s): pass' % args
>>> exec(s)
>>> dir(f.func_code)
['co_argcount', 'co_code', 'co_consts', 'co_filename', 'co_firstlineno',
'co_fla
gs', 'co_lnotab', 'co_name', 'co_names', 'co_nlocals', 'co_stacksize',
'co_varna
mes']
>>> print f.func_code.co_argcount
3
>>> print f.func_code.co_varnames
('arg1', 'arg2', 'arg3')
>>> print f.func_defaults
('world',)

Chui

Dale Strickland-Clark <dale at riverhall.NOSPAMco.uk> wrote in message
news:ljidmtouqj6som2t9ecagbkj95c53kjaeh at 4ax.com...
> Is there a class that simplifies high-level argument decoding under the
control of a template?
>
> Such a class would take a string as a template and the arg list and return
another list populated
> with keys, values and switches taken from the args.
>
> I've spent the last hour going through the global module list. If it's
there, its got a daft name!
> --
> Dale Strickland-Clark
> Riverhall Systems Ltd


--
http://mail.python.org/mailman/listinfo/python-list


________________________________________________________________________
________________________________________________________________________

Message: 3
   Date: Thu, 02 Aug 2001 21:52:25 -0700
   From: James Logajan <JamesL at Lugoj.Com>
Subject: Re: Language Niches (long)

Paul Prescod wrote:
> My impression was that C++ was a relatively unimportant language
> (relative to C) until Microsoft adopted it. That gave it a huge boost
> and essentially forced most C programmers to become C++ programmers.

Well, better not tell Bjarne Stroustrup. If he finds out, it'll make him a
quivering emotional wreck.
--
http://mail.python.org/mailman/listinfo/python-list


________________________________________________________________________
________________________________________________________________________

Message: 4
   Date: 2 Aug 2001 22:07:53 -0700
   From: dirck at pacbell.net (Dirck Blaskey)
Subject: Re: Deposing Dictators

How about this for an alternate logo:

http://www.pythonet.org/resting2.gif

kp87 at lycos.com (kevin parks) wrote in message
news:<5e8bd451.0108021110.3325bc8d at posting.google.com>...
> What is all this babble about democracy, dictators and what / should
> return? Now, i finally bring up a really important decision to be made
> on a very serious issue and nothing... all while you fight over pep
> this pep that. I DEMAND action now! I want all our snakes changed
> immediately to bunny rabbits! Who voted for the snake!? Why didn't we
> get a vote!? Was it that damned Tim Peters again! God! I know Guido
> said, "Hey dude, what about snakes?!" and Time said, "yeah, like
> whatever man...." (they were in california at the time i think)
>
> And now here we are 10 years on with all these slithering snakes
> instead of cute bunnies or penguins like linux (oh to have those
> cuties!).
>
>
> Hmmmph!
>
> love, peace, and cream cheese.
>
> ps. oh yeah <wink>
>
>
determined-to-be-the-only-python-user-that-doesn't-imitate-tim's-signoff-ly
>
> kevin parks
> seoul, korea
--
http://mail.python.org/mailman/listinfo/python-list


________________________________________________________________________
________________________________________________________________________

Message: 5
   Date: Fri, 03 Aug 2001 01:27:18 -0400
   From: Adonis Vargas <deltapigz at telocity.com>
Subject: PyQt for win32

where can i get PyQt for win32 with compiled Qt Library?
i was able to find it with no problem but it requires me to compile the
C++ files,
and my Mingw compiler errors like crazy on compiling it. im too cheap to
buy
microsofts compiler.

thanks in advance.

Adonis

--
http://mail.python.org/mailman/listinfo/python-list


________________________________________________________________________
________________________________________________________________________

Message: 6
   Date: Fri, 03 Aug 2001 17:15:49 +1200
   From: Greg Ewing <greg at cosc.canterbury.ac.nz>
Subject: Re: Typing system vs. Java

Alex Martelli wrote:
>
> Not
> to mention the peculiar implication of having INTEGER ranges as a
> built-in language feature, and REAL ranges nowhere to be seen

I think that's because various other language features
made use of the existence of ordinal subrange types,
such as array indexes and set types. There is nowhere
else in the language that real subranges are used,
so presumably Mr. Wirth didn't consider there was
enough justification for building them in.

Also, given the imprecision of comparing floats,
it could be difficult to pin down whether a given
value should be considered legal for a given
subrange in some cases. Discrete subranges are
much easier to write precise statements about
in language definitions.

--
Greg Ewing, Computer Science Dept, University of Canterbury,
Christchurch, New Zealand
To get my email address, please visit my web page:
http://www.cosc.canterbury.ac.nz/~greg
--
http://mail.python.org/mailman/listinfo/python-list


________________________________________________________________________
________________________________________________________________________

Message: 7
   Date: Fri, 3 Aug 2001 01:44:21 -0400 (EDT)
   From: "Steven D. Majewski" <sdm7g at Virginia.EDU>
Subject: Nested generators is the python equivalent of unix pipe cmds.


## more on combining generators
## (inspired by previous discussion and more recent one on python-dev)
## Nested generators is the python equivalent of
## unix pipeline commands.  -- Steve

from __future__ import generators

## You need:

## a generator: (you can also start with a list)

def Ints():
        n = 0
        while 1:
                yield n
                n += 1


## one or more filters:

def Test( gen, test ):
        for x in gen:
                if test(x):     yield x

## a terminator:

## ( by condition... )

def Quit( gen, test ):
        for x in gen:
                if test(x): raise StopIteration
                else: yield x

## ( or by count... )

def Count( gen, n ):
        for x in gen:
                yield x
                n -= 1
                if n == 0 : break


## shorthand names so the lines don't get too long:

odd = lambda x: Test( x, lambda y: y % 2 )
enough = lambda x: Quit( x, lambda y: y > 100 )
notdiv3 = lambda x: Test( x, lambda y: y % 3 )

## examples:

print "\n odd ints that are not divisible by 3 under 100:"
for i in notdiv3( enough( odd( Ints() ))):
        print i


print "\n first 20 odd ints not divisible by 3:"
for i in Count( notdiv3(odd(Ints())), 20 ):
        print i


# recursive file iterator as a generator:

from os import listdir, path

def Files( start ):
        for file in listdir( start ):
                file = path.join( start, file )
                if path.isfile( file ): yield file
                elif path.isdir(file):
                        for more in Files( file ):
                                yield more


isGif = lambda s: s.lower().find('.gif') >= 0

# This is MUCH nicer than using os.path.walk() with a callback!

##  print the first 20 gif files I can find in your cwd...
for f in Count(Test( Files('.'), isGif ), 20 ): print f




--
http://mail.python.org/mailman/listinfo/python-list


________________________________________________________________________
________________________________________________________________________

Message: 8
   Date: Fri, 3 Aug 2001 10:12:08 +0400 (MSD)
   From: Roman Suzi <rnd at onego.ru>
Subject: Is it new style or just lack of style?


Hello!

More and more I am starting to see people adding extra
blanks in ( ).

Recent example (from Steven's post):

'''
def Files( start ):
        for file in listdir( start ):
                file = path.join( start, file )
                if path.isfile( file ): yield file
                elif path.isdir(file):
                        for more in Files( file ):
                                yield more
'''

Is it new style?  I am sure this contradicts Python Style
Guide, but where from this new style appeared? I saw Java programs
with the same ugly padding...

And what about:

'''
class E :
    pass
'''

It is not right style too...

Any ideas?

Sincerely yours, Roman Suzi
--
_/ Russia _/ Karelia _/ Petrozavodsk _/ rnd at onego.ru _/
_/ Friday, August 03, 2001 _/ Powered by Linux RedHat 6.2 _/
_/ "MACINTOSH - Most Apps Crash, If Not, Then Operating System Hangs" _/



--
http://mail.python.org/mailman/listinfo/python-list


________________________________________________________________________
________________________________________________________________________

Message: 9
   Date: Fri, 03 Aug 2001 06:10:29 -0000
   From: Albert Chin-A-Young <china at foo.com>
Subject: Re: SSL_connect error in Python 2.1.1 on IRIX 6.5

Francis Tilney <ftilney at commercetone.com> wrote:
> I built Python 2.1.1 on an SGI machine with SSL enabled.
> However when I tried to connect to an https connection I got an error.
> (Another similar test suggested that the ssl error was error 1
> (SSL_ERROR_SSL)).
> Traceback is below.  Any suggestions would be much appreciated.

SSL support is not going to work without /dev/random which is not
available on IRIX. So, you need to run PRNGD
(http://www.aet.tu-cottbus.de/personen/jaenicke/postfix_tls/prngd.html)
as a replacement for /dev/random and configure Modules/socketmodule.c
to call RAND_egd to set things up (you set the environment variable
RANDFILE before a urlopen). The patches we use against Python 2.1.1
that enables SSL support with RAND_egd is at:
  ftp://ftp.thewrittenword.com/packages/free/source/python-2.1.1

--
albert chin (china at thewrittenword dot com)
--
http://mail.python.org/mailman/listinfo/python-list


________________________________________________________________________
________________________________________________________________________

Message: 10
   Date: Fri, 03 Aug 2001 06:16:21 -0000
   From: Albert Chin-A-Young <china at foo.com>
Subject: Re: Python threads with suncc (Forte 6.1) compiler

Pataki G?bor <gabor.pataki at eth.ericsson.se> wrote:
> I would like to get some help because I am in trouble with threads. I
> work on a Solaris 8.0 (64 bit) system. Python is compiled with Sun CC
> (Forte 6.1) compiler with threading support. A small program
> telnetting to a computer often dumps core it works fine with gcc.

Works fine for me on a Solaris 8/SPARC machine running a 64-bit
kernel. I tried Python 2.0.1 and 2.1.1 both compiled with Sun Forte
6.1.

$ ./test.py
ThreadID 0 started
ThreadID 1 started
ThreadID 2 started
ThreadID 3 started
ThreadID 2 finished
ThreadID 3 finished
ThreadID 1 finished
ThreadID 0 finished

> Thanks,
> Gabor Pataki

> import threading
> import telnetlib

> def TelnetToIpw01():
>
>        hostname = "my_hostname"
>        username = "user_name"
>        password = "password"
>
>        tn = telnetlib.Telnet(hostname)
>        tn.read_until("login: ")
>        tn.write(username + '\n')
>        tn.read_until("Password: ")
>        tn.write(password + '\n')

> class MyThread(threading.Thread):
>
>        def run(self):
>                print "ThreadID", self.cnt, "started"
>                TelnetToIpw01()
>                print "ThreadID", self.cnt, "finished"

> for i in range(0,4):
>        m = MyThread()
>        m.cnt = i
>        m.start()

--
albert chin (china at thewrittenword dot com)
--
http://mail.python.org/mailman/listinfo/python-list


________________________________________________________________________
________________________________________________________________________

Message: 11
   Date: Fri, 03 Aug 2001 06:31:13 -0000
   From: Albert Chin-A-Young <china at foo.com>
Subject: Re: The error of building Python on HP UX

Tim Peters <tim.one at home.com> wrote:
> [Guido]
>> (Couldn't resist. :-)
>>
>> It is indeed an error to attempt to build Python on HP UX.  (See the
>> endless laments in the SF bug database.)

> [SteveN]
>> And yet HP makes it available:
>> http://hpux.connect.org.uk/hppd/hpux/Languages/python-2.1/

> They've made binaries available for some time, yet HP-UX users seem
> incapable of successfully compiling it themselves ("see the endless
laments
> in the SF bug database" indeed).  So what's up with that platform?!  Would
> sure be nice if one of the folks at the HP Porting Centre filled us in --
> and if they need to patch the source to get it to compile, we'd be
delighted
> to fold that into the core.

We'll submit patches for 2.0.1 and 2.1.1. I think we did so for 2.0
and 2.1 but I don't remember. HP-UX 11.00 with threads works fine for
us.

--
albert chin (china at thewrittenword dot com)
--
http://mail.python.org/mailman/listinfo/python-list


________________________________________________________________________
________________________________________________________________________

Message: 12
   Date: Fri, 03 Aug 2001 02:38:40 -0400
   From: Andrey Revyakin <revyakag at umdnj.edu>
Subject: MySQL module

...  I know it exists, but where can I get it? Please help!

Andrey.

--
http://mail.python.org/mailman/listinfo/python-list


________________________________________________________________________
________________________________________________________________________

Message: 13
   Date: 3 Aug 2001 00:12:34 -0700
   From: teo at crepido.com (teo)
Subject: curses-library bug? Help!

Hi all! When i try to catch curses.KEY_ENTER, for example, getch() returns

something completley diffrent :)

well, i'll give you my code and explains
below. ----------------------------------

import curses

curses.initscr()

win = curses.newwin(0,0,0,0)

win.keypad(1)

win.refresh()

while 1:

  ch = win.getch()

  if ch == curses.KEY_ENTER:

    win.addstr(10,10,"Enter pressed")

    win.refresh()

-------------------------------------

doesen't write anything at all on my screeen!(when i press 'enter', of
course :)



The strange thing is, that other constants work, for example

curses.KEY_RESIZE, but no "keyboard-keys"(enter, tab, backspace)

When i run my application in pure textmode (no X server), it works,

but when i run my app in a terminalemulator, the mapping of the keys

failes. I don't know if it makes any sence, but I'm running Linux-mandrake.



Any suggestions?

Thanks,

Teodor
--
http://mail.python.org/mailman/listinfo/python-list


________________________________________________________________________
________________________________________________________________________

Message: 14
   Date: Fri, 3 Aug 2001 15:52:02 +0900
   From: "Guillermo Kim" <zual at gh21.net>
Subject: Re: MySQL module

Maybe here ...
http://www.mysql.com/Downloads/Contrib/MySQLmodule-1.4.tar.gz

another ..
http://prdownloads.sourceforge.net/mysql-python/





"Andrey Revyakin" <revyakag at umdnj.edu> wrote in message
news:3B6A46F0.F41E5B74 at umdnj.edu...
> ...  I know it exists, but where can I get it? Please help!
>
> Andrey.
>


--
http://mail.python.org/mailman/listinfo/python-list


________________________________________________________________________
________________________________________________________________________

Message: 15
   Date: Fri, 03 Aug 2001 07:07:10 GMT
   From: bokr at accessone.com (Bengt Richter)
Subject: Re: (in)exactness of complex numbers

On Thu, 2 Aug 2001 11:55:02 -0400, "Steve Holden" <sholden at holdenweb.com>
wrote:
[...]
>
>What has not so far been explicitly stated (although several posts have
>implied it) is that complex numbers are in fact points on a two-dimensional
>plane. If we choose to represent those points as distances along two
>orthogonal axes then the concept of exactness might be said to have some
>meaning for the points at the intersections of two integral values. But if
>we choose to represent an "exact" complex number (by the previous
>definition) in polar coordinates (angle & magnitude) then the same complex
>number would become inexact. Even though there is a strict mathematical
>relationship between polar and orthogonal representations (which is many to
>one, BTW), the transformations would render exactness a less than useful
>concept. A similarly "exact" polar representation would become inexact in
>orthogonal representations.
>
>Hence I now believe exactness is not useful for complex values. Not that it
>couldn't be implemented if somebody perverse enough chose to. Simply that
it
>wouldn't be useful.
>
I am perverse enough to think it could be useful, but maybe not perverse
enough to implement it ;-)

My thought is that what the computer can usefully tell us about exactness
is how well it succeeds in preserving it through some operation(s). It needs
to be told that the inputs are exact, but it can tell us whether the result
is exact. Programmed operations are always on representations, resulting in
representations, obviously.

Representation in polar or cartesian form would lose exactness through
different operations, but e.g., multiplying by (2+0j) could presumably
be exact either way. Either way you'd have a pair of numbers, but the
operations on the components would be different, though related in result
through the point they identify (identify differently, which I guess was
Greg's first point, though the rest was about other uses of number pairs,
which was beside the point w.r.t. the uses of having accurate
representations
for the numbers *in* number pairs representing complex values, whichever
kind of pair it might be).

If angles were represented as rational coefficients for pi radians instead
of one radian, a fair number of angles could be represented exactly.

The criterion for exactness here would be that operating on the
finite-precision
representations of the inputs would result in a finite-precision output
equal
in mathematical value to what would have been the case if all the
representations
had been infinite precision. If there are two components to the
representation,
then the criterion applies to each separately.

This would require two separate representations of complex, both in literals
and
internally, and conversions between could only be exact in a few trivial
cases.

You would want exactness attributes for both components in either
representation,
I think. Sometimes a conversion could produce one exact component, which if
carried
as such might be the one of most interest in the end. E.g., sin(pi/6) = 1/2
exactly.
Of course, you'd have to be pretty perverse and check exact lookups for some
of these
before sending them through IEEE754 functions ;-)

I've never done anything with exact complex numbers, so I don't know how it
could
really be used. I guess you could say the angles in an FFT are implicitly
exact,
but I don't know how you could do the whole thing exactly, except maybe a
trivial case.

IIRC, Henry Baker(?) wrote something about exact integer
cartesian-represented complex
in some ACM SIG article, but I don't remember much more than that.

--
http://mail.python.org/mailman/listinfo/python-list


________________________________________________________________________
________________________________________________________________________

Message: 16
   Date: Fri, 3 Aug 2001 00:49:47 -0700
   From: "Danyel Fisher" <danyelf at ics.uci.edu>
Subject: Re: Is it new style or just lack of style?

> More and more I am starting to see people adding extra
> blanks in ( ).

> Is it new style?  I am sure this contradicts Python Style
> Guide, but where from this new style appeared? I saw Java programs
> with the same ugly padding...

Indeed. It Greatly Displeases our BDFL. Despite that, it is an old
and well-loved style, a favorite from many languages... Because I
am carefully putting off real work, I have saved you the effort of a
solid web search.

In my Java class, lo those many years ago, we learned that we want
spaces in that open style: foo( bar )
http://www.alumni.caltech.edu/~croft/research/java/guide/#format
http://www.javaranch.com/style.jsp#space
    (which is nice enough to point out that this is a hybrid of practicality
of the way that many text editors implement double-click-for-copy, and
tradition)

Many others disagree.
http://java.sun.com/docs/codeconv/html/CodeConventions.doc7.html#475
http://www.geosoft.no/javastyle.html#White%20Space
[Note that the JavaSoft guide wants you to space things as
    foo( bar );
while the GeoSoft guide prefers
    foo(bar);
]

------------------
I don't know what the history is. I tried a few other languages, looking
for "<language> style guide whitespace" on Google...

Most languages dislike it...

Perl doesn't care too much. Apparently, there's more than one way to do it.
http://www.javaranch.com/style.jsp#space

C:
http://www.apocalypse.org/pub/u/paul/docs/cstyle/cstyle06.htm

Lisp:
http://www.cs.cmu.edu/afs/cs.cmu.edu/project/ai-repository/ai/html/faqs/lang
/lisp/part1/faq-doc-4.html

Fortran:
http://www.aeem.iastate.edu/Computers/Software/Fortran/guide.html

Ada:
http://www.grammatech.com/aadoc/man-whitespace.html#horizontalWhitespace

And then some breakthroughs...

Assembly:
http://webster.cs.ucr.edu/Page_asm/moreasm/asmstyle.htm
mentions things like
     mov ax, 10;  { Set AX to 11 }
;                       swap( a[i][j], b[j][i] );
in comments.

http://www.students.stedwards.edu/~ttiriti/pl.htm
suggests
    awk -F: '{ print $1; print $2; print $3 }' /etc/passwd
which is a habit I certainly find myself falling into when
I'm hacking shell scripts--it keeps everything apart, and
therefore VERY VERY clear to the interpreter.

Does anyone have a better sense of history on this?

--Danyel


--
http://mail.python.org/mailman/listinfo/python-list


________________________________________________________________________
________________________________________________________________________

Message: 17
   Date: Fri, 3 Aug 2001 03:45:39 -0400
   From: lomax at pumpichank.com (Frank "Sticky Shift" Lomax)
Subject: RE: Deposing Dictators


    > Give the guy a break, Carl.  Frank may not be the swiftest coder
    > around, but it's really not unusual for newcomers to take as
    > long as 3 weeks to reach the 100 Kline/day Python median.

Thank you Uncle Timmy, for being so understanding.  This is what I
have come to love about the Python community.

As you surmise, I have been coding Forth at the Cheez Whiz factory for
about 35 years.  I was lead designer of the WEINOR 59 (Whiz Extruder
and Injector, Numerically Operated Robot) and only just discovered
Python a few months ago, after a dare from Melvin X, an employee of
mine who is the Primary Cheez Canal De-gunker and Tube Washer.  Melvin
is a very bright kid, but even so, I was quite skeptical until he
boosted our Whiz Canister Thruput seven fold after converting the
prime Cheez pump control software from Forth to Python in a (very
productive, and crackerful) weekend.

    > If Frank is *very* new at Python (which it sounds like), he'll
    > see a big improvement when he breaks himself of the habit of
    > reaching for his curly-brace keys all the time.

Those are not the only curly things I reach for when I program Python.

habits-are-like-skulls,-coconuts,-or-virgin-cheez-whiz-bottles-
    you-have-to-smash-them-into-brick-walls-several-times-at-high-
    velocity-before-they-will-break-and-then-just-watch-what-comes-
    out-ly y'rs - frank

--
http://mail.python.org/mailman/listinfo/python-list


________________________________________________________________________
________________________________________________________________________

Message: 18
   Date: Fri, 3 Aug 2001 08:39:25 +0200
   From: "Alex Martelli" <aleaxit at yahoo.com>
Subject: Re: Question about nested lists!

"rainlet" <orrego at mail2000.com.tw> wrote in message
news:f37349a7.0108021859.4f620ec2 at posting.google.com...
> I use a nested list to make a 2-d array. The code follows:
>
>     floor_member = [ 0 ]
>     for x in range ( 9 ) :
>         floor_member.append ( 0 )
>     floor = [ floor_member ]
>     for y in range ( 9 ) :
>         floor.append ( floor_member )

This buils a peculiar structure indeed, 10 items all
referring to the same list object.  Simpler:

floor = [ [0]*10 for x in range(10) ]

and now the anomaly you've observed (and many
others) disappear (this is also faster & more
concise, of course).

If you insist in doing it your way, at least you have
to modify your code so a COPY of floor_member is
used each time rather than the object itself, using
    floor.append(floor_member[:])
as the last statement.


Alex



--
http://mail.python.org/mailman/listinfo/python-list


________________________________________________________________________
________________________________________________________________________

Message: 19
   Date: Fri, 03 Aug 2001 08:05:54 GMT
   From: bokr at accessone.com (Bengt Richter)
Subject: Re: (in)exactness of complex numbers

On Wed, 1 Aug 2001 20:06:06 -0400, "Tim Peters" <tim.one at home.com> wrote:

>[Bengt Richter]
>> ... internals people (of which I'm
>> not one, in case the thought occurred. Not that I wouldn't like to be at
>> some point ;-).
>
>Jump in!  Love to have you.  Try to do something useful, though <wink>.
>
Thanks. I'm all shook up ;-)
I've got a ways to go before I truly grok the implementation though,
and a few other things are pressing, so I can't promise anything
serious for some time, I fear ;-(

--
http://mail.python.org/mailman/listinfo/python-list


________________________________________________________________________
________________________________________________________________________

Message: 20
   Date: 03 Aug 2001 09:07:17 +0100
   From: Pat Knight <pknight at eurologic.com>
Subject: Re: OT: Map generation/plotting

In a previous job I produced a Python script to draw maps using the
CIA world map database. Unfortunately, my previous employer has the
rights to the script so I can't just post it.

However, it didn't take long to write. You can get the data files from
various places on the net (I think we got them from
gatekeeper.dec.com). They're in a well documented format storing
national boundaries, oceans, rivers, lakes etc as sequences of
points. The points use a latitude/longitude encoding. There are open
source C programs that handle the format - these together with the
data documentation should let you write a Python script quite
quickly. I used PIL to generate PNG and JPG versions.

I never did automatic colouring of the maps - an exercise for the
developer? :-)
--
http://mail.python.org/mailman/listinfo/python-list


________________________________________________________________________
________________________________________________________________________

Message: 21
   Date: 3 Aug 2001 10:18:24 MET
   From: delgado at eva17.Mathematik.Uni-Bielefeld.DE (Olaf Delgado)
Subject: Re: 2.2 features

 Tim Hochberg wrote:

>isinstance(anInstance, aClass) => aClass.classof(anInstance)
>isubclass(aSubclass, aBaseclass) => aBaseclass.superclassof(aSubclass)

Not bad! How about
  aClass.has_instance(anInstance)
and
  aBaseclass.has_subclass(aSubclass),
then?

This would resemble dictionary.has_key(...).

Olaf
--
http://mail.python.org/mailman/listinfo/python-list


________________________________________________________________________
________________________________________________________________________

Message: 22
   Date: Fri, 3 Aug 2001 08:30:55 +0100
   From: Robin Becker <robin at jessikat.fsnet.co.uk>
Subject: Re: Language Niches (long)

In article <mailman.996809786.30007.python-list at python.org>, Paul
Prescod <paulp at ActiveState.com> writes
>Rich Holm wrote:
>>
>>...
>>
>> I don't want to start a flame fest, but...
>>
>> Where did you hear this?  It was Borland that popularized the C++
>> on Windows paradym.  Microsoft was WAS behind the curve at the time.
>> The Borland class libraries were/are vastly superior to MFC.  Too
>> bad they lost out in the end.
>
>My impression was that C++ was a relatively unimportant language
>(relative to C) until Microsoft adopted it. That gave it a huge boost
>and essentially forced most C programmers to become C++ programmers.
>
well I have VC++ and it's a pretty good C development environment. I'm
fairly sure it doesn't pass any recognised C tests though. I don't think
anyone's forced by M$ to use C++ and I'm fairly sure C represents a lot
of the internals of Win32.
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list


________________________________________________________________________
________________________________________________________________________

Message: 23
   Date: 03 Aug 2001 10:33:53 +0200
   From: Martin von Loewis <loewis at informatik.hu-berlin.de>
Subject: Re: Unicode File Conversion

Tksee Lhsoh <tksee at yahoo.com> writes:

> I would like to convert unicode strings to strings of a ceratin code
> such as ISO 8859-1 and ISO 8859-2 in Europe, ISO 8859-7 in Greece,
> EUC and Shift-JIS in Japan,...
>
> And would be really glad if there are any converters!

To convert a Unicode string to ISO 8859-1, just do

thestring.encode("iso-8859-1")

The same works for all of ISO 8859; the relevant codecs are supported
in the standard python library. For other codecs, please have a look at

http://sourceforge.net/projects/python-codecs

There are specific codecs for Chinese, Japanese, and Korean encodings
in the practicecodecs CVS directory, and an iconv codec to expose all
codecs of your Unix C library.

Regards,
Martin

--
http://mail.python.org/mailman/listinfo/python-list


________________________________________________________________________
________________________________________________________________________

Message: 24
   Date: 03 Aug 2001 10:37:30 +0200
   From: Martin von Loewis <loewis at informatik.hu-berlin.de>
Subject: Re: https proto module?

krel <krel at is-antisocial.net> writes:

> Is there a module out there to deal with the https (http with an 's' on
the
> end) protocol? I'd love it if there were.

The standard Python httplib module provides a class httplib.HTTPS. It
is only available if the socket module was compiled with OpenSSL.

Regards,
Martin

--
http://mail.python.org/mailman/listinfo/python-list


________________________________________________________________________
________________________________________________________________________

Message: 25
   Date: Fri, 3 Aug 2001 04:02:53 -0500
   From: "Volucris" <volucris at hotmail.com>
Subject: Re: wierd asp problem

I think I heard somewhere that you need to indent your entire script:

<script runat=server language=Python >
    class standard_template:
        br = "<br>"
        textColor   = "black"
        bgColor     = "white"

etc...

Of course, I could be entirely wrong. HTH.

--

Volucris (a) hotmail.com
"Eu não falo uma única palavra do português."

"Scott Hathaway" <scott_hathaway at riskvision.com> wrote in message
news:3b69a492.0 at 216.0.152.7...
> I am trying to use Python (the latest version from ActiveState) with ASP
on
> IIS 5.
>
> Here is the wierd problem I am having.  If I use:
>
> <%@ language=Python %>
> <%
> class standard_template:
>     br = "<br>"
>     textColor   = "black"
>     bgColor     = "white"
>
> etc...
>
> Things work fine.  If I try:
>
> <script runat=server language=Python >
> class standard_template:
>     br = "<br>"
>     textColor   = "black"
>     bgColor     = "white"
>
> etc...
>
> I get:
>
> Error Type:
> Python ActiveX Scripting Engine (0x80020009)
> Traceback (innermost last): IndentationError: expected an indented block
> (line 2)
> /asptemplates/standard_template.asp
>
> I need to use the <script sytax because I need to include this class (and
> use it) from VBScript in ASP.
>
> Any ideas?
>
> Thanks,
> Scott
>
>


--
http://mail.python.org/mailman/listinfo/python-list


________________________________________________________________________
________________________________________________________________________



Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/



_________________________________________________________

Do You Yahoo!?

Get your free @yahoo.com address at http://mail.yahoo.com







More information about the Python-list mailing list