Skip to content

Commit e8ec7eb

Browse files
authored
Initial Commit
0 parents  commit e8ec7eb

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

pyreadscript.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
def pyreadscript(filename):
2+
if filename.endswith('.pyreadscript'):
3+
with open(filename, 'r') as file:
4+
returnedscript = file.read()
5+
exec(returnedscript)
6+
else:
7+
print("Error: Must be a .pyreadscript file. - ID=1")
8+
9+
# Compatible file
10+
pyreadscript('script.pyreadscript')
11+

script.pyreadscript

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
print("Hello world!s)

0 commit comments

Comments
 (0)