473,322 Members | 1,501 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

emulate a key press

This probaly isn't possible with Python, but I thought I'd ask.

I want to emulate a key press programatically. I want the computer (G5
running Mac OSX 10.3) to think that the user has pressed the space bar on
the keyboard. Any module in Python that makes this easy? If not, I'll do
something in C.
Jul 18 '05 #1
2 4163
On 2004-02-29 11:51:54 -0500, Bart Nessux <ba*********@hotmail.com> said:
This probaly isn't possible with Python, but I thought I'd ask.

I want to emulate a key press programatically. I want the computer (G5
running Mac OSX 10.3) to think that the user has pressed the space bar on
the keyboard. Any module in Python that makes this easy? If not, I'll do
something in C.


I'm pretty sure you'll have to do that in C, I don't believe the API is
wrapped. An even easier way would be to use Pyrex to create a Python
extension for what you are trying to do.

-bob

Jul 18 '05 #2
On 2004-02-29 13:02:54 -0500, Bob Ippolito <bo*@redivi.com> said:
On 2004-02-29 11:51:54 -0500, Bart Nessux <ba*********@hotmail.com> said:
This probaly isn't possible with Python, but I thought I'd ask.

I want to emulate a key press programatically. I want the computer (G5
running Mac OSX 10.3) to think that the user has pressed the space bar on
the keyboard. Any module in Python that makes this easy? If not, I'll do
something in C.


I'm pretty sure you'll have to do that in C, I don't believe the API is
wrapped. An even easier way would be to use Pyrex to create a Python
extension for what you are trying to do.


Oh, and a better place to ask this question would probably be the
pythonmac-sig list.

-bob

Jul 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: bulk88 | last post by:
How can I emulate DOM level 1 removeChild in IE 4? I already figured out to emulate getElementById by doing this if((!document.getElementById) && document.all) {document.getElementById =...
61
by: /* frank */ | last post by:
I have to do a homework: make a CPU simulator using C language. I have a set of asm instructions so I have to write a program that should: - load .asm file - view .asm file - do a step by step...
11
by: TempestV | last post by:
Hi All, I have a front end / back end MS Access DB at my workplace. When linking the front-to-back ends in the Linked Table Manager, I specify the network location of the backend as...
14
by: Eugeny Myunster | last post by:
Hello all, How can i emulate sizeof() only for integers?
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.