>>2
First of all, thanks for the reply. The specifics:
*It's text-based (command prompt in my case)
*I don't mind exiting (it's necessary, actually)
*I want to send everything blindly
This should be easy, then? You don't have to do everything, give me some help and I'll try to walk with my own legs!
About the other cheating solutions, yes, I agree, they're easier. But communicating with another program seems to be an useful concept to grasp, so I'm trying to kill two birds with one stone. The problem is everything I could find about it was based on client/server programming. I'd like to start slow, with something like this. If you provide some info and I understand this (seemingly simple) case, I may tackle the rest later.
>>3
I'm on Windows (sorry, I thought this was simple and the platform wouldn't matter).
I was going for something different than that. Since nethack saves the game when you exit, I wanted to input the number of characters to be generated, let's say 100. Then, the program would run nethack, generate, exit, rename the savefile, run, generate, exit, rename... 100 times. Then I'd select the best savefile and use it. I was planning on writing the statistics of each character generated in a text file, but for that the program would need to read the prompt, so I don't know how much that would complicate things.
Either way is fine by me. Pick the one you consider the easiest and tell me how to do it!