Re: PY shutil on win xp home version




Thanks Tim for resopnding,
I appreciate the help.

I convinced the client to install Linux on 4
machines rather than upgrade from xp home to XP
Pro, and more machines to come if the like it.

jim-on-linux


On Friday 20 April 2007 03:22, you wrote:
jim-on-linux wrote:
On Wednesday 18 April 2007 17:02, Tim Golden

wrote:
jim-on-linux wrote:
python help,

A client is using win xp home.

my program contains;
shutil.copyfile(n, 'prn')

This runs fine on win xp pro but they are
getting the following traceback.

File "LOP_PRT_10.pyc", line 170, in
__init__ File "LOP_PRT_10.pyc", line 188,
in Fprint1 File "shutil.pyc", line 47, in
copyfile IOError: [Errno 2] No such file or
directory: 'prn'

Since this runs ok on win xp pro, does this
have something to do with the home version
of xp.

I'm thinking of changeing 'prn' to 'lpt1'
and trying again but I don't want to use
the client as a testor. Or is there some
other explaination for the problem.

Not that this is your question, but if
you're trying to print under Windows have
you looked at:


http://tgolden.sc.sabren.com/python/win32_ho
w_d o_i/print.html

for alternatives?

TJG

Thanks for the response,

I got the following to work on windows.

win32api.ShellExecute (
0, 'print',
filename, None, ".", 0
)

However it prints the name of the file at the
top and adds a page number on the bottom. Is
there some way of eliminating the filename
and page number.

Unfortunately, this approach is quick-and-dirty
and you're at the mercy of whatever the "print"
verb does to "filename" on your box. (Although
you can configure that if you try hard enough).

I'm afraid if you want control, you'll have to
go the PDF route or to automate Word /
OpenOffice etc.

TJG
.



Relevant Pages

  • Re: VPN tunnel with XP Home on remote end cant connect to server in App Mode
    ... MSLicensing registry key, rebooted, installed VPN client (Watchguard) ... Administrator seemed to get the license properly. ... I did not config these machines prior to this so there could have been ... Pro and obviously have a valid license. ...
    (microsoft.public.win2000.termserv.clients)
  • Re: VPN tunnel with XP Home on remote end cant connect to server in App Mode
    ... I'm running Win2000 Pro on the servers. ... The only thing I can think of is that the machines that have connected ... via a VPN client rather than a tunnel prior to this. ... MCSE, CCEA, Microsoft MVP - Terminal Server ...
    (microsoft.public.win2000.termserv.clients)
  • Re: PY shutil on win xp home version
    ... A client is using win xp home. ... Since this runs ok on win xp pro, ... I got the following to work on windows. ... Is there some way of eliminating the filename and page number. ...
    (comp.lang.python)
  • Re: AD Upgrade
    ... your XP Home machines would not be able to ... participate in an Active Directory domain unless you upgrade/migrate them to ... with the installation of the Active Directory client to allow for security ... Pro across the board some time down the road if your budget will support it, ...
    (microsoft.public.win2000.general)
  • Re: PY shutil on win xp home version
    ... A client is using win xp home. ... Since this runs ok on win xp pro, ... I got the following to work on windows. ... some way of eliminating the filename and page ...
    (comp.lang.python)

Loading