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
➜ Python and WINE
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Rakon
USA (123 posts) Bio
|
Date
| Sat 29 Dec 2007 02:24 AM (UTC) Amended on Sat 29 Dec 2007 02:25 AM (UTC) by Rakon
|
Message
| Greetings all!
This may or may not come as a helpful hint to anyone, but I've finally taken the time to find a simple solution to the scripting in python issue, for MUSHclient and WINE.
So with this, I hope to create a small tutorial in order to help others, who'd rather use Python with MUSH under wine, rather then resorting to re-writing your code in LUA.(Sorry Nick!)
WINE V:0.9.46
MUSH V:4.19
First of all, download ActivePython, for your type of system(Win version, 32b or 64b), and install it within your .wine directory, say, drive_c.
http://www.activestate.com/store/download.aspx?prdGUID=b08b04e0-6872-4d9d-a722-7a0c2dea2758
Download :http://www.dll-files.com/dllindex/dll-files.shtml?msvcirt
And place it within the windows/system directory of WINE.
Open a terminal and navigate to where the ActivePython MSI is located.
Execute the following:
$ msiexec /i <activepythonfile>.msi
After it is installed, you may close the terminal window.
Open the .wine/drive_c/python## folder, copy the python##.dll file, to the windows/system directory of WINE.
Open a browser, and download the appropriate pywin32 file for your version of Python, from here:
http://sourceforge.net/project/platformdownload.php?group_id=78018
After pywin32 is completely installed, and MUSHclient is installed, then you should be able to select Python as your scripting language, in MUSH.
Granted, there still seems to be a few limitations to MUSH under WINE, such as the infobar will not render text properly, and has a few buggy issues with loading plugins. But aside from that, python scripting should work as it would under Windoze, and all without the /wine argument!
Enjoy! |
Yes, I am a criminal.
My crime is that of curiosity.
My crime is that of judging people by what they say and think, not what they look like.
My crime is that of outsmarting you, something that you will never forgive me for. | Top |
|
Posted by
| Worstje
Netherlands (899 posts) Bio
|
Date
| Reply #1 on Sat 29 Dec 2007 09:00 AM (UTC) |
Message
| Useful post! Thanks. I'm yet one step closer to switching to Linux on a more daily basis it seems. :D | Top |
|
Posted by
| Elin
(13 posts) Bio
|
Date
| Reply #2 on Tue 10 Jun 2008 06:29 PM (UTC) |
Message
| This sounds awesome!
Could you please be more specific about the plugin loading issues? | Top |
|
Posted by
| Elin
(13 posts) Bio
|
Date
| Reply #3 on Tue 14 Oct 2008 09:44 PM (UTC) |
Message
| I followed the instructions posted by Rakon, and was able to get Python 2.5 scripting working in Ubuntu 8.04, with Wine 1.0.
pyWin32 did not seem to be necessary.
I've only done simple tests, but I made a dictionary object, and wrote some aliases to mess around with it (adding and deleting keys from it), which all seem to work. | Top |
|
Posted by
| Rakon
USA (123 posts) Bio
|
Date
| Reply #4 on Wed 15 Oct 2008 04:51 PM (UTC) |
Message
| Glad to see you got everything working there Elin!
Regarding pyWin32, I needed that because of my 64bit system I believe. So if you're running a 32bit system, after installing python you'll already have the libs needed for MUSH to register python's existence. For the plugin loading issue, when I tested it, MUSH would crash on trying to load a plugin written in python, regardless of which scripting language was chosen. |
Yes, I am a criminal.
My crime is that of curiosity.
My crime is that of judging people by what they say and think, not what they look like.
My crime is that of outsmarting you, something that you will never forgive me for. | Top |
|
Posted by
| Elin
(13 posts) Bio
|
Date
| Reply #5 on Wed 15 Oct 2008 07:35 PM (UTC) |
Message
| Ah.That seems like a pretty big issue, but it didn't seem to happen when I loaded my Python plugin. Of course, the one I wrote was very simple, and only contained a few aliases.
I'm glad I don't need pyWin32. When I tried to install it, it opened a process I wasn't able to kill. | Top |
|
Posted by
| Aryzu
(12 posts) Bio
|
Date
| Reply #6 on Mon 19 Jan 2009 12:46 AM (UTC) |
Message
| What happens if you import python libraries? Like re, threading, pickle? And where do you store custom libs? Do you put them in the side-package of the installed python version?
Thanks in advance
Aryzu | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #7 on Mon 19 Jan 2009 07:59 PM (UTC) |
Message
| I don't know myself. I was hoping someone else would.
There is no particular Python-specific code in MUSHclient, except that it loads Python when requested as one of the script engines (DLLs). Things like where libraries are stored, or how you import them, is done in whatever way Python scripting normally does, whatever that is. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Rakon
USA (123 posts) Bio
|
Date
| Reply #8 on Wed 24 Jun 2009 11:29 PM (UTC) |
Message
| Aryzu:
Importing modules works fine, as long as they are in the WINE python, not under you actual posix system.
At least, this has been my experiance thus far, YMMV. |
Yes, I am a criminal.
My crime is that of curiosity.
My crime is that of judging people by what they say and think, not what they look like.
My crime is that of outsmarting you, something that you will never forgive me for. | 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.
29,381 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top