LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 01-20-2005, 11:30 PM   #1
JoeUser11
Member
 
Registered: Dec 2004
Location: Austin, TX
Distribution: SuSe9.3
Posts: 143

Rep: Reputation: 15
easy python code


Can anybody here give me an example of a simple python program that reads a text file (let's say /home/joeuser/ex.txt) into a string, then prints it to the screen?

I'm nearly certain I know how to do it (I've done it before), but for some reason I'm getting an error. I suspect my python libraries are screwed up.
 
Old 01-21-2005, 01:40 AM   #2
Mega Man X
LQ Guru
 
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,339

Rep: Reputation: 65
Tell us how you are doing, so we can debug it . Link:

http://www.python.org/doc/current/tu...00000000000000
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
What is wrong with this python code ? indian Programming 5 09-22-2005 02:20 PM
Getting the web page in python :: What's wrong with the code ? indian Programming 1 09-12-2005 03:17 PM
converting vb6 code to python mrobertson Programming 2 06-02-2005 01:27 PM
I need a python code that activate a button Linh Programming 0 08-20-2004 10:47 AM
Trouble Python Code Gerardoj Programming 0 11-30-2003 04:31 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:48 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration