Re: Create xml with elementtree ET and xml escaping

2012-12-15 Thread Stefan Behnel
nenad.ci...@gmail.com, 12.12.2012 03:19: > Il giorno martedì 11 dicembre 2012 20:59:54 UTC+1, MRAB ha scritto: >> >>> Since I have also the need to sign the XML I need the ability to create xml >>> but without xml escaping (unescaped data are signed). >> >> XML with the escaping isn't valid XML. >

sum returns numpy.float64 when applied to a sequence of numpy.uint64

2012-12-15 Thread suzaku
I came across this question on StackOverflow today: http://stackoverflow.com/questions/13890451/why-numpy-sum-returns-a-float64-instead-of-an-uint64-when-adding-elements-of-a-g I'm not familiar with `numpy` but I'm curious about this, so I started doing some experiments. This is what I have dis

Re: What are the minimum requirements to get a job in?

2012-12-15 Thread Wolfgang Strobl
Christian Heimes : >To be fair, memcpy() is a pretty simple function. This, of course, depends on the target architecture. See for example or >It can be implemented >in just about

Re: What are the minimum requirements to get a job in?

2012-12-15 Thread Chris Angelico
On Sat, Dec 15, 2012 at 10:29 PM, Wolfgang Strobl wrote: > Christian Heimes : > >>To be fair, memcpy() is a pretty simple function. > > This, of course, depends on the target architecture. See for example > or >

Pexpect and buffering

2012-12-15 Thread jim . hefferon
Hello, I'm trying to use pexpect to grab interactions with Python's REPL. I am having trouble with tracebacks. Possibly it is related to buffering (hence the subject line) but I admit that's a guess. At the end of this message is a minimal example program. It feeds three commands to a pytho

Lost in Black-jack

2012-12-15 Thread Son Tung Nguyen Trong
I'm stuck in Phase 1- Get_value method and deal_card in Back-jack project and the course in Coursea as well :(. I just returned and working on it, this is what I've done so far. Can you guys help me? I really wanna accomplish this course. http://www.codeskulptor.org/#user7-xlgwHlbg4O-0.py --

Lost in Black-jack

2012-12-15 Thread Son Tung Nguyen Trong
I'm stuck in Phase 1- Get_value method and deal_card in Back-jack project and the course in Coursea as well :(. I just returned and working on it, this is what I've done so far. Can you guys help me? I really wanna accomplish this course. http://www.codeskulptor.org/#user7-xlgwHlbg4O-0.py --

Re: Lost in Black-jack

2012-12-15 Thread Chris Angelico
On Sat, Dec 15, 2012 at 11:47 PM, Son Tung Nguyen Trong wrote: > I'm stuck in Phase 1- Get_value method and deal_card in Back-jack project and > the course in Coursea as well :(. I just returned and working on it, this is > what I've done so far. Can you guys help me? I really wanna accomplish t

Re: Lost in Black-jack

2012-12-15 Thread Son Tung Nguyen Trong
Vào 20:27:42 UTC+7 Thứ bảy, ngày 15 tháng mười hai năm 2012, Chris Angelico đã viết: > On Sat, Dec 15, 2012 at 11:47 PM, Son Tung Nguyen Trong > > wrote: > > > I'm stuck in Phase 1- Get_value method and deal_card in Back-jack project > > and the course in Coursea as well :(. I just returned an

Re: Lost in Black-jack

2012-12-15 Thread Chris Angelico
On Sun, Dec 16, 2012 at 1:42 AM, Son Tung Nguyen Trong wrote: > Vào 20:27:42 UTC+7 Thứ bảy, ngày 15 tháng mười hai năm 2012, Chris Angelico > đã viết: >> On Sat, Dec 15, 2012 at 11:47 PM, Son Tung Nguyen Trong >> >> wrote: >> >> > I'm stuck in Phase 1- Get_value method and deal_card in Back-jack

Re: What package to use for certificate manipulation (signing, hashing)

2012-12-15 Thread Nenad Cikic
I have managed to sign xml so I am reporting here in case some else needs this info.Also if someone more experienced see some possible improvment please leave a note. So my input is a pfx file. I am forced to use both pyopeenssl and m2crypto. I am using PyOpenssl to extract certificate and privat

