<rdf:RDF
    xmlns:s='http://snipsnap.org/rdf/snip-schema#'
    xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'
    xml:base='http://www.loadbang.net/rdf'>
    <s:Snip rdf:about='http://www.loadbang.net/rdf#Software/net.loadbang.shado/Tutorials/Hello+World'
         s:cUser='nick'
         s:oUser='nick'
         s:mUser='nick'>
        <s:name>Software/net.loadbang.shado/Tutorials/Hello World</s:name>
        <s:content>We kick off by writing a simple script which prints &quot;Hello World.&quot; to the Max window. The Max window is a console for Max status and error messages; you can open it by selecting &quot;Max Window&quot; from the &quot;Window&quot; menu, or typing Command-M (Mac) or Control-M (Windows).&#xA;&#xA;Since we&apos;re going to create a Python script file, we need a decent text editor, ideally one which understands the Python language and can do colour highlighting. On the Mac, I recommend the free {link:TextWrangler|http://www.barebones.com/products/TextWrangler/}. (Recommendations for Windows would be welcome.)&#xA;&#xA;This is our &quot;Hello World&quot; script:&#xA;&#xA;{code:python}&#xA;&apos;&apos;&apos;&#xA;This is a script which prints &quot;Hello World&quot;&#xA;to the Max window.&#xA;&apos;&apos;&apos;&#xA;&#xA;print &quot;Hello World.&quot;&#xA;{code}&#xA;&#xA;This script has two parts. The first is the ~~documentation string~~, a comment describing what the script does (the comment is contained within triplets of single-quote characters):&#xA;&#xA;{code:python}&#xA;&apos;&apos;&apos;&#xA;This is a script which prints &quot;Hello World&quot;&#xA;to the Max window.&#xA;&apos;&apos;&apos;&#xA;{code}&#xA;&#xA;The second part is the the actual one-line script statement itself:&#xA;&#xA;{code:python}&#xA;print &quot;Hello World.&quot;&#xA;{code}&#xA;&#xA;Create a file containing this script, and save it with a name like &quot;HelloWorld.py&quot; in the directory which contains ~~shado-workbench.PLACE\_HOLDER~~. Now click the workbench button labelled &quot;list text files&quot;. You should see ~~HelloWorld.py~~ in the dropdown menu.&#xA;&#xA;When you select ~~HelloWorld.py~~, two things should happen:&#xA;&#xA;- The &quot;about&quot; text area in the workbench will show the documentation comment for the script&#xA;- The message &quot;Hello World.&quot; will appear in the Max window&#xA;&#xA;That&apos;s basically it: the script has done its job, and has now finished executing. We haven&apos;t yet communicated with the monome, or attempted to use the ~~shado~~ library: that comes next.&#xA;&#xA;1 Further Reading&#xA;&#xA;There is a long and detailed Python tutorial {link:here|http://docs.python.org/tutorial/}. I recommend bookmarking it for future reference. (It refers to Python version 2.6; the workbench&apos;s Java-based Python interpreter is at version 2.2, but the language differences should be minor.)&#xA;&#xA;There is some discussion of documentation strings {link:here|http://docs.python.org/tutorial/controlflow.html#tut-docstrings}.</s:content>
        <s:mTime>2009-01-17 21:27:47.0</s:mTime>
        <s:cTime>2009-01-17 21:27:47.0</s:cTime>
        <s:comments
             rdf:type='http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag'/>
        <s:snipLinks>
            <rdf:Bag>
                <rdf:li rdf:resource='http://www.loadbang.net/rdf#Software/net.loadbang.shado/Tutorials'/>
                <rdf:li rdf:resource='#snipsnap-index'/>
                <rdf:li rdf:resource='http://www.loadbang.net/rdf#Software/net.loadbang.jython'/>
                <rdf:li rdf:resource='http://www.loadbang.net/rdf#'/>
                <rdf:li rdf:resource='http://www.loadbang.net/rdf#Software/net.loadbang.shado'/>
                <rdf:li>
                    <s:Snip rdf:about='http://www.loadbang.net/rdf#Software/net.loadbang.shado/Tutorials/Hello+World'>
                        <s:attachments
                             rdf:type='http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag'/>
                    </s:Snip>
                </rdf:li>
                <rdf:li rdf:resource='http://www.loadbang.net/rdf#start/2009-02-03/1'/>
                <rdf:li rdf:resource='http://www.loadbang.net/rdf#Software/net.loadbang.shado/Tutorials/First Light'/>
                <rdf:li rdf:resource='http://www.loadbang.net/rdf#Software/TextBrick'/>
                <rdf:li rdf:resource='http://www.loadbang.net/rdf#Software/net.loadbang.shado/Tutorials/Buttons'/>
                <rdf:li rdf:resource='http://www.loadbang.net/rdf#Software/net.loadbang.shado/Tutorials/The Demos'/>
                <rdf:li rdf:resource='http://www.loadbang.net/rdf#Software/Nixies'/>
                <rdf:li rdf:resource='http://www.loadbang.net/rdf#Software/net.loadbang-SQL'/>
                <rdf:li rdf:resource='http://www.loadbang.net/rdf#Software/net.loadbang.web'/>
                <rdf:li rdf:resource='http://www.loadbang.net/rdf#Software/net.loadbang.shado/Workbench'/>
                <rdf:li rdf:resource='#snipsnap-search'/>
                <rdf:li rdf:resource='#nick'/>
                <rdf:li rdf:resource='http://www.loadbang.net/rdf#Software/net.loadbang.shado/README.MANUAL'/>
                <rdf:li rdf:resource='#Software'/>
                <rdf:li rdf:resource='http://www.loadbang.net/rdf#Software/textbrick'/>
                <rdf:li rdf:resource='http://www.loadbang.net/rdf#Tech Notes/MXJ Class Loading'/>
                <rdf:li rdf:resource='http://www.loadbang.net/rdf#Software/net.loadbang.shado/Tutorials/Installation'/>
                <rdf:li rdf:resource='http://www.loadbang.net/rdf#Software/net.loadbang.shado/README'/>
                <rdf:li rdf:resource='http://www.loadbang.net/rdf#Software/net.loadbang.shado/Tutorials/'/>
                <rdf:li rdf:resource='http://www.loadbang.net/rdf#Software/Registry'/>
                <rdf:li rdf:resource='http://www.loadbang.net/rdf#Tech Notes/Eclipse and MXJ'/>
            </rdf:Bag>
        </s:snipLinks>
    </s:Snip>
</rdf:RDF>
