File Objects

The following methods are supported with the file objects:

 

close()

flush()

fileno()

isatty()

next()

read([size])

readline([size])

readlines([sizehint])

xreadlines()

seek(offset[, whence])

tell()

write(str)

writelines(seq)

 

The following attributes are supported with the file objects:

 

closed

encoding

errors

mode

name

newlines

softspace

 

Note: For product versions 12.xx.xxx.

Root directory for Python scripts and in general for text and binary files is:

/sys

and cannot be changed.

Files path name in Python scripts shall contain the root directory.

Path separator is /.

Example:

f = open('/sys/example.txt', 'rb')

 

From product versions 12.00.xx4 absolute and relative path names have been added.

Root directory for Python scripts and in general for text and binary files is still:

/sys

and cannot be changed.

Files absolute path name (path beginning with /) in Python scripts shall still contain the root directory.

Path separator is /.

Example:

f = open('/sys/example.txt', 'rb')

 

Files relative path name (path not beginning with /) in Python scripts will automatically refer to the root directory /sys and shall not contain it.

Example:

f = open(‘example.txt’, ‘rb’)

 

Note: For product versions 13.xx.xxx.

Root directory for Python scripts and in general for text and binary files is empty and cannot be changed.

Files path name in Python scripts will refer to the empty root directory.

Example:

f = open(‘example.txt’, ‘rb’)

 

Note: For product versions 18.11.004.

Root directory for Python scripts and in general for text and binary files is empty and cannot be changed.

Files path name in Python scripts will refer to the empty root directory.

Example:

f = open(‘example.txt’, ‘rb’)