Closed Thread
Results 1 to 6 of 6

Thread: FTP File streaming

  1. #1
    chaosowns is offline Newbie
    Join Date
    Feb 2009
    Posts
    3
    Rep Power
    0

    FTP File streaming

    Hello,

    I have been asked to try to program a ftp file stream in python. Here's the complete story:

    There's a FTP server with a comma seperated file (csv) on it. A device writes log information in to the csv file whenever something log-worthy occures. This csv file is around 22 MB and keeps on growing. I want to read the latest csv entry that's gotten in to the file. So my question is:

    Is it possible to connect to the FTP server, open up a stream to the csv file and retrieve the latest data? I have to able to get a constant stream and always get the latest csv entry.

    If this is possible wont there be a conflict when the device is writing to the .csv file and i'm reading from it?

    If this isn't possible in python, do you have any idea if it is in another programming language?

    Hope i explained everything well enough.

    Thanks in advance.

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #2
    Lord Cat's Avatar
    Lord Cat is offline Newbie
    Join Date
    Feb 2009
    Location
    Somewhere but i just forgot
    Posts
    8
    Rep Power
    0

    Re: FTP File streaming

    Wait are you saying you want to Read a file thats not yours?
    Do you have any reason for looking at the file?

    Or do you own the computer that contains the file
    There are 10 kinds of people in this world,
    Those that can read binary and those who can't

  4. #3
    chaosowns is offline Newbie
    Join Date
    Feb 2009
    Posts
    3
    Rep Power
    0

    Re: FTP File streaming

    Quote Originally Posted by Lord Cat View Post
    Wait are you saying you want to Read a file thats not yours?
    Do you have any reason for looking at the file?

    Or do you own the computer that contains the file
    Thx for your reply.

    It's an FTP server where the file is stored with authorisation (of course), i got the username and pass to make a ftp connection.

    Let me explain again:
    Say you have a device somewhere in a network that logs every handling it does in a file. That file is downloadable by using FTP. I have to check if something odd happens to the device by checking the log file. If i would download the entire log file everytime to check if something has happened my process will be slow and inefficient because the log file is big. So if possible i would want to open a stream to the file and get the latest log information. But i dont know if it's possible in python...i hope so.

  5. #4
    Lord Cat's Avatar
    Lord Cat is offline Newbie
    Join Date
    Feb 2009
    Location
    Somewhere but i just forgot
    Posts
    8
    Rep Power
    0

    Re: FTP File streaming

    Oh...Well would it be possible for the file you need to see have set dates on it everytime it logs something you like a date stamp then you can just recall the date and it will only give you that part...If its something like that then you should be able to do something like with python but as the thing says i'm a newbie and have only been learning for the past few months
    There are 10 kinds of people in this world,
    Those that can read binary and those who can't

  6. #5
    chaosowns is offline Newbie
    Join Date
    Feb 2009
    Posts
    3
    Rep Power
    0

    Re: FTP File streaming

    Quote Originally Posted by Lord Cat View Post
    Oh...Well would it be possible for the file you need to see have set dates on it everytime it logs something you like a date stamp then you can just recall the date and it will only give you that part...If its something like that then you should be able to do something like with python but as the thing says i'm a newbie and have only been learning for the past few months
    The csv file has dates in it, every csv entry starts with a date and then some log info. You have any idea how i will get only a specific part out of the file in python?

  7. #6
    TkTech's Avatar
    TkTech is offline The Crazy One
    Join Date
    Jun 2006
    Location
    Canada
    Posts
    1,412
    Blog Entries
    1
    Rep Power
    31

    Re: FTP File streaming

    The FTP protocol does not support resuming a file transfer from a set position. It supports RESTART, but it'll only work within the same session as the initial download. There may be some extension I don't know about.

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Which is best for file streaming, Flash or Silverlight?
    By streamer in forum PHP Development
    Replies: 5
    Last Post: 10-30-2011, 04:53 PM
  2. Streaming webcam with html5
    By pierrehs in forum HTML Programming
    Replies: 1
    Last Post: 03-05-2011, 08:23 PM
  3. Streaming XML Data
    By PGP_Protector in forum C# Programming
    Replies: 1
    Last Post: 07-18-2010, 12:59 PM
  4. streaming files
    By tootypegs in forum C and C++
    Replies: 1
    Last Post: 01-04-2008, 10:14 AM
  5. OutOfMemoryException thrown when streaming an XML to a file
    By OthelloNYC in forum Visual Basic Programming
    Replies: 10
    Last Post: 08-03-2007, 12:17 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts