Python help(csv) error
John Rickman (71) 646 posts |
Using python 3.8 in a taskwindow I get an error when trying to get help on the external module csv. (it works ok on the mac). The csv module itself works as expected. dir(csv) also works.
In my case this leads to:- SyntaxError: invalid or missing encoding declaration for ‘SCSI::SSD.$.Apps.Development.!Python3.python38.lib.lib-dynload._csv’ |
Andrew McCarthy (3688) 605 posts |
Help in the form dir( object ) or help( object.method ) is only useful on Python3.10. That’s been my experience with Python on RISC OS. |
John Rickman (71) 646 posts |
Help in the form dir( object ) or help( object.method ) is only useful on Python3.10 I have tested help(module) for all the modules listed in 3.8. That is the standard modules and extra ones that Chris J supplied, ie riscos, pip, swi etc and youtube_dl, and pygame. |
Andrew McCarthy (3688) 605 posts |
On RISC OS
On Linux
Python3.10 on RISC OS gives the same result as Python on Linux. John, are we seeing the same thing? |
John Rickman (71) 646 posts |
Andrew, yes I see the same as you for help(list.extend) using 3.8
I am not using 3.10 yet – still recovering from the shock of 2.7 to 3.8 transition. If you do the following in 3.10 what do you get?
|
Andrew McCarthy (3688) 605 posts |
On both versions, I get the same result except for any detailed messages in Python3.8. If I enter help(csv.writer), the results are what you’d expect. If I type help(csv), I encounter error messages. |
Andrew McCarthy (3688) 605 posts |
A bit more on this.
Also, I haven’t gone into any depth, as I’m learning Python, but the module appears to work. Tested with code from here |
John Rickman (71) 646 posts |
Bug in Python3.8 Help system This much is true:-
I have ‘fixed’ the problem by replacing ‘utf-8’ by ‘ISO8859-1’ in the python module tokenize. now:
|
John Rickman (71) 646 posts |
This much is also true
|