Yes, this is a python question,and a serious one at that (moving to Win XP)

K

Kenneth McDonald

For unfortunate reasons, I'm considering switching back to Win XP
(from OS X) as my "main" system. Windows has so many annoyances that
I can only compare it to driving in the Bay Area at rush hour (OS X
is like driving in Portland at rush hour--not as bad, but getting
there), but there are really only a couple of things that are really,
absolutely preventing me from making the switch. Number one is the
lack of a decent command line and command-line environment, and I'm
wondering (hoping) if perhaps someone has written a "Python shell"--
something that will look like a regular shell, let users type in
commands, maybe have some of the nice features of bash etc. like tab
completion, etc, and will then execute an underlying python script
when the command is entered. I'm not thinking of IDLE, but something
that is really aimed more at being a system terminal, not a Python-
specific terminal.

Yes, I know that Cygwin is out there, but last I looked, they still
went through the Win command-line window, which imposes a lot of
restrictions.

More generally, has anyone written any python programs to administer
various Win settings for which one must otherwise delve deep into
mazes of twisty little dialogs, all alike? Or to help out with other
annoyances? I know there are a lot of general utilities, but if
they're in Python, I can also use them as a starting base for my own
needs.

Finally, a significant incentive in doing this is that I could avoid
a lot of installation hassle, since virtually everything has at least
a decent installation package for Win. (I'd hoped this would happen
for OS X, but it never has). Can anyone think of important python-
related packages (release level, not cutting edge alphas) for which
this might not be the case?

Many thanks,
Ken
 
C

Claudio Grondi

What I can point you to is not Python, but embedding it in Python
is a question of executing one line of Python code triggering its
execution.
I think you will be fascinated by its features and ease of use and
how well it is suited to fit into your needs:
http://www.autoitscript.com/autoit3/index.php
With it you will start to see, that forcing to obey to Windows way
of doing things has not only bad sides.

Is there something similar for another OSs-es (especially Linux)?

Claudio
 
C

Christophe

Kenneth McDonald a écrit :
For unfortunate reasons, I'm considering switching back to Win XP (from
OS X) as my "main" system. Windows has so many annoyances that I can
only compare it to driving in the Bay Area at rush hour (OS X is like
driving in Portland at rush hour--not as bad, but getting there), but
there are really only a couple of things that are really, absolutely
preventing me from making the switch. Number one is the lack of a
decent command line and command-line environment, and I'm wondering
(hoping) if perhaps someone has written a "Python shell"-- something
that will look like a regular shell, let users type in commands, maybe
have some of the nice features of bash etc. like tab completion, etc,
and will then execute an underlying python script when the command is
entered. I'm not thinking of IDLE, but something that is really aimed
more at being a system terminal, not a Python- specific terminal.

Yes, I know that Cygwin is out there, but last I looked, they still
went through the Win command-line window, which imposes a lot of
restrictions.

More generally, has anyone written any python programs to administer
various Win settings for which one must otherwise delve deep into mazes
of twisty little dialogs, all alike? Or to help out with other
annoyances? I know there are a lot of general utilities, but if they're
in Python, I can also use them as a starting base for my own needs.

Finally, a significant incentive in doing this is that I could avoid a
lot of installation hassle, since virtually everything has at least a
decent installation package for Win. (I'd hoped this would happen for
OS X, but it never has). Can anyone think of important python- related
packages (release level, not cutting edge alphas) for which this might
not be the case?

Many thanks,
Ken

Last time I checked, you could install a native win32gui version of rxvt
with cygwin. This would give you a better terminal window than that
crappy thing you get in XP.
 
F

Fernando Perez

Kenneth McDonald a écrit :
You can look at ipython: http://ipython.scipy.org. Its 'pysh' profile does
much of what you describe, and has a dedicated following of win32 users
precisely for your usage case. It gets installed to your start menu under
win32 as a separate entry from the 'raw' ipython.

Stop by the users list if you have further questions.

Cheers,

f
 
J

Jorgen Grahn

Kenneth McDonald a écrit : ....
Last time I checked, you could install a native win32gui version of rxvt
with cygwin. This would give you a better terminal window than that
crappy thing you get in XP.

Last time /I/ checked (two years ago or so) that rxvt looked nice enough,
but was impossible to use in practice. I cannot remember /what/ the problem
was -- possibly it was that it could only run CygWin-compiled commands, or
something vital only worked with CygWin-compiled commands. Google probably
knows more.

