By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,908 Members | 1,838 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,908 IT Pros & Developers. It's quick & easy.

Small utility program for the windows

P: n/a

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[i]
baseClass.mainloop()

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

This message contains information that may be privileged or confidentialand is the property of the Capgemini Group. It is intended only for theperson 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 thismessage in error, please notify the sender immediately and delete all copies of this message.

Oct 24 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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

"Iyer, Prasad C" <pr***********@capgemini.com> wrote in message news:ma*************************************@pytho n.org...

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[i]
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.


----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= East/West-Coast Server Farms - Total Privacy via Encryption =---
Oct 26 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.