4

I'm exploring 2D interpolations for the purpose of writing a script in Python. I've been using the PIL (Pillow) modules to quickly display the results of the algorithms - this is best for cases when interactive input isn't necessary (i.e. testing on a random set of points).

For interactive testing I've found jsfiddle to be the most lightweight solution, but I admit it isn't ideal to rewrite functions in another language merely to be able to move points around, and input specific shapes of quads.

simple example of 4 points, drawn at random simple example, 4 verts drawn at random (JavaScript in JS fiddle; would like to do the same in Python)

What would be a fastest way to play around with a Python script graphically? Is there a Python counterpart of jsfiddle? I googled 'Python fiddle', of course, but it's not what I'm looking for. What I need is a simple canvas implementation and click events support.

Thanks in advance,

DailyFrankPeter
  • 382
  • 1
  • 13
  • Mayor difference that JS is always used in combination with HTML. While Python can be used with different GUI libraries, it does not have one by default. – RvdK May 23 '16 at 11:30

2 Answers2

2

Well, there is Python Fiddle, but I think this question is going to be closed by admins as being off-topic on Stack Overflow; see this thread here.

I'd also come to think of Jupyter and Anaconda. The latter includes the former. These will harness matplotlib, amongst others, and Jupyter gives you a Matlab-like interpreter that shows you variable values for each line and you're able to step by step look at those variables and any graphs you are making.

Community
  • 1
  • 1
larslars
  • 168
  • 1
  • 14
0

As mentioned in previous answer, there is Jupyter notebook – a software for interactive Python programming including graphical output.

You can run Jupyter locally or on your own server, but there are free cloud versions:

https://colab.research.google.com/

https://notebooks.azure.com/

Messa
  • 24,321
  • 6
  • 68
  • 92