I wouldn't be surprised if this has improved since then, or if someone else
has come up with a serious Win32 terminal. There is surely a need for one!

/Jorgen
 
Q

qwweeeit

Hi Claudio,
I fully agree with you. I already used AutoIt 3 but when I moved to
Linux I wasn't able to find anything similar.
I moved also to Python for its power but also if it is called a
scripting language it doesn't simply interact with graphical
applications. As a last resort I tried DCOP (Desktop COmmunication
Protocol) to at least interact
(also from Python) with KDE applications. But even there it is
impossible to send a simulated keystroke to a running KDE application
(for ex. the konqueror browser).
Also if I will not switch back to Windows, when I have macro and
automation problems I am obliged to use XP (I have double boot...).
Bye.
 
D

dave.benjamin

Jorgen said:
Last time /I/ checked (two years ago or so) that rxvt looked nice enough,
but was impossible to use in practice. I cannot remember /what/ the problem
was -- possibly it was that it could only run CygWin-compiled commands, or
something vital only worked with CygWin-compiled commands. Google probably
knows more.

Cygwin comes with a fully-functioning X server, from which you can run
just about any terminal program you like. For awhile, I was using
Konsole, but KDE on Cygwin is a bit slow and buggy. Recently I switched
to "mrxvt", which is like "rxvt" but with tab support and keyboard
shortcuts almost identical to Konsole. It's easy to compile for Cygwin,
and so far I'm really enjoying the improved speed. Here's my .mrxvtrc:

mrxvt*bottomTabbar: true
mrxvt*scrollBar: false
mrxvt*font: neep-alt-bold-14
mrxvt*boldFont: neep-alt-bold-14
mrxvt*foreground: snow
mrxvt*background: black
mrxvt*geometry: 80x40
mrxvt*saveLines: 65535
mrxvt*hotkey*Dummy: Ctrl+Shift+underscore

I like my tabs at the bottom, Konsole-style, and don't really like
scrollbars on terminals. I use the Neep Alt font, which is nice for
coding because it makes 'l', '|', '1', etc. all look different, and I
like thick console fonts. I was a Fixedsys diehard for a long time. The
"saveLines" variable lets you increase the scrollback buffer
(shift-PgUp/Down) pretty high - I have it maxxed out. And that last
line tells mrxvt to ignore C-_, which is undo in emacs. There are still
a few other keyboard bindings that I'd like to turn off at some point.

One drawback of mrxvt is that it doesn't support UTF-8. I don't do much
multi-language stuff, but on most Linux distributions the manpages are
in UTF-8, so you get garbage characters unless you fiddle with your
LANG/LOCALE settings.

Oh yeah, and to keep this on topic, Cygwin's Python works just fine in
mrxvt, though the native Windows version doesn't work so well. It
doesn't print any output, which I think is due to buffering... however,
I tend to use PythonWin for interactive development, and emacs with M-x
shell to actually test and run (native) Python scripts. I'm pretty
happy with it, overall.

Dave
 
K

kdahlhaus

Hmm. I'm not sure what bothered you about cygwin, but if it has been
awhile it's worth another look. For me it makes windows tolerable, and
even productive.

I'm scared more by your thoughts of transitioning from OS-X to windows.
I've seen a bit of OS-X and am slowly be warmed up to it as an option
for my next machine by some folks here. What is causing you problems
with it ( enough to swtich to windows-wow.)?
 
C

Chris Lambacher

The shell that comes with MSys (from the MinGW guys). Is pretty good, although
it does have a bit of a problem with stdout output before a process exits, ie
it will hold back output until the process exits.

As a bonus, the file system is a little more sane, and if you are interested
in compiling software that is not open source, you are not tied to the Cygwin
DLL which is GPLed.

I have given up on Cygwin in favour of the tools that come with MSys because
they seem slightly better suited to the windows environment.

-Chris
 
C

Christopher Subich

Chris said:
The shell that comes with MSys (from the MinGW guys). Is pretty good, although
it does have a bit of a problem with stdout output before a process exits, ie
it will hold back output until the process exits.

As a bonus, the file system is a little more sane, and if you are interested
in compiling software that is not open source, you are not tied to the Cygwin
DLL which is GPLed.

Worth mentioning here that cygwin's gcc does allow a -mno-cygwin
compile-time flag to not link against the cygwin dll. Cygwin's
packaging system also includes the MinGW development libraries as an
easily installable option, for compiling against mingw's stuff; I've
done it for Python extensions, in fact.
 
