Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #21279 > unrolled thread

What's the best way to write this regular expression?

Started byJohn Salerno <johnjsal@gmail.com>
First post2012-03-06 14:43 -0800
Last post2012-03-09 02:45 -0800
Articles 20 on this page of 42 — 16 participants

Back to article view | Back to comp.lang.python


Contents

  What's the best way to write this regular expression? John Salerno <johnjsal@gmail.com> - 2012-03-06 14:43 -0800
    Re: What's the best way to write this regular expression? Chris Rebert <clp2@rebertia.com> - 2012-03-06 14:52 -0800
      Re: What's the best way to write this regular expression? John Salerno <johnjsal@gmail.com> - 2012-03-06 15:02 -0800
        Re: What's the best way to write this regular expression? John Salerno <johnjsal@gmail.com> - 2012-03-06 15:05 -0800
          Re: What's the best way to write this regular expression? John Salerno <johnjsal@gmail.com> - 2012-03-06 15:25 -0800
          Re: What's the best way to write this regular expression? John Salerno <johnjsal@gmail.com> - 2012-03-06 15:33 -0800
          Re: What's the best way to write this regular expression? John Salerno <johnjsal@gmail.com> - 2012-03-06 15:33 -0800
          Re: What's the best way to write this regular expression? Ian Kelly <ian.g.kelly@gmail.com> - 2012-03-06 16:35 -0700
          Re: What's the best way to write this regular expression? John Salerno <johnjsal@gmail.com> - 2012-03-06 17:39 -0600
          Re: What's the best way to write this regular expression? Terry Reedy <tjreedy@udel.edu> - 2012-03-06 20:04 -0500
        Re: What's the best way to write this regular expression? John Salerno <johnjsal@gmail.com> - 2012-03-06 15:05 -0800
          Re: What's the best way to write this regular expression? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-03-06 23:44 +0000
            Re: What's the best way to write this regular expression? John Salerno <johnjsal@gmail.com> - 2012-03-06 15:57 -0800
              RE: What's the best way to write this regular expression? "Prasad, Ramit" <ramit.prasad@jpmorgan.com> - 2012-03-07 00:04 +0000
              Re: What's the best way to write this regular expression? Terry Reedy <tjreedy@udel.edu> - 2012-03-06 20:06 -0500
      Re: What's the best way to write this regular expression? John Salerno <johnjsal@gmail.com> - 2012-03-06 15:02 -0800
    Re: What's the best way to write this regular expression? Roy Smith <roy@panix.com> - 2012-03-06 20:26 -0500
    Re: What's the best way to write this regular expression? John Salerno <johnjsal@gmail.com> - 2012-03-06 23:02 -0800
      Re: What's the best way to write this regular expression? Paul Rubin <no.email@nospam.invalid> - 2012-03-07 02:36 -0800
    Re: What's the best way to write this regular expression? John Salerno <johnjsal@gmail.com> - 2012-03-07 12:39 -0800
      Re: What's the best way to write this regular expression? Ian Kelly <ian.g.kelly@gmail.com> - 2012-03-07 14:01 -0700
      Re: What's the best way to write this regular expression? John Salerno <johnjsal@gmail.com> - 2012-03-07 15:11 -0600
        Re: What's the best way to write this regular expression? alex23 <wuwei23@gmail.com> - 2012-03-08 19:38 -0800
          Re: What's the best way to write this regular expression? John Salerno <johnjsal@gmail.com> - 2012-03-08 19:52 -0800
      Re: What's the best way to write this regular expression? Benjamin Kaplan <benjamin.kaplan@case.edu> - 2012-03-07 16:27 -0500
      RE: What's the best way to write this regular expression? "Prasad, Ramit" <ramit.prasad@jpmorgan.com> - 2012-03-07 21:31 +0000
      Re: What's the best way to write this regular expression? Ian Kelly <ian.g.kelly@gmail.com> - 2012-03-07 14:34 -0700
      Re: What's the best way to write this regular expression? John Salerno <johnjsal@gmail.com> - 2012-03-07 15:44 -0600
      Re: RE: What's the best way to write this regular expression? Evan Driscoll <driscoll@cs.wisc.edu> - 2012-03-07 16:02 -0600
        Re: What's the best way to write this regular expression? John Salerno <johnjsal@gmail.com> - 2012-03-07 23:26 -0800
      Re: What's the best way to write this regular expression? Chris Angelico <rosuav@gmail.com> - 2012-03-08 16:03 +1100
        Re: What's the best way to write this regular expression? John Salerno <johnjsal@gmail.com> - 2012-03-07 23:25 -0800
    Re: What's the best way to write this regular expression? John Salerno <johnjsal@gmail.com> - 2012-03-08 13:33 -0800
      Re: What's the best way to write this regular expression? John Salerno <johnjsal@gmail.com> - 2012-03-08 13:40 -0800
        Re: What's the best way to write this regular expression? John Salerno <johnjsal@gmail.com> - 2012-03-08 13:52 -0800
        Re: What's the best way to write this regular expression? John Gordon <gordon@panix.com> - 2012-03-08 21:54 +0000
        Re: What's the best way to write this regular expression? Dave Angel <d@davea.name> - 2012-03-08 17:19 -0500
        Re: What's the best way to write this regular expression? John Salerno <johnjsal@gmail.com> - 2012-03-08 16:25 -0600
        RE: What's the best way to write this regular expression? "Prasad, Ramit" <ramit.prasad@jpmorgan.com> - 2012-03-08 23:02 +0000
        Re: What's the best way to write this regular expression? Dave Angel <d@davea.name> - 2012-03-08 18:23 -0500
        Re: What's the best way to write this regular expression? Ethan Furman <ethan@stoneleaf.us> - 2012-03-08 14:52 -0800
          Re: What's the best way to write this regular expression? jkn <jkn_gg@nicorp.f9.co.uk> - 2012-03-09 02:45 -0800

Page 2 of 3 — ← Prev page 1 [2] 3  Next page →


#21343

FromIan Kelly <ian.g.kelly@gmail.com>
Date2012-03-07 14:01 -0700
Message-ID<mailman.485.1331154110.3037.python-list@python.org>
In reply to#21341
On Wed, Mar 7, 2012 at 1:39 PM, John Salerno <johnjsal@gmail.com> wrote:
> Ok, first major roadblock. I have no idea how to install Beautiful
> Soup or lxml on Windows! All I can find are .tar files. Based on what
> I've read, I can use the easy_setup module to install these types of
> files, but when I went to download the setuptools package, it only
> seemed to support Python 2.7. I'm using 3.2. Is 2.7 just the minimum
> version it requires? It didn't say something like "2.7+", so I wasn't
> sure, and I don't want to start installing a bunch of stuff that will
> clog up my directories and not even work.

There is a fork of setuptools called "distribute" that supports Python 3.

> What's the best way for me to install these two packages? I've also
> seen a reference to using setup.py...is that a separate package too,
> or is that something that comes with Python by default?

setup.py is a file that should be included at the top-level of the
.tar files you downloaded.  Generally, to install something in that
manner, you would navigate to that top-level folder and run "python
setup.py install".  If you have multiple Python versions installed and
want to install the package for a specific version, then you would use
that version of Python to run the setup.py file.

[toc] | [prev] | [next] | [standalone]


#21345

FromJohn Salerno <johnjsal@gmail.com>
Date2012-03-07 15:11 -0600
Message-ID<mailman.486.1331154700.3037.python-list@python.org>
In reply to#21341
On Wed, Mar 7, 2012 at 3:01 PM, Ian Kelly <ian.g.kelly@gmail.com> wrote:

> There is a fork of setuptools called "distribute" that supports Python 3.

Thanks, I guess I'll give this a try tonight!

> setup.py is a file that should be included at the top-level of the
> .tar files you downloaded.  Generally, to install something in that
> manner, you would navigate to that top-level folder and run "python
> setup.py install".  If you have multiple Python versions installed and
> want to install the package for a specific version, then you would use
> that version of Python to run the setup.py file.

The only files included in the .tar.gz file is a .tar file of the same
name. So I guess the setup option doesn't exist for these particular
packages. I'll try "distribute" tonight when I have some time to mess
with all of this.

So much work just to get a 3rd party module installed!

[toc] | [prev] | [next] | [standalone]


#21416

Fromalex23 <wuwei23@gmail.com>
Date2012-03-08 19:38 -0800
Message-ID<9796cdc0-7322-4d1b-b513-a51fb8bc5e62@lf20g2000pbb.googlegroups.com>
In reply to#21345
John Salerno <johnj...@gmail.com> wrote:
> So much work just to get a 3rd party module installed!

"New! Try out the beta release of Beautiful Soup 4. (Last updated
February 28, 2012)
easy_install beautifulsoup4 or pip install beautifulsoup4 or download
a tarball."

http://www.crummy.com/software/BeautifulSoup/

Worked fine under both Python 2.7 & 3.2 using pip.

[toc] | [prev] | [next] | [standalone]


#21417

FromJohn Salerno <johnjsal@gmail.com>
Date2012-03-08 19:52 -0800
Message-ID<11016571.151.1331265168696.JavaMail.geo-discussion-forums@yneo2>
In reply to#21416
On Thursday, March 8, 2012 9:38:51 PM UTC-6, alex23 wrote:
> John Salerno <johnj...@gmail.com> wrote:
> > So much work just to get a 3rd party module installed!
> 
> "New! Try out the beta release of Beautiful Soup 4. (Last updated
> February 28, 2012)
> easy_install beautifulsoup4 or pip install beautifulsoup4 or download
> a tarball."
> 
> http://www.crummy.com/software/BeautifulSoup/
> 
> Worked fine under both Python 2.7 & 3.2 using pip.

Yeah, but first I had to figure out how to install easy_install :)

[toc] | [prev] | [next] | [standalone]


#21347

FromBenjamin Kaplan <benjamin.kaplan@case.edu>
Date2012-03-07 16:27 -0500
Message-ID<mailman.487.1331155717.3037.python-list@python.org>
In reply to#21341
On Wed, Mar 7, 2012 at 4:11 PM, John Salerno <johnjsal@gmail.com> wrote:
>
> On Wed, Mar 7, 2012 at 3:01 PM, Ian Kelly <ian.g.kelly@gmail.com> wrote:
>
> > There is a fork of setuptools called "distribute" that supports Python
> > 3.
>
> Thanks, I guess I'll give this a try tonight!
>
> > setup.py is a file that should be included at the top-level of the
> > .tar files you downloaded.  Generally, to install something in that
> > manner, you would navigate to that top-level folder and run "python
> > setup.py install".  If you have multiple Python versions installed and
> > want to install the package for a specific version, then you would use
> > that version of Python to run the setup.py file.
>
> The only files included in the .tar.gz file is a .tar file of the same
> name. So I guess the setup option doesn't exist for these particular
> packages. I'll try "distribute" tonight when I have some time to mess
> with all of this.
>
> So much work just to get a 3rd party module installed!
> --


It's because your extraction program is weird. Gzip is a compression
algorithm that operates on a single file. Tar is an archive format
that combines multiple files into a single file. When we say "extract
the .tar.gz", what we mean is both uncompress the tar file and then
extract everything out of that. A lot of programs will do that in one
step. If you look inside the tar file, you should find the setup.py.

[toc] | [prev] | [next] | [standalone]


#21349

From"Prasad, Ramit" <ramit.prasad@jpmorgan.com>
Date2012-03-07 21:31 +0000
Message-ID<mailman.489.1331155878.3037.python-list@python.org>
In reply to#21341
> The only files included in the .tar.gz file is a .tar file of the same
> name.

gz stands for gzip and is a form of compression (like rar/zip ). 
tar stands for a tape archive. It is basically a box that holds the
files. So you need to "unzip" and then "open the box".

Normally programs like WinZip / WinRar / 7-zip will do both in one step
so you do not need to. Not sure what program you are using...

Ramit


Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology
712 Main Street | Houston, TX 77002
work phone: 713 - 216 - 5423

--

This email is confidential and subject to important disclaimers and
conditions including on offers for the purchase or sale of
securities, accuracy and completeness of information, viruses,
confidentiality, legal privilege, and legal entity disclaimers,
available at http://www.jpmorgan.com/pages/disclosures/email.  

[toc] | [prev] | [next] | [standalone]


#21351

FromIan Kelly <ian.g.kelly@gmail.com>
Date2012-03-07 14:34 -0700
Message-ID<mailman.491.1331156131.3037.python-list@python.org>
In reply to#21341
On Wed, Mar 7, 2012 at 2:11 PM, John Salerno <johnjsal@gmail.com> wrote:
> The only files included in the .tar.gz file is a .tar file of the same
> name. So I guess the setup option doesn't exist for these particular
> packages.

The setup.py file (as well as the other files) would be inside the
.tar file.  Unlike a Windows zip file, which does both archival and
compression, Unix files are typically archived and compressed in two
separate steps: "tar" denotes the archival format, and "gz" denotes
the compression format.  Some decompression programs are smart enough
to recognize the .tar file and automatically extract it when
decompressing.  Others require you to decompress the .gz and extract
the .tar separately -- it sounds like yours is one of the latter.

[toc] | [prev] | [next] | [standalone]


#21352

FromJohn Salerno <johnjsal@gmail.com>
Date2012-03-07 15:44 -0600
Message-ID<mailman.492.1331156691.3037.python-list@python.org>
In reply to#21341
On Wed, Mar 7, 2012 at 3:34 PM, Ian Kelly <ian.g.kelly@gmail.com> wrote:

> The setup.py file (as well as the other files) would be inside the
> .tar file.  Unlike a Windows zip file, which does both archival and
> compression, Unix files are typically archived and compressed in two
> separate steps: "tar" denotes the archival format, and "gz" denotes
> the compression format.  Some decompression programs are smart enough
> to recognize the .tar file and automatically extract it when
> decompressing.  Others require you to decompress the .gz and extract
> the .tar separately -- it sounds like yours is one of the latter.

Ah, I see now. After opening the gz file, there was a tar file inside,
and then I just opened that file (I use 7zip for these types) and
there was a whole host of stuff inside. I didn't realize the tar file
itself was an archive, I thought it was the module! ::blush::

Maybe I don't need to mess with the "distribute" utility then, if I
can just run the setup file. I'll try that first and see what happens.

Thanks.

[toc] | [prev] | [next] | [standalone]


#21355

FromEvan Driscoll <driscoll@cs.wisc.edu>
Date2012-03-07 16:02 -0600
Message-ID<mailman.493.1331157787.3037.python-list@python.org>
In reply to#21341
On 01/-10/-28163 01:59 PM, Prasad, Ramit wrote:
> gz stands for gzip and is a form of compression (like rar/zip ).
> tar stands for a tape archive. It is basically a box that holds the
> files. So you need to "unzip" and then "open the box".
>
> Normally programs like WinZip / WinRar / 7-zip will do both in one step
> so you do not need to. Not sure what program you are using...

I'm not sure what 7-zip you're referring to, because I use 7-zip and 
it's always been a two-step process for me...

(Though I can't say I've looked through the preferences dialog for a 
"extract .tar.gz files in one go" setting.)

Evan

[toc] | [prev] | [next] | [standalone]


#21378

FromJohn Salerno <johnjsal@gmail.com>
Date2012-03-07 23:26 -0800
Message-ID<7d80b224-8f51-48c7-8224-6323e282a13e@x17g2000yqj.googlegroups.com>
In reply to#21355
On Mar 7, 4:02 pm, Evan Driscoll <drisc...@cs.wisc.edu> wrote:
> On 01/-10/-28163 01:59 PM, Prasad, Ramit wrote:
>
> > gz stands for gzip and is a form of compression (like rar/zip ).
> > tar stands for a tape archive. It is basically a box that holds the
> > files. So you need to "unzip" and then "open the box".
>
> > Normally programs like WinZip / WinRar / 7-zip will do both in one step
> > so you do not need to. Not sure what program you are using...
>
> I'm not sure what 7-zip you're referring to, because I use 7-zip and
> it's always been a two-step process for me...
>
> (Though I can't say I've looked through the preferences dialog for a
> "extract .tar.gz files in one go" setting.)
>
> Evan

Same here, because that's what I used. I looked through the settings
but didn't see anything. What seems to happen is that 7-Zip recognizes
the .gz extension and opens that automatically. But then that simply
opens up another window with the .tar file in it, which you have to
then open again.

[toc] | [prev] | [next] | [standalone]


#21371

FromChris Angelico <rosuav@gmail.com>
Date2012-03-08 16:03 +1100
Message-ID<mailman.501.1331183016.3037.python-list@python.org>
In reply to#21341
On Thu, Mar 8, 2012 at 7:39 AM, John Salerno <johnjsal@gmail.com> wrote:
> it only
> seemed to support Python 2.7. I'm using 3.2. Is 2.7 just the minimum
> version it requires? It didn't say something like "2.7+", so I wasn't
> sure, and I don't want to start installing a bunch of stuff that will
> clog up my directories and not even work.

Just to clarify: Python 2 and Python 3 are quite different. If
something requires Python 2.7, you cannot assume that it will work
with Python 3.2; anything that supports both branches will usually
list the minimum version of each (eg "2.7 or 3.3").

ChrisA

[toc] | [prev] | [next] | [standalone]


#21377

FromJohn Salerno <johnjsal@gmail.com>
Date2012-03-07 23:25 -0800
Message-ID<6497ecaf-c165-40be-9d6c-3c8fa6963861@p13g2000yqd.googlegroups.com>
In reply to#21371
On Mar 7, 11:03 pm, Chris Angelico <ros...@gmail.com> wrote:
> On Thu, Mar 8, 2012 at 7:39 AM, John Salerno <johnj...@gmail.com> wrote:
> > it only
> > seemed to support Python 2.7. I'm using 3.2. Is 2.7 just the minimum
> > version it requires? It didn't say something like "2.7+", so I wasn't
> > sure, and I don't want to start installing a bunch of stuff that will
> > clog up my directories and not even work.
>
> Just to clarify: Python 2 and Python 3 are quite different. If
> something requires Python 2.7, you cannot assume that it will work
> with Python 3.2; anything that supports both branches will usually
> list the minimum version of each (eg "2.7 or 3.3").
>
> ChrisA

That's why I asked first, because I got the feeling it did NOT support
Python 3 :)

[toc] | [prev] | [next] | [standalone]


#21395

FromJohn Salerno <johnjsal@gmail.com>
Date2012-03-08 13:33 -0800
Message-ID<03dd4256-0881-44e8-bb27-38f23ce66267@h20g2000yqd.googlegroups.com>
In reply to#21279
Alright, I'm simply lost about how to install these modules. I
extracted the folders from the .tar.gz files and then went into those
folders in my command prompt. I typed:

C:\Python32\python setup.py install

and for a while something was happening (I was doing the lxml one) and
then it stopped with an error that it couldn't find a file. So I have
no idea.

Next I installed the "distribute" module, which seemed to install
okay. But now I don't understand how to use easy_install. Where do I
call it from? What do I do with the .tar.gz files at this point? The
instructions for lxml say to run this command:

easy_install --allow-hosts=lxml.de,*.python.org lxml

but WHERE do I run it? I tried it in the Python directory, and then
further in the lxml site-packages directory, but it doesn't work. What
do I do with it? Where do I put the .tar files?

[toc] | [prev] | [next] | [standalone]


#21396

