Re: Problems installing/using Python on Linux

Siebren van der Zee (siebren@vdzee.xs4all.nl)
Wed, 11 Jan 95 01:49 MET

In article <3erufj$p27@kernighan.cs.umass.edu> you write:
>I've just installed python 1.1.1 on my linux box, and I noticed the
>following problems:
>
>make test cause a segmentation fault. I noticed that this
>happens int the test_b2.py module in the statement :
>
>pow(x,y,z)

I do not have this problem using Linux 1.0.6 & gcc 2.4.5.

> #! /usr/local/bin/python
> import sys,getopt
> opts, args = getopt.getopt(sys.argv[1:],'q')
> print opts
>
>and then try to execute it like this:
>
> > p.py -q
>
>and got the python interpreter illegal option message. I tried the
>same code at work (under SunOs) and it works fine.
>Any ideas of what is wrong ?

This is a bug in gcc's version of getopt(3). There is a replacement
getopt.c in the Python subdirectory. You should link it in. (Sorry,
I cannot find out how _I_ did it; drop me a note by e-mail if you
need more assistance).

>Benny Rochwerger.

Siebren van der Zee, siebren@xs4all.nl