Skip to main content
Archived

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

Related products:FME Form
rylanatsafe
siennaatsafe
fmelizard
david_r
nielsgerrits
+74
  • rylanatsafe
    rylanatsafe
  • siennaatsafe
    siennaatsafe
  • fmelizard
    fmelizard
  • david_r
    david_r
  • nielsgerrits
    nielsgerrits
  • ebygomm
    ebygomm
  • takashi
    takashi
  • virtualcitymatt
    virtualcitymatt
  • danilo_fme
    danilo_fme
  • dustin
    dustin
  • jdh
    jdh
  • sigtill
    sigtill
  • warrendev
    warrendev
  • tcrossman
    tcrossman
  • vxn43
    vxn43
  • carmijo
    carmijo
  • tomf
    tomf
  • runneals
    runneals
  • bruceharold
    bruceharold
  • lorenrouth
    lorenrouth
  • jelle
    jelle
  • kennyo
    kennyo
  • chriswilson
    chriswilson
  • martinkoch
    martinkoch
  • jackyd
    jackyd
  • srg
    srg
  • ciarab
    ciarab
  • timboberoosky
    timboberoosky
  • courtney_m
    courtney_m
  • bibold
  • kimo
    kimo
  • gerhard
  • marko
  • larrybird
  • jleoncofgis
    jleoncofgis
  • nicohauri
    nicohauri
  • ml56067
    ml56067
  • nixynoodle
    nixynoodle
  • esietinga
    esietinga
  • andre.utilit
  • balthasar
  • moberdries
    moberdries
  • db_apha
    db_apha
  • ragjr
    ragjr
  • mbv
  • lencer
  • ecthelion
    ecthelion
  • samisnunu
    samisnunu
  • ekkischeffler
    ekkischeffler
  • mmccart
    mmccart
  • pflegpet
    pflegpet
  • johnt
    johnt
  • gabriel_hirsch
    gabriel_hirsch
  • bubblebeb
    bubblebeb
  • rchoucroun
    rchoucroun
  • asablomberg
    asablomberg
  • jneujens
    jneujens
  • giosp
    giosp
  • francis_m
    francis_m
  • geoal
    geoal
  • jpvo
    jpvo
  • wicki
    wicki
  • bertd
  • phoeffler
    phoeffler
  • soeren
    soeren
  • cbs
  • ccantu
    ccantu
  • mathieu_ambrosy
    mathieu_ambrosy
  • jerrodstutzman
  • spatial_k
  • helen.tait
    helen.tait
  • rhansen
  • samuelvaldez
  • brcalexm
  • msims
  • davidpark
  • markc
  • laurawatsafe
    laurawatsafe
  • tkaufmann
    tkaufmann

fmelizard
Safer
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
This post is closed to further activity.
It may be a question with a best answer, an implemented idea, or just a post needing no comment.
If you have a follow-up or related question, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

14 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+12

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


runneals
Contributor
Forum|alt.badge.img+22
  • Contributor
  • September 19, 2019

Any momentum on this? @daleatsafe


rchoucroun
Contributor
Forum|alt.badge.img+11
  • Contributor
  • 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+14
  • 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


virtualcitymatt
Celebrity
Forum|alt.badge.img+36

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+14

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+15
  • 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+15
  • 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+15
  • Safer
  • February 10, 2024
The following idea has been merged into this idea:

All the votes have been transferred into this idea.

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings