Dec-17-2017, 06:49 AM
i would put this in another topic, except that subject-wise, its an introduction, so here goes:
* i spent 25 years coding in basic
* fell in love with python in 2009
* spent a few years watching how people managed with python 2 code
(i deal with files that could be bytestrings or utf-8)
* went *back* to python 2 after updating/porting my largest program ever
* have a small 90-something-command programming language implemented in both versions of python (called fig) but i doubt youd love it
* used python+fig to write a 1000-line remaster script to create "fig os"
and im currently working on a command shell for gnu/linux and windows (in python 2, alas) with the following features:
while ; find | fsortplus | fields 3 _ | cat -n | replace : ";" | var this_is_a_variable
* while creates a python while 1 loop in python, it doesnt require bash
* find either uses the native find command in gnu/linux, or dir /b /a /s in windows
* fsortplus returns the filesize, sha256sum, date, time and path of files
* fields 3 _ is like awk '{print $3 " " $_}' except it doesnt require awk
* cat -n doesnt use cat or type, but python
* replace : ";" replaces all instances of : with ; (; has to be quoted)
and best of all, piping those commands to | var this_is_a_variable creates a local python variable called this_is_a_variable and everything from the shell pipeline goes to that.
talking about python 2 is probably considered trolling here-- and i dont want anyone to think im trying to do that, but most of the stuff i do is in python 2-- including most (not all) versions of fig.
if theres a giant 2to3 thread on this forum somewhere, i WILL study it, but ive been through a lot of tutorials (standard / python docs / highly recommended ones on other sites) and when the python foundation drops support of 2.x, im probably just switching to pypy.
you never know, i may pick up some extra (improved) skills on this forum. i do really love python-- and the command line. ive been toying around with code since the mid 80s; but im not formal/pythonic enough to call myself a "python coder" really; just a coder that uses python. all the best.
* i spent 25 years coding in basic
* fell in love with python in 2009
* spent a few years watching how people managed with python 2 code
(i deal with files that could be bytestrings or utf-8)
* went *back* to python 2 after updating/porting my largest program ever
* have a small 90-something-command programming language implemented in both versions of python (called fig) but i doubt youd love it
* used python+fig to write a 1000-line remaster script to create "fig os"
and im currently working on a command shell for gnu/linux and windows (in python 2, alas) with the following features:
while ; find | fsortplus | fields 3 _ | cat -n | replace : ";" | var this_is_a_variable
* while creates a python while 1 loop in python, it doesnt require bash
* find either uses the native find command in gnu/linux, or dir /b /a /s in windows
* fsortplus returns the filesize, sha256sum, date, time and path of files
* fields 3 _ is like awk '{print $3 " " $_}' except it doesnt require awk
* cat -n doesnt use cat or type, but python
* replace : ";" replaces all instances of : with ; (; has to be quoted)
and best of all, piping those commands to | var this_is_a_variable creates a local python variable called this_is_a_variable and everything from the shell pipeline goes to that.
talking about python 2 is probably considered trolling here-- and i dont want anyone to think im trying to do that, but most of the stuff i do is in python 2-- including most (not all) versions of fig.
if theres a giant 2to3 thread on this forum somewhere, i WILL study it, but ive been through a lot of tutorials (standard / python docs / highly recommended ones on other sites) and when the python foundation drops support of 2.x, im probably just switching to pypy.
you never know, i may pick up some extra (improved) skills on this forum. i do really love python-- and the command line. ive been toying around with code since the mid 80s; but im not formal/pythonic enough to call myself a "python coder" really; just a coder that uses python. all the best.