Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. Me4President

    Counting files by date - filling unused dates with 0's

    Thanks a lot for your help, it has taught me a lot! By the way, I am also a geophysicist, with just over a year of experience. I have got the script doing what I want, using your method to create a list. I didn't need to know each file, just the frequency per day so I just made a list of the...
  2. Me4President

    Counting files by date - filling unused dates with 0's

    Hello, I am trying to count the number of files created per day with a given extension. I am searching a folder recursively. What I have at the moment counts the number of files per day, but does not include those days where there are no files. #!/usr/bin/env python import os, glob, time...
  3. Me4President

    Simple python problem - process strings in loops

    Thanks a million Mikrom - this is a much nicer way of doing , and I could adapt this easily for lots of other files I export... I've added a header with the date and time to the output file, and have asked user for input and output files, as well as what string to put at the start of each line...
  4. Me4President

    Simple python problem - process strings in loops

    Sorry for not realising I could actually do it... added outp.write('\n' + sipstr + " ") and outp.write(aTuple[0] + " " + aTuple[1] + " ") after the two print commands and it works great. Now making it not add a new line at the start...
  5. Me4President

    Simple python problem - process strings in loops

    Well, I solved my loop problem, and I can now get it to display exactly the format I want on screen: uinp = raw_input('input file? ') inp = open(uinp,"r") uout = raw_input('output file? ') outp = open(uout,"a") sipstr = raw_input('SIPMAP string? ') # Set counter to 0 i = 0 # iterate...
  6. Me4President

    Simple python problem - process strings in loops

    The problem: I want to enter a text file, in the format below: 3974.1399 1693.0822 1921.5103 1 3 3 event_outline 3877.0623 1658.3441 1854.6477 2 3 3 event_outline 3818.4111 1641.9969 1769.8671 2 3 3 event_outline 2461.6321 1632.2740...
  7. Me4President

    Beginner's simple program works but am sure there is a better way.

    Hi, Sorry for the long post, but I thought as much info as possible would help... I did 8 weeks of fortran77 at university last year, and was always terrible. But I have been trying to use it recently at work to automate a task, trying to format the contents of an ascii text file. I am doing it...

Part and Inventory Search

Back
Top