User Tools

Site Tools


python:python

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
python:python [2024/02/27 15:07] – Fix style dblumepython:python [2024/02/27 15:43] (current) – [Linux script that takes either stdin or files] dblume
Line 80: Line 80:
 ===== Linux script that takes either stdin or files ===== ===== Linux script that takes either stdin or files =====
  
 +Newer way, **use [[https://docs.python.org/3/library/fileinput.html|module fileinput]]**. Older way:
 <code python> <code python>
 if __name__=='__main__': if __name__=='__main__':
python/python.txt · Last modified: 2024/02/27 15:43 by dblume