On Tue, 20 Jan 2004 17:01:40 +0100 (Romance Standard Time) Vadim Zeitlin <[EMAIL 
PROTECTED]> wrote:

> On Tue, 20 Jan 2004 16:55:27 +0100 (Romance Standard Time) Xavier Nodet <[EMAIL 
> PROTECTED]> wrote:

> XN> M can not find the Minit.py script. 
>
>  If you put the script in the same directory as M.exe (where is the script
> now BTW?) 

In the CVS tree: in M/src/Python/Scripts/Minit.py

> it should definitely find it.

It does. But to make it work I had to prepend an '_' before the name of
all modules:

--- /u/src/M/src/Python/Scripts/Minit.py        2004-01-15 16:45:51.000000000 +0100
+++ Minit.py    2004-01-21 08:10:46.000000000 +0100
@@ -13,6 +13,6 @@
 ####################################################################
 
-import MDialogs
-import MailFolder
+import _MDialogs
+import _MailFolder
 
 # helper function: return the username
@@ -51,5 +51,5 @@
           "or edit Minit.py script to do something else in this startup\n" + \
           "callback when you get tired of seeing this message."
-    MDialogs.Message(msg)
+    _MDialogs.Message(msg)
 
 ####################################################################
@@ -61,10 +61,10 @@
 def callback_func(arg):
     msg = "This is a Python Callback Function!\nThe argument is: " + arg
-    MDialogs.Message(msg);
+    _MDialogs.Message(msg);
     
 def OpenFolderCallback(name, arg):
     msg = "This is the Python OpenFolderCallback function!\n" + "  called on the 
hook: " +  name 
-    mf = MailFolder.MailFolder(arg)
+    mf = _MailFolder.MailFolder(arg)
     msg = msg + "\n  from the mailfolder called:" + mf.GetName().c_str()
     msg = msg + "\n  The folder contains " + mf.CountMessages() + " messages."
-    MDialogs.Message(msg);
+    _MDialogs.Message(msg);


> But here it also works if the script is in the Python subdirectory of
> the installation directory so I don't know why it doesn't work for
> you...

I don't know either.

>  Which version of Python do you have?

2.3.3

-- 
Xavier Nodet
"They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety." - Benjamin Franklin, 1759.

Attachment: pgp00000.pgp
Description: PGP signature

Reply via email to