Re: Bug in Python?

2016-02-26 Thread mentificium
On Friday, February 26, 2016 at 2:09:07 PM UTC-8, Sven R. Kunze wrote: > Hi everybody, > > I recognized the following oddity (background story: > http://srkunze.blogspot.com/2016/02/lets-go-down-rabbit-hole.html). > > Python sometimes seems not to hop back and forth between C and Python code. >

Re: Bug in Python?

2016-02-26 Thread eryk sun
On Fri, Feb 26, 2016 at 4:37 PM, Ian Kelly wrote: > So I would guess that the difference here is because one > implementation is entirely C, and the other implementation is entirely > Python. Exactly, the C implementation of siftup is only called internally. So there's no need to export it as a f

Re: Bug in Python?

2016-02-26 Thread eryk sun
On Fri, Feb 26, 2016 at 4:08 PM, Sven R. Kunze wrote: > Python sometimes seems not to hop back and forth between C and Python code. > Can somebody explain this? Normally a C extension would call PySequence_SetItem, which would call the type's sq_ass_item, which for MyList is slot_sq_ass_item. Th

Re: Request Help With Displaying XBM Image

2016-02-26 Thread Wildman via Python-list
On Fri, 26 Feb 2016 22:49:58 +0100, Peter Otten wrote: > Wildman via Python-list wrote: > It's not you, the program as you wrote it should and would show the image, > were it not for an odd quirk in how images are handled in tkinter: > > You have to keep an explicit reference of the Image to pr

Re: Bug in Python?

2016-02-26 Thread Ian Kelly
On Fri, Feb 26, 2016 at 3:08 PM, Sven R. Kunze wrote: > Python sometimes seems not to hop back and forth between C and Python code. C code as a rule tends to ignore dunder methods. Those are used to implement Python operations, not C operations. > _siftup(heap, 0)# that's C Your com

Bug in Python?

2016-02-26 Thread Sven R. Kunze
Hi everybody, I recognized the following oddity (background story: http://srkunze.blogspot.com/2016/02/lets-go-down-rabbit-hole.html). Python sometimes seems not to hop back and forth between C and Python code. Can somebody explain this? class MyList(list): count = 0 def __setitem__

Re: Request Help With Displaying XBM Image

2016-02-26 Thread Peter Otten
Wildman via Python-list wrote: > As part of a program I am working on I want to display a > 48x48 XBM image on the main window. I have done a lot > of searching for code snippets and I found what appears > to be the correct way to do it using a Label. So far I > have not been able to get it to w

Re: The Real-Time Use of Python in Data Science World!

2016-02-26 Thread Wildman via Python-list
On Fri, 26 Feb 2016 11:35:58 -0800, Anita Goyal wrote: > This course (...) What!? No peas? I like peas with spam. -- GNU/Linux user #557453 The cow died so I don't need your bull! -- https://mail.python.org/mailman/listinfo/python-list

Request Help With Displaying XBM Image

2016-02-26 Thread Wildman via Python-list
As part of a program I am working on I want to display a 48x48 XBM image on the main window. I have done a lot of searching for code snippets and I found what appears to be the correct way to do it using a Label. So far I have not been able to get it to work. I have tried different variations of

Re: The Real-Time Use of Python in Data Science World!

2016-02-26 Thread Joel Goldstick
On Fri, Feb 26, 2016 at 2:35 PM, Anita Goyal wrote: > This course will help you to expertise the usage of Python in Data Science > world. > > Carter your Python Knowledge so that it can be utilized to get the > Insights of Data using Methodologies and Techniques of Data Science... > > Objective:

The Real-Time Use of Python in Data Science World!

2016-02-26 Thread Anita Goyal
This course will help you to expertise the usage of Python in Data Science world. Carter your Python Knowledge so that it can be utilized to get the Insights of Data using Methodologies and Techniques of Data Science... Objective: Understand the concepts of Data science and Python You will be a

Reduce memory fragmentation with MALLOC_MMAP_THRESHOLD_ and MALLOC_MMAP_MAX_

2016-02-26 Thread Lorenzo Bolla
Hi all, I've been experimenting with MALLOC_MMAP_THRESHOLD_ and MALLOC_MMAP_MAX_ env variables to affect memory management in a long-running Python 2 process. See http://man7.org/linux/man-pages/man3/mallopt.3.html I got the idea from this bug report: http://bugs.python.org/issue11849 The resul

Re: subprocess startup error

2016-02-26 Thread Mark Lawrence
On 26/02/2016 15:08, Wolfgang Maier wrote: On 26.02.2016 15:57, Emile van Sebille wrote: On 2/26/2016 6:49 AM, Oscar Benjamin wrote: On 26 February 2016 at 13:30, Peter Otten <__pete...@web.de> wrote: Shweta Dinnimani wrote: i saved my file as string.py since than i'm facing this error Rena

Re: subprocess startup error

2016-02-26 Thread Wolfgang Maier
On 26.02.2016 15:57, Emile van Sebille wrote: On 2/26/2016 6:49 AM, Oscar Benjamin wrote: On 26 February 2016 at 13:30, Peter Otten <__pete...@web.de> wrote: Shweta Dinnimani wrote: i saved my file as string.py since than i'm facing this error Rename that file to something that does not clas

Re: Pyraf problem

2016-02-26 Thread Arshpreet Singh
On Thursday, 25 February 2016 20:07:52 UTC+5:30, Sapna Mishra wrote: > Dear Sir/Mam, > > I am using python for my astronomy purpose, for that I want to use PyRaf, but > strange thing is occurring that pyraf is getting open as a root but out side > my root user directory when I am typing pyraf

ANN: Wing IDE 5.1.10 released

2016-02-26 Thread Wingware
Hi, Wingware has released version 5.1.10 of Wing IDE, our cross-platform integrated development environment for the Python programming language. Wing IDE features a professional code editor with vi, emacs, visual studio, and other key bindings, auto-completion, call tips, context-sensitive a

Re: subprocess startup error

2016-02-26 Thread Emile van Sebille
On 2/26/2016 6:49 AM, Oscar Benjamin wrote: On 26 February 2016 at 13:30, Peter Otten <__pete...@web.de> wrote: Shweta Dinnimani wrote: i saved my file as string.py since than i'm facing this error Rename that file to something that does not clash with the module names in the standard library

Re: Looking for examples of using aiopg with aiohttp and non-async startup.

2016-02-26 Thread Ray Cote
Answer (obvious after a refreshing sleep): Just run a separate async pool connection prior to kicking off the aiohttp web application. The startup now looks like: async def connect(): return await aiopg.create_pool(…) if __name__ == “__main__”: loop = asyncio.get_event_loop() pool = l

Re: subprocess startup error

2016-02-26 Thread Oscar Benjamin
On 26 February 2016 at 13:30, Peter Otten <__pete...@web.de> wrote: > Shweta Dinnimani wrote: >>> >>> hello, I'm begineer to python programming.. I had installed python 3.5.1 >>> version on my windows 7 system. I was fine earlier and now when i was >>> trying the programs on string i'm facing the s

Re: Sorry, here are the details.

2016-02-26 Thread Oscar Benjamin
Please reply to the list rather than directly to me (and then you will get a quicker response from someone else). On 25 February 2016 at 17:13, Giriprasadh Raghavan wrote: > I open the setup file of python 3.5.1 and click then install button. Then I > am displayed an error that says: > > One or m

Re: Cycling through iterables diagonally

2016-02-26 Thread marco . nawijn
On Friday, February 26, 2016 at 8:44:38 AM UTC+1, Pablo Lucena wrote: > Hello, > > I am trying to accomplish the following: > > Say I have a group of 4 lists as follows: > > l1 = ['a1', 'a2', 'a3', 'a4'] > l2 = ['b1', 'b2', 'b3', 'b4'] > l3 = ['c1', 'c2', 'c3', 'c4'] > l4 = ['d1', 'd2', 'd3', 'd

Re: subprocess startup error

2016-02-26 Thread Peter Otten
Shweta Dinnimani wrote: > forgot to mention.. > > i saved my file as string.py since than i'm facing this error Rename that file to something that does not clash with the module names in the standard library, mystring.py for example, and IDLE should work again. > On Fri, Feb 26, 2016 at 6:50 P

Re: subprocess startup error

2016-02-26 Thread Shweta Dinnimani
forgot to mention.. i saved my file as string.py since than i'm facing this error On Fri, Feb 26, 2016 at 6:50 PM, Shweta Dinnimani wrote: > hi > > hello, I'm begineer to python programming.. I had installed python 3.5.1 > version on my windows 7 system. I was fine earlier and now when i was >

subprocess startup error

2016-02-26 Thread Shweta Dinnimani
hi hello, I'm begineer to python programming.. I had installed python 3.5.1 version on my windows 7 system. I was fine earlier and now when i was trying the programs on string i'm facing the subprocess startup error. IDLE is not connecting. And python shell is also not opening. I tried uninstallin

Re: How to remove the line numbers from the file in python

2016-02-26 Thread Peter Heitzer
Ganesh Pal wrote: >what would be the easiest way to remove the lines in the leading >numbers 1.e 1 ,2, 19 from this file using python ? import sys,re for line in sys.stdin: print re.sub('^\d+','',line).rstrip() -- https://mail.python.org/mailman/listinfo/python-list

Re: How to remove the line numbers from the file in python

2016-02-26 Thread Peter Otten
Ganesh Pal wrote: > what would be the easiest way to remove the lines in the leading > numbers 1.e 1 ,2, 19 from this file using python ? > > > 1 import os > 2 Suite = "Test Mail" > 3 > 4 def sendMail(x): > 5 text = x > 6 sendmail_location = "/home/prasad/onefs/share/se

How to remove the line numbers from the file in python

2016-02-26 Thread Ganesh Pal
what would be the easiest way to remove the lines in the leading numbers 1.e 1 ,2, 19 from this file using python ? 1 import os 2 Suite = "Test Mail" 3 4 def sendMail(x): 5 text = x 6 sendmail_location = "/home/prasad/onefs/share/sendmail" # sendmail location 7 p =

Re: Cycling through iterables diagonally

2016-02-26 Thread Mark Lawrence
On 26/02/2016 09:59, Peter Otten wrote: Pablo Lucena wrote: Say I have a group of 4 lists as follows: l1 = ['a1', 'a2', 'a3', 'a4'] l2 = ['b1', 'b2', 'b3', 'b4'] l3 = ['c1', 'c2', 'c3', 'c4'] l4 = ['d1', 'd2', 'd3', 'd4'] I would like to cycle through these lists "diagonally" in groups of len

Re: Cycling through iterables diagonally

2016-02-26 Thread Peter Otten
Pablo Lucena wrote: > Say I have a group of 4 lists as follows: > > l1 = ['a1', 'a2', 'a3', 'a4'] > l2 = ['b1', 'b2', 'b3', 'b4'] > l3 = ['c1', 'c2', 'c3', 'c4'] > l4 = ['d1', 'd2', 'd3', 'd4'] > > I would like to cycle through these lists "diagonally" in groups of > len(list) (in this example,

Re: Cycling through iterables diagonally

2016-02-26 Thread Jussi Piitulainen
Pablo Lucena writes: > Hello, > > I am trying to accomplish the following: > > Say I have a group of 4 lists as follows: > > l1 = ['a1', 'a2', 'a3', 'a4'] > l2 = ['b1', 'b2', 'b3', 'b4'] > l3 = ['c1', 'c2', 'c3', 'c4'] > l4 = ['d1', 'd2', 'd3', 'd4'] > > I would like to cycle through these lists "