Source code: py_everything/

This module contains methods that automate certain things or tasks such as sending a mail.

py_everything.automation.sendEmail(sendAddr, password, recvAddr, body, server, port, sub='No Subject')

Sends email to recvAddr from sendAddr. With body as mail body and sub as mail subject. Uses server and port to send the mail.

  • sendAddr (str) – The address you want the mail to be sent from.

  • password (str) – To login to the email account.

  • recvAddr (str) – The address to which the mail is to be sent.

  • body (str) – The main body of the email.

  • server (str) – The server through which the mail should be sent.

  • port (str) – The port at which the server is listening.

  • sub (str) – The optional subject of the mail. Defaults to ‘No Subject’ if not specified.

Returns bool

True if mail gets sent successfully.


Less secure app access should be turned on for Gmail. IMAP/POP Forwarding should be enabled in mail settings for this to work. Alos, the server and port should be correct.


Slices an email address and returns username and domain separately.


fullAddr (str) – The full address you want to slice.

Returns tuple

Contaning username and domain..;


Rolls dice and returns value between 1 and 6 if dice1=True else returns value between 1 and 12.


dice1 (str) – Boolean to understand if 1 dice to roll or 2 dice.

Returns int

Value between 1 and 6 or 1 and 12.

py_everything.automation.timer(seconds, audioFile)

Starts a timer for seconds and plays audioFile when finished.


seconds (int) – How many seconds should the timer be for.


Starts exePath.


exePath (str) – Full path to the exe to be launched.

Returns bool

True if exe starts successfully.


error.startAppFailedError – This exception is raised if exe was not started successfully. Maybe due to an incorrect path.