Message237706
At one time, there would not have been any point. https://docs.python.org/3/library/__main__.html#module-__main__ contains this sentence "For a package, the same effect can be achieved by including a __main__.py module, the contents of which will be executed when the module is run with -m.", which was new for 3.0. The .../2/... doc does not as this is a new-in-3.0 feature. Thus, I am surprised by
C:\Users\Terry>py -m idlelib
C:\Programs\Python27\python.exe: No module named idlelib.__main__; 'idlelib' is a package and cannot be directly executed
AFAIK, 2.7 should not even be looking for .__main__.
After I copied idlelib/__main__.py to my 2.7 install and repeated the command line, Idle tried to start, but imports of submodules failed, subprocess connection failed, and the editor was opened for blank numbered files like 'C:/programs/python27/50343'. After that, normal ways of starting Idle also failed similarly. Reinstalling 2.7 (with remnamts of the old idlelib left) did not fix things. The only way I found to restore Idle was to delete 2.7 idlelib/ completely and run Programs and Features (win 7) repair, which restores a fresh copy that works again. I tried again with same results, so I am done experimenting. |
|
Date |
User |
Action |
Args |
2015-03-09 21:19:05 | terry.reedy | set | recipients:
+ terry.reedy, tim.golden, zach.ware, steve.dower, niacdoial |
2015-03-09 21:19:05 | terry.reedy | set | messageid: <1425935945.52.0.996279790661.issue23546@psf.upfronthosting.co.za> |
2015-03-09 21:19:05 | terry.reedy | link | issue23546 messages |
2015-03-09 21:19:05 | terry.reedy | create | |
|