AutomateTheBoringStuff.Ch06 package

Submodules

AutomateTheBoringStuff.Ch06.P1_catnapping module

Cat napping

This program prints a message for Alice using a multi-line string with triple quotes.

AutomateTheBoringStuff.Ch06.P1_catnapping.main()[source]

AutomateTheBoringStuff.Ch06.P2_great module

Great

This program asks how you’re doing and responds by filtering input through an if-else statement.

AutomateTheBoringStuff.Ch06.P2_great.main()[source]

AutomateTheBoringStuff.Ch06.P3_validateInput module

Validate input

This program asks for numerical age and alphanumeric password until they are valid inputs.

AutomateTheBoringStuff.Ch06.P3_validateInput.main()[source]

AutomateTheBoringStuff.Ch06.P4_picnicTable module

Picnic table

This program prints a table of everything taken to a picnic using a dictionary with two different sets of left and right justification.

AutomateTheBoringStuff.Ch06.P4_picnicTable.main()[source]
AutomateTheBoringStuff.Ch06.P4_picnicTable.printPicnic(itemsDict: dict, leftWidth: int, rightWidth: int) → None[source]

Print picnic

Prints given picnic dictionary with given justification.

Parameters:
  • itemsDict – Dictionary with picnic items as keys and amounts as values.
  • leftWidth – Left justification of keys.
  • rightWidth – Right justification of values.
Returns:

None. Prints out dictionary with justification.

AutomateTheBoringStuff.Ch06.P5_pw module

Password locker

An insecure password locker program. This program stores different passwords as key value pairs in a dictionary. Keys are the name of the account and the values are the passwords for each account.

AutomateTheBoringStuff.Ch06.P5_pw.main() → None[source]

P5_pw.py

If given account name is in the dictionary, the matching password is copied to the clipboard via pyperclip. Otherwise, an error is printed.

Returns:None. Status or error messages are printed.

Note

If called without arguments, program exits with error message.

AutomateTheBoringStuff.Ch06.P6_bulletPointAdder module

Bullet point adder

Adds Wikipedia style bullet points to the start of each line of text on the clipboard.

AutomateTheBoringStuff.Ch06.P6_bulletPointAdder.main()[source]

Module contents