cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Browse apps to extend the software in the new JMP Marketplace
%3CLINGO-SUB%20id%3D%22lingo-sub-782950%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EJMP%20Python%20%ED%86%B5%ED%95%A9%EC%9D%84%20Python%20%EC%B8%A1%EC%97%90%EC%84%9C%20%EC%9E%AC%EC%84%A4%EC%A0%95%ED%95%98%EB%8A%94%20%EB%B0%A9%EB%B2%95%EC%9D%B4%20%EC%9E%88%EC%8A%B5%EB%8B%88%EA%B9%8C%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-782950%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EJMP%20%EC%84%B8%EC%85%98%EC%9D%84%20%EB%8B%AB%EC%A7%80%20%EC%95%8A%EA%B3%A0%EB%8F%84%20JMP%EC%9D%98%20Python%20%EC%B8%A1%EC%97%90%EC%84%9C%20%22%EB%AA%A8%EB%93%A0%20%EA%B2%83%22%EC%9D%84%20%EC%A7%80%EC%9A%B8%20%EC%88%98%20%EC%9E%88%EB%8A%94%20%EB%B0%A9%EB%B2%95%EC%9D%B4%20%EC%9E%88%EC%8A%B5%EB%8B%88%EA%B9%8C%3F%20(JSL%EC%9D%98%20Delete%20Symbols()%EC%99%80%20%EB%B9%84%EC%8A%B7%ED%95%9C%20%EA%B2%83%20%EB%98%90%EB%8A%94%20%EC%BB%A4%EB%84%90%EC%9D%84%20%EB%8B%A4%EC%8B%9C%20%EC%8B%9C%EC%9E%91%ED%95%98%EB%8A%94%20%EB%B0%A9%EB%B2%95)%3C%2FP%3E%0A%3CP%3E%20%3C%2FP%3E%0A%3CP%3E%EC%A0%80%EB%8A%94%20%EB%8F%99%EB%A3%8C%EC%99%80%20%ED%95%A8%EA%BB%98%20JMP%20Python%20%ED%86%B5%ED%95%A9%EC%9D%84%20%ED%99%9C%EC%9A%A9%ED%95%98%EC%97%AC%20%EC%95%A0%ED%94%8C%EB%A6%AC%EC%BC%80%EC%9D%B4%EC%85%98%EC%9D%84%20%EA%B0%9C%EB%B0%9C%ED%95%98%EA%B3%A0%20%EC%9E%88%EC%9C%BC%EB%A9%B0%20Python%20%EC%BD%94%EB%93%9C%EB%A5%BC%20%EB%B3%80%EA%B2%BD%ED%95%98%EB%A9%B4%EC%84%9C%20JMP%EB%A5%BC%20%EA%B3%84%EC%86%8D%20%EB%8B%AB%EC%95%84%EC%95%BC%20%ED%95%A9%EB%8B%88%EB%8B%A4.%20%EC%9D%B4%EB%A0%87%EA%B2%8C%20%ED%95%98%EB%8A%94%20%EC%9D%B4%EC%9C%A0%EB%8A%94%20%EC%98%A4%EB%9E%98%EB%90%9C%20Python%20%EC%BD%94%EB%93%9C%EA%B0%80%20%EB%A9%94%EB%AA%A8%EB%A6%AC%EC%97%90%20%EC%9E%88%EA%B3%A0%20%EA%B0%80%EC%A0%B8%EC%98%A4%EA%B8%B0%EA%B0%80%20%EC%9D%B4%EB%AF%B8%20%EA%B0%80%EC%A0%B8%EC%98%A8%20%EC%BD%94%EB%93%9C%EB%A5%BC%20%EB%8D%AE%EC%96%B4%EC%93%B0%EC%A7%80%20%EC%95%8A%EB%8A%94%20%EB%AC%B8%EC%A0%9C%EA%B0%80%20%EB%B0%9C%EC%83%9D%ED%95%98%EC%97%AC%20Python%EC%9D%84%20%22%EC%A7%80%EC%9A%B0%EA%B8%B0%22%20%EC%9C%84%ED%95%B4%EC%84%9C%EC%9E%85%EB%8B%88%EB%8B%A4.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-782950%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3E%EC%9E%90%EB%8F%99%ED%99%94%20%EB%B0%8F%20%EC%8A%A4%ED%81%AC%EB%A6%BD%ED%8C%85%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-782963%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20JMP%20Python%20%ED%86%B5%ED%95%A9%EC%9D%84%20Python%20%EC%B8%A1%EC%97%90%EC%84%9C%20%EC%9E%AC%EC%84%A4%EC%A0%95%ED%95%98%EB%8A%94%20%EB%B0%A9%EB%B2%95%EC%9D%B4%20%EC%9E%88%EC%8A%B5%EB%8B%88%EA%B9%8C%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-782963%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%EB%AC%B4%EC%8B%9C%EB%90%98%EB%8A%94%20%EC%97%85%EB%8D%B0%EC%9D%B4%ED%8A%B8%EB%90%9C%20%EB%AA%A8%EB%93%88.%20%EB%A7%8E%EC%9D%80%20%EB%86%80%EB%9D%BC%EC%9B%80%EA%B3%BC%20%EA%B2%BD%EC%9D%B4%EB%A1%9C%EC%9B%80%20-%20%EC%95%8C%EC%95%84%EC%B0%A8%EB%A6%B4%20%EB%95%8C%EA%B9%8C%EC%A7%80...%3CBR%20%2F%3E%20%EC%95%84%EC%95%84%EC%95%84%EC%95%84!%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3E%3CFONT%20face%3D%22courier%20new%2Ccourier%22%3E%EB%8D%B8%EC%9D%B4%3C%2FFONT%3E%20%ED%9A%A8%EA%B3%BC%EA%B0%80%20%EC%9E%88%EB%82%98%EC%9A%94%3F%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Eimport%20sys%0Aprint(sys.path)%0Adel%20sys%0Aprint(sys.path)%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-783147%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20JMP%20Python%20%ED%86%B5%ED%95%A9%EC%9D%84%20Python%20%EC%B8%A1%EC%97%90%EC%84%9C%20%EC%9E%AC%EC%84%A4%EC%A0%95%ED%95%98%EB%8A%94%20%EB%B0%A9%EB%B2%95%EC%9D%B4%20%EC%9E%88%EC%8A%B5%EB%8B%88%EA%B9%8C%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-783147%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CEM%3E%3CSTRONG%3E%EB%AC%B8%EC%A0%9C%EA%B0%80%3C%2FSTRONG%3E%3C%2FEM%3E%20%EC%9E%88%EC%8A%B5%EB%8B%88%EB%8B%A4.%EB%8C%80%EB%B6%80%EB%B6%84%EC%9D%98%20Python%20%EC%8A%A4%ED%81%AC%EB%A6%BD%ED%8A%B8%EC%97%90%EC%84%9C%20%EC%9D%B4%20%EB%AC%B8%EC%A0%9C%EB%8A%94%20Python%20%EC%9E%90%EC%B2%B4%EC%9D%98%20%EC%88%98%EB%AA%85%EC%9D%B4%20%EC%9D%BC%EB%B0%98%EC%A0%81%EC%9C%BC%EB%A1%9C%20%EC%8A%A4%ED%81%AC%EB%A6%BD%ED%8A%B8%EC%99%80%20%EB%8F%99%EC%9D%BC%ED%95%98%EA%B8%B0%20%EB%95%8C%EB%AC%B8%EC%97%90%20%ED%81%AC%EA%B2%8C%20%EB%88%88%EC%97%90%20%EB%9D%84%EC%A7%80%20%EC%95%8A%EC%8A%B5%EB%8B%88%EB%8B%A4.%EA%B0%99%EC%9D%80%20%EB%8C%80%ED%99%94%ED%98%95%20%EC%84%B8%EC%85%98%20%EB%82%B4%EC%97%90%EC%84%9C%20%EC%97%AC%EB%9F%AC%20%EC%9E%91%EC%97%85%EC%9D%84%20%EC%88%98%ED%96%89%ED%95%98%EB%A9%B4%EC%84%9C%20%EA%B8%B4%20%EC%84%B8%EC%85%98%20%EB%8F%99%EC%95%88%20Python%EC%9D%84%20%EB%8C%80%ED%99%94%ED%98%95%EC%9C%BC%EB%A1%9C%20%EC%8B%A4%ED%96%89%ED%95%98%EB%A9%B4%20%EB%88%88%EC%97%90%20%EB%9D%84%EA%B8%B0%20%EC%8B%9C%EC%9E%91%ED%95%A0%20%EA%B2%83%EC%9E%85%EB%8B%88%EB%8B%A4.%EC%9D%B4%EB%8A%94%20NumPy%EC%99%80%20%EA%B0%99%EC%9D%B4%20%EC%9D%BC%EB%B6%80%20Python%20%ED%8C%A8%ED%82%A4%EC%A7%80%EA%B0%80%20C%2FC%2B%2B(%EB%B0%8F%20Fortran)%EB%A1%9C%20%EA%B5%AC%ED%98%84%EB%90%98%EC%96%B4%20%EB%8D%94%EC%9A%B1%20%EB%B3%B5%EC%9E%A1%ED%95%B4%EC%A7%91%EB%8B%88%EB%8B%A4.Python%EC%9D%80%20%EC%9D%B4%EB%A5%BC%20%EA%B3%B5%EC%9C%A0%20%EB%9D%BC%EC%9D%B4%EB%B8%8C%EB%9F%AC%EB%A6%AC%EB%A1%9C%20%EB%A1%9C%EB%93%9C%ED%95%98%EA%B3%A0%20%EC%9E%AC%EC%8B%9C%EC%9E%91%ED%95%98%EB%8A%94%20%EA%B2%83%20%EC%99%B8%EC%97%90%20%EC%8B%A4%ED%96%89%20%EC%A4%91%EC%9D%B8%20%ED%94%84%EB%A1%9C%EC%84%B8%EC%8A%A4%EC%97%90%EC%84%9C%20%EA%B3%B5%EC%9C%A0%20%EB%9D%BC%EC%9D%B4%EB%B8%8C%EB%9F%AC%EB%A6%AC%EB%A5%BC%20%EC%96%B8%EB%A1%9C%EB%93%9C%ED%95%98%EB%8A%94%20%EC%95%88%EC%A0%84%ED%95%9C%20%EB%B0%A9%EB%B2%95%EC%9D%80%20%EC%97%86%EC%8A%B5%EB%8B%88%EB%8B%A4.JMP%EB%8A%94%20Python%20%EA%B3%B5%EC%9C%A0%20%EB%9D%BC%EC%9D%B4%EB%B8%8C%EB%9F%AC%EB%A6%AC%20%EC%9E%90%EC%B2%B4%EC%99%80%20%EB%B9%84%EC%8A%B7%ED%95%9C%20%EC%9C%84%EC%B9%98%EC%97%90%20%EC%9E%88%EC%9C%BC%EB%A9%B0%20%EC%96%B8%EB%A1%9C%EB%93%9C%ED%95%A0%20%EC%88%98%20%EC%97%86%EC%8A%B5%EB%8B%88%EB%8B%A4.%EC%98%88%2C%20%3CSTRONG%3E%3CEM%3Edel%EC%9D%80%3C%2FEM%3E%3C%2FSTRONG%3E%20%EA%B0%9D%EC%B2%B4%EB%A5%BC%20%ED%95%B4%EC%A0%9C%ED%95%A9%EB%8B%88%EB%8B%A4.%EA%B7%B8%EB%9F%AC%EB%82%98%20del%20sys%EB%8A%94%20%EC%98%88%EC%83%81%ED%95%98%EB%8A%94%20%EC%9E%91%EC%97%85%EC%9D%84%20%EC%88%98%ED%96%89%ED%95%98%EC%A7%80%20%EC%95%8A%EC%8A%B5%EB%8B%88%EB%8B%A4.%EC%9D%B4%EA%B2%83%EC%9D%80%20'%EB%AA%A8%EB%93%88'%EC%9D%84%20%EC%82%AD%EC%A0%9C%ED%95%98%EA%B1%B0%EB%82%98%20%EC%96%B8%EB%A1%9C%EB%93%9C%ED%95%98%EA%B1%B0%EB%82%98%20%EC%A2%85%EC%86%8D%20dll%EC%9D%84%20%EC%96%B8%EB%A1%9C%EB%93%9C%ED%95%98%EB%8A%94%20%EA%B2%83%EC%9D%B4%20%EC%95%84%EB%8B%88%EB%9D%BC%20%EB%A1%9C%EB%93%9C%EB%90%9C%20%EB%AA%A8%EB%93%88%EC%97%90%20%EB%8C%80%ED%95%9C%20%EC%B0%B8%EC%A1%B0%EB%A5%BC%20%EB%B3%B4%EC%9C%A0%ED%95%9C%20'sys'%20%EA%B0%9D%EC%B2%B4%EB%A5%BC%20%EC%82%AD%EC%A0%9C%ED%95%98%EB%8A%94%20%EA%B2%83%EC%9E%85%EB%8B%88%EB%8B%A4.%EB%98%90%20%EB%8B%A4%EB%A5%B8%20%EC%B8%A1%EB%A9%B4%EC%9D%80%20sys%EA%B0%80%20%EB%A1%9C%EB%93%9C%EB%90%9C%20%EB%AA%A8%EB%93%88%EC%9D%B4%20%EC%95%84%EB%8B%8C%20Python%20%EB%82%B4%EC%9E%A5%20%EB%AA%A8%EB%93%88%EC%9D%B4%EB%9D%BC%EB%8A%94%20%EA%B2%83%EC%9E%85%EB%8B%88%EB%8B%A4.%20'sys'%EB%A5%BC%20%EC%82%AD%EC%A0%9C%ED%95%98%EB%8D%94%EB%9D%BC%EB%8F%84%20sys.path%EC%97%90%20%EB%8B%A4%EB%A5%B8%20%EA%B2%BD%EB%A1%9C%EB%A5%BC%20%EC%B6%94%EA%B0%80%ED%95%98%EB%8A%94%20%EB%93%B1%EC%9D%98%20%EB%B3%80%EA%B2%BD%20%EC%82%AC%ED%95%AD%EC%9D%80%20%EC%A0%95%EB%A6%AC%EB%90%98%EC%A7%80%20%EC%95%8A%EC%8A%B5%EB%8B%88%EB%8B%A4.%3C%2FP%3E%0A%3CP%3E%20%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E%EB%A7%8C%EC%95%BD%20%EB%8B%B9%EC%8B%A0%EC%9D%B4%20%EA%B7%B8%EB%A0%87%EA%B2%8C%20%ED%95%9C%EB%8B%A4%EB%A9%B4%3A%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%20%3C%2FP%3E%0A%3CPRE%3Esys.path.append('%2Fusr%2Flocal%2Fbin')%0Aprint(sys.path)%0Adel%20sys%0Aprint(sys.path).%20%20%23%20gives%20error%20on%20sys%0Aimport%20sys%0Aprint(sys.path).%20%20%23%20still%20contains%20the%20%2Fusr%2Flocal%2Fbin%20addition%0A%3C%2FPRE%3E%0A%3CP%3E%EC%9C%84%EC%9D%98%20%EB%82%B4%EC%9A%A9%EC%9D%80%20%ED%84%B0%EB%AF%B8%EB%84%90%20%EC%B0%BD%EC%97%90%EC%84%9C%20%EB%8C%80%ED%99%94%ED%98%95%20%EC%84%B8%EC%85%98%EC%9C%BC%EB%A1%9C%20%EC%8B%A4%ED%96%89%EB%90%98%EC%97%88%EC%8A%B5%EB%8B%88%EB%8B%A4.%20Python%EC%9D%84%20%EC%A2%85%EB%A3%8C%ED%95%98%EA%B3%A0%20%EB%8B%A4%EC%8B%9C%20%EC%8B%9C%EC%9E%91%ED%95%B4%EC%95%BC%EB%A7%8C%20sys.path%EC%97%90%EC%84%9C%20%2Fusr%2Flocal%2Fbin%EC%9D%B4%20%EC%A7%80%EC%9B%8C%EC%A1%8C%EC%8A%B5%EB%8B%88%EB%8B%A4.%20%EC%9C%A0%EC%9D%BC%ED%95%9C%20%EC%8B%A4%EC%A0%9C%20%EB%B0%A9%EB%B2%95%EC%9D%80%20%EC%84%B8%EC%85%98%EC%97%90%EC%84%9C%20%EC%82%AC%EC%9A%A9%EB%90%9C%20%EB%AA%A8%EB%93%A0%20%EB%B3%80%EC%88%98%EB%A5%BC%20%EC%B6%94%EC%A0%81%ED%95%9C%20%EB%8B%A4%EC%9D%8C%20'%EC%84%B8%EC%85%98'%EC%9D%B4%20%EB%81%9D%EB%82%A0%20%EB%95%8C%20%EC%82%AD%EC%A0%9C%ED%95%98%EB%8A%94%20%EA%B2%83%EC%9E%85%EB%8B%88%EB%8B%A4.%20%ED%95%9C%20%EA%B0%80%EC%A7%80%20%EB%B0%A9%EB%B2%95%EC%9D%80%20%EA%B0%81%20%EB%B3%80%EC%88%98%EB%A5%BC%20%EB%AA%A9%EB%A1%9D%EC%9D%B4%EB%82%98%20%EC%82%AC%EC%A0%84%EC%97%90%20%EB%84%A3%EC%9D%80%20%EB%8B%A4%EC%9D%8C%20%EC%84%B8%EC%85%98%EC%9D%B4%20%EB%81%9D%EB%82%A0%20%EB%95%8C%20%EC%BB%A8%ED%85%8C%EC%9D%B4%EB%84%88%EB%A5%BC%20%EC%82%AD%EC%A0%9C%ED%95%98%EB%8A%94%20%EA%B2%83%EC%9E%85%EB%8B%88%EB%8B%A4.%3C%2FP%3E%0A%3CP%3E%EC%A0%80%EB%8A%94%20%EA%B8%80%EB%A1%9C%EB%B2%8C%20%ED%99%98%EA%B2%BD%EC%97%90%EC%84%9C%20%EC%8B%A4%ED%96%89%EB%90%98%EC%A7%80%20%EC%95%8A%EB%8A%94%20%EC%BD%94%EB%93%9C%EB%A5%BC%20%EC%84%A4%EC%A0%95%ED%95%A0%20%EC%88%98%20%EC%9E%88%EB%8A%94%20Python%20%EC%84%9C%EB%B8%8C%20%EC%9D%B8%ED%84%B0%ED%94%84%EB%A6%AC%ED%84%B0%EC%9D%98%20%EC%82%AC%EC%9A%A9%EC%9D%84%20%EC%97%B0%EA%B5%AC%ED%95%98%EA%B3%A0%20%EC%9E%88%EC%8A%B5%EB%8B%88%EB%8B%A4.%20%EC%95%84%EC%9D%B4%EB%94%94%EC%96%B4%EB%8A%94%20%EC%84%9C%EB%B8%8C%20%EC%9D%B8%ED%84%B0%ED%94%84%EB%A6%AC%ED%84%B0%EA%B0%80%20%EB%8F%85%EB%A6%BD%EC%A0%81%EC%9D%B4%EB%A9%B0%20%EC%84%9C%EB%B8%8C%20%EC%9D%B8%ED%84%B0%ED%94%84%EB%A6%AC%ED%84%B0%EB%A5%BC%20%EC%A2%85%EB%A3%8C%ED%95%98%EB%A9%B4%20Python%EC%9D%84%20%EC%A2%85%EB%A3%8C%ED%95%98%EA%B3%A0%20%EB%8B%A4%EC%8B%9C%20%EC%8B%9C%EC%9E%91%ED%95%98%EB%8A%94%20%EA%B2%83%EC%B2%98%EB%9F%BC%20%EC%9E%91%EB%8F%99%ED%95%9C%EB%8B%A4%EB%8A%94%20%EA%B2%83%EC%9E%85%EB%8B%88%EB%8B%A4.%20%ED%98%84%EC%9E%AC%EB%A1%9C%EC%84%9C%EB%8A%94%20JMP%20%EC%84%B8%EC%85%98%EC%9D%98%20%EC%88%98%EB%AA%85%20%EB%82%B4%EC%97%90%20%EB%A9%94%EC%9D%B8%20Python%20%EC%9D%B8%ED%84%B0%ED%94%84%EB%A6%AC%ED%84%B0%EB%A5%BC%20%EC%95%88%EC%A0%84%ED%95%98%EA%B2%8C%20%EC%A2%85%EB%A3%8C%ED%95%98%EA%B3%A0%20%EB%8B%A4%EC%8B%9C%20%EC%8B%9C%EC%9E%91%ED%95%98%EB%8A%94%20%EB%B0%A9%EB%B2%95%EC%9D%84%20%EC%B0%BE%EC%A7%80%20%EB%AA%BB%ED%96%88%EC%8A%B5%EB%8B%88%EB%8B%A4.%3C%2FP%3E%0A%3CP%3E%20%3C%2FP%3E%0A%3CP%3E%EB%AA%A8%EB%93%88%EC%9D%84%20%EB%8B%A4%EC%8B%9C%20%EB%A1%9C%EB%93%9C%ED%95%98%EB%8A%94%20%ED%98%84%EC%9E%AC%20Python%20%EA%B4%80%ED%96%89(Python%203.4%EB%B6%80%ED%84%B0%20%EC%8B%9C%EC%9E%91)%EC%9D%80%20%EB%8B%A4%EC%9D%8C%EA%B3%BC%20%EA%B0%99%EC%8A%B5%EB%8B%88%EB%8B%A4.%3C%2FP%3E%0A%3CPRE%20class%3D%22lang-py%20s-code-block%22%3E%3CCODE%20class%3D%22hljs%20language-python%22%20data-highlighted%3D%22yes%22%3E%3CSPAN%20class%3D%22hljs-keyword%22%3Eimport%3C%2FSPAN%3E%20importlib%0Aimportlib.reload(modulename)%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3Esys%EB%A5%BC%20%EB%8B%A4%EC%8B%9C%20%EB%A1%9C%EB%93%9C%ED%95%98%EB%A0%A4%EA%B3%A0%20%ED%95%98%EB%A9%B4%3C%2FP%3E%0A%3CPRE%3E%26gt%3B%26gt%3B%26gt%3B%20importlib.reload(sys)%0A%3CMODULE%3E%3C%2FMODULE%3E%3C%2FPRE%3E%0A%3CP%3Enumpy%EB%A5%BC%20%EB%8B%A4%EC%8B%9C%20%EB%A1%9C%EB%93%9C%ED%95%98%EB%A9%B4%20%EB%8B%A4%EC%9D%8C%EA%B3%BC%20%EA%B0%99%EC%9D%80%20%EC%B6%9C%EB%A0%A5%EC%9D%B4%20%EB%82%98%EC%98%B5%EB%8B%88%EB%8B%A4...%3C%2FP%3E%0A%3CPRE%3E%26gt%3B%26gt%3B%26gt%3B%20importlib.reload(np)%0A%2FLibrary%2FFrameworks%2FPython.framework%2FVersions%2F3.11%2Flib%2Fpython3.11%2Fimportlib%2F__init__.py%3A169%3A%20UserWarning%3A%20The%20NumPy%20module%20was%20reloaded%20(imported%20a%20second%20time).%20This%20can%20in%20some%20cases%20result%20in%20small%20but%20subtle%20issues%20and%20is%20discouraged.%0A%20%20_bootstrap._exec(spec%2C%20module)%0A%3CMODULE%3E%3C%2FMODULE%3E%3C%2FPRE%3E%0A%3CP%3E%EC%82%AC%EC%9A%A9%EC%9E%90%20%EA%B2%BD%EA%B3%A0%EB%A5%BC%20%EC%B0%B8%EA%B3%A0%ED%95%98%EC%84%B8%EC%9A%94%3A%3C%2FP%3E%0A%3CP%3EUserWarning%3A%20NumPy%20%EB%AA%A8%EB%93%88%EC%9D%B4%20%EB%8B%A4%EC%8B%9C%20%EB%A1%9C%EB%93%9C%EB%90%98%EC%97%88%EC%8A%B5%EB%8B%88%EB%8B%A4(%EB%91%90%20%EB%B2%88%EC%A7%B8%EB%A1%9C%20%EA%B0%80%EC%A0%B8%EC%98%B4).%20%EC%9D%B4%EB%8A%94%20%EC%96%B4%EB%96%A4%20%EA%B2%BD%EC%9A%B0%EC%97%90%20%EC%82%AC%EC%86%8C%ED%95%98%EC%A7%80%EB%A7%8C%20%EB%AF%B8%EB%AC%98%ED%95%9C%20%EB%AC%B8%EC%A0%9C%EB%A5%BC%20%EC%B4%88%EB%9E%98%ED%95%A0%20%EC%88%98%20%EC%9E%88%EC%9C%BC%EB%A9%B0%20%EA%B6%8C%EC%9E%A5%EB%90%98%EC%A7%80%20%EC%95%8A%EC%8A%B5%EB%8B%88%EB%8B%A4.%20_bootstrap._exec(spec%2C%20module)%3C%2FP%3E%0A%3CP%3E%20%3C%2FP%3E%0A%3CP%3E'%EA%B3%B5%EC%8B%9D%EC%A0%81%EC%9D%B8'%20%EB%B0%A9%EB%B2%95%EC%9D%84%20%EC%82%AC%EC%9A%A9%ED%95%B4%EB%8F%84%20%EB%AA%A8%EB%93%88%EC%9D%84%20%EB%8B%A4%EC%8B%9C%20%EB%A1%9C%EB%93%9C%ED%95%98%EB%A9%B4%20%EB%AC%B8%EC%A0%9C%EA%B0%80%20%EB%B0%9C%EC%83%9D%ED%95%A0%20%EC%88%98%20%EC%9E%88%EC%8A%B5%EB%8B%88%EB%8B%A4.%3C%2FP%3E%0A%3CP%3Eimportlib.reload()%EB%8A%94%20%EC%BD%94%EB%93%9C%EC%97%90%EC%84%9C%20Python%20%EB%AA%A8%EB%93%88%EC%9D%84%20%EA%B0%9C%EB%B0%9C%ED%95%A0%20%EB%95%8C%20%EB%A7%A4%EC%9A%B0%20%ED%9A%A8%EA%B3%BC%EC%A0%81%EC%9E%85%EB%8B%88%EB%8B%A4.%20%EB%AA%A8%EB%93%88%20%EC%86%8C%EC%8A%A4%EC%9D%98%20%EB%B3%80%EA%B2%BD%20%EC%82%AC%ED%95%AD%EC%9D%80%20%EB%8B%A4%EC%8B%9C%20%EB%A1%9C%EB%93%9C%ED%95%A0%20%EB%95%8C%EA%B9%8C%EC%A7%80%20%EB%B0%98%EC%98%81%EB%90%98%EC%A7%80%20%EC%95%8A%EA%B8%B0%20%EB%95%8C%EB%AC%B8%EC%9E%85%EB%8B%88%EB%8B%A4.%20%EC%9E%A0%EC%9E%AC%EC%A0%81%EC%9C%BC%EB%A1%9C%20Python%20%EC%BD%94%EB%93%9C%EC%9D%98%20.pyc%EB%A1%9C%20%EB%8B%A4%EC%8B%9C%20%EC%BB%B4%ED%8C%8C%EC%9D%BC%ED%95%B4%EC%95%BC%20%ED%95%A9%EB%8B%88%EB%8B%A4.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Choose Language Hide Translation Bar
jthi
Super User

