Re: Import, site packages, my modules, Windows vs. Linux

2008-06-07 Thread rzed
John Ladasky <[EMAIL PROTECTED]> wrote in
news:[EMAIL PROTECTED]
com: 

> Hi folks,
> 
> Running Python 2.5 on both a Windows XP laptop, and an Ubuntu
> Linux 7.04 desktop.
> 
> I've gotten tired of maintaining multiple copies of my personal
> modules that I use over and over.  I have copies of these files
> in the same directory as the main program I happen to be working
> on at the time.  I've also downloaded FANN, and want to use its
> Python bindings.  FANN does not seem to build automatically,
> like wxWidgets did.
> 
> These two issues have led me to examine exactly how the import
> statement works, how the PYTHONPATH environment variable is
> constructed, and how to change it.
> 
> On Windows I found a solution that works, but which may be a
> kludge. In the Python "site-packages" folder, I added a
> sub-folder called "my- packages".  Then I created a text file,
> "my-packages.pth", containing the single line, "my-packages." 
> Finally, I moved my common personal modules into the my-packages
> folder and deleted all of my clumsy duplicates.  Import
> statements now work for all of my files on the Windows box,
> great! 
> 
> I then tried to use this same strategy in Linux, and saw that I
> don't automatically have the privileges needed to alter the
> site-packages folder.  On my Windows box, my default account has
> Administrator privileges.  On Linux I can, of course, use sudo
> to modify the site- packages folder.  But the fact that I would
> have to use sudo has me asking -- is there something
> inappropriate, or unsafe in my approach? 
> 
> I want to know what is the *recommended* way to integrate my own
> personal modules with Python.  Thanks!

I can't speak about Linux, but on Windows, you really should move 
your code out of the Python directory tree, I believe. When you 
upgrade, you'll have to be sure to set it up the same way again, 
and remember that your code resides there before you wipe out that 
directory tree, etc. 

Instead, just set up another directory containing your code and add 
that to your PYTHONPATH environment variable string. That will be 
unaffected by the Python version you're running, and will be 
available for multiple versions, if you run more than one.

-- 
rzed
--
http://mail.python.org/mailman/listinfo/python-list


Re: Import, site packages, my modules, Windows vs. Linux

2008-06-04 Thread Terry Reedy

"John Ladasky" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
| On Windows I found a solution that works, but which may be a kludge.
| In the Python "site-packages" folder, I added a sub-folder called "my-
| packages".  Then I created a text file, "my-packages.pth", containing
| the single line, "my-packages."  Finally, I moved my common personal
| modules into the my-packages folder and deleted all of my clumsy
| duplicates.  Import statements now work for all of my files on the
| Windows box, great!
|
| I then tried to use this same strategy in Linux, and saw that I don't
| automatically have the privileges needed to alter the site-packages
| folder.  On my Windows box, my default account has Administrator
| privileges.

If you do the Windows install for all users, all users can add packages to 
site-packages -- as long as adding the package directory comprises the 
whole installation process and no registry fiddling is required. 



--
http://mail.python.org/mailman/listinfo/python-list


Re: Import, site packages, my modules, Windows vs. Linux

2008-06-04 Thread Tobiah
On Tue, 03 Jun 2008 17:57:07 -0700, John Ladasky wrote:

> Hi folks,
> 
> Running Python 2.5 on both a Windows XP laptop, and an Ubuntu Linux
> 7.04 desktop.
> 
> I've gotten tired of maintaining multiple copies of my personal
> modules that I use over and over.  I have copies of these files in the
> same directory as the main program I happen to be working on at the
> time.  

I just make some directory outside of the python source, say
/usr/local/lib/python.  I then add that to my PYTHONPATH.
Now the permissions are not a problem, and the libs are
automatically available to any version of python on the system.



** Posted from http://www.teranews.com **
--
http://mail.python.org/mailman/listinfo/python-list


Re: Import, site packages, my modules, Windows vs. Linux

2008-06-04 Thread John Ladasky
On Jun 3, 6:52 pm, Ben Finney <[EMAIL PROTECTED]>
wrote:
> John Ladasky <[EMAIL PROTECTED]> writes:
> > I want to know what is the *recommended* way to integrate my own
> > personal modules with Python.  Thanks!
>
> You want the 'distutils' documentation
> http://www.python.org/doc/lib/module-distutils> and the documents
> that it references, which will lead you to write a 'setup.py' module
> for your package.


Many thanks, Ben, distutils was exactly what I needed.  It was a
little strange to grasp the concept that I would be "distributing" my
module to myself -- but once I got over that mental hurdle, it worked
perfectly.
--
http://mail.python.org/mailman/listinfo/python-list


Re: Import, site packages, my modules, Windows vs. Linux

2008-06-03 Thread Ben Finney
John Ladasky <[EMAIL PROTECTED]> writes:

> I want to know what is the *recommended* way to integrate my own
> personal modules with Python.  Thanks!

You want the 'distutils' documentation
http://www.python.org/doc/lib/module-distutils> and the documents
that it references, which will lead you to write a 'setup.py' module
for your package.

Then, it's a matter of running 'python ./setup.py install' to install
your package on a particular system.

