473,396 Members | 1,940 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Help: Is Python suitable?

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
3 1229
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

"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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Will Stuyvesant | last post by:
There seems to be no XML parser that can do validation in the Python Standard Libraries. And I am stuck with Python 2.1.1. until my web master upgrades (I use Python for CGI). I know pyXML has...
220
by: Brandon J. Van Every | last post by:
What's better about Ruby than Python? I'm sure there's something. What is it? This is not a troll. I'm language shopping and I want people's answers. I don't know beans about Ruby or have...
10
by: Jacek Generowicz | last post by:
Where can I find concise, clear documentation describing what one has to do in order to enable Python's internal help to be able to provide descriptions of Python keywords ? I am in a situation...
23
by: assaf__ | last post by:
Hello, I am beginning to work on a fairly large project and I'm considering to use python for most of the coding, but I need to make sure first that it is reliable enough. I need to make sure...
34
by: Maboroshi | last post by:
Hello My question has to do with python and linux - I was interested in finding out what it would take to reimplement the Linux Kernel in python basically just taking the source code from linux...
122
by: seberino | last post by:
I'm interested in knowing which Python web framework is most like Ruby on Rails. I've heard of Subway and Django. Are there other Rails clones in Python land I don't know about? Which one...
9
by: seberino | last post by:
I have been using distuils for a while and was wondering when Python Eggs (new project) is better? So basically Python Eggs precompiles and compresses binaries for you so you just have to load...
12
by: Ray | last post by:
Hello, I've got the chance to determine the technology to use in creating a product similar to this: http://www.atomicisland.com/ Now the thing is that I need to sell this to the guy with...
10
by: Ben | last post by:
This is not a troll post. I am doing research on my own too but could use your guys/gals help. As mentioned in prev thread our company is about to embark on building a large scale web based...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...

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.