0

I am building a board game like chess using TKINTER library of python. But I am not sure whether my application will be integrable with Xblock.

So I tried to run simple program of Desktop application in XBlock

from Tkinter import *
root = Tk()
var = StringVar()
label = Message( root, textvariable=var, relief=RAISED )
var.set("Hey!? How are you doing?")
label.pack()
root.mainloop()

Again I wrote this code in my xblock python file corresponding to some handler but it is not working and I am not getting where to use it in Xblock so It gives output on student view so that student can play this game and teacher would be able to evaluate this. I am not able to run this in django application also.

Suggest something so that I can achieve this???

Shanky
  • 1
  • 2

1 Answers1

0

An Xblock is run on the server and the student interacts with it using a web fragment composed of html+js+css. There is no way of connecting a desktop GUI to the platform using the python XBlock code.

You could try to install a browser extension or have your GUI app talk to the server in the same way a mobile app does, but this goes way beyond the scope of an Xblock

Felipe
  • 440
  • 3
  • 18