Bitter Coder
sour code and astringent experiences
Wednesday, October 04, 2006
help() works...
Well, Seo Sanghyeon asked me a pretty reasonable question of the last entry
"Why don't you use
help()
, instead of printing Overloads?"
Good question, I didn't realise that actually worked in IronPython for .Net types, I was very pleasantly surprised, I remember in the early betas i tried using help() on various managed types and it would just raise a NotImplementedException exception (or something like that, I forget now) - so what does that mean for my examples... well... let's take a system type like
Guid
and use help() on it.
IronPython 1.0.60816 on .NET 2.0.50727.42
Copyright (c) Microsoft Corporation. All rights reserved.
>>> import System
>>> from System import *
>>> help(Guid)
Help on Guid in module System in mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
| Guid(Array[Byte] b)
| Guid(UInt32 a, UInt16 b, UInt16 c, Byte d, Byte e, Byte f, Byte g, Byteh, Byte i, Byte j, Byte k)
| Guid(str g)
| Guid(int a, Int16 b, Int16 c, Array[Byte] d)
| Guid(int a, Int16 b, Int16 c, Byte d, Byte e, Byte f, Byte g, Byte h, Byte i, Byte j, Byte k)
| Guid CreateInstance[Guid]()
|
| Data and other attributes defined here:
|
| CompareTo(...)
| int CompareTo(self, object value)
| int CompareTo(self, Guid value)
| Equals(...)
| bool Equals(self, object o)
| bool Equals(self, Guid g)
| Finalize(...)
| Finalize(self)
| GetHashCode(...)
| int GetHashCode(self)
| GetType(...)
| Type GetType(self)
| MemberwiseClone(...)
| object MemberwiseClone(self)
| NewGuid(...)
| Guid NewGuid()
| ToByteArray(...)
| Array[Byte] ToByteArray(self)
| ToString(...)
| str ToString(self)
| str ToString(self, str format)
| str ToString(self, str format, IFormatProvider provider)
| __eq__(...)
| bool op_Equality(Guid a, Guid b)
| __init__(...)
| x.__init__(...) initializes x; see x.__class__.__doc__ for signature
| x.__init__(...) initializes x; see x.__class__.__doc__ for signature
| __ne__(...)
| bool op_Inequality(Guid a, Guid b)
| __new__(...)
| __new__(cls, Array[Byte] b)
| __new__(cls, UInt32 a, UInt16 b, UInt16 c, Byte d, Byte e, Bytef, Byte g, Byte h, Byte i, Byte j, Byte k)
| __new__(cls, str g)
| __new__(cls, int a, Int16 b, Int16 c, Array[Byte] d)
| __new__(cls, int a, Int16 b, Int16 c, Byte d, Byte e, Byte f, Byte g, Byte h, Byte i, Byte j, Byte k)
| Guid CreateInstance[Guid]()
|
>>>
Sweet, it works a treat - and will save a lot of digging time - though you might want to capture the results for big classes ;o)
Thanks Seo!
(btw, Seo is the man behind the Iron Python Community Edition & FePy projects - which can be found on
sourceforge
) and I would have to agree with this
article
that he does seem almost OmniPresent in the IronPython community...
.Net
|
IronPython
posted @ Wednesday, October 04, 2006 12:20:53 AM (New Zealand Daylight Time, UTC+13:00)
Comments [0]
|
Trackback
|
Comments are closed.
© Copyright 2008 Alex Henderson
Theme design by
Bryan Bell
newtelligence dasBlog 1.9.6264.0
| Page rendered at Saturday, November 22, 2008 2:38:55 AM (New Zealand Daylight Time, UTC+13:00)
Search
FeedCount
Tags...
.Net (82)
.Net Reactor (4)
.net user groups (9)
2008SummerRoadTrip (1)
ActiveRecord (1)
architecture chat (54)
ArchitectureCamp2007 (2)
asp.net (1)
Astoria (1)
Auckland (1)
base4 (9)
batching (1)
binsor (1)
blog (4)
books (1)
C# 3.0 (9)
cambodia (9)
CAML.Net (1)
castle (39)
china (8)
codecamp (2)
codeplex (3)
dapper.net (1)
DevDefined Ltd. (4)
DirectShow.Net (1)
DLR (1)
DSL (3)
EAUG (1)
Enterprise Architect (5)
Enterprise Library (1)
F# (1)
feedburner (2)
Friendster (1)
generics (1)
googlegears (1)
hacks (3)
hardware (3)
hongkong (2)
hyper-v (1)
ideas (1)
IoC (21)
IronPython (13)
IronRuby (2)
jobs (1)
Languages (2)
laos (8)
LINQ (7)
LiveId (1)
LLU (1)
Local Government (1)
MDA (1)
MDD (1)
microsoft (1)
Model Driven Development (1)
mono (1)
monorail (2)
Movies (1)
Music (1)
nDepend (1)
news (1)
NHibernate (2)
NUnit (2)
nvelocity (1)
OAuth (6)
office (1)
OpenSocial (1)
orcon (1)
photos (1)
php (1)
PostSharp (1)
powerpoint (1)
presentations (1)
ReSharper (1)
REST (2)
rhino commons (2)
rhinomocks (5)
Ruby (1)
SaaS (1)
scm (1)
Screen Architect (1)
SharePoint (5)
silverlight (1)
Splicer (4)
SQL2008 (1)
supcom (1)
svn (1)
Syzmk (4)
thailand (6)
Tools (2)
Tortoise SVN (1)
trac (2)
Travel (36)
Unity (2)
vietnam (7)
vista (2)
vmware (1)
volta (3)
VS2008 (1)
WCF (3)
wiki (2)
wikipedia (1)
Windows Server 2008 (1)
windsor (6)
WinForms (1)
wix (2)
WPF (2)
xmlrpc (1)
yahoo pipes (1)
Who am I?
Alex Henderson
Auckland
, New Zealand
Managing Director at
Dev|Defined Limited
"Self Confessed Coding Junky for 15 years"
Mobile:
+64-21-402-969
Email:
bittercoder 'at' gmail 'dot' com
MSN:
bittercoder_nz@hotmail
Skype:
alex.devdefined
Navigation
My Bookmarks (Delicious)
My GoogleReader - shared items
My Photos on Flickr
My Wiki
Catch NZ Limited
DevDefined Limited
tools.devdefined.com (Trac site)
New Zealand DotNet User Group
Screen Architect
Seismic Technologies (Syzmk)
Splicer - The .Net Video Splicing Library
On this page....
Blogs I read by New Zealanders...
Alex James
André Meurer @ Olympic Software
Andrew Dixon
Andrew Peters
Bennie Johnston
Blog:: Craig Pringle
Blogging is probably just a fad, but just in case...
Buzzrick's TileEngine Game Platform
Chris Auld
Chris Crowe's Blog
Chris Johnson
Clifton Johnston
Code Climber
Craig Box
Daniel
Daniel Wissa
Darryl Burling
Dave Dustin
Duncan Bayne
Floyd Burgess
Gabriel Smith
Geekzone blog
Grant Archibald
Grant Drake
Ivan Porto Carrero
Ivan Towlson
Jeremy Boyd
Jithen Singh
John-Daniel Trask
Josh Hektor
Juha Saarinen
Keith Nicholas
Kevin Daly
Mark Rees
Maruis Marais
Mauricio Freitas
Mindscape
My Blog (Alex Henderson)
Nathan Mercer
Nic Wise
Nick's Blog
Nigel Parker
Paul Andrew
Paul Lo
Peter Jones
Phil Cockfield
Public Address
Rod Drury
Sean McBreen
Simeon Pilgrim
Software Development and stuff
Stefan Schulz
Steve Schapel
Steven Kempton
The Blog of Dave5
The Book Diary
The Voice Of Reason New Zealand
Thoughts from Mirality
Tim Haines
Blogs I read on Castle...
Andrew Hallock
Ayende
Brian Romanko
Dan Bunea
Dru Sellers
Eleutian SpeakENG Development Blog
Gabriel Schenker
Hamilton Verissimo
Insane World
Insert Catchy Title Here
Jeff Brown
Ken Egozi
Marc-André Cournoyer's blog
Matt Berther
Nick Parker
Roy Osherove
Roy Tate
Technorati: http://castleproject.org
Wendy Friedlander
BlogMap
Del.icio.us
Wishlists
Sign In