Mailing List Archive

1 2  View All
Re: What's the best way to write this regular expression? [ In reply to ]
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.
--
http://mail.python.org/mailman/listinfo/python-list
Re: RE: What's the best way to write this regular expression? [ In reply to ]
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

--
http://mail.python.org/mailman/listinfo/python-list
Re: What's the best way to write this regular expression? [ In reply to ]
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
--
http://mail.python.org/mailman/listinfo/python-list
Re: What's the best way to write this regular expression? [ In reply to ]
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 :)
--
http://mail.python.org/mailman/listinfo/python-list
Re: What's the best way to write this regular expression? [ In reply to ]
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.
--
http://mail.python.org/mailman/listinfo/python-list
Re: What's the best way to write this regular expression? [ In reply to ]
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?
--
http://mail.python.org/mailman/listinfo/python-list
Re: What's the best way to write this regular expression? [ In reply to ]
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.
--
http://mail.python.org/mailman/listinfo/python-list
Re: What's the best way to write this regular expression? [ In reply to ]
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!
--
http://mail.python.org/mailman/listinfo/python-list
Re: What's the best way to write this regular expression? [ In reply to ]
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"

--
http://mail.python.org/mailman/listinfo/python-list
Re: What's the best way to write this regular expression? [ In reply to ]
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

--
http://mail.python.org/mailman/listinfo/python-list
Re: What's the best way to write this regular expression? [ In reply to ]
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
>
--
http://mail.python.org/mailman/listinfo/python-list
Re: What's the best way to write this regular expression? [ In reply to ]
Dave Angel 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.

On Windows XP it is:

Mouse
-----
Right-click on title bar
Left-click on Edit
Left-click on Mark
Right-click and drag to select desired text
<enter> to copy text to clipboard

Keyboard
--------
<alt>-<space>
e
k or <enter>
arrows to move cursor, <shift-arrows> to select text
<enter> to copy text to clipboard

~Ethan~
--
http://mail.python.org/mailman/listinfo/python-list
RE: What's the best way to write this regular expression? [ In reply to ]
> > 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.
--
http://mail.python.org/mailman/listinfo/python-list
Re: What's the best way to write this regular expression? [ In reply to ]
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

--
http://mail.python.org/mailman/listinfo/python-list
Re: What's the best way to write this regular expression? [ In reply to ]
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.
--
http://mail.python.org/mailman/listinfo/python-list
Re: What's the best way to write this regular expression? [ In reply to ]
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 :)
--
http://mail.python.org/mailman/listinfo/python-list
Re: What's the best way to write this regular expression? [ In reply to ]
Also unrelated to the OP, but a far superior Commnad line interface to
Windows is the (unhelpfully-named) 'console' program:

http://sourceforge.net/projects/console/

This has tabbed windows, preset directory navigation, good copy/paste
facilities, the ability to configure different shells, etc etc.

Well worth a look.

HTH
J^n


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

1 2  View All