473,703 Members | 2,671 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

pyparsing Catch-22

To the developer:

1) I went to the pyparsing wiki to download the pyparsing module and
try it
2) At the wiki, there was no index entry in the table of contents for
Downloads. After searching around a bit, I finally discovered a tiny
link buried in some text at the top of the home page.
3) Link goes to sourceforge. At sourceforge, there was a nice, green
'download' button that stood out from the page.
4) I clicked on the download button and got the warning:
-----
You have selected to download the pyparsing-1.4.6 release.

Below is a list of files contained in this release.
Before downloading, you may want to read the release notes.
-----

5) Can't find any release notes, nor any button to click to download
the package.
6) Give up in frustration.
7) A few minutes later, I decide: I will not give up.
8) I go back to sourceforge and start clicking every link on the page.
(Hello, porn sites! Just kidding.) Still no luck.
9) Finally. I click on something and a download begins. I cancel it.
10) Now I know what to click on, and I download the docs and
pyparsing-1.4.6.tar
11) Now what? I'm new to mac os x, and I have no idea what to do.
The wiki is devoid of any installation instructions.
12) I give up again.

For as hard as you push pyparsing on this forum, I would think you
would make it easier to download and install your module. In my
opinion, the wiki should provide detailed installation instructions
for all supported os's, and the sourceforge downloading process is too
complicated.

Apr 16 '07 #1
13 2058
7stud wrote:
For as hard as you push pyparsing on this forum, I would think you
would make it easier to download and install your module. In my
opinion, the wiki should provide detailed installation instructions
for all supported os's, and the sourceforge downloading process is too
complicated.
FWIW, here's what works for me::

* Go to http://pyparsing.wikispaces.com/
* Click the link at the top that says "Download from SourceForge"
* Click the big green "Download Python parsing module" button
* Click the big green "Download" button next to "pyparsing-1.4.6"
* Click pyparsing-1.4.6.tar.gz
* Extract the dowloaded .tar.gz
* Use the standard python installation idiom "python setup.py install"

If you're not familiar with the standard Python installation idiom, take
a few minutes to read:

"Installing Python Modules"
http://docs.python.org/inst/inst.html

In particular it starts with "The new standard: Distutils", which tells
you to try::

python setup.py install

HTH,

STeVe
Apr 16 '07 #2
On Apr 15, 7:41 pm, Steven Bethard <steven.beth... @gmail.comwrote :
7stud wrote:
For as hard as you push pyparsing on this forum, I would think you
would make it easier to download and install your module. In my
opinion, the wiki should provide detailed installation instructions
for all supported os's, and the sourceforge downloading process is too
complicated.

FWIW, here's what works for me::

* Go tohttp://pyparsing.wikis paces.com/
* Click the link at the top that says "Download from SourceForge"
* Click the big green "Download Python parsing module" button
* Click the big green "Download" button next to "pyparsing-1.4.6"
* Click pyparsing-1.4.6.tar.gz
* Extract the dowloaded .tar.gz
* Use the standard python installation idiom "python setup.py install"

If you're not familiar with the standard Python installation idiom, take
a few minutes to read:

"Installing Python Modules"http://docs.python.org/inst/inst.html

In particular it starts with "The new standard: Distutils", which tells
you to try::

python setup.py install

HTH,

STeVe
Thanks!

I thought I would write down what I did in case someone else looks
this up:

1) Even though the download at sourceforge said the file name was:

pyparsing-1.4.6.tar.gz

it was downloaded to my Desktop as:

pyparsing-1.4.6.tar

Did os x 10.4.7 automatically unzip it for me? .gz means the file was
compressed with gzip, but I didn't have to do any unzipping.

2) Apparently, a .tar file is not a compressed file--it just organizes
a bunch of files into one big file or "archive". You still need to do
something to extract all the files from the archive. Here is the
command:

$ tar -xvf /Users/me/Desktop/pyparsing-1.4.6.tar

That command extracts the contents into the current directory(i.e. the
directory the prompt is pointing to), which can overwrite files with
the same names. So I created a directory called tar_temp:

/Users/me/tar_temp

and used the cd command to change the prompt to that directory.
(Note: the ~ prompt is shorthand for /Users/YourHomeDirName )

3) To run: python setup.py install, you need to get to the top level
directory of the download. So, I cd'ed to the directory:

~/tar_temp/pyparsing-1.4.6

and then ran the setup command:

~/tar_temp/pyparsing-1.4.6$ python setup.py install

I tested the setup by running the hello world program described in the
document:

~/tar_temp/pyparsing-1.4.6/HowToUsePyparsi ng.html

and it worked.

Apr 16 '07 #3
7stud <bb**********@y ahoo.comwrote:
1) Even though the download at sourceforge said the file name was:

pyparsing-1.4.6.tar.gz

it was downloaded to my Desktop as:

pyparsing-1.4.6.tar

Did os x 10.4.7 automatically unzip it for me? .gz means the file was
compressed with gzip, but I didn't have to do any unzipping.
You probably have Safari, the browser, set up to do that upon download
(but not set up to also untar the tarfile) -- I believe that those are
its default settings. Still, Safari's just an application, even though
Apple reasonably chooses to bundle it into the OS; you might use
Firefox, Opera, Camino, or any other browser, and the issue of what that
given browser does upon download (and how to change those settings) will
be different each time. It's not really a question at OS level, rather
it depends on each specific browser.
Alex
Apr 16 '07 #4
On Apr 15, 9:16 pm, a...@mac.com (Alex Martelli) wrote:
7stud <bbxx789_0...@y ahoo.comwrote:
1) Even though the download at sourceforge said the file name was:
pyparsing-1.4.6.tar.gz
it was downloaded to my Desktop as:
pyparsing-1.4.6.tar
Did os x 10.4.7 automatically unzip it for me? .gz means the file was
compressed with gzip, but I didn't have to do any unzipping.

You probably have Safari, the browser, set up to do that upon download
(but not set up to also untar the tarfile) -- I believe that those are
its default settings. Still, Safari's just an application, even though
Apple reasonably chooses to bundle it into the OS; you might use
Firefox, Opera, Camino, or any other browser, and the issue of what that
given browser does upon download (and how to change those settings) will
be different each time. It's not really a question at OS level, rather
it depends on each specific browser.

Alex
Thanks.

Apr 16 '07 #5
On Apr 15, 8:26 pm, "7stud" <bbxx789_0...@y ahoo.comwrote:
To the developer:

1) I went to the pyparsing wiki to download the pyparsing module and
try it
2) At the wiki, there was no index entry in the table of contents for
Downloads. After searching around a bit, I finally discovered a tiny
link buried in some text at the top of the home page.
3) Link goes to sourceforge. At sourceforge, there was a nice, green
'download' button that stood out from the page.
4) I clicked on the download button and got the warning:
-----
You have selected to download the pyparsing-1.4.6 release.

Below is a list of files contained in this release.
Before downloading, you may want to read the release notes.
-----

5) Can't find any release notes, nor any button to click to download
the package.
6) Give up in frustration.
7) A few minutes later, I decide: I will not give up.
8) I go back to sourceforge and start clicking every link on the page.
(Hello, porn sites! Just kidding.) Still no luck.
9) Finally. I click on something and a download begins. I cancel it.
10) Now I know what to click on, and I download the docs and
pyparsing-1.4.6.tar
11) Now what? I'm new to mac os x, and I have no idea what to do.
The wiki is devoid of any installation instructions.
12) I give up again.

For as hard as you push pyparsing on this forum, I would think you
would make it easier to download and install your module. In my
opinion, the wiki should provide detailed installation instructions
for all supported os's, and the sourceforge downloading process is too
complicated.
Me? Push? Boy, a guy posts a couple of examples, tries to help some
people that are stuck with a problem, and what does he get? Called
"pushy"? Sheesh! Fortunately, I get enough positive feedback from
these posts that my feelings are pretty resilient these days.

Anyway, thanks and point taken for the alert on this subject from the
newbie's perspective. When I first wrote these installations and
started the pyparsing project on SF, I was fairly newb myself - I had
to ask Dave Kuhlman to write setup.py for me! So I assumed the target
audience already knew the stuff I was having to learn. I assumed that
setup.py was just common knowledge among the Python world.

I think your suggestion of a Wiki page on this subject should fill
this gap neatly, especially since pyparsing is somewhat targetted at
the newb and near-newb user, one that is struggling with regexp's or
some other parsing technology, and just wants to get some basic code
working. The other posts in this thread contain plenty of material to
start from. Also, thanks for the Mac OS X point of view, most of my
work is on Windows, and a little bit on Linux, but absolutely none on
Mac. And I see that I should not assume knowledge of tar, either, so
I'll be sure to mention its destructive streak, in overwriting
existing files with the same name as those in the archive. Once
untar'ed, there *is* a file named README, with an introduction and
instructions to invoke setup.py properly. But there is little harm in
repeating some of this on the Wiki as well.

I'm glad to see you perservered and got pyparsing installed. You can
also run pyparsing.py itself, which will run a simple SQL parser
test. If you have not yet found the docs or examples, *please* look
over the sample code in the examples directory, and the class-level
documentation in the htmldocs directory. The docs directory should
also include the materials from my PyCon'06 presentations.

Please post back, either here or on the Pyparsing wiki discussion
pages, and let me know how your pyparsing work is progressing.

-- Paul (the developer, but you can call me "Paul")

Apr 16 '07 #6
Please take a look at the new page added to the pyparsing wiki.

-- Paul
Apr 16 '07 #7
Paul McGuire wrote:
Me? Push? Boy, a guy posts a couple of examples, tries to help some
people that are stuck with a problem, and what does he get? Called
"pushy"? Sheesh!
Hey, I never called you pushy! Ok, maybe I sounded a little harsh--I
was pretty frustrated after all. I guess I should have said something
along the lines of, "If you are going to promote pyparsing, it would
be nice to be able see what it is all about it."
Fortunately, I get enough positive feedback from
these posts that my feelings are pretty resilient these days.

Anyway, thanks and point taken for the alert on this subject from the
newbie's perspective. When I first wrote these installations and
started the pyparsing project on SF, I was fairly newb myself - I had
to ask Dave Kuhlman to write setup.py for me! So I assumed the target
audience already knew the stuff I was having to learn. I assumed that
setup.py was just common knowledge among the Python world.

I think your suggestion of a Wiki page on this subject should fill
this gap neatly, especially since pyparsing is somewhat targetted at
the newb and near-newb user, one that is struggling with regexp's or
some other parsing technology, and just wants to get some basic code
working. The other posts in this thread contain plenty of material to
start from. Also, thanks for the Mac OS X point of view, most of my
work is on Windows, and a little bit on Linux, but absolutely none on
Mac. And I see that I should not assume knowledge of tar, either, so
I'll be sure to mention its destructive streak, in overwriting
existing files with the same name as those in the archive. Once
untar'ed, there *is* a file named README, with an introduction and
instructions to invoke setup.py properly.
Iol. I read it:

---------------------
Installation
============

Do the usual:

python setup.py install

(pyparsing requires Python 2.3.2 or later.)
------------------------

Not much to go on--not even a mention of what directory you should be
in when you run that command. Plus, you need to extract the files
from the .tar file first.
>
I'm glad to see you perservered and got pyparsing installed. You can
also run pyparsing.py itself, which will run a simple SQL parser
test. If you have not yet found the docs or examples, *please* look
over the sample code in the examples directory, and the class-level
documentation in the htmldocs directory. The docs directory should
also include the materials from my PyCon'06 presentations.

Please post back, either here or on the Pyparsing wiki discussion
pages, and let me know how your pyparsing work is progressing.

-- Paul (the developer, but you can call me "Paul")
I'm pretty facile with regex's, and after looking at some pyparsing
threads over the last week or so, I was interested in trying it.
However, all of the beginning examples use a Word() in the parse
expression, but I couldn't find an adequate explanation of what the
arguments to Word() are and what they mean. I finally found the
information buried in one of the many documents--the one called
"Using the Pyparsing Module". If that seems like an obvious place to
look, I did start there, but I didn't find it at first. I also
scoured the the wiki, and I looked in the file pycon06-
IntroToPyparsin g-notes.pdf, which has this:

Basic Pyparsing
Words and Literals

