Simple beginner question:
I've created a small python script to toggle between two files I'm using for testing.
My question is, what is a good python format style for the following code:
import filecmp
import shutil
local = "local.txt"
remote = "remote.txt"
config_file = "C:\some\path\file.txt"
shutil.copyfile( remote if( filecmp.cmp(local, config_file ) ) else local, config_file )
Or
shutil.copyfile( remote
if( filecmp.cmp(local, config_file ) )
else local,
config_file )
Or
tocopy = remote if( filecmp.cmp( local, config_file ) ) else local
shutil.copyfile( tocopy, config_file )
Or what?
Also, what is the preffered way to name var in python for many-word names, is it "to_copy", "tocopy", "toCopy", "ToCopy"
Thanks.