I am trying to test my code in different environments, test , prod ... I am planning to create a .env file and setting values for test and prod. but i have some declarations, line number 2 in sample below. i only need that when i run in local machine. how can i pass on an argument via command line, say main.py local and only then it executes at line else ignores it.
main.py
#connect to our cluster
1. from elasticsearch import Elasticsearch
#local mode only
2. ec2 = boto3.Session(profile_name='dev', region_name='eu-west-1').client('ec2')
if __name__ = "__main__"