Ask Your Question

Byungyun Jeon's profile - activity

2018-01-31 16:04:52 -0500 received badge  Good Question (source)
2017-03-19 14:59:33 -0500 received badge  Notable Question (source)
2017-03-19 14:59:33 -0500 received badge  Popular Question (source)
2016-08-19 18:06:27 -0500 commented answer Show Sage results in a webpage as string (not as Sagecell box)

In URL encoding, without + and %3D, it also works fine like 'code=P=Primes()%3Bprint P.next(2016)'.

2016-08-17 18:00:33 -0500 received badge  Supporter (source)
2016-08-17 16:02:10 -0500 commented answer Show Sage results in a webpage as string (not as Sagecell box)

@paulmasson: Thanks a lot ! They work well ! It's more than what I expected. Thanks again for your kind explanation.

2016-08-17 14:21:54 -0500 received badge  Scholar (source)
2016-08-17 14:18:38 -0500 commented question Get Sage output on Python 2.7 without writing files

@slelievre: Thanks for comments. I meant python 2.7.12. In my old sage, it was 2.6.4. I didn't know that the latest sage has 2.7.10. I closed this question.

2016-08-16 17:17:03 -0500 received badge  Nice Question (source)
2016-08-16 12:49:29 -0500 received badge  Editor (source)
2016-08-14 21:07:04 -0500 received badge  Student (source)
2016-08-12 09:54:48 -0500 asked a question Get Sage output on Python 2.7 without writing files

I have python 2.7 codes and I know that a random python cannot use sage as a python library. So I made a script .sage in python 2.7 and ran check_output command as follows.

from subprocess import check_output 
def sage_code_run(var)
    file = open("/path/to/file.sage", 'w')
    data = "sage codes with input %s" % var
    file.write(data)
    file.close()
    return check_output(["sage", "file.sage"])

It works well, but it makes delay because of writing files. And I know "sage -python", but it's not for 2.7. Is there a way to get sage output on python?

2016-08-12 09:54:47 -0500 asked a question Show Sage results in a webpage as string (not as Sagecell box)

I'm trying to print a result on my website from Sage. I know that Sagecell can display output in website by rectangle box. Could I print as a string in web?

For example, if I write 2016 in the input form on my website, is it possible to print the next prime as "string" in web by using Sage command? (The sage command: P=Primes(); print P.next(2016) )

How can I build the code?