~ Mayank Johri’s Tips ~

June 30, 2008

Setting wx.TextCtrl readonly

Filed under: Python — mayankjohri @ 2:36 pm
Tags:

Simply use the following code:

txtCtrl.SetEditable(False)
# Also its a good idea to change the backgroud colour so user will know that is has became readonly.
txtCtrl.SetBackgroundColour((255,23,23))

June 10, 2008

TIPS: WX.Python.Grid: Removing the selected Rows

Filed under: Python, Tips — mayankjohri @ 1:27 pm
lst = None
no = self.grid_ShareDetails.GetNumberRows()
lst = sorted(self.grid_ShareDetails.GetSelectedRows())
lst.reverse()
for l in lst:    
    self.grid_ShareDetails.DeleteRows(l,1)

June 9, 2008

PitHole: Windows : The specified service has been marked for deletion

Filed under: Windows — mayankjohri @ 1:30 pm
Tags:

When I try to install the install a service which i have just delete using sc command i get the following error :

“The specified service has been marked for deletion”.

Just close the services.msc and try again. otherwise one might have to restart the machine :( to resolve the issue.

June 4, 2008

PitHole: RPM : “warning, user XXX does not exist – using root”

Filed under: Linux, Packaging — mayankjohri @ 2:53 pm
Tags:
If while installing rpm package following error occurs
warning: user XXX does not exist – using root

Issue : I’m trying to build/install an rpm and it keeps giving me these warnings while installing the binary. Though I heard this could be safely ignored as its bcos there is no user XXX on my box, was wondering if there is a way to supress this in the rpm spec file itself. I know I could also manually build it as root. But curious if we could supress this from the spec.

Resolution:

Add the following in the spec file and recompile the spec file

%defattr(-,root,root)

Blog at WordPress.com.