how to get partition information of a hard disk with python

2010-09-21 Thread Hellmut Weber
or the parted module? Any idea is appreciated ;-) TIA Hellmut -- Dr. Hellmut Weber m...@hellmutweber.de Degenfeldstraße 2 tel +49-89-3081172 D-80803 München-Schwabing mobil +49-172-8450321 please: No DOCs, no PPTs. why: tinyurl.com/cbgq -- http://mail.python.org/mailman/listinfo/python-list

Re: logging: local functions ==> loss of lineno

2010-03-30 Thread Hellmut Weber
1, b=2, c=3) try: jm.doIt(0) except Exception, e: foo.error_log(str(e), 1,5,8) foo.fatal_log('Fatal message') l...@sylvester hw_logg $ cat loc_module.py # -*- coding: utf-8 -*- import logging _logger = logging.getLogger('jmp_logger') import sys pyDevelDir = '/home/leo/leo/brbeit/py-devel/Modules' sys.path.append(pyDevelDir) from hw_logg.loc_logg import locLogg, trace foo = locLogg(_logger) foo.info_log("Start importing "+__name__) def doIt(yn=None): foo.debug_log("doin' stuff, yn =", str(yn)) # logLevel at calling point ! print '=> Output from doIt:', yn #do stuff...but suppose an error occurs? if yn: foo.info_log('yn: good value') else: raise TypeError, "bogus type error for testing" class MyClass(object): @trace def __init__(self, *args, **kwargs): print 'MyClass.__init__' @trace def mymethod(self, *args, **kwargs): print 'MyClass.mymethod' foo.info_log("End importing "+__name__) -- Dr. Hellmut Weber m...@hellmutweber.de Degenfeldstraße 2 tel +49-89-3081172 D-80803 München-Schwabing mobil +49-172-8450321 please: No DOCs, no PPTs. why: tinyurl.com/cbgq -- http://mail.python.org/mailman/listinfo/python-list

Re: logging: local functions ==> loss of lineno

2010-03-18 Thread Hellmut Weber
Am 11.03.2010 12:14, schrieb Peter Otten: Hellmut Weber wrote: Logging works very well giving the filename and line number of the point where it is called. As long as I use the loggers directly. BUT when I have to wrap the logger call in some other function, I always get file name and line

Re: A tool for find dependencies relationships behind Python projects

2010-03-16 Thread Hellmut Weber
Am 24.02.2010 18:49, schrieb Victor Lin: On 2月23日, 上午12時32分, Hellmut Weber wrote: Hi Victor, I would be intereseted to use your tool ;-) My system is Sabayon-5.1 on Lenovo T61. Trying for the first time easy_install I get the following error: r...@sylvester

Re: logging: local functions ==> loss of lineno

2010-03-15 Thread Hellmut Weber
Am 11.03.2010 12:14, schrieb Peter Otten: Hellmut Weber wrote: Logging works very well giving the filename and line number of the point where it is called. As long as I use the loggers directly. BUT when I have to wrap the logger call in some other function, I always get file name and line

logging: local functions ==> loss of lineno

2010-03-10 Thread Hellmut Weber
sibility to get this information in this situation too? TIA Hellmut -- Dr. Hellmut Weber m...@hellmutweber.de Degenfeldstraße 2 tel +49-89-3081172 D-80803 München-Schwabing mobil +49-172-8450321 please: No DOCs, no PPTs. why: tinyurl.com/cbgq -- http://mail.python.org/mailman/

Re: A tool for find dependencies relationships behind Python projects

2010-02-22 Thread Hellmut Weber
ject on Pypi. Here is the home page of the tool: http://code.google.com/p/python-gluttony/ Some examples: Sprox: http://static.ez2learn.com/gluttony/sprox_dot.png TurboGears2: http://static.ez2learn.com/gluttony/tg2_dot.png Hope this could be helpful :P Regards. Victor Lin. -- Dr. Hellmut Weber m...@hellmutweber.de Degenfeldstraße 2 tel +49-89-3081172 D-80803 München-Schwabing mobil +49-172-8450321 please: No DOCs, no PPTs. why: tinyurl.com/cbgq -- http://mail.python.org/mailman/listinfo/python-list

Accessing the name of an actual parameter

2010-01-26 Thread Hellmut Weber
x27; f(a) - - The output should be: 'a' 1 'b' 'abcd' - - I tried to look at globals() and locals(), gave a look to the frames (sys._getframe(0) and sys._getframe(1), but did not see a possibility to access the information a want How can this be do

Re: integer and string compare, is that correct?

2010-01-11 Thread Hellmut Weber
17:34, schrieb Nobody: Hellmut Weber wrote: being a causal python user (who likes the language quite a lot) it took me a while to realize the following: >>> max = '5' >>> n = 5 >>> n>= max False Section 5.9 Comparison describes this. Can someon

integer and string compare, is that correct?

2010-01-10 Thread Hellmut Weber
ense" for more information. >>> max = '5' >>> n = 5 >>> n >= max False >>> n + max Traceback (most recent call last): File "", line 1, in TypeError: unsupported operand type(s) for +: 'int' and 'str' >

Access function name from within a function

2008-03-12 Thread Hellmut Weber
I'm looking for is: def bar(): name = some_function(some-parameter) print name should print 'bar' Any ideas appreciated Hellmut -- Dr. Hellmut Weber [EMAIL PROTECTED] Degenfeldstraße 2 tel +49-89-3081172 D-80803 München-Schwabing mobil +49-172-8450321 plea

Re: Eurosymbol in xml document

2008-03-04 Thread Hellmut Weber
ified. I found that file mentioned in the excellent online book 'Diving into python' Thanks again + happy pythoning Hellmut -- Dr. Hellmut Weber [EMAIL PROTECTED] Degenfeldstraße 2 tel +49-89-3081172 D-80803 München-Schwabing mobil +49-172-8450321 please: No DOC

Eurosymbol in xml document

2008-03-04 Thread Hellmut Weber
quot; LC_TELEPHONE="[EMAIL PROTECTED]" LC_MEASUREMENT="[EMAIL PROTECTED]" LC_IDENTIFICATION="[EMAIL PROTECTED]" [EMAIL PROTECTED] any help appreciated Hellmut -- Dr. Hellmut Weber [EMAIL PROTECTED] Degenfeldstraße 2 tel +49-89-3081172 D-80803 München-Schwabing mobil +49-172-8450321 please: No DOCs, no PPTs. why: tinyurl.com/cbgq -- http://mail.python.org/mailman/listinfo/python-list