Code sample Hello World

Forums: 

This is my first post. Lets see if this works.

# NX 11.0.2.7
# Journal created by UGPerson for use on NX Journaling
#Python Version 3.4

import NXOpen

def main() :

theSession = NXOpen.Session.GetSession()#: :type theSession: NXOpen.Session
workPart = theSession.Parts.Work#: :type workPart: NXOpen.BasePart
displayPart = theSession.Parts.Display#: :type displayPart: NXOpen.BasePart
lw = theSession.ListingWindow#: :type lw: NXOpen.ListingWindow

lw.Open()
lw.WriteLine("Hello World")

if __name__ == '__main__':
main()

Thanks for the code sample, we could use more python around here!

Thanks. I am still new to coding in python and NX and figured what better way to learn than trying to explain how to do this for others.