Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions vpython/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,16 @@
from .vpython import canvas

# Need to initialize canvas before user does anything and before
# importing GSprint
scene = canvas()

from .vpython import *
from .shapespaths import *
from ._vector_import_helper import *
from .rate_control import rate
from .gsprint import GSprint

# gsprint and vpython are showing up in the
# vpython is showing up in the
# namespace, so delete them
del gsprint, vpython
del vpython

# cyvector may be in the namespace. Get rid of it
try:
Expand Down
27 changes: 0 additions & 27 deletions vpython/gsprint.py

This file was deleted.

1 change: 0 additions & 1 deletion vpython/test/test_namespace.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

API_NAMES = [
'Camera',
'GSprint',
'GSversion',
'GlowWidget',
'Mouse',
Expand Down
4 changes: 2 additions & 2 deletions vpython/vpython.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def Exit():
__methods = {'select':'a', 'pos':'b', 'start':'c', 'stop':'d', 'clear':'f', # unused eghijklmnopvxyzCDFABu
'plot':'q', 'add_to_trail':'s',
'follow':'t', 'clear_trail':'w',
'bind':'G', 'unbind':'H', 'waitfor':'I', 'pause':'J', 'pick':'K', 'GSprint':'L',
'bind':'G', 'unbind':'H', 'waitfor':'I', 'pause':'J', 'pick':'K',
'delete':'M', 'capture':'N'}

__vecattrs = ['pos', 'up', 'color', 'trail_color', 'axis', 'size', 'origin',
Expand All @@ -125,7 +125,7 @@ def Exit():
'marker_color', 'offset']

__textattrs = ['text', 'align', 'caption', 'title', 'xtitle', 'ytitle', 'selected', 'label', 'capture', 'name',
'append_to_caption', 'append_to_title', 'bind', 'unbind', 'pause', 'GSprint', 'choices']
'append_to_caption', 'append_to_title', 'bind', 'unbind', 'pause', 'choices']

def _encode_attr2(sendval, val, ismethods):
s = ''
Expand Down
2 changes: 1 addition & 1 deletion vpython/vpython_libraries/glow.min.js

Large diffs are not rendered by default.

8 changes: 3 additions & 5 deletions vpython/vpython_libraries/glowcomm.html
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@
var methods = {'a':'select', 'b':'pos', 'c':'start', 'd':'stop', 'f':'clear', // unused eghijklmnopvxyzCDFAB
'q':'plot', 's':'add_to_trail',
't':'follow', 'u':'_attach_arrow', 'w':'clear_trail',
'G':'bind', 'H':'unbind', 'I':'waitfor', 'J':'pause', 'K':'pick', 'L':'GSprint',
'G':'bind', 'H':'unbind', 'I':'waitfor', 'J':'pause', 'K':'pick',
'M':'delete', 'N':'capture'}

var vecattrs = ['pos', 'up', 'color', 'trail_color', 'axis', 'size', 'origin', '_attach_arrow',
Expand All @@ -415,7 +415,7 @@
'marker_color']

var textattrs = ['text', 'align', 'caption', 'title', 'title_align', 'xtitle', 'ytitle', 'selected', 'capture',
'label', 'append_to_caption', 'append_to_title', 'bind', 'unbind', 'pause', 'GSprint', 'choices']
'label', 'append_to_caption', 'append_to_title', 'bind', 'unbind', 'pause', 'choices']

// patt gets idx and attr code; vpatt gets x,y,z of a vector
var patt = /(\d+)(.)(.*)/
Expand Down Expand Up @@ -839,9 +839,7 @@
var val = cmd.val
var obj = glowObjs[idx]

if (method == 'GSprint') {
GSprint(val)
} else if (val == 'None') {
if (val == 'None') {
if (method == 'delete') obj['remove']()
else obj[method]()
} else if (method === 'rotate') {
Expand Down
8 changes: 3 additions & 5 deletions vpython/vpython_libraries/glowcomm.js
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ var attrsb = {'a':'userzoom', 'b':'userspin', 'c':'range', 'd':'autoscale', 'e':
var methods = {'a':'select', 'b':'pos', 'c':'start', 'd':'stop', 'f':'clear', // unused eghijklmnopvxyzCDFAB
'q':'plot', 's':'add_to_trail',
't':'follow', 'u':'_attach_arrow', 'w':'clear_trail',
'G':'bind', 'H':'unbind', 'I':'waitfor', 'J':'pause', 'K':'pick', 'L':'GSprint',
'G':'bind', 'H':'unbind', 'I':'waitfor', 'J':'pause', 'K':'pick',
'M':'delete', 'N':'capture'}

var vecattrs = ['pos', 'up', 'color', 'trail_color', 'axis', 'size', 'origin', '_attach_arrow',
Expand All @@ -462,7 +462,7 @@ var vecattrs = ['pos', 'up', 'color', 'trail_color', 'axis', 'size', 'origin', '
'marker_color']

var textattrs = ['text', 'align', 'caption', 'title', 'title_align', 'xtitle', 'ytitle', 'selected', 'capture',
'label', 'append_to_caption', 'append_to_title', 'bind', 'unbind', 'pause', 'GSprint', 'choices']
'label', 'append_to_caption', 'append_to_title', 'bind', 'unbind', 'pause', 'choices']

// patt gets idx and attr code; vpatt gets x,y,z of a vector
var patt = /(\d+)(.)(.*)/
Expand Down Expand Up @@ -886,9 +886,7 @@ async function handle_methods(dmeth) {
var val = cmd.val
var obj = glowObjs[idx]

if (method == 'GSprint') {
GSprint(val)
} else if (val == 'None') {
ifif (val == 'None') {
if (method == 'delete') obj['remove']()
else obj[method]()
} else if (method === 'rotate') {
Expand Down