Is there a way to reset JMP Python integrations Python side

Is there any way how I could clear "everything" in the Python side of JMP without closing the JMP session (something similar to Delete Symbols() in JSL or a way to restart the kernel)?

 

I'm developing application utilizing JMP Python integration with my colleague and as we make changes to the Python code we have to keep constantly closing JMP. We do this to "clear" the Python as we run into issues where old Python code is in the memory and imports won't overwrite already imported code.

-Jarmo
1 ACCEPTED SOLUTION

Accepted Solutions

Re: Is there a way to reset JMP Python integrations Python side

There are issues.  In most Python scripts, the issue isn't noticed much because the lifetime of Python itself is usually the same as the script.  You would begin to notice if you ran Python interactively for a long session, doing multiple things within the same interactive session.  This is further complicated by some of the Python packages are implemented in C/C++ ( and even Fortran ) such as NumPy.  Python loads these as shared libraries, and there is no safe way to unload the shared library from a running process, other than a restart.  JMP is in a similar position with the Python shared library itself, it can't be unloaded.  Yes, del works to release objects. However, del sys isn't doing what you might expect.  This isn't deleting or unloading the 'module' or unloading dependent dlls, it's simply deleting the 'sys' object that's holding the references to the loaded module.  The other aspect is that sys is a Python built-in module, not the same as a loaded module.  Further deleting 'sys' doesn't clean up any changes you may have made, for example appending another path to sys.path.

 

