I would like to save the output of the python help() function to a file eg the output of
>>> help("modules")

amongst others i used
modfile = open("env:.P_ModList","w")
mods = help("modules")
print >>modfile , mods
modfile.close()

to no avail. Is there a solution?

Hi Vegaseat,

I did put the code in Outputjelp.py and got the errormessages

11.Amiga OS 4:System/Python/Scripts> python Outputhelp.py
Traceback (most recent call last):
File "Outputhelp.py", line 18, in <module>
process = subprocess.Popen(test, shell=True, stdout=subprocess.PIPE)
File "PYTHON:Lib/subprocess.py", line 594, in __init__
errread, errwrite)
File "PYTHON:Lib/subprocess.py", line 1010, in _execute_child
self._set_cloexec_flag(errpipe_write)
File "PYTHON:Lib/subprocess.py", line 973, in _set_cloexec_flag
old = fcntl.fcntl(fd, fcntl.F_GETFD)
IOError: [Errno 78] Function not implemented
11.Amiga OS 4:System/Python/Scripts>

It seems some function is missing I suppose it is fcntl. Maybe it is called wrongly for AOS4 ?

Help on module fcntl:

NAME
fcntl

FILE
python:lib/lib-dynload/fcntl.so

DESCRIPTION
This module performs file control and I/O control on file
descriptors. It is an interface to the fcntl() and ioctl() Unix
routines. File descriptors can be obtained with the fileno() method of
a file or socket object.

FUNCTIONS
fcntl(...)

This question has already been answered. Start a new discussion instead.