§
§õ¥Õ¡A¦r¤@¤é
or is it possible for large source files?
or is it possible for large source files?
or is it possible for large source files?
are you trying to format the file with the proper indentations?
?? said:or is it possible for large source files?
Is what possible? What do you want the tool to do?
--
 \      “I do not believe in forgiveness as it is preached by the |
 `\     church. We do not need the forgiveness of God, but of each |
_o__)           other and of ourselves.†—Robert G. Ingersoll |
Ben Finney
Google for polystyle.
It's a tool that reformats a program (in several languages) using an
example you must provide (let's call it a "style sheet", written in
Python or whatever) of how you would want to format it.
You can then reformat any python program according to your "style sheet"
æŽç™½ï¼Œå—一日 said:sometimes i need to merge some code snippets from files into a file,
and when time comes to do this merge, i always find it difficult to
reformat the python code
because after pasting and copy, the code indentation different from
one to another.
and it is the tedious job for us to manually move the code from one
segment to another.
so i would like to have a tool to intelligently format the code for me
and make the code more beautiful
and automated.
The only thing that migh be automatized after a piece of code
is valid is normalization, like de-tabifying or making
everything based on 4 space characters indention. No idea if
there is something out there that does that.
so i would like to have a tool to intelligently format the code for me
and make the code more beautiful
and automated.
This is not possible. Consider the following situation:[...]
Both are semantically radically different, and only you know which one
is the right one.
Diez
This is not possible. Consider the following situation:
[...]
Both are semantically radically different, and only you know which one
is the right one.
Diez
I have to agree with Diez, there is no way to automate this. Some
human intervention is needed. What I would like is an editor that will
indicate what Python will consider a logical block (and sub-block, and
sub-sub-block, etc.)
It's complicated. I've tried to think of a way to do it, and have
gotten lost after a few changes of indentation.
Does anyone know of such a thing?
I miss curly braces with an editor that will highlight matching
parentheses, braces, etc.
Gil
Nonetheless, it would be better to implement coding standards that
everyone can stick to.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.