Skip to content

Commit 020af5c

Browse files
committed
add option for alternative pico_configs.tsv file
1 parent 3716ca0 commit 020af5c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pico_project.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -762,6 +762,7 @@ def CheckSDKPath(gui):
762762
def ParseCommandLine():
763763
parser = argparse.ArgumentParser(description='Pico Project generator')
764764
parser.add_argument("name", nargs="?", help="Name of the project")
765+
parser.add_argument("-t", "--tsv", help="Set an alternative pico_configs.tsv file", default="pico_configs.tsv")
765766
parser.add_argument("-o", "--output", help="Set an alternative CMakeList.txt filename", default="CMakeLists.txt")
766767
parser.add_argument("-x", "--examples", action='store_true', help="Add example code for the Pico standard library")
767768
parser.add_argument("-l", "--list", action='store_true', help="List available features")
@@ -1019,7 +1020,7 @@ def generateProjectFiles(projectPath, projectName, sdkPath, projects):
10191020

10201021
def LoadConfigurations():
10211022
try:
1022-
with open("pico_configs.tsv") as tsvfile:
1023+
with open(args.tsv) as tsvfile:
10231024
reader = csv.DictReader(tsvfile, dialect='excel-tab')
10241025
for row in reader:
10251026
configuration_dictionary.append(row)

0 commit comments

Comments
 (0)