By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,908 Members | 1,860 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,908 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Oct 13 '05 #1
Share this Question
Share on Google+
16 Replies


P: n/a
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

"Kenneth McDonald" <ke****************@sbcglobal.net> schrieb im Newsbeitrag
news:ma*************************************@pytho n.org...
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

Oct 13 '05 #2

P: n/a
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.
Oct 14 '05 #3

P: n/a
> 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.


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

Oct 14 '05 #4

P: n/a
On Fri, 14 Oct 2005 12:37:25 +0200, Christophe <ch*************@free.fr> wrote:
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 .... 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.
.... 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

--
// Jorgen Grahn <jgrahn@ Ph'nglui mglw'nafh Cthulhu
\X/ algonet.se> R'lyeh wgah'nagl fhtagn!
Oct 15 '05 #5

P: n/a
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.

Oct 17 '05 #6

P: n/a
Jorgen Grahn wrote:
On Fri, 14 Oct 2005 12:37:25 +0200, Christophe <ch*************@free.fr> wrote:
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 ... 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.

...
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.


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

Oct 17 '05 #7

P: n/a
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.)?

Oct 18 '05 #8

P: n/a
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

On Sat, Oct 15, 2005 at 08:45:17AM +0000, Jorgen Grahn wrote:
On Fri, 14 Oct 2005 12:37:25 +0200, Christophe <ch*************@free.fr> wrote:
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 ... 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.

...
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

--
// Jorgen Grahn <jgrahn@ Ph'nglui mglw'nafh Cthulhu
\X/ algonet.se> R'lyeh wgah'nagl fhtagn!
--
http://mail.python.org/mailman/listinfo/python-list

Oct 18 '05 #9

P: n/a
Chris Lambacher wrote:
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.
Oct 19 '05 #10

P: n/a
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.

Oct 19 '05 #11

P: n/a
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/
Oct 19 '05 #12

P: n/a
On 19/10/05, James Stroud <js*****@mbi.ucla.edu> wrote:
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.

--
Though-clearly-not-differ-with-me-ly y'rs,
Simon B.
Oct 19 '05 #13

P: n/a
ro**********@gmail.com wrote:
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>

Oct 19 '05 #14

P: n/a
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

On Wednesday 19 October 2005 14:31, Kenneth McDonald wrote:
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

On 19-Oct-05, at 2:22 PM, James Stroud wrote:
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/
Oct 19 '05 #15

P: n/a
James Stroud wrote:
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.
Oct 20 '05 #16

P: n/a
Rocco Moretti wrote:
James Stroud wrote:

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.


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).
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
PyCon TX 2006 www.python.org/pycon/

Oct 20 '05 #17

This discussion thread is closed

Replies have been disabled for this discussion.