Apr 16 '07 #8
On Apr 16, 2:06 am, "7stud" <bbxx789_0...@y ahoo.comwrote:
>
Hmmm. My post got cut off. Here's the rest of it:
I'm pretty facile with regex's, and after looking at some pyparsing
threads over the last week or so, I was interested in trying it.
However, all of the beginning examples use a Word() in the parse
expression, but I couldn't find an adequate explanation of what the
arguments to Word() are and what they mean. I finally found the
information buried in one of the many documents--the one called
"Using the Pyparsing Module". If that seems like an obvious place to
look, I did start there, but I didn't find it at first. I also
scoured the the wiki, and I looked in the file pycon06-
IntroToPyparsin g-notes.pdf, which has this:

------------
Basic Pyparsing
Words and Literals

Apr 16 '07 #9
Basic Pyparsing
Words and Literals

Apr 16 '07 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
2353
by: Lukas Holcik | last post by:
Hi everyone! How can I simply search text for regexps (lets say <a href="(.*?)">(.*?)</a>) and save all URLs(1) and link contents(2) in a dictionary { name : URL}? In a single pass if it could. Or how can I replace the html &entities; in a string "blablabla&amp;blablabal&amp;balbalbal" with the chars they mean using re.sub? I found out they are stored in an dict . I though about this functionality:
4
2073
by: the.theorist | last post by:
Hey, I'm trying my hand and pyparsing a log file (named l.log): FIRSTLINE PROPERTY1 DATA1 PROPERTY2 DATA2 PROPERTYS LIST ID1 data1 ID2 data2
3
1995
by: rh0dium | last post by:
Hi all, I have a file which I need to parse and I need to be able to break it down by sections. I know it's possible but I can't seem to figure this out. The sections are broken by <> with one or more keywords in the <>. What I want to do is to be able to pars a particular section of the file. So for example I need to be able to look at the SYSLIB section. Presumably the sections are
4
1588
by: Bytter | last post by:
Hi, I'm trying to construct a parser, but I'm stuck with some basic stuff... For example, I want to match the following: letter = "A"..."Z" | "a"..."z" literal = letter+ include_bool := "+" | "-" term = literal
1
2645
by: Steve | last post by:
Hi All (especially Paul McGuire!) Could you lend a hand in the grammar and paring of the output from the function win32pdhutil.ShowAllProcesses()? This is the code that I have so far (it is very clumsy at the moment) : import string
1
353
by: Neal Becker | last post by:
I'm just trying out pyparsing. I get stack overflow on my first try. Any help? #/usr/bin/python from pyparsing import Word, alphas, QuotedString, OneOrMore, delimitedList first_line = '' def main():
18
4721
by: Just Another Victim of the Ambient Morality | last post by:
Is pyparsing really a recursive descent parser? I ask this because there are grammars it can't parse that my recursive descent parser would parse, should I have written one. For instance: from pyparsing import * grammar = OneOrMore(Word(alphas)) + Literal('end') grammar.parseString('First Second Third end')
3
1719
by: hubritic | last post by:
I am trying to parse data that looks like this: IDENTIFIER TIMESTAMP T C RESOURCE_NAME DESCRIPTION 2BFA76F6 1208230607 T S SYSPROC SYSTEM SHUTDOWN BY USER A6D1BD62 1215230807 I H Firmware Event My problem is that sometimes there is a RESOURCE_NAME and sometimes not, so I wind up with "Firmware" as my RESOURCE_NAME and "Event" as
4
5277
by: Marek Kubica | last post by:
Hi, I am trying to get this stuff working, but I still fail. I have a format which consists of three elements: \d{4}M?-\d (4 numbers, optional M, dash, another number) EMPTY (the <EMPTYtoken) (the <PAGEBREAKtoken. The line may contain whitespaces, but nothing else)
5
1488
by: Paul McGuire | last post by:
I've just uploaded to SourceForge and PyPI the latest update to pyparsing, version 1.5.1. It has been a couple of months since 1.5.0 was released, and a number of bug-fixes and enhancements have accumulated in SVN, so time for a release! Here's what's new in Pyparsing 1.5.1: - Added __dir__() methods to ParseBaseException and ParseResults, to support new dir() behavior in Py2.6 and Py3.0. If dir() is called on a ParseResults object,...
0
8743
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8659
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9239
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8993
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7843
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5920
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4674
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3111
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2054
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.