From 13512784495 at 163.com Tue Sep 23 08:09:36 2014 From: 13512784495 at 163.com (=?GBK?B?xLrI59Gp?=) Date: Tue, 23 Sep 2014 14:09:36 +0800 (CST) Subject: [Idle-dev] How to run idle.py from embedded python in another application Message-ID: <12b79122.6abd.148a12124b0.Coremail.13512784495@163.com> hi, All: I am using embedded python in an MFC application, I need the embedded python interpreter to do some calculation, and now, I want it to do more, I need to open the python editor, like what can be done from IDLE GUI, where you can open FileList.py under libs\idle\ sub folder in you python installation path, and execute the module to open a new editor window, but when I try to run that file in my embedded python, it just give some error message, as the following: Warning: configHandler.py - IdleConf.GetOption - problem retrieving configuration option 'name' from section 'Theme'. returning default value: '' Warning: configHandler.py - IdleConf.GetOption - problem retrieving configuration option 'width' from section 'EditorWindow'. returning default value: None Warning: configHandler.py - IdleConf.GetOption - problem retrieving configuration option 'height' from section 'EditorWindow'. returning default value: None Warning: configHandler.py - IdleConf.GetOption - problem retrieving configuration option 'font-bold' from section 'EditorWindow'. returning default value: None Warning: configHandler.py - IdleConf.GetOption - problem retrieving configuration option 'font' from section 'EditorWindow'. returning default value: None Warning: configHandler.py - IdleConf.GetOption - problem retrieving configuration option 'font-size' from section 'EditorWindow'. returning default value: None Traceback (most recent call last): File "K:\Python335\Lib\idlelib\FileList.py", line 129, in _test() File "K:\Python335\Lib\idlelib\FileList.py", line 124, in _test flist.new() File "K:\Python335\Lib\idlelib\FileList.py", line 49, in new return self.EditorWindow(self, filename) File "Lib/idlelib\EditorWindow.py", line 233, in __init__ fontWeight)) File "Lib/tkinter\__init__.py", line 1270, in configure File "Lib/tkinter\__init__.py", line 1261, in _configure _tkinter.TclError: expected integer but got "None" I can create dialog with tkinter, and add control on the dialog, can anyone tell what's wrong, am I using it incorrectly? -------------- next part -------------- An HTML attachment was scrubbed... URL: From 13512784495 at 163.com Wed Sep 24 08:16:34 2014 From: 13512784495 at 163.com (=?GBK?B?xLrI59Gp?=) Date: Wed, 24 Sep 2014 14:16:34 +0800 (CST) Subject: [Idle-dev] How to open IDLE with embedded python from another application Message-ID: <34d648db.13c50.148a64dde5b.Coremail.13512784495@163.com> hi, All: I am using embedded python in an MFC application, I need the embedded python interpreter to do some calculation, and now, I want it to do more, I need to open the python editor, like what can be done from IDLE GUI, where you can open FileList.py under libs\idle\ sub folder in you python installation path, and execute the module to open a new editor window, but when I try to run that file in my embedded python, it just give some error message, as the following: Warning: configHandler.py - IdleConf.GetOption - problem retrieving configuration option 'name' from section 'Theme'. returning default value: '' Warning: configHandler.py - IdleConf.GetOption - problem retrieving configuration option 'width' from section 'EditorWindow'. returning default value: None Warning: configHandler.py - IdleConf.GetOption - problem retrieving configuration option 'height' from section 'EditorWindow'. returning default value: None Warning: configHandler.py - IdleConf.GetOption - problem retrieving configuration option 'font-bold' from section 'EditorWindow'. returning default value: None Warning: configHandler.py - IdleConf.GetOption - problem retrieving configuration option 'font' from section 'EditorWindow'. returning default value: None Warning: configHandler.py - IdleConf.GetOption - problem retrieving configuration option 'font-size' from section 'EditorWindow'. returning default value: None Traceback (most recent call last): File "K:\Python335\Lib\idlelib\FileList.py", line 129, in _test() File "K:\Python335\Lib\idlelib\FileList.py", line 124, in _test flist.new() File "K:\Python335\Lib\idlelib\FileList.py", line 49, in new return self.EditorWindow(self, filename) File "Lib/idlelib\EditorWindow.py", line 233, in __init__ fontWeight)) File "Lib/tkinter\__init__.py", line 1270, in configure File "Lib/tkinter\__init__.py", line 1261, in _configure _tkinter.TclError: expected integer but got "None" I can create dialog with tkinter, and add control on the dialog, can anyone tell what's wrong, am I using it incorrectly? -------------- next part -------------- An HTML attachment was scrubbed... URL: From agavriloaei_cosmin at outlook.com Sat Sep 13 18:17:10 2014 From: agavriloaei_cosmin at outlook.com (Cosmin Agavriloaei) Date: Sat, 13 Sep 2014 16:17:10 +0000 Subject: [Idle-dev] =?utf-8?q?Thank_You?= Message-ID: Thank you for this program. Sent from Windows Mail -------------- next part -------------- An HTML attachment was scrubbed... URL: From glsmaxxtesting at gmail.com Mon Sep 15 18:35:56 2014 From: glsmaxxtesting at gmail.com (glsmaxx) Date: Mon, 15 Sep 2014 09:35:56 -0700 (PDT) Subject: [Idle-dev] IDLE problem in Manjaro Linux {Arch based} Message-ID: <1410798956449-5071623.post@n6.nabble.com> I have Python 2.7 and 3.4 on my system out of the box. I can type "python" from the command prompt and it changes to >>. I can enter basic commands and such. I also installed Pycharm but it really bogs the system down. Is there a simple IDLE that I can download and use? I have both an IDLE and Pycharm in Windows but I do not use Window very much and prefer to not have to break out my Windows laptop and rearrange everything just to use Python. After much googling and searching on the web I have not found what I am looking for. Thanks in advance. -- View this message in context: http://python.6.x6.nabble.com/IDLE-problem-in-Manjaro-Linux-Arch-based-tp5071623.html Sent from the Python - idle-dev mailing list archive at Nabble.com. From snowyfox at 163.com Wed Sep 24 08:19:34 2014 From: snowyfox at 163.com (=?GBK?B?xLrI59Gp?=) Date: Wed, 24 Sep 2014 14:19:34 +0800 (CST) Subject: [Idle-dev] How to open IDLE with embedded python from another application Message-ID: <50f47af8.13d1c.148a650a098.Coremail.snowyfox@163.com> hi, All: I am using embedded python in an MFC application, I need the embedded python interpreter to do some calculation, and now, I want it to do more, I need to open the python editor, like what can be done from IDLE GUI, where you can open FileList.py under libs\idle\ sub folder in you python installation path, and execute the module to open a new editor window, but when I try to run that file in my embedded python, it just give some error message, as the following: Warning: configHandler.py - IdleConf.GetOption - problem retrieving configuration option 'name' from section 'Theme'. returning default value: '' Warning: configHandler.py - IdleConf.GetOption - problem retrieving configuration option 'width' from section 'EditorWindow'. returning default value: None Warning: configHandler.py - IdleConf.GetOption - problem retrieving configuration option 'height' from section 'EditorWindow'. returning default value: None Warning: configHandler.py - IdleConf.GetOption - problem retrieving configuration option 'font-bold' from section 'EditorWindow'. returning default value: None Warning: configHandler.py - IdleConf.GetOption - problem retrieving configuration option 'font' from section 'EditorWindow'. returning default value: None Warning: configHandler.py - IdleConf.GetOption - problem retrieving configuration option 'font-size' from section 'EditorWindow'. returning default value: None Traceback (most recent call last): File "K:\Python335\Lib\idlelib\FileList.py", line 129, in _test() File "K:\Python335\Lib\idlelib\FileList.py", line 124, in _test flist.new() File "K:\Python335\Lib\idlelib\FileList.py", line 49, in new return self.EditorWindow(self, filename) File "Lib/idlelib\EditorWindow.py", line 233, in __init__ fontWeight)) File "Lib/tkinter\__init__.py", line 1270, in configure File "Lib/tkinter\__init__.py", line 1261, in _configure _tkinter.TclError: expected integer but got "None" I can create dialog with tkinter, and add control on the dialog, can anyone tell what's wrong, am I using it incorrectly? -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjreedy at udel.edu Sat Sep 27 06:39:08 2014 From: tjreedy at udel.edu (Terry Reedy) Date: Sat, 27 Sep 2014 00:39:08 -0400 Subject: [Idle-dev] How to run idle.py from embedded python in another application In-Reply-To: <12b79122.6abd.148a12124b0.Coremail.13512784495@163.com> References: <12b79122.6abd.148a12124b0.Coremail.13512784495@163.com> Message-ID: On 9/23/2014 2:09 AM, ??? wrote: > hi, All: > > I am using embedded python in an MFC application, I need the > embedded python interpreter to do some calculation, and now, I want it > to do more, I need to open the python editor, like what can be done from > IDLE GUI, where you can open FileList.py under libs\idle\ sub folder in The directory is Lib/idlelib. However, Idle is a application. Directly importing modules within idlelib is not supported. Their names and APIs are mostly private; see PEP 443. However, you have at least 3 other choices: 1. "import idlelib.idle" should start Idle properly. 2. run "python -m idlelib" in a subprocess should do it also. 3. Idle has a lot a baggage that you may not want. Instead, import tkinter and build a simple app around a Text widget. Here is a copy of what I recently posted to python-list. --- Most Python installations have tkinter available. I quickly wrote an absolutely minimal script. import tkinter as tk root = tk.Tk() text = tk.Text() text.pack() root.mainloop() I tested tested the functions and wrote the following. This is a test text entry. Enter and Tab work as expected. The Arrow (Cursor) keys work as expected. CntL-Left and Cntl-Right move a word at time. Home and End move to beginning and end of the line. Cntl-Home and Cntl-Up move to the beginning of the text. Cntl-End and Cntl-Donw move to the end of the text. Shift + cursor movement selects between the begin and end slice positions. PageUp and PageDown are inoperative. Delete and Backspace work as expected. At least on Windows, I can select text and delete, or cut or copy to Clipboard. I can also paste from the clipboard. In otherwords, this is a functional minimal text entry widget. I did not even know about Shift-movement selecting until I tried it. Notepad has this. Thunderbird's text entry does not. I think the above is adequate for most multi-line text entry. In use, a save function would have to be added. A help text with the above info would be good too (Idle needs this). -- Terry Jan Reedy From tjreedy at udel.edu Sat Sep 27 06:40:25 2014 From: tjreedy at udel.edu (Terry Reedy) Date: Sat, 27 Sep 2014 00:40:25 -0400 Subject: [Idle-dev] Thank You In-Reply-To: References: Message-ID: On 9/13/2014 12:17 PM, Cosmin Agavriloaei wrote: > Thank you for this program. Thank you for the positive feedback. Many people have worked on Idle and a few of us continue to improve it. -- Terry Jan Reedy From tjreedy at udel.edu Sat Sep 27 06:58:03 2014 From: tjreedy at udel.edu (Terry Reedy) Date: Sat, 27 Sep 2014 00:58:03 -0400 Subject: [Idle-dev] IDLE problem in Manjaro Linux {Arch based} In-Reply-To: <1410798956449-5071623.post@n6.nabble.com> References: <1410798956449-5071623.post@n6.nabble.com> Message-ID: <542643DB.8090804@udel.edu> On 9/15/2014 12:35 PM, glsmaxx wrote: > I have Python 2.7 and 3.4 on my system out of the box. I can type "python" > from the command prompt and it changes to >>. I can enter basic commands and > such. I also installed Pycharm but it really bogs the system down. Is there > a simple IDLE that I can download and use? I have both an IDLE and Pycharm > in Windows but I do not use Window very much and prefer to not have to break > out my Windows laptop and rearrange everything just to use Python. After > much googling and searching on the web I have not found what I am looking > for. _tkinter, tkinter, idlelib, turtle, and turtledemo are part of the stdlib and are included with the PSF installers for Windows and OSX. They depend on the installation of tcl/tk, which is included with the Windows installers. However, some (many, most, all?) linux distributions remove some or all of the above from their Python distribution and include whatever they remove with their tcl/tk distribution. I assume this must be true for Arch/Manjaro, so install tcl/tk and you should get the missing pieces of Python. For more help, enquire on the support list for Manjaro. -- Terry Jan Reedy