Back to index

plone3  3.1.7
Classes | Functions
ExternalEditor.Plugins.homesite5 Namespace Reference

Classes

class  EditorProcess

Functions

def test

Function Documentation

Definition at line 51 of file homesite5.py.

00051 
00052 def test():
00053     import os
00054     from time import sleep
00055     from tempfile import mktemp
00056     fn = mktemp('.html')
00057     f = open(fn, 'w')
00058     f.write('<html>\n  <head></head>\n  <body>\n  </body>\n</html>')
00059     f.close()
00060     print 'Connecting to HomeSite...'
00061     f = EditorProcess(fn)
00062     print 'Attached to %s %s' % (`f.hs`, f.hs.VersionText)
00063     print ('%s is open...' % fn),
00064     if f.isAlive():
00065         print 'yes'
00066         print 'Test Passed.'
00067     else:
00068         print 'no'
00069         print 'Test Failed.'