ctypes - python2.7.3 vs python3.2.3

2012-08-28 Thread Rolf
ctypes works as I would expect with python2.7.3. However, when I upgrade to python3.2.3 things don't seem to work right. Look below for details. I am not sure where I am going wrong. Shared Library == #include #include extern "C" { int main(); uint32_t myfunction (char **);

How to install setuptools...egg?

2009-08-30 Thread Rolf
Hi, I would like to install setuptools for Python2.6 on Windows. Unfortunately I could only find setuptools-0.6c9-py2.6.egg but no *.exe for Python2.6. And as far as I understand I need setuptools to install a Python egg. I would be very appreciative for any help. Regards Rolf -- http

Re: How to install setuptools...egg?

2009-08-30 Thread Rolf
-py2.6.egg and ez_setup.py run the command python ez_setup.py 5. Add C:\Python26\Scripts to your path to run easy_install Mike Thank you very much. Your recipe did the job. Rolf -- http://mail.python.org/mailman/listinfo/python-list

Compile python code into a dll

2012-09-10 Thread Rolf Wester
ing C/C++ with Python. I would be very appreciative for any help. Thank you in advance Regards Rolf -- http://mail.python.org/mailman/listinfo/python-list

Re: Compile python code into a dll

2012-09-11 Thread Rolf Wester
Thank you all for your help. I'm going to try Cython. Regards Rolf On 10/09/12 14:15, Rolf Wester wrote: Hi, I have Python code that I would like to compile into a dll (I have to deliver a C/C++ callable dll and I don't want to reimpelement the Python code in C/C++). It's no

exec

2012-03-01 Thread Rolf Wester
Error: sqr() takes exactly 2 arguments (1 given)). Is there a possibility to define methods using exec and getting normal behavior? I would be very appreciative for any help. With kind regards Rolf Wester -- http://mail.python.org/mailman/listinfo/python-list

Re: exec

2012-03-01 Thread Rolf Wester
would mean quite a lot of writing I tried to do it with exec. With kind regards Rolf Wester -- http://mail.python.org/mailman/listinfo/python-list

Re: exec

2012-03-01 Thread Rolf Wester
Thank you, that really made things much easier and admittedly much less nasty too. Regards Rolf On 01/03/12 18:14, Peter Otten wrote: > Rolf Wester wrote: > >> The reason to use exec is just laziness. I have quite a lot of classes >> representing material data and every cla

starting Python 3.10.4 64-bit

2022-05-27 Thread Rolf Blum
Hallo, I installed Python 3.10.4 64-bit successfully. I Also checked in the Setup to add it to the path. In the win 8.1 console python 3.7 is started when I enter: python. This also happened after a reboot and after a repair with the Setup. How do I start the python console for 3.10.4? Thank

Re: Windows Gui Frontend

2023-04-03 Thread Rolf Blum
Am 02.04.2023 um 01:13 schrieb Alan Gauld: On 01/04/2023 18:21, Jim Schwartz wrote: Are there any ide’s that will let me design the screen and convert it to python? There is nothing remotely like the VB or Delphi GUI builders. The latest Delphi versions themself can create GUIs for Python. I

Re: Promoting Python

2016-04-06 Thread Rolf Camps
Op 07-04-16 om 00:03 schreef Marko Rauhamaa: Once you look up an object method, it doesn't have a self argument. The self argument is cooked up for the benefit of the function definition in the class. IOW, if I have this class: class A: def f(self): print("f") and

Re: deque is not a subclass of Sequence.

2016-04-07 Thread Rolf Camps
On 2016-04-07 11:12, Peter Otten wrote: Antoon Pardon wrote: Second tryal, I hope the formatting doesn't get messed up now Playing around with the collections and collections.abc modules in python3.4 I stumbled upon the following: from collections.abc import Sequence from collections impor

Python extension module segmentation fault

2005-10-21 Thread Rolf Wester
: main (python.c:23) ==15792== ==15792== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 8093 from 7) ==15792== I would be very appreciative for any help. With kind regards Rolf Wester -- http://mail.python.org/mailman/listinfo/python-list

Re: Python extension module segmentation fault

2005-10-21 Thread Rolf Wester
Robert Kern wrote: > > > Did you call import_array() in init_mytest()? > No I didn't. Thank you very much for your help. Now it works. With kind regards Rolf Wester -- http://mail.python.org/mailman/listinfo/python-list

run region in IDLE

2005-01-02 Thread Rolf Wester
a way of doing it like it's possible with Emacs and Python. Is there any way of doing this? Regards Rolf Wester -- http://mail.python.org/mailman/listinfo/python-list

Embedding a restricted python interpreter

2005-01-04 Thread Rolf Magnus
Hi, I would like to embed a python interpreter within a program, but since that program would be able to automatically download scripts from the internet, I'd like to run those in a restricted environment, which basically means that I want to allow only a specific set of modules to be used by the

IDLE question

2004-12-26 Thread Rolf Wester
Hi, I would like to use IDLE as interactively as I can with Emacs. In Emacs I can send a marked region to the Python interpreter. Is there any way to do the same thing with IDLE? Thank you in advance Regards Rolf Wester -- http://mail.python.org/mailman/listinfo/python-list

Re: simultaneous copy to multiple media

2005-03-20 Thread Rolf Zwart
Swaroop C H wrote: [...] If you are using *nix, maybe you can use the `tee` command[1] and redirect the file to different places. For example, cat | tee file1 | tee file2 > file3 On Unixes I know, only 1 process is needed: /dev/null It does work! ** Rolf I haven't tried it out but it sho

Re: what does 'a=b=c=[]' do

2011-12-22 Thread Rolf Camps
>>> return [] >>> a_list = return_list() >>> a_list [] >>> a_list.append(3) >>> a_list [3] >>> b_list = return_list() >>> b_list >>&g

Strange behaviour of Numeric Float32 array?

2006-07-12 Thread Rolf Wester
t32 version h is changed? Thank you in advance. Regards Rolf -- http://mail.python.org/mailman/listinfo/python-list

concatenating numpy arrays

2006-10-31 Thread Rolf Wester
Hi, I want to concatenate two numpy arrays with shape (n1,n2) and (n1,n3) into a single array with shape (n1,n2+n3). I guess there is an elegant way to do this but I couldn't figure it out. So any help is very much appreciated. Regards Rolf -- http://mail.python.org/mailman/listinfo/p

Is there a Python __LINE__ ?

2006-07-06 Thread Rolf Wester
Hi, is there a Python aquivalent to the C __LINE__? Thank you in advance Regards Rolf -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there a Python __LINE__ ?

2006-07-06 Thread Rolf Wester
Thank you very much for your help. Regards Rolf -- http://mail.python.org/mailman/listinfo/python-list

plotting with Python

2005-05-30 Thread Rolf Wester
elp. With kind regards Rolf Wester -- http://mail.python.org/mailman/listinfo/python-list

Re: plotting with Python

2005-05-31 Thread Rolf Wester
Philippe C. Martin wrote: > Look at wxPython > > Regards, > > Philippe > > I will do it, thank you for your reply. Rolf > > Rolf Wester wrote: > > >>Hi, >> >>I have a Python console application that is intended to be used >>intera

Re: plotting with Python

2005-05-31 Thread Rolf Wester
[EMAIL PROTECTED] wrote: > We use dislin in my lab. I don't think it's GPL... > > http://www.linmpi.mpg.de/dislin > Hi, thank you for your reply. I tried dislin but this didn't work very well for me. But I will try it again. Regards Rolf -- http://mail.python.

Memory problem

