Skip to content
This repository was archived by the owner on Jan 26, 2024. It is now read-only.

wdhowe/python-snippets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

python-snippets

Snippets of python code to showcase examples of certain concepts.


Directories

  • unit-tests -> Unit test examples

Files

  • home_path.py -> Display current user's home path
  • flask_systems_list.py -> Simple Flask app using restful API endpoints
  • key_value_config.py -> Use keys and values from config files
  • list_dictionaries_with_list.py -> Nested list,dict,list data structure example
  • logging_example.py -> Using syslog functionality in Python scripts
  • print_file_pythonic.py -> Print a file line by line with automatic closing
  • print_status_msg.py -> Display status messages via print buffer flush
  • random_character_test.py -> Generate random characters for a string
  • requests_xkcd.py -> Using the requests module to retrieve website data
  • sockets_client.py -> Basic socket client, connects to server
  • sockets_server.py -> Basic socket server, accepts client connections
  • string_matching.py -> Different ways to match/search strings
  • template.py -> Template for Python scripting. Main function and argparse.
  • try_except.py -> Show try,except,finally examples
  • word_count.py -> Count occurences of words in a list

About

Python syntax examples.

Topics

Resources

License

Stars

Watchers

Forks

Languages

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy