Skip to content

Instantly share code, notes, and snippets.

@ApexExpress
Created October 18, 2023 02:28
Show Gist options
  • Save ApexExpress/46fef73d94a4057bb1588d5356cfe4a8 to your computer and use it in GitHub Desktop.
Save ApexExpress/46fef73d94a4057bb1588d5356cfe4a8 to your computer and use it in GitHub Desktop.
File creation via python
def main():
test = "path/goto/TEST.sh*"
config = "path/goto/CONFIG.sh*"
src = "path/goto/SRC.sh*"
path = "path/goto/PATH.sh*"
route = "path/goto/ROUTE.sh*"
try:
with open(test, "w") as test_file, \
open(config, "w") as config_file, \
open(src, "w") as src_file, \
open(path, "w") as path_file, \
open(route, "w") as route_file:
print("Files created successfully.")
except Exception as e:
print(f"Failed to create files: {str(e)}")
if __name__ == "__main__":
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment