From noufal at gmail.com Sun Aug 1 06:36:37 2010 From: noufal at gmail.com (Noufal Ibrahim) Date: Sun, 01 Aug 2010 10:06:37 +0530 Subject: [BangPypers] pycon hacksessions? In-Reply-To: (Zubin Mithra's message of "Sun, 1 Aug 2010 01:13:10 +0530") References: Message-ID: <87r5ij2bl6.fsf@gmail.com> Zubin Mithra writes: [...] > Is there anyway a sprint could be hosted during the conference? > > There is a lot of manpower in a conference such as Pycon-India and a lot > could be achieved in a little time by hosting such a sprint. At the very > least, it'll turn out to be a chance to kickstart one's contribution to > Python. > > Also a typo in my earlier mail. Its PSF thats sponsoring the talks, not > Pycon. [...] Sprints take time. You'll have to have one or two people REALLY good at the project and a few others who are good with Python and enthusiastic about helping. As Anand mentioned earlier, you have to walk before you can sprint and that seems to be the pace at which we're moving here in India right now. The idea is interesting though. Let's see if we can cook something up.. -- From zubin.mithra at gmail.com Sun Aug 1 08:30:33 2010 From: zubin.mithra at gmail.com (Zubin Mithra) Date: Sun, 1 Aug 2010 12:00:33 +0530 Subject: [BangPypers] pycon hacksessions? In-Reply-To: <87r5ij2bl6.fsf@gmail.com> References: <87r5ij2bl6.fsf@gmail.com> Message-ID: On Sun, Aug 1, 2010 at 10:06 AM, Noufal Ibrahim wrote: > Zubin Mithra writes: > > > [...] > > > Is there anyway a sprint could be hosted during the conference? > > > > There is a lot of manpower in a conference such as Pycon-India and a lot > > could be achieved in a little time by hosting such a sprint. At the very > > least, it'll turn out to be a chance to kickstart one's contribution to > > Python. > > > > Also a typo in my earlier mail. Its PSF thats sponsoring the talks, not > > Pycon. > > [...] > > Sprints take time. True. At least 6 hours for good results, I'd say. > You'll have to have one or two people REALLY good at > the project and a few others who are good with Python and enthusiastic > about helping. > I was wondering if any of the speakers would be interested in taking the lead. Cheers! zm From noufal at gmail.com Sun Aug 1 09:33:53 2010 From: noufal at gmail.com (Noufal Ibrahim) Date: Sun, 01 Aug 2010 13:03:53 +0530 Subject: [BangPypers] pycon hacksessions? In-Reply-To: (Zubin Mithra's message of "Sun, 1 Aug 2010 12:00:33 +0530") References: <87r5ij2bl6.fsf@gmail.com> Message-ID: <874ofe3hy6.fsf@gmail.com> Zubin Mithra writes: [...] > I was wondering if any of the speakers would be interested in taking > the lead. [...] I'm not sure. I do know that Diptanu who proposed the rapidSMS related talk was interested doing a sprint on rapidSMS. With the discussion at the outset on infogami vs. fossconf, there was someone who mailed me about a sprint on fossconf. I'm not sure we'll have enough time in 2 days to do anything substantial though. I suppose if we anticipated this kind of enthusiasm, we would have made it a 3 day event. It will be hard to get the venue for that now though. -- From orsenthil at gmail.com Sun Aug 1 09:34:14 2010 From: orsenthil at gmail.com (Senthil Kumaran) Date: Sun, 1 Aug 2010 13:04:14 +0530 Subject: [BangPypers] pycon hacksessions? In-Reply-To: References: <87r5ij2bl6.fsf@gmail.com> Message-ID: <20100801073414.GH17150@remy> On Sun, Aug 01, 2010 at 12:00:33PM +0530, Zubin Mithra wrote: > > I was wondering if any of the speakers would be interested in taking the > lead. If you would like hack around. Bring in your laptop and if the connectivity is good and we find some place, we can get together and fix a couple of bugs. Game? -- Senthil  *** System shutdown message from root *** System going down in 60 seconds From zubin.mithra at gmail.com Sun Aug 1 09:46:04 2010 From: zubin.mithra at gmail.com (Zubin Mithra) Date: Sun, 1 Aug 2010 13:16:04 +0530 Subject: [BangPypers] pycon hacksessions? In-Reply-To: <20100801073414.GH17150@remy> References: <87r5ij2bl6.fsf@gmail.com> <20100801073414.GH17150@remy> Message-ID: On Sun, Aug 1, 2010 at 1:04 PM, Senthil Kumaran wrote: > On Sun, Aug 01, 2010 at 12:00:33PM +0530, Zubin Mithra wrote: > > > > I was wondering if any of the speakers would be interested in taking the > > lead. > > If you would like hack around. Bring in your laptop and if the > connectivity is good and we find some place, we can get together and > fix a couple of bugs. Game? > > Cool. I was wondering if we could also have a small session to port packages over to Python3k. I had a small discussion at SO about this, I have'nt mailed python-dev regarding this yet. http://stackoverflow.com/questions/3270332/py3k-libraries-porting zm From zubin.mithra at gmail.com Sun Aug 1 09:43:03 2010 From: zubin.mithra at gmail.com (Zubin Mithra) Date: Sun, 1 Aug 2010 13:13:03 +0530 Subject: [BangPypers] pycon hacksessions? In-Reply-To: <874ofe3hy6.fsf@gmail.com> References: <87r5ij2bl6.fsf@gmail.com> <874ofe3hy6.fsf@gmail.com> Message-ID: On Sun, Aug 1, 2010 at 1:03 PM, Noufal Ibrahim wrote: > Zubin Mithra writes: > > > [...] > > > I was wondering if any of the speakers would be interested in taking > > the lead. > > [...] > > I'm not sure. I do know that Diptanu who proposed the rapidSMS > related talk was interested doing a sprint on rapidSMS. > > With the discussion at the outset on infogami vs. fossconf, there was > someone who mailed me about a sprint on fossconf. > > I'm not sure we'll have enough time in 2 days to do anything substantial > though. > > I suppose if we anticipated this kind of enthusiasm, we would have made > it a 3 day event. It will be hard to get the venue for that now though. > > Yes, I understand that making such a quick decision when the event is just a month away is not easy. Maybe hosting a formal sprint might be impractical at this point, but could an informal one(informal in the sense that it could be hosted the day just after Pycon) be conducted? Anyone from Bangalore willing to take the lead on this one? zm From orsenthil at gmail.com Sun Aug 1 10:27:57 2010 From: orsenthil at gmail.com (Senthil Kumaran) Date: Sun, 1 Aug 2010 13:57:57 +0530 Subject: [BangPypers] pycon hacksessions? In-Reply-To: References: <87r5ij2bl6.fsf@gmail.com> <20100801073414.GH17150@remy> Message-ID: <20100801082757.GA25400@remy> On Sun, Aug 01, 2010 at 01:16:04PM +0530, Zubin Mithra wrote: > > > Cool. I was wondering if we could also have a small session to port packages > over to Python3k. I had a small discussion at SO about this, I have'nt > mailed python-dev regarding this yet. > > http://stackoverflow.com/questions/3270332/py3k-libraries-porting Okay Good. But just as I said, please be ready with "what you want to work on" and we can get started. Again, this is purely for interest's sake and to have little extra fun, please don't blow up. -- Senthil From zubin.mithra at gmail.com Sun Aug 1 11:07:17 2010 From: zubin.mithra at gmail.com (Zubin Mithra) Date: Sun, 1 Aug 2010 14:37:17 +0530 Subject: [BangPypers] pycon hacksessions? In-Reply-To: <20100801082757.GA25400@remy> References: <87r5ij2bl6.fsf@gmail.com> <20100801073414.GH17150@remy> <20100801082757.GA25400@remy> Message-ID: On Sun, Aug 1, 2010 at 1:57 PM, Senthil Kumaran wrote: > On Sun, Aug 01, 2010 at 01:16:04PM +0530, Zubin Mithra wrote: > > > > > Cool. I was wondering if we could also have a small session to port > packages > > over to Python3k. I had a small discussion at SO about this, I have'nt > > mailed python-dev regarding this yet. > > > > http://stackoverflow.com/questions/3270332/py3k-libraries-porting > > > Okay Good. But just as I said, please be ready with "what you want to > work on" and we can get started. > Great! I'll keep in touch. > > Again, this is purely for interest's sake and to have little extra fun, > please don't blow up. > Of course. zm From mbaiju at zeomega.com Sun Aug 1 11:19:42 2010 From: mbaiju at zeomega.com (Baiju M) Date: Sun, 1 Aug 2010 14:49:42 +0530 Subject: [BangPypers] pycon hacksessions? In-Reply-To: <20100801082757.GA25400@remy> References: <87r5ij2bl6.fsf@gmail.com> <20100801073414.GH17150@remy> <20100801082757.GA25400@remy> Message-ID: Hi, I am interested to sprint on the project I am working on ( http://bluebream.zope.org ) . But we don't have other active contributors from India. I can also mentor, if anyone interested. So, if anyone interested, please contact me offlist. You can also add your name here: http://wiki.zope.org/bluebream/BangaloreSprintAtPyCONIndia2010 FYI, We had BlueBream (Zope 3) sprint conducted here in Bangalore long back (2003): http://wiki.zope.org/zope3/BangaloreSprint . So, this is going to be the second sprint. Regards, Baiju M From zubin.mithra at gmail.com Sun Aug 1 11:35:48 2010 From: zubin.mithra at gmail.com (Zubin Mithra) Date: Sun, 1 Aug 2010 15:05:48 +0530 Subject: [BangPypers] pycon hacksessions? In-Reply-To: References: <87r5ij2bl6.fsf@gmail.com> <20100801073414.GH17150@remy> <20100801082757.GA25400@remy> Message-ID: Hi Baiju, Hi, > > I am interested to sprint on the project I am working on ( > http://bluebream.zope.org ) . But we don't have other active > contributors from India. I can also mentor, if anyone interested. So, > if anyone interested, please contact me offlist. You can also add > your name here: > http://wiki.zope.org/bluebream/BangaloreSprintAtPyCONIndia2010 Cool! Could you put up a task-list of some sort which you would like people to work on(and complete in under a maximum of 3-5 hours)? Details about the version control you prefer/use and the workflow you have in mind could also help everyone on this ML get an insight on what exactly needs to be done. It would be great if you could provide those details. Cheers! zm From anand.shashwat at gmail.com Sun Aug 1 11:36:01 2010 From: anand.shashwat at gmail.com (Shashwat Anand) Date: Sun, 1 Aug 2010 15:06:01 +0530 Subject: [BangPypers] pycon hacksessions? In-Reply-To: <20100801073414.GH17150@remy> References: <87r5ij2bl6.fsf@gmail.com> <20100801073414.GH17150@remy> Message-ID: On Sun, Aug 1, 2010 at 1:04 PM, Senthil Kumaran wrote: > On Sun, Aug 01, 2010 at 12:00:33PM +0530, Zubin Mithra wrote: > > > > I was wondering if any of the speakers would be interested in taking the > > lead. > > If you would like hack around. Bring in your laptop and if the > connectivity is good and we find some place, we can get together and > fix a couple of bugs. Game? > Awesomeness !! I'm Game. > > -- > Senthil > > *** System shutdown message from root *** > > System going down in 60 seconds > > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- ~l0nwlf From steve at lonetwin.net Sun Aug 1 16:32:31 2010 From: steve at lonetwin.net (steve) Date: Sun, 01 Aug 2010 20:02:31 +0530 Subject: [BangPypers] how to handle attribute access In-Reply-To: References: Message-ID: <4C55857F.9090803@lonetwin.net> Hi, On 08/01/2010 12:50 AM, Nitin Kumar wrote: > Hi, > > I am working on automating some application. In one window say i have two > ComboBox, but that window have scroll bar. Only one combo Box is visible at > one time. > > I have functions to handle scroll of window. > > What i want is that how to handle attributes so that one i want to set some > value in the combobox which is not visible, then first that scroll function > is called then the comboBox will do what ever is required. > Let me get this - what you want is that the window should automatically scroll up/or down depending on which combobox you select, is that correct ? If it is, I think you should mention the windowing toolkit that you are using. This sort of thing should be either automatically taken care of by the UI library or it should at least offer you a way to 'set' this property for the frame/widget. So, what windowing toolkit are you using ? cheers, - steve -- random spiel: http://lonetwin.net/ what i'm stumbling into: http://lonetwin.stumbleupon.com/ From lawgon at au-kbc.org Mon Aug 2 08:15:19 2010 From: lawgon at au-kbc.org (Kenneth Gonsalves) Date: Mon, 2 Aug 2010 11:45:19 +0530 Subject: [BangPypers] silly question regarding virtualenv Message-ID: <201008021145.19821.lawgon@au-kbc.org> hi, I have a server with lenny on it. There was a demand for python 2.6 which I installed using apt-get with the unstable repo. Now how do I install virtualenv under python2.6? -- Regards Kenneth Gonsalves Senior Associate NRC-FOSS at AU-KBC From nkhalasi at vayana.in Mon Aug 2 08:35:23 2010 From: nkhalasi at vayana.in (Naresh Khalasi) Date: Mon, 2 Aug 2010 12:05:23 +0530 Subject: [BangPypers] silly question regarding virtualenv In-Reply-To: <201008021145.19821.lawgon@au-kbc.org> References: <201008021145.19821.lawgon@au-kbc.org> Message-ID: Hi Kenneth, AFAIK one needs to download the virutalenv package and execute this $ python virtualenv.py Use appropriate options as per your needs. - Naresh On Mon, Aug 2, 2010 at 11:45 AM, Kenneth Gonsalves wrote: > hi, > > I have a server with lenny on it. There was a demand for python 2.6 which I > installed using apt-get with the unstable repo. Now how do I install > virtualenv under python2.6? > -- > Regards > Kenneth Gonsalves > Senior Associate > NRC-FOSS at AU-KBC > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From lawgon at au-kbc.org Mon Aug 2 09:14:43 2010 From: lawgon at au-kbc.org (Kenneth Gonsalves) Date: Mon, 2 Aug 2010 12:44:43 +0530 Subject: [BangPypers] silly question regarding virtualenv In-Reply-To: References: <201008021145.19821.lawgon@au-kbc.org> Message-ID: <201008021244.43699.lawgon@au-kbc.org> On Monday, August 02, 2010 12:05:23 pm Naresh Khalasi wrote: > AFAIK one needs to download the virutalenv package and execute this > $ python virtualenv.py actually downloaded virtualenv tarball, expanded it and ran python2.6 setup.py install - worked. -- Regards Kenneth Gonsalves Senior Associate NRC-FOSS at AU-KBC From noufal at gmail.com Mon Aug 2 09:32:51 2010 From: noufal at gmail.com (Noufal Ibrahim) Date: Mon, 02 Aug 2010 13:02:51 +0530 Subject: [BangPypers] silly question regarding virtualenv In-Reply-To: <201008021244.43699.lawgon@au-kbc.org> (Kenneth Gonsalves's message of "Mon, 2 Aug 2010 12:44:43 +0530") References: <201008021145.19821.lawgon@au-kbc.org> <201008021244.43699.lawgon@au-kbc.org> Message-ID: <87hbjdfp0c.fsf@gmail.com> Kenneth Gonsalves writes: > On Monday, August 02, 2010 12:05:23 pm Naresh Khalasi wrote: >> AFAIK one needs to download the virutalenv package and execute this >> $ python virtualenv.py > > actually downloaded virtualenv tarball, expanded it and ran python2.6 setup.py > install - worked. That will install virtualenv in your global Python2.6 installation path. To create one, you need to run virtualenv with the usual options (--no-site-packages etc.). Make sure you run it with Python2.6 -- From lawgon at au-kbc.org Mon Aug 2 09:37:55 2010 From: lawgon at au-kbc.org (Kenneth Gonsalves) Date: Mon, 2 Aug 2010 13:07:55 +0530 Subject: [BangPypers] silly question regarding virtualenv In-Reply-To: <87hbjdfp0c.fsf@gmail.com> References: <201008021145.19821.lawgon@au-kbc.org> <201008021244.43699.lawgon@au-kbc.org> <87hbjdfp0c.fsf@gmail.com> Message-ID: <201008021307.55344.lawgon@au-kbc.org> On Monday, August 02, 2010 01:02:51 pm Noufal Ibrahim wrote: > > actually downloaded virtualenv tarball, expanded it and ran python2.6 > > setup.py install - worked. > > That will install virtualenv in your global Python2.6 installation path. yes - that is what I want > > To create one, you need to run virtualenv with the usual options > (--no-site-packages etc.). Make sure you run it with Python2.6 that is upto the guy who wants virtualenv and python2.6 - but I tested it out and it works -- Regards Kenneth Gonsalves Senior Associate NRC-FOSS at AU-KBC From lawgon at au-kbc.org Mon Aug 2 09:44:27 2010 From: lawgon at au-kbc.org (Kenneth Gonsalves) Date: Mon, 2 Aug 2010 13:14:27 +0530 Subject: [BangPypers] python open source video Message-ID: <201008021314.28088.lawgon@au-kbc.org> hi anyone aware of a python based software like http://corp.kaltura.com/ -- Regards Kenneth Gonsalves Senior Associate NRC-FOSS at AU-KBC From sree at mahiti.org Mon Aug 2 09:54:48 2010 From: sree at mahiti.org (Sreekanth S Rameshaiah) Date: Mon, 2 Aug 2010 13:24:48 +0530 Subject: [BangPypers] python open source video In-Reply-To: <201008021314.28088.lawgon@au-kbc.org> References: <201008021314.28088.lawgon@au-kbc.org> Message-ID: On 2 August 2010 13:14, Kenneth Gonsalves wrote: > hi > > anyone aware of a python based software like http://corp.kaltura.com/ > Try Plumi. http://blog.plumi.org/ - sree > -- > Regards > Kenneth Gonsalves > Senior Associate > NRC-FOSS at AU-KBC > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- Sreekanth S Rameshaiah Executive Director Mahiti Infotech Pvt. Ltd. #583, Vyalikaval HBCS Layout, Nagawara, Veerannapalya, Bangalore, India - 560043 Phone: +91 80 4343 7373 Mobile: +91 98455 12611 www.mahiti.org From scorpion032 at gmail.com Mon Aug 2 10:16:07 2010 From: scorpion032 at gmail.com (Lakshman Prasad) Date: Mon, 2 Aug 2010 13:46:07 +0530 Subject: [BangPypers] silly question regarding virtualenv In-Reply-To: <201008021145.19821.lawgon@au-kbc.org> References: <201008021145.19821.lawgon@au-kbc.org> Message-ID: > Now how do I install virtualenv under python2.6? $ cd virtualenv/ $ path/to/python2.6 setup.py install Or just symlink it, $ ln -s path/to/virtualenv/sources /path/to/python2.6/dist-packages/ Assuming the unstable repo replaces and updates the python to 2.6, it is just the normal "python setup.py install". On Mon, Aug 2, 2010 at 11:45 AM, Kenneth Gonsalves wrote: > hi, > > I have a server with lenny on it. There was a demand for python 2.6 which I > installed using apt-get with the unstable repo. Now how do I install > virtualenv under python2.6? > -- > Regards > Kenneth Gonsalves > Senior Associate > NRC-FOSS at AU-KBC > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From lawgon at au-kbc.org Mon Aug 2 11:44:35 2010 From: lawgon at au-kbc.org (Kenneth Gonsalves) Date: Mon, 2 Aug 2010 15:14:35 +0530 Subject: [BangPypers] silly question regarding virtualenv In-Reply-To: References: <201008021145.19821.lawgon@au-kbc.org> Message-ID: <201008021514.36048.lawgon@au-kbc.org> On Monday, August 02, 2010 01:46:07 pm Lakshman Prasad wrote: > Assuming the unstable repo replaces and updates the python to 2.6, it is > just the normal "python setup.py install". it doesnt - everything else is running on 2.5 - only a new user wanted 2.6 -- Regards Kenneth Gonsalves Senior Associate NRC-FOSS at AU-KBC From lawgon at au-kbc.org Wed Aug 4 03:59:15 2010 From: lawgon at au-kbc.org (Kenneth Gonsalves) Date: Wed, 4 Aug 2010 07:29:15 +0530 Subject: [BangPypers] Imaging will not compile Message-ID: <201008040729.15958.lawgon@au-kbc.org> hi, I have a lenny serverr with python2.5.x - recently setup virtualenv with python 2.6. I was trying to install PIL, and whether I use easy_install or use setup.py, I get the same error. The error message is a bit long, but maybe it will help to figure out what is wrong: (env)lawgon at au-kbc:~/install/env/Imaging-1.1.6$ python setup.py install running install running build running build_py running build_ext building '_imaging' extension gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict- prototypes -fPIC -DHAVE_LIBJPEG -DHAVE_LIBZ -I/usr/include/freetype2 - IlibImaging -I/home/lawgon/install/env/include -I/usr/local/include - I/usr/include -I/usr/include/python2.6 -c _imaging.c -o build/temp.linux- i686-2.6/_imaging.o _imaging.c:76:20: error: Python.h: No such file or directory In file included from libImaging/Imaging.h:14, from _imaging.c:78: libImaging/ImPlatform.h:14:2: error: #error Sorry, this library requires support for ANSI prototypes. libImaging/ImPlatform.h:17:2: error: #error Sorry, this library requires ANSI header files. libImaging/ImPlatform.h:55:2: error: #error Cannot find required 32-bit integer type In file included from _imaging.c:78: libImaging/Imaging.h:90: error: expected specifier-qualifier-list before ?INT32? libImaging/Imaging.h:265: error: expected specifier-qualifier-list before ?INT32? libImaging/Imaging.h:393: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?ImagingCRC32? _imaging.c:123: error: expected specifier-qualifier-list before ?PyObject_HEAD? _imaging.c:127: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?PyTypeObject? _imaging.c:141: error: expected specifier-qualifier-list before ?PyObject_HEAD? _imaging.c:149: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?PyTypeObject? _imaging.c:152: error: expected specifier-qualifier-list before ?PyObject_HEAD? _imaging.c:158: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?PyTypeObject? _imaging.c:163: error: expected specifier-qualifier-list before ?PyObject_HEAD? _imaging.c:168: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?PyTypeObject? _imaging.c:170: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c: In function ?_dealloc?: _imaging.c:201: error: ?ImagingObject? has no member named ?image? _imaging.c:202: warning: implicit declaration of function ?PyMem_DEL? _imaging.c: At top level: _imaging.c:207: error: expected ?)? before ?*? token _imaging.c: In function ?ImagingSectionEnter?: _imaging.c:225: error: ?PyThreadState? undeclared (first use in this function) _imaging.c:225: error: (Each undeclared identifier is reported only once _imaging.c:225: error: for each function it appears in.) _imaging.c:225: error: expected expression before ?)? token _imaging.c: In function ?ImagingSectionLeave?: _imaging.c:232: warning: implicit declaration of function ?PyEval_RestoreThread? _imaging.c:232: error: ?PyThreadState? undeclared (first use in this function) _imaging.c:232: error: expected expression before ?)? token _imaging.c: In function ?ImagingError_IOError?: _imaging.c:253: warning: implicit declaration of function ?PyErr_SetString? _imaging.c:253: error: ?PyExc_IOError? undeclared (first use in this function) _imaging.c:254: error: ?NULL? undeclared (first use in this function) _imaging.c: In function ?ImagingError_MemoryError?: _imaging.c:260: warning: implicit declaration of function ?PyErr_NoMemory? _imaging.c:260: warning: return makes pointer from integer without a cast _imaging.c: In function ?ImagingError_Mismatch?: _imaging.c:266: error: ?PyExc_ValueError? undeclared (first use in this function) _imaging.c:267: error: ?NULL? undeclared (first use in this function) _imaging.c: In function ?ImagingError_ModeError?: _imaging.c:273: error: ?PyExc_ValueError? undeclared (first use in this function) _imaging.c:274: error: ?NULL? undeclared (first use in this function) _imaging.c: In function ?ImagingError_ValueError?: _imaging.c:281: error: ?PyExc_ValueError? undeclared (first use in this function) _imaging.c:284: error: ?NULL? undeclared (first use in this function) _imaging.c: At top level: _imaging.c:316: error: expected ?)? before ?*? token _imaging.c:413: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:468: error: expected ?)? before ?*? token _imaging.c:536: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:568: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:580: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:592: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:604: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:613: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:624: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:635: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:646: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:668: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:692: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:709: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:726: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:735: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:752: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:762: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:773: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:805: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:840: error: expected ?)? before ?*? token _imaging.c:880: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:902: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:975: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:986: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:996: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:1035: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:1112: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:1123: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:1260: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:1280: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:1315: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:1340: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:1371: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:1382: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:1402: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:1453: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:1485: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:1531: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:1606: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:1657: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:1663: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:1675: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:1709: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:1737: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:1767: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:1778: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:1794: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:1815: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:1821: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:1832: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:1843: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:1854: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:1865: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:1876: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:1894: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:1912: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:1923: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:1934: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:1945: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:1956: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:1974: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c: In function ?_font_dealloc?: _imaging.c:2035: warning: implicit declaration of function ?Py_XDECREF? _imaging.c:2035: error: ?ImagingFontObject? has no member named ?ref? _imaging.c: In function ?textwidth?: _imaging.c:2045: error: ?ImagingFontObject? has no member named ?glyphs? _imaging.c: At top level: _imaging.c:2050: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:2098: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:2108: error: array type has incomplete element type _imaging.c:2109: error: ?PyCFunction? undeclared here (not in a function) _imaging.c:2109: error: expected ?}? before ?_font_getmask? _imaging.c:2110: error: expected ?}? before ?_font_getsize? _imaging.c:2111: error: ?NULL? undeclared here (not in a function) _imaging.c:2114: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:2122: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c: In function ?_draw_dealloc?: _imaging.c:2150: error: ?ImagingDrawObject? has no member named ?image? _imaging.c: At top level: _imaging.c:2154: error: expected ?)? before ?*? token _imaging.c:2156: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:2171: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:2191: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:2228: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:2246: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:2283: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:2299: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:2352: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:2367: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:2400: error: expected ?)? before ?*? token _imaging.c:2402: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:2429: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:2447: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:2493: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:2530: error: array type has incomplete element type _imaging.c:2533: error: expected ?}? before ?_draw_line? _imaging.c:2534: error: expected ?}? before ?_draw_lines? _imaging.c:2536: error: expected ?}? before ?_draw_outline? _imaging.c:2538: error: expected ?}? before ?_draw_polygon? _imaging.c:2539: error: expected ?}? before ?_draw_rectangle? _imaging.c:2540: error: expected ?}? before ?_draw_point? _imaging.c:2541: error: expected ?}? before ?_draw_points? _imaging.c:2542: error: expected ?}? before ?_draw_arc? _imaging.c:2543: error: expected ?}? before ?_draw_bitmap? _imaging.c:2544: error: expected ?}? before ?_draw_chord? _imaging.c:2545: error: expected ?}? before ?_draw_ellipse? _imaging.c:2546: error: expected ?}? before ?_draw_pieslice? _imaging.c:2547: error: expected ?}? before ?_draw_ink? _imaging.c:2552: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:2561: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c: In function ?pixel_access_dealloc?: _imaging.c:2586: error: ?PixelAccessObject? has no member named ?image? _imaging.c: At top level: _imaging.c:2590: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:2601: error: expected declaration specifiers or ?...? before ?PyObject? _imaging.c:2601: error: expected declaration specifiers or ?...? before ?PyObject? _imaging.c: In function ?pixel_access_setitem?: _imaging.c:2603: error: ?PixelAccessObject? has no member named ?image? _imaging.c:2607: error: ?PixelAccessObject? has no member named ?readonly? _imaging.c:2612: warning: implicit declaration of function ?_getxy? _imaging.c:2612: error: ?xy? undeclared (first use in this function) _imaging.c:2616: error: ?PyExc_IndexError? undeclared (first use in this function) _imaging.c:2620: error: ?color? undeclared (first use in this function) _imaging.c:2623: warning: implicit declaration of function ?getink? _imaging.c:2629: error: ?struct ImagingMemoryInstance? has no member named ?image32? _imaging.c:2629: error: ?INT32? undeclared (first use in this function) _imaging.c:2629: error: expected expression before ?)? token _imaging.c: At top level: _imaging.c:2640: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:2659: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:2670: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:2687: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:2707: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:2742: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:2763: error: array type has incomplete element type _imaging.c:2766: error: expected ?}? before ?_getpixel? _imaging.c:2767: error: expected ?}? before ?_putpixel? _imaging.c:2769: error: expected ?}? before ?pixel_access_new? _imaging.c:2772: error: expected ?}? before ?_convert? _imaging.c:2773: error: expected ?}? before ?_convert2? _imaging.c:2774: error: expected ?}? before ?_convert_matrix? _imaging.c:2775: error: expected ?}? before ?_copy? _imaging.c:2776: error: expected ?}? before ?_copy2? _imaging.c:2780: error: expected ?}? before ?_crop? _imaging.c:2781: error: expected ?}? before ?_expand? _imaging.c:2782: error: expected ?}? before ?_filter? _imaging.c:2783: error: expected ?}? before ?_histogram? _imaging.c:2785: error: expected ?}? before ?_modefilter? _imaging.c:2787: error: expected ?}? before ?_offset? _imaging.c:2788: error: expected ?}? before ?_paste? _imaging.c:2789: error: expected ?}? before ?_point? _imaging.c:2790: error: expected ?}? before ?_point_transform? _imaging.c:2791: error: expected ?}? before ?_putdata? _imaging.c:2793: error: expected ?}? before ?_quantize? _imaging.c:2796: error: expected ?}? before ?_rankfilter? _imaging.c:2798: error: expected ?}? before ?_resize? _imaging.c:2799: error: expected ?}? before ?_rotate? _imaging.c:2800: error: expected ?}? before ?_stretch? _imaging.c:2801: error: expected ?}? before ?_transpose? _imaging.c:2802: error: expected ?}? before ?_transform2? _imaging.c:2804: error: expected ?}? before ?_isblock? _imaging.c:2806: error: expected ?}? before ?_getbbox? _imaging.c:2807: error: expected ?}? before ?_getcolors? _imaging.c:2808: error: expected ?}? before ?_getextrema? _imaging.c:2809: error: expected ?}? before ?_getprojection? _imaging.c:2811: error: expected ?}? before ?_getband? _imaging.c:2812: error: expected ?}? before ?_putband? _imaging.c:2813: error: expected ?}? before ?_fillband? _imaging.c:2815: error: expected ?}? before ?im_setmode? _imaging.c:2817: error: expected ?}? before ?_getpalette? _imaging.c:2818: error: expected ?}? before ?_putpalette? _imaging.c:2819: error: expected ?}? before ?_putpalettealpha? _imaging.c:2823: error: expected ?}? before ?_chop_invert? _imaging.c:2824: error: expected ?}? before ?_chop_lighter? _imaging.c:2825: error: expected ?}? before ?_chop_darker? _imaging.c:2826: error: expected ?}? before ?_chop_difference? _imaging.c:2827: error: expected ?}? before ?_chop_multiply? _imaging.c:2828: error: expected ?}? before ?_chop_screen? _imaging.c:2829: error: expected ?}? before ?_chop_add? _imaging.c:2830: error: expected ?}? before ?_chop_subtract? _imaging.c:2831: error: expected ?}? before ?_chop_add_modulo? _imaging.c:2832: error: expected ?}? before ?_chop_subtract_modulo? _imaging.c:2833: error: expected ?}? before ?_chop_and? _imaging.c:2834: error: expected ?}? before ?_chop_or? _imaging.c:2835: error: expected ?}? before ?_chop_xor? _imaging.c:2840: error: expected ?}? before ?_effect_spread? _imaging.c:2844: error: expected ?}? before ?_new_array? _imaging.c:2845: error: expected ?}? before ?_new_block? _imaging.c:2848: error: expected ?}? before ?_save_ppm? _imaging.c:2857: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c: In function ?image_length?: _imaging.c:2886: error: ?ImagingObject? has no member named ?image? _imaging.c: At top level: _imaging.c:2891: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:2906: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?image_as_sequence? _imaging.c:2919: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?PyTypeObject? _imaging.c:2940: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?PyTypeObject? _imaging.c:2952: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?PyTypeObject? _imaging.c:2966: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?pixel_access_as_mapping? _imaging.c:2974: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?PyTypeObject? _imaging.c:2996: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:2997: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:2998: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:2999: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:3000: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:3001: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:3002: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:3003: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:3004: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:3005: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:3006: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:3007: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:3008: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:3009: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:3010: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:3013: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:3014: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:3015: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:3016: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:3017: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:3018: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:3019: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:3033: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:3036: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:3038: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:3039: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?*? token _imaging.c:3041: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?functions? _imaging.c:3138: warning: return type defaults to ?int? _imaging.c: In function ?DL_EXPORT?: _imaging.c:3138: error: expected declaration specifiers before ?init_imaging? _imaging.c:3149: error: expected ?{? at end of input error: command 'gcc' failed with exit status 1 -- regards Kenneth Gonsalves Senior Associate NRC-FOSS At Au-kbc http://nrcfoss.au-kbc.org.in From orsenthil at gmail.com Wed Aug 4 05:47:30 2010 From: orsenthil at gmail.com (Senthil Kumaran) Date: Wed, 4 Aug 2010 09:17:30 +0530 Subject: [BangPypers] Imaging will not compile In-Reply-To: <201008040729.15958.lawgon@au-kbc.org> References: <201008040729.15958.lawgon@au-kbc.org> Message-ID: <20100804034730.GA6987@remy> On Wed, Aug 04, 2010 at 07:29:15AM +0530, Kenneth Gonsalves wrote: > hi, > > I have a lenny serverr with python2.5.x - recently setup virtualenv with > python 2.6. I was trying to install PIL, and whether I use easy_install or use > setup.py, I get the same error. The error message is a bit long, but maybe it > will help to figure out what is wrong: FWIW, I guess this has to do with the architecture of the package and system you are trying to compile or install. I had bookmarked a link which was helpful to me while installing PIL under Ubuntu. See if that helps for you too. http://www.answermysearches.com/fixing-pil-ioerror-decoder-jpeg-not-available/320/ -- Senthil BOFH excuse #387: Your computer's union contract is set to expire at midnight. From ak.m.mail at gmail.com Wed Aug 4 05:48:13 2010 From: ak.m.mail at gmail.com (akm) Date: Wed, 4 Aug 2010 09:18:13 +0530 Subject: [BangPypers] Imaging will not compile In-Reply-To: <201008040729.15958.lawgon@au-kbc.org> References: <201008040729.15958.lawgon@au-kbc.org> Message-ID: > I have a lenny serverr with python2.5.x - recently setup virtualenv with > python 2.6. I was trying to install PIL, and whether I use easy_install or use > setup.py, I get the same error. The error message is a bit long, but maybe it > will help to figure out what is wrong: > > (env)lawgon at au-kbc:~/install/env/Imaging-1.1.6$ python setup.py install > running install > running build > running build_py > running build_ext > building '_imaging' extension > gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict- > prototypes -fPIC -DHAVE_LIBJPEG -DHAVE_LIBZ -I/usr/include/freetype2 - > IlibImaging -I/home/lawgon/install/env/include -I/usr/local/include - > I/usr/include -I/usr/include/python2.6 -c _imaging.c -o build/temp.linux- > i686-2.6/_imaging.o > _imaging.c:76:20: error: Python.h: No such file or directory This error occurs due to absence of Python development libraries. $ sudo apt-get install python2.5-dev This will install development headers and now you can build your PIL successfully. Thanks, Abdul Kader M From noufal at gmail.com Wed Aug 4 08:15:03 2010 From: noufal at gmail.com (Noufal Ibrahim) Date: Wed, 04 Aug 2010 11:45:03 +0530 Subject: [BangPypers] Imaging will not compile In-Reply-To: <201008040729.15958.lawgon@au-kbc.org> (Kenneth Gonsalves's message of "Wed, 4 Aug 2010 07:29:15 +0530") References: <201008040729.15958.lawgon@au-kbc.org> Message-ID: <877hk6aopk.fsf@gmail.com> Kenneth Gonsalves writes: [...] > _imaging.c:76:20: error: Python.h: No such file or directory [...] This looks like your problem. You need the development libraries for the Python version you're using. They're necessary to compile C extensions. If you've installed from the repo., the package will be available as -dev (e.g. python2.5-dev). If it's from source, there are a couple of variables you need to set to tell distutils where to find 'lib' and 'include'. Is directly "apt-get"ting pil not an option? That would save you from the headache of having to compile etc. -- From lawgon at au-kbc.org Wed Aug 4 09:30:05 2010 From: lawgon at au-kbc.org (Kenneth Gonsalves) Date: Wed, 4 Aug 2010 13:00:05 +0530 Subject: [BangPypers] Imaging will not compile In-Reply-To: References: <201008040729.15958.lawgon@au-kbc.org> Message-ID: <201008041300.05470.lawgon@au-kbc.org> On Wednesday 04 August 2010 09:18:13 akm wrote: > > i686-2.6/_imaging.o > > _imaging.c:76:20: error: Python.h: No such file or directory > > This error occurs due to absence of Python development libraries. > > $ sudo apt-get install python2.5-dev > > This will install development headers and now you can build your PIL > successfully. > thanks - I am an idiot! easy_install worked, I see the egg in site-packages, but import PIL, or import Imaging both fail. -- regards Kenneth Gonsalves Senior Associate NRC-FOSS at AU-KBC http://nrcfoss.au-kbc.org.in From vinayshastry at gmail.com Wed Aug 4 10:51:07 2010 From: vinayshastry at gmail.com (Vinay Shastry) Date: Wed, 4 Aug 2010 14:21:07 +0530 Subject: [BangPypers] Imaging will not compile In-Reply-To: <201008041300.05470.lawgon@au-kbc.org> References: <201008040729.15958.lawgon@au-kbc.org> <201008041300.05470.lawgon@au-kbc.org> Message-ID: On 4 August 2010 13:00, Kenneth Gonsalves wrote: > > thanks - I am an idiot! easy_install worked, I see the egg in site-packages, > but import PIL, or import Imaging both fail. Does "import Image" work? If yes, easy_install and PIL don't work well with each other. For some reason, PIL module is not available, but Image etc are directly available when installed with easy_install. You have 2 options - manual install of PIL using python setup.py install, or use pip, the new easy_install (easy_install pip; pip install pil) -- Vinay S Shastry http://thenub.one09.net From lawgon at au-kbc.org Wed Aug 4 12:13:31 2010 From: lawgon at au-kbc.org (lawgon at au-kbc.org) Date: Wed, 4 Aug 2010 03:13:31 -0700 (PDT) Subject: [BangPypers] Imaging will not compile In-Reply-To: References: <201008040729.15958.lawgon@au-kbc.org> <201008041300.05470.lawgon@au-kbc.org> Message-ID: > On 4 August 2010 13:00, Kenneth Gonsalves wrote: >> >> thanks - I am an idiot! easy_install worked, I see the egg in >> site-packages, >> but import PIL, or import Imaging both fail. > > Does "import Image" work? > yes import Image works From noufal at gmail.com Wed Aug 4 13:00:49 2010 From: noufal at gmail.com (Noufal Ibrahim) Date: Wed, 04 Aug 2010 16:30:49 +0530 Subject: [BangPypers] Imaging will not compile In-Reply-To: (lawgon@au-kbc.org's message of "Wed, 4 Aug 2010 03:13:31 -0700 (PDT)") References: <201008040729.15958.lawgon@au-kbc.org> <201008041300.05470.lawgon@au-kbc.org> Message-ID: <871vaebq1q.fsf@gmail.com> lawgon at au-kbc.org writes: >> On 4 August 2010 13:00, Kenneth Gonsalves wrote: >>> >>> thanks - I am an idiot! easy_install worked, I see the egg in >>> site-packages, >>> but import PIL, or import Imaging both fail. >> >> Does "import Image" work? >> > > yes import Image works [...] There isn't a PIL or an Imaging top level module in the PIL package. http://www.pythonware.com/library/pil/handbook/ If importing "Image" works, I think it's installed properly. -- From vinayshastry at gmail.com Wed Aug 4 16:38:15 2010 From: vinayshastry at gmail.com (Vinay Shastry) Date: Wed, 4 Aug 2010 20:08:15 +0530 Subject: [BangPypers] Imaging will not compile In-Reply-To: <871vaebq1q.fsf@gmail.com> References: <201008040729.15958.lawgon@au-kbc.org> <201008041300.05470.lawgon@au-kbc.org> <871vaebq1q.fsf@gmail.com> Message-ID: On 4 August 2010 16:30, Noufal Ibrahim wrote: > There isn't a PIL or an Imaging top level module in the PIL package. > http://www.pythonware.com/library/pil/handbook/ > > If importing "Image" works, I think it's installed properly. A lot of 3rd party apps/modules (plone for example) do "from PIL import Image". Some examples in the handbook also use the PIL module. http://www.pythonware.com/library/pil/handbook/image.htm -- Vinay S Shastry http://thenub.one09.net From noufal at gmail.com Wed Aug 4 16:58:00 2010 From: noufal at gmail.com (Noufal Ibrahim) Date: Wed, 04 Aug 2010 20:28:00 +0530 Subject: [BangPypers] Imaging will not compile In-Reply-To: (Vinay Shastry's message of "Wed, 4 Aug 2010 20:08:15 +0530") References: <201008040729.15958.lawgon@au-kbc.org> <201008041300.05470.lawgon@au-kbc.org> <871vaebq1q.fsf@gmail.com> Message-ID: <8739uua0hz.fsf@gmail.com> Vinay Shastry writes: > On 4 August 2010 16:30, Noufal Ibrahim wrote: >> There isn't a PIL or an Imaging top level module in the PIL package. >> http://www.pythonware.com/library/pil/handbook/ >> >> If importing "Image" works, I think it's installed properly. > > > A lot of 3rd party apps/modules (plone for example) do "from PIL import Image". > > Some examples in the handbook also use the PIL module. > http://www.pythonware.com/library/pil/handbook/image.htm Ah okay. My bad. I hadn't noticed that. Thanks -- From lawgon at au-kbc.org Thu Aug 5 02:35:04 2010 From: lawgon at au-kbc.org (Kenneth Gonsalves) Date: Thu, 05 Aug 2010 06:05:04 +0530 Subject: [BangPypers] Imaging will not compile In-Reply-To: References: <201008040729.15958.lawgon@au-kbc.org> <201008041300.05470.lawgon@au-kbc.org> <871vaebq1q.fsf@gmail.com> Message-ID: <1280968504.3358.43.camel@localhost> On Wed, 2010-08-04 at 20:08 +0530, Vinay Shastry wrote: > On 4 August 2010 16:30, Noufal Ibrahim wrote: > > There isn't a PIL or an Imaging top level module in the PIL package. > > http://www.pythonware.com/library/pil/handbook/ > > > > If importing "Image" works, I think it's installed properly. > > > A lot of 3rd party apps/modules (plone for example) do "from PIL > import Image". > > using python2.6 setup.py install does it properly. Import PIL works -- regards Kenneth Gonsalves From kpguy1975 at gmail.com Thu Aug 5 06:37:43 2010 From: kpguy1975 at gmail.com (Vikram K) Date: Thu, 5 Aug 2010 10:07:43 +0530 Subject: [BangPypers] string to list query Message-ID: Suppose i have this string: z = 'AT/CG' How do i get this list: zlist = ['A','T/C','G'] From navin.kabra at gmail.com Thu Aug 5 06:45:34 2010 From: navin.kabra at gmail.com (Navin Kabra) Date: Thu, 5 Aug 2010 10:15:34 +0530 Subject: [BangPypers] string to list query In-Reply-To: References: Message-ID: On Thu, Aug 5, 2010 at 10:07 AM, Vikram K wrote: > Suppose i have this string: > z = 'AT/CG' > > How do i get this list: > > zlist = ['A','T/C','G'] > This is a very poorly specified question. And in absence of any information about what exactly are the constraints on the input, and what is the difficulty you're trying to overcome (and indeed no information about what you tried already), I am going with the simplest solution: zlist = [z[0:1], z[1:4], z[4:5]] It looks like you're doing some DNA analysis, and I would guess that all these strings will be 5 characters, I'm sure my solution will work fine. From nitin.nitp at gmail.com Thu Aug 5 08:11:15 2010 From: nitin.nitp at gmail.com (Nitin Kumar) Date: Thu, 5 Aug 2010 11:41:15 +0530 Subject: [BangPypers] string to list query In-Reply-To: References: Message-ID: Below answer from Navin if good one, to make it more complex :) you can use >>> z 'AT/CG' >>> re.split('[A-Z]/[A-Z]',z) ['A', 'G'] >>> re.search('[A-Z]/[A-Z]',z).group() 'T/C' using these two you can get your answer On Thu, Aug 5, 2010 at 10:15 AM, Navin Kabra wrote: > On Thu, Aug 5, 2010 at 10:07 AM, Vikram K wrote: > > > Suppose i have this string: > > z = 'AT/CG' > > > > How do i get this list: > > > > zlist = ['A','T/C','G'] > > > > This is a very poorly specified question. And in absence of any information > about what exactly are the constraints on the input, and what is the > difficulty you're trying to overcome (and indeed no information about what > you tried already), I am going with the simplest solution: > > zlist = [z[0:1], z[1:4], z[4:5]] > > It looks like you're doing some DNA analysis, and I would guess that all > these strings will be 5 characters, I'm sure my solution will work fine. > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- Nitin K From mbaiju at zeomega.com Thu Aug 5 08:58:28 2010 From: mbaiju at zeomega.com (Baiju M) Date: Thu, 5 Aug 2010 12:28:28 +0530 Subject: [BangPypers] string to list query In-Reply-To: References: Message-ID: On Thu, Aug 5, 2010 at 10:07 AM, Vikram K wrote: > Suppose i have this string: > z = 'AT/CG' > > How do i get this list: > > zlist = ['A','T/C','G'] One solution, please verify: def group_seq(seq): seq_out = [] skip = 0 seq_len = len(seq) for i,char in enumerate(seq): if skip > 0: skip = skip - 1 continue if seq_len <= i+1: seq_out.append(char) break if seq[i+1] == '/': seq_out.append(char+seq[i+1]+seq[i+2]) skip = 2 else: seq_out.append(char) return seq_out if __name__ == "__main__": seq = "AT/CG" print seq, group_seq(seq) seq = "A/UT/CG" print seq, group_seq(seq) seq = "A/UT/CG/A" print seq, group_seq(seq) seq = "AT/CGAAA" print seq, group_seq(seq) seq = "AT/CGAAG/CG/TCA" print seq, group_seq(seq) Regards, Baiju M From mbaiju at zeomega.com Thu Aug 5 09:17:49 2010 From: mbaiju at zeomega.com (Baiju M) Date: Thu, 5 Aug 2010 12:47:49 +0530 Subject: [BangPypers] string to list query In-Reply-To: References: Message-ID: Simplified: def group_seq(seq): seq_out = [] slash_found = False for char in seq: if slash_found: seq_out[-1] = seq_out[-1]+char slash_found = False continue if char == '/': seq_out[-1] = seq_out[-1]+char slash_found = True continue seq_out.append(char) return seq_out if __name__ == "__main__": seq = "AT/CG" print seq, group_seq(seq) seq = "A/UT/CG" print seq, group_seq(seq) seq = "A/UT/CG/A" print seq, group_seq(seq) seq = "AT/CGAAA" print seq, group_seq(seq) seq = "AT/CGAAG/CG/TCA" print seq, group_seq(seq) -- Baiju M From abpillai at gmail.com Thu Aug 5 10:04:31 2010 From: abpillai at gmail.com (Anand Balachandran Pillai) Date: Thu, 5 Aug 2010 13:34:31 +0530 Subject: [BangPypers] string to list query In-Reply-To: References: Message-ID: >>> s='AT/CG' >>> m=re.compile(r'([A-Z]+)([A-Z]/[A-Z])([A-Z]+)', re.IGNORECASE) >>> m.match(s).groups() ('A', 'T/C', 'G') --Anand From rajeev.nair at mahiti.org Thu Aug 5 13:02:35 2010 From: rajeev.nair at mahiti.org (Rajeev Nair) Date: Thu, 5 Aug 2010 16:32:35 +0530 Subject: [BangPypers] Re - [Training Requirement] Python crash course in Reva engineering college on August 7th Message-ID: Hi As part of the awareness building programme for PyCon India, i have been doing the rounds of a few colleges in and around Bangalore, Reva engineering college has confirmed date for a crash course on August 7 Saturday ,from 2 pm - 4.30 pm . Anyone would like to volunteer and do the session ? Address : Reva institute of technology , yelahanka,bagalur cross,kattigenahalli ,BSF stop. Contact person : Dr. Vijay Kumar HOD CS Iam waiting for confirmed dates from a few more colleges ,that should happen by mid august since most colleges are just opening after vacation. rajeev From nitin.nitp at gmail.com Thu Aug 5 17:30:53 2010 From: nitin.nitp at gmail.com (Nitin Kumar) Date: Thu, 5 Aug 2010 21:00:53 +0530 Subject: [BangPypers] Re - [Training Requirement] Python crash course in Reva engineering college on August 7th In-Reply-To: References: Message-ID: I am interested, but the date/ time mentioned is bit difficult for me :( On Thu, Aug 5, 2010 at 4:32 PM, Rajeev Nair wrote: > Hi > > As part of the awareness building programme for PyCon India, i have been > doing the rounds of a few colleges in and around Bangalore, Reva > engineering > college has confirmed date for a crash course on August 7 Saturday ,from > 2 > pm - 4.30 pm . > > Anyone would like to volunteer and do the session ? > > Address : Reva institute of technology , yelahanka,bagalur > cross,kattigenahalli ,BSF stop. > Contact person : Dr. Vijay Kumar HOD CS > > Iam waiting for confirmed dates from a few more colleges ,that should > happen > by mid august since most colleges are just opening after vacation. > > > rajeev > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- Nitin K From dhananjay.nene at gmail.com Thu Aug 5 19:32:28 2010 From: dhananjay.nene at gmail.com (Dhananjay Nene) Date: Thu, 5 Aug 2010 23:02:28 +0530 Subject: [BangPypers] string to list query In-Reply-To: References: Message-ID: Here's a slightly different approach def splitter(input): buffer = [] slash = False for char in input : if len(buffer) == 0 : buffer.append(char) elif char == '/' : buffer.append(char) slash = True elif slash : buffer.append(char) slash = False else : yield "".join(buffer) buffer = [char] if len(buffer) > 0 : yield "".join(buffer) print tuple(splitter('AT/CG')) On Thu, Aug 5, 2010 at 10:07 AM, Vikram K wrote: > Suppose i have this string: > z = 'AT/CG' > > How do i get this list: > > zlist = ['A','T/C','G'] > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- -------------------------------------------------------- blog: http://blog.dhananjaynene.com twitter: http://twitter.com/dnene From dhananjay.nene at gmail.com Thu Aug 5 23:30:27 2010 From: dhananjay.nene at gmail.com (Dhananjay Nene) Date: Fri, 6 Aug 2010 03:00:27 +0530 Subject: [BangPypers] python speed comparison In-Reply-To: References: Message-ID: On Fri, Jul 23, 2010 at 1:26 PM, Emil Chacko wrote: > Below given is solution to a puzzle( > http://projecteuler.net/index.php?section=problems&id=14) in python and c > > Python: > > import time > startT=time.time() > maxlen=0 > longest=0 > for i in xrange(1,1000000): > last=i > cnt=0 > while(last <> 1): > cnt=cnt+1 > if(last%2==0): > last=last/2 > else: > last=3*last+1 > if(cnt>maxlen): > maxlen=cnt > longest=i > print "time taken (sec) : ",time.time()-startT > print maxlen,longest > > Python Output: > time taken (sec) : 99.4702298641 > 524 837799 > > C: > > #include > int main(int argc, char **argv) > { > int longest = 0; > int maxlen = 0; > int i; > unsigned long last; > for (i = 1; i <= 1000000; i++) > { > last = i; > int cnt = 0; > while (last != 1) > { > cnt++; > if (last % 2 == 0) > last = last / 2; > else > last = 3 * last + 1; > } > if (cnt > maxlen) > { > maxlen = cnt; > longest = i; > } > } > printf("longest: %d (%d)\n", longest, maxlen); > return 0; > } > > > My doubt is that in C the result comes in 1-2 sec but in python it takes 99 > secs.I don't expect python to be as fast as c but i cant understand why it > should be so slow in python.i'm new to python so if there is better way to > do the above prog in python please suggest. > Your python code as is clocked about 72 seconds on my notebook. The following came in at about 4.6 seconds (just has a small trick of reusing earlier results) import time start =time.time() longest = None longest_elements = 0 solved = {} for val in xrange(1,1000000) : counter = 1 number = val while number != 1 : number = number / 2 if number % 2 == 0 else 3 * number + 1 if number in solved : counter = counter + solved[number] break else : counter = counter + 1 if counter > longest_elements : longest_elements = counter longest = val solved[val] = counter end = time.time() print "Time:", end - start print longest, ':', longest_elements Dhananjay > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- -------------------------------------------------------- blog: http://blog.dhananjaynene.com twitter: http://twitter.com/dnene From abpillai at gmail.com Fri Aug 6 04:01:26 2010 From: abpillai at gmail.com (Anand Balachandran Pillai) Date: Fri, 6 Aug 2010 07:31:26 +0530 Subject: [BangPypers] python speed comparison In-Reply-To: References: Message-ID: On Fri, Aug 6, 2010 at 3:00 AM, Dhananjay Nene wrote: > On Fri, Jul 23, 2010 at 1:26 PM, Emil Chacko wrote: > > > Below given is solution to a puzzle( > > http://projecteuler.net/index.php?section=problems&id=14) in python and > c > > > > Python: > > > > import time > > startT=time.time() > > maxlen=0 > > longest=0 > > for i in xrange(1,1000000): > > last=i > > cnt=0 > > while(last <> 1): > > cnt=cnt+1 > > if(last%2==0): > > last=last/2 > > else: > > last=3*last+1 > > if(cnt>maxlen): > > maxlen=cnt > > longest=i > > print "time taken (sec) : ",time.time()-startT > > print maxlen,longest > > > > Python Output: > > time taken (sec) : 99.4702298641 > > 524 837799 > > > > C: > > > > #include > > int main(int argc, char **argv) > > { > > int longest = 0; > > int maxlen = 0; > > int i; > > unsigned long last; > > for (i = 1; i <= 1000000; i++) > > { > > last = i; > > int cnt = 0; > > while (last != 1) > > { > > cnt++; > > if (last % 2 == 0) > > last = last / 2; > > else > > last = 3 * last + 1; > > } > > if (cnt > maxlen) > > { > > maxlen = cnt; > > longest = i; > > } > > } > > printf("longest: %d (%d)\n", longest, maxlen); > > return 0; > > } > > > > > > My doubt is that in C the result comes in 1-2 sec but in python it takes > 99 > > secs.I don't expect python to be as fast as c but i cant understand why > it > > should be so slow in python.i'm new to python so if there is better way > to > > do the above prog in python please suggest. > > > > Your python code as is clocked about 72 seconds on my notebook. The > following came in at about 4.6 seconds (just has a small trick of reusing > earlier results) > > import time > start =time.time() > longest = None > longest_elements = 0 > solved = {} > for val in xrange(1,1000000) : > counter = 1 > number = val > while number != 1 : > number = number / 2 if number % 2 == 0 else 3 * number + 1 > if number in solved : > counter = counter + solved[number] > break > else : > counter = counter + 1 > if counter > longest_elements : > longest_elements = counter > longest = val > solved[val] = counter > end = time.time() > print "Time:", end - start > print longest, ':', longest_elements > > Dhananjay > Good approach. I remember solving around 50 or so project euler problems a while back in Python and I used caching of previous results in a dictionary for most complex problems which speeded up the calculation tremendously. This technique is often called "memoization". In Python, caching/memoizing decorators can often be used to solve this problem. > > > _______________________________________________ > > BangPypers mailing list > > BangPypers at python.org > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > > -- > -------------------------------------------------------- > blog: http://blog.dhananjaynene.com > twitter: http://twitter.com/dnene > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- --Anand From rahul8590 at gmail.com Fri Aug 6 16:20:31 2010 From: rahul8590 at gmail.com (Rahul R) Date: Fri, 6 Aug 2010 18:20:31 +0400 Subject: [BangPypers] diffrerence between lambda function and ordinary one Message-ID: i was writing some basic code . for understanding lambda functions , but couldnt understand the difference between a lambda function and an ordinary function. for example >>>def f (x): return x**2 ... >>> print f(8) >>> 64 >>> g = lambda x: x**2 >>> >>> print g(8) >>> 64 wats a need for using lambda functions ..? From zubin.mithra at gmail.com Fri Aug 6 16:34:08 2010 From: zubin.mithra at gmail.com (Zubin Mithra) Date: Fri, 6 Aug 2010 20:04:08 +0530 Subject: [BangPypers] diffrerence between lambda function and ordinary one In-Reply-To: References: Message-ID: > > > i was writing some basic code . for understanding lambda functions , but > couldnt understand the difference between a lambda function and an ordinary > function. > > for example > > >>>def f (x): return x**2 > ... > >>> print f(8) > >>> 64 > >>> g = lambda x: x**2 > >>> > >>> print g(8) > >>> 64 > > wats a need for using lambda functions ..? > Lambda functions are generally used where you need one liner functions to get things done. It was a feature which was considered for removal in py3k but there were too many people who loved the feature. :) Personally I feel that lambda functions are great as long as they are readable. zm From anandology at gmail.com Fri Aug 6 16:34:04 2010 From: anandology at gmail.com (Anand Chitipothu) Date: Fri, 6 Aug 2010 20:04:04 +0530 Subject: [BangPypers] diffrerence between lambda function and ordinary one In-Reply-To: References: Message-ID: 2010/8/6 Rahul R : > i was writing some basic code . for understanding lambda functions , but > couldnt understand the difference between a lambda function and an ordinary > function. > > for example > >>>>def f (x): return x**2 > ... >>>> print f(8) >>>> 64 >>>> g = lambda x: x**2 >>>> >>>> print g(8) >>>> 64 > > wats a need for using lambda functions ..? Lambda functions are expressions. You can define a lambda function inside a function call or a dictionary definition, which is not possible with regular functions. For example: d.sort(key=lambda x: x.lower()) functions = { "lower": lambda k: k.lower(), "upper": lambda k: k.upper() } Anand From pradeep at btbytes.com Fri Aug 6 16:36:16 2010 From: pradeep at btbytes.com (Pradeep Gowda) Date: Fri, 6 Aug 2010 10:36:16 -0400 Subject: [BangPypers] diffrerence between lambda function and ordinary one In-Reply-To: References: Message-ID: On Fri, Aug 6, 2010 at 10:20 AM, Rahul R wrote: > i was writing some basic code . for understanding lambda functions , but > couldnt understand the difference between a lambda function and an ordinary > function. > > for example > >>>>def f (x): return x**2 > ... >>>> print f(8) >>>> 64 >>>> g = lambda x: x**2 >>>> >>>> print g(8) >>>> 64 > > wats a need for using lambda functions ..? You mean "what's the need for using lambda functions?" Lambda functions are anonymous functions, ie., functions without a name. Along with map, reduce, filter, lambda functions provide functional programming[1] constructs to python. You can write code like this: from operator import add print reduce(add, filter(lambda x: x%2==0, xrange(10))) to print the sum of even numbers less than 10 instead of: tot = 0 for i in xrange(10): ....if i%2 == 0: ........tot += i print tot ... Anyway, One does not "need" to use lambda function. Almost in all the places where you use lambda functions, you can replace it with a named function with added benefit of clarity. Python lambdas are limited to a single statement, which makes them particularly hobbled. Guido is not very fond of FP constructs, in fact he wanted to remove them from python 3. After much discussion, lambda survived in Py3. [1] http://en.wikipedia.org/wiki/Functional_programming From ideamonk at gmail.com Fri Aug 6 16:38:53 2010 From: ideamonk at gmail.com (Abhishek Mishra) Date: Fri, 6 Aug 2010 20:08:53 +0530 Subject: [BangPypers] python speed comparison In-Reply-To: References: Message-ID: > > > > Your python code as is clocked about 72 seconds on my notebook. The > following came in at about 4.6 seconds (just has a small trick of reusing > earlier results) > > import time > start =time.time() > longest = None > longest_elements = 0 > solved = {} > for val in xrange(1,1000000) : > counter = 1 > number = val > while number != 1 : > number = number / 2 if number % 2 == 0 else 3 * number + 1 > if number in solved : > counter = counter + solved[number] > break > else : > counter = counter + 1 > if counter > longest_elements : > longest_elements = counter > longest = val > solved[val] = counter > end = time.time() > print "Time:", end - start > print longest, ':', longest_elements > > Dhananjay > > If you are still looking forward to squeeze around 200ms more, try bit ops - Original code by Dhananjay averages to 4.25823163986s on my machine While if you change - number = number / 2 if number % 2 == 0 else 3 * number + 1 into number = 3*number+1 if number&1 else number >> 1 it averages 4.058642069496667s on my machine. Abhishek From anand.shashwat at gmail.com Fri Aug 6 16:45:09 2010 From: anand.shashwat at gmail.com (Shashwat Anand) Date: Fri, 6 Aug 2010 20:15:09 +0530 Subject: [BangPypers] diffrerence between lambda function and ordinary one In-Reply-To: References: Message-ID: > > > > You can write code like this: > > from operator import add > print reduce(add, filter(lambda x: x%2==0, xrange(10))) > > to print the sum of even numbers less than 10 > instead of: > tot = 0 > for i in xrange(10): > ....if i%2 == 0: > ........tot += i > print tot > > ... > I would prefer LC anyway: >>> sum(i for i in range(0,10,2)) 20 -- ~l0nwlf From pradeep at btbytes.com Fri Aug 6 17:07:25 2010 From: pradeep at btbytes.com (Pradeep Gowda) Date: Fri, 6 Aug 2010 11:07:25 -0400 Subject: [BangPypers] diffrerence between lambda function and ordinary one In-Reply-To: References: Message-ID: On Fri, Aug 6, 2010 at 10:45 AM, Shashwat Anand wrote: > I would prefer LC anyway: > >>>> sum(i for i in range(0,10,2)) > 20 why use LC at all? >> sum(range(0,10,2)) From anand.shashwat at gmail.com Fri Aug 6 17:26:14 2010 From: anand.shashwat at gmail.com (Shashwat Anand) Date: Fri, 6 Aug 2010 20:56:14 +0530 Subject: [BangPypers] diffrerence between lambda function and ordinary one In-Reply-To: References: Message-ID: On Fri, Aug 6, 2010 at 8:37 PM, Pradeep Gowda wrote: > On Fri, Aug 6, 2010 at 10:45 AM, Shashwat Anand > wrote: > > I would prefer LC anyway: > > > >>>> sum(i for i in range(0,10,2)) > > 20 > > why use LC at all? > >> sum(range(0,10,2)) > Oops. Wrong choice of example. -- ~l0nwlf From anandology at gmail.com Fri Aug 6 17:26:45 2010 From: anandology at gmail.com (Anand Chitipothu) Date: Fri, 6 Aug 2010 20:56:45 +0530 Subject: [BangPypers] python speed comparison In-Reply-To: References: Message-ID: Readability counts. Here is my attempt. def memoize(f): cache = {} def g(a): if a not in cache: cache[a] = f(a) return cache[a] return g @memoize def solve(n): if n == 1: return 1 elif n%2 == 0: return 1 + solve(n/2) else: return 1 + solve(3*n+1) print max((solve(i), i) for i in range(1, 1+1000000)) $ time python p14.py (525, 837799) real 0m3.981s user 0m3.728s sys 0m0.242s Anand From ideamonk at gmail.com Fri Aug 6 17:28:31 2010 From: ideamonk at gmail.com (Abhishek Mishra) Date: Fri, 6 Aug 2010 20:58:31 +0530 Subject: [BangPypers] diffrerence between lambda function and ordinary one In-Reply-To: References: Message-ID: On Fri, Aug 6, 2010 at 8:37 PM, Pradeep Gowda wrote: > On Fri, Aug 6, 2010 at 10:45 AM, Shashwat Anand > wrote: > > I would prefer LC anyway: > > > >>>> sum(i for i in range(0,10,2)) > > 20 > > why use LC at all? > >> sum(range(0,10,2)) > > ^ I too have written such "i for i in ..." expressions at times and I feel enlightened now. From ideamonk at gmail.com Fri Aug 6 17:30:29 2010 From: ideamonk at gmail.com (Abhishek Mishra) Date: Fri, 6 Aug 2010 21:00:29 +0530 Subject: [BangPypers] diffrerence between lambda function and ordinary one In-Reply-To: References: Message-ID: This would serve a better example - >>> sum( int(x) for x in raw_input().split() ) 1 2 3 4 10 >>> From jammoham at cisco.com Sat Aug 7 10:40:32 2010 From: jammoham at cisco.com (Jamal (jammoham)) Date: Sat, 07 Aug 2010 14:10:32 +0530 Subject: [BangPypers] [Commercial] B2B website design and development In-Reply-To: Message-ID: I am posting this on behalf of my cousin: Hi, I would like to get a B2B website developed for the Middle East region. I have a domain registered clearsurplus.com and hosting (windows server + sql db) via godaddy.com. This website will facilitate the stockists in this region to list their surplus/excess/old stock for sale at throwaway prices. We charge them a annual subscription fee for the listing. Buyers search the listed items and contact the stockists for free. Please respond if anyone is interested to build the same. Warm regards, Erfan Mohammad. Email: erfan at clearsurplus.com Mobile: +971504408256 (Dubai) Blackberry PIN: 20E88BBA From kirantej1920 at gmail.com Sat Aug 7 19:15:46 2010 From: kirantej1920 at gmail.com (kirantej J L) Date: Sat, 7 Aug 2010 22:45:46 +0530 Subject: [BangPypers] hello Message-ID: Hello all, Can any one please help me on where actually weekly bangpypers meetups are held? I have ordered for a ticket for PyconIndia-2010 and have chosen offline mode of pay, so please can any one help me on how to pay and whom to pay and get my ticket. -- regards, Trust link: http://nsvcharitabletrust.org/ Kiran tej Dept of computer science and engineering SIR MVIT YELAHANKA Thought:1 "Try not to become a man of success but a man of VALUE" Thought:2 "Do not stop till you reach your goal" ---Swamy Vivekananda From vnbang2003 at yahoo.com Sun Aug 8 03:39:53 2010 From: vnbang2003 at yahoo.com (vijay) Date: Sun, 8 Aug 2010 07:09:53 +0530 (IST) Subject: [BangPypers] hello In-Reply-To: Message-ID: <855610.62780.qm@web95302.mail.in2.yahoo.com> There are mutliple way for payment.You can pay in next bangpaper meetup or you can pay on conference day itself.For?information?on next bangpaper meetup , dates will be said on mailing list once planned so you can come over and pay amount there. --- On Sat, 7/8/10, kirantej J L wrote: From: kirantej J L Subject: [BangPypers] hello To: bangpypers at python.org Date: Saturday, 7 August, 2010, 10:45 PM Hello all, Can any one please help me on where actually weekly bangpypers meetups are held? I have ordered for a ticket for PyconIndia-2010 and have chosen offline mode of pay, so please can any one help me on how to pay and whom to pay? and get my ticket. -- regards, Trust link: http://nsvcharitabletrust.org/ Kiran tej Dept of computer science and engineering SIR MVIT YELAHANKA Thought:1 "Try not to become a man of success but a man of VALUE" Thought:2 "Do not stop till you reach your goal" ? ? ? ? ? ? ? ? ? ? ? ? ---Swamy Vivekananda _______________________________________________ BangPypers mailing list BangPypers at python.org http://mail.python.org/mailman/listinfo/bangpypers From freeman at pobox.com Sun Aug 8 10:45:11 2010 From: freeman at pobox.com (freeman murray) Date: Sun, 8 Aug 2010 14:15:11 +0530 Subject: [BangPypers] [JOB] Interesting Projects at Jaaga Message-ID: Hi Everyone, I'm working on two projects for which I need to hire a couple senior Python programmers for a few months. One project is to build a web service to help individual investors manage their investments and deal flow. The second one is creating a "garden calculator" for WorldFoodGarden.org which will help people design a garden appropriate to their location according to sustainable organic gardening best practices. We need people with skills in Python / DJango / HTML / Javascript / CSS / MySQL Both these projects have budget, and need experienced programmers who can drive a project from inception to completion. While some work may be done from home, the bulk needs to be done from Jaaga (Shantinagar, Bangalore) Thanks, Freeman Murray CoFounder - http://Jaaga.in From freeman at pobox.com Sun Aug 8 11:14:13 2010 From: freeman at pobox.com (freeman murray) Date: Sun, 8 Aug 2010 14:44:13 +0530 Subject: [BangPypers] [OT] Bangalore Hackerspace Message-ID: Hi again, I'd like to introduce Jaaga to people on this list. Its a very unconventional creative space in central Bangalore near the hockey stadium in Shanti Nagar. We're trying to make it a 'hacker space' in the same spirit as noisebridge.net & hackerdojo.com in Silicon Valley or c-base.org in Berlin. Towards this, we're hosting a casual 'miniBarCamp' the third weekend of each month which I'm hoping becomes something like superhappydevhouse.org Tuesday nights I'm trying to establish 'Hack Night' inviting people to come work on misc. fun projects, startup ideas, and other non-work related stuff. We're also generally open for co-working in case any startups or freelancers would prefer to work in a more social environment. I'd love to invite the bangpypers to meetup during the miniBarCamp the third weekend of the month, and to take advantage of the space in other ways - doing projects, giving tech talks, conducting workshops, etc. If anyone has other ideas for how we can make Jaaga more useful to the hacker / technical community in Bangalore please let me know. Thanks, Freeman Murray Co-Founder - http://jaaga.in From abpillai at gmail.com Sun Aug 8 13:40:44 2010 From: abpillai at gmail.com (Anand Balachandran Pillai) Date: Sun, 8 Aug 2010 17:10:44 +0530 Subject: [BangPypers] python speed comparison In-Reply-To: References: Message-ID: On Fri, Aug 6, 2010 at 8:56 PM, Anand Chitipothu wrote: > Readability counts. Here is my attempt. > > def memoize(f): > cache = {} > def g(a): > if a not in cache: > cache[a] = f(a) > return cache[a] > return g > > @memoize > def solve(n): > if n == 1: > return 1 > elif n%2 == 0: > return 1 + solve(n/2) > else: > return 1 + solve(3*n+1) > > print max((solve(i), i) for i in range(1, 1+1000000)) > You rock - that was exactly what I was talking about though I was too lazy to code it :) > > $ time python p14.py > (525, 837799) > > real 0m3.981s > user 0m3.728s > sys 0m0.242s > > Anand > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- --Anand From rajeev.sebastian at gmail.com Mon Aug 9 02:37:03 2010 From: rajeev.sebastian at gmail.com (Rajeev J Sebastian) Date: Mon, 9 Aug 2010 06:07:03 +0530 Subject: [BangPypers] [JOB] Interesting Projects at Jaaga In-Reply-To: References: Message-ID: On Sun, Aug 8, 2010 at 2:15 PM, freeman murray wrote: > > While some work may be done from home, > the bulk needs to be done from Jaaga > (Shantinagar, Bangalore) too bad ... oh well :D I'm at Shantinagar Trivandrum LOL Regards Rajeev J Sebastian From rajeev.nair at mahiti.org Mon Aug 9 09:11:02 2010 From: rajeev.nair at mahiti.org (Rajeev Nair) Date: Mon, 9 Aug 2010 12:41:02 +0530 Subject: [BangPypers] Re - [Training Requirement] Python crash course in Reva engineering college - completed Message-ID: Hi, > On Thu, Aug 5, 2010 at 4:32 PM, Rajeev Nair > wrote: > > > Hi > > > > As part of the awareness building programme for PyCon India, i have been > > doing the rounds of a few colleges in and around Bangalore, Reva > > engineering > > college has confirmed date for a crash course on August 7 Saturday ,from > > 2 > > pm - 4.30 pm . > > > > Anyone would like to volunteer and do the session? > > > > Iam waiting for confirmed dates from a few more colleges ,that should > > happen > > by mid august since most colleges are just opening after vacation. > > > > > > Srinivas H.N from Mahiti delivered the session at Reva engineering college on August 7, around 50 students attended along with faculty members . I shall post in here as and when other colleges confirm dates for such programmes .A few of them should happen in mid august. Expect most sessions on a saturday afternoon as it fits their schedule and probably ours. Details are posted here > http://convene.mahiti.org . rajeev > -- > From orsenthil at gmail.com Mon Aug 9 11:16:12 2010 From: orsenthil at gmail.com (Senthil Kumaran) Date: Mon, 9 Aug 2010 14:46:12 +0530 Subject: [BangPypers] [OT] Bangalore Hackerspace In-Reply-To: References: Message-ID: <20100809091612.GA11110@remy> On Sun, Aug 08, 2010 at 02:44:13PM +0530, freeman murray wrote: > Towards this, we're hosting a casual 'miniBarCamp' The term violates PEP-8. :) Okay, to begin with, we can have a bangpypers meet here ( Well, of course I am not the correct person to say this). But it be a good 'first' step forward in both directions. -- Senthil Lake Tanganyika <--> Leaky tank again -- anagrama From emilchacko at gmail.com Mon Aug 9 12:29:27 2010 From: emilchacko at gmail.com (Emil Chacko) Date: Mon, 9 Aug 2010 15:59:27 +0530 Subject: [BangPypers] python speed comparison Message-ID: This implementation is really good.It's really fast compared to the initial one I posted but i didn't understand much about this memoize.I asked one of my friend he told it's python decorators.Can anyone please explain what the function memoize does. > > > Readability counts. Here is my attempt. > > > > def memoize(f): > > cache = {} > > def g(a): > > if a not in cache: > > cache[a] = f(a) > > return cache[a] > > return g > > > > @memoize > > def solve(n): > > if n == 1: > > return 1 > > elif n%2 == 0: > > return 1 + solve(n/2) > > else: > > return 1 + solve(3*n+1) > > > > print max((solve(i), i) for i in range(1, 1+1000000)) > > > > > > > $ time python p14.py > > (525, 837799) > > > > real 0m3.981s > > user 0m3.728s > > sys 0m0.242s > > > > Anand > > From vsapre80 at gmail.com Mon Aug 9 13:34:16 2010 From: vsapre80 at gmail.com (Vishal) Date: Mon, 9 Aug 2010 17:04:16 +0530 Subject: [BangPypers] Do you think a more declarative RE syntax would make the world a better place ? Message-ID: Hello fellas, I am trying to create a python function that can take an plain english description of a regular expression and return the regular expression to the caller. Currently I am thinking of the description in YAML format. So, we can store the description as a raw string variable, which is passed on to this another function and output of that function is then passed to the 're' module. Following is a rather simplistic example: # a(b|c)d+e* re1 = """ - literal: 'a' - one_of: 'b,c' - one_or_more_of: 'd' - zero_or_more_of: 'e' """ myre = re.compile(getRegex(re1)) myre.search(...) etc. Does anyone think something of this sort would be of wider use? Do you know already existing packages that can do it? What are the limitations that you see to this approach? Does anyone think, having the declarative string in code, would make it more maintainable? From noufal at gmail.com Mon Aug 9 14:08:20 2010 From: noufal at gmail.com (Noufal Ibrahim) Date: Mon, 09 Aug 2010 17:38:20 +0530 Subject: [BangPypers] Do you think a more declarative RE syntax would make the world a better place ? In-Reply-To: (Vishal's message of "Mon, 9 Aug 2010 17:04:16 +0530") References: Message-ID: <87vd7krnt7.fsf@gmail.com> [...] > Does anyone think something of this sort would be of wider use? Do you > know already existing packages that can do it? What are the > limitations that you see to this approach? Does anyone think, having > the declarative string in code, would make it more maintainable? [...] I don't want to rain on your parade but I don't think this will be useful. Regular expressions are mathematically sound ways of representing state machines. They unambiguous and clean. They were brought into the whole "programming" universe as a tool to do text processing and then unleashed upon the unwashed masses leading them to use it for everything from looking for a string in a file to parsing XML. The problem now is that we have too much of this line noise in our programs and there have been efforts to "clean it up" by using more "readable syntax". There was even one floating about a few months ago which used XML to describe regexps. I don't want to try to write an example. One of the things about regular expressions which makes them powerful is their brevity and compactness. This of course leads to sometimes unreadable code, abuse etc. but all of those are discipline issues which should be addressed by simply using less regexps and using other things which are more suited to the task (plain string indexing, parsers etc.). I think an attempt to create a more "friendly regexp format" which is more readable is going the way of COBOL with it's "ADD 1 to X" rather than x+=1. However, it's an interesting idea to make this work. I'd like to do the reverse. Given a regexp, break it down into English for me so that I can figure out what it's trying to do quickly. -- From orsenthil at gmail.com Mon Aug 9 14:11:44 2010 From: orsenthil at gmail.com (Senthil Kumaran) Date: Mon, 9 Aug 2010 17:41:44 +0530 Subject: [BangPypers] Do you think a more declarative RE syntax would make the world a better place ? In-Reply-To: References: Message-ID: On Mon, Aug 9, 2010 at 5:04 PM, Vishal wrote: > # a(b|c)d+e* > > re1 = """ > > - literal: 'a' > - one_of: 'b,c' > - one_or_more_of: 'd' > - zero_or_more_of: 'e' > """ It *could be* useful to new comers, but not very much. This will add to the cost of covering it to regex code and will cause significant delay in the programs which are using regex. So in big apps it may not be of use. Have you seen re.VERBOSE flag in the re module? Thats perhaps the middle path (tm). :) -- Senthil From vsapre80 at gmail.com Mon Aug 9 18:11:33 2010 From: vsapre80 at gmail.com (Vishal) Date: Mon, 9 Aug 2010 21:41:33 +0530 Subject: [BangPypers] Do you think a more declarative RE syntax would make the world a better place ? In-Reply-To: <87vd7krnt7.fsf@gmail.com> References: <87vd7krnt7.fsf@gmail.com> Message-ID: On Mon, Aug 9, 2010 at 5:38 PM, Noufal Ibrahim wrote: > > [...] > > > Does anyone think something of this sort would be of wider use? Do you > > know already existing packages that can do it? What are the > > limitations that you see to this approach? Does anyone think, having > > the declarative string in code, would make it more maintainable? > > [...] > > I don't want to rain on your parade but I don't think this will be > useful. > > Regular expressions are mathematically sound ways of representing state > machines. They unambiguous and clean. They were brought into the whole > "programming" universe as a tool to do text processing and then > unleashed upon the unwashed masses leading them to use it for everything > from looking for a string in a file to parsing XML. The problem now is > that we have too much of this line noise in our programs and there have > been efforts to "clean it up" by using more "readable syntax". There was > even one floating about a few months ago which used XML to describe > regexps. I don't want to try to write an example. > > One of the things about regular expressions which makes them powerful is > their brevity and compactness. This of course leads to sometimes > unreadable code, abuse etc. but all of those are discipline issues which > should be addressed by simply using less regexps and using other things > which are more suited to the task (plain string indexing, parsers etc.). > > I think an attempt to create a more "friendly regexp format" which is > more readable is going the way of COBOL with it's "ADD 1 to X" rather > than x+=1. > > However, it's an interesting idea to make this work. I'd like to do the > reverse. Given a regexp, break it down into English for me so that I can > figure out what it's trying to do quickly. > > --- Hi, Thanks for the view. I do agree with you that as the regex becomes overly complex, this textual representation may also become equally complex..or more so. Here's a website to find out 'quickly' what a regular expression means: http://rick.measham.id.au/paste/explain.pl Best regards, Vishal From vsapre80 at gmail.com Mon Aug 9 18:12:42 2010 From: vsapre80 at gmail.com (Vishal) Date: Mon, 9 Aug 2010 21:42:42 +0530 Subject: [BangPypers] Do you think a more declarative RE syntax would make the world a better place ? In-Reply-To: References: Message-ID: On Mon, Aug 9, 2010 at 5:41 PM, Senthil Kumaran wrote: > On Mon, Aug 9, 2010 at 5:04 PM, Vishal wrote: > > # a(b|c)d+e* > > > > re1 = """ > > > > - literal: 'a' > > - one_of: 'b,c' > > - one_or_more_of: 'd' > > - zero_or_more_of: 'e' > > """ > > It *could be* useful to new comers, but not very much. > This will add to the cost of covering it to regex code and will cause > significant delay in the programs which are using regex. So in big > apps it may not be of use. > Have you seen re.VERBOSE flag in the re module? Thats perhaps the > middle path (tm). :) > > > -- > Senthil > > Thanks for that info. Actually the re.X option fills in for a lot of the complexity. I had looked into it before. -- Thanks and best regards, Vishal From vsapre80 at gmail.com Mon Aug 9 19:17:36 2010 From: vsapre80 at gmail.com (Vishal) Date: Mon, 9 Aug 2010 22:47:36 +0530 Subject: [BangPypers] Do you think a more declarative RE syntax would make the world a better place ? In-Reply-To: References: Message-ID: Here are a couple more regular expression analyzers: http://xenon.stanford.edu/~xusch/regexp/analyzer.html a tool you can download to your pc: http://www.ultrapico.com/Expresso.htm On Mon, Aug 9, 2010 at 9:42 PM, Vishal wrote: > > > On Mon, Aug 9, 2010 at 5:41 PM, Senthil Kumaran wrote: > >> On Mon, Aug 9, 2010 at 5:04 PM, Vishal wrote: >> > # a(b|c)d+e* >> > >> > re1 = """ >> > >> > - literal: 'a' >> > - one_of: 'b,c' >> > - one_or_more_of: 'd' >> > - zero_or_more_of: 'e' >> > """ >> >> It *could be* useful to new comers, but not very much. >> This will add to the cost of covering it to regex code and will cause >> significant delay in the programs which are using regex. So in big >> apps it may not be of use. >> Have you seen re.VERBOSE flag in the re module? Thats perhaps the >> middle path (tm). :) >> >> >> -- >> Senthil >> >> > Thanks for that info. Actually the re.X option fills in for a lot of the > complexity. > I had looked into it before. > > -- > Thanks and best regards, > Vishal > -- Thanks and best regards, Vishal Sapre --- "So say...Day by day, in every way, I am getting better, better and better !!!" "A Strong and Positive attitude creates more miracles than anything else. Because...Life is 10% how you make it, and 90% how you take it" "Diamond is another piece of coal that did well under pressure? "May we do good and not evil. May we find forgiveness for ourself and forgive others. May we share freely, never taking more than we give." From gora at srijan.in Mon Aug 9 19:22:07 2010 From: gora at srijan.in (Gora Mohanty) Date: Mon, 9 Aug 2010 22:52:07 +0530 Subject: [BangPypers] Do you think a more declarative RE syntax would make the world a better place ? In-Reply-To: References: Message-ID: <20100809225207.641fbedb@ibis> On Mon, 9 Aug 2010 17:04:16 +0530 Vishal wrote: > Hello fellas, > > I am trying to create a python function that can take an plain > english description of a regular expression and return the > regular expression to the caller. [...] > - literal: 'a' > - one_of: 'b,c' > - one_or_more_of: 'd' > - zero_or_more_of: 'e' [...] While regular expressions are not Turing complete, this will quickly get out of control. Will your grammar include things like at_least_three_but_not_more_than_five_of, named groups, extensions, lookaheads, lookbehinds, etc.? Just for fun, consider rewriting the example below: http://www.ex-parrot.com/pdw/Mail-RFC822-Address.html I agree with other posters that there is probably not much practical use for this, except maybe as an exercise to write a regular expression engine. I cannot think of someone experienced in regular expressions who would want to go through the extra verbosity. It might be of marginal use to novices, but IMHO, the effort needed to learn this would be better invested in learning regular regular expressions. Regards, Gora From dhananjay.nene at gmail.com Tue Aug 10 05:27:56 2010 From: dhananjay.nene at gmail.com (Dhananjay Nene) Date: Tue, 10 Aug 2010 08:57:56 +0530 Subject: [BangPypers] Do you think a more declarative RE syntax would make the world a better place ? In-Reply-To: References: Message-ID: On Mon, Aug 9, 2010 at 5:04 PM, Vishal wrote: > Hello fellas, > > I am trying to create a python function that can take an plain english > description of a regular expression and return the regular expression to > the > caller. > > Currently I am thinking of the description in YAML format. So, we can store > the description as a raw string variable, which is passed on to this > another > function and output of that function is then passed to the 're' module. > Following is a rather simplistic example: > > # a(b|c)d+e* > > re1 = """ > > - literal: 'a' > - one_of: 'b,c' > - one_or_more_of: 'd' > - zero_or_more_of: 'e' > """ > > myre = re.compile(getRegex(re1)) > > myre.search(...) > > etc. > > Does anyone think something of this sort would be of wider use? Do you know > already existing packages that can do it? What are the limitations that you > see to this approach? Does anyone think, having the declarative string in > code, would make it more maintainable? > The real struggle here is the complexity of modeling the problem you are attempting to solve. RE syntax per se isn't the problem though it could be recast a bit in favour of readability and grokkability away from brevity (not that I am in favour of that). The issue is really the complexity of the diversity of situations that RE expressions attempt to model. Should you wan't to attempt to support the entire range of scenarios that REs can manage, I imagine the yaml will become excessively verbose to manage and will eventually start suffering similar difficulties of grokkability that complex REs end up with. While I don't think there's a good solution for that, I think a victory if at all feasible could be better had through a better modeling of how pattern matching expressions can be composed (differently from current RE structures) rather than making the current expression structures verbose and declarative. Dhananjay _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- -------------------------------------------------------- blog: http://blog.dhananjaynene.com twitter: http://twitter.com/dnene From vsapre80 at gmail.com Tue Aug 10 07:28:48 2010 From: vsapre80 at gmail.com (Vishal) Date: Tue, 10 Aug 2010 10:58:48 +0530 Subject: [BangPypers] Do you think a more declarative RE syntax would make the world a better place ? In-Reply-To: References: Message-ID: Thanks everybody for the insight that you have shared with me and the group. As of now, I am abandoning this weekend project, and have started looking for something else :)) BTW, in the process of designing the semantics of the YAML description, I had to read through the Python RE module docs a few times and that has clarified my understanding of the regular expressions in general. So now I can atleast look at a regex and successfully try to figure out what its trying to say. Thanks and best regards, Vishal On Tue, Aug 10, 2010 at 8:57 AM, Dhananjay Nene wrote: > On Mon, Aug 9, 2010 at 5:04 PM, Vishal wrote: > > > Hello fellas, > > > > I am trying to create a python function that can take an plain english > > description of a regular expression and return the regular expression to > > the > > caller. > > > > Currently I am thinking of the description in YAML format. So, we can > store > > the description as a raw string variable, which is passed on to this > > another > > function and output of that function is then passed to the 're' module. > > Following is a rather simplistic example: > > > > # a(b|c)d+e* > > > > re1 = """ > > > > - literal: 'a' > > - one_of: 'b,c' > > - one_or_more_of: 'd' > > - zero_or_more_of: 'e' > > """ > > > > myre = re.compile(getRegex(re1)) > > > > myre.search(...) > > > > etc. > > > > Does anyone think something of this sort would be of wider use? Do you > know > > already existing packages that can do it? What are the limitations that > you > > see to this approach? Does anyone think, having the declarative string in > > code, would make it more maintainable? > > > > The real struggle here is the complexity of modeling the problem you are > attempting to solve. RE syntax per se isn't the problem though it could be > recast a bit in favour of readability and grokkability away from brevity > (not that I am in favour of that). The issue is really the complexity of > the > diversity of situations that RE expressions attempt to model. Should you > wan't to attempt to support the entire range of scenarios that REs can > manage, I imagine the yaml will become excessively verbose to manage and > will eventually start suffering similar difficulties of grokkability that > complex REs end up with. While I don't think there's a good solution for > that, I think a victory if at all feasible could be better had through a > better modeling of how pattern matching expressions can be composed > (differently from current RE structures) rather than making the current > expression structures verbose and declarative. > > Dhananjay > > _______________________________________________ > > BangPypers mailing list > > BangPypers at python.org > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > > -- > -------------------------------------------------------- > blog: http://blog.dhananjaynene.com > twitter: http://twitter.com/dnene > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- Thanks and best regards, Vishal Sapre --- "So say...Day by day, in every way, I am getting better, better and better !!!" "A Strong and Positive attitude creates more miracles than anything else. Because...Life is 10% how you make it, and 90% how you take it" "Diamond is another piece of coal that did well under pressure? "May we do good and not evil. May we find forgiveness for ourself and forgive others. May we share freely, never taking more than we give." From goldee at gmail.com Tue Aug 10 09:31:38 2010 From: goldee at gmail.com (Goldee Udani) Date: Tue, 10 Aug 2010 13:01:38 +0530 Subject: [BangPypers] JOB: Django/Python Web Developer for Beevolve Message-ID: Immediate requirement for an experienced Django/Python developer for a growing startup. Beevolve (http://www.beevolve.com) is a software product startup that develops SaaS based products to help companies make sense of large-scale data. Requirements: ? Python ? Django ? JQuery, Raphaeljs/ProtoVis, Javascript ? Flex/Actionscript ? HTML and CSS ? Shell Scripting ? Comfortable with *nix platforms Links to web applications you have worked on, blog, or open-source code contributions are all a plus. What Beevolve offers: ? Informal and entrepreneurial environment ? Flexible working hours ? Possbilities and incentives for learning new technologies If this seems like an interesting oppurtunity to you, please send your resume and cover letter (in plain text or html) to jobs[at]beevolve[dot]com with the subject ?JOB-CDJ-005?. From dhananjay.nene at gmail.com Tue Aug 10 12:12:59 2010 From: dhananjay.nene at gmail.com (Dhananjay Nene) Date: Tue, 10 Aug 2010 15:42:59 +0530 Subject: [BangPypers] python speed comparison In-Reply-To: References: Message-ID: On Mon, Aug 9, 2010 at 3:59 PM, Emil Chacko wrote: > This implementation is really good.It's really fast compared to the initial > one I posted but i didn't understand much about this memoize.I asked one of > my friend he told it's python decorators.Can anyone please explain what the > function memoize does. > > Commented code follows : #memoize is a decorator around the function f (wrapper function) def memoize(f): # declare a cache to store prior results cache = {} # g is the wrapper function which takes the input number a def g(a): # Check if f had earlier been called with the value a # If it had been called, a will be a key in the cache dict if a not in cache: # Now we know f had not been called earlier for the value a # Hence invoke the function f for value a and capture the # return value of the same as a value in the cache for the key # value of a cache[a] = f(a) # return the computed or the cached value for a return cache[a] # Return the wrapper g # This is triggered when the @memoize directive is observed. # It for practical purposes replaces the wrapped function 'f' which subsequently in # this example is 'solve' by this function 'g' which in turn internally calls # 'a' or 'solve' in this case return g # trigger the function wrapping by using a decorator @memoize def solve(n): if n == 1: return 1 elif n%2 == 0: return 1 + solve(n/2) else: return 1 + solve(3*n+1) # use solve as you otherwise might have done # (the decoration / memoisation / wrapping is transparent) print max((solve(i), i) for i in range(1, 1+1000000)) -- -------------------------------------------------------- blog: http://blog.dhananjaynene.com twitter: http://twitter.com/dnene From vinay.kumar at adecco.co.in Wed Aug 11 06:56:51 2010 From: vinay.kumar at adecco.co.in (Vinay Kumar) Date: Wed, 11 Aug 2010 10:26:51 +0530 Subject: [BangPypers] "[JOB]: Senior Python Specialists required for Nokia R&D, Bangalore". Message-ID: <11F3861D3F5648688B24D58C51C1A270@adecco.india.co.in> Hello, My name is Vinay, I represent Adecco India as a Lead Search Consultant. I wish to let you all know about couple of Senior Testing Positions open with Nokia R&D in their MEEGO Group. MEEGO is the new Linux based Open Source Mobile OS being developed by Nokia in collaboration with Intel. For more information please go through www.meego.com Find below the details of the current open positions: Automation Testing Qualifications We are looking for a Testing Engineer for our mobile devices based on the Linux and other open source technologies. Work experience min 5+ years in SW testing - Experience in working in a team of testers (5 - 10 people) - Familiar with testing activities (functional testing, system testing, field testing. automation) - Experience in test case execution and reporting - Experience and "hands on" in Linux OS environment - 2+ year experience in any test automation environment. - Familiar with using different Test Management tools (e.g. Quality Center) - Familiar with using different Bugs Management tools (e.g. Bugzilla) - Experience and contribution to open source env/tools will be a plus - Previous experience in testing sw of hand held devices is appreciated - Knowledge of automation framework( example testunit) - Experience in Test scripting using python/Ruby Non Functional Testing Qualifications We are looking for a Testing Engineer for our mobile devices based on the Linux and other open source technologies. Work experience min 5+ years in SW testing - Experience in working in a team of testers (5 - 10 people) - Expertise in Non-Functional Testing - Experience in test case execution and reporting - Experience and "hands on" in Linux OS environment - must be able to understand and interpret correctly, UI specs, design docs, sw requirements, etc. - Familiar with using different Test Management tools (e.g. Quality Center) - Familiar with using different Bugs Management tools (e.g. Bugzilla) - Experience and contribution to open source env/tools will be a plus - Experience in Memory management/analysis and generating performance/reliability indices. - Experience in Open source memory tool like (libleak, Valgrind) is recommended - Experience in CPU usage Analysis tools like (Oprofiler) is recommended - Experience in Test scripting using python/Ruby Interested people can send their resumes in reply to this mail. Best Regards, Vinay Kumar Adecco India Tel: +91 80 39897070 X 5091 Fax: +91 80 41119020 Mob: +91 9886545057 vinay.kumar at adecco.co.in adecco.co.in From lawgon at au-kbc.org Wed Aug 11 11:53:13 2010 From: lawgon at au-kbc.org (Kenneth Gonsalves) Date: Wed, 11 Aug 2010 15:23:13 +0530 Subject: [BangPypers] python resource persons in coimbatore Message-ID: <1281520393.1907.50.camel@localhost> hi, I am looking for python resource persons in coimbatore. Please contact me offlist -- regards Kenneth Gonsalves From vsapre80 at gmail.com Fri Aug 13 13:38:05 2010 From: vsapre80 at gmail.com (Vishal) Date: Fri, 13 Aug 2010 17:08:05 +0530 Subject: [BangPypers] [JOB] [Python alongside Lex/Yacc/C] Staff Software Engineer @ National Semiconductor, bangalore, India In-Reply-To: References: Message-ID: Hi Friends, We have a position open at National Semiconductor. Please forward any references you may have, directly to me. Thanks and best regards, Vishal Sapre *Job *Description*: **Staff Software Engineer**.* * * ***Location** **Bangalore, KA* * * *Design Automation Group of NSC has CAD software development group which provides customized EDA tools for National?s product lines. * *Currently the team is working on a customized version of Berkeley SPICE analog simulator and automating established flows.* * * *The Staff Software Engineer is responsible for developing C/C++ and script based software that simulates Full Chip Models. In addition to the development abilities, high quality testing and documentation will be critical to the success of this position and the group. This is a technical leadership position.* * * *Responsibilities:* *+ C/C++ programming with Lex and Yacc based parser development/maintenance * *+ Modify in house analog circuit simulator for customized needs.* *+ Participate in complete lifecycle of software development process.* *+ Excellent debugging and trouble-shooting skills and customer support.* *+ Mentor other team members* * * *Minimum Requirements:* *+ Excellent understanding of Berkeley SPICE internals* *+ Excellent knowledge of data structures and C/C++ programming on Linux or Windows* *+ Familiar with at least one scripting language* *+ Excellent written and verbal communication skills* *+ Good track record of mentoring other team members* * * *Desired Experience:* *+ Knowledge of Lex and Yacc, Python * *+ Familiarity in using any analog circuit simulator* * * *Qualification and Experience:* *Ideal candidate should have experience in developing significant software projects.* *The candidate should have M.Tech in CS/EE with at least five years of experience or B.Tech in CS/EE with at least six years of experience.* * * *Key Words:* *+ Circuit Simulator Development* *+ Behavioral Modeling* *+ Lex and Yacc Based Parser* *+ C/C++, Python, Gnu tools* -- -- Thanks and best regards, Vishal Sapre --- "So say...Day by day, in every way, I am getting better, better and better !!!" "A Strong and Positive attitude creates more miracles than anything else. Because...Life is 10% how you make it, and 90% how you take it" "Diamond is another piece of coal that did well under pressure? "May we do good and not evil. May we find forgiveness for ourself and forgive others. May we share freely, never taking more than we give." From jeffjosejeff at gmail.com Sun Aug 15 14:55:22 2010 From: jeffjosejeff at gmail.com (Jeffrey Jose) Date: Sun, 15 Aug 2010 18:25:22 +0530 Subject: [BangPypers] EuroPython videos out now! Message-ID: via: http://www.europython.eu/blog/announcements/talk-videos-from-ep2010-published/ and videos are here. http://europythonvideos.blip.tv/ enjoy! /jeff From lorddaemon at gmail.com Mon Aug 16 13:08:06 2010 From: lorddaemon at gmail.com (Dark Seid) Date: Mon, 16 Aug 2010 16:38:06 +0530 Subject: [BangPypers] [OT][ANN] DevCamp Bangalore 3 Message-ID: We're happy to announce the third edition of DevCamp Bangalore - DevCamp Bangalore 3 (http://bangalore.devcamp.in) on Saturday, 4th September 2010. The event will be sponsored & hosted by ThoughtWorks ( www.thoughtworks.com) at their office in Diamond District, Bangalore. (map: http://is.gd/ejWkd ) Like any BarCamp, registration is on the wiki and there is no registration fee. DevCamp is an un-conference by the hackers*, for the hackers and of the hackers. It's a species of BarCamp where anything a lover of computers and technology would consider important or entertaining goes. The first DevCamp took place a little over two years ago, and we've always had a lot of fun being a part of this event; we're hoping to keep that trend going with DCB3. If you're planning to do a session at DCB3, do keep in mind the fact that everyone at DevCamp is a hacker, a pro. Please assume a high level of exposure and knowledge on the part of your audience, and tailor your sessions accordingly. Avoid 'Hello World' and how-to sessions which can be easily found on the net. First hand war stories, in-depth analyses of topics, and live demos are best. Thanks, Sidu. w: http://blog.sidu.in t: http://twitter.com/ponnappa * Hacker as defined here: http://www.cs.berkeley.edu/~bh/hacker.html From lawgon at au-kbc.org Mon Aug 16 14:20:30 2010 From: lawgon at au-kbc.org (Kenneth Gonsalves) Date: Mon, 16 Aug 2010 17:50:30 +0530 Subject: [BangPypers] source Message-ID: <1281961230.1907.288.camel@localhost> hi, in using virtualenv and some other python programs I see the use of 'source' - google search does not throw up anything useful. What is 'source'? is it python or something else, and where can I get a link to material on it? -- regards Kenneth Gonsalves From b.ghose at gmail.com Mon Aug 16 14:26:37 2010 From: b.ghose at gmail.com (Baishampayan Ghose) Date: Mon, 16 Aug 2010 17:56:37 +0530 Subject: [BangPypers] source In-Reply-To: <1281961230.1907.288.camel@localhost> References: <1281961230.1907.288.camel@localhost> Message-ID: > in using virtualenv and some other python programs I see the use of > 'source' - google search does not throw up anything useful. What is > 'source'? is it python or something else, and where can I get a link to > material on it? It's a shell built-in and is equivalent to `.'. http://www.gnu.org/software/bash/manual/bashref.html#Bourne-Shell-Builtins Regards, BG -- Baishampayan Ghose b.ghose at gmail.com From upasana.taku at gmail.com Mon Aug 16 15:32:02 2010 From: upasana.taku at gmail.com (Upasana Taku) Date: Mon, 16 Aug 2010 19:02:02 +0530 Subject: [BangPypers] Python web developer for startup Message-ID: Hi Guys Early stage startup is looking for a full time Python developer in Delhi NCR area, 3-7 years of experience in building web applications desirable. Please email me your brief profile. Thanks, Upasana Taku http://in.linkedin.com/in/upasana From lawgon at au-kbc.org Mon Aug 16 15:13:25 2010 From: lawgon at au-kbc.org (Kenneth Gonsalves) Date: Mon, 16 Aug 2010 18:43:25 +0530 Subject: [BangPypers] source In-Reply-To: References: <1281961230.1907.288.camel@localhost> Message-ID: <1281964405.1907.289.camel@localhost> On Mon, 2010-08-16 at 17:56 +0530, Baishampayan Ghose wrote: > > in using virtualenv and some other python programs I see the use of > > 'source' - google search does not throw up anything useful. What is > > 'source'? is it python or something else, and where can I get a link > to > > material on it? > > It's a shell built-in and is equivalent to `.'. > > http://www.gnu.org/software/bash/manual/bashref.html#Bourne-Shell-Builtins thanks - and why did I not try man source? -- regards Kenneth Gonsalves From noufal at gmail.com Mon Aug 16 16:01:42 2010 From: noufal at gmail.com (Noufal Ibrahim) Date: Mon, 16 Aug 2010 19:31:42 +0530 Subject: [BangPypers] source In-Reply-To: <1281964405.1907.289.camel@localhost> (Kenneth Gonsalves's message of "Mon, 16 Aug 2010 18:43:25 +0530") References: <1281961230.1907.288.camel@localhost> <1281964405.1907.289.camel@localhost> Message-ID: <87fwyezmex.fsf@gmail.com> Kenneth Gonsalves writes: > On Mon, 2010-08-16 at 17:56 +0530, Baishampayan Ghose wrote: >> > in using virtualenv and some other python programs I see the use of >> > 'source' - google search does not throw up anything useful. What is >> > 'source'? is it python or something else, and where can I get a link >> to >> > material on it? >> >> It's a shell built-in and is equivalent to `.'. >> >> http://www.gnu.org/software/bash/manual/bashref.html#Bourne-Shell-Builtins > > thanks - and why did I not try man source? I don't think it'd help. It's a shell builtin without a man page of it's own. You'd either have to do "man bash" or "help source" -- From jeffjosejeff at gmail.com Mon Aug 16 20:03:01 2010 From: jeffjosejeff at gmail.com (Jeffrey Jose) Date: Mon, 16 Aug 2010 23:33:01 +0530 Subject: [BangPypers] source In-Reply-To: <87fwyezmex.fsf@gmail.com> References: <1281961230.1907.288.camel@localhost> <1281964405.1907.289.camel@localhost> <87fwyezmex.fsf@gmail.com> Message-ID: > > > I don't think it'd help. It's a shell builtin without a man page of it's > own. You'd either have to do "man bash" or "help source" > > wont `man ` take you to `man bash` (man tcsh, in my case) automatically? > -- > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From noufal at gmail.com Mon Aug 16 20:21:00 2010 From: noufal at gmail.com (Noufal Ibrahim) Date: Mon, 16 Aug 2010 23:51:00 +0530 Subject: [BangPypers] source In-Reply-To: (Jeffrey Jose's message of "Mon, 16 Aug 2010 23:33:01 +0530") References: <1281961230.1907.288.camel@localhost> <1281964405.1907.289.camel@localhost> <87fwyezmex.fsf@gmail.com> Message-ID: <877hjqxvub.fsf@gmail.com> Jeffrey Jose writes: >> >> >> I don't think it'd help. It's a shell builtin without a man page of it's >> own. You'd either have to do "man bash" or "help source" >> >> wont `man ` take you to `man bash` (man tcsh, in my case) > automatically? Doesn't for me on Ubuntu 10.04 > noufal at sanitarium:~$ man source > No manual entry for source > noufal at sanitarium:~$ Besides, as far as I know, "man" isn't aware of your shell. It'd had to have intelligence to change the page it delivers based on your current shell. [...] -- From lawgon at au-kbc.org Tue Aug 17 08:07:52 2010 From: lawgon at au-kbc.org (Kenneth Gonsalves) Date: Tue, 17 Aug 2010 11:37:52 +0530 Subject: [BangPypers] source In-Reply-To: <87fwyezmex.fsf@gmail.com> References: <1281961230.1907.288.camel@localhost> <1281964405.1907.289.camel@localhost> <87fwyezmex.fsf@gmail.com> Message-ID: <1282025272.1907.313.camel@localhost> On Mon, 2010-08-16 at 19:31 +0530, Noufal Ibrahim wrote: > > thanks - and why did I not try man source? > > I don't think it'd help. It's a shell builtin without a man page of > it's > own. You'd either have to do "man bash" or "help source" on fedora 12 it works - not on lenny -- regards Kenneth Gonsalves From gvkalra at gmail.com Tue Aug 17 11:34:39 2010 From: gvkalra at gmail.com (Gaurav Kalra) Date: Tue, 17 Aug 2010 15:04:39 +0530 Subject: [BangPypers] NLTK: Dispersion Plot problem Message-ID: Hi. I have been trying to learn NLTK (http://www.nltk.org/) following instructions over: http://nltk.googlecode.com/svn/trunk/doc/book/ch01.html The point at which I am stuck is using the function dispersion_plot() ( http://nltk.googlecode.com/svn/trunk/doc/api/nltk.draw.dispersion-module.html#dispersion_plot ) Here is the output of yolk: PyYAML - 3.09 - active Python - 2.6.5 - active development (/usr/lib/python2.6/lib-dynload) distribute - 0.6.10 - active matplotlib - 1.0.0 - active nltk - 2.0b9 - active numpy - 1.4.1 - active pip - 0.7.2 - active wsgiref - 0.1.2 - active development (/usr/lib/python2.6) yolk - 0.4.1 - active I guess that dispersion_plot() requires matplotlib and numpy, which are already active but, running the function is not generating any dispersion graph as showed over here: http://nltk.googlecode.com/svn/trunk/doc/book/ch01.html Any thoughts ? -- Gaurav Kalra +91-9878-649-294 From jaganadhg at gmail.com Tue Aug 17 12:40:16 2010 From: jaganadhg at gmail.com (JAGANADH G) Date: Tue, 17 Aug 2010 16:10:16 +0530 Subject: [BangPypers] NLTK: Dispersion Plot problem In-Reply-To: References: Message-ID: On Tue, Aug 17, 2010 at 3:04 PM, Gaurav Kalra wrote: > Hi. > I have been trying to learn NLTK (http://www.nltk.org/) following > instructions over: > http://nltk.googlecode.com/svn/trunk/doc/book/ch01.html > > The point at which I am stuck is using the function dispersion_plot() ( > > http://nltk.googlecode.com/svn/trunk/doc/api/nltk.draw.dispersion-module.html#dispersion_plot > ) > > Here is the output of yolk: > PyYAML - 3.09 - active > Python - 2.6.5 - active development > (/usr/lib/python2.6/lib-dynload) > distribute - 0.6.10 - active > matplotlib - 1.0.0 - active > nltk - 2.0b9 - active > numpy - 1.4.1 - active > pip - 0.7.2 - active > wsgiref - 0.1.2 - active development (/usr/lib/python2.6) > yolk - 0.4.1 - active > > > I guess that dispersion_plot() requires matplotlib and numpy, which are > already active but, running the function is not generating any dispersion > graph as showed over here: > http://nltk.googlecode.com/svn/trunk/doc/book/ch01.html > Have you got any error message. Which version of NLTK you are using Try this from nltk import * from nltk.book import * text4.dispersion_plot(["citizens", "democracy", "freedom", "duties", "America"]) If Numpy and matplotlib is present it will work. -- ********************************** JAGANADH G http://jaganadhg.freeflux.net/blog From lawgon at au-kbc.org Wed Aug 18 09:46:20 2010 From: lawgon at au-kbc.org (Kenneth Gonsalves) Date: Wed, 18 Aug 2010 13:16:20 +0530 Subject: [BangPypers] IPSS membership enrollment Message-ID: <1282117580.20570.86.camel@localhost> hi, as most of you know, we formed the Indian Python Software Society mainly for the purpose of conducting the annual Indian PyCon and also to promote python in India. After lots of delay, the society has been registered and a bank account opened. We are planning to have the first AGM along with the conference on the 26th of September. We are now enrolling members, so if you would like to be part of the society - and contribute a small sum annually to help defray the expenses of the society. Please enroll yourself as a member. Details are here: http://ipss.org.in -- regards Kenneth Gonsalves From gvkalra at gmail.com Wed Aug 18 17:21:11 2010 From: gvkalra at gmail.com (Gaurav Kalra) Date: Wed, 18 Aug 2010 20:51:11 +0530 Subject: [BangPypers] NLTK: Dispersion Plot problem Message-ID: > On Tue, Aug 17, 2010 at 3:04 PM, Gaurav Kalra wrote: > > > Hi. > > I have been trying to learn NLTK (http://www.nltk.org/) following > > instructions over: > > http://nltk.googlecode.com/svn/trunk/doc/book/ch01.html > > > > The point at which I am stuck is using the function dispersion_plot() ( > > > > > http://nltk.googlecode.com/svn/trunk/doc/api/nltk.draw.dispersion-module.html#dispersion_plot > > ) > > > > Here is the output of yolk: > > PyYAML - 3.09 - active > > Python - 2.6.5 - active development > > (/usr/lib/python2.6/lib-dynload) > > distribute - 0.6.10 - active > > matplotlib - 1.0.0 - active > > nltk - 2.0b9 - active > > numpy - 1.4.1 - active > > pip - 0.7.2 - active > > wsgiref - 0.1.2 - active development (/usr/lib/python2.6) > > yolk - 0.4.1 - active > > > > > > I guess that dispersion_plot() requires matplotlib and numpy, which are > > already active but, running the function is not generating any dispersion > > graph as showed over here: > > http://nltk.googlecode.com/svn/trunk/doc/book/ch01.html > > > > > Have you got any error message. > > Which version of NLTK you are using > > Try this > > from nltk import * > from nltk.book import * > text4.dispersion_plot(["citizens", "democracy", "freedom", "duties", > "America"]) > > If Numpy and matplotlib is present it will work. > > > -- > ********************************** > JAGANADH G > http://jaganadhg.freeflux.net/blog > Hi Jaganadh, The NLTK version that I am using is 2.0b9. Also, I am not getting any error messages. Here is what I am doing (though every part is not necessary, still posting) I am able to complete all the exercises, apart from the ones which involves the interpreter to "display" something graphical. (But I have matplotlib installed - see yolk -l output) gvkalra at gvkalra-laptop:~$ cd Desktop/srv/python-environments/ gvkalra at gvkalra-laptop:~/Desktop/srv/python-environments$ source gotcha/bin/activate (gotcha)gvkalra at gvkalra-laptop:~/Desktop/srv/python-environments$ python Python 2.6.5 (r265:79063, Apr 16 2010, 13:09:56) [GCC 4.4.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from nltk import * >>> from nltk.book import * *** Introductory Examples for the NLTK Book *** Loading text1, ..., text9 and sent1, ..., sent9 Type the name of the text or sentence to view it. Type: 'texts()' or 'sents()' to list the materials. text1: Moby Dick by Herman Melville 1851 text2: Sense and Sensibility by Jane Austen 1811 text3: The Book of Genesis text4: Inaugural Address Corpus text5: Chat Corpus text6: Monty Python and the Holy Grail text7: Wall Street Journal text8: Personals Corpus text9: The Man Who Was Thursday by G . K . Chesterton 1908 >>> text4.dispersion_plot(["citizens","democracy","freedom","duties","America"]) >>> From jaganadhg at gmail.com Wed Aug 18 17:57:01 2010 From: jaganadhg at gmail.com (JAGANADH G) Date: Wed, 18 Aug 2010 21:27:01 +0530 Subject: [BangPypers] NLTK: Dispersion Plot problem In-Reply-To: References: Message-ID: > > gvkalra at gvkalra-laptop:~$ cd Desktop/srv/python-environments/ > gvkalra at gvkalra-laptop:~/Desktop/srv/python-environments$ source > gotcha/bin/activate > (gotcha)gvkalra at gvkalra-laptop:~/Desktop/srv/python-environments$ python > Python 2.6.5 (r265:79063, Apr 16 2010, 13:09:56) > [GCC 4.4.3] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from nltk import * > >>> from nltk.book import * > *** Introductory Examples for the NLTK Book *** > Loading text1, ..., text9 and sent1, ..., sent9 > Type the name of the text or sentence to view it. > Type: 'texts()' or 'sents()' to list the materials. > text1: Moby Dick by Herman Melville 1851 > text2: Sense and Sensibility by Jane Austen 1811 > text3: The Book of Genesis > text4: Inaugural Address Corpus > text5: Chat Corpus > text6: Monty Python and the Holy Grail > text7: Wall Street Journal > text8: Personals Corpus > text9: The Man Who Was Thursday by G . K . Chesterton 1908 > >>> > > text4.dispersion_plot(["citizens","democracy","freedom","duties","America"]) > >>> > > Have you checked that the plot is being minimized. Are you using virtual environment ? I tried it in Fedora 12, 13 and Ubuntu 10.4 it works fine for me . -- ********************************** JAGANADH G http://jaganadhg.freeflux.net/blog From anand_shankar at yahoo.com Wed Aug 18 19:28:07 2010 From: anand_shankar at yahoo.com (Anand Shankar) Date: Wed, 18 Aug 2010 10:28:07 -0700 (PDT) Subject: [BangPypers] Dictionary : An elementary question Message-ID: <143420.40770.qm@web110507.mail.gq1.yahoo.com> During a tutorial python session with my colleagues I was presented with a basic question >>> d = {'apple':2,'banana':5, 'coke': 6} >>> print d.keys() ['coke', 'apple', 'banana'] Question is why does it not return ['apple','banana','coke'] Similarly: >>> d = {'a':2,'b':4,'c':5,'d':4,'e':3} >>> print d.keys() ['a', 'c', 'b', 'e', 'd'] why not ['a', 'b', 'c', 'd', 'e'] I have no clues. Any inputs?? anand From hiddenharmony at gmail.com Wed Aug 18 19:34:25 2010 From: hiddenharmony at gmail.com (Vivek Khurana) Date: Wed, 18 Aug 2010 23:04:25 +0530 Subject: [BangPypers] Dictionary : An elementary question In-Reply-To: <143420.40770.qm@web110507.mail.gq1.yahoo.com> References: <143420.40770.qm@web110507.mail.gq1.yahoo.com> Message-ID: On Wed, Aug 18, 2010 at 10:58 PM, Anand Shankar wrote: > During a tutorial python session with my colleagues I was presented with a basic > question > >>>> d = {'apple':2,'banana':5, 'coke': 6} >>>> print d.keys() > ['coke', 'apple', 'banana'] > > > Question is why does it not return > > ['apple','banana','coke'] > > Similarly: > >>>> d = {'a':2,'b':4,'c':5,'d':4,'e':3} >>>> print d.keys() > ['a', 'c', 'b', 'e', 'd'] > > why not > > ['a', 'b', 'c', 'd', 'e'] > > I have no clues. Any inputs?? Quoting from python docs[1] "The keys() method of a dictionary object returns a list of all the keys used in the dictionary, in arbitrary order (if you want it sorted, just apply the sort() method to the list of keys). " [1]: http://docs.python.org/tutorial/datastructures.html#dictionaries regards Vivek -- The hidden harmony is better than the obvious!! From vinayshastry at gmail.com Wed Aug 18 19:34:32 2010 From: vinayshastry at gmail.com (Vinay Shastry) Date: Wed, 18 Aug 2010 23:04:32 +0530 Subject: [BangPypers] Dictionary : An elementary question In-Reply-To: <143420.40770.qm@web110507.mail.gq1.yahoo.com> References: <143420.40770.qm@web110507.mail.gq1.yahoo.com> Message-ID: On 18 August 2010 22:58, Anand Shankar wrote: > During a tutorial python session with my colleagues I was presented with a basic > question > >>>> d = {'apple':2,'banana':5, 'coke': 6} >>>> print d.keys() > ['coke', 'apple', 'banana'] > > > Question is why does it not return > > ['apple','banana','coke'] > I have no clues. Any inputs?? > For this reason: "It is best to think of a dictionary as an unordered set of key: value pairs" http://docs.python.org/tutorial/datastructures.html#dictionaries >>> d = {'apple':2,'banana':5, 'coke': 6} >>> d {'coke': 6, 'apple': 2, 'banana': 5} >>> print d.keys() ['coke', 'apple', 'banana'] -- Vinay S Shastry http://thenub.one09.net From digamma at gmail.com Wed Aug 18 20:32:43 2010 From: digamma at gmail.com (karthik) Date: Thu, 19 Aug 2010 00:02:43 +0530 Subject: [BangPypers] Do you think a more declarative RE syntax would make the world a better place ? In-Reply-To: References: Message-ID: On Tue, Aug 10, 2010 at 10:58 AM, Vishal wrote: > On Mon, Aug 9, 2010 at 5:04 PM, Vishal wrote: > > I am trying to create a python function that can take an plain > > english description of a regular expression and return the > > regular expression to the caller. > Thanks everybody for the insight that you have shared with me and the group. > > As of now, I am abandoning this weekend project, and have started looking > for something else :)) You might be interested in http://txt2regex.sourceforge.net/. It does what you're asking for but it's most useful when you forget differences between regex dialects (I use python, 2 greps, vi, vim, 2 seds, awk). With best regards, Karthik From jeffjosejeff at gmail.com Wed Aug 18 22:18:52 2010 From: jeffjosejeff at gmail.com (Jeffrey Jose) Date: Thu, 19 Aug 2010 01:48:52 +0530 Subject: [BangPypers] Dictionary : An elementary question In-Reply-To: References: <143420.40770.qm@web110507.mail.gq1.yahoo.com> Message-ID: Excellent responses so far. Dictionaries are optimized for retrieving key/value pairs. And to achieve that, it compromises on the order in which stuff is stored. This and more is very nicely presented in the Pycon 2010 talk - The Mighty Dictionary. Highly recommended. http://us.pycon.org/2010/conference/schedule/event/12/ /jeff On Wed, Aug 18, 2010 at 11:04 PM, Vinay Shastry wrote: > On 18 August 2010 22:58, Anand Shankar wrote: > > During a tutorial python session with my colleagues I was presented with > a basic > > question > > > >>>> d = {'apple':2,'banana':5, 'coke': 6} > >>>> print d.keys() > > ['coke', 'apple', 'banana'] > > > > > > Question is why does it not return > > > > ['apple','banana','coke'] > > > I have no clues. Any inputs?? > > > > For this reason: > "It is best to think of a dictionary as an unordered set of key: value > pairs" > > http://docs.python.org/tutorial/datastructures.html#dictionaries > > >>> d = {'apple':2,'banana':5, 'coke': 6} > >>> d > {'coke': 6, 'apple': 2, 'banana': 5} > >>> print d.keys() > ['coke', 'apple', 'banana'] > > -- > Vinay S Shastry > http://thenub.one09.net > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From lawgon at au-kbc.org Thu Aug 19 03:38:41 2010 From: lawgon at au-kbc.org (Kenneth Gonsalves) Date: Thu, 19 Aug 2010 07:08:41 +0530 Subject: [BangPypers] Dictionary : An elementary question In-Reply-To: <143420.40770.qm@web110507.mail.gq1.yahoo.com> References: <143420.40770.qm@web110507.mail.gq1.yahoo.com> Message-ID: <1282181921.20570.107.camel@localhost> On Wed, 2010-08-18 at 10:28 -0700, Anand Shankar wrote: > I have no clues. Any inputs?? sort order of dictionary keys is not guaranteed. Only a list will return items in the same order as entered. -- regards Kenneth Gonsalves From anand.shashwat at gmail.com Thu Aug 19 04:45:36 2010 From: anand.shashwat at gmail.com (Shashwat Anand) Date: Thu, 19 Aug 2010 08:15:36 +0530 Subject: [BangPypers] Dictionary : An elementary question In-Reply-To: <143420.40770.qm@web110507.mail.gq1.yahoo.com> References: <143420.40770.qm@web110507.mail.gq1.yahoo.com> Message-ID: On Wed, Aug 18, 2010 at 10:58 PM, Anand Shankar wrote: > During a tutorial python session with my colleagues I was presented with a > basic > question > > >>> d = {'apple':2,'banana':5, 'coke': 6} > >>> print d.keys() > ['coke', 'apple', 'banana'] > > > Question is why does it not return > > ['apple','banana','coke'] > > Similarly: > > >>> d = {'a':2,'b':4,'c':5,'d':4,'e':3} > >>> print d.keys() > ['a', 'c', 'b', 'e', 'd'] > > why not > > ['a', 'b', 'c', 'd', 'e'] > > I have no clues. Any inputs?? > You will most likely want to read about how Hash-tables work. > anand > > > > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- ~l0nwlf From sahasr at naman.ms Thu Aug 19 07:01:03 2010 From: sahasr at naman.ms (Sahasranaman MS) Date: Thu, 19 Aug 2010 10:31:03 +0530 Subject: [BangPypers] Dictionary : An elementary question In-Reply-To: <1282181921.20570.107.camel@localhost> References: <143420.40770.qm@web110507.mail.gq1.yahoo.com> <1282181921.20570.107.camel@localhost> Message-ID: <4C6CBA8F.2090505@naman.ms> On Thursday 19 August 2010 07:08 AM, Kenneth Gonsalves wrote: > On Wed, 2010-08-18 at 10:28 -0700, Anand Shankar wrote: >> I have no clues. Any inputs?? > sort order of dictionary keys is not guaranteed. Only a list will return > items in the same order as entered. Python has an OrderedDict class from Python 3.1 http://docs.python.org/dev/whatsnew/3.1.html#pep-372-ordered-dictionaries For older versions of python, there are several other implementations that you could use. From anand.shashwat at gmail.com Thu Aug 19 08:00:06 2010 From: anand.shashwat at gmail.com (Shashwat Anand) Date: Thu, 19 Aug 2010 11:30:06 +0530 Subject: [BangPypers] Dictionary : An elementary question In-Reply-To: <4C6CBA8F.2090505@naman.ms> References: <143420.40770.qm@web110507.mail.gq1.yahoo.com> <1282181921.20570.107.camel@localhost> <4C6CBA8F.2090505@naman.ms> Message-ID: On Thu, Aug 19, 2010 at 10:31 AM, Sahasranaman MS wrote: > On Thursday 19 August 2010 07:08 AM, Kenneth Gonsalves wrote: > >> On Wed, 2010-08-18 at 10:28 -0700, Anand Shankar wrote: >> >>> I have no clues. Any inputs?? >>> >> sort order of dictionary keys is not guaranteed. Only a list will return >> items in the same order as entered. >> > Python has an OrderedDict class from Python 3.1 > http://docs.python.org/dev/whatsnew/3.1.html#pep-372-ordered-dictionaries > For older versions of python, there are several other implementations that > you could use. OrderedDict = BST Dict = HashTable > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- ~l0nwlf From gvkalra at gmail.com Thu Aug 19 08:11:39 2010 From: gvkalra at gmail.com (Gaurav Kalra) Date: Thu, 19 Aug 2010 11:41:39 +0530 Subject: [BangPypers] NLTK: Dispersion Plot problem Message-ID: > > gvkalra at gvkalra-laptop:~$ cd Desktop/srv/python-environments/ > > gvkalra at gvkalra-laptop:~/Desktop/srv/python-environments$ source > > gotcha/bin/activate > > (gotcha)gvkalra at gvkalra-laptop:~/Desktop/srv/python-environments$ python > > Python 2.6.5 (r265:79063, Apr 16 2010, 13:09:56) > > [GCC 4.4.3] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> from nltk import * > > >>> from nltk.book import * > > *** Introductory Examples for the NLTK Book *** > > Loading text1, ..., text9 and sent1, ..., sent9 > > Type the name of the text or sentence to view it. > > Type: 'texts()' or 'sents()' to list the materials. > > text1: Moby Dick by Herman Melville 1851 > > text2: Sense and Sensibility by Jane Austen 1811 > > text3: The Book of Genesis > > text4: Inaugural Address Corpus > > text5: Chat Corpus > > text6: Monty Python and the Holy Grail > > text7: Wall Street Journal > > text8: Personals Corpus > > text9: The Man Who Was Thursday by G . K . Chesterton 1908 > > >>> > > > > > text4.dispersion_plot(["citizens","democracy","freedom","duties","America"]) > > >>> > > > > Have you checked that the plot is being minimized. > Are you using virtual environment ? > I tried it in Fedora 12, 13 and Ubuntu 10.4 it works fine for me . > The plot is not minimized either. (I tried again) Yes, I am using virutalenv. I am trying on Ubuntu 10.04 From jeffjosejeff at gmail.com Thu Aug 19 10:15:38 2010 From: jeffjosejeff at gmail.com (Jeffrey Jose) Date: Thu, 19 Aug 2010 13:45:38 +0530 Subject: [BangPypers] Dictionary : An elementary question In-Reply-To: <4C6CBA8F.2090505@naman.ms> References: <143420.40770.qm@web110507.mail.gq1.yahoo.com> <1282181921.20570.107.camel@localhost> <4C6CBA8F.2090505@naman.ms> Message-ID: On Thu, Aug 19, 2010 at 10:31 AM, Sahasranaman MS wrote: > On Thursday 19 August 2010 07:08 AM, Kenneth Gonsalves wrote: > >> On Wed, 2010-08-18 at 10:28 -0700, Anand Shankar wrote: >> >>> I have no clues. Any inputs?? >>> >> sort order of dictionary keys is not guaranteed. Only a list will return >> items in the same order as entered. >> > Python has an OrderedDict class from Python 3.1 > http://docs.python.org/dev/whatsnew/3.1.html#pep-372-ordered-dictionaries > For older versions of python, there are several other implementations that > you could use. > > When I was writing my reply I was thinking - wasnt there something added recently which is a dictionary and was ordered. Unfortunately I'm stuck on 2.5, so havent used this one. Thanks for this. > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From anand_shankar at yahoo.com Thu Aug 19 11:09:15 2010 From: anand_shankar at yahoo.com (Anand Shankar) Date: Thu, 19 Aug 2010 02:09:15 -0700 (PDT) Subject: [BangPypers] Dictionary : An elementary question In-Reply-To: References: <143420.40770.qm@web110507.mail.gq1.yahoo.com> <1282181921.20570.107.camel@localhost> <4C6CBA8F.2090505@naman.ms> Message-ID: <807991.13140.qm@web110503.mail.gq1.yahoo.com> Thanks a Ton to all. I got a mucher deeper insight than my question deserved!!! Thanks once again anand From delegbede at dudupay.com Thu Aug 19 06:56:07 2010 From: delegbede at dudupay.com (Dipo Elegbede) Date: Thu, 19 Aug 2010 05:56:07 +0100 Subject: [BangPypers] Dictionary : An elementary question In-Reply-To: References: <143420.40770.qm@web110507.mail.gq1.yahoo.com> Message-ID: Hi All, There really shouldn't be so much debate on the question asked. Someone actually gave a direct and clear answer. I'm new at python and his explanations were quite understandable. As far as dictionaries are concerned, when you retrieve keys, there is no guarantee of a particular order. If you call the d.keys() consecutively, you might get two different orders. However, to get it in an alphabetical order, there is a sort() method to use. I am not too sure of the syntax but it should be something like this: sort(d.keys()). Please if I'm wrong point it out immediately to avoid transmitting wrong codes. I hope it helps. Regards, On 8/19/10, Shashwat Anand wrote: > On Wed, Aug 18, 2010 at 10:58 PM, Anand Shankar > wrote: > >> During a tutorial python session with my colleagues I was presented with a >> basic >> question >> >> >>> d = {'apple':2,'banana':5, 'coke': 6} >> >>> print d.keys() >> ['coke', 'apple', 'banana'] >> >> >> Question is why does it not return >> >> ['apple','banana','coke'] >> >> Similarly: >> >> >>> d = {'a':2,'b':4,'c':5,'d':4,'e':3} >> >>> print d.keys() >> ['a', 'c', 'b', 'e', 'd'] >> >> why not >> >> ['a', 'b', 'c', 'd', 'e'] >> >> I have no clues. Any inputs?? >> > > You will most likely want to read about how Hash-tables work. > > >> anand >> >> >> >> >> _______________________________________________ >> BangPypers mailing list >> BangPypers at python.org >> http://mail.python.org/mailman/listinfo/bangpypers >> > > > > -- > ~l0nwlf > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- Sent from my mobile device Elegbede Muhammed Oladipupo OCA +2348077682428 +2347042171716 www.dudupay.com Mobile Banking Solutions | Transaction Processing | Enterprise Application Development From praveen.python.plone at gmail.com Thu Aug 19 16:52:17 2010 From: praveen.python.plone at gmail.com (Praveen Kumar) Date: Thu, 19 Aug 2010 20:22:17 +0530 Subject: [BangPypers] Dictionary : An elementary question In-Reply-To: References: <143420.40770.qm@web110507.mail.gq1.yahoo.com> Message-ID: Here is a small script to sort the dictionary based on key/choice a = {"key3": 5 , "key2": 8, "key1": 2} b = {"key2": 7 , "key1": 4, "key3": 9} c = {"key1": 6 , "key3": 1, "key2": 1} undecorated = [a, b, c] # how do you sort this list? sort_on = "key3" decorated = [(dict_[sort_on], dict_) for dict_ in [b]] decorated.sort() print decorated print "-----------------------" result = [dict_ for (key, dict_) in decorated] print result Praveen Kumar +91 9620621342 http://praveensunsetpoint.wordpress.com Bangalore On Thu, Aug 19, 2010 at 10:26 AM, Dipo Elegbede wrote: > Hi All, > There really shouldn't be so much debate on the question asked. > Someone actually gave a direct and clear answer. I'm new at python and > his explanations were quite understandable. > As far as dictionaries are concerned, when you retrieve keys, there is > no guarantee of a particular order. > If you call the d.keys() consecutively, you might get two different orders. > However, to get it in an alphabetical order, there is a sort() method > to use. I am not too sure of the syntax but it should be something > like this: sort(d.keys()). > Please if I'm wrong point it out immediately to avoid transmitting wrong > codes. > I hope it helps. > Regards, > > On 8/19/10, Shashwat Anand wrote: > > On Wed, Aug 18, 2010 at 10:58 PM, Anand Shankar > > wrote: > > > >> During a tutorial python session with my colleagues I was presented with > a > >> basic > >> question > >> > >> >>> d = {'apple':2,'banana':5, 'coke': 6} > >> >>> print d.keys() > >> ['coke', 'apple', 'banana'] > >> > >> > >> Question is why does it not return > >> > >> ['apple','banana','coke'] > >> > >> Similarly: > >> > >> >>> d = {'a':2,'b':4,'c':5,'d':4,'e':3} > >> >>> print d.keys() > >> ['a', 'c', 'b', 'e', 'd'] > >> > >> why not > >> > >> ['a', 'b', 'c', 'd', 'e'] > >> > >> I have no clues. Any inputs?? > >> > > > > You will most likely want to read about how Hash-tables work. > > > > > >> anand > >> > >> > >> > >> > >> _______________________________________________ > >> BangPypers mailing list > >> BangPypers at python.org > >> http://mail.python.org/mailman/listinfo/bangpypers > >> > > > > > > > > -- > > ~l0nwlf > > _______________________________________________ > > BangPypers mailing list > > BangPypers at python.org > > http://mail.python.org/mailman/listinfo/bangpypers > > > > -- > Sent from my mobile device > > Elegbede Muhammed Oladipupo > OCA > +2348077682428 > +2347042171716 > www.dudupay.com > Mobile Banking Solutions | Transaction Processing | Enterprise > Application Development > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From jeffjosejeff at gmail.com Thu Aug 19 21:10:37 2010 From: jeffjosejeff at gmail.com (Jeffrey Jose) Date: Fri, 20 Aug 2010 00:40:37 +0530 Subject: [BangPypers] Dictionary : An elementary question In-Reply-To: References: <143420.40770.qm@web110507.mail.gq1.yahoo.com> Message-ID: On Thu, Aug 19, 2010 at 10:26 AM, Dipo Elegbede wrote: > Hi All, > There really shouldn't be so much debate on the question asked. > Someone actually gave a direct and clear answer. I'm new at python and > his explanations were quite understandable. > I'm sorry that you sensed a debate in what happened to the question. Personally I find it very refreshing when people contribute with different ideas. In this particular case, Shaswat Anand's reply of what OrdererdDicts are (BSTs) was actually a new information to me. Had we closed the question the moment we sense a right answer, I wouldnt have known that. > If you call the d.keys() consecutively, you might get two different orders. > I dont think it works the way you say it. d.keys() *should* return the same way no matter how many times you call it. If the dictionary (d) changes in between - because of the way HashTables/HashMaps are implemented - you are bound to get in a different order. *Long story short. *d.keys() will return the same thing if d doesnt change. /jeff From dhananjay.nene at gmail.com Thu Aug 19 22:04:54 2010 From: dhananjay.nene at gmail.com (Dhananjay Nene) Date: Fri, 20 Aug 2010 01:34:54 +0530 Subject: [BangPypers] Dictionary : An elementary question In-Reply-To: <143420.40770.qm@web110507.mail.gq1.yahoo.com> References: <143420.40770.qm@web110507.mail.gq1.yahoo.com> Message-ID: Lots of good answers. Warning: *this answer is ultra simplistic one to explain the implementation succinctly*. A little more from an implementation perspective dict operations usually involve converting a dict into a hash. This hash is then converted into a bucket. And sometimes when one gets into a collision, an alternative bucket may need to get selected. In a simplistic example lets say we have 100 buckets, the hash is computed by adding the ascii values of the bytes comprising the key. Now lets assume the the key is the character 'AB' Since the ascii code of 'A' is 65, and 'B' is 66 and there are no other characters, then given our hash algorithm the hash will work out to 65 + 66 = 131 A simple hash to bucket mapping model is to use mod / modulo. Since 131 mod 100 which leads us to 31. Assuming there are no key collisions and the buckets are stored as an array, the key will now be stored in bucket no. 31 (zero based index). If there is a collision - the key will be stored in some other bucket based on the resolution provided by the collision management algorithm Usually when one invokes a ".keys()" method, the most efficient way is to run through the buckets array and spit out the keys stored in each non empty bucket. That should hopefully clarify why ".keys()" generally does not return keys ordered by the keys themselves, it often will return keys ordered by the buckets they are stored into. Also since changing the internal logic of the hash table with regards to key -> hash -> bucket mapping and collision management, will change the internal order for the same set of keys. Similarly even if the same keys are inserted into the hash table in different orders, the resultant order of keys can change if some of the keys collide. As a result hash tables will generally not issue any guarantee any ordering on the keys since that would require additional efforts and the implied performance loss - something thats often unnecessary for most typical dict operations. Dhananjay On Wed, Aug 18, 2010 at 10:58 PM, Anand Shankar wrote: > During a tutorial python session with my colleagues I was presented with a > basic > question > > >>> d = {'apple':2,'banana':5, 'coke': 6} > >>> print d.keys() > ['coke', 'apple', 'banana'] > > > Question is why does it not return > > ['apple','banana','coke'] > > Similarly: > > >>> d = {'a':2,'b':4,'c':5,'d':4,'e':3} > >>> print d.keys() > ['a', 'c', 'b', 'e', 'd'] > > why not > > ['a', 'b', 'c', 'd', 'e'] > > I have no clues. Any inputs?? > > anand > > > > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- -------------------------------------------------------- blog: http://blog.dhananjaynene.com twitter: http://twitter.com/dnene From vinayakh at gmail.com Sat Aug 21 13:50:18 2010 From: vinayakh at gmail.com (Vinayak Hegde) Date: Sat, 21 Aug 2010 17:20:18 +0530 Subject: [BangPypers] [OT] Offline Payments for Pycon India Message-ID: Hi, I just registered for Pycon India and it says that payments can be made at Local user groups meetings in the offline mode. I have opted for offline as Do attend's online system is honestly confusing. Is there any easier way to make payments such as EFT to an holding account for Pycon India ? That would really help. Apologies for spamming the group but I thought that other people on the list (who want to attend Pycon India) might have similar questions. -- Vinayak From kunalkantsen at gmail.com Sat Aug 21 17:18:02 2010 From: kunalkantsen at gmail.com (kunalkant sen) Date: Sat, 21 Aug 2010 20:48:02 +0530 Subject: [BangPypers] [OT] Offline Payments for Pycon India In-Reply-To: References: Message-ID: Kunal Kant Sen 09241009423 On Sat, Aug 21, 2010 at 5:20 PM, Vinayak Hegde wrote: > Hi, > > I just registered for Pycon India and it says that payments can be > made at Local user groups meetings in the offline mode. I have opted > for offline as Do attend's online system is honestly confusing. > > Is there any easier way to make payments such as EFT to an holding > account for Pycon India ? That would really help. > > Apologies for spamming the group but I thought that other people on > the list (who want to attend Pycon India) might have similar > questions. > > -- Vinayak > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From kunalkantsen at gmail.com Sat Aug 21 17:23:40 2010 From: kunalkantsen at gmail.com (kunalkant sen) Date: Sat, 21 Aug 2010 20:53:40 +0530 Subject: [BangPypers] [OT] Offline Payments for Pycon India In-Reply-To: References: Message-ID: Vinayak, Go to the nearest axis bank deposit the money or use net Banking in favor of the Indian Python Software Society (IPSS) account, Details at http://ipss.org.in. Send details to me or Noufal. If you have problem, ping me. ~ Kunal On Sat, Aug 21, 2010 at 8:48 PM, kunalkant sen wrote: > > Kunal Kant Sen > 09241009423 > > > > On Sat, Aug 21, 2010 at 5:20 PM, Vinayak Hegde wrote: > >> Hi, >> >> I just registered for Pycon India and it says that payments can be >> made at Local user groups meetings in the offline mode. I have opted >> for offline as Do attend's online system is honestly confusing. >> >> Is there any easier way to make payments such as EFT to an holding >> account for Pycon India ? That would really help. >> >> Apologies for spamming the group but I thought that other people on >> the list (who want to attend Pycon India) might have similar >> questions. >> >> -- Vinayak >> _______________________________________________ >> BangPypers mailing list >> BangPypers at python.org >> http://mail.python.org/mailman/listinfo/bangpypers >> > > From ideamonk at gmail.com Sat Aug 21 17:37:37 2010 From: ideamonk at gmail.com (Abhishek Mishra) Date: Sat, 21 Aug 2010 21:07:37 +0530 Subject: [BangPypers] [CROSSPOST] Fwd: [SahanaEden] Helping Pakistan with Sahana In-Reply-To: <008301cb4132$cccc6a70$66653f50$@sahanafoundation.org> References: <008301cb4132$cccc6a70$66653f50$@sahanafoundation.org> Message-ID: OT / FWD ---------- Forwarded message ---------- From: Michael Howden Date: Sat, Aug 21, 2010 at 6:44 PM Subject: [SahanaEden] Helping Pakistan with Sahana To: sahana-eden at googlegroups.com, discuss at lists.sahanafoundation.org, sahana-pakistan-2010 at googlegroups.com FYI ? please feel free to distribute to your networks: ---- The Sahana Software Foundation have a site up to support the Floods Response in Pakistan: http://pakistan.sahanafoundation.org Although there are a number of information management tools providing resources on the Pakistan Flood Response, Sahana specialises in providing open data which means that instead of just providing narrative documents which need to be manually searched for the required data, it can provide the raw data, in various formats, including on maps, to help the relief efforts and longer term recovery. Sahana is built on an open source Rapid Application Development framework and supported by a global community of volunteers, which means that new features can quickly developed in response to changing requirements on-the-ground. For more information on how you can either user Sahana or help contribute to the effort, please visit: http://eden.sahanafoundation.org/wiki/Pakistan Or join: sahana-pakistan-2010 at googlegroups.com Michael Howden Sahana Software Foundation *Sahana Software Foundation mission is to help alleviate human suffering by giving emergency managers, disaster response professionals and communities access to the information that they need to better prepare for and respond to disasters through the development and promotion of free and open source software and open standards.* * * -- You received this message because you are subscribed to the Google Groups "Sahana-Eden" group. To post to this group, send email to sahana-eden at googlegroups.com. To unsubscribe from this group, send email to sahana-eden+unsubscribe at googlegroups.com . For more options, visit this group at http://groups.google.com/group/sahana-eden?hl=en. From lawgon at au-kbc.org Sun Aug 22 03:05:23 2010 From: lawgon at au-kbc.org (Kenneth Gonsalves) Date: Sun, 22 Aug 2010 06:35:23 +0530 Subject: [BangPypers] [OT] Offline Payments for Pycon India In-Reply-To: References: Message-ID: <1282439123.2150.65.camel@localhost> On Sat, 2010-08-21 at 17:20 +0530, Vinayak Hegde wrote: > Is there any easier way to make payments such as EFT to an holding > account for Pycon India ? That would really help. go to any branch of axis bank and pay there by cash or cheque or by netbanking. Account details are here: http://ipss.org.in (on the right hand side) then mail the payment details, ticket number etc to me *offlist* -- regards Kenneth Gonsalves From lawgon at au-kbc.org Sun Aug 22 03:08:05 2010 From: lawgon at au-kbc.org (Kenneth Gonsalves) Date: Sun, 22 Aug 2010 06:38:05 +0530 Subject: [BangPypers] [OT] Offline Payments for Pycon India In-Reply-To: References: Message-ID: <1282439285.2150.67.camel@localhost> On Sat, 2010-08-21 at 20:53 +0530, kunalkant sen wrote: > Go to the nearest axis bank deposit the money or use net Banking in > favor > of the Indian Python Software Society (IPSS) account, Details at > http://ipss.org.in. > Send details to me or Noufal. If you have problem, ping me. @person_in_charge_of_website - this link should be somewhere prominent -- regards Kenneth Gonsalves From mails at anirudh.ind.in Sun Aug 22 06:26:24 2010 From: mails at anirudh.ind.in (Anirudh Asokan) Date: Sun, 22 Aug 2010 09:56:24 +0530 Subject: [BangPypers] Problem with urlretrieve Message-ID: Howdy mates, Im running Python 2.6.4 in Ubuntu 9.10 with mod_python. When I run the following code in python IDLE - urlretrieve(' http://www.pics4news.com/Eveant_Gallery/2008-09-06/Onam_Festival/Medium_Images/Onam_Festival_9834_medium.jpg ','/home/anirudh/onam.jpg') its works and give me the following output - ('/home/anirudh/onam.jpg', ) Now when the same code is put in a file, say "leech.py" and is called from a html page called html1.py, I get the following error report - File "/home/anirudh/server/mod/tb/leech.py", line 51, in index urlretrieve(' http://www.pics4news.com/Eveant_Gallery/2008-09-06/Onam_Festival/Medium_Images/Onam_Festival_9834_medium.jpg ','/home/anirudh/onam2.jpg') File "/usr/lib/python2.6/urllib.py", line 94, in urlretrieve return _urlopener.retrieve(url, filename, reporthook, data) File "/usr/lib/python2.6/urllib.py", line 242, in retrieve tfp = open(filename, 'wb') IOError: [Errno 13] Permission denied: '/home/anirudh/onam2.jpg' I tried with different name for the target file so that there will be no problen of replaceing the file. Got any idea whats going on guys? -- Cheers, Anirudh Asokan www.anirudh.ind.in From orsenthil at gmail.com Sun Aug 22 07:02:20 2010 From: orsenthil at gmail.com (Senthil Kumaran) Date: Sun, 22 Aug 2010 10:32:20 +0530 Subject: [BangPypers] Problem with urlretrieve In-Reply-To: References: Message-ID: <20100822050220.GA5765@remy> On Sun, Aug 22, 2010 at 09:56:24AM +0530, Anirudh Asokan wrote: > I tried with different name for the target file so that there will be no > problen of replaceing the file. > > Got any idea whats going on guys? Your webserver's user (www-data perhaps) does not have write permission to the directory you are trying to write. Write it under /tmp or somewhere your webserver has +w permissions, it should work. -- Senthil Don't be overly suspicious where it's not warranted. From aditya.sahay at gmail.com Sun Aug 22 08:26:47 2010 From: aditya.sahay at gmail.com (Aditya Sahay) Date: Sun, 22 Aug 2010 11:56:47 +0530 Subject: [BangPypers] Problem with urlretrieve (Anirudh Asokan) In-Reply-To: References: Message-ID: Does your code have write permissions to the folder where you're trying to write the image file? From noufal at gmail.com Sun Aug 22 09:47:04 2010 From: noufal at gmail.com (Noufal Ibrahim) Date: Sun, 22 Aug 2010 13:17:04 +0530 Subject: [BangPypers] [OT] Offline Payments for Pycon India In-Reply-To: (Vinayak Hegde's message of "Sat, 21 Aug 2010 17:20:18 +0530") References: Message-ID: <874oenay2v.fsf@gmail.com> Vinayak Hegde writes: > Hi, > > I just registered for Pycon India and it says that payments can be > made at Local user groups meetings in the offline mode. I have opted > for offline as Do attend's online system is honestly confusing. > > Is there any easier way to make payments such as EFT to an holding > account for Pycon India ? That would really help. > > Apologies for spamming the group but I thought that other people on > the list (who want to attend Pycon India) might have similar > questions. [...] If you can transfer the amount to our account directly (the bank details are here - http://ipss.org.in/) and then let us know your ticket and order numbers, we can do what's necessary. -- From noufal at gmail.com Sun Aug 22 10:01:02 2010 From: noufal at gmail.com (Noufal Ibrahim) Date: Sun, 22 Aug 2010 13:31:02 +0530 Subject: [BangPypers] Problem with urlretrieve In-Reply-To: (Anirudh Asokan's message of "Sun, 22 Aug 2010 09:56:24 +0530") References: Message-ID: <87r5hr9iv5.fsf@gmail.com> Anirudh Asokan writes: [...] > tfp = open(filename, 'wb') > > IOError: [Errno 13] Permission denied: '/home/anirudh/onam2.jpg' [...] > Got any idea whats going on guys? I'd say it's pretty obvious from the above lines what the problem is. -- From mails at anirudh.ind.in Sun Aug 22 14:22:31 2010 From: mails at anirudh.ind.in (Anirudh Asokan) Date: Sun, 22 Aug 2010 17:52:31 +0530 Subject: [BangPypers] Problem with urlretrieve Message-ID: Yes the problem is pretty obvious :D . Can anyone help me overcome this? I want to give my python script write permission to the directories I wish. Should I configure Apache or can anything be done using python? -- Cheers, Anirudh Asokan www.anirudh.ind.in From lawgon at au-kbc.org Sun Aug 22 15:25:45 2010 From: lawgon at au-kbc.org (Kenneth Gonsalves) Date: Sun, 22 Aug 2010 18:55:45 +0530 Subject: [BangPypers] Problem with urlretrieve In-Reply-To: References: Message-ID: <1282483545.2150.622.camel@localhost> On Sun, 2010-08-22 at 17:52 +0530, Anirudh Asokan wrote: > Yes the problem is pretty obvious :D . Can anyone help me overcome > this? I > want to give my python script write permission to the directories I > wish. > Should I configure Apache or can anything be done using python? chown -R www-data:www-data '/yourdirectory/' -- regards Kenneth Gonsalves From mails at anirudh.ind.in Sun Aug 22 17:22:54 2010 From: mails at anirudh.ind.in (Anirudh Asokan) Date: Sun, 22 Aug 2010 20:52:54 +0530 Subject: [BangPypers] Problem with urlretrieve Message-ID: Ok, Got it working. Thanks guys. Another example of fine team work. ;) -- Cheers, Anirudh Asokan www.anirudh.ind.in From orsenthil at gmail.com Mon Aug 23 04:30:55 2010 From: orsenthil at gmail.com (Senthil Kumaran) Date: Mon, 23 Aug 2010 08:00:55 +0530 Subject: [BangPypers] Problem with urlretrieve In-Reply-To: References: Message-ID: <20100823023055.GA29817@remy> On Sun, Aug 22, 2010 at 08:52:54PM +0530, Anirudh Asokan wrote: > Ok, Got it working. Thanks guys. Another example of fine team work. ;) Thanks for the compliment, but there was no team work here. I guess, you misunderstood what everyone was trying to point out to you, that it is a simple task, you should dig a bit yourself and sometimes someone giving you extra hints. :) -- Senthil He knew the tavernes well in every toun. -- Geoffrey Chaucer From dhananjay.nene at gmail.com Mon Aug 23 12:41:50 2010 From: dhananjay.nene at gmail.com (Dhananjay Nene) Date: Mon, 23 Aug 2010 16:11:50 +0530 Subject: [BangPypers] Clojure style multimethod functions in python Message-ID: While python's multimethod module allows function overloading based on types, here's another approach to do the same based on a switching function (clojure style) or on a set of conditions. Clojure style multimethod functions in python . Comments if any welcome on the blog post / here. -- -------------------------------------------------------- blog: http://blog.dhananjaynene.com twitter: http://twitter.com/dnene From rajeev.sebastian at gmail.com Mon Aug 23 12:56:16 2010 From: rajeev.sebastian at gmail.com (Rajeev J Sebastian) Date: Mon, 23 Aug 2010 16:26:16 +0530 Subject: [BangPypers] Clojure style multimethod functions in python In-Reply-To: References: Message-ID: Probably better to use PEAK Rules.... Regards Rajeev J Sebastian On Mon, Aug 23, 2010 at 4:11 PM, Dhananjay Nene wrote: > While python's multimethod module allows function overloading based on > types, here's another approach to do the same based on a switching function > (clojure style) or on a set of conditions. > > Clojure style multimethod functions in > python > . > > Comments if any welcome on the blog post / here. > -- > -------------------------------------------------------- > blog: http://blog.dhananjaynene.com > twitter: http://twitter.com/dnene > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From dhananjay.nene at gmail.com Mon Aug 23 15:05:00 2010 From: dhananjay.nene at gmail.com (Dhananjay Nene) Date: Mon, 23 Aug 2010 18:35:00 +0530 Subject: [BangPypers] Clojure style multimethod functions in python In-Reply-To: References: Message-ID: On Mon, Aug 23, 2010 at 4:26 PM, Rajeev J Sebastian < rajeev.sebastian at gmail.com> wrote: > Probably better to use PEAK Rules.... > > Regards > Rajeev J Sebastian > That looks much more fully featured indeed. But I couldn't understand why features such as the one I "copy-pasted" below are relevant when a simple lambda is all that is required : - The Basic AST Builderand advanced Code Generation - Criteria , Indexing , and Predicates - Syntax pattern matching Dhananjay > > On Mon, Aug 23, 2010 at 4:11 PM, Dhananjay Nene > wrote: > > While python's multimethod module allows function overloading based on > > types, here's another approach to do the same based on a switching > function > > (clojure style) or on a set of conditions. > > > > Clojure style multimethod functions in > > python< > http://codeblog.dhananjaynene.com/2010/08/clojure-style-multi-methods-in-python/ > > > > . > > > > Comments if any welcome on the blog post / here. > > -- > > -------------------------------------------------------- > > blog: http://blog.dhananjaynene.com > > twitter: http://twitter.com/dnene > > _______________________________________________ > > BangPypers mailing list > > BangPypers at python.org > > http://mail.python.org/mailman/listinfo/bangpypers > > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- -------------------------------------------------------- blog: http://blog.dhananjaynene.com twitter: http://twitter.com/dnene From dhananjay.nene at gmail.com Mon Aug 23 15:04:39 2010 From: dhananjay.nene at gmail.com (Dhananjay Nene) Date: Mon, 23 Aug 2010 18:34:39 +0530 Subject: [BangPypers] Clojure style multimethod functions in python In-Reply-To: References: Message-ID: On Mon, Aug 23, 2010 at 4:26 PM, Rajeev J Sebastian < rajeev.sebastian at gmail.com> wrote: > Probably better to use PEAK Rules.... > > Regards > Rajeev J Sebastian > That looks much more fully featured indeed. But I couldn't understand why features such as the one I "copy-pasted" below are relevant when a simple lambda is all that is required : - The Basic AST Builderand advanced Code Generation - Criteria , Indexing , and Predicates - Syntax pattern matching Dhananjay > > On Mon, Aug 23, 2010 at 4:11 PM, Dhananjay Nene > wrote: > > While python's multimethod module allows function overloading based on > > types, here's another approach to do the same based on a switching > function > > (clojure style) or on a set of conditions. > > > > Clojure style multimethod functions in > > python< > http://codeblog.dhananjaynene.com/2010/08/clojure-style-multi-methods-in-python/ > > > > . > > > > Comments if any welcome on the blog post / here. > > -- > > -------------------------------------------------------- > > blog: http://blog.dhananjaynene.com > > twitter: http://twitter.com/dnene > > _______________________________________________ > > BangPypers mailing list > > BangPypers at python.org > > http://mail.python.org/mailman/listinfo/bangpypers > > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- -------------------------------------------------------- blog: http://blog.dhananjaynene.com twitter: http://twitter.com/dnene From rajeev.sebastian at gmail.com Mon Aug 23 16:09:32 2010 From: rajeev.sebastian at gmail.com (Rajeev J Sebastian) Date: Mon, 23 Aug 2010 19:39:32 +0530 Subject: [BangPypers] Clojure style multimethod functions in python In-Reply-To: References: Message-ID: On Mon, Aug 23, 2010 at 6:35 PM, Dhananjay Nene wrote: > On Mon, Aug 23, 2010 at 4:26 PM, Rajeev J Sebastian < > rajeev.sebastian at gmail.com> wrote: > >> Probably better to use PEAK Rules.... >> >> Regards >> Rajeev J Sebastian >> > > That looks much more fully featured indeed. But I couldn't understand why > features such as the one I "copy-pasted" below are relevant when a simple > lambda is all that is required : > > > ? - The Basic AST > Builderand > advanced Code > ? Generation > ? - Criteria , > ? Indexing , > ? and Predicates > ? - Syntax pattern > matching When you have a large number of rules, you want to optimize the dispatcher to select the most appropriate rule in the fastest possible way. In your case, only the result of the 'ticket' method is ever used for the dispatch; imagine if different methods had different conditions altogether. For e.g.: @when("product.days_since_last_sale > days(365)") def discount(product, user): return "10%" @when("product.category == 'football' and user.is_football_lover") def discount(product, user): return "50%" @when("product.category == 'cricket'") def discount(product, user): return "0%" etc. Regards Rajeev J Sebastian From b.ghose at gmail.com Mon Aug 23 16:43:30 2010 From: b.ghose at gmail.com (Baishampayan Ghose) Date: Mon, 23 Aug 2010 20:13:30 +0530 Subject: [BangPypers] Clojure style multimethod functions in python In-Reply-To: References: Message-ID: > While python's multimethod module allows function overloading based on > types, here's another approach to do the same based on a switching function > (clojure style) or on a set of conditions. > > Clojure style multimethod functions in > python Please don't claim that the above is `Clojure style multimethods'. Clojure multimethods can dispatch on an arbitrary function of `the arguments' given to the multimethod and not just on any arbitrary function of `the properties of the object'. Regards, BG -- Baishampayan Ghose b.ghose at gmail.com From dhananjay.nene at gmail.com Mon Aug 23 16:50:42 2010 From: dhananjay.nene at gmail.com (Dhananjay Nene) Date: Mon, 23 Aug 2010 20:20:42 +0530 Subject: [BangPypers] Clojure style multimethod functions in python In-Reply-To: References: Message-ID: On Mon, Aug 23, 2010 at 8:13 PM, Baishampayan Ghose wrote: > > While python's multimethod module allows function overloading based on > > types, here's another approach to do the same based on a switching > function > > (clojure style) or on a set of conditions. > > > > Clojure style multimethod functions in > > python< > http://codeblog.dhananjaynene.com/2010/08/clojure-style-multi-methods-in-python/ > > > > Please don't claim that the above is `Clojure style multimethods'. > Clojure multimethods can dispatch on an arbitrary function of `the > arguments' given to the multimethod and not just on any arbitrary > function of `the properties of the object'. > BG, Could you help explain in light of the following (the argument lists are in bold). The switcher function is provided exactly the same arguments as the various multimethods. Probably something about clojure I am not aware of ? Dhananjay def multi(switcher_func): """ Declares a multi map based method which will switch to the appropriate function based on the results of the switcher func""" def dispatcher(*args, **kwargs): key = *switcher_func(*args, **kwargs)* func = dispatcher.dispatch_map[key] if func : return *func(*args,**kwargs)* else : raise Exception("No function defined for dispatch key: %s" % key ) dispatcher.dispatch_map = {} return dispatcher > > Regards, > BG > > -- > Baishampayan Ghose > b.ghose at gmail.com > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- -------------------------------------------------------- blog: http://blog.dhananjaynene.com twitter: http://twitter.com/dnene From b.ghose at gmail.com Mon Aug 23 17:06:54 2010 From: b.ghose at gmail.com (Baishampayan Ghose) Date: Mon, 23 Aug 2010 20:36:54 +0530 Subject: [BangPypers] Clojure style multimethod functions in python In-Reply-To: References: Message-ID: Dhananjay, > Could you help explain in light of the following (the argument lists are in > bold). The switcher function is provided exactly the same arguments as the > various multimethods. Probably something about clojure I am not aware of ? > > Dhananjay > > def multi(switcher_func): > ? ?""" Declares a multi map based method which will switch to the > ? ?appropriate function based on the results of the switcher func""" > > ? ?def dispatcher(*args, **kwargs): > ? ? ? ?key = *switcher_func(*args, **kwargs)* > ? ? ? ?func = dispatcher.dispatch_map[key] > ? ? ? ?if func : > ? ? ? ? ? ?return *func(*args,**kwargs)* > ? ? ? ?else : > ? ? ? ? ? ?raise Exception("No function defined for dispatch key: %s" % key > ) > ? ?dispatcher.dispatch_map = {} > ? ?return dispatcher Multimethods are supposed to dispatch on the ``value'' returned by the dispatch function and not just when a specific condition is satisfied. What will you do when there are multiple possibilities? Ideally, I should be able to prefer a specific method to another one in case there is some ambiguity. Yours will always pick the first one that satisfies the condition, which is again dependent on the order in which the code is evaluated. For example, try implementing the following using your code - http://clojure.org/runtime_polymorphism Regards, BG -- Baishampayan Ghose b.ghose at gmail.com From dhananjay.nene at gmail.com Mon Aug 23 17:51:37 2010 From: dhananjay.nene at gmail.com (Dhananjay Nene) Date: Mon, 23 Aug 2010 21:21:37 +0530 Subject: [BangPypers] Clojure style multimethod functions in python In-Reply-To: References: Message-ID: On Mon, Aug 23, 2010 at 8:36 PM, Baishampayan Ghose wrote: > Dhananjay, > > > Could you help explain in light of the following (the argument lists are > in > > bold). The switcher function is provided exactly the same arguments as > the > > various multimethods. Probably something about clojure I am not aware of > ? > > > > Dhananjay > > > > def multi(switcher_func): > > """ Declares a multi map based method which will switch to the > > appropriate function based on the results of the switcher func""" > > > > def dispatcher(*args, **kwargs): > > key = *switcher_func(*args, **kwargs)* > > func = dispatcher.dispatch_map[key] > > if func : > > return *func(*args,**kwargs)* > > else : > > raise Exception("No function defined for dispatch key: %s" % > key > > ) > > dispatcher.dispatch_map = {} > > return dispatcher > > Multimethods are supposed to dispatch on the ``value'' returned by the > dispatch function and not just when a specific condition is satisfied. > What will you do when there are multiple possibilities? Ideally, I > should be able to prefer a specific method to another one in case > there is some ambiguity. Yours will always pick the first one that > satisfies the condition, which is again dependent on the order in > which the code is evaluated. > > For example, try implementing the following using your code - > http://clojure.org/runtime_polymorphism > > Without making any change whatsoever to multi() and multi_method(), the result of the following code : # Declare the existence of a multi method switcher encounter = multi(lambda x,y : (x["Species"], y["Species"])) @multi_method(encounter, ("Bunny","Lion")) def encounter(a1, a2): return "run-away" @multi_method(encounter, ("Lion","Bunny")) def encounter(a1, a2): return "eat" @multi_method(encounter, ("Bunny","Bunny")) def encounter(a1, a2): return "mate" @multi_method(encounter, ("Lion","Lion")) def encounter(a1, a2): return "fight" b1 = {"Species" : "Bunny", "Other" : "Stuff"} b2 = {"Species" : "Bunny", "Other" : "Stuff"} l1 = {"Species" : "Lion", "Other" : "Stuff"} l2 = {"Species" : "Lion", "Other" : "Stuff"} print encounter(b1, b2) print encounter(b1, l1) print encounter(l1, b1) print encounter(l1, l2) *is * mate run-away eat fight Is that consistent with the expectations ? Dhananjay > Regards, > BG > > -- > Baishampayan Ghose > b.ghose at gmail.com > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- -------------------------------------------------------- blog: http://blog.dhananjaynene.com twitter: http://twitter.com/dnene From arulalant at gmail.com Tue Aug 24 12:35:23 2010 From: arulalant at gmail.com (Arulalan T) Date: Tue, 24 Aug 2010 16:05:23 +0530 Subject: [BangPypers] Need Help : Setting Floating Precision Point as 2 in Python In-Reply-To: References: Message-ID: Dear All, I need one help. In python, I need to set the floating point precision as 2. I am getting the following output in python while adding two float nos. >>>a=79.73 >>>b=0.5 >>> a+b 80.230000000000004 I need exactly 2 precision point in this float value. i.e. 80.23 Even though I tried in round method, its not satisfied me. Because >>> a = round(3.7138464897123424324355124355,2) >>> a 3.71 >>> a = round(3.7238464897123424324355124355,2) >>> a 3.7200000000000002 Can you understand the difference. Depends upon the value, it will round. I no need ceil and floor options. Because it may change the original values. I need just 2 precision point in the float value. I am getting two numbers dynamically. So I can not say exactly, what kind of floating numbers I am going to use. What I have to do ? Any suggestions ? Thanks in advance. -- Regards, Arulalan.T Kanchi Linux User Group Rocks ! http://kanchilug.wordpress.com My Experiments In Linux are here http://tuxcoder.wordpress.com From caulagi at gmail.com Tue Aug 24 12:49:18 2010 From: caulagi at gmail.com (Pradip Caulagi) Date: Tue, 24 Aug 2010 16:19:18 +0530 Subject: [BangPypers] Need Help : Setting Floating Precision Point as 2 in Python In-Reply-To: References: Message-ID: On Tue, Aug 24, 2010 at 4:05 PM, Arulalan T wrote: > > In python, I need to set the floating point precision as 2. > > I am getting the following output in python while adding two float nos. > >>>>a=79.73 >>>>b=0.5 Multiply by 100. Add as integers. Divide by 100. From kausikram at gmail.com Tue Aug 24 12:51:30 2010 From: kausikram at gmail.com (kausikram krishnasayee) Date: Tue, 24 Aug 2010 16:21:30 +0530 Subject: [BangPypers] Need Help : Setting Floating Precision Point as 2 in Python In-Reply-To: References: Message-ID: > I am getting the following output in python while adding two float nos. > a=79.73 > b=0.5 the reason for which is: http://docs.python.org/tutorial/floatingpoint.html -- Kausikram Krishnasayee Company: http://silverstripesoftware.com | Webpage: kausikram.in | Blog: blog.kausikram.in | Twitter: http://twitter.com/kausikram | Email: kausikram at gmail.com | Mobile: +91 9884246490 From vnbang2003 at yahoo.com Tue Aug 24 12:44:32 2010 From: vnbang2003 at yahoo.com (vijay) Date: Tue, 24 Aug 2010 16:14:32 +0530 (IST) Subject: [BangPypers] Need Help : Setting Floating Precision Point as 2 in Python In-Reply-To: Message-ID: <303386.10436.qm@web95310.mail.in2.yahoo.com> Hi Arun, ?? Check out this >>> a=79.73 >>> b=0.5 >>> c = '%.2f' %(a+b) >>> c '80.23' Hope this help. With Regards Vijay --- On Tue, 24/8/10, Arulalan T wrote: From: Arulalan T Subject: [BangPypers] Need Help : Setting Floating Precision Point as 2 in Python To: "Bangalore Python Users Group - India" Date: Tuesday, 24 August, 2010, 4:05 PM Dear All, I need one help. In python, I need to set the floating point precision as 2. I am getting the following output in python while adding two float nos. >>>a=79.73 >>>b=0.5 >>> a+b 80.230000000000004 I need exactly 2 precision point in this float value. i.e. 80.23 Even though I tried in round method, its not satisfied me. Because >>> a = round(3.7138464897123424324355124355,2) >>> a 3.71 >>> a = round(3.7238464897123424324355124355,2) >>> a 3.7200000000000002 Can you understand the difference. Depends upon the value, it will round. I no need ceil and floor options. Because it may change the original values. I need just 2 precision point in the float value. I am getting two numbers dynamically. So I can not say exactly, what kind of floating numbers I am going to use. What I have to do ? Any suggestions ? Thanks in advance. -- Regards, Arulalan.T Kanchi Linux User Group Rocks ! http://kanchilug.wordpress.com My Experiments In Linux are here http://tuxcoder.wordpress.com _______________________________________________ BangPypers mailing list BangPypers at python.org http://mail.python.org/mailman/listinfo/bangpypers From arulalant at gmail.com Tue Aug 24 13:17:08 2010 From: arulalant at gmail.com (Arulalan T) Date: Tue, 24 Aug 2010 16:47:08 +0530 Subject: [BangPypers] Need Help : Setting Floating Precision Point as 2 in Python In-Reply-To: <303386.10436.qm@web95310.mail.in2.yahoo.com> References: <303386.10436.qm@web95310.mail.in2.yahoo.com> Message-ID: Hi, 2010/8/24 vijay > Hi Arun, > Check out this > >>> a=79.73 > >>> b=0.5 > >>> c = '%.2f' %(a+b) > >>> c > '80.23' > It is string. >>> float(c) 80.230000000000004 Again same problem getting . :( I need it as float only. > > Hope this help. > > With Regards > Vijay > > > --- On Tue, 24/8/10, Arulalan T wrote: > > From: Arulalan T > Subject: [BangPypers] Need Help : Setting Floating Precision Point as 2 in > Python > To: "Bangalore Python Users Group - India" > Date: Tuesday, 24 August, 2010, 4:05 PM > > Dear All, > > I need one help. > > In python, I need to set the floating point precision as 2. > > I am getting the following output in python while adding two float nos. > > >>>a=79.73 > >>>b=0.5 > >>> a+b > 80.230000000000004 > > I need exactly 2 precision point in this float value. i.e. 80.23 > > Even though I tried in round method, its not satisfied me. Because > > >>> a = round(3.7138464897123424324355124355,2) > >>> a > 3.71 > >>> a = round(3.7238464897123424324355124355,2) > >>> a > 3.7200000000000002 > > Can you understand the difference. Depends upon the value, it will round. > > I no need ceil and floor options. Because it may change the original > values. > > I need just 2 precision point in the float value. > > I am getting two numbers dynamically. So I can not say exactly, what kind > of > floating numbers I am going to use. > > What I have to do ? > > Any suggestions ? > > Thanks in advance. > > > > > -- > Regards, > Arulalan.T > > Kanchi Linux User Group Rocks ! > http://kanchilug.wordpress.com > > My Experiments In Linux are here > http://tuxcoder.wordpress.com > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- Regards, Arulalan.T Kanchi Linux User Group Rocks ! http://kanchilug.wordpress.com My Experiments In Linux are here http://tuxcoder.wordpress.com From arulalant at gmail.com Tue Aug 24 13:20:47 2010 From: arulalant at gmail.com (Arulalan T) Date: Tue, 24 Aug 2010 16:50:47 +0530 Subject: [BangPypers] Need Help : Setting Floating Precision Point as 2 in Python In-Reply-To: References: Message-ID: 2010/8/24 Pradip Caulagi > On Tue, Aug 24, 2010 at 4:05 PM, Arulalan T wrote: > > > > In python, I need to set the floating point precision as 2. > > > > I am getting the following output in python while adding two float nos. > > > >>>>a=79.73 > >>>>b=0.5 > > Multiply by 100. > Add as integers. > Divide by 100. > Yes, we can do this way. By this way I can handle 80 and 23 as two separate integers. But when I want make it as float >>>80+0.23 80.230000000000004 again it will be come same floating value. so I cant use this way. -- Regards, Arulalan.T Kanchi Linux User Group Rocks ! http://kanchilug.wordpress.com My Experiments In Linux are here http://tuxcoder.wordpress.com From noufal at gmail.com Tue Aug 24 13:31:59 2010 From: noufal at gmail.com (Noufal Ibrahim) Date: Tue, 24 Aug 2010 17:01:59 +0530 Subject: [BangPypers] Need Help : Setting Floating Precision Point as 2 in Python In-Reply-To: (Arulalan T.'s message of "Tue, 24 Aug 2010 16:05:23 +0530") References: Message-ID: <87lj7w2qmo.fsf@gmail.com> (I posted this to ChennaiPy but this list is wider so I'm reposting it). Arulalan T writes: > Dear All, > > I need one help. > > In python, I need to set the floating point precision as 2. > > I am getting the following output in python while adding two float nos. Often, you *need* to only display the result of your calculations with n decimal places. Is yours such a situation? If so, forget the number of decimal points during the computation and when printing format it as appropriate ("%.2f"). If you genuinely want to work without the floating point problem that you've indicated in your email, consider using the decimal module >>> import decimal >>> a = decimal.Decimal("79.73") >>> b = decimal.Decimal("0.5") >>> str(a + b) '80.23' [...] Can you tell us *why* this inaccuracy is hurting you? -- From arulalant at gmail.com Tue Aug 24 13:42:05 2010 From: arulalant at gmail.com (Arulalan T) Date: Tue, 24 Aug 2010 17:12:05 +0530 Subject: [BangPypers] Need Help : Setting Floating Precision Point as 2 in Python In-Reply-To: <87lj7w2qmo.fsf@gmail.com> References: <87lj7w2qmo.fsf@gmail.com> Message-ID: 2010/8/24 Noufal Ibrahim > > (I posted this to ChennaiPy but this list is wider so I'm reposting > it). > > Arulalan T writes: > > > Dear All, > > > > I need one help. > > > > In python, I need to set the floating point precision as 2. > > > > I am getting the following output in python while adding two float nos. > > > Often, you *need* to only display the result of your calculations with n > decimal places. Is yours such a situation? If so, forget the number of > decimal points during the computation and when printing format it as > appropriate ("%.2f"). > > I am not just printing the float value. > If you genuinely want to work without the floating point problem that > you've indicated in your email, consider using the decimal module > > >>> import decimal > >>> a = decimal.Decimal("79.73") > >>> b = decimal.Decimal("0.5") > > >>> str(a + b) > > '80.23' > This is wrong ans. >>> str(a+b) '80'. i.e. '80' only, not '80.23'. And I dont want this in string. I need only in float value, that too exactly in precision 2. > > [...] > > Can you tell us *why* this inaccuracy is hurting you? > > I am doing project for Indian Meteorological Department using CDAT python library. Now I am plotting weather symbol markers on India Map at corresponding latitude and longitude (in float) dynamically. Due to inaccuracy floating value of latitude & logitude, the position of markers are moved away from the exact position of the stations on the map. so I need float value in 2 precision without changing the value. Not in string. Any suggestions? Thanks > > -- > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- Regards, Arulalan.T Kanchi Linux User Group Rocks ! http://kanchilug.wordpress.com My Experiments In Linux are here http://tuxcoder.wordpress.com From noufal at gmail.com Tue Aug 24 14:12:33 2010 From: noufal at gmail.com (Noufal Ibrahim) Date: Tue, 24 Aug 2010 17:42:33 +0530 Subject: [BangPypers] Need Help : Setting Floating Precision Point as 2 in Python In-Reply-To: (Arulalan T.'s message of "Tue, 24 Aug 2010 17:12:05 +0530") References: <87lj7w2qmo.fsf@gmail.com> Message-ID: <87fwy42or2.fsf@gmail.com> Arulalan T writes: [...] >> Often, you *need* to only display the result of your calculations with n >> decimal places. Is yours such a situation? If so, forget the number of >> decimal points during the computation and when printing format it as >> appropriate ("%.2f"). >> >> > I am not just printing the float value. I'm quite sure that you're doing more than printing. I'm asking you whether the 2 decimal places business applies at all levels of the program or only at the display level. >> >>> import decimal >> >>> a = decimal.Decimal("79.73") >> >>> b = decimal.Decimal("0.5") >> > > >> >>> str(a + b) >> > > >> '80.23' >> > > This is wrong ans. 79.73 + 0.5 is 80.23. Why is this a wrong answer? >>>> str(a+b) > '80'. > > i.e. '80' only, not '80.23'. > > And I dont want this in string. I need only in float value, that too exactly > in precision 2. That's just the string representation. You got it because you called "str" on the value. >>> import decimal >>> a = decimal.Decimal("79.73") >>> b = decimal.Decimal("0.5") >>> a + b Decimal('80.23') [...] > I am doing project for Indian Meteorological Department using CDAT python > library. > > Now I am plotting weather symbol markers on India Map at corresponding > latitude and longitude (in float) dynamically. > Due to inaccuracy floating value of latitude & logitude, > the position of markers are moved away from the exact position of the > stations on the map. > > so I need float value in 2 precision without changing the value. Not in > string. > > Any suggestions? [...] Well, you shouldn't be using floating point numbers to represent things like currency, longitude/latitute etc. What is the problem with the decimal module? You can fine tune the precision of your current execution thread using the getcontext method >>> import decimal >>> decimal.getcontext().prec = 2 # Two decimal points >>> decimal.Decimal(1) / decimal.Decimal(7) Decimal('0.14') >>> decimal.getcontext().prec = 15 # 15 decimal points >>> decimal.Decimal(1) / decimal.Decimal(7) Decimal('0.142857142857143') >>> -- From arulalant at gmail.com Tue Aug 24 14:22:02 2010 From: arulalant at gmail.com (Arulalan T) Date: Tue, 24 Aug 2010 17:52:02 +0530 Subject: [BangPypers] Need Help : Setting Floating Precision Point as 2 in Python In-Reply-To: <87fwy42or2.fsf@gmail.com> References: <87lj7w2qmo.fsf@gmail.com> <87fwy42or2.fsf@gmail.com> Message-ID: 2010/8/24 Noufal Ibrahim > Arulalan T writes: > > [...] > > >> Often, you *need* to only display the result of your calculations with n > >> decimal places. Is yours such a situation? If so, forget the number of > >> decimal points during the computation and when printing format it as > >> appropriate ("%.2f"). > >> > >> > > I am not just printing the float value. > > I'm quite sure that you're doing more than printing. I'm asking you > whether the 2 decimal places business applies at all levels of the > program or only at the display level. > > >> >>> import decimal > >> >>> a = decimal.Decimal("79.73") > >> >>> b = decimal.Decimal("0.5") > >> > > > > > >> >>> str(a + b) > >> > > > > > >> '80.23' > >> > > > > This is wrong ans. > > > 79.73 + 0.5 is 80.23. > > Why is this a wrong answer? > > > >>>> str(a+b) > > '80'. > > > > i.e. '80' only, not '80.23'. > > > > And I dont want this in string. I need only in float value, that too > exactly > > in precision 2. > > That's just the string representation. You got it because you called > "str" on the value. > > >>> import decimal > >>> a = decimal.Decimal("79.73") > >>> b = decimal.Decimal("0.5") > >>> a + b > Decimal('80.23') > > > [...] > > > I am doing project for Indian Meteorological Department using CDAT python > > library. > > > > Now I am plotting weather symbol markers on India Map at corresponding > > latitude and longitude (in float) dynamically. > > Due to inaccuracy floating value of latitude & logitude, > > the position of markers are moved away from the exact position of the > > stations on the map. > > > > so I need float value in 2 precision without changing the value. Not in > > string. > > > > Any suggestions? > > [...] > > Well, you shouldn't be using floating point numbers to represent things > like currency, longitude/latitute etc. > > What is the problem with the decimal module? > > You can fine tune the precision of your current execution thread using > the getcontext method > > >>> import decimal > >>> decimal.getcontext().prec = 2 # Two decimal points > >>> decimal.Decimal(1) / decimal.Decimal(7) > Decimal('0.14') > >>> decimal.getcontext().prec = 15 # 15 decimal points > >>> decimal.Decimal(1) / decimal.Decimal(7) > Decimal('0.142857142857143') > >>> > > > >>> from decimal import * >>> getcontext().prec = 3 >>> getcontext().rounding = ROUND_UP >>> Decimal('3.1415926535') + Decimal('2.7182818285') Decimal('5.86') or >>> getcontext().prec = 3 >>> getcontext().rounding = ROUND_DOWN >>> Decimal('3.1415926535') + Decimal('2.7182818285') Decimal('5.85') This gives the what I need. But I can not use this Decimal data type. In CDAT vcs module supports only the 'float data' type to represent the latitude & logitude in map. so I need float value in 2 precision without changing the value. Not in string. Not in Decimal. Any suggestions? > > > > > -- > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- Regards, Arulalan.T Kanchi Linux User Group Rocks ! http://kanchilug.wordpress.com My Experiments In Linux are here http://tuxcoder.wordpress.com From rmathews at gmail.com Tue Aug 24 15:17:33 2010 From: rmathews at gmail.com (Roshan Mathews) Date: Tue, 24 Aug 2010 18:47:33 +0530 Subject: [BangPypers] Need Help : Setting Floating Precision Point as 2 in Python In-Reply-To: References: <87lj7w2qmo.fsf@gmail.com> <87fwy42or2.fsf@gmail.com> Message-ID: On Tue, Aug 24, 2010 at 17:52, Arulalan T wrote: > This gives the what I need. > But I can not use this Decimal data type. > > In CDAT vcs module supports only the 'float data' type to represent the > latitude & logitude in map. > > so I need float value in 2 precision without changing the value. Not in > string. Not in Decimal. > Well, if you can't use Decimal, you won't be able to use Python, because a float won't work for you: >>> 80.23 80.230000000000004 Any reason why you can't use Decimal, or a string, or an integer? -- http://roshan.mathews.in/ From arulalant at gmail.com Tue Aug 24 15:24:40 2010 From: arulalant at gmail.com (Arulalan T) Date: Tue, 24 Aug 2010 18:54:40 +0530 Subject: [BangPypers] Need Help : Setting Floating Precision Point as 2 in Python In-Reply-To: References: <87lj7w2qmo.fsf@gmail.com> <87fwy42or2.fsf@gmail.com> Message-ID: 2010/8/24 Roshan Mathews > On Tue, Aug 24, 2010 at 17:52, Arulalan T wrote: > > This gives the what I need. > > But I can not use this Decimal data type. > > > > In CDAT vcs module supports only the 'float data' type to represent the > > latitude & logitude in map. > > > > so I need float value in 2 precision without changing the value. Not in > > string. Not in Decimal. > > > Well, if you can't use Decimal, you won't be able to > use Python, because a float won't work for you: > > >>> 80.23 > 80.230000000000004 > > Any reason why you can't use Decimal, or a string, > or an integer? > > In CDAT[1] vcs module supports only the 'float data' type to represent the latitude & logitude in World map. So I cant use Decimal or a string an integer. Only float. Thanks to all. [1] http://www2-pcmdi.llnl.gov/cdat/ > -- > http://roshan.mathews.in/ > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- Regards, Arulalan.T Kanchi Linux User Group Rocks ! http://kanchilug.wordpress.com My Experiments In Linux are here http://tuxcoder.wordpress.com From noufal at gmail.com Tue Aug 24 15:39:05 2010 From: noufal at gmail.com (Noufal Ibrahim) Date: Tue, 24 Aug 2010 19:09:05 +0530 Subject: [BangPypers] Need Help : Setting Floating Precision Point as 2 in Python In-Reply-To: (Arulalan T.'s message of "Tue, 24 Aug 2010 17:52:02 +0530") References: <87lj7w2qmo.fsf@gmail.com> <87fwy42or2.fsf@gmail.com> Message-ID: <87bp8s2kqu.fsf@gmail.com> Arulalan T writes: [...] > This gives the what I need. > But I can not use this Decimal data type. > > In CDAT vcs module supports only the 'float data' type to represent the > latitude & logitude in map. > > so I need float value in 2 precision without changing the value. Not in > string. Not in Decimal. > > > > Any suggestions? The decimal module was designed to solve this problem. If the "VCS module" is not using it, you have to fix it or check to see how it's working without this problem. [...] -- From noufal at gmail.com Tue Aug 24 15:56:08 2010 From: noufal at gmail.com (Noufal Ibrahim) Date: Tue, 24 Aug 2010 19:26:08 +0530 Subject: [BangPypers] Need Help : Setting Floating Precision Point as 2 in Python In-Reply-To: (Arulalan T.'s message of "Tue, 24 Aug 2010 18:54:40 +0530") References: <87lj7w2qmo.fsf@gmail.com> <87fwy42or2.fsf@gmail.com> Message-ID: <877hjg2jyf.fsf@gmail.com> Arulalan T writes: [...] > In CDAT[1] vcs module supports only the 'float data' type to represent > the latitude & logitude in World map. So I cant use Decimal or a > string an integer. Only float. [...] I think that's a bug. The module should rely on duck typing rather than on concrete types. -- From arulalant at gmail.com Tue Aug 24 15:59:12 2010 From: arulalant at gmail.com (Arulalan T) Date: Tue, 24 Aug 2010 19:29:12 +0530 Subject: [BangPypers] Need Help : Setting Floating Precision Point as 2 in Python In-Reply-To: <877hjg2jyf.fsf@gmail.com> References: <87lj7w2qmo.fsf@gmail.com> <87fwy42or2.fsf@gmail.com> <877hjg2jyf.fsf@gmail.com> Message-ID: 2010/8/24 Noufal Ibrahim : > Arulalan T writes: > > [...] > >> In CDAT[1] vcs module supports only the 'float data' type to represent >> the latitude & logitude in World map. ?So I cant use Decimal or a >> string an integer. Only float. > > [...] > > I think that's a bug. > > The module should rely on duck typing rather than on concrete types. > I will try to write patch for this vcs of CDAT. Thanks a lot guys. > > -- > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- Regards, Arulalan.T Kanchi Linux User Group Rocks ! http://kanchilug.wordpress.com My Experiments In Linux are here http://tuxcoder.wordpress.com From renukaprasadb at gmail.com Tue Aug 24 16:07:01 2010 From: renukaprasadb at gmail.com (renuka prasad) Date: Tue, 24 Aug 2010 19:37:01 +0530 Subject: [BangPypers] Need Help : Setting Floating Precision Point as 2 in Python In-Reply-To: References: <87lj7w2qmo.fsf@gmail.com> <87fwy42or2.fsf@gmail.com> <877hjg2jyf.fsf@gmail.com> Message-ID: On Tue, Aug 24, 2010 at 7:29 PM, Arulalan T wrote: > 2010/8/24 Noufal Ibrahim : > > Arulalan T writes: > > > > [...] > > > >> In CDAT[1] vcs module supports only the 'float data' type to represent > >> the latitude & logitude in World map. So I cant use Decimal or a > >> string an integer. Only float. > > > > [...] > > > > I think that's a bug. > > > > The module should rely on duck typing rather than on concrete types. > > > > I will try to write patch for this vcs of CDAT. > > what is the reason for the previous problem? can you elaborate a bit.. What my understanding is that the typical code and value , that is what we code is not the same as its value but would like to know more.. can you explain a bit? > Thanks a lot guys. > > > > > > -- > > _______________________________________________ > > BangPypers mailing list > > BangPypers at python.org > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > > -- > Regards, > Arulalan.T > > Kanchi Linux User Group Rocks ! > http://kanchilug.wordpress.com > > My Experiments In Linux are here > http://tuxcoder.wordpress.com > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From noufal at gmail.com Tue Aug 24 18:06:58 2010 From: noufal at gmail.com (Noufal Ibrahim) Date: Tue, 24 Aug 2010 21:36:58 +0530 Subject: [BangPypers] Need Help : Setting Floating Precision Point as 2 in Python In-Reply-To: (renuka prasad's message of "Tue, 24 Aug 2010 19:37:01 +0530") References: <87lj7w2qmo.fsf@gmail.com> <87fwy42or2.fsf@gmail.com> <877hjg2jyf.fsf@gmail.com> Message-ID: <87y6bw0zbx.fsf@gmail.com> renuka prasad writes: [...] > what is the reason for the previous problem? can you elaborate a > bit.. What my understanding is that the typical code and value , that > is what we code is not the same as its value > > but would like to know more.. can you explain a bit? [...] It's generally bad form in Python to say, for example d.has_key(foo) rather than foo in d The former assumes the "has_key" method (commonly there when d is a dictionary) and so doesn't work for other containers like lists, tuples, sets. In short, if you're going to do addition, all you should be worried about is whether the operands support the addition protocol. You shouldn't care about (and shouldn't definitely not check for) the types of the operands which is what, from Arul's comment, the VCS module seems to be doing. -- From b.ghose at gmail.com Wed Aug 25 07:45:38 2010 From: b.ghose at gmail.com (Baishampayan Ghose) Date: Wed, 25 Aug 2010 11:15:38 +0530 Subject: [BangPypers] Clojure style multimethod functions in python In-Reply-To: References: Message-ID: >> Without making any change whatsoever to multi() and multi_method(), > the result of the following code : > > # Declare the existence of a multi method switcher > encounter = multi(lambda x,y : (x["Species"], y["Species"])) > > @multi_method(encounter, ("Bunny","Lion")) > def encounter(a1, a2): > ? ?return "run-away" > > @multi_method(encounter, ("Lion","Bunny")) > def encounter(a1, a2): > ? ?return "eat" > > @multi_method(encounter, ("Bunny","Bunny")) > def encounter(a1, a2): > ? ?return "mate" > > @multi_method(encounter, ("Lion","Lion")) > def encounter(a1, a2): > ? ?return "fight" > > b1 = {"Species" : "Bunny", "Other" : "Stuff"} > b2 = {"Species" : "Bunny", "Other" : "Stuff"} > l1 = {"Species" : "Lion", "Other" : "Stuff"} > l2 = {"Species" : "Lion", "Other" : "Stuff"} > > print encounter(b1, b2) > print encounter(b1, l1) > print encounter(l1, b1) > print encounter(l1, l2) > > *is > * > mate > run-away > eat > fight > > Is that consistent with the expectations ? Fair enough. Good work, Dhananjay. Regards, BG -- Baishampayan Ghose b.ghose at gmail.com From vsapre80 at gmail.com Wed Aug 25 20:01:20 2010 From: vsapre80 at gmail.com (Vishal) Date: Wed, 25 Aug 2010 23:31:20 +0530 Subject: [BangPypers] Clojure style multimethod functions in python In-Reply-To: References: Message-ID: Does anyone know of some speed performance comparison between multi-methods* vs* if-elif-else* vs* class based polymorphism ? Thanks and best regards, Vishal On Wed, Aug 25, 2010 at 11:15 AM, Baishampayan Ghose wrote: > >> Without making any change whatsoever to multi() and multi_method(), > > the result of the following code : > > > > # Declare the existence of a multi method switcher > > encounter = multi(lambda x,y : (x["Species"], y["Species"])) > > > > @multi_method(encounter, ("Bunny","Lion")) > > def encounter(a1, a2): > > return "run-away" > > > > @multi_method(encounter, ("Lion","Bunny")) > > def encounter(a1, a2): > > return "eat" > > > > @multi_method(encounter, ("Bunny","Bunny")) > > def encounter(a1, a2): > > return "mate" > > > > @multi_method(encounter, ("Lion","Lion")) > > def encounter(a1, a2): > > return "fight" > > > > b1 = {"Species" : "Bunny", "Other" : "Stuff"} > > b2 = {"Species" : "Bunny", "Other" : "Stuff"} > > l1 = {"Species" : "Lion", "Other" : "Stuff"} > > l2 = {"Species" : "Lion", "Other" : "Stuff"} > > > > print encounter(b1, b2) > > print encounter(b1, l1) > > print encounter(l1, b1) > > print encounter(l1, l2) > > > > *is > > * > > mate > > run-away > > eat > > fight > > > > Is that consistent with the expectations ? > > Fair enough. Good work, Dhananjay. > > Regards, > BG > > -- > Baishampayan Ghose > b.ghose at gmail.com > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From admin.nitjece at gmail.com Fri Aug 27 11:40:49 2010 From: admin.nitjece at gmail.com (Diptanu Choudhury) Date: Fri, 27 Aug 2010 15:10:49 +0530 Subject: [BangPypers] Python Meetups in NCR? Message-ID: Hi, I am going to be in Gurgaon for a few months. Does anyone know if any Python meetups happen in Delhi/Gurgaon/Noida? ThoughtWorks is also willing to let out space after office hours and in weekends, if people are enthusiastic to form study groups or any tech meetups. -- Thanks, Diptanu Choudhury Consultant, ThoughtWorks India Mobile - +91 9686602153 Web - www.linkedin.com/in/diptanu From nitin.162 at gmail.com Fri Aug 27 11:55:28 2010 From: nitin.162 at gmail.com (Nitin Das) Date: Fri, 27 Aug 2010 15:25:28 +0530 Subject: [BangPypers] Python Meetups in NCR? In-Reply-To: References: Message-ID: Yes that would be the nice idea of arranging something in NCR. --nitin On Fri, Aug 27, 2010 at 3:10 PM, Diptanu Choudhury wrote: > Hi, > > I am going to be in Gurgaon for a few months. Does anyone know if any > Python > meetups happen in Delhi/Gurgaon/Noida? ThoughtWorks is also willing to let > out space after office hours and in weekends, if people are enthusiastic to > form study groups or any tech meetups. > > -- > Thanks, > Diptanu Choudhury > Consultant, ThoughtWorks India > Mobile - +91 9686602153 > Web - www.linkedin.com/in/diptanu > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From hiddenharmony at gmail.com Fri Aug 27 12:01:10 2010 From: hiddenharmony at gmail.com (Vivek Khurana) Date: Fri, 27 Aug 2010 15:31:10 +0530 Subject: [BangPypers] Python Meetups in NCR? In-Reply-To: References: Message-ID: On Fri, Aug 27, 2010 at 3:10 PM, Diptanu Choudhury wrote: > Hi, > > I am going to be in Gurgaon for a few months. Does anyone know if any Python > meetups happen in Delhi/Gurgaon/Noida? ThoughtWorks is also willing to let > out space after office hours and in weekends, if people are enthusiastic to > form study groups or any tech meetups. There are few people interested in having a meetup. I am in Delhi and we can plan for a meetup. regards Vivek -- The hidden harmony is better than the obvious!! From hiddenharmony at gmail.com Fri Aug 27 12:05:31 2010 From: hiddenharmony at gmail.com (Vivek Khurana) Date: Fri, 27 Aug 2010 15:35:31 +0530 Subject: [BangPypers] Python Meetups in NCR? In-Reply-To: References: Message-ID: On Fri, Aug 27, 2010 at 3:25 PM, Nitin Das wrote: > Yes that would be the nice idea of arranging something in NCR. You want formal meetup with projector and stuff or you want an informal meetup? Dilli haat is always available for informal meetup :) regards Vivek -- The hidden harmony is better than the obvious!! From nitin.162 at gmail.com Fri Aug 27 12:26:14 2010 From: nitin.162 at gmail.com (Nitin Das) Date: Fri, 27 Aug 2010 15:56:14 +0530 Subject: [BangPypers] Python Meetups in NCR? In-Reply-To: References: Message-ID: I think initially informal meet ups are ok. What do you say ? On Fri, Aug 27, 2010 at 3:35 PM, Vivek Khurana wrote: > On Fri, Aug 27, 2010 at 3:25 PM, Nitin Das wrote: > > Yes that would be the nice idea of arranging something in NCR. > > You want formal meetup with projector and stuff or you want an > informal meetup? Dilli haat is always available for informal meetup :) > > regards > Vivek > > -- > The hidden harmony is better than the obvious!! > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From aditya.sahay at gmail.com Fri Aug 27 13:11:33 2010 From: aditya.sahay at gmail.com (Aditya Sahay) Date: Fri, 27 Aug 2010 16:41:33 +0530 Subject: [BangPypers] BangPypers Digest, Vol 36, Issue 35 In-Reply-To: References: Message-ID: I'll be happy to attend. Any other folks interested? On 8/27/10, bangpypers-request at python.org wrote: > Send BangPypers mailing list submissions to > bangpypers at python.org > > To subscribe or unsubscribe via the World Wide Web, visit > http://mail.python.org/mailman/listinfo/bangpypers > or, via email, send a message with subject or body 'help' to > bangpypers-request at python.org > > You can reach the person managing the list at > bangpypers-owner at python.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of BangPypers digest..." > > > Today's Topics: > > 1. Python Meetups in NCR? (Diptanu Choudhury) > 2. Re: Python Meetups in NCR? (Nitin Das) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Fri, 27 Aug 2010 15:10:49 +0530 > From: Diptanu Choudhury > To: Bangalore Python Users Group - India > Subject: [BangPypers] Python Meetups in NCR? > Message-ID: > > Content-Type: text/plain; charset=UTF-8 > > Hi, > > I am going to be in Gurgaon for a few months. Does anyone know if any Python > meetups happen in Delhi/Gurgaon/Noida? ThoughtWorks is also willing to let > out space after office hours and in weekends, if people are enthusiastic to > form study groups or any tech meetups. > > -- > Thanks, > Diptanu Choudhury > Consultant, ThoughtWorks India > Mobile - +91 9686602153 > Web - www.linkedin.com/in/diptanu > > > ------------------------------ > > Message: 2 > Date: Fri, 27 Aug 2010 15:25:28 +0530 > From: Nitin Das > To: Bangalore Python Users Group - India > Subject: Re: [BangPypers] Python Meetups in NCR? > Message-ID: > > Content-Type: text/plain; charset=UTF-8 > > Yes that would be the nice idea of arranging something in NCR. > > --nitin > > On Fri, Aug 27, 2010 at 3:10 PM, Diptanu Choudhury > wrote: > >> Hi, >> >> I am going to be in Gurgaon for a few months. Does anyone know if any >> Python >> meetups happen in Delhi/Gurgaon/Noida? ThoughtWorks is also willing to let >> out space after office hours and in weekends, if people are enthusiastic >> to >> form study groups or any tech meetups. >> >> -- >> Thanks, >> Diptanu Choudhury >> Consultant, ThoughtWorks India >> Mobile - +91 9686602153 >> Web - www.linkedin.com/in/diptanu >> _______________________________________________ >> BangPypers mailing list >> BangPypers at python.org >> http://mail.python.org/mailman/listinfo/bangpypers >> > > > ------------------------------ > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > > > End of BangPypers Digest, Vol 36, Issue 35 > ****************************************** > -- Sent from Gmail for mobile | mobile.google.com From admin.nitjece at gmail.com Fri Aug 27 14:25:00 2010 From: admin.nitjece at gmail.com (Diptanu Choudhury) Date: Fri, 27 Aug 2010 17:55:00 +0530 Subject: [BangPypers] Python Meetups in NCR? In-Reply-To: References: Message-ID: I am game for informal meetups. That would give me an opportunity to see Delhi as well :-) Let's decide on a topic and discuss during the meetup. On Fri, Aug 27, 2010 at 3:56 PM, Nitin Das wrote: > I think initially informal meet ups are ok. What do you say ? > > On Fri, Aug 27, 2010 at 3:35 PM, Vivek Khurana >wrote: > > > On Fri, Aug 27, 2010 at 3:25 PM, Nitin Das wrote: > > > Yes that would be the nice idea of arranging something in NCR. > > > > You want formal meetup with projector and stuff or you want an > > informal meetup? Dilli haat is always available for informal meetup :) > > > > regards > > Vivek > > > > -- > > The hidden harmony is better than the obvious!! > > _______________________________________________ > > BangPypers mailing list > > BangPypers at python.org > > http://mail.python.org/mailman/listinfo/bangpypers > > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- Thanks, Diptanu Choudhury Consultant, ThoughtWorks India Mobile - +91 9686602153 Web - www.linkedin.com/in/diptanu From pranny at gmail.com Fri Aug 27 14:46:09 2010 From: pranny at gmail.com (Pranav Prakash) Date: Fri, 27 Aug 2010 18:16:09 +0530 Subject: [BangPypers] Python Meetups in NCR? (Pranav) Message-ID: Hey All, It's great to know you guys in Gurgaon. I am in Gurgaon working with Oxylabs Networks. We do have OASIS (*O*xylabs *A*dvancement of *S*tructured *I*dea * S*essions) scheduled every Friday from 5pm to 6pm at our office. The talks are not strictly Pythonic, but deals with a wide variety of topics in software development. As of now, i am not aware of any Python meetups or groups in Delhi/NCR. The Delhi GTUG took off a few weeks back, but it is inactive as of now. Maybe we all can sit together and plan out something? I will be available in Gurgaon from Sunday 29th Aug onwards. My contact number is (+91) 971-724-6183. > Hi, > > I am going to be in Gurgaon for a few months. Does anyone know if any > Python > meetups happen in Delhi/Gurgaon/Noida? ThoughtWorks is also willing to let > out space after office hours and in weekends, if people are enthusiastic to > form study groups or any tech meetups. > > -- > Thanks, > Diptanu Choudhury > Consultant, ThoughtWorks India > Mobile - +91 9686602153 > Web - www.linkedin.com/in/diptanu > > > > ---------- Forwarded message ---------- > From: Nitin Das > To: Bangalore Python Users Group - India > Date: Fri, 27 Aug 2010 15:25:28 +0530 > Subject: Re: [BangPypers] Python Meetups in NCR? > Yes that would be the nice idea of arranging something in NCR. > > --nitin > > -- *Pranav Prakash* "This life is more than ordinary" Twitter | Blog | Google From pranny at gmail.com Fri Aug 27 15:47:09 2010 From: pranny at gmail.com (Pranav Prakash) Date: Fri, 27 Aug 2010 19:17:09 +0530 Subject: [BangPypers] Python Meetups in NCR? Message-ID: Ya, even I am in for informal meetup. Let's decide a datetime.datetime and cordinate. -- *Pranav Prakash* "This life is more than ordinary" Twitter | Blog | Google From admin.nitjece at gmail.com Fri Aug 27 15:50:11 2010 From: admin.nitjece at gmail.com (Diptanu Choudhury) Date: Fri, 27 Aug 2010 19:20:11 +0530 Subject: [BangPypers] Python Meetups in NCR? (Pranav) In-Reply-To: References: Message-ID: Sounds good to me. Let's plan up something really quick. However I would prefer something during the weekends. On Aug 27, 2010 6:16 PM, "Pranav Prakash" wrote: > Hey All, > > It's great to know you guys in Gurgaon. I am in Gurgaon working with Oxylabs > Networks. We do have OASIS (*O*xylabs *A*dvancement of *S*tructured *I*dea * > S*essions) scheduled every Friday from 5pm to 6pm at our office. The talks > are not strictly Pythonic, but deals with a wide variety of topics in > software development. As of now, i am not aware of any Python meetups or > groups in Delhi/NCR. The Delhi GTUG took off a few weeks back, but it is > inactive as of now. Maybe we all can sit together and plan out something? I > will be available in Gurgaon from Sunday 29th Aug onwards. My contact number > is (+91) 971-724-6183. > > >> Hi, >> >> I am going to be in Gurgaon for a few months. Does anyone know if any >> Python >> meetups happen in Delhi/Gurgaon/Noida? ThoughtWorks is also willing to let >> out space after office hours and in weekends, if people are enthusiastic to >> form study groups or any tech meetups. >> >> -- >> Thanks, >> Diptanu Choudhury >> Consultant, ThoughtWorks India >> Mobile - +91 9686602153 >> Web - www.linkedin.com/in/diptanu >> >> >> >> ---------- Forwarded message ---------- >> From: Nitin Das >> To: Bangalore Python Users Group - India >> Date: Fri, 27 Aug 2010 15:25:28 +0530 >> Subject: Re: [BangPypers] Python Meetups in NCR? >> Yes that would be the nice idea of arranging something in NCR. >> >> --nitin >> >> > -- > *Pranav Prakash* > > "This life is more than ordinary" > > Twitter | > Blog | > Google > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers From gora at srijan.in Fri Aug 27 16:20:17 2010 From: gora at srijan.in (Gora Mohanty) Date: Fri, 27 Aug 2010 19:50:17 +0530 Subject: [BangPypers] Python Meetups in NCR? In-Reply-To: References: Message-ID: <20100827195017.20e3d93c@ibis> On Fri, 27 Aug 2010 19:20:11 +0530 Diptanu Choudhury wrote: > Sounds good to me. Let's plan up something really quick. However > I would prefer something during the weekends. [...] I would like to be there, too. As it is already Fri. evening, and weekends are usually good for most people, could we plan for next weekend, i.e., the 4th or the 5th. I am willing to meet up anywhere in NCR, but can offer two possibilities: * JNU * The premises of a company in Gurgaon, though I would have to check if these are available on Sun. Sat. should be OK. The advantage here is that it is right across the street from Howzzat, the micro-brewery in Gurgaon. Howzzat can also be a potential meeting place, though it is *loud*. Do we want to set about fixing a rough agenda, or should we just wing it? Regards, Gora From nitin.162 at gmail.com Fri Aug 27 17:00:06 2010 From: nitin.162 at gmail.com (Nitin Das) Date: Fri, 27 Aug 2010 20:30:06 +0530 Subject: [BangPypers] Python Meetups in NCR? (Pranav) In-Reply-To: References: Message-ID: I think 5th of Sept (sunday) would be fine ...!! Lets make this as a simple get together so that we would know each other quite well..What do u say guy..?? My number is +91-9818131065. --Nitin On Fri, Aug 27, 2010 at 7:20 PM, Diptanu Choudhury wrote: > Sounds good to me. Let's plan up something really quick. However I would > prefer something during the weekends. > > On Aug 27, 2010 6:16 PM, "Pranav Prakash" wrote: > > Hey All, > > > > It's great to know you guys in Gurgaon. I am in Gurgaon working with > Oxylabs > > Networks. We do have OASIS (*O*xylabs *A*dvancement of *S*tructured > *I*dea > * > > S*essions) scheduled every Friday from 5pm to 6pm at our office. The > talks > > are not strictly Pythonic, but deals with a wide variety of topics in > > software development. As of now, i am not aware of any Python meetups or > > groups in Delhi/NCR. The Delhi GTUG took off a few weeks back, but it is > > inactive as of now. Maybe we all can sit together and plan out something? > I > > will be available in Gurgaon from Sunday 29th Aug onwards. My contact > number > > is (+91) 971-724-6183. > > > > > >> Hi, > >> > >> I am going to be in Gurgaon for a few months. Does anyone know if any > >> Python > >> meetups happen in Delhi/Gurgaon/Noida? ThoughtWorks is also willing to > let > >> out space after office hours and in weekends, if people are enthusiastic > to > >> form study groups or any tech meetups. > >> > >> -- > >> Thanks, > >> Diptanu Choudhury > >> Consultant, ThoughtWorks India > >> Mobile - +91 9686602153 > >> Web - www.linkedin.com/in/diptanu > >> > >> > >> > >> ---------- Forwarded message ---------- > >> From: Nitin Das > >> To: Bangalore Python Users Group - India > >> Date: Fri, 27 Aug 2010 15:25:28 +0530 > >> Subject: Re: [BangPypers] Python Meetups in NCR? > >> Yes that would be the nice idea of arranging something in NCR. > >> > >> --nitin > >> > >> > > -- > > *Pranav Prakash* > > > > "This life is more than ordinary" > > > > Twitter | > > Blog | > > Google > > _______________________________________________ > > BangPypers mailing list > > BangPypers at python.org > > http://mail.python.org/mailman/listinfo/bangpypers > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From hiddenharmony at gmail.com Fri Aug 27 17:19:37 2010 From: hiddenharmony at gmail.com (Vivek Khurana) Date: Fri, 27 Aug 2010 20:49:37 +0530 Subject: [BangPypers] Python Meetups in NCR? (Pranav) In-Reply-To: References: Message-ID: On Fri, Aug 27, 2010 at 8:30 PM, Nitin Das wrote: > I think 5th of Sept (sunday) would be fine ...!! Lets make this as a simple > get together so that we would know each other quite well..What do u say > guy..?? > > My number is +91-9818131065. Lets meetup in dilli hat at 5 pm. I am available on 9868512000. regards VIvek -- The hidden harmony is better than the obvious!! From hiddenharmony at gmail.com Fri Aug 27 17:30:39 2010 From: hiddenharmony at gmail.com (Vivek Khurana) Date: Fri, 27 Aug 2010 21:00:39 +0530 Subject: [BangPypers] Python Meetups in NCR? In-Reply-To: <20100827195017.20e3d93c@ibis> References: <20100827195017.20e3d93c@ibis> Message-ID: On Fri, Aug 27, 2010 at 7:50 PM, Gora Mohanty wrote: > > I am willing to meet up anywhere in NCR, but can offer two > possibilities: > * JNU > * The premises of a company in Gurgaon, though I would have to check > ?if these are available on Sun. Sat. should be OK. The advantage > ?here is that it is right across the street from Howzzat, the > ?micro-brewery in Gurgaon. Howzzat can also be a potential meeting > ?place, though it is *loud*. Gurgaon is far far... regards Vivek -- The hidden harmony is better than the obvious!! From gora at srijan.in Sun Aug 29 17:59:23 2010 From: gora at srijan.in (Gora Mohanty) Date: Sun, 29 Aug 2010 21:29:23 +0530 Subject: [BangPypers] Python Meetups in NCR? In-Reply-To: References: <20100827195017.20e3d93c@ibis> Message-ID: <20100829212923.4fda7061@ibis> On Fri, 27 Aug 2010 21:00:39 +0530 Vivek Khurana wrote: [...] > Gurgaon is far far... [...] Yes, but Howzzat beer is cold, cold, and good, good. Worth the journey. Dilli Haat is fine with me, but might not be the best of venues if it is raining. In case of rain, there are also no nearby places to retreat to. Further, as the place is pretty large, specifying an exact meeting place to people new to Delhi becomes difficult. In any case, let us fix the time for the meet at 5pm, Sun., Sep. the 5th. To facilitate things, I have set up an online poll at http://www.snappoll.com/poll/339555.php , the first such site that I came across on Google. Could we set a date of Wed., 1st Sep., for agreeing on a venue? Regards, Gora From hiddenharmony at gmail.com Sun Aug 29 18:16:26 2010 From: hiddenharmony at gmail.com (Vivek Khurana) Date: Sun, 29 Aug 2010 21:46:26 +0530 Subject: [BangPypers] Python Meetups in NCR? In-Reply-To: <20100829212923.4fda7061@ibis> References: <20100827195017.20e3d93c@ibis> <20100829212923.4fda7061@ibis> Message-ID: On Sun, Aug 29, 2010 at 9:29 PM, Gora Mohanty wrote: > On Fri, 27 Aug 2010 21:00:39 +0530 > Vivek Khurana wrote: > [...] >> ?Gurgaon is far far... > [...] > > Yes, but Howzzat beer is cold, cold, and good, good. Worth the > journey. > That is a personal taste. I dont drink beer, so it doesnt matter even if he is serving the best beer in the whole world. :) regards Vivek -- The hidden harmony is better than the obvious!! From prem251 at yahoo.co.in Sun Aug 29 18:13:36 2010 From: prem251 at yahoo.co.in (prem) Date: Sun, 29 Aug 2010 21:43:36 +0530 (IST) Subject: [BangPypers] Python consutlant job Message-ID: <547763.85095.qm@web95409.mail.in2.yahoo.com> Dear all, Thales Software India, Chennai is currently looking for a skilled python programmer on a 4-6 months contract. If you have any additional skills like and you are looking for a permanent position, we can look into that too. The job is interesting and the current project is completely a python based application. Salary is not a concern for the right candidate. so, if you are in Chennai or if you are willing to relocate to Chennai , please drop an email to senthil.kumaran at india.thalesgroup.com. I am sorry if the post is not as per the regulations. All the best. From sibtey.mehndi at genpact.com Mon Aug 30 06:02:07 2010 From: sibtey.mehndi at genpact.com (Mehndi, Sibtey) Date: Mon, 30 Aug 2010 09:32:07 +0530 Subject: [BangPypers] Python Meetups in NCR? In-Reply-To: References: <20100827195017.20e3d93c@ibis> <20100829212923.4fda7061@ibis> Message-ID: I am also interested but the preferred venue is Delhi. Regards, Sibtey Mehdi On Sun, Aug 29, 2010 at 9:29 PM, Gora Mohanty wrote: > On Fri, 27 Aug 2010 21:00:39 +0530 > Vivek Khurana wrote: > [...] >> Gurgaon is far far... > [...] > > Yes, but Howzzat beer is cold, cold, and good, good. Worth the > journey. > That is a personal taste. I dont drink beer, so it doesnt matter even if he is serving the best beer in the whole world. :) regards Vivek -- The hidden harmony is better than the obvious!! _______________________________________________ BangPypers mailing list BangPypers at python.org http://mail.python.org/mailman/listinfo/bangpypers This e-mail (and any attachments), is confidential and may be privileged. It may be read, copied and used only by intended recipients. Unauthorized access to this e-mail (or attachments) and disclosure or copying of its contents or any action taken in reliance on it is unlawful. Unintended recipients must notify the sender immediately by e-mail/phone & delete it from their system without making any copies or disclosing it to a third person. From gora at srijan.in Mon Aug 30 20:45:34 2010 From: gora at srijan.in (Gora Mohanty) Date: Tue, 31 Aug 2010 00:15:34 +0530 Subject: [BangPypers] Python Meetups in NCR? In-Reply-To: References: <20100827195017.20e3d93c@ibis> <20100829212923.4fda7061@ibis> Message-ID: <20100831001534.4f5a8a36@ibis> On Mon, 30 Aug 2010 09:32:07 +0530 "Mehndi, Sibtey" wrote: > > I am also interested but the preferred venue is Delhi. [...] People! I am interested in this meetup, but as of the moment, there is exactly one vote for each of the venues. I am seriously tired of this nonsense of trying to organise meetings, where all and sundry feel free to mouth off, but nobody can be bothered to even click on a link to vote. No offence to anybody, but if we do not have, say 10 votes on the link posted earlier, http://www.snappoll.com/poll/339555.php , by Wed., I am personally out of it. Do not mean to chepo anybody, or to imply that *you* should follow my rules, but personally I would have had enough by then. By all means feel free to organise otherwise. Regards, Gora From joepaulp at gmail.com Tue Aug 31 02:19:59 2010 From: joepaulp at gmail.com (Joe Paul) Date: Mon, 30 Aug 2010 20:19:59 -0400 Subject: [BangPypers] [JOB] Financial domain job at Kochi Message-ID: Hi there, I am in the process of setting up something in a very small scale for analytics in equity side (like stock market, trading etc ) and wanted to see whether there would be any one interested in taking up some thing like that. The job will be based from Kochi, Kerala and it is currently in the basic design phase. My experience all have been in data analysis for a fund management company in US and now am thinking of setting up something of my own. I have very little experience in programming and looking for some one who can bring in that portion of the skillset to complement my experience in data analysis. Some of the basics - person should be self motivated and should have entrepreneurial interest, should be a go getter - since this is not an established company or anything, it has its own risks - rare opportunity to run your own shop - should be able to see a project from inception to completion More details/responsibilities will be based on skill/experience. This is what I have in mind as a basic framework -> A web UI + postgresql for the db (in some case sqlite or berkeleydb) -> R/Splus (for most work in statistics), matlab, excel and numpy/scipy depending on the case and strength -> Python, to glue everything together You don't need to know R/Matlab/numpy etc, if you know that it will be great, but you will be in charge of python, frameworks, UI etc and also gluing some of the utilities in C++ with python, things like that. Idea here is to create tools and environment where we can use all these tools together to do research work. Again, couple of absolutes, person should be interested in financial domain, should be interested to work from Kochi (some flexibility can be done), should have the risk profile for such a job, should have the motivation to run his/her own shop etc If anyone is interested please send me an email with some background/resume/what is your motivation etc to joepaulp at gmail dot com. Also your expectation in terms of work and pay. If you need to talk and get a feel of things, I am planning to come to BLR for PyCon conference and probably we can chit chat and see if there is any common interest. Please email me so I know some idea about who is interested. Thanks all for your contributions here. Thanks Joe paul From nitin.162 at gmail.com Tue Aug 31 04:24:30 2010 From: nitin.162 at gmail.com (Nitin Das) Date: Tue, 31 Aug 2010 07:54:30 +0530 Subject: [BangPypers] Python Meetups in NCR? In-Reply-To: <20100831001534.4f5a8a36@ibis> References: <20100827195017.20e3d93c@ibis> <20100829212923.4fda7061@ibis> <20100831001534.4f5a8a36@ibis> Message-ID: I have voted for dilli haat. --nitin On Tue, Aug 31, 2010 at 12:15 AM, Gora Mohanty wrote: > On Mon, 30 Aug 2010 09:32:07 +0530 > "Mehndi, Sibtey" wrote: > > > > > I am also interested but the preferred venue is Delhi. > [...] > > People! I am interested in this meetup, but as of the moment, > there is exactly one vote for each of the venues. > > I am seriously tired of this nonsense of trying to organise > meetings, where all and sundry feel free to mouth off, but nobody > can be bothered to even click on a link to vote. > > No offence to anybody, but if we do not have, say 10 votes on the > link posted earlier, http://www.snappoll.com/poll/339555.php , by > Wed., I am personally out of it. Do not mean to chepo anybody, or > to imply that *you* should follow my rules, but personally I would > have had enough by then. By all means feel free to organise > otherwise. > > Regards, > Gora > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From gora at srijan.in Tue Aug 31 07:02:45 2010 From: gora at srijan.in (Gora Mohanty) Date: Tue, 31 Aug 2010 10:32:45 +0530 Subject: [BangPypers] Python Meetups in NCR? In-Reply-To: <20100831001534.4f5a8a36@ibis> References: <20100827195017.20e3d93c@ibis> <20100829212923.4fda7061@ibis> <20100831001534.4f5a8a36@ibis> Message-ID: <20100831103245.7f255de1@ibis> On Tue, 31 Aug 2010 00:15:34 +0530 Gora Mohanty wrote: [...] > I am seriously tired of this nonsense of trying to organise > meetings, where all and sundry feel free to mouth off, but nobody > can be bothered to even click on a link to vote. [...] To follow up to myself: I apologise for the tone of this message. I was a little tired last night, and it came across much harsher than I had intended. I would like to clarify that the bit about "mouthing off" was not directed at anyone in particular. Please do accept my apologies, and take the time to make your preference on the venue known: http://www.snappoll.com/poll/339555.php Thanks. Regards, Gora From hiddenharmony at gmail.com Tue Aug 31 07:23:57 2010 From: hiddenharmony at gmail.com (Vivek Khurana) Date: Tue, 31 Aug 2010 10:53:57 +0530 Subject: [BangPypers] Python Meetups in NCR? In-Reply-To: <20100831001534.4f5a8a36@ibis> References: <20100827195017.20e3d93c@ibis> <20100829212923.4fda7061@ibis> <20100831001534.4f5a8a36@ibis> Message-ID: On Tue, Aug 31, 2010 at 12:15 AM, Gora Mohanty wrote: enues. > > I am seriously tired of this nonsense of trying to organise > meetings, where all and sundry feel free to mouth off, but nobody > can be bothered to even click on a link to vote. > Chill.. you always havee the option of not organizing the meeting :) regards Vivek -- The hidden harmony is better than the obvious!! From lawgon at au-kbc.org Tue Aug 31 10:20:52 2010 From: lawgon at au-kbc.org (Kenneth Gonsalves) Date: Tue, 31 Aug 2010 13:50:52 +0530 Subject: [BangPypers] Python Meetups in NCR? In-Reply-To: <20100831103245.7f255de1@ibis> References: <20100827195017.20e3d93c@ibis> <20100829212923.4fda7061@ibis> <20100831001534.4f5a8a36@ibis> <20100831103245.7f255de1@ibis> Message-ID: <1283242852.2150.957.camel@localhost> On Tue, 2010-08-31 at 10:32 +0530, Gora Mohanty wrote: > On Tue, 31 Aug 2010 00:15:34 +0530 > Gora Mohanty wrote: > [...] > > I am seriously tired of this nonsense of trying to organise > > meetings, where all and sundry feel free to mouth off, but nobody > > can be bothered to even click on a link to vote. > [...] > > To follow up to myself: I apologise for the tone of this message. I > was a little tired last night, and it came across much harsher than > I had intended. I would like to clarify that the bit about "mouthing > off" was not directed at anyone in particular. > > please hesitate before posting - of course you have the right to hold as many polls as you want for as many causes as you want, and also the right to campaign for the said polls. But others have the equal right not to vote on the polls - either because they cannot be bothered, or because they do not think things like this can be decided by a poll. I have organised and participated in very many bofs in many cities of India - some with attendance of just 2 people and others with a pretty big attendance and the most successful way of doing this is when the person who first proposes it also fixes a venue and announces it - then those who can come come. Forming an organising committee for a bof and holding elections etc does not work. -- regards Kenneth Gonsalves From noufal at gmail.com Tue Aug 31 10:56:00 2010 From: noufal at gmail.com (Noufal Ibrahim) Date: Tue, 31 Aug 2010 14:26:00 +0530 Subject: [BangPypers] Python Meetups in NCR? In-Reply-To: <1283242852.2150.957.camel@localhost> (Kenneth Gonsalves's message of "Tue, 31 Aug 2010 13:50:52 +0530") References: <20100827195017.20e3d93c@ibis> <20100829212923.4fda7061@ibis> <20100831001534.4f5a8a36@ibis> <20100831103245.7f255de1@ibis> <1283242852.2150.957.camel@localhost> Message-ID: <87fwxvgnz3.fsf@gmail.com> On Tue, Aug 31 2010, Kenneth Gonsalves wrote: [...] > the most successful way of doing this is when the person who first > proposes it also fixes a venue and announces it - then those who can > come come. [...] (Benevolent) dictatorship rather than a (non-working) democracy. +1 -- From lawgon at au-kbc.org Tue Aug 31 11:07:26 2010 From: lawgon at au-kbc.org (Kenneth Gonsalves) Date: Tue, 31 Aug 2010 14:37:26 +0530 Subject: [BangPypers] Python Meetups in NCR? In-Reply-To: <87fwxvgnz3.fsf@gmail.com> References: <20100827195017.20e3d93c@ibis> <20100829212923.4fda7061@ibis> <20100831001534.4f5a8a36@ibis> <20100831103245.7f255de1@ibis> <1283242852.2150.957.camel@localhost> <87fwxvgnz3.fsf@gmail.com> Message-ID: <1283245646.2150.962.camel@localhost> On Tue, 2010-08-31 at 14:26 +0530, Noufal Ibrahim wrote: > [...] > > > the most successful way of doing this is when the person who first > > proposes it also fixes a venue and announces it - then those who can > > come come. > > [...] > > (Benevolent) dictatorship rather than a (non-working) democracy. +1 I forgot to add, a wiki is a good place to do this as people can add their names -- regards Kenneth Gonsalves From nitin.162 at gmail.com Tue Aug 31 12:06:00 2010 From: nitin.162 at gmail.com (Nitin Das) Date: Tue, 31 Aug 2010 15:36:00 +0530 Subject: [BangPypers] Python Meetups in NCR? In-Reply-To: <1283245646.2150.962.camel@localhost> References: <20100827195017.20e3d93c@ibis> <20100829212923.4fda7061@ibis> <20100831001534.4f5a8a36@ibis> <20100831103245.7f255de1@ibis> <1283242852.2150.957.camel@localhost> <87fwxvgnz3.fsf@gmail.com> <1283245646.2150.962.camel@localhost> Message-ID: after a long mail thread we have decided exactly the final location of meetup.? Lets make it final the venue and time..! I am interested at Dilli haat 5 pm 5th sep (sunday). --nitin On Tue, Aug 31, 2010 at 2:37 PM, Kenneth Gonsalves wrote: > On Tue, 2010-08-31 at 14:26 +0530, Noufal Ibrahim wrote: > > [...] > > > > > the most successful way of doing this is when the person who first > > > proposes it also fixes a venue and announces it - then those who can > > > come come. > > > > [...] > > > > (Benevolent) dictatorship rather than a (non-working) democracy. +1 > > I forgot to add, a wiki is a good place to do this as people can add > their names > -- > regards > Kenneth Gonsalves > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From nitin.162 at gmail.com Tue Aug 31 12:06:34 2010 From: nitin.162 at gmail.com (Nitin Das) Date: Tue, 31 Aug 2010 15:36:34 +0530 Subject: [BangPypers] Python Meetups in NCR? In-Reply-To: References: <20100827195017.20e3d93c@ibis> <20100829212923.4fda7061@ibis> <20100831001534.4f5a8a36@ibis> <20100831103245.7f255de1@ibis> <1283242852.2150.957.camel@localhost> <87fwxvgnz3.fsf@gmail.com> <1283245646.2150.962.camel@localhost> Message-ID: sorry we have not decided the exact venue and time till now. -nitin On Tue, Aug 31, 2010 at 3:36 PM, Nitin Das wrote: > after a long mail thread we have decided exactly the final location of > meetup.? Lets make it final the venue and time..! > I am interested at Dilli haat 5 pm 5th sep (sunday). > > --nitin > > > On Tue, Aug 31, 2010 at 2:37 PM, Kenneth Gonsalves wrote: > >> On Tue, 2010-08-31 at 14:26 +0530, Noufal Ibrahim wrote: >> > [...] >> > >> > > the most successful way of doing this is when the person who first >> > > proposes it also fixes a venue and announces it - then those who can >> > > come come. >> > >> > [...] >> > >> > (Benevolent) dictatorship rather than a (non-working) democracy. +1 >> >> I forgot to add, a wiki is a good place to do this as people can add >> their names >> -- >> regards >> Kenneth Gonsalves >> >> _______________________________________________ >> BangPypers mailing list >> BangPypers at python.org >> http://mail.python.org/mailman/listinfo/bangpypers >> > > From punchagan at gmail.com Tue Aug 31 14:26:14 2010 From: punchagan at gmail.com (Puneeth Chaganti) Date: Tue, 31 Aug 2010 17:56:14 +0530 Subject: [BangPypers] [X-Post][Jobs] Project positions open at IIT Bombay Message-ID: <4C7CF4E6.8050905@gmail.com> 1 Announcement ~~~~~~~~~~~~~~~ Project positions are open at IIT Bombay for an MHRD funded project, Free and Open source Software for Science and Engineering Education (FOSSEE). You may obtain further info about the project from the project site: [http://fossee.in] 2 Keywords ~~~~~~~~~~~ Python, Science, Engineering, Education, Scientific computing, IIT-B, FOSS Awareness, Instruction Design, Documentation, Teaching, Graphic Design, Editing, Copy writing, SciPy, NumPy, Sage. 3 Project Description ~~~~~~~~~~~~~~~~~~~~~~ The current major activities of the team are - - Course design and content generation for courses on Python (specifically Python for Scientific Computing), LaTeX, Version Control Systems and other FOSS tools. This involves applying the concepts of Instruction Design to design courses and generation of a significant amount of documentation in the form of written material, presentations, spoken tutorials and video lectures. - Generation of supplementary material in the form of code and documentation for Engineering and Science courses being taught at IIT-Bombay. - Delivery of workshops and courses at various levels and locations across the country on the topics mentioned in content generation. - Co-ordination and Organization of conferences like SciPy.in and Sage Days. - Creating a customized distribution that has all the relevant packages to use Python for scientific computing. - We also intend to work and improve upon a tiny implementation of Python to make it suitable to be used on a Low Cost Access Device, being developed by another team from IIT-Bombay. 4 Open Positions & Description ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Content Generators + Writers/Editors + Event Manager + Project Manager + Instructional Designer + Graphic Designer + tiny Python champion 4.1 Content Generators ======================= + Qualifications Educational Qualifications: - Preferably a Bachelors degree in Engineering OR - Post Graduate degree in Science Applicants are expected to possess the following qualities/skills: - Willingness to learn - Good programming skills - Knowledge of Python programming language - Passion for FOSS - Experience with using FOSS - Good math and science skills One or more of the following skills would be a plus: - Knowledge of or experience in Instructional Design and/or content generation. - Experience of working on a FOSS project. - Experience with customizing Linux distributions. + Remuneration The pay will be in the range Rs. 10000 to 30000 depending on the qualifications and experience. For extra-ordinary people the upper limit is flexible. 4.2 Writers/Editors ==================== + Qualifications Educational Qualifications: - A Bachelors degree, preferably in English Applicants are expected to possess the following qualities/skills: - Demonstrated skill and Experience of writing technical documents. - Should be able to write/produce an error free, high quality document (with instruction design principles applied) of about 1200-1500 words in a day. - Good communication skills One or more of the following skills would be a plus: - Knowledge of LaTeX or ReST. - Use of version control systems. - Knowledge of Instruction Design - Experience with using FOSS and a passion for FOSS. + Remuneration The pay will be in the range Rs. 10000 to 30000 depending on the qualifications and experience. For extra-ordinary people the upper limit is flexible. 4.3 Event Manager ================== + Qualifications Educational Qualifications: - At least a 3 year diploma or a Bachelors degree Applicants are expected to possess the following qualities/skills: - Experience in organizing, co-ordinating and conducting events involving anything between 50 to 300 participants. - Good communication skills One or more of the following skills would be a plus: - Experience of organizing a FOSS event. - Experience with using FOSS. - Passion for FOSS. + Remuneration The pay will be in the range Rs. 10000 to 30000 depending on the qualifications and experience. For extra-ordinary people the upper limit is flexible. 4.4 Project Manager ==================== + Qualifications Educational Qualifications: - At least a Bachelors/Masters degree and relevant experience. Applicants are expected to possess the following qualities/skills: - Experience in managing a team of 10-12 people - Good programming skills - Good communication skills - Passion for FOSS - Familiarity with FOSS culture and development One or more of the following skills would be a plus: - Knowledge of Python programming language - Experience in managing a team contributing to FOSS + Remuneration The pay will be in the range Rs. 30000 to 60000 depending on the qualifications and experience. For extra-ordinary people the upper limit is flexible. 4.5 Instructional Designer =========================== + Qualifications Educational Qualifications: - A bachelors/masters degree Applicants are expected to possess the following qualities/skills: - A good amount of experience in Instruction Design - Good communication skills One or more of the following skills would be a plus: - Knowledge of and Passion for FOSS. - Experience with designing content for FOSS courses. + Remuneration The pay will be in the range Rs. 10000 to 30000 depending on the qualifications and experience. For extra-ordinary people the upper limit is flexible. 4.6 Graphic Designer ===================== + Qualifications Educational Qualifications: - At least a 3 year diploma or a bachelors degree in any field Applicants are expected to possess the following qualities/skills: - Good sense of aesthetics, color and design - Excellent design skills - Good communication skills - Experience in designing web-sites, posters, logos, t-shirts, and other promotional material. One or more of the following skills would be a plus: - Experience with using FOSS. - Passion for FOSS. + Remuneration The pay will be in the range Rs. 10000 to 30000 depending on the qualifications and experience. For extra-ordinary people the upper limit is flexible. 4.7 tiny Python champion ========================= + Qualifications Educational Qualifications: - Preferably a Bachelors degree or higher Applicants are expected to possess the following qualities/skills: - Good programming skills - Willingness to learn - Knowledge of Python programming language - Experience with micro-controller/processor programming - Passion for FOSS - Experience with using FOSS One or more of the following skills would be a plus: - Knowledge of Python internals - Experience of working on a FOSS project. + Remuneration The pay will be in the range Rs. 10000 to 30000 depending on the qualifications and experience. For extra-ordinary people the upper limit is flexible. 5 Why you should apply ~~~~~~~~~~~~~~~~~~~~~~~ - You get paid to improve and write FOSS. - You get to do really meaningful work -- your work will influence generations of future students all over India and potentially elsewhere. - You get to work on some of the most important projects that will influence the future of science and engineering. - You get to meet and work with the authors of various important packages like Numpy, Scipy, matplotlib, Mayavi and Sage. - You will be at IIT Bombay and will have best of both worlds -- good pay and an academic environment. 6 How to Apply ~~~~~~~~~~~~~~~ The positions are for a maximum duration of 2 years. The initial appointment will be for a period of 3 months which will be extended based on performance. Applicants may email their resumes along with a one page writeup on why they think they are well suited for the project to: jobs[at]fossee.in -- Puneeth Chaganti FOSSEE, IIT-Bombay From gora at srijan.in Tue Aug 31 18:22:25 2010 From: gora at srijan.in (Gora Mohanty) Date: Tue, 31 Aug 2010 21:52:25 +0530 Subject: [BangPypers] Python Meetups in NCR? In-Reply-To: References: <20100827195017.20e3d93c@ibis> <20100829212923.4fda7061@ibis> <20100831001534.4f5a8a36@ibis> <20100831103245.7f255de1@ibis> <1283242852.2150.957.camel@localhost> <87fwxvgnz3.fsf@gmail.com> <1283245646.2150.962.camel@localhost> Message-ID: <20100831215225.1c9bc602@ibis> Hi, Just so that people know, given that the expressed interest in any one FOSS-related topic, and on any one mailing list, has been rather lukewarm, I have also posted a notice of the proposed meeting to the ILUG-Delhi list, and the Apache Solr user list. The objective was to combine interest in what are hopefully related areas of interest, and increase attendance. Will post an announcement Wed. night, depending on the popularly-chosen venue. People are, of course, free to meet elsewhere, and also free to pontificate on the errors of my ways, and the tragedies of my misspent youth. Regards, Gora From hiddenharmony at gmail.com Tue Aug 31 18:25:15 2010 From: hiddenharmony at gmail.com (Vivek Khurana) Date: Tue, 31 Aug 2010 21:55:15 +0530 Subject: [BangPypers] Python Meetups in NCR? In-Reply-To: <20100831215225.1c9bc602@ibis> References: <20100827195017.20e3d93c@ibis> <20100829212923.4fda7061@ibis> <20100831001534.4f5a8a36@ibis> <20100831103245.7f255de1@ibis> <1283242852.2150.957.camel@localhost> <87fwxvgnz3.fsf@gmail.com> <1283245646.2150.962.camel@localhost> <20100831215225.1c9bc602@ibis> Message-ID: On Tue, Aug 31, 2010 at 9:52 PM, Gora Mohanty wrote: > Hi, > > ?Just so that people know, given that the expressed interest in > any one FOSS-related topic, and on any one mailing list, has been > rather lukewarm, I have also posted a notice of the proposed meeting > to the ILUG-Delhi list, and the Apache Solr user list. The objective > was to combine interest in what are hopefully related areas of > interest, and increase attendance. Will post an announcement Wed. > night, depending on the popularly-chosen venue. Combined meet o_o, looks like this one has to be missed. regards Vivek -- The hidden harmony is better than the obvious!! From gora at srijan.in Tue Aug 31 18:42:03 2010 From: gora at srijan.in (Gora Mohanty) Date: Tue, 31 Aug 2010 22:12:03 +0530 Subject: [BangPypers] Python Meetups in NCR? In-Reply-To: References: <20100827195017.20e3d93c@ibis> <20100829212923.4fda7061@ibis> <20100831001534.4f5a8a36@ibis> <20100831103245.7f255de1@ibis> <1283242852.2150.957.camel@localhost> <87fwxvgnz3.fsf@gmail.com> <1283245646.2150.962.camel@localhost> <20100831215225.1c9bc602@ibis> Message-ID: <20100831221203.66ecb34a@ibis> On Tue, 31 Aug 2010 21:55:15 +0530 Vivek Khurana wrote: [...] > Combined meet o_o, looks like this one has to be missed. [...] Like I said, please *do* feel free to have a top-S3KR1T, Pythonistas-only, invitation-required, meeting. Regards, Gora