Okay, my first question is about wxpython's registerhotkey.
As far as I can find, there are not letter key keycodes.
This example relies on the win32con module:

def regHotKey(self):
"""
This function registers the hotkey Alt+F1 with id=100
"""
self.hotKeyId = 100
self.RegisterHotKey(
self.hotKeyId,
win32con.MOD_ALT,
win32con.VK_F1) -- I want to be able to replace this with a letter key. Is there any way to do that, or am I stuck with whatever keycodes are provided by win32con?


And my second question is completely unrelated. I am using os.system(command) to start command line commands. Would it be faster or more efficient if I used os.startfile(command.bat) where command.bat contains the commands, or maybe os.system('start command.bat')?

Im thinking that you might be stuck, they would only have a few letter codes if they only supported a few. I couldn't find a way around it.

And for the system question, i generally use startfile but i think its much of a muchness as to which is faster. I think there is a way to time the functions... search "timing" in this forum. That might get you a way to do it.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.