Open damistry opened 4 years ago
I cannot tell what is happening. Try this out from a python kernel.
import pexpect
spawn_cmd = 'path/to/gnuplot'
cmd = 'print "Testing"'
child = pexpect.spawn(spawn_cmd, encoding='utf-8')
child.sendline(cmd)
child.readline()
print(child.buffer) # result
It is a bare-bones test of the communication between python and gnuplot. i.e. gnuplot_kernel stripped to the bone.
Okay, I'll have to do some digging. Windows doesn't have pexpect.spawn()
(https://pexpect.readthedocs.io/en/stable/overview.html#pexpect-on-windows).
I'll get back to you..
Try this
from metakernel.pexpect import spawn
spawn_cmd = 'path/to/gnuplot'
cmd = 'print "Testing"'
child = spawn(spawn_cmd, encoding='utf-8')
child.sendline(cmd)
child.readline()
print(child.buffer) # result
Only an empty string comes back
Can you go to the command prompt, start gnuplot and take a screen shot. Something like
I do not have access to a windows machine and I have not used gnuplot on windows. I want to confirm that the text and prompt are just about the same. Specifically, is the prompt gnuplot>
, with the space after >
?
Here you go. Yeah there is a space after the '>'
Sorry if the title isn't that useful.
Im using windows. I installed the gnuplot_kernel and tried to run
plot sin(x)
and I get the error "Error: gnuplot not found" In a python kernel runningI get an output of
Looking at the
kernel.json
it gives the expected{"argv": ["/usr/bin/python", "-m", "gnuplot_kernel", "-f", "{connection_file}"], "display_name": "gnuplot", "language": "gnuplot", "name": "gnuplot"}
If I copy gnuplot.exe to C:\WINDOWS\ then gnuplot is found but then I get an error of:
Any ideas on whats going on? If someone can give me a pointer on where to start then I'll give it a go at working out whats wrong too. Cheers!