[IronPython] Need help in learning.
J. Merrill
jvm_cop at spamcop.net
Tue Nov 1 15:53:26 CET 2005
That script searches the release docn for .Net (1.x). IP relies on .Net 2, so I think the .Start line should be
Process.Start("http://lab.msdn.microsoft.com/searchbeta/Default.aspx?" + query)
Otherwise, some results will be missing or perhaps incomplete (or, rarely, incorrect).
At 04:27 PM 10/31/2005, Shawn Farkas wrote
>Pretty easily done with a quick script:
>
>
>
>import sys
>
>sys.LoadAssemblyByName("System")
>
>from System import String
>
>from System.Diagnostics import Process
>
>
>
>def msdn(query):
>
> if query.GetType() == String.Empty.GetType():
>
> Process.Start("http://search.microsoft.com/search/results.aspx?View=msdn&st=b&c=4&s=1&swc=4&qu=" + query)
>
> else:
>
> msdn(query.GetType().FullName)
>
>
>
>Will launch the MSDN help page in the user s default browser. I m not sure if there s a nicer way to determine if the parameter is a string or not, and this also relies on the fact that the browser will normalize the query string (if it contains a space for instance) & but will break if you query contains the & character. However, for debugging purposes, if you throw that in your site.py you re all set J
>
>
>
>-Shawn
>
>
>
>----------
>From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Peli de Halleux (PELI)
>Sent: Monday, October 31, 2005 11:48 AM
>To: Discussion of IronPython
>Subject: Re: [IronPython] Need help in learning.
>
>
>
>Following up the improving the experience for new .Net users, IronPython could provide specialized commands to search msdn and pop up a internet window. For example something like
>
> msdn "System.Security.Cryptography.SignedXml.ComputeSignature" // search based on literal
>
> msdn foo // search based on the object type
>
>[snip]
J. Merrill / Analytical Software Corp
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20051101/82523273/attachment.html>
More information about the Ironpython-users
mailing list