Problems to list *all* mountedwindows partitions
I do have a script which shows me the mounted partitions: c = wmi.WMI ('localhost') for disk in c.Win32_DiskPartition (DriveType=3): diskspace = int(disk.FreeSpace)/100 if diskspace mfspace: trigger = True ldisks.append(disk.Name +'\\ '+str('{0:,}'.format(diskspace).replace(,, .))+' MByte\t *LOW_DISK_SPACE*') else: ldisks.append(disk.Name+'\\ '+str('{0:,}'.format(diskspace).replace(,, .))+' MByte\t *OK*') Unfortunetly it only shows partitions mounted to a character (e.g. c: d:). There is another physical partition mounted in d:\www1 which isn't shown. Any idea how to add those partitions as well? -- http://mail.python.org/mailman/listinfo/python-list
convert assembly data (double words and bytes) in two tupple
I have two assembly data txt files, one has the structure: 0E1459D1Fh, 0AB58FAAEh, 4303E35Bh, 55FA3020h, 0E66D76ADh, 0EF434544h, ... and the other has the structure: 53h, 6, 6Bh, 0D4h, 40h, 35h, 0B5h, 33h, 0AFh, 30h, 0B3h, 66h, ... (I removed the dd and db with awk) Now I want both of them in a tupple (like map1 = ( ... ) and map2 = ( ...) in my source code so I can index them.. Any idea how to give python a hint that the h at the end of the number means it's a hex number? Or do I have to torture myself with regex to get it right? -- http://mail.python.org/mailman/listinfo/python-list
[issue10002] Installer doesn't install on Windows Server 2008 DataCenter R2
joblack johannes.bl...@gmail.com added the comment: No it seems a problem of the installation routine. If you have installed a program before Python it sometimes doesn't work. On 11/20/2010 03:59 AM, Brian Curtin wrote: Brian Curtincur...@acm.org added the comment: joblack - are you still seeing issues with this? -- ___ Python trackerrep...@bugs.python.org http://bugs.python.org/issue10002 ___ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10002 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10002] Installer doesn't install on Windows Server 2008 DataCenter R2
New submission from joblack johannes.bl...@gmail.com: I tried to install the 32 Bit Python 2.7 Version (32 Bit version because of some 32 bit plugins) on a Windows Server 2008 DataCenter R2 and short at the end it throws the attached error message. Have you tried your Python 2.7 on a Windows Server 2008 R2? -- components: Installation files: python27bug.png messages: 117760 nosy: joblack priority: normal severity: normal status: open title: Installer doesn't install on Windows Server 2008 DataCenter R2 versions: Python 2.7 Added file: http://bugs.python.org/file19071/python27bug.png ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10002 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10002] Installer doesn't install on Windows Server 2008 DataCenter R2
Changes by joblack johannes.bl...@gmail.com: -- type: - crash ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10002 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10002] requested log file
joblack johannes.bl...@gmail.com added the comment: requested log file -- title: Installer doesn't install on Windows Server 2008 DataCenter R2 - requested log file Added file: http://bugs.python.org/file19075/python.zip ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10002 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10002] cbs.log
joblack johannes.bl...@gmail.com added the comment: cbs.log -- title: Installer doesn't install on Windows Server 2008 DataCenter R2 - cbs.log Added file: http://bugs.python.org/file19077/CBS.zip ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10002 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
polymorphic function question
Let's say I've got a function with def doesSomething(A='bla'): ... and I try to call it with a non existent variable with doesSomething(DoesNotExist) What will happen? Will it throw an exception or will it take the defautl value? -- http://mail.python.org/mailman/listinfo/python-list
pycrypto rsa string decryption
I have an encrypted string and a key string (512 bits long). After studying the pycrypto documentation I still don't get how to read the private key and decrypt the string. - read the 512 bit string as private key - decrypt the encrypted string with rsa Any short code example how to do that? Greetings and thanks -- http://mail.python.org/mailman/listinfo/python-list
Re: Errno 9] Bad file descriptor
Where does the error occur? If Cameron is right, it occurs somewhere completely different, when serializer.dump() is already long done, when some unsuspecting fool tries to do something with serializer.outf (such as closing it) I have found it but still I don't get it. Dump looks like this: ... File C: ... ineptpdf8.4.20.pyw, line 1266, in initialize return self.initialize_fopn(docid, param) File C: ... ineptpdf8.4.20.pyw, line 1411, in initialize_fopn print buildurl IOError: [Errno 9] Bad file descriptor Two strange things: 1st: in the buildurl is only the url (as a string) to open (something like http://www.serverblaba.com/asdfasdf?wdfasdf=4awfwf=34 ...) 2nd: it works if I start in in IDLE, it doesn't work if I double klick on the .pyw file. How can printing out a string throw a IOError exception? I'm quite puzzled. -- http://mail.python.org/mailman/listinfo/python-list
Re: Errno 9] Bad file descriptor
| | Starting point: | ... | self.status['text'] = 'Processing ...' | try: | cli_main(argv) | except Exception, e: | self.status['text'] = 'Error: ' + str(e) | return | ... | cli_main: | | keypath, inpath, outpath = argv[1:] | ... | with open(inpath, 'rb') as inf: | serializer = PDFSerializer(inf, keypath) | with open(outpath, 'wb') as outf: | filenr = outf.fileno() | serializer.dump(outf) | return 0 | | PDFSerializer.dump: | | def dump(self, outf): | self.outf = outf | ... See that you set serializer.outf to the outf you open in cli_main? Any attempt to use serializer _after_ exiting the with open(outpath, 'wb') as outf will use serializer.outf, but the outf is now closed. And thus itsfiledescriptoris invalid. Okay, I changed it to a try: ... finally: block where I open the file and in finally I close it. Nothing has changed. The error still occures. Doesn't the with open(outpath, 'wb') as outf: clause has to wait until the pdfserialiser.dump method has finished anyway? IMHO it can't just call it and immediately close it. At least the try: finally: construct should work? Or does it the same (call the method and immediately jump to the finally close)? Would it work if I would write: with closing(outpath, 'wb') as outf: ? I'm a little bit confused about Python's strange processing ... -- http://mail.python.org/mailman/listinfo/python-list
Re: Errno 9] Bad file descriptor
Thanks for the answers so far. It's not my code I'm just curious how that could happen: Starting point: ... self.status['text'] = 'Processing ...' try: cli_main(argv) except Exception, e: self.status['text'] = 'Error: ' + str(e) return ... cli_main: keypath, inpath, outpath = argv[1:] ... with open(inpath, 'rb') as inf: serializer = PDFSerializer(inf, keypath) with open(outpath, 'wb') as outf: filenr = outf.fileno() serializer.dump(outf) return 0 PDFSerializer.dump: def dump(self, outf): self.outf = outf ... -- http://mail.python.org/mailman/listinfo/python-list
Re: Errno 9] Bad file descriptor
All right I found the web link. It's an improvement to the pdf miner project (adds pdf dump methods). http://pastebin.com/P8SWj5YK -- http://mail.python.org/mailman/listinfo/python-list
Errno 9] Bad file descriptor
I get sometimes a Errno 9 Bad file descriptor the code is too long to show it here but what are the circumstances this could happen? A web search showed nothing. I have especially the feeling Python 2.6 has some problems with Unicode ... and might not find the file. Is that possible? -- http://mail.python.org/mailman/listinfo/python-list
RE - Parsing ipconfig /all output - question
I'm trying to get the first MAC address from the ipconfig /all output. Unfortunately you can't just search for Physical Address because the name is only valid in the English Windows version. Here a test which isn't working: import subprocess import re p = subprocess.Popen('ipconfig /all', shell = True, stdout =subprocess.PIPE) p.wait() rawtxt = p.stdout.read() print rawtxt p = re.findall(r'(%X%X-){5}%X%X',rawtxt) print p Any ideas? -- http://mail.python.org/mailman/listinfo/python-list
Re: RE - Parsing ipconfig /all output - question
Great - seems to work =) ... -- http://mail.python.org/mailman/listinfo/python-list
questions about how to parse a string and put it in a dictionary
I've got a string which (without any CR or LF) consists of 'attribute1=attribute_value;attribute2=attribute_value2; ...' and I want them to read in a dictionary so that the attribute name is the key and the attribute value is the data. Any ideas for an implementation? Greetings and thanks jb -- http://mail.python.org/mailman/listinfo/python-list
great
Great - it works. Thanks a lot. -- http://mail.python.org/mailman/listinfo/python-list