Re: Equivalent of "make install" for Python on windows?

2020-07-10 Thread Patrick Stinson
started to think I was missing something. Cheers, -Patrick > On Jul 10, 2020, at 8:01 AM, Patrick Stinson wrote: > > Building python from source on windows is straightforward enough with > PCBuild/build.bat. But it seems as though the resulting distribution that > runs from these

Equivalent of "make install" for Python on windows?

2020-07-10 Thread Patrick Stinson
Building python from source on windows is straightforward enough with PCBuild/build.bat. But it seems as though the resulting distribution that runs from these standard build dirs ends up sort of incomplete and/or fragmented - at least for what I am used to on *NIX. Binaries are in ./PCBuild/pl

Relative import cannot find .so submodule?

2020-01-11 Thread Patrick Stinson
I have a module named rtmidi, and its C submodule named rtmidi/_rtmidi. The distills script builds successfully and successfully creates a build/lib dir with a rtmidi dir in it and the submodule file rtmidi/_rtmidi.cpython-36dm-darwin.so. I have set PYTHONPATH to this lib dir, but rtmidi/__init

Building on windows and installing to prefix

2018-10-24 Thread Patrick Stinson
Hello! I am having trouble finding out how to build python from source and then install it to a path prefix, as you can on unix. I have looked at the options in “PCBuild\build.bat -h” and in readme.txt, and on google, but no dice. I have VS 2017. Thanks! -Patrick -- https://mail.python.org/ma

Compiling Python for iOS 11

2017-09-24 Thread Patrick Stinson
Has anyone successfully compiled python for iOS 11? I tried with 3.5.2 and 3.6.2 and got the following errors: turin:Python-3.6.2 patrick$ make Makefile:9845: warning: overriding commands for target `.obj/_pickle.o' Makefile:8855: warning: ignoring old commands for target `.obj/_pickle.o' /Appli

Re: Python and GUI development

2014-12-01 Thread Patrick Stinson
I’ve been using PyQt for 10 years. Absolutely fabulous, fun, and I imagine the others are also excellent as they have all been around long enough to die naturally if they were not very useful. > On Dec 1, 2014, at 3:13 AM, Chris Angelico wrote: > > On Mon, Dec 1, 2014 at 10:55 PM, Ganesh Pal

Re: Embedded python 'scripting engine' inside Python app

2014-11-24 Thread Patrick Stinson
> On Nov 23, 2014, at 4:57 AM, Chris Angelico wrote: > > On Mon, Nov 24, 2014 at 12:20 AM, Patrick Stinson > wrote: >> I think this is the way I’ll take it, and for all the same reasons. The only >> way they can break it is if they really want to. I guess anythin

Re: unloading a module created with imp.new_module

2014-11-24 Thread Patrick Stinson
> On Nov 24, 2014, at 2:44 AM, Ned Batchelder wrote: > > On 11/23/14 5:10 AM, Patrick Stinson wrote: >> I am defining a single class with a destructor method that prints >> ‘__del__’, and running that source code string using exec with the >> module’s dict li

Re: unloading a module created with imp.new_module

2014-11-24 Thread Patrick Stinson
> On Nov 24, 2014, at 6:12 AM, Ian Kelly wrote: > > > On Nov 24, 2014 1:27 AM, "Patrick Stinson" <mailto:patrickk...@gmail.com>> wrote: > > > > How does the __del__ method have a reference to the module’s globals dict? > > because it refe

Re: unloading a module created with imp.new_module

2014-11-24 Thread Patrick Stinson
ote: > > > On Nov 23, 2014 4:10 AM, "Patrick Stinson" <mailto:patrickk...@gmail.com>> wrote: > > m = types.ModuleType('mine') > > exec(s, m.__dict__) > > print('deleting...') > > m = None > > print('done') >

Re: Embedded python 'scripting engine' inside Python app

