From pacopyc at gmail.com Thu Apr 1 15:43:15 2010 From: pacopyc at gmail.com (pacopyc) Date: Thu, 01 Apr 2010 15:43:15 +0200 Subject: [python-win32] win32net.NetGroupGetUsers PROBLEMS Message-ID: <4BB4A2F3.60800@gmail.com> Hi, I'm trying pywin32 code on http://www.koders.com/python/fid0A9817CC3BE77569E22AF2152A0B96C5F88268C8.aspx?s=shell_notifyicon. I'd like enumerates all the domain groups (and users for each group). It works very good for all groups, except DOMAIN USERS group. Function win32net.NetGroupGetUsers return not correct users number for DOMAIN USERS group, because add number of PC clients to 89 (on my server users of this group are 89). I can't understand, can you help me? Thank you very much From mail at timgolden.me.uk Thu Apr 1 17:56:58 2010 From: mail at timgolden.me.uk (Tim Golden) Date: Thu, 01 Apr 2010 16:56:58 +0100 Subject: [python-win32] win32net.NetGroupGetUsers PROBLEMS In-Reply-To: <4BB4A2F3.60800@gmail.com> References: <4BB4A2F3.60800@gmail.com> Message-ID: <4BB4C24A.7090806@timgolden.me.uk> On 01/04/2010 14:43, pacopyc wrote: > Hi, I'm trying pywin32 code on > http://www.koders.com/python/fid0A9817CC3BE77569E22AF2152A0B96C5F88268C8.aspx?s=shell_notifyicon. > I'd like enumerates all the domain groups (and users for each group). It > works very good for all groups, except DOMAIN USERS group. Function > win32net.NetGroupGetUsers return not correct users number for DOMAIN > USERS group, because add number of PC clients to 89 (on my server users > of this group are 89). I can't understand, can you help me? Almost certainly because of this: http://support.microsoft.com/default.aspx?scid=kb;en-us;275523 TJG From duke_n at o2.pl Thu Apr 1 18:57:30 2010 From: duke_n at o2.pl (dukE) Date: Thu, 01 Apr 2010 18:57:30 +0200 Subject: [python-win32] sending mail and "From" field Message-ID: <4BB4D07A.5010300@o2.pl> Hi guys, I'm using win32com.client, microsoft outlook and Mapi session. Eerything's fine, but i can't send message as someone else. I mean there's no option to fill "From" field. When i use Outlook there's such field and I'm wondering how can i fill it. Thx for any suggestions From timr at probo.com Thu Apr 1 19:16:41 2010 From: timr at probo.com (Tim Roberts) Date: Thu, 01 Apr 2010 10:16:41 -0700 Subject: [python-win32] sending mail and "From" field In-Reply-To: <4BB4D07A.5010300@o2.pl> References: <4BB4D07A.5010300@o2.pl> Message-ID: <4BB4D4F9.90704@probo.com> dukE wrote: > > I'm using win32com.client, microsoft outlook and Mapi session. > Eerything's fine, but i can't send message as someone else. I mean > there's no option to fill "From" field. When i use Outlook there's > such field and I'm wondering how can i fill it. Outlook does NOT allow you to fill in the "From" field arbitrarily. Outlook allows you to set up different personalities ("mail accounts"), and you can specify which personality to use when you create a message. MAPI is an extremely limited API. It uses whatever the default personality is in the Outlook session it hooks up to. You can't override it. It is, in part, an anti-spam measure. -- Tim Roberts, timr at probo.com Providenza & Boekelheide, Inc. From janssen at parc.com Sat Apr 3 03:13:53 2010 From: janssen at parc.com (Bill Janssen) Date: Fri, 2 Apr 2010 18:13:53 PDT Subject: [python-win32] MSI installer or zip file for pywin32? Message-ID: <82353.1270257233@parc.com> Howdy, all. I'm writing a build script for UpLib on Windows with msys, and I'd like to find some way of installing the Python win32 extensions without running the old-style installer it currently comes with. Ideally, I'd like to just unpack the code and DLLs in my install directory, for later installation by my UpLib MSI installer. Is there any easy way to create such a simple package -- an MSI installer, or perhaps a tar or zip file? I'm working with Python 2.6 and MinGW/msys on Windows XP. Looking through pywin32_postinstall.py, I don't think I'll need most of it -- my python is captive under the UpLib directory, and only used by UpLib. I'd prefer not to install the pywin32 dlls in the C:\Windows\SYSTEM32 folder if possible; I'll just put them with the other UpLib DLLs. I won't need "fixup_dbi()". No shortcuts. Bill From planders at gmail.com Sat Apr 3 03:35:39 2010 From: planders at gmail.com (Preston Landers) Date: Fri, 2 Apr 2010 20:35:39 -0500 Subject: [python-win32] MSI installer or zip file for pywin32? In-Reply-To: <82353.1270257233@parc.com> References: <82353.1270257233@parc.com> Message-ID: You can run unzip on the official exe installer to get a directory structure that you can copy into your build. The pywin32_postinstall.py stuff is separated out in the arhcive, and does need to be run to enable all features. Depending on what you're doing you might be able to skip all or most of it. As far as the system DLLs, last time I checked they do have to be in the system32 directory (or the wow64 version.) But I could be wrong - I didn't play with that very much. If it works without installing system DLLs I'd be curious to know. regards, -Preston On Fri, Apr 2, 2010 at 8:13 PM, Bill Janssen wrote: > Howdy, all. I'm writing a build script for UpLib on Windows with msys, > and I'd like to find some way of installing the Python win32 extensions > without running the old-style installer it currently comes with. > Ideally, I'd like to just unpack the code and DLLs in my install > directory, for later installation by my UpLib MSI installer. Is there > any easy way to create such a simple package -- an MSI installer, or > perhaps a tar or zip file? I'm working with Python 2.6 and MinGW/msys > on Windows XP. > > Looking through pywin32_postinstall.py, I don't think I'll need most of > it -- my python is captive under the UpLib directory, and only used by > UpLib. I'd prefer not to install the pywin32 dlls in the > C:\Windows\SYSTEM32 folder if possible; I'll just put them with the > other UpLib DLLs. I won't need "fixup_dbi()". No shortcuts. > > Bill > _______________________________________________ > python-win32 mailing list > python-win32 at python.org > http://mail.python.org/mailman/listinfo/python-win32 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From janssen at parc.com Sat Apr 3 05:11:01 2010 From: janssen at parc.com (Bill Janssen) Date: Fri, 2 Apr 2010 20:11:01 PDT Subject: [python-win32] MSI installer or zip file for pywin32? In-Reply-To: References: <82353.1270257233@parc.com> Message-ID: <86533.1270264261@parc.com> Preston Landers wrote: > You can run unzip on the official exe installer to get a directory structure > that you can copy into your build. I had no idea one could do that! Thanks. > The pywin32_postinstall.py stuff is > separated out in the arhcive, and does need to be run to enable all > features. Depending on what you're doing you might be able to skip all or > most of it. Most of it looks skippable, as I'm installing a "hidden" python. > As far as the system DLLs, last time I checked they do have to > be in the system32 directory (or the wow64 version.) But I could be wrong - > I didn't play with that very much. If it works without installing system > DLLs I'd be curious to know. Me, too. I'm guessing you need to do this, to be able to have things like windows services find them. But I'd sure like confirmation of that. I'm planning to incorporate what's necessary in the post-install for my package. Bill From mc at mclaveau.com Sun Apr 4 08:27:24 2010 From: mc at mclaveau.com (Michel Claveau) Date: Sun, 4 Apr 2010 08:27:24 +0200 Subject: [python-win32] mini-PyWiG Message-ID: <6FF2727B11B24DEB9996E36B03CE625C@MCI1330> Hello! I am pleased to tell you about the preview of Mini-PyWiG. Mini-PyWiG is a minimalist GUI based on Pywin32. Mini-PyWiG not trying to be complete but rather to provide the minimum necessary. There is no documentation, but simple and understandable examples. Note that comments are in franglais (mix of French and English). That here: http://mclaveau.com/python _____________________________________________ Bonjour ! J'ai le plaisir de vous parler de la seconde pr?version de mini-PyWiG. mini-PyWiG est un GUI minimaliste bas? sur Pywin32. mini-PyWiG ne cherche pas ? ?tre complet, mais plut?t ? offrir le minimum n?cessaire. Il n'y a pas de documentation, mais des exemples simples ? comprendre. Notez que les commentaires sont en franglais. C'est l? : http://mclaveau.com/python @-salutations -- Michel Claveau From christophedeze at wanadoo.fr Mon Apr 5 10:14:15 2010 From: christophedeze at wanadoo.fr (Christophe Deze) Date: Mon, 05 Apr 2010 10:14:15 +0200 Subject: [python-win32] mini-PyWiG In-Reply-To: <6FF2727B11B24DEB9996E36B03CE625C@MCI1330> References: <6FF2727B11B24DEB9996E36B03CE625C@MCI1330> Message-ID: <4BB99BD7.8050101@wanadoo.fr> hi/bonjour It misses screenshot .. thanks Le 04/04/2010 08:27, Michel Claveau a ?crit : > > Hello! > > I am pleased to tell you about the preview of Mini-PyWiG. > > Mini-PyWiG is a minimalist GUI based on Pywin32. > > Mini-PyWiG not trying to be complete but rather to > provide the minimum necessary. > > There is no documentation, but simple and understandable > examples. Note that comments are in franglais > (mix of French and English). > > That here: http://mclaveau.com/python > > _____________________________________________ > > Bonjour ! > > J'ai le plaisir de vous parler de la seconde pr?version de mini-PyWiG. > > mini-PyWiG est un GUI minimaliste bas? sur Pywin32. > > mini-PyWiG ne cherche pas ? ?tre complet, mais plut?t ? > offrir le minimum n?cessaire. > > Il n'y a pas de documentation, mais des exemples simples > ? comprendre. Notez que les commentaires sont en franglais. > > C'est l? : http://mclaveau.com/python > > > > > @-salutations From skippy.hammond at gmail.com Tue Apr 6 04:33:49 2010 From: skippy.hammond at gmail.com (Mark Hammond) Date: Tue, 06 Apr 2010 12:33:49 +1000 Subject: [python-win32] MSI installer or zip file for pywin32? In-Reply-To: <86533.1270264261@parc.com> References: <82353.1270257233@parc.com> <86533.1270264261@parc.com> Message-ID: <4BBA9D8D.7060608@gmail.com> On 3/04/2010 2:11 PM, Bill Janssen wrote: > Preston Landers wrote: > >> You can run unzip on the official exe installer to get a directory structure >> that you can copy into your build. > > I had no idea one could do that! Thanks. Yeah - that is all the standard installer does anyway :) >> The pywin32_postinstall.py stuff is >> separated out in the arhcive, and does need to be run to enable all >> features. Depending on what you're doing you might be able to skip all or >> most of it. > > Most of it looks skippable, as I'm installing a "hidden" python. I'd be happy to have the post install script support a --private or similar option to do the right thing in these cases. >> As far as the system DLLs, last time I checked they do have to >> be in the system32 directory (or the wow64 version.) But I could be wrong - >> I didn't play with that very much. If it works without installing system >> DLLs I'd be curious to know. > > Me, too. I'm guessing you need to do this, to be able to have things > like windows services find them. But I'd sure like confirmation of that. > I'm planning to incorporate what's necessary in the post-install for my > package. That's correct - stuff like services and COM requires the DLLs in system32 - however, you can probably see in the post-install script that if the user selects to install Python itself "just for me" then pywin32 doesn't try and copy to system32 etc - if Python itself doesn't have its DLL in system32, pywin32 can't work in those embedded contexts regardless of what it tries to do... HTH, Mark From janssen at parc.com Tue Apr 6 08:28:22 2010 From: janssen at parc.com (Bill Janssen) Date: Mon, 5 Apr 2010 23:28:22 PDT Subject: [python-win32] MSI installer or zip file for pywin32? In-Reply-To: <4BBA9D8D.7060608@gmail.com> References: <82353.1270257233@parc.com> <86533.1270264261@parc.com> <4BBA9D8D.7060608@gmail.com> Message-ID: <38819.1270535302@parc.com> Mark Hammond wrote: > >> As far as the system DLLs, last time I checked they do have to > >> be in the system32 directory (or the wow64 version.) But I could be wrong - > >> I didn't play with that very much. If it works without installing system > >> DLLs I'd be curious to know. > > > > Me, too. I'm guessing you need to do this, to be able to have things > > like windows services find them. But I'd sure like confirmation of that. > > I'm planning to incorporate what's necessary in the post-install for my > > package. > > That's correct - stuff like services and COM requires the DLLs in > system32 - however, you can probably see in the post-install script that > if the user selects to install Python itself "just for me" then pywin32 > doesn't try and copy to system32 etc - if Python itself doesn't have its > DLL in system32, pywin32 can't work in those embedded contexts > regardless of what it tries to do... Mark, my system is a dozen or so Python programs plus a few Windows services implemented in Python. If I set those up to hack the "Path" environment variable appropriately before importing stuff, could I put the three DLLs somewhere else instead of C:\WINDOWS\System32\? Bill From mhammond at skippinet.com.au Tue Apr 6 08:31:02 2010 From: mhammond at skippinet.com.au (Mark Hammond) Date: Tue, 06 Apr 2010 16:31:02 +1000 Subject: [python-win32] MSI installer or zip file for pywin32? In-Reply-To: <38819.1270535302@parc.com> References: <82353.1270257233@parc.com> <86533.1270264261@parc.com> <4BBA9D8D.7060608@gmail.com> <38819.1270535302@parc.com> Message-ID: <4BBAD526.9040503@skippinet.com.au> On 6/04/2010 4:28 PM, Bill Janssen wrote: > Mark, my system is a dozen or so Python programs plus a few Windows > services implemented in Python. If I set those up to hack the "Path" > environment variable appropriately before importing stuff, could I put > the three DLLs somewhere else instead of C:\WINDOWS\System32\? That might work - although the service could be problematic; this is started by windows itself, so you don't really get the opportunity to modify the environment before it starts. py2exe would be another option - this has full support for services. HTH, Mark From skippy.hammond at gmail.com Tue Apr 6 09:14:33 2010 From: skippy.hammond at gmail.com (Mark Hammond) Date: Tue, 06 Apr 2010 17:14:33 +1000 Subject: [python-win32] MSI installer or zip file for pywin32? In-Reply-To: <4BBAD526.9040503@skippinet.com.au> References: <82353.1270257233@parc.com> <86533.1270264261@parc.com> <4BBA9D8D.7060608@gmail.com> <38819.1270535302@parc.com> <4BBAD526.9040503@skippinet.com.au> Message-ID: <4BBADF59.4010201@gmail.com> On 6/04/2010 4:31 PM, Mark Hammond wrote: > On 6/04/2010 4:28 PM, Bill Janssen wrote: >> Mark, my system is a dozen or so Python programs plus a few Windows >> services implemented in Python. If I set those up to hack the "Path" >> environment variable appropriately before importing stuff, could I put >> the three DLLs somewhere else instead of C:\WINDOWS\System32\? > > That might work - although the service could be problematic; this is > started by windows itself, so you don't really get the opportunity to > modify the environment before it starts. Oops - I missed the point here - you aren't asking about modifying the environment before the process starts, but instead after it starts and before it imports the pywin32 modules. However, there is still likely to be a problem; the service support depends on a couple of pywin32 modules to bootstrap its world, so by the time your first line of code gets executed, pywintypes, win32service etc will have been loaded (or fatally failed to load) Cheers, Mark From lin_2008 at live.cn Tue Apr 6 09:56:53 2010 From: lin_2008 at live.cn (lin_2008) Date: Tue, 6 Apr 2010 00:56:53 -0700 (PDT) Subject: [python-win32] win32net.NetGroupGetUsers PROBLEMS In-Reply-To: <4BB4A2F3.60800@gmail.com> References: <4BB4A2F3.60800@gmail.com> Message-ID: <28148514.post@talk.nabble.com> Yellow stone diesel parts plant is one of the leading manufacturers of engine parts, in particular diesel fuel injection system accessories for replacement, such as Fuel injection Nozzle, Plunger and Delivery valve, ETC In south of china . for more detail please visit our website : www.yellowstonediesel.com www.dieselinjection.cn Yellow stone diesel parts plant was founded in 1997.Over the years, Yellow stone has grown and gained a reputation for producing high quality products and delivering them on time. 105015-5860 105015-5860 105015-5940 0 433 171 134 0 433 171 137 0 433 171 146 5611065 H60S30A538 5611650 BDL110S6133 5611735 BDL110S6267 6801082 6801082 6801087 6801087 6801088 6801088 DN10PDN130 DN0PDN121 HL176S27D525P2 2418455518 2455-518 2418455714 2455-714 9401087506 9087-506 134151-4120 P121 134151-4920 P129 134151-6420 P143 NOZZLE DENSO 093400-7690 DN10PDN129 NOZZLE DENSO 093400-7700 DN10PDN130 -- View this message in context: http://old.nabble.com/win32net.NetGroupGetUsers-PROBLEMS-tp28108926p28148514.html Sent from the Python - python-win32 mailing list archive at Nabble.com. From lin_2008 at live.cn Tue Apr 6 09:57:42 2010 From: lin_2008 at live.cn (lin_2008) Date: Tue, 6 Apr 2010 00:57:42 -0700 (PDT) Subject: [python-win32] help writing text to a windows edit control In-Reply-To: References: Message-ID: <28148525.post@talk.nabble.com> Yellow stone diesel parts plant is one of the leading manufacturers of engine parts, in particular diesel fuel injection system accessories for replacement, such as Fuel injection Nozzle, Plunger and Delivery valve, ETC In south of china . for more detail please visit our website : www.yellowstonediesel.com www.dieselinjection.cn Yellow stone diesel parts plant was founded in 1997.Over the years, Yellow stone has grown and gained a reputation for producing high quality products and delivering them on time. 105015-5860 105015-5860 105015-5940 0 433 171 134 0 433 171 137 0 433 171 146 5611065 H60S30A538 5611650 BDL110S6133 5611735 BDL110S6267 6801082 6801082 6801087 6801087 6801088 6801088 DN10PDN130 DN0PDN121 HL176S27D525P2 2418455518 2455-518 2418455714 2455-714 9401087506 9087-506 134151-4120 P121 134151-4920 P129 134151-6420 P143 NOZZLE DENSO 093400-7690 DN10PDN129 NOZZLE DENSO 093400-7700 DN10PDN130 -- View this message in context: http://old.nabble.com/help-writing-text-to-a-windows-edit-control-tp28015250p28148525.html Sent from the Python - python-win32 mailing list archive at Nabble.com. From lin_2008 at live.cn Tue Apr 6 09:58:30 2010 From: lin_2008 at live.cn (lin_2008) Date: Tue, 6 Apr 2010 00:58:30 -0700 (PDT) Subject: [python-win32] Pywin32+MFC Ok on 7 & Vista, bad on XP In-Reply-To: <40B61BF7B96A414C9B81E305AABF4D63@MCI1330> References: <40B61BF7B96A414C9B81E305AABF4D63@MCI1330> Message-ID: <28148533.post@talk.nabble.com> Yellow stone diesel parts plant is one of the leading manufacturers of engine parts, in particular diesel fuel injection system accessories for replacement, such as Fuel injection Nozzle, Plunger and Delivery valve, ETC In south of china . for more detail please visit our website : www.yellowstonediesel.com www.dieselinjection.cn Yellow stone diesel parts plant was founded in 1997.Over the years, Yellow stone has grown and gained a reputation for producing high quality products and delivering them on time. 105015-5860 105015-5860 105015-5940 0 433 171 134 0 433 171 137 0 433 171 146 5611065 H60S30A538 5611650 BDL110S6133 5611735 BDL110S6267 6801082 6801082 6801087 6801087 6801088 6801088 DN10PDN130 DN0PDN121 HL176S27D525P2 2418455518 2455-518 2418455714 2455-714 9401087506 9087-506 134151-4120 P121 134151-4920 P129 134151-6420 P143 NOZZLE DENSO 093400-7690 DN10PDN129 NOZZLE DENSO 093400-7700 DN10PDN130 -- View this message in context: http://old.nabble.com/Pywin32%2BMFC-Ok-on-7---Vista%2C-bad-on-XP-tp28055250p28148533.html Sent from the Python - python-win32 mailing list archive at Nabble.com. From lin_2008 at live.cn Tue Apr 6 09:59:43 2010 From: lin_2008 at live.cn (lin_2008) Date: Tue, 6 Apr 2010 00:59:43 -0700 (PDT) Subject: [python-win32] Pywin32-Excel Range/Cells problems In-Reply-To: <4B9E1128.30306@apli-agipa.com> References: <4B9E1128.30306@apli-agipa.com> Message-ID: <28148544.post@talk.nabble.com> Yellow stone diesel parts plant is one of the leading manufacturers of engine parts, in particular diesel fuel injection system accessories for replacement, such as Fuel injection Nozzle, Plunger and Delivery valve, ETC In south of china . for more detail please visit our website : www.yellowstonediesel.com www.dieselinjection.cn Yellow stone diesel parts plant was founded in 1997.Over the years, Yellow stone has grown and gained a reputation for producing high quality products and delivering them on time. 105015-5860 105015-5860 105015-5940 0 433 171 134 0 433 171 137 0 433 171 146 5611065 H60S30A538 5611650 BDL110S6133 5611735 BDL110S6267 6801082 6801082 6801087 6801087 6801088 6801088 DN10PDN130 DN0PDN121 HL176S27D525P2 2418455518 2455-518 2418455714 2455-714 9401087506 9087-506 134151-4120 P121 134151-4920 P129 134151-6420 P143 NOZZLE DENSO 093400-7690 DN10PDN129 NOZZLE DENSO 093400-7700 DN10PDN130 -- View this message in context: http://old.nabble.com/Pywin32-Excel-Range-Cells-problems-tp27903061p28148544.html Sent from the Python - python-win32 mailing list archive at Nabble.com. From lin_2008 at live.cn Tue Apr 6 10:00:34 2010 From: lin_2008 at live.cn (lin_2008) Date: Tue, 6 Apr 2010 01:00:34 -0700 (PDT) Subject: [python-win32] cde Outlook 2007 rules and python In-Reply-To: <20100303105841.09fb63ea@silvertop> References: <20100303105841.09fb63ea@silvertop> Message-ID: <28148549.post@talk.nabble.com> Yellow stone diesel parts plant is one of the leading manufacturers of engine parts, in particular diesel fuel injection system accessories for replacement, such as Fuel injection Nozzle, Plunger and Delivery valve, ETC In south of china . for more detail please visit our website : www.yellowstonediesel.com www.dieselinjection.cn Yellow stone diesel parts plant was founded in 1997.Over the years, Yellow stone has grown and gained a reputation for producing high quality products and delivering them on time. 105015-5860 105015-5860 105015-5940 0 433 171 134 0 433 171 137 0 433 171 146 5611065 H60S30A538 5611650 BDL110S6133 5611735 BDL110S6267 6801082 6801082 6801087 6801087 6801088 6801088 DN10PDN130 DN0PDN121 HL176S27D525P2 2418455518 2455-518 2418455714 2455-714 9401087506 9087-506 134151-4120 P121 134151-4920 P129 134151-6420 P143 NOZZLE DENSO 093400-7690 DN10PDN129 NOZZLE DENSO 093400-7700 DN10PDN130 -- View this message in context: http://old.nabble.com/cde-Outlook-2007-rules-and-python-tp27766255p28148549.html Sent from the Python - python-win32 mailing list archive at Nabble.com. From lin_2008 at live.cn Tue Apr 6 10:02:04 2010 From: lin_2008 at live.cn (lin_2008) Date: Tue, 6 Apr 2010 01:02:04 -0700 (PDT) Subject: [python-win32] Finding the physical USBSTOR disk size In-Reply-To: <4BA7581F.9070001@timgolden.me.uk> References: <5804327.141268994638188.JavaMail.chris@jesse1c-laptop> <4BA741ED.2000600@timgolden.me.uk> <14268785.71269258081593.JavaMail.chris@jesse1c-laptop> <4BA7581F.9070001@timgolden.me.uk> Message-ID: <28148560.post@talk.nabble.com> Yellow stone diesel parts plant is one of the leading manufacturers of engine parts, in particular diesel fuel injection system accessories for replacement, such as Fuel injection Nozzle, Plunger and Delivery valve, ETC In south of china . for more detail please visit our website : www.yellowstonediesel.com www.dieselinjection.cn Yellow stone diesel parts plant was founded in 1997.Over the years, Yellow stone has grown and gained a reputation for producing high quality products and delivering them on time. 105015-5860 105015-5860 105015-5940 0 433 171 134 0 433 171 137 0 433 171 146 5611065 H60S30A538 5611650 BDL110S6133 5611735 BDL110S6267 6801082 6801082 6801087 6801087 6801088 6801088 DN10PDN130 DN0PDN121 HL176S27D525P2 2418455518 2455-518 2418455714 2455-714 9401087506 9087-506 134151-4120 P121 134151-4920 P129 134151-6420 P143 NOZZLE DENSO 093400-7690 DN10PDN129 NOZZLE DENSO 093400-7700 DN10PDN130 -- View this message in context: http://old.nabble.com/Finding-the-physical-USBSTOR-disk-size-tp27957022p28148560.html Sent from the Python - python-win32 mailing list archive at Nabble.com. From mhammond at skippinet.com.au Tue Apr 6 14:03:41 2010 From: mhammond at skippinet.com.au (Mark Hammond) Date: Tue, 06 Apr 2010 22:03:41 +1000 Subject: [python-win32] recent spam Message-ID: <4BBB231D.7020701@skippinet.com.au> You probably noticed some recent spam from lin_2008 - sadly that was my fault - the messages were pending moderation, but as they were replies to legitimate mailing-list messages, I was fooled into approving them. Sneaky! Sorry 'bout that... Mark From janssen at parc.com Tue Apr 6 22:13:32 2010 From: janssen at parc.com (Bill Janssen) Date: Tue, 6 Apr 2010 13:13:32 PDT Subject: [python-win32] MSI installer or zip file for pywin32? In-Reply-To: <4BBADF59.4010201@gmail.com> References: <82353.1270257233@parc.com> <86533.1270264261@parc.com> <4BBA9D8D.7060608@gmail.com> <38819.1270535302@parc.com> <4BBAD526.9040503@skippinet.com.au> <4BBADF59.4010201@gmail.com> Message-ID: <42986.1270584812@parc.com> Mark Hammond wrote: > On 6/04/2010 4:31 PM, Mark Hammond wrote: > > On 6/04/2010 4:28 PM, Bill Janssen wrote: > >> Mark, my system is a dozen or so Python programs plus a few Windows > >> services implemented in Python. If I set those up to hack the "Path" > >> environment variable appropriately before importing stuff, could I put > >> the three DLLs somewhere else instead of C:\WINDOWS\System32\? > > > > That might work - although the service could be problematic; this is > > started by windows itself, so you don't really get the opportunity to > > modify the environment before it starts. > > Oops - I missed the point here - you aren't asking about modifying the > environment before the process starts, but instead after it starts and > before it imports the pywin32 modules. > > However, there is still likely to be a problem; the service support > depends on a couple of pywin32 modules to bootstrap its world, so by > the time your first line of code gets executed, pywintypes, > win32service etc will have been loaded (or fatally failed to load) Thanks, Mark. Just for the moment, I think I'll see if I can get things working by copying the DLLs into \WINDOWS\System32\, including Python26.dll. When that's set, I'll see if I can remove that step -- I imagine I'd somehow need to build a custom version of PythonService.exe, to begin with. I'd like to not break the user's experience if they have a different Python installed on that machine, but the default Python setup on Windows doesn't seem to make that easy to do. Perhaps there are some install switches I haven't come across yet. Bill From greg.ewing at canterbury.ac.nz Tue Apr 6 23:57:02 2010 From: greg.ewing at canterbury.ac.nz (Greg Ewing) Date: Wed, 07 Apr 2010 09:57:02 +1200 Subject: [python-win32] recent spam In-Reply-To: <4BBB231D.7020701@skippinet.com.au> References: <4BBB231D.7020701@skippinet.com.au> Message-ID: <4BBBAE2E.2000507@canterbury.ac.nz> Mark Hammond wrote: > as they were replies > to legitimate mailing-list messages, I was fooled into approving them. Spammers are getting more obnoxiously devious all the time. You have to wonder at the mentality of someone who goes to such lengths to try to trick people into reading messages that they are clearly not at all interested in -- if they were, no such tricks would be necessary in the first place! -- Greg From mhammond at skippinet.com.au Wed Apr 7 00:26:53 2010 From: mhammond at skippinet.com.au (Mark Hammond) Date: Wed, 07 Apr 2010 08:26:53 +1000 Subject: [python-win32] MSI installer or zip file for pywin32? In-Reply-To: <42986.1270584812@parc.com> References: <82353.1270257233@parc.com> <86533.1270264261@parc.com> <4BBA9D8D.7060608@gmail.com> <38819.1270535302@parc.com> <4BBAD526.9040503@skippinet.com.au> <4BBADF59.4010201@gmail.com> <42986.1270584812@parc.com> Message-ID: <4BBBB52D.9080408@skippinet.com.au> On 7/04/2010 6:13 AM, Bill Janssen wrote: > Just for the moment, I think I'll see if I can get things working by > copying the DLLs into \WINDOWS\System32\, including Python26.dll. When > that's set, I'll see if I can remove that step -- I imagine I'd somehow > need to build a custom version of PythonService.exe, to begin with. Ping me when you get to that point - it is now possible to use python.exe + a 'bootstrap' script to host services - it is just that I haven't made the transition from pythonservice.exe to a more stand-alone environment. Cheers, Mark From pacopyc at gmail.com Wed Apr 7 15:24:05 2010 From: pacopyc at gmail.com (pacopyc) Date: Wed, 07 Apr 2010 15:24:05 +0200 Subject: [python-win32] timeout function Message-ID: <4BBC8775.1010309@gmail.com> Hi, I'm trying to execute a function that could end never (infinite time). I'd like to set a timeout. If function respond before 30 sec ok, else go away. Can I do it? I can't find simple examples. Can you help me? Thank you From mail at timgolden.me.uk Wed Apr 7 15:26:48 2010 From: mail at timgolden.me.uk (Tim Golden) Date: Wed, 07 Apr 2010 14:26:48 +0100 Subject: [python-win32] timeout function In-Reply-To: <4BBC8775.1010309@gmail.com> References: <4BBC8775.1010309@gmail.com> Message-ID: <4BBC8818.7050907@timgolden.me.uk> On 07/04/2010 14:24, pacopyc wrote: > Hi, I'm trying to execute a function that could end never (infinite > time). I'd like to set a timeout. If function respond before 30 sec ok, > else go away. > Can I do it? I can't find simple examples. Can you help me? Have a look here: http://code.activestate.com/search/#q=function%20timeout TJG From janssen at parc.com Wed Apr 7 18:35:57 2010 From: janssen at parc.com (Bill Janssen) Date: Wed, 7 Apr 2010 09:35:57 PDT Subject: [python-win32] MSI installer or zip file for pywin32? In-Reply-To: <42986.1270584812@parc.com> References: <82353.1270257233@parc.com> <86533.1270264261@parc.com> <4BBA9D8D.7060608@gmail.com> <38819.1270535302@parc.com> <4BBAD526.9040503@skippinet.com.au> <4BBADF59.4010201@gmail.com> <42986.1270584812@parc.com> Message-ID: <52419.1270658157@parc.com> Bill Janssen wrote: > Mark Hammond wrote: > > > On 6/04/2010 4:31 PM, Mark Hammond wrote: > > > On 6/04/2010 4:28 PM, Bill Janssen wrote: > > >> Mark, my system is a dozen or so Python programs plus a few Windows > > >> services implemented in Python. If I set those up to hack the "Path" > > >> environment variable appropriately before importing stuff, could I put > > >> the three DLLs somewhere else instead of C:\WINDOWS\System32\? > > > > > > That might work - although the service could be problematic; this is > > > started by windows itself, so you don't really get the opportunity to > > > modify the environment before it starts. > > > > Oops - I missed the point here - you aren't asking about modifying the > > environment before the process starts, but instead after it starts and > > before it imports the pywin32 modules. > > > > However, there is still likely to be a problem; the service support > > depends on a couple of pywin32 modules to bootstrap its world, so by > > the time your first line of code gets executed, pywintypes, > > win32service etc will have been loaded (or fatally failed to load) > > Thanks, Mark. > > Just for the moment, I think I'll see if I can get things working by > copying the DLLs into \WINDOWS\System32\, including Python26.dll. No luck so far. I install Python privately ("Just for me" on the Python installer) in C:\UpLib\1.7.9\python\, and unpack the pywin32 zip file in the Lib\site-packages\ subdir there. Then I copy python26.dll and the two pywin32 DLLs over to C:\WINDOWS\system32\: $ cp /c/UpLib/1.7.9/python/python26.dll /c/UpLib/1.7.9/python/lib/site-packages/pywin32_system32/py*.dll /c/WINDOWS/system32/ Then I boot up Python and try to load the win32api: $ python -i Python 2.6.5 (r265:79096, Mar 19 2010, 21:48:26) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import win32api Traceback (most recent call last): File "", line 1, in ImportError: DLL load failed: This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem. >>> import sys, os >>> print sys.path ['', 'c:\\UpLib\\1.7.9\\python\\python26.zip', 'c:\\UpLib\\1.7.9\\python\\DLLs', 'c:\\UpLib\\1.7.9\\python\\lib', 'c:\\UpLib\\1.7.9\\python\\lib\\plat-win', 'c:\\UpLib\\1.7.9\\python\\lib\\lib-tk', 'c:\\UpLib\\1.7.9\\python', 'c:\\UpLib\\1.7.9\\python\\lib\\site-packages', 'c:\\UpLib\\1.7.9\\python\\lib\\site-packages\\win32', 'c:\\UpLib\\1.7.9\\python\\lib\\site-packages\\win32\\lib', 'c:\\UpLib\\1.7.9\\python\\lib\\site-packages\\Pythonwin'] >>> print os.environ.get("Path") c:\UpLib\1.7.9\python;.;C:\msys\1.0\local\bin;c:\mingw\bin;C:\msys\1.0\bin;c:\Program Files\WinAnt\bin;c:\Program Files\MiKTeX 2.8\miktex\bin;c:\WINDOWS\system32;c:\WINDOWS;c:\WINDOWS\System32\Wbem;c:\Program Files\WinAnt\bin >>> So perhaps it's not just a matter of having the DLLs be in the right place -- maybe I also have to put something in the registry? I read through the pywin32 installer script again, but I can't see anything there that might be different. I've tried putting the Pythonwin directory, which contains a copy of mfc90.dll, on my Path, as well, without any luck. Bill From janssen at parc.com Wed Apr 7 19:45:41 2010 From: janssen at parc.com (Bill Janssen) Date: Wed, 7 Apr 2010 10:45:41 PDT Subject: [python-win32] MSI installer or zip file for pywin32? In-Reply-To: <52419.1270658157@parc.com> References: <82353.1270257233@parc.com> <86533.1270264261@parc.com> <4BBA9D8D.7060608@gmail.com> <38819.1270535302@parc.com> <4BBAD526.9040503@skippinet.com.au> <4BBADF59.4010201@gmail.com> <42986.1270584812@parc.com> <52419.1270658157@parc.com> Message-ID: <54283.1270662341@parc.com> Bill Janssen wrote: > > Just for the moment, I think I'll see if I can get things working by > > copying the DLLs into \WINDOWS\System32\, including Python26.dll. > > No luck so far. I install Python privately ("Just for me" on the Python > installer) in C:\UpLib\1.7.9\python\, and unpack the pywin32 zip file in > the Lib\site-packages\ subdir there. Then I copy python26.dll and the > two pywin32 DLLs over to C:\WINDOWS\system32\: > > $ cp /c/UpLib/1.7.9/python/python26.dll /c/UpLib/1.7.9/python/lib/site-packages/pywin32_system32/py*.dll /c/WINDOWS/system32/ > > Then I boot up Python and try to load the win32api: > > $ python -i > Python 2.6.5 (r265:79096, Mar 19 2010, 21:48:26) [MSC v.1500 32 bit (Intel)] on win32 > Type "help", "copyright", "credits" or "license" for more information. > >>> import win32api > Traceback (most recent call last): > File "", line 1, in > ImportError: DLL load failed: This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem. > >>> import sys, os > >>> print sys.path > ['', 'c:\\UpLib\\1.7.9\\python\\python26.zip', 'c:\\UpLib\\1.7.9\\python\\DLLs', 'c:\\UpLib\\1.7.9\\python\\lib', 'c:\\UpLib\\1.7.9\\python\\lib\\plat-win', 'c:\\UpLib\\1.7.9\\python\\lib\\lib-tk', 'c:\\UpLib\\1.7.9\\python', 'c:\\UpLib\\1.7.9\\python\\lib\\site-packages', 'c:\\UpLib\\1.7.9\\python\\lib\\site-packages\\win32', 'c:\\UpLib\\1.7.9\\python\\lib\\site-packages\\win32\\lib', 'c:\\UpLib\\1.7.9\\python\\lib\\site-packages\\Pythonwin'] > >>> print os.environ.get("Path") > c:\UpLib\1.7.9\python;.;C:\msys\1.0\local\bin;c:\mingw\bin;C:\msys\1.0\bin;c:\Program Files\WinAnt\bin;c:\Program Files\MiKTeX 2.8\miktex\bin;c:\WINDOWS\system32;c:\WINDOWS;c:\WINDOWS\System32\Wbem;c:\Program Files\WinAnt\bin > >>> This works if I install Python "for all users" instead of "just for me"... One of the differences of this Python install is that there are now some values in the registry, under HKEY_LOCAL_MACHINE/Software/Python/PythonCore/2.6/. Does the win32 package require that some of those be set? Bill From varun at aryaka.com Wed Apr 7 17:01:53 2010 From: varun at aryaka.com (Varun Avashia) Date: Wed, 7 Apr 2010 15:01:53 +0000 Subject: [python-win32] timeout function In-Reply-To: <4BBC8775.1010309@gmail.com> References: <4BBC8775.1010309@gmail.com> Message-ID: I doubt that, I believe subprocess is the way to go. Just kick it in, sleep for some time and poll it, increment a counter and sleep again.... To call a function from a script with timeout, create a new python script as a thin wrapper around the function and send the timeout via command line (use subprocess) If you are writing the function you can set a timeout and increment the counter inside the function... Any one has a better idea??? MaxWait =