Comments (4)
That is tricky, I'll have to see if I can detect this condition. Otherwise, all I can do is document this shortcoming.
from oct2py.
I found a fix for this, I had to read characters instead of lines and look for the debug>
prompt. I can recover the session, but I have to raise an Oct2PyError
because the command does not complete successfully. Snippet:
line = []
while 1:
char = self.proc.stdout.read(1).decode('utf-8')
if char == '\n':
break
elif char == '>' and ''.join(line) == 'debug':
self.proc.stdin.write('dbquit\n')
raise Oct2PyError('Debug point found, check for keyboard command:\n%s' % main_line)
line.append(char)
line = ''.join(line).strip()
I still need to update the test suite before finalizing, but I am out of gas the for now.
from oct2py.
Woohoo, now that I'm thinking clearly again, I was able to add full support for keyboard and debug points. A simple example:
from oct2py import octave as oc
oc.put('a', 1)
oc.keyboard()
A session might look like:
Entering Octave Debug Prompt...
debug> a
a = 1
debug> return
>>>
This resides in the dev
branch for now. I will fix #32 and then push a new release.
from oct2py.
Very cool, thanks a lot!
from oct2py.
Related Issues (20)
- error: 'upfirdn' undefined near line 121, column 121 HOT 5
- Struct fieldnames that start with number are ignored HOT 1
- Bug: PULL-PUSH-PULL 1D Column vector will convert into 1D Row Vector HOT 4
- push will push Cell HOT 2
- [Question] Properly end session HOT 4
- Using `system ("cat ~/.octaverc")` on Winows HOT 2
- initialization: graphics_toolkit: 2004h toolkit is not available HOT 5
- Run doesn't create new variables in the octave environment HOT 3
- Conflict with opencv HOT 5
- bracketed paste \x1b[?2004h issue HOT 3
- Memory Leak HOT 1
- Problem with calling function; too many outputs HOT 1
- When I use python multiprocessing to open multiple octave displays a timeou HOT 1
- Problem with matlab package folders?
- Thread pool executor leaves ghost-threads that fill up memory
- Calling function script takes 1.5 seconds HOT 1
- error: 'graphics_toolkit' undefined
- Error trying to import octave in Anaconda Spyder using "from oct2py import octave" HOT 8
- _exist function not removing special characters from response HOT 2
- Error on testing
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from oct2py.