Re: Best practice for config files?

2025-05-23 Thread Chuck Rhode
quot; > > result = pathlib.Path.home() / ".config" > return result - -- .. Be Seeing You, .. Chuck Rhode, Sheboygan, WI, USA .. Weather: https://LacusVeris.com/Wx .. 47° — Wind NNW at 12 mph. Sky clear. -BEGIN PGP SIGNATURE- iF0EARECAB0WIQT+MY/5I/LMPSswTbVg2/xip

Re: Good python equivalent to C goto

2008-08-18 Thread Chuck Rhode
d *come from* construct proposed for *fortran*? Here there be typos (abject apologies): o Clark, R. Lawrence. "A Linguistic Contribution to GOTO-less Programming." _Datamation_ Dec. 1973. 18 Aug. 2008 <http://www.fortranlib.com/gotoless.htm>. -- .. Be Seeing You, .. Chuck Rhod

Re: Web Crawler - Python or Perl?

2008-06-26 Thread Chuck Rhode
ndshake even though the download stalled. -- .. Chuck Rhode, Sheboygan, WI, USA .. 1979 Honda Goldwing GL1000 (Geraldine) .. Weather: http://LacusVeris.com/WX .. 73° — Wind Calm -- http://mail.python.org/mailman/listinfo/python-list

Re: Web Crawler - Python or Perl?

2008-06-12 Thread Chuck Rhode
ittier solution is to supply timeout parms to the *curl* command through the shell. Execute the command and retrieve its output through the *subprocess* module. -- .. Chuck Rhode, Sheboygan, WI, USA .. 1979 Honda Goldwing GL1000 (Geraldine) .. Weather: http://LacusVeris.com/WX .. 64° — Wind

Re: Python 3000: Standard API for archives?

2007-06-05 Thread Chuck Rhode
Tim Golden wrote this on Mon, 04 Jun 2007 15:55:30 +0100. My reply is below. > Chuck Rhode wrote: >> samwyse wrote this on Mon, 04 Jun 2007 12:02:03 +. My reply is >> below. >>> I think it would be a good thing if a standardized interface >>> existed, sim

Re: Python 3000: Standard API for archives?

2007-06-04 Thread Chuck Rhode
of tars and other abominations). -- .. Chuck Rhode, Sheboygan, WI, USA .. Weather: http://LacusVeris.com/WX .. 62° — Wind N 7 mph — Sky overcast. Mist. -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP 8 style enforcing program

2007-05-31 Thread Chuck Rhode
montyphyton wrote this on Thu, 31 May 2007 05:16:30 -0700. My reply is below. > I understand that there are a lot of code beautifiers out there, but > i haven't seen one specially tailored for Python. Consider PythonTidy: o http://lacusveris.com/PythonTidy/PythonTidy.python -- ..

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-15 Thread Chuck Rhode
uction. While skimming this discussion, I, too, was suffering flashbacks to CDC's 6-bit Hollerith code. -- .. Chuck Rhode, Sheboygan, WI, USA .. Weather: http://LacusVeris.com/WX .. 69° — Wind NNE 6 mph — Sky partly cloudy. -- http://mail.python.org/mailman/listinfo/python-list

Re: nonstandard XML character entities?

2007-04-14 Thread Chuck Rhode
Chuck Rhode wrote this on Sat, 14 Apr 2007 09:04:45 -0500. My reply is below. Fixed text wrap: > import xml.etree.ElementTree # or elementtree.ElementTree prior to 2.5 > ElementTree = xml.etree.ElementTree > import htmlentitydefs > class XmlFile(ElementTree.ElementTree): >

Re: nonstandard XML character entities?

2007-04-14 Thread Chuck Rhode
arser = ElementTree.XMLTreeBuilder( : target=ElementTree.TreeBuilder(Element)) : parser.entity = htmlentitydefs.entitydefs : self.parse(source=file, parser=parser) : return It looks goofy as can be, but it works for me. -- .. Chuck Rhode, Sheboygan, WI, USA ..

Re: [JOB] Sr. Python Developer, Northern VA

2007-03-23 Thread Chuck Rhode
ational. ... so what's this we hear of employers' (in the US) being so starved for talent that they're willing to bring in young men from overseas with 3.5 kids and 1.5 wives? -- .. Chuck Rhode, Sheboygan, WI, USA .. Weather: http://LacusVeris.com/WX .. 44° — Wind SSE 7 mph — Sky

Re: Python Source Code Beautifier

2007-02-27 Thread Chuck Rhode
ythonTidy/PythonTidy.python It doesn't have a graphical user interface, and it doesn't do everything you want, and it isn't reasonable (It's of an unreasonable size.), but it is a beginning. For future reference, look in: o http://cheeseshop.python.org/pypi ... under "reformat.&q

Re: Automated resizing of JPEG image + making slices?

2007-02-15 Thread Chuck Rhode
rubbed clean of any delimiters that would look like executable shell script code, variable substitutions, or even spurious path names. -- .. Chuck Rhode, Sheboygan, WI, USA .. Weather: http://LacusVeris.com/WX .. 18° — Wind WNW 13 mph -- http://mail.python.org/mailman/listinfo/python-list

Re: beep or sound playing under linux

