[issue42541] Tkinter colours wrong on MacOS universal2
Kevin Walzer added the comment: Ned, I wish I knew. Marc and I are both now members of the TCT, and have had a few conversations around the release schedule, but the release schedule is more or less determined when one or two senior members of the TCT decide things are ready. We had some momentum toward an RC of 8.6.11 a few months ago, but that seems to have stalled out. -- ___ Python tracker <https://bugs.python.org/issue42541> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue42541] Tkinter colours wrong on MacOS universal2
Kevin Walzer added the comment: This bug is not present in IDLE 3.9.0 when built against the tip of Tk core-8-6-branch. Marc Culler has done some work to fix the visual artifacts, and the work continues. The problem here is that Apple's API churn continually breaks parts of Tk with each new OS release, and there is large amount of work just to keep things working reasonably. -- nosy: +wordtech ___ Python tracker <https://bugs.python.org/issue42541> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue42225] Tkinter hangs or crashes when displaying astral chars
Kevin Walzer added the comment: Some work has been done this year on expanding support for these types of glyphs in Tk, but I'm not sure of its current state--it's not my area of expertise. Can you open a ticket at https://core.tcl-lang.org/tk/ so one of the folks working on this can take a look? -- ___ Python tracker <https://bugs.python.org/issue42225> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38440] Possible new issues with IDLE
Kevin Walzer added the comment: On macOS, Tk 8.6.8 is considered ancient, even obsolete, on 10.14 or later. Tk has required huge re-work to accommodate changes in the Mac's drawing API's on 10.14, mostly done by Marc Culler; these issues are not observable with the current tip of 8.6 development and IDLE 3.7.4. An RC of 8.6.10 has just gone out and we are anticipating the final release by Nov. 21, which includes too many changes to enumerate here. In any case, it should be considerably more stable than what is being reported. -- ___ Python tracker <https://bugs.python.org/issue38440> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34455] Tkinter crashing when pressing Command + ^ (OSX)
Kevin Walzer added the comment: We have committed some fixes to the keyboard code in the past year that seem to have fixed this issue. I do not see it in 8.6.10, now as a RC. I believe this bug is obsolete at this point. -- ___ Python tracker <https://bugs.python.org/issue34455> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37833] tkinter crashes macOS in the latest macOS update 10.14.6
Kevin Walzer added the comment: Hard to say what is going on without knowing more about the specific version of Tk (not just 8.6, but 8.6.8? 8.6.9?). -- ___ Python tracker <https://bugs.python.org/issue37833> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue32129] Icon on macOS
Kevin Walzer added the comment: Is there any reason not to commit the patch I submitted to address this issue?As an alternative I can submit a high-res PNG that can be used, and will submit a different patch to incorporate it, which would work from either the standard app bundle or the command line. Either way, there is no reason to continue to have this visual artifact in IDLE on the Mac. -- ___ Python tracker <https://bugs.python.org/issue32129> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue32129] Icon on macOS
Kevin Walzer added the comment: Making the icon 512x512 pixels will make it look correct on Retina displays on the Mac. -- ___ Python tracker <https://bugs.python.org/issue32129> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue35485] Mac: tkinter windows turn black while resized
Kevin Walzer added the comment: http://core.tcl.tk/tk/tktview?name=ef9c3730e3 has some useful information on this from the Tk side. -- ___ Python tracker <https://bugs.python.org/issue35485> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue35485] Mac: tkinter windows turn black while resized
Kevin Walzer added the comment: Cannot reproduce this with the tip of Tk core-8-6-branch on Mojave and IDLE 3.7.1. Window appears normal and no flickering when resizing. -- ___ Python tracker <https://bugs.python.org/issue35485> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue35387] Dialogs on IDLE are accompanied by a small black window
New submission from Kevin Walzer : The "About IDLE" and "Preferences" dialogs on IDLE are accompanied by a small black window titled "idle" when IDLE is run agains the tip of Tk 8.6 on macOS 10.14. This is likely owing to the multiple changes in Tk to accommodate the Mac's API changes on Mojave. I suspect the dialog's [wm transient] implementation is part of the issue; the parent windows for the dialog are not hidden when run against the Tk tip, and thus they have this ugly display. Hopefully the fix is not too complicated. -- assignee: terry.reedy components: IDLE messages: 330945 nosy: terry.reedy, wordtech priority: normal severity: normal status: open title: Dialogs on IDLE are accompanied by a small black window versions: Python 3.7 ___ Python tracker <https://bugs.python.org/issue35387> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34370] Tkinter scroll issues on macOS
Kevin Walzer added the comment: Release of Tk 8.6.9 very soon; includes fixes for Mac scrolling as well as support for 10.14 macOS, with Dark Mode. -- ___ Python tracker <https://bugs.python.org/issue34370> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34956] _tkinter built on macOS 10.14 does not link to Tcl and Tk in /Library/Frameworks
Kevin Walzer added the comment: Thank you, this helped. -- ___ Python tracker <https://bugs.python.org/issue34956> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34956] 3.7.0 _tkinter module links against /System/Library/Frameworks
New submission from Kevin Walzer : I'm trying to build Python 3.7.0 on macOS 10.14, and Tkinter is not linking to my installation of Tcl/Tk 8.6.8 in /Library/Frameworks. Instead it is linking to the ancient 8.5 Tk installed in /System/Library/Frameworks. My usual way of forcing Python to link to my installation is to edit setup.py and comment out all search directories except /Library/Frameworks, but that seems to be ignored here. My basic invocation is "./configure --enable-framework" which, along with omitting the system libraries from setup.py, has always been sufficient in the past. Please advise. -- components: macOS messages: 327508 nosy: ned.deily, ronaldoussoren, wordtech priority: normal severity: normal status: open title: 3.7.0 _tkinter module links against /System/Library/Frameworks versions: Python 3.7 ___ Python tracker <https://bugs.python.org/issue34956> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
Python on 10.14 Mojave
I'm trying to build Python 3.7.0 on macOS 10.14, and Tkinter is not linking to my installation of Tcl/Tk 8.6.8 in /Library/Frameworks. Instead it is linking to the ancient 8.5 Tk installed in /System/Library/Frameworks. My usual way of forcing Python to link to my installation is to edit setup.py and comment out all search directories except /Library/Frameworks, but that seems to be ignored here. Is there any other way to link to the correct frameworks? -- Kevin Walzer Code by Kevin http://www.codebykevin.com -- https://mail.python.org/mailman/listinfo/python-list
[issue34864] In Idle, Mac tabs make editor status line disappear.
Kevin Walzer added the comment: The behavior outlined in the screenshot is, I believe, a component of the native Cocoa window that underlies Tk; it cannot be controlled or accessed from Tk. It's probably better to avoid altogether or re-implement somehow in IDLE. -- ___ Python tracker <https://bugs.python.org/issue34864> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34370] Tkinter scroll issues on macOS
Kevin Walzer added the comment: Ned, please hold off a bit on this--another developer is doing some final fine-tuning of the scrolling code so it fully passes Tk's test suite. I'm waiting for the final commit of this code any day now. -- status: pending -> open ___ Python tracker <https://bugs.python.org/issue34370> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34370] Tkinter scroll issues on macOS
Kevin Walzer added the comment: I just committed http://core.tcl.tk/tk/info/26a029b4a88ff97f, which fixes the scrolling issue in Tk. Running the test scripts here indicate the behavior is now correct; clicking several pixels below the bottom part of the scroll button causes the scroll to jump, instead of smoothly scrolling. (One must click the scroll button directly for smooth scrolling, which is the expected behavior.) The fix involved removing support for a small scroll button variant, which was causing the confusion; by sticking with a single variant, the normal size scroller, the behavior is correct and consistent. -- ___ Python tracker <https://bugs.python.org/issue34370> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34313] IDLE crashes with Tk-related error on macOS with ActiveTcl 8.6
Kevin Walzer added the comment: The crash reported by the OP did show up at times in recent releases of Tk 8.6.x, but a lot of work went into refactoring memory management in 8.6.8 and those problems do not seem present in the current release (8.6.7 is a year old). I'd try updating to 8.6.8 and seeing if that fixes things. -- ___ Python tracker <https://bugs.python.org/issue34313> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34275] Problems with tkinter and tk8.6 on MacOS
Kevin Walzer added the comment: Tal, your proposed revisions to the patch work fine. It's harmless to leave the older calls to MacWindowStyle there. New patch attached. -- Added file: https://bugs.python.org/file47726/calltips_w-2.diff ___ Python tracker <https://bugs.python.org/issue34275> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34120] IDLE: Freeze when closing Settings (& About) dialog on MacOS
Kevin Walzer added the comment: Removing the call "self.grab_set" in configdialog.py (line 87 or so) and help_about.py (line 47 or so) appears to fix the problem with the main window freezing when the modal dialog is destroyed on macOS. "Grab" has never worked properly on Tk on the Mac, but it has additional problems in the Cocoa implementation of Tk; it causes all kinds of problems with the event loop and is best avoided altogether. If the call to grab is crucial on other platforms, it can be wrapped in a call to "tk windowingsystem ne aqua" to exclude the Mac. If other modal dialogs present similar behavior on the Mac, look for calls to grab and try omitting that call. I'll leave it to someone else to propose a thorough patch, but this should point you in the right direction. -- ___ Python tracker <https://bugs.python.org/issue34120> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34275] Problems with tkinter and tk8.6 on MacOS
Kevin Walzer added the comment: With the attached patch, the calltip now displays in the test in calltips_w.py on macOS. As I suspected, a judicious call to "update" forces the event loop to cycle on macOS. It should be harmless on other platforms, but if it causes some sort of performance slowdown, it can be wrapped in a call to "tk windowingsystem" eq "aqua" (not sure how to implement that in this module) so it only runs on the Mac. I also removed the platform call to "MacWindowStyle" as it is no longer needed on recent versions of the Mac. -- keywords: +patch Added file: https://bugs.python.org/file47725/calltip_w.diff ___ Python tracker <https://bugs.python.org/issue34275> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34120] IDLE: Freeze when closing Settings (& About) dialog on MacOS
Kevin Walzer added the comment: I've observed this behavior myself, and wonder if you are hitting some edge case in Tk-Mac event processing (there used to be a lot of issues with this and we thought we had addressed them). I don't want to code-dive into Python's implementation of these dialogs, so can you provide a simple script that demonstrates the issue and I'll take a closer look? Often bugs of this sort can be addressed at the script level with some tweaks. -- nosy: +wordtech ___ Python tracker <https://bugs.python.org/issue34120> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34275] Problems with tkinter and tk8.6 on MacOS
Kevin Walzer added the comment: Please provide a short working Python script that reproduces the problem. Also, please point me to the internal implementation of tooltips in idlelib. Tooltips work just fine on Tk on the Mac, but there are many different ways to implement them and I suspect Python's implementation can likely be tweaked. It also may be related to event handling. -- nosy: +wordtech ___ Python tracker <https://bugs.python.org/issue34275> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34047] IDLE: on macOS, scroll slider 'sticks' at bottom of file
Kevin Walzer added the comment: Not able to reproduce this issue using a recent build of Tk 8.6.8 plus (it's been a little while since I pulled the latest updates from core-8-6-branch, but is recent enough). Similar behavior was reported on Tk a couple of years ago but has been fixed; I closed https://core.tcl.tk/tk/tktview/1875c1f30f2d17230a3d6e8fc7c85d244e80b922 to indicate this. -- nosy: +wordtech ___ Python tracker <https://bugs.python.org/issue34047> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
Re: Linux/Windows GUI programming: GUI-fy a CLI using pyInstaller
On 1/1/18 11:45 AM, X. wrote: Ulli Horlacher: I have to transfer a python 2.7 CLI programm into one with a (simple) GUI. The program must run on Linux and Windows and must be compilable with pyinstall, because I have to ship a standalone windows.exe Any kind of installer is not acceptable. Reading https://github.com/pyinstaller/pyinstaller/wiki/Supported-Packages supported GUI packages are PyGTK, PyQt4, PyQt5, wxPython I have tested tkinter by myself and it works, too. I do not like GTK and Qt, because they are too complex. I want to do VERY simple things and I prefer a simple GUI toolkit :-) me too ! Try easygui: https://pypi.python.org/pypi/easygui -- Kevin Walzer Code by Kevin/Mobile Code by Kevin http://www.codebykevin.com http://www.wtmobilesoftware.com -- https://mail.python.org/mailman/listinfo/python-list
[issue32129] Icon on macOS
Kevin Walzer <wordt...@users.sourceforge.net> added the comment: Adding proposed patch. -- keywords: +patch Added file: https://bugs.python.org/file47293/pyshell.diff ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue32129> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue32129] Icon on macOS
Kevin Walzer <wordt...@users.sourceforge.net> added the comment: wm_iconphoto is a no-op on Tk 8.5 on MacOS; the C function returns true with no action. That's why this has not cropped up before. As implemented, the command on macOS only takes the first image in the parameters to use; the Cocoa mechanism in use for displaying images as app icons does not pack multiple sizes in the image. This will be documented in the man page for the next release of Tk. That's why the image currently looks very bad, because, as you note, it's scaling up a 16px image. The 48px would look better, albeit a bit jagged. The attached patch proposes to simply bypass this call in Tk-Mac. The wm_iconphoto command is most useful for a) replacing a generic Windows or X11 icon with something more customized or b) displaying a change in application state. On Mac OS, option is already addressed by the bundled application icon that looks much more polished; most users will not be calling idle from the command line (where this call can make sense). Option b is not applicable in this context. -- ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue32129> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue32129] Icon on macOS
New submission from Kevin Walzer <wordt...@users.sourceforge.net>: The trunk and 8.6.7 branch of Tk on macOS have recently implemented the wm_iconphoto command, which had not previously been supported on macOS. This means that versions of IDLE that link to this version of Tk will inherit the iconphoto behavior on Windows and X11, which results in a extremely blurry icon image in the Dock. It would probably be best to make this command conditional on macOS to just retain the standard app icon, or else add a sharper image. -- assignee: terry.reedy components: IDLE files: Screen Shot 2017-11-24 at 11.44.31 PM.png messages: 306941 nosy: terry.reedy, wordtech priority: normal severity: normal status: open title: Icon on macOS type: behavior Added file: https://bugs.python.org/file47288/Screen Shot 2017-11-24 at 11.44.31 PM.png ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue32129> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
Re: Python application launcher (for Python code)
On 2/19/17 10:01 PM, Deborah Swanson wrote: I could probably write this myself, but I'm wondering if this hasn't already been done many times. Anyone have some git links or other places to download from? What do you mean by "application launcher"? It's not more complicated than "python my script.py." Run your console of choice on any platform that supports Python. -- Kevin Walzer Code by Kevin/Mobile Code by Kevin http://www.codebykevin.com http://www.wtmobilesoftware.com -- https://mail.python.org/mailman/listinfo/python-list
Re: PyDictObject to NSDictionary
On 2/2/17 6:30 PM, Charles Heizer wrote: Hello, I'm embedding python in to my Objective-C app and I need to know how do I convert a PyDictObject (PyObject) to a NSDictionary? Thanks! Does the PyObjC library provide any support for this? It allows integration between the Cocoa API's and Python. --Kevin -- Kevin Walzer Code by Kevin/Mobile Code by Kevin http://www.codebykevin.com http://www.wtmobilesoftware.com -- https://mail.python.org/mailman/listinfo/python-list
Re: Label behavior's difference between tkinter and ttk
In general, the "img.config" syntax is suitable for the classic Tk widgets, not the themed ttk widgets. They have a very different (and very gnarly) syntax for indicating changed state. I am not inclined to see a bug here. -- Kevin Walzer Code by Kevin/Mobile Code by Kevin http://www.codebykevin.com http://www.wtmobilesoftware.com -- https://mail.python.org/mailman/listinfo/python-list
Re: Can't load Tkinter in embedded Python interpreter on Windows
Adding PySys_SetArgv(argc, argv); did the trick. -- Kevin Walzer Code by Kevin/Mobile Code by Kevin http://www.codebykevin.com http://www.wtmobilesoftware.com -- https://mail.python.org/mailman/listinfo/python-list
Can't load Tkinter in embedded Python interpreter on Windows
I am trying to build a stub exe on Windows that embeds Python and launches my Tkinter app. I want a full-blown exe program starter because the various Python freezing tools (py2exe, pyinstaller) do not work to my satisfaction with Python 3.5. I am able to get the executable built but I cannot get it to load Tkinter and run. The current error is: "AttributeError: module 'sys' has no attribute 'argv'" when called from the Tkinter init method. Here is my command-line invocation for the compiler: --- gcc quickwho.c -I \C:\Users\kevin\AppData\Local\Programs\Python\Python35\include -LC:\Users\kevin\AppData\Local\Programs\Python\Python35\libs -LC:\Users\kevin\AppData\Local\Programs\Python\Python35\DLLs -lShlwapi -lpython35 -o quickwho.exe And here is my C stub launcher: #include #include #include #include #include int main(int argc, char *argv[]) { Py_SetProgramName(argv[0]); Py_Initialize(); TCHAR exedir [MAX_PATH]; #if 0 GetModuleFileName(NULL, exedir, MAX_PATH); _tprintf("%s/n", exedir); PathRemoveFileSpec(exedir); _tprintf("%s/n", exedir); #endif /*Get the module's full path, and set to the current working directory.*/ if (!GetModuleFileName(NULL, exedir, MAX_PATH)) { TCHAR errmsg[512]; FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM,0, GetLastError(),0,errmsg,1024,NULL); _tprintf( TEXT("The path is %s, and the error is %s/n"), exedir, errmsg ); } if (!PathRemoveFileSpec(exedir)) { TCHAR errmsg[512]; FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM,0, GetLastError(),0,errmsg,1024,NULL); _tprintf( TEXT("The target dir is %s, and the error is %s/n"), exedir, errmsg ); } if (!SetCurrentDirectory(exedir)) { TCHAR errmsg[512]; FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM,0, GetLastError(),0,errmsg,1024,NULL); _tprintf( TEXT("The working dir is %s, and the error is %s/n"), exedir,errmsg ); } PyRun_SimpleString("exec(open(\"QuickWho.py\").read())"); Py_Finalize(); return 0; } Can anyone suggest what I might do to get Tkinter to load and run my exe? Thanks, Kevin -- Kevin Walzer Code by Kevin/Mobile Code by Kevin http://www.codebykevin.com http://www.wtmobilesoftware.com -- https://mail.python.org/mailman/listinfo/python-list
Re: GitHub's “pull request” is proprietary lock-in
On 1/2/16 11:43 PM, Ben Finney wrote: That and other vendor-locked workflow aspects of GitHub makes it a poor choice for communities that want to retain the option of control over their processes and data. The Tcl community has moved to Fossil with great success: http://www.fossil-scm.org Lightweight DCVS, integrated bug tracking, rock-solid code (authored by D. Richard Hipp, uses SQLite as its store). The transition was non-trivial: the Tcl core developers had to move over a decade of commit history from CVS at Sourceforge to Fossil, which they did, successfully. One of the reasons Fossil was chosen is exactly this: to maintain the code independent of a third-party platform. (At the time of the transition, in 2011, Sourceforge was removing support for CVS, they had a server outage for over a week, and other issues were giving the community pause on continuing to use SF for hosting.) I'm not a hardcore Git user so have no substantive opinions on the merits of Git or Github per se: I have a Github account and have contributed code via pull requests to projects hosted on it. But I found learning Fossil very simple. And using Fossil does not preclude mirroring the codebase in Git; there is a Tcl/Tk mirror at Github. Just a thought. --Kevin -- Kevin Walzer Code by Kevin/Mobile Code by Kevin http://www.codebykevin.com http://www.wtmobilesoftware.com -- https://mail.python.org/mailman/listinfo/python-list
Re: pyinstaller and Python 3.5 on Windows?
On 11/18/15 5:46 PM, Ulli Horlacher wrote: ImportError: DLL load failed: The specified module could not be found. Is there a solution available? I understand that Python 3.5 has shipped how the MS dll's from Visual Studio are shipped, and perhaps the freezing tools (pyinstaller, py2exe) haven't yet caught up. Consider filing a bug with the pyinstaller developers. --Kevin -- Kevin Walzer Code by Kevin/Mobile Code by Kevin http://www.codebykevin.com http://www.wtmobilesoftware.com -- https://mail.python.org/mailman/listinfo/python-list
[issue24570] IDLE Autocomplete and Call Tips Do Not Pop Up on OS X with ActiveTcl 8.5.18
Kevin Walzer added the comment: I experimented with Mark's sample code (thanks for that, BTW), and found that the window with the help tag applied would display with this simple addition: raise .t I believe the equivalent call in Tinter is lift(), because raise() is for error handling? Perhaps someone can experiment with appropriate calls to lift() in the relevant sections of IDLE. The help style is excluded from becoming a frontmost window by default in OS X. Here is the relevant code in tkMacOSXWm.c: - (BOOL) canBecomeKeyWindow { TkWindow *winPtr = TkMacOSXGetTkWindow(self); return (winPtr winPtr-wmInfoPtr (winPtr-wmInfoPtr-macClass == kHelpWindowClass || winPtr-wmInfoPtr-attributes kWindowNoActivatesAttribute)) ? NO : YES; } Therefore, an explicit call to raise may be helpful in displaying the window. I realize that such calls are not present in the current IDLE code, and did not seem to be required previously--there likely was some change in recent Tk-Cocoa commits in event loop handling, memory management, window display, and drawing that caused this new bug to crop up. Tracking the actual source of the bug at the C level is likely to prove very difficult because there have been so many changes. However, since the fix at the script level is trivial, I do not think a major effort is necessary to step through the code at the C level. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24570 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
Re: Which GUI?
On 7/24/15 4:11 PM, Cecil Westerhof wrote: Top-posting is (rightly) frowned upon in this group. Could you use inline posting next time? Meta is definitely NOT discouraged on this list, but it should be. Nothing like derailing an interesting thread with lectures on where to post. And someone will chime in with a diatribe against Google groups...wait for it...wait for it... To address the OP's query, I recommend Tkinter. Plays very nicely with C and C++. --Kevin -- Kevin Walzer Code by Kevin/Mobile Code by Kevin http://www.codebykevin.com http://www.wtmobilesoftware.com -- https://mail.python.org/mailman/listinfo/python-list
Re: beginners choice: wx or tk?
On 7/11/15 10:48 AM, Laura Creighton wrote: Unless I was misinformed 2 weeks or so ago when I asked, that is the problem. Tcl/Tk 8.6 works (and is shipped with) OSX, but tkinter and idle don't work with it. We will see what Ned Deily says when he gets around to reading this. You were misinformed. Tkinter has worked fine with Tk 8.6 for a long time. The issues with Tk on the Mac, owing to Apple's force migration of GUI libraries to Cocoa, have finally been more or less resolved, and Tk 8.6.4 is now quite stable on OS X. --Kevin -- Kevin Walzer Code by Kevin/Mobile Code by Kevin http://www.codebykevin.com http://www.wtmobilesoftware.com -- https://mail.python.org/mailman/listinfo/python-list
[issue24570] IDLE Autocomplete and Call Tips Do Not Pop Up on OS X with ActiveTcl 8.5.18
Kevin Walzer added the comment: Where in the IDLE source code tree is this code housed? Is it possible to provide a Python script that reproduces the issue? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24570 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
Re: GUI toolkit(s) status
On 11/22/14, 3:59 AM, wxjmfa...@gmail.com wrote: TeXLive (since 2014, if I'm not wrong) has a GUI installer and package manager, I recognized a tcl/tk/tkinter-like - Perl tool and contrary to Python it works. That's Perl-Tk, which, as I said, is still around, but only runs on Windows and X11/Linux--no native Mac Port. And it hasn't been updated in years, it does not take advantage of recent advances in Tk. -- Kevin Walzer Code by Kevin/Mobile Code by Kevin http://www.codebykevin.com http://www.wtmobilesoftware.com -- https://mail.python.org/mailman/listinfo/python-list
Re: GUI toolkit(s) status
On 11/20/14, 4:04 AM, Christian Gollwitzer wrote: Apple is a moving target, they pulled the rug from under Tk's feet twice over the past 10 years. Nobody knows if Tk will continue to exist on the mac if Cocoa is withdrawn some day and replaced by a new and completely different windowing framework. There is indeed a lack of manpower and expertise for Tk/Mac: I'm pretty much it, except when someone submits a patch to scratch a specific itch. Apple has introduced Swift as a new systems language, but (as I understand it) the intent is to supersede Objective-C as a language, not the Cocoa frameworks per se. So I think the risk of a brand-new windowing system replacing Cocoa (and thus requiring yet another new implementation of Tk) is pretty small. There may be a larger risk with newer API's being expressed mainly in Swift, which would require conversion to Objective-C for legacy codebases, but that is a smaller hurdle to clear. --Kevin -- Kevin Walzer Code by Kevin/Mobile Code by Kevin http://www.codebykevin.com http://www.wtmobilesoftware.com -- https://mail.python.org/mailman/listinfo/python-list
Re: GUI toolkit(s) status
On 11/20/14, 11:34 PM, Terry Reedy wrote: A possible solution for Tk is to replace the non-C Tcl parts of TK with Python (or the CPython API functions as needed for speed). I have no idea how horrendous a project creating Py/Tk would be. It would be very horrendous. See Perl/Tk as the example. They ripped out the Tcl interpreter and interfaced directly with Tk's C API. The result was a rigid, inflexible binding that was never ported to the Mac (because it required a C implementation) and could never be easily updated to take advantage of new features in Tk, because again it required a C implementation. Perl-Tk still exists, but more modern bindings like ActiveState's Tkx module have restored the Tcl interpreter, giving you access to all Tk advances and platforms for free. Apart from the ease of updating Tk features, from a design standpoint I think this is the right call. There may be a little extra overhead in having an extra interpreter embedded, but that is what Tcl was originally designed for: embedding. It handles this requirement more easily and with less pain than most languages. I think that's why Tk became the default GUI binding of choice for other scripting languages. --Kevin -- Kevin Walzer Code by Kevin/Mobile Code by Kevin http://www.codebykevin.com http://www.wtmobilesoftware.com -- https://mail.python.org/mailman/listinfo/python-list
Re: OS X Menubar in Tkinter
On 10/21/14, 1:58 AM, Mark Lawrence wrote: I'm pleased to see that you have an answer. In return would you please access this list via https://mail.python.org/mailman/listinfo/python-list or read and action this https://wiki.python.org/moin/GoogleGroupsPython to prevent us seeing double line spacing and single line paragraphs, thanks. And admonitions of this type should be taken to comp.misc.propernntpformatting or groups.google.com/propergroupsformatting. They are OT for a list devoted to the Python programming language. I'd rather see flame wars over indenting vs. curly braces than this kind of constant policing of folks who come to us via Google: they greatly increase the noise I have to filter out. -- Kevin Walzer Code by Kevin/Mobile Code by Kevin http://www.codebykevin.com http://www.wtmobilesoftware.com -- https://mail.python.org/mailman/listinfo/python-list
Re: Python 3.4.1 installer on Mac links Python to old Tcl/Tk
On 10/3/14, 3:55 PM, Ned Deily wrote: Even if there were no incompatibilities, on OS X with Tcl and Tk (and other) frameworks, the version number is embedded in the path to the shared library and the linker normally creates an absolute path at that. Is this because Python lacks the concept of stubs? A Tcl library compiled for 8.5 can be loaded into 8.6 with no re-compiling required because of stubs. -- Kevin Walzer Code by Kevin/Mobile Code by Kevin http://www.codebykevin.com http://www.wtmobilesoftware.com -- https://mail.python.org/mailman/listinfo/python-list
Re: Python 3.4.1 installer on Mac links Python to old Tcl/Tk
On 10/1/14, 7:51 AM, Peter Tomcsanyi wrote: Ned Deily n...@acm.org wrote in message news:nad-d2ddcb.14070824062...@news.gmane.org... The easiest option would be a downloadable package that would allow the default python.org 8.5-linked _tkinter to be overridden with an 8.6 version. There may be some news on that front in the near future. It's October... So I tried Python 3.4.2rc1 and it seems that it still links to Tk 8.5 on Mac. Does it mean that there is no plan to link to Tk 8.6 in Python 3.4.2 on Mac? Or is there something that can override 8.5 to 8.6 as you wrote? The solution here is to build Python and Tcl/Tk yourself, in the versions you want, and then things should work just fine. -- Kevin Walzer Code by Kevin/Mobile Code by Kevin http://www.codebykevin.com http://www.wtmobilesoftware.com -- https://mail.python.org/mailman/listinfo/python-list
Re: Tcl/Tk alpha channel bug on OSX Mavericks is fixeded, but how/when can I use the fix?
On 8/4/14, 5:40 AM, Peter Tomcsanyi wrote: Kevin Walzer k...@codebykevin.com wrote in message news:lrmc0r$suj$1...@dont-email.me... New releases of Tcl/Tk 8.5 and 8.6 are due out soon; right now they are undergoing final testing as betas/release candidates. Thanks for the promising news. Where should I look for the announcement that there is something new? Is this the correct place? http://sourceforge.net/projects/tcl/files/Tcl/ You can check comp.lang.tcl for an announcement. But will be the 8.5. branch updated, too? I need 8.5 because CPython on Mac does not yet use 8.6... I cannot see there 8.5.15.1 (at least that is how ActiveTcl is numbered) which solved some oter Mavericks issues in October 2013 (all 8.5. files are older than October 2013)... So will be there a 8.5.16? 8.5 and 8.6 will be updated. you can download the source tarballs for Tcl and Tk when they are released, untar them to a specific directory, cd to the directory, and run these commands: make -C $insert_tcl_dirname_here/macosx make -C $insert_tk_dirname_here/macosx and then sudo make -C $insert_tcl_dirname_here/macosx install sudo make -C $insert_tk_dirname_here/macosx install I have some command line skills and I have the command line developer tools installed (is that enough?), but I am not sure if I understand which directory's name is $insert_tcl_dirname_here (I suppose that the $ sign belongs to the name of the variable, am I right?). Is it the directory where I unterd tcl (and which is under the directory where i cd-ed to)? $insert_tcl_dirname = something like tcl8.5.16. Just look at the numbering. In other words, you want a directory with two subdirectories: tcl8.5.16 and tk8.5.16 (since you are looking at 8.5). This will install the updated version of Tcl and Tk in /Library/Frameworks, and Python should pick them up. Well, should... I will try. But when I followed a similar procedure of installing the tkpng package then after sudo make install it seemed to be ok, but it was apparently added to other version of Tk than CPython is using... Can somebody else confirm or disconfirm that the above procedure will install the new Tcl/Tk to that place where CPython (that is already installed) will pick it from? Or do I need to reinstall CPython after this? Or...? Where is your current installation of Python? The above instructions assume that you are using the standard Python from python.org. As I mentioned before, if you have installed things via a package manager (brew, Fink or MacPorts) you will have to follow their instructions. --Kevin -- Kevin Walzer Code by Kevin/Mobile Code by Kevin http://www.codebykevin.com http://www.wtmobilesoftware.com -- https://mail.python.org/mailman/listinfo/python-list
Re: Will IronPython / WPF work on Mac OS X?
On 8/4/14, 8:17 AM, danwgr...@gmail.com wrote: Hello, I am thinking of using IronPython to build an Python application. Using WPF in Visual Studio to draw the GUI and create the XAML. Can I then run this Python application on a Mac OS X (10.8)? Thanks. IronPython is a Windows-only product, I believe...doesn't it run on top of .NET? I don't see how it would work on the Mac unless it also worked with Mono. -- Kevin Walzer Code by Kevin/Mobile Code by Kevin http://www.codebykevin.com http://www.wtmobilesoftware.com -- https://mail.python.org/mailman/listinfo/python-list
Re: Tcl/Tk alpha channel bug on OSX Mavericks is fixeded, but how/when can I use the fix?
On 8/3/14, 1:24 PM, Peter Tomcsanyi wrote: I think that it is because of this problem in Mavericks: http://core.tcl.tk/tk/tktview?name=99b84e49ff The above link says that it has been solved in Tcl/Tk. But: what does it mean for me - a Python user? Can anyone say when a version containing the above bug fix will be available in a form of an installable package that I can use with Python on a Mac? How can I know that such a package is avaibale? Or can anyone point me to some instructions how could I compile Tcl/Tk for myslef and (more importanty) how to install the result of that compilation so that Python 3.4 recognizes that it should use that package (and not three other installations of Tcl/Tk in my computer)? New releases of Tcl/Tk 8.5 and 8.6 are due out soon; right now they are undergoing final testing as betas/release candidates. If you are using the standard Python installer from Python.org, then you can wait for ActiveTcl to be updated (not sure of their release schedule) or you can download the source tarballs for Tcl and Tk when they are released, untar them to a specific directory, cd to the directory, and run these commands: make -C $insert_tcl_dirname_here/macosx make -C $insert_tk_dirname_here/macosx and then sudo make -C $insert_tcl_dirname_here/macosx install sudo make -C $insert_tk_dirname_here/macosx install This will install the updated version of Tcl and Tk in /Library/Frameworks, and Python should pick them up. These instructions assume you have Apple's developer tools installed and are at least minimally comfortable using the command line. If you have installed Python via some other process, cf. MacPorts or Homebrew, you'll have to wait until they pick up the new versions of Tcl and Tk and follow their instructions for upgrading. Hope this helps, Kevin -- Kevin Walzer Code by Kevin/Mobile Code by Kevin http://www.codebykevin.com http://www.wtmobilesoftware.com -- https://mail.python.org/mailman/listinfo/python-list
Re: Python 3 is killing Python
RIck, On 7/17/14, 2:15 PM, Rick Johnson wrote: Sadly, all of my calls to improve IDLE have been meet with rebukes about me whining. The powers that be would wise to*UTILIZE* and*ENCOURAGE* my participation instead of *IGNORING* valuable talent and*IMPEDING* the expansion of this private boys club. A bit late to this, I suppose... Where are your patches? Can you point me to anywhere at the Python bug tracker where they can be found? I'll highlight the two major patches I've submitted over the past few years: http://bugs.python.org/issue15853 http://bugs.python.org/issue6075 One fixed a pretty bad crash on the Mac, and the other optimized IDLE's Mac port to adjust to some API changes in Tk because of a switch in the native back end (Carbon to Cocoa). In both cases I posted an e-mail or two to the relevant mailing list (IDLE-dev and MacPython) to provide a head-up about the patch, answer questions, and so on--but that was it. No major calls to improve IDLE, just some code that DID improve IDLE. The powers that be didn't commit the patches right away, and not without some modification and testing, but they eventually did commit them, and the outcome satisfied my intention in submitting the patches in the first place. Both of these patches addressed issues that made IDLE pretty much un-usable for me. Obviously a crash will do this, but also, when I switched my installation of Tk from the Carbon-backed one to the Cocoa-backed one, there were lots of little glitches because of subtle differences in how Cocoa did things. I suppose I simply could have filled the mailing lists with complaints that these things were Big Problems for me and Someone Should Do Something About Them, but there was no guarantee that someone would pick up the challenge. Fortunately, I had the knowledge, skills and time to submit patches that were sufficiently developed that the relevant Python maintainers could take them, apply them, modify slightly as required, test them, and then commit them. This did ensure that Something Would Be Done about my issue, because the Person Who Did Something About It was me. I know you are proficient in both Python and Tkinter, as I've noted from the helpful advice you give Tkinter newbies on the list from time to time, and so I'm sure you have the skill set to put together some patches that address specific points of pain for you. And despite the disagreement that others may register with you in these threads from time to time, I'm quite confident that useful patches will be gratefully accepted, even if not immediately. --Kevin -- Kevin Walzer Code by Kevin/Mobile Code by Kevin http://www.codebykevin.com http://www.wtmobilesoftware.com -- https://mail.python.org/mailman/listinfo/python-list
Re: .Net Like Gui Builder for Python?
On 7/25/14, 10:55 AM, Orochi wrote: Hi, This Question may sound lame ,but I am searching for .Net Like Gui Builder for Python. I tried PyQt Designer' and 'Glade', No doubt its great but it created only interface. I have to code all the things in separate file. what I was searching for is Visual Studio .Net like Gui builder where you drag and drop widgets and just double click on the widget to edit code of that widget.All other formalities of creating a function and class for the main window and widget(e.g Button) is already done. So,Is there any Gui App builder like Visual Studio or having features like Visual Studio for Python. Thank You! I'm not sure which GUI framework you use, but Tkinter is so simple to code in directly that you don't really need a UI builder. Give that a try. --Kevin -- Kevin Walzer Code by Kevin/Mobile Code by Kevin http://www.codebykevin.com http://www.wtmobilesoftware.com -- https://mail.python.org/mailman/listinfo/python-list
Re: Python 3 is killing Python
On 7/15/14, 9:00 AM, Chris Angelico wrote: The problem isn't Python 2, nor Python 3, nor even the fact that there are two Pythons. The problem is that a lot of people don't understand when to choose one or the other, don't understand what the promises of support are, and (perhaps worst of all) keep hearing FUD about how Python 3 is killing Python. And so the confusion perpetuates. Eventually the world will get past that, but in the meantime, we have to deal with these sorts of storms-in-teacups from people who simply cannot comprehend what's going on. I think it's more than a tempest in a teacup. The number of language revisions that result in deliberate, code-level incompatibility out there is pretty small. People rightly expect that code written for version 2.x of a language will continue to work with version 3.x, even if 3.x is designed to go in another direction. I can only think of two widely used languages in the last decade where there was this type of major break in binary compatibility: Perl and Visual Basic. Perl 6 is kind of a moot point because it's never shipped (insert reference to Duke Nukem or GNU HURD here, as appropriate), and Perl 5 has not just seen continued development, but invigorated development in recent years. But the example of VB is instructive. VB.NET is similar, but not identical, to classic VB, and as far as I am aware its uptake has not been nearly as wide as classic VB. Microsoft was able to force what limited migration we've seen mainly because VB is not open source and they can simply drop support for it from Windows. I've stayed with Python 2.7 because I've seen no benefit in 3.x that outweighs the hassle of going through my code line by line to make it compatible. As a Mac developer I deal with this kind of code/API churn with each release of Mac OS X, and I have no desire to increase my headaches. Though I expect I will eventually update to 3.x, however, like many other developers I am also annoyed by the decision to break backwards compatibility in Python. The decision strikes me as arrogant. Cruft and backwards compatibility are an inevitable part of any mature programming language, and maintaining compatibility is important--more important than bolting on shiny new features, in my view. If shiny new features must be added, they should be added side-by-side with older API's. I think the Python developers have undervalued the conservator part of their role. Yes, they have provided tools to help application and library developers migrate their code, but it should not be incumbent on third-party developers to re-architect stable, working code simply because the language has broken binary compatibility. Defenders of the 3.x migration portray such developers as laggards, but I see Python 3.x's failure to silently and successfully import 2.x code as a failure on the language's end. I won't go so far as to say that Python 3 is killing Python. Python will survive. But the headaches of migration are substantial, and should not be necessary. --Kevin -- Kevin Walzer Code by Kevin/Mobile Code by Kevin http://www.codebykevin.com http://www.wtmobilesoftware.com -- https://mail.python.org/mailman/listinfo/python-list
Re: Python 3 is killing Python
Top posting is the practice of responding to an e-mail thread by putting your response at the top of the text you are quoting. It's standard practice in the corporate world... On 7/15/14, 6:13 PM, Abhiram R wrote: a) What is top post? ...but Unix/newsgroup ettiquette says that it's gauche to do this, because it presents an unacceptable cognitive burden to the user trying to catch the context of the thread by forcing them to read your reply first, before they read the preceding quoted comments. --Kevin -- Kevin Walzer Code by Kevin/Mobile Code by Kevin http://www.codebykevin.com http://www.wtmobilesoftware.com -- https://mail.python.org/mailman/listinfo/python-list
Re: Python 3 is killing Python
On 7/15/14, 6:38 PM, Mark Lawrence wrote: I did see your correction but it gave me an opportunity to mention google groups, something that just can't be missed If the newgroup had a filter to trim out complaints about Google groups, half the traffic would be gone. :-) -- Kevin Walzer Code by Kevin/Mobile Code by Kevin http://www.codebykevin.com http://www.wtmobilesoftware.com -- https://mail.python.org/mailman/listinfo/python-list
Re: Mac python py2app problem
On 7/15/14, 9:56 PM, Nicholas Cannon wrote: Hey i have made an app and i have made a .msi for windows with py2exe and i have also exported it with py2app on mac. No problems here they all work fine. I then put the .msi on sourceforge and it works great but when i put the .app on there and download it it says something like i can open this on old architecture or something so i have to put it through google drive and i dont like this like i share the link and folder and people can download it there but it is dodgy. Could someone please help me out like if there is a .msi type thing for mac with py2exe? It's hard to make sense of what you are asking for. Can you just zip up the app bundle that py2app produces and upload it that way? That works for many developers. --Kevin -- Kevin Walzer Code by Kevin/Mobile Code by Kevin http://www.codebykevin.com http://www.wtmobilesoftware.com -- https://mail.python.org/mailman/listinfo/python-list
Re: Python 3.4.1 installer on Mac links Python to old Tcl/Tk
On 6/25/14, 1:49 AM, wxjmfa...@gmail.com wrote: I can also add, tcl or tk or tkinter (8.6) is on Windows quite buggy. In fact, simply*unusable*. How so? Please report bugs at http://core.tcl.tk/tcl/reportlist or http://core.tcl.tk/tk/reportlist, as needed. --Kevin -- Kevin Walzer Code by Kevin/Mobile Code by Kevin http://www.codebykevin.com http://www.wtmobilesoftware.com -- https://mail.python.org/mailman/listinfo/python-list
Re: Event handling for COM object with win32com (pywin32)
On 6/22/14, 5:15 AM, peter.balazo...@emspin.com wrote: Do I miss something in code or incorrectly handling the events or COM Object? There is a pywin32 mailing list that may be able to offer more help here. -- Kevin Walzer Code by Kevin/Mobile Code by Kevin http://www.codebykevin.com http://www.wtmobilesoftware.com -- https://mail.python.org/mailman/listinfo/python-list
Re: OT: This Swift thing
On 6/3/14, 4:43 PM, Sturla Molden wrote: Are Python apps still banned from AppStore, even if we bundle an interpreter? Python apps are not banned from the App Store. See https://itunes.apple.com/us/app/quickwho/id419483981?mt=12. -- Kevin Walzer Code by Kevin/Mobile Code by Kevin http://www.codebykevin.com http://www.wtmobilesoftware.com -- https://mail.python.org/mailman/listinfo/python-list
Re: the Gravity of Python 2
On 1/8/14, 9:30 AM, Mark Lawrence wrote: But to be serious why not stick with 2.x if there's no compelling reason to move? Whatever happened to if it ain't broke, don't fix it? And before anyone says anything please don't start on about the bytes versus string debate, I'm fairly certain that there are a substantial number of application areas that don't run into these problems. +1 to this. I haven't updated my Python apps to 3.x because there's nothing in 3.x that offers benefits to my users. I deal with constant API churn as a Mac developer. I have no interest in adding to this complexity and headaches by switching from 2.x to 3.x. I imagine I'll update someday, but not anytime soon. --Kevin -- Kevin Walzer Code by Kevin/Mobile Code by Kevin http://www.codebykevin.com http://www.wtmobilesoftware.com -- https://mail.python.org/mailman/listinfo/python-list
Re: GUI:-please answer want to learn GUI programming in python , how should i proceed.
On 12/15/13, 5:06 PM, Chris Angelico wrote: Yeah, but there's a difference between passing your GUI incantations on to a library function (written in C but now just part of a binary library) and feeding them to a completely different language interpreter. When I write something with PyGTK, I can't, even in theory, give it arbitrary C code to execute. From what I understand here, that *is* true of Tcl, which means that the Python download contains a Python interpreter and a Tcl interpreter. I'm not saying that's a bad thing to do, but it is calculated to provoke remark. Yes, a Tkinter app has both a Python interpreter and an underlying Tcl interpreter. Let's be clear about that. The technical reason for this is that, during Python's early development, Tk was the simplest, most powerful and OSS-friendly GUI toolkit out there (compared to, let's say, Motif). Its reliance on Tcl was a plus because Tcl's C API is exceptionally clean and easy to embed/call from other C libraries (that was Tcl's original main focus, embedding in C). Embedding the Tcl interpreter remains a sound decision today. It makes it trivial to keep Tkinter updated in sync with Tk updates, since the Tcl interpreter does most of the heavy lifting. The recent effort to wrap Tk's new themed widgets is a good one: nearly all of the work was done at the Python level. Compare this approach to Perl's original one, which stripped out Tcl and implemented Tk integration entirely in C. Any updates require heavy lifting in C and, in fact, Perl/Tk has not kept up with Tk's main line of development (it does not run natively on the Mac, for instance). Calling through Tkinter to Tcl also provides some other conveniences. If you're writing a Tkinter app and want to access some platform-specific functionality that requires C calls, that may require a library extension written against Tcl/Tk's C API (i.e. the Mac's NSServices API--that can't be accessed using ctypes because it hooks into the window server). Fortunately, Tk is very easy to extend in C--much simpler than extending wxWidgets or Qt. Finally, Tcl is itself a fully-featured, general programming language that is a peer to Python both generationally and in terms of its capabilities; the main way it lags is in the size of its development community. In other words, you are not handing the ball off to a 90-pound weakling if you need to call into Tcl from Python via Tkinter. ;-) --Kevin -- Kevin Walzer Code by Kevin/Mobile Code by Kevin http://www.codebykevin.com http://www.wtmobilesoftware.com -- https://mail.python.org/mailman/listinfo/python-list
Re: GUI:-please answer want to learn GUI programming in python , how should i proceed.
On 12/16/13, 10:20 AM, Chris Angelico wrote: Having made a tweak to gitk at one point, I have to say Tcl is definitely inferior to Python. Without starting a flame war, can you elaborate? I'm curious about your perspective. (I studied PSL--Python as a Second Language--so develop in it with a slight accent. I'm a native Tcl developer, for better or worse.) --Kevin -- Kevin Walzer Code by Kevin/Mobile Code by Kevin http://www.codebykevin.com http://www.wtmobilesoftware.com -- https://mail.python.org/mailman/listinfo/python-list
Re: Packaging a proprietary Python library for multiple OSs
On 12/5/13, 10:50 AM, Michael Herrmann wrote: On Thursday, December 5, 2013 4:26:40 PM UTC+1, Kevin Walzer wrote: On 12/5/13, 5:14 AM, Michael Herrmann wrote: If your library and their dependencies are simply .pyc files, then I don't see why a zip collated via py2exe wouldn't work on other platforms. Obviously this point is moot if your library includes true compiled (C-based) extensions. As I said, I need to make my *build* platform-independent. Giving this further thought, I'm wondering how hard it would be to roll your own using modulefinder, Python's zip tools, and some custom code. Just sayin'. --Kevin -- Kevin Walzer Code by Kevin/Mobile Code by Kevin http://www.codebykevin.com http://www.wtmobilesoftware.com -- https://mail.python.org/mailman/listinfo/python-list
Re: Packaging a proprietary Python library for multiple OSs
On 12/5/13, 5:14 AM, Michael Herrmann wrote: Even though I am not generating an EXE, I am using py2exe to obtain the distributable Zip file for my library. This hack is very convenient, as py2exe allows me to simply say which packages I require and does the work of performing a dependency analysis of the required libraries for me. py2exe automatically generates the Zip file with my (compiled) library code, and all dependencies. If your library and their dependencies are simply .pyc files, then I don't see why a zip collated via py2exe wouldn't work on other platforms. Obviously this point is moot if your library includes true compiled (C-based) extensions. --Kevin -- Kevin Walzer Code by Kevin/Mobile Code by Kevin http://www.codebykevin.com http://www.wtmobilesoftware.com -- https://mail.python.org/mailman/listinfo/python-list
Re: Packaging a proprietary Python library for multiple OSs
On 12/5/13, 10:50 AM, Michael Herrmann wrote: As I said, I need to make my *build* platform-independent. cx_Freeze is platform independent, but I'm not sure if it generates libraries or simply executables. --Kevin -- Kevin Walzer Code by Kevin/Mobile Code by Kevin http://www.codebykevin.com http://www.wtmobilesoftware.com -- https://mail.python.org/mailman/listinfo/python-list
Re: Getting the Appdata Directory with Python and PEP?
On 11/26/13, 5:49 PM, Eamonn Rea wrote: Maybe this module is of some use to you: https://pypi.python.org/pypi/appdirs It provides a unified Python API to the various OS specific 'user' directory locations. Irmen I saw this, but I wanted to do it myself as I stated in the OP:) This module appears to simply use hard-coded paths on Unix/Linux and OS X--not much to learn there, except which paths to code. --Kevin -- Kevin Walzer Code by Kevin/Mobile Code by Kevin http://www.codebykevin.com http://www.wtmobilesoftware.com -- https://mail.python.org/mailman/listinfo/python-list
Re: Suggest an open-source issue tracker, with github integration and kanban boards?
On 11/13/13, 7:46 AM, Alec Taylor wrote: Started to build this on my own; then was like, hang on! - This is probably something very commonly requested… Can you recommend an open source project (or two) written in Python; which covers multi project + sub project issue tracking linked across github repositories? [on the github side, want to be able to reference commit hash solved by patch from issue #; fine to have that extra annotation only present on my server] Also would be perfect if it has kanban board support, issue prioritisation and distribution/assignment amongst team members; as well as related analytics. Thanks for all suggestions! =) Not written in Python, but Fossil (http://www.fossil-scm.org/) offers an all-in-one, lightweight DCVS/issue-tracking/wiki/blog package. Written the author of SQLite. --Kevin -- Kevin Walzer Code by Kevin/Mobile Code by Kevin http://www.codebykevin.com http://www.wtmobilesoftware.com -- https://mail.python.org/mailman/listinfo/python-list
Re: Will Python 3.x ever become the actual standard?
On 10/23/13 7:57 AM, duf...@gmail.com wrote: Years have passed, and a LARGE number of Python programmers has not even bothered learning version 3.x. That's true for me. My own projects run just fine with 2.7. I have no specific issue with 3.x, nor phobia of it, but my time as a developer is limited, and I'd rather use it to add features to my apps using the stable base of 2.7 rather than go through the headaches of modifying my codebase to accommodate the differences with 3.x. This is something that's On My List to Do Someday, but right now there's no real upside to it for my apps. As long as 2.7 is supported, I'll probably continue to use it. --Kevin -- Kevin Walzer Code by Kevin/Mobile Code by Kevin http://www.codebykevin.com http://www.wtmobilesoftware.com -- https://mail.python.org/mailman/listinfo/python-list
Re: Screenshots in Mac OS X
On 10/22/13 4:15 PM, Pratik Mehta wrote: Anyone there to help me out??? import os os.system('screencapture', 'foo.png') -- Kevin Walzer Code by Kevin/Mobile Code by Kevin http://www.codebykevin.com http://www.wtmobilesoftware.com -- https://mail.python.org/mailman/listinfo/python-list
Re: Screenshots in Mac OS X
On 10/22/13 6:08 PM, Kevin Walzer wrote: On 10/22/13 4:15 PM, Pratik Mehta wrote: Anyone there to help me out??? import os os.system('screencapture', 'foo.png') ...and see 'man screencapture' for options. I leave setting up a Tkinter GUI with proper key bindings as an exercise for the reader. -- Kevin Walzer Code by Kevin/Mobile Code by Kevin http://www.codebykevin.com http://www.wtmobilesoftware.com -- https://mail.python.org/mailman/listinfo/python-list
Re: Screenshots in Mac OS X
On 10/22/13 8:19 PM, Pratik Mehta wrote: Hey Kevin, Thanks for reverting. I know about the screencapture function and the parameters available. But, how would I take the user input, as in, that is just command-line, as soon as I execute the program, it will take whatever kind of parameter is passed under screencapture. I want that, in the same program, if the user presses Shift+Command+3, whole screenshot should be taken. When, Shift + Command + 4 is pressed, a particular frame should be displayed to select the area / region. Also, I want to create my own command : Shift + Command + 5 == this is specially for web browser, whenever I press this key on any of the web-page, the whole web page should be grabbed along with its snapshot, and snapshot's filename should be web-page's url which I am currently on. Also, this process should be executing at the backend, so that, whenever these keys are pressed, it overrides the system's functionality and uses mine. There are no simple answers to these questions. With Tkinter, it's possible to code a basic UI and bind combinations of specific keys to trigger specific callbacks, which can fire specific sequences of arguments to the screencapture CLI tool. That's the quick and dirty way. I'm not going to write this code for you. Look at TkDocs.com and effbot's site for an introduction to Tkinter. If you are not looking for a GUI app to do this, but some sort of system-level daemon, that requires a lower level of coding. You'll need to look at such system frameworks as CoreGraphics and Cocoa to find the API's you need. PyObjC (Python binding to Cocoa) can probably be helpful here. Frankly, I'm not sure Python is the best tool here, but if you go this route, you want a Python API that hews as closely to the system-level calls as possible, and PyObjC will likely be your best path here. --Kevin -- Kevin Walzer Code by Kevin/Mobile Code by Kevin http://www.codebykevin.com http://www.wtmobilesoftware.com -- https://mail.python.org/mailman/listinfo/python-list
Re: Sexism in the Ruby community: how does the Python community manage it?
On 10/16/13 11:13 PM, Owen Jacobson wrote: 3. How can we reach out to the Ruby community and help *them* get past the current crop of gender issues, and help them as a group to do better next time? The Ruby community seems to be a singular example of brogrammer culture: mostly young men, lots of drinking, lots of sex humor, extreme work intensity, arrogant intelligence, and a tendency to view women as people to get laid with, and a distinct lack of experience with working with women as equals or superiors. It's frat life transplanted to startup culture. I have no idea why this seems so endemic in the Ruby community; it probably has something to do with the huge popularity of Rails and the resurgence of tech startups over the past several years: both have created a gold rush environment that has attracted huge numbers of young programmers with technical chops but who are shockingly undeveloped in other ways. It's immature men meeting an immature business environment (i.e., a startup) without procedures in place to set an appropriate tone. Such behavior in most other fields would get them fired so fast it would make their heads spin, if not getting them drummed out of the field altogether. I suspect that Python doesn't have these problems because it's an older, more established language, and the community is comprised of older and more mature individuals who have outgrown such shenanigans, or never embraced them in the first place. Python has grown steadily but never had the boom that Ruby on Rails had. I'm sure the Python community has its issues with institutionalized sexism, not least because computer fields in general have so few women, but I have seen no evidence of the overt, sexist hostility that pervades brogrammer culture. As to what the Python community can do, I'm not sure what, apart from calling out the idiot brogrammers who perpetuate such hostility to women, and refusing to associate with it. The real opportunity to address this lies with the startup founders and executives who tolerate this kind of behavior, and don't send its perpetuators packing. Losing a job because you're a sexist jerk might get you thinking about the importance of treating all people with respect. If you're a startup founder who tolerates such behavior because you're afraid of losing your developers to other companies, then you're a coward; and if you simply don't see a problem with such behavior or deny that it exists, then you are worse than a coward, and you are worse than a jerk. Let me reiterate: the overt sexism and hostility toward women that emanates from brogrammer culture is shocking to anyone who works in a more established field with a better balance between men and women. I've worked in marketing, editing, technical writing, and development, and at no place I have ever worked would such behavior be greeted with anything but immediate termination. Even the software startup I worked at did not have such issues; while the developers were all men, the company was founded by a husband-and-wife team, and the women who worked there (in technical writing and sales support) were treated with respect, because the founder would not tolerate anything else. It would be great to see more leaders at big tech companies speak out against such garbage. What impact would it have if Larry Page, Mark Zuckerberg, Marissa Meyer, and others say, If you do that crap here, you won't be here? Or what if venture capitalists said, We won't fund you if you don't provide an equitable work environment that puts jerks out on their rear end. Nothing short of some hard, painful experience is likely to have a large-scale change on the sexist culture that pervades so much of tech. A bit off-topic perhaps, for which I apologize, but I've been following the whole sexism in tech subject with increasing disgust and dismay, and I wanted to strongly protest against it. --Kevin -- Kevin Walzer Code by Kevin/Mobile Code by Kevin http://www.codebykevin.com http://www.wtmobilesoftware.com -- https://mail.python.org/mailman/listinfo/python-list
Re: Sexism in the Ruby community: how does the Python community manage it?
On 10/17/13 6:11 PM, Chris Angelico wrote: On Fri, Oct 18, 2013 at 8:50 AM, Kevin Walzer k...@codebykevin.com wrote: I've worked in marketing, editing, technical writing, and development, and at no place I have ever worked would such behavior be greeted with anything but immediate termination. That's all very well, but what if these gems were created, not by someone at work (where termination is possible), but by a single guy at home (and I mean single in two senses here)? He's not going to lose his job over it - at least, I *hope* he wouldn't get fired for what he did on his own time - so where's the incentive going to come from? ChrisA Well, putting the package name on an official List of Asshattery is a good start. --Kevin -- Kevin Walzer Code by Kevin/Mobile Code by Kevin http://www.codebykevin.com http://www.wtmobilesoftware.com -- https://mail.python.org/mailman/listinfo/python-list
Re: Python GUI?
On 9/11/13 4:55 PM, eamonn...@gmail.com wrote: Tkinter -- Simple to use, but limited With the themed widget introduced in Tk 8.5, Tkinter is now a peer to the other GUI toolkits in most respects, surpasses them in some (canvas widget), and lags behind in just two areas: printing (several platform-specific solutions but no cross-platform API) and HTML display (a few extensions but no standard widget set). I've stayed with Tkinter because it fits my brain the best. Old complaints about it being ugly or limited no longer hold water. --Kevin -- Kevin Walzer Code by Kevin/Mobile Code by Kevin http://www.codebykevin.com http://www.wtmobilesoftware.com -- https://mail.python.org/mailman/listinfo/python-list
Re: Simple Python script as SMTP server for outgoing e-mails?
On 8/1/13 10:15 AM, Gilles wrote: I already have a static IP, so the issue is more that remote MTAs might not accept connections from MTAs running on users' PC instead of ISP's. For what it's worth, that hasn't been my experience. -- Kevin Walzer Code by Kevin/Mobile Code by Kevin http://www.codebykevin.com http://www.wtmobilesoftware.com -- http://mail.python.org/mailman/listinfo/python-list
Re: how to package embedded python?
On 7/25/13 5:05 PM, David M. Cotter wrote: what must i include in my app package if i'm embedding python? i tried including *everything* in the DLLs directory, but my app still crashes as soon as i attempt to initialize python. this is on a system that does not have python installed, as most of my users won't have it. is it actually a requirement that they first install python? (cuz it does work then) Have you looked at these docs? http://docs.python.org/2/extending/embedding.html Lots of other hits on Google for embedding Python in C app. -- Kevin Walzer Code by Kevin/Mobile Code by Kevin http://www.codebykevin.com http://www.wtmobilesoftware.com -- http://mail.python.org/mailman/listinfo/python-list
Re: Cross-Platform Python3 Equivalent to notify-send
On 7/27/13 6:58 AM, Devyn Collier Johnson wrote: Linux systems with the proper software can use the notify-send command. Is there a cross-platform Python3 equivalent? Mahalo, Devyn Collier Johnson devyncjohn...@gmail.com http://pythonhosted.org/gntp/ ? -- Kevin Walzer Code by Kevin/Mobile Code by Kevin http://www.codebykevin.com http://www.wtmobilesoftware.com -- http://mail.python.org/mailman/listinfo/python-list
Re: Simple Python script as SMTP server for outgoing e-mails?
On 7/23/13 5:53 PM, Gilles wrote: On Mon, 22 Jul 2013 10:14:15 -0400, Kevin Walzer k...@codebykevin.com wrote: http://www.hmailserver.com Thanks. hMailServer was one of the apps I checked, and I was just making sure there weren't something simpler, considering my needs, ideally something like Mongoose MTA. Regardless, because of the SPAM anti-measures mentioned above, it seems like I was over-optimistic about running an MTA and sending e-mails from my home computer :-/ The reason I mentioned hMailServer is that I host my own mail server for my business--I have a static IP address, and correctly configured DNS--and so I'm able to send out large batches of e-mails to customers from my network without being blocked by my ISP. I'm running a Mac server so my mail system is the typical Unix setup (Postfix, etc.), but hMailServer was the closest thing I've found for Windows. Configuring your own server isn't cheap in terms of time even if you use FOSS components, and your ISP may charge more for a static IP, so I completely understand if you don't want to go that route. --Kevin -- Kevin Walzer Code by Kevin/Mobile Code by Kevin http://www.codebykevin.com http://www.wtmobilesoftware.com -- http://mail.python.org/mailman/listinfo/python-list
Re: Beginner - GUI devlopment in Tkinter - Any IDE with drag and drop feature like Visual Studio?
On 7/22/13 4:54 AM, Cucole Lee wrote: Why Thinter? You can try wxpython. Well, it's partly a matter of taste, but I for one find wxPython's API...inelegant. -- Kevin Walzer Code by Kevin/Mobile Code by Kevin http://www.codebykevin.com http://www.wtmobilesoftware.com -- http://mail.python.org/mailman/listinfo/python-list
Re: Simple Python script as SMTP server for outgoing e-mails?
On 7/21/13 10:42 AM, Gilles wrote: Hello Every once in a while, my ISP's SMTP server refuses to send perfectly legit e-mails because it considers them as SPAM. So I'd like to install a dead-simple SMTP server on my XP computer just to act as SMTP backup server. All I'd need is to change the SMTP address in my e-mail client, and off they go. No need for anything else like user authentication or SPAM control. Is there a no-brainer, ready-to-use solution in Python that I could use for this? Thank you. http://www.hmailserver.com -- Kevin Walzer Code by Kevin/Mobile Code by Kevin http://www.codebykevin.com http://www.wtmobilesoftware.com -- http://mail.python.org/mailman/listinfo/python-list
Re: Stack Overflow moderator “animuson”
On 7/10/13 3:55 AM, Mats Peterson wrote: A moderator who calls himself “animuson� on Stack Overflow doesn’t want to face the truth. He has deleted all my postings regarding Python regular expression matching being extremely slow compared to Perl. Additionally my account has been suspended for 7 days. Such a dickwad. Mats And we should care because...? -- Kevin Walzer Code by Kevin/Mobile Code by Kevin http://www.codebykevin.com http://www.wtmobilesoftware.com -- http://mail.python.org/mailman/listinfo/python-list
Re: Re-using copyrighted code
On 6/8/13 5:31 PM, Malte Forkel wrote: Now, how am I supposed to deal with that? Ask Secret Labs for some kind of permission? Leave it as it is and add my own copyright line? Secret Labs AB is Frederic Lundh, author of the Python Image Library and many bits included in Python's stdlib. Here is info about him: http://effbot.org/zone/about.htm His contact info is listed here: http://www.pythonware.com/company/contact.htm I have trouble believing there would be any issue with you re-using the code, especially since it is included with Python's stdlib. --Kevin -- Kevin Walzer Code by Kevin/Mobile Code by Kevin http://www.codebykevin.com http://www.wtmobilesoftware.com -- http://mail.python.org/mailman/listinfo/python-list
Re: Future standard GUI library
On 5/20/13 1:04 AM, Vito De Tullio wrote: FLTK? (http://www.fltk.org/index.php) FLTK is even uglier than non-themed Tkinter: non-native on every platform. Tkinter wraps native widgets on MacOS and WIndows, but FLTK draws its own widgets everywhere. -- Kevin Walzer Code by Kevin/Mobile Code by Kevin http://www.codebykevin.com http://www.wtmobilesoftware.com -- http://mail.python.org/mailman/listinfo/python-list
Re: Future standard GUI library
On 5/18/13 11:01 PM, llanitedave wrote: I'm curious about how commonly tkinter is actually used among Python app developers as compared to wx, Pyside, or PyQT. I get the impression that more distributed apps are built with wxPython, at least, than tkinter. My impression is far from actual knowledge, of course. I have two commercial apps developed with Tkinter: http://www.codebykevin.com/phynchronicity.html http://www.codebykevin.com/quickwho.html --Kevin -- Kevin Walzer Code by Kevin/Mobile Code by Kevin http://www.codebykevin.com http://www.wtmobilesoftware.com -- http://mail.python.org/mailman/listinfo/python-list
Re: any cherypy powred sites I can check out?
On 5/16/13 2:30 PM, Chris Angelico wrote: On Fri, May 17, 2013 at 4:17 AM, visphatesj...@gmail.com wrote: anyone? -- http://mail.python.org/mailman/listinfo/python-list You're firing off a bunch of minimal-content threads that ask other people to do work for you. I recommend you put a bit more thought into your posts, and show that you're willing to do a basic web search before you just ask a question :) He's also known on the Tcl newsgroup as Gavino; a Google search for gavino tcl will turn up some interesting hits. I also see that he's posting on comp.lang.perl as Johannes Falcone. The common thread of his recent postings are subjects posed as questions, usually about various web frameworks, sometimes without even a single line in the message body. On the Tcl list it's AOLServer and NavServer. I'm not familiar with the Perl frameworks he's curious about. --Kevin -- Kevin Walzer Code by Kevin/Mobile Code by Kevin http://www.codebykevin.com http://www.wtmobilesoftware.com -- http://mail.python.org/mailman/listinfo/python-list
Re: Future standard GUI library
widgets. Hope this helps, Kevin -- Kevin Walzer Code by Kevin/Mobile Code by Kevin http://www.codebykevin.com http://www.wtmobilesoftware.com -- http://mail.python.org/mailman/listinfo/python-list
Re: ANN: ActivePython 3.2.2.3 is now available
On 5/1/13 8:01 AM, Robert wrote: Will this be the last one? It has been two years. Hard to say. AS has been focusing on cloud-based stuff lately. ActivePerl hasn't been updated for a long time either. ActiveTcl is still maintained. --Kevin -- Kevin Walzer Code by Kevin/Mobile Code by Kevin http://www.codebykevin.com http://www.wtmobilesoftware.com -- http://mail.python.org/mailman/listinfo/python-list
Re: Drag and drop in Windows
On 4/29/13 6:25 AM, Robert Flintham wrote: I’ve found this (TkDND): http://wiki.tcl.tk/2768 Michael Lange has written a nice Python wrapper for TkDND. His site is offline at the moment, but I found the source files on my system and have wrapped them up here: http://www.codebykevin.com/TkinterDnD2-0.zip Hope this helps, Kevin -- Kevin Walzer Code by Kevin/Mobile Code by Kevin http://www.codebykevin.com http://www.wtmobilesoftware.com -- http://mail.python.org/mailman/listinfo/python-list
Re: Drag and drop in Windows
Official link: http://tkinterdnd.sourceforge.net -- http://mail.python.org/mailman/listinfo/python-list
Re: simple GUI environment
On 3/5/13 9:20 AM, Eric Johansson wrote: The main reason I discount both of those is that they are effectively dead as I can see. Last updates in the 2010/2011 range. Why not give EasyGUI a try? The site is still active, and two years isn't without an update doesn't mean a project is dead, especially if it's a simple and mature project that doesn't need a lot of maintenance. If your needs are basic, then I'd say EasyGUI would be a good fit. By contrast, a library undergoing heavy development with a constantly-shifting API can cause tons of headaches. --Kevin -- Kevin Walzer Code by Kevin/Mobile Code by Kevin http://www.codebykevin.com http://www.wtmobilesoftware.com -- http://mail.python.org/mailman/listinfo/python-list
Re: Is there a graphical GUI builder?
On 2/19/13 5:19 PM, Rex Macey wrote: I see that there is TKinter, which is a scripting function to build GUIs. To be clear, I'm looking for a graphical interface to build GUIs. Tkinter is so easy to use to build GUI's that a GUI tool isn't needed. Hardly any Tk or Tkinter developer uses anything but a text editor and console to develop a user interface. -- Kevin Walzer Code by Kevin/Mobile Code by Kevin http://www.codebykevin.com http://www.wtmobilesoftware.com -- http://mail.python.org/mailman/listinfo/python-list
Re: PYTHON 3.3 + GUI + COMPILE
On 12/27/12 9:08 PM, Dimitrios Xenakis wrote: Morning, I have been looking for a library solution of both GUI and Compiler but for Python 3.3 and ofcourse i was hoping for a combination that would be most compatible between them. After searching i may have concluded to cx_Freeze (because it was the only one that noticed that currently supports version Python 3.3), but i do not know what GUI library should i combine it with. Does cx_Freeze alone put any kind of restriction to my choice of GUI? I would also be interested in using my programs for commercial purposes, so would this put again some other kind of limitations to my GUI choice? I have read many good stuff about PySide, but still i do not know wether this is the one that i should choose. Is PySide same as PyQT and PyQT4 and QT or which is the exact relationship between those? Disadvantages - advantages, capabilities, benefits, costs, etc. (What is the lowest possible cost of buying such a commercial license for my programming?. Are there different versions and should i be carefu l l to choose the best for me? Where could i get this from? PySide is total free for my commercial needs?) I need to be legit so i guess i should learn how to handle with the licencing thing. Please somebody clear things for me. Thanks 4 your time i really appreciate that. cx_Freeze has good support for Tkinter, PyQt, and (as far as I know) wxPython. License: Qt is LGPL. PyQt is GPL or commercial. PySide is, I believe, the same as Qt itself. I'm not sure how mature or well-supported PySide is, in general. wxPython is LGPL with a commercial exception clause, which allows you to use it in closed-source apps. Tkinter, as part of the stlib, has a very liberal license (BSD-style), as does Tcl/Tk, which allows for free use in commercial apps. Hope this helps, Kevin -- Kevin Walzer Code by Kevin http://www.codebykevin.com -- http://mail.python.org/mailman/listinfo/python-list
Second try: non-blocking subprocess pipe and Tkinter in 2.7
Yesterday I posted a question about keeping a Tkinter GUI during a long-running process, i.e. reading data from a pipe via the subprocess module. I think that question did not quite get at the heart of the issue because it assumed that Python, like Tcl which underlies Tkinter, supports non-blocking, asynchronous reading out of the box. Apparently it does not. So, my question is hereby revised as such: how can I implement a non-blocking read of a subprocess pipe that can write data to the Tkinter text widget in an manner that does not cause the GUI to lock up? --Kevin -- Kevin Walzer Code by Kevin http://www.codebykevin.com -- http://mail.python.org/mailman/listinfo/python-list
Keeping a Tkinter GUI alive during a long running process
I maintain a Tkinter application that's a front-end to to a package manger, and I have never been able to find a way to keep the app from locking up at some point during the piping in of the package manager's build output into a text widget. At some point the buffer is overwhelmed and the app simply can't respond anymore, or writes data to the text widget after locking up for a period. I've long used the typical Tkinter design pattern of opening a pipe to the external command, and letting it do its thing. However, after a time, this locks up the app. If I try to throttle the buffer with some combination of update or after or update_idletasks, that keeps the data flowing, but it comes in too slowly and keeps flowing in long after the external process has terminated. Below is a sample function that illustrates how I approach this issue. Can someone suggest a better approach? #install a fink package def installPackage(self): self.package = self.infotable.getcurselection() if not self.package: showwarning(title='Error', message='Error', detail='Please select a package name.', parent=self) return else: self.clearData() self.packagename = self.package[0][1] self.status.set('Installing %s' % self.packagename) self.setIcon(self.phynchronicity_install) self.playSound('connect') self.showProgress() self.file = Popen('echo %s | sudo -S %s -y install %s' % (self.passtext, self.finkpath.get(), self.packagename), shell=True, bufsize=0, stdout=PIPE).stdout for line in self.file: self.inserturltext(line) self.after(5000, self.update_idletasks) -- Kevin Walzer Code by Kevin http://www.codebykevin.com -- http://mail.python.org/mailman/listinfo/python-list
[issue15587] IDLE is pixelated on the Macbook Pro with Retina Display
Kevin Walzer added the comment: This can probably be fixed by setting this key in the app's info.plist file: keyNSHighResolutionCapable/key true/ Under the hood, Tkinter/Tk-Cocoa uses CoreText to render text, and I understand this to adapt to high-res displays out of the box--as long as the proper key is set in the plist file. Only pixmaps/images require special developer handling to display properly on Retina displays. As IDLE does not use any such graphics, it should be fine. Can someone file a patch for the info.plist file, or at try editing the app's info.plist file and then testing on a high-res display? I do not have access to a Retina display machine on my system. Here are more details on how to enable the key and test it: http://apple.stackexchange.com/questions/53717/how-does-eclipse-work-on-new-retina-macbook-pros -- nosy: +wordtech ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15587 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15853] IDLE crashes selecting Preferences menu with OS X ActiveState Tcl/Tk 8.5.12.1
Kevin Walzer added the comment: editFont.config is causing the crash. The revised patch you suggest configures both the display font example and the highlight-text example. We can certainly amend my patch along those lines. I cannot reproduce the issue in simple Tcl/Tk using the equivalent [font create] and [font configure] calls. As noted, bugs involving the Tcl/Tk event loop on the Mac can be hard to reproduce. It is usually simpler, where possible, to work around the issue at the script level. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15853 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15853] IDLE crashes selecting Preferences menu with OS X ActiveState Tcl/Tk 8.5.12.1
Kevin Walzer added the comment: The crash occurs during a self.editFont.config call, when the sample text in the font dialog is updated with new font properties. My changes re-structures the configure event to first create a tuple with new font properties, then apply that to the parent label widget's font. Same effect, works around the crash. My testing shows the crash occurs at the event loop level--somewhere in the event loop between Python, Tk, and Cocoa, this specific configuration causes Tk to barf and then crash. If you have followed the traffic on the event loop issues in Tk-Cocoa at SF and the Tcl-Mac list, you're aware that a) the event loop is fragile and complex and b) pretty much impossible to solve at this time because the only one who really understands it well, the original author of the code, is no longer involved with Tk development. As a result, it is often simpler to work around Tk-Cocoa event loop issues at the script level: that is what my patch does. There is little chance of solving the crash at the Tk level at this time. I don't understand what the problem with in requesting that IDLE users update their installation to get this patch; it's no different than any other bug fix. As far as making sure it works with the various releases of Python, that's work that you or another Python dev will have to do. It's a two-line fix so I doubt it will be that complicated to implement. And yes, in an ideal world, it would be better to fix Tk, but this patch solve the immediate problem because we are not able to address this issue at the Tk level at this time. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15853 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15853] IDLE crashes selecting Preferences menu with OS X ActiveState Tcl/Tk 8.5.12.1
Kevin Walzer added the comment: The attached patch works around the crash for me on Python 2.7.3, Tk-Cocoa 8.5.12 (tip), on Lion. -- keywords: +patch nosy: +wordtech Added file: http://bugs.python.org/file27538/configDialog.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15853 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15853] IDLE crashes selecting Preferences menu with OS X ActiveState Tcl/Tk 8.5.12.1
Changes by Kevin Walzer wordt...@users.sourceforge.net: Removed file: http://bugs.python.org/file27538/configDialog.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15853 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15853] IDLE crashes selecting Preferences menu with OS X ActiveState Tcl/Tk 8.5.12.1
Changes by Kevin Walzer wordt...@users.sourceforge.net: Added file: http://bugs.python.org/file27539/configDialog.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15853 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
Re: IDLE Crashing in Mac OS 10.8.2 with 2.7.3
On 10/9/12 11:27 AM, bkee...@gmail.com wrote: I've tried all the usual suspect of uninstalling and reinstalling IDLE and Python 2.7.3, but my IDLE environment always crashes unexpectedly on Mac OS X 10.8. Where did you get Python? What version of Tcl/Tk do you have installed? Is it the one from ActiveState or the one bundled with OS X? -- Kevin Walzer Code by Kevin http://www.codebykevin.com -- http://mail.python.org/mailman/listinfo/python-list