Re: [python-win32] Questions regarding pypiwin32 and python 2.7

2018-05-02 Thread Mark Hammond

On 3/05/2018 9:49 am, Daniel Spisak wrote:

Mark,

      If its possible, could the wheels be published? I have an 
installer I need to update which I have to give wheels to in case of an 
offline install scenario. Thanks for the explanation of everything, 
there wasn't exactly a dearth of information I could find on what was what.


Can't you grab them directly from https://pypi.org/project/pywin32/#files ?

Mark
___
python-win32 mailing list
python-win32@python.org
https://mail.python.org/mailman/listinfo/python-win32


Re: [python-win32] Questions regarding pypiwin32 and python 2.7

2018-05-02 Thread Daniel Spisak
Mark,

 If its possible, could the wheels be published? I have an installer I
need to update which I have to give wheels to in case of an offline install
scenario. Thanks for the explanation of everything, there wasn't exactly a
dearth of information I could find on what was what.

On Wed, May 2, 2018 at 3:44 PM, Mark Hammond 
wrote:

> On 3/05/2018 6:39 am, Daniel Spisak wrote:
>
>> Hello!
>>
>> I am trying to do some updates of some systems that utilize pypiwin32 and
>> python 2.7 and I have some confusion about how to go about this. First, a
>> few things:
>>
>> What is the difference between pypiwin32 and pywin32? Is it just
>> packaging in wheel format?
>>
>
> pypiwin32 is a "fork" of pywin32 which existed purely to have support for
> pypi. @xoviat helped roll the necessary changes into pywin32 itself, so
> pypiwin32 is effectively deprecated.
>
> Why does https://urldefense.proofpoint.com/v2/url?u=https-3A__github.
>> com_Googulator_pypiwin32_releases&d=DwICaQ&c=3_5eq9zYXWRS8yw
>> qccmjfTRKM8mRLoQp6HBg1Tdb_Pc&r=_QuE6ARaq2J9IS-4FqXeU4nXe6zu
>> nMP1RyjCZUIUDMM&m=B7er2K1hsinpLm8CBJNpm1Xeej84iMQzscPOn_
>> PQRyE&s=InoyjNLOcKp1wBkpkVxBhdDqTYsq0CAsvyGHnEix8YY&e= show 220 as
>> latest, but https://urldefense.proofpoint.com/v2/url?u=https-3A__pypi.or
>> g_project_pypiwin32_-23files&d=DwICaQ&c=3_5eq9zYXWRS8ywqccm
>> jfTRKM8mRLoQp6HBg1Tdb_Pc&r=_QuE6ARaq2J9IS-4FqXeU4nXe6zunMP
>> 1RyjCZUIUDMM&m=B7er2K1hsinpLm8CBJNpm1Xeej84iMQzscPOn_PQRyE&
>> s=g4p0prP88emnLggwFbwLTAssto8zW8gBpuKWnbmPiq4&e= shows 223?
>>
>
> As part of helping the migration, pywin32 builds with wheel support were
> also added to pypiwin32, but that's unlikely to continue happening.
>
> Is that not the official repo for pypiwin32?
>>
>
> It is, but pypiwin32 isn't really official. You should move to using
> https://urldefense.proofpoint.com/v2/url?u=https-3A__pypi.py
> thon.org_pypi_pywin32&d=DwICaQ&c=3_5eq9zYXWRS8ywqccmjfTRKM8m
> RLoQp6HBg1Tdb_Pc&r=_QuE6ARaq2J9IS-4FqXeU4nXe6zunMP
> 1RyjCZUIUDMM&m=B7er2K1hsinpLm8CBJNpm1Xeej84iMQzscPOn_PQRyE&
> s=DgmRxIR3dxlfzsIyhdr5YWHhmPBEMDszDggweBo6MDY&e= which is built from
> https://urldefense.proofpoint.com/v2/url?u=https-3A__github.
> com_mhammond_pywin32&d=DwICaQ&c=3_5eq9zYXWRS8ywqccmjfTRKM8mR
> LoQp6HBg1Tdb_Pc&r=_QuE6ARaq2J9IS-4FqXeU4nXe6zunMP
> 1RyjCZUIUDMM&m=B7er2K1hsinpLm8CBJNpm1Xeej84iMQzscPOn_PQRyE&
> s=IX-sctiKG9DEKsarGfWrPOohKSvwrRIz7KkLzUrXBRA&e= - although note that the
> wheels aren't directly on github - the pywin32 release process builds both
> executable installers and wheels with the former uploaded only to github
> and the latter uploaded only to pypi. If there was a good reason to put the
> wheels directly on github, I'd be happy to also do that for future releases.
>
> HTH,
>
> Mark
>



-- 
* Daniel Spisak * | Senior Dev Ops Engineer, Synthetic
*AppDynamics*
Monitor your Apps in Production. Now.
Watch  our Video | Download
 AppDynamics for
Free
Twitter  | Facebook
 |
appdynamics.com 
___
python-win32 mailing list
python-win32@python.org
https://mail.python.org/mailman/listinfo/python-win32


Re: [python-win32] Questions regarding pypiwin32 and python 2.7

