Server IP : 66.29.132.122 / Your IP : 18.226.185.25 Web Server : LiteSpeed System : Linux business142.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64 User : admazpex ( 531) PHP Version : 7.2.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /proc/self/root/proc/self/root/proc/thread-self/root/proc/thread-self/root/opt/alt/python37/lib64/python3.7/idlelib/ |
Upload File : |
"Example extension, also used for testing." from idlelib.config import idleConf ztext = idleConf.GetOption('extensions', 'ZzDummy', 'z-text') class ZzDummy: ## menudefs = [ ## ('format', [ ## ('Z in', '<<z-in>>'), ## ('Z out', '<<z-out>>'), ## ] ) ## ] def __init__(self, editwin): self.text = editwin.text z_in = False @classmethod def reload(cls): cls.ztext = idleConf.GetOption('extensions', 'ZzDummy', 'z-text') def z_in_event(self, event): """ """ text = self.text text.undo_block_start() for line in range(1, text.index('end')): text.insert('%d.0', ztest) text.undo_block_stop() return "break" def z_out_event(self, event): pass ZzDummy.reload() ##if __name__ == "__main__": ## import unittest ## unittest.main('idlelib.idle_test.test_zzdummy', ## verbosity=2, exit=False)