PyEdit in Programming Python 2nd ed

Fiel Cabral fscabral at bellsouth.net
Thu May 3 19:28:25 EDT 2001


Thank you for your assistance, but I have followed your instructions and
read the README-root.txt file included in the CD. The PyEdit window is still
not appearing. My machine is running Windows 98 SE, ActivePython-2.1.0.210,
ActiveTcl-8.3.3.8330 and ActivePerl-5.6.0.623-MSWin32-x86-multi-thread. This
could also be the result of a bug in this version of Tcl/Tk and I'll try
installing other versions of Python.

---------Fiel
C:\PP2ndEd>cd examples

C:\PP2ndEd\Examples>dir

 Volume in drive C has no label
 Volume Serial Number is 2A48-1B05
 Directory of C:\PP2ndEd\Examples

.              <DIR>        05-03-01  7:08p .
..             <DIR>        05-03-01  7:08p ..
README~1 TXT         2,996  12-10-00 10:46a README-root.txt
__INIT__ PY          3,144  09-09-00  5:15p __init__.py
PP2E           <DIR>        05-03-01  7:08p PP2E
         2 file(s)          6,140 bytes
         3 dir(s)        6,402.16 MB free

C:\PP2ndEd\Examples>echo %PYTHONPATH%
---------Fiel

"Laura Lewin" <Laura_01 at MailAndNews.com> wrote in message
news:3B29D212 at MailAndNews.com...
> Hi,
> As described in the book and CD's Examples\README-root.txt file,
PYTHONPATH
> should include the directory that _contains_ the PP2E root directory, not
> PP2E
> itself.  Moreover, the directory that contains the PP2E directory copy
must
> also include a file named __init__.py, because it is a package directory.
> That file can be empty, but it is required in PP2E's parent.  (The PP2E
root
> directory is a Python modules package).
>
> Cross-directory imports in book examples are always relative to the PP2E
> root.
>  PyEdit, for example, says this to load menu/toolbar maker tools from
> elsewhere
> in the examples directory tree:
>
>     from PP2E.Gui.Tools.guimaker import *
>
> So, the directory containing PP2E must be a package too, and should look
> like
> the top-level Examples directory on the CD.  In your case, if PP2E is
copied
> from the CD to C:\PP2E, then two things probably need to be fixed:
>
> 1) The C: directory must be added to PYTHONPATH, not C:\PP2E
> 2) A C:\__init__.py file must exist, even if it's simply empty
>
> If this still doesn't fix the problem, then perhaps the PyEdit source
files
> have been altered locally. (Can you run PyEdit directly?)
>
> Laura
> LLewin at oreilly.com
>
> >===== Original Message From "Fiel Cabral" <fscabral at bellsouth.net> =====
> >Yes, I launched Launch_PyDemos.pyw first by double-clicking the
> >"Launch_PyDemos" Python icon in Explorer and then at the DOS prompt by
> >typing "python Launch_PyDemos.pyw".
> >The launcher would appear and all of the scripts could display their GUI
> >windows except PyEdit and PyView.
> >I copied d:\Examples\PP2E to c:\PP2E and set PYTHONPATH to "C:\PP2E" then
> >tried running from their but that didn't help PyEdit to appear.
> >
> >Yes, please share with me other options. Thank you.
> >
>





More information about the Python-list mailing list