Skip to content

Instantly share code, notes, and snippets.

@maphew
Created June 10, 2013 07:36
Show Gist options
  • Save maphew/5747093 to your computer and use it in GitHub Desktop.
Save maphew/5747093 to your computer and use it in GitHub Desktop.
a test node for Run Elevated leo button script -- https://gist.github.com/maphew/5734699
<?xml version="1.0" encoding="utf-8"?>
<!-- Created by Leo (http://webpages.charter.net/edreamleo/front.html) -->
<?xml-stylesheet ekr_test?>
<leo_file xmlns:leo="http://www.leo-editor.org/2011/leo" >
<leo_header file_format="2"/>
<vnodes>
<v t="maphew.20130608014320.1741"><vh>Run Elevated test</vh></v>
</vnodes>
<tnodes>
<t tx="maphew.20130608014320.1741">import os, sys
testfile = 'c:/windows/__delete_this_file__'
f = open(testfile,'w')
f.write('this is a dummy file for Leo run-elevated button script, please get rid of it\n')
f.close()
print('Look for {} and remove it. If it does not exist, the test has failed'.format(testfile))
os.startfile('c:/windows')
</t>
</tnodes>
</leo_file>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment