Skip to main content

I've seen suggestions that an IDE should be added to FME Desktop. Sounds awful. More stuff that can break and in need of updates.

I do agree, however, that there is a need for better handling of scripts. So why not allowing the PythonCaller, and the startup and shutdown scripting features, as well as any future scripting features, to load external files? Yes, I know you can load external files as modules, but you still need to write a script in one of FME's editors for scripts to do so, and these are unaware of typos and such, as far as I know, that is.

I see before my eyes, a simple button that opens a dialog box in either of the current editors, a dialog box from which you could point to the external Python file and that would solve a whole lot. Then you would be able to write a script in your favorite IDE, have FME load the file and run it, edit the script some more, and have FME rerun the workbench, and you would never have to worry about syntax errors and such things (provided your IDE supports dealing with those).

You can already get really close by importing your own module. Example from a PythonCaller

from mylib import myfeaturehandler
def FeatureProcessor(feature):
myfeaturehandler(feature)

Not much to write in FME :-)


Yes, I know, and that's why I also wrote about it in my post.

 

Each to his/her own, but IMO, you shouldn't have to do that.

 

 


Sure, I understand and I agree that it would be a worthwhile addition, I'm just trying to demonstrate how close you can already get.

See the attached example where the PythonCaller has no code at all and the startup script has only two lines:

from externals import *
Startup()

And the shutdown script has just a single line:

Shutdown()

They all reference an external module "externals" containing all the code.

/


 

pythoncaller-external_1.fmw

Ah but, unless the FMW somehow packages up the required external Python file(s) then you no longer have an FMW that is independent of external dependencies and you lose a major benefit which is system portability. I would object to this feature and would rather have easier tools to import a script generated in an external IDE (hence fixing typos which I have been plagued from before). Maybe something like an import aware "replace current code with the following script" in the current editor?


It's a valid feedback for sure, altough for me it's very seldom that I have a workspace file that has no other external dependencies, I usually have e.g. database/web connections, config files, related workspaces, etc. So adding one more dependency is not an issue for me, at least.


Updated idea statusGathering InterestArchived
Idea merged into:

All the votes from this idea have been transferred.