How To Fix Failed To Unlink Socket File Error When Start Mongo DB On MacOS

When i start mongo db on macOS console by run command mongod, i got below error message. {“t”:{“$date”:”2020-09-09T10:45:30.049+08:00″},”s”:”E”,  “c”:”NETWORK”,  “id”:23024,   “ctx”:”initandlisten”,”msg”:”Failed to unlink socket file”,”attr”:{“path”:”/tmp/mongodb-27017.sock”,”error”:”Permission denied”}}

How To Fix Failed To Unlink Socket File Error When Start Mongo DB On MacOS Read More »

How To Print Text From Standard Output (Stdout) To File In Python

When you run print(‘ hello python ‘) in python code, it always print the text on screen, this is because python standard output is screen console. But we always want to print the text to a file instead of screen console, especially print exception error messages when exception occurred in python source code.

How To Print Text From Standard Output (Stdout) To File In Python Read More »

How To Debug Python Code In Ipython And Jupyter Notebook

When you run a python script file in the iPython command console or jupyter notebook web page, if your source code has an exception, it will throw out the exception and stop at the line where the exception occurred. In this situation, you can set breakpoints and run into iPython debug mode, then you can

How To Debug Python Code In Ipython And Jupyter Notebook Read More »

How To Introspect ( Look Inside ) Python Objects In IPython

IPython provide some magic command ( ?, ??, %pdef, %pdoc, %psource, %pfile ) for you to look inside python objects(  variable, function, class. module, object etc ). In this article i will tell you how to use them to introspect python objects in IPython. Below example need an ipython environment, if you do not install

How To Introspect ( Look Inside ) Python Objects In IPython Read More »