Also tested on Debian # Linux 6.0.x using Python versions 2.6.6, 2.7.2 and 3.1.3. # Designed and tested on a Macbook Pro, OSX 10.7.5 using Python Versions 2.6.7 and 2.7.1. Colours are easily reset in Python and I have shown this many times on this site. # I have not reset the Terminal back to its original state although all of the information how to do it is in # this code. # This code is issued as Public Domain and you may do with it as you please. # The cursor has not been turned off and will be seen on the left hand side of the window, so try to ignore it. It is possible to get the Ctrl-C to # _crash_ out and stop the DEMO if Ctrl-C is pressed at any other time than just after seeing the asterisk flash. Just focus on the red square in the centre of the window after pressing from the initial # window and then press Ctrl-C immediately after you see an asterisk flash. # This code generates a crude Campimeter.and is used to check # visual field. # To run type from the Python prompt:- # > exec(open("/full/path/to/Campimeter.py).read()) # Where "/full/path/to/" is where you have saved this code then have a little fun. # Written in such a way as anyone can understand how it works, youngsters too. The colours for this DEMO inside OSX 10.7.5, are grey background, red square and yellow asterisk/characters. # The Terminal window must be initially set manually at the uppermost left hand corner and Python started inside # this window. # A DEMO to show how to increase the size of a Terminal window and obtain the maximum usable size on a _desktop_. # Campimeter.py # I needed the facility to have a maximised Terminal window on OSX 10.7.5 and this was the result. Written so that kids can understand what is going on.Įnjoy finding simple solutions to often very difficult problems. I needed the maximised Python Terminal for something else but this was the easiest way to demonstrate ho to do it through Python. I EXPECT professionals to know how to doo that.īefore running Python inside the Terminal ensure the Terminal window is at the uppermost left hand corner of your desktop. READ the code for more information!!! This code WILL alter the size of the Terminal window AND changes the colours too, although it is very easy to return back to the default state it is NOT included in the code. Originally written for a Macbook Pro, OSX 10.7.5 but also tested on Debian Linux 6.0.x. Anyone who has worn spectacles for a long time has had this test done at the optician's. I decided on writing code to do a crude emulation of a Campimeter. This code shows how to open up a default Terminal running Python to tha maximum allowed on the _desktop_.
0 Comments
Leave a Reply. |