Skip to main content
Open

Better IDE for Python

Related products:Transformers
_jacques_
dporchetti
+222
  • _jacques_
    _jacques_
  • dporchetti
    dporchetti
  • 2002milo
  • vietthang
  • andersbmills
  • ddmzbrg
  • giapan85
    giapan85
  • laurentphaneuf
  • quince
    quince
  • ronaldhummelink
    ronaldhummelink
  • mnikosz
  • msummerton
    msummerton
  • mkludas
    mkludas
  • leo.at.ls
    leo.at.ls
  • skibhof
    skibhof
  • emadera
  • vlroyrenn
    vlroyrenn
  • cbell_lvs
  • cshepard
    cshepard
  • maddiel
    maddiel
  • rlundstrum
    rlundstrum
  • siennaatsafe
    siennaatsafe
  • nathanatsafe
    nathanatsafe
  • nielsgerrits
    nielsgerrits
  • takashi
    takashi
  • hkingsbury
    hkingsbury
  • danilo_fme
    danilo_fme
  • dustin
    dustin
  • lifalin2016
    lifalin2016
  • sigtill
    sigtill
  • asadamjad
  • warrendev
    warrendev
  • tcrossman
    tcrossman
  • vxn43
    vxn43
  • thijsknapen
    thijsknapen
  • jkr_wrk
    jkr_wrk
  • j.botterill
    j.botterill
  • carmijo
    carmijo
  • oscard
    oscard
  • tomf
    tomf
  • stalknecht
    stalknecht
  • bruceharold
    bruceharold
  • fgiron
    fgiron
  • larue
    larue
  • mattwilkie
    mattwilkie
  • mathiku
    mathiku
  • joepk
    joepk
  • nic_ran
    nic_ran
  • jelle
    jelle
  • geosander
    geosander
  • panda
    panda
  • kennyo
    kennyo
  • chriswilson
    chriswilson
  • jackyd
    jackyd
  • canerakin
    canerakin
  • fhilding
  • arthur_bazin
    arthur_bazin
  • lambertus
    lambertus
  • ciarab
    ciarab
  • fme
    fme
  • courtney_m
    courtney_m
  • jeroenstiers
  • bibold
  • juanmahere
    juanmahere
  • kimo
    kimo
  • koenterralytics
    koenterralytics
  • revesz
    revesz
  • paalped
    paalped
  • spatialexjames
    spatialexjames
  • jasperwis
    jasperwis
  • softwrite1
    softwrite1
  • richsnyder0
  • gerhard
  • maaz
    maaz
  • cuckovic2206
  • jamess
  • generationn00b
  • kevs-2021
    kevs-2021
  • andrej
    andrej
  • ssiegl
    ssiegl
  • k1
  • gtong_monash
  • fox87
  • ottadini
    ottadini
  • makt
    makt
  • k_lander
    k_lander
  • jesidas
  • ev_robin
    ev_robin
  • ml56067
    ml56067
  • nathanherzog
    nathanherzog
  • gjermundw
    gjermundw
  • jnotter
    jnotter
  • nordpil
    nordpil
  • r5
    r5
  • carstenotto
    carstenotto
  • nrich
    nrich
  • lindsay
    lindsay
  • t_hohenstrater
    t_hohenstrater
  • geolassi
    geolassi
  • sandervanegmond
    sandervanegmond
  • australgis
    australgis
  • chk1
    chk1
  • dataninja
    dataninja
  • littlefictions
    littlefictions
  • jarrydhunter
    jarrydhunter
  • geospatiallover
  • outlook
    outlook
  • davekazemi
    davekazemi
  • kirken
    kirken
  • jvbmov
    jvbmov
  • garrettcronin
    garrettcronin
  • esietinga
    esietinga
  • jsmitsman
    jsmitsman
  • simonl
    simonl
  • crayxt
  • flavien
    flavien
  • dean.mcgowan
    dean.mcgowan
  • davidmooney
    davidmooney
  • demix
    demix
  • jiranek_hsro
    jiranek_hsro
  • hsamor
    hsamor
  • mvanwie
    mvanwie
  • johannafalk
    johannafalk
  • mickleod
  • vesnikos
  • balthasar
  • mgrimnes
    mgrimnes
  • guidos
  • ifitch
  • robclark984
  • nokout
  • lbarrufat
    lbarrufat
  • d_l
    d_l
  • inba
  • jobrien77
    jobrien77
  • yongjie
    yongjie
  • nielsg
    nielsg
  • blll_daigle
    blll_daigle
  • julien
  • majid9
    majid9
  • mattia.deago
    mattia.deago
  • ecthelion
    ecthelion
  • samisnunu
    samisnunu
  • ekkischeffler
    ekkischeffler
  • aegman
    aegman
  • geogaard
    geogaard
  • felipeverdu
    felipeverdu
  • paalpedersen
    paalpedersen
  • johnt
    johnt
  • marnickcle
    marnickcle
  • skime
    skime
  • ngstoke
    ngstoke
  • kalbert
    kalbert
  • gavinpark
    gavinpark
  • jeroen
    jeroen
  • adrian_farrell
    adrian_farrell
  • ronnie.utter
    ronnie.utter
  • michpil
    michpil
  • anari
    anari
  • fbrws
    fbrws
  • verdoodtdries
    verdoodtdries
  • jwarren
    jwarren
  • kim
  • robertr
    robertr
  • rickklopping
    rickklopping
  • tim.rastall1
    tim.rastall1
  • geoportalcartog
    geoportalcartog
  • adriano
    adriano
  • geoal
    geoal
  • hansh
    hansh
  • paul_m
    paul_m
  • jpvo
    jpvo
  • dellerbeck
    dellerbeck
  • vhruska
    vhruska
  • wicki
    wicki
  • gis_midwest
    gis_midwest
  • stevenjh
    stevenjh
  • grahamwood_hwc
    grahamwood_hwc
  • maplinux
    maplinux
  • bertd
  • cheffing
    cheffing
  • jmiddel
    jmiddel
  • joshb
  • nea
    nea
  • jorge_vidinha
    jorge_vidinha
  • _fabian_
    _fabian_
  • hrvoje
    hrvoje
  • kweller
    kweller
  • phoeffler
    phoeffler
  • joeri
    joeri
  • denniswilhelm
    denniswilhelm
  • soeren
    soeren
  • davidrasner5
    davidrasner5
  • szhengsean
  • henrik_thoren_
    henrik_thoren_
  • danilovic
  • ammar.shaarbaf
    ammar.shaarbaf
  • sidra
    sidra
  • saxoriko
    saxoriko
  • denseg
  • simen
  • alexanderyanush
  • spatial_k
  • pdegraaf
  • nojo
    nojo
  • pelbe3
  • luigidd
    luigidd
  • ecollet
  • ras
  • battlezone77
  • hendrikh
  • axoda
  • thezedman
  • mi_o
    mi_o
  • j
  • gsteinmon
  • firework_girl
  • camw
  • rhansen
  • samuelvaldez
  • amitkulz
  • lundopendata
  • joddolini
  • mgrupp
    mgrupp
  • scriptgal96
    scriptgal96
  • martti.vaali
    martti.vaali
  • golerox527
    golerox527

