-
Notifications
You must be signed in to change notification settings - Fork 851
Cleanup unsupported python code (except for adodbapi) #1990
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 35 commits
30f43b8
5a9fa22
03400f1
c843fdb
3e0dbf5
9b7eb37
a9e5428
dd4eee6
a4c5c68
0d96ceb
172ac3b
52f14cd
88289d2
09f2456
bd4bd3b
3fb1140
503b62e
8246c1d
1b9d623
5d59f04
0672e24
a00aba5
62a7a29
c756342
c2991b3
73d5963
0a17531
9545e62
a4f02f6
2b338a7
15ea614
e804bb7
337d9cc
7510c94
0ecc5ab
0ed39d0
611bef2
44c3a53
6b60a57
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -400,8 +400,8 @@ def OnButHomePage(self, id, code): | |
| ) | ||
|
|
||
|
|
||
| def Win32RawInput(prompt=None): | ||
| "Provide raw_input() for gui apps" | ||
| def Win32Input(prompt=None): | ||
| "Provide input() for gui apps" | ||
| # flush stderr/out first. | ||
| try: | ||
| sys.stdout.flush() | ||
|
|
@@ -416,22 +416,10 @@ def Win32RawInput(prompt=None): | |
| return ret | ||
|
|
||
|
|
||
| def Win32Input(prompt=None): | ||
| "Provide input() for gui apps" | ||
| return eval(input(prompt)) | ||
|
|
||
|
|
||
| def HookInput(): | ||
| try: | ||
| raw_input | ||
| # must be py2x... | ||
| sys.modules["__builtin__"].raw_input = Win32RawInput | ||
| sys.modules["__builtin__"].input = Win32Input | ||
| except NameError: | ||
| # must be py3k | ||
| import code | ||
| import code | ||
|
|
||
| sys.modules["builtins"].input = Win32RawInput | ||
| sys.modules["builtins"].input = Win32Input | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. did you actually test this?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
import code
sys.modules["builtins"].input = Win32RawInputwas the only code that can run.
The concept of raw input vs regular input doesn't exist in python 3. So the name didn't make sense anymore. So I removed the old unused
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yeah, thanks, I understood the intent - I was just wondering if you actually checked that, eg,
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
|
||
|
|
||
| def HaveGoodGUI(): | ||
|
|
@@ -442,7 +430,8 @@ def HaveGoodGUI(): | |
| def CreateDefaultGUI(appClass=None): | ||
| """Creates a default GUI environment""" | ||
| if appClass is None: | ||
| from . import intpyapp # Bring in the default app - could be param'd later. | ||
| # Bring in the default app - could be param'd later. | ||
| from . import intpyapp | ||
|
Avasam marked this conversation as resolved.
Outdated
|
||
|
|
||
| appClass = intpyapp.InteractivePythonApp | ||
| # Create and init the app. | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,7 +6,8 @@ Pythonwin. In ALL cases, the files in this directory that also appear | |
| in the main IDLE directory should be indentical to the latest available | ||
| for IDLE. | ||
|
|
||
| Eg, If you have Python 1.5.2 installed, the files in this | ||
| <!-- TODO: Is this still accurate? --> | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this should be reworded to reflect something like "if the files in this directory are newer than the ones shipped with your Python version" or similar.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure how I would integrate that text. If they are newer, then what? The current text seems to imply that this directory was based on IDLE from a specific python version (>3.7). What I'm not sure about, is whether saying that Python 3.8 is the version it's based on is accurate. Or if I'm even understanding this message correctly. Also by "later" does this text mean "newer" ?
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This comment was trying to reflect that the files in this dir also exist in IDLE, but may have been released as part of pywin32 before a Python release was made. So yeah, I guess this entire readme can now just say something like "these files have been forked from IDLE" or similar.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok. I have pushed a wording change suggestion that should not fall out of date. |
||
| Eg, If you have Python 3.7 installed, the files in this | ||
| directory will be later than the IDLE versions. If you use IDLE from | ||
| the CVS sources, then the files should be identical. | ||
|
|
||
|
|
||



Uh oh!
There was an error while loading. Please reload this page.