On Mon, 22 Oct, Diez B. Roggisch wrote:
> Stefan Bellon wrote:
> > I can successfully build a 32-bit version in one directory and a
> > 64-bit version in another directory. What I'd like to do is to
> > build a version that has the 64-bit library in a sparcv9 director
the 64-bit library in a sparcv9 directory but shares the other
Python libraries that are ELF-code independent.
Is this possible or do I really have to install two complete but
separate Pythons although most of the files are the same?
--
Stefan Bellon
--
http://mail.python.org/mailman/listinfo/python-list
st compare for equality:
if line == 'x11':
or
print "\n".join(x for x in mylist if x == 'x11')
--
Stefan Bellon
--
http://mail.python.org/mailman/listinfo/python-list
first
parameter (like in Ada 95) or you can call the method on the object
(like in Java, C++, Python, ...) and the object is passed implicitly.
--
Stefan Bellon
--
http://mail.python.org/mailman/listinfo/python-list
On Sat, 11 Aug, Marc 'BlackJack' Rintsch wrote:
> On Sat, 11 Aug 2007 14:50:33 +0200, Stefan Bellon wrote:
> > But then, even when terminating the interpreter, __del__ is not
> > called.
>
> Because that is not guaranteed by the language reference. The reason
&
led.
When taking out the yield statement, __del__ is called again. It looks
to me that as soon as a generator function is involved in the class,
the __del__ is not called anymore.
--
Stefan Bellon
--
http://mail.python.org/mailman/listinfo/python-list
em1', 'Item2', 'Item3', 'Item4']
But I do not see an output of "gen del" which makes me think that the
destructor is not called, thus not releasing the resource. It seems I
have not completely understood how generators work ...
--
Stefan Bellon
--
http://mail.python.org/mailman/listinfo/python-list
On Sat, 11 Aug, Kay Schluehr wrote:
> On Aug 9, 1:14 am, Stefan Bellon <[EMAIL PROTECTED]> wrote:
> > Sorry, I forgot to mention that I am forced to using Python 2.4.
> It doesn't matter. You can use try...finally as well in Python 2.4.
> It's just not possible to
lse in a way that works even with Python
2.4 and can then be nicely written without cluttering up the logic
between consumer and producer?
--
Stefan Bellon
--
http://mail.python.org/mailman/listinfo/python-list
On Wed, 08 Aug, MRAB wrote:
> Simple! :-)
Sorry, I forgot to mention that I am forced to using Python 2.4.
--
Stefan Bellon
--
http://mail.python.org/mailman/listinfo/python-list
Is there a way around this? Can I add some sort of __del__() to the
generator object so that in case of an early destruction of the
generator object, the external resource is freed as well?
I'm looking forward to hearing your hints!
--
Stefan Bellon
--
http://mail.python.org/mailman/listinfo/python-list
PyRun_String functions and
execute a string with the content "execfile('filename')".
Is there a way to solve this problem with PyRun_File?
--
Stefan Bellon
--
http://mail.python.org/mailman/listinfo/python-list
On Thu, 02 Aug, Farshid Lashkari wrote:
> You cannot use PyRun_SimpleString, since it will automatically print
> and clear the error. You will need to use PyRun_String instead.
Thanks, that helps a lot!
--
Stefan Bellon
--
http://mail.python.org/mailman/listinfo/python-list
dled but raised "out of" the interpreter. So I am unsure of what you
mean with "Call python code".
When installing an excepthook (see my other posting), then I can indeed
catch all exceptions ... except for SystemExit which is the one I'm
after.
--
Stefan Bellon
--
http://mail.python.org/mailman/listinfo/python-list
First of all, I'm sorry to followup my own posting, but I can add a few
things ...
On Thu, 02 Aug, Stefan Bellon wrote:
> As in Python itself you can catch SystemExit, I think this should be
> the way to go. But how do I catch this exception from within the C
> API?
I now installe
is not the intended behaviour.
As in Python itself you can catch SystemExit, I think this should be
the way to go. But how do I catch this exception from within the C API?
Thanks in advance for any hints.
--
Stefan Bellon
--
http://mail.python.org/mailman/listinfo/python-list
I think I solved all my three questions for myself now ...
On Fri, 29 Jun, Stefan Bellon wrote:
> 1) The above code seems to work ok when using the "import" statement,
>but it does not when using the dynamic __import__ function. If
>using it that way, I get:
>
>
can I find out from which module the import
was initiated?
3) My final point is related to 2) ... if I get to the module object,
then how do I get at the source file name of that? I noticed that
when a .pyc is available, then this is preferred. I'd like to get at
the .py file itself.
... print a
... return inner
...
>>> f=outer()
>>> f()
Traceback (most recent call last):
File "", line 1, in ?
File "", line 4, in inner
UnboundLocalError: local variable 'a' referenced before assignment
--
Stefan Bellon
--
http://mail.python.org/mailman/listinfo/python-list
Stefan Bellon wrote:
> int main(void)
> {
> Py_Initialize();
> PyRun_InteractiveLoop(stdin, "");
> Py_Finalize();
> }
> How can I make use of command history when embedded Python via
> PyRun_InteractiveLoop?
Sorry to follow up my own posting ...
I fou
ractiveLoop?
Thanks a lot for your hints in advance!
--
Stefan Bellon
--
http://mail.python.org/mailman/listinfo/python-list
21 matches
Mail list logo