0
 def startdataprocessing (self, widget):
    text_file = open("SRAIdFromPythonInput.txt", "w")
for item in text_file:
    execute('bash ./oneclickdataprocessor.sh')
text_file.close()

I have error text_file is not defined. How to fix that? Is it correct to call .sh script over every item in .txt file or I should use Linux shell embedded for loops?

martineau
  • 112,593
  • 23
  • 157
  • 280
Mat29
  • 7
  • 3

1 Answers1

0

In terms of your script

text_file = open("SRAIdFromPythonInput.txt", "w")
for item in text_file:
    execute('bash ./oneclickdataprocessor.sh')
text_file.close()

For calling external shell files consider the subprocess module. More in this question

Community
  • 1
  • 1
jmk
  • 446
  • 1
  • 4
  • 20