Thank you so much, Mark, and to everyone else who has contributed over
the years. The build environment improvements will be especially
welcome.
regards,
-Preston
On Sat, Nov 14, 2020 at 12:31 AM Mark Hammond wrote:
>
> Hi all,
>I'm happy to announce the release of pywin32 build 300.
> Signi
Is advisory file locking an option? Such as the "portalocker" module for Python?
You can have your writer process obtain an exclusive lock (and block
until it's obtained), while the readers obtain shared locks for the
duration of their read.
Readers don't block other readers, while writers block
Bob,
Is there are reason you can't use PyODBC?
https://github.com/mkleehammer/pyodbc/wiki
It is more actively maintained and I've used it successfully for years.
I'm curious what adodbapi is doing for you that PyODBC can't? Are you using
non-SQL data sources?
thanks,
Preston
___
You could have a worker thread or process that keeps the serial port open
and listens for jobs on some kind of task queue.
However it's not clear to me how keeping the serial port open between
requests provides assurance of data integrity.
On Thu, Jan 11, 2018 at 9:27 AM Schoeni, Yann
wrote:
>
Generally, Windows won't let you delete a file if it's open somewhere,
whether in the same process or in another process. You said the file
becomes delete-able when you kill python, so I'm guessing that another part
of your program (not shown) is holding the file open? You can always use
something
ral Manager*
> belalli...@e-acta.com
> Skype : belallioui
> Tel : +212535749410 <+212%205357-49410>
> Mobile : +212661940077 <+212%20661-940077>
> www.e-acta.com
> www.actaERP.com
>
>
> 2017-03-23 14:06 GMT+00:00 Preston Landers :
>
> Python-Win32 is
. Unfortunately for me,
though, the multiprocessing module now calls CreateProcess with
bInheritHandles=False. This causes my scenario to fail.
Here's a short test script which illustrates this problem:
https://gist.github.com/Preston-Landers/712fee10fb557cf0b5592b57561a7c08
If you run with an
ortunately for me,
though, the multiprocessing module now calls CreateProcess with
bInheritHandles=False. This causes my scenario to fail.
Here's a short test script which illustrates this problem:
https://gist.github.com/Preston-Landers/712fee10fb557cf0b5592b57561a7c08
If you run with an unpatched
.
On Tue, Mar 3, 2015 at 10:59 AM, Tim Golden wrote:
> On 03/03/2015 16:50, Preston Landers wrote:
>
>> It's not unusual for people to think this list is for general discussion
>> of Python for Windows people, rather than specifically for the PyWin32
>> package.
>
It's not unusual for people to think this list is for general discussion of
Python for Windows people, rather than specifically for the PyWin32 package.
On Tue, Mar 3, 2015 at 10:17 AM, Mark Lawrence
wrote:
> On 03/03/2015 08:28, John Sampson wrote:
>
>> I had spent a day trying to find a solut
Actually that gist wouldn't help much since it uses pywin32, the thing
we're trying to install. (derp!) There may be another way though.
Possibly related: http://bugs.python.org/issue20641
On Fri, Feb 20, 2015 at 10:31 AM, Preston Landers
wrote:
> > I don't think pi
> I don't think pip can run this script (it even needs admin privs!).
Is there a reason it couldn't run a script that presents a UAC prompt to
elevate the process?
Something like this:
https://gist.github.com/Preston-Landers/267391562bc96959eb41
I guess for unattended installs y
On Thu, Feb 14, 2013 at 12:06 PM, Tim Roberts wrote:
> newtechnologybooks wrote:
>> >/I was able to deliver 20mb files with this script, but failed when
>> />/trying 100mb files. / >> That's further evidence that you have hit
>> a server limit. If you want >> to send 100MB files, you store them on
I thought you had to have Visual Studio 2008 to build Python 2.6 and
extensions. You might want to confirm that VS 2010 is supported for
the releases you're using.
Failure to find vcvarsall.bat can be caused if you're trying to run
this from a regular windows command line. Try launching the Visual
This is probably not the "correct" answer, but you can see if it helps. At
the top of your script try adding this:
import sys
sys.setdefaultencoding("utf-8")
On Wed, Oct 3, 2012 at 4:50 PM, Matt LaPlante wrote:
> I'm using win32com to query AD for the adsPath as below. It's come to my
> atten
I'm guessing Microsoft set some unusual ACLs on the files for security
reasons. Have you looked at the advanced security options for these
files in Windows Explorer? Have you tried running the script as
Administrator? If you don't really care about the files you can skip
them. If for some reaso
On Wed, Mar 14, 2012 at 2:55 PM, Tony Cappellini wrote:
>
>> >>in which objects can truly move from one process to another is
>> >>recreating them in the other process. Even fork() makes copies of
>> >> everything.
>
> Recreating an object in another process means it's a different object, not a
>
Without getting into too philosophical of a discussion, the only sense
in which objects can truly move from one process to another is
recreating them in the other process. Even fork() makes copies of
everything.
Have you tried pickle or other techniques of serialization? Not sure
offhand if the l
Your question is sorely lacking in detail and therefore may not draw
the kind of responses you are hoping for.
What, exactly, are you trying to do?
Are you trying to create a Windows Share of a local drive from within Python?
Are you trying to mount a remote share from Python?
A literal parsing
I thought "start" wasn't an actual executable but rather a builtin
command of the cmd.exe shell.
Have you tried something like:
scope = subprocess.Popen([r'cmd.exe', '/c start SoundRecorder'],shell
= True, stdout=subprocess.PIPE)
regards,
Preston
On Wed, Feb 22, 2012 at 1:09 AM, David Hutto wr
Hi,
I think people might be reluctant to give you an in-depth tutorial
here on security and encryption. For one thing it's not really the
right place - this is the mailing list for the PyWin32 extensions and
related topics, not for the general topic of securing information in
databases.
Also it'
I think you'll have to get into the guts of the Document object to do things
like that. Here's the official Word 2007 object model documentation. Any
tutorials or examples you can find that use other languages like C# or
VB.NET would be relevant, you just have to translate them a bit to Python.
T
Looks like you downloaded the 64 bit version of py2exe but are trying to use
it with the 32 bit version of Python.
Either get the 64 bit version of Python 2.7, or else the 32 bit version of
py2exe.
good luck,
Preston
On Wed, Jun 1, 2011 at 11:24 AM, Jacob Kruger wrote:
> When I try installin
Not sure if this solves the actual problem you're having, but I wrote a
small script to relaunch a process as an admin using UAC. Hopefully this
helps somehow.
http://dl.dropbox.com/u/11450437/pyuac.py
thanks,
-Preston
On Mon, Apr 25, 2011 at 8:45 PM, Michael ODonnell wrote:
> I have recently
On Fri, Feb 25, 2011 at 1:14 PM, Parand Tony Darugar wrote:
>
> - Outside of Ironpython, is there a reasonable way to interaction with .Net
> objects/assemblies in Python?
>
>
I haven't worked with it myself, but it looks like this is an option:
http://pythonnet.sourceforge.net/
thanks,
Preston
On Wed, Feb 2, 2011 at 10:42 AM, Mike Driscoll
wrote:
>
> Personally, I use SqlAlchemy for almost all my database work. It takes a
> little longer to learn, but I find it easier to use in the long run.
>
>
Yeah I agree with this. And if you feel the need to work with ODBC
directly, consider the P
No, it appears you're getting a different (and expected) error now.
"[ODBC Driver Manager] Data source name not found and no default driver
specified in LOGIN"
That means you didn't give a valid ODBC connection string when you tried to
create a connection. Earlier you were getting "TypeError: e
That's strange. I don't get that under Python 2.6.5 and PyWin32 v214. I get
the kind of error one would expect.
>>> try:
... odbc.odbc("asdf")
... except:
... raise
...
Traceback (most recent call last):
File "", line 2, in
dbi.opError: [Microsoft][ODBC Driver Manager] Data source name not f
The main use I've found for 64 bit Python is for running the Python ISAPI
stuff under the IIS web server on 64 bit Windows. I guess technically that
falls under using 64 bit COM objects. That and it helps when you need to
open >4 GB files and use >2GB memory in a process.
regards,
-Preston
On F
Have you considered outputting your raw data to a portable file format like
HTML, PDF, etc and then printing these outside of Python? Just a thought.
-Preston
On Thu, Sep 16, 2010 at 2:29 PM, Jerzy Wolowik wrote:
> First, thank a lot for Your attention. Please don't hesitate to put digging
> int
On Tue, Jul 20, 2010 at 8:04 AM, Pro wrote:
> Hi every body,
>
> I'm migrating from windows 32bit to 64bit on intel platform.
> I wonder if PyWin32 works well on intel 64 bit?
>
> Is somebody in the same case here?
>
>
> Regards,
>
> Bruno.
>
Keep in mind that "PyWin32" is the name of the produ
varchar(max) columns are like CLOBs, character large objects, and I'm not
sure how well that odbc module handles them. I ended up switching to
pyODBC which does handle them. Unfortunately it might not be just a drop-in
replacement, and pyODBC does have its own issues. But so far it's working
pr
Your PATH is a Unicode string. I'm not sure offhand if that's acceptable or
not, but all the rest of the strings appear to be regular (non-unicode)
strings.
You could also try:
import types
for k, v in env.iteritems():
if type(v) is not types.StringType: print k, v
hope this helps,
-Presto
If you plan to do a lot of ZIP file creation from Python, it's usually a
whole lot faster, and may produce smaller files, if you call out to an
external utility to do the compression instead of doing it from within the
Python zipfile module. You can also pass compression arguments like -9
that pr
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
Your indentation is a bit hard to read in this format, but it looks like the
"for subkey in uninstall" block needs to be inside the "with open" block.
When the "with open" block exits, the file is no longer open. Thus writing
to a closed file will fail.
On Mon, Mar 22, 2010 at 4:22 PM, travel eu
> I'm trying to access the following function from the Windows API:
>
> http://msdn.microsoft.com/en-us/library/dd144885(VS.85).aspx
>
> I'm sure I'm drastically over simplifying, but I'm testing it like this:
>
> import win32api
> print win32api.GetFontData()
>
> This of course errors out with
Hello all,
I'm curious why the odbc module included in PyWin32 (version 214) is
compiled without the Unicode flags/defines. This prevents you from
using Unicode string literals in queries. By that I mean the Unicode
literals are converted to the 8-bit codepage (cp1252) and any
untranslatable cha
On Sun, Dec 13, 2009 at 5:00 AM, wrote:
> Do you have evidence that your Python code is running in multiple
> threads? I.e. are you sure this isn't just ISAPI running some cleanup
> work in another thread?
Oh yes. There was no doubt. I used a debugger (pydevd) to put a
breakpoint at the start
On Mon, Dec 7, 2009 at 5:35 PM, Mark Hammond wrote:
> On 8/12/2009 9:45 AM, Preston Landers wrote:
>>
>> Someone had mentioned needing to restrict the worker pool to a single
>> thread but indicated they didn't know how to do that. I searched
>> around MSDN and
On Tue, Dec 1, 2009 at 5:33 AM, Mark Hammond wrote:
> On 1/12/2009 9:13 AM, Preston Landers wrote:
>>
>> I just thought I'd follow up on my original post about IIS. We
>> decided to go ahead and use isapi-wsgi and so far the results are very
>> good. It won
> On 13/11/2009 4:21 AM, Randy Syring wrote:
> > You may be able to use isapi-wsgi with a custom application pool to
> > achieve what you are looking for. If you can restrict the application
> > pool to only use one thread per process (which I am not sure how to do)
> > and then use multiple proces
On Thu, Nov 12, 2009 at 6:32 AM, Mark Hammond wrote:
>
> On 12/11/2009 10:03 AM, Preston Landers wrote:
>>
>> 4) Use isapi-wsgi: This seems to be getting more popular but it seems
>> to use threads and I'm wondering whether this will break my app in
>> subtle
e
this week) it'd still be awesome if we (Python) could work with the
IIS FastCGI plugin with something like a python-cgi.exe.
thanks,
-Preston Landers - planders at gmail dot com
___
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32
44 matches
Mail list logo