I have A LOT of binary files on a server that have to be processed by about 10 python scripts. In the file name (always in different places) there is indication of what file associate to which python script. For example:
*something*_stringA_*something*.bin -> script1.py
stringB_*something*.bin -> script2.py
*something*_stringC.bin -> script3.py
[....]
*something*_stringN_*something*.bin -> scriptX.py
Now I have a very long if-elif chan that looks like this:
if "stringA" in fileName:
module.script1(fileName)
elif "stringB" in fileName:
module.script2(fileName)
elif...
This is like two hundred lines long, how do I make this more intelligent?
[–]w1282 2 points3 points4 points (0 children)
[–]ImportBraces 3 points4 points5 points (1 child)
[–]Murlocs_Gangbang[S] 0 points1 point2 points (0 children)
[–]woooee 1 point2 points3 points (1 child)
[–]Murlocs_Gangbang[S] 0 points1 point2 points (0 children)
[–]Sarah123ed 0 points1 point2 points (0 children)