![]() ![]() Here is what a current spj file looks like for me (note it is all on one line as well!):Īnd that file also has several hard coded file locations. Also we can open up the spj file (it is just a plain text xml file). So SPSS takes over the location of the current directory. ![]() On my machine currently C:\Program Files\IBM\SPSS Statistics. ![]() This still prints out wherever SPSS is installed as the current working directory inside of the SPSS session. SPSS makes things more painful, say I added SPSS to my environment variable in my windows machine, and I run from the command prompt an SPSS production job: cd "C:\Users\Andrew"Īnd say the spj file, all it does is call a syntax show.sps which has as the only command SHOW DIR. I need to have my friend have their python environment set up correctly, but most of the stuff I do I can say download Anaconda and click yes to setting python on the path and they are golden. This is how the majority of code is packaged – can clone from github or email a zip file, and it will just work no matter where the local user saves those scripts. Here the bat file is run locally, it sets the current directory to wherever the bat file is located. I tell my friend save those two files in whatever folder you want, you just need to double click the bat file and it will save the scraped data into the same folder. And inside the bat file has the command: python scrape.py I write my python script, say scrape.py, and a run_scrape.bat file for my friend on their windows machine (or run_scrape.sh on Mac/Unix). Say I made alittle python script for a friend to scrape data from a website whenever they wanted updates. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
January 2023
Categories |