The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Programming Languages
> Python Programming
|
General Python question
Discuss General Python question in the Python Programming forum on Dev Shed. General Python question Python Programming forum discussing coding techniques, tips and tricks, and Zope related information. Python was designed from the ground up to be a completely object-oriented programming language.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

June 3rd, 2003, 08:09 AM
|
|
|
|
General Python question
Can Python scripts be used to manipulate text files (like Perl) and be executable in UNIX?
|

June 3rd, 2003, 09:03 AM
|
|
Contributing User
|
|
Join Date: Mar 2003
Posts: 325
Time spent in forums: 7 h 58 m 36 sec
Reputation Power: 11
|
|
|
yes.
perl is better for text manipulation than python.
Python, however is better for application development, and anything where a script over 100 lines is needed, since perl scrips over 100 lines are pretty much unreadable unless you wrote it urself.
|

June 6th, 2003, 06:03 PM
|
 |
Wacky hack
|
|
Join Date: Apr 2001
Location: London, England
Posts: 513
Time spent in forums: 1 h 38 m 37 sec
Reputation Power: 13
|
|
lazy_yogi, that's not necessarily true. If you're a good programmer, you're strict about how you lay out and comment your code, and you write clear code without too many crazy hacks, Perl is no more difficult to read than Python. It's just that Python forces you to write clear code 
|

June 6th, 2003, 07:41 PM
|
|
Contributing User
|
|
Join Date: Mar 2003
Posts: 325
Time spent in forums: 7 h 58 m 36 sec
Reputation Power: 11
|
|
[QUOTE]
If you're a good programmer, you're strict about how you lay out and comment your code, and you write clear code without too many crazy hacks, Perl is no more difficult to read than Python.It's just that Python forces you to write clear code
umm ... that's true as far as layout goes.
But, in perl there is many, MANY ways to accomplish most tasks. So when reading someone elses code, they likely did it very differently to you. Unless you know every way to do everything in perl, it's likely you'll be lost most of the time when dealing with other people's code. In python (same as ruby) there's one way to do everything, so once you see a piece of code, you kow whta it does.
Eli
|

June 7th, 2003, 11:55 AM
|
 |
Wacky hack
|
|
Join Date: Apr 2001
Location: London, England
Posts: 513
Time spent in forums: 1 h 38 m 37 sec
Reputation Power: 13
|
|
|
No, I think it applies to the code itself as well as the layout. You can write truly crazy code with lots of clever little hacks in, or you can write clear, by-the book code. So long as you write it well, it should be no harder to understand than Python.
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|