Skip to content

Biting the hand that feeds IT

The Register ®

Software:


Related Whitepapers

Comments on ‘Quick scripting for .NET with IronPython’

Office benefits

Published Thursday 13th March 2008 06:02 GMT

« Back to article page

Leave off the "if __name__" stuff 

By Anonymous Coward
Posted Thursday 13th March 2008 15:23 GMT

I'd suggest leaving off the

if __name__ == '__main__':

line. That's useful when you have a python file that might be used as either a script or imported into another module. It's pretty clear from the way the rest of the code is structured that this code could only be used as a script.

Oh, come on... 

By Anonymous Coward
Posted Thursday 13th March 2008 16:30 GMT

It's nice to see IronPython get coverage, and the example of accessing the CLR is welcome, but...

Using a global variable ('excel')? Printing from within a function? Surely you can structure your code better than that...

Ruby 

By amanfromarse
Posted Thursday 13th March 2008 19:47 GMT

Ugh, horrible code. No thanks.

Ruby's been around longer than Python, btw.

Ruby!=Rails

Re: Ruby 

By Simon Ward
Posted Friday 14th March 2008 00:07 GMT
Thumb Down

"Ruby's been around longer than Python, btw."

Not from where I'm sitting - first appearance of Python:1991, first appearance of Ruby: 1995 (I don't have a particular beef with Ruby, other than that it appears to offer no advantage over Python and/or Perl)

Oh yeah, agree with the first AC with regard to the use of global variables. Very sloppy.

Re: Ruby 

By Joe Diablo
Posted Friday 14th March 2008 05:22 GMT

Ruby only seems like it's been around longer, since it's so damn slow.

@Anonymous Coward II 

By Anonymous Coward
Posted Friday 14th March 2008 10:24 GMT
Thumb Up

yeah, but it looks like the intention is to show how this stuff works, not to produce production code

about time we had some Python coverage...

whitepaper title

The Register Guides : The status of iSCSI

Now that the hype's abated, have companies backing iSCSI have run out of energy and patience, or is the technology becoming commonplace and accepted?.
whitepaper title

A Green Vision: Interview with VMWare CEO Diane Greene

This interview with VMware CEO Diane Greene discusses how you can realize the financial benefits of energy efficient, greener datacenters through server consolidation..

The MSDN Developer Zone

Top 20 storiesAll The Week’s HeadlinesArchiveSearch