Changed the Windows startup scripts to guard for '__main__' (all *.pyw). eric7

Tue, 20 Dec 2022 11:09:04 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Tue, 20 Dec 2022 11:09:04 +0100
branch
eric7
changeset 9629
88ac13e691d6
parent 9628
38ea38cb3073
child 9630
4cd6e4b1db12

Changed the Windows startup scripts to guard for '__main__' (all *.pyw).

src/eric7/eric7_browser.pyw file | annotate | diff | comparison | revisions
src/eric7/eric7_compare.pyw file | annotate | diff | comparison | revisions
src/eric7/eric7_configure.pyw file | annotate | diff | comparison | revisions
src/eric7/eric7_diff.pyw file | annotate | diff | comparison | revisions
src/eric7/eric7_editor.pyw file | annotate | diff | comparison | revisions
src/eric7/eric7_hexeditor.pyw file | annotate | diff | comparison | revisions
src/eric7/eric7_iconeditor.pyw file | annotate | diff | comparison | revisions
src/eric7/eric7_ide.pyw file | annotate | diff | comparison | revisions
src/eric7/eric7_plugininstall.pyw file | annotate | diff | comparison | revisions
src/eric7/eric7_pluginrepository.pyw file | annotate | diff | comparison | revisions
src/eric7/eric7_pluginuninstall.pyw file | annotate | diff | comparison | revisions
src/eric7/eric7_qregularexpression.pyw file | annotate | diff | comparison | revisions
src/eric7/eric7_re.pyw file | annotate | diff | comparison | revisions
src/eric7/eric7_shell.pyw file | annotate | diff | comparison | revisions
src/eric7/eric7_snap.pyw file | annotate | diff | comparison | revisions
src/eric7/eric7_sqlbrowser.pyw file | annotate | diff | comparison | revisions
src/eric7/eric7_testing.pyw file | annotate | diff | comparison | revisions
src/eric7/eric7_tray.pyw file | annotate | diff | comparison | revisions
src/eric7/eric7_trpreviewer.pyw file | annotate | diff | comparison | revisions
src/eric7/eric7_uipreviewer.pyw file | annotate | diff | comparison | revisions
src/eric7/eric7_virtualenv.pyw file | annotate | diff | comparison | revisions
--- a/src/eric7/eric7_browser.pyw	Mon Dec 19 19:43:05 2022 +0100
+++ b/src/eric7/eric7_browser.pyw	Tue Dec 20 11:09:04 2022 +0100
@@ -7,6 +7,7 @@
 Module implementing the Windows entry point.
 """
 
-from eric7_browser import main
+if __name__ == "__main__":
+    from eric7_browser import main
 
-main()
+    main()
--- a/src/eric7/eric7_compare.pyw	Mon Dec 19 19:43:05 2022 +0100
+++ b/src/eric7/eric7_compare.pyw	Tue Dec 20 11:09:04 2022 +0100
@@ -7,6 +7,7 @@
 Module implementing the Windows entry point.
 """
 
-from eric7_compare import main
+if __name__ == "__main__":
+    from eric7_compare import main
 
-main()
+    main()
--- a/src/eric7/eric7_configure.pyw	Mon Dec 19 19:43:05 2022 +0100
+++ b/src/eric7/eric7_configure.pyw	Tue Dec 20 11:09:04 2022 +0100
@@ -7,6 +7,7 @@
 Module implementing the Windows entry point.
 """
 
-from eric7_configure import main
+if __name__ == "__main__":
+    from eric7_configure import main
 
-main()
+    main()
--- a/src/eric7/eric7_diff.pyw	Mon Dec 19 19:43:05 2022 +0100
+++ b/src/eric7/eric7_diff.pyw	Tue Dec 20 11:09:04 2022 +0100
@@ -7,6 +7,7 @@
 Module implementing the Windows entry point.
 """
 
