From ssquery at gmail.com Fri Jan 1 15:00:22 2010 From: ssquery at gmail.com (sudhakar s) Date: Fri, 1 Jan 2010 19:30:22 +0530 Subject: [BangPypers] upload Message-ID: <1528d2591001010600x776e7eaeifcef872b029966f6@mail.gmail.com> Hi friends... Happy New Year.... How to upload a photo from python into MySQL r any database... please suggest me.. -- With Regards, S Sudhakar. From steve at lonetwin.net Mon Jan 4 12:05:04 2010 From: steve at lonetwin.net (steve) Date: Mon, 04 Jan 2010 16:35:04 +0530 Subject: [BangPypers] upload In-Reply-To: <1528d2591001010600x776e7eaeifcef872b029966f6@mail.gmail.com> References: <1528d2591001010600x776e7eaeifcef872b029966f6@mail.gmail.com> Message-ID: <4B41CB60.3070103@lonetwin.net> On 01/01/2010 07:30 PM, sudhakar s wrote: > Hi friends... > Happy New Year.... > > How to upload a photo from python into MySQL r any database... > please suggest me.. a. kill the python b. retrieve the photo from the python's stomach c. scan the photo, this will automatically save the photo in a database (the name of the database varies across systems, on my system this database is called ext4). hth, cheers, - steve -- random non tech spiel: http://lonetwin.blogspot.com/ tech randomness: http://lonehacks.blogspot.com/ what i'm stumbling into: http://lonetwin.stumbleupon.com/ From pradeep at btbytes.com Mon Jan 4 16:40:27 2010 From: pradeep at btbytes.com (Pradeep Gowda) Date: Mon, 4 Jan 2010 10:40:27 -0500 Subject: [BangPypers] upload In-Reply-To: <4B41CB60.3070103@lonetwin.net> References: <1528d2591001010600x776e7eaeifcef872b029966f6@mail.gmail.com> <4B41CB60.3070103@lonetwin.net> Message-ID: <3e3294b71001040740j48d9276as8e3eb9e13533acd1@mail.gmail.com> On Mon, Jan 4, 2010 at 6:05 AM, steve wrote: > On 01/01/2010 07:30 PM, sudhakar s wrote: >> >> Hi friends... >> Happy New Year.... >> >> How to upload a photo from python into MySQL r any database... >> please suggest me.. > > a. kill the python > b. retrieve the photo from the python's stomach > c. scan the photo, this will automatically save the photo in a database (the > name of the database varies across systems, on my system this database is > called ext4). It's d?j? vu all over again. http://mail.python.org/pipermail/bangpypers/2009-October/002871.html From abhilash.pin2 at gmail.com Mon Jan 4 17:28:08 2010 From: abhilash.pin2 at gmail.com (=?UTF-8?B?YcOfbOC5gM6vbM6xc2zguYA=?=) Date: Mon, 4 Jan 2010 21:58:08 +0530 Subject: [BangPypers] Execute Windows "shutdown" command through python ! In-Reply-To: <9963e56e0912291042ld7740d5n19880900279cc669@mail.gmail.com> References: <3e3294b70912290654u65741ac8h4319f8f3cef7d766@mail.gmail.com> <3e3294b70912291007s6ed9a082i4f39560b3470b6e5@mail.gmail.com> <45ec909c0912291032y485d6570l1f0ba550669d7ee7@mail.gmail.com> <9963e56e0912291042ld7740d5n19880900279cc669@mail.gmail.com> Message-ID: Hi Pradeep, Yuvi, Noufal, The issue got solved, by installing 64 bit python . Thanks guys for all your support. On Wed, Dec 30, 2009 at 12:12 AM, Noufal Ibrahim wrote: > Wouldn't it make more sense for you to use the exposed windows API using > the > Python win32 module rather than calling an external program via os.popen? I > googled a little and found > http://msdn.microsoft.com/en-us/library/aa376868(VS.85).aspxwhich should be > callable. I also found > > http://mail.python.org/pipermail/python-win32/2008-December/008474.htmlwhich > mentions that setting the appropriate privileges is a pain and > recommends using another module which is linked to. > > > > -- > ~noufal > http://nibrahim.net.in > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- a?l??l?sl? From yuvipanda at gmail.com Tue Jan 5 20:50:31 2010 From: yuvipanda at gmail.com (Yuvi Panda) Date: Wed, 6 Jan 2010 01:20:31 +0530 Subject: [BangPypers] Execute Windows "shutdown" command through python ! In-Reply-To: References: <3e3294b70912290654u65741ac8h4319f8f3cef7d766@mail.gmail.com> <3e3294b70912291007s6ed9a082i4f39560b3470b6e5@mail.gmail.com> <45ec909c0912291032y485d6570l1f0ba550669d7ee7@mail.gmail.com> <9963e56e0912291042ld7740d5n19880900279cc669@mail.gmail.com> Message-ID: <45ec909c1001051150gaeb82edvddabbe62af3d13a7@mail.gmail.com> @abilash: Did you look at the links Naufal sent across? They seem (to me) more portable than requiring 64-bit python on all 64-bit environments. On Mon, Jan 4, 2010 at 9:58 PM, a?l??l?sl? wrote: > Hi Pradeep, Yuvi, Noufal, > The issue got solved, by installing 64 bit python . Thanks guys for all > your support. > > > > On Wed, Dec 30, 2009 at 12:12 AM, Noufal Ibrahim wrote: > > > Wouldn't it make more sense for you to use the exposed windows API using > > the > > Python win32 module rather than calling an external program via os.popen? > I > > googled a little and found > > http://msdn.microsoft.com/en-us/library/aa376868(VS.85).aspx > which > should be > > callable. I also found > > > > > http://mail.python.org/pipermail/python-win32/2008-December/008474.htmlwhich > > mentions that setting the appropriate privileges is a pain and > > recommends using another module which is linked to. > > > > > > > > -- > > ~noufal > > http://nibrahim.net.in > > _______________________________________________ > > BangPypers mailing list > > BangPypers at python.org > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > > -- > a?l??l?sl? > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- Yuvi Panda T http://yuvi.in/blog From abhilash.pin2 at gmail.com Wed Jan 6 13:31:18 2010 From: abhilash.pin2 at gmail.com (=?UTF-8?B?YcOfbOC5gM6vbM6xc2zguYA=?=) Date: Wed, 6 Jan 2010 18:01:18 +0530 Subject: [BangPypers] Execute Windows "shutdown" command through python ! In-Reply-To: <45ec909c1001051150gaeb82edvddabbe62af3d13a7@mail.gmail.com> References: <3e3294b70912290654u65741ac8h4319f8f3cef7d766@mail.gmail.com> <3e3294b70912291007s6ed9a082i4f39560b3470b6e5@mail.gmail.com> <45ec909c0912291032y485d6570l1f0ba550669d7ee7@mail.gmail.com> <9963e56e0912291042ld7740d5n19880900279cc669@mail.gmail.com> <45ec909c1001051150gaeb82edvddabbe62af3d13a7@mail.gmail.com> Message-ID: Yuvi... Yes I did check what Naufal has given, But I dn't have so much knowledge of API & its usage... Can you help me regarding python API ... Please suggest me how to go about... On Wed, Jan 6, 2010 at 1:20 AM, Yuvi Panda wrote: > @abilash: Did you look at the links Naufal sent across? They seem (to me) > more portable than requiring 64-bit python on all 64-bit environments. > > On Mon, Jan 4, 2010 at 9:58 PM, a?l??l?sl? > wrote: > > > Hi Pradeep, Yuvi, Noufal, > > The issue got solved, by installing 64 bit python . Thanks guys for > all > > your support. > > > > > > > > On Wed, Dec 30, 2009 at 12:12 AM, Noufal Ibrahim > wrote: > > > > > Wouldn't it make more sense for you to use the exposed windows API > using > > > the > > > Python win32 module rather than calling an external program via > os.popen? > > I > > > googled a little and found > > > http://msdn.microsoft.com/en-us/library/aa376868(VS.85).aspx > > > which > > should be > > > callable. I also found > > > > > > > > > http://mail.python.org/pipermail/python-win32/2008-December/008474.htmlwhich > > > mentions that setting the appropriate privileges is a pain and > > > recommends using another module which is linked to. > > > > > > > > > > > > -- > > > ~noufal > > > http://nibrahim.net.in > > > _______________________________________________ > > > BangPypers mailing list > > > BangPypers at python.org > > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > > > > > > > -- > > a?l??l?sl? > > _______________________________________________ > > BangPypers mailing list > > BangPypers at python.org > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > > -- > Yuvi Panda T > http://yuvi.in/blog > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- a?l??l?sl? From lawgon at au-kbc.org Thu Jan 7 05:04:08 2010 From: lawgon at au-kbc.org (Kenneth Gonsalves) Date: Thu, 7 Jan 2010 09:34:08 +0530 Subject: [BangPypers] [COMMERCIAL] NRC-FOSS certification is now open for candidate registration Message-ID: <201001070934.08480.lawgon@au-kbc.org> hi, registration for candidates is now open for the NRC-FOSS certification: http://certificate.nrcfoss.au-kbc.org.in/reportfull/3/ -- regards Kenneth Gonsalves Senior Project Officer NRC-FOSS http://nrcfosshelpline.in/web/ From noufal at gmail.com Thu Jan 7 07:01:09 2010 From: noufal at gmail.com (Noufal Ibrahim) Date: Thu, 7 Jan 2010 11:31:09 +0530 Subject: [BangPypers] Unladen Swallow for Py3k Message-ID: <9963e56e1001062201m625452aalad3785564c0f1ed5@mail.gmail.com> Details here http://jessenoller.com/2010/01/06/unladen-swallow-python-3s-best-feature/ -- ~noufal http://nibrahim.net.in From ardsrk at gmail.com Thu Jan 7 07:53:47 2010 From: ardsrk at gmail.com (Arvind Jamuna Dixit) Date: Thu, 7 Jan 2010 12:23:47 +0530 Subject: [BangPypers] Unladen Swallow for Py3k In-Reply-To: <9963e56e1001062201m625452aalad3785564c0f1ed5@mail.gmail.com> References: <9963e56e1001062201m625452aalad3785564c0f1ed5@mail.gmail.com> Message-ID: <3d62196a1001062253o69f8c416x25e575fee345c857@mail.gmail.com> This is news to me. Wish I had enough time to dabble in these initiatives. On Thu, Jan 7, 2010 at 11:31 AM, Noufal Ibrahim wrote: > Details here > http://jessenoller.com/2010/01/06/unladen-swallow-python-3s-best-feature/ > > -- > ~noufal > http://nibrahim.net.in > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- Regards, Arvind From abpillai at gmail.com Thu Jan 7 08:00:05 2010 From: abpillai at gmail.com (Anand Balachandran Pillai) Date: Thu, 7 Jan 2010 12:30:05 +0530 Subject: [BangPypers] Unladen Swallow for Py3k In-Reply-To: <9963e56e1001062201m625452aalad3785564c0f1ed5@mail.gmail.com> References: <9963e56e1001062201m625452aalad3785564c0f1ed5@mail.gmail.com> Message-ID: <8548c5f31001062300t126a421h3983afa30d053165@mail.gmail.com> On Thu, Jan 7, 2010 at 11:31 AM, Noufal Ibrahim wrote: > Details here > http://jessenoller.com/2010/01/06/unladen-swallow-python-3s-best-feature/ > > Interesting to read about that merge back to py3k. Never read any related posts in pydev yet. I wonder if Guido is ok with this. Looks like Python is being swallowed by Google folks. Maybe this is a required shot-in-the-arm, to have a few funded devs to inject mojo into Python, but in the long term, I am not so sure about how it affects its status as a true "free" language. > -- > ~noufal > http://nibrahim.net.in > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- --Anand From noufal at gmail.com Thu Jan 7 08:10:37 2010 From: noufal at gmail.com (Noufal Ibrahim) Date: Thu, 7 Jan 2010 12:40:37 +0530 Subject: [BangPypers] Unladen Swallow for Py3k In-Reply-To: <8548c5f31001062300t126a421h3983afa30d053165@mail.gmail.com> References: <9963e56e1001062201m625452aalad3785564c0f1ed5@mail.gmail.com> <8548c5f31001062300t126a421h3983afa30d053165@mail.gmail.com> Message-ID: <9963e56e1001062310o5a3f8659l6e9f727509b95276@mail.gmail.com> On Thu, Jan 7, 2010 at 12:30 PM, Anand Balachandran Pillai < abpillai at gmail.com> wrote: > On Thu, Jan 7, 2010 at 11:31 AM, Noufal Ibrahim wrote: > > > Details here > > > http://jessenoller.com/2010/01/06/unladen-swallow-python-3s-best-feature/ > > > > > Interesting to read about that merge back to py3k. Never read > any related posts in pydev yet. I wonder if Guido is ok with this. > > Looks like Python is being swallowed by Google folks. Maybe > this is a required shot-in-the-arm, to have a few funded devs > to inject mojo into Python, but in the long term, I am not > so sure about how it affects its status as a true "free" > language. > Can you elaborate a little about the "free" part? Do you expect the Google to treat Python like Sun treated Java in the early days? -- ~noufal http://nibrahim.net.in From orsenthil at gmail.com Thu Jan 7 08:10:33 2010 From: orsenthil at gmail.com (Senthil Kumaran) Date: Thu, 7 Jan 2010 12:40:33 +0530 Subject: [BangPypers] Unladen Swallow for Py3k In-Reply-To: <8548c5f31001062300t126a421h3983afa30d053165@mail.gmail.com> References: <9963e56e1001062201m625452aalad3785564c0f1ed5@mail.gmail.com> <8548c5f31001062300t126a421h3983afa30d053165@mail.gmail.com> Message-ID: <20100107071033.GA4162@ubuntu.ubuntu-domain> On Thu, Jan 07, 2010 at 12:30:05PM +0530, Anand Balachandran Pillai wrote: > > > Interesting to read about that merge back to py3k. Never read > any related posts in pydev yet. I wonder if Guido is ok with this. The same sentiment here. Except for this post from Jesse Noller (which seems more of promotional and interesting), I had not come across in python-dev or IRC or any PEP discussions either. I guess it is early info, but nevertheless possible one. It might a take a lot of discussions at python-dev tough. No thoughts on Google's influence. It just does not matter as long as it follows the same process. -- Senthil A method of solution is perfect if we can forsee from the start, and even prove, that following that method we shall attain our aim. -- Leibnitz From srinivas_thatiparthy at akebonosoft.com Thu Jan 7 08:05:17 2010 From: srinivas_thatiparthy at akebonosoft.com (Srinivas Reddy Thatiparthy) Date: Thu, 7 Jan 2010 12:35:17 +0530 Subject: [BangPypers] Unladen Swallow for Py3k In-Reply-To: <9963e56e1001062310o5a3f8659l6e9f727509b95276@mail.gmail.com> Message-ID: <4EF2BF691B890546B2694C99A2852F0C01D017DD@astserver3.akebonosoft.com> >>>Can you elaborate a little about the "free" part? >>>Do you expect the Google to treat Python like Sun treated Java in the early days? +1 for this question. I am very much eager to hear from AB. Regards, Srini T -- ~noufal http://nibrahim.net.in _______________________________________________ BangPypers mailing list BangPypers at python.org http://mail.python.org/mailman/listinfo/bangpypers From noufal at gmail.com Thu Jan 7 08:14:54 2010 From: noufal at gmail.com (Noufal Ibrahim) Date: Thu, 7 Jan 2010 12:44:54 +0530 Subject: [BangPypers] Unladen Swallow for Py3k In-Reply-To: <20100107071033.GA4162@ubuntu.ubuntu-domain> References: <9963e56e1001062201m625452aalad3785564c0f1ed5@mail.gmail.com> <8548c5f31001062300t126a421h3983afa30d053165@mail.gmail.com> <20100107071033.GA4162@ubuntu.ubuntu-domain> Message-ID: <9963e56e1001062314s1cf5c448xa465617c15d7f7de@mail.gmail.com> On Thu, Jan 7, 2010 at 12:40 PM, Senthil Kumaran wrote: > On Thu, Jan 07, 2010 at 12:30:05PM +0530, Anand Balachandran Pillai wrote: > > > > > Interesting to read about that merge back to py3k. Never read > > any related posts in pydev yet. I wonder if Guido is ok with this. > > The same sentiment here. Except for this post from Jesse Noller (which > seems more of promotional and interesting), I had not come across in > python-dev or IRC or any PEP discussions either. > Guido is +1 for it looks like http://twitter.com/gvanrossum/status/7464557748 Also, related HN discussion http://news.ycombinator.com/item?id=1036395 Let's wait for the PEP. -- ~noufal http://nibrahim.net.in From abpillai at gmail.com Thu Jan 7 08:19:07 2010 From: abpillai at gmail.com (Anand Balachandran Pillai) Date: Thu, 7 Jan 2010 12:49:07 +0530 Subject: [BangPypers] Unladen Swallow for Py3k In-Reply-To: <9963e56e1001062310o5a3f8659l6e9f727509b95276@mail.gmail.com> References: <9963e56e1001062201m625452aalad3785564c0f1ed5@mail.gmail.com> <8548c5f31001062300t126a421h3983afa30d053165@mail.gmail.com> <9963e56e1001062310o5a3f8659l6e9f727509b95276@mail.gmail.com> Message-ID: <8548c5f31001062319y659b51fdj274a5e040f23638d@mail.gmail.com> On Thu, Jan 7, 2010 at 12:40 PM, Noufal Ibrahim wrote: > On Thu, Jan 7, 2010 at 12:30 PM, Anand Balachandran Pillai < > abpillai at gmail.com> wrote: > > > On Thu, Jan 7, 2010 at 11:31 AM, Noufal Ibrahim > wrote: > > > > > Details here > > > > > > http://jessenoller.com/2010/01/06/unladen-swallow-python-3s-best-feature/ > > > > > > > > Interesting to read about that merge back to py3k. Never read > > any related posts in pydev yet. I wonder if Guido is ok with this. > > > > Looks like Python is being swallowed by Google folks. Maybe > > this is a required shot-in-the-arm, to have a few funded devs > > to inject mojo into Python, but in the long term, I am not > > so sure about how it affects its status as a true "free" > > language. > > > > > Can you elaborate a little about the "free" part? > > Do you expect the Google to treat Python like Sun treated Java in the early > days? > Well, not really, since the comparison is not correct. Java started its life as a proprietary baby conceived inside Sun and got opened up later. What I am more worried is that if Google produces a CPython implementation on *nix which is say 50-100 times faster than the main CPython implementation for most common operations, then with Google's influence and muscle, wouldn't this become the choice of many high end users and not the regular CPython ? That won't bode well for the future of Python as a true "free" language - free as in the sense of 90% of the work not coming from a corporate entity here. Technically it is still free since they have to keep the license compatibility, but implementation-wise, it is Google-Python. In short I am worried about a major "fork" in Python. There is not much chance of all these patches getting merged to CPython mainline. First of all I don't think they should approach LLVM as a panacea to fix all Python VM ills - which they seem to be doing. It would be better if we see an experimental branch of CPython branched from py3k trunk to which many of the more experimental and incompatible bytecode changes go from Unladen Swallow. But as I pointed out earlier, I am a lurker in pydev and have not seen any such discussion yet. > > > -- > ~noufal > http://nibrahim.net.in > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- --Anand From harish.mallipeddi at gmail.com Thu Jan 7 08:19:48 2010 From: harish.mallipeddi at gmail.com (Harish Mallipeddi) Date: Thu, 7 Jan 2010 12:49:48 +0530 Subject: [BangPypers] Unladen Swallow for Py3k In-Reply-To: <8548c5f31001062300t126a421h3983afa30d053165@mail.gmail.com> References: <9963e56e1001062201m625452aalad3785564c0f1ed5@mail.gmail.com> <8548c5f31001062300t126a421h3983afa30d053165@mail.gmail.com> Message-ID: On Thu, Jan 7, 2010 at 12:30 PM, Anand Balachandran Pillai < abpillai at gmail.com> wrote: > On Thu, Jan 7, 2010 at 11:31 AM, Noufal Ibrahim wrote: > > > Details here > > > http://jessenoller.com/2010/01/06/unladen-swallow-python-3s-best-feature/ > > > > > Interesting to read about that merge back to py3k. Never read > any related posts in pydev yet. I wonder if Guido is ok with this. > > Looks like Python is being swallowed by Google folks. Maybe > this is a required shot-in-the-arm, to have a few funded devs > to inject mojo into Python, but in the long term, I am not > so sure about how it affects its status as a true "free" > language. > > > Guido said "Sounds Good To Me" on twitter http://twitter.com/gvanrossum/status/7464557748 -- Harish Mallipeddi http://blog.poundbang.in From noufal at gmail.com Thu Jan 7 08:26:53 2010 From: noufal at gmail.com (Noufal Ibrahim) Date: Thu, 7 Jan 2010 12:56:53 +0530 Subject: [BangPypers] Unladen Swallow for Py3k In-Reply-To: <8548c5f31001062319y659b51fdj274a5e040f23638d@mail.gmail.com> References: <9963e56e1001062201m625452aalad3785564c0f1ed5@mail.gmail.com> <8548c5f31001062300t126a421h3983afa30d053165@mail.gmail.com> <9963e56e1001062310o5a3f8659l6e9f727509b95276@mail.gmail.com> <8548c5f31001062319y659b51fdj274a5e040f23638d@mail.gmail.com> Message-ID: <9963e56e1001062326s23ccbc2ah50698ab474302f72@mail.gmail.com> On Thu, Jan 7, 2010 at 12:49 PM, Anand Balachandran Pillai < abpillai at gmail.com> wrote: > [..] > > What I am more worried is that if Google produces a CPython > implementation on *nix which is say 50-100 times faster than > the main CPython implementation for most common operations, > then with Google's influence and muscle, wouldn't this become > the choice of many high end users and not the regular CPython ? > That won't bode well for the future of Python as a true "free" > language - free as in the sense of 90% of the work not coming > from a corporate entity here. Technically it is still free since they > have to keep the license compatibility, but implementation-wise, > it is Google-Python. In short I am worried about a major "fork" > in Python. > I personally considered unladen-swallow a fork (although they claim on their site that it's a branch rather than a fork). Also, given the fact that they're enhancing a version of Python (2.x) which the official guys are trying to move people off, it was a problem. With this announcement though (which as of now looks like vapourware), Py3k will have performance benefits as well. That would be an extra reason to move. > > There is not much chance of all these patches getting merged > to CPython mainline. First of all I don't think they should approach > LLVM as a panacea to fix all Python VM ills - which they seem to be > doing. > Given the size of project, you're probably right but atleast there seems to be a nascent plan to do that. > > It would be better if we see an experimental branch of CPython > branched from py3k trunk to which many of the more experimental > and incompatible bytecode changes go from Unladen Swallow. But > as I pointed out earlier, I am a lurker in pydev and have not seen any > such discussion yet. > This is what Unladen swallow has done but with two differences 0. They branched 2.x rather than 3 1. They have completely separate repo and project site (which makes it like IronPython or Jython rather than a branch of CPython itself). The current announcement seems to be a unifying one and that's a good sign. Whether it will happen is a different question. -- ~noufal http://nibrahim.net.in From leela.vadlamudi at gmail.com Thu Jan 7 09:14:59 2010 From: leela.vadlamudi at gmail.com (leela vadlamudi) Date: Thu, 7 Jan 2010 13:44:59 +0530 Subject: [BangPypers] python id function Message-ID: <959452bf1001070014y11939a5dq6b87a83ab2577c59@mail.gmail.com> Hi, Python docs says that id function returns the unique id for an object. >>> id(10) 165936452 >>> a=10 >>> id(a) 165936452 >>> b = int(10) >>> id(b) 165936452 >>> x = tuple() >>> y=tuple() >>> id(x) -1208311764 >>> id(y) -1208311764 >>> l = list() >>> m = list() >>> id(l) -1210839956 >>> id(m) -1210839700 >From the above example, id(mutable_object) returns different ids, but id(immutable_object) return always the same id. If I try to create new immutable object, It is just returning the existed object instead of creating new. How does it internally manages to return the same object? Why it is not creating new object if it is immutable? What about this below case? >>> id((1,)) -1208770004 >>> id((1,)) -1208770004 >>> a=(1,) >>> id(a) -1208745460 >>> id((1,)) -1208759028 Why is id changes here even if it is a tuple(immutable). From abpillai at gmail.com Thu Jan 7 09:46:08 2010 From: abpillai at gmail.com (Anand Balachandran Pillai) Date: Thu, 7 Jan 2010 14:16:08 +0530 Subject: [BangPypers] python id function In-Reply-To: <959452bf1001070014y11939a5dq6b87a83ab2577c59@mail.gmail.com> References: <959452bf1001070014y11939a5dq6b87a83ab2577c59@mail.gmail.com> Message-ID: <8548c5f31001070046p77e0eaf6gcae1917db28e2c03@mail.gmail.com> On Thu, Jan 7, 2010 at 1:44 PM, leela vadlamudi wrote: > Hi, > > Python docs says that id function returns the unique id for an object. > > >>> id(10) > 165936452 > >>> a=10 > >>> id(a) > 165936452 > >>> b = int(10) > >>> id(b) > 165936452 > > >>> x = tuple() > >>> y=tuple() > >>> id(x) > -1208311764 > >>> id(y) > -1208311764 > > >>> l = list() > >>> m = list() > >>> id(l) > -1210839956 > >>> id(m) > -1210839700 > > >From the above example, id(mutable_object) returns different ids, but > id(immutable_object) return always the same id. If I try to create new > immutable object, It is just returning the existed object instead of > creating new. How does it internally manages to return the same object? > Why > it is not creating new object if it is immutable? > Python caches immutable objects - which is why they are immutable and saves memory if u reference the same immutable in many places. So small integers, empty tuples and such are actually cached in Python runtime, so you keep getting back the same object and hence the same id. A few examples (as above). >>> id(()) 140641378807888 >>> id(()) 140641378807888 >>> id(x) 140641378807888 >>> id(1) 15611384 >>> x=1 >>> id(x) 15611384 >>> y=1 >>> id(y) 15611384 >>> x=99 >>> id(x) 15613016 >>> y=99 >>> id(y) 15613016 >>> x=100 >>> id(x) 15612992 But this is only valid till a limit. For egs, >>> x=500 >>> y=500 >>> id(x) 16843192 >>> id(y) 16843240 It is a good exercise to find out the limit till Python caches integers. My guess is that it is somewhere close to 100, i.e 100+. Lists are mutable, hence you get different objects when you create different lists with same contents. > > What about this below case? > > >>> id((1,)) > -1208770004 > >>> id((1,)) > -1208770004 > >>> a=(1,) > >>> id(a) > -1208745460 > >>> id((1,)) > -1208759028 > > Why is id changes here even if it is a tuple(immutable). > >>> id((1,)) 16398480 >>> a=(1,) >>> id(a) 16398480 So far so good... But, >>> id((1,)) 16398608 The id of ((1,)) changes after it is bound to a variable. Not sure why this happens. However this doesn't mean that Python caches *all* tuples in memory. As I said caching is done only for integers upto a limit and for "trivial" immutables like the empty () etc. Not for *all* immutables. For egs. >>> x=(1,5,7) >>> y=(1,5,7) >>> x==y True >>> x is y False >>> id(x) 16384960 >>> id(y) 16384400 Strings are much better cached in Python than tuples. >>> x='python' >>> y='python' >>> id(x) 140641378993328 >>> id(y) 140641378993328 If you create two strings containing same value one after another, they are cached most of the time... >>> y='12345678910987654321' >>> x='12345678910987654321' >>> id(x) 16398640 >>> id(y) 16398640 --Anand _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- --Anand From abpillai at gmail.com Thu Jan 7 09:50:33 2010 From: abpillai at gmail.com (Anand Balachandran Pillai) Date: Thu, 7 Jan 2010 14:20:33 +0530 Subject: [BangPypers] python id function In-Reply-To: <8548c5f31001070046p77e0eaf6gcae1917db28e2c03@mail.gmail.com> References: <959452bf1001070014y11939a5dq6b87a83ab2577c59@mail.gmail.com> <8548c5f31001070046p77e0eaf6gcae1917db28e2c03@mail.gmail.com> Message-ID: <8548c5f31001070050j53e76927lf74661d100909859@mail.gmail.com> On Thu, Jan 7, 2010 at 2:16 PM, Anand Balachandran Pillai < abpillai at gmail.com> wrote: > > > Python caches immutable objects - which is why they are immutable > Should correct myself here - this means that *all* immutables are cached. I did not mean that - what I meant that *only* immutables are cached. So read it as "Python caches some immutable objects" and skip the "which is..." part. :) > and saves memory if u reference the same immutable in many > places. So small integers, empty tuples and such are actually > cached in Python runtime, so you keep getting back the same object > and hence the same id. > > A few examples (as above). > > > From abpillai at gmail.com Thu Jan 7 10:15:44 2010 From: abpillai at gmail.com (Anand Balachandran Pillai) Date: Thu, 7 Jan 2010 14:45:44 +0530 Subject: [BangPypers] python id function In-Reply-To: <8548c5f31001070046p77e0eaf6gcae1917db28e2c03@mail.gmail.com> References: <959452bf1001070014y11939a5dq6b87a83ab2577c59@mail.gmail.com> <8548c5f31001070046p77e0eaf6gcae1917db28e2c03@mail.gmail.com> Message-ID: <8548c5f31001070115v393fb981ld4b51e2e148152e5@mail.gmail.com> On Thu, Jan 7, 2010 at 2:16 PM, Anand Balachandran Pillai < abpillai at gmail.com> wrote: > > > > > It is a good exercise to find out the limit till Python caches > integers. My guess is that it is somewhere close to 100, i.e > 100+. > I wrote a small program to find this out. And on my Python runtime (2.6.2), the answer is 257. def intCacheLimit(): i,l,m=1,range(500),range(500) while i<500: x=l[i] y=m[i] if x is not y: print 'Limit',x break i+=1 [anand at localhost python]$ python Python 2.6.2 (r262:71600, Aug 21 2009, 12:23:57) [GCC 4.4.1 20090818 (Red Hat 4.4.1-6)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from intlimit import * Limit 257 So Python caches integers till 256 - a nice square integer. Cool right ? Others can try it out in other Python versions - my guess would be it is the same everywhere. > > > -- --Anand From anandology at gmail.com Thu Jan 7 13:28:32 2010 From: anandology at gmail.com (Anand Chitipothu) Date: Thu, 7 Jan 2010 17:58:32 +0530 Subject: [BangPypers] python id function In-Reply-To: <959452bf1001070014y11939a5dq6b87a83ab2577c59@mail.gmail.com> References: <959452bf1001070014y11939a5dq6b87a83ab2577c59@mail.gmail.com> Message-ID: <41139fcb1001070428x5a85f9e9wf938ba10ab976eb6@mail.gmail.com> On Thu, Jan 7, 2010 at 1:44 PM, leela vadlamudi wrote: > Hi, > > Python docs says that id function returns the unique id for an object. > >>>> id(10) > 165936452 >>>> a=10 >>>> id(a) > 165936452 >>>> b = int(10) >>>> id(b) > 165936452 > >>>> x = tuple() >>>> y=tuple() >>>> id(x) > -1208311764 >>>> id(y) > -1208311764 > >>>> l = list() >>>> m = list() >>>> id(l) > -1210839956 >>>> id(m) > -1210839700 > > >From the above example, id(mutable_object) returns different ids, but > id(immutable_object) return always the same id. If I try to create new > immutable object, It is just returning the existed object instead of > creating new. How does it internally manages to return the same object? ?Why > it is not creating new object if it is immutable? > > What about this below case? > >>>> id((1,)) > -1208770004 >>>> id((1,)) > -1208770004 >>>> a=(1,) >>>> id(a) > -1208745460 >>>> id((1,)) > -1208759028 > > Why is id changes here even if it is a tuple(immutable) Most of the times id function returns the memory location used by that object. In most of your examples, the tuple was getting allocated again at the same location. >>> id((1, 2, 3)) 601544 >>> id((1, 2, 3)) 601544 >>> id((1, 2, 33)) 601544 >>> id((1, 2, 42)) 601544 Notice that it is returning the same id even if the contents of tuple are different. Same thing works for lists too. Immutability doesn't really matter. >>> id([1, 2, 3]) 601584 >>> id([1, 2, 3]) 601584 >>> id([1, 2, 3]) 601584 >>> id([1, 2, 33]) 601584 >>> id([1, 2, 42]) 601584 But try allocating some between these calls and the id changes. >>> id((1, 2, 3)) 601544 >>> a = (1, 2, 3) >>> id((1, 2, 3)) 628096 >>> >>> id([1, 2, 3]) 601584 >>> x = [1, 2, 3] >>> id([1, 2, 3]) 598544 Anand From leela.vadlamudi at gmail.com Thu Jan 7 14:04:06 2010 From: leela.vadlamudi at gmail.com (leela vadlamudi) Date: Thu, 7 Jan 2010 18:34:06 +0530 Subject: [BangPypers] python id function In-Reply-To: <41139fcb1001070428x5a85f9e9wf938ba10ab976eb6@mail.gmail.com> References: <959452bf1001070014y11939a5dq6b87a83ab2577c59@mail.gmail.com> <41139fcb1001070428x5a85f9e9wf938ba10ab976eb6@mail.gmail.com> Message-ID: <959452bf1001070504i2b5dedc9i87a1fbd1aacbeb32@mail.gmail.com> On Thu, Jan 7, 2010 at 5:58 PM, Anand Chitipothu wrote: > On Thu, Jan 7, 2010 at 1:44 PM, leela vadlamudi > wrote: > > Hi, > > > > Python docs says that id function returns the unique id for an object. > > > >>>> id(10) > > 165936452 > >>>> a=10 > >>>> id(a) > > 165936452 > >>>> b = int(10) > >>>> id(b) > > 165936452 > > > >>>> x = tuple() > >>>> y=tuple() > >>>> id(x) > > -1208311764 > >>>> id(y) > > -1208311764 > > > >>>> l = list() > >>>> m = list() > >>>> id(l) > > -1210839956 > >>>> id(m) > > -1210839700 > > > > >From the above example, id(mutable_object) returns different ids, but > > id(immutable_object) return always the same id. If I try to create new > > immutable object, It is just returning the existed object instead of > > creating new. How does it internally manages to return the same object? > Why > > it is not creating new object if it is immutable? > > > > What about this below case? > > > >>>> id((1,)) > > -1208770004 > >>>> id((1,)) > > -1208770004 > >>>> a=(1,) > >>>> id(a) > > -1208745460 > >>>> id((1,)) > > -1208759028 > > > > Why is id changes here even if it is a tuple(immutable) > > Most of the times id function returns the memory location used by that > object. In most of your examples, the tuple was getting allocated > again at the same location. > > >>> id((1, 2, 3)) > 601544 > >>> id((1, 2, 3)) > 601544 > >>> id((1, 2, 33)) > 601544 > >>> id((1, 2, 42)) > 601544 > > Notice that it is returning the same id even if the contents of tuple > are different. Same thing works for lists too. Immutability doesn't > really matter. > > Looks like immutability matters ... >>> a = [() for i in range(4)] >>> for i in a: ... print id(i) ... -1208311764 -1208311764 -1208311764 -1208311764 >>> b = [[] for i in range(4)] >>> for i in b: ... print id(i) ... -1208446612 -1208446516 -1208446644 -1208446196 >>> It is not creating multiple tuple objects, giving the same id to all tuples. But It's not same with lists. > >>> id([1, 2, 3]) > 601584 > >>> id([1, 2, 3]) > 601584 > >>> id([1, 2, 3]) > 601584 > >>> id([1, 2, 33]) > 601584 > >>> id([1, 2, 42]) > 601584 > > But try allocating some between these calls and the id changes. > > >>> id((1, 2, 3)) > 601544 > >>> a = (1, 2, 3) > >>> id((1, 2, 3)) > 628096 > >>> > >>> id([1, 2, 3]) > 601584 > >>> x = [1, 2, 3] > >>> id([1, 2, 3]) > 598544 > From praveen.python.plone at gmail.com Thu Jan 7 14:05:09 2010 From: praveen.python.plone at gmail.com (Praveen Kumar) Date: Thu, 7 Jan 2010 18:35:09 +0530 Subject: [BangPypers] python id function In-Reply-To: <41139fcb1001070428x5a85f9e9wf938ba10ab976eb6@mail.gmail.com> References: <959452bf1001070014y11939a5dq6b87a83ab2577c59@mail.gmail.com> <41139fcb1001070428x5a85f9e9wf938ba10ab976eb6@mail.gmail.com> Message-ID: <6305ec601001070505u473e242id11a577d298dfedb@mail.gmail.com> An immutable object is an object whose state cannot be modified after it is created. This is in contrast to a mutable object, which can be modified after it is created As you said >>If I try to create new immutable object, It is just returning the existed object instead of creating new ( *that is not exactly to create new immutable object* if you want to create new immutable object A new object has to be created if a different value has to be stored) so in your case x=tuple() and y=tuple() has the same value. Objects whose value can change are said to be mutable; objects whose value is unchangeable once they are created are called immutable An object can be either entirely immutable or some attributes in the object may be declared immutable; for example, using the const member data attribute in the C++ programming language. In some cases, an object is considered immutable even if some internally used attributes change but the object's state appears to be unchanging from an external point of view I tested some of stuff ( i divided in left hand side[contains same id] and right hand side[different id] ) *>>> id(10) 14046508 >>> a=10 // assigning the same value >>> id(a) 14046508* In Python everything is an object so integer is an object. The limits now are set by the amount of memory you have in your computer. If you want to store 5,000 digits long, go ahead. Typing it or reading it will be the only problem! How does Python do all of this? It automatically manages the integer object, which is initially set to 32 bits for speed. If it exceeds 32 bits, then Python increases its size as needed up to the RAM limit >>> l=[1,2,3] >>> id(l) 14645248 >>> m=[1,2,3] >>> id(m) 14656216 >>> msg="hi" >>> id(msg) 14647680 >>> he="hello" >>> id(he) 14648032 >>> again="again" >>> id(again) 14647968 >>> t=(1,2,3) >>> id(t) 14646208 >>> m=(1,2,3) >>> id(m) 14645408 >>> c=[]; >>> d=[]; >>> id(c) 14646088 >>> id(d) 14646128 *>>> c=d=[] >>> id(c) 14656176 >>> id(d) 14656176 msg="hi" >>> id(msg) 14647712 >>> id(msg.strip('i')) 14647680 >>> id(msg) 14647712* The method strip() will not change the data "hi" thats contains. Instead, a new String object is instantiated and given the data "h" during its construction. A reference to this String object is returned by the strip() method. To make the String msg contain the data "h", a different approach is needed. Thanks On Thu, Jan 7, 2010 at 5:58 PM, Anand Chitipothu wrote: > On Thu, Jan 7, 2010 at 1:44 PM, leela vadlamudi > wrote: > > Hi, > > > > Python docs says that id function returns the unique id for an object. > > > >>>> id(10) > > 165936452 > >>>> a=10 > >>>> id(a) > > 165936452 > >>>> b = int(10) > >>>> id(b) > > 165936452 > > > >>>> x = tuple() > >>>> y=tuple() > >>>> id(x) > > -1208311764 > >>>> id(y) > > -1208311764 > > > >>>> l = list() > >>>> m = list() > >>>> id(l) > > -1210839956 > >>>> id(m) > > -1210839700 > > > > >From the above example, id(mutable_object) returns different ids, but > > id(immutable_object) return always the same id. If I try to create new > > immutable object, It is just returning the existed object instead of > > creating new. How does it internally manages to return the same object? > Why > > it is not creating new object if it is immutable? > > > > What about this below case? > > > >>>> id((1,)) > > -1208770004 > >>>> id((1,)) > > -1208770004 > >>>> a=(1,) > >>>> id(a) > > -1208745460 > >>>> id((1,)) > > -1208759028 > > > > Why is id changes here even if it is a tuple(immutable) > > Most of the times id function returns the memory location used by that > object. In most of your examples, the tuple was getting allocated > again at the same location. > > >>> id((1, 2, 3)) > 601544 > >>> id((1, 2, 3)) > 601544 > >>> id((1, 2, 33)) > 601544 > >>> id((1, 2, 42)) > 601544 > > Notice that it is returning the same id even if the contents of tuple > are different. Same thing works for lists too. Immutability doesn't > really matter. > > >>> id([1, 2, 3]) > 601584 > >>> id([1, 2, 3]) > 601584 > >>> id([1, 2, 3]) > 601584 > >>> id([1, 2, 33]) > 601584 > >>> id([1, 2, 42]) > 601584 > > But try allocating some between these calls and the id changes. > > >>> id((1, 2, 3)) > 601544 > >>> a = (1, 2, 3) > >>> id((1, 2, 3)) > 628096 > >>> > >>> id([1, 2, 3]) > 601584 > >>> x = [1, 2, 3] > >>> id([1, 2, 3]) > 598544 > > Anand > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- Praveen Kumar +91 9620621342 http://praveensunsetpoint.wordpress.com Bangalore From praveen.python.plone at gmail.com Thu Jan 7 14:05:40 2010 From: praveen.python.plone at gmail.com (Praveen Kumar) Date: Thu, 7 Jan 2010 18:35:40 +0530 Subject: [BangPypers] python id function In-Reply-To: <8548c5f31001070115v393fb981ld4b51e2e148152e5@mail.gmail.com> References: <959452bf1001070014y11939a5dq6b87a83ab2577c59@mail.gmail.com> <8548c5f31001070046p77e0eaf6gcae1917db28e2c03@mail.gmail.com> <8548c5f31001070115v393fb981ld4b51e2e148152e5@mail.gmail.com> Message-ID: <6305ec601001070505o30becbfco3692a165b86d1001@mail.gmail.com> An immutable object is an object whose state cannot be modified after it is created. This is in contrast to a mutable object, which can be modified after it is created As you said >>If I try to create new immutable object, It is just returning the existed object instead of creating new ( *that is not exactly to create new immutable object* if you want to create new immutable object A new object has to be created if a different value has to be stored) so in your case x=tuple() and y=tuple() has the same value. Objects whose value can change are said to be mutable; objects whose value is unchangeable once they are created are called immutable An object can be either entirely immutable or some attributes in the object may be declared immutable; for example, using the const member data attribute in the C++ programming language. In some cases, an object is considered immutable even if some internally used attributes change but the object's state appears to be unchanging from an external point of view I tested some of stuff ( i divided in left hand side[contains same id] and right hand side[different id] ) *>>> id(10) 14046508 >>> a=10 // assigning the same value >>> id(a) 14046508* In Python everything is an object so integer is an object. The limits now are set by the amount of memory you have in your computer. If you want to store 5,000 digits long, go ahead. Typing it or reading it will be the only problem! How does Python do all of this? It automatically manages the integer object, which is initially set to 32 bits for speed. If it exceeds 32 bits, then Python increases its size as needed up to the RAM limit >>> l=[1,2,3] >>> id(l) 14645248 >>> m=[1,2,3] >>> id(m) 14656216 >>> msg="hi" >>> id(msg) 14647680 >>> he="hello" >>> id(he) 14648032 >>> again="again" >>> id(again) 14647968 >>> t=(1,2,3) >>> id(t) 14646208 >>> m=(1,2,3) >>> id(m) 14645408 >>> c=[]; >>> d=[]; >>> id(c) 14646088 >>> id(d) 14646128 *>>> c=d=[] >>> id(c) 14656176 >>> id(d) 14656176 msg="hi" >>> id(msg) 14647712 >>> id(msg.strip('i')) 14647680 >>> id(msg) 14647712* The method strip() will not change the data "hi" thats contains. Instead, a new String object is instantiated and given the data "h" during its construction. A reference to this String object is returned by the strip() method. To make the String msg contain the data "h", a different approach is needed. Thanks On Thu, Jan 7, 2010 at 2:45 PM, Anand Balachandran Pillai < abpillai at gmail.com> wrote: > On Thu, Jan 7, 2010 at 2:16 PM, Anand Balachandran Pillai < > abpillai at gmail.com> wrote: > > > > > > > > > > > It is a good exercise to find out the limit till Python caches > > integers. My guess is that it is somewhere close to 100, i.e > > 100+. > > > > I wrote a small program to find this out. And > on my Python runtime (2.6.2), the answer is 257. > > def intCacheLimit(): > i,l,m=1,range(500),range(500) > > while i<500: > x=l[i] > y=m[i] > if x is not y: > print 'Limit',x > break > > i+=1 > > [anand at localhost python]$ python > Python 2.6.2 (r262:71600, Aug 21 2009, 12:23:57) > [GCC 4.4.1 20090818 (Red Hat 4.4.1-6)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from intlimit import * > Limit 257 > > So Python caches integers till 256 - a nice square integer. > Cool right ? > > Others can try it out in other Python versions - my guess > would be it is the same everywhere. > > > > > > > > > > > -- > --Anand > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- Praveen Kumar +91 9620621342 http://praveensunsetpoint.wordpress.com Bangalore From abpillai at gmail.com Sun Jan 10 08:05:04 2010 From: abpillai at gmail.com (Anand Balachandran Pillai) Date: Sun, 10 Jan 2010 12:35:04 +0530 Subject: [BangPypers] Unladen Swallow for Py3k In-Reply-To: <9963e56e1001062326s23ccbc2ah50698ab474302f72@mail.gmail.com> References: <9963e56e1001062201m625452aalad3785564c0f1ed5@mail.gmail.com> <8548c5f31001062300t126a421h3983afa30d053165@mail.gmail.com> <9963e56e1001062310o5a3f8659l6e9f727509b95276@mail.gmail.com> <8548c5f31001062319y659b51fdj274a5e040f23638d@mail.gmail.com> <9963e56e1001062326s23ccbc2ah50698ab474302f72@mail.gmail.com> Message-ID: <8548c5f31001092305g222a9a3bq77f4c6efbf388a9a@mail.gmail.com> Btw, the following wiki page lists the upstream patches from Unladen-swallow. http://code.google.com/p/unladen-swallow/wiki/UpstreamPatches -- --Anand From prasanna at tachyontech.net Mon Jan 11 08:12:02 2010 From: prasanna at tachyontech.net (Prasanna R) Date: Mon, 11 Jan 2010 12:42:02 +0530 Subject: [BangPypers] [Jobs] Python Programmers with 2-3 years experience Message-ID: Hi there, Greetings! We are looking for Python Programmers with 2-3 years of experience. Candidates should possess good analytical and programming skills. About us: Tachyon is a product and high technology services company, working in the areas of machine learning, data-mining, pattern-recognition, rich web applications, mobile applications and high performance engineering. Launched in 2006, Tachyon?s Quillpad product has created revolution in the transliteration space. With customers like Rediff, Indiatimes, LG, etc, Tachyon is looking to expand. Regards Prasanna Raja J From smrutilekha at gmail.com Wed Jan 13 09:45:39 2010 From: smrutilekha at gmail.com (Smrutilekha Swain) Date: Wed, 13 Jan 2010 14:15:39 +0530 Subject: [BangPypers] Hi....... Message-ID: i am doing a programme in which i have to copy a file from one directory to another....i have used "shutil.copy(src,dest)"...but it is showing error i.e., permission denied...as file is in 'w' mode...so plzzzzzz tell me what to do......... thanks in advance. smruti From steve at lonetwin.net Wed Jan 13 10:15:45 2010 From: steve at lonetwin.net (steve) Date: Wed, 13 Jan 2010 14:45:45 +0530 Subject: [BangPypers] Hi....... In-Reply-To: References: Message-ID: <4B4D8F41.4010506@lonetwin.net> Hi, On 01/13/2010 02:15 PM, Smrutilekha Swain wrote: > i am doing a programme in which i have to copy a file from one directory to > another....i have used "shutil.copy(src,dest)"...but it is showing error > i.e., permission denied...as file is in 'w' mode...so plzzzzzz tell me what > to do......... Are you sure the permission denied is because the file is opened in 'w' mode ? >>> l = open('foo', 'w') >>> shutil.copy('bar', 'foo') >>> It is quite likely that you do not have sufficient privileges to write to the target directory. For instance ... >>> shutil.copy('foo', '/') Traceback (most recent call last): File "", line 1, in File "/usr/lib64/python2.6/shutil.py", line 88, in copy copyfile(src, dst) File "/usr/lib64/python2.6/shutil.py", line 53, in copyfile fdst = open(dst, 'wb') IOError: [Errno 13] Permission denied: '/foo' >>> Make sure that normal copy (using the cp command on the shell/command prompt) works before trying out shutil.copy. If that works but shutil.copy() doesn't, could you place the entire traceback here ? cheers, - steve -- random non tech spiel: http://lonetwin.blogspot.com/ tech randomness: http://lonehacks.blogspot.com/ what i'm stumbling into: http://lonetwin.stumbleupon.com/ From vsapre80 at gmail.com Wed Jan 13 10:21:54 2010 From: vsapre80 at gmail.com (Vishal) Date: Wed, 13 Jan 2010 14:51:54 +0530 Subject: [BangPypers] Tuples vs Lists, perfromance difference In-Reply-To: <41139fcb0912240322r79ba900di86607e84422a18db@mail.gmail.com> References: <9963e56e0912220742x44e0f982kb0d6d057e11f21c@mail.gmail.com> <20091223153319.GA4089@ubuntu.ubuntu-domain> <6e38f9f00912232114u279b6e6ald0e54199ab5bbe93@mail.gmail.com> <41139fcb0912240310o11c6f94elea9d3513a23eb345@mail.gmail.com> <41139fcb0912240322r79ba900di86607e84422a18db@mail.gmail.com> Message-ID: > > > Here is more real example. > > >>> def square(x): y = x*x; return y > ... > >>> import dis > >>> dis.dis(square) > 1 0 LOAD_FAST 0 (x) > 3 LOAD_FAST 0 (x) > 6 BINARY_MULTIPLY > 7 STORE_FAST 1 (y) > 10 LOAD_FAST 1 (y) > 13 RETURN_VALUE > > As you see the interpreter is pretty stupid. It is loading x twice and > unnecessarily storing and loading y. > > Anand > _______________________________________________ > > Is interpreter too stupid or is the python compiler that creates the bytecoded file, too simple and ignoring optimizations on the bytecode it creates. I think its the later? please correct me -- 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? "Happiness keeps u Sweet, Trials keep u Strong, Sorrow keeps u Human, Failure Keeps u Humble, Success keeps u Glowing, But only God Keeps u Going.....Keep Going....." From vsapre80 at gmail.com Wed Jan 13 10:26:09 2010 From: vsapre80 at gmail.com (Vishal) Date: Wed, 13 Jan 2010 14:56:09 +0530 Subject: [BangPypers] Python and USB Message-ID: Hi, I am looking for a way to create a python library that talks to some usb devices (such as usb-i2c cards etc). There is a requirement that the python library should be usable directly under windows and linux withough requiring the user to worry about her platform. Any pointers? I did find a couple, PyUsb on sourceforge, and another PyUSB that deals only with FTDI USB devices... Has anybody used these? Any other suggestions? Thanks and best regards, Vishal Sapre From abpillai at gmail.com Wed Jan 13 10:31:47 2010 From: abpillai at gmail.com (Anand Balachandran Pillai) Date: Wed, 13 Jan 2010 15:01:47 +0530 Subject: [BangPypers] Python and USB In-Reply-To: References: Message-ID: <8548c5f31001130131q1cbf33fdg1cfdbd8aefe747a9@mail.gmail.com> On Wed, Jan 13, 2010 at 2:56 PM, Vishal wrote: > Hi, > > I am looking for a way to create a python library that talks to some usb > devices (such as usb-i2c cards etc). There is a requirement that the python > library should be usable directly under windows and linux withough > requiring > the user to worry about her platform. > > Any pointers? > > I did find a couple, PyUsb on sourceforge, and another PyUSB that deals > only > with FTDI USB devices... > > Has anybody used these? > No, doesn't pyserial work ? Anyway USB is a serial bus... > > Any other suggestions? > > Thanks and best regards, > Vishal Sapre > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- --Anand From steve at lonetwin.net Wed Jan 13 10:37:38 2010 From: steve at lonetwin.net (steve) Date: Wed, 13 Jan 2010 15:07:38 +0530 Subject: [BangPypers] Python and USB In-Reply-To: <8548c5f31001130131q1cbf33fdg1cfdbd8aefe747a9@mail.gmail.com> References: <8548c5f31001130131q1cbf33fdg1cfdbd8aefe747a9@mail.gmail.com> Message-ID: <4B4D9462.8070709@lonetwin.net> On 01/13/2010 03:01 PM, Anand Balachandran Pillai wrote: > On Wed, Jan 13, 2010 at 2:56 PM, Vishal wrote: > >> Hi, >> >> I am looking for a way to create a python library that talks to some usb >> devices (such as usb-i2c cards etc). There is a requirement that the python >> library should be usable directly under windows and linux withough >> requiring >> the user to worry about her platform. >> >> Any pointers? >> >> I did find a couple, PyUsb on sourceforge, and another PyUSB that deals >> only >> with FTDI USB devices... >> >> Has anybody used these? >> > > No, doesn't pyserial work ? Anyway USB is a serial bus... > heh, yeah, USB is a serial bus just like ethernet is serial communication. cheers, - steve -- random non tech spiel: http://lonetwin.blogspot.com/ tech randomness: http://lonehacks.blogspot.com/ what i'm stumbling into: http://lonetwin.stumbleupon.com/ From vsapre80 at gmail.com Wed Jan 13 10:39:25 2010 From: vsapre80 at gmail.com (Vishal) Date: Wed, 13 Jan 2010 15:09:25 +0530 Subject: [BangPypers] Python and USB In-Reply-To: <8548c5f31001130131q1cbf33fdg1cfdbd8aefe747a9@mail.gmail.com> References: <8548c5f31001130131q1cbf33fdg1cfdbd8aefe747a9@mail.gmail.com> Message-ID: On Wed, Jan 13, 2010 at 3:01 PM, Anand Balachandran Pillai < abpillai at gmail.com> wrote: > On Wed, Jan 13, 2010 at 2:56 PM, Vishal wrote: > > > Hi, > > > > I am looking for a way to create a python library that talks to some usb > > devices (such as usb-i2c cards etc). There is a requirement that the > python > > library should be usable directly under windows and linux withough > > requiring > > the user to worry about her platform. > > > > Any pointers? > > > > I did find a couple, PyUsb on sourceforge, and another PyUSB that deals > > only > > with FTDI USB devices... > > > > Has anybody used these? > > > > * No, doesn't pyserial work ? Anyway USB is a serial bus...* > > > > > > Any other suggestions? > > > > Thanks and best regards, > > Vishal Sapre > > > > --Anand > > I have used pyserial only for original serial interfaces, and I think pyserial looks for a COM entry matching the entries in the windows device manager list. USB does not show up there... but I'll check again... -- 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? "Happiness keeps u Sweet, Trials keep u Strong, Sorrow keeps u Human, Failure Keeps u Humble, Success keeps u Glowing, But only God Keeps u Going.....Keep Going....." From abpillai at gmail.com Wed Jan 13 10:43:21 2010 From: abpillai at gmail.com (Anand Balachandran Pillai) Date: Wed, 13 Jan 2010 15:13:21 +0530 Subject: [BangPypers] Python and USB In-Reply-To: References: <8548c5f31001130131q1cbf33fdg1cfdbd8aefe747a9@mail.gmail.com> Message-ID: <8548c5f31001130143v5253e6c4v86a20baa3e58edd5@mail.gmail.com> On Wed, Jan 13, 2010 at 3:09 PM, Vishal wrote: > On Wed, Jan 13, 2010 at 3:01 PM, Anand Balachandran Pillai < > abpillai at gmail.com> wrote: > > > On Wed, Jan 13, 2010 at 2:56 PM, Vishal wrote: > > > > > Hi, > > > > > > I am looking for a way to create a python library that talks to some > usb > > > devices (such as usb-i2c cards etc). There is a requirement that the > > python > > > library should be usable directly under windows and linux withough > > > requiring > > > the user to worry about her platform. > > > > > > Any pointers? > > > > > > I did find a couple, PyUsb on sourceforge, and another PyUSB that deals > > > only > > > with FTDI USB devices... > > > > > > Has anybody used these? > > > > > > > * No, doesn't pyserial work ? Anyway USB is a serial bus...* > > > > > > > > > > Any other suggestions? > > > > > > Thanks and best regards, > > > Vishal Sapre > > > > > > > --Anand > > > > > I have used pyserial only for original serial interfaces, and I think > pyserial looks for a COM entry matching the entries in the windows device > manager list. USB does not show up there... > > but I'll check again... > If you are on Win$, this might help you. http://www.python-forum.org/pythonforum/viewtopic.php?f=18&t=906 > > > -- > Thanks and best regards, > Vishal Sapre > > -- > -- --Anand From vsapre80 at gmail.com Wed Jan 13 11:09:40 2010 From: vsapre80 at gmail.com (Vishal) Date: Wed, 13 Jan 2010 15:39:40 +0530 Subject: [BangPypers] Python and USB In-Reply-To: <8548c5f31001130143v5253e6c4v86a20baa3e58edd5@mail.gmail.com> References: <8548c5f31001130131q1cbf33fdg1cfdbd8aefe747a9@mail.gmail.com> <8548c5f31001130143v5253e6c4v86a20baa3e58edd5@mail.gmail.com> Message-ID: On Wed, Jan 13, 2010 at 3:13 PM, Anand Balachandran Pillai < abpillai at gmail.com> wrote: > On Wed, Jan 13, 2010 at 3:09 PM, Vishal wrote: > > > On Wed, Jan 13, 2010 at 3:01 PM, Anand Balachandran Pillai < > > abpillai at gmail.com> wrote: > > > > > On Wed, Jan 13, 2010 at 2:56 PM, Vishal wrote: > > > > > > > Hi, > > > > > > > > I am looking for a way to create a python library that talks to some > > usb > > > > devices (such as usb-i2c cards etc). There is a requirement that the > > > python > > > > library should be usable directly under windows and linux withough > > > > requiring > > > > the user to worry about her platform. > > > > > > > > Any pointers? > > > > > > > > I did find a couple, PyUsb on sourceforge, and another PyUSB that > deals > > > > only > > > > with FTDI USB devices... > > > > > > > > Has anybody used these? > > > > > > > > > > * No, doesn't pyserial work ? Anyway USB is a serial bus...* > > > > > > > > > > > > > > Any other suggestions? > > > > > > > > Thanks and best regards, > > > > Vishal Sapre > > > > > > > > > > --Anand > > > > > > > > I have used pyserial only for original serial interfaces, and I think > > pyserial looks for a COM entry matching the entries in the windows device > > manager list. USB does not show up there... > > > > but I'll check again... > > > > If you are on Win$, this might help you. > > http://www.python-forum.org/pythonforum/viewtopic.php?f=18&t=906 > > --Anand > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > Thanks for the link :) its mentioning an interesting behavior :) -- 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? "Happiness keeps u Sweet, Trials keep u Strong, Sorrow keeps u Human, Failure Keeps u Humble, Success keeps u Glowing, But only God Keeps u Going.....Keep Going....." From anirudh.asokan at gmail.com Wed Jan 13 18:08:26 2010 From: anirudh.asokan at gmail.com (Anirudh Asokan) Date: Wed, 13 Jan 2010 09:08:26 -0800 Subject: [BangPypers] Power management/consumption control module In-Reply-To: <85f0a3231001130905u3839aa9bye6918a55e9699a42@mail.gmail.com> References: <85f0a3231001130905u3839aa9bye6918a55e9699a42@mail.gmail.com> Message-ID: <85f0a3231001130908r80c1dc4vd377ee9a0a2a2b01@mail.gmail.com> Hey ter! Is there any python module that collects the power consumption details of computer components? or bios related things like fan speed, cpu frequency, overall power consumption of computer? If not python, what are other ways to go about it? Waiting eagerly for your answers (will be checking mails throughout the day for this), Anirudh Asokan From lists.amitsaha at gmail.com Wed Jan 13 19:30:48 2010 From: lists.amitsaha at gmail.com (Amit Saha) Date: Thu, 14 Jan 2010 00:00:48 +0530 Subject: [BangPypers] Power management/consumption control module In-Reply-To: <85f0a3231001130908r80c1dc4vd377ee9a0a2a2b01@mail.gmail.com> References: <85f0a3231001130905u3839aa9bye6918a55e9699a42@mail.gmail.com> <85f0a3231001130908r80c1dc4vd377ee9a0a2a2b01@mail.gmail.com> Message-ID: <4B4E1158.1060901@gmail.com> Hello: Anirudh Asokan wrote: > Hey ter! > > Is there any python module that collects the power consumption details of > computer components? or bios related things like fan speed, cpu frequency, > overall power consumption of computer? > If not python, what are other ways to go about it? Not sure about pure Python way. There are obvious OS specific ways to do it. For eg. on Linux, you have the 'acpi' family of commands for power related statistics, the file /proc/cpuinfo for the CPU related stats and so on. HTH, Amit -- Journal: http://amitksaha.wordpress.com ?-blog: http://twitter.com/amitsaha IRC: cornucopic on #scheme, #lisp, #math, #linux From xask.linus at gmail.com Wed Jan 13 20:59:30 2010 From: xask.linus at gmail.com (Deepak Mishra) Date: Thu, 14 Jan 2010 01:29:30 +0530 Subject: [BangPypers] Power management/consumption control module In-Reply-To: <4B4E1158.1060901@gmail.com> References: <85f0a3231001130905u3839aa9bye6918a55e9699a42@mail.gmail.com> <85f0a3231001130908r80c1dc4vd377ee9a0a2a2b01@mail.gmail.com> <4B4E1158.1060901@gmail.com> Message-ID: <3722a3331001131159y5002fc23n23536993fa786a@mail.gmail.com> Hello, Amit is right, there should not be any cross platform way to do that because python itself does not have any such modules. Third party libraries will have to depend on the OS specific implementation. For eg in Linux open ("/proc/acpi/thermal_zone/TZ01/temperature").readline() should read the temperature in python .. These statistics are collected by a lot of desklets some of which are written in python, you can browse through them. Some body posted python code for Conky ( a system monitor) specifically for power consumtion http://crunchbanglinux.org/pastebin/246 You can reuse that, but the Conky code itself is written in C Regards, Deepak Mishra Eat, Drink and Sleep with Pythons From anirudh.asokan at gmail.com Thu Jan 14 12:34:31 2010 From: anirudh.asokan at gmail.com (Anirudh Asokan) Date: Thu, 14 Jan 2010 17:04:31 +0530 Subject: [BangPypers] Power management/consumption control module In-Reply-To: <85f0a3231001140332q59cdba78u6dfb4bff9c4b3c2a@mail.gmail.com> References: <85f0a3231001140332q59cdba78u6dfb4bff9c4b3c2a@mail.gmail.com> Message-ID: <85f0a3231001140334s7b188b0es1466bb89f89615f8@mail.gmail.com> so what we are basically saying is that there is no way one can interact/read with APCI using python??????? -- Cheers, Anirudh Asokan www.anirudh.ind.in From noufal at gmail.com Thu Jan 14 12:52:53 2010 From: noufal at gmail.com (Noufal Ibrahim) Date: Thu, 14 Jan 2010 17:22:53 +0530 Subject: [BangPypers] Power management/consumption control module In-Reply-To: <85f0a3231001140334s7b188b0es1466bb89f89615f8@mail.gmail.com> References: <85f0a3231001140332q59cdba78u6dfb4bff9c4b3c2a@mail.gmail.com> <85f0a3231001140334s7b188b0es1466bb89f89615f8@mail.gmail.com> Message-ID: <9963e56e1001140352l6cad3668od1a6f4500ff5677a@mail.gmail.com> On Thu, Jan 14, 2010 at 5:04 PM, Anirudh Asokan wrote: > so what we are basically saying is that there is no way one can > interact/read with APCI using python??????? > I don't recollect anyone saying that in the thread so far. Try http://tinyurl.com/yl58568 -- ~noufal http://nibrahim.net.in From eknath.iyer at gmail.com Fri Jan 15 07:31:56 2010 From: eknath.iyer at gmail.com (Eknath Venkataramani) Date: Fri, 15 Jan 2010 01:31:56 -0500 Subject: [BangPypers] How should I do it? Message-ID: <692c428f1001142231n55703044nabe46eeae7e8fabb@mail.gmail.com> I have a txt file in the following format: [code] "confident" => { count => 4, trans => { "ashahvasahta" => 0.74918568, "atahmavaishahvaasa" => 0.09095465, "pahraaram\.nbha" => 0.06990729, "mailatae" => 0.02856427, "utanai" => 0.01929341, "anaa" => 0.01578552, "uthaanae" => 0.01403157, "jaitanae" => 0.01227762, }, }, "consumers" => { count => 4, trans => { "upabhaokahtaa" => 0.75144362, "upabhaokahtaaom\.n" => 0.12980166, "sauda\?\?\?dha" => 0.11875471, }, }, "a" => { count => 1164, trans => { "eka" => 0.14900491, "kaisai" => 0.08834675, "haai" => 0.06774697, "kaoi" => 0.05394308, "kai" => 0.04981982, "\(none\)" => 0.04400085, "kaa" => 0.03726579, "kae" => 0.03446450, }, }, [/code] and I need to extract "confident" , "ashahvasahta" from the first record, "consumers", "upabhaokahtaa" from the second record... i.e. "word in english" and the "first word in the probable-translations" Thanks is advance Eknath From dhananjay.nene at gmail.com Fri Jan 15 08:34:13 2010 From: dhananjay.nene at gmail.com (Dhananjay Nene) Date: Fri, 15 Jan 2010 13:04:13 +0530 Subject: [BangPypers] How should I do it? In-Reply-To: <692c428f1001142231n55703044nabe46eeae7e8fabb@mail.gmail.com> References: <692c428f1001142231n55703044nabe46eeae7e8fabb@mail.gmail.com> Message-ID: This seems to be an output of print_r of PHP. If you have a flexibility, try to have the PHP code output the data into a language neutral format (eg json, yaml, xml etc.) and then parse it in python using the appropriate parser. If not you may have to write a custom parser. I did google to find if one existed, but couldn't easily locate one. Dhananjay On Fri, Jan 15, 2010 at 12:01 PM, Eknath Venkataramani < eknath.iyer at gmail.com> wrote: > I have a txt file in the following format: > [code] > "confident" => { > count => 4, > trans => { > "ashahvasahta" => 0.74918568, > "atahmavaishahvaasa" => 0.09095465, > "pahraaram\.nbha" => 0.06990729, > "mailatae" => 0.02856427, > "utanai" => 0.01929341, > "anaa" => 0.01578552, > "uthaanae" => 0.01403157, > "jaitanae" => 0.01227762, > }, > }, > "consumers" => { > count => 4, > trans => { > "upabhaokahtaa" => 0.75144362, > "upabhaokahtaaom\.n" => 0.12980166, > "sauda\?\?\?dha" => 0.11875471, > }, > }, > "a" => { > count => 1164, > trans => { > "eka" => 0.14900491, > "kaisai" => 0.08834675, > "haai" => 0.06774697, > "kaoi" => 0.05394308, > "kai" => 0.04981982, > "\(none\)" => 0.04400085, > "kaa" => 0.03726579, > "kae" => 0.03446450, > }, > }, > [/code] > > and I need to extract "confident" , "ashahvasahta" from the first > record, "consumers", "upabhaokahtaa" from the second record... > i.e. "word in english" and the "first word in the probable-translations" > > Thanks is advance > Eknath > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- -------------------------------------------------------- blog: http://blog.dhananjaynene.com twitter: http://twitter.com/dnene http://twitter.com/_pythonic From noufal at gmail.com Fri Jan 15 09:47:16 2010 From: noufal at gmail.com (Noufal Ibrahim) Date: Fri, 15 Jan 2010 14:17:16 +0530 Subject: [BangPypers] How should I do it? In-Reply-To: References: <692c428f1001142231n55703044nabe46eeae7e8fabb@mail.gmail.com> Message-ID: <9963e56e1001150047t78cc086h3488a786a413983f@mail.gmail.com> On Fri, Jan 15, 2010 at 1:04 PM, Dhananjay Nene wrote: > This seems to be an output of print_r of PHP. If you have a flexibility, > try > to have the PHP code output the data into a language neutral format (eg > json, yaml, xml etc.) and then parse it in python using the appropriate > parser. If not you may have to write a custom parser. I did google to find > if one existed, but couldn't easily locate one. > There is http://www.php.net/manual/en/book.json.php for PHP and Python2.6 onwards has json part of the stdlib. If you don't have access to the webserver, you might be able to use the php interpreter on your own machine to parse this into something more language neutral -- ~noufal http://nibrahim.net.in From abpillai at gmail.com Fri Jan 15 10:10:13 2010 From: abpillai at gmail.com (Anand Balachandran Pillai) Date: Fri, 15 Jan 2010 14:40:13 +0530 Subject: [BangPypers] How should I do it? In-Reply-To: <9963e56e1001150047t78cc086h3488a786a413983f@mail.gmail.com> References: <692c428f1001142231n55703044nabe46eeae7e8fabb@mail.gmail.com> <9963e56e1001150047t78cc086h3488a786a413983f@mail.gmail.com> Message-ID: <8548c5f31001150110v199781caye57ce49037135794@mail.gmail.com> On Fri, Jan 15, 2010 at 2:17 PM, Noufal Ibrahim wrote: > On Fri, Jan 15, 2010 at 1:04 PM, Dhananjay Nene >wrote: > > > This seems to be an output of print_r of PHP. If you have a flexibility, > > try > > to have the PHP code output the data into a language neutral format (eg > > json, yaml, xml etc.) and then parse it in python using the appropriate > > parser. If not you may have to write a custom parser. I did google to > find > > if one existed, but couldn't easily locate one. > > > > > There is > http://www.php.net/manual/en/book.json.php for PHP and Python2.6 onwards > has json part of the stdlib. > > If you don't have access to the webserver, you might be able to use the php > interpreter on your own machine to parse this into something more language > neutral > If you take a look at your data, it is surprisingly close to how a nested Python dictionary will look like, except that instead of ':' to separate key from value, it uses '=>', which is what Perl and PHP uses. So, the following solution takes advantage of this fact and converts your data to a Python dictionary. Here is the complete solution. def scrub(data): # First replace [code][/code] parts data = data.replace('[code]','').replace('[/code]','') # Replace '=>' with ':' data = data.replace('=>',':') # Now, count and trans are not strings in # data, so Python will complain, hence we # define these as strings with same name! count, trans = 'count','trans' # Now prefix data with { and post-fix with } data = '{' + data + '}' print data # Eval it to a dictionary mydict = eval(data) print mydict if __name__ == "__main__": scrub(open('data.txt').read()) And it neatly prints as, {'a': {'count': 1164, 'trans': {'kaoi': 0.053943079999999997, 'kaa': 0.03726579, 'haai': 0.067746970000000004, 'kaisai': 0.088346750000000002, 'kae': 0.034464500000000002, 'kai': 0.049819820000000001, 'eka': 0.14900490999999999, '\\(none\\)': 0.044000850000000001}}, 'confident': {'count': 4, 'trans': {'mailatae': 0.028564269999999999, 'ashahvasahta': 0.74918567999999996, 'anaa': 0.015785520000000001, 'jaitanae': 0.01227762, 'pahraaram\\.nbha': 0.069907289999999997, 'utanai': 0.01929341, 'atahmavaishahvaasa': 0.090954649999999998, 'uthaanae': 0.01403157}}, 'consumers': {'count': 4, 'trans': {'sauda\\\xef\xbf\xbd\\\xef\xbf\xbd\\\xef\xbf\xbddha': 0.11875471, 'upabhaokahtaa': 0.75144361999999998, 'upabhaokahtaaom\\.n': 0.12980166000000001}}} Now, use the data as a Python dictionary. It is a clever hack, taking advantage of the nature of the data. But it is far more faster than the other approaches posted here. --Anand > > > -- > ~noufal > http://nibrahim.net.in > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- --Anand From lawgon at thenilgiris.com Fri Jan 15 07:53:12 2010 From: lawgon at thenilgiris.com (Kenneth Gonsalves) Date: Fri, 15 Jan 2010 12:23:12 +0530 Subject: [BangPypers] How should I do it? In-Reply-To: <692c428f1001142231n55703044nabe46eeae7e8fabb@mail.gmail.com> References: <692c428f1001142231n55703044nabe46eeae7e8fabb@mail.gmail.com> Message-ID: <201001151223.12234.lawgon@thenilgiris.com> On Friday 15 Jan 2010 12:01:56 pm Eknath Venkataramani wrote: > and I need to extract "confident" , "ashahvasahta" from the first > record, "consumers", "upabhaokahtaa" from the second record... > i.e. "word in english" and the "first word in the probable-translations" > #!/usr/bin/python words = [{'english':"confident", 'count' : 4, 'trans' : [ ("ashahvasahta" , 0.74918568), ("atahmavaishahvaasa" , 0.09095465), ("pahraaram\.nbha" , 0.06990729), ("mailatae" , 0.02856427), ("utanai" , 0.01929341), ("anaa" , 0.01578552), ("uthaanae" , 0.01403157), ("jaitanae" , 0.01227762), ], }, {'english':"consumers", 'count' : 4, 'trans' : [ ("upabhaokahtaa" , 0.75144362), ("upabhaokahtaaom\.n" , 0.12980166), ] }, { 'english':"a", 'count' : 1164, 'trans' : [ ("eka" , 0.14900491), ("kaisai" , 0.08834675), ("haai" , 0.06774697), ("kaoi" , 0.05394308), ("kai" , 0.04981982), ("\(none\)" , 0.04400085), ("kaa" , 0.03726579), ("kae" , 0.03446450), ], } ] for word in words: print word['english'],word['trans'][0][0] -- regards kg http://lawgon.livejournal.com From rmathews at gmail.com Fri Jan 15 11:20:01 2010 From: rmathews at gmail.com (Roshan Mathews) Date: Fri, 15 Jan 2010 15:50:01 +0530 Subject: [BangPypers] How should I do it? In-Reply-To: <8548c5f31001150110v199781caye57ce49037135794@mail.gmail.com> References: <692c428f1001142231n55703044nabe46eeae7e8fabb@mail.gmail.com> <9963e56e1001150047t78cc086h3488a786a413983f@mail.gmail.com> <8548c5f31001150110v199781caye57ce49037135794@mail.gmail.com> Message-ID: <1c4dc2781001150220w5b626aeg2b93dc9b3bf361d1@mail.gmail.com> On Fri, Jan 15, 2010 at 2:40 PM, Anand Balachandran Pillai wrote: > ? ?# Now, count and trans are not strings in > ? ?# data, so Python will complain, hence we > ? ?# define these as strings with same name! > ? ?count, trans = 'count','trans' > Clever, that. I got to there, threw up my hands and went downstairs to eat lunch. -- rm From b.ghose at gmail.com Fri Jan 15 11:30:49 2010 From: b.ghose at gmail.com (Baishampayan Ghose) Date: Fri, 15 Jan 2010 16:00:49 +0530 Subject: [BangPypers] How should I do it? In-Reply-To: <8548c5f31001150110v199781caye57ce49037135794@mail.gmail.com> References: <692c428f1001142231n55703044nabe46eeae7e8fabb@mail.gmail.com> <9963e56e1001150047t78cc086h3488a786a413983f@mail.gmail.com> <8548c5f31001150110v199781caye57ce49037135794@mail.gmail.com> Message-ID: > It is a clever hack, taking advantage of the nature of the data. But > it is far more faster than the other approaches posted here. I thought eval was evil :) Regards, BG -- Baishampayan Ghose b.ghose at gmail.com From noufal at gmail.com Fri Jan 15 11:33:26 2010 From: noufal at gmail.com (Noufal Ibrahim) Date: Fri, 15 Jan 2010 16:03:26 +0530 Subject: [BangPypers] How should I do it? In-Reply-To: References: <692c428f1001142231n55703044nabe46eeae7e8fabb@mail.gmail.com> <9963e56e1001150047t78cc086h3488a786a413983f@mail.gmail.com> <8548c5f31001150110v199781caye57ce49037135794@mail.gmail.com> Message-ID: <9963e56e1001150233t428d9c0dx96d610afab8ead21@mail.gmail.com> On Fri, Jan 15, 2010 at 4:00 PM, Baishampayan Ghose wrote: > > It is a clever hack, taking advantage of the nature of the data. But > > it is far more faster than the other approaches posted here. > > I thought eval was evil :) > Given that the OPs data is fixed, eval is okay. :) Otherwise, it could be evil or unreliable (eg. => inside some of the data strings etc.) -- ~noufal http://nibrahim.net.in From abpillai at gmail.com Fri Jan 15 11:37:38 2010 From: abpillai at gmail.com (Anand Balachandran Pillai) Date: Fri, 15 Jan 2010 16:07:38 +0530 Subject: [BangPypers] How should I do it? In-Reply-To: <9963e56e1001150233t428d9c0dx96d610afab8ead21@mail.gmail.com> References: <692c428f1001142231n55703044nabe46eeae7e8fabb@mail.gmail.com> <9963e56e1001150047t78cc086h3488a786a413983f@mail.gmail.com> <8548c5f31001150110v199781caye57ce49037135794@mail.gmail.com> <9963e56e1001150233t428d9c0dx96d610afab8ead21@mail.gmail.com> Message-ID: <8548c5f31001150237p6a3977b6lf63d707e96b69909@mail.gmail.com> On Fri, Jan 15, 2010 at 4:03 PM, Noufal Ibrahim wrote: > On Fri, Jan 15, 2010 at 4:00 PM, Baishampayan Ghose >wrote: > > > > It is a clever hack, taking advantage of the nature of the data. But > > > it is far more faster than the other approaches posted here. > > > > I thought eval was evil :) > > > > Given that the OPs data is fixed, eval is okay. :) > > Otherwise, it could be evil or unreliable (eg. => inside some of the data > strings etc.) > My sentiments are the same. As long as you are sure of the safety of your data such as absence of %s etc which could cause security issues, eval is safe. It can often be used for quick short-cuts such as the one above. I started off with a regular expression solution first, but after I observed that the pattern fits a recursive dict, changed tack. Btw "eval" is spelled e-v-a-l, not e-v-i-l :) > > -- > ~noufal > http://nibrahim.net.in > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- --Anand From anandology at gmail.com Fri Jan 15 11:43:40 2010 From: anandology at gmail.com (Anand Chitipothu) Date: Fri, 15 Jan 2010 16:13:40 +0530 Subject: [BangPypers] How should I do it? In-Reply-To: References: <692c428f1001142231n55703044nabe46eeae7e8fabb@mail.gmail.com> <9963e56e1001150047t78cc086h3488a786a413983f@mail.gmail.com> <8548c5f31001150110v199781caye57ce49037135794@mail.gmail.com> Message-ID: <41139fcb1001150243q3b0af50aqe44188c9e6ccf199@mail.gmail.com> On Fri, Jan 15, 2010 at 4:00 PM, Baishampayan Ghose wrote: >> It is a clever hack, taking advantage of the nature of the data. But >> it is far more faster than the other approaches posted here. > > I thought eval was evil :) The date looks like valid json. You can use simplejson.loads instead of eval. Anand From abpillai at gmail.com Fri Jan 15 11:47:05 2010 From: abpillai at gmail.com (Anand Balachandran Pillai) Date: Fri, 15 Jan 2010 16:17:05 +0530 Subject: [BangPypers] How should I do it? In-Reply-To: <41139fcb1001150243q3b0af50aqe44188c9e6ccf199@mail.gmail.com> References: <692c428f1001142231n55703044nabe46eeae7e8fabb@mail.gmail.com> <9963e56e1001150047t78cc086h3488a786a413983f@mail.gmail.com> <8548c5f31001150110v199781caye57ce49037135794@mail.gmail.com> <41139fcb1001150243q3b0af50aqe44188c9e6ccf199@mail.gmail.com> Message-ID: <8548c5f31001150247m576793c4x694f45948b07e3b8@mail.gmail.com> On Fri, Jan 15, 2010 at 4:13 PM, Anand Chitipothu wrote: > On Fri, Jan 15, 2010 at 4:00 PM, Baishampayan Ghose > wrote: > >> It is a clever hack, taking advantage of the nature of the data. But > >> it is far more faster than the other approaches posted here. > > > > I thought eval was evil :) > > The date looks like valid json. You can use simplejson.loads instead of > eval. > > Python 2.6.2 (r262:71600, Aug 21 2009, 12:23:57) [GCC 4.4.1 20090818 (Red Hat 4.4.1-6)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import simplejson >>> data=open('data.txt').read().replace('[code]','').replace('[/code]','') >>> data '\n"confident" => {\n count => 4,\n trans => {\n "ashahvasahta" => 0.74918568,\n "atahmavaishahvaasa" => 0.09095465,\n "pahraaram\\.nbha" => 0.06990729,\n "mailatae" => 0.02856427,\n "utanai" => 0.01929341,\n "anaa" => 0.01578552,\n "uthaanae" => 0.01403157,\n "jaitanae" => 0.01227762,\n },\n},\n"consumers" => {\n count => 4,\n trans => {\n "upabhaokahtaa" => 0.75144362,\n "upabhaokahtaaom\\.n" => 0.12980166,\n "sauda\\\xef\xbf\xbd\\\xef\xbf\xbd\\\xef\xbf\xbddha" => 0.11875471,\n },\n},\n"a" => {\n count => 1164,\n trans => {\n "eka" => 0.14900491,\n "kaisai" => 0.08834675,\n "haai" => 0.06774697,\n "kaoi" => 0.05394308,\n "kai" => 0.04981982,\n "\\(none\\)" => 0.04400085,\n "kaa" => 0.03726579,\n "kae" => 0.03446450,\n },\n},\n\n' >>> simplejson.loads(data) Traceback (most recent call last): File "", line 1, in File "/usr/lib64/python2.6/site-packages/simplejson/__init__.py", line 307, in loads return _default_decoder.decode(s) File "/usr/lib64/python2.6/site-packages/simplejson/decoder.py", line 338, in decode raise ValueError(errmsg("Extra data", s, end, len(s))) ValueError: Extra data: line 2 column 13 - line 37 column 1 (char 13 - 815) Anand > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- --Anand From noufal at gmail.com Fri Jan 15 12:07:58 2010 From: noufal at gmail.com (Noufal Ibrahim) Date: Fri, 15 Jan 2010 16:37:58 +0530 Subject: [BangPypers] How should I do it? In-Reply-To: <41139fcb1001150243q3b0af50aqe44188c9e6ccf199@mail.gmail.com> References: <692c428f1001142231n55703044nabe46eeae7e8fabb@mail.gmail.com> <9963e56e1001150047t78cc086h3488a786a413983f@mail.gmail.com> <8548c5f31001150110v199781caye57ce49037135794@mail.gmail.com> <41139fcb1001150243q3b0af50aqe44188c9e6ccf199@mail.gmail.com> Message-ID: <9963e56e1001150307j2994ff3ej883a71f64c78dcda@mail.gmail.com> On Fri, Jan 15, 2010 at 4:13 PM, Anand Chitipothu wrote: > On Fri, Jan 15, 2010 at 4:00 PM, Baishampayan Ghose > wrote: > >> It is a clever hack, taking advantage of the nature of the data. But > >> it is far more faster than the other approaches posted here. > > > > I thought eval was evil :) > > The date looks like valid json. You can use simplejson.loads instead of > eval. > Don't the '=>' characters mess things up? One of the nice things about the repr of Python objects is that they're almost valid JSON. The same can't be said for PHP though. -- ~noufal http://nibrahim.net.in From vsapre80 at gmail.com Fri Jan 15 12:57:17 2010 From: vsapre80 at gmail.com (Vishal) Date: Fri, 15 Jan 2010 17:27:17 +0530 Subject: [BangPypers] psyco V2 Message-ID: Hi, Came across this post on codespeak. Christian Tismer of Stackless fame as taken up pysco and created a V2 of it...and seems the effort continues... http://codespeak.net/pipermail/pypy-dev/2009q3/005288.html Interesting stuff... Best regards, Vishal Sapre From noufal at gmail.com Fri Jan 15 13:04:02 2010 From: noufal at gmail.com (Noufal Ibrahim) Date: Fri, 15 Jan 2010 17:34:02 +0530 Subject: [BangPypers] psyco V2 In-Reply-To: References: Message-ID: <9963e56e1001150404t11df791dn717b56f9d2c482a@mail.gmail.com> On Fri, Jan 15, 2010 at 5:27 PM, Vishal wrote: > Hi, > > Came across this post on codespeak. > Christian Tismer of Stackless fame as taken up pysco and created a V2 of > it...and seems the effort continues... > > http://codespeak.net/pipermail/pypy-dev/2009q3/005288.html Nice.. Thanks for pointing this out. -- ~noufal http://nibrahim.net.in From dhananjay.nene at gmail.com Sat Jan 16 00:09:13 2010 From: dhananjay.nene at gmail.com (Dhananjay Nene) Date: Sat, 16 Jan 2010 04:39:13 +0530 Subject: [BangPypers] How should I do it? In-Reply-To: <692c428f1001142231n55703044nabe46eeae7e8fabb@mail.gmail.com> References: <692c428f1001142231n55703044nabe46eeae7e8fabb@mail.gmail.com> Message-ID: On Fri, Jan 15, 2010 at 12:01 PM, Eknath Venkataramani < eknath.iyer at gmail.com> wrote: > I have a txt file in the following format: > [code] > "confident" => { > count => 4, > trans => { > "ashahvasahta" => 0.74918568, > "atahmavaishahvaasa" => 0.09095465, > "pahraaram\.nbha" => 0.06990729, > "mailatae" => 0.02856427, > "utanai" => 0.01929341, > "anaa" => 0.01578552, > "uthaanae" => 0.01403157, > "jaitanae" => 0.01227762, > }, > }, > "consumers" => { > count => 4, > trans => { > "upabhaokahtaa" => 0.75144362, > "upabhaokahtaaom\.n" => 0.12980166, > "sauda\?\?\?dha" => 0.11875471, > }, > }, > "a" => { > count => 1164, > trans => { > "eka" => 0.14900491, > "kaisai" => 0.08834675, > "haai" => 0.06774697, > "kaoi" => 0.05394308, > "kai" => 0.04981982, > "\(none\)" => 0.04400085, > "kaa" => 0.03726579, > "kae" => 0.03446450, > }, > }, > [/code] > > and I need to extract "confident" , "ashahvasahta" from the first > record, "consumers", "upabhaokahtaa" from the second record... > i.e. "word in english" and the "first word in the probable-translations" > > Thanks is advance > Eknath > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > Since I hadn't had a chance to write a recursive descent parser, took this opportunity to do a bit of an exercise. I have used a parser called pyparsing. ---------- Begin Code ---------- # coding=utf-8 from pyparsing import * import pprint import sys data = ''' "confident" => { count => 4, trans => { "ashahvasahta" => 0.74918568, "atahmavaishahvaasa" => 0.09095465, "pahraaram\.nbha" => 0.06990729, "mailatae" => 0.02856427, "utanai" => 0.01929341, "anaa" => 0.01578552, "uthaanae" => 0.01403157, "jaitanae" => 0.01227762, }, }, "consumers" => { count => 4, trans => { "upabhaokahtaa" => 0.75144362, "upabhaokahtaaom\.n" => 0.12980166, "sauda\?\?\?dha" => 0.11875471, }, }, "a" => { count => 1164, trans => { "eka" => 0.14900491, "kaisai" => 0.08834675, "haai" => 0.06774697, "kaoi" => 0.05394308, "kai" => 0.04981982, "\(none\)" => 0.04400085, "kaa" => 0.03726579, "kae" => 0.03446450, }, } ''' # Setup pyparsing tokens dct = Forward() pair_op = Literal("=>") comma = Literal(",").suppress() beg_brace = Literal("{").suppress() end_brace = Literal("}").suppress() num = Word("0123456789.") key = (Word(alphas + nums) ^ quotedString).setResultsName("key") val = (num ^ dct).setResultsName("value") key_value_pair = Group(key + pair_op.suppress() + val) key_value_pair_list = delimitedList(key_value_pair) dct << Group(beg_brace + key_value_pair_list + Optional(comma) + end_brace) # parse data parsed = key_value_pair_list.parseString(data) # function to extract ie. form a python datastructure def extract(result): if 'key' in result.keys() : if isinstance(result.value,ParseResults) : return ( result.key, extract(result.value) ) else : return ( result.key, result.value ) else : return(dict(extract(elem) for elem in result)) # extract extracted = extract(parsed) # print extracted data pprint.pprint(extracted, sys.stdout) # print the english word and first translated word print "\n\n============\nTranslations\n============\n" print dict( (english, reduce(lambda x,y : (y[0],float(y[1])) if float(y[1]) > x[1] else x , translations['trans'].items(), ('',0.0))[0] ) for english,translations in extracted.items() ) ---------- End Code ---------- Dhananjay -- -------------------------------------------------------- blog: http://blog.dhananjaynene.com twitter: http://twitter.com/dnene http://twitter.com/_pythonic From shivraj.ms at gmail.com Sat Jan 16 17:51:15 2010 From: shivraj.ms at gmail.com (Shivaraj M S) Date: Sat, 16 Jan 2010 22:21:15 +0530 Subject: [BangPypers] Fwd: Python coders for Haiti disaster relief -Web2Py Message-ID: <2c1c314c1001160851h72c08388s9b1276ec48a82627@mail.gmail.com> ---------- Forwarded message ---------- From: Peter Clarke Date: Sat, Jan 16, 2010 at 8:07 PM Subject: [SciPy-dev] Python coders for Haiti disaster relief To: scipy-dev at scipy.org, scipy-user at scipy.org, numpy-discussion at scipy.org Apologies for off topic posting but I think this in an important project. Python programmers are required immediately for assistance in coding a disaster management framework for the Earthquake in Haiti. >From http://wiki.python.org/moin/VolunteerOpportunities: ----------------- URGENT REQUEST, Sahana Disaster Management System, Haiti Earthquake *Job Description*:This is an urgent call for experienced Python programmers to help in the Sahana Disaster Management System immediately - knowledge of Web2Py platform would be best. The Sahana Disaster Management System is used to coordinate relief efforts. Please recruit any available programmers for the Haiti effort as quickly as possible and have them contact me immediately so that I can put them in touch with the correct people. Thank you kindly and I do hope that we can quickly identify some contributors for this monumental effort - they are needed ASAP. http://sahanapy.org/ is the developer site and the demo is http://demo.sahanapy.org/ - *Contact*: Connie White, PhD, Institute for Emergency Preparedness, Jacksonville State University - *E-mail contact*: connie.m.white at gmail.com - *Web*: http://sahanapy.org/ ----------------------------- Please help if you can. -Peter Clarke _______________________________________________ SciPy-Dev mailing list SciPy-Dev at scipy.org http://mail.scipy.org/mailman/listinfo/scipy-dev -- Regards _______________ Shivaraj From smrutilekha at gmail.com Mon Jan 18 07:07:39 2010 From: smrutilekha at gmail.com (Smrutilekha Swain) Date: Mon, 18 Jan 2010 11:37:39 +0530 Subject: [BangPypers] Plzzz help me!!!!!!!!! Message-ID: hi...this is my code...but...it is not working...in this programme i want the pdf will be copied from source to destination after it is generated.... ############################################## import os import shutil src = os.getcwd() dest = "E:\home\smruti\Python\PostMissionAnalysis\presentation" ################################################################# def file_moved(filename): #filename = 'newfile.pdf' file_list = os.listdir(os.curdir) for eachfile in file_list: if (eachfile == filename): shutil.copy(src,dest) print "The File is moved" ################################################################## preamble = """\\documentclass{beamer} \\usepackage{ifpdf} \\usetheme{Warsaw} %\\usepackage(times) \\title{A Sample Of Beamer} \\author{Smruti} \\date{\\today} \\begin{document} \\begin{frame}[t,plain] \\titlepage \\end{frame} """ newfile = open('newfile.tex','w') newfile.write(preamble) screenshotlist = glob.glob('*.png') newfile.write("""\section{screenshot}""") for figure in screenshotlist: includestring = """\\includegraphics[center]{""" + figure + """}""" newfile.write("""\\begin{frame} \\frametitle{""") newfile.write("""} \\begin{center}""") newfile.write(includestring) newfile.write(""" \\end{center} \\end{frame} """) newfile.write("""\section{document}""") newfile.write("""\end{document}""") #os.read(newfile,1) newfile.close() os.system('pdflatex newfile.tex') pdf_file = open('newfile.pdf', 'r') #pdf_file = 'newfile.pdf' file_moved(pdf_file) pdf_file.close() #################################################################### From lists.amitsaha at gmail.com Mon Jan 18 08:34:34 2010 From: lists.amitsaha at gmail.com (Amit Saha) Date: Mon, 18 Jan 2010 13:04:34 +0530 Subject: [BangPypers] Plzzz help me!!!!!!!!! In-Reply-To: References: Message-ID: <4B540F0A.5080601@gmail.com> Smrutilekha Swain wrote: > hi...this is my code...but...it is not working...in this programme i want > the pdf will be copied from source to destination after it is generated.... > > ############################################## > > import os > import shutil > > src = os.getcwd() > dest = "E:\home\smruti\Python\PostMissionAnalysis\presentation" > > ################################################################# > > def file_moved(filename): > #filename = 'newfile.pdf' > file_list = os.listdir(os.curdir) > for eachfile in file_list: > if (eachfile == filename): > shutil.copy(src,dest) I guess, 'src' needs a filename, right now, its your os.getcwd(). you should probably set it to os.getcwd() + 'filename'. HTH, Amit -- Journal: http://amitksaha.wordpress.com ?-blog: http://twitter.com/amitsaha IRC: cornucopic on #scheme, #lisp, #math, #linux From ramdaz at gmail.com Mon Jan 18 08:38:48 2010 From: ramdaz at gmail.com (Ramdas S) Date: Mon, 18 Jan 2010 13:08:48 +0530 Subject: [BangPypers] Plzzz help me!!!!!!!!! In-Reply-To: <4B540F0A.5080601@gmail.com> References: <4B540F0A.5080601@gmail.com> Message-ID: <6e38f9f01001172338v509b98d3r7cf3bc749db8ce7a@mail.gmail.com> just a suggestion. Use something like dpaste.com instead of pasting the code in the mail -- Ramdas S +91 9342 583 065 From kausikram at gmail.com Mon Jan 18 08:42:12 2010 From: kausikram at gmail.com (kausikram krishnasayee) Date: Mon, 18 Jan 2010 13:12:12 +0530 Subject: [BangPypers] Plzzz help me!!!!!!!!! In-Reply-To: <6e38f9f01001172338v509b98d3r7cf3bc749db8ce7a@mail.gmail.com> References: <4B540F0A.5080601@gmail.com> <6e38f9f01001172338v509b98d3r7cf3bc749db8ce7a@mail.gmail.com> Message-ID: <2597ddb91001172342u121a755an4a18b4a14655b642@mail.gmail.com> On Mon, Jan 18, 2010 at 1:08 PM, Ramdas S wrote: > just a suggestion. Use something like dpaste.com instead of pasting the > code > in the mail Also please post only a snippet and not the entire code. tracebacks will also help. -- Kausikram Krishnasayee Company: http://silverstripesoftware.com | Webpage: kausikram.net | Blog: blog.kausikram.net | Twitter: http://twitter.com/kausikram | Email: kausikram at gmail.com | Mobile: +91 9884246490 From abpillai at gmail.com Mon Jan 18 08:46:15 2010 From: abpillai at gmail.com (Anand Balachandran Pillai) Date: Mon, 18 Jan 2010 13:16:15 +0530 Subject: [BangPypers] Plzzz help me!!!!!!!!! In-Reply-To: References: Message-ID: <8548c5f31001172346q52805fd5wc3e20bf64194b089@mail.gmail.com> On Mon, Jan 18, 2010 at 11:37 AM, Smrutilekha Swain wrote: > hi...this is my code...but...it is not working...in this programme i want > the pdf will be copied from source to destination after it is generated.... > > ############################################## > > import os > import shutil > > src = os.getcwd() > dest = "E:\home\smruti\Python\PostMissionAnalysis\presentation" > > ################################################################# > > def file_moved(filename): > #filename = 'newfile.pdf' > file_list = os.listdir(os.curdir) > for eachfile in file_list: > if (eachfile == filename): > shutil.copy(src,dest) > print "The File is moved" > > ################################################################## > > preamble = """\\documentclass{beamer} > \\usepackage{ifpdf} > \\usetheme{Warsaw} > %\\usepackage(times) > \\title{A Sample Of Beamer} > \\author{Smruti} > \\date{\\today} > > \\begin{document} > > \\begin{frame}[t,plain] > \\titlepage > \\end{frame} > """ > > newfile = open('newfile.tex','w') > newfile.write(preamble) > > > screenshotlist = glob.glob('*.png') > newfile.write("""\section{screenshot}""") > > for figure in screenshotlist: > includestring = """\\includegraphics[center]{""" + figure + """}""" > newfile.write("""\\begin{frame} > \\frametitle{""") > newfile.write("""} > \\begin{center}""") > newfile.write(includestring) > newfile.write(""" > \\end{center} > \\end{frame} > """) > > newfile.write("""\section{document}""") > newfile.write("""\end{document}""") > > #os.read(newfile,1) > newfile.close() > os.system('pdflatex newfile.tex') > pdf_file = open('newfile.pdf', 'r') > #pdf_file = 'newfile.pdf' > file_moved(pdf_file) > pdf_file.close() > I see a problem here. file_moved is expecting a filename, but you are passing it a file object ? Also the file comparision (eachfile == filename) is not good. Not sure what you are trying to do here, if you are trying to compare the data, you should instead say, eachfile_data = open(eachfile, 'r').read() if eachfile_data == filename_data: ... But again, you are not passing file data, but file object to the function. Please re-analyze your logic, and post the new code correcting such obvious errors to somewhere like pastebin.ca and post the URL here. > > #################################################################### > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- --Anand From nagappan at gmail.com Tue Jan 19 05:59:23 2010 From: nagappan at gmail.com (Nagappan Alagappan) Date: Mon, 18 Jan 2010 20:59:23 -0800 Subject: [BangPypers] Announce: Linux Desktop Testing Project (LDTP) 2.0.1 released Message-ID: <9d0602eb1001182059j21472962ya492928e24fa9b44@mail.gmail.com> Hello all, LDTPv2 a complete rewrite of LDTPv1 in Python. This release is dedicated to Eitan Isaacson[1]. Eitan wrote the LDTPv2 framework and important API's in LDTPv2 ! My co-workers in VMware Ranjith Murugan, Gaurav Sharma and Anupa Kamath, did a wonderful job in verifying the compatibility of LDTPv1 and v2. Special thanks to them and my manager Greg McShea on supporting this effort. Special thanks to Ara Pulido[2] for tracking the LDTPv2 status and pushing us to make the release at the earliest, as Ara wants to include LDTPv2 in Ubuntu Lucid, before feature freeze. Following are the difference between LDTPv1 and v2: * getlabel function is deprecated - you can use getobjectproperty('winodw', 'objectname', 'label') # To verify the display text * Label in v2 doesn't return the accelerator key (eg: in v1 "_Find" will be returned on v2 just "Find" is returned) * Strict data types are checked, in v1 most of the inputs are considered as string, if not they will be converted to string, but on v2 exception will be thrown, if incorrect type is passed to any function * In v1 we have ldtp binary, on v2 we need to check ldtpd.sh for now, this doesn't return the version for now, it has to be implemented, if you check for "ldtp --version" in v1 * In v1 each action command was given 1 second sleep time internally before execution, but on v2 there is no delay unless its set in environment variable LDTP_COMMAND_DELAY. So, the script has to use appropriate wait time * As Javier (from Ubuntu QA team) found, launchapp, argument name changed from 'arg' to 'args' Some of missing API in v2: * Calendar object * logFailures in v1 is not implemented in v2 * LDTP logging methods * appundertest * launchapp2 * blackoutregion * label object * panel object * ProcessStatistics LTFX is completely removed in LDTP v2 in favor of wnck implmentation Download LDTPv2 source from http://download.freedesktop.org/ldtp/2.x/2.0.x/ldtp2-2.0.1.tar.gz New dependency: python-twisted-web python-pyatspi python-gtk python-gnome Will schedule binary package building for different Linux distribution using openSUSE Build Service - http://download.opensuse.org/repositories/home:/anagappan:/ldtp2:/ Documentation references: For detailed information on LDTP framework and latest updates visit http://ldtp.freedesktop.org For information on various APIs in LDTP including those added for this release can be got from http://ldtp.freedesktop.org/user-doc/index.html Report bugs - http://ldtp.freedesktop.org/wiki/Bugs To subscribe to LDTP mailing lists, visit http://ldtp.freedesktop.org/wiki/Mailing_20list IRC Channel - #ldtp on irc.freenode.net Thanks Nagappan [1] - http://monotonous.org/ [2] - http://ubuntutesting.wordpress.com/ -- Linux Desktop (GUI Application) Testing Project - http://ldtp.freedesktop.org http://nagappanal.blogspot.com From noufal at gmail.com Tue Jan 19 07:39:57 2010 From: noufal at gmail.com (Noufal Ibrahim) Date: Tue, 19 Jan 2010 12:09:57 +0530 Subject: [BangPypers] January user group meeting Message-ID: <9963e56e1001182239k3b798213q9f631cc446027ae4@mail.gmail.com> Any ideas? Suggestions? Presentations? Sessions? It would be on 23/24th. -- ~noufal http://nibrahim.net.in From mbaiju at zeomega.com Tue Jan 19 08:17:46 2010 From: mbaiju at zeomega.com (Baiju M) Date: Tue, 19 Jan 2010 12:47:46 +0530 Subject: [BangPypers] January user group meeting In-Reply-To: <9963e56e1001182239k3b798213q9f631cc446027ae4@mail.gmail.com> References: <9963e56e1001182239k3b798213q9f631cc446027ae4@mail.gmail.com> Message-ID: On Tue, Jan 19, 2010 at 12:09 PM, Noufal Ibrahim wrote: > Any ideas? Suggestions? Presentations? Sessions? It would be on 23/24th. I am fine with 23rd/24th. I can give a demo about using collective.buildbot for setting up buildbot (Continuous integration server) http://pypi.python.org/pypi/collective.buildbot 15 minutes would be fine. Any other topics ? Regards, Baiju M From nikunjbadjatya at gmail.com Tue Jan 19 08:12:44 2010 From: nikunjbadjatya at gmail.com (nikunj badjatya) Date: Tue, 19 Jan 2010 12:42:44 +0530 Subject: [BangPypers] Contribution to Opensource Message-ID: Hi, I recently joined this mailing list so as to improve my knowledge on Python. Its been 4 months I am using Python. So I decided to contribute to any Open source project. Can you help me on how to proceed on this, Whom to contact etc. Thanks, Nikunj Badjatya BTech Bangalore, India From lists.amitsaha at gmail.com Tue Jan 19 08:34:51 2010 From: lists.amitsaha at gmail.com (Amit Saha) Date: Tue, 19 Jan 2010 13:04:51 +0530 Subject: [BangPypers] Contribution to Opensource In-Reply-To: References: Message-ID: <4B55609B.10002@gmail.com> Hi Nikunj: nikunj badjatya wrote: > Hi, > I recently joined this mailing list so as to improve my knowledge on Python. > Its been 4 months I am using Python. So I decided to contribute to any Open > source project. Can you help me on how to proceed on this, Whom to contact > etc. The project you decide to contribute will depend a lot on your interest. But since you are just starting with Python, I have been involved with a project called "Zeya"- (A music playing server) http://web.psung.name/zeya/. Its written in Python and some Javascript/HTML. The source code is really really easy to follow. If music interests you, you may give it a shot. Please visit the project website and ask questions on the *project's* mailing list (not here). There will be more suggestions, I am sure. At the end of it all, its your interest that matters! Good Luck! -Amit > > Thanks, > > Nikunj Badjatya > BTech > Bangalore, India > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- Journal: http://amitksaha.wordpress.com ?-blog: http://twitter.com/amitsaha IRC: cornucopic on #scheme, #lisp, #math, #linux From noufal at gmail.com Tue Jan 19 08:41:06 2010 From: noufal at gmail.com (Noufal Ibrahim) Date: Tue, 19 Jan 2010 13:11:06 +0530 Subject: [BangPypers] January user group meeting In-Reply-To: References: <9963e56e1001182239k3b798213q9f631cc446027ae4@mail.gmail.com> Message-ID: <9963e56e1001182341j11a81d60qdd3605a8a62b4c2b@mail.gmail.com> On Tue, Jan 19, 2010 at 12:47 PM, Baiju M wrote: > On Tue, Jan 19, 2010 at 12:09 PM, Noufal Ibrahim wrote: > > Any ideas? Suggestions? Presentations? Sessions? It would be on 23/24th. > > I am fine with 23rd/24th. > > I can give a demo about using collective.buildbot for setting > up buildbot (Continuous integration server) > > http://pypi.python.org/pypi/collective.buildbot > > 15 minutes would be fine. > I'm setting up buildbot here at my workplace for CI as well. We're also using py.test and are customising it to run the tests. I can give a short intro on that (although I've played with it only for a few days). -- ~noufal http://nibrahim.net.in From abpillai at gmail.com Tue Jan 19 08:45:29 2010 From: abpillai at gmail.com (Anand Balachandran Pillai) Date: Tue, 19 Jan 2010 13:15:29 +0530 Subject: [BangPypers] Contribution to Opensource In-Reply-To: References: Message-ID: <8548c5f31001182345g2e6c3467pab70539df9a14ba6@mail.gmail.com> On Tue, Jan 19, 2010 at 12:42 PM, nikunj badjatya wrote: > Hi, > I recently joined this mailing list so as to improve my knowledge on > Python. > Its been 4 months I am using Python. So I decided to contribute to any Open > source project. Can you help me on how to proceed on this, Whom to contact > etc. > Open source is like a vast ocean, there is plenty of fish to chose from of different sizes and tastes. Finally it is your choice that matters. However, for a newbie there are a few distinct paths to choose from. 1. Contribute to an existing open source project - This can vary from a single-person run project to a big, co-operative projects. 2. Contribute by writing code snippets or "scripts" - You don't need to contact anyone. Just take some everyday task and try to write a script to solve it. If you feel it is good enough, post to some common repositories such as ASPN Python Cookbook, snippets.dzone.com etc. 3. Start your own project - If you find *nothing* interesting and have the willingness and energy to start your own stuff, go ahead. Find an interesting problem to solve, write original code. Most people start with 1 or 2, but it is your decision at the end. Btw, if you are interested in (1) for pure Python projects try http://wiki.*python*.org/moin/*Volunteer*Opportunities . > > Thanks, > > Nikunj Badjatya > BTech > Bangalore, India > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- --Anand From jeffjosejeff at gmail.com Tue Jan 19 09:03:54 2010 From: jeffjosejeff at gmail.com (Jeffrey Jose) Date: Tue, 19 Jan 2010 13:33:54 +0530 Subject: [BangPypers] January user group meeting In-Reply-To: <9963e56e1001182341j11a81d60qdd3605a8a62b4c2b@mail.gmail.com> References: <9963e56e1001182239k3b798213q9f631cc446027ae4@mail.gmail.com> <9963e56e1001182341j11a81d60qdd3605a8a62b4c2b@mail.gmail.com> Message-ID: Hi all, I recently joined the group. The idea of a user group meeting (every month I assume ?) is very exciting. Can someone tell me where it happens normally ? Thanks! Jeff On Tue, Jan 19, 2010 at 1:11 PM, Noufal Ibrahim wrote: > On Tue, Jan 19, 2010 at 12:47 PM, Baiju M wrote: > > > On Tue, Jan 19, 2010 at 12:09 PM, Noufal Ibrahim > wrote: > > > Any ideas? Suggestions? Presentations? Sessions? It would be on > 23/24th. > > > > I am fine with 23rd/24th. > > > > I can give a demo about using collective.buildbot for setting > > up buildbot (Continuous integration server) > > > > http://pypi.python.org/pypi/collective.buildbot > > > > 15 minutes would be fine. > > > > I'm setting up buildbot here at my workplace for CI as well. We're also > using py.test and are customising it to run the tests. I can give a short > intro on that (although I've played with it only for a few days). > > > -- > ~noufal > http://nibrahim.net.in > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From mbaiju at zeomega.com Tue Jan 19 09:06:14 2010 From: mbaiju at zeomega.com (Baiju M) Date: Tue, 19 Jan 2010 13:36:14 +0530 Subject: [BangPypers] January user group meeting In-Reply-To: References: <9963e56e1001182239k3b798213q9f631cc446027ae4@mail.gmail.com> <9963e56e1001182341j11a81d60qdd3605a8a62b4c2b@mail.gmail.com> Message-ID: On Tue, Jan 19, 2010 at 1:33 PM, Jeffrey Jose wrote: > Hi all, > > I recently joined the group. The idea of a user group meeting (every month I > assume ?) is very exciting. Can someone tell me where it happens normally ? We meet at ThoughtWorks office. -- Baiju M From noufal at gmail.com Tue Jan 19 09:07:06 2010 From: noufal at gmail.com (Noufal Ibrahim) Date: Tue, 19 Jan 2010 13:37:06 +0530 Subject: [BangPypers] January user group meeting In-Reply-To: References: <9963e56e1001182239k3b798213q9f631cc446027ae4@mail.gmail.com> <9963e56e1001182341j11a81d60qdd3605a8a62b4c2b@mail.gmail.com> Message-ID: <9963e56e1001190007o320773e1u955d958c0856976a@mail.gmail.com> On Tue, Jan 19, 2010 at 1:33 PM, Jeffrey Jose wrote: > Hi all, > > I recently joined the group. The idea of a user group meeting (every month > I > assume ?) is very exciting. Can someone tell me where it happens normally ? > [..] Usually, at ThoughtWorks, Diamond District. We're open to suggestions though. -- ~noufal http://nibrahim.net.in From noufal at gmail.com Tue Jan 19 09:07:39 2010 From: noufal at gmail.com (Noufal Ibrahim) Date: Tue, 19 Jan 2010 13:37:39 +0530 Subject: [BangPypers] January user group meeting In-Reply-To: <9963e56e1001190007o320773e1u955d958c0856976a@mail.gmail.com> References: <9963e56e1001182239k3b798213q9f631cc446027ae4@mail.gmail.com> <9963e56e1001182341j11a81d60qdd3605a8a62b4c2b@mail.gmail.com> <9963e56e1001190007o320773e1u955d958c0856976a@mail.gmail.com> Message-ID: <9963e56e1001190007m1a1dff3cn7aff7e8940b028d4@mail.gmail.com> Show of hands please? A couple of +1s and we can do this. -- ~noufal http://nibrahim.net.in From ardsrk at gmail.com Tue Jan 19 09:20:32 2010 From: ardsrk at gmail.com (Arvind Jamuna Dixit) Date: Tue, 19 Jan 2010 13:50:32 +0530 Subject: [BangPypers] January user group meeting In-Reply-To: <9963e56e1001190007m1a1dff3cn7aff7e8940b028d4@mail.gmail.com> References: <9963e56e1001182239k3b798213q9f631cc446027ae4@mail.gmail.com> <9963e56e1001182341j11a81d60qdd3605a8a62b4c2b@mail.gmail.com> <9963e56e1001190007o320773e1u955d958c0856976a@mail.gmail.com> <9963e56e1001190007m1a1dff3cn7aff7e8940b028d4@mail.gmail.com> Message-ID: <3d62196a1001190020h4f93f6b5n1ec387a5bac3f576@mail.gmail.com> +1 from me for Jan 23/24. On Tue, Jan 19, 2010 at 1:37 PM, Noufal Ibrahim wrote: > Show of hands please? A couple of +1s and we can do this. > > -- > ~noufal > http://nibrahim.net.in > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- Regards, Arvind From david.lyon at pythontest.org Tue Jan 19 09:38:07 2010 From: david.lyon at pythontest.org (David Lyon) Date: Tue, 19 Jan 2010 19:38:07 +1100 (EST) Subject: [BangPypers] [Fwd: Contribution to Opensource] In-Reply-To: <45707.115.128.56.78.1263889590.squirrel@syd-srv02.ezyreg.com> References: <45707.115.128.56.78.1263889590.squirrel@syd-srv02.ezyreg.com> Message-ID: <33159.115.128.56.78.1263890287.squirrel@syd-srv02.ezyreg.com> > Hi, > I recently joined this mailing list so as to improve my knowledge on > Python. > Its been 4 months I am using Python. So I decided to contribute to any > Open > source project. Can you help me on how to proceed on this, Whom to > contact > etc. Hi Nikunj, I have an interesting project which I am looking for voulenteers. It is building a testbot to test all of the python packages on pypi. Guido has asked to get python more like perl. That means testing all the packages. Don't be put off too much. It's a one person job at the moment but I would appreciate more help. Here's the code: http://bitbucket.org/djlyon/pypi-package-testbot/ and the website we want to publish to is: http:/www.pythontest.org Best Regards David Lyon From sree at mahiti.org Tue Jan 19 09:45:28 2010 From: sree at mahiti.org (Sreekanth S Rameshaiah) Date: Tue, 19 Jan 2010 14:15:28 +0530 Subject: [BangPypers] January user group meeting In-Reply-To: <3d62196a1001190020h4f93f6b5n1ec387a5bac3f576@mail.gmail.com> References: <9963e56e1001182239k3b798213q9f631cc446027ae4@mail.gmail.com> <9963e56e1001182341j11a81d60qdd3605a8a62b4c2b@mail.gmail.com> <9963e56e1001190007o320773e1u955d958c0856976a@mail.gmail.com> <9963e56e1001190007m1a1dff3cn7aff7e8940b028d4@mail.gmail.com> <3d62196a1001190020h4f93f6b5n1ec387a5bac3f576@mail.gmail.com> Message-ID: <313529611001190045m154a0f39rc3c4f3d0d3c2f486@mail.gmail.com> +1 for Jan 23rd. - sree 2010/1/19 Arvind Jamuna Dixit > +1 from me for Jan 23/24. > > On Tue, Jan 19, 2010 at 1:37 PM, Noufal Ibrahim wrote: > > > Show of hands please? A couple of +1s and we can do this. > > > > -- > > ~noufal > > http://nibrahim.net.in > > _______________________________________________ > > BangPypers mailing list > > BangPypers at python.org > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > > -- > Regards, > Arvind > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- Sreekanth S Rameshaiah Executive Director Mahiti Infotech Pvt. Ltd. # 33-34, 2nd Floor, Hennur Cross, Hennur Road, Bangalore, India - 560043 Phone: +91 80 4115 0580/1 Mobile: +91 98455 12611 www.mahiti.org From brijithp at gmail.com Tue Jan 19 09:48:00 2010 From: brijithp at gmail.com (BR!j!TH) Date: Tue, 19 Jan 2010 14:18:00 +0530 Subject: [BangPypers] [Fwd: Contribution to Opensource] In-Reply-To: <33159.115.128.56.78.1263890287.squirrel@syd-srv02.ezyreg.com> References: <45707.115.128.56.78.1263889590.squirrel@syd-srv02.ezyreg.com> <33159.115.128.56.78.1263890287.squirrel@syd-srv02.ezyreg.com> Message-ID: <99f221551001190048w4e8490caw76291644dd72fb27@mail.gmail.com> Hi, I too interested in contributing. I have 2 years and six months experience in python, pygtk etc how can I start "Dream is not what you see in sleep is the thing which does not let you sleep" 2010/1/19 David Lyon > > Hi, > > I recently joined this mailing list so as to improve my knowledge on > > Python. > > Its been 4 months I am using Python. So I decided to contribute to any > > Open > > source project. Can you help me on how to proceed on this, Whom to > > contact > > etc. > > Hi Nikunj, > > I have an interesting project which I am looking for voulenteers. > > It is building a testbot to test all of the python packages on > pypi. Guido has asked to get python more like perl. That means > testing all the packages. > > Don't be put off too much. It's a one person job at the moment > but I would appreciate more help. > > Here's the code: > > http://bitbucket.org/djlyon/pypi-package-testbot/ > > and the website we want to publish to is: > > http:/www.pythontest.org > > Best Regards > > David Lyon > > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From david.lyon at pythontest.org Tue Jan 19 09:54:14 2010 From: david.lyon at pythontest.org (David Lyon) Date: Tue, 19 Jan 2010 19:54:14 +1100 (EST) Subject: [BangPypers] [Fwd: Contribution to Opensource] In-Reply-To: <99f221551001190048w4e8490caw76291644dd72fb27@mail.gmail.com> References: <45707.115.128.56.78.1263889590.squirrel@syd-srv02.ezyreg.com> <33159.115.128.56.78.1263890287.squirrel@syd-srv02.ezyreg.com> <99f221551001190048w4e8490caw76291644dd72fb27@mail.gmail.com> Message-ID: <60164.115.128.56.78.1263891254.squirrel@syd-srv02.ezyreg.com> > Hi, > I too interested in contributing. I have 2 years and six months experience > in python, pygtk etc how can I start > Just sign up to bitbucket and email your bitbucket id offlist. I will then add you to the project. What I am looking for is just to get through testing the 8,000+ packages on pypi on a weekly basis. :-) David Lyon From mbaiju at zeomega.com Tue Jan 19 10:04:14 2010 From: mbaiju at zeomega.com (Baiju M) Date: Tue, 19 Jan 2010 14:34:14 +0530 Subject: [BangPypers] [Fwd: Contribution to Opensource] In-Reply-To: <99f221551001190048w4e8490caw76291644dd72fb27@mail.gmail.com> References: <45707.115.128.56.78.1263889590.squirrel@syd-srv02.ezyreg.com> <33159.115.128.56.78.1263890287.squirrel@syd-srv02.ezyreg.com> <99f221551001190048w4e8490caw76291644dd72fb27@mail.gmail.com> Message-ID: Hi, Contributing to FOSS is not one day work, you need lots of patience. Listen carefully to discussions in mailing lists, understand the culture, hang out in IRC. See whether you can make small changes in their wiki. Test all the releases coming out. Go through the bug trackers. See, whether you can fix a small issue. Submit one patch. Checkout latest trunk code and try out. Submit small documentation fixes. Ask for commit privilege. Make your changes in branches, then ask others to review..... See some general advices: http://www.wikihow.com/Have-a-Successful-Open-Source-Project Regards, Baiju M From brijithp at gmail.com Tue Jan 19 10:11:41 2010 From: brijithp at gmail.com (BR!j!TH) Date: Tue, 19 Jan 2010 14:41:41 +0530 Subject: [BangPypers] [Fwd: Contribution to Opensource] In-Reply-To: References: <45707.115.128.56.78.1263889590.squirrel@syd-srv02.ezyreg.com> <33159.115.128.56.78.1263890287.squirrel@syd-srv02.ezyreg.com> <99f221551001190048w4e8490caw76291644dd72fb27@mail.gmail.com> Message-ID: <99f221551001190111h63d2aef2i49ba88357c46aeba@mail.gmail.com> @Baiju M *Thanks for your guidance* * * * * "Dream is not what you see in sleep is the thing which does not let you sleep" 2010/1/19 Baiju M > Hi, > Contributing to FOSS is not one day work, you need lots of patience. > Listen carefully to discussions in mailing lists, understand the culture, > hang out in IRC. See whether you can make small changes in their wiki. > Test all the releases coming out. Go through the bug trackers. See, > whether > you can fix a small issue. Submit one patch. Checkout latest trunk code > and try out. Submit small documentation fixes. Ask for commit privilege. > Make your changes in branches, then ask others to review..... > > See some general advices: > http://www.wikihow.com/Have-a-Successful-Open-Source-Project > > Regards, > Baiju M > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From withblessings at gmail.com Tue Jan 19 10:33:50 2010 From: withblessings at gmail.com (74yrs old) Date: Tue, 19 Jan 2010 15:03:50 +0530 Subject: [BangPypers] [Fwd: Contribution to Opensource] In-Reply-To: <99f221551001190111h63d2aef2i49ba88357c46aeba@mail.gmail.com> References: <45707.115.128.56.78.1263889590.squirrel@syd-srv02.ezyreg.com> <33159.115.128.56.78.1263890287.squirrel@syd-srv02.ezyreg.com> <99f221551001190048w4e8490caw76291644dd72fb27@mail.gmail.com> <99f221551001190111h63d2aef2i49ba88357c46aeba@mail.gmail.com> Message-ID: <7b87ecb71001190133v22c2535cxd9a1b75e29e7f082@mail.gmail.com> Is it possible to guide newbies like me whenever faced with errors generated during running of any of py program ? -sriranga(77yrs old) On Tue, Jan 19, 2010 at 2:41 PM, BR!j!TH wrote: > @Baiju M *Thanks for your guidance* > * > * > * * > "Dream is not what you see in sleep > is the thing which does not let you sleep" > > > 2010/1/19 Baiju M > > > Hi, > > Contributing to FOSS is not one day work, you need lots of patience. > > Listen carefully to discussions in mailing lists, understand the culture, > > hang out in IRC. See whether you can make small changes in their wiki. > > Test all the releases coming out. Go through the bug trackers. See, > > whether > > you can fix a small issue. Submit one patch. Checkout latest trunk code > > and try out. Submit small documentation fixes. Ask for commit > privilege. > > Make your changes in branches, then ask others to review..... > > > > See some general advices: > > http://www.wikihow.com/Have-a-Successful-Open-Source-Project > > > > Regards, > > Baiju M > > _______________________________________________ > > 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 mbaiju at zeomega.com Tue Jan 19 10:40:03 2010 From: mbaiju at zeomega.com (Baiju M) Date: Tue, 19 Jan 2010 15:10:03 +0530 Subject: [BangPypers] [Fwd: Contribution to Opensource] In-Reply-To: <7b87ecb71001190133v22c2535cxd9a1b75e29e7f082@mail.gmail.com> References: <45707.115.128.56.78.1263889590.squirrel@syd-srv02.ezyreg.com> <33159.115.128.56.78.1263890287.squirrel@syd-srv02.ezyreg.com> <99f221551001190048w4e8490caw76291644dd72fb27@mail.gmail.com> <99f221551001190111h63d2aef2i49ba88357c46aeba@mail.gmail.com> <7b87ecb71001190133v22c2535cxd9a1b75e29e7f082@mail.gmail.com> Message-ID: On Tue, Jan 19, 2010 at 3:03 PM, 74yrs old wrote: > Is it possible ?to guide newbies like me whenever ?faced with ?errors > generated during running of any of py program ? Actually that depends on the community and project. Some communities encourage all kinds of contributors and help with even small issues. But they would prefer to use IRC for silly matters. However, there won't be any spoon feeding (is that correct word ?). Regards, Baiju M From steve at lonetwin.net Tue Jan 19 10:50:01 2010 From: steve at lonetwin.net (steve) Date: Tue, 19 Jan 2010 15:20:01 +0530 Subject: [BangPypers] [Fwd: Contribution to Opensource] In-Reply-To: <7b87ecb71001190133v22c2535cxd9a1b75e29e7f082@mail.gmail.com> References: <45707.115.128.56.78.1263889590.squirrel@syd-srv02.ezyreg.com> <33159.115.128.56.78.1263890287.squirrel@syd-srv02.ezyreg.com> <99f221551001190048w4e8490caw76291644dd72fb27@mail.gmail.com> <99f221551001190111h63d2aef2i49ba88357c46aeba@mail.gmail.com> <7b87ecb71001190133v22c2535cxd9a1b75e29e7f082@mail.gmail.com> Message-ID: <4B558049.1020109@lonetwin.net> On 01/19/2010 03:03 PM, 74yrs old wrote: > Is it possible to guide newbies like me whenever faced with errors > generated during running of any of py program ? Of course ! That's part of why mailing lists and IRC channels exist. The only caveat is you ask smart questions: http://catb.org/~esr/faqs/smart-questions.html cheers, - steve -- random non tech spiel: http://lonetwin.blogspot.com/ tech randomness: http://lonehacks.blogspot.com/ what i'm stumbling into: http://lonetwin.stumbleupon.com/ From noufal at gmail.com Tue Jan 19 11:26:12 2010 From: noufal at gmail.com (Noufal Ibrahim) Date: Tue, 19 Jan 2010 15:56:12 +0530 Subject: [BangPypers] [Fwd: Contribution to Opensource] In-Reply-To: <7b87ecb71001190133v22c2535cxd9a1b75e29e7f082@mail.gmail.com> References: <45707.115.128.56.78.1263889590.squirrel@syd-srv02.ezyreg.com> <33159.115.128.56.78.1263890287.squirrel@syd-srv02.ezyreg.com> <99f221551001190048w4e8490caw76291644dd72fb27@mail.gmail.com> <99f221551001190111h63d2aef2i49ba88357c46aeba@mail.gmail.com> <7b87ecb71001190133v22c2535cxd9a1b75e29e7f082@mail.gmail.com> Message-ID: <9963e56e1001190226o1c35365n9bea45545bd10dc5@mail.gmail.com> On Tue, Jan 19, 2010 at 3:03 PM, 74yrs old wrote: > Is it possible to guide newbies like me whenever faced with errors > generated during running of any of py program ?[..] The entry barrier is *really* low. You can contribute from anything to typo fixes in the documentation to architecture of the whole system. And you're free to do as much or as little as you can/want. There will always be rash people and more polite ones but once you recognise the fact that everyone is a volunteer, the whole process will be smooth. -- ~noufal http://nibrahim.net.in From srinivas_thatiparthy at akebonosoft.com Tue Jan 19 11:30:53 2010 From: srinivas_thatiparthy at akebonosoft.com (Srinivas Reddy Thatiparthy) Date: Tue, 19 Jan 2010 16:00:53 +0530 Subject: [BangPypers] [Fwd: Contribution to Opensource] In-Reply-To: <9963e56e1001190226o1c35365n9bea45545bd10dc5@mail.gmail.com> Message-ID: <4EF2BF691B890546B2694C99A2852F0C01D01DC5@astserver3.akebonosoft.com> >> Is it possible to guide newbies like me whenever faced with errors >> generated during running of any of py program ?[..] >The entry barrier is *really* low. You can contribute from anything to typo fixes in the documentation to architecture of the whole system. And you're free to do as >much or as little as you can/want. There will always be rash people and more polite ones but once you recognise the fact that everyone is a volunteer, the whole > process will be smooth. I have seen this kind of rash people when I asked java questions in google groups, 2.6 years back.Dont take anything personal.just be patient. Having said that our Banpypers is a closely(exaggerated?) knit list.Never seen a flame war here since I joined ,well for one year. That's a good thing. -- ~noufal http://nibrahim.net.in _______________________________________________ BangPypers mailing list BangPypers at python.org http://mail.python.org/mailman/listinfo/bangpypers From kunalkantsen at gmail.com Tue Jan 19 13:33:23 2010 From: kunalkantsen at gmail.com (kunalkant sen) Date: Tue, 19 Jan 2010 18:03:23 +0530 Subject: [BangPypers] January user group meeting In-Reply-To: <313529611001190045m154a0f39rc3c4f3d0d3c2f486@mail.gmail.com> References: <9963e56e1001182239k3b798213q9f631cc446027ae4@mail.gmail.com> <9963e56e1001182341j11a81d60qdd3605a8a62b4c2b@mail.gmail.com> <9963e56e1001190007o320773e1u955d958c0856976a@mail.gmail.com> <9963e56e1001190007m1a1dff3cn7aff7e8940b028d4@mail.gmail.com> <3d62196a1001190020h4f93f6b5n1ec387a5bac3f576@mail.gmail.com> <313529611001190045m154a0f39rc3c4f3d0d3c2f486@mail.gmail.com> Message-ID: <63eb47a21001190433t189df0bl9d60a17924c2a057@mail.gmail.com> +1 Kunal On Tue, Jan 19, 2010 at 2:15 PM, Sreekanth S Rameshaiah wrote: > +1 for Jan 23rd. > - sree > > 2010/1/19 Arvind Jamuna Dixit > > > +1 from me for Jan 23/24. > > > > On Tue, Jan 19, 2010 at 1:37 PM, Noufal Ibrahim > wrote: > > > > > Show of hands please? A couple of +1s and we can do this. > > > > > > -- > > > ~noufal > > > http://nibrahim.net.in > > > _______________________________________________ > > > BangPypers mailing list > > > BangPypers at python.org > > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > > > > > > > -- > > Regards, > > Arvind > > _______________________________________________ > > BangPypers mailing list > > BangPypers at python.org > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > > -- > Sreekanth S Rameshaiah > Executive Director > Mahiti Infotech Pvt. Ltd. > # 33-34, 2nd Floor, > Hennur Cross, Hennur Road, > Bangalore, India - 560043 > Phone: +91 80 4115 0580/1 > Mobile: +91 98455 12611 > www.mahiti.org > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From nikunjbadjatya at gmail.com Tue Jan 19 14:33:28 2010 From: nikunjbadjatya at gmail.com (nikunj badjatya) Date: Tue, 19 Jan 2010 19:03:28 +0530 Subject: [BangPypers] January user group meeting In-Reply-To: <63eb47a21001190433t189df0bl9d60a17924c2a057@mail.gmail.com> References: <9963e56e1001182239k3b798213q9f631cc446027ae4@mail.gmail.com> <9963e56e1001182341j11a81d60qdd3605a8a62b4c2b@mail.gmail.com> <9963e56e1001190007o320773e1u955d958c0856976a@mail.gmail.com> <9963e56e1001190007m1a1dff3cn7aff7e8940b028d4@mail.gmail.com> <3d62196a1001190020h4f93f6b5n1ec387a5bac3f576@mail.gmail.com> <313529611001190045m154a0f39rc3c4f3d0d3c2f486@mail.gmail.com> <63eb47a21001190433t189df0bl9d60a17924c2a057@mail.gmail.com> Message-ID: +1 Nikunj Btech, Sony India Software Centre, Bangalore From itpradeep.38 at gmail.com Tue Jan 19 16:59:28 2010 From: itpradeep.38 at gmail.com (pradeep T) Date: Wed, 20 Jan 2010 02:59:28 +1100 Subject: [BangPypers] python coding for automated sms sending,.. Message-ID: hi ... am developing a mobile application.... i need a code to send the messages automatically as per my scheduled date and time.... can any one help..,.. thanks in advance... From admin.nitjece at gmail.com Tue Jan 19 17:18:05 2010 From: admin.nitjece at gmail.com (Diptanu Choudhury) Date: Tue, 19 Jan 2010 21:48:05 +0530 Subject: [BangPypers] January user group meeting In-Reply-To: References: <9963e56e1001182239k3b798213q9f631cc446027ae4@mail.gmail.com> <9963e56e1001182341j11a81d60qdd3605a8a62b4c2b@mail.gmail.com> <9963e56e1001190007o320773e1u955d958c0856976a@mail.gmail.com> <9963e56e1001190007m1a1dff3cn7aff7e8940b028d4@mail.gmail.com> <3d62196a1001190020h4f93f6b5n1ec387a5bac3f576@mail.gmail.com> <313529611001190045m154a0f39rc3c4f3d0d3c2f486@mail.gmail.com> <63eb47a21001190433t189df0bl9d60a17924c2a057@mail.gmail.com> Message-ID: +1 On Tue, Jan 19, 2010 at 7:03 PM, nikunj badjatya wrote: > +1 > > Nikunj > Btech, > Sony India Software Centre, Bangalore > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- Thanks, Diptanu Choudhury Just a Coder, ThoughtWorks India Mobile - 09886760964 Web - www.linkedin.com/in/diptanu From madhav.bnk at gmail.com Tue Jan 19 17:49:44 2010 From: madhav.bnk at gmail.com (B.Nanda Kishore) Date: Tue, 19 Jan 2010 22:19:44 +0530 Subject: [BangPypers] python coding for automated sms sending,.. In-Reply-To: References: Message-ID: <26030bef1001190849maca294coc27bf01755c2bc2a@mail.gmail.com> If you mean, your web application sending sms to cellphone, then may try Kannel. http://stackoverflow.com/questions/430582/sending-an-sms-to-a-cellphone-using-django/430589#430589 Regards, Nandakishore On Tue, Jan 19, 2010 at 9:29 PM, pradeep T wrote: > hi ... > am developing a mobile application.... > i need a code to send the messages automatically as per my scheduled > date and time.... > can any one help..,.. > thanks in advance... > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From jeffjosejeff at gmail.com Tue Jan 19 18:07:32 2010 From: jeffjosejeff at gmail.com (Jeffrey Jose) Date: Tue, 19 Jan 2010 22:37:32 +0530 Subject: [BangPypers] January user group meeting In-Reply-To: References: <9963e56e1001182239k3b798213q9f631cc446027ae4@mail.gmail.com> <9963e56e1001182341j11a81d60qdd3605a8a62b4c2b@mail.gmail.com> <9963e56e1001190007o320773e1u955d958c0856976a@mail.gmail.com> <9963e56e1001190007m1a1dff3cn7aff7e8940b028d4@mail.gmail.com> <3d62196a1001190020h4f93f6b5n1ec387a5bac3f576@mail.gmail.com> <313529611001190045m154a0f39rc3c4f3d0d3c2f486@mail.gmail.com> <63eb47a21001190433t189df0bl9d60a17924c2a057@mail.gmail.com> Message-ID: Unfortunately I wont be able to attend, @Baiju, will you be making your talk available online? PS: Sorry if these appear really newbie questions, I'm new here and I'm just looking around. On Tue, Jan 19, 2010 at 9:48 PM, Diptanu Choudhury wrote: > +1 > > On Tue, Jan 19, 2010 at 7:03 PM, nikunj badjatya > wrote: > > > +1 > > > > Nikunj > > Btech, > > Sony India Software Centre, Bangalore > > _______________________________________________ > > BangPypers mailing list > > BangPypers at python.org > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > > -- > Thanks, > Diptanu Choudhury > Just a Coder, ThoughtWorks India > Mobile - 09886760964 > Web - www.linkedin.com/in/diptanu > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From sriramnrn at gmail.com Tue Jan 19 19:09:17 2010 From: sriramnrn at gmail.com (Sriram Narayanan) Date: Tue, 19 Jan 2010 23:39:17 +0530 Subject: [BangPypers] January user group meeting In-Reply-To: References: <9963e56e1001182239k3b798213q9f631cc446027ae4@mail.gmail.com> <9963e56e1001182341j11a81d60qdd3605a8a62b4c2b@mail.gmail.com> <9963e56e1001190007o320773e1u955d958c0856976a@mail.gmail.com> <9963e56e1001190007m1a1dff3cn7aff7e8940b028d4@mail.gmail.com> <3d62196a1001190020h4f93f6b5n1ec387a5bac3f576@mail.gmail.com> <313529611001190045m154a0f39rc3c4f3d0d3c2f486@mail.gmail.com> <63eb47a21001190433t189df0bl9d60a17924c2a057@mail.gmail.com> Message-ID: <49977f271001191009p7b9f48a4g6d43391439887b25@mail.gmail.com> Ok, can we make this Jan 232 Saturday if we're ok with meeting at Thoughtworks ? I want to go for a movie on Sunday ! :) -- Sriram From noufal at gmail.com Tue Jan 19 19:27:15 2010 From: noufal at gmail.com (Noufal Ibrahim) Date: Tue, 19 Jan 2010 23:57:15 +0530 Subject: [BangPypers] January user group meeting In-Reply-To: <49977f271001191009p7b9f48a4g6d43391439887b25@mail.gmail.com> References: <9963e56e1001182239k3b798213q9f631cc446027ae4@mail.gmail.com> <9963e56e1001190007o320773e1u955d958c0856976a@mail.gmail.com> <9963e56e1001190007m1a1dff3cn7aff7e8940b028d4@mail.gmail.com> <3d62196a1001190020h4f93f6b5n1ec387a5bac3f576@mail.gmail.com> <313529611001190045m154a0f39rc3c4f3d0d3c2f486@mail.gmail.com> <63eb47a21001190433t189df0bl9d60a17924c2a057@mail.gmail.com> <49977f271001191009p7b9f48a4g6d43391439887b25@mail.gmail.com> Message-ID: <9963e56e1001191027v35b7a889l513aa88c28bd346b@mail.gmail.com> On Tue, Jan 19, 2010 at 11:39 PM, Sriram Narayanan wrote: > Ok, can we make this Jan 232 Saturday if we're ok with meeting at > Thoughtworks ? > Fine by me. What time? 1530? -- ~noufal http://nibrahim.net.in From sriramnrn at gmail.com Tue Jan 19 19:34:21 2010 From: sriramnrn at gmail.com (Sriram Narayanan) Date: Wed, 20 Jan 2010 00:04:21 +0530 Subject: [BangPypers] January user group meeting In-Reply-To: <9963e56e1001191027v35b7a889l513aa88c28bd346b@mail.gmail.com> References: <9963e56e1001182239k3b798213q9f631cc446027ae4@mail.gmail.com> <9963e56e1001190007o320773e1u955d958c0856976a@mail.gmail.com> <9963e56e1001190007m1a1dff3cn7aff7e8940b028d4@mail.gmail.com> <3d62196a1001190020h4f93f6b5n1ec387a5bac3f576@mail.gmail.com> <313529611001190045m154a0f39rc3c4f3d0d3c2f486@mail.gmail.com> <63eb47a21001190433t189df0bl9d60a17924c2a057@mail.gmail.com> <49977f271001191009p7b9f48a4g6d43391439887b25@mail.gmail.com> <9963e56e1001191027v35b7a889l513aa88c28bd346b@mail.gmail.com> Message-ID: <49977f271001191034x401dd6a6rede11f9622500570@mail.gmail.com> On Tue, Jan 19, 2010 at 11:57 PM, Noufal Ibrahim wrote: > On Tue, Jan 19, 2010 at 11:39 PM, Sriram Narayanan wrote: > >> Ok, can we make this Jan 232 Saturday if we're ok with meeting at >> Thoughtworks ? >> > > Fine by me. What time? 1530? +1 > > -- > ~noufal > http://nibrahim.net.in > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- Belenix: www.belenix.org From yuvipanda at gmail.com Tue Jan 19 21:51:32 2010 From: yuvipanda at gmail.com (Yuvi Panda) Date: Wed, 20 Jan 2010 02:21:32 +0530 Subject: [BangPypers] python coding for automated sms sending,.. In-Reply-To: <26030bef1001190849maca294coc27bf01755c2bc2a@mail.gmail.com> References: <26030bef1001190849maca294coc27bf01755c2bc2a@mail.gmail.com> Message-ID: <45ec909c1001191251x76b2870ase79645945079d2e@mail.gmail.com> I've had quite a *lot* of success with http://wammu.eu/python-gammu/ On Tue, Jan 19, 2010 at 10:19 PM, B.Nanda Kishore wrote: > If you mean, your web application sending sms to cellphone, > then may try Kannel. > > http://stackoverflow.com/questions/430582/sending-an-sms-to-a-cellphone-using-django/430589#430589 > > Regards, > Nandakishore > > > On Tue, Jan 19, 2010 at 9:29 PM, pradeep T wrote: > > > hi ... > > am developing a mobile application.... > > i need a code to send the messages automatically as per my scheduled > > date and time.... > > can any one help..,.. > > thanks in advance... > > _______________________________________________ > > 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 > -- Yuvi Panda T http://yuvi.in/blog From vsapre80 at gmail.com Wed Jan 20 06:44:28 2010 From: vsapre80 at gmail.com (Vishal) Date: Wed, 20 Jan 2010 11:14:28 +0530 Subject: [BangPypers] January user group meeting In-Reply-To: <49977f271001191034x401dd6a6rede11f9622500570@mail.gmail.com> References: <9963e56e1001182239k3b798213q9f631cc446027ae4@mail.gmail.com> <9963e56e1001190007m1a1dff3cn7aff7e8940b028d4@mail.gmail.com> <3d62196a1001190020h4f93f6b5n1ec387a5bac3f576@mail.gmail.com> <313529611001190045m154a0f39rc3c4f3d0d3c2f486@mail.gmail.com> <63eb47a21001190433t189df0bl9d60a17924c2a057@mail.gmail.com> <49977f271001191009p7b9f48a4g6d43391439887b25@mail.gmail.com> <9963e56e1001191027v35b7a889l513aa88c28bd346b@mail.gmail.com> <49977f271001191034x401dd6a6rede11f9622500570@mail.gmail.com> Message-ID: +1 for Jan 24th -1 for Jan 23rd (personal work) I would be interested to know if someone has used/modified TRAC to fit their own project management requirements. Any kind of training on TRAC.. Thanks and best regards, Vishal Sapre On Wed, Jan 20, 2010 at 12:04 AM, Sriram Narayanan wrote: > On Tue, Jan 19, 2010 at 11:57 PM, Noufal Ibrahim wrote: > > On Tue, Jan 19, 2010 at 11:39 PM, Sriram Narayanan >wrote: > > > >> Ok, can we make this Jan 232 Saturday if we're ok with meeting at > >> Thoughtworks ? > >> > > > > Fine by me. What time? 1530? > > +1 > > > > > -- > > ~noufal > > http://nibrahim.net.in > > _______________________________________________ > > BangPypers mailing list > > BangPypers at python.org > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > > -- > Belenix: www.belenix.org > _______________________________________________ > 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? "Happiness keeps u Sweet, Trials keep u Strong, Sorrow keeps u Human, Failure Keeps u Humble, Success keeps u Glowing, But only God Keeps u Going.....Keep Going....." From noufal at gmail.com Wed Jan 20 06:46:23 2010 From: noufal at gmail.com (Noufal Ibrahim) Date: Wed, 20 Jan 2010 11:16:23 +0530 Subject: [BangPypers] January user group meeting In-Reply-To: References: <9963e56e1001182239k3b798213q9f631cc446027ae4@mail.gmail.com> <3d62196a1001190020h4f93f6b5n1ec387a5bac3f576@mail.gmail.com> <313529611001190045m154a0f39rc3c4f3d0d3c2f486@mail.gmail.com> <63eb47a21001190433t189df0bl9d60a17924c2a057@mail.gmail.com> <49977f271001191009p7b9f48a4g6d43391439887b25@mail.gmail.com> <9963e56e1001191027v35b7a889l513aa88c28bd346b@mail.gmail.com> <49977f271001191034x401dd6a6rede11f9622500570@mail.gmail.com> Message-ID: <9963e56e1001192146k5c3abe2y14009c286f4ae406@mail.gmail.com> On Wed, Jan 20, 2010 at 11:14 AM, Vishal wrote: > +1 for Jan 24th > -1 for Jan 23rd (personal work) > > I would be interested to know if someone has used/modified TRAC to fit > their > own project management requirements. Any kind of training on TRAC.. > I have written a plugin or two for trac at my previous employers place. But it's been a while. I can't really 'present' anything but I can talk to you about it. :)[..] -- ~noufal http://nibrahim.net.in From lawgon at au-kbc.org Wed Jan 20 06:10:37 2010 From: lawgon at au-kbc.org (Kenneth Gonsalves) Date: Wed, 20 Jan 2010 10:40:37 +0530 Subject: [BangPypers] [Fwd: Contribution to Opensource] In-Reply-To: <9963e56e1001190226o1c35365n9bea45545bd10dc5@mail.gmail.com> References: <45707.115.128.56.78.1263889590.squirrel@syd-srv02.ezyreg.com> <7b87ecb71001190133v22c2535cxd9a1b75e29e7f082@mail.gmail.com> <9963e56e1001190226o1c35365n9bea45545bd10dc5@mail.gmail.com> Message-ID: <201001201040.38027.lawgon@au-kbc.org> On Tuesday 19 Jan 2010 3:56:12 pm Noufal Ibrahim wrote: > > Is it possible to guide newbies like me whenever faced with errors > > generated during running of any of py program ?[..] > > The entry barrier is really low. You can contribute from anything to typo > fixes in the documentation to architecture of the whole system. And you're > free to do as much or as little as you can/want. There will always be rash > people and more polite ones but once you recognise the fact that everyone > is a volunteer, the whole process will be smooth. > and do not forget translation - an easy way to contribute if you are not too good at code (not to imply that translation is easy - it isn't) -- regards Kenneth Gonsalves Senior Project Officer NRC-FOSS http://nrcfosshelpline.in/web/ From noufal at gmail.com Wed Jan 20 06:56:18 2010 From: noufal at gmail.com (Noufal Ibrahim) Date: Wed, 20 Jan 2010 11:26:18 +0530 Subject: [BangPypers] January user group meeting In-Reply-To: <9963e56e1001192146k5c3abe2y14009c286f4ae406@mail.gmail.com> References: <9963e56e1001182239k3b798213q9f631cc446027ae4@mail.gmail.com> <313529611001190045m154a0f39rc3c4f3d0d3c2f486@mail.gmail.com> <63eb47a21001190433t189df0bl9d60a17924c2a057@mail.gmail.com> <49977f271001191009p7b9f48a4g6d43391439887b25@mail.gmail.com> <9963e56e1001191027v35b7a889l513aa88c28bd346b@mail.gmail.com> <49977f271001191034x401dd6a6rede11f9622500570@mail.gmail.com> <9963e56e1001192146k5c3abe2y14009c286f4ae406@mail.gmail.com> Message-ID: <9963e56e1001192156p6f72c1ffgb3e91bf77e62feb5@mail.gmail.com> So are we decided? Date : Jan 23 Time : 1530 Venue : ThoughtWorks, Diamond District Topics : Baiju - Buildbot Noufal - py.test. Fine? Vishal had a -1 for 23. If there many others, we can change the date to 24th. -- ~noufal http://nibrahim.net.in From mbaiju at zeomega.com Wed Jan 20 07:07:21 2010 From: mbaiju at zeomega.com (Baiju M) Date: Wed, 20 Jan 2010 11:37:21 +0530 Subject: [BangPypers] January user group meeting In-Reply-To: References: <9963e56e1001182239k3b798213q9f631cc446027ae4@mail.gmail.com> <9963e56e1001190007o320773e1u955d958c0856976a@mail.gmail.com> <9963e56e1001190007m1a1dff3cn7aff7e8940b028d4@mail.gmail.com> <3d62196a1001190020h4f93f6b5n1ec387a5bac3f576@mail.gmail.com> <313529611001190045m154a0f39rc3c4f3d0d3c2f486@mail.gmail.com> <63eb47a21001190433t189df0bl9d60a17924c2a057@mail.gmail.com> Message-ID: On Tue, Jan 19, 2010 at 10:37 PM, Jeffrey Jose wrote: > Unfortunately I wont be able to attend, @Baiju, will you be making your talk > available online? I am afraid that would be possible as we don't have facilities for that. And it's not going to be very formal talk. Regards, Baiju M From noufal at gmail.com Wed Jan 20 07:08:41 2010 From: noufal at gmail.com (Noufal Ibrahim) Date: Wed, 20 Jan 2010 11:38:41 +0530 Subject: [BangPypers] January user group meeting In-Reply-To: References: <9963e56e1001182239k3b798213q9f631cc446027ae4@mail.gmail.com> <9963e56e1001190007o320773e1u955d958c0856976a@mail.gmail.com> <9963e56e1001190007m1a1dff3cn7aff7e8940b028d4@mail.gmail.com> <3d62196a1001190020h4f93f6b5n1ec387a5bac3f576@mail.gmail.com> <313529611001190045m154a0f39rc3c4f3d0d3c2f486@mail.gmail.com> <63eb47a21001190433t189df0bl9d60a17924c2a057@mail.gmail.com> Message-ID: <9963e56e1001192208t25e22f74v9827c7830269b737@mail.gmail.com> On Wed, Jan 20, 2010 at 11:37 AM, Baiju M wrote: > On Tue, Jan 19, 2010 at 10:37 PM, Jeffrey Jose > wrote: > > Unfortunately I wont be able to attend, @Baiju, will you be making your > talk > > available online? > > I am afraid that would be possible as we don't have facilities for that. > And it's not going to be very formal talk. We *could* try recordmydesktop (again) but we didn't have much luck with it the last time. -- ~noufal http://nibrahim.net.in From murugadoss2884 at gmail.com Wed Jan 20 11:08:04 2010 From: murugadoss2884 at gmail.com (murugadoss) Date: Wed, 20 Jan 2010 19:08:04 +0900 Subject: [BangPypers] Help plzz.. Message-ID: <63b36ce31001200208v5d2d432ard0deb1e67407ca77@mail.gmail.com> Hello, I want to learn python scripting. Can anyone suggest me any book or link to start with.Books with sample example will be more helpfull. -- Thanks & Regards V.Murugadoss From ankur at thinklabs.in Wed Jan 20 11:18:56 2010 From: ankur at thinklabs.in (Ankur Gupta) Date: Wed, 20 Jan 2010 15:48:56 +0530 Subject: [BangPypers] Help plzz.. In-Reply-To: <63b36ce31001200208v5d2d432ard0deb1e67407ca77@mail.gmail.com> References: <63b36ce31001200208v5d2d432ard0deb1e67407ca77@mail.gmail.com> Message-ID: On Wed, Jan 20, 2010 at 3:38 PM, murugadoss wrote: > Hello, > I want to learn python scripting. Can anyone suggest me any book or link > to start with.Books with sample example will be more helpfull. > Try this book http://openbookproject.net//thinkCSpy/ > > -- > Thanks & Regards > V.Murugadoss > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From nikunjbadjatya at gmail.com Wed Jan 20 11:19:18 2010 From: nikunjbadjatya at gmail.com (nikunj badjatya) Date: Wed, 20 Jan 2010 15:49:18 +0530 Subject: [BangPypers] Help plzz.. In-Reply-To: <63b36ce31001200208v5d2d432ard0deb1e67407ca77@mail.gmail.com> References: <63b36ce31001200208v5d2d432ard0deb1e67407ca77@mail.gmail.com> Message-ID: Hi, "A Byte Of Python" By Swaroop CH, http://www.swaroopch.com/notes/Python freely downloadable, An awesome book, easy to understand texts and has suffice examples. Hello, > I want to learn python scripting. Can anyone suggest me any book or link > to start with.Books with sample example will be more helpfull. > > -- Nikunj Badjatya BTech SONY India Software Centre From lawgon at au-kbc.org Wed Jan 20 11:21:39 2010 From: lawgon at au-kbc.org (Kenneth Gonsalves) Date: Wed, 20 Jan 2010 15:51:39 +0530 Subject: [BangPypers] Help plzz.. In-Reply-To: References: <63b36ce31001200208v5d2d432ard0deb1e67407ca77@mail.gmail.com> Message-ID: <201001201551.39336.lawgon@au-kbc.org> On Wednesday 20 Jan 2010 3:48:56 pm Ankur Gupta wrote: > > Hello, > > I want to learn python scripting. Can anyone suggest me any book or > > link to start with.Books with sample example will be more helpfull. > > Try this book http://openbookproject.net//thinkCSpy/ > or buy 'python in a nutshell' - it is the only book you will ever need -- regards Kenneth Gonsalves Senior Project Officer NRC-FOSS http://nrcfosshelpline.in/web/ From noufal at gmail.com Wed Jan 20 11:32:38 2010 From: noufal at gmail.com (Noufal Ibrahim) Date: Wed, 20 Jan 2010 16:02:38 +0530 Subject: [BangPypers] Help plzz.. In-Reply-To: <63b36ce31001200208v5d2d432ard0deb1e67407ca77@mail.gmail.com> References: <63b36ce31001200208v5d2d432ard0deb1e67407ca77@mail.gmail.com> Message-ID: <9963e56e1001200232g17e07a32ne4d07fcbf7de18b3@mail.gmail.com> On Wed, Jan 20, 2010 at 3:38 PM, murugadoss wrote: > Hello, > I want to learn python scripting. Can anyone suggest me any book or link > to start with.Books with sample example will be more helpfull. The official tutorial : http://docs.python.org/tutorial/index.html (best place to start) Mark Pilgrims Dive into Python : http://diveintopython.org/toc/index.html(excellent read) -- ~noufal http://nibrahim.net.in From abpillai at gmail.com Wed Jan 20 11:38:48 2010 From: abpillai at gmail.com (Anand Balachandran Pillai) Date: Wed, 20 Jan 2010 16:08:48 +0530 Subject: [BangPypers] Help plzz.. In-Reply-To: <9963e56e1001200232g17e07a32ne4d07fcbf7de18b3@mail.gmail.com> References: <63b36ce31001200208v5d2d432ard0deb1e67407ca77@mail.gmail.com> <9963e56e1001200232g17e07a32ne4d07fcbf7de18b3@mail.gmail.com> Message-ID: <8548c5f31001200238x51573e9fwcde8c2de802662a@mail.gmail.com> On Wed, Jan 20, 2010 at 4:02 PM, Noufal Ibrahim wrote: > On Wed, Jan 20, 2010 at 3:38 PM, murugadoss >wrote: > > > Hello, > > I want to learn python scripting. Can anyone suggest me any book or > link > > to start with.Books with sample example will be more helpfull. > > > The official tutorial : http://docs.python.org/tutorial/index.html (best > place to start) > Mark Pilgrims Dive into Python : > http://diveintopython.org/toc/index.html(excellentread) > > > Just came across the relatively new effort by Rahul Verma at http://www.testingperspective.com/doku.php/rverma/hwpl/intro . Haven't gone through it, but looks pretty basic, introductory. Give it a try. > > -- > ~noufal > http://nibrahim.net.in > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- --Anand From srinivas_thatiparthy at akebonosoft.com Wed Jan 20 13:07:56 2010 From: srinivas_thatiparthy at akebonosoft.com (Srinivas Reddy Thatiparthy) Date: Wed, 20 Jan 2010 17:37:56 +0530 Subject: [BangPypers] Help plzz.. Message-ID: <4EF2BF691B890546B2694C99A2852F0C01D01EF1@astserver3.akebonosoft.com> >The official tutorial : http://docs.python.org/tutorial/index.html (best place to start) Mark Pilgrims Dive into Python : >http://diveintopython.org/toc/index.html(excellent read) +1 for dive into python ;An excellent one,indeed. Regards, Srinivas Reddy T ----- You never learn something until you have to write something in it(a programming language), until you have to live and breathe it. It's one thing to go learn a language for fun, but until you write some big, complex system in it,you don't really learn it. ---Brad Fitzpatrick From admin.nitjece at gmail.com Wed Jan 20 13:34:45 2010 From: admin.nitjece at gmail.com (Diptanu Choudhury) Date: Wed, 20 Jan 2010 18:04:45 +0530 Subject: [BangPypers] Help plzz.. In-Reply-To: <4EF2BF691B890546B2694C99A2852F0C01D01EF1@astserver3.akebonosoft.com> References: <4EF2BF691B890546B2694C99A2852F0C01D01EF1@astserver3.akebonosoft.com> Message-ID: I felt that Dive into Python can be a little tough to begin with. The tutorial on docs.python.com was easier to follow for me when I started out. But having said that, it depends on the person. A friend of mind found Dive into Python a little humorous and he totally loved it. :-) On Wed, Jan 20, 2010 at 5:37 PM, Srinivas Reddy Thatiparthy < srinivas_thatiparthy at akebonosoft.com> wrote: > >The official tutorial : http://docs.python.org/tutorial/index.html > (best place to start) Mark Pilgrims Dive into Python : > >http://diveintopython.org/toc/index.html(excellent read) > +1 for dive into python ;An excellent one,indeed. > > Regards, > Srinivas Reddy T > ----- > You never learn something until you have to write something in it(a > programming language), until you have to live and breathe it. It's one > thing to go learn a language for fun, but until you write some big, > complex system in it,you don't really learn it. > > ---Brad Fitzpatrick > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- Thanks, Diptanu Choudhury Just a Coder, ThoughtWorks India Mobile - 09886760964 Web - www.linkedin.com/in/diptanu From jaganadhg at gmail.com Wed Jan 20 13:45:48 2010 From: jaganadhg at gmail.com (JAGANADH G) Date: Wed, 20 Jan 2010 18:15:48 +0530 Subject: [BangPypers] Help plzz.. In-Reply-To: References: <4EF2BF691B890546B2694C99A2852F0C01D01EF1@astserver3.akebonosoft.com> Message-ID: On Wed, Jan 20, 2010 at 6:04 PM, Diptanu Choudhury wrote: > I felt that Dive into Python can be a little tough to begin with. The > tutorial on docs.python.com was easier to follow for me when I started > out. > But having said that, it depends on the person. > > A friend of mind found Dive into Python a little humorous and he totally > loved it. :-) > > Try Head First Programming oreilly.com/catalog/9780596802387 -- ********************************** JAGANADH G http://jaganadhg.freeflux.net/blog From jeffjosejeff at gmail.com Wed Jan 20 14:45:58 2010 From: jeffjosejeff at gmail.com (Jeffrey Jose) Date: Wed, 20 Jan 2010 19:15:58 +0530 Subject: [BangPypers] Help plzz.. In-Reply-To: References: <4EF2BF691B890546B2694C99A2852F0C01D01EF1@astserver3.akebonosoft.com> Message-ID: +1 for both Byte of Python and Dive into Python Also, Python CookBook Once you've familiarised with the language (I didnt say mastered it) hit video.google.com for some excellent Google Tech Talks in the field of python including Python Giants like Alex Martelli I've also found stackoverflow.com to be an excellent place to hangout for tips tricks and pitfalls jeff On Wed, Jan 20, 2010 at 6:15 PM, JAGANADH G wrote: > On Wed, Jan 20, 2010 at 6:04 PM, Diptanu Choudhury > wrote: > > > I felt that Dive into Python can be a little tough to begin with. The > > tutorial on docs.python.com was easier to follow for me when I started > > out. > > But having said that, it depends on the person. > > > > A friend of mind found Dive into Python a little humorous and he totally > > loved it. :-) > > > > > Try Head First Programming > > oreilly.com/catalog/9780596802387 > > > -- > ********************************** > JAGANADH G > http://jaganadhg.freeflux.net/blog > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From vnbang2003 at yahoo.com Wed Jan 20 15:08:41 2010 From: vnbang2003 at yahoo.com (VIJAY KUMAR) Date: Wed, 20 Jan 2010 19:38:41 +0530 (IST) Subject: [BangPypers] Help plzz.. In-Reply-To: Message-ID: <425701.86840.qm@web95315.mail.in2.yahoo.com> Starting with Basic I found learning python? from Mark Lutz is good. http://books.google.co.in/books?id=wSC-tyYy5bsC&pg=PA503&dq=learning+python+pdf&ei=1g1XS4rEJInclQSU2rioAw&cd=1#v=onepage&q=&f=false with thanks Vijay --- On Wed, 20/1/10, Jeffrey Jose wrote: From: Jeffrey Jose Subject: Re: [BangPypers] Help plzz.. To: "Bangalore Python Users Group - India" Date: Wednesday, 20 January, 2010, 7:15 PM +1 for both Byte of Python and Dive into Python Also, Python CookBook Once you've familiarised with the language (I didnt say mastered it) hit video.google.com for some excellent Google Tech Talks in the field of python including Python Giants like Alex Martelli I've also found stackoverflow.com to be an excellent place to hangout for tips tricks and pitfalls jeff On Wed, Jan 20, 2010 at 6:15 PM, JAGANADH G wrote: > On Wed, Jan 20, 2010 at 6:04 PM, Diptanu Choudhury > wrote: > > > I felt that Dive into Python can be a little tough to begin with. The > > tutorial on docs.python.com was easier to follow for me when I started > > out. > > But having said that, it depends on the person. > > > > A friend of mind found Dive into Python a little humorous and he totally > > loved it. :-) > > > > > Try Head First Programming > > oreilly.com/catalog/9780596802387 > > > -- > ********************************** > JAGANADH G > http://jaganadhg.freeflux.net/blog > _______________________________________________ > 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 The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. http://in.yahoo.com/ From rajeev.sebastian at gmail.com Wed Jan 20 16:42:57 2010 From: rajeev.sebastian at gmail.com (Rajeev J Sebastian) Date: Wed, 20 Jan 2010 21:12:57 +0530 Subject: [BangPypers] Help plzz.. In-Reply-To: <425701.86840.qm@web95315.mail.in2.yahoo.com> References: <425701.86840.qm@web95315.mail.in2.yahoo.com> Message-ID: <79a035421001200742sd4fdab3lefcf985870f33741@mail.gmail.com> On Wed, Jan 20, 2010 at 7:38 PM, VIJAY KUMAR wrote: > Starting with Basic I found learning python? from Mark Lutz is good. > > > http://books.google.co.in/books?id=wSC-tyYy5bsC&pg=PA503&dq=learning+python+pdf&ei=1g1XS4rEJInclQSU2rioAw&cd=1#v=onepage&q=&f=false Noone has read the Python Tutorial ? I found that to be the ultimate guide :) Gets you going in < 4 days. Regards Rajeev J Sebastian From noufal at gmail.com Thu Jan 21 06:29:12 2010 From: noufal at gmail.com (Noufal Ibrahim) Date: Thu, 21 Jan 2010 10:59:12 +0530 Subject: [BangPypers] The merge : Unladen Swallow into CPython Message-ID: <9963e56e1001202129m712dd861ue63bffe0519da2aa@mail.gmail.com> http://thread.gmane.org/gmane.comp.python.devel/109919 Looks it's really lead laden rather than unladen. An interpreter binary is over 100 MB (as opposed to the original CPython one which is less than 10). More details in the PEP in the above email thread. I sense a disturbance in the force. -- ~noufal http://nibrahim.net.in From abpillai at gmail.com Thu Jan 21 07:40:56 2010 From: abpillai at gmail.com (Anand Balachandran Pillai) Date: Thu, 21 Jan 2010 12:10:56 +0530 Subject: [BangPypers] The merge : Unladen Swallow into CPython In-Reply-To: <9963e56e1001202129m712dd861ue63bffe0519da2aa@mail.gmail.com> References: <9963e56e1001202129m712dd861ue63bffe0519da2aa@mail.gmail.com> Message-ID: <8548c5f31001202240k71e43017gc2d32d7529cdb68a@mail.gmail.com> On Thu, Jan 21, 2010 at 10:59 AM, Noufal Ibrahim wrote: > http://thread.gmane.org/gmane.comp.python.devel/109919 > > Looks it's really lead laden rather than unladen. An interpreter binary is > over 100 MB (as opposed to the original CPython one which is less than 10). > More details in the PEP in the above email thread. > > I sense a disturbance in the force. > I read through the entire thread. The PEP is detailed, descriptive and Collin has done a thorough job of discussing the pluses and minuses of this approach. I don't see why the PEP should not be accepted. What disappoints me is the amount of "performance improvement" they have achieved. With most workloads he is testing on, what I see is an average of 1.5x perf increase, that too on a super muscled box. The minuses are more what with the average memory increase of 2.5x and mammoth executable size of 128 MB on 64 bit! Basically if Collin is expecting a warm hug from pydev for this PEP he is never going to get it, at best a lukewarm response or most likely a *shrug*. As I made a point earlier, they seemed to have assumed LLVM was a silver bullet and it turned out to have its own problems which they had to spend fixing. Also the approach of LLVM analysis of every code path has to be optimized, and unboxing is required for most numerical work-loads. The addition of a C++ API to CPython is a rather bitter pill to swallow IMHO :) > > > -- > ~noufal > http://nibrahim.net.in > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- --Anand From lawgon at au-kbc.org Thu Jan 21 07:55:39 2010 From: lawgon at au-kbc.org (Kenneth Gonsalves) Date: Thu, 21 Jan 2010 12:25:39 +0530 Subject: [BangPypers] conversion of odt to moinmoin Message-ID: <201001211225.39310.lawgon@au-kbc.org> hi, I know there is an utility to convert odt to moinmoin format - cannot find it. Any one knows? -- regards Kenneth Gonsalves Senior Project Officer NRC-FOSS http://nrcfosshelpline.in/web/ From orsenthil at gmail.com Thu Jan 21 08:17:02 2010 From: orsenthil at gmail.com (Senthil Kumaran) Date: Thu, 21 Jan 2010 12:47:02 +0530 Subject: [BangPypers] The merge : Unladen Swallow into CPython In-Reply-To: <8548c5f31001202240k71e43017gc2d32d7529cdb68a@mail.gmail.com> References: <9963e56e1001202129m712dd861ue63bffe0519da2aa@mail.gmail.com> <8548c5f31001202240k71e43017gc2d32d7529cdb68a@mail.gmail.com> Message-ID: <20100121071702.GA4679@ubuntu.ubuntu-domain> On Thu, Jan 21, 2010 at 12:10:56PM +0530, Anand Balachandran Pillai wrote: > I read through the entire thread. The PEP is detailed, descriptive and > Collin has done a thorough job of discussing the pluses and minuses > of this approach. I don't see why the PEP should not be accepted. The PEP is very detailed and covers a wide range of topics and performance improvements. As you said, I see a slight increase in performance in many different fronts, but not really things which justify the inclusion of LLVM. Also, as I have no idea of LLVM at the moment, I personally don't have much thoughts on it, except that I would like to try and see how things work out with UnSw included. My personal thoughts from libraries front is, the change is going to be transparent to the library developers, but it should be interesting to try out UnSw included Python Interpretor. It was good to see MvL +1 on that. Lets jump to python-dev for more action. :) -- Senthil Children are unpredictable. You never know what inconsistency they're going to catch you in next. -- Franklin P. Jones From lawgon at au-kbc.org Thu Jan 21 08:25:24 2010 From: lawgon at au-kbc.org (Kenneth Gonsalves) Date: Thu, 21 Jan 2010 12:55:24 +0530 Subject: [BangPypers] conversion of odt to moinmoin In-Reply-To: <201001211225.39310.lawgon@au-kbc.org> References: <201001211225.39310.lawgon@au-kbc.org> Message-ID: <201001211255.24906.lawgon@au-kbc.org> On Thursday 21 Jan 2010 12:25:39 pm Kenneth Gonsalves wrote: > hi, > > I know there is an utility to convert odt to moinmoin format - cannot find > it. Any one knows? > I found this: http://www.ooowiki.de/Writer2MoinMoin#Instructions_in_English but it crashes with a runtime error. -- regards Kenneth Gonsalves Senior Project Officer NRC-FOSS http://nrcfosshelpline.in/web/ From abpillai at gmail.com Thu Jan 21 14:05:23 2010 From: abpillai at gmail.com (Anand Balachandran Pillai) Date: Thu, 21 Jan 2010 18:35:23 +0530 Subject: [BangPypers] The merge : Unladen Swallow into CPython In-Reply-To: <20100121071702.GA4679@ubuntu.ubuntu-domain> References: <9963e56e1001202129m712dd861ue63bffe0519da2aa@mail.gmail.com> <8548c5f31001202240k71e43017gc2d32d7529cdb68a@mail.gmail.com> <20100121071702.GA4679@ubuntu.ubuntu-domain> Message-ID: <8548c5f31001210505g6cc0fe0bvdf5c140ff6cbd397@mail.gmail.com> On Thu, Jan 21, 2010 at 12:47 PM, Senthil Kumaran wrote: > On Thu, Jan 21, 2010 at 12:10:56PM +0530, Anand Balachandran Pillai wrote: > > I read through the entire thread. The PEP is detailed, descriptive and > > Collin has done a thorough job of discussing the pluses and minuses > > of this approach. I don't see why the PEP should not be accepted. > > The PEP is very detailed and covers a wide range of topics and > performance improvements. As you said, I see a slight increase in > performance in many different fronts, but not really things which > justify the inclusion of LLVM. > > Also, as I have no idea of LLVM at the moment, I personally don't have > much thoughts on it, except that I would like to try and see how > things work out with UnSw included. > > My personal thoughts from libraries front is, the change is going to > be transparent to the library developers, but it should be interesting > to try out UnSw included Python Interpretor. > > It was good to see MvL +1 on that. Lets jump to python-dev for more > action. :) > Antoine Pitrou just replied in the thread. And he says... :) > We seek guidance from the community on > an acceptable level of increased memory usage. I think a 10-20% increase would be acceptable Bingo! I don't see much chances of U.S going in to CPython in its current state. > > -- > Senthil > Children are unpredictable. You never know what inconsistency they're > going to catch you in next. > -- Franklin P. Jones > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- --Anand From dhananjay.nene at gmail.com Thu Jan 21 14:27:06 2010 From: dhananjay.nene at gmail.com (Dhananjay Nene) Date: Thu, 21 Jan 2010 18:57:06 +0530 Subject: [BangPypers] The merge : Unladen Swallow into CPython In-Reply-To: <8548c5f31001202240k71e43017gc2d32d7529cdb68a@mail.gmail.com> References: <9963e56e1001202129m712dd861ue63bffe0519da2aa@mail.gmail.com> <8548c5f31001202240k71e43017gc2d32d7529cdb68a@mail.gmail.com> Message-ID: On Thu, Jan 21, 2010 at 12:10 PM, Anand Balachandran Pillai < abpillai at gmail.com> wrote: > On Thu, Jan 21, 2010 at 10:59 AM, Noufal Ibrahim wrote: > > > http://thread.gmane.org/gmane.comp.python.devel/109919 > > > > Looks it's really lead laden rather than unladen. An interpreter binary > is > > over 100 MB (as opposed to the original CPython one which is less than > 10). > > More details in the PEP in the above email thread. > > > > I sense a disturbance in the force. > > > > I read through the entire thread. The PEP is detailed, descriptive and > Collin has done a thorough job of discussing the pluses and minuses > of this approach. I don't see why the PEP should not be accepted. > > What disappoints me is the amount of "performance improvement" they > have achieved. With most workloads he is testing on, what I see is an > average of 1.5x perf increase, that too on a super muscled box. The > minuses are more what with the average memory increase of > 2.5x and mammoth executable size of 128 MB on 64 bit! > > Basically if Collin is expecting a warm hug from pydev for this PEP > he is never going to get it, at best a lukewarm response or most likely > a *shrug*. > > I think the comparison of a VM enhanced CPython vs. traditional CPython is a little unfair when conducted from a binary size perspective (and not particularly critical imo). The actual python application code binary size isn't changing - which is what should matter. I also believe the performance improvements talked about are perhaps only the floor level improvements with many more to come over a period of time (if Java VM performance improvements over time are anything to benchmark by). If as suggested in the PEP the anticipated performance gains in the future can exceed the 5x mark (a claim which would perhaps need some leap of faith), then I for one would look forward to this. > > > > > > > -- > > ~noufal > > http://nibrahim.net.in > > _______________________________________________ > > BangPypers mailing list > > BangPypers at python.org > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > > -- > --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 http://twitter.com/_pythonic From noufal at gmail.com Thu Jan 21 15:27:32 2010 From: noufal at gmail.com (Noufal Ibrahim) Date: Thu, 21 Jan 2010 19:57:32 +0530 Subject: [BangPypers] The merge : Unladen Swallow into CPython In-Reply-To: References: <9963e56e1001202129m712dd861ue63bffe0519da2aa@mail.gmail.com> <8548c5f31001202240k71e43017gc2d32d7529cdb68a@mail.gmail.com> Message-ID: <9963e56e1001210627g288f2beai62e03ddf0d7f952b@mail.gmail.com> On Thu, Jan 21, 2010 at 6:57 PM, Dhananjay Nene wrote: > [..] > > I think the comparison of a VM enhanced CPython vs. traditional CPython > is > a little unfair when conducted from a binary size perspective (and not > particularly critical imo). The actual python application code binary size > isn't changing - which is what should matter. > [..] Hardly. I'm investigating embedding a subset of the interpreter on a hardware device. If it's a 100 MB binary, that's out of the question! -- ~noufal http://nibrahim.net.in From orsenthil at gmail.com Thu Jan 21 15:29:50 2010 From: orsenthil at gmail.com (Senthil Kumaran) Date: Thu, 21 Jan 2010 19:59:50 +0530 Subject: [BangPypers] The merge : Unladen Swallow into CPython In-Reply-To: <8548c5f31001210505g6cc0fe0bvdf5c140ff6cbd397@mail.gmail.com> References: <9963e56e1001202129m712dd861ue63bffe0519da2aa@mail.gmail.com> <8548c5f31001202240k71e43017gc2d32d7529cdb68a@mail.gmail.com> <20100121071702.GA4679@ubuntu.ubuntu-domain> <8548c5f31001210505g6cc0fe0bvdf5c140ff6cbd397@mail.gmail.com> Message-ID: <20100121142950.GB4679@ubuntu.ubuntu-domain> On Thu, Jan 21, 2010 at 06:35:23PM +0530, Anand Balachandran Pillai wrote: > Antoine Pitrou just replied in the thread. And he says... :) > > > I think a 10-20% increase would be acceptable > > > > Bingo! I don't see much chances of U.S going in to CPython in > its current state. Yup. That hit the point. And also, on the size of the binary will be a major concern as he indicated. -- Senthil "OK, now let's look at four dimensions on the blackboard." -- Dr. Joy From dhananjay.nene at gmail.com Thu Jan 21 16:09:36 2010 From: dhananjay.nene at gmail.com (Dhananjay Nene) Date: Thu, 21 Jan 2010 20:39:36 +0530 Subject: [BangPypers] The merge : Unladen Swallow into CPython In-Reply-To: <9963e56e1001210627g288f2beai62e03ddf0d7f952b@mail.gmail.com> References: <9963e56e1001202129m712dd861ue63bffe0519da2aa@mail.gmail.com> <8548c5f31001202240k71e43017gc2d32d7529cdb68a@mail.gmail.com> <9963e56e1001210627g288f2beai62e03ddf0d7f952b@mail.gmail.com> Message-ID: On Thu, Jan 21, 2010 at 7:57 PM, Noufal Ibrahim wrote: > On Thu, Jan 21, 2010 at 6:57 PM, Dhananjay Nene >wrote: > > > [..] > > > I think the comparison of a VM enhanced CPython vs. traditional CPython > > is > > a little unfair when conducted from a binary size perspective (and not > > particularly critical imo). The actual python application code binary > size > > isn't changing - which is what should matter. > > [..] > > > Hardly. I'm investigating embedding a subset of the interpreter on a > hardware device. If it's a 100 MB binary, that's out of the question! > >From what I could understand the LLVM JIT functionality is optional and can be switched off. If so it might be feasible to do the same for low footprint requirement applications such as the one you refer to. Not compiling in a piece of functionality (in this case the JIT compiler) is not likely to be an unsatisfactory tradeoff imo. This assumes that LLVM/JIT features can be simply not compiled into the python binary. That should be feasible to the best of my interpretation. However if thats incorrect, my argument above is invalid. Dhananjay > > > -- > ~noufal > http://nibrahim.net.in > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- -------------------------------------------------------- blog: http://blog.dhananjaynene.com twitter: http://twitter.com/dnene http://twitter.com/_pythonic From anirudh.asokan at gmail.com Thu Jan 21 19:47:40 2010 From: anirudh.asokan at gmail.com (Anirudh Asokan) Date: Fri, 22 Jan 2010 00:17:40 +0530 Subject: [BangPypers] Python database interface Message-ID: <85f0a3231001211047l36819930ldd0a5b67a9f21ed9@mail.gmail.com> hey ter ppl... im bak wid more exotic newbie questions..... My question is pretty simple - How do i interact with a database within python? For this i installed postgres sql and its python's DB-API (py-postgresl)... somehow i managed to install in it. I could import pgdb module in python but when i run some code, for eg: anirudh at Kat:~$ python Python 2.6.4 (r264:75706, Dec 7 2009, 18:45:15) [GCC 4.4.1] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import pgdb >>> conn = pgdb.connect(host='localhost', user='postgres', password='xyz') >>> curs = conn.cursor() >>> curs.execute('CREATE TABLE ani(name char(20))') ---------------------------------------------------- it worked fine here! >>> curs.execute('INSERT ani VALUES (%s)', ('Lemur')) Traceback (most recent call last): File "", line 1, in File "build/bdist.linux-i686/egg/pgdb.py", line 259, in execute File "build/bdist.linux-i686/egg/pgdb.py", line 291, in executemany pg.OperationalError: internal error in 'BEGIN': not all arguments converted during string formatting >>> curs.execute('SELECT * FROM ani') >>> curs.execute('CREATE TABLE anizilla(name char(20))') -------------------------------------------- Same query but some porb. Traceback (most recent call last): File "", line 1, in File "build/bdist.linux-i686/egg/pgdb.py", line 259, in execute File "build/bdist.linux-i686/egg/pgdb.py", line 289, in executemany pg.DatabaseError: error 'ERROR: current transaction is aborted, commands ignored until end of transaction block ' in 'CREATE TABLE anizilla(name char(20))' >>> WHAT IS IT ALL ABOUT MANN!!!!?????? and bother to advice me on using mysql.... i already tried installing MySQLdb... but been highly unsuccessful.... says requires installin 'setuptools'...!?* PLS HELP ME!!! * -- Cheers, Anirudh Asokan From kausikram at gmail.com Thu Jan 21 20:17:05 2010 From: kausikram at gmail.com (kausikram krishnasayee) Date: Fri, 22 Jan 2010 00:47:05 +0530 Subject: [BangPypers] Python database interface In-Reply-To: <85f0a3231001211047l36819930ldd0a5b67a9f21ed9@mail.gmail.com> References: <85f0a3231001211047l36819930ldd0a5b67a9f21ed9@mail.gmail.com> Message-ID: <2597ddb91001211117j2ea1cbcv7db453163b1dacb6@mail.gmail.com> > > WHAT IS IT ALL ABOUT MANN!!!!?????? and bother to advice me on using > mysql.... i already tried installing MySQLdb... but been highly > unsuccessful.... says requires installin 'setuptools'...!?* > obviously you havent installed setuptools http://pypi.python.org/pypi/setuptools > PLS HELP ME!!! > Use abstractions. use sqlalchemy. http://www.sqlalchemy.org/ makes life much simpler. And a general request mann. lets refrain from using AOLish in the list. -- Kausikram Krishnasayee Company: http://silverstripesoftware.com | Webpage: kausikram.net | Blog: blog.kausikram.net | Twitter: http://twitter.com/kausikram | Email: kausikram at gmail.com | Mobile: +91 9884246490 From praveen.python.plone at gmail.com Thu Jan 21 20:43:00 2010 From: praveen.python.plone at gmail.com (Praveen Kumar) Date: Fri, 22 Jan 2010 01:13:00 +0530 Subject: [BangPypers] Python database interface In-Reply-To: <85f0a3231001211047l36819930ldd0a5b67a9f21ed9@mail.gmail.com> References: <85f0a3231001211047l36819930ldd0a5b67a9f21ed9@mail.gmail.com> Message-ID: <6305ec601001211143w6e7348b6pad89a78156028601@mail.gmail.com> >>> curs.execute('SELECT * FROM ani') >>> curs.execute('CREATE TABLE anizilla(name char(20))') ------------------------------ > > -------------- Same query but some porb. > Traceback (most recent call last): > File "", line 1, in > File "build/bdist.linux-i686/egg/pgdb.py", line 259, in execute > File "build/bdist.linux-i686/egg/pgdb.py", line 289, in executemany > pg.DatabaseError: error 'ERROR: current transaction is aborted, commands > ignored until end of transaction block > ' in 'CREATE TABLE anizilla(name char(20))' mySQL does not invalidate the current transaction when it encounters an error where postgres throws the error and do not run other query until the current transaction is not aborted. In this case you have to kill the transaction. >>i already tried installing MySQLdb... but been highly unsuccessful.... says requires installin 'setuptools'...!?* you need to install setuptools Cheers, Praveen On Fri, Jan 22, 2010 at 12:17 AM, Anirudh Asokan wrote: > hey ter ppl... im bak wid more exotic newbie questions..... > > My question is pretty simple - How do i interact with a database within > python? For this i installed postgres sql and its python's DB-API > (py-postgresl)... somehow i managed to install in it. I could import pgdb > module in python but when i run some code, for eg: > > anirudh at Kat:~$ python > Python 2.6.4 (r264:75706, Dec 7 2009, 18:45:15) > [GCC 4.4.1] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> import pgdb > >>> conn = pgdb.connect(host='localhost', user='postgres', password='xyz') > >>> curs = conn.cursor() > >>> curs.execute('CREATE TABLE ani(name char(20))') > ---------------------------------------------------- it worked fine here! > >>> curs.execute('INSERT ani VALUES (%s)', ('Lemur')) > Traceback (most recent call last): > File "", line 1, in > File "build/bdist.linux-i686/egg/pgdb.py", line 259, in execute > File "build/bdist.linux-i686/egg/pgdb.py", line 291, in executemany > pg.OperationalError: internal error in 'BEGIN': not all arguments converted > during string formatting > >>> curs.execute('SELECT * FROM ani') > >>> curs.execute('CREATE TABLE anizilla(name char(20))') > -------------------------------------------- Same query but some porb. > Traceback (most recent call last): > File "", line 1, in > File "build/bdist.linux-i686/egg/pgdb.py", line 259, in execute > File "build/bdist.linux-i686/egg/pgdb.py", line 289, in executemany > pg.DatabaseError: error 'ERROR: current transaction is aborted, commands > ignored until end of transaction block > ' in 'CREATE TABLE anizilla(name char(20))' > >>> > > > > WHAT IS IT ALL ABOUT MANN!!!!?????? and bother to advice me on using > mysql.... i already tried installing MySQLdb... but been highly > unsuccessful.... says requires installin 'setuptools'...!?* > > PLS HELP ME!!! > * > -- > Cheers, > Anirudh Asokan > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- Praveen Kumar +91 9620621342 http://praveensunsetpoint.wordpress.com Bangalore From noufal at gmail.com Fri Jan 22 12:49:33 2010 From: noufal at gmail.com (Noufal Ibrahim) Date: Fri, 22 Jan 2010 17:19:33 +0530 Subject: [BangPypers] January user group meeting In-Reply-To: <9963e56e1001192156p6f72c1ffgb3e91bf77e62feb5@mail.gmail.com> References: <9963e56e1001182239k3b798213q9f631cc446027ae4@mail.gmail.com> <63eb47a21001190433t189df0bl9d60a17924c2a057@mail.gmail.com> <49977f271001191009p7b9f48a4g6d43391439887b25@mail.gmail.com> <9963e56e1001191027v35b7a889l513aa88c28bd346b@mail.gmail.com> <49977f271001191034x401dd6a6rede11f9622500570@mail.gmail.com> <9963e56e1001192146k5c3abe2y14009c286f4ae406@mail.gmail.com> <9963e56e1001192156p6f72c1ffgb3e91bf77e62feb5@mail.gmail.com> Message-ID: <9963e56e1001220349o6b354e02s142a55cfd28a0b27@mail.gmail.com> Okay. This is set in stone. Hope to see you all there! On Wed, Jan 20, 2010 at 11:26 AM, Noufal Ibrahim wrote: > So are we decided? > > Date : Jan 23 > Time : 1530 > Venue : ThoughtWorks, Diamond District > Topics : Baiju - Buildbot > ???????? ? ? Noufal - py.test. > > Fine? Vishal had a -1 for 23. If there many others, we can change the date > to 24th. > > > > -- > ~noufal > http://nibrahim.net.in > -- ~noufal http://nibrahim.net.in From anirudh.asokan at gmail.com Fri Jan 22 16:26:24 2010 From: anirudh.asokan at gmail.com (Anirudh Asokan) Date: Fri, 22 Jan 2010 20:56:24 +0530 Subject: [BangPypers] installing MySQLdb Message-ID: <85f0a3231001220726x571ad3c6qcbb6977e9dea739b@mail.gmail.com> i installed setup tools, now when i try running mysqldb's setup.py this is what im gettin... anirudh at Kat:/$ sudo python /home/anirudh/Downloads/MySQL-python/setup.py Traceback (most recent call last): File "/home/anirudh/Downloads/MySQL-python/setup.py", line 15, in metadata, options = get_config() File "/home/anirudh/Downloads/MySQL-python/setup_posix.py", line 32, in get_config metadata, options = get_metadata_and_options() File "/home/anirudh/Downloads/MySQL-python/setup_common.py", line 7, in get_metadata_and_options metadata = dict(config.items('metadata')) File "/usr/lib/python2.6/ConfigParser.py", line 564, in items raise NoSectionError(section) ConfigParser.NoSectionError: No section: 'metadata' -- Cheers, Anirudh Asokan www.anirudh.ind.in From kausikram at gmail.com Fri Jan 22 17:26:12 2010 From: kausikram at gmail.com (kausikram krishnasayee) Date: Fri, 22 Jan 2010 21:56:12 +0530 Subject: [BangPypers] installing MySQLdb In-Reply-To: <85f0a3231001220726x571ad3c6qcbb6977e9dea739b@mail.gmail.com> References: <85f0a3231001220726x571ad3c6qcbb6977e9dea739b@mail.gmail.com> Message-ID: <2597ddb91001220826k1f6d8d56w676ea2d93b1ec899@mail.gmail.com> On Fri, Jan 22, 2010 at 8:56 PM, Anirudh Asokan wrote: > i installed setup tools, now when i try running mysqldb's setup.py this is > what im gettin... > > anirudh at Kat:/$ sudo python /home/anirudh/Downloads/MySQL-python/setup.py Anirudh, i appreciate your enthusiasm, but please check the documentation before shooting a question to the mailing list. you obviously have note. the docs says refer README for installation notes and then the README says very nicely Finally, putting it together:: > $ tar xfz MySQL-python-1.2.1.tar.gz $ cd MySQL-python-1.2.1 $ # edit site.cfg if necessary $ python setup.py build $ sudo python setup.py install # or su first please use the mailing list wisely. -- Kausikram Krishnasayee Company: http://silverstripesoftware.com | Webpage: kausikram.net | Blog: blog.kausikram.net | Twitter: http://twitter.com/kausikram | Email: kausikram at gmail.com | Mobile: +91 9884246490 From sridhar.ratna at gmail.com Fri Jan 22 23:37:37 2010 From: sridhar.ratna at gmail.com (Sridhar Ratnakumar) Date: Fri, 22 Jan 2010 14:37:37 -0800 Subject: [BangPypers] January user group meeting In-Reply-To: <9963e56e1001182341j11a81d60qdd3605a8a62b4c2b@mail.gmail.com> References: <9963e56e1001182239k3b798213q9f631cc446027ae4@mail.gmail.com> <9963e56e1001182341j11a81d60qdd3605a8a62b4c2b@mail.gmail.com> Message-ID: <7c73a13a1001221437y61f81966yd9de298952572661@mail.gmail.com> On Mon, Jan 18, 2010 at 11:41 PM, Noufal Ibrahim wrote: > On Tue, Jan 19, 2010 at 12:47 PM, Baiju M wrote: > >> On Tue, Jan 19, 2010 at 12:09 PM, Noufal Ibrahim wrote: >> > Any ideas? Suggestions? Presentations? Sessions? It would be on 23/24th. >> >> I am fine with 23rd/24th. >> >> I can give a demo about using collective.buildbot for setting >> up buildbot (Continuous integration server) >> >> http://pypi.python.org/pypi/collective.buildbot >> >> 15 minutes would be fine. >> > > I'm setting up buildbot here at my workplace for CI as well. We're also > using py.test and are customising it to run the tests. I can give a short > intro on that (although I've played with it only for a few days). > Do you folks upload the presentation/audio/video somewhere? I am much interested in the buildbot talks. -srid From jeffjosejeff at gmail.com Sat Jan 23 00:38:17 2010 From: jeffjosejeff at gmail.com (Jeffrey Jose) Date: Sat, 23 Jan 2010 05:08:17 +0530 Subject: [BangPypers] January user group meeting In-Reply-To: <7c73a13a1001221437y61f81966yd9de298952572661@mail.gmail.com> References: <9963e56e1001182239k3b798213q9f631cc446027ae4@mail.gmail.com> <9963e56e1001182341j11a81d60qdd3605a8a62b4c2b@mail.gmail.com> <7c73a13a1001221437y61f81966yd9de298952572661@mail.gmail.com> Message-ID: > > Do you folks upload the presentation/audio/video somewhere? I am much > interested in the buildbot talks. > > -srid On Tue, Jan 19, 2010 at 10:37 PM, Jeffrey Jose wrote: > Unfortunately I wont be able to attend, @Baiju, will you be making your talk > available online? I am afraid that would be possible as we don't have facilities for that. And it's not going to be very formal talk. Regards, Baiju M Jeff From mbaiju at zeomega.com Sat Jan 23 03:37:25 2010 From: mbaiju at zeomega.com (Baiju M) Date: Sat, 23 Jan 2010 08:07:25 +0530 Subject: [BangPypers] January user group meeting In-Reply-To: References: <9963e56e1001182239k3b798213q9f631cc446027ae4@mail.gmail.com> <9963e56e1001182341j11a81d60qdd3605a8a62b4c2b@mail.gmail.com> <7c73a13a1001221437y61f81966yd9de298952572661@mail.gmail.com> Message-ID: On Sat, Jan 23, 2010 at 5:08 AM, Jeffrey Jose wrote: >> >> Do you folks upload the presentation/audio/video somewhere? I am much >> interested in the buildbot talks. This is not really a talk about buildbot itself. But how to setup buildbot using collective.buildbot ( http://pypi.python.org/pypi/collective.buildbot ) Actually I have mentioned this in my first mail, but when Noufal listed, he just used buildbot. That's fine :) I hope this clarify things. Regards, Baiju M From noufal at gmail.com Sat Jan 23 04:42:48 2010 From: noufal at gmail.com (Noufal Ibrahim) Date: Sat, 23 Jan 2010 09:12:48 +0530 Subject: [BangPypers] January user group meeting In-Reply-To: References: <9963e56e1001182239k3b798213q9f631cc446027ae4@mail.gmail.com> <9963e56e1001182341j11a81d60qdd3605a8a62b4c2b@mail.gmail.com> <7c73a13a1001221437y61f81966yd9de298952572661@mail.gmail.com> Message-ID: <9963e56e1001221942i42405433p66a9ff0e71420bc2@mail.gmail.com> On Sat, Jan 23, 2010 at 8:07 AM, Baiju M wrote: > On Sat, Jan 23, 2010 at 5:08 AM, Jeffrey Jose wrote: >>> >>> Do you folks upload the presentation/audio/video somewhere? I am much >>> interested in the buildbot talks. > > This is not really a talk about buildbot itself. ?But how to setup > buildbot using > collective.buildbot ( http://pypi.python.org/pypi/collective.buildbot ) > > Actually I have mentioned this in my first mail, but when Noufal listed, > he just used buildbot. ?That's fine :) I hope this clarify things. [..] My mistake. I've been using plain buildbot recently so I didn't read your mail carefully. :) -- ~noufal http://nibrahim.net.in From mbaiju at zeomega.com Sat Jan 23 05:51:02 2010 From: mbaiju at zeomega.com (Baiju M) Date: Sat, 23 Jan 2010 10:21:02 +0530 Subject: [BangPypers] January user group meeting In-Reply-To: <9963e56e1001221942i42405433p66a9ff0e71420bc2@mail.gmail.com> References: <9963e56e1001182239k3b798213q9f631cc446027ae4@mail.gmail.com> <9963e56e1001182341j11a81d60qdd3605a8a62b4c2b@mail.gmail.com> <7c73a13a1001221437y61f81966yd9de298952572661@mail.gmail.com> <9963e56e1001221942i42405433p66a9ff0e71420bc2@mail.gmail.com> Message-ID: I like buildbot, but I don't like the inperative nature of plain buildbot configuration. The collective.buildbot provides a declarative configuration for buildbot. From sriramnrn at gmail.com Sat Jan 23 06:16:03 2010 From: sriramnrn at gmail.com (Sriram Narayanan) Date: Sat, 23 Jan 2010 10:46:03 +0530 Subject: [BangPypers] January user group meeting In-Reply-To: <7c73a13a1001221437y61f81966yd9de298952572661@mail.gmail.com> References: <9963e56e1001182239k3b798213q9f631cc446027ae4@mail.gmail.com> <9963e56e1001182341j11a81d60qdd3605a8a62b4c2b@mail.gmail.com> <7c73a13a1001221437y61f81966yd9de298952572661@mail.gmail.com> Message-ID: <49977f271001222116u2fcbb6a5y650fe13da30b8d5d@mail.gmail.com> On Sat, Jan 23, 2010 at 4:07 AM, Sridhar Ratnakumar wrote: > > Do you folks upload the presentation/audio/video somewhere? I am much > interested in the buildbot talks. I'm getting my camera along. We'll record the video and then figure out how to get it online. -- Sriram From mbaiju at zeomega.com Sat Jan 23 06:49:35 2010 From: mbaiju at zeomega.com (Baiju M) Date: Sat, 23 Jan 2010 11:19:35 +0530 Subject: [BangPypers] January user group meeting In-Reply-To: References: <9963e56e1001182239k3b798213q9f631cc446027ae4@mail.gmail.com> <9963e56e1001182341j11a81d60qdd3605a8a62b4c2b@mail.gmail.com> <7c73a13a1001221437y61f81966yd9de298952572661@mail.gmail.com> Message-ID: On Sat, Jan 23, 2010 at 8:07 AM, Baiju M wrote: > On Sat, Jan 23, 2010 at 5:08 AM, Jeffrey Jose wrote: >>> >>> Do you folks upload the presentation/audio/video somewhere? I am much >>> interested in the buildbot talks. > > This is not really a talk about buildbot itself. ?But how to setup > buildbot using > collective.buildbot ( http://pypi.python.org/pypi/collective.buildbot ) Today morning I downloaded vxidcap and recorded this : http://screencasts.muthukadan.net/collective_buildbot.swf Enjoy ! Regards, Baiju M From arunnext at hotmail.com Sat Jan 23 09:45:23 2010 From: arunnext at hotmail.com (jayaraman arun kumar) Date: Sat, 23 Jan 2010 08:45:23 +0000 Subject: [BangPypers] BangPypers Digest, Vol 29, Issue 29 In-Reply-To: References: Message-ID: Is python getting Merged with GO !!! Regards, Arun > From: bangpypers-request at python.org > Subject: BangPypers Digest, Vol 29, Issue 29 > To: bangpypers at python.org > Date: Sat, 23 Jan 2010 04:42:50 +0100 > > 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. Re: January user group meeting (Noufal Ibrahim) > 2. installing MySQLdb (Anirudh Asokan) > 3. Re: installing MySQLdb (kausikram krishnasayee) > 4. Re: January user group meeting (Sridhar Ratnakumar) > 5. Re: January user group meeting (Jeffrey Jose) > 6. Re: January user group meeting (Baiju M) > 7. Re: January user group meeting (Noufal Ibrahim) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Fri, 22 Jan 2010 17:19:33 +0530 > From: Noufal Ibrahim > To: Bangalore Python Users Group - India > Subject: Re: [BangPypers] January user group meeting > Message-ID: > <9963e56e1001220349o6b354e02s142a55cfd28a0b27 at mail.gmail.com> > Content-Type: text/plain; charset=ISO-8859-1 > > Okay. This is set in stone. Hope to see you all there! > > On Wed, Jan 20, 2010 at 11:26 AM, Noufal Ibrahim wrote: > > So are we decided? > > > > Date : Jan 23 > > Time : 1530 > > Venue : ThoughtWorks, Diamond District > > Topics : Baiju - Buildbot > > ???????? ? ? Noufal - py.test. > > > > Fine? Vishal had a -1 for 23. If there many others, we can change the date > > to 24th. > > > > > > > > -- > > ~noufal > > http://nibrahim.net.in > > > > > > -- > ~noufal > http://nibrahim.net.in > > > ------------------------------ > > Message: 2 > Date: Fri, 22 Jan 2010 20:56:24 +0530 > From: Anirudh Asokan > To: bangpypers at python.org > Subject: [BangPypers] installing MySQLdb > Message-ID: > <85f0a3231001220726x571ad3c6qcbb6977e9dea739b at mail.gmail.com> > Content-Type: text/plain; charset=ISO-8859-1 > > i installed setup tools, now when i try running mysqldb's setup.py this is > what im gettin... > > anirudh at Kat:/$ sudo python /home/anirudh/Downloads/MySQL-python/setup.py > Traceback (most recent call last): > File "/home/anirudh/Downloads/MySQL-python/setup.py", line 15, in > metadata, options = get_config() > File "/home/anirudh/Downloads/MySQL-python/setup_posix.py", line 32, in > get_config > metadata, options = get_metadata_and_options() > File "/home/anirudh/Downloads/MySQL-python/setup_common.py", line 7, in > get_metadata_and_options > metadata = dict(config.items('metadata')) > File "/usr/lib/python2.6/ConfigParser.py", line 564, in items > raise NoSectionError(section) > ConfigParser.NoSectionError: No section: 'metadata' > > > -- > Cheers, > Anirudh Asokan > www.anirudh.ind.in > > > ------------------------------ > > Message: 3 > Date: Fri, 22 Jan 2010 21:56:12 +0530 > From: kausikram krishnasayee > To: Bangalore Python Users Group - India > Subject: Re: [BangPypers] installing MySQLdb > Message-ID: > <2597ddb91001220826k1f6d8d56w676ea2d93b1ec899 at mail.gmail.com> > Content-Type: text/plain; charset=UTF-8 > > On Fri, Jan 22, 2010 at 8:56 PM, Anirudh Asokan wrote: > > > i installed setup tools, now when i try running mysqldb's setup.py this is > > what im gettin... > > > > anirudh at Kat:/$ sudo python /home/anirudh/Downloads/MySQL-python/setup.py > > > Anirudh, i appreciate your enthusiasm, but please check the documentation > before shooting a question to the mailing list. you obviously have note. the > docs says refer README for installation notes and then the README says very > nicely > > Finally, putting it together:: > > > > $ tar xfz MySQL-python-1.2.1.tar.gz > > $ cd MySQL-python-1.2.1 > > $ # edit site.cfg if necessary > > $ python setup.py build > > $ sudo python setup.py install # or su first > > > please use the mailing list wisely. > > > -- > Kausikram Krishnasayee > Company: http://silverstripesoftware.com | Webpage: kausikram.net | Blog: > blog.kausikram.net | Twitter: http://twitter.com/kausikram | Email: > kausikram at gmail.com | Mobile: +91 9884246490 > > > ------------------------------ > > Message: 4 > Date: Fri, 22 Jan 2010 14:37:37 -0800 > From: Sridhar Ratnakumar > To: Bangalore Python Users Group - India > Subject: Re: [BangPypers] January user group meeting > Message-ID: > <7c73a13a1001221437y61f81966yd9de298952572661 at mail.gmail.com> > Content-Type: text/plain; charset=ISO-8859-1 > > On Mon, Jan 18, 2010 at 11:41 PM, Noufal Ibrahim wrote: > > On Tue, Jan 19, 2010 at 12:47 PM, Baiju M wrote: > > > >> On Tue, Jan 19, 2010 at 12:09 PM, Noufal Ibrahim wrote: > >> > Any ideas? Suggestions? Presentations? Sessions? It would be on 23/24th. > >> > >> I am fine with 23rd/24th. > >> > >> I can give a demo about using collective.buildbot for setting > >> up buildbot (Continuous integration server) > >> > >> http://pypi.python.org/pypi/collective.buildbot > >> > >> 15 minutes would be fine. > >> > > > > I'm setting up buildbot here at my workplace for CI as well. We're also > > using py.test and are customising it to run the tests. I can give a short > > intro on that (although I've played with it only for a few days). > > > > Do you folks upload the presentation/audio/video somewhere? I am much > interested in the buildbot talks. > > -srid > > > ------------------------------ > > Message: 5 > Date: Sat, 23 Jan 2010 05:08:17 +0530 > From: Jeffrey Jose > To: Bangalore Python Users Group - India > Subject: Re: [BangPypers] January user group meeting > Message-ID: > > Content-Type: text/plain; charset=ISO-8859-1 > > > > > Do you folks upload the presentation/audio/video somewhere? I am much > > interested in the buildbot talks. > > > > -srid > > > On Tue, Jan 19, 2010 at 10:37 PM, Jeffrey Jose > wrote: > > Unfortunately I wont be able to attend, @Baiju, will you be making your > talk > > available online? > > I am afraid that would be possible as we don't have facilities for that. > And it's not going to be very formal talk. > > Regards, > Baiju M > > > Jeff > > > ------------------------------ > > Message: 6 > Date: Sat, 23 Jan 2010 08:07:25 +0530 > From: Baiju M > To: Bangalore Python Users Group - India > Subject: Re: [BangPypers] January user group meeting > Message-ID: > > Content-Type: text/plain; charset=ISO-8859-1 > > On Sat, Jan 23, 2010 at 5:08 AM, Jeffrey Jose wrote: > >> > >> Do you folks upload the presentation/audio/video somewhere? I am much > >> interested in the buildbot talks. > > This is not really a talk about buildbot itself. But how to setup > buildbot using > collective.buildbot ( http://pypi.python.org/pypi/collective.buildbot ) > > Actually I have mentioned this in my first mail, but when Noufal listed, > he just used buildbot. That's fine :) I hope this clarify things. > > Regards, > Baiju M > > > ------------------------------ > > Message: 7 > Date: Sat, 23 Jan 2010 09:12:48 +0530 > From: Noufal Ibrahim > To: Bangalore Python Users Group - India > Subject: Re: [BangPypers] January user group meeting > Message-ID: > <9963e56e1001221942i42405433p66a9ff0e71420bc2 at mail.gmail.com> > Content-Type: text/plain; charset=ISO-8859-1 > > On Sat, Jan 23, 2010 at 8:07 AM, Baiju M wrote: > > On Sat, Jan 23, 2010 at 5:08 AM, Jeffrey Jose wrote: > >>> > >>> Do you folks upload the presentation/audio/video somewhere? I am much > >>> interested in the buildbot talks. > > > > This is not really a talk about buildbot itself. ?But how to setup > > buildbot using > > collective.buildbot ( http://pypi.python.org/pypi/collective.buildbot ) > > > > Actually I have mentioned this in my first mail, but when Noufal listed, > > he just used buildbot. ?That's fine :) I hope this clarify things. > [..] > > My mistake. I've been using plain buildbot recently so I didn't read > your mail carefully. :) > > > -- > ~noufal > http://nibrahim.net.in > > > ------------------------------ > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > > > End of BangPypers Digest, Vol 29, Issue 29 > ****************************************** _________________________________________________________________ Windows 7: Find the right PC for you. Learn more. http://windows.microsoft.com/shop From mbaiju at zeomega.com Sat Jan 23 10:10:15 2010 From: mbaiju at zeomega.com (Baiju M) Date: Sat, 23 Jan 2010 14:40:15 +0530 Subject: [BangPypers] BangPypers Digest, Vol 29, Issue 29 In-Reply-To: References: Message-ID: Please do not reply to full message digest. From ardsrk at gmail.com Sat Jan 23 15:42:13 2010 From: ardsrk at gmail.com (Arvind Jamuna Dixit) Date: Sat, 23 Jan 2010 20:12:13 +0530 Subject: [BangPypers] January user group meeting In-Reply-To: <9963e56e1001220349o6b354e02s142a55cfd28a0b27@mail.gmail.com> References: <9963e56e1001182239k3b798213q9f631cc446027ae4@mail.gmail.com> <49977f271001191009p7b9f48a4g6d43391439887b25@mail.gmail.com> <9963e56e1001191027v35b7a889l513aa88c28bd346b@mail.gmail.com> <49977f271001191034x401dd6a6rede11f9622500570@mail.gmail.com> <9963e56e1001192146k5c3abe2y14009c286f4ae406@mail.gmail.com> <9963e56e1001192156p6f72c1ffgb3e91bf77e62feb5@mail.gmail.com> <9963e56e1001220349o6b354e02s142a55cfd28a0b27@mail.gmail.com> Message-ID: <3d62196a1001230642m4c87571akd1bc91436c167d00@mail.gmail.com> How did the meet go. Couldn't come as I got stuck in MG Road traffic. On Fri, Jan 22, 2010 at 5:19 PM, Noufal Ibrahim wrote: > Okay. This is set in stone. Hope to see you all there! > > On Wed, Jan 20, 2010 at 11:26 AM, Noufal Ibrahim wrote: > > So are we decided? > > > > Date : Jan 23 > > Time : 1530 > > Venue : ThoughtWorks, Diamond District > > Topics : Baiju - Buildbot > > Noufal - py.test. > > > > Fine? Vishal had a -1 for 23. If there many others, we can change the > date > > to 24th. > > > > > > > > -- > > ~noufal > > http://nibrahim.net.in > > > > > > -- > ~noufal > http://nibrahim.net.in > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- Arvind From noufal at gmail.com Sat Jan 23 17:18:28 2010 From: noufal at gmail.com (Noufal Ibrahim) Date: Sat, 23 Jan 2010 21:48:28 +0530 Subject: [BangPypers] January user group meeting In-Reply-To: <3d62196a1001230642m4c87571akd1bc91436c167d00@mail.gmail.com> References: <9963e56e1001182239k3b798213q9f631cc446027ae4@mail.gmail.com> <49977f271001191009p7b9f48a4g6d43391439887b25@mail.gmail.com> <9963e56e1001191027v35b7a889l513aa88c28bd346b@mail.gmail.com> <49977f271001191034x401dd6a6rede11f9622500570@mail.gmail.com> <9963e56e1001192146k5c3abe2y14009c286f4ae406@mail.gmail.com> <9963e56e1001192156p6f72c1ffgb3e91bf77e62feb5@mail.gmail.com> <9963e56e1001220349o6b354e02s142a55cfd28a0b27@mail.gmail.com> <3d62196a1001230642m4c87571akd1bc91436c167d00@mail.gmail.com> Message-ID: <9963e56e1001230818k371ce2a3lfda7be0addbeec47@mail.gmail.com> On Sat, Jan 23, 2010 at 8:12 PM, Arvind Jamuna Dixit wrote: > How did the meet go. Couldn't come as I got stuck in MG Road traffic.[..] Pretty well. Baiju's presentation on using using buildout to easily configure buildbot was nice. I also learnt that if you 'activate' a virtualenv, you get a 'deactivate' command to go back to your system wide install. Neat. :) -- ~noufal http://nibrahim.net.in From learningpython at aol.com Sun Jan 24 00:04:20 2010 From: learningpython at aol.com (learningpython at aol.com) Date: Sat, 23 Jan 2010 18:04:20 -0500 Subject: [BangPypers] Python Maintainence code: Debugging, Tracing and Profiling help Message-ID: <8CC6A97879CFBD3-124C-2081B@webmail-d010.sysops.aol.com> Hi Experts, I am back to python after a while of just formal introduction. Thistime i have to manage a huge files with numerous functions, i amdebugging a issue right now and would require to understand the flow ofthe code. Please can you help me on what can i do to have better understanding ofthe profiling of classes, defs invoked each time and how to read them. The ones i plan to do is to insert lot of prints in every class, defs ex: print self.__class__.__name__ in every def, to see the flow which is tedious and time consuming as the size of files and project is huge. Any suggestions please and advice please. PS: how to post to comp.lang.python newsgroup please?? Cheers Anand From jeffjosejeff at gmail.com Sun Jan 24 09:05:13 2010 From: jeffjosejeff at gmail.com (Jeffrey Jose) Date: Sun, 24 Jan 2010 13:35:13 +0530 Subject: [BangPypers] Python Maintainence code: Debugging, Tracing and Profiling help In-Reply-To: <8CC6A97879CFBD3-124C-2081B@webmail-d010.sysops.aol.com> References: <8CC6A97879CFBD3-124C-2081B@webmail-d010.sysops.aol.com> Message-ID: Hi Anand, I can talk a lil bit about your 2 queries. Debugging and seeing the flow of the program. *A. Debugging* Surprisingly both of them come under the same banner. One of the reasons you debug is to see how the code progresses. For debugging I highly recommend Python Debugger. It would look a lot odd the first time you invoke it, but trust me with a few neat tricks you'd be using it all the time. There's just one thing you need to do to summon the Python Debugger. Insert this one line in your code. import pdb; pdb.set_trace() The next time you run the code, it would drop into the debugger (you just set a trace point). When you have the debugger prompt, you have access to all the variables, stacktrace etc. You need to know a few commands to get around. c -> Continue (till the end of the program or till the next breakpoint) n -> Execute next step l -> See where you are s -> Step into a function. I accept this is not a natural way of doing things.. That's where we come to the 'with-a-few-tricks-you'd-be-doing-this-all-the-time' And the trick is this. Invoke Ipython from pdb. The good thing is you get tab-competition (which pdb lacks). You can try out all kinds of things. Introspect, import other modules, try and see the next line and see what its output 'would be'. Its sweet. I highly recommend you take a look at this. Starting ipython from pdb- http://libreamoi.com/index.php/starting-ipython-from-pdb/ Hit Ctrl-D to exit from Ipython to go to pdb again and hit 'c' to continue the program. While you're at pdb, you can still go into ipython again. Remember Ipython is a regular prompt, so you cant do debugger-y things like Step Into, Continue etc. For that you'll have to come 'out' of Ipython to pdb. You can go back to Ipython anytime. *B. Seeing Your Program Flow* If I understand you correctly, I've seen this problem hit me lot of times. If you're working on others code, and all of a sudden you wanna understand/fix them - you'd be sitting there thinking - Damn, *how* does this code work. I can see a lot of functions and I get what it does. But when does this one get called. I see this main call from main() .. but is there another place where it gets called ?. If so what are the arguments. What does it return on this one specific call etc. While its technically possible to do next-next-next using Python Debugger to step through the program and sometimes that's all can you do. But there's a much better way than inserting print "Called me!" print "Done with me!" etc. The idea here is to use sys.settrace() to insert to a utility function which gets called before any important events. Events include, # execution of any line (that means all the time) # calling a function # return from a function # encountering an exception This means your utility function can go .. hmm .. is this a function call ? .. if so gimme the name of the caller and name of the function and let me print it. When you run the code you'd get a huge output with prints which shows the flow of the program. Again, refer this page for a better understanding. Tracing Your Program As It Runs - http://blog.doughellmann.com/2009/11/pymotw-sys-part-5-tracing-your-program.html One caution : Do Not Abuse sys.settrace() Use sys.settrace() for debugging only. You might be tempted to do crazy things like .. during every function call .. I'll authorize the user or something. That better be done using different methods. Just saying :) Unfortunately, the place where I work doesnt care much about performance (or unnecessary optimization) for the python code. So I cant help you there. I'll let others chip in for those stuff. HTH Jeff On Sun, Jan 24, 2010 at 4:34 AM, wrote: > > > > Hi Experts, > > I am back to python after a while of just formal introduction. Thistime i > have to manage a huge files with numerous functions, i am debugging a issue > right now and would require to understand the flow ofthe code. > > Please can you help me on what can i do to have better understanding ofthe > profiling of classes, defs invoked each time and how to read them. > > The ones i plan to do is to insert lot of prints in every class, defs ex: > print self.__class__.__name__ in every def, to see the flow which is tedious > and time consuming as the size of files and project is huge. > > Any suggestions please and advice please. > > PS: how to post to comp.lang.python newsgroup please?? > > > Cheers > Anand > > > > > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From hassan.baig at alumni.duke.edu Mon Jan 25 08:36:14 2010 From: hassan.baig at alumni.duke.edu (Hassan Baig) Date: Mon, 25 Jan 2010 12:36:14 +0500 Subject: [BangPypers] Python/Django issue In-Reply-To: <6fa835a81001242318s48e134b5ma9975af5bdd1e462@mail.gmail.com> References: <6fa835a81001242318s48e134b5ma9975af5bdd1e462@mail.gmail.com> Message-ID: <6fa835a81001242336t1b3c52d0wde38269b8953761a@mail.gmail.com> Dear Bangpypers, I hope you're all doing great. I was wondering if you could help out in a basic query. I'm a Facebook developer and I'm facing the following problem: I have a flash file which calls up a url say http://test.com/createXML/ which is caught and used up by a python/django code and it creates and redirects to an XML. which is loaded by flash, to get values from the database. The setup works fine when outside facebook, but as soon as I put the setup in facebook, it stops loading the XML completely. Any clues? -Hassan Baig From noufal at gmail.com Mon Jan 25 10:38:25 2010 From: noufal at gmail.com (Noufal Ibrahim) Date: Mon, 25 Jan 2010 15:08:25 +0530 Subject: [BangPypers] Python/Django issue In-Reply-To: <6fa835a81001242336t1b3c52d0wde38269b8953761a@mail.gmail.com> References: <6fa835a81001242318s48e134b5ma9975af5bdd1e462@mail.gmail.com> <6fa835a81001242336t1b3c52d0wde38269b8953761a@mail.gmail.com> Message-ID: <9963e56e1001250138u1e1e264er20c54918dfae3ecc@mail.gmail.com> On Mon, Jan 25, 2010 at 1:06 PM, Hassan Baig wrote: > Dear Bangpypers, > > I hope you're all doing great. I was wondering if you could help out in a > basic query. I'm a Facebook developer and I'm facing the following problem: > > I have a flash file which calls up a url say http://test.com/createXML/ which > is caught and used up by a python/django code and it creates and redirects > to an XML. which is loaded by flash, to get values from the database. > > The setup works fine when outside facebook, but as soon as I put the setup > in facebook, it stops loading the XML completely. > > Any clues? Shot in the dark but doesn't flash require some crossdomain.xml file to allow/disallow which domains you can fetch URLs from? Perhaps a misconfiguration there? Also, I didn't quite understand your setup. What do you mean by 'caught and used up' by a django app.? -- ~noufal http://nibrahim.net.in From praveen.python.plone at gmail.com Mon Jan 25 14:59:29 2010 From: praveen.python.plone at gmail.com (Praveen Kumar) Date: Mon, 25 Jan 2010 19:29:29 +0530 Subject: [BangPypers] Python/Django issue In-Reply-To: <6fa835a81001242336t1b3c52d0wde38269b8953761a@mail.gmail.com> References: <6fa835a81001242318s48e134b5ma9975af5bdd1e462@mail.gmail.com> <6fa835a81001242336t1b3c52d0wde38269b8953761a@mail.gmail.com> Message-ID: <6305ec601001250559p3da9fcb3o5653c620642e5be5@mail.gmail.com> I am not sure that may be the issue When you are running from a web server Flash has a security implemntation which only allows you to send and retreive information to the server that delivered the flash file. If you try to read information from another system (such as myurl.com) you will find that the XML files will work fine on your local machine, but will fail when you move them onto your web server. In nearly all browsers this is the server which the HTML file contains your flash file. However at least IE4.5 for the Mac, will only allow you to send and retrieve information to the server that contains the flash file. For this reason it is recommended that you place you flash file and HTML file on the same server. Thanks On Mon, Jan 25, 2010 at 1:06 PM, Hassan Baig wrote: > Dear Bangpypers, > > I hope you're all doing great. I was wondering if you could help out in a > basic query. I'm a Facebook developer and I'm facing the following problem: > > I have a flash file which calls up a url say http://test.com/createXML/which > is caught and used up by a python/django code and it creates and redirects > to an XML. which is loaded by flash, to get values from the database. > > The setup works fine when outside facebook, but as soon as I put the setup > in facebook, it stops loading the XML completely. > > Any clues? > > -Hassan Baig > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- Praveen Kumar +91 9620621342 http://praveensunsetpoint.wordpress.com Bangalore From noufal at gmail.com Mon Jan 25 15:51:27 2010 From: noufal at gmail.com (Noufal Ibrahim) Date: Mon, 25 Jan 2010 20:21:27 +0530 Subject: [BangPypers] Python/Django issue In-Reply-To: <6305ec601001250559p3da9fcb3o5653c620642e5be5@mail.gmail.com> References: <6fa835a81001242318s48e134b5ma9975af5bdd1e462@mail.gmail.com> <6fa835a81001242336t1b3c52d0wde38269b8953761a@mail.gmail.com> <6305ec601001250559p3da9fcb3o5653c620642e5be5@mail.gmail.com> Message-ID: <9963e56e1001250651u7241e567gafb7ea097caaf3a3@mail.gmail.com> On Mon, Jan 25, 2010 at 7:29 PM, Praveen Kumar wrote: [..] > However at least IE4.5 for the Mac, will only allow you to send and retrieve > information to the server that contains the flash file. > For this reason it is recommended that you place you flash file and HTML > file on the same server. >[..] Or use the crossdomain.xml file to specify from wher the flash applet can get/send data http://kb2.adobe.com/cps/142/tn_14213.html -- ~noufal http://nibrahim.net.in From pradeep at btbytes.com Mon Jan 25 16:21:35 2010 From: pradeep at btbytes.com (Pradeep Gowda) Date: Mon, 25 Jan 2010 10:21:35 -0500 Subject: [BangPypers] Python/Django issue In-Reply-To: <9963e56e1001250651u7241e567gafb7ea097caaf3a3@mail.gmail.com> References: <6fa835a81001242318s48e134b5ma9975af5bdd1e462@mail.gmail.com> <6fa835a81001242336t1b3c52d0wde38269b8953761a@mail.gmail.com> <6305ec601001250559p3da9fcb3o5653c620642e5be5@mail.gmail.com> <9963e56e1001250651u7241e567gafb7ea097caaf3a3@mail.gmail.com> Message-ID: <3e3294b71001250721j4951ff6asfdabe9a2f204e19d@mail.gmail.com> On Mon, Jan 25, 2010 at 9:51 AM, Noufal Ibrahim wrote: > On Mon, Jan 25, 2010 at 7:29 PM, Praveen Kumar > wrote: > [..] >> However at least IE4.5 for the Mac, will only allow you to send and retrieve >> information to the server that contains the flash file. >> For this reason it is recommended that you place you flash file and HTML >> file on the same server. >>[..] > > Or use the crossdomain.xml file to specify from wher the flash applet > can get/send data http://kb2.adobe.com/cps/142/tn_14213.html Assuming the answer is Flash cross domain policies: There is a Django product to make this easy. I use this: http://pypi.python.org/pypi/django-flashpolicies/ From zubin.mithra at gmail.com Mon Jan 25 16:48:52 2010 From: zubin.mithra at gmail.com (Zubin Mithra) Date: Mon, 25 Jan 2010 21:18:52 +0530 Subject: [BangPypers] InCTF notification Message-ID: <8e7c74321001250748r13232818y15c653ea78c8d892@mail.gmail.com> Reply to all Forward Reply by chat Filter messages like this Print Add Mail Delivery Subsystem to Contacts list Delete this message Report phishing Report not phishing Show original Show in fixed width font Show in variable width font Message text garbled? Why is this spam/nonspam? Hey, Named InCTF, we are organizing India`s first CTF style hacking contest this march :) Think you are good at Python? Think you can find vulnerabilities, patch and exploit them? The prizes are huge, though there`s more to be gained by participating. For details, check out http://inctf.amrita.ac.in ; for updates, follow "InCTF" on twitter. And if you feel that the event is not being publicized enough, well, help us around a bit by retweeting the tweets, and forwarding the announcement ;-) Have a nice day, folks. Hope to see you compete. Cheers!!! Team BIOS (as part of TIFAC-CORE) Amrita School Of Engineering, Amritapuri From admin.nitjece at gmail.com Wed Jan 27 13:35:24 2010 From: admin.nitjece at gmail.com (Diptanu Choudhury) Date: Wed, 27 Jan 2010 14:35:24 +0200 Subject: [BangPypers] What is the best Python Mock library Message-ID: Hi, We ran into a discussion this afternoon about the various Python Mocking Libraries. The popular one out there seems to be Mox(according to my colleagues), though I like Mock(python-mock). I would like to hear the views of the python veterans of this list about the popular mocking libraries! :-) -- Thanks, Diptanu Choudhury Just a Coder, ThoughtWorks India Mobile - 09886760964 Web - www.linkedin.com/in/diptanu From noufal at gmail.com Wed Jan 27 13:42:29 2010 From: noufal at gmail.com (Noufal Ibrahim) Date: Wed, 27 Jan 2010 18:12:29 +0530 Subject: [BangPypers] What is the best Python Mock library In-Reply-To: References: Message-ID: <9963e56e1001270442w6a55d4f7t35d1eb9c9beda0f8@mail.gmail.com> On Wed, Jan 27, 2010 at 6:05 PM, Diptanu Choudhury wrote: > Hi, > > We ran into a discussion this afternoon about the various Python Mocking > Libraries. The popular one out there seems to be Mox(according to > my colleagues), though I like Mock(python-mock). > > I would like to hear the views of the python veterans of this list about the > popular mocking libraries! :-) I recently needed one and looked through a few. I found the whole record/replay style a little weird and preferred a post mortem approach. With that in mind, I found http://www.voidspace.org.uk/python/mock/ quite nice and it's what I use. -- ~noufal http://nibrahim.net.in From admin.nitjece at gmail.com Wed Jan 27 14:07:33 2010 From: admin.nitjece at gmail.com (Diptanu Choudhury) Date: Wed, 27 Jan 2010 15:07:33 +0200 Subject: [BangPypers] What is the best Python Mock library In-Reply-To: <9963e56e1001270442w6a55d4f7t35d1eb9c9beda0f8@mail.gmail.com> References: <9963e56e1001270442w6a55d4f7t35d1eb9c9beda0f8@mail.gmail.com> Message-ID: Yes, and also the unit tests tend to become more verbose with Mox. On Wed, Jan 27, 2010 at 2:42 PM, Noufal Ibrahim wrote: > On Wed, Jan 27, 2010 at 6:05 PM, Diptanu Choudhury > wrote: > > Hi, > > > > We ran into a discussion this afternoon about the various Python Mocking > > Libraries. The popular one out there seems to be Mox(according to > > my colleagues), though I like Mock(python-mock). > > > > I would like to hear the views of the python veterans of this list about > the > > popular mocking libraries! :-) > > I recently needed one and looked through a few. I found the whole > record/replay style a little weird and preferred a post mortem > approach. With that in mind, I found > http://www.voidspace.org.uk/python/mock/ quite nice and it's what I > use. > > > > > -- > ~noufal > http://nibrahim.net.in > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- Thanks, Diptanu Choudhury Just a Coder, ThoughtWorks India Mobile - 09886760964 Web - www.linkedin.com/in/diptanu From siddharta.lists at gmail.com Thu Jan 28 05:16:06 2010 From: siddharta.lists at gmail.com (Siddharta) Date: Thu, 28 Jan 2010 09:46:06 +0530 Subject: [BangPypers] What is the best Python Mock library In-Reply-To: References: <9963e56e1001270442w6a55d4f7t35d1eb9c9beda0f8@mail.gmail.com> Message-ID: <4B610F86.7080708@gmail.com> Couple of years ago I wrote silvermock - http://github.com/silverstripe/silvermock It uses an expectation style like so: mock = MockObject("mock class", [ ShouldBeCalled("__init__"), ShouldBeCalled("function").with_args((1,2)) ]) obj = mock() obj.function(1,2) mock._instance.verify() You can see more usage examples in the MockObjectTest suite. There is also minimock - http://pypi.python.org/pypi/MiniMock Python Mocker - http://labix.org/mocker -- Siddharta Govindaraj On 27-Jan-10 6:37 PM, Diptanu Choudhury wrote: > Yes, and also the unit tests tend to become more verbose with Mox. > > On Wed, Jan 27, 2010 at 2:42 PM, Noufal Ibrahim wrote: > > >> On Wed, Jan 27, 2010 at 6:05 PM, Diptanu Choudhury >> wrote: >> >>> Hi, >>> >>> We ran into a discussion this afternoon about the various Python Mocking >>> Libraries. The popular one out there seems to be Mox(according to >>> my colleagues), though I like Mock(python-mock). >>> >>> I would like to hear the views of the python veterans of this list about >>> >> the >> >>> popular mocking libraries! :-) >>> >> I recently needed one and looked through a few. I found the whole >> record/replay style a little weird and preferred a post mortem >> approach. With that in mind, I found >> http://www.voidspace.org.uk/python/mock/ quite nice and it's what I >> use. >> >> >> >> >> -- >> ~noufal >> http://nibrahim.net.in >> _______________________________________________ >> BangPypers mailing list >> BangPypers at python.org >> http://mail.python.org/mailman/listinfo/bangpypers >> >> > > > From sam3ks at gmail.com Wed Jan 27 20:32:48 2010 From: sam3ks at gmail.com (samarth salian) Date: Thu, 28 Jan 2010 01:02:48 +0530 Subject: [BangPypers] INVITATION TO CONDUCT EVENTS IN PESIT Message-ID: I am Samarth.I don't know whether this the right way of contacting you people but it is the only option for me. I want to organize workshops on python in my college (PESIT).If you people are interested in conducting any related events we (COLLEGE) will provide all facilities required. Samarth vice chairman,IEEE pesit student branch PESIT,Bangalore From jinsthomas at gmail.com Fri Jan 29 09:47:30 2010 From: jinsthomas at gmail.com (Jins Thomas) Date: Fri, 29 Jan 2010 14:17:30 +0530 Subject: [BangPypers] Regarding web framework in Python Message-ID: Hi All, Would like to ask one suggestion from bangpypers. I have a oracle database in Unix and need to create a web based GUI to execute some queries/scripts (via buttons) and save that in csv either in Unix or in windows. I was thinking of using Django framework. Btw i'm relatively new in python. Woud anybody please suggest whether Django is a good candidate for this. I succesfully installed Django and worked with some sample codes. Is there any similar framework which is more reccomondable than Django. Atleast this time i want to get this done with python. Many times i wanted to do things in python for some reason or other reason i was forced to use some other technology. I have some doubts like 1. Django sample webserver cannot be used when it's mission critical? Will this django framework supports apache or tomcat servers. 2. Certain query results i would like to display in graphs. I had mailed before asking suggestion for creating charts/bar/pie graphs with python and got a good number of suggestions like pychart, pygoogle chart open flash etc. I was just thinking how difficult is to integrate these stuffs in Django framework. Also couldn't actually finalize a good framework to use for creating this graphs. I'm absolutely in confusion which'll be better to use. Would anybody suggest what's the usual thought process in taking decisions like this. Thanks alot Jins Thomas From jaganadhg at gmail.com Fri Jan 29 16:49:51 2010 From: jaganadhg at gmail.com (JAGANADH G) Date: Fri, 29 Jan 2010 21:19:51 +0530 Subject: [BangPypers] Python syntax highligting in Latex beamer Message-ID: Dear All Can somebody give me a clear example how to highlight Python code in latex beamer. I used listings but no result . -- ********************************** JAGANADH G http://jaganadhg.freeflux.net/blog From pradeep at btbytes.com Fri Jan 29 17:18:40 2010 From: pradeep at btbytes.com (Pradeep Gowda) Date: Fri, 29 Jan 2010 11:18:40 -0500 Subject: [BangPypers] Python syntax highligting in Latex beamer In-Reply-To: References: Message-ID: <3e3294b71001290818n1016f73k19049dfa5493b41f@mail.gmail.com> On Fri, Jan 29, 2010 at 10:49 AM, JAGANADH G wrote: > Dear All > Can somebody give me a clear example how to highlight Python code in latex > beamer. > I used listings but no result . I do not have the direct answer, but.. Documentation generated by Sphinx/restrcuturedText has python highlighting. So, it might be instructive to study the .tex generated by Sphinx. From noufal at gmail.com Fri Jan 29 17:20:35 2010 From: noufal at gmail.com (Noufal Ibrahim) Date: Fri, 29 Jan 2010 21:50:35 +0530 Subject: [BangPypers] Python syntax highligting in Latex beamer In-Reply-To: References: Message-ID: <9963e56e1001290820q1e6c340dta7bb98b4b9617644@mail.gmail.com> On Fri, Jan 29, 2010 at 9:19 PM, JAGANADH G wrote: > Dear All > > Can somebody give me a clear example how to highlight Python code in latex > beamer. > I used listings but no result . http://pygments.org/ can tokenise and highlight your code and output LaTeX which you can probably embed. -- ~noufal http://nibrahim.net.in From punchagan at gmail.com Fri Jan 29 17:42:11 2010 From: punchagan at gmail.com (Puneeth Chaganti) Date: Fri, 29 Jan 2010 22:12:11 +0530 Subject: [BangPypers] Python syntax highligting in Latex beamer In-Reply-To: <9963e56e1001290820q1e6c340dta7bb98b4b9617644@mail.gmail.com> References: <9963e56e1001290820q1e6c340dta7bb98b4b9617644@mail.gmail.com> Message-ID: <604ca1b21001290842v5538a133q655aa69a6eabdccf@mail.gmail.com> Hi On Fri, Jan 29, 2010 at 9:50 PM, Noufal Ibrahim wrote: > On Fri, Jan 29, 2010 at 9:19 PM, JAGANADH G wrote: >> Dear All >> >> Can somebody give me a clear example how to highlight Python code in latex >> beamer. >> I used listings but no result . Something like this should work. Put something like this in the preamble \usepackage{color} \usepackage{listings} \lstset{language=Python, basicstyle=\ttfamily\bfseries, commentstyle=\color{red}\itshape, stringstyle=\color{darkgreen}, showstringspaces=false, keywordstyle=\color{blue}\bfseries} Use the following to display code. \begin{lstlisting} >>> print "Hello, World!" \end{lstlisting} Look at listings' manual for more info. -- ~punchagan From eknath.iyer at gmail.com Fri Jan 29 18:59:52 2010 From: eknath.iyer at gmail.com (Eknath Venkataramani) Date: Fri, 29 Jan 2010 23:29:52 +0530 Subject: [BangPypers] UTF-8 character Message-ID: <692c428f1001290959h159b5d8dm9fedb5680186f457@mail.gmail.com> I am trying to write a program to generate a file that simply removes all the punctuation marks from the input file. for the usual ascii characters like .,'?!" it works. but then when I try to do the same for the hindi fullstop (similar to |). it gives me an error saying: SyntaxError: Non-ASCII character '\xe0' in file punc_remover.py on line 16, but no encoding declared I am using UTF-8. But how do I indicate that to the interpretter From eknath.iyer at gmail.com Fri Jan 29 19:06:58 2010 From: eknath.iyer at gmail.com (Eknath Venkataramani) Date: Fri, 29 Jan 2010 23:36:58 +0530 Subject: [BangPypers] UTF-8 character In-Reply-To: <692c428f1001290959h159b5d8dm9fedb5680186f457@mail.gmail.com> References: <692c428f1001290959h159b5d8dm9fedb5680186f457@mail.gmail.com> Message-ID: <692c428f1001291006k8563b12p4f5d9844ad4321ac@mail.gmail.com> On Fri, Jan 29, 2010 at 11:29 PM, Eknath Venkataramani < eknath.iyer at gmail.com> wrote: > I am trying to write a program to generate a file that simply removes all > the punctuation marks from the input file. > for the usual ascii characters like .,'?!" it works. but then when I try to > do the same for the hindi fullstop (similar to |). it gives me an error > saying: > SyntaxError: Non-ASCII character '\xe0' in file punc_remover.py on line 16, > but no encoding declared > I am using UTF-8. But how do I indicate that to the interpretter > Got it working. Did this: #!/usr/bin/python # -*- coding: UTF-8 -*- From siddharta.lists at gmail.com Fri Jan 29 19:51:00 2010 From: siddharta.lists at gmail.com (Siddharta) Date: Sat, 30 Jan 2010 00:21:00 +0530 Subject: [BangPypers] Regarding web framework in Python In-Reply-To: References: Message-ID: <4B632E14.8050902@gmail.com> Everything you mentioned (apache, graphs etc) is possible in Django, but I'm wondering whether Django might be too complex for this kind of application, as you may not need complex url mapping, sessions, templates and all that functionality. If the only operation is to access the database and dump some data then maybe it is better to use WebOb and use sqlalchemy for accessing the database. But if you already familiar with Django (or are planning to use this project to learn it), then I would just go with that. -- Siddharta Govindaraj On 29-Jan-10 2:17 PM, Jins Thomas wrote: > Hi All, > > Would like to ask one suggestion from bangpypers. > > I have a oracle database in Unix and need to create a web based GUI to > execute some queries/scripts (via buttons) and save that in csv either in > Unix or in windows. I was thinking of using Django framework. Btw i'm > relatively new in python. Woud anybody please suggest whether Django is a > good candidate for this. I succesfully installed Django and worked with some > sample codes. Is there any similar framework which is more reccomondable > than Django. Atleast this time i want to get this done with python. Many > times i wanted to do things in python for some reason or other reason i was > forced to use some other technology. I have some doubts like > > 1. Django sample webserver cannot be used when it's mission critical? Will > this django framework supports apache or tomcat servers. > > 2. Certain query results i would like to display in graphs. I had mailed > before asking suggestion for creating charts/bar/pie graphs with python and > got a good number of suggestions like pychart, pygoogle chart open flash > etc. I was just thinking how difficult is to integrate these stuffs in > Django framework. Also couldn't actually finalize a good framework to use > for creating this graphs. I'm absolutely in confusion which'll be better to > use. Would anybody suggest what's the usual thought process in taking > decisions like this. > > > Thanks alot > Jins Thomas > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > > From pradeep at btbytes.com Fri Jan 29 20:02:51 2010 From: pradeep at btbytes.com (Pradeep Gowda) Date: Fri, 29 Jan 2010 14:02:51 -0500 Subject: [BangPypers] Regarding web framework in Python In-Reply-To: References: Message-ID: <3e3294b71001291102o1d782db8kdcac086ea6c6ec61@mail.gmail.com> On Fri, Jan 29, 2010 at 3:47 AM, Jins Thomas wrote: > Hi All, > > Would like to ask one suggestion from bangpypers. > > I have a oracle ?database in Unix and need to create a web based GUI to > execute some queries/scripts ?(via buttons) and save that in csv either in > Unix or in windows. I was thinking of using Django framework. Btw i'm > relatively new in python. ?Woud anybody please suggest whether Django is a > good candidate for this. I succesfully installed Django and worked with some > sample codes. Is there any similar framework which is more ?reccomondable > than Django. Atleast this time i want to get this done with python. Many > times i wanted to do things in python for some reason or other reason i was > forced to use some other technology. ?I have some doubts like > > 1. Django sample webserver cannot be used when it's mission critical? ?Will > this django framework supports apache or tomcat servers. > > 2. Certain query results i would like to display in graphs. I had mailed > before asking suggestion for creating charts/bar/pie graphs with python and > got a good number of suggestions like pychart, pygoogle chart open flash > etc. I was just thinking how difficult is to integrate these stuffs in > Django framework. Also couldn't actually finalize a good framework to use > for creating this graphs. I'm absolutely in confusion which'll be better to > use. Would anybody suggest what's the usual thought process in taking > decisions like this. Django is an overkill for something like this. web.py is what you should be looking at. If you already are programming in python, web.py will give you the web library without trying to introduce new concepts on URL dispatch, ORM etc., Web.py has a very decent db api for most common db operations You can fall back to raw SQL with ease. From learningpython at aol.com Sat Jan 30 06:18:26 2010 From: learningpython at aol.com (learningpython at aol.com) Date: Sat, 30 Jan 2010 00:18:26 -0500 Subject: [BangPypers] BangPypers Digest, Vol 29, Issue 31 In-Reply-To: References: Message-ID: <8CC6F82C93530BE-222C-741@webmail-m077.sysops.aol.com> Hi Jeff, Apologies for the delay, Unfortunately this email has gone to my spam folder and could only see fortunately. I am really thankful for the response. What is the website i could log in to see the responses please i have forgotten over the period of time. python.org from there i am trying to go to bangalore but cannot go past the subscription page ..http://mail.python.org/mailman/listinfo/bangpypers Should i use the function import pdb; pdb.set_trace() in every function or should i create a def or class and call the instance separately. Sorry i am naive. Thanks in advance Cheers -- Anand -----Original Message----- From: bangpypers-request at python.org To: bangpypers at python.org Sent: Mon, Jan 25, 2010 12:00 am Subject: BangPypers Digest, Vol 29, Issue 31 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. Re: January user group meeting (Arvind Jamuna Dixit) 2. Re: January user group meeting (Noufal Ibrahim) 3. Python Maintainence code: Debugging, Tracing and Profiling help (learningpython at aol.com) 4. Re: Python Maintainence code: Debugging, Tracing and Profiling help (Jeffrey Jose) ---------------------------------------------------------------------- Message: 1 Date: Sat, 23 Jan 2010 20:12:13 +0530 From: Arvind Jamuna Dixit To: Bangalore Python Users Group - India Subject: Re: [BangPypers] January user group meeting Message-ID: <3d62196a1001230642m4c87571akd1bc91436c167d00 at mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1 How did the meet go. Couldn't come as I got stuck in MG Road traffic. On Fri, Jan 22, 2010 at 5:19 PM, Noufal Ibrahim wrote: > Okay. This is set in stone. Hope to see you all there! > > On Wed, Jan 20, 2010 at 11:26 AM, Noufal Ibrahim wrote: > > So are we decided? > > > > Date : Jan 23 > > Time : 1530 > > Venue : ThoughtWorks, Diamond District > > Topics : Baiju - Buildbot > > Noufal - py.test. > > > > Fine? Vishal had a -1 for 23. If there many others, we can change the > date > > to 24th. > > > > > > > > -- > > ~noufal > > http://nibrahim.net.in > > > > > > -- > ~noufal > http://nibrahim.net.in > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- Arvind ------------------------------ Message: 2 Date: Sat, 23 Jan 2010 21:48:28 +0530 From: Noufal Ibrahim To: Bangalore Python Users Group - India Subject: Re: [BangPypers] January user group meeting Message-ID: <9963e56e1001230818k371ce2a3lfda7be0addbeec47 at mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1 On Sat, Jan 23, 2010 at 8:12 PM, Arvind Jamuna Dixit wrote: > How did the meet go. Couldn't come as I got stuck in MG Road traffic.[..] Pretty well. Baiju's presentation on using using buildout to easily configure buildbot was nice. I also learnt that if you 'activate' a virtualenv, you get a 'deactivate' command to go back to your system wide install. Neat. :) -- ~noufal http://nibrahim.net.in ------------------------------ Message: 3 Date: Sat, 23 Jan 2010 18:04:20 -0500 From: learningpython at aol.com To: bangpypers at python.org Subject: [BangPypers] Python Maintainence code: Debugging, Tracing and Profiling help Message-ID: <8CC6A97879CFBD3-124C-2081B at webmail-d010.sysops.aol.com> Content-Type: text/plain; charset="us-ascii" Hi Experts, I am back to python after a while of just formal introduction. Thistime i have to manage a huge files with numerous functions, i amdebugging a issue right now and would require to understand the flow ofthe code. Please can you help me on what can i do to have better understanding ofthe profiling of classes, defs invoked each time and how to read them. The ones i plan to do is to insert lot of prints in every class, defs ex: print self.__class__.__name__ in every def, to see the flow which is tedious and time consuming as the size of files and project is huge. Any suggestions please and advice please. PS: how to post to comp.lang.python newsgroup please?? Cheers Anand ------------------------------ Message: 4 Date: Sun, 24 Jan 2010 13:35:13 +0530 From: Jeffrey Jose To: Bangalore Python Users Group - India Subject: Re: [BangPypers] Python Maintainence code: Debugging, Tracing and Profiling help Message-ID: Content-Type: text/plain; charset=ISO-8859-1 Hi Anand, I can talk a lil bit about your 2 queries. Debugging and seeing the flow of the program. *A. Debugging* Surprisingly both of them come under the same banner. One of the reasons you debug is to see how the code progresses. For debugging I highly recommend Python Debugger. It would look a lot odd the first time you invoke it, but trust me with a few neat tricks you'd be using it all the time. There's just one thing you need to do to summon the Python Debugger. Insert this one line in your code. import pdb; pdb.set_trace() The next time you run the code, it would drop into the debugger (you just set a trace point). When you have the debugger prompt, you have access to all the variables, stacktrace etc. You need to know a few commands to get around. c -> Continue (till the end of the program or till the next breakpoint) n -> Execute next step l -> See where you are s -> Step into a function. I accept this is not a natural way of doing things.. That's where we come to the 'with-a-few-tricks-you'd-be-doing-this-all-the-time' And the trick is this. Invoke Ipython from pdb. The good thing is you get tab-competition (which pdb lacks). You can try out all kinds of things. Introspect, import other modules, try and see the next line and see what its output 'would be'. Its sweet. I highly recommend you take a look at this. Starting ipython from pdb- http://libreamoi.com/index.php/starting-ipython-from-pdb/ Hit Ctrl-D to exit from Ipython to go to pdb again and hit 'c' to continue the program. While you're at pdb, you can still go into ipython again. Remember Ipython is a regular prompt, so you cant do debugger-y things like Step Into, Continue etc. For that you'll have to come 'out' of Ipython to pdb. You can go back to Ipython anytime. *B. Seeing Your Program Flow* If I understand you correctly, I've seen this problem hit me lot of times. If you're working on others code, and all of a sudden you wanna understand/fix them - you'd be sitting there thinking - Damn, *how* does this code work. I can see a lot of functions and I get what it does. But when does this one get called. I see this main call from main() .. but is there another place where it gets called ?. If so what are the arguments. What does it return on this one specific call etc. While its technically possible to do next-next-next using Python Debugger to step through the program and sometimes that's all can you do. But there's a much better way than inserting print "Called me!" print "Done with me!" etc. The idea here is to use sys.settrace() to insert to a utility function which gets called before any important events. Events include, # execution of any line (that means all the time) # calling a function # return from a function # encountering an exception This means your utility function can go .. hmm .. is this a function call ? .. if so gimme the name of the caller and name of the function and let me print it. When you run the code you'd get a huge output with prints which shows the flow of the program. Again, refer this page for a better understanding. Tracing Your Program As It Runs - http://blog.doughellmann.com/2009/11/pymotw-sys-part-5-tracing-your-program.html One caution : Do Not Abuse sys.settrace() Use sys.settrace() for debugging only. You might be tempted to do crazy things like .. during every function call .. I'll authorize the user or something. That better be done using different methods. Just saying :) Unfortunately, the place where I work doesnt care much about performance (or unnecessary optimization) for the python code. So I cant help you there. I'll let others chip in for those stuff. HTH Jeff On Sun, Jan 24, 2010 at 4:34 AM, wrote: > > > > Hi Experts, > > I am back to python after a while of just formal introduction. Thistime i > have to manage a huge files with numerous functions, i am debugging a issue > right now and would require to understand the flow ofthe code. > > Please can you help me on what can i do to have better understanding ofthe > profiling of classes, defs invoked each time and how to read them. > > The ones i plan to do is to insert lot of prints in every class, defs ex: > print self.__class__.__name__ in every def, to see the flow which is tedious > and time consuming as the size of files and project is huge. > > Any suggestions please and advice please. > > PS: how to post to comp.lang.python newsgroup please?? > > > Cheers > Anand > > > > > > _______________________________________________ > 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 29, Issue 31 ****************************************** From learningpython at aol.com Sat Jan 30 07:23:06 2010 From: learningpython at aol.com (learningpython at aol.com) Date: Sat, 30 Jan 2010 01:23:06 -0500 Subject: [BangPypers] BangPypers Digest, Vol 29, Issue 31 In-Reply-To: <8CC6F82C93530BE-222C-741@webmail-m077.sysops.aol.com> References: <8CC6F82C93530BE-222C-741@webmail-m077.sysops.aol.com> Message-ID: <8CC6F8BD1C497BE-222C-BED@webmail-m077.sysops.aol.com> Hi Jeff, I am successful in debugging pdb.set_trace() but sys.settrace(), not sure how to add, i am trying in various function with argument as the function name as per ref: http://www.dalkescientific.com/writings/diary/archive/2005/04/20/tracing_python_code.html I work in multifile environment( say thousands ) and i am not sure where exactly is the right place to call. ex: I have a def config(value) i used this command sys.settrace(config) but my eclipse cribs .. Any suggestions please. Regards -- Anand -----Original Message----- From: learningpython at aol.com To: bangpypers at python.org Cc: jeffjosejeff at gmail.com Sent: Sat, Jan 30, 2010 6:18 pm Subject: Re: BangPypers Digest, Vol 29, Issue 31 Hi Jeff, Apologies for the delay, Unfortunately this email has gone to my spam folder and could only see fortunately. I am really thankful for the response. What is the website i could log in to see the responses please i have forgotten over the period of time. python.org from there i am trying to go to bangalore but cannot go past the subscription page ..http://mail.python.org/mailman/listinfo/bangpypers Should i use the function import pdb; pdb.set_trace() in every function or should i create a def or class and call the instance separately. Sorry i am naive. Thanks in advance Cheers -- Anand -----Original Message----- From: bangpypers-request at python.org To: bangpypers at python.org Sent: Mon, Jan 25, 2010 12:00 am Subject: BangPypers Digest, Vol 29, Issue 31 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. Re: January user group meeting (Arvind Jamuna Dixit) 2. Re: January user group meeting (Noufal Ibrahim) 3. Python Maintainence code: Debugging, Tracing and Profiling help (learningpython at aol.com) 4. Re: Python Maintainence code: Debugging, Tracing and Profiling help (Jeffrey Jose) ---------------------------------------------------------------------- Message: 1 Date: Sat, 23 Jan 2010 20:12:13 +0530 From: Arvind Jamuna Dixit To: Bangalore Python Users Group - India Subject: Re: [BangPypers] January user group meeting Message-ID: <3d62196a1001230642m4c87571akd1bc91436c167d00 at mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1 How did the meet go. Couldn't come as I got stuck in MG Road traffic. On Fri, Jan 22, 2010 at 5:19 PM, Noufal Ibrahim wrote: > Okay. This is set in stone. Hope to see you all there! > > On Wed, Jan 20, 2010 at 11:26 AM, Noufal Ibrahim wrote: > > So are we decided? > > > > Date : Jan 23 > > Time : 1530 > > Venue : ThoughtWorks, Diamond District > > Topics : Baiju - Buildbot > > Noufal - py.test. > > > > Fine? Vishal had a -1 for 23. If there many others, we can change the > date > > to 24th. > > > > > > > > -- > > ~noufal > > http://nibrahim.net.in > > > > > > -- > ~noufal > http://nibrahim.net.in > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- Arvind ------------------------------ Message: 2 Date: Sat, 23 Jan 2010 21:48:28 +0530 From: Noufal Ibrahim To: Bangalore Python Users Group - India Subject: Re: [BangPypers] January user group meeting Message-ID: <9963e56e1001230818k371ce2a3lfda7be0addbeec47 at mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1 On Sat, Jan 23, 2010 at 8:12 PM, Arvind Jamuna Dixit wrote: > How did the meet go. Couldn't come as I got stuck in MG Road traffic.[..] Pretty well. Baiju's presentation on using using buildout to easily configure buildbot was nice. I also learnt that if you 'activate' a virtualenv, you get a 'deactivate' command to go back to your system wide install. Neat. :) -- ~noufal http://nibrahim.net.in ------------------------------ Message: 3 Date: Sat, 23 Jan 2010 18:04:20 -0500 From: learningpython at aol.com To: bangpypers at python.org Subject: [BangPypers] Python Maintainence code: Debugging, Tracing and Profiling help Message-ID: <8CC6A97879CFBD3-124C-2081B at webmail-d010.sysops.aol.com> Content-Type: text/plain; charset="us-ascii" Hi Experts, I am back to python after a while of just formal introduction. Thistime i have to manage a huge files with numerous functions, i amdebugging a issue right now and would require to understand the flow ofthe code. Please can you help me on what can i do to have better understanding ofthe profiling of classes, defs invoked each time and how to read them. The ones i plan to do is to insert lot of prints in every class, defs ex: print self.__class__.__name__ in every def, to see the flow which is tedious and time consuming as the size of files and project is huge. Any suggestions please and advice please. PS: how to post to comp.lang.python newsgroup please?? Cheers Anand ------------------------------ Message: 4 Date: Sun, 24 Jan 2010 13:35:13 +0530 From: Jeffrey Jose To: Bangalore Python Users Group - India Subject: Re: [BangPypers] Python Maintainence code: Debugging, Tracing and Profiling help Message-ID: Content-Type: text/plain; charset=ISO-8859-1 Hi Anand, I can talk a lil bit about your 2 queries. Debugging and seeing the flow of the program. *A. Debugging* Surprisingly both of them come under the same banner. One of the reasons you debug is to see how the code progresses. For debugging I highly recommend Python Debugger. It would look a lot odd the first time you invoke it, but trust me with a few neat tricks you'd be using it all the time. There's just one thing you need to do to summon the Python Debugger. Insert this one line in your code. import pdb; pdb.set_trace() The next time you run the code, it would drop into the debugger (you just set a trace point). When you have the debugger prompt, you have access to all the variables, stacktrace etc. You need to know a few commands to get around. c -> Continue (till the end of the program or till the next breakpoint) n -> Execute next step l -> See where you are s -> Step into a function. I accept this is not a natural way of doing things.. That's where we come to the 'with-a-few-tricks-you'd-be-doing-this-all-the-time' And the trick is this. Invoke Ipython from pdb. The good thing is you get tab-competition (which pdb lacks). You can try out all kinds of things. Introspect, import other modules, try and see the next line and see what its output 'would be'. Its sweet. I highly recommend you take a look at this. Starting ipython from pdb- http://libreamoi.com/index.php/starting-ipython-from-pdb/ Hit Ctrl-D to exit from Ipython to go to pdb again and hit 'c' to continue the program. While you're at pdb, you can still go into ipython again. Remember Ipython is a regular prompt, so you cant do debugger-y things like Step Into, Continue etc. For that you'll have to come 'out' of Ipython to pdb. You can go back to Ipython anytime. *B. Seeing Your Program Flow* If I understand you correctly, I've seen this problem hit me lot of times. If you're working on others code, and all of a sudden you wanna understand/fix them - you'd be sitting there thinking - Damn, *how* does this code work. I can see a lot of functions and I get what it does. But when does this one get called. I see this main call from main() .. but is there another place where it gets called ?. If so what are the arguments. What does it return on this one specific call etc. While its technically possible to do next-next-next using Python Debugger to step through the program and sometimes that's all can you do. But there's a much better way than inserting print "Called me!" print "Done with me!" etc. The idea here is to use sys.settrace() to insert to a utility function which gets called before any important events. Events include, # execution of any line (that means all the time) # calling a function # return from a function # encountering an exception This means your utility function can go .. hmm .. is this a function call ? .. if so gimme the name of the caller and name of the function and let me print it. When you run the code you'd get a huge output with prints which shows the flow of the program. Again, refer this page for a better understanding. Tracing Your Program As It Runs - http://blog.doughellmann.com/2009/11/pymotw-sys-part-5-tracing-your-program.html One caution : Do Not Abuse sys.settrace() Use sys.settrace() for debugging only. You might be tempted to do crazy things like .. during every function call .. I'll authorize the user or something. That better be done using different methods. Just saying :) Unfortunately, the place where I work doesnt care much about performance (or unnecessary optimization) for the python code. So I cant help you there. I'll let others chip in for those stuff. HTH Jeff On Sun, Jan 24, 2010 at 4:34 AM, wrote: > > > > Hi Experts, > > I am back to python after a while of just formal introduction. Thistime i > have to manage a huge files with numerous functions, i am debugging a issue > right now and would require to understand the flow ofthe code. > > Please can you help me on what can i do to have better understanding ofthe > profiling of classes, defs invoked each time and how to read them. > > The ones i plan to do is to insert lot of prints in every class, defs ex: > print self.__class__.__name__ in every def, to see the flow which is tedious > and time consuming as the size of files and project is huge. > > Any suggestions please and advice please. > > PS: how to post to comp.lang.python newsgroup please?? > > > Cheers > Anand > > > > > > _______________________________________________ > 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 29, Issue 31 ****************************************** From nikunjbadjatya at gmail.com Sat Jan 30 20:10:12 2010 From: nikunjbadjatya at gmail.com (nikunj badjatya) Date: Sun, 31 Jan 2010 00:40:12 +0530 Subject: [BangPypers] Future of Python Programmers Message-ID: Dear all BangPyPers, I couldnt attend the January's user group meeting becoz of unforseen circumstances. I have one important question to ask to all of you, I am a fresher, recently completed my graduation, had started working on python 2 months back..!! and I just fell in love with the language. I want to learn more about it. The only concern is there arent enough companies which work on Python. ( correct if I am wrong?? ) and also kindly tell me the core application areas of the language, ( Is there any where Python is dominating compared to other languages? ) I followed up a link ( http://www.dmh2000.com/cjpr/ ) which nicely illustrates difference between many languages. Is there any chance where the development of Python will make it as fast as C++ or JAVA, (or it is at its optimum level? ) . P.S. I have recently joined the group, dont know if similar discussions held before. Sincerely, Nikunj Badjatya From ramdaz at gmail.com Sat Jan 30 20:15:47 2010 From: ramdaz at gmail.com (Ramdas S) Date: Sun, 31 Jan 2010 00:45:47 +0530 Subject: [BangPypers] Interesting Read Message-ID: <6e38f9f01001301115g6149b37bq2a4fffb542bc5a25@mail.gmail.com> http://gist.github.com/289467 -- Ramdas S +91 9342 583 065 From nikunjbadjatya at gmail.com Sat Jan 30 20:20:17 2010 From: nikunjbadjatya at gmail.com (nikunj badjatya) Date: Sun, 31 Jan 2010 00:50:17 +0530 Subject: [BangPypers] Interesting Read In-Reply-To: <6e38f9f01001301115g6149b37bq2a4fffb542bc5a25@mail.gmail.com> References: <6e38f9f01001301115g6149b37bq2a4fffb542bc5a25@mail.gmail.com> Message-ID: Hi, Interesting Read indeed..! Thanks !! -- Nikunj Badjatya BTech From anand.shashwat at gmail.com Sat Jan 30 20:38:13 2010 From: anand.shashwat at gmail.com (Shashwat Anand) Date: Sun, 31 Jan 2010 01:08:13 +0530 Subject: [BangPypers] Interesting Read In-Reply-To: References: <6e38f9f01001301115g6149b37bq2a4fffb542bc5a25@mail.gmail.com> Message-ID: Seen as somebody tweet, nice read :) On Sun, Jan 31, 2010 at 12:50 AM, nikunj badjatya wrote: > Hi, > Interesting Read indeed..! > Thanks !! > > -- > Nikunj Badjatya > BTech > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From zaki at manian.org Sun Jan 31 00:07:19 2010 From: zaki at manian.org (Zaki Manian) Date: Sun, 31 Jan 2010 04:37:19 +0530 Subject: [BangPypers] Future of Python Programmers In-Reply-To: References: Message-ID: Hi Nikunj, I think you will find plenty of demand for python programmers in Bangalore. There are many people on this list who use python commercially. At ReaMetrix, we use python primarily for image process and scientific data processing. We make heavy use of SciPy and Numpy libraries. US number: +1 650-862-5992 Indian Number:+919945111824 On Sun, Jan 31, 2010 at 12:40 AM, nikunj badjatya wrote: > Dear all BangPyPers, > > I couldnt attend the January's user group meeting becoz of unforseen > circumstances. > I have one important question to ask to all of you, > I am a fresher, recently completed my graduation, had started working on > python 2 months back..!! and I just fell in love with the language. I want > to learn more about it. > The only concern is there arent enough companies which work on Python. ( > correct if I am wrong?? ) > and also kindly tell me the core application areas of the language, ( Is > there any where Python is dominating compared to other languages? ) > I followed up a link ( http://www.dmh2000.com/cjpr/ ) which nicely > illustrates difference between many languages. > Is there any chance where the development of Python will make it as fast as > C++ or JAVA, (or it is at its optimum level? ) . > > P.S. I have recently joined the group, dont know if similar discussions > held > before. > > Sincerely, > Nikunj Badjatya > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From anand.shashwat at gmail.com Sun Jan 31 00:26:13 2010 From: anand.shashwat at gmail.com (Shashwat Anand) Date: Sun, 31 Jan 2010 04:56:13 +0530 Subject: [BangPypers] Future of Python Programmers In-Reply-To: References: Message-ID: @Nikunj I just came through this : http://paisa.com/jobs/ and their criteria : http://txtb.in/9I8 On Sun, Jan 31, 2010 at 4:37 AM, Zaki Manian wrote: > Hi Nikunj, > > I think you will find plenty of demand for python programmers in Bangalore. > There are many people on this list who use python commercially. > > At ReaMetrix, we use python primarily for image process and scientific data > processing. We make heavy use of SciPy and Numpy libraries. > > > > > US number: +1 650-862-5992 > Indian Number:+919945111824 > > > On Sun, Jan 31, 2010 at 12:40 AM, nikunj badjatya > wrote: > > > Dear all BangPyPers, > > > > I couldnt attend the January's user group meeting becoz of unforseen > > circumstances. > > I have one important question to ask to all of you, > > I am a fresher, recently completed my graduation, had started working on > > python 2 months back..!! and I just fell in love with the language. I > want > > to learn more about it. > > The only concern is there arent enough companies which work on Python. ( > > correct if I am wrong?? ) > > and also kindly tell me the core application areas of the language, ( Is > > there any where Python is dominating compared to other languages? ) > > I followed up a link ( http://www.dmh2000.com/cjpr/ ) which nicely > > illustrates difference between many languages. > > Is there any chance where the development of Python will make it as fast > as > > C++ or JAVA, (or it is at its optimum level? ) . > > > > P.S. I have recently joined the group, dont know if similar discussions > > held > > before. > > > > Sincerely, > > Nikunj Badjatya > > _______________________________________________ > > 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 shivraj.ms at gmail.com Sun Jan 31 03:17:56 2010 From: shivraj.ms at gmail.com (Shivaraj M S) Date: Sat, 30 Jan 2010 18:17:56 -0800 (PST) Subject: [BangPypers] Interesting Read In-Reply-To: References: <6e38f9f01001301115g6149b37bq2a4fffb542bc5a25@mail.gmail.com> Message-ID: <27389587.post@talk.nabble.com> NULL = None return NULL #Not implemented i = 1 #Thanks Adam ....... LoL :) -- View this message in context: http://old.nabble.com/Interesting-Read-tp27386589p27389587.html Sent from the BangPypers - Bangalore Python Users Group mailing list archive at Nabble.com. From orsenthil at gmail.com Sun Jan 31 03:32:31 2010 From: orsenthil at gmail.com (Senthil Kumaran) Date: Sun, 31 Jan 2010 08:02:31 +0530 Subject: [BangPypers] UTF-8 character In-Reply-To: <692c428f1001291006k8563b12p4f5d9844ad4321ac@mail.gmail.com> References: <692c428f1001290959h159b5d8dm9fedb5680186f457@mail.gmail.com> <692c428f1001291006k8563b12p4f5d9844ad4321ac@mail.gmail.com> Message-ID: <20100131023231.GA6069@ubuntu.ubuntu-domain> On Fri, Jan 29, 2010 at 11:36:58PM +0530, Eknath Venkataramani wrote: > > I am using UTF-8. But how do I indicate that to the interpretter > > > Got it working. > Did this: > #!/usr/bin/python > # -*- coding: UTF-8 -*- Yup. That is perfect. That emacs-style line declares to the interpreter that the following python script uses UTF-8 encoding. You might choose to use other encodings similarly too. -- Senthil From gnuyoga at gmail.com Sun Jan 31 03:48:38 2010 From: gnuyoga at gmail.com (Sreekanth B) Date: Sun, 31 Jan 2010 08:18:38 +0530 Subject: [BangPypers] Interesting Read In-Reply-To: <6e38f9f01001301115g6149b37bq2a4fffb542bc5a25@mail.gmail.com> References: <6e38f9f01001301115g6149b37bq2a4fffb542bc5a25@mail.gmail.com> Message-ID: hi On Sun, Jan 31, 2010 at 12:45 AM, Ramdas S wrote: > http://gist.github.com/289467 good one, i liked the enterprise programmer one :D - sree From gnuyoga at gmail.com Sun Jan 31 04:06:09 2010 From: gnuyoga at gmail.com (Sreekanth B) Date: Sun, 31 Jan 2010 08:36:09 +0530 Subject: [BangPypers] Future of Python Programmers In-Reply-To: References: Message-ID: hi On Sun, Jan 31, 2010 at 12:40 AM, nikunj badjatya wrote: > Dear all BangPyPers, > > The only concern is there arent enough companies which work on Python. ( > correct if I am wrong?? ) > This really doesn't matter. As far as you like what you are doing you will get good work. Remember tools/technology/language is one part of solution that we are proposing to solve a engineering problem. So i would suggest you to look at engineering problem that python has solved so far and then see if that space is existing enough for you. Some of the engineering problem could be System programming, Scientific programming, Graphics, System administration, Web application development, Distributed Computing, Scalability, Desktop applications, Middle ware technologies, Storage, etc ... FYI i know that google's infrastructure engineering team has extensively used python (for couse this might change), yahoo use's lot of perl. Lot of scientific computing groups uses python, redhat package manager manager is based on python (there are some c/c++ binding in some cases), rpath is fully based on python, mercurial a DCVS is developed in python, lot of rapid application development framework is in python. Jython is extensive used in writing unit test cases, etc. python has also inspired other scripting languages (eg: groovy) I my opinion tools doesn't define a company or companies using python (or any other tool) will not say that am using such and such tool or languages..... according to engineering need one decides the tool/languages. So if you are happy learning python and can solve some problem that we face day-to-day am sure you land up in a decent job. keep hacking ! Note: the opinion expressed is based on personal observation :D - sree From noufal at gmail.com Sun Jan 31 04:13:21 2010 From: noufal at gmail.com (Noufal Ibrahim) Date: Sun, 31 Jan 2010 08:43:21 +0530 Subject: [BangPypers] Future of Python Programmers In-Reply-To: References: Message-ID: <9963e56e1001301913q56ac0b8w36ae7db77fe9cc27@mail.gmail.com> On Sun, Jan 31, 2010 at 12:40 AM, nikunj badjatya wrote: > Dear all BangPyPers, > > I couldnt attend the January's user group meeting becoz of unforseen > circumstances. > I have one important question to ask to all of you, > I am a fresher, recently completed my graduation, had started working on > python 2 months back..!! and I just fell in love with the language. I want > to learn more about it. > The only concern is there arent enough companies which work on Python. ( > correct if I am wrong?? )[..] Technologies which companies work on will change continuously. If the only criterion you have for selecting a language to learn is employability, then COBOL or Java would be the best candidates. Not that there's anything wrong with programming purely as a job but I suspect that many people on this list learn and do Python just because they love the language and the technologies associated with it. The key to being employable is adaptability. You can become a specialist in a domain perhaps but becoming a specialist *only* in a single language is flirting with career suicide. -- ~noufal http://nibrahim.net.in From abpillai at gmail.com Sun Jan 31 08:43:21 2010 From: abpillai at gmail.com (Anand Balachandran Pillai) Date: Sun, 31 Jan 2010 13:13:21 +0530 Subject: [BangPypers] Future of Python Programmers In-Reply-To: <9963e56e1001301913q56ac0b8w36ae7db77fe9cc27@mail.gmail.com> References: <9963e56e1001301913q56ac0b8w36ae7db77fe9cc27@mail.gmail.com> Message-ID: <8548c5f31001302343n749c4bf6v93330fe19a4b5dbc@mail.gmail.com> On Sun, Jan 31, 2010 at 8:43 AM, Noufal Ibrahim wrote: > On Sun, Jan 31, 2010 at 12:40 AM, nikunj badjatya > wrote: > > Dear all BangPyPers, > > > > I couldnt attend the January's user group meeting becoz of unforseen > > circumstances. > > I have one important question to ask to all of you, > > I am a fresher, recently completed my graduation, had started working on > > python 2 months back..!! and I just fell in love with the language. I > want > > to learn more about it. > > The only concern is there arent enough companies which work on Python. ( > > correct if I am wrong?? )[..] > > Technologies which companies work on will change continuously. If the > only criterion you have for selecting a language to learn is > employability, then COBOL or Java would be the best candidates. > > Not that there's anything wrong with programming purely as a job but I > suspect that many people on this list learn and do Python just because > they love the language and the technologies associated with it. > > The key to being employable is adaptability. You can become a > specialist in a domain perhaps but becoming a specialist *only* in a > single language is flirting with career suicide. > > Yes, don't make the mistake of confusing industry "platforms" with programming languages. For example, on the Windows/.NET "platform" the primary language is C#, but you can get by with VB, C++ or more recently even Python (IronPython). It is true that java is more of a platform than just a programming language, but then java is a language sponsored by Sun and is of a different genre. Python as a language is right now at cross-roads in terms of implementation, performance, versioning (2 vs 3 dilemma) and will perhaps change a lot during the next 2-3 years. However companies like Google are betting on Python (or their thinking of what "Python" should be), so the language clearly has a lot of scope. As Noufal said, don't become a language specialist, as that amounts to limiting yourself too much upfront. You should on the other hand get experience on domains of your liking (web, networking/security, mobile, games/multimedia etc) and then pick and choose tools including languages that fit the job. In my experience, companies prefer well-skilled generalists than deeply skilled specialists, unless one is an ultimate genius in what he does and irreplacable. --Anand > -- > ~noufal > http://nibrahim.net.in > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- --Anand From varunthacker at aol.in Sun Jan 31 09:24:44 2010 From: varunthacker at aol.in (Varun Thacker) Date: Sun, 31 Jan 2010 13:54:44 +0530 Subject: [BangPypers] Pointers on where to try for internships Message-ID: <3f347f5c1001310024u599e20a8ofc2c525d0e59ac17@mail.gmail.com> I'm Varun and I'm doing computer science at Manipal and I'm in my 2nd .Ive been using python for 1.5 years or so starting from pys60 .Recently ive stopped using it because i dont know what to do after learning the language even after writing some apps. I'm thinking i can utilize this years summer break to do an internship, maybe something that includes python or even c/c++. Can anyone tell me places which i should be looking out for to get an internship. I had called ThoughtWorks which i got to know about at Pycon and they didn't have provisions. Thus it would help if i have some idea on where to try. -- Regards, Varun Thacker http://varunthacker.wordpress.com From abpillai at gmail.com Sun Jan 31 11:54:41 2010 From: abpillai at gmail.com (Anand Balachandran Pillai) Date: Sun, 31 Jan 2010 16:24:41 +0530 Subject: [BangPypers] Interesting Read In-Reply-To: References: <6e38f9f01001301115g6149b37bq2a4fffb542bc5a25@mail.gmail.com> Message-ID: <8548c5f31001310254g3d956cei9ebeed2650cf7810@mail.gmail.com> On Sun, Jan 31, 2010 at 8:18 AM, Sreekanth B wrote: > hi > > On Sun, Jan 31, 2010 at 12:45 AM, Ramdas S wrote: > > > http://gist.github.com/289467 > > good one, i liked the enterprise programmer one :D > > There are these lambda forms also, >>> fact = lambda n: reduce(lambda x,y: x*y, range(1, n+1)) >>> fact(5) 120 What I liked best was the enterprise one. Best example of how "enterprise architects" make simple things sound and look complicated ;) > - sree > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- --Anand From jeffjosejeff at gmail.com Sun Jan 31 13:44:36 2010 From: jeffjosejeff at gmail.com (Jeffrey Jose) Date: Sun, 31 Jan 2010 18:14:36 +0530 Subject: [BangPypers] BangPypers Digest, Vol 29, Issue 31 In-Reply-To: <8CC6F8BD1C497BE-222C-BED@webmail-m077.sysops.aol.com> References: <8CC6F82C93530BE-222C-741@webmail-m077.sysops.aol.com> <8CC6F8BD1C497BE-222C-BED@webmail-m077.sysops.aol.com> Message-ID: Hi Anand, I'm sorry I dont have any experience with sys.settrace(). I'm a big fan of pdb.set_trace() and it serves me well. I'll let someone else answer your specific question. Jeff On Sat, Jan 30, 2010 at 11:53 AM, wrote: > Hi Jeff, > > I am successful in debugging pdb.set_trace() > but sys.settrace(), not sure how to add, i am trying in various function > with argument as the function name > as per ref: > http://www.dalkescientific.com/writings/diary/archive/2005/04/20/tracing_python_code.html > > I work in multifile environment( say thousands ) and i am not sure where > exactly is the right place to call. > ex: I have a def config(value) i used this command sys.settrace(config) > but my eclipse cribs .. > > Any suggestions please. > > Regards > -- Anand > > > > -----Original Message----- > From: learningpython at aol.com > To: bangpypers at python.org > Cc: jeffjosejeff at gmail.com > Sent: Sat, Jan 30, 2010 6:18 pm > Subject: Re: BangPypers Digest, Vol 29, Issue 31 > > Hi Jeff, > > Apologies for the delay, Unfortunately this email has gone to my spam > folder and could only see fortunately. > I am really thankful for the response. > > What is the website i could log in to see the responses please i have > forgotten over the period of time. > > python.org from there i am trying to go to bangalore but cannot go past > the subscription page ..http://mail.python.org/mailman/listinfo/bangpypers > > > Should i use the function > > import pdb; pdb.set_trace() in every function or should i create a def or class and call the instance separately. Sorry i am naive. > > > > > Thanks in advance > > > > > Cheers > > > -- Anand > > > -----Original Message----- > From: bangpypers-request at python.org > To: bangpypers at python.org > Sent: Mon, Jan 25, 2010 12:00 am > Subject: BangPypers Digest, Vol 29, Issue 31 > > 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. Re: January user group meeting (Arvind Jamuna Dixit) > > > 2. Re: January user group meeting (Noufal Ibrahim) > > > 3. Python Maintainence code: Debugging, Tracing and Profiling > > > help (learningpython at aol.com) > > > 4. Re: Python Maintainence code: Debugging, Tracing and > > > Profiling help (Jeffrey Jose) > > > > > > > ---------------------------------------------------------------------- > > > > > Message: 1 > > > Date: Sat, 23 Jan 2010 20:12:13 +0530 > > > From: Arvind Jamuna Dixit > > > To: Bangalore Python Users Group - India > > > Subject: Re: [BangPypers] January user group meeting > > > Message-ID: > > > <3d62196a1001230642m4c87571akd1bc91436c167d00 at mail.gmail.com> > > > Content-Type: text/plain; charset=ISO-8859-1 > > > > > How did the meet go. Couldn't come as I got stuck in MG Road traffic. > > > > > On Fri, Jan 22, 2010 at 5:19 PM, Noufal Ibrahim wrote: > > > > > > Okay. This is set in stone. Hope to see you all there! > > > > > > > > On Wed, Jan 20, 2010 at 11:26 AM, Noufal Ibrahim wrote: > > > > > So are we decided? > > > > > > > > > > Date : Jan 23 > > > > > Time : 1530 > > > > > Venue : ThoughtWorks, Diamond District > > > > > Topics : Baiju - Buildbot > > > > > Noufal - py.test. > > > > > > > > > > Fine? Vishal had a -1 for 23. If there many others, we can change the > > > > date > > > > > to 24th. > > > > > > > > > > > > > > > > > > > > -- > > > > > ~noufal > > > > > http://nibrahim.net.in > > > > > > > > > > > > > > > > > > > > > -- > > > > ~noufal > > > > http://nibrahim.net.in > > > > _______________________________________________ > > > > BangPypers mailing list > > > > BangPypers at python.org > > > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > > > > > > > > > -- > > > Arvind > > > > > > > ------------------------------ > > > > > Message: 2 > > > Date: Sat, 23 Jan 2010 21:48:28 +0530 > > > From: Noufal Ibrahim > > > To: Bangalore Python Users Group - India > > > Subject: Re: [BangPypers] January user group meeting > > > Message-ID: > > > <9963e56e1001230818k371ce2a3lfda7be0addbeec47 at mail.gmail.com> > > > Content-Type: text/plain; charset=ISO-8859-1 > > > > > On Sat, Jan 23, 2010 at 8:12 PM, Arvind Jamuna Dixit wrote: > > > > How did the meet go. Couldn't come as I got stuck in MG Road traffic.[..] > > > > > Pretty well. Baiju's presentation on using using buildout to easily > > > configure buildbot was nice. I also learnt that if you 'activate' a > > > virtualenv, you get a 'deactivate' command to go back to your system > > > wide install. Neat. :) > > > > > -- > > > ~noufal > > http://nibrahim.net.in > > > > > > > ------------------------------ > > > > > Message: 3 > > > Date: Sat, 23 Jan 2010 18:04:20 -0500 > > > From: learningpython at aol.com > > > To: bangpypers at python.org > > > Subject: [BangPypers] Python Maintainence code: Debugging, Tracing and > > > Profiling help > > > Message-ID: <8CC6A97879CFBD3-124C-2081B at webmail-d010.sysops.aol.com> > > > Content-Type: text/plain; charset="us-ascii" > > > > > > > > > > > > Hi Experts, > > > > > I am back to python after a while of just formal introduction. Thistime i have > > > to manage a huge files with numerous functions, i amdebugging a issue right now > > > and would require to understand the flow ofthe code. > > > > > Please can you help me on what can i do to have better understanding ofthe > > > profiling of classes, defs invoked each time and how to read them. > > > > > The ones i plan to do is to insert lot of prints in every class, defs ex: print > > > self.__class__.__name__ in every def, to see the flow which is tedious and time > > > consuming as the size of files and project is huge. > > > > > Any suggestions please and advice please. > > > > > PS: how to post to comp.lang.python newsgroup please?? > > > > > > > > Cheers > > > Anand > > > > > > > > > > > > > > > > > > > ------------------------------ > > > > > Message: 4 > > > Date: Sun, 24 Jan 2010 13:35:13 +0530 > > > From: Jeffrey Jose > > > To: Bangalore Python Users Group - India > > > Subject: Re: [BangPypers] Python Maintainence code: Debugging, Tracing > > > and Profiling help > > > Message-ID: > > > > > > Content-Type: text/plain; charset=ISO-8859-1 > > > > > Hi Anand, > > > > > I can talk a lil bit about your 2 queries. Debugging and seeing the flow of > > > the program. > > > > > *A. Debugging* > > > > > Surprisingly both of them come under the same banner. One of the reasons you > > > debug is to see how the code progresses. For debugging I highly recommend > > > Python Debugger. It would look a lot odd the first time you invoke it, but > > > trust me with a few neat tricks you'd be using it all the time. > > > > > There's just one thing you need to do to summon the Python Debugger. Insert > > > this one line in your code. > > > > > import pdb; pdb.set_trace() > > > > > The next time you run the code, it would drop into the debugger (you just > > > set a trace point). When you have the debugger prompt, you have access to > > > all the variables, stacktrace etc. You need to know a few commands to get > > > around. > > > > > c -> Continue (till the end of the program or till the next breakpoint) > > > n -> Execute next step > > > l -> See where you are > > > s -> Step into a function. > > > > > I accept this is not a natural way of doing things.. That's where we come to > > > the 'with-a-few-tricks-you'd-be-doing-this-all-the-time' > > > And the trick is this. Invoke Ipython from pdb. The good thing is you get > > > tab-competition (which pdb lacks). You can try out all kinds of things. > > > Introspect, import other modules, try and see the next line and see what its > > > output 'would be'. Its sweet. I highly recommend you take a look at this. > > > > > Starting ipython from > > > pdb- > > http://libreamoi.com/index.php/starting-ipython-from-pdb/ > > > Hit Ctrl-D to exit from Ipython to go to pdb again and hit 'c' to continue > > > the program. While you're at pdb, you can still go into ipython again. > > > > > Remember Ipython is a regular prompt, so you cant do debugger-y things like > > > Step Into, Continue etc. For that you'll have to come 'out' of Ipython to > > > pdb. You can go back to Ipython anytime. > > > > > *B. Seeing Your Program Flow* > > > > > If I understand you correctly, I've seen this problem hit me lot of times. > > > If you're working on others code, and all of a sudden you wanna > > > understand/fix them - you'd be sitting there thinking - Damn, *how* does > > > this code work. I can see a lot of functions and I get what it does. But > > > when does this one get called. I see this main call from main() .. but is > > > there another place where it gets called ?. If so what are the arguments. > > > What does it return on this one specific call etc. > > > > > While its technically possible to do next-next-next using Python Debugger to > > > step through the program and sometimes that's all can you do. > > > But there's a much better way than inserting > > > > > print "Called me!" > > > print "Done with me!" > > > > > etc. > > > > > The idea here is to use sys.settrace() to insert to a utility function which > > > gets called before any important events. Events include, > > > # execution of any line (that means all the time) > > > # calling a function > > > # return from a function > > > # encountering an exception > > > > > This means your utility function can go .. hmm .. is this a function call ? > > > .. if so gimme the name of the caller and name of the function and let me > > > print it. > > > > > When you run the code you'd get a huge output with prints which shows the > > > flow of the program. > > > Again, refer this page for a better understanding. > > > Tracing Your Program As It Runs - > > http://blog.doughellmann.com/2009/11/pymotw-sys-part-5-tracing-your-program.html > > > One caution : Do Not Abuse sys.settrace() Use sys.settrace() for debugging > > > only. You might be tempted to do crazy things like .. during every function > > > call .. I'll authorize the user or something. That better be done using > > > different methods. Just saying :) > > > > > > > Unfortunately, the place where I work doesnt care much about performance (or > > > unnecessary optimization) for the python code. So I cant help you there. > > > I'll let others chip in for those stuff. > > > > > HTH > > > Jeff > > > > > > > On Sun, Jan 24, 2010 at 4:34 AM, wrote: > > > > > > > > > > > > > > > > > > Hi Experts, > > > > > > > > I am back to python after a while of just formal introduction. Thistime i > > > > have to manage a huge files with numerous functions, i am debugging a issue > > > > right now and would require to understand the flow ofthe code. > > > > > > > > Please can you help me on what can i do to have better understanding ofthe > > > > profiling of classes, defs invoked each time and how to read them. > > > > > > > > The ones i plan to do is to insert lot of prints in every class, defs ex: > > > > print self.__class__.__name__ in every def, to see the flow which is tedious > > > > and time consuming as the size of files and project is huge. > > > > > > > > Any suggestions please and advice please. > > > > > > > > PS: how to post to comp.lang.python newsgroup please?? > > > > > > > > > > > > Cheers > > > > Anand > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > 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 29, Issue 31 > > > ****************************************** > > From eknath.iyer at gmail.com Sun Jan 31 17:29:30 2010 From: eknath.iyer at gmail.com (Eknath Venkataramani) Date: Sun, 31 Jan 2010 21:59:30 +0530 Subject: [BangPypers] UTF-8 character In-Reply-To: <20100131023231.GA6069@ubuntu.ubuntu-domain> References: <692c428f1001290959h159b5d8dm9fedb5680186f457@mail.gmail.com> <692c428f1001291006k8563b12p4f5d9844ad4321ac@mail.gmail.com> <20100131023231.GA6069@ubuntu.ubuntu-domain> Message-ID: <692c428f1001310829t722c58f8ra9ee8211dd2cea14@mail.gmail.com> On Sun, Jan 31, 2010 at 8:02 AM, Senthil Kumaran wrote: > > Yup. That is perfect. That emacs-style line declares to the > interpreter that the following python script uses UTF-8 encoding. You > might choose to use other encodings similarly too. > > Yeah. Thanks. From anurag08priyam at gmail.com Sun Jan 31 17:36:19 2010 From: anurag08priyam at gmail.com (Anurag Priyam) Date: Sun, 31 Jan 2010 22:06:19 +0530 Subject: [BangPypers] Pointers on where to try for internships In-Reply-To: <3f347f5c1001310024u599e20a8ofc2c525d0e59ac17@mail.gmail.com> References: <3f347f5c1001310024u599e20a8ofc2c525d0e59ac17@mail.gmail.com> Message-ID: <95d7ba071001310836m39d775ebwd7253e8521cdce06@mail.gmail.com> There have been posts on this group about job openings. Browse the archive of the mailing list. Such mails are generallly marked with [JOB] in their subject line. You may be able to find some informatin at fossjobs.in. Also, in.pycon.org, lists the sponsors of PyCon India. You may be interested in them. On Sun, Jan 31, 2010 at 1:54 PM, Varun Thacker wrote: > I'm Varun and I'm doing computer science at Manipal and I'm in my 2nd .Ive > been using python for 1.5 years or so starting from pys60 .Recently ive > stopped using it because i dont know what to do after learning the language > even after writing some apps. I'm thinking i can utilize this years summer > break to do an internship, maybe something that includes python or even > c/c++. > > Can anyone tell me places which i should be looking out for to get an > internship. I had called ThoughtWorks which i got to know about at Pycon > and > they didn't have provisions. > > Thus it would help if i have some idea on where to try. > > -- > > > Regards, > Varun Thacker > http://varunthacker.wordpress.com > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- Anurag Priyam 2nd Year,Mechanical Engineering, IIT Kharagpur. +91-9775550642 From pradeep at btbytes.com Sun Jan 31 20:12:37 2010 From: pradeep at btbytes.com (Pradeep Gowda) Date: Sun, 31 Jan 2010 14:12:37 -0500 Subject: [BangPypers] Pointers on where to try for internships In-Reply-To: <3f347f5c1001310024u599e20a8ofc2c525d0e59ac17@mail.gmail.com> References: <3f347f5c1001310024u599e20a8ofc2c525d0e59ac17@mail.gmail.com> Message-ID: <7ECAA22F-B8CB-473C-9296-331082C4EFA4@btbytes.com> Have you considered google summer of code. G soc attracts very good mentors across the python ecosphere. +pg Sent from my iPhone. On Jan 31, 2010, at 3:24, Varun Thacker wrote: > I'm Varun and I'm doing computer science at Manipal and I'm in my > 2nd .Ive > been using python for 1.5 years or so starting from pys60 .Recently > ive > stopped using it because i dont know what to do after learning the > language > even after writing some apps. I'm thinking i can utilize this years > summer > break to do an internship, maybe something that includes python or > even > c/c++. > > Can anyone tell me places which i should be looking out for to get an > internship. I had called ThoughtWorks which i got to know about at > Pycon and > they didn't have provisions. > > Thus it would help if i have some idea on where to try. > > -- > > > Regards, > Varun Thacker > http://varunthacker.wordpress.com > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers From anand.shashwat at gmail.com Sun Jan 31 21:48:12 2010 From: anand.shashwat at gmail.com (Shashwat Anand) Date: Mon, 1 Feb 2010 02:18:12 +0530 Subject: [BangPypers] Pointers on where to try for internships In-Reply-To: <7ECAA22F-B8CB-473C-9296-331082C4EFA4@btbytes.com> References: <3f347f5c1001310024u599e20a8ofc2c525d0e59ac17@mail.gmail.com> <7ECAA22F-B8CB-473C-9296-331082C4EFA4@btbytes.com> Message-ID: Any mentor on this list ? I for sure is trying, it'l be python but havn't decided on organization yet. On Mon, Feb 1, 2010 at 12:42 AM, Pradeep Gowda wrote: > Have you considered google summer of code. G soc attracts very good mentors > across the python ecosphere. > > +pg > Sent from my iPhone. > > > On Jan 31, 2010, at 3:24, Varun Thacker wrote: > > I'm Varun and I'm doing computer science at Manipal and I'm in my 2nd .Ive >> been using python for 1.5 years or so starting from pys60 .Recently ive >> stopped using it because i dont know what to do after learning the >> language >> even after writing some apps. I'm thinking i can utilize this years summer >> break to do an internship, maybe something that includes python or even >> c/c++. >> >> Can anyone tell me places which i should be looking out for to get an >> internship. I had called ThoughtWorks which i got to know about at Pycon >> and >> they didn't have provisions. >> >> Thus it would help if i have some idea on where to try. >> >> -- >> >> >> Regards, >> Varun Thacker >> http://varunthacker.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 >