PyCharm Run Tool displaying large cursor, missing green text
Hi Everyone - I recently added a text file to my program, and my Run Tool window is now displaying a large cursor and no longer has green text for inputs. Is something in my code triggering this, or is there a setting? Running 3.10 on Windows 10.
Created a second program with a .txt file and Run Tool displayed properly (narrow cursor, green text), which leads me to believe it is something in the former's code. Thank you!
Please sign in to leave a comment.
Sorry, I don't exaclty understand which cursor do you mean. Could you please provide a code sample to reproduce the issue?
Thank you, Andrey. The cursor itself in the Run Tool displays in the screen below, then becomes solid when I activate the pane to interact with the program:
And here is my main.py code:
while True:
user_action = input("Type add, show, edit, complete or exit: ")
user_action = user_action.strip()
if 'add' in user_action:
todo = user_action[4:]
with open('todos.txt', 'r') as file:
todos = file.readlines()
todos.append(todo)
with open('todos.txt', 'w') as file:
file.writelines(todos)
elif 'show' in user_action:
with open('todos.txt', 'r') as file:
todos = file.readlines()
for index, item in enumerate(todos):
item = item.strip('\n')
row = f"{index + 1}-{item}"
print(row)
elif 'edit' in user_action:
number = int(user_action[5:])
print(number)
number = number - 1
with open('todos.txt', 'r') as file:
todos = file.readlines()
new_todo = input("Enter new todo: ")
todos[number] = new_todo + '\n'
with open('todos.txt', 'w') as file:
file.writelines(todos)
elif 'complete' in user_action:
number = int(user_action[9:])
with open('todos.txt', 'r') as file:
todos = file.readlines()
index = number - 1
todo_to_remove = todos[index].strip('\n')
todos.pop(index)
with open('todos.txt', 'w') as file:
file.writelines(todos)
message = f"Todo {todo_to_remove} was removed from the list."
print(message)
elif 'exit' in user_action:
break
else:
print("Command is not valid.")
print("Bye!")
You may have terminal emulation enabled for the console: https://www.jetbrains.com/help/pycharm/2023.2/run-debug-configuration.html#run-debug-parameters:~:text=Emulate%20terminal%20in%20output%20console
Try disabling it in your run/debug configuration.
Thank you, Andrey - looks like that fixed it!