If you do:

 

sys.path.append('/usr/local/bin')
print(sys.path)
del sys
print(sys.path).  # gives error on sys
import sys
print(sys.path).  # still contains the /usr/local/bin addition

The above was run in an interactive session in a terminal window.  Only exiting Python and restarting cleared the /usr/local/bin from sys.path.  The only real way is for you to keep track of all the variables used in a session and then delete them at the end of the 'session'.  One way would be to put each variable in a list, or dictionary, then delete the container at the end of the session. 

I am researching the use of Python sub-interpreters which could allow setting up code that doesn't run in the global environment, the idea being the sub-interpreter is independent, and shutting down the sub-interpreter would act like a shut down and restart of Python. At present, I haven't found a way to safely shut down and restart the main Python interpreter within the lifetime of a JMP session.

 

 The current Python practice to reload a module ( starting with Python 3.4) is

import importlib
importlib.reload(modulename)

Trying to reload sys gives

>>> importlib.reload(sys)
<module 'sys' (built-in)>

Reloading numpy, gives the following output...

>>> importlib.reload(np)
/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/importlib/__init__.py:169: UserWarning: The NumPy module was reloaded (imported a second time). This can in some cases result in small but subtle issues and is discouraged.
  _bootstrap._exec(spec, module)
<module 'numpy' from '/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/numpy/__init__.py'>

