Python question (PyNoob)

A

Anonymous

I have exp with C/C++ (and a few other langs). I want to use Python to
start doing the ff:

1). Data Munging (text processing) - instead of Perl
2). Automating my build process
3). (Possibly) some web data retrieval jobs

Can anyone point me to resurces/possibly scripts that can get me up to
speed (to do these 3 things) ASAP, without having to learn the basics of
programming?
 
E

Erik Max Francis

Anonymous said:
I have exp with C/C++ (and a few other langs). I want to use Python to
start doing the ff:

1). Data Munging (text processing) - instead of Perl
2). Automating my build process
3). (Possibly) some web data retrieval jobs

Can anyone point me to resurces/possibly scripts that can get me up to
speed (to do these 3 things) ASAP, without having to learn the basics of
programming?

That isn't possible without saying what it is that you actually want done.

Besides, the point of specifically choosing Python here for such tasks
would be your ability to manipulate them and write your own. If tools
already exist that do what you need, which languages they were written
in would be completely irrelevant.
 
P

Pablo Torres

I have exp with C/C++ (and a few other langs). I want to use Python to
start doing the ff:

1). Data Munging (text processing) - instead of Perl
2). Automating my build process
3). (Possibly) some web data retrieval jobs

Can anyone point me to resurces/possibly scripts that can get me up to
speed (to do these 3 things) ASAP, without having to learn the basics of
programming?

Sure. Go here: http://www.google.com, then type all that and hit
"Google Search". That should turn up a wealth of information.

P.S You can't do all that without learning the basics of programming.
 
B

Benjamin

I have exp with C/C++ (and a few other langs). I want to use Python to
start doing the ff:

1). Data Munging (text processing) - instead of Perl
2). Automating my build process
3). (Possibly) some web data retrieval jobs

Can anyone point me to resurces/possibly scripts that can get me up to
speed (to do these 3 things) ASAP, without having to learn the basics of
programming?

I think if you've chosen Python as a language to use for these things,
you could invest some time in learning the language. It is after all
very easy to learn and you just have to do it once and many of your
programming task will be taken care of.
 
T

Terry Reedy

|I have exp with C/C++ (and a few other langs). I want to use Python to
| start doing the ff:
|
| 1). Data Munging (text processing) - instead of Perl
| 2). Automating my build process
| 3). (Possibly) some web data retrieval jobs
|
| Can anyone point me to resurces/possibly scripts that can get me up to
| speed (to do these 3 things) ASAP, without having to learn the basics of
| programming?

Your first sentence suggests that you already know the basics of
programming, so perhaps you meant something a bit different? such as not
figure out for yourself the basic idioms of Python, but learn them from
code?

In any case, item 1 seems too broad for specific help. As to item three,
there are modules and indeed programs available. Check PyPI on the Python
site, or search this newsgroup's archives (groups.google.com) or the web
generally.

tjr
 
C

Carl Banks

I have exp with C/C++ (and a few other langs). I want to use Python to
start doing the ff:

1). Data Munging (text processing) - instead of Perl
2). Automating my build process
3). (Possibly) some web data retrieval jobs

Can anyone point me to resurces/possibly scripts that can get me up to
speed (to do these 3 things) ASAP, without having to learn the basics of
programming?

You want the Python Library Reference (quod googla).

If you know the basics of programming already, any old Python tutorial
will do, so just skim through the official one (q.g.) to pick up the
syntax and semantic rules. Then refer to the Library Reference, which
is well organized and make it easy to track down what you need. The
libraries come with very good built-in support for tasks 1 and 3; for
2 Python supports timestamp checking and subprocess calling and
whatnot, but stuff like dependency trees you'll have to work out
yourself.

(BTW, if "make" is failing or annoying you, you might want to consider
SCons, which for me has been a lot more intelligent and
straightforward than make ever was.)


Carl Banks
 
C

Carl Banks

I think if you've chosen Python as a language to use for these things,
you could invest some time in learning the language. It is after all
very easy to learn and you just have to do it once and many of your
programming task will be taken care of.


I think you and several others are misunderstanding the OP: the OP
wants to learn some details of Python without having to *relearn* the
basics of programming. It's a reasonable request.


Carl Banks
 
A

Ant

1). Data Munging (text processing) - instead of Perl

Check out the re module (regexes) in the standard library, and the
pyparsing third party library: http://pyparsing.wikispaces.com/ for
more complex stuff.
2). Automating my build process

You'll want to look into the os, sys and subprocess modules. The PMOTW
this week was subprocess: http://www.oreillynet.com/onlamp/blog/2007/08/pymotw_subprocess_1.html.
A few weeks back it covered os: http://blog.doughellmann.com/2007/05/pymotw-os.html.
In fact one of Doug Hellmann's previous articles on the getopt module
may also be useful if you want your build scripts to be controlled by
command line args: http://blog.doughellmann.com/2007/08/pymotw-getopt.html
(Though I prefer optparse personally).
3). (Possibly) some web data retrieval jobs

urllib, urllib2 and cookielib in the standard library should do most
of what you want, perhaps with the addition of beautiful soup if you
need to scrape the pages for data: http://www.crummy.com/software/BeautifulSoup/

HTH.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,677
Members
48,796
Latest member
Greg L.

Latest Threads

Top