By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,772 Members | 906 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,772 IT Pros & Developers. It's quick & easy.

Help: Is Python suitable?

P: n/a
Hi,

I have an programming assignment, and would like to try out Python.

I need to read in a simple textual language (does Python have a
scanner, and parser?), and do some processing. After that, generate
some codes in an other language. Basically, the program generates code
for another program based on some textual input.

I can do it in Java of course. However, it will be quite cumbersome.

I wonder if Python is more suitable for this kind of job?

Hope someone could enlighten me on this matter?

Thanks a lot!
Tuan Anh

P/S: I knew Java, Pascal very well. I also touch a bit on C/C++,
Scheme, SML.
Jul 18 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
On 22 Feb 2004 22:21:47 -0800, an***@hotmail.com (Tran Tuan Anh)
wrote:
I need to read in a simple textual language (does Python have a
scanner, and parser?),
Yes, it has several and a framework for building custom ones.
I wonder if Python is more suitable for this kind of job?
It can certainly do what you ask.
Hope someone could enlighten me on this matter?


If you haven't done so set asifde a few hours to whiz through the
official Python tutorial, it will be your best bet for getting up
to speed on Python.

THen check out the parser modules in the standard PYthon library
(documentation online or downloadable). Also for this kind of
thing search out David Mertz's online book "Text Processing
in Python" (or buy the paper version!)

Alan G.
Author of the Learn to Program website
http://www.freenetpages.co.uk/hp/alan.gauld
Jul 18 '05 #2

P: n/a

"Tran Tuan Anh" <an***@hotmail.com> wrote in message
news:ed**************************@posting.google.c om...
Hi,

I have an programming assignment, and would like to try out Python.

I need to read in a simple textual language (does Python have a
scanner, and parser?),


Yes. Several options have been listed and discussed here within the last 2
weeks or a month. There is also a book on text processing with Python.

tjr



Jul 18 '05 #3

P: n/a
Tran Tuan Anh wrote:
Hi,

I have an programming assignment, and would like to try out Python.

I need to read in a simple textual language (does Python have a
scanner, and parser?), and do some processing. After that, generate
some codes in an other language. Basically, the program generates code
for another program based on some textual input.


http://www.python.org/sigs/parser-sig/

Paul Prescod


Jul 18 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.