R

robinsiebler

Try 4NT (http://www.jpsoft.com). It is like cmd on steroids. I've
been using it for years and it is the *only* thing that makes powerful
batch files possible on Windows. It has a slew of features, including
batch file debugging.
 
J

James Stroud

The OP is obviously a troll. Or he doesn't realize that you can use any shell
in OSX as the user default. I used OSX for 4 years and had to go 100% Linux
because of my employer. OSX is the best of Linux and Windows--anybody who
can't see that has obviously not worked with these three types of operating
systems enough and is basing conclusions on limited information...Or is a
troll. The OP probably works for microsoft.

James

--
James Stroud
UCLA-DOE Institute for Genomics and Proteomics
Box 951570
Los Angeles, CA 90095

http://www.jamesstroud.com/
 
S

Simon Brunning

The OP is obviously a troll.

Hey - let's not throw the T word around quite so freely. The OP did
say that he was switching to Windows "for unfortunate reasons", and
that OSX was "not as bad" as Windows.

Besides, it is possible to prefer Windows. Odd, but possible. Having
moved from Windows to Mac recently myself, I know *I* won't be
switching back, but reasonable men can differ.
 
F

Fredrik Lundh

Try 4NT (http://www.jpsoft.com). It is like cmd on steroids. I've
been using it for years and it is the *only* thing that makes powerful
batch files possible on Windows.

why bother with "powerful batch files" when you can use a real programming
language ?

</F>
 
J

James Stroud

First, my apologies. You sound sincere.

But, in my defense to jump to conclusions and comparisons:

(1) You compared first:

"Windows has so many annoyances that I can only compare it...Bay
Area...OS X...Portland..."

(2) "Unfortunate reasons" can not necessarily be interpreted as "beyond my
control". For instance, elected officials take office many times for
"unfortunate reasons." Not the least of which is often the ignorance of
the populace.

I propose that any time anyone suggests switching to Windows, the reasons for
such should be explicitly described, and not left to interpretation.

James

Perhaps you didn't read my original post? I'm being forced to
consider Windows
for reasons beyond my control. Given that I wanted a decent shell in
Windows,
I thought I would ask about Python shells because I think Python is a
great language,
and such a beast would give me the flexibility I want on a machine I
don't want to
use.

There is such a shell (though with a fifty page manual it'll be a
little while before
I start using it :) ). End of matter, except for those who wish to
discuss further
Pythonish/shell related issues. Why this demands an OS comparison and an
insult is beyond my understanding.

Ken

--
James Stroud
UCLA-DOE Institute for Genomics and Proteomics
Box 951570
Los Angeles, CA 90095

http://www.jamesstroud.com/
 
R

Rocco Moretti

James said:
I propose that any time anyone suggests switching to Windows, the reasons for
such should be explicitly described, and not left to interpretation.

I propose that any time anyone suggests switching to Linux ...
I propose that any time anyone suggests switching to Mac ...
I propose that any time anyone suggests switching to Ruby ...
I propose that any time anyone suggests switching to Firefox ...
I propose that any time anyone suggests switching to Waxed Dental Floss ...

People should not feel *required* to justify their decisions to c.l.py,
especially if they are not trying to evangelize that choice. (FWIW, even
from the original post it's very apparent that he's dissuading people
from joining him.)

It is true that giving the reasons for a choice will help responders put
some perspective on it, and perhaps prompt a few alternatives, but
c.l.py is not your mother, and shouldn't require you to justify the
validity of your lifestyle to it.
 
S

Steve Holden

Rocco said:
James Stroud wrote:




I propose that any time anyone suggests switching to Linux ...
I propose that any time anyone suggests switching to Mac ...
I propose that any time anyone suggests switching to Ruby ...
I propose that any time anyone suggests switching to Firefox ...
I propose that any time anyone suggests switching to Waxed Dental Floss ...

People should not feel *required* to justify their decisions to c.l.py,
especially if they are not trying to evangelize that choice. (FWIW, even
from the original post it's very apparent that he's dissuading people
from joining him.)

It is true that giving the reasons for a choice will help responders put
some perspective on it, and perhaps prompt a few alternatives, but
c.l.py is not your mother, and shouldn't require you to justify the
validity of your lifestyle to it.

Man, you mean I can use any dental floss I like?!?!?!?!!?

regards
Steve

who quite agrees with the sentiments expressed above
(it's an extension of the "consenting adults" philosophy).
 

Ask a Question

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.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top