Skip to main content
Gathering Interest

Function to Enable and Disable the Startup and Shutdown Python Script.

Related products:FME Form
  • October 29, 2015
  • 16 replies
  • 266 views

fmelizard
Safer
Forum|alt.badge.img+22
A function to enable|disable the Startup|Shutdown Python Script at once would be desirable.It is always very expensive if you have to comment out all lines just jor testing

16 replies

Forum|alt.badge.img
  • October 29, 2015
+1 to Mike's comment re python startup/shutdown scripts. We use python scripts to send emails, run other workspaces etc and it would be great to easily disable this while developing and testing

mathieu_ambrosy
Contributor
Forum|alt.badge.img+4

Exactly one of my ideas too. Its very not productive to delete or comment scripts before launching the workspace.

Extent the idea to pre-SQL, post-SQL and TCL startup/shutdown...


Forum|alt.badge.img+5
  • November 27, 2015

Extent the Startup and the Shutdown scrypt in the main tab, the script will have a better visibility in the workbench for the user.

'

and delete the Output for each transformer !


gabriel_hirsch
Contributor
Forum|alt.badge.img+14

This came up on a desktop basic course yesterday so I vote for this


runneals
Enthusiast
Forum|alt.badge.img+29
  • Enthusiast
  • September 19, 2019

Any momentum on this? @daleatsafe


rchoucroun
Supporter
Forum|alt.badge.img+23
  • Supporter
  • October 27, 2020

This really needs to be implemented. Particularly since feature caching has been introduced. If I run my script to a particular transformer, it runs my python startup and shutdown script. If I then run to the next transformer (using cached features) it runs my startup and shutdown scripts again. Some of these scripts are not trivial, the startup script deletes a geometric network, the shutdown script turns off versioning on the datasets, rebuilds the geometric network and turns versioning back on again. This doesn't need to occur every time I want to follow the outputs of each transformer. Please enable a switch to ignore startup/shutdown scripts when running a translation.


ecthelion
Contributor
Forum|alt.badge.img+19
  • Contributor
  • December 7, 2020

Can you just create a start.txt and/or stop.txt file and populate it with "Debug" when you want to do testing and set it to something else otherwise? Then at the top of you python you could do:

import fme, fmeobjects

f = open("start.txt", "r")

if (f.readline() == "Debug"):

  print("***** in Debug Mode, skipping normal startup *****")

else:  

  print("****** Running usual startup *****")

# USUAL STARTUP ROUTINE HERE


itsmatt
Celebrity
Forum|alt.badge.img+47
  • Celebrity
  • August 17, 2021

Is there a reason that this isn't a feature yet? It really would save a lot of time


Forum|alt.badge.img
  • November 10, 2021

Yes please , +1!


bubblebeb
Contributor
Forum|alt.badge.img+6
  • Contributor
  • November 22, 2021

Any update on this when it might become a feature?


arnold_bijlsma
Enthusiast
Forum|alt.badge.img+16

One workaround in Python is to put triple double-quotes at the top ("""). This effectively converts the entire script into just a string, which Python does nothing with.

 

(PS: It doesn't really work if you use triple double-quotes within your script)


LizAtSafe
Safer
Forum|alt.badge.img+21
  • Safer
  • February 10, 2024
The following idea has been merged into this idea:

All the votes have been transferred into this idea.

LizAtSafe
Safer
Forum|alt.badge.img+21
  • Safer
  • February 10, 2024
The following idea has been merged into this idea:

All the votes have been transferred into this idea.

LizAtSafe
Safer
Forum|alt.badge.img+21
  • Safer
  • February 10, 2024
The following idea has been merged into this idea:

All the votes have been transferred into this idea.

JennaKAtSafe
Safer
Forum|alt.badge.img+8
ArchivedGathering Interest

bruceharold
Supporter
Forum|alt.badge.img+19
  • Supporter
  • February 23, 2026

I have the same use case as ​@rchoucroun, namely non-trivial ArcPy-centric shutdown scripts that only make sense after a full translation, not during an exploratory re-imagining of a workspace when you have data caching turned on and are running up to particular transformers.  Having a switch to disable either or both of startup and shutdown scripts (separately) would be useful and save time.  This will encourage the centralisation of making full information products, not just the data, especially if you copy/paste Python code from ArcGIS Pro history entries.