Discussion:
[Gwyddion-users] connect pygwy to existing gwyddion instance
niv levy
2014-02-20 15:15:10 UTC
Permalink
Hi,
I'd like to open files through a minimal pygwy script with some applied
filtering and datafield / layer selection, and then continue playing with
the files interactively in gwyddion after the script closes. .
I would have thought gwy.gwy_app_file_load(filename) would open the file in
an existing instance, but it seems not to - i get an open window, and can
open the data browser, but i can't seem to open the main / toolbox window,
and it is not connected to a running instance of gwyddion (and of course
closes when i quit python). Am i missing something obvious here? Is there a
different way to open the file that would do this?
niv
David Nečas (Yeti)
2014-02-20 16:08:21 UTC
Permalink
Post by niv levy
I'd like to open files through a minimal pygwy script with some applied
filtering and datafield / layer selection, and then continue playing with
the files interactively in gwyddion after the script closes. .
I would have thought gwy.gwy_app_file_load(filename) would open the file in
an existing instance, but it seems not to - i get an open window, and can
open the data browser, but i can't seem to open the main / toolbox window,
and it is not connected to a running instance of gwyddion (and of course
closes when i quit python). Am i missing something obvious here?
Not sure how obvious, but Gwyddion does not have a server-client
architecture. Every running instance of Gwyddion and every standalone
Pygwy script is simply an independent program. So the ‘app’ in your
script is the script itself and any data management functions apply to
data loaded/created by the script.
Post by niv levy
Is there a
different way to open the file that would do this?
You can write the file to disk and run

gwyddion --remote-FOO file.gwy

where FOO is ‘new’ or ‘existing’ (or possibly ‘query’) depending on what
you need, see the manual page. Note --remote-new does not terminate if
Gwyddion is not running because it runs the new instance.

Regards,

Yeti
niv levy
2014-02-20 16:17:07 UTC
Permalink
thanks - that solved my confusion.
niv
Post by niv levy
Post by niv levy
I'd like to open files through a minimal pygwy script with some applied
filtering and datafield / layer selection, and then continue playing with
the files interactively in gwyddion after the script closes. .
I would have thought gwy.gwy_app_file_load(filename) would open the file
in
Post by niv levy
an existing instance, but it seems not to - i get an open window, and can
open the data browser, but i can't seem to open the main / toolbox
window,
Post by niv levy
and it is not connected to a running instance of gwyddion (and of course
closes when i quit python). Am i missing something obvious here?
Not sure how obvious, but Gwyddion does not have a server-client
architecture. Every running instance of Gwyddion and every standalone
Pygwy script is simply an independent program. So the ‘app’ in your
script is the script itself and any data management functions apply to
data loaded/created by the script.
Post by niv levy
Is there a
different way to open the file that would do this?
You can write the file to disk and run
gwyddion --remote-FOO file.gwy
where FOO is ‘new’ or ‘existing’ (or possibly ‘query’) depending on what
you need, see the manual page. Note --remote-new does not terminate if
Gwyddion is not running because it runs the new instance.
Regards,
Yeti
------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
_______________________________________________
Gwyddion-users mailing list
https://lists.sourceforge.net/lists/listinfo/gwyddion-users
Loading...