How to turn off the creation of .pyHistory in ArcPro

1039
6
12-18-2020 07:18 AM
Labels (1)
DuncanHornby
MVP Notable Contributor

In ArcPro 2.6 and 2.7 (may be also in earlier versions?) if you enter any lines of code in the Python command line window a copy of what you entered is stored in a file called .pyHistory which is in the same folder as the aprx file.

How does one stop the creation of this file, or clear it from within ArcPro? Right clicking on any entered code offers up Clear Transcript, this clears the window only and not the contents of .pyHistory .

0 Kudos
6 Replies
DanPatterson
MVP Esteemed Contributor

Project backstage, Options, Geoprocessing, Logging

Do you have anything checked on?  If so, check them off, delete the .pyHistory and try again.
I can't find any of them on my system.


... sort of retired...
DuncanHornby
MVP Notable Contributor

These are the only options turned on, none of which I want turned off.

DuncanHornby_0-1608309784755.png

 

I have worked out I can delete the .PyHistory manually but I wondered if there was some buried option that stops it from being created in the first place?

0 Kudos
DanPatterson
MVP Esteemed Contributor

I have both of mine off... hence no *.pyFluff in my folders  😁


... sort of retired...
0 Kudos
JoeBorgione
MVP Emeritus

I hate using the python window since it's design is so lame, opting rather to run all my python from Spyder. 

That should just about do it....
0 Kudos
DuncanHornby
MVP Notable Contributor

Joe,

I use spyder too but very occasionally I test stuff , 1-liners in the command line window. Just noticed it created this file, which is inaccessible from ArcPro if say you shut it down and then reopen it, so not sure why one would have this log creating, hence me wanting to "turn it off".

JoeBorgione
MVP Emeritus

Gotcha, and I've done the same on a very limited basis. Maybe create a batch file that sniffs them out and deletes them on start up?

That should just about do it....
0 Kudos