~/.treb_wordpress
is a hidden folder (the dot makes it hidden) in your account's home folder. This is usually one level up from public_html
. When you create the folder, be sure to include the dot. The configuration file must reside here. The remaining files can go anywhere except under public_html.
The script is not run from WordPress, it is run from the server's terminal. In order to run the script, you will need to change directory to where ever you put the script. If it is tagged as an executable, to run the script just enter the filename at the terminal prompt. Otherwise precede the filename with python
(separated with a space).