June 2007 - Posts
My previous post about ScrewTurn Wiki reminded me to send them a donation via PayPal. After years of just using "free" stuff, I now advocate that we all support the "free" products we personally use.
That extends to commercial projects. Shouldn't every project that uses any free/OS software make a donation for each product used?
Since 2002 I have used OpenWiki as a means of collecting, sharing and communicating information with development team members and stakeholders. It was fast, reliable and had some surprising features. I never really found an alternative that "felt right" to me.
But I've now moved on to ScrewTurn Wiki (free - GPL). Has just that right combination of performance, features and simplicity!
Thomas and Oren recently showed a couple of scripts in PowerShell and Boo respectively that count the number of types and methods in mscorlib.
Here is one possible implementation in IronPython ...
import System
typeCount = methodCount = 0
mscorlib = System.Type.GetType('System.Object').Assembly
for t in mscorlib.GetTypes():
typeCount += 1
methodCount += t.GetMethods().Length
print "Types: %s | Methods: %s" % (typeCount, methodCount)
On my system (Vista) this script will output ...
Types: 2318 | Methods: 27677
I wonder, is there a more efficient way to implement this in IronPython?
More Posts