jdf / Processing.py-Bugs

A home for all bugs and feature requests about Python Mode for the Processing Development Environment.
41 stars 8 forks source link

Using Processing.py with PyCharm? #145

Closed CaravaggiosFillide closed 8 years ago

CaravaggiosFillide commented 8 years ago

Is there any way of using PyCharm as the IDE for Processing.py?

tildebyte commented 8 years ago

Define what you would like from an "IDE". I use Sublime Text, and now Atom to some degree; they provide syntax highlighting, snippets (e.g. type def{TAB} and get function boilerplate), and some other features, including running sketches with a keystroke, and trapping errors into an editor frame and jumping to the file and line with the error. It's not so good with "intellisense", but because what we're really doing is scripting a Java runtime with Python, I don't think it's possible to have the level of introspection needed to get that.

CaravaggiosFillide commented 8 years ago

I have tried a variety of editors over the past years. In the beginning notepad++ a lot then I took the bull by it's horns and got down with vim but lately I have found PyCharm with vim key-bindings as the most efficient for me when it comes to Python, therefor the question. I have also tried Atom which I also quite like but it isn't as adapted for Python and the introspection used for code-completion is not as sharp. I do prefer Atom in the sense that it is more light-weight and configurable but as PyCharm just works great out of the box I gravitated towards spending time on the actual work I am doing rather than hacking the editor, but I have started exploring making the switch.

Could you just brief me in general terms what I would need to do to run sketches from other editors? Do I direct the interpreter to the processing jython interpreter or do I write a macro that runs a shell command prompting processing-java to run it via a terminal? I can't seem to run python sketches from processing-java as it looks for a .pde and not a .pyde otherwise I think I could figure it out.

Perhaps the absolute simplest would be if you could share me your setting in Atom that let you do the things you mention (like run a sketch with a keystroke)?

tildebyte commented 8 years ago

I haven't tried running sketches directly from Atom, but it works very smoothly from Sublime Text. All you need to do is point ST at the cmd file which comes with Processing.py, along with telling ST where in the build command to put e.g. the working dir and filename. I would imagine that Atom would be similar.

tildebyte commented 8 years ago

There's build, which seems very similar to Sublime Text's way of doing things, and is the most popular package of it's type. As I said, I haven't touched it, but it looks straightforward.

tildebyte commented 8 years ago

https://atom.io/packages/build-processing

CaravaggiosFillide commented 8 years ago

Thanks for your support. I got everything working with Atom, should have searched their extension repository before troubling with a question here but perhaps somebody else will have use for the answer when they come here looking.

tildebyte commented 8 years ago

np, hth

lucaslopes commented 7 years ago

I was able to write in Atom and run using the command-line. Already installed the atom-build but can't use your build, @tildebyte. Can you help me?

tildebyte commented 7 years ago

Just to verify: 1) You have "atom-build" installed 2) "processing-py" commandline tool is installed 3) "processing-py" commandline tool is in your PATH. If all of that is true, I would say to make sure that nothing has changed with atom-build in the last year or so. I haven't touched this in a while, and I don't have time to look at it right now. Also, any error messages or logs you might have would be a great help.

JamesWClark commented 5 years ago

I have verified all three steps and I get No eligible build target error message. What's the configuration step to get Atom to run the sketch?

Imgur