no way neither with [shell]...
hi nico
nico wrote:
is there's a way to launch this script
nico
there is a [shell]-obj, that opens a shell. i never used it myself, but as far as i know, it takes msgs from pd for stdin and returns the stdout to pd.
roman
I read:
no way neither with [shell]...
hmmm but your script works on the command line ? you could also try to wrap it in a #!/bin/bash launcher script and see where this gets you.
HTH
x
when i type in a terminal wish wish1.tcl, it launch well
so either your first line should read
#!/usr/bin/env wish
or you call a script like this
#!/bin/sh
wish /path/to/your/script.tcl
HTH
x
you're right, it works
thanks for your help nico
so either your first line should read
#!/usr/bin/env wish
or you call a script like this
#!/bin/sh
wish /path/to/your/script.tcl
HTH
x
-- chris@lo-res.org Postmodernism is german romanticism with better http://pilot.fm/ special effects. (Jeff Keuss / via ctheory.com)
another little question, how to deal with [shell] and path
because the result of wish1.tcl return / path when i launch it with
[shell], or i would like it to return the
/containing/wish1.tcl/directory/
?
is it possible to change the current working directory with [shell]
(cd command don't work)
thanks nico
I read:
is it possible to change the current working directory with [shell]
(cd command don't work)
wrap it in a shellscript like
#!/bin/sh
cd /the/dir/I/want/to/be/in/ wish /path/to/your/script.tcl
regards,
x
nico wrote:
another little question, how to deal with [shell] and path
because the result of wish1.tcl return / path when i launch it with [shell], or i would like it to return the /containing/wish1.tcl/directory/ ? is it possible to change the current working directory with [shell]
(cd command don't work)
"cd" _does_ work with [shell]
but:
when you send a command to [shell], it will create a new instance of shell (rooted at "/"), execute the script and quit. if you send another command to [shell], it will create another new instance of shell (again, rooted at "/"), execute the script and quit.
so if you send "cd /tmp" to [shell], it will change (from "/") into the directory "/tmp" and quit. if you then send "ls" to [shell], it will list the contents of the current directory ("/").
for a solution read x's mail (put "cd" into the scrip)
mfg.a.dr IOhannes
Le 1 juin 05, à 12:39, IOhannes m zmoelnig a écrit :
nico wrote:
another little question, how to deal with [shell] and path because the result of wish1.tcl return / path when i launch it with [shell], or i would like it to return the /containing/wish1.tcl/directory/ ? is it possible to change the current working directory with [shell]
(cd command don't work)"cd" _does_ work with [shell]
but:
when you send a command to [shell], it will create a new instance of shell (rooted at "/"), execute the script and quit. if you send another command to [shell], it will create another new instance of shell (again, rooted at "/"), execute the script and quit.
so if you send "cd /tmp" to [shell], it will change (from "/") into the directory "/tmp" and quit. if you then send "ls" to [shell], it will list the contents of the current directory ("/").
thank you for the [shell] discribe
for a solution read x's mail (put "cd" into the scrip)
that's what i've done and it works, nice thanks a lot nico
mfg.a.dr IOhannes
Hey,
OR use "cd" in the tcl script. This is also a valid tcl command.
That is if your tcl part is actually getting run.
But you should really look at toxy, uses the same interpeter to do the tcl stuff as PD does.
B>
nico wrote:
Le 1 juin 05, à 12:39, IOhannes m zmoelnig a écrit :
nico wrote:
another little question, how to deal with [shell] and path because the result of wish1.tcl return / path when i launch it with [shell], or i would like it to return the /containing/wish1.tcl/directory/ ? is it possible to change the current working directory with [shell] (cd command don't work)
"cd" _does_ work with [shell]
but:
when you send a command to [shell], it will create a new instance of shell (rooted at "/"), execute the script and quit. if you send another command to [shell], it will create another new instance of shell (again, rooted at "/"), execute the script and quit.
so if you send "cd /tmp" to [shell], it will change (from "/") into the directory "/tmp" and quit. if you then send "ls" to [shell], it will list the contents of the current directory ("/").
thank you for the [shell] discribe
for a solution read x's mail (put "cd" into the scrip)
that's what i've done and it works, nice thanks a lot nico
mfg.a.dr IOhannes
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list