-- 
 \  "I hope if dogs ever take over the world, and they chose a |
  `\king, they don't just go by size, because I bet there are some |
_o__)Chihuahuas with some good ideas."  -- Jack Handey |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list


Import, site packages, my modules, Windows vs. Linux

2008-06-03 Thread John Ladasky
Hi folks,

Running Python 2.5 on both a Windows XP laptop, and an Ubuntu Linux
7.04 desktop.

I've gotten tired of maintaining multiple copies of my personal
modules that I use over and over.  I have copies of these files in the
same directory as the main program I happen to be working on at the
time.  I've also downloaded FANN, and want to use its Python
bindings.  FANN does not seem to build automatically, like wxWidgets
did.

These two issues have led me to examine exactly how the import
statement works, how the PYTHONPATH environment variable is
constructed, and how to change it.

On Windows I found a solution that works, but which may be a kludge.
In the Python "site-packages" folder, I added a sub-folder called "my-
packages".  Then I created a text file, "my-packages.pth", containing
the single line, "my-packages."  Finally, I moved my common personal
modules into the my-packages folder and deleted all of my clumsy
duplicates.  Import statements now work for all of my files on the
Windows box, great!

I then tried to use this same strategy in Linux, and saw that I don't
automatically have the privileges needed to alter the site-packages
folder.  On my Windows box, my default account has Administrator
privileges.  On Linux I can, of course, use sudo to modify the site-
packages folder.  But the fact that I would have to use sudo has me
asking -- is there something inappropriate, or unsafe in my approach?

I want to know what is the *recommended* way to integrate my own
personal modules with Python.  Thanks!
--
http://mail.python.org/mailman/listinfo/python-list


Re: Windows vs. Linux

2006-08-08 Thread siggy2

Duncan Booth wrote:
[CUT]
>
> C:\>cd /Documents and settings
> The system cannot find the path specified.
>
> C:\>cd /DDocuments and settings
>
> C:\Documents and Settings>

that's because the
cd /D is interpreted as
"change drive and directory"
so I imagine it enables some kind of command extension

but anyway you're right: m$ CMD is weird
bye,
   PiErre

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Windows vs. Linux

2006-08-06 Thread baalbek
Andy Dingley wrote:
>> Python and Ubuntu rock...go fot it.
> 
> That's nice.  I've just burned myself a new Ubuntu f*ck-a-duck release CD 

Now, just out of curiosity, what's f*ck-a-duck?

Baalbek
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Windows vs. Linux

2006-08-04 Thread Bryan Olson
Duncan Booth wrote:
> Bryan Olson wrote:
> 
>> Duncan Booth wrote:
>>> Any other Microsoft commands I try all complain about 'invalid
>>> switch'. 
 >>
>> The first I noticed were their build tools. Their version of
>> "make", called "nmake", and their visual studio tools will
>> accept either forward or backward slashes in paths.
>>
> Ok, pedantically I meant the commands that come as part of the system. Most 
> external tools such as Microsoft's compilers have always accepted forward 
> slashes interchangeably with backslashes. They also usually accept '-' as 
> an option character interchangeably with '/'. The 'standard' commands 
> though seem to go to a lot of effort to reject forward slashes in paths, 
> and the CD command seems to be the only one where this usage gets through 
> the net.

That seems right, though I don't think Microsoft is deliberately
being difficult. They never put much effort into the command
line; they were trying to imitate the the Mac GUI more than the
Unix shell.

I just tried, and on XP the "explorer" will accept forward
slashes, immediately re-displaying them as backslashes.


-- 
--Bryan
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Windows vs. Linux

2006-08-04 Thread Jorgen Grahn
On Tue, 1 Aug 2006 14:47:59 -0300, Gerhard Fiedler <[EMAIL PROTECTED]> wrote:
> On 2006-08-01 12:31:01, Sybren Stuvel wrote:
...
> Is that really true? From what I know, it's more like this:
>
> - Unix-type systems: '/'
> - Windows-type systems: '\'
> - Mac OS: ':'
> - OpenVMS: '.'
> - ...
>
> Maybe someone else can fill in some of the missing OSes.

AmigaDOS: '/'. (On the other hand, it didn't understand '.' and '..' without
third-party patches, and it didn't have the '/' directory.).

> It doesn't seem to 
> look like Windows is the odd man out; it rather seems that every type of OS 
> uses its own separator.

In the 1980s, MS-DOS /was/ an ugly bastard child; lots of other systems
existed that I have never heard about. As for what path separator they used
and why, I'm afraid you'd have to ask on alt.folklore.computers ...

/Jorgen

-- 
  // Jorgen Grahn   R'lyeh wgah'nagl fhtagn!
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Windows vs. Linux

2006-08-04 Thread Gerhard Fiedler
On 2006-08-04 09:58:34, Sybren Stuvel wrote:

>> They all (well, most of them) use computers in their administration;
>> /that's/ the cost I was talking about, not the cost for the software
>> industry :)
> 
> Good point. Time more people started using Open Source :)

Definitely. But don't hold your breath :)

Gerhard

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Windows vs. Linux

2006-08-04 Thread andrew clarke
On Fri, Aug 04, 2006 at 02:01:58PM +0200, Sybren Stuvel wrote:

> > OS/2 (and eComStation) also uses the backslash as the path
> > separator.
> 
> You mean OS/2 is still in actual use?

'fraid so.  :-)
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Windows vs. Linux

2006-08-04 Thread Gerhard Fiedler
On 2006-08-04 05:30:00, Sybren Stuvel wrote:

>> Besides, you probably don't know whether it's not one of your direct
>> suppliers who's affected. You're sure you don't buy from anybody
>> running a Windows system? I'd bet against that, and I only bet when
>> I know I win :)
> 
> Good point. I don't buy much software, though. The only things I buy
> are some games every now and then. 

No food? No clothes? No furniture? No household supplies? No
transportation? No bike/bicycle/car? They all (well, most of them) use
computers in their administration; /that's/ the cost I was talking about,
not the cost for the software industry :)

Gerhard

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Windows vs. Linux

2006-08-04 Thread Duncan Booth
Bryan Olson wrote:

> Duncan Booth wrote:
>> I'm not sure ambiguity enters into it. I think perhaps the bad
>> detection of the option happens because the CD command can ignore
>> spaces in its argument. Since it is ignoring spaces they don't
>> actually require a space after the option strings.
> 
> You lost me. Spaces are significant in file names, and slashes
> within the path are used as path separators, as far as I can
> tell.

Sorry I was unclear. It isn't that spaces are ignored, it is that they do 
not count as delimiters in the CD command. In all other DOS commands they 
count as argument delimiters unless they are inside quotes.


>> Any other Microsoft commands I try all complain about 'invalid
>> switch'. 
> 
> The first I noticed were their build tools. Their version of
> "make", called "nmake", and their visual studio tools will
> accept either forward or backward slashes in paths.
> 
Ok, pedantically I meant the commands that come as part of the system. Most 
external tools such as Microsoft's compilers have always accepted forward 
slashes interchangeably with backslashes. They also usually accept '-' as 
an option character interchangeably with '/'. The 'standard' commands 
though seem to go to a lot of effort to reject forward slashes in paths, 
and the CD command seems to be the only one where this usage gets through 
the net.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Windows vs. Linux

2006-08-04 Thread andrew clarke
On Tue, Aug 01, 2006 at 05:31:01PM +0200, Sybren Stuvel wrote:

> James Stroud enlightened us with:
> > its better to use:
> >
> >os.path.join('my', 'favorite', 'dir')
> >
> > than
> >
> >"\\".join(['my', 'favorite', 'dir'])
> >
> > because the latter will bonk on linux.
> 
> Ehm... replace that with "the latter with bonk on every OS except
> Microsoft Windows". Windows is the weird one in OS-land, because they
> are the only one that use the most widely used escape-character (the
> backslash) as path separator.

OS/2 (and eComStation) also uses the backslash as the path separator.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Windows vs. Linux

2006-08-04 Thread Bryan Olson
Duncan Booth wrote:
> Bryan Olson wrote:
> 
>> Not quite. The first slash is ambiguous and apparently ignored,
>> but latter slashes are taken as a path separators.
> 
> I'm not sure ambiguity enters into it. I think perhaps the bad detection of 
> the option happens because the CD command can ignore spaces in its 
> argument. Since it is ignoring spaces they don't actually require a space 
> after the option strings.

You lost me. Spaces are significant in file names, and slashes
within the path are used as path separators, as far as I can
tell.

Try cd'ing several subdirectories deep on XP with forward
slashes. It works for me, and it could not if slashes were
ignored as you suggested.


> Any other Microsoft commands I try all complain about 'invalid switch'.

The first I noticed were their build tools. Their version of
"make", called "nmake", and their visual studio tools will
accept either forward or backward slashes in paths.


>> Have you determined why it didn't work on your XP box as it did
>> on mine and on the machines at BestBuy?
> 
> Simply that I hadn't changed to the root directory first so there was no 
> subdirectory named 'windows'.

Ah, my example showed a particular root: "C:\". Does your system
work the same if you set the current directly as shown?


-- 
--Bryan
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Windows vs. Linux

2006-08-04 Thread Duncan Booth
Bryan Olson wrote:

> Not quite. The first slash is ambiguous and apparently ignored,
> but latter slashes are taken as a path separators.

I'm not sure ambiguity enters into it. I think perhaps the bad detection of 
the option happens because the CD command can ignore spaces in its 
argument. Since it is ignoring spaces they don't actually require a space 
after the option strings.

Any other Microsoft commands I try all complain about 'invalid switch'.

> 
> Have you determined why it didn't work on your XP box as it did
> on mine and on the machines at BestBuy?

Simply that I hadn't changed to the root directory first so there was no 
subdirectory named 'windows'.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Windows vs. Linux

2006-08-04 Thread Bryan Olson
Duncan Booth wrote:
> Bryan Olson wrote:
> 
>> Duncan Booth wrote:
>>> [EMAIL PROTECTED] wrote:
>>>
 >From a WinXP command prompt:

 C:\>
 C:\>cd /windows/system32

 C:\WINDOWS\system32>


>>> Not from my Windows XP command prompt it doesn't. Do you have anything 
>>> strange installed on your system?

>> Tons of strange stuff, yes, but I just tried it on a couple
>> machines on display at BestBuy, and it worked as I showed it.
>> Maybe a recent change.
>>
> As other postings to this thread have shown it is simply that Windows is 
> taking the forward slash as introducing an option and then ignoring it 
> entirely if the next letter doesn't match one of the options it knows 
> about.

Not quite. The first slash is ambiguous and apparently ignored,
but latter slashes are taken as a path separators.

Have you determined why it didn't work on your XP box as it did
on mine and on the machines at BestBuy?


-- 
--Bryan
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Windows vs. Linux

2006-08-04 Thread Duncan Booth
Bryan Olson wrote:

> Duncan Booth wrote:
>> [EMAIL PROTECTED] wrote:
>> 
>>> >From a WinXP command prompt:
>>>
>>> C:\>
>>> C:\>cd /windows/system32
>>>
>>> C:\WINDOWS\system32>
>>>
>>>
>> Not from my Windows XP command prompt it doesn't. Do you have anything 
>> strange installed on your system?
> 
> Tons of strange stuff, yes, but I just tried it on a couple
> machines on display at BestBuy, and it worked as I showed it.
> Maybe a recent change.
> 
As other postings to this thread have shown it is simply that Windows is 
taking the forward slash as introducing an option and then ignoring it 
entirely if the next letter doesn't match one of the options it knows 
about. So for example (/D being an option to CD):

C:\>cd /Documents and settings
The system cannot find the path specified.

C:\>cd /DDocuments and settings

C:\Documents and Settings>


-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Windows vs. Linux

2006-08-04 Thread Gerhard Fiedler
On 2006-08-03 04:53:11, Sybren Stuvel wrote:

>> Pretty much every production cost increase gets in the end paid by
>> the consumer.  With some localized changes, you may be lucky and
>> don't buy any products that are affected, but with such a widespread
>> change as this would be, it is more likely that almost everybody is
>> affected close to average.
> 
> You still don't tell me how I could be affected by a production cost
> increase at a company I'm buying nothing from.

You don't buy your gas as crude from Saudi Arabia oil well, do you? :)
Their production cost increases may affect you nevertheless.

There are very few products you buy that are only affected by costs
generated in one company. Usually that's dozens, if not hundreds of
companies in the chain. (That's not to say that all of them are relevant,
price-wise, but it's more than one that's relevant, usually.) Take your
pick, anything, and try to find out the price building chain. You may be
surprised. 

Besides, you probably don't know whether it's not one of your direct
suppliers who's affected. You're sure you don't buy from anybody running a
Windows system? I'd bet against that, and I only bet when I know I win :)

I'm not talking about something obvious like a 10% increase. An overall
(average) 1% increase is easy to dismiss as not relevant -- but it's still
1%, if you add it up. (I'm not claiming it would be 1% though. Just an
example number.)


>> With that is also mostly the pressure gone to not increase --
>> because so many are affected that the few who are not happily
>> increase the prices with the others.
> 
> Either my English isn't as good as I thought, or that's simply
> incomprehendable.

Possibly the latter... I'll try again :) 

When there's a change in the cost structure of some companies, they try to
pass that on through their prices. That's just natural. If the cost
structure of a whole sector changes, that's easy, because all of them will
want to increase by the same margin, and the cost structure of the whole
sector remains the same. (See gas prices.) 

If almost all of a sector are affected, this still doesn't change
(usually): the ones who are not affected often just go with the crowd and
increase nevertheless, figuring they can gain more by increased margins
than they would gain by increased market share due to lower prices. (There
are all kinds of factors that affect this; not always a lower price gets
reflected in a higher market share.) 

But they (or some of them) could also decide to stay at their lower price
to gain market share. But if the production cost for 80% of a sector goes
up, it may be that the 20% who don't have that cost increase stay low, but
the average price of that sector still will go up. (Not everybody will move
to the suppliers now with lower cost.) With that, the average production
cost for companies that depend on that sector will go up. So there's an
average hike anyway, even if some or all of the ones who don't have to
increase actually don't. 

Gerhard

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Windows vs. Linux

2006-08-03 Thread Bryan Olson
Christopher Weimann wrote:
> On 08/02/2006-08:06AM, [EMAIL PROTECTED] wrote:
>> From a WinXP command prompt:
>>
>> C:\>
>> C:\>cd /windows/system32
>>
>> C:\WINDOWS\system32>
>>
>>
> 
> 
> This doesn't work the way you think it does.
> 
> C:\>cd /windows
> 
> C:\WINDOWS>cd /system32
> 
> C:\WINDOWS\system32>
> 
> C:\WINDOWS\system32>cd /windows
> The system cannot find the path specified.
> 
> It IGNORES a leading / char.

Ah, yes, I see.

As Gerhard Fiedler pointed out, they use '/' elsewhere on
command lines to introduce options, so it could be ambiguous as
the first character of a path name.


-- 
--Bryan
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Windows vs. Linux

2006-08-03 Thread Bryan Olson
Duncan Booth wrote:
> [EMAIL PROTECTED] wrote:
> 
>> >From a WinXP command prompt:
>>
>> C:\>
>> C:\>cd /windows/system32
>>
>> C:\WINDOWS\system32>
>>
>>
> Not from my Windows XP command prompt it doesn't. Do you have anything 
> strange installed on your system?

Tons of strange stuff, yes, but I just tried it on a couple
machines on display at BestBuy, and it worked as I showed it.
Maybe a recent change.


-- 
--Bryan
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Windows vs. Linux

2006-08-02 Thread Alex Martelli
Sybren Stuvel <[EMAIL PROTECTED]> wrote:

> Gerhard Fiedler enlightened us with:
> > I don't know how many reasons you need besides backward
> > compatibility, but all the DOS (still around!) and Windows apps that
> > would break... ?!?  I think breaking that compatibility would be
> > more expensive than the whole Y2k bug story. 
> 
> Microsoft could provide an emulated environment for backward
> compatability, just like Apple did. Wouldn't know what that would
> cost, though.

I believe Microsoft could have saved many billions of dollars of
development costs, and hit the market well in time for the 2006 holiday
season, if they had designed Vista that way -- a totally new system, wih
no direct compatibility constraints, and with virtualization used to run
XP stuff.  That strategy (in the Mac OS 9 -> Mac OS X migration path,
with "Classic" as the ``virtualization'' layer) is what saved Apple's
bacon when all attempts to craft compatible extensions of old Mac OS had
floundered in excessive costs and complexity.  And virtualization is
obviously a prepotently emerging technology -- look at VMWare's huge
profits, at Microsoft's purchase of the makers of VirtualPC, at the rise
of Parallels, at open-source developments such as QEMU and Xen...


> I think the folks at microsoft are used to getting cursed at :)

Particularly by their stockholders, with the stock down from a high of
almost 60 to the recent lows of below 22...:-)


Alex
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Windows vs. Linux

2006-08-02 Thread Gerhard Fiedler
On 2006-08-02 21:09:43, Sybren Stuvel wrote:

> Microsoft could provide an emulated environment for backward
> compatability, just like Apple did. Wouldn't know what that would cost,
> though.

Possibly. Rather than waiting for that, I think that languages that want a
degree of portability should simply provide a wrapper around this low level
system dependent stuff. There's no need to use system dependent path
separation characters in the language API.


>> And don't be fooled...  you may run a Linux system, but you'd pay
>> your share of that bill anyway.
> 
> How's that?

Pretty much every production cost increase gets in the end paid by the
consumer. With some localized changes, you may be lucky and don't buy any
products that are affected, but with such a widespread change as this would
be, it is more likely that almost everybody is affected close to average.
With that is also mostly the pressure gone to not increase -- because so
many are affected that the few who are not happily increase the prices with
the others.

The only ones likely to make a cut for a short time are a number of Windows
consultants. But those probably would be mostly either people with some
previous involvement with the product or the company, or cheap offshore
resources. Probably neither is your case... :)

Gerhard

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Windows vs. Linux

2006-08-02 Thread Alex Martelli
Gerhard Fiedler <[EMAIL PROTECTED]> wrote:
   ...
> > Part of the CP/M compatibility did include the use of / as flag-indicator
> > (the use of \r+\n as line ending also comes from CP/M -- in turn, CP/M
> > had aped these traits from some DEC minicomputer operating systems).
> 
> At the time, probably pretty good reasons for using the slash as command
> line flag indicator.

In DEC's case, the / was an essentially random choice -- nothing
particularly stood either for or against it -- and there was no
particularly good reason for CP/M to ape it later, either (Unix is even
older than CP/M, _and_ ran on HW essentially identical to that used by
some of said DEC OS's, yet, having good designers, it "broke" both these
points of "compatibility"... yet didn't suffer in the least thereby).

The \r+\n choice is different -- it did indeed have a good reason _at
the time_ DEC chose it: for OSs without real device drivers (on machines
with no power to spare for even the most trivial processing), sending a
bunch of lines to a dumb teletype really needed the lines to be
terminated by telling the tty both to return-carriage (the \r) AND to
advance paper (the \n) -- and the former had to be first because the
carriage-return operation was mechanically slower but could occur at the
same time as the paper advance.  But these issues did not apply by the
'70s, when CP/M was born and Unix got its name (from the previous name,
briefly used in the late '60s, of UNICS).

Whether there's "a good reason" to embed the consequences of these
mechanical issues in fileformats and protocols, destined no doubt to
survive for many decades to come, 40 years after said issues had become
essentially moot, is another issue... but backwards-incompatible changes
ARE always hard (and yet, the original designers of successful systems
are basically never as ambitious and visionary as to think of the effect
their choices of today will have 40 or 80 years down the road -- systems
designed with the mindset of thinking many-decades-ahead tend to fail in
their struggle against quick-and-dirty ones, as bemoaned but lucidly
analyzed in Gabriel's deservedly famous essay on "worse is better", e.g.
at ).


> And, as an aside, I'm sure that MS would have sold more of their Xenix if
> the market had wanted it. But the market really wanted DOS...

Yes, particularly considering the much higher HW demands of Xenix's
entry point, compared to DOS's -- not only did Xenix always require a
hard disk, but, for over 2 years, Xenix supported only Zilog Z8001 and
later Motorola 68000... it took SCO, in late 1983, to release an 8086
version, and by that time DOS was well entrenched in the marketplace,
also supporting floppy-only machines that remained a much more
affordable entry point than hard-disk ones for further years.
Basically, by the time PCs with hard disks were starting to become
widespread, MS had lost interest in marketing Xenix, which only SCO was
pushing, so it made sense in '87 for MS to sell SCO Xenix outright in
exchange for a large slice of SCO's stock (20%, if I remember right).


Alex
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Windows vs. Linux

2006-08-02 Thread Gerhard Fiedler
On 2006-08-02 17:36:06, Sybren Stuvel wrote:

> IMO it's too bad that "they" chose \r\n as the standard. Having two
> bytes as the end of line marker makes sense on typewriters and
> similarly operating printing equipment. 

I may well be mistaken, but I think at the time they set that standard, 
such equipment was still in use. So it may have been a consideration.

> Nowadays, I think having a single byte as the EOL maker is quite a bit
> clearer. 

Rather than thinking in bytes and the like when inserting an EOL marker, 
inserting really an EOL marker (that then gets translated by low level code 
to the appropriate byte sequence as needed) is probably the less archaic 
way to do that :)

> On the other hand, with the use of UTF-8 encodings and the like, the
> byte-to-character mapping is gone anyway, so perhaps I should just get
> used to it ;-)

Yes :)  "Bytes" is getting definitely too low level. Especially with higher 
level languages like Python... there are not many byte manipulation 
facilities anyway. The language is at a much higher level, and in that 
sense the classic strings are a bit out of line, it seems.

>> Just as for MS there are good reasons not to "fix" the backslash now
> 
> Which are those reasons, except for backward compatability?

I don't know how many reasons you need besides backward compatibility, but 
all the DOS (still around!) and Windows apps that would break... ?!?  I 
think breaking that compatibility would be more expensive than the whole 
Y2k bug story. And don't be fooled... you may run a Linux system, but you'd 
pay your share of that bill anyway.

> Less FAQs in this group about people putting tabs, newlines and other
> characters in their filenames because they forget to escape their
> backslashes?

Or forget to use raw strings. (If you don't want it to be escaped, please 
say so :) 

But similar as I wrote above with the EOL thing, I think that the whole 
backslash escape character story is not quite well-chosen. In a way, this a 
mere C compatibility pain in the neck... (Of course there are 
implementation and efficiency reasons, mainly because Python is based on C 
APIs, but all that is as arbitrary as the selection of the backslash as 
path separator.) 

There could be other solutions (in Python, I mean). Only accept raw strings 
in APIs that deal with paths? Force coders to create paths as objects, in a 
portable way, maybe by removing the possibility to create paths from 
strings that are more than one level in the path? Or introduce a Unicode 
character that means "portable path separator"? Or whatever... :)

> Strings and filenames are usually tightly coupled in any program
> handing files, though.

Yes, and that's IMO something from way below in the implementation depths. 
While file names and paths are strings, not every string is a valid and 
useful file name or path. This shows that using strings for file names and 
paths has tradition (coming from low level languages like C), but IMO is 
not quite appropriate for a higher abstraction level. 

> Almost every programming language I know of uses it as the escape
> character, except for perhaps VB Script and the likes. Not sure about
> the different assembly languages, though.

There are so many languages... and I know so few of them... 
http://en.wikipedia.org/wiki/Category:Programming_languages

Now it may be predominant (I still think it's mostly present in languages 
that are in some way influenced by C), but in the 70ies?

IIRC, Pascal uses '^' for a similar purpose (not quite the same, but 
similar). This form is still in ample use in documentation to mean 
"Ctrl-"; probably much more common than the backslash notation.

> Sure. I've talked more about this specific subject in this thread than
> in the rest of my life ;-)

There's a first for everything :)

> I think cooperation and uniformity can be a very good thing. On the other
> hand, Microsoft want the software written for their platform to stay on
> their platform. That's probably one of the major reasons to remain
> incompatible with other systems.

Probably. But even if I'd had a say there (and I hate switching between 
separator characters just as much as the next guy, and possibly do so more 
than you given that I work on a Windows system, with slashes in repository 
paths and URIs), I'm not sure I'd make the jump away from the backslash as 
path separator. That's just breaking too much code. You don't want to have 
all these curses directed at you...

Gerhard

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Windows vs. Linux

2006-08-02 Thread Christopher Weimann
On 08/02/2006-08:06AM, [EMAIL PROTECTED] wrote:
> 
> >From a WinXP command prompt:
> 
> C:\>
> C:\>cd /windows/system32
> 
> C:\WINDOWS\system32>
> 
> 


This doesn't work the way you think it does.

C:\>cd /windows

C:\WINDOWS>cd /system32

C:\WINDOWS\system32>

C:\WINDOWS\system32>cd /windows
The system cannot find the path specified.

It IGNORES a leading / char.

--

Christopher Weimann
http://www.k12usa.com
K12USA.com Cool Tools for Schools!

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Windows vs. Linux

2006-08-02 Thread Gerhard Fiedler
On 2006-08-02 17:38:54, Sybren Stuvel wrote:

> Gerhard Fiedler enlightened us with:
>>> Microsoft did *NOT* write DOS 
>>
>> Well, they didn't write most of DOS 1.0. But it seems they did write
>> (or at least specify) most if not all of the rest up to DOS 6.22 or
>> so. Which is possibly considerable.
> 
> Those are MS-DOS version numbers you're talking about. 

Of course. The issue was that I wrote that "Microsoft wrote DOS on Xenix"
and Alex objected. I was of course wrong in that totality, but then, they
still wrote everything between DOS 1.0 and 6.22 on Xenix.

> For example, they had nothing to do with FreeDOS, which is also a DOS.

Yup, and a number of other DOSes like Novell DOS etc. Still all (or most?)
of these use the backslash :)

Gerhard

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Windows vs. Linux

2006-08-02 Thread Duncan Booth
Tim Chase wrote:

> Nice to see consistancy at work.  Looks like leading slashes are 
> stripped and so it trys to find it relative to the current path.
> 
> Nothing like predictable, cross-platform implementations there. 
> [rolls eyes]
> 
> Thank goodness Python brings some brains to the table where 
> Windows/Dos is ::ehem:: seriously lacking.

Ah, thank you. I couldn't figure out what on earth was happening. Sometimes 
the CD worked and sometimes it didn't.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Windows vs. Linux

2006-08-02 Thread Gerhard Fiedler
On 2006-08-02 12:41:44, Alex Martelli wrote:

> Microsoft did *NOT* write DOS 

Well, they didn't write most of DOS 1.0. But it seems they did write (or at
least specify) most if not all of the rest up to DOS 6.22 or so. Which is
possibly considerable.

> Part of the CP/M compatibility did include the use of / as flag-indicator
> (the use of \r+\n as line ending also comes from CP/M -- in turn, CP/M
> had aped these traits from some DEC minicomputer operating systems).

At the time, probably pretty good reasons for using the slash as command
line flag indicator.

> Internally yes (indeed, they developed Xenix, before later selling it to
> SCO), but that does not mean that "DOS was written on Xenix" because DOS
> was *not* written in Microsoft, as above mentioned.

I probably should have said "everything between DOS 1.0 and DOS 6.22" was
written on Xenix, to be more precise :)

And, as an aside, I'm sure that MS would have sold more of their Xenix if
the market had wanted it. But the market really wanted DOS...

Gerhard

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Windows vs. Linux

2006-08-02 Thread Gerhard Fiedler
On 2006-08-02 13:24:10, Dennis Lee Bieber wrote:

>   Change Directory may work... but
> 
> C:\Documents and Settings\Dennis Lee Bieber>cd c:\
> 
> C:\>cd /windows/system32
> 
> C:\WINDOWS\SYSTEM32>cd c:\
> 
> C:\>dir /windows/system32
> Parameter format not correct - "windows".

Since '/' is used as standard command line parameter separator, any command
that uses standard Windows command line parameters can't accept a path with
'/' as argument; it wouldn't know how to differentiate between a path
element and an argument. Try 

C:\>dir "/windows/system32"


That was one of the original reasons for using backslashes as path
separator: the existing code base that used the slash as command line
argument separator. 

Gerhard

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Windows vs. Linux

2006-08-02 Thread Gerhard Fiedler
On 2006-08-02 11:29:18, Sybren Stuvel wrote:

> John Salerno enlightened us with:
>> But of course I still agree with you that in either case it's not a
>> judgment you can fairly make 30 years after the fact.
> 
> I don't see Microsoft changing it the next 30 years either... Apple
> moved from \r to \n as EOL character. 

AFAIK there are few programs from Apple's \r era that still work in the \n
era systems, or am I mistaken with this? :)  I also doubt that the line
terminator had any influence in Apple's decision to change their OS. It was
a mere (unintended) side effect, not an objective. If they had chosen a
line terminator, they better had chosen \r\n (the internet email standard). 

Unix-type systems still don't use natively the line terminator that is used
in internet email. Windows-type systems do. So when you want to send a text
file stored on a Unix-type system as email, you have to translate the line
terminations (or vice versa). Just as for MS there are good reasons not to
"fix" the backslash now (what would be a good reason to change it?), there
are good reasons for Unix-type system writers to stick with their
traditional \n.


(From a different message)
> I'm talking about the fact that they have chosen a common escape
> character as path separator.

What's so specifically bad about a "common escape character"? Any character
that has a special meaning in something can be inconvenient when it has to
be used normally. A backslash in a C string, a dot in a regex, you probably
can find examples for any non-alphanumeric ASCII character. 

The only "problem" with the backslash is that you need to escape it in C
strings; I never had any trouble with that. BTW, are you really sure that
the backslash was a "common escape character" in the 70ies? How common was
it back then? Even today, it seems to be mostly a C idiom. (In that
respect, Python is leaning on C, even ever so slightly.)


Get over it... there are any number of definitions out there, some better
chosen than others, and most had a good set of reasons at the time they
were chosen. Mostly by chance, some fit better into the picture some
decades later, and some fit less nicely. Without really getting down to it,
there's no way to tell whether any of the standards was well-chosen. Even
the ones that look now as if they were... could be mere luck.

You're of course entitled to your opinion. I never wanted to doubt that.
But an unfounded opinion usually tells more about the subject than the
object... :)

Gerhard

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Windows vs. Linux

2006-08-02 Thread John Salerno
Sybren Stuvel wrote:

> Apple
> moved from \r to \n as EOL character.

Interesting. I didn't know that. Although it does seem to make sense to 
use both \r\n as EOL (if you still consider one as a carriage return and 
one as a newline, a la old school typewriters), \n is much nicer and 
cleaner looking. :)
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Windows vs. Linux

2006-08-02 Thread Tim Chase
> | Not from my Windows XP command prompt it doesn't. Do you have 
> | anything 
> | strange installed on your system?
> 
> FWIW:
> 
> 
> 
> Microsoft Windows XP [Version 5.1.2600]
> (C) Copyright 1985-2001 Microsoft Corp.
> 
> c:\temp>cd \
> 
> C:\>cd /windows/System32
> 
> C:\windows\system32>
> 
> 



Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\temp>cd \

C:\>cd /windows/system32

C:\WINDOWS\system32>cd /windows/system32
The system cannot find the path specified.
C:\WINDOWS\system32>cd \

C:\>cd /windows

C:\WINDOWS>cd /system32

C:\WINDOWS\system32> REM wtf?



Nice to see consistancy at work.  Looks like leading slashes are 
stripped and so it trys to find it relative to the current path.

Nothing like predictable, cross-platform implementations there. 
[rolls eyes]

Thank goodness Python brings some brains to the table where 
Windows/Dos is ::ehem:: seriously lacking.

-tkc



-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Windows vs. Linux

2006-08-02 Thread Alex Martelli
jean-michel bain-cornu <[EMAIL PROTECTED]> wrote:

> Andy Dingley a écrit :
> > I'd never recommend dual-boot for anything!
> Don't agree man, it's good for testing...

It's bothersome for testing: virtualization is much handier in most
cases.


Alex
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Windows vs. Linux

2006-08-02 Thread Alex Martelli
Gerhard Fiedler <[EMAIL PROTECTED]> wrote:
   ...

a few fine points of computing history...:

> >> (URLs probably use the slash because the internet protocols have been
> >> developed largely on Unix-type systems for use with Unix-type systems?)
> > 
> > It wasn't designed specifically for Unix-type systems, but for universal
> > access.
> 
> Right... the URI/URL syntax was formalized in the early 90ies, when

The internet *protocols* were typically developed on non-Unix systems --
that's why each line in text-based protocols must be terminated by
\r+\n, not just \n.  The WWW, as you mention, came later (and I believe
it was born on a NEXT cube, i.e., a unix-variant).

> > My point also was that a lot of programming languages use the backslash
> > as escape character. This has been true at least since the sixties. I
> > think it's a bad design choice from the Microsoft team to pick this
> > escape character as a path separator. 
> 
> Maybe... have you been involved in the decision? Or do you know what the
> reasons were? Do you know whether it was even Microsoft's choice?
> (Remember, they wrote DOS for IBM. And there was nobody who had foreseen
> the PC explosion.) 

Microsoft did *NOT* write DOS -- they purchased it from a small Seattle
company, which called it QDOS (Quick and Dirty OS) and had hacked it up
"in desperation" because CP/M did not run on intel 8086 CPUs, so the
small company's main business, selling 8086 boards, languished.  QDOS
was as compatible with CP/M as said small company could make it (rumor
has it that big parts were disassembled from CP/M and reassembled to run
on 8086 rather than 8080).  Part of the CP/M compatibility did include
the use of / as flag-indicator (the use of \r+\n as line ending also
comes from CP/M -- in turn, CP/M had aped these traits from some DEC
minicomputer operating systems).

When MS did write an OS -- DOS 2.0, which introduced a directory tree --
they did put in the OS an undocumented switch to make - the
flag-indicator and / the path separator, rather than / and \
respectively.  However it was never documented and it got removed in
later versions, perhaps because applications coded to the /-and-\
convention could break if the switch was thrown.

> Did you know that most DOS versions accept the / as path separator? That
> DOS was written on Xenix (Posix) systems (using the slash as path
> separator)? That Microsoft was for a long time pretty much a pure Xenix
> shop?

Internally yes (indeed, they developed Xenix, before later selling it to
SCO), but that does not mean that "DOS was written on Xenix" because DOS
was *not* written in Microsoft, as above mentioned.


Alex
-- 
http://mail.python.org/mailman/listinfo/python-list


RE: Windows vs. Linux

2006-08-02 Thread Tim Golden
| [EMAIL PROTECTED] wrote:
| 
| >>From a WinXP command prompt:
| > 
| > C:\>
| > C:\>cd /windows/system32
| > 
| > C:\WINDOWS\system32>
| > 
| > 
| Not from my Windows XP command prompt it doesn't. Do you have 
| anything 
| strange installed on your system?

FWIW:



Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

c:\temp>cd \

C:\>cd /windows/System32

C:\windows\system32>



TJG


This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Windows vs. Linux

2006-08-02 Thread Duncan Booth
[EMAIL PROTECTED] wrote:

>>From a WinXP command prompt:
> 
> C:\>
> C:\>cd /windows/system32
> 
> C:\WINDOWS\system32>
> 
> 
Not from my Windows XP command prompt it doesn't. Do you have anything 
strange installed on your system?
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Windows vs. Linux

2006-08-02 Thread bryanjugglercryptographer

Sybren Stuvel wrote:
> John Salerno enlightened us with:
> > But of course I still agree with you that in either case it's not a
> > judgment you can fairly make 30 years after the fact.
>
> I don't see Microsoft changing it the next 30 years either... Apple
> moved from \r to \n as EOL character. I'm sure the folks at mickeysoft
> are smart enough to change from \ to /.

They dis-allow '/' in filenames, and many Microsoft products now
respect
'/' as an alternate to '\'.

>From a WinXP command prompt:

C:\>
    C:\>cd /windows/system32

C:\WINDOWS\system32>


For a "Windows vs. Linux" thread, this one has been remarkably
rant-free.

-- 
--Bryan

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Windows vs. Linux

2006-08-02 Thread Richard Brodie

"Gerhard Fiedler" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]

>With the same reasoning one could say that the Unix creators should have
> used the VMS (or any other existing) form.

Only if they used Guido's time machine. 


-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Windows vs. Linux

2006-08-02 Thread John Salerno
Gerhard Fiedler wrote:

> A design choice is not necessarily a
> bad choice just because it turns out that some 30 years later there is a
> similar common product whose creators made a different choice, and now
> programmers have to cater to both.

To be fair, this isn't the reason he gave for it being a bad design 
choice. His reason was that MS chose to use the escape character as 
their path separator.

But of course I still agree with you that in either case it's not a 
judgment you can fairly make 30 years after the fact.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Windows vs. Linux

2006-08-02 Thread Gerhard Fiedler
On 2006-08-02 04:42:31, Sybren Stuvel wrote:

> I never said "I would have known it better". I just said that IMO it
> was a bad design choice ;-)

Well, and I question your qualification to judge that. 

In order to say that, you would have to know the reasoning, would have to
put it in the historical context and would have to be able to explain why
that reasoning was wrong at the time. A design choice is not necessarily a
bad choice just because it turns out that some 30 years later there is a
similar common product whose creators made a different choice, and now
programmers have to cater to both. With the same reasoning one could say
that the Unix creators should have used the VMS (or any other existing)
form.

Gerhard

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Windows vs. Linux

2006-08-01 Thread Dan
Edmond Dantes wrote:
> Dan wrote:
> 
>> But taken out of that context, I'll challenge it.  I was first exposed
>> to Python about five or six years ago--my boss asked me to consider it.
>> What I found was that the current version of Python was V2.2, but newest
>> version (that I could find) that ran on VMS was V1.4.  I decided to
>> stick with Perl, which provides excellent support for VMS.
> 
> What, you couldn't just take the latest source for Python and compile it
> under VMS?
> 
> :-)
> 
> I say that in jest, but I am surprised there were no Unix/Linux libraries
> available for VMS, which would've made the port easier -- and more up to
> date.
> 

Well, I never looked into a port, but there were certainly Unix 
libraries available for VMS.  (I believe VMS is POSIX-compliant, but 
don't quote me on that.)

/Dan

-- 
dedded att verizon dott net
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Windows vs. Linux

2006-08-01 Thread Gerhard Fiedler
On 2006-08-01 16:29:54, Sybren Stuvel wrote:

>> - Mac OS: ':'
> 
> It's a slash too, at least on non-obsolete Mac OS versions.

I wrote "Mac OS". That's not "Mac OSX". Ask Apple... :)  And Mac OSX is
quite arguably a Unix-type system.

>> Maybe someone else can fill in some of the missing OSes. It doesn't
>> seem to look like Windows is the odd man out; it rather seems that
>> every type of OS uses its own separator.
> 
> You can put a whole lot of OSses under "Unix-type", but actually it's
> more like this:

Well, you could list a number of DOS versions, too. Doesn't help the fact
that the slash is mainly on Unix-type systems, and that there are or were
quite a number of other systems out there that use other separator
characters. 

>> (URLs probably use the slash because the internet protocols have been
>> developed largely on Unix-type systems for use with Unix-type systems?)
> 
> It wasn't designed specifically for Unix-type systems, but for universal
> access.

Right... the URI/URL syntax was formalized in the early 90ies, when
Unix-type machines were dominant on the internet. There are also quite a
number of concerns that governed the choice of separators and escape
characters for URLs that the IBM, Microsoft and DEC/VMS people couldn't
really foresee in the 70ies (for example, when DEC and IBM started to use
the slash as command line switch character -- which later precluded its use
as path separator). 

> My point also was that a lot of programming languages use the backslash
> as escape character. This has been true at least since the sixties. I
> think it's a bad design choice from the Microsoft team to pick this
> escape character as a path separator. 

Maybe... have you been involved in the decision? Or do you know what the
reasons were? Do you know whether it was even Microsoft's choice?
(Remember, they wrote DOS for IBM. And there was nobody who had foreseen
the PC explosion.) 

Did you know that most DOS versions accept the / as path separator? That
DOS was written on Xenix (Posix) systems (using the slash as path
separator)? That Microsoft was for a long time pretty much a pure Xenix
shop?

> The problem with the world is stupidity. 

Right... And most people are /really/ smart 30 years after the fact; "I
would have known it better" is about as smart as it gets :)

Gerhard

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Windows vs. Linux

2006-08-01 Thread Gerhard Fiedler
On 2006-08-01 12:31:01, Sybren Stuvel wrote:

> Ehm... replace that with "the latter with bonk on every OS except
> Microsoft Windows". Windows is the weird one in OS-land, because they
> are the only one that use the most widely used escape-character (the
> backslash) as path separator.

Is that really true? From what I know, it's more like this:

- Unix-type systems: '/'
- Windows-type systems: '\'
- Mac OS: ':'
- OpenVMS: '.'
- ...

Maybe someone else can fill in some of the missing OSes. It doesn't seem to 
look like Windows is the odd man out; it rather seems that every type of OS 
uses its own separator. (URLs probably use the slash because the internet 
protocols have been developed largely on Unix-type systems for use with 
Unix-type systems?)

Gerhard

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Windows vs. Linux

2006-08-01 Thread Edmond Dantes
Dan wrote:

> But taken out of that context, I'll challenge it.  I was first exposed
> to Python about five or six years ago--my boss asked me to consider it.
> What I found was that the current version of Python was V2.2, but newest
> version (that I could find) that ran on VMS was V1.4.  I decided to
> stick with Perl, which provides excellent support for VMS.

What, you couldn't just take the latest source for Python and compile it
under VMS?

:-)

I say that in jest, but I am surprised there were no Unix/Linux libraries
available for VMS, which would've made the port easier -- and more up to
date.

-- 
-- Edmond Dantes, CMC
And Now for something Completely Different:
  http://settee.funiturenow.com
  http://floor-lamp.WhatDoYouHungerFor.com
  http://walkway.HomeImprovementBase.com
  http://can-opener.WhatDoYouHungerFor.com
  http://dog-chews.PetzFriendz.com
  http://skin-care.whitegirlstuff.com
  http://baby-lulu.ShadowKids.com


 Posted Via Usenet.com Premium Usenet Newsgroup Services
--
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
--
http://www.usenet.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Windows vs. Linux

2006-08-01 Thread OMouse
That is important, but apparently Windows (at least XP) will work fine
with the forward slash that Linux uses. I just tried it in the command
prompt and it works. I'm sure other platforms use the forward slash
separator as well. You've just covered three major platforms (Mac OS X,
WinXP and Linux) without using os.path.join.

And finally, from the Wikipedia entry on Slash (punctuation):
``Note however that the "forward slash" will be translated into a
backslash by most versions of DOS and Windows, in contexts where there
is little ambiguity with command-line options.''

-Rudolf

James Stroud wrote:
> jean-michel bain-cornu wrote:
> >Take care to use os.sep
>
> This is an important point. You should read up on the os.path module to
> make sure you are doing things in a platform independent way, for
> example, its better to use:
>
>os.path.join('my', 'favorite', 'dir')
>
> than
>
>"\\".join(['my', 'favorite', 'dir'])
>
> because the latter will bonk on linux. The former is platform
> independent. This hits at the same issue as using os.sep:
>
>os.sep.join(['my', 'favorite', 'dir'])
>
> But os.path has takes care of many of these issues in one module.
>
> James
>
> --
> James Stroud
> UCLA-DOE Institute for Genomics and Proteomics
> Box 951570
> Los Angeles, CA 90095
> 
> http://www.jamesstroud.com/

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Windows vs. Linux

2006-08-01 Thread Andy Dingley

[EMAIL PROTECTED] wrote:

> Python and Ubuntu rock...go fot it.

That's nice.  I've just burned myself a new Ubuntu f*ck-a-duck release
CD intending to rebuild a flakey old Deadrat box with it. Once it's
done I'd like to be running Python with some USB to Dallas one-wire
hardware on it, re-plugged from an old Windows box. Nice to know I have
a hope of getting somewhere.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Windows vs. Linux

2006-07-31 Thread Dan
Andy Dingley wrote:
[snip]
 > Python is one of the best languages I've found for
 > platform-independence - significantly better than Perl.
[big snip]

This statement was given in the context of Windows and Linux, and I've 
precious little experience doing anything on Windows. So I won't 
challenge it in the least, and in fact do not doubt it.

But taken out of that context, I'll challenge it.  I was first exposed 
to Python about five or six years ago--my boss asked me to consider it. 
What I found was that the current version of Python was V2.2, but newest 
version (that I could find) that ran on VMS was V1.4.  I decided to 
stick with Perl, which provides excellent support for VMS.

Now that I no longer need to worry about VMS, I prefer Python. Quite a bit.

/Dan
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Windows vs. Linux

2006-07-31 Thread diffuser78
> I'd never recommend dual-boot for anything!
> Hardware is cheap, time and trouble is expensive.

Dual-booting if so easy and helpful, I have always found it to be
extremely useful.

You might have a bad experience but I have my laptop and desktop both
running dual boot successfully for 4 and a half years now.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Windows vs. Linux

2006-07-31 Thread diffuser78
Linux can let you do more in Python and this comes from my personal
exprience. Ubuntu Dapper should let you install drivers easily for
wireless...a little bit tweaking might be required but its worth the
effort. Python and Ubuntu rock...go fot it.

[EMAIL PROTECTED] wrote:
> Okay, once-upon-a-time I tried to start programming by learning C.  At
> the time I was younger and didn't really understand all that C had to
> offer.  I eventually moved over to Microsoft's Visual Basic.  It was
> nice to be able to design a visual application with no effort (too bad
> I didn't really learn the ins and outs of programming)
>
> Long story short, I want to get back into programming, and Python looks
> like a good choice for me to start with, and maybe become advanced
> with.  Right now I run Windows as my main operating system.  On my old
> laptop I ran Ubuntu, and liked it very much; however, my new laptop has
> a Broadcom wireless card, and it's not very Linux friendly.  Is Windows
> an okay enviornment in which to program under Python, or do you
> recommend that I run a dual-boot of Linux or maybe a VMWare install to
> program under Python?

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Windows vs. Linux

2006-07-31 Thread James Stroud
jean-michel bain-cornu wrote:
>Take care to use os.sep

This is an important point. You should read up on the os.path module to 
make sure you are doing things in a platform independent way, for 
example, its better to use:

   os.path.join('my', 'favorite', 'dir')

than

   "\\".join(['my', 'favorite', 'dir'])

because the latter will bonk on linux. The former is platform 
independent. This hits at the same issue as using os.sep:

   os.sep.join(['my', 'favorite', 'dir'])

But os.path has takes care of many of these issues in one module.

James

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

http://www.jamesstroud.com/
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Windows vs. Linux

2006-07-31 Thread Duncan Booth
metaperl wrote:
> The reason I'm going with vmware is because I'm afraid that I will need
> to compile a C portiion of a Python module and that will not be a
> pretty picture under Windows... true or false?
> 
Provided you have the correct compilers installed it is no harder compiling 
C extensions under Windows than under Linux. The problem is getting the 
correct toolchain installed. You could try the instructions in section A of 
http://wiki.python.org/moin/PyrexOnWindows

You only need to follow section B of that document if you want to use 
Pyrex, but if you are planning on writing C extensions I strongly recommend 
using Pyrex. Also, these days, you can use ctypes for many cases where you 
used to have to compile a C extension.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Windows vs. Linux

2006-07-31 Thread William Witteman
On Mon, Jul 31, 2006 at 04:30:50AM -0700, Andy Dingley wrote:
>[EMAIL PROTECTED] wrote:
>
>> Is Windows
>> an okay enviornment in which to program under Python, or do you
>> recommend that I run a dual-boot of Linux or maybe a VMWare install
>> to
>> program under Python?
>
>Python is one of the best languages I've found for
>platform-independence - significantly better than Perl.  Right now I'm
>coding Python that runs happily under Redhat, Windows /Cygwin and
>Windows native. It also integrates closely with command line tools like
>subversion, including piping their output into Python-based XML
>parsers. This really wouldn't be easy with Perl.

No, it's easy with Perl too - but this is a Python list, so use Python
:-)

>Find yourself an editor that's pretty similar under both Unix and
>Windows. jEdit is a good place to start.

This is very good advice.  I would recommend vim or emacs (mostly vim,
but I don't wish to start a holy war) as the text-editing power tools of
choice, but you should find something that suits your style.  This list
can probably provide some guidance there, too.

>You might also like to look at running Cygwin under Windows. It's a
>Unix-like command shell that provides nearly every command-line Unix
>tool you could want on a Windows box. Can be a little awkward at times,
>but it's a huge advantage over raw Windows.

Ditto.
--

yours,

William
woolgathering.cx
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Windows vs. Linux

2006-07-31 Thread metaperl

Andy Dingley wrote:

>
> Python is one of the best languages I've found for
> platform-independence - significantly better than Perl.

The reason I'm going with vmware is because I'm afraid that I will need
to compile a C portiion of a Python module and that will not be a
pretty picture under Windows... true or false?

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Windows vs. Linux

2006-07-31 Thread jean-michel bain-cornu
Andy Dingley a écrit :
> I'd never recommend dual-boot for anything!
Don't agree man, it's good for testing...
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Windows vs. Linux

2006-07-31 Thread Andy Dingley
[EMAIL PROTECTED] wrote:

> Is Windows
> an okay enviornment in which to program under Python, or do you
> recommend that I run a dual-boot of Linux or maybe a VMWare install to
> program under Python?

Python is one of the best languages I've found for
platform-independence - significantly better than Perl.  Right now I'm
coding Python that runs happily under Redhat, Windows /Cygwin and
Windows native. It also integrates closely with command line tools like
subversion, including piping their output into Python-based XML
parsers. This really wouldn't be easy with Perl.

Find yourself an editor that's pretty similar under both Unix and
Windows. jEdit is a good place to start.

You might also like to look at running Cygwin under Windows. It's a
Unix-like command shell that provides nearly every command-line Unix
tool you could want on a Windows box. Can be a little awkward at times,
but it's a huge advantage over raw Windows.

I'd never recommend dual-boot for anything!
Hardware is cheap, time and trouble is expensive.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Windows vs. Linux

2006-07-31 Thread jean-michel bain-cornu
Hi,
[EMAIL PROTECTED] a écrit :
> Is Windows
> an okay enviornment in which to program under Python, or do you
> recommend that I run a dual-boot of Linux or maybe a VMWare install to
> program under Python?

I'm used to practice windows & linux and it makes sense to use python on 
both because the compatibility is excellent. Take care to use os.sep as 
the file path separator if you plan to stay compatible.
My favorite os is linux, but on windows you have pythonwin which is an 
excellent python extension with a very good debugger. Also boa works 
fine on windows but have annoying bugs on linux.
Furthermore, python comes with linux (nothing to install) and not with 
windows (needs python install if you deploy on users pcs).
Regards,
jm
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Windows vs. Linux

2006-07-31 Thread 3KWA
I am not a programming expert but I use python everyday on Windows XP:
* python standard distribution (CPython)
* iPython
* cygwin for the command line interaction, add a unix/linux flavour to
the blend

EuGeNe

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Windows vs. Linux

2006-07-30 Thread BartlebyScrivener
Windows XP is fine. I am learning Python on Windows first with an eye
toward moving to Linux.

If you like, get the ActivePython distribution, which comes with the
Win32 extensions.

If you start liking Python, consider adding the IPython shell. There
are commandline tweaks you can do to make the XP commandline bearable,
in fact, I found them on this forum, so perhaps search on XP
commandline.

Good luck,

rd

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Windows vs. Linux

2006-07-30 Thread James Stroud
[EMAIL PROTECTED] wrote:
> Okay, once-upon-a-time I tried to start programming by learning C.  At
> the time I was younger and didn't really understand all that C had to
> offer.  I eventually moved over to Microsoft's Visual Basic.  It was
> nice to be able to design a visual application with no effort (too bad
> I didn't really learn the ins and outs of programming)
> 
> Long story short, I want to get back into programming, and Python looks
> like a good choice for me to start with, and maybe become advanced
> with.  Right now I run Windows as my main operating system.  On my old
> laptop I ran Ubuntu, and liked it very much; however, my new laptop has
> a Broadcom wireless card, and it's not very Linux friendly.  Is Windows
> an okay enviornment in which to program under Python, or do you
> recommend that I run a dual-boot of Linux or maybe a VMWare install to
> program under Python?
> 

I recommend a triple boot mac.

James



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

http://www.jamesstroud.com/
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Windows vs. Linux

2006-07-30 Thread OMouse
Python should port nicely between Windows and Linux so there should be
no need to dual-boot.

[EMAIL PROTECTED] wrote:
> Okay, once-upon-a-time I tried to start programming by learning C.  At
> the time I was younger and didn't really understand all that C had to
> offer.  I eventually moved over to Microsoft's Visual Basic.  It was
> nice to be able to design a visual application with no effort (too bad
> I didn't really learn the ins and outs of programming)
>
> Long story short, I want to get back into programming, and Python looks
> like a good choice for me to start with, and maybe become advanced
> with.  Right now I run Windows as my main operating system.  On my old
> laptop I ran Ubuntu, and liked it very much; however, my new laptop has
> a Broadcom wireless card, and it's not very Linux friendly.  Is Windows
> an okay enviornment in which to program under Python, or do you
> recommend that I run a dual-boot of Linux or maybe a VMWare install to
> program under Python?

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Windows vs. Linux

2006-07-30 Thread William Witteman
On Sun, Jul 30, 2006 at 04:21:34PM -0700, [EMAIL PROTECTED] wrote:

>offer.  I eventually moved over to Microsoft's Visual Basic.  It was


I'm very sorry.

>Long story short, I want to get back into programming, and Python looks
>like a good choice for me to start with, and maybe become advanced
>with.  Right now I run Windows as my main operating system.  On my old

A good choice.  I write Python code both at home, on a Linux box, and at
work, on Windoze.  I find it slightly easier to write Python on Linux
only because I can interact so easily with the OS from the command line
- there are more itches to scratch and Python is one of the best
backscratchers.  Python on Linux lets me automate huge swathes of my
life with ease.  That said, there is a heck of a lot I can easily do on
Windoze too.  The real selling point for me is that I can work on code
for work at home, on a completely different platform, and then take it
to work and I know it'll Just Work(TM).

As a Linux zealot, I'd say use Linux :-)  As a pragmatist, use what you
find more comfortable, and enjoy yourself.
-- 

yours,

William
woolgathering.cx
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Windows vs. Linux

2006-07-30 Thread Damjan
> Right now I run Windows as my main operating system.  On my old
> laptop I ran Ubuntu, and liked it very much; however, my new laptop has
> a Broadcom wireless card, and it's not very Linux friendly.

of topic: that Broadcom wireless card has a driver included in the latest
kernel 2.6.17, and probably you could easily make it work if you make some
upgrades to Ubuntu.


-- 
damjan
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Windows vs. Linux

2006-07-30 Thread Aahz
In article <[EMAIL PROTECTED]>,
 <[EMAIL PROTECTED]> wrote:
>
>Long story short, I want to get back into programming, and Python looks
>like a good choice for me to start with, and maybe become advanced
>with.  Right now I run Windows as my main operating system.  On my old
>laptop I ran Ubuntu, and liked it very much; however, my new laptop has
>a Broadcom wireless card, and it's not very Linux friendly.  Is Windows
>an okay enviornment in which to program under Python, or do you
>recommend that I run a dual-boot of Linux or maybe a VMWare install to
>program under Python?

Windows is an excellent environment for Python!  Just Do It.  ;-)

(Despite the prepronderence of Linux programmers in the dev team, there
are probably more Windows Python programmers than for any other OS,
simply because there are more Windows users.)
-- 
Aahz ([EMAIL PROTECTED])   <*> http://www.pythoncraft.com/

"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are, by
definition, not smart enough to debug it."  --Brian W. Kernighan
-- 
http://mail.python.org/mailman/listinfo/python-list


Windows vs. Linux

2006-07-30 Thread noahmd
Okay, once-upon-a-time I tried to start programming by learning C.  At
the time I was younger and didn't really understand all that C had to
offer.  I eventually moved over to Microsoft's Visual Basic.  It was
nice to be able to design a visual application with no effort (too bad
I didn't really learn the ins and outs of programming)

Long story short, I want to get back into programming, and Python looks
like a good choice for me to start with, and maybe become advanced
with.  Right now I run Windows as my main operating system.  On my old
laptop I ran Ubuntu, and liked it very much; however, my new laptop has
a Broadcom wireless card, and it's not very Linux friendly.  Is Windows
an okay enviornment in which to program under Python, or do you
recommend that I run a dual-boot of Linux or maybe a VMWare install to
program under Python?

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Windows vs Linux [was: p2exe using wine/cxoffice]

2005-10-26 Thread Chris F.A. Johnson
On 2005-10-26, Tim Golden wrote:
> [Sybren Stuvel]
>
> Tim Golden enlightened us with:
>> > Well, I'm with you. I'm sure a lot of people will chime in to point
>> > out just how flexible and useful and productive Linux is as a
>> > workstation, but every time I try to use it -- and I make an honest
>> > effort -- I end up back in Windows
>
>> I'm curious, what do you mean with "it" in the part "every time I try
>> to use it"?
>
> Fair question. I have, over the years, installed and used Gentoo,
> Vector, RH, Ubuntu Breezy (my current choice) and various other 
> flavours and distros. When I "use it" I mean typically that I use 
> whatever desktop-type thing presents itself to me -- Gnome or XFCE 
> or Fluxbox, say -- one or more editors (I tend to try things out to
> see if they suit), and one or more command shells.

   All distros look the same to me, because I have an environment that
   I like, and I keep my home directory acros distros.

> As it happens, (and I suspect I'll have to don my flameproof suit here),
> I prefer the Windows command line to bash/readline for day-to-day use, 
> including in Python. Why? Because it does what I can't for the life of 
> me get readline to do: you can type the first few letters of a 
> previously-entered command and press F8. This brings up (going backwards
> with further presses) the last command which starts like that. And
> *then* you can just down-arrow to retrieve the commands which
> followed it. If someone can tell me how to do this with
> bash/readline I will be indebted to them and it will increase my
> chances of switching to Linux a bit! (Although not at work where I
> have no choice!)

In my ~/.inputrc:

"\e[a": history-search-backward  ## shift+up-arrow
"\e[b": history-search-forward   ## shift+down-arrow


-- 
Chris F.A. Johnson 
==
Shell Scripting Recipes: A Problem-Solution Approach, 2005, Apress

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Windows vs Linux

2005-10-26 Thread Sybren Stuvel
Tim G enlightened us with:
> Sadly, this seems not to be the case on my Ubuntu Breezy: bash
> 3.00.16, libreadline 4.3/5.0 (not sure which one bash is using).
> ctrl-r is fine; but you can't down-arrow from there; it just beeps
> at you. Is there some setting I'm missing?

See my other post in this thread. What I wrote was tested on Ubuntu
Breezy.

Sybren
-- 
The problem with the world is stupidity. Not saying there should be a
capital punishment for stupidity, but why don't we just take the
safety labels off of everything and let the problem solve itself? 
 Frank Zappa
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Windows vs Linux [was: p2exe using wine/cxoffice]

2005-10-26 Thread James Stroud
On Wednesday 26 October 2005 07:20, Tim Golden wrote:
> I'm sure you're right: given moderately naive users, a Windows box
> is *extremely* likely to be zombified. It's just that it doesn't
> have to be that way with the proper care and attention.

With $200 dollars of antivirus software (on top of the $200 OS), incessant 
reminding of users to not open email attachments or install "free" 
screensavers and such, disabling vbasic on every program, daily iterations 
through the windoze updating cycle, and putting the machine behind a Linux 
firewall, your windows machine probably wont get zombified. Or you could just 
do the reasonable thing and erase the hard drive and install Linux.



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

http://www.jamesstroud.com/
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Windows vs Linux

2005-10-26 Thread Tim G

Bernhard Herzog wrote:
> "Tim Golden" <[EMAIL PROTECTED]> writes:
>
> > But as far as I can tell
> > from my experience and from the docs -- and I'm not near a
> > Linux box at the mo -- having used ctrl-r to recall line x
> > in the history, you can't just down-arrow to recall x+1, x+2 etc.
> > Or can you?
>
> You can.  It works fine on this box, at least.
> GNU bash, version 2.05a.0(1)-release (i386-pc-linux-gnu)
> libreadline 4.2a

Sadly, this seems not to be the case on my Ubuntu Breezy:
bash 3.00.16, libreadline 4.3/5.0 (not sure which one
bash is using). ctrl-r is fine; but you can't down-arrow
from there; it just beeps at you. Is there some setting I'm
missing?

TJG

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Windows vs Linux [was: p2exe using wine/cxoffice]

2005-10-26 Thread Sybren Stuvel
Tim Golden enlightened us with:
> Well, fair enough. Although I don't think that on its own this
> constitutes "rubbish".

True - it's just one of the reasons that shift its status toward
rubishness ;-)

> Not quite sure what this means. As in ANSI support? (Perfectly true
> - definitely lacking there). Or something else?

ANSI, or even better VT220 or xterm support.

> Well, peculiarly, you can do this (as you're probably aware) from
> the Properties menu and it'll work immediately

Didn't know it would work immediately. Still awkward that you have to
type numbers just to resize a window.

> albeit without advising the running programs that it's resized, so
> only new lines will take advantage of the new width. Now, why they
> didn't let you do the same thing by grabbing the border and pulling,
> I don't know!

My point exactly! Especially since they do allow you to vertically
resize it that way.

> Ummm. Not quite true, at least not on my XP machine

Hmmm... maybe the 'cd' example was a bad one. Other commands don't
have smart completion. You can't complete "ipconfig /rel" to "ipconfig
/release" for instance.

> I'm sure you're right: given moderately naive users, a Windows box
> is *extremely* likely to be zombified. It's just that it doesn't
> have to be that way with the proper care and attention.

Which is another reason why I don't like Windows and do like Linux:
the latter will be fine with just some security updates every now and
then. Windows needs spyware sweepers, virus scanners and firewalls.

Sybren
-- 
The problem with the world is stupidity. Not saying there should be a
capital punishment for stupidity, but why don't we just take the
safety labels off of everything and let the problem solve itself? 
 Frank Zappa
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Windows vs Linux [was: p2exe using wine/cxoffice]

2005-10-26 Thread Tim G
Thomas Heller wrote:
> FYI, if you don't know this already: You also can resize the console without
> going through the properties menu with 'mode con cols=... lines=...'.

Good grief! I haven't used "mode con" in years; forgotten
it even existed! Thanks for bringing that back, Thomas.

TJG

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Windows vs Linux [was: p2exe using wine/cxoffice]

2005-10-26 Thread Diez B. Roggisch
> Thanks to both of you. But that much I already knew. It's not
> that I have *no* knowledge about readline: I did at least
> read the manuals when I got stuck! But as far as I can tell
> from my experience and from the docs -- and I'm not near a 
> Linux box at the mo -- having used ctrl-r to recall line x 
> in the history, you can't just down-arrow to recall x+1, x+2 etc. 
> Or can you?

Subsequent pressing of C-r will show you items further down the history 
that contain the same substring. Use C-s to search the other direction.

Diez
-- 
http://mail.python.org/mailman/listinfo/python-list


RE: Windows vs Linux [was: p2exe using wine/cxoffice]

2005-10-26 Thread skip

Tim> I am quite well aware of all of the ways you mention of recalling
Tim> history etc. etc. When I've tried using them, they all seem
Tim> tiresomely cumbersome ...

That's not at all surprising (at least not to me).  An important point to
realize is that readline's command recall is by default switchable between
Emacs-like key bindings and VI-like key bindings.  (If you're familiar with
readline's configuration file, I suspect you can make it resemble other
editors as well.)  If you're unfamiliar with either vi or Emacs, you're
likely to find either mode combersome.  For someone who regularly uses one
or the other, they are quite natural.  I speak as someone who has used Emacs
of one variety or another for over 20 years.  For me, readline's key
bindings "just work".

Skip
-- 
http://mail.python.org/mailman/listinfo/python-list


RE: Windows vs Linux [was: p2exe using wine/cxoffice]

2005-10-26 Thread Tim Golden
[Giovanni Dall'Olio]

Tim Golden ha scritto:
[... bash vs Win command-line ...]

> Argh!! ;)
> How about reading a simple tutorial on bash?

[... snip signs of aggravation over my ignorance ...]

I am quite well aware of all of the ways you mention
of recalling history etc. etc. When I've tried using
them, they all seem tiresomely cumbersome in comparison
to my usual experience of typing a few characters, pressing
F8 and then continuing from there. I was aware of Ctrl-r but
I didn't think you could then go down from there. Others
have said that it's possible, so I'll revisit that.

I realise that for many people, being able to type !!-2 
or whatever the incantation is is a godsend. For me, it's
awkward at best. Horses for courses. I'm not dismissing the
entire bash experience. Of *course* I realise that you can
launch programs from it and can write scripts to loop etc.

Please understand: I'm not a whining newbie who's dipped
his toes in the water of bash and found it wanting. I'm
someone who earnestly wants to make the best use of the
tools at his disposal, in this case bash, but finds it
curiously wanting in this particular respect.

Thanks nonetheless for your explanations and ideas.

TJG


This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Windows vs Linux [was: p2exe using wine/cxoffice]

2005-10-26 Thread Thomas Heller
"Tim Golden" <[EMAIL PROTECTED]> writes:

> [Sybren Stuvel]

>> You can't resize it horizontally
>
> Well, peculiarly, you can do this (as you're probably aware) from
> the Properties menu and it'll work immediately, albeit without
> advising the running programs that it's resized, so only new
> lines will take advantage of the new width. Now, why they didn't
> let you do the same thing by grabbing the border and pulling, I
> don't know!

FYI, if you don't know this already: You also can resize the console without
going through the properties menu with 'mode con cols=... lines=...'.

Thomas
-- 
http://mail.python.org/mailman/listinfo/python-list


RE: Windows vs Linux [was: p2exe using wine/cxoffice]

2005-10-26 Thread Tim Golden
[Tim Golden]
> Just occasionally you read posts from people who say (synthesised)
> "The Windows command line is rubbish",

[Sybren Stuvel]
> It is. Let me give an example. I have the following files:

[.. snip example of finding .somefile when you type som ..]

Well, fair enough. Although I don't think that on its own
this constitutes "rubbish". However, the rest of your points...

> There is also no proper terminal support in the "DOS" box

Not quite sure what this means. As in ANSI support? (Perfectly
true - definitely lacking there). Or something else?

> You can't resize it horizontally

Well, peculiarly, you can do this (as you're probably aware) from
the Properties menu and it'll work immediately, albeit without
advising the running programs that it's resized, so only new
lines will take advantage of the new width. Now, why they didn't
let you do the same thing by grabbing the border and pulling, I
don't know!

> and the TAB key can only do dubm filename completion 
> (no smart option completion like only completing with
> directory names after a "cd" command)

Ummm. Not quite true, at least not on my XP machine,
which, given:

  python.txt
 python 

alternates between the two when I do "dir p" but
only offers me the directory when I do "cd p".

In addition (and to no real advantage that I can see), Windows
offers two keystrokes, by default Ctrl-F and Ctrl-D if enabled,
to do file (and directory) completion and directory completion
only.

> > "All Windows machines are overrun with adware and generate spam
> > willy-nilly".

> Not all, indeed. There are _lots_ of Windows zombie machines, though.
> Then again, when I was moving, I didn't pay enough attention to my
> Linux box, was too late in patching a leak, and it started spamming
> too.

I'm sure you're right: given moderately naive users, a Windows box
is *extremely* likely to be zombified. It's just that it doesn't
have to be that way with the proper care and attention. And more
recent versions of Windows are a bit better off this way. But I'm
quite sure they're still worse off than Linux. 

TJG


This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Windows vs Linux [was: p2exe using wine/cxoffice]

2005-10-26 Thread Sybren Stuvel
Tim Golden enlightened us with:
> Well yes. I think the (only slightly) wider point I was making was
> that -- despite goodwill and several attempts on my part -- Linux
> still has not overpowered me with its usefulness.

I have yet to see any OS that overpowers me with its usefulness.

> Extending from this, where I am someone who's a competent computer
> user (indeed, a professional software developer of some years'
> standing) and who has honestly tried, it seems that switching to
> Linux is not quite such a no-brainer as people sometimes make out.

I think it's harder to switch for professional computer users than it
is for relative laymen. After all, you have to give up a lot of things
you've accumulated over the years. A newbie can just sit behind the
computer and click some icons, and will be happy when things work
properly.

> Just occasionally you read posts from people who say (synthesised)
> "The Windows command line is rubbish",

It is. Let me give an example. I have the following files:

SomeFileA.txt
SomeFileB.txt
SomeFileC.txt
.SomeFileA.txt.swp

That last one is a swap file created by VIM, because I'm editing
SomeFileA.txt. Now, if I want to use the TAB key to get filename
completion, and I type "Som", the first "match" it finds is
".SomeFileA.txt.swp". What is that? I don't want a file starting with
".Som", I want a file starting with "Som".

There is also no proper terminal support in the "DOS" box, you can't
resize it horizontally, and the TAB key can only do dubm filename
completion (no smart option completion like only completing with
directory names after a "cd" command)

> "Windows crashes all the time"

Fortunately, no longer true. It is true that a problem in one program
has a bigger influence on your desktop as a whole in Windows that it
has in Linux, though, so the effect of a badly behaving program is
"felt" stronger.

> "All Windows machines are overrun with adware and generate spam
> willy-nilly".

Not all, indeed. There are _lots_ of Windows zombie machines, though.
Then again, when I was moving, I didn't pay enough attention to my
Linux box, was too late in patching a leak, and it started spamming
too.

> And you just wonder whether such people have actually *used* a
> properly set up Windows machine recently.

I have.

Sybren
-- 
The problem with the world is stupidity. Not saying there should be a
capital punishment for stupidity, but why don't we just take the
safety labels off of everything and let the problem solve itself? 
 Frank Zappa
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Windows vs Linux [was: p2exe using wine/cxoffice]

2005-10-26 Thread Giovanni Dall'Olio

Tim Golden ha scritto:


> As it happens, (and I suspect I'll have to don my flameproof suit here),
> I prefer the Windows command line to bash/readline for day-to-day use,
> including in Python. Why? Because it does what I can't for the life of
> me get readline to do: you can type the first few letters of a
> previously-entered command and press F8. This brings up (going backwards
>
> with further presses) the last command which starts like that. And
> *then*

Argh!! ;)
How about reading a simple tutorial on bash?
You can use even '!' to recall other commands in history.
For example, you can type '!p' and it will call the last command
starting with 'p', without having to search for it (and if you want,
you can use CTRL+r)
You can use '!!' to recall the last command, or '!-#' for the other
ones. You can define single arguments, like !-#:2, to call only parts
of a old command.
With bash, you can repeat instructions (using 'for', 'while', and so
on) and use some basic logic to determine if launching them. You can
call easily any program installed in the computer, or in other ones,
too.
Really, are you joking? ;) Do you know that you can use the '' key
to auto-fill a command? isn't this useful? I tried to use the windows
command line sometimes, but I found it so slow and uncorfortable, that
I thought that noone can use it. I really don't understand what you
want to say with this topic!

p.s. if you want a tip, leave using desktop manager and begin using the
command line. You will like it.

-- 
http://mail.python.org/mailman/listinfo/python-list


RE: Windows vs Linux [was: p2exe using wine/cxoffice]

2005-10-26 Thread Tim Golden
Tim Golden enlightened us with:
> But as far as I can tell from my experience and from the docs -- and
> I'm not near a Linux box at the mo -- having used ctrl-r to recall
> line x in the history, you can't just down-arrow to recall x+1, x+2
> etc.  Or can you?

[Sybren]
With bash as well as the Python interactive shell:

[.. explanation snipped ..]

Thanks very much.

TJG


This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk

-- 
http://mail.python.org/mailman/listinfo/python-list


RE: Windows vs Linux

2005-10-26 Thread Tim Golden
"Tim Golden" <[EMAIL PROTECTED]> writes:

> But as far as I can tell
> from my experience and from the docs -- and I'm not near a 
> Linux box at the mo -- having used ctrl-r to recall line x 
> in the history, you can't just down-arrow to recall x+1, x+2 etc. 
> Or can you?

[Bernhard Herzog]
> You can.  It works fine on this box, at least.
> GNU bash, version 2.05a.0(1)-release (i386-pc-linux-gnu)
> libreadline 4.2a

Thanks. I'll take another look at it when I get a chance.

TJG


This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Windows vs Linux [was: p2exe using wine/cxoffice]

2005-10-26 Thread Sybren Stuvel
Tim Golden enlightened us with:
> But as far as I can tell from my experience and from the docs -- and
> I'm not near a Linux box at the mo -- having used ctrl-r to recall
> line x in the history, you can't just down-arrow to recall x+1, x+2
> etc.  Or can you?

With bash as well as the Python interactive shell:

- ^R followed by a partial string to search
- Hit ^R again to get the previous match, repeat as required
- Hit ^A/^E to move the cursor to the beginning/end of the line,
  stopping the "search mode". This allows you to use arrow up/down
  from that point in the readline history.

Sybren
-- 
The problem with the world is stupidity. Not saying there should be a
capital punishment for stupidity, but why don't we just take the
safety labels off of everything and let the problem solve itself? 
 Frank Zappa
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Windows vs Linux

2005-10-26 Thread Bernhard Herzog
"Tim Golden" <[EMAIL PROTECTED]> writes:

> But as far as I can tell
> from my experience and from the docs -- and I'm not near a 
> Linux box at the mo -- having used ctrl-r to recall line x 
> in the history, you can't just down-arrow to recall x+1, x+2 etc. 
> Or can you?

You can.  It works fine on this box, at least.
GNU bash, version 2.05a.0(1)-release (i386-pc-linux-gnu)
libreadline 4.2a

   Bernhard

-- 
Intevation GmbH http://intevation.de/
Skencil   http://skencil.org/
Thuban  http://thuban.intevation.org/
-- 
http://mail.python.org/mailman/listinfo/python-list


RE: Windows vs Linux [was: p2exe using wine/cxoffice]

2005-10-26 Thread Tim Golden
[Sybren Stuvel]

[Tim Golden]
> > It's obvious that everyone has a different way of working, and that
> > I'm more comfortable in Windows because all sorts of small
> > familiarities

> So what I read in your post is that you simply don't want to leave
> your familiar environment. Fair enough.

Well yes. I think the (only slightly) wider point I was
making was that -- despite goodwill and several attempts 
on my part -- Linux still has not overpowered me with its
usefulness. Extending from this, where I am someone who's
a competent computer user (indeed, a professional software
developer of some years' standing) and who has honestly 
tried, it seems that switching to Linux is not quite such 
a no-brainer as people sometimes make out.

Just occasionally you read posts from people who say
(synthesised) "The Windows command line is rubbish",
"Windows crashes all the time", "All Windows machines
are overrun with adware and generate spam willy-nilly".
And you just wonder whether such people have actually
*used* a properly set up Windows machine recently.

TJG


This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Windows vs Linux

2005-10-26 Thread Thomas Heller
"Tim Golden" <[EMAIL PROTECTED]> writes:

> [EMAIL PROTECTED]
>> But command line in Windows is in no way in the same
>> league as *nix shell. Use  for command completion and up/down
>> arrow or  to search for history.
>
> [darren kirby]
>> Try ctrl-r in bash, then type your first few letters...
>
> Thanks to both of you. But that much I already knew. It's not
> that I have *no* knowledge about readline: I did at least
> read the manuals when I got stuck! But as far as I can tell
> from my experience and from the docs -- and I'm not near a 
> Linux box at the mo -- having used ctrl-r to recall line x 
> in the history, you can't just down-arrow to recall x+1, x+2 etc. 
> Or can you?

I don't know.  When I discovered this I uninstalled the (windows)
readline module from my Python installation.

> (Sorry guys; I realise this is more stuff for comp.os.linux or
> comp.commandlineshells.bash or whatever it's called. But if
> someone *did* know the answer, I'd be really happy!)

;-)

Thomas
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Windows vs Linux [was: p2exe using wine/cxoffice]

2005-10-26 Thread [EMAIL PROTECTED]
oops, stand corrected. As I don't use the feature more than ctrl-r and
up/down arrow.

Tim Golden wrote:
> Thanks to both of you. But that much I already knew. It's not
> that I have *no* knowledge about readline: I did at least
> read the manuals when I got stuck! But as far as I can tell
> from my experience and from the docs -- and I'm not near a
> Linux box at the mo -- having used ctrl-r to recall line x
> in the history, you can't just down-arrow to recall x+1, x+2 etc.
> Or can you?
>
> (Sorry guys; I realise this is more stuff for comp.os.linux or
> comp.commandlineshells.bash or whatever it's called. But if
> someone *did* know the answer, I'd be really happy!)
>
> TJG
>
> 
> This e-mail has been scanned for all viruses by Star. The
> service is powered by MessageLabs. For more information on a proactive
> anti-virus service working around the clock, around the globe, visit:
> http://www.star.net.uk
> 

-- 
http://mail.python.org/mailman/listinfo/python-list


RE: Windows vs Linux [was: p2exe using wine/cxoffice]

2005-10-26 Thread Tim Golden
Tim Golden wrote:
> As it happens, (and I suspect I'll have to don my flameproof suit
here),
> I prefer the Windows command line to bash/readline for day-to-day use,
> including in Python. Why? Because it does what I can't for the life of
> me get readline to do: you can type the first few letters of a
> previously-entered command and press F8. This brings up (going
backwards
>
> with further presses) the last command which starts like that. And
> *then*
> you can just down-arrow to retrieve the commands which followed it.
> If someone can tell me how to do this with bash/readline I will be
> indebted to them and it will increase my chances of switching to Linux
> a bit! (Although not at work where I have no choice!)

[EMAIL PROTECTED]
> But command line in Windows is in no way in the same
> league as *nix shell. Use  for command completion and up/down
> arrow or  to search for history.

[darren kirby]
> Try ctrl-r in bash, then type your first few letters...

Thanks to both of you. But that much I already knew. It's not
that I have *no* knowledge about readline: I did at least
read the manuals when I got stuck! But as far as I can tell
from my experience and from the docs -- and I'm not near a 
Linux box at the mo -- having used ctrl-r to recall line x 
in the history, you can't just down-arrow to recall x+1, x+2 etc. 
Or can you?

(Sorry guys; I realise this is more stuff for comp.os.linux or
comp.commandlineshells.bash or whatever it's called. But if
someone *did* know the answer, I'd be really happy!)

TJG


This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk

-- 
http://mail.python.org/mailman/listinfo/python-list


OT: Re: Windows vs Linux [was: p2exe using wine/cxoffice]

2005-10-26 Thread Jeremy Jones
Tim Golden wrote:


>As it happens, (and I suspect I'll have to don my flameproof suit here),
>I prefer the Windows command line to bash/readline for day-to-day use, 
>including in Python. Why? Because it does what I can't for the life of 
>me get readline to do: you can type the first few letters of a 
>previously-entered command and press F8. This brings up (going backwards
>
>with further presses) the last command which starts like that. And
>*then* 
>you can just down-arrow to retrieve the commands which followed it. 
>If someone can tell me how to do this with bash/readline I will be 
>indebted to them and it will increase my chances of switching to Linux 
>a bit!
>

Others have recommended ctrl-r in bash.  People's tastes vary, but that 
has an awkward feel for me.  In zsh, you just type in as many letters as 
you care to match and hit the "up" arrow.  But, honestly, this is a bit 
annoying to me.  If I've begun to type in a command, realize it's not 
what I want, but instead, I want to go back in my history a couple of 
commands, I hit the "up" arrow to find to my irritation that it's 
pattern matching rather than going directly back in my history.  I guess 
it comes in handy at times, though

- jmj
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Windows vs Linux [was: p2exe using wine/cxoffice]

2005-10-26 Thread Sybren Stuvel
Tim Golden enlightened us with:
> Not quite fair. Not only would I avoid saying something with a
> redundant apostrophe ;) but the Windows user interface, at least for
> my purposes, didn't change such a huge amount between Win9x and
> Win2K,

Hence my reference to windows 3.1.

> It's obvious that everyone has a different way of working, and that
> I'm more comfortable in Windows because all sorts of small
> familiarities

So what I read in your post is that you simply don't want to leave
your familiar environment. Fair enough.

Sybren
-- 
The problem with the world is stupidity. Not saying there should be a
capital punishment for stupidity, but why don't we just take the
safety labels off of everything and let the problem solve itself? 
 Frank Zappa
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Windows vs Linux [was: p2exe using wine/cxoffice]

2005-10-26 Thread darren kirby
quoth the Tim Golden:
> As it happens, (and I suspect I'll have to don my flameproof suit here),
> I prefer the Windows command line to bash/readline for day-to-day use,
> including in Python. Why? Because it does what I can't for the life of
> me get readline to do: you can type the first few letters of a
> previously-entered command and press F8. This brings up (going backwards
>
> with further presses) the last command which starts like that. And
> *then*
> you can just down-arrow to retrieve the commands which followed it.
> If someone can tell me how to do this with bash/readline I will be
> indebted to them and it will increase my chances of switching to Linux
> a bit! (Although not at work where I have no choice!)

Try ctrl-r in bash, then type your first few letters...

-d
-- 
darren kirby :: Part of the problem since 1976 :: http://badcomputer.org
"...the number of UNIX installations has grown to 10, with more expected..."
- Dennis Ritchie and Ken Thompson, June 1972


pgpWqBHmbFD3S.pgp
Description: PGP signature
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Windows vs Linux [was: p2exe using wine/cxoffice]

2005-10-26 Thread [EMAIL PROTECTED]
Tim Golden wrote:
> As it happens, (and I suspect I'll have to don my flameproof suit here),
> I prefer the Windows command line to bash/readline for day-to-day use,
> including in Python. Why? Because it does what I can't for the life of
> me get readline to do: you can type the first few letters of a
> previously-entered command and press F8. This brings up (going backwards
>
> with further presses) the last command which starts like that. And
> *then*
> you can just down-arrow to retrieve the commands which followed it.
> If someone can tell me how to do this with bash/readline I will be
> indebted to them and it will increase my chances of switching to Linux
> a bit! (Although not at work where I have no choice!)
I use XP as my main desktop(because of many fine details) then VNC/X
into my linux box. But command line in Windows is in no way in the same
league as *nix shell. Use  for command completion and up/down
arrow or  to search for history.
_

-- 
http://mail.python.org/mailman/listinfo/python-list


Windows vs Linux [was: p2exe using wine/cxoffice]

2005-10-26 Thread Tim Golden
[Sybren Stuvel]

Tim Golden enlightened us with:
> > Well, I'm with you. I'm sure a lot of people will chime in to point
> > out just how flexible and useful and productive Linux is as a
> > workstation, but every time I try to use it -- and I make an honest
> > effort -- I end up back in Windows

> I'm curious, what do you mean with "it" in the part "every time I try
> to use it"?

Fair question. I have, over the years, installed and used Gentoo,
Vector, RH, Ubuntu Breezy (my current choice) and various other 
flavours and distros. When I "use it" I mean typically that I use 
whatever desktop-type thing presents itself to me -- Gnome or XFCE 
or Fluxbox, say -- one or more editors (I tend to try things out to
see if they suit), and one or more command shells.

Aside from using Firefox & Thunderbird I'm usually only doing 
small-scale development things under Linux: perhaps reworking
Python code for my web sites which are hosted on Cornerhost's
Linux servers, or playing around with up-and-coming tools for
Python, a (very) few of which only work easily -- or at all --
under Linux.

> There are different distributions of Linux, and putting them all on
> one big pile is like saying "I've tried Windows, and I really don't
> like it's user interface" and referring to the interface of Windows
> 3.1.

Not quite fair. Not only would I avoid saying something with a
redundant apostrophe ;) but the Windows user interface, at least
for my purposes, didn't change such a huge amount between Win9x and
Win2K,
and if you turn off the bells and whistles in XP (which I do!) isn't
so terribly different there. Which, I imagine, is by design. People
like familiarity. Linux distros (and the appearance they choose) seem
to vary far more widely than versions of Windows.

As it happens, (and I suspect I'll have to don my flameproof suit here),
I prefer the Windows command line to bash/readline for day-to-day use, 
including in Python. Why? Because it does what I can't for the life of 
me get readline to do: you can type the first few letters of a 
previously-entered command and press F8. This brings up (going backwards

with further presses) the last command which starts like that. And
*then* 
you can just down-arrow to retrieve the commands which followed it. 
If someone can tell me how to do this with bash/readline I will be 
indebted to them and it will increase my chances of switching to Linux 
a bit! (Although not at work where I have no choice!)

It's obvious that everyone has a different way of working, and that I'm
more comfortable in Windows because all sorts of small familiarities I
can hardly articulate: the way the focus works; the shortcuts I've
developed;
the ability to drag files over things and have them respond. I'm very 
happy with many things in Linux, and I do use it from time to time, 
but it's never quite been enough to pull me away from Windows. Of
course,
I'm lucky enough to have a legal version of Windows to use; if someone
wants to avoid shelling out then of course Linux is even more
attractive.

TJG


This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk

-- 
http://mail.python.org/mailman/listinfo/python-list


Processes/pipes cross platform issue - popen*() hangs using "rsh/rlogin" (not working in Windows vs. Linux)

2004-12-03 Thread David H
Background.

I'm running on WinXP w/ MS Services for Unix installed (to give
rsh/rlogin ability), both Python 2.3 and 2.4 version.  In linux, I'm
running RHEE with python2.3 version.  The code below works fine for me
in linux, but in WinXP the popen*() command "hangs".  More
specifically, I get an apparent python prompt (without the '>>> ', but
whatever I type has no effect, and hitting return does a CR but not
the additional LF, so I just type over what I had just typed).  The
only way I can exit is with CTRL-BREAK, and rerun python.  I've tried
the various flavors of popen[2|3|4], and the subprocess module in
python2.4, all with the same "bug".

Also, rsh/rlogin from windows DOS prompt work just fine.



Can anyone clue me in as to how to make this work in windows, or an
equivalent solution?

The gist of what I'm doing is this
-
import os
p = os.popen3("rsh LINUX_MACHINE.com -l USER")
p[0].writelines(["touch rsh_as_USER.txt\n",])
p[0].close()

In linux, the target machine will then have the .txt file touch'ed.

Thanks.  
-Dave
-- 
http://mail.python.org/mailman/listinfo/python-list