Python2.7 on OSX

2010-09-25 Thread Jonas Galvez
Just installed Python2.7 on my OSX Leopard with make altinstall. No missing dependencies, but I have one annoying problem: the delete key prints '^H' on the Python shell. Does anyone know how to fix that? Thanks in advance, -- Jonas -- http://mail.python.org/mailman/listinfo/python-list

Re: Python2.7 on OSX

2010-09-26 Thread Jonas Galvez
Bingo, that was it. Thanks! -- Jonas On Sat, Sep 25, 2010 at 4:05 PM, Shashwat Anand wrote: > > > On Sun, Sep 26, 2010 at 12:32 AM, Jonas Galvez wrote: > >> Just installed Python2.7 on my OSX Leopard with make altinstall. >> >> No missing dependencies, but I

[C-API] Weird sys.exc_info reference segfault

2010-10-02 Thread Jonas H.
d one (with the assignment) keeps a reference to the exc_info tuple in the function frame. The `PyThreadState_GET()->exc_{type,value,traceback}` values, however, should be the same in both cases, because the `except:` cleanup resets those to NULL, shouldn't it? Do you have any tips how to de

Re: [C-API] Weird sys.exc_info reference segfault

2010-10-03 Thread Jonas H.
F them? If not, how can I know at which point of time I can safely do the DECREF? Jonas -- http://mail.python.org/mailman/listinfo/python-list

Re: [C-API] Weird sys.exc_info reference segfault

2010-10-03 Thread Jonas H.
_refcnt=1 * Py_DECREF(start_response): CRASH I think I'll compile Python with debug support to check out what's going wrong in the second case. Jonas -- http://mail.python.org/mailman/listinfo/python-list

Re: [C-API] Weird sys.exc_info reference segfault

2010-10-04 Thread Jonas H.
On 10/03/2010 11:52 PM, Antoine Pitrou wrote: You probably have a problem in your tp_dealloc implementation. `tp_dealloc` is NULL... -- http://mail.python.org/mailman/listinfo/python-list

Re: [C-API] Weird sys.exc_info reference segfault

2010-10-04 Thread Jonas H.
On 10/04/2010 10:46 AM, Jonas H. wrote: On 10/03/2010 11:52 PM, Antoine Pitrou wrote: You probably have a problem in your tp_dealloc implementation. `tp_dealloc` is NULL... Alright, `tp_dealloc` must not be NULL because it's called by `_Py_Dealloc`. The C-API tutorial is quite conf

Re: [C-API] Weird sys.exc_info reference segfault

2010-10-05 Thread Jonas H.
On 10/04/2010 11:41 PM, Antoine Pitrou wrote: Well, it should work, but you have to call PyType_Ready() to fill in the NULL fields with default values (for those where it's necessary). Does it solve it for you? Yes, thank you! Although I do not understand which fields I have to provide. I want

Module loading trickery

2010-10-05 Thread Jonas Galvez
Is there a way to "inject" something into a module right before it's loaded? For instance, a.py defines "foo". b.py print()s "foo". I want to load b.py into a.py, but I need to let b.py know about "foo" before it can execute. Is this any way to achie

Re: Module loading trickery

2010-10-05 Thread Jonas Galvez
Thanks a million, runpy is exactly what I was looking for! I will send you a link to what I'm using it for when it's done. Then you'll understand ;) -- Jonas On Tue, Oct 5, 2010 at 1:06 PM, Thomas Jollans wrote: > On Tuesday 05 October 2010, it occurred to Jonas Galvez

Re: How to save a binary file?

2010-10-05 Thread Jonas H.
.close() So where's the problem? That code should work. Anyway, you want to have a look at with-statements. Jonas -- http://mail.python.org/mailman/listinfo/python-list

Re: [C-API] Weird sys.exc_info reference segfault

2010-10-06 Thread Jonas H.
tribute name as a PyObject * rather than as a char *. Thanks again, my fault :-) I think my problems are solved and my questions answered -- thank you so much for you patience! Jonas -- http://mail.python.org/mailman/listinfo/python-list