2007-11-15 Thread Rolf Wester
ary a little bit but does not increase on average whereas the memory usage does. The number of garbage objects (len(gc.garbage()) is zero. This is a very severe problem for my application, so I would be very appreciative for any help. With kind regards Rolf -- http://mail.python.org/mailman/lis

Re: Memory problem

2007-11-15 Thread Rolf Wester
ve me hint on what I could try. Thank you in advance Rolf Diez B. Roggisch wrote: > Rolf Wester wrote: > >> Hi, >> >> I have a strange (for me) memory problem. When running a loop in a >> Python program memory usage increases from about 4% up to 100%. I do a >&g

Re: Memory problem

2007-11-16 Thread Rolf Wester
of A not a single number and append obviously appended the whole array not just a single element array. And n is about 64000. So sorry for bothering you with that stupid fault. Regards Rolf -- http://mail.python.org/mailman/listinfo/python-list

Tool for translating Matlab to Python?

2007-12-04 Thread Rolf Wester
Hi, is there a tool to automatically translate Matlab source to Python/numpy code? Regards Rolf -- http://mail.python.org/mailman/listinfo/python-list

Strange constructor behaviour (or not?)

2006-04-28 Thread Rolf Wester
or to create a new empty list every time it is called? Thanks in advance Rolf Wester -- http://mail.python.org/mailman/listinfo/python-list

plotting in python 3

2010-04-06 Thread Rolf Camps
Hi, What's the easiest way to plot graphs in python 3.x? Ís there a package? Quality doesn't really matter. Thanks, Rolf signature.asc Description: Dit berichtdeel is digitaal ondertekend -- http://mail.python.org/mailman/listinfo/python-list

Re: plotting in python 3

2010-04-06 Thread Rolf Camps
Op dinsdag 06-04-2010 om 14:55 uur [tijdzone -0500], schreef Christopher Choi: > On Tue, 06 Apr 2010 21:23:34 +0200, Rolf Camps wrote: > > > Hi, > > > > What's the easiest way to plot graphs in python 3.x? Ís there a package? > > Quality doesn't reall

C-extension 2 times slower than exe

2009-06-23 Thread Rolf Wester
anyone know what could be the reason for this behaviour? Thank you in advance Rolf -- http://mail.python.org/mailman/listinfo/python-list

Re: C-extension 2 times slower than exe

2009-06-23 Thread Rolf Wester
Philip Semanchuk wrote: > > On Jun 23, 2009, at 9:51 AM, Rolf Wester wrote: > >> Hi, >> >> I have a C++ program that I would like to steer using Python. I made the >> wrapper using swig and linked the code (without the main function) into >> a shared objec

Re: C-extension 2 times slower than exe

2009-06-24 Thread Rolf Wester
m0.160s 2) time used = 2.72 real0m3.454s user0m2.648s sys 0m0.164s It seems that there is an overhead of about 2 secs within the C++-code. I'm going to try this out with a problem that takes much more time than the present one. Regards Rolf Carl Banks wrote: > On Jun 23, 7:20 am

Re: python scripts with IIS

2008-01-19 Thread Rolf van de Krol
Adding the following lines before your print statement should do the trick. IIS complains about the headers, so adding headers should help. print "Content-Type: text/html" # HTML is following print # blank line, end of headers william paul wrote: > > Hello:

Re: stdin, stdout, redmon

2008-01-21 Thread Rolf van de Krol
According to various tutorials this should work. |import sys data = sys.stdin.readlines() print "Counted", len(data), "lines."| Please use google before asking such questions. This was found with only one search for the terms 'python read stdin' Rolf Bernard

Re: stdin, stdout, redmon

2008-01-21 Thread Rolf van de Krol
e2'] Just plain simple and just works. Rolf Bernard Desnoues wrote: > Rolf van de Krol a écrit : > >> According to various tutorials this should work. >> >> >> |import sys >> data = sys.stdin.readlines() >> print "Counted", len(data

Re: stdin, stdout, redmon

2008-01-22 Thread Rolf van de Krol
Well, that's at least weird. I did test my code with Python 2.5 on Win XP, using the command prompt. But testing it with IDLE gives exactly the same error Bernard has. So apparently STDIN can't be accessed with IDLE. Rolf John Machin wrote: > > Excuse me, gentlemen, may I

Re: Executing other python code

2008-01-28 Thread Rolf van de Krol
AFAIK this can't be done with just python. You can use the C API of Python to achieve this. I don't know the details of that, but I guess you will need this (http://docs.python.org/api/api.html). Rolf Tim Rau wrote: > I'm working on a game, and I'd like players to

Re: [2.4.2/Linux] Getting Python to fork?

2008-02-04 Thread Rolf van de Krol
To create a deamon, you indeed need to fork two times. For more information and a working example see: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/278731 . I'm quite sure this works, because I used it several times to create a deamon. Jon Ribbens wrote: > On 2008-02-04, Christian H

Re: Write ooxml .ods (spreadsheat) from python?

2008-02-13 Thread Rolf van de Krol
own private version of python, which would not help me. > Google is your friend. For example this: http://www.oooforum.org/forum/viewtopic.phtml?p=56037#56037 It seems like that guy found the way to go for your problem. Rolf -- http://mail.python.org/mailman/listinfo/python-list

Re: Reading a keypress

2008-02-25 Thread Rolf van de Krol
wyleu wrote: > Aaah it doesn't work from idle but it does from the command line... > > You are right. You can't read STDIN from IDLE. There has been a topic about that before: http://groups.google.com/group/comp.lang.python/browse_thread/thread/9f9c90cfe52378fe -- http://mail.python.org/mail

Re: Is this valid ?

2008-03-20 Thread Rolf van de Krol
John Machin wrote: > Of course. You can chain comparisons as much as you like and is > (semi-)sensible, e.g. > Hmm, 'of course' is not the correct word for it. Although the Stef Mientki would probably be able to find it in the documentation it is not as simple as you might think. Most language