It would be great if FME could either use a better IDE for the Python Caller and startup/shutdown scripts or allow testing in an external IDE such as PyScripter. Right now there is no debugging capability and if you want to test your values you have to say something like:

print "value is",value

Then look for it in the log file. An internal line by line step through debugger would be useful, or to use an external editor that has a line by line step through debugger, enable PyScripter to understand:
import fme
import fmeobjects

22 replies

david_r
Celebrity
  • November 24, 2015
Hi

 

 

There is already an article about using the excellent PyCharm IDE with FME: Use PyCharm as FMEObjects Python IDE

 

 

Would that work for your use case?

 

 

On a more general note, I've had a lot of success with writing my modules as generic as possible, without using FMEobjects at all, only simple Pythonic data structures. It is then easy to integrate them into PythonCallers etc, using only a minimum of code to extract the necessary feature info (coordinates and/or key attributes) into they datastructures and pass them on to the modules. The great thing about this is the possibility of doing unit testing etc on your modules without having to rely on either FME or specific data.

 

 

David

 


bruceharold
Contributor
Forum|alt.badge.img+17
  • Contributor
  • November 24, 2015
My preference would be IDLE. It isn't great but it is always available.

 


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

Python is very powerfull but in FME (PythonCaller or PythonCreator) we need to have a real debugger.

In many cases, there is a indentation issue (grr), may be the best solution in the transformer is to use a better indentation for the Python language.

It will be very fun to debug the python scrypt with a Point break when the workbench is running

Suggestion to have two output for the PythonCaller or Creator:

  1. Output: everything works fine
  2. Output: exceptions

david_r
Celebrity
  • November 27, 2015

It's really easy to simulate the two output ports, though:

