简体   繁体   English

在运行的Python程序上访问存储在内存中的数据

[英]Accessing data stored in the memory on a running Python program

I have a Python program that collects data. 我有一个收集数据的Python程序。 I have tested it many times before, but today it decided that it will not save the data. 我之前已经对其进行过多次测试,但是今天它决定不保存数据。 Also, unfortunately, I decided to run my program using pythonw.exe so there is no terminal to see what the errors are. 另外,不幸的是,我决定使用pythonw.exe运行我的程序,因此没有终端可以查看错误所在。

I can see that it still has the data saved to the memory because it is displayed on a plot and I can still manipulate the data using my program. 我可以看到它仍然将数据保存到内存中,因为它显示在绘图上,并且我仍然可以使用程序来操纵数据。

I want to know if there is a way to access the data my program collected externally or some way to read it. 我想知道是否有一种方法可以访问我的程序从外部收集的数据或以某种方式读取它。

I know that it is unlikely I will be able to recover my data, but it is worth a shot. 我知道我不太可能能够恢复我的数据,但是值得一试。

(Also, I am using Python 2.7 with PyQT4 as a GUI interface.) (此外,我将Python 2.7和PyQT4用作GUI界面。)

您应该能够附加到正在运行的进程并使用http://winpdb.org/检查变量

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM