Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ Python ➜ Importing Modules

Importing Modules

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Drakonik   (20 posts)  Bio
Date Fri 08 Jun 2012 10:57 PM (UTC)
Message
I've recently downloaded the objectified MUSHclient objects from few threads down and I'm trying to use them in my code. The problem I'm encountering is that no matter how I manipulate sys.path or where I place the module, I cannot import ANYTHING that isn't directly in the script that MUSHclient is told to load. What am I missing here?
Top

Posted by Worstje   Netherlands  (899 posts)  Bio
Date Reply #1 on Sat 09 Jun 2012 03:21 AM (UTC)
Message
It's been several years since I used Python with MUSHclient. Can you show how you manipulated sys.path and what didn't work with it?
Top

Posted by Drakonik   (20 posts)  Bio
Date Reply #2 on Sat 09 Jun 2012 08:14 AM (UTC)
Message
sys.path.append(r'C:\Program Files (x86)\MUSHclient\scripts\')

My script was UL.pys in scripts\. I had my test module in a directory named foo\, and foo\ contained an __init__.py and a test.py. I added the scripts directory to the import path as listed above and I was still unable to import any variation of foo or test.
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


15,991 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.