Popular recipes tagged "portable"http://code.activestate.com/recipes/tags/portable/2012-12-03T22:50:47-08:00ActiveState Code RecipesDynamically create a dictionary of ascending paths (Python) 2012-12-03T22:50:47-08:00Scott S-Allenhttp://code.activestate.com/recipes/users/4181178/http://code.activestate.com/recipes/578354-dynamically-create-a-dictionary-of-ascending-paths/ <p style="color: grey"> Python recipe 578354 by <a href="/recipes/users/4181178/">Scott S-Allen</a> (<a href="/recipes/tags/bootstrap/">bootstrap</a>, <a href="/recipes/tags/dictionary/">dictionary</a>, <a href="/recipes/tags/directory/">directory</a>, <a href="/recipes/tags/dynamic/">dynamic</a>, <a href="/recipes/tags/flexible/">flexible</a>, <a href="/recipes/tags/path/">path</a>, <a href="/recipes/tags/portable/">portable</a>). </p> <p>Ripped from a more elaborate bootstrap script. A sequential set of parent-directories were required for environment variables and subsequent, portable. auto-discovery. </p> Python reader for SPSS .por files (Python) 2009-06-15T15:37:39-07:00wouterhttp://code.activestate.com/recipes/users/4170747/http://code.activestate.com/recipes/576809-python-reader-for-spss-por-files/ <p style="color: grey"> Python recipe 576809 by <a href="/recipes/users/4170747/">wouter</a> (<a href="/recipes/tags/por/">por</a>, <a href="/recipes/tags/portable/">portable</a>, <a href="/recipes/tags/reader/">reader</a>, <a href="/recipes/tags/spp/">spp</a>, <a href="/recipes/tags/value_labels/">value_labels</a>). </p> <p>SPSS can output ASCII .por files that include variable definitions (labels, value labels) and data. These files are useful to be able to read but strange enough I couldn't find any documentation anywhere.</p> <p>I've reverse engineered the format so that it works for the (fairly complex) files I need to open, so maybe it is of some use for other people interfacing SPSS with python. </p> <p>This code is placed in the public domain as far as allowed by law, parts (if any) that cannot be relased in the public domain are irrevocably licensed to all readers under the Creative Commons license without restrictions ... but if you improve it it would be great if you could share it. The code uses a base N decoder plucked from the web somewhere (can't find it) that was also public domain.</p> <p>-- wouter (wouter@vanatteveldt.com)</p>