0

I'm trying to make a game in python at my school, but we do not have pygame installed on the network this year.

I have an idea, but I need some code to run right when a key is pressed, and I don't want the keys I type to show on the screen, I wan't my own text to show. Is there a way to do this? I've been looking around, but I haven't found much that doesn't use PyGame or TKinter

Thanks! :)

Note: This is an extra curricular project, so I probably won't be able to get help from a programming teacher.

Nathan
  • 1,287
  • 6
  • 15
  • 32
  • And you might want to edit the title so it will describe your problem, and not your whole task. Something like: How to get char from user without printing it. In python – Elisha Jan 16 '14 at 18:10
  • Thank you @Elisha . I have this now: http://justpaste.it/e43q How do I use this code though? I'm not too familliar with how classes work in python yet. – Nathan Jan 16 '14 at 18:12
  • Adding 'print(getch)' prints '<__main__._Getch object at 0x02337050>' – Nathan Jan 16 '14 at 18:14
  • shouldn't it be `print(getch())` – xor Jan 16 '14 at 18:17
  • @adil Bingo! Thanks for the help guys! None of you actually posted answers so I can't select best answer... – Nathan Jan 16 '14 at 18:23
  • @Nathan Since your question is a duplicate it's better to just close it as such. It's useless to have the same question asked and asked again with different answers with different quality. – Bakuriu Jan 16 '14 at 19:02

0 Answers0