Python Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesPython Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old October 24th, 2003, 03:34 PM
Infinite_Knight Infinite_Knight is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 10 Infinite_Knight User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question Python module or code

I have this program that will convert .txt or any word extention document file into what ever a user wants (no matter how outrageous they want to change it to). The problem is that my programing limmit has been reched and I need help in a module or if anyone knows an actual raw code that will make this work ....and if it can be defined in the code by the def command thats cool to ....this is bugging the hell outa me 0_o

I just know it has to be something simple, but I just can't see the code in this prog I'm making.Anywho in the end its has to look sorta like this :
------------------------------------------------------
=====================
Data Format Converter
---------------------

Enter the name of the data file to convert:

file.dat

Enter a file name for the converted data:

weather.new

Processing file ... done.
------------------------------------------------------

Well the ya go nothing hard in output but the processing is hell I just can't wrap my mind around it.

Reply With Quote
  #2  
Old October 24th, 2003, 04:46 PM
irishtek irishtek is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Location: Tucson AZ
Posts: 29 irishtek User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to irishtek Send a message via AIM to irishtek Send a message via Yahoo to irishtek
Quick question...
Are you wanting to take, as an example, word.doc and convert it to word.new and expect word.new to open in Word? just like the word.doc did?
Or are you trying to take a Word.doc and convert it to Word.txt and expect to see the contents in plain text (minus the word formatting)?

Reply With Quote
  #3  
Old October 24th, 2003, 05:09 PM
Infinite_Knight Infinite_Knight is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 10 Infinite_Knight User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Smile

I am just going to gange the extention to the file thats all the user after the prog has runned can open it and thake a look basic ly its just canging a file.txt in what ever the user wants like file.txt into file.fla....any three leter or number extention ^_^

Reply With Quote
  #4  
Old October 24th, 2003, 05:11 PM
Infinite_Knight Infinite_Knight is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 10 Infinite_Knight User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
opps spelling messed :P "changed* insted of ganged" =P

Reply With Quote
  #5  
Old October 24th, 2003, 05:13 PM
Infinite_Knight Infinite_Knight is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 10 Infinite_Knight User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
blaaa im too tired :P lets try this agian:

I am just going to change the extention to the file....thats all the user dose, after the prog has runned the user can open the file and take a look. Basicly its just changing a file.txt in what ever the user wants like file.txt into file.fla....any three leter or number extention ^_^

Reply With Quote
  #6  
Old October 24th, 2003, 05:17 PM
irishtek irishtek is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Location: Tucson AZ
Posts: 29 irishtek User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to irishtek Send a message via AIM to irishtek Send a message via Yahoo to irishtek
Try using the shutil module http://www.python.org/doc/current/l...ule-shutil.html.

There is another thread already about renaming files you can look for some coding ideas.

Reply With Quote
  #7  
Old October 24th, 2003, 05:29 PM
Infinite_Knight Infinite_Knight is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 10 Infinite_Knight User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
wahoo...this is what I was looking for for some reason I couldn't see it on python's website :/...... now to see if this really works 0_o *hopes hopes hopes* =P

Reply With Quote
  #8  
Old October 24th, 2003, 05:33 PM
Scorpions4ever's Avatar
Scorpions4ever Scorpions4ever is offline
Banned ;)
Dev Shed God 5th Plane (7000 - 7499 posts)
 
Join Date: Nov 2001
Location: Glendale, Los Angeles County, California, USA
Posts: 7,442 Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level) 
Time spent in forums: 1 Month 1 h 51 m 47 sec
Reputation Power: 797
os.rename()
__________________
Up the Irons
What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
"Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
Down with Sharon Osbourne

Puzzle of the Month solved by sizeablegrin, etienne141 and L7Sqr, superior C/C++ programmers of the month

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPython Programming > Python module or code


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway