0

I've got a problem printing.

I'm using the win32 API:

win32api.ShellExecute (0, "print", myfile, None, ".", 0)

This works just fine if I don't run Django through apache but when I use apache it doesn't work. I don't get an error just nothing in the print queue.

Can you help me? thanks

Rob
  • 4,927
  • 12
  • 49
  • 54
blackat
  • 23
  • 1
  • 5

1 Answers1

0

I am having the same problem. In searching for a solution, in addition to this question, I found this Google groups forum post that may have a solution: https://groups.google.com/forum/#!topic/modwsgi/-nLeLe7ydtk

It links to a decent explanation of the problem: http://psycopg.lighthouseapp.com/projects/62710/tickets/20#ticket-20-6

I was about to try the solution described in the Google forum post, but decided that since the code that is failing to load isn't needed in Django, I'd make it not load if it's being loaded from Django:

import os
django_instance = 'DJANGO_SETTINGS_MODULE' in os.environ
if not django_instance:
    import my_modules, that_are_not, loading

Hope that helps!

hlongmore
  • 1,603
  • 24
  • 28