Small utility program for the windows

I

Iyer, Prasad C

Hi,
I am trying to create a small utility program which would be configured
in registry. Something like this
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\*\shell\ShortCut\command]
@="\"python C:\\workspace\\python\\Tut\\ShortCut.py\""


It gives me access denied exception when I try it.
Can anyone help me out.
Following is the code

from Tkinter import *
import sys

class BaseClass(Frame):
def __init__(self, master=None):
Frame.__init__(self, master)
self.grid()
self.createWidget()
def createWidget(self):
self.text=Text(self, width=20, height=3)
self.text.grid(row=0,column=0)
Button(self, text="ok", command=self.addText).grid(row=1,
column=0)
def addText(self):
print "hello world"

baseClass=BaseClass()
print sys.argv[0]
for i in range(0, len(sys.argv)):
print sys.argv
baseClass.mainloop()



I have to modify the code further so that it takes argument.

This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.
 
R

Roger Upole

It works fine for me (XP, Python 2.4.2).
Where exactly do you get the access denied ?
When writing to the registry, or trying to start python,
or within the python code ?

Roger


Hi,
I am trying to create a small utility program which would be configured
in registry. Something like this
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\*\shell\ShortCut\command]
@="\"python C:\\workspace\\python\\Tut\\ShortCut.py\""


It gives me access denied exception when I try it.
Can anyone help me out.
Following is the code

from Tkinter import *
import sys

class BaseClass(Frame):
def __init__(self, master=None):
Frame.__init__(self, master)
self.grid()
self.createWidget()
def createWidget(self):
self.text=Text(self, width=20, height=3)
self.text.grid(row=0,column=0)
Button(self, text="ok", command=self.addText).grid(row=1,
column=0)
def addText(self):
print "hello world"

baseClass=BaseClass()
print sys.argv[0]
for i in range(0, len(sys.argv)):
print sys.argv
baseClass.mainloop()



I have to modify the code further so that it takes argument.

This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is
intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read,
print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error,
please notify the sender immediately and delete all copies of this message.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top