About UNIX shell trap, any relative function in Python ?

2012-12-15 Thread moonhkt
Hi All Machine : AIX 5.3 Python : 2.6.2 In UNIX have, trap to run defined CLEAN_UP function. When HUP INT KILL STOP TERM will run CLEAN_UP function. trap 'echo "\n\nProcessing Clean up"; CLEAN_UP; exit' HUP INT KILL STOP TERM Any relative function in Python ? moonhkt -- http://mail.python.o

Re: About UNIX shell trap, any relative function in Python ?

2012-12-15 Thread Chris Angelico
On Sun, Dec 16, 2012 at 2:34 AM, moonhkt wrote: > > Hi All > > Machine : AIX 5.3 > Python : 2.6.2 > > In UNIX have, trap to run defined CLEAN_UP function. When HUP INT > KILL STOP TERM will run CLEAN_UP function. > > trap 'echo "\n\nProcessing Clean up"; CLEAN_UP; exit' HUP INT KILL > STOP TERM >

Re: About UNIX shell trap, any relative function in Python ?

2012-12-15 Thread Chris Angelico
On Sun, Dec 16, 2012 at 3:04 AM, Chris Angelico wrote: > On Sun, Dec 16, 2012 at 2:34 AM, moonhkt wrote: >> >> Hi All >> >> Machine : AIX 5.3 >> Python : 2.6.2 > > Yep! Check out the 'signal' module: > > http://docs.python.org/3.3/library/signal.html Or, since you're working with 2.6.2: http://

[ANN] OpenOpt Suite release 0.43

2012-12-15 Thread dmitrey15
Hi all, I'm glad to inform you about new OpenOpt release 0.43 (2012-Dec-15): * Many improvements for solver interalg * Some improvements for FuncDesigner kernel * FuncDesigner stochastic addon now can handle some problems with gradient-based NLP / NSP solvers * Many minor improv

Re: About UNIX shell trap, any relative function in Python ?

2012-12-15 Thread moonhkt
On 12月16日, 上午12時05分, Chris Angelico wrote: > On Sun, Dec 16, 2012 at 3:04 AM, Chris Angelico wrote: > > On Sun, Dec 16, 2012 at 2:34 AM, moonhkt wrote: > > >> Hi All > > >> Machine : AIX 5.3 > >> Python : 2.6.2 > > > Yep! Check out the 'signal' module: > > >http://docs.python.org/3.3/library/sig

need some help with unexpected signal exception when using input from a thread (Pypy 1.9.0 on osx/linux)

2012-12-15 Thread Irmen de Jong
Hi. Using Pypy 1.9.0. Importing readline. Using a background thread to get input() from stdin. It then crashes with: File "/usr/local/Cellar/pypy/1.9/lib_pypy/pyrepl/unix_console.py", line 400, in restore signal.signal(signal.SIGWINCH, self.old_sigwinch) ValueError: signal() must be called

problem with web browser module

2012-12-15 Thread Eric Johansson
I need to be able to invoke a specific webpage with Internet Explorer. If the browser is not up with that page, I needed to come up with that page. If the browser is already up, I only need to bring that browser and page to the top of the window piles. When I use the web browser module today,

Is there a quick & accurate way to test a python install?

2012-12-15 Thread Gene Heskett
Greetings; I had an app that is a heavy user of python crash on exit earlier today, and ever since, the app complains it can't find something in the python tree, and eventually the app exits. The leading few lines of the dmesg report are: Starting LinuxCNC... redis server started as: 'redis-se

[no subject]

2012-12-15 Thread Dustin Guerri
Hi there, I'm new to Python and to programming. is this the right place for me to post a beginner question on Python use ? Many thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re:

2012-12-15 Thread Chris Angelico
On Sun, Dec 16, 2012 at 12:49 PM, Dustin Guerri wrote: > Hi there, > > I'm new to Python and to programming. is this the right place for me to > post a beginner question on Python use ? Possibly! Depends on the question. You may also want to check out the python-tutor list, which works in parall

Re:

