Using a class in an exe in Boo

Boo is great for lightweight experiments:

===  myclass.boo ===

namespace foo

class myclass:
    def foo():
        print(“Hello”)

c = myclass()
c.foo()

===============

=== myclass2.boo ===

import foo from “myclass.exe”

c = myclass()
c.foo()

=================

Create the two above files.

Compile both with the booc compiler. 

 run myclass2.exe

This shows how easy it is to extend a .net app in Boo. 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s