Maya-like Python IDE

This might be a stupid question, I’m pretty sure it is. I’m looking for a Python IDE similar to the script editor in Maya :stuck_out_tongue: I started coding Python with Maya, and I never really switched over to anything else when writing Python scripts, even if they were meant to be used outside of Maya. I’ve tried PyCharm and a couple of other IDE’s, but they have so much more than what I need.

I really just want something as simple as the script editor in Maya, where I don’t have to define a project before running code, and the option to just run selected code without having to configure the program. Is there anything like this? I would have kept using Maya if it wasn’t for the issues with imporing external libraries :rolleyes:

Charcoal Editor Plugin for Maya is quite nice, I use it almost as much as Wing IDE.

Something as Sublime is a lot cleaner as well, though I really like the feature set and customizability PyCharm provides. Getting PyCharm to work with the maya.cmds library etc is quite easy and can be found on this forum.

But what do you mean with; ‘issue with importing external libraries’. Just add the library-directories to sys.path, set them up in the Maya.env file, set them up in a userSetup.py file… so many possibilities to source directories containing modules :nod:

So Maya isn’t really an IDE, its a hugely overblown interpreter / live-coding environment

However there are some python tools that do work similarly.
I use iPythona lot, it has an enhanced interpreter mode, a Qt based console mode (which is an extra pretty interpreter + toys), and then the notebook web interface mode. The notebook option is rather awesome to work with as you can rerun cells at any time, much like the “hightlight + run” option you get inside maya.

Another enhanced interpreter you can try out is dreampie, the interface looks more like Maya’s with the split between a space for entering code, and a space for results. It can be a bit finicky about comments and docstrings when doing huge copy / pastes, and I can’t remember if you can do partial execution (its been a few years since the last time I used it).

The other option is to use a simpler text editor and using Maya’s commandPort to send over information. SublimeText has one of these, I’m also fairly sure that jedit, and notepad++ have similar options.

Another suggestion would be https://atom.io/

Thanks everyone! :): Dreampie turned out to be EXACTLY what I was looking for :D:

EDIT: Looks like I get the same problem with external libraries though. I’ve never got the external libraries to work by just appending them to the sys.path :(:

sys.path.append(r"C:\Python27\Lib\site-packages")
sys.path.append(r"C:\Python27\Lib\site-packages
umpy")
sys.path.append(r"C:\Python27\Lib\site-packages
umpy\linalg")
import numpy

Gives me:

Traceback (most recent call last):
  File "<pyshell#5>", line 4, in <module>
    import numpy
  File "C:\Python27\lib\site-packages
umpy\__init__.py", line 200, in <module>
    from . import add_newdocs
  File "C:\Python27\lib\site-packages
umpy\add_newdocs.py", line 13, in <module>
    from numpy.lib import add_newdoc
  File "C:\Python27\lib\site-packages
umpy\lib\__init__.py", line 8, in <module>
    from .type_check import *
  File "C:\Python27\lib\site-packages
umpy\lib	ype_check.py", line 11, in <module>
    import numpy.core.numeric as _nx
  File "C:\Python27\lib\site-packages
umpy\core\__init__.py", line 14, in <module>
    from . import multiarray
ImportError: cannot import name multiarray

Are you trying to use python 2.7 libraries with maya?
Because if so, compiled c-extensions (like numpy) libraries won’t be compatible.
Basically default python 2.7 is compiled with Visual Studio 2008, which ties it to a version specific c-runtime, Autodesk uses more modern versions, (Maya2014 == Visual Studio 2010, Maya2015 == Maya2016 == Visual Studio 2012), which means you need to recompile any c-extensions before they will work inside maya, or mayapy.

Thanks R.White, I’m actually trying to import numpy in Dreampie. It works fine if I use the default Python shell, but it doesn’t work with Dreampie :confused:

Okay, so I just installed Dreampie again. I’m not sure what it uses to find its initial interpreter, but it defaulted to my installation of IronPython.
So I would check and make sure the interpreter it is using is the same as the python shell you’re testing in.
Because if it found a version of python3, or say 2.6, then looking for numpy in python27 will obviously cause problems.

Easiest way it to check the version, is just to startup a new instance and see what the startup message says.

Also, I just installed numpy from http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy , and it imported fine inside dreampie (once I pointed it at my Python27 installation)

That’s weird, I’ve checked that Dreampie points to C:\Python27\python.exe. I’ve even uninstalled python, deleted the entire folder and reinstalled it, installed the packages and tested that it works with the standard python shell… Still can’t get it to work with Dreampie, so weird!