2012-12-15 Thread Benjamin Kaplan
On Sat, Dec 15, 2012 at 5:49 PM, Dustin Guerri wrote: > > Hi there, > > I'm new to Python and to programming. is this the right place for me to > post a beginner question on Python use ? > > Many thanks. > You could post questions here, but it would be better to use the Python-tutor list for tha

Re: Is there a quick & accurate way to test a python install?

2012-12-15 Thread Terry Reedy
On 12/15/2012 8:38 PM, Gene Heskett wrote: see 26.11.2. Running tests using the command-line interface for your version. Note that there are a few errors all the time, at least when testing a user installation on windows, and you will have to hit return a few times to go past some tests meant t

Re: problem with web browser module

2012-12-15 Thread Terry Reedy
On 12/15/2012 6:11 PM, Eric Johansson wrote: I need to be able to invoke a specific webpage with Internet Explorer. If the browser is not up with that page, I needed to come up with that page. If the browser is already up, I only need to bring that browser and page to the top of the window piles.

Re: Is there a quick & accurate way to test a python install?

2012-12-15 Thread Gene Heskett
On Saturday 15 December 2012 21:19:37 Terry Reedy did opine: > On 12/15/2012 8:38 PM, Gene Heskett wrote: > > see > 26.11.2. I'm not a python guru, Terry, so you will have to expand on this 26.11.2. Thanks > Running tests using the command-line interface > for your version. Note that there are

Re: Is there a quick & accurate way to test a python install?

2012-12-15 Thread Terry Reedy
On 12/15/2012 9:21 PM, Gene Heskett wrote: On Saturday 15 December 2012 21:19:37 Terry Reedy did opine: On 12/15/2012 8:38 PM, Gene Heskett wrote: see 26.11.2. I'm not a python guru, Terry, so you will have to expand on this 26.11.2. http://docs.python.org/3/library/test.html#running-tests

Re: Is there a quick & accurate way to test a python install?

2012-12-15 Thread Gene Heskett
On Saturday 15 December 2012 21:52:00 Terry Reedy did opine: > On 12/15/2012 9:21 PM, Gene Heskett wrote: > > On Saturday 15 December 2012 21:19:37 Terry Reedy did opine: > >> On 12/15/2012 8:38 PM, Gene Heskett wrote: > >> > >> see > >> 26.11.2. > > > > I'm not a python guru, Terry, so you will

Re: Is there a quick & accurate way to test a python install?

2012-12-15 Thread Gene Heskett
On Saturday 15 December 2012 22:07:54 Terry Reedy did opine: > On 12/15/2012 9:21 PM, Gene Heskett wrote: > > On Saturday 15 December 2012 21:19:37 Terry Reedy did opine: > >> On 12/15/2012 8:38 PM, Gene Heskett wrote: > >> > >> see > >> 26.11.2. > > > > I'm not a python guru, Terry, so you will

Re: Pexpect and buffering

2012-12-15 Thread Chris Rebert
On Dec 15, 2012 4:51 AM, wrote: > > Hello, > > I'm trying to use pexpect to grab interactions with Python's REPL. I am having trouble with tracebacks. Possibly it is related to buffering (hence the subject line) but I admit that's a guess. Why are you doing this in the first place? Why invoke a

Re: Is there a quick & accurate way to test a python install?

2012-12-15 Thread Terry Reedy
On 12/15/2012 9:59 PM, Gene Heskett wrote: This is 2.6, on ubuntu-10.04.4 LTS gene@lathe:/usr/lib/python2.6/test$ python -m test.regrtest That should be the right incantation for 2.6. test_grammar test_grammar skipped -- No module named test_grammar test_opcodes test_opcodes skipped -- No

Re: need some help with unexpected signal exception when using input from a thread (Pypy 1.9.0 on osx/linux)

2012-12-15 Thread Dieter Maurer
Irmen de Jong writes: > Using Pypy 1.9.0. Importing readline. Using a background thread to get > input() from > stdin. It then crashes with: > > File "/usr/local/Cellar/pypy/1.9/lib_pypy/pyrepl/unix_console.py", line > 400, in restore > signal.signal(signal.SIGWINCH, self.old_sigwinch) >