2014-11-24 Thread Patrick Stinson
ico wrote: > > On Sun, Nov 23, 2014 at 9:28 PM, Patrick Stinson > wrote: >> Thanks for your great reply. I even augmented the reloading with the same >> dict by clearing all of the non-standard symbols from the dict. This >> effectively resets the dict: > > You may

Re: unloading a module created with imp.new_module

2014-11-24 Thread Patrick Stinson
On Nov 23, 2014, at 5:56 PM, Ned Batchelder wrote: > > On 11/23/14 1:49 AM, Patrick Stinson wrote: >> If I create a module with imp.new_module(name), how can I unload it so that >> all the references contained in it are set to zero and the module is >> deleted?

Re: unloading a module created with imp.new_module

2014-11-24 Thread Patrick Stinson
.. done __del__ I the “__del__" to come between “deleting…” and “done”. This is not being run from the interactive interpreter by via a .py file. > On Nov 23, 2014, at 12:56 AM, Ian Kelly wrote: > > On Sun, Nov 23, 2014 at 2:48 AM, Ian Kelly wrote: >> On Sat, Nov 22, 2014

Re: Embedded python 'scripting engine' inside Python app

2014-11-24 Thread Patrick Stinson
to automate your app? Thanks! > On Nov 23, 2014, at 12:24 AM, Chris Angelico wrote: > > On Sun, Nov 23, 2014 at 4:48 PM, Patrick Stinson > wrote: >> I am writing a python app (using PyQt, but that’s not important here), and >> want my users to be able to write their own sc

unloading a module created with imp.new_module

2014-11-23 Thread Patrick Stinson
If I create a module with imp.new_module(name), how can I unload it so that all the references contained in it are set to zero and the module is deleted? deleting the reference that is returned doesn’t seem to do the job, and it’s not in sys.modules, so where is the dangling reference? Thanks!

Embedded python 'scripting engine' inside Python app

2014-11-23 Thread Patrick Stinson
I am writing a python app (using PyQt, but that’s not important here), and want my users to be able to write their own scripts to automate the app’s functioning using an engine API hat I expose. I have extensive experience doing this in a C++ app with the CPython api, but have no idea how to do

Re: freeze in python3

2009-12-10 Thread Patrick Stinson
awesome! On Thu, Dec 10, 2009 at 2:17 PM, Martin v. Loewis wrote: >> For example, initerrno should now be PyInit_errno. Am I missing something? > > No; freeze hasn't been ported to Python 3 yet. Contributions are welcome. > > Regards, > Martin > -- > http://mail.python.org/mailman/listinfo/python

freeze in python3

2009-12-09 Thread Patrick Stinson
NOTE: This is related but is not a duplicate of my post from yesterday. Has anyone used Tools/freeze/freeze.py in python3? I tried it with a clean source distribution and for some reason freeze.py is generating code that uses the old naming convention for module init functions. I get the following

using freeze.py with python3

2009-12-09 Thread Patrick Stinson
Has anyone tried using Python-3.1.1/Tools/freeze/freeze.py with the encodings package? It appears that encodings is required to intialize the interpreter, but PyImport_ImportFrozenModule is failing for the "encodings" module in marshal.c:r_object(), after trying to demarshal an object of type 0. T

Re: xmlrpc idea for getting around the GIL

2009-12-09 Thread Patrick Stinson
On Wed, Dec 2, 2009 at 7:42 AM, sturlamolden wrote: > On 2 Des, 02:47, Patrick Stinson > wrote: > >> We don't need extension modules, and all we need to do is run some >> fairly basic scripts that make callbacks and use some sip-wrapped >> types. > > Sure,

Re: xmlrpc idea for getting around the GIL

2009-12-01 Thread Patrick Stinson
yes, using an rpc mechanism would insert a "blocking" call into a thread in which I am "not allowed to make a blocking call," but actual turn around times would be far better than forcing all threads to wait on the Gil. As it stands, blocking on a single thread lock *almost* works, and while we can

Re: xmlrpc idea for getting around the GIL