Note the UserWarning:

UserWarning: The NumPy module was reloaded (imported a second time). This can in some cases result in small but subtle issues and is discouraged. _bootstrap._exec(spec, module)

 

Even with the 'official' way of reloading a module can cause issues.  

importlib.reload() works great for when you are developing a Python module in code, since changes to the a module's source will not be reflected until a reload.  Which potentially forces a recompile to .pyc of the Python code.

View solution in original post

2 REPLIES 2
hogi
Level XII

Re: Is there a way to reset JMP Python integrations Python side

Updated modules which are ignored. Many suprises and wonders - till you notice...
Argh!

 

does del work?

import sys
print(sys.path)
del sys
print(sys.path)

Re: Is there a way to reset JMP Python integrations Python side

There are issues.  In most Python scripts, the issue isn't noticed much because the lifetime of Python itself is usually the same as the script.  You would begin to notice if you ran Python interactively for a long session, doing multiple things within the same interactive session.  This is further complicated by some of the Python packages are implemented in C/C++ ( and even Fortran ) such as NumPy.  Python loads these as shared libraries, and there is no safe way to unload the shared library from a running process, other than a restart.  JMP is in a similar position with the Python shared library itself, it can't be unloaded.  Yes, del works to release objects. However, del sys isn't doing what you might expect.  This isn't deleting or unloading the 'module' or unloading dependent dlls, it's simply deleting the 'sys' object that's holding the references to the loaded module.  The other aspect is that sys is a Python built-in module, not the same as a loaded module.  Further deleting 'sys' doesn't clean up any changes you may have made, for example appending another path to sys.path.

 

