As I mentioned in ports/117388, http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/117388(As I submitted this PR, the ports/117388 can be closed): Run pydict in console or in X window's xterm, it generates such error: File "/usr/local/bin/pydict", line 332 SyntaxError: Non-ASCII character '\xa7' in file /usr/local/bin/pydict on line 33 2, but no encoding declared; see http://www.python.org/peps/pep-0263.html for de tails This is caused by source encoding problem. After solving this problem, it runs ok in X, but in real console it says: Traceback (most recent call last): File "/usr/local/bin/pydict", line 326, in <module> from gtk import * File "/usr/local/lib/python2.5/site-packages/gtk-1.2/gtk.py", line 33, in <mod ule> _gtk.gtk_init() RuntimeError: cannot open display This is because in real console there's no DISPLAY, while the code in line 326 or some others want to initialize the DISPLAY. Fix: 1. Add source encoding big5 for python source. 2. Adjust python source code, add a judge statement not to import gtk or any other source which affecting running it in real console mode. Patch attached with submission follows: How-To-Repeat: Fresh installed chinese/pyDict, run pydict in console, not in X Window's term!
Responsible Changed From-To: freebsd-ports-bugs->chinsan I'll take it.
chinsan 2007-12-16 20:41:25 UTC FreeBSD ports repository Modified files: chinese/pyDict Makefile pkg-descr pkg-plist Added files: chinese/pyDict/files patch-dict.py Log: - Fix $DISPLAY issue under console environment with python 2.3. http://www.python.org/dev/peps/pep-0263/ - Bump PORTREVISION. - Add NOPORTDOCS knob. - Pass maintainership to submitter. PR: ports/117863 Submitted by: Sunry Chen <sunrychen _at_ gmail.com> Revision Changes Path 1.15 +10 -5 ports/chinese/pyDict/Makefile 1.1 +50 -0 ports/chinese/pyDict/files/patch-dict.py (new) 1.4 +2 -0 ports/chinese/pyDict/pkg-descr 1.2 +4 -4 ports/chinese/pyDict/pkg-plist _______________________________________________ cvs-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/cvs-all To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
State Changed From-To: open->closed Committed with some modification. Thanks.