python cgi script to retrieve images from a file on C:

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • TMS
    New Member
    • Sep 2006
    • 119

    #1

    python cgi script to retrieve images from a file on C:

    Suppose I want to write a Python CGI script that goes to a 'specific' file on my hard drive and retrieves images?

    How do I list the directory I want to grab from? ie: Lets say I have images in my Python directory, I want the script to grab files from:

    C: \Python25\examp les

    I only want it to search this directory, no other directories.

    Thank you for your help.

    tms
  • ilikepython
    Recognized Expert Contributor
    • Feb 2007
    • 844

    #2
    Originally posted by TMS
    Suppose I want to write a Python CGI script that goes to a 'specific' file on my hard drive and retrieves images?

    How do I list the directory I want to grab from? ie: Lets say I have images in my Python directory, I want the script to grab files from:

    C: \Python25\examp les

    I only want it to search this directory, no other directories.

    Thank you for your help.

    tms
    I think the os module might help you. It has some nice functions to change and manipulate directories.

    Comment

    • TMS
      New Member
      • Sep 2006
      • 119

      #3
      You are so right! I found everything I need right there.

      Thank you!

      Comment

      • ilikepython
        Recognized Expert Contributor
        • Feb 2007
        • 844

        #4
        Originally posted by TMS
        You are so right! I found everything I need right there.

        Thank you!
        You are very welcome.

        Comment

        Working...