Advertisement
Guest User

Untitled

a guest
Sep 24th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. Traceback (most recent call last):
  2. File "comandos.py", line 5, in <module>
  3. datos=info.readlines()
  4. AttributeError: 'CompletedProcess' object has no attribute 'readlines'
  5.  
  6. import subprocess
  7. comando=("ipconfig")
  8. info=subprocess.run((comando),shell=True)
  9. datos=info.readlines()
  10. fichero=open("datos", "w")
  11. fichero.writelines(info)
  12. fichero.close()
  13. print("El nombre del fichero es datos")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement