Giter VIP home page Giter VIP logo

ivbscript's Introduction

iVBScript

Interactive VBScript

Jupyter kernel implementation for VBScript

Installation*

git clone https://github.com/ofer1katz/ivbscript.git 
cd ivbscript
git lfs pull 
python setup.py develop

*notice:

during installation registry will be edited to allow ANSI console color

[HKEY_CURRENT_USER\Console]
"VirtualTerminalLevel"=dword:00000001

during installation com dll "tlbinf32.dll" (TLI.TLIApplication) will be registered if not registered already.

%systemroot%\SysWOW64\regsvr32.exe can be used to manually register/unregister


kernel specs will be copied to os.path.join(os.path.abspath(sys.prefix), 'share', 'jupyter', 'kernels', 'vbscript')

Usage

ivbscript

or

jupyter console --kernel vbscript

Special Commands

  • cls/clear - clear console
  • exit/exit()/quit/quit() - exit iVBScript
  • !<command> - execute a child program in a new process
  • <variable>? - inspect <variable>
  • %reset - reset console
  • %file <file_path> - read <file_path> and run the content as VBScript code
  • %paste - paste and execute

If you are having this error:

Unhandled exception in event loop:
  File "c:\users\USER\appdata\local\programs\python\python38-32\lib\asyncio\proactor_events.py", line 768, in _loop_self_reading
    f.result()  # may raise
  File "c:\users\USER\appdata\local\programs\python\python38-32\lib\asyncio\windows_events.py", line 808, in _poll
    value = callback(transferred, key, ov)
  File "c:\users\USER\appdata\local\programs\python\python38-32\lib\asyncio\windows_events.py", line 457, in finish_recv
    raise ConnectionResetError(*exc.args)

Exception [WinError 995] The I/O operation has been aborted because of either a thread exit or an application request
Press ENTER to continue...

Take a look at the following workaround: ipython/ipython#12049 (comment)

Development

Install development requirements

pip install -r requirements_dev.txt -U --upgrade-strategy eager

Tests

coverage erase
coverage run --source=. --omit="*\tests\*" -m pytest -v -s
coverage report -m

Code Analytics

prospector --strictness veryhigh
# Analyze the given Python modules and compute Cyclomatic Complexity (CC).
radon cc . --min B
# Analyze the given Python modules and compute the Maintainability Index.
radon mi . --min B
# Analyze the given Python modules and compute raw metrics.
radon raw .
# Analyze the given Python modules and compute their Halstead metrics.
radon hal .

TODO:

  • test coverage
  • using pipes instead of files for communication with vbscript
  • better implementation of exit/quit (via jupyter)
  • evaluate expressions
  • complete session's variables/functions/etc. using - Tab (do_complete)
  • use do_inspect() for inspect
  • inspect levels support - ?/??
  • paste into terminal - Ctrl + v

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.