First time here? Check out the FAQ!

Ask Your Question
3

How to use an external text editor to create script (interact) and render it in a browser

asked 14 years ago

Lynda gravatar image

I am not very confortable with the notebook interface to edit long files (no colorisation, etc...), but I would like to be able to use interact objects. Is there a way to:

  1. Create a file in a text editor of my choice
  2. run it in sage
  3. have the ouput automatically opened in the browser

Thanks for your answers

Preview: (hide)

3 Answers

Sort by » oldest newest most voted
1

answered 14 years ago

kkumer gravatar image

Another possiblity, which is maybe Firefox specific, is to use a browser add-on that makes it possible to edit editboxes in external editors. There was 'mozex' extension that did that, but now I am using It's All Text! Firefox add-on which creates a small 'edit' button next to each Sage input cell, which opens edits in external gvim editor. This can give you also python syntax highlighting.

Preview: (hide)
link

Comments

To follow-up on myself: In google chrome browser I get the same feature by using vrome extension.

kkumer gravatar imagekkumer ( 12 years ago )

Another option if you are on Windows is "Text Editor Anywhere": http://www.listary.com/text-editor-anywhere

davitenio gravatar imagedavitenio ( 11 years ago )
1

answered 14 years ago

niles gravatar image

I don't know how to do precisely what you asked, but I often write code in a separate file and attach it to a notebook cell (just write e.g. "attach path/to/filename.sage"). Then the notebook session knows all the functions I've defined in the file.

Hopefully this will work for you,

Niles

Preview: (hide)
link
0

answered 14 years ago

nbruin gravatar image

In the worksheet you can upload and/or create data files via the "data" dropdown. You can access the files there using

load DATA+"your filename"

If the file is a ".py" or a ".sage" file, you can edit it in your browser, with syntax highlighting. Alternatively, you can use your own editor and reupload the file every time you make changes.

Preview: (hide)
link

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 14 years ago

Seen: 1,569 times

Last updated: Oct 18 '10