If you do:

 

sys.path.append('/usr/local/bin')
print(sys.path)
del sys
print(sys.path).  # gives error on sys
import sys
print(sys.path).  # still contains the /usr/local/bin addition

The above was run in an interactive session in a terminal window.  Only exiting Python and restarting cleared the /usr/local/bin from sys.path.  The only real way is for you to keep track of all the variables used in a session and then delete them at the end of the 'session'.  One way would be to put each variable in a list, or dictionary, then delete the container at the end of the session. 

I am researching the use of Python sub-interpreters which could allow setting up code that doesn't run in the global environment, the idea being the sub-interpreter is independent, and shutting down the sub-interpreter would act like a shut down and restart of Python. At present, I haven't found a way to safely shut down and restart the main Python interpreter within the lifetime of a JMP session.

 

 The current Python practice to reload a module ( starting with Python 3.4) is

import importlib
importlib.reload(modulename)

Trying to reload sys gives

>>> importlib.reload(sys)
<module 'sys' (built-in)>

Reloading numpy, gives the following output...

>>> importlib.reload(np)
/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/importlib/__init__.py:169: UserWarning: The NumPy module was reloaded (imported a second time). This can in some cases result in small but subtle issues and is discouraged.
  _bootstrap._exec(spec, module)
<module 'numpy' from '/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/numpy/__init__.py'>

Note the UserWarning:

UserWarning: The NumPy module was reloaded (imported a second time). This can in some cases result in small but subtle issues and is discouraged. _bootstrap._exec(spec, module)

 

Even with the 'official' way of reloading a module can cause issues.  

importlib.reload() works great for when you are developing a Python module in code, since changes to the a module's source will not be reflected until a reload.  Which potentially forces a recompile to .pyc of the Python code.