2009-11-23 Thread Patrick Stinson
On Mon, Nov 23, 2009 at 1:01 AM, Carl Banks wrote: > On Nov 22, 10:58 pm, Patrick Stinson > wrote: >> On Sun, Nov 22, 2009 at 3:15 PM, Diez B. Roggisch >> wrote: > icating) the multiprocessing module would be ideal. >> > The problem is that the OP has a embedd

Re: xmlrpc idea for getting around the GIL

2009-11-22 Thread Patrick Stinson
that's right. I cannot make CPython calls from my original C-based threads. On Sun, Nov 22, 2009 at 3:15 PM, Diez B. Roggisch wrote: > Daniel Fetchinson schrieb: >>> >>> Has anyone every tried wrapping the CPython lib into a daemon with an >>> RPC mechanism in order to move the GIL out of the pro

xmlrpc idea for getting around the GIL

2009-11-22 Thread Patrick Stinson
Has anyone every tried wrapping the CPython lib into a daemon with an RPC mechanism in order to move the GIL out of the process? I have multiple audio threads, each of which use the python interpreter but don't have to interact with each other and can might as well use a separate interpreter handle

Re: incorrect line reported in traceback

2008-11-30 Thread Patrick Stinson
lue, &traceback); if(traceback) // traceback.tb_lineno *lineno = ((PyTracebackObject *) traceback)->tb_lineno; On Sun, Nov 30, 2008 at 8:59 PM, John Machin <[EMAIL PROTECTED]> wrote: > On Dec 1, 4:47 pm, "Patrick Stinson" <[EMAIL PROTECTED]> > wrote: >> Is there an

incorrect line reported in traceback

2008-11-30 Thread Patrick Stinson
Is there any reason why the last item in the traceback is one frame below the top of the stack? It would be great to show the real line in my editor... -- http://mail.python.org/mailman/listinfo/python-list

Re: 2.6, 3.0, and truly independent intepreters

2008-10-30 Thread Patrick Stinson
ler: >> >> On Wed, Oct 29, 2008 at 8:05 PM, Glenn Linderman <[EMAIL PROTECTED]> >> wrote: >> >>> >>> On approximately 10/29/2008 3:45 PM, came the following characters from >>> the >>> keyboard of Patrick Stinson: >>> &g

Re: 2.6, 3.0, and truly independent intepreters

2008-10-30 Thread Patrick Stinson
On Wed, Oct 29, 2008 at 4:05 PM, Glenn Linderman <[EMAIL PROTECTED]> wrote: > On approximately 10/29/2008 3:45 PM, came the following characters from the > keyboard of Patrick Stinson: >> >> If you are dealing with "lots" of data like in video or sound editing,

Re: 2.6, 3.0, and truly independent intepreters

2008-10-29 Thread Patrick Stinson
If you are dealing with "lots" of data like in video or sound editing, you would just keep the data in shared memory and send the reference over IPC to the worker process. Otherwise, if you marshal and send you are looking at a temporary doubling of the memory footprint of your app because the data

Re: 2.6, 3.0, and truly independent intepreters

2008-10-29 Thread Patrick Stinson
On Fri, Oct 24, 2008 at 12:51 PM, Andy O'Meara <[EMAIL PROTECTED]> wrote: > > Another great post, Glenn!! Very well laid-out and posed!! Thanks for > taking the time to lay all that out. > >> >> Questions for Andy: is the type of work you want to do in independent >> threads mostly pure Python? Or

Re: 2.6, 3.0, and truly independent intepreters

2008-10-29 Thread Patrick Stinson
Wow, man. Excellent post. You want a job? The gui could use PyA threads for sure, and the audio thread could use PyC threads. It would not be a problem to limit the audio thread to only reentrant libraries. This kind of thought is what I had in mind about finding a compromise, especially in the w

Re: 2.6, 3.0, and truly independent intepreters

2008-10-29 Thread Patrick Stinson
Close, I work currently for EastWest :) Well, I actually like almost everything else about CPython, considering my audio work the only major problem I've had is with the GIL. I like the purist community, and I like the code, since integrating it on both platforms has been relatively clean, and req

