Back to index

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

Classes

class  EditorProcess

Functions

def test

Function Documentation

Definition at line 100 of file excel.py.

00100 
00101 def test():
00102     import os
00103     from time import sleep
00104     from tempfile import mktemp
00105     fn = mktemp('.html')
00106     f = open(fn, 'w')
00107     f.write('<html>\n  <head></head>\n<body>\n'
00108             '<table><tr><th>Column 1</th><th>Column 2</th></tr>' 
00109             '<tr><td>1234</td><td>3689</td></tr>'
00110             '<tr><td>2345</td><td>3789</td></tr>'
00111             '<tr><td>3456</td><td>3889</td></tr>'
00112             '</body>\n</html>')
00113     f.close()
00114     print 'Connecting to Excel...'
00115     f = EditorProcess(fn)
00116     print 'Attached to %s %s' % (`f.excelapp`, f.excelapp.Version)
00117     print ('%s is open...' % fn),
00118     if f.isAlive():
00119         print 'yes'
00120         print 'Test Passed.'
00121     else:
00122         print 'no'
00123         print 'Test Failed.'