[
https://issues.apache.org/jira/browse/TINKERPOP-1604?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15928685#comment-15928685
]
Robert Dale commented on TINKERPOP-1604:
----------------------------------------
Maybe I don't understand. In 3.2.4, you can recursively :load.
*Given scripts:*
{noformat}
[apache-tinkerpop-gremlin-console-3.2.4]$ more *.groovy
::::::::::::::
1.groovy
::::::::::::::
println "1 loading 2"
:load 2.groovy
println "loaded 2"
::::::::::::::
2.groovy
::::::::::::::
println "2 loading 3"
:load 3.groovy
println "3 loaded"
::::::::::::::
3.groovy
::::::::::::::
println "3"
{noformat}
*gremlin console*
{noformat}
[apache-tinkerpop-gremlin-console-3.2.4]$ ./bin/gremlin.sh
\,,,/
(o o)
-----oOOo-(3)-oOOo-----
plugin activated: tinkerpop.server
plugin activated: tinkerpop.utilities
plugin activated: tinkerpop.tinkergraph
gremlin> :load 1.groovy
1 loading 2
==>null
2 loading 3
==>null
3
==>null
3 loaded
==>null
loaded 2
==>null
gremlin>
gremlin>
{noformat}
If that's not what you mean, then why not just use the API instead of console
commands?
{noformat}
graph = EmptyGraph.instance()
g = graph.traversal().withRemote('conf/remote-graph.properties')
{noformat}
> Let evaluate() handle : commands e.g. :remote connect
> -----------------------------------------------------
>
> Key: TINKERPOP-1604
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1604
> Project: TinkerPop
> Issue Type: Improvement
> Components: console
> Affects Versions: 3.2.3
> Reporter: Xian Yi Teng
>
> {code}
> ~/apache-tinkerpop-gremlin-console-3.2.3$ cat ../remote_connect.groovy
> :remote connect tinkerpop.server
> apache-tinkerpop-gremlin-console-3.2.3/conf/remote.yaml
> println 1+1
> ~/apache-tinkerpop-gremlin-console-3.2.3$ bin/gremlin.sh
> \,,,/
> (o o)
> -----oOOo-(3)-oOOo-----
> plugin activated: tinkerpop.server
> plugin activated: tinkerpop.utilities
> plugin activated: tinkerpop.tinkergraph
> gremlin> evaluate(new File('../remote_connect.groovy'))
> /home/automaton/remote_connect.groovy: 1: unexpected token: : @ line 1,
> column 1.
> :remote connect tinkerpop.server
> apache-tinkerpop-gremlin-console-3.2.3/conf/remote.yaml
> ^
> 1 error
> Type ':help' or ':h' for help.
> Display stack trace? [yN]
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)