RE: Call Signtool using python
I think you need to use the /p switch to pass signtool.exe a password when using the /f switch. Check out http://msdn.microsoft.com/en-us/library/8s9b9yaz%28VS.80%29.aspx for more info. --- The information contained in this electronic message and any attached document(s) is intended only for the personal and confidential use of the designated recipients named above. This message may be confidential. If the reader of this message is not the intended recipient, you are hereby notified that you have received this document in error, and that any review, dissemination, distribution, or copying of this message is strictly prohibited. If you have received this communication in error, please notify sender immediately by telephone (603) 262-6300 or by electronic mail immediately. Thank you. -Original Message- From: python-list-bounces+mmitchell=transparent@python.org [mailto:python-list-bounces+mmitchell=transparent@python.org] On Behalf Of enda man Sent: Tuesday, March 02, 2010 6:34 AM To: python-list@python.org Subject: Call Signtool using python Hi, I want to call the Windows signtool to sign a binary from a python script. Here is my script: // os.chdir('./Install/activex/cab') subprocess.call(["signtool", "sign", "/v", "/f", "webph.pfx", "/t", "http://timestamp.verisign.com/scripts/timstamp.dll";, "WebPh.exe" ]) // But I am getting this error: SignTool Error: The specified PFX password is not correct. Number of files successfully Signed: 0 Number of warnings: 0 Number of errors: 1 Finished building plugin installer scons: done building targets. This python script is called as part of a scons build, which is also python code. Anyone seen this before or can pass on any ideas. Tks, EM -- http://mail.python.org/mailman/listinfo/python-list -- http://mail.python.org/mailman/listinfo/python-list
Is there a better way to do this?
Hi, I wrote a python script that uses pysvn to export projects from an svn repo I have. The repo has hundreds of projects in it with a directory structure that is pretty uniform however it's not exactly uniform because of the capitalization. I.e.: \root \project English \Stuff \Stuff 2 \Project Spanish \Stuff 3 \Stuff 4 My svn repo is case sensitive so if I try to get \root\project Spanish\Stuff 3 I get an error. Fixing the capitalization is not an option for me. My initial idea was to make a list of all the different ways "project" has been capitalized in my repo and try each one. The code looks like this: import pysvn def getstuff(stuffiwant, languageiwantitin): projects = ("project %s/", "Project %s/", "pRojects %s/") c = pysvn.Client() for p in projects: exportme = p % languageiwantitin exportme = "http://localhost/"; + exportme + stuffiwant try: c.export(exportme, "C:\\temp\\") break except pysvn.ClientError: print "Not the right capitalization." # do the rest of the stuff I need to do. This works, but to me it seems like there has to be a better way of doing it. Any feedback or suggestions would be appreciated. Thanks, Matt -- http://mail.python.org/mailman/listinfo/python-list
RE: Gray Hat Python: Python Programming for Hackers Soft copy
You mean like: http://nostarch.com/ghpython.htm From: python-list-bounces+mmitchell=transparent@python.org [mailto:python-list-bounces+mmitchell=transparent@python.org] On Behalf Of Elf Scripter Sent: Friday, November 20, 2009 3:31 PM To: python-list@python.org Subject: Gray Hat Python: Python Programming for Hackers Soft copy Hi i`m looking for a place to get a soft copy of 'Gray Hat Python: Python Programming for Hackers' may be a pdf or chm format. Thank you --- The information contained in this electronic message and any attached document(s) is intended only for the personal and confidential use of the designated recipients named above. This message may be confidential. If the reader of this message is not the intended recipient, you are hereby notified that you have received this document in error, and that any review, dissemination, distribution, or copying of this message is strictly prohibited. If you have received this communication in error, please notify sender immediately by telephone (603) 262-6300 or by electronic mail immediately. Thank you. -- http://mail.python.org/mailman/listinfo/python-list
RE: XML root node attributes
--- The information contained in this electronic message and any attached document(s) is intended only for the personal and confidential use of the designated recipients named above. This message may be confidential. If the reader of this message is not the intended recipient, you are hereby notified that you have received this document in error, and that any review, dissemination, distribution, or copying of this message is strictly prohibited. If you have received this communication in error, please notify sender immediately by telephone (603) 262-6300 or by electronic mail immediately. Thank you. -Original Message- From: python-list-bounces+mmitchell=transparent@python.org [mailto:python-list-bounces+mmitchell=transparent@python.org] On Behalf Of Slafs Sent: Tuesday, November 17, 2009 9:20 AM To: python-list@python.org Subject: XML root node attributes Hi I'm little confused about adding attributes to the root node when creating an XML document. Can I do this using minidom or something else. I can't find anything that would fit my needs. i would like to have something like this: Please help. Regards. -- http://mail.python.org/mailman/listinfo/python-list Hi, I'm sure someone will point out a better way to do it but yes, you can do it with minidom. from xml.dom.minidom import Document doc = Document() root = doc.createElement('root') root.setAttribute('a', 'v') root.setAttribute('b', 'v2') root.setAttribute('c', '3') doc.appendChild(root) d = doc.createElement('d') root.appendChild(d) print doc.toprettyxml() -- http://mail.python.org/mailman/listinfo/python-list
RE: tkFileDialog question
--- The information contained in this electronic message and any attached document(s) is intended only for the personal and confidential use of the designated recipients named above. This message may be confidential. If the reader of this message is not the intended recipient, you are hereby notified that you have received this document in error, and that any review, dissemination, distribution, or copying of this message is strictly prohibited. If you have received this communication in error, please notify sender immediately by telephone (603) 262-6300 or by electronic mail immediately. Thank you. -Original Message- From: python-list-bounces+mmitchell=transparent@python.org [mailto:python-list-bounces+mmitchell=transparent@python.org] On Behalf Of r Sent: Monday, November 16, 2009 12:16 AM To: python-list@python.org Subject: Re: tkFileDialog question Matt, There is also a nice thing you need to know about Python if you already do not know. That is the fact that all empty collections bool to False. This makes Truth testing easier. >>> bool([]) False >>> bool('') False >>> bool({}) False >>> bool([1]) True >>> bool([[]]) True >>> bool(' ') True any empty collection, string, or 0 always bools to False. -- http://mail.python.org/mailman/listinfo/python-list Thank you both for all the help. Your suggestions have helped clean up a bunch of my code. Thanks! Matt -- http://mail.python.org/mailman/listinfo/python-list
RE: tkFileDialog question
--- The information contained in this electronic message and any attached document(s) is intended only for the personal and confidential use of the designated recipients named above. This message may be confidential. If the reader of this message is not the intended recipient, you are hereby notified that you have received this document in error, and that any review, dissemination, distribution, or copying of this message is strictly prohibited. If you have received this communication in error, please notify sender immediately by telephone (603) 262-6300 or by electronic mail immediately. Thank you. -Original Message- From: python-list-bounces+mmitchell=transparent@python.org [mailto:python-list-bounces+mmitchell=transparent@python.org] On Behalf Of Matt Mitchell Sent: Friday, November 13, 2009 9:33 AM To: python-list@python.org Subject: tkFileDialog question Hi, This is my first attempt to write a script with any kind of gui. All I need the script to do is ask the user for a directory and then do stuff with the files in that directory. I used tkFileDialog.askdirectory(). It works great but it pops up an empty tk window. Is there any way to prevent the empty tk window from popping up? Here's the code: import tkFileDialog answer = tkFileDialog.askdirectory() if answer is not '': #do stuff Thanks! Matt -- http://mail.python.org/mailman/listinfo/python-list Hi, After a few more hours of googling I answered my own question: import Tkinter, tkFileDialog root = Tk() root.withdraw() answer = tkFileDialog.askdirectory() if answer is not '': #do stuff Thanks!! -- http://mail.python.org/mailman/listinfo/python-list
tkFileDialog question
Hi, This is my first attempt to write a script with any kind of gui. All I need the script to do is ask the user for a directory and then do stuff with the files in that directory. I used tkFileDialog.askdirectory(). It works great but it pops up an empty tk window. Is there any way to prevent the empty tk window from popping up? Here's the code: import tkFileDialog answer = tkFileDialog.askdirectory() if answer is not '': #do stuff Thanks! Matt -- http://mail.python.org/mailman/listinfo/python-list