benfred / py-spy

Sampling profiler for Python programs
MIT License
12.16k stars 401 forks source link

Default output filename doesn't save anything on Windows #560

Open space-nuko opened 1 year ago

space-nuko commented 1 year ago

Related to #482 I think, on Windows using record with no output filename causes no file to be saved. Kinda annoying if you record a long trace just to have it discarded. That would make sense if the filename has colons, on Windows it can be contained in the drive letter of the path so it's a forbidden character

py-spy> Stopped sampling because Control-C pressed   
Error: The filename, directory name, or volume label syntax is incorrect. (os error 123)