Advertisement
Pythew

ex15.py ex15_sample.txt

May 31st, 2018
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. from sys import argv
  2.  
  3. script, filename = argv
  4.  
  5. txt = open(filename)
  6.  
  7. print "Here's your file %r:" % filename
  8. print txt.read()
  9.  
  10. print "Type the filename again:"
  11. file_again = raw_input("> ") # file_again is an assignment of the raw_input() prompt
  12.  
  13. txt_again = open(file_again)
  14.  
  15. print txt_again.read()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement