+ 1
Python using string from help()
Using the modules sys and docx I would like to write a script that takes a key word from the command line and writes help(keyword) in a Word document. But help(keyword) does not return a string. Is it possible to access the text from the help function in a script? Help(help) did not help ;-)
3 Answers
+ 5
I think manipulating with standard output might be of a help() here :)
If you can temporarily redirect the output from the screen to a file, will that help in your task?
Check this out:
https://code.sololearn.com/cFwAQNRmqn9G/?ref=app
+ 3
Yes this works, thanks
0
what about using back slash. \ ?