title: get date and save it as a file name python
body: <p>I have some graph that I do in python.</p>
  
  <p>In the end  I save the plot to a png file.
  Here is the code:</p>
  
  <pre><code>plt.scatter(LuxCoordinates, finalPix, linewidths=1)
  plt.sca
  plt.grid(axis)
  plt.xlabel('Ambient', color='r');
  plt.ylabel('Depth Grows', color='r'); # grayscale color
  plt.title(PngName, color='b');
  savefig(PngName+'.png'); #PngName is the name of the file that the user gives in argv
  </code></pre>
  
  <p>This work good and it save me a file, name PngName.png (Where PngName is what the user decided)</p>
  
  <p>Now I want to add to that name the current date.
  I had try to do this:</p>
  
  <pre><code>date = time.strftime("%d/%m/%Y")
  plt.scatter(LuxCoordinates, finalPix, linewidths=1)
  plt.sca
  plt.grid(axis)
  plt.xlabel('Ambient', color='r');
  plt.ylabel('Depth Grows', color='r'); # grayscale color
  plt.title(PngName, color='b');
  savefig(PngName+'_'+date+'.png')
  </code></pre>
  
  <p>But it's not working, I get this error message:</p>
  
  <blockquote>
    <p>filename_or_obj = open(filename_or_obj, 'wb')
    IOError: [Errno 2] No such file or directory: '05/12/2013.png'</p>
  </blockquote>
  
  <p>You can see that the date variable get the date. (also when I'm printing it to screen I see the date)</p>
  
  <p>What is the problem and how can I solve it?</p>
  
  <p>Thanks!</p>