2018-05-02 Thread Mark Hammond

On 3/05/2018 6:39 am, Daniel Spisak wrote:

Hello!

I am trying to do some updates of some systems that utilize pypiwin32 
and python 2.7 and I have some confusion about how to go about this. 
First, a few things:


What is the difference between pypiwin32 and pywin32? Is it just 
packaging in wheel format?


pypiwin32 is a "fork" of pywin32 which existed purely to have support 
for pypi. @xoviat helped roll the necessary changes into pywin32 itself, 
so pypiwin32 is effectively deprecated.


Why does https://github.com/Googulator/pypiwin32/releases show 220 as 
latest, but https://pypi.org/project/pypiwin32/#files shows 223?


As part of helping the migration, pywin32 builds with wheel support were 
also added to pypiwin32, but that's unlikely to continue happening.



Is that not the official repo for pypiwin32?


It is, but pypiwin32 isn't really official. You should move to using 
https://pypi.python.org/pypi/pywin32 which is built from 
https://github.com/mhammond/pywin32 - although note that the wheels 
aren't directly on github - the pywin32 release process builds both 
executable installers and wheels with the former uploaded only to github 
and the latter uploaded only to pypi. If there was a good reason to put 
the wheels directly on github, I'd be happy to also do that for future 
releases.


HTH,

Mark
___
python-win32 mailing list
python-win32@python.org
https://mail.python.org/mailman/listinfo/python-win32


[python-win32] Questions regarding pypiwin32 and python 2.7

2018-05-02 Thread Daniel Spisak
Hello!

I am trying to do some updates of some systems that utilize pypiwin32 and
python 2.7 and I have some confusion about how to go about this. First, a
few things:

What is the difference between pypiwin32 and pywin32? Is it just packaging
in wheel format?
Why does https://github.com/Googulator/pypiwin32/releases show 220 as
latest, but https://pypi.org/project/pypiwin32/#files shows 223? Is that
not the official repo for pypiwin32?
Why is there no python 2.7 wheel for pypiwin32 223?

Thanks!


-- 
* Daniel Spisak * | Senior Dev Ops Engineer, Synthetic
*AppDynamics*
Monitor your Apps in Production. Now.
Watch  our Video | Download
 AppDynamics for
Free
Twitter  | Facebook
 |
appdynamics.com 
___
python-win32 mailing list
python-win32@python.org
https://mail.python.org/mailman/listinfo/python-win32


Re: [python-win32] Raise exception for printers

2018-05-02 Thread Tim Roberts
Schoeni, Yann wrote:
>  
>
> I’m trying to get error informations from my printer.
>
>  
>
> The job is sending from a web application, the application use the php
> function « Shell_exec » to call the python CLI and passe the arguments
> to the python script.
>
>  
>
> Anyway, I first tried to raise an exception if the printer isn’t turn
> on, but it’s harder than I thought, is there an easy way to do it ?
>
>  
>
> I tried to do it by using the command « GetPrinter » but nothing seems
> to point the power state of the printer.
>

The "Status" value tells you some of that information.  The bits are
defined here:
    https://msdn.microsoft.com/en-us/library/cc244854.aspx

Power state is a tricky thing for the system to handle.  The spooler
wants to allow you to submit print jobs even if the printer is off or
offline, because it will probably come back at some point.  I suspect
you will find PRINTER_STATUS_SERVER_OFFLINE in that case.

-- 
Tim Roberts, t...@probo.com
Providenza & Boekelheide, Inc.

___
python-win32 mailing list
python-win32@python.org
https://mail.python.org/mailman/listinfo/python-win32


[python-win32] Raise exception for printers

2018-05-02 Thread Schoeni, Yann
Hey guys,

I'm trying to get error informations from my printer.

The job is sending from a web application, the application use the php function 
« Shell_exec » to call the python CLI and passe the arguments to the python 
script.

Anyway, I first tried to raise an exception if the printer isn't turn on, but 
it's harder than I thought, is there an easy way to do it ?

I tried to do it by using the command « GetPrinter » but nothing seems to point 
the power state of the printer.

Here is a sample of my code

job = win32print.OpenPrinter(printer_name)
printer_info = win32print.GetPrinter(job, 2)
for key, value in printer_info.items() :
print (key, value)

return value :
pServerName None
pPrinterName DTC1250e Card Printer
pShareName DTC1250
pPortName USB001
pDriverName DTC1250e Card Printer
pComment
pLocation
pDevMode 
pSepFile
pPrintProcessor winprint
pDatatype RAW
pParameters
pSecurityDescriptor 
Attributes 11848
Priority 1
DefaultPriority 0
StartTime 1380
UntilTime 1380
Status 0
cJobs 18
AveragePPM 0

If someone has an idea, it would be nice.

Is there a solution to check if the ink or paper runs out ?

Thank you guys !

Meilleures salutations

Yann Schoeni
Municipalité de Moutier
Apprenti informaticien
Tél. +41 (0)32 494 11 69
Mob. +41 (0)79 827 30 86
E-mail yann.scho...@moutier.ch

___
python-win32 mailing list
python-win32@python.org
https://mail.python.org/mailman/listinfo/python-win32