FromJohn Salerno <johnjsal@gmail.com>
Date2012-03-08 13:40 -0800
Message-ID<21519dbf-4097-4780-874d-41d76f6453e0@x17g2000yqj.googlegroups.com>
In reply to#21395
On Mar 8, 3:33 pm, John Salerno <johnj...@gmail.com> wrote:
> Alright, I'm simply lost about how to install these modules. I
> extracted the folders from the .tar.gz files and then went into those
> folders in my command prompt. I typed:
>
> C:\Python32\python setup.py install
>
> and for a while something was happening (I was doing the lxml one) and
> then it stopped with an error that it couldn't find a file. So I have
> no idea.
>
> Next I installed the "distribute" module, which seemed to install
> okay. But now I don't understand how to use easy_install. Where do I
> call it from? What do I do with the .tar.gz files at this point? The
> instructions for lxml say to run this command:
>
> easy_install --allow-hosts=lxml.de,*.python.org lxml
>
> but WHERE do I run it? I tried it in the Python directory, and then
> further in the lxml site-packages directory, but it doesn't work. What
> do I do with it? Where do I put the .tar files?

Well, after a bit of experimentation, I got it to run, but I seem to
have run into the same error as when I used setup.py:

http://i271.photobucket.com/albums/jj138/JohnJSal/lxml_error.png

Now I have no idea what to do.

[toc] | [prev] | [next] | [standalone]


#21397

FromJohn Salerno <johnjsal@gmail.com>
Date2012-03-08 13:52 -0800
Message-ID<75bf9c09-5d24-457f-94c0-96221f0553b2@h20g2000yqd.googlegroups.com>
In reply to#21396
On Mar 8, 3:40 pm, John Salerno <johnj...@gmail.com> wrote:

> Now I have no idea what to do.

Hmph, I suppose I should have more patience. I realized that the
easy_install for lxml only tried to install a binary version, which
doesn't exist for the version it found (the latest, 2.3.3). I just had
to look through the previous versions and find the one with a binary
installation for Windows (2.3) and it was as simple as a single click
to install!

And the easy_install method did work for Beautiful Soup, so I should
be all set now!

[toc] | [prev] | [next] | [standalone]


#21398

FromJohn Gordon <gordon@panix.com>
Date2012-03-08 21:54 +0000
Message-ID<jjb9r6$ska$1@reader1.panix.com>
In reply to#21396
In <21519dbf-4097-4780-874d-41d76f6453e0@x17g2000yqj.googlegroups.com> John Salerno <johnjsal@gmail.com> writes:

> Well, after a bit of experimentation, I got it to run, but I seem to
> have run into the same error as when I used setup.py:

> http://i271.photobucket.com/albums/jj138/JohnJSal/lxml_error.png

> Now I have no idea what to do.

The first error on that screen is that "xslt-config" is not found
as a command.

Try a web search for "xslt-config not found", there seemed to be some
helpful results.

-- 
John Gordon                   A is for Amy, who fell down the stairs
gordon@panix.com              B is for Basil, assaulted by bears
                                -- Edward Gorey, "The Gashlycrumb Tinies"

[toc] | [prev] | [next] | [standalone]


#21401

FromDave Angel <d@davea.name>
Date2012-03-08 17:19 -0500
Message-ID<mailman.519.1331245226.3037.python-list@python.org>
In reply to#21396
On 03/08/2012 04:40 PM, John Salerno wrote:
> <SNIP>
> http://i271.photobucket.com/albums/jj138/JohnJSal/lxml_error.png
>

Nothing to do with Python, but you'd save us all a lot of space and 
bandwidth if you learned how to copy/paste from a Windows cmd window.

If you're just doing it rarely, you can right click on the top bar to 
get a menu.  I think you want "mark".  Then you select the text you'd 
like to put in the clipboard.

Alternatively, you can put the console in quick-edit mode (I think it's 
called, it's been a long time since I ran Windows).  That's an option 
you set on one cmd window, and it sticks for future windows.

In quick-edit, you just right-click-drag on the cmd window to select a 
rectangle of text.  Then you can Ctrl-V to paste it into email, or into 
a text editor, or wherever else you need it.  Hard to imagine not using 
this mode, or its Linux equivalent, which is always available.

If that wasn't clear enough, or it doesn't work for you, somebody will 
explain it better.  Or ask me, and I'll launch a VirtualBox with Windows 
to get you going.

-- 

DaveA

[toc] | [prev] | [next] | [standalone]


#21403

FromJohn Salerno <johnjsal@gmail.com>
Date2012-03-08 16:25 -0600
Message-ID<mailman.520.1331245544.3037.python-list@python.org>
In reply to#21396
Thanks, I had no idea about either option, since I don't use the
command prompt very much. Needless to say, the Linux console is much
nicer :)