Re: frozendict (v0.1)

2010-10-08 Thread Jonas H.
teritems())) Only 9 lines :-) Jonas -- http://mail.python.org/mailman/listinfo/python-list

Re: frozendict (v0.1)

2010-10-08 Thread Jonas H.
he hash code does not depend # on the order in which elements are added to the set. [...] result = 0 for elt in self: result ^= hash(elt) return result Hope this helps :-) Jonas -- http://mail.python.org/mailman/listinfo/python-list

Re: Help with pointers when calling from python to C

2010-10-08 Thread Jonas H.
On 10/08/2010 05:23 PM, Carolyn MacLeod wrote: "How do I pass an integer by reference to a C function?" That's impossible in pure Python. The only thing I can think of is a wrapper in C. -- http://mail.python.org/mailman/listinfo/python-list

Re: My first Python program

2010-10-12 Thread Jonas H.
ssions (`re.compile`) * raising `Exception` rather than a subclass of it is uncommon. Hope that helps :-) Jonas -- http://mail.python.org/mailman/listinfo/python-list

Re: Reading after a symbol..

2010-10-12 Thread Jonas H.
tring that has no surrounding characters. So for example '1234' or '1234a' or 'a1234' won't be matched, but 'a1234b' will be. Hope this helps :-) Jonas -- http://mail.python.org/mailman/listinfo/python-list

Re: My first Python program

2010-10-13 Thread Jonas H.
n Python, compared to 15 seconds in shell, so...) Forget about my suggestion. As someone pointed out in a another post, regular expressions are cached anyway. I'm a bit unsure as to how to pick the right subclass, though. There are a few pointers in the Python documentation on exceptions.

Re: My first Python program

2010-10-13 Thread Jonas H.
On 10/13/2010 11:26 PM, Seebs wrote: stderr.write( "WARNING:" " Pants on fire\n") Hmm. So I just indent stuff inside the ()s or whatever? I can work with that. I think common is stderr.write("WARNING: ", "Pants on fire") or stderr.write(

Re: Minimal D

2010-10-17 Thread Jonas H.
On 10/16/2010 06:04 PM, Kruptein wrote: Hey, I've written a small "IDE". It is written in python using the python toolkit and offers an advanced text-editor, file-manager, ftp-client, sql- client(in development) and more towards the future. You definitely want to have a look at PEP8. -- http:/

Re: embarrassing class question

2010-10-21 Thread Jonas H.
ecify the attributes that shall be import with a star-import by settings __all__. In your case, you would add `__all__ = ['y']` to y.py. Jonas -- http://mail.python.org/mailman/listinfo/python-list

Re: time difference interms of day

2010-10-24 Thread Jonas H.
now datetime.timedelta(0, 14, 256614) >>> (after_few_seconds - now).seconds 14 Hope this helps :-) Jonas -- http://mail.python.org/mailman/listinfo/python-list

[ANN] aioxmpp 0.8 released

2017-02-26 Thread Jonas Wielicki
using my GPG public key [7]. best regards and happy-asyncio-ing, Jonas Wielicki [1]: https://github.com/horazont/aioxmpp [2]: https://pypi.python.org/pypi/aioxmpp [3]: https://docs.zombofant.net/aioxmpp/0.8/ [4]: https://lists.zombofant.net/mailman/listinfo/aioxmpp-devel [5]: https

[ANN] aioxmpp 0.9 released

2017-05-20 Thread Jonas Wielicki
Multi-User chat [6], whatever floats your boat. Please direct security-relevant issue reports directly to me (jo...@wielicki.name), preferably encrypted using my GPG public key [7]. best regards and happy-asyncio-ing, Jonas Wielicki [1]: https://github.com/horazont/aioxmpp [2]: https

<    1   2   3