Mac to Windows Python
<p>I have recently moved a set of near identical programs from my mac to my school's windows, and while the paths appear to be the same (or the tail end of them), they will not run properly.</p>

<pre><code>import glob
import pylab
from pylab import *


def main():
    outfnam = "igdata.csv"
    fpout = open(outfnam, "w")
    nrows = 0
    nprocessed = 0
    nbadread = 0
    filenames = [s.split("/")[1] for s in glob.glob("c/Cmos6_*.IG")]
    dirnames = "c an0 an1 an2 an3 an4".split()
    for suffix in filenames:
        nrows += 1
        row = []
        row.append(suffix)
        for dirnam in dirnames:
            fnam = dirnam+"/"+suffix
            lines = [l.strip() for l in open(fnam).readlines()]
            nprocessed += 1
            if len(lines)&lt;5:
                nbadread += 1
                print "warning: file %s contains only %d lines"%(fnam, len(lines))
                tdate = "N/A"
                irrad = dirnam
                Ig_zeroVds_largeVgs = 0.0
            else:
                data = loadtxt(fnam, skiprows=5)
                tdate = lines[0].split(":")[1].strip()
                irrad = lines[3].split(":")[1].strip()
                # pull out last column (column "-1") from second-to-last row
                Ig_zeroVds_largeVgs = data[-2,-1]
            row.append(irrad)
            row.append("%.3e"%(Ig_zeroVds_largeVgs))
        fpout.write(", ".join(row) + "\n")
    print "wrote %d rows to %s"%(nrows, outfnam)
    print "processed %d input files, of which %d had missing data"%( \
        nprocessed, nbadread)`
</code></pre>

<p>This program worked fine for a mac, but for windows I keep getting for :</p>

<pre><code> print "wrote %d rows to %s"%(nrows, outfnam)
    print "processed %d input files, of which %d had missing data"%( \
        nprocessed, nbadread)
</code></pre>

<p>wrote 0 row to file name
processed 0 input files, of which o had missing data</p>

<p>on my mac i go 144 row to file...</p>

<p>does any one have any suggestions?</p>
