Created
May 4, 2018 01:19
Help Max computerize snakes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! usr/bin/env python3 | |
#This script will compile lifetime rattle profiles of long term snakes and spit out their ID and a list of segment values, newest to oldest | |
#load required modules | |
import sys | |
import os | |
import re | |
import argparse | |
def get_args(): | |
#create an ArgumentParser object ('parser') | |
parser = argparse.ArgumentParser() | |
#add required arguments | |
parser.add_argunent("txt", help="name of the txt, tab delimited, data file") | |
#parse the arguments | |
return parser.parse_args() | |
def parse_file(): | |
#open the txt file | |
# make the reference to the file a string | |
complete = open('whatever-file-you-are-parsing.txt', 'r') | |
print(complete) | |
def build_lists(): | |
# add anything in here so it closes the function | |
variableToMakeCompilerHappy = 'Pike Mouth help you.' | |
def main(): | |
# take out complete | |
parse_file() | |
main() | |
# I made a file named 'whatever-file-you-are-parsing.txt' | |
# in the project directory | |
# | |
# Here's the output I get when I run that: | |
# | |
# `<open file 'whatever-file-you-are-parsing.txt', mode 'r' at 0x106ff24b0>` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment