Chuck Rhode crh...@lacusveris.com added the comment:
Here are four ways to generate things called in the documentation Abstract
Syntax Trees (ASTs). Obviously they are not all the same kind of object:
#!/usr/local/bin/python2.6
import sys
import compiler
import parser
import ast
STATEMENT
Chuck Rhode crh...@lacusveris.com added the comment:
I don't see why the compiler module is any better than any of the other
ways that produce reasonable AST.
It is available on Python releases older than 2.6?
--
___
Python tracker rep
Chuck Rhode crh...@lacusveris.com added the comment:
Thanks. -ccr-
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7210
___
___
Python-bugs-list
Changes by Chuck Rhode crh...@lacusveris.com:
Removed file: http://bugs.python.org/file15231/test_grammar.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7210
Chuck Rhode crh...@lacusveris.com added the comment:
Oh! That's very different. :-)
I can do that.
--
Added file: http://bugs.python.org/file15237/test_grammar_trunk.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7210
Changes by Chuck Rhode crh...@lacusveris.com:
Removed file: http://bugs.python.org/file15213/test_grammar.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7210
Chuck Rhode crh...@lacusveris.com added the comment:
Sorry I'm having so much trouble with this patch. Here's another.
Thanks for your patience. -ccr-
--
Added file: http://bugs.python.org/file15231/test_grammar.patch
___
Python tracker rep
Chuck Rhode crh...@lacusveris.com added the comment:
Yet another patch file
--
Added file: http://bugs.python.org/file15213/test_grammar.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7210
New submission from Chuck Rhode crh...@lacusveris.com:
PythonTidy is a code beautifier written three years ago and downloaded
numerous times.
o http://lacusveris.com/PythonTidy/PythonTidy.python
It suffers a bug, which has only recently come to light. It considers
the following lines
Chuck Rhode crh...@lacusveris.com added the comment:
You mean like this?
--
Added file: http://bugs.python.org/file15209/test_grammar.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7210
Changes by Chuck Rhode crh...@lacusveris.com:
Removed file: http://bugs.python.org/file15209/test_grammar.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7210
Changes by Chuck Rhode crh...@lacusveris.com:
Removed file: http://bugs.python.org/file15206/test_grammar.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7210
Chuck Rhode crh...@lacusveris.com added the comment:
Well, the last two patch files weren't very good, but I hope the third
time's the charm.
--
Added file: http://bugs.python.org/file15210/test_grammar.patch
___
Python tracker rep...@bugs.python.org
Chuck Rhode crh...@lacusveris.com added the comment:
PythonTidy encounters this problem.
o http://lacusveris.com/PythonTidy/PythonTidy.python
It is unable correctly to render line 694 of test_grammar.py in the
Python Test Suite:
d[1,] = 2
becomes:
d[1] = 2
because the *compiler
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 Rhode, Sheboygan, WI, USA
.. Weather: http
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
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 SE 5 mph — Sky partly cloudy
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, similar to PEP 247. This would make it easier
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
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
--
.. Chuck Rhode
, 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
))
: 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
.. Weather: http://LacusVeris.com/WX
.. 32° — Wind Calm
--
http://mail.python.org/mailman
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):
def __init__(self
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 overcast. Light rain; mist.
--
http://mail.python.org/mailman
/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.
--
.. Chuck Rhode, Sheboygan, WI, USA
, 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
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.
--
http
://www.lacusveris.com/PythonTidy/PythonTidy-1.10.python;PythonTidy
1.10/A - Cleans up, regularizes, and reformats the text of Python
scripts. (18-Jan-07)/P
.. Chuck Rhode, Sheboygan, WI, USA
.. mailto:[EMAIL PROTECTED]
.. Weather: http://LacusVeris.com/WX
.. 20° — Wind WNW 13 mph
--
http://mail.python.org/mailman
://www.lacusveris.com/PythonTidy/PythonTidy-1.10.python;PythonTidy
1.10/A - Cleans up, regularizes, and reformats the text of Python
scripts. (18-Jan-07)/P
.. Chuck Rhode, Sheboygan, WI, USA
.. mailto:[EMAIL PROTECTED]
.. Weather: http://LacusVeris.com/WX
.. 20° — Wind WNW 13 mph
--
http://mail.python.org/mailman
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
.. Weather: http://LacusVeris.com
;PythonTidy
1.9/A - Cleans up, regularizes, and reformats the text of Python
scripts. (09-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/listinfo/python-announce-list
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, WI, USA
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
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
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 rapidly become so in the near future.
--
.. Chuck Rhode, Sheboygan, WI, USA
.. Weather: http://LacusVeris.com/WX
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, Sheboygan, WI, USA
.. 1979 Honda
, 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
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 nice if I could call
'PythonTidy.py
, 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 whole library of Python
scripts.
--
.. Chuck
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
.
--
.. Chuck Rhode, Sheboygan, WI, USA
--
http://mail.python.org/mailman/listinfo/python-list
, 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
not buried
under 2.3.6.1 String Methods.
Exposing the fourth level of subtopics in section 2.3 of the lib.html
document would be nice, though.
--
.. Chuck Rhode, Sheboygan, WI
.. http://www.excel.net/~crhode/RockyGnashtoothsWeather/
.. 72?F. Wind WSW 9 mph. Partly cloudy
43 matches
Mail list logo