Re: 2.6, 3.0, and truly independent intepreters

2008-10-24 Thread Patrick Stinson
As a side note to the performance question, we are executing python code in an audio thread that is used in all of the top-end music production environments. We have found the language to perform extremely well when executed at control-rate frequency, meaning we aren't doing DSP computations, just

Re: 2.6, 3.0, and truly independent intepreters

2008-10-24 Thread Patrick Stinson
We are in the same position as Andy here. I think that something that would help people like us produce something in code form is a collection of information outlining the problem and suggested solutions, appropriate parts of the CPython's current threading API, and pros and cons of the many vario

Re: 2.6, 3.0, and truly independent intepreters

2008-10-24 Thread Patrick Stinson
I'm not finished reading the whole thread yet, but I've got some things below to respond to this post with. On Thu, Oct 23, 2008 at 9:30 AM, Glenn Linderman <[EMAIL PROTECTED]> wrote: > On approximately 10/23/2008 12:24 AM, came the following characters from the > keyboard of Christian Heimes: >>

migrating processess to avoid the GIL

2008-09-19 Thread Patrick Stinson
I need to migrate calls to CPython to another process in my C++ app to get around the GIL. Does anyone know of a good way to do this on windows and Mac? All calls and callbacks can be blocking, I just need to share some data structures. Cheers -- http://mail.python.org/mailman/listinfo/python-list

Incorrect compiler found building extension on windows

2008-09-08 Thread Patrick Stinson
I built python-2.5.1 from source using Visual Studio 2005, and am also trying to build my extension using distutils and Visual Studio 2005. Distutils complains about python being built with VS 2003, which is not on my system, and the only python binaries I have on my system are the ones I built fro

Re: Please unregister this mail-address out of mailing-list.

2008-06-05 Thread Patrick Stinson
you can unsubscribe yourself at the list info page (the same page you subscribed from) On Thu, Jun 5, 2008 at 10:22 AM, Hank @ITGroup <[EMAIL PROTECTED]> wrote: > Dear Python Staff, > I am writing this letter to unsubscribe this mail-address from python > mail-list. One problem is that this python

Re: python, dlls, and multiple instances

2008-06-04 Thread Patrick Stinson
ahh, ok. Looks like my fundamental understanding of how dlls work was a little messed up. Thanks! On Sun, Jun 1, 2008 at 10:42 AM, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: >> Is it a correct to assume that you can use multiple instances of >> python altogether if each is loaded from a separate

python, dlls, and multiple instances

2008-05-30 Thread Patrick Stinson
Is it a correct to assume that you can use multiple instances of python altogether if each is loaded from a separate dll? For instance, if I write a couple of dll/so libs, and each has python statically linked in, is it safe to assume that since dlls use their own address space then each dll would

Re: statically linking release build on mac

2008-05-22 Thread Patrick Stinson
, Patrick Stinson < [EMAIL PROTECTED]> wrote: > I get an error reporting an unfound symbol using a statically linked > release build of python2.5 on a OSX-Tiger. This works fine on leopard, where > the system default python is version 2.5.1 - the same version that I'm using > to

statically linking release build on mac

2008-05-22 Thread Patrick Stinson
I get an error reporting an unfound symbol using a statically linked release build of python2.5 on a OSX-Tiger. This works fine on leopard, where the system default python is version 2.5.1 - the same version that I'm using to link to. Sorry, I'm currently screwing with my configs and don't have a

Re: import hooks

2008-04-17 Thread Patrick Stinson
raise a new ImportError from import.c:find_module(), but I guess the behavior is desirable.. On Wed, Apr 16, 2008 at 5:17 PM, Gabriel Genellina <[EMAIL PROTECTED]> wrote: > En Wed, 16 Apr 2008 09:04:36 -0300, Patrick Stinson > <[EMAIL PROTECTED]> escribió: > > > I

Re: import hooks

