"elis aeris" <[EMAIL PROTECTED]> wrote >I need to keep a bit of python code ready to run at anytime, in the >ram, but > this is what I need to do > > I am using two languages at the same time, because python doesn't > really > have any effective way of simulating keyboard and mouse events,
This depends a lot on what the other language offers in the way of inter-process communications. If it can send signals then a simple signal and file sharing scheme may work. Or if it can use sockets you can very simply get the two processes communicating. If it can do http calls to a web server you could run your python code under a simple web server and use that. There are lots of options but it depernds on what your other language can do, it might be easier to endure the pain of using Python to read the keyboard and events, depending on how complex the events are, but I agree its not the easiest thing to do. It might even be easier to get the other language to do what Python does?! But again it depends on how powerful that language is. > so I need to run auto it 3, Never heard of it so can't comment on specifics. > if i I can keep the code alive in the ram waiting for the cue, then > it > should run fast enough. Keeping a process running in memory is not difficult. Assuming you are on Windows google for Windows Services. But you could just keep a user app running iconified if you prefer. > but how do I pass information from one code to the other? As above,. there are lots of ways from sharing a file or database table through to inter process calls via sockets or web services. HTH, -- Alan Gauld Author of the Learn to Program web site http://www.freenetpages.co.uk/hp/alan.gauld _______________________________________________ Tutor maillist - [email protected] http://mail.python.org/mailman/listinfo/tutor
