Git Product home page Git Product logo

sublime-worksheet's People

Contributors

adrien-f avatar amacleay avatar jcartledge avatar rrader avatar timonwong avatar tlehman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sublime-worksheet's Issues

problem shutting down sbt

Exception OSError: OSError(9, 'Bad file descriptor') in <bound method spawn.del of <repl.pexpect.spawn object at 0x10d8ce7d0>> ignored
Traceback (most recent call last):
File "./worksheet.py", line 46, in
File "./worksheet.py", line 55, in handle_thread
File "./worksheet.py", line 69, in handle_finished_thread
File "./worksheet.py", line 22, in close_repl
File "./repl/repl.py", line 49, in close
self.repl.close()
File "./repl/pexpect.py", line 666, in close
raise ExceptionPexpect ('close() could not terminate the child using terminate()')
repl.pexpect.ExceptionPexpect: close() could not terminate the child using terminate()

handle timeout better

Currently pexpect swallows these. We need to indicate to the user that execution was cancelled because a timeout occurred, and clean up properly. This needs to handle extreme cases like while(1);.

Erroneous "IndentationError" with python

Firstly, I admit that I'm not sure if this is more properly a bug in sublime-worksheet or a bug in python's interactive mode, but either way this unfortunately prevents me (and others, I would guess?) from using this tool which otherwise seems pretty cool...

Given code like this:

#!/usr/bin/env python
import sys

def main():
  args = sys.argv[1:]
  for arg in args:
    if '.' in arg:
      print 'great!'

    print arg

if __name__ == '__main__':
  main()

This runs just fine from the command line, but worksheet gives "IndentationError: unexpected indent" on line 10 (print arg). Is there anything that can be done about this? Unfortunately I get the same error if I save this file as foo.py and do:

cat foo.py | python -i

Error when upgrading to version 0.9.0

this is the error found

Package Control: Error downloading package. HTTP error 404 downloading https://nodeload.github.com/jcartledge/sublime-worksheet/zip/0.9.0.

Node was not found or was not executable

In Worksheet v0.7.3 on OSX 10.8.4 and ST2.0.1 thees lines of code result in an error.

Javascript:

var foo = function(bar){
    return bar;
}
foo('bar');

Console:

Traceback (most recent call last):
  File "./sublime_plugin.py", line 362, in run_
  File "./worksheet.py", line 101, in run
  File "./worksheet.py", line 19, in run
  File "./repl/repl.py", line 8, in get_repl
  File "./repl/repl.py", line 42, in __init__
  File "./repl/pexpect.py", line 432, in __init__
  File "./repl/pexpect.py", line 519, in _spawn
repl.pexpect.ExceptionPexpect: The command was not found or was not executable: node.

Bug when there is no newline at EOF

Weird things happen when we try to compensate for no newline at EOF, so make sure there is a newline at EOF then don't do anything special with it.

regression tests

Now we have 2 versions of Sublime Text, 3 operating systems, and 7+ languages the potential for inadvertently breaking things justifies spending some time setting up tests.

Support keepalive for REPL instances

Certain REPL executables (ahem scala) have significant startup overhead. It would be extremely convenient if we could configure (probably using worksheet-settings for that particular language) a REPL type to remain resident even after an eval. Keepalive would need to be configured both as a flag enabling its function and as a special command to pass to the REPL instance that resets its state (e.g. :reset for scala). We would also need a new command to manually bounce the resident instance if something gets screwed up.

Project settings not being applied

When worksheet settings are applied in .sublime-project they are not being applied.

To test: add the Python virtualenv settings from README.md to a project's settings, but change the prefix (and cmd path to the virtualenv python) to have an additional > like so:

"settings": {
    "worksheet_languages": {
        "Python": {
            "cmd": "/path/to/virtualenv/bin/python -i",
            "prompt": [">>> ", "\\.\\.+ "],
            "prefix": "# >> ",
            "error": ["Traceback ", "  File \"<stdin>\","]
        },
    }
}

Then evaluate a Python view and the project specific prefix is not used. This applies to the other settings as well. It also makes no difference if Sublime is started from the shell in an active virtualenv.

This is with ST2 2.0.2, build 2221 on OS X and sublime-worksheet a153ad8972

Windows: scala: When I save file I get "Error: MoveFileEx(... .subl8be.tmp) c:\test.scala failed, Access is deined."

Using Windows 8.
When I save the scala file, I get this error.

Unable to save test.scala
Error: MoveFileEx(... .subl8be.tmp)
c:\test.scala failed, Access is deined.

Note: I got the same error when using scalaworksheet. I filed an issue and the plugin author Tony Sloane did some investigation.
https://bitbucket.org/inkytonik/scalaworksheet/issue/5/scalaworksheet-doesnt-work-on-windows

Sublime 3 Support

Installed on Sublime 3 without error, but Worksheet: Eval doesn't appear in the the command palette.

support special keywods

for ex: the avmshell repl gives

$ avmshell -repl
avmplus interactive shell
Type '?' for help

> ?
Text entered at the prompt is compiled and evaluated unless
it is one of these commands:

  ?             print help
  .input        collect lines until a line that reads '.end',
                then eval the collected lines
  .load file    load the file (source or compiled)
  .quit         leave the repl
  .time expr    evaluate expr and report the time it took.

the ".input" to ".end" could be quite useful to support multiline scripts

can't access "worksheet: evaluate worksheet"

Hi,
I just installed this using package manager, but using ctrl+shift+P and searching for the "woksheet: evaluate worksheet" command, I can't find it.

I tried restarting sublime but the error remains.

I'm on ubuntu 11.10 (oneiric) 64bit.

Thanks

Using Boris as a PHP REPL alternative.

I was playing around with this and wanted to use Boris instead. After a couple small explosions to figure out how the settings worked, I found this to work when added to the user settings:

"worksheet_languages": {
    "PHP": {
        "cmd": "/path/to/boris",
        "prompt": ["(\\[[\\d]+\\]) (boris> | *\\*>)"],
        "error": ["PHP Parse error:", "PHP Fatal error"],
        "ignore": ["<\\?php", "\\?>"]
    }
}

Only real change was the prompt regex, which I still don't understand 100%. Not an issue per se, but I thought it might be useful to someone.

Too slow

There's no reason to wait 1/10 sec for the REPL thread to finish.

Code doesn't executes if there's no new line after statement

Steps to reproduce:

Using this code:

for x in range(2):
    print (x)
print("END")

Result:

for x in range(2):
    print (x)
print("END")
# >   File "<stdin>", line 3
# >     print("END")
# >         ^
# > SyntaxError: invalid syntax

Expected result:

for x in range(2):
    print (x)
# > 0
# > 1
print("END")
# > END

php repl

A bit tricky, because the newer php repl doesn't handle <?php and ?>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.