"jtan325" <[EMAIL PROTECTED]> writes:
> customize_compiler > cc_cmd = cc + ' ' + opt > TypeError: cannot concatenate 'str' and 'NoneType' objects [...] > upon closer inspection of Python's distutils sysconfig.py, is the error > being caused by the ' ' in "cc_cmd = cc + ' ' + opt"? Any ideas on this > new error? Are there packages/settings I need to take care of before i > can use Python's distutils to install stuff? The error message indicates that one of the operands on the right side is None. ' ' is clearly a string constant (string with one whitespace), so the problem must be either cc or opt - one of them is None. Toying a little I realized Python emits different warnings for pairs cc, opt = None, 'cat' and cc, opt = 'cat', None: >>> cc, opt = None, 'cat' >>> cc_cmd = cc + ' ' + opt Traceback (most recent call last): File "<stdin>", line 1, in ? TypeError: unsupported operand type(s) for +: 'NoneType' and 'str' # note the different TypeError message below >>> cc, opt = 'cat', None >>> cc_cmd = cc + ' ' + opt Traceback (most recent call last): File "<stdin>", line 1, in ? TypeError: cannot concatenate 'str' and 'NoneType' objects So, for some reason, variable opt is None. -- # Edvard Majakari Software Engineer # PGP PUBLIC KEY available Soli Deo Gloria! $_ = '456476617264204d616a616b6172692c20612043687269737469616e20'; print join('',map{chr hex}(split/(\w{2})/)),uc substr(crypt(60281449,'es'),2,4),"\n"; -- http://mail.python.org/mailman/listinfo/python-list