forked from geekcomputers/Python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtestlines.py
More file actions
19 lines (12 loc) · 567 Bytes
/
testlines.py
File metadata and controls
19 lines (12 loc) · 567 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# Script Name : testlines.py
# Author : Craig Richards
# Created : 08th December 2011
# Last Modified :
# Version : 1.0
# Modifications : beven nyamande
# Description : This very simple script open a file and prints out 100 lines of whatever is set for the line variableest you want to print\n" # This sets the variable for the text that you want to print
def write_to_file(filename,txt):
with open(filename,'w') as file_object:
s = file_object.write(txt)
if __name__ == '__main__':
write_to_file('test.txt', 'i am beven')