2017-05-25 6:34 GMT+02:00 Marco Beri <[email protected]>: > Il 25 mag 2017 05:41, "Karim" <[email protected]> ha scritto: > 2017-05-25 9:17 GMT+10:00 Karim <[email protected]>: >> >> Sono riuscito a risolvere usando 'imp' anche se e' deprecated. > Rettifico. Non mi funziona. > Il cambio del label anche non funziona. :-(
> Karim, > immagino che anche questo tu l'abbia già provato e non funzioni, vero? > https://stackoverflow.com/a/6032023 Che è una reimplementazione del consiglio di Andrea D'Amore, che _dovrebbe_ funzionare. >>> open("calendar.py", "w").close() >>> import calendar >>> calendar <module 'calendar' from '/tmp/calendar.py'> >>> import sys >>> del sys.modules["calendar"] # questo serve solo perché l'ho già importato >>> del sys.path[0] >>> import calendar >>> calendar <module 'calendar' from '/usr/lib/python3.6/calendar.py'> Ciao, ㎝ -- |:**THE 🍺-WARE LICENSE** *(Revision ㊷)*: | <miron@🐍.it> wrote this mail. As long as you retain this | notice you can do whatever you want with this stuff. | If we meet some day, and you think this stuff is worth it, | you can buy me a 🍺 in return. —㎝ _______________________________________________ Python mailing list [email protected] http://lists.python.it/mailman/listinfo/python
