Re: [Tutor] trouble using 2to3.py

2009-11-04 Thread Richard D. Moores
On Wed, Nov 4, 2009 at 11:32, ALAN GAULD wrote: > You can do some pretty clever stuff with BAT files but frankly I wouldn't > bother. > Python can do almost all of the same things more elegantly and in most > cases faster using fewer resources. > Trying out a few loops and if/else type statements

Re: [Tutor] trouble using 2to3.py

2009-11-04 Thread ALAN GAULD
> > Yes, but I was talking about the DOS help utility not the Python one... > > Lots of info there, but for a .bat beginner it's hard to put it > together. I've put a couple of old books on batch files on hold at my > local library, and also found the XP Command-line reference A-Z at >

Re: [Tutor] trouble using 2to3.py

2009-11-04 Thread Richard D. Moores
On Wed, Nov 4, 2009 at 00:31, ALAN GAULD wrote: >> > Start the cmd shell in windows and run the help command to get a list of >> > things you can put in to spruce them up. >> >> Sorry, put in where? > > In bat files, that's what you were discussing :-) >> Wow, the "online help utility" for 3.1 loo

Re: [Tutor] trouble using 2to3.py

2009-11-04 Thread Tim Golden
Dave Angel wrote: I've thought of using hard links (using fsutil.exe, in case anyone else is interested), but I keep my scripts and batch files, as well as small utilities on a separate drive partition from the one that has my OS and installed programs. And hard links don't work across separa

Re: [Tutor] trouble using 2to3.py

2009-11-04 Thread ALAN GAULD
> >> My sincere thanks to Dave Angel and Alan Gauld for their clear > >> explanations of .bat files and how to use them. I've already made > > > > Start the cmd shell in windows and run the help command to get a list of > > things you can put in to spruce them up. > > Sorry, put in where? In ba

Re: [Tutor] trouble using 2to3.py

2009-11-03 Thread Richard D. Moores
On Tue, Nov 3, 2009 at 17:21, Richard D. Moores wrote: > Another is, although I've seen this before in older Python docs, I > never really understood things like > > for_stmt ::= "for" target_list "in" expression_list ":" suite >             ["else" ":" suite] > > help> ::= > no Python documentati

Re: [Tutor] trouble using 2to3.py

2009-11-03 Thread Richard D. Moores
My sincere thanks to Dave Angel and Alan Gauld for their clear explanations of .bat files and how to use them. I've already made several useful ones. Dick Moores ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http:

Re: [Tutor] trouble using 2to3.py

2009-11-03 Thread Alan Gauld
"Richard D. Moores" wrote My sincere thanks to Dave Angel and Alan Gauld for their clear explanations of .bat files and how to use them. I've already made several useful ones. Start the cmd shell in windows and run the help command to get a list of things you can put in to spruce them up.

Re: [Tutor] trouble using 2to3.py

2009-11-03 Thread Alan Gauld
"Richard D. Moores" wrote Or the way I do it, have python31.bat and python26.bat, which launch the exact pythons that I want. Thanks, Dave. I'm not familiar with .bat files. Could you give me a look at one of them? A bat file is just a file of "DOS" commands and ends in .bat so python31.b

Re: [Tutor] trouble using 2to3.py

2009-11-03 Thread Dave Angel
Tim Golden wrote: Richard D. Moores wrote: On Tue, Nov 3, 2009 at 05:30, Dave Angel wrote: Or the way I do it, have python31.bat and python26.bat, which launch the exact pythons that I want. Thanks, Dave. I'm not familiar with .bat files. Could you give me a look at one of them? As an a

Re: [Tutor] trouble using 2to3.py

2009-11-03 Thread Dave Angel
Richard D. Moores wrote: On Tue, Nov 3, 2009 at 05:30, Dave Angel wrote: Easiest way to know which python is being used is to run it same way: e:\python31\temp> python 2to3.py -w mycalc.py Or the way I do it, have python31.bat and python26.bat, which launch the exact pythons that I want.

Re: [Tutor] trouble using 2to3.py

