Closed CharlRae closed 2 years ago
Program won't run outside of IDLE
Python 3.9.2
` def life_loss_messages_create(): p_life_loss_messages = [] life_loss_messages_file = open("life_loss_messages.txt", "r")
for message_line in life_loss_messages_file: message_line.strip() this_line = message_line.split("-") p_life_loss_messages.append(this_line) life_loss_messages_file.close() return p_life_loss_messages
`
The sub program should return a 2D array using data from the text file
Program only executes properly in IDLE. If run by itself, it will exit the program as soon as the sub program is called.
Subject of the issue
Program won't run outside of IDLE
Your environment
Python 3.9.2
Steps to reproduce
` def life_loss_messages_create(): p_life_loss_messages = [] life_loss_messages_file = open("life_loss_messages.txt", "r")
`
Expected behaviour
The sub program should return a 2D array using data from the text file
Actual behaviour
Program only executes properly in IDLE. If run by itself, it will exit the program as soon as the sub program is called.