Go Back   CodingForums.com > :: Server side development > Other server side languages/ issues > Python

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 01-24-2011, 04:52 AM   PM User | #1
hm25
New to the CF scene

 
Join Date: Jan 2011
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
hm25 is an unknown quantity at this point
python: obtain data from .csv file

How can I get data from file outside of the python program?
How can I read the data files and split each line of the data file it?
thanks
hm25 is offline   Reply With Quote
Old 01-24-2011, 05:26 AM   PM User | #2
oesxyl
Master Coder


 
Join Date: Dec 2007
Posts: 6,682
Thanks: 436
Thanked 890 Times in 879 Posts
oesxyl is a jewel in the roughoesxyl is a jewel in the roughoesxyl is a jewel in the rough
Quote:
Originally Posted by hm25 View Post
How can I get data from file outside of the python program?
How can I read the data files and split each line of the data file it?
thanks
http://docs.python.org/release/2.6.6/library/csv.html

best regards
oesxyl is offline   Reply With Quote
Old 01-24-2011, 06:51 AM   PM User | #3
hm25
New to the CF scene

 
Join Date: Jan 2011
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
hm25 is an unknown quantity at this point
Quote:
Originally Posted by oesxyl View Post
it is really hard to understand it.


is there any easy way to do it

thanks
hm25 is offline   Reply With Quote
Old 01-24-2011, 07:35 AM   PM User | #4
oesxyl
Master Coder


 
Join Date: Dec 2007
Posts: 6,682
Thanks: 436
Thanked 890 Times in 879 Posts
oesxyl is a jewel in the roughoesxyl is a jewel in the roughoesxyl is a jewel in the rough
Quote:
Originally Posted by hm25 View Post
it is really hard to understand it.


is there any easy way to do it

thanks
what is so hard?

best regards
oesxyl is offline   Reply With Quote
Old 01-24-2011, 10:18 AM   PM User | #5
hm25
New to the CF scene

 
Join Date: Jan 2011
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
hm25 is an unknown quantity at this point
Quote:
Originally Posted by oesxyl View Post
what is so hard?

best regards
this is first time to use programming SO.
I have the coding in python but I need to call it from .CSV file to do the function ?
hm25 is offline   Reply With Quote
Old 01-24-2011, 11:00 AM   PM User | #6
oesxyl
Master Coder


 
Join Date: Dec 2007
Posts: 6,682
Thanks: 436
Thanked 890 Times in 879 Posts
oesxyl is a jewel in the roughoesxyl is a jewel in the roughoesxyl is a jewel in the rough
Quote:
Originally Posted by hm25 View Post
this is first time to use programming SO.
I have the coding in python but I need to call it from .CSV file to do the function ?
i'm sorry but i don't understand what do you ask.

learn basic things first and take it step by step, you can't jump to this if you don't understand the rest and is no magic way, only work.

check to see what version of python do you run first then go to the tutorial for your version( there are differences between version).

http://www.python.org/doc/versions/

write and run the examples, write your own code based on what you learn, post specific question here when you have problems.

best regards
oesxyl is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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 On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:36 PM.


Advertisement
Log in to turn off these ads.