2009-11-03 Thread Kent Johnson
On Tue, Nov 3, 2009 at 1:10 PM, Luke Paireepinart wrote: > I was under the impression that you were supposed to top-post unless you > were referring to a specific thing someone said, in which case you quoted > it, much like you do on a forum. > Is that not how it works? Presumably you are replyin

Re: [Tutor] trouble using 2to3.py

2009-11-03 Thread Richard D. Moores
On Tue, Nov 3, 2009 at 16:46, Alan Gauld wrote: > > "Richard D. Moores" wrote >> >> My sincere thanks to Dave Angel and Alan Gauld for their clear >> explanations of .bat files and how to use them. I've already made >> several useful ones. > > Start the cmd shell in windows and run the help comma

Re: [Tutor] trouble using 2to3.py

2009-11-03 Thread Luke Paireepinart
On Tue, Nov 3, 2009 at 7:30 AM, Dave Angel wrote: > (Erasing entire history, since you both top-posted, and it's too confusing) > I was under the impression that you were supposed to top-post unless you were referring to a specific thing someone said, in which case you quoted it, much like you do

Re: [Tutor] trouble using 2to3.py

2009-11-03 Thread Tim Golden
Richard D. Moores wrote: On Tue, Nov 3, 2009 at 05:30, Dave Angel wrote: (Erasing entire history, since you both top-posted, and it's too confusing) When you run a xxx.py on Windows, it locates the python.exe using the registry entries set up by assoc and ftype. But when you run "python" it

Re: [Tutor] trouble using 2to3.py

2009-11-03 Thread Richard D. Moores
On Tue, Nov 3, 2009 at 05:30, Dave Angel wrote: > (Erasing entire history, since you both top-posted, and it's too confusing) > > When you run a xxx.py on Windows, it locates the python.exe using the > registry entries set up by  assoc and ftype.  But when you run "python" it > looks for python.ex

Re: [Tutor] trouble using 2to3.py

2009-11-03 Thread Richard D. Moores
After much fiddling around, I got 2to3 to work! And it did a fine, if not perfect job on mycalc.py (which has about 120 functions and 1993 lines). What I did that worked, was to use the E:\Python26\Tools\Scripts, and not Python31. E:\Python26\Tools\Scripts has 2to3.py. I added the folder lib2to3\

Re: [Tutor] trouble using 2to3.py

2009-11-03 Thread Dave Angel
(Erasing entire history, since you both top-posted, and it's too confusing) When you run a xxx.py on Windows, it locates the python.exe using the registry entries set up by assoc and ftype. But when you run "python" it looks for python.exe (or python.bat, or ...) on the PATH. So there's not

Re: [Tutor] trouble using 2to3.py

2009-11-03 Thread Richard D. Moores
And here's the same try (without the -w switch, to keep it simple), but this time on my laptop (64-bit Vista SP1). The result is a bit different: = C:\Python31\temp>2to3.py mycalc.py Traceback (most recent call last): File "C:\Python31\temp\2to3.py", line 2, i

Re: [Tutor] trouble using 2to3.py

2009-11-03 Thread Richard D. Moores
Well, here's the same try again, followed by starting the shell: = E:\Python31\temp>2to3.py -w mycalc.py Traceback (most recent call last): File "E:\Python31\temp\2to3.py", line 2, in from lib2to3.main import main File "E:\Python31\temp\lib2to3\main

Re: [Tutor] trouble using 2to3.py

2009-11-03 Thread Luke Paireepinart
Are you sure you're using the 3.1 version of Python to run the script? Welcome back, btw. haven't heard from you in a while. On Tue, Nov 3, 2009 at 2:09 AM, Richard D. Moores wrote: > I'm in the process to learning Python 3.1, and need to convert a bunch > of handy functions I wrote and stole ov

[Tutor] trouble using 2to3.py

2009-11-03 Thread Richard D. Moores
I'm in the process to learning Python 3.1, and need to convert a bunch of handy functions I wrote and stole over several years. They are all written in 2.x, and are together in one file, mycalc.py. I created a folder E:\Python31\temp\ (my OS is Vista SP1 64-bit), and in it I placed copies of mycal