-from eric7_diff import main
+if __name__ == "__main__":
+    from eric7_diff import main
 
-main()
+    main()
--- a/src/eric7/eric7_editor.pyw	Mon Dec 19 19:43:05 2022 +0100
+++ b/src/eric7/eric7_editor.pyw	Tue Dec 20 11:09:04 2022 +0100
@@ -7,6 +7,7 @@
 Module implementing the Windows entry point.
 """
 
-from eric7_editor import main
+if __name__ == "__main__":
+    from eric7_editor import main
 
-main()
+    main()
--- a/src/eric7/eric7_hexeditor.pyw	Mon Dec 19 19:43:05 2022 +0100
+++ b/src/eric7/eric7_hexeditor.pyw	Tue Dec 20 11:09:04 2022 +0100
@@ -7,6 +7,7 @@
 Module implementing the Windows entry point.
 """
 
-from eric7_hexeditor import main
+if __name__ == "__main__":
+    from eric7_hexeditor import main
 
-main()
+    main()
--- a/src/eric7/eric7_iconeditor.pyw	Mon Dec 19 19:43:05 2022 +0100
+++ b/src/eric7/eric7_iconeditor.pyw	Tue Dec 20 11:09:04 2022 +0100
@@ -7,6 +7,7 @@
 Module implementing the Windows entry point.
 """
 
-from eric7_iconeditor import main
+if __name__ == "__main__":
+    from eric7_iconeditor import main
 
-main()
+    main()
--- a/src/eric7/eric7_ide.pyw	Mon Dec 19 19:43:05 2022 +0100
+++ b/src/eric7/eric7_ide.pyw	Tue Dec 20 11:09:04 2022 +0100
@@ -7,6 +7,7 @@
 Module implementing the Windows entry point.
 """
 
-from eric7_ide import main
+if __name__ == "__main__":
+    from eric7_ide import main
 
-main()
+    main()
--- a/src/eric7/eric7_plugininstall.pyw	Mon Dec 19 19:43:05 2022 +0100
+++ b/src/eric7/eric7_plugininstall.pyw	Tue Dec 20 11:09:04 2022 +0100
@@ -7,6 +7,7 @@
 Module implementing the Windows entry point.
 """
 
-from eric7_plugininstall import main
+if __name__ == "__main__":
+    from eric7_plugininstall import main
 
-main()
+    main()
--- a/src/eric7/eric7_pluginrepository.pyw	Mon Dec 19 19:43:05 2022 +0100
+++ b/src/eric7/eric7_pluginrepository.pyw	Tue Dec 20 11:09:04 2022 +0100
@@ -7,6 +7,7 @@
 Module implementing the Windows entry point.
 """
 
-from eric7_pluginrepository import main
+if __name__ == "__main__":
+    from eric7_pluginrepository import main
 
-main()
+    main()
--- a/src/eric7/eric7_pluginuninstall.pyw	Mon Dec 19 19:43:05 2022 +0100
+++ b/src/eric7/eric7_pluginuninstall.pyw	Tue Dec 20 11:09:04 2022 +0100
@@ -7,6 +7,7 @@
 Module implementing the Windows entry point.
 """
 
-from eric7_pluginuninstall import main
+if __name__ == "__main__":
+    from eric7_pluginuninstall import main
 
-main()
+    main()
--- a/src/eric7/eric7_qregularexpression.pyw	Mon Dec 19 19:43:05 2022 +0100
+++ b/src/eric7/eric7_qregularexpression.pyw	Tue Dec 20 11:09:04 2022 +0100
@@ -7,6 +7,7 @@
 Module implementing the Windows entry point.
 """
 
-from eric7_qregularexpression import main
+if __name__ == "__main__":
+    from eric7_qregularexpression import main
 