2007-01-22 Thread Chuck Rhode
hg wrote this on Mon, Jan 22, 2007 at 04:12:50PM +0100. My reply is below. > Is there a way to do that? (Make noise.) In Gnome there is: gtk.gdk.beep() -- .. Chuck Rhode, Sheboygan, WI, USA .. Weather: http://LacusVeris.com/WX .. 28° — Wind WSW 10 mph — Sky overcast. -- h

PythonTidy 1.10

2007-01-18 Thread Chuck Rhode
/PythonTidy/PythonTidy-1.10.python";>PythonTidy 1.10 - Cleans up, regularizes, and reformats the text of Python scripts. (18-Jan-07) .. Chuck Rhode, Sheboygan, WI, USA .. mailto:[EMAIL PROTECTED] .. Weather: http://LacusVeris.com/WX .. 20° — Wind WNW 13 mph -- http://mail.python.org/mailman/

Re: Conflicting needs for __init__ method

2007-01-17 Thread Chuck Rhode
Ben Finney wrote this on Wed, Jan 17, 2007 at 08:27:54PM +1100. My reply is below. > I recommend, instead, separate factory functions for separate input > types. Uh, how 'bout separate subclasses for separate input types? -- .. Chuck Rhode, Sheboygan, WI, USA .. Wea

Re: help: code formatter?

2007-01-08 Thread Chuck Rhode
siggi wrote this on Mon, Jan 08, 2007 at 03:33:21PM +0100. My reply is below. > Is there a simple code formatter that first removes all indentations > and then refomats correctly? Why, yes, there is: http://lacusveris.com/PythonTidy/PythonTidy.python -- .. Chuck Rhode, Sheboygan, W

Re: PythonTidy

2006-12-06 Thread Chuck Rhode
my own style is > to use double quotes (I don't think that pep8 prefers one over the > other). Is it possible to customize this? Here is a new global: DOUBLE_QUOTED_STRINGS = True. -- .. Chuck Rhode, Sheboygan, WI, USA .. Weather: http://LacusVeris.com/WX .. 30° — Wind WNW 15 mph — Sky overcast. -- http://mail.python.org/mailman/listinfo/python-list

Re: PythonTidy

2006-12-05 Thread Chuck Rhode
Thomas Heller wrote this on Tue, Dec 05, 2006 at 07:06:30PM +0100. My reply is below. > I suggest you open the file with open(input-file, "rU"). This doesn't work so pretty good while reading from sys.stdin, so I'm still at the drawing board. -- .. Chuck Rhode, She

Re: PythonTidy

2006-12-05 Thread Chuck Rhode
PythonTidy to do the right thing on > unfamiliar code, and I can't readily try out various options by > simply activating or deactivating them; if I could, it would be much > more useful to me. PythonTidy should be run only on code that is already familiar or that will ra

PythonTidy

2006-12-05 Thread Chuck Rhode
scripts: http://www.LacusVeris.com/PythonTidy/PythonTidy.python What next? Is it appropriately submitted to the Cheese Shop? -- .. Chuck Rhode, Sheboygan, WI, USA .. Weather: http://LacusVeris.com/WX .. 3° — Wind W 8 mph -- http://mail.python.org/mailman/listinfo/python-list

Re: PythonTidy

2006-12-02 Thread Chuck Rhode
Thomas Heller wrote this on Fri, Dec 01, 2006 at 10:12:38PM +0100. My reply is below. > Chuck Rhode schrieb: > > o Command-line args: Please give an example of a standard command that > > I might emulate w.r.t. standard argument use. > Well, at least it would be ni

Re: PythonTidy

2006-12-02 Thread Chuck Rhode
, one of which should prevent it in all cases, obviating the need for a custom switch. -- .. Chuck Rhode, Sheboygan, WI, USA .. 1979 Honda Goldwing GL1000 (Geraldine) .. Weather: http://LacusVeris.com/WX .. 10° — Wind S 5 mph -- http://mail.python.org/mailman/listinfo/python-list

Re: PythonTidy

2006-11-30 Thread Chuck Rhode
m only minimally and am not greatly inconvenienced when they are moved around a little. -- .. Chuck Rhode, Sheboygan, WI, USA .. Weather: http://LacusVeris.com/WX .. 21° — Wind N 8 mph -- http://mail.python.org/mailman/listinfo/python-list

Re: PythonTidy

2006-11-30 Thread Chuck Rhode
d to externalize all the options; nevertheless, most are declared near the beginning where they sit just begging for end-user involvement. See: CODING_SPEC and SHEBANG. *PythonTidy* is all about consistency, consistency, and consistency. You can use it to standardize shebangs and coding across a

PythonTidy

2006-11-29 Thread Chuck Rhode
ing out. Thanks. -- .. Chuck Rhode, Sheboygan, WI, USA -- http://mail.python.org/mailman/listinfo/python-list

Re: Finding skilled pythonistas for micro-jobs?

2006-11-18 Thread Chuck Rhode
ioritize requests before he even thinks about beginning a task. It's difficult to outsource these things, and they are time consuming. -- .. Chuck Rhode, Sheboygan, WI, USA .. Weather: http://LacusVeris.com/WX .. 38° — Wind NNW 9 mph — Sky overcast. -- http://mail.python.org/mailman/listinfo/python-list