Re: [python-win32] Clear the interactive screen

2011-04-05 Thread Blockheads Oi Oi
On 02/04/2011 07:39, Mark Hammond wrote: On 1/04/2011 1:24 AM, Blockheads Oi Oi wrote: This is what I set up. c:\Python27\Lib\site-packages\pythonwin\pywin>type mine.cfg [General] BasedOn = Default If you check out idle.cfg, it has with: Based On = default Note the space. Should've gone to

Re: [python-win32] Clear the interactive screen

2011-04-01 Thread Mark Hammond
On 1/04/2011 1:24 AM, Blockheads Oi Oi wrote: This is what I set up. c:\Python27\Lib\site-packages\pythonwin\pywin>type mine.cfg [General] BasedOn = Default If you check out idle.cfg, it has with: Based On = default Note the space. This will clear the screen but there's no interact

Re: [python-win32] Clear the interactive screen

2011-03-31 Thread Blockheads Oi Oi
On 31/03/2011 11:53, Mark Hammond wrote: On 31/03/2011 2:41 AM, Blockheads Oi Oi wrote: On 27/03/2011 07:53, Mark Hammond wrote: Try something like: from pywin.framework import interact interact.edit.currentView.SetSel(0, -1) interact.edit.currentView.Clear() Try the above three lines from t

Re: [python-win32] Clear the interactive screen

2011-03-31 Thread Mark Hammond
On 31/03/2011 2:41 AM, Blockheads Oi Oi wrote: On 27/03/2011 07:53, Mark Hammond wrote: Try something like: from pywin.framework import interact interact.edit.currentView.SetSel(0, -1) interact.edit.currentView.Clear() Try the above three lines from the interactive prompt and nothing that I c

Re: [python-win32] Clear the interactive screen

2011-03-30 Thread Blockheads Oi Oi
On 27/03/2011 07:53, Mark Hammond wrote: Try something like: from pywin.framework import interact interact.edit.currentView.SetSel(0, -1) interact.edit.currentView.Clear() Try the above three lines from the interactive prompt and nothing that I can see happens. Try the last two lines on a si

Re: [python-win32] Clear the interactive screen

2011-03-26 Thread Mark Hammond
Try something like: from pywin.framework import interact interact.edit.currentView.SetSel(0, -1) interact.edit.currentView.Clear() HTH, Mark On 26/03/2011 1:28 AM, Blockheads Oi Oi wrote: Hi all, my take on a way to achieve this, and apologies if someone has posted a better method that I don

[python-win32] Clear the interactive screen

2011-03-25 Thread Blockheads Oi Oi
Hi all, my take on a way to achieve this, and apologies if someone has posted a better method that I don't know about:- from SendKeys import SendKeys def cls(): SendKeys("^a{BS}~~", 0) # adjust to your needs I've tried to setup my own config file using ALT-R to call this and have failed