-main()
+    main()
--- a/src/eric7/eric7_re.pyw	Mon Dec 19 19:43:05 2022 +0100
+++ b/src/eric7/eric7_re.pyw	Tue Dec 20 11:09:04 2022 +0100
@@ -7,6 +7,7 @@
 Module implementing the Windows entry point.
 """
 
-from eric7_re import main
+if __name__ == "__main__":
+    from eric7_re import main
 
-main()
+    main()
--- a/src/eric7/eric7_shell.pyw	Mon Dec 19 19:43:05 2022 +0100
+++ b/src/eric7/eric7_shell.pyw	Tue Dec 20 11:09:04 2022 +0100
@@ -7,6 +7,7 @@
 Module implementing the Windows entry point.
 """
 
-from eric7_shell import main
+if __name__ == "__main__":
+    from eric7_shell import main
 
-main()
+    main()
--- a/src/eric7/eric7_snap.pyw	Mon Dec 19 19:43:05 2022 +0100
+++ b/src/eric7/eric7_snap.pyw	Tue Dec 20 11:09:04 2022 +0100
@@ -7,6 +7,7 @@
 Module implementing the Windows entry point.
 """
 
-from eric7_snap import main
+if __name__ == "__main__":
+    from eric7_snap import main
 
-main()
+    main()
--- a/src/eric7/eric7_sqlbrowser.pyw	Mon Dec 19 19:43:05 2022 +0100
+++ b/src/eric7/eric7_sqlbrowser.pyw	Tue Dec 20 11:09:04 2022 +0100
@@ -7,6 +7,7 @@
 Module implementing the Windows entry point.
 """
 
-from eric7_sqlbrowser import main
+if __name__ == "__main__":
+    from eric7_sqlbrowser import main
 
-main()
+    main()
--- a/src/eric7/eric7_testing.pyw	Mon Dec 19 19:43:05 2022 +0100
+++ b/src/eric7/eric7_testing.pyw	Tue Dec 20 11:09:04 2022 +0100
@@ -7,6 +7,7 @@
 Module implementing the Windows entry point.
 """
 
-from eric7_testing import main
+if __name__ == "__main__":
+    from eric7_testing import main
 
-main()
+    main()
--- a/src/eric7/eric7_tray.pyw	Mon Dec 19 19:43:05 2022 +0100
+++ b/src/eric7/eric7_tray.pyw	Tue Dec 20 11:09:04 2022 +0100
@@ -7,6 +7,7 @@
 Module implementing the Windows entry point.
 """
 
-from eric7_tray import main
+if __name__ == "__main__":
+    from eric7_tray import main
 
-main()
+    main()
--- a/src/eric7/eric7_trpreviewer.pyw	Mon Dec 19 19:43:05 2022 +0100
+++ b/src/eric7/eric7_trpreviewer.pyw	Tue Dec 20 11:09:04 2022 +0100
@@ -7,6 +7,7 @@
 Module implementing the Windows entry point.
 """
 
-from eric7_trpreviewer import main
+if __name__ == "__main__":
+    from eric7_trpreviewer import main
 
-main()
+    main()
--- a/src/eric7/eric7_uipreviewer.pyw	Mon Dec 19 19:43:05 2022 +0100
+++ b/src/eric7/eric7_uipreviewer.pyw	Tue Dec 20 11:09:04 2022 +0100
@@ -7,6 +7,7 @@
 Module implementing the Windows entry point.
 """
 
-from eric7_uipreviewer import main
+if __name__ == "__main__":
+    from eric7_uipreviewer import main
 
-main()
+    main()
--- a/src/eric7/eric7_virtualenv.pyw	Mon Dec 19 19:43:05 2022 +0100
+++ b/src/eric7/eric7_virtualenv.pyw	Tue Dec 20 11:09:04 2022 +0100
@@ -7,6 +7,7 @@
 Module implementing the Windows entry point.
 """
 
-from eric7_virtualenv import main
+if __name__ == "__main__":
+    from eric7_virtualenv import main
 
-main()
+    main()

eric ide

mercurial