Re: Question
Hi, this email address does not exist. Please go to the site and use the correct form to send your message. No one has seen this message. Thanks Matchfinder -- http://mail.python.org/mailman/listinfo/python-list
wxPython import error
I have tried several times to install wxPython on Fedora Core 2. The installation seems to go fine (from sources), but when I try to import the wx module I keep getting the following error: = Python 2.4.2 (#1, Sep 29 2005, 13:42:11) [GCC 3.3.3 20040412 (Red Hat Linux 3.3.3-7)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import wx Traceback (most recent call last): File "", line 1, in ? File "/usr/local/lib/python2.4/site-packages/wx-2.6-gtk2-unicode/wx/__init__.py", line 42, in ? from wx._core import * File "/usr/local/lib/python2.4/site-packages/wx-2.6-gtk2-unicode/wx/_core.py", line 4, in ? import _core_ ImportError: /usr/local/lib/libwx_gtk2ud_core-2.6.so.0: undefined symbol: pango_x_get_context = Any help or explanation would be greatly appreciated. -- http://mail.python.org/mailman/listinfo/python-list
pydoc - suppressing builtins?
Is it possible to persuade pydoc not to include documentation for methods inherited from built-in classes? I have several classes that inherit from dict, and don't really need documentation thousands of lines long that consists mostly of dict's methods repeated multiple times. I'm sure I could qite easily write something to post-process the HTML files; just wondering if there might be an easier way. thanks Alan -- http://mail.python.org/mailman/listinfo/python-list
mxDateTime on Mac: Fatal Python Error
I'm trying to get mxDateTime working on a Mac so that I can use pyscopg and cx_Oracle. The Egenix base package builds and installs quite happily, but then when I try to import it I get >> import mx.DateTime Fatal Python error: Interpreter not initialized (version mismatch?) Abort ... any ideas? Environment: OS X 10.3.8 sys.version: '2.3 (#1, Sep 13 2003, 00:49:11) \n[GCC 3.3 20030304 (Apple Computer, Inc. build 1495)]' egenix-mx-base-2.0.6 -- http://mail.python.org/mailman/listinfo/python-list
checking if two things do not equal None
if (a, b) != (None, None): or if a != None != b: Preference? Pros? Cons? Alternatives? :D -- https://mail.python.org/mailman/listinfo/python-list
Re: checking if two things do not equal None
> Do you actually want to check for arbitrary objects which may claim to > equal None, or do you want to check for objects which are None? Arbitrary objects are not a concern. > if not (a is b is None): ... > > if a is not b is not None: ... Thanks for the examples. -- https://mail.python.org/mailman/listinfo/python-list
Re: checking if two things do not equal None
Thanks everyone; it has been very educational. > Dave Angel: > ...we'll find that two of the alternatives are not even equivalent. That helped me realize (a,b) != (None, None) is not correct for the function. It's a case where two parameters have None as the default argument. What I want is to make sure that both are not None. I am now considering: if None not in (a,b): or if (a is not None) and (b is not None): -- https://mail.python.org/mailman/listinfo/python-list
Confused by "format requires a mapping"
Hello, I'm very new to Python, and unsure how to handle this runtime error below. Pointers in the right direction (RTFM here ... etc) most appreciated. I have an object, called article, that when printed has the following structure: {'title': 'wbk', 'entries': [('http://wbk.opendarwin.org/blog/?p=51', 1), ('http://wbk.opendarwin.org/blog/?p=48', 1), ('http://wbk.opendarwin.org/blog/?p=50', 1), ('http://wbk.opendarwin.org/blog/?p=49',1), ('http://wbk.opendarwin.org/blog/?p=45', 1), ('http://wbk.opendarwin.org/blog/?p=44', 1), ('http://wbk.opendarwin.org/blog/?p=43', 1), ('http://wbk.opendarwin.org/blog/?p=42', 1), ('http://wbk.opendarwin.org/blog/?p=41',1), ('http://wbk.opendarwin.org/blog/?p=40', 1)]}('http://wbk.opendarwin.org/blog/?p=51', 1) DEBUG: Above was a dump of article, prior to "return unicode("%(title)s"%article)" As mentioned in the DEBUG output, my code now returns the following string: unicode("%(title)s"%article) However, that appears to conflict with article's structure, and i don't know why? I'm probably missing something fundamental with Python's syntax? TIA Morrison Traceback (most recent call last): File "C:\APPS\pys60\s60-compat\appuifw.py", line 287, in OnSelect self.callback() File "wbk.py", line 189, in handle_feedmenu_select self.goto_state('articlemenu') File "wbk.py", lineA 156, in goto_state self.articlemenu.set_list( File "wbk.py", line 240, in format_article_title return unicode("%(title)s"%article) TypeError: format requires a mapping -- http://mail.python.org/mailman/listinfo/python-list