Skip to content

Instantly share code, notes, and snippets.

@BastinRobin
Last active May 23, 2018 15:35
Show Gist options
  • Select an option

  • Save BastinRobin/437d60d59c7f0c1189401c1bca69feca to your computer and use it in GitHub Desktop.

Select an option

Save BastinRobin/437d60d59c7f0c1189401c1bca69feca to your computer and use it in GitHub Desktop.
Execution file
import sys
import time
def print_label(name, age, course, email, phone):
filename = name+'_'+course+'_'+str(time.time())
dir_name = "results";
filename = dir_name+'/'+filename
f= open(filename,"w+")
f.write(name+','+age+','+course+','+email+','+phone)
f.close()
if __name__ == '__main__':
# python run.py Robin 30 'Fullstack Dev' info@gmail.com 9787787778
print_label(sys.argv[1], sys.argv[2], sys.argv[3], sys.argv[4], sys.argv[5])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment