Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Oct 20 12:45
    flixman opened #704
  • Oct 19 19:25
    matthewstidham commented #703
  • Oct 19 19:25
    matthewstidham closed #703
  • Oct 19 19:07
    matthewstidham opened #703
  • Oct 01 17:48
    MarkBaggett opened #702
  • Sep 29 20:42
    GreenMobius edited #701
  • Sep 29 20:38
    GreenMobius edited #701
  • Sep 29 20:38
    GreenMobius opened #701
  • Sep 28 23:48
    kloczek commented #699
  • Sep 28 23:27
    Red-M commented #699
  • Sep 28 23:23
    kloczek commented #699
  • Sep 28 23:19
    kloczek commented #699
  • Sep 28 23:08
    kloczek opened #700
  • Sep 28 23:01
    Red-M commented #699
  • Sep 28 22:57
    kloczek opened #699
  • Sep 22 15:50
    stesser synchronize #698
  • Sep 22 15:32
    stesser synchronize #698
  • Sep 22 15:13
    stesser synchronize #698
  • Sep 22 14:57
    stesser opened #698
  • Sep 15 07:27
    pghole opened #697
Ghost
@ghost~529c6b12ed5ab0b3bf04d522
test
Bill Page
@billpage
Hi. It would be great to get the wait issue fixed for SageMath. Thank you @jquast for moving this forward.
Ghost
@ghost~529c6b12ed5ab0b3bf04d522
Sure Bill, I just left my $DAYJOB a week or so ago, so I am trying to wrap all FOSS projects I work with nice and tidy while the time affords it
I don’t know anything about sagemath however. So I was hoping we could cooperate, it would take me a while to become familiar
anyway I’ll be at the terminal hacking away and available to help, I am willing to install or share sagemath developer environment, share screen, etc. or such if needed
i have debian, osx, and freebsd build slaves if needed, i noticed sagemath is a bit of a platform-dependent packaging problems.
One simple but somewhat non-standard way to test new versions of pexpect in SageMath is via cloud.sagemath.com If you are interested you could register there and I could add you as collaborator. (See above link.) But actually getting pexpect updated in Sage would require Sage trac and a somewhat cumbersome review process. This could take some time but I know there are some other Sage users/developers who want to move this forward.
Ghost
@ghost~529c6b12ed5ab0b3bf04d522
Oh boy, lets see here, time to get my glasses :) I see errors that look like unicode related
regarding notebook section beginning, "But Sage itself still does not support unicode variable names." indeed... the code I see in the tracebacks is troubling
Bill Page
@billpage
I haven't looked at this Sage worksheet for a few months. As I recall I was mostly concerned with getting unicode support working in the Sage notebook web server component so that I could use that in the Sage external interface to FriCAS. That is what got me started on trying to solve this again since the old version of pexpect packaged with Sage did not support unicode. The errors you see in this worksheet are because native Sage itself does not support unicode.
But then I found out that the real reason that pexpect had not been updated in Sage was because of this other problem concerning very poor performance, the reason for which no one knew right away but was later shown to be due to the extra wait in the read loop.
Ghost
@ghost~529c6b12ed5ab0b3bf04d522
I've got the same story... needed pexpect with unicode support, unmaintained, now I maintain it ..
Bill Page
@billpage
This wait was introduced into pexpect shortly after the older version of pexpect without the wait was packaged with Sage.
Ghost
@ghost~529c6b12ed5ab0b3bf04d522
well i hope the branch i propose will work for sagemath, at least, if this is the only remaining issue, then the behavior can be reverted easily.
child = spawn('fancy math app with arguments ...')
child.delayafterread = None
this will revert it to its pexpect 2.0 speed
also pexpect on pypi now may help alleviate the need to special-package pexpect in sage? just a pip requires
Bill Page
@billpage
Yes, I think it will work. Right now I have to run and take care of life. I can be back in a few hours.
Ghost
@ghost~529c6b12ed5ab0b3bf04d522
ok enjoy, I have a sagemath cloud account, i don't know how i could test pexpect branch in it. I'll be in an out if you need help
Ghost
@ghost~529c6b12ed5ab0b3bf04d522
Created #294 rather hairy
Michael Joseph Vensky
@mvensky
Hello, I'm trying to get pexpect to deal with ncurses type output. The escapes cause the expect function to basically loose the search string. I can strip out the escape sequences, but now expect has lost the thread. I've Google'd around, hang out on IRC and others seem to have the same desire. Any suggestions? Jeff 1st suggested I come here.
Ghost
@ghost~529c6b12ed5ab0b3bf04d522
hello
You mean, you wish to call child.expect(“vanilla string”), even though it may literally read, “\x1b[1;31mvanilla \x1b1;32mstring\x1b0m” ?
Ghost
@ghost~529c6b12ed5ab0b3bf04d522
I lost you the first time in email about a “thread” — do you literally mean some use of the threading module? This is unclear
Michael Joseph Vensky
@mvensky
Sorry, no I meant that when you use pexpect to spawn an ncurses based process and then try to expect a string, if the string contains escapes "expect" fails. Actually, what I can see from the logs is that then entire screen gets sent to the single "expect" command. This "expect" commands fails to find the substring in the wash.
And yes, to your question about child.expect(“vanilla string”).
I'm going to drop off for a bit; got a one-hour drive home.
Ghost
@ghost~529c6b12ed5ab0b3bf04d522
ok. I’ll provide an answer. briefly: possible, but difficult
Michael Joseph Vensky
@mvensky
Cool, I'll try to logon tonight or early tomorrow morning: I tend to goto bed early and get up the same.
Ghost
@ghost~529c6b12ed5ab0b3bf04d522
that is my first recommendation, at least, I think the one you have in mind. My other recommendation would be to simply use the “ptyprocess” module (which pexpect uses), and write your own special-purpose expect api
depends on your familiarity
that’s about the most help i have the time to afford to give, good luck. I’m over here in california if you want to offer some us dollars to solve any python solution :) have a good winter, stay safe from el nino!
Michael Joseph Vensky
@mvensky
jquast thanks for the input; I'm a python newbie, so it WILLL be interesting. As to the money, I blew a tire and totally my car. Car is dead but I'm okay, better than the opposite.
Ghost
@ghost~529c6b12ed5ab0b3bf04d522
well business or hobby, figuring out the hard stuff is what its all about
if it was easy everybody would do it, good luck
Michael Joseph Vensky
@mvensky
jquast; as to my company I'm the open source advocate in a sea of Windows users. Not the easiest spot to be.
Yes and I'll be famous, seems like lot's of people have the same problem, but no solution. Thanks for your tips.
jquast, how did you figure out the inner workings of terminals? books? staring at source code? any hints for a beginner.
Ghost
@ghost~529c6b12ed5ab0b3bf04d522
@mvensky see my “further reading” guide from http://blessed.readthedocs.org/en/latest/further.html