try: # Process feature here... feature.setAttribute('_error', 0) except: feature.setAttribute('_error', 1)

Then you check for '_error' using e.g. a Tester.

David


taojunabc
Participant
Forum|alt.badge.img+6
  • Participant
  • November 27, 2015

If you use PyScripter.You can configure it like this

  1. Tools ?Edit Startup Scripts
  2. Add the following code: import sys fmePypath=[r"C:\\apps\\FME\\fmeobjects\\python27",r"C:\\apps\\FME\\plugins",r"C:\\apps\\FME\\python",r"C:\\apps\\FME\\python\\python27"] sys.path.extend(fmePypath)
  3. Restart PyScripter PyScripter will be able to understand fmeobjects

'


  • November 30, 2015

This is a good solution but you would still be running your Python script outside of FME, correct? Everytime you work on your script and get it to work you would have to copy it and put it into the PythonCaller in your FME script. What I had in mind was that you open the PythonCaller and there is an option to open that script in your favorite IDE. When you save it in the IDE it saves to the PythonCaller.

One way I have emulated this is to write my code in my external Python editor and then import it in the PythonCaller.

import myPythonScript

If the script is in the same folder as the FME script or is on the PYTHONPATH, the FME Python interpreter will find it and execute it.


  • November 30, 2015

This is great to know about PyScripter. However, as I understand it, you would still be testing your script externally to FME and then you would have to copy it into the PythonCaller, correct?

See my comments to David's suggestion about PyCharm above.


david_r
Celebrity
  • December 2, 2015

I also use the "import myPythonModule" paradigm, it works nicely.

It also has the added benefit of forcing you to separate the algorithm (module) from your data (workspace), which I think is generally a good idea in itself.

Unit testing and debugging is also much easier when working on a free standing module, rather than integrated into e.g. a PythonCaller.


danilo_fme
Evangelist
Forum|alt.badge.img+44
  • Evangelist
  • December 28, 2015

I use PyCharm and liked very much.


Forum|alt.badge.img+5
  • February 1, 2016

Yes i know that :)

Thank you !


paalped
Contributor
Forum|alt.badge.img+5
  • Contributor
  • May 30, 2018

Yes to a new IDE!

But also these lines are very usefull:

logger = fmeobjects.FMELogFile() logger.logMessageString('Black_Info',0) logger.logMessageString(‘Blue_Warning’,1) logger.logMessageString('Red_Error',2)

paalped
Contributor
Forum|alt.badge.img+5
  • Contributor
  • May 30, 2018
Give us py linting!

Forum|alt.badge.img+1

Quick suggestion - a save button within the PythonCaller and PythonCreator that saves the workbench.


sigtill
Supporter
Forum|alt.badge.img+24
  • Supporter
  • December 17, 2019

Integrating the open source Atom would be great! https://atom.io/


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

Out of the few python IDEs I have used, pyScripter gets my vote for ease of use and also potential incorporation into FME Desktop. PyCharm might be too much of a sledgehammer.


warrendev
Enthusiast
Forum|alt.badge.img+23
  • Enthusiast
  • March 22, 2022

Yes please!


ronnie.utter
Contributor
Forum|alt.badge.img+11

I was just going to create this post and was so glad there already was one with so many votes. Yes please :)

 


mattwilkie
Supporter
Forum|alt.badge.img+11
  • Supporter
  • June 22, 2022

Over a thousand votes and still getting recent comments. Clearly there is user interest in this. 7 years since the idea was proposed, so also clearly there is a problem or two in implementing it. Would someone from Safe please provide some information on what gets in the way of using {IDE_of_choice}* for FME python scripts? There are some capable people in the user base. Maybe a description of the challenge to be surmounted will elicit some ideas or even code for doing so.

 

* my personal vote is Pyzo. Lightweight, self contained, easily switch between active interpreters without restarting, interactive and live variable exploration, cross platform.


jeand
Contributor
Forum|alt.badge.img+5
  • Contributor
  • February 7, 2023

Perhaps using our favorite Python software for developping?

https://community.safe.com/s/bridea/a0rDm000000Ccp7IAC/python-debugging


outlook
Contributor
Forum|alt.badge.img+3
  • Contributor
  • September 15, 2023

Pycharm would be great..


jwarren
Contributor
Forum|alt.badge.img+5
  • Contributor
  • December 2, 2024

Competitors have Jupyter notebooks built in as the python editor. 


LizAtSafe
Safer
Forum|alt.badge.img+15
  • Safer
  • April 5, 2025
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