problem opening a file on 2.2a1
Ignacio Vazquez-Abrams
ignacio at openservices.net
Mon Aug 20 14:37:28 EDT 2001
On Mon, 20 Aug 2001, Rajarshi Guha wrote:
> Hi,
> I compiled Python 2.2a1 on RedHat 7.0. When I enter the python
> interpreter from the command line the code:
>
> data = open('data.out','w')
>
> works fine. But when I try it froma script I get the error:
>
> Traceback (most recent call last):
> File "./p.py", line 12, in ?
> data = open('data.out','w')
> TypeError: an integer is required
>
> What am I doing wrong?
> TIA,
> Rajarshi Guha
Are you possibly importing a module that masks the built-in open()?
--
Ignacio Vazquez-Abrams <ignacio at openservices.net>
More information about the Python-list
mailing list