2008-04-16 Thread Patrick Stinson
ppend(Importer)\n"; PyRun_SimpleString(importer_source); For both examples none of the methods are called (I set breakpoints for the C functions) but a statement like "import os" or PyImport_ImportModule("traceback") don't work. Thanks for your help On Wed, Apr 16

import hooks

2008-04-15 Thread Patrick Stinson
What's the current way to install an import hook? I've got an embedded app that has a few scripts that I want to import each other, but that are not in sys.modules. I intentionally keep them out of sys.modules because their names will not be unique across the app. They will, however, be unique betw

frozen/builtin modules and new interpreter instances

2008-04-11 Thread Patrick Stinson
So when creating a new interpreter (thread state) are you expected to re-set PyImport_FrozenModules and call yImport_ExtendInittab() again? the former seems to get corrupted between Py_Initialize() and Py_NewInterpreter(). I know that modules are not shared between interpreter instances, and it wou

Re: problem using import from PyRun_String

2008-04-11 Thread Patrick Stinson
Great, that was the answer I was looking for, thank you. I'll respond with how well it works. On Thu, Apr 10, 2008 at 12:16 AM, Gabriel Genellina <[EMAIL PROTECTED]> wrote: > En Wed, 09 Apr 2008 13:31:22 -0300, Patrick Stinson > <[EMAIL PROTECTED]> escribió: > > >

Re: problem using import from PyRun_String

2008-04-09 Thread Patrick Stinson
te: > En Tue, 08 Apr 2008 22:01:18 -0300, Patrick Stinson > <[EMAIL PROTECTED]> escribió: > > > I'm creating a module with PyModule_New(), and running a string buffer > as > > the module's text using PyRun_String and passing the module's __dict__ > t

problem using import from PyRun_String

2008-04-08 Thread Patrick Stinson
I'm creating a module with PyModule_New(), and running a string buffer as the module's text using PyRun_String and passing the module's __dict__ to locals and globals. I'm having a problem using the import statement from within PyRun_String(). It complains about "__import__ not found", which after

loading a script from text data

2008-01-10 Thread Patrick Stinson
Is it possible to load a script from it's text data, and not from a file? I'm writing a scripting engine and need to run the scripts right from the editor. cheers! -- Patrick Kidd Stinson http://www.patrickkidd.com/ http://pkaudio.sourceforge.net/ http://pksampler.sourceforge.net/ -- http://mail

Re: embedding std py and c modules

2007-12-03 Thread Patrick Stinson
Looks like statically linking the c-based modules is pretty easy, but how about the python-based modules? On Dec 3, 2007 10:06 AM, Patrick Stinson <[EMAIL PROTECTED]> wrote: > Is it possible to build python as a static library and embed all necessary > c and py modules rom the standa

embedding and setting the lib path

2007-12-03 Thread Patrick Stinson
is there a way to set the interpreter prefix without setting the program name? If you use python as a static library you will not have a bin dir and valid program name. I want to set up my app to be able to init the site using something like C:\ProgramData\Mine\python_blah_blah on windows and /Libr

embedding std py and c modules

2007-12-03 Thread Patrick Stinson
Is it possible to build python as a static library and embed all necessary c and py modules rom the standard lib in it? This would make distributing and embedded interpreter in our app MUCH simpler. thanks! -- Patrick Kidd Stinson http://www.patrickkidd.com/ http://pkaudio.sourceforge.net/ http:

python as a static library with Visual Studio 2005

2007-11-27 Thread Patrick Stinson
There doesn't seem to be any clear documentation on how to build python as a static library using Visual Studio 2005. Everything builds, links, and runs fine using python as a dll, but I get a ton of unresolved symbols using a static library. I defined Py_NO_ENABLE_SHARED=1 in the library project

Re: What's The Best Editor for python

2006-03-25 Thread Patrick Stinson
emacs google: python-mode - Original Message - From: [EMAIL PROTECTED] Date: Saturday, March 25, 2006 6:10 pm Subject: Re: What's The Best Editor for python To: python-list@python.org > > Can one of you say to me what's the best editor for > > editing the python programs( for linux or wi