On 11/18/05, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > Noam Raphael wrote: > > I just wanted to add another use case: long messages. Consider those > > lines from idlelib/run.py:133 > > > > msg = "IDLE's subprocess can't connect to %s:%d. This may be due "\ > > "to your personal firewall configuration. It is safe to "\ > > "allow this internal connection because no data is visible on > > "\ > > "external ports." % address > > tkMessageBox.showerror("IDLE Subprocess Error", msg, parent=root) > > You are missing an important point here: There are intentionally no line > breaks in this string; it must be a single line, or else showerror will > break it in funny ways. So converting it to a multi-line string would > break it, dedent or not.
Only if you didn't include newline escapes, e.g.:: msg = textwrap.dedent('''\ IDLE's subprocess can't connect to %s:%d. This may be due \ to your personal firewall configuration. It is safe to \ allow this internal connection because no data is visible on \ external ports.''' % address) STeVe -- You can wordify anything if you just verb it. --- Bucky Katt, Get Fuzzy _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com