Trent Mick <[EMAIL PROTECTED]> writes:
> [Thomas Heller wrote]
>> py2exe also does something like this in the copy of pythonXY.dll that it
>> creates, to avoid the resulting exe pulling in sys.path entries from the
>> registry.
>
> Do you have a quick pointer to
"Delaney, Timothy (Tim)" <[EMAIL PROTECTED]> writes:
> Thomas Heller wrote:
>
>> As the author, I would be happy to see ctypes included with the
>> standard Python build.
>
> I'm sure you know the magical incantation to get that to happen ...
>
"Gerald Klix" <[EMAIL PROTECTED]> writes:
> I read the whol email thread carefully and could not find any sentence by
> Guido, which states that he does not accept ctypes for the standard library.
> He just declined to rewrite winreg. Did I miss something?
Maybe I misinterpreted what he wrote my
"Martin v. Löwis" <[EMAIL PROTECTED]> writes:
> Thomas Heller wrote:
>> It has been proposed to include it in core Python, but Guido didn't
>> accept it. The thread starts here:
>>
>> http://mail.python.org/pipermail/python-dev/2004-January/th
[EMAIL PROTECTED] writes:
> Thomas,
>
> Ctypes doesn't work to call arbitrary C++ code, is that correct?
>
> Skip
Yes, that's correct. It doesn't do C++ name-(un)mangling, nor has it
the C++ calling conventions. And so on...
Thomas
--
http://mail.python.org/mailman/listinfo/python-list
"Robert" <[EMAIL PROTECTED]> writes:
>
> Guess I have to create special C-code for my major wide unicode needs -
> especially listctrl-SetItem and TextOut-Stuff...
>
> Or does anybody know of some existing wide-unicode functions/C-code
> parallel to normal pywin32?
You could use ctypes to access
"Robert" <[EMAIL PROTECTED]> writes:
> Neil Hodgson wrote:
>> Robert:
>>
>> > After "is_platform_unicode = ", scintilla displays some unicode
>> > as you showed. but the win32-functions (e.g. MessageBox) still do not
>> > pass through wide unicode.
>>
>> Win32 issues are better discussed on th
"Robert" <[EMAIL PROTECTED]> writes:
> Thomas Heller schrieb:
>> So after these assignments:
>>
>> ctypes.windll.user32.MessageBoxW.argtypes = (c_int, c_wchar_p,
>>c_wchar_p, c_int)
>> c
I'm trying to customize the python interpreter that is used to execute
my scripts from within WinXP, XEmacs, python-mode version
$Revision4.70$, but cannot get it to work.
The only thing that works is M-x customize-group python, and change the
value of 'Python Command'. However, this changes the
[EMAIL PROTECTED] writes:
> Thomas> I'm trying to customize the python interpreter that is used to
> Thomas> execute my scripts from within WinXP, XEmacs, python-mode
> Thomas> version $Revision4.70$, but cannot get it to work.
>
> Thomas> The only thing that works is M-x customize
Russell Warren schrieb:
> I've got a case where I want to convert binary blocks of data (various
> ctypes objects) to base64 strings.
>
> The conversion calls in the base64 module expect strings as input, so
> right now I'm converting the binary blocks to strings first, then
> converting the resul
John Salerno schrieb:
> Tim Chase wrote:
>>> The cause of this is usually that you are using a different
>>> version of Python than the one you installed Tkinter into, but
>>> being a Linux newbie I have yet to discover how to redirect
>>> the 'python' command to invoke the newer version of Python.
[EMAIL PROTECTED] schrieb:
> Hello,
>
> I am working with comtypes to interface Microsoft's DirectShow library.
Cool, another one using comtypes!
> First, I found a Type Library on the internet that was created for
> accessing DirectShow from .NET. It seems that DirectShow only comes
> with ID
[EMAIL PROTECTED] schrieb:
> Thomas,
>
> Thanks a ton for the quick response.
>
> I called GetModule('quartz.dll'), and now I can at least call
> IMediaControl::Run. I get another error, but that's my problem (I
> don't have the graph set correctly yet).
>
> You mentioned that you sometimes cre
Oliver Andrich schrieb:
> Hi everybody,
>
> I am currently playing around with ctypes and a C library (libWand
> from ImageMagick), and as I want to easily deploy it on Mac, Linux and
> Windows, I prefer a ctypes solution over a C module. At least on
> windows, I would have resource problems to co
Méta-MCI schrieb:
> Hi, all!
>
>
> Any news, on release Python-2.5 for many modules/lib?
> Some exemples:
>
> Console (Effbot)
> SciPy
> Iconvcodec
> DirectPython
> SendKeys
> Dislin
> PyGame
> Twain
> etc.
>
>
> And who can confirm that these modules are in
Oliver Andrich schrieb:
> On 10/6/06, Thomas Heller <[EMAIL PROTECTED]> wrote:
>> Chris Mellon has already pointed out a possible solution, but there is also a
>> different way. You could use a subclass of c_char_p as the restype
>> attribute:
>>
>> class St
Richard Jones schrieb:
> Currently ctypes can't play well with any C code that requires use of setjmp
> as part of its API.
>
> libpng is one of those libraries.
>
> Can anyone think of a reasonable solution to this? Perhaps ctypes might be
> patched to offer setjmp support in foreign function de
Richard Jones schrieb:
> Does anyone know how to do the equivalent of this using ctypes?
>
> image_data = malloc(width * height * components);
> row_pointers = png_get_rows(png_ptr, info_ptr);
> for (y = 0; y < height; y++)
> memcpy(&image_data[width * components * y],
>
I cannot connect to starship.python.net: neither http, nor can I login
interactively with ssl (and the host key seems to have changed as well).
Does anyone know more?
Thanks,
Thomas
--
http://mail.python.org/mailman/listinfo/python-list
T. Bryan schrieb:
> Thomas Heller wrote:
>
>> I cannot connect to starship.python.net: neither http, nor can I login
>> interactively with ssl (and the host key seems to have changed as well).
>>
>> Does anyone know more?
>
> starship.python.net was compro
[EMAIL PROTECTED] schrieb:
> ISSUE: COM Excel Sort works with Early Binding, but not Late Binding,
> but py2exe only does Late Binding
>
> I have code similar to this (type from notes, so there may be a
> typo...)
>
> import win32com.client
> xl = win32com.client.Dispatch("Excel.Application")
> x
Ben Sizer schrieb:
> I'd like to be able to drag a file onto a Python script in Windows
> Explorer, or send that file to the script via the Send To context-menu
> option, so I can then process that file via sys.argc.
>
> Unfortunately, I can't drag items onto the Python script, because
> Windows d
Ben Finney schrieb:
> "Hendrik van Rooyen" <[EMAIL PROTECTED]> writes:
>
> [quoting problems fixed]
>
>> "Fredrik Lundh" <[EMAIL PROTECTED]> wrote:
>> > some days, I ask myself why I shouldn't just use GPL for
>> > everything I do, and ship it as source code only.
>>
>> because then you would de
Joel Hedlund schrieb:
> Hi!
>
> For a number of days I haven't been able to search the online python
> docs at:
>
> http://starship.python.net/crew/theller/pyhelp.cgi
>
> that is the "search the docs with" link at this page:
>
> http://www.python.org/doc/
>
> Instead of the search engine, I g
Joel Hedlund schrieb:
> Hi!
>
> For a number of days I haven't been able to search the online python
> docs at:
>
> http://starship.python.net/crew/theller/pyhelp.cgi
>
> that is the "search the docs with" link at this page:
>
> http://www.python.org/doc/
>
> Instead of the search engine, I g
Larry Bates schrieb:
> Doug Stell wrote:
>> I have 2 questions about py2exe or any similar utility.
>>
>> 1. Is it possible to create a single Windows executable that does not
>> blow out to a folder full of files and can be called from scripts
>> using command line arguments?
>>
>> 2. If the abo
Marc 'BlackJack' Rintsch schrieb:
> In <[EMAIL PROTECTED]>, Jerry wrote:
>
>> Despite what everyone is saying though, I believe that any and all
>> solutions will require that the byte-code be extracted to some
>> directory before being run.
>
> It's not Python bytecode. The problem is native li
[EMAIL PROTECTED] schrieb:
> Hello,
>
> how to get at the function address of a WinFunctionType ctypes object ?
> With ctypes 1.0, I used just myfunc._as_parameter_ and all was well.
> With ctypes 1.0.1, that ships with python 2.5, WinFunctionType has no
> longer an _as_parameter_ attribute
I thi
I have installed a wiki which could / should be used to document the ctypes
package and
ctypes related packages (like comtypes, for example).
ctypes is a foreign function library for Python:
http://starship.python.net/crew/theller/ctypes/
I hope the wiki will evolve over time into a useful
[EMAIL PROTECTED] schrieb:
>> > > http://effbot.org/pyfaq/suggest.htm
>> > FAQ: How do I say returns void in ctypes?
>> That's in the ctypes documentation, where it belongs.
>
> Thank you, before I never had found "Use None for void a function not
> returning anything" at:
> http://starship.python
[EMAIL PROTECTED] schrieb:
> Thanks again for making time to comment - insights into the perspective
> of the author are invaluable. But if by chance you have time to
> continue:
>
>> > > http://effbot.org/pyfaq/suggest.htm
>> > http://docs.python.org/dev/lib/ctypes-return-types.html
>> A note co
[EMAIL PROTECTED] schrieb:
>> > > > http://effbot.org/pyfaq/suggest.htm
>> > > FAQ: How do I say returns void in ctypes?
>> > That's in the ctypes documentation, where it belongs.
>>
>> Thank you, before I never had found "Use None for void a function not
>> returning anything" at:
>> http://starsh
Alex Martelli wrote:
> Jeremy Sanders <[EMAIL PROTECTED]> wrote:
>
>> Hi - Is it possible to override the import process so that if in my program
>> I do
>>
>> import foo.bar
>>
>> Python will look for bar in a directory which isn't called foo?
>>
>> I want my module/program to be able to be ru
lux wrote:
> Hi to all,
> i need to traslate this struct in python using ctypes
>
> struct Soptions
> {
> char chVolumeLabel[128];
> __int32 nSessionToImport;
> BS_BOOL bJolietFileSystem;
> BS_BOOL bBootable;
> TCHAR chBootImage[_MAX_PATH];
> BS_BOOL bFinalize;
> BS_BOOL bTestBu
I'm using code.Interactive console but it doesn't work correctly
with non-ascii characters. I think it boils down to this problem:
Python 2.4.3 (#69, Mar 29 2006, 17:35:34) [MSC v.1310 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> print u"ä"
ä
freesteel schrieb:
> /*
> Is this a bug in Py_NewInterpreter?
>
> The function below "MyThread" is instantiated from a windows worker
> thread, but I don't
> think that is relevant.
> (I can try this on a linux box, but I would have to compile a python
> library with debugging
> enabled.)
>
> The
GHUM schrieb:
> On the PIL website I read:
>
> The current free version is PIL 1.1.5, which has been tested with
> Python 1.5.2 and newer, including 2.3 and 2.5.
>
> but in downloads I cannot see any binaries for windows and Python 2.5
>
> Are they somewhere available?
>
> Best wishes,
>
> Har
John Salerno schrieb:
> Bruno Desthuilliers wrote:
>
>> Err... is it me being dumb, or is it a perfect use case for str.split ?
>
> Hmm, I suppose you could get nearly the same functionality as using
> split(':', 1), but with partition you also get the separator returned as
> well.
Well, x.spl
Tim Golden schrieb:
> [EMAIL PROTECTED]
>
> [... snip ...]
>
> | File "win32com\client\__init__.pyc", line 73, in GetObject
> | File "win32com\client\__init__.pyc", line 88, in Moniker
> | pywintypes.com_error: (-2147221020, 'Invalid syntax', None, None)
> |
> | The offending line is:
> | im
Daniel Mark schrieb:
> Hello all:
>
> I follow the following tutorial
>
> http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/108598
> Description:
> script for making executables with py2exe
> ##
> from distutils.core import setup
> import sys, os, py2exe
>
> name = sys.argv[1]
nikie schrieb:
> When I try to compress the output of py2exe like this:
>
> from distutils.core import setup
> import py2exe
>
> setup(console=['hello.py'], options={"py2exe": {"compressed": 1}})
>
> I get strange error messages:
>
> Adding zlib.pyd to C:\tests\CanControllerTest\New Folde
[EMAIL PROTECTED] schrieb:
> Q: The C idea of (pv != NULL) is said most directly in Python ctypes
> how?
>
> A: We are of course supposed to write something like:
>
> def c_not_null(pv):
> return (ctypes.cast(pv, ctypes.c_void_p).value != None)
>
> Yes?
>
> Working from
False in a boolean
>> expression (and you could assume that non-NULL pointers are True, as
>> any other object in general),
>
> I see this now that you show the clueless newbie me, yes thank you.
> Except now by showing me here we have provoked the authority Thomas
> Hell
[EMAIL PROTECTED] schrieb:
>> Subject: Python CTypes translation of (pv != NULL)
I've started a wiki page where I already added an entry about the above
question.
Do you think the entry would have answered your question?
http://starship.python.net/crew/theller/moin.cgi/CodeSnippets
(My wiki sho
[EMAIL PROTECTED] schrieb:
>> I've started a wiki page where I already added an entry about the above
>> question.
>> Do you think the entry would have answered your question?
>> http://starship.python.net/crew/theller/moin.cgi/CodeSnippets
>
> As concise as I now can imagine, yes thank you.
>
>
Gabriel Genellina schrieb:
> At Friday 17/11/2006 17:40, Tim Roberts wrote:
>
>> > double wow! as it is my customer wants me to print to the default
>> > printer.
>> > can you please help me with the command for rendering the pdf to the
>> > printer with acrobat using python?
>>
>>You'll have to
[EMAIL PROTECTED] schrieb:
> I'm using it for sockets, it works on linux but not on Windows. The
> actual code is something like (server side):
>
> r, w, e = select.select(self.clients, [], self.clients, 5)
>
> where self.clients is a list of accepted sockets.
>
The docs for select.select say:
[EMAIL PROTECTED] schrieb:
> [EMAIL PROTECTED] schrieb:
>
>> Does anyone know of a way to read text labels from a Win32 application.
>> I am familiar with using pywin32 and the SendMessage function to
>> capture text from Buttons,text boxex, comboboxes, etc, however, the
>> text I am would like to
BBands schrieb:
> I have a Python ap that needs current stock prices, which I want to get
> from eSignal's DDE server. Following the win32all example:
>
> import win32ui
> import dde
> server = dde.CreateServer()
> server.Create("eSignalDDE")
> conversation = dde.CreateConversation(server)
> conve
Aahz schrieb:
> Anyone else getting "Python-related" spam? So far, I've seen messages
> "from" Barry Warsaw and Skip Montanaro (although of course header
> analysis proves they didn't send it).
I'm getting spam not only from Barry, but also from myself ;-) with forged
headers.
But I'm not sure w
Chuck Rhode schrieb:
> I couldn't find a routine to clean up, regularize, and reformat Python
> code, so I wrote one:
>
> http://www.lacusveris.com/PythonTidy/PythonTidy.python
>
> Now, I'm looking for beta-testers. Compensation is a bit on the low
> side. In fact it's limited to the satisfac
krishnakant Mane schrieb:
> On 1 Dec 2006 09:56:09 -0800, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>> http://msdn.microsoft.com covers the API itself, although you need to
>> transliterate from the C code to python.
> Exactly! that's where the problem lyes.
> I am pritty well to do with wind
Chuck Rhode schrieb:
> Thomas Heller wrote this on Thu, Nov 30, 2006 at 09:50:25PM +0100. My
> reply is below.
>
>> The two things that bother me at the moment are how the comments are
>> formatted (dunno if that can be customized or changed easily), and
>> it would
Chuck Rhode schrieb:
> That went well. PythonTidy has been looked at at least 10**2 times,
> and I have received a couple of complaints, which I hope I have
> addressed satisfactorily -- plenty good enough for a beta test. The
> basic concept stands.
Sure.
There is still one major issue. python
Chuck Rhode schrieb:
> Thomas Heller wrote this on Tue, Dec 05, 2006 at 07:06:30PM +0100. My
> reply is below.
>
>> There is still one major issue. pythonTidy uses open(input-file,
>> "rb") to open the Python module to tidy up. That does not work on
>> Win
comtypes seems to gain some attention (comtypes is a pure Python, lightweight
COM client and server framework, based on the ctypes Python FFI package.)
I'll try to release a new version over the next days.
However, I'm wondering what would be the correct list to discuss this package...
- the pyt
Frank Niessink schrieb:
[...]
> Now, with Python 2.5 (and not with Python 2.4) I have a callback that is
> not being added to the list because, apparently, it compares equal to
> some of the callbacks already in the list. However, the instance the two
> methods belong to are different, i.e. id(
Michele Simionato schrieb:
> The subject says it all, I would like a script to act differently when
> called as
> $ python script.py and when called as $ python -i script.py. I looked
> at the sys module
> but I don't see a way to retrieve the command line flags, where should
> I look?
> TIA,
>
>
[EMAIL PROTECTED] schrieb:
> [EMAIL PROTECTED] skrev:
>
>> Hi,
>>
>> I wish to write a Python wrapper for my C# COM object but am unsure
>> where to start. I have a dll and a tlb file, and I can use this object
>> in C via the following code -
>>
>> // ConsolApp.cpp : Defines the entry point for t
Ben Sizer schrieb:
> Gabriel Genellina wrote:
>
>> Notice that there is NO need to alter the system path. You just have
>> to tell Windows where python.exe resides; there is a per-application
>> path located at
>> HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths.
>> In order
[EMAIL PROTECTED] schrieb:
> Hello all
>
> I am a great fan of Mark Hammonds python pannel. But since starship
> went down it didn't come up again ...with the link in my favs to
> http://starship.python.net/crew/mhammond/mozilla/pythonpanel.xul
> still pointing nowhere.
>
> Maybe Mark is around h
wcc schrieb:
> Hello,
>
> How do I create a class using a variable as the class name?
>
> For example, in the code below, I'd like replace the line
>
> class TestClass(object):
> with something like
> class eval(className) (object):
>
> Is it possible? Thanks for your help.
>
> className = "T
wcc schrieb:
> Hello group,
>
> Is there a separate mailing list for comtypes? Or this is the
> appropriate place to post questions related to this package(from Thomas
> Heller)?
It seems the python-win32 mailing list is the place where the most COM knowledge
is, so tha
siggi schrieb:
> Hi all,
>
> as a newbie I have problems with formatting code of downloaded programs,
> because IDLE's reformatting capabilities are limited . Incorrect
> indentation, mixing of TAB with BLANKs or eol are often very nasty to
> correct.
> Is there a simple code formatter that first
Richie Hindle <[EMAIL PROTECTED]> writes:
> [Fredrik]
>> so re.sub("([_.])\\1+", "\\1", newname) replaces runs consisting
>> of either a . or an _ followed by one or more copies of itself, with
>> a single instance of itself.
>
> ...and this:
>
def isprime(n):
return n > 1 and not re
Alexander Schmolck <[EMAIL PROTECTED]> writes:
> what's the best approach to write C(++)-extension code that has to
> create a python int from a C pointer and vice versa so that it works
> smoothly on 32 bit and 64 platforms (on which sizeof(int) !=
> sizeof(*void)) equally work (under unix,mac&wi
[EMAIL PROTECTED] writes:
> Hi,
>
> This is all I get:
>
> error 250477278
> Traceback (most recent call last):
> File "script1.py", line 5, in ?
> Inst = lib.Initialize(0)
> WindowsError: exception code 0xeedfade
>
> I get this when running python.exe script1.py
>
> ** When run from inside
>> Nir Aides wrote:
>>> Is there a solution or a work around for the sys.path problem with
>>> unicode folder names on Windows XP?
>>>
>>> I need to be able to import modules from a folder with a non-ascii name.
> Martin v. Löwis wrote:
>> If the name is restricted to the CP_ACP code page (i.e.
Martin v. Löwis wrote:
> Kevin Walzer wrote:
>> The apps I've seen created by py2exe aren't single-file at all, the
>> install folder is full of files besides the main program. I'm
>> looking for a solution that stuffs all libraries, scripts, and the
>> Python runtime into one file.
Usually the
Cameron Laird wrote:
> In article <[EMAIL PROTECTED]>,
> Thomas Heller <[EMAIL PROTECTED]> wrote:
> .
> .
> .
>> Usually the bundle=1 option in py2exe can create a single file exe, but it
>
Carl Friedrich Bolz wrote:
> kanchy kang wrote:
>> many people write test cases with python scripts.
>> in these test scripts, there are many validation statements,
>> for example, in unittest, failUnless(a == b),(a/b may be stringType or
>> intType...)
>>
>> during running test scripts, if there
Don Taylor wrote:
> I have Python 2.4.2 installed on a Windows XP machine.
>
> There is an application that I want to use that refuses to install
> unless I have Python 2.3.x installed. (The only way that I can install
> this is to use it's .exe installer)
>
> Can I install two versions of Pyt
3c273 wrote:
> Hello,
> I have a short looping script that runs in the background (Windows 2000) and
> I want to have a tray icon so I know that it is running. I have looked at
> wxTaskBarIcon and the examples on the web and in the demo, but it seems
> pretty complex and I haven't had any success e
Timothy Smith <[EMAIL PROTECTED]> writes:
> is it possible instead of py2exe putting all library's in a zip file,
> to just put them in a sub dir?
You can subclass the build_exe command (the extending sample shows how
to do this, althoutgh for a different purpose), and copy the files into
a sub d
Just <[EMAIL PROTECTED]> writes:
> In article <[EMAIL PROTECTED]>,
> Peter Hansen <[EMAIL PROTECTED]> wrote:
>
>> [ ... ] (Note to self: check if zip files that can
>> be in sys.path can be compressed,
>
> Yes.
>
>> and if py2exe compresses them.)
>
> Don't know, but I assume yes.
There's an op
François Pinard <[EMAIL PROTECTED]> writes:
> Hi, people. I hope someone would like to enlighten me.
>
> For any application handling Unicode internally, I'm usually careful
> at properly converting those Unicode strings into 8-bit strings before
> writing them out.
>
> However, this morning, I m
Tim Golden schrieb:
> | Hello All.
> | I'm trying to 'compile-to-EXE' a python program which uses
> | Win32 & WMI to
> | pull system info. from the PC such as serial number, CPU
> | speed, etc. I'm
> | having problems with py2exe -- with regard to Win2000 & WinXP
> | platforms. It
> | seems
Raphael Zulliger schrieb:
> Hi
>
> I have to check wheter a .py script is run within the debug or the
> release version of an embedded python interpreter (in short, wheter
> python24_d.dll or python24.dll is in use).
>
> long version: I'm using ctypes to load my own dll. There exists 2
> versi
Tim Golden schrieb:
> [Thomas Heller]
>
> [... snip problems with py2exe & WMI ...]
>
> | The OP of the thread Tim mentions here already had a solution, if I
> | understood him correctly, and the other things that were suggested
> | didn't work. Basically
Gerald Klix schrieb:
> Hi,
> it`s
>
> import os
> f = open( os.path.join( dir , 'configuration.smo' ), 'r' )
*nix-heads everywhere?
For a text file, I would prefer:
f = open( os.path.join( dir , 'configuration.smo' ), 'U' )
and for a binary file:
f = open( os.path.join( dir , 'configuration
Giles Brown schrieb:
> MM wrote:
>
>>Are there any other odbc packages other than the win32all and mxodbc
>>ones? The win32all odbc.pyd can't access table structure info like
>>SQLColumns, and mxobdc requires a commercial license which is
>>unjustifiable for this tiny project. Any other OS alterna
mg <[EMAIL PROTECTED]> writes:
> Hi,
>
> Because of I have patched Python, I would like to create a Windows
> installer containing my patched-Python. So, I try to use the option
> 'bdist_wininst' on the setup.py file distributed by python it is
> supported ?
bdist_wininst can only be used to
Jeremy Jones <[EMAIL PROTECTED]> writes:
> I've got a couple of new articles on ONLamp:
>
> Writing Google Desktop Search Plugins
> http://www.onlamp.com/pub/a/python/2005/06/01/kongulo.html
>
> and
>
> Python Standard Logging
> http://www.onlamp.com/pub/a/python/2005/06/02/logging.html
>
>
> Comm
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes:
> I didn't build the installer, someone else did. I did get the source
> and installed cygwin to see if I could recreate it; at least build the
> library, but when I tried to do a build_ext I got a message saying I
> needed to have the .NET SDK insta
Steven Knight <[EMAIL PROTECTED]> writes:
> Hi Ivan--
>
>>> If I have installed 2.3.5 from the python.org Windows installer, can
>>> any one point me to a run-time way to identify whether I'm running on
>>> a 32-bit vs. 64-bit version of Windows XP, given that Python itself was
>>> built on/for a
Skip Montanaro <[EMAIL PROTECTED]> writes:
> I updated the patch that supports PEP 304, "Controlling Generation of
> Bytecode Files" to apply cleanly against current CVS. I've tested it on Mac
> OS X (straight Unix build only). I'd appreciate it if some Linux, Windows
> and Mac framework folks c
[EMAIL PROTECTED] schrieb:
> How do I vary the byte offset of a field of a ctypes.Structure?
>
> How do I "use the dynamic nature of Python, and (re-)define the data
> type after the required size is already known, on a case by case
> basis"?
>
> \\\
>
> For example, suppose sometimes I receive
Michael Hoffman schrieb:
> The peephole optimizer now takes things like
>
> if 0:
> do_stuff()
>
> and optimizes them away, and optimizes away the conditional in "if 1:".
>
> What if I had a function like this?
>
> def func(debug=False):
> for index in xrange(100):
> if de
mclaugb schrieb:
> I have created a simple windows small_dll.dll exporting a function that does
> a computation using C and C++ classes which i wish to call from Python. I
> have read lots of ctypes documentation but I still dont quite understand how
> to call the function.
>
> As a test, I have
mclaugb schrieb:
> I have a simple function
>
> void adder(double a, double b, double *c){
> *c = a+b;
> }
>
> i have created a shared dll -- "small_dll4.dll" of it using visual studio.
>
> now i wish to call it from python.
> to do so, i have done the following:
>
> libx = cdll("small_dll4.dll
Paul Rubin schrieb:
> So I have some assert statements in my code to verify the absence of
> some "impossible" conditions. They were useful in debugging and of
> course I left them in place for "real" runs of the program. Umpteen
> hours into a run, an assertion failed, and of course since failur
Robin Becker schrieb:
> Josiah Carlson wrote:
>> Robin Becker wrote:
>>> Is the any way to get an efficient 16bit hash in python?
>>
>> hash(obj)&65535
>>
>> - Josiah
> yes I thought of that, but cannot figure out if the internal hash really
> distributes the bits evenly. Particularly since it
eGenix Team: M.-A. Lemburg schrieb:
> Hello,
>
> eGenix is looking into organizing a one day conference
> specifically for companies doing business with Python, Zope and
> Plone. The conference will likely be held in or close to
> Düsseldorf, Germany, which is lively medium-sized city, with good
>
QOTW?
Gregor Horvath schrieb:
> That's a property of open source projects.
> Features nobody really needs are not implemented.
>
> Gregor
--
http://mail.python.org/mailman/listinfo/python-list
Christoph Zwerschke schrieb:
> What is the best way to re-raise any exception with a message
> supplemented with additional information (e.g. line number in a
> template)?
I have the impression that you do NOT want to change the exceptions,
instead you want to print the traceback in a customized
[EMAIL PROTECTED] schrieb:
> Hi. I'm writing an archival system which I'd like to be portable
> to Windows.
>
> The system relies on the property of Unix which allows a
> process to keep a file open even if another process renames
> it while it is open. Neither process sees any anomaly or
> erro
Noralf Trønnes schrieb:
> Hi
>
> I'm trying to use a DLL from Python using ctypes.
> The call to dso_lib.capture_hold_chk() does return 232. So it seem to work.
> The call to dso_lib.port_init(init_data) gives:
> WindowsError: exception: access violation reading 0x0006
>
> Any suggestions?
>
>> Have you tried to pass the structure by reference?
>>
>> dso_lib.port_init(byref(init_data))
>
> That gives me another exeption:
>
> print dso_lib.port_init(byref(init_data))
> ValueError: Procedure called with not enough arguments (4 bytes missing) or
> wrong calling convention
Please t
ctypes 1.0.2 released - May 15, 2007
Overview
ctypes is an advanced ffi (Foreign Function Interface) package for
Python 2.3 and higher.
ctypes allows to call functions exposed from dlls/shared libraries
and has extensive facilities to create,
201 - 300 of 430 matches
Mail list logo