Christopher Juckins

SysAdmin Tips, Tricks and other Software Tools

User Tools

Site Tools


python_code_snippets

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
python_code_snippets [2020/10/06 07:30] juckinspython_code_snippets [2020/10/09 15:05] (current) juckins
Line 22: Line 22:
 __Date and time strings__ __Date and time strings__
  
-[[https://docs.python.org/3/library/datetime.html#strftime-and-strptime-format-codes|See format codes]]+See format codes [[https://docs.python.org/3/library/datetime.html#strftime-and-strptime-format-codes|here]] and [[https://strftime.org/|here]]
      
   from datetime import datetime   from datetime import datetime
Line 68: Line 68:
   * Use PyPi (from [[https://pypi.org/project/demjson/|demjson]] which includes JSON Lint to check for valid JSON code and make fixes   * Use PyPi (from [[https://pypi.org/project/demjson/|demjson]] which includes JSON Lint to check for valid JSON code and make fixes
     * sudo pip install demjson     * sudo pip install demjson
 +     * installs into /usr/local/bin/jsonlint
     * jsonlint data.json     * jsonlint data.json
 +    * jsonlint --help
python_code_snippets.txt · Last modified: 2020/10/09 15:05 by juckins