個人檔案The Martin Schray Way相片部落格清單更多 ![]() | 說明 |
|
12月2日 Zune without a Zune?I am waiting to see if I get a Zune over the holidays, but you can download and use the Zune software (and marketplace) without having a Zune device. The player is pretty nice and similar to Windows Media Player. Why do this? It gave me access to the large Zune marketplace catalog of songs. Getting TabCompletion IronPython
If you have ever used EMacs or Visual Studio a great feature is tab completion. In Visual Studio it work pretty amazingly well and is called Intellisense (which goes beyond simple tab completion). I was watching a IronPython demo and I noticed that the speaker had tab completion going. I asked how to get this feature turned on. A simple command line argument will do the trick. Starting the IronPython console (IPY.exe) with -X:TabCompletion will do the trick! C:\Program Files\IronPython-1.0>ipy -X:TabCompletion Dynamic Languages Don't Stink
I have been playing with dynamic languages in the form of IronPython and Pharlanger PHP (e.g. PHP .NET). I have not held a very high opinion of dynamic languages. Why? I think the with dynamic typing and their interpreted nature you are simply move issues that could be addressed at compile time (syntax errors and type problems) to runtime and I never consider that to be a good idea. Certainly there are benefits in rapid prototyping that are very benefical. Let me talk about a different benefit. This case was debugging. I have a C# library that displays a popup window similar to Outlook's toast window (popup windows that fades in and out). It worked great until I started using Windows XP's built in dual monitor support (very cool if you have a laptop and an extra monitor). When I configured the dual monitor support my toast window started appearing on the second monitor and not the primary as I wanted. The code is a bit tricky with several timers to fade the window in and out, so debugging is a bit of a challenge. I decided that making a simple program to explore the problem might be the easist way to solve the problem. Then it occurred to me that this is perfect thing to use IronPython for. I was using SystemInformation.SystemInformation.VirtualScreen to get the screen size. I decided to type some code into IronPython to explore this a bit further. The transcript is below. I found that VirtualScreen was returning the height and width of the combined screens. I looked at the doc (imagine that) and though that PrimaryMonitorSize was really what I wanted. The simple test below confirmed this. IronPython make the test quite easy. Very cool C:\Program Files\IronPython-1.0>ipy -X:TabCompletion |
|
|