How to merge pythontutor.com with atom.io? - python

I am pretty new into programing and Atom...Though i have some gut feeling that pythontutor.com could be easily integrated to work with Atom, since Atom is built on web technologies and pythontutor.com allows embeding of both step by step and the live modes which are pretty awesome. I have this imagined like split screen in atom. As you write, the code updates on the pythontutor.
I tried doing this myself.. but when i looked into the coffee scripts and stuff it was just scary! I only know little bit of Python, and i'd like to continue lerning it with Atom :)
Thank you!

After reading some PythonTutor documentation it seems that you can only embed static visualizations (i.e. you run your Python code once and it records the trace). I don't believe you can embed an interactive PythonTutor session.
If you want to stick with Atom, I might suggest the python-debugger package. It's not as learner-friendly as PythonTutor, but it's got some nice interactive debugging features.

Related

Python and Bridge for JS

Im starting a new project for personal porpuse!
Im working personally in finance, I decided to create personal chart viewing software to suit my needs. I thought I'd create a good part of the backend in Python as it is a language I know quite well. Use Javascript for the graphic side, and use a webview in a windows form to make everything available as if it were software.
As for the graphics I thought of using: Lightweight Library for JS, I find that today it is the most avant-garde library compared to the classic plotly, matplotlib.
Use pywebview as a bridge between Python and JS and to redirect everything in a windows form.
However I find it a bit difficult to use this library (pywebview), there is a poor documentation around and not very clear to me (my level of JS is really basic). However, I believe it is one of the most convenient solutions.
I would have thought of using pyscript, but it still seems early to use this library in production.
Questions:
Do you think such a job is feasible?
Do you know other libraries/better solutions to do such jobs?
What kind of approach would you use if you were to do such work?
What I am trying to achieve is to write most of the functions in python and use only JS to make calls through buttons or to get data from various inputs.
Wandering around the web I found a work already partially created by this guy (if you are reading, Thanks Filipe you have been very helpful! here you can see his project hosted on Github) but unfortunately it is difficult for me to get my hands on a code not produced by me.

Create a Program in Python with a Node conection GUI

I want to create a program with a GUI using Python. This program should show a list of nodes somewhere and allow me to insert them on a working diagram. I also need this nodes connected in some sequence. The following image is similar to what I need, it's from Orange3.
I come from a web development background and I've used Python for some Data Science but all using Terminal so right now I feel a little lost on where to get started.
I would much appreciate some help on where to look. Also I would like to use, if possible, existing tools instead of having to develop everything from scratch. Maybe there even is a project that does what I need and I could fork it from Github.
Thanks a lot for the help.
Check out Tkinter. Its great for GUI. Hard to add in images though. You could use Base64 to add in images.
There are plenty but it's best to create it yourself. There are infinite tutorials. Besides its gonna be full of bugs if you try to alter code that isn't yours.

How to properly set up this Sage Cell Server?

I have a question regarding the Sage Cell Server. It is a relatively general question, I don't have any code that I need fixed.
I am trying to set up a server but I am finding the world of servers confusing. I've worked plenty with Java and JavaScript, HTML and CSS on frontend stuff, but for the backend Sage server I decided to develop I figured Python was a good choice. Some basic Lynda tutorials and a book later, I have a pretty good idea how python works... But am still lost. My question is basically this:
-I am trying to design a very simple server running an instance of Sage. I want to be able to SEND Sage code to it (NOT PYTHON) and have it evaluated and the result sent back, as if I were running sage on my own computer. Example: Sending "integrate(x,x)" to the server would return 1/2*x^2
-What is the best way to go about doing this? Should I download the Sage Cell Server?
-Will I need to even write Python code for this? How long would this task take in hours?
-Would it be easier for me to design the server to receive and execute Python code instead of Sage code? How would I go about doing this?
If you are wondering why I want to do this, I want to design a website where people can type in their math problems and have them evaluated by sage. I know there are simpler ways to do this but I've wanted to do server-side work and get people talking with a server for a while now and this seems like a good introduction to it.
Any and all advice is appreciated, resources, help, etc.
There are certainly a number of people who have successfully set up their own Sage cell server, and as such things go I hear it is definitely doable. The previous "simple server" API is pretty much defunct and the Sage cell is a pretty reasonable way to do this. I don't see why you would need to have reinvent the wheel here, and asking on sage-support#googlegroups.com is a logical next step for you.

How to Run Python without a Terminal

I want to teach some students basic Python programming without having to teach them how to use the terminal. Recently, I was teaching a 2 hour intro session, and not only did teaching terminal stuff take a long time, but it also intimidated a lot of the students. I would like a solution where students wouldn't have to leave graphical user interfaces that they were comfortable with.
I also want the solution to let them execute a particular Python file (eg, not just using the interactive Python interpreter) and see the output from printing things.
Thanks!
Surely that's what IDLE is for? It's not much good as an IDE, but it does work well for exactly what you describe - opening modules and executing them, and running commands in an interactive shell.
How about this?
https://www.wakari.io/
All in the browser.
Bonus points, you introduce them to IPython as well.
Take a look at the gallery too, https://www.wakari.io/gallery
You might want to try something like this: http://repl.it/languages/python
Perhaps you want something like this:
http://learn.adafruit.com/webide/overview
When I'm not near my own PC, I use ideone.com. I like that it is a universal IDE, which for me means both C++ and Python.

Online Pair Programming with Python

I'm working with a team mate solving some programming challenges online
I was wondering if there was something like piratepad but for python
Ideally it would allow us to collaborate on the same script online, see what the other is editing, chat, and also run it.
Any idea if there's something like that available for python programming? (js would also come handy)
I've found this which seems pretty great, but it doesn't seem to support multiple people working on the same code
cloud9 (https://c9.io) seems to work for that, but I never tried.
I know it is an old question but I stumbled uponit.

Categories