On Thu, Mar 8, 2012 at 4:19 PM, Dave Angel <d@davea.name> wrote:
> On 03/08/2012 04:40 PM, John Salerno wrote:
>>
>> <SNIP>
>> http://i271.photobucket.com/albums/jj138/JohnJSal/lxml_error.png
>>
>
> Nothing to do with Python, but you'd save us all a lot of space and
> bandwidth if you learned how to copy/paste from a Windows cmd window.
>
> If you're just doing it rarely, you can right click on the top bar to get a
> menu.  I think you want "mark".  Then you select the text you'd like to put
> in the clipboard.
>
> Alternatively, you can put the console in quick-edit mode (I think it's
> called, it's been a long time since I ran Windows).  That's an option you
> set on one cmd window, and it sticks for future windows.
>
> In quick-edit, you just right-click-drag on the cmd window to select a
> rectangle of text.  Then you can Ctrl-V to paste it into email, or into a
> text editor, or wherever else you need it.  Hard to imagine not using this
> mode, or its Linux equivalent, which is always available.
>
> If that wasn't clear enough, or it doesn't work for you, somebody will
> explain it better.  Or ask me, and I'll launch a VirtualBox with Windows to
> get you going.
>
> --
>
> DaveA
>

[toc] | [prev] | [next] | [standalone]


#21409

From"Prasad, Ramit" <ramit.prasad@jpmorgan.com>
Date2012-03-08 23:02 +0000
Message-ID<mailman.524.1331248054.3037.python-list@python.org>
In reply to#21396
> > Alternatively, you can put the console in quick-edit mode (I think it's
> > called, it's been a long time since I ran Windows).  That's an option you
> > set on one cmd window, and it sticks for future windows.
> >
> > In quick-edit, you just right-click-drag on the cmd window to select a
> > rectangle of text.  Then you can Ctrl-V to paste it into email, or into a
> > text editor, or wherever else you need it.  Hard to imagine not using
> this
> > mode, or its Linux equivalent, which is always available.

Actually in quick-edit mode (XP and higher) you just select with
left click and then hit enter which copies it to the clipboard.
If you also enable insert mode (not sure if this is Win7 specific)
you can even right click to paste into the console, just like
Linux.

> Needless to say, the Linux console is much nicer :)
True. 

Ramit


Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology
712 Main Street | Houston, TX 77002
work phone: 713 - 216 - 5423

--


This email is confidential and subject to important disclaimers and
conditions including on offers for the purchase or sale of
securities, accuracy and completeness of information, viruses,
confidentiality, legal privilege, and legal entity disclaimers,
available at http://www.jpmorgan.com/pages/disclosures/email.  

[toc] | [prev] | [next] | [standalone]


#21410

FromDave Angel <d@davea.name>
Date2012-03-08 18:23 -0500
Message-ID<mailman.525.1331249023.3037.python-list@python.org>
In reply to#21396
On 03/08/2012 06:02 PM, Prasad, Ramit wrote:
> Actually in quick-edit mode (XP and higher) you just select with
> left click and then hit enter which copies it to the clipboard.
> If you also enable insert mode (not sure if this is Win7 specific)
> you can even right click to paste into the console, just like
> Linux.
>
>> Needless to say, the Linux console is much nicer :)
> True.
>
>

I was confusing the left-mouse-drag and the right-click.  You are 
correct about both the copying and the pasting, and they do both work 
from XP onwards.

As I said, I haven't used Windows much in quite a while.

-- 

DaveA

[toc] | [prev] | [next] | [standalone]


Page 2 of 3 — ← Prev page 1 [2] 3  Next page →

Back to top | Article view | comp.lang.python


csiph-web