:: setting up PYTHON 2.7 in WINDOWS XP SP3

I believe by now most of the world have moved on to greater OSes like macOS, LINUX, Windows 10? most but not all ... (the world of OS https://en.wikipedia.org/wiki/Usage_share_of_operating_systems, however, different data collection points shows different statistics https://www.netmarketshare.com/operating-system-market-share.aspx?qprid=10&qpcustomd=0)

8% to 12% ? of the world ?

in any case, this is a run down page of how to get PYTHON 2.7xx into WinXP properly. (originally i posted installing 3.4, however due to compatibility issues of 3.4 with many newer/older stuffs, 2.7 is now used instead of 3.4)

of course DL install your PYTHON. then install a nice PYTHON editor NOTEPAD++ (NO NO NO ... this "notepad++" is NOT your WINDOWS text editor, it is a PYTHON editor)

then setup the PATH environments, by adding these to ENVIRONMENT VARIABLES (found inside control panel--> system --> advance[tab] --> ENVIRONMENT VARIABLES[button])
add under "SYSTEM VARIABLES" --> appending behind existing variables into "PATH" --> the following (in red, noting the separator ";" )

;[existing variables leave them as is];C:\Python34;C:\Python34\libs;C:\Python34\Lib:C:\Python34\include:C:\Python34\DLLs; (---> edit use *PYTHON27*)

if you are like me using desktop as the "cmd" playground. it will be useful to create a shortcut over from [C:\WINDOWS\system32] --> cmd.exe --> [send to desktop create shortcut]

edit the shortcut --> target [C:\WINDOWS\system32\cmd.exe /k]
and -->  start in ["C:\Documents and Settings\Administrator\Desktop"]
this will always direct cmd.exe to open the "MSDOS" window from a desktop directory perspective. however, note that these stuff i have been doing are ALL in ADMINISTRATOR login perspective.

and with fast references and works to and from desktop/notepad++, the cmd window is set to run the python snippets in the fashion --> c:\[desktop-path]>python abc.py

so with the setup, you have a cmd/MSDOS window for program testing and an editor window.

with the different methods i have tried so far, taking out variables here and there, it is not required to use [autoexec.bat] path additions. additions to the existing "PATH" value will be enough inside of ENVIRONMENT VARIABLES.

and this is the youtube channel which i inferred from to get my PYTHON slithering --> https://www.youtube.com/user/onestopprogramming/videos

so far so good
def helloworld(ABC): #define a fn
  
    print(ABC) #prints wadeva is ABC
    kkk = input("number?")
    print (kkk)
    if (kkk == "1"):
        print ("one")
    elif(kkk == "2"):
        print("two")
    elif(kkk == "3"):
        print("three")
    else:
        print("not 123") # the if+elif+else embedding

helloworld("testing1") #puts "testing1" =ABC, runs the fn
helloworld("testing2") #puts "testing2" =ABC, runs the fn again

def add(N1, N2): #make a sub module to add
    return N1 + N2

N1 = input("N1  :") #get string
N2 = input("N2  :")

print(add(N1,N2)) #so additional modules using +-*/ just like excel is possible.


***UPDATE***
many days have passed since installing 2.7 and learning our greatest application in the world --> HELLO WORLD !!! and that was about 5 days ago, i am rushing to see voltage logging on my screen, GO GO GO !!!

today i have come to the point of already logging data off my keithley 2015 THD using some ghetto bits n bytes.


WHen the figures start pouring on 
your screen. it is pure joy



More trials and iterations ...
start to test logging to *.XLS


data error
More exporting DATA



reading DMM registers


first log 500 samples (cant remember the NPLC)
4999 samples 1NPLC keithley 2015 @ 6Hz, 100mV, filter off, AZERo off, APER 0.1 (the DMM
is uncalibrated since Aug 2007. its a used unit from ebay.
this bell graph (or whatever is the professional name for it) is actually a bean counter, the code for it creates sorting bins spanning -5uV to +5uV in 10nV resolution (1000 bins) and collects how many occurrences of measurements of same value. i was inspired to do this from xdev.com. measuring 1uV is serious business, but i am not a volt nut.






4999 samples 1NPLC keithley 2015 @ 4Hz, 1V, filter off, AZERo off, APER 1. in this capture
session, i have a fan blowing on the front, it created a tempco causing a negative drift !


due to the severe level of my noobness in using github, i will not attempt to do more than what i can do. however, the raw codes of the above logging can be found in 1 of the threads inside keithley forums as i posted the entire code while asking for assistance. (http://forum.keithley.com/phpBB3/viewtopic.php?f=67&t=126901)

Comments

Popular Posts