From abpillai at gmail.com Thu May 1 07:36:05 2008 From: abpillai at gmail.com (Anand Balachandran Pillai) Date: Thu, 1 May 2008 11:06:05 +0530 Subject: [BangPypers] BangPypers Digest, Vol 8, Issue 15 In-Reply-To: <3de8e1f70804300731s267ce67eic5e9c3a97fdbacb6@mail.gmail.com> References: <543351.43912.qm@web94611.mail.in2.yahoo.com> <7dd811cb0804300654ofa25beay858872dfde4fa8f6@mail.gmail.com> <3de8e1f70804300731s267ce67eic5e9c3a97fdbacb6@mail.gmail.com> Message-ID: <8548c5f30804302236u152a5e26t52ce5f08b081452c@mail.gmail.com> This is a common pitfall encountered by the brand-newbie. Use a good editor which does a good job of "untabifying" your code. I use emacs+python-mode. I use tabs for writing my code since it is easy to indent code using tabs in emacs. I have defined a macro which converts tabs to spaces when saving the file. Make sure you use some good editor which allows you complete control over your tabs and spaces. Refer to previous discussions on Python editors in this list if you want some guidance. --Anand On Wed, Apr 30, 2008 at 8:01 PM, Banibrata Dutta wrote: > As Rohan mentions... > > "Be careful: do not mix tabs and spaces in a code block;" > > It is one of the first pitfalls a Python newbie comes-accross, if you > do not use a good Python source editor / IDE. > > There are some file editors that do automatic indentation by "tab" > insertion while writing code, but when you go back to edit that line, > it seems to insert spaces. > > > > On 4/30/08, Rohan Sharma wrote: > > I'm not sure what the problem is. Could you show the snippets you are > > referring to? > > > > An else-if ladder looks like this: > > > > x = int(raw_input()) > > if x < 0: > > print "Negative" > > elif x == 0: > > print "Zero" > > else: > > print "Positive" > > > > Be careful: do not mix tabs and spaces in a code block; I suggest > > using tabs exclusively. > > > > On Wed, Apr 30, 2008 at 5:18 PM, srinivasarao puvvala > > wrote: > > > > > > hi, > > > i have recently started learning python programming. > > > i got confused with "identation" problems. > > > when ever i write if else if statements and try excute those i got errors like > > > "unexcpected indent" "syntax error". > > > i have tried diffrent example provided by the python tutorial. > > > but i cann't slove that problem. > > > pls any body help me to give the proper idea on "identation" and give me code of if else if statements which will definatley excute if i copy the code. > > > pls help me . > > > > > > > > > --- On Tue, 29/4/08, bangpypers-request at python.org wrote: > > > > > > From: bangpypers-request at python.org > > > Subject: BangPypers Digest, Vol 8, Issue 15 > > > To: bangpypers at python.org > > > Date: Tuesday, 29 April, 2008, 3:30 PM > > > > > > 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: How can I read an excel sheet using python ? (KartheeK) > > > 2. Re: How can I read an excel sheet using python ? > > > (Anand Balachandran Pillai) > > > 3. Re: How can I read an excel sheet using python ? (Maxin B John) > > > > > > > > > ---------------------------------------------------------------------- > > > > > > Message: 1 > > > Date: Mon, 28 Apr 2008 11:13:34 +0100 (BST) > > > From: > > > KartheeK > > > Subject: Re: [BangPypers] How can I read an excel sheet using python ? > > > To: bangpypers at python.org > > > Message-ID: <434410.48055.qm at web8501.mail.in.yahoo.com> > > > Content-Type: text/plain; charset="iso-8859-1" > > > > > > Hi, > > > > > > Why dont u export it to a ,txt file and then read it as a normal file.. > > > > > > KartheeK > > > > > > sambasivareddy wrote: Hi all, > > > > > > Need help on ?How can I read an excel sheet using python?? > > > If any one have any example please send to me. Thanks in advance. > > > > > > Thanks and Regards, > > > Sambasivareddy.S > > > > > > > > > > > > > > > > > > http://www.patni.com > > > World-Wide Partnerships. World-Class Solutions. > > > _____________________________________________________________________ > > > > > > This e-mail message may contain proprietary, confidential or legally > > > privileged information for the sole use of the person > > > or entity to whom this > > > message was originally addressed. Any review, e-transmission dissemination or > > > other use of or taking of any action in reliance upon this information by > > > persons or entities other than the intended recipient is prohibited. If you > > > have received this e-mail in error kindly delete this e-mail from your > > > records. If it appears that this mail has been forwarded to you without proper > > > authority, please notify us immediately at netadmin at patni.com and delete this > > > mail. > > > _____________________________________________________________________ > > > _______________________________________________ > > > BangPypers mailing list > > > BangPypers at python.org > > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > > -------------- next part -------------- > > > An HTML attachment was > > > scrubbed... > > > URL: > > > > > > > > > ------------------------------ > > > > > > Message: 2 > > > Date: Mon, 28 Apr 2008 15:50:15 +0530 > > > From: "Anand Balachandran Pillai" > > > Subject: Re: [BangPypers] How can I read an excel sheet using python ? > > > To: "Bangalore Python Users Group - India" > > > > > > Message-ID: > > > <8548c5f30804280320r39c08c9as3b88b1d884c4b85c at mail.gmail.com> > > > Content-Type: text/plain; charset=UTF-8 > > > > > > http://snippets.dzone.com/posts/show/2036 > > > > > > You need pywin32 for this. > > > > > > Why not google stuff yourself before posting to the list ? Saves everyones > > > time. > > > > > > --Anand > > > > > > On Mon, Apr 28, 2008 at 3:43 PM, KartheeK wrote: > > > > Hi, > > > > > > > > Why dont u export it to a ,txt file and then read it as a normal file.. > > > > > > > > > > > KartheeK > > > > > > > > > > > > sambasivareddy wrote: > > > > > > > > > > > > > > > > Hi all, > > > > > > > > Need help on "How can I read an excel sheet using python"? > > > > If any one have any example please send to me. Thanks in advance. > > > > > > > > > > > > Thanks and Regards, > > > > Sambasivareddy.S > > > > > > > > > > > > http://www.patni.com > > > > World-Wide Partnerships. World-Class Solutions. > > > > _____________________________________________________________________ > > > > > > > > This e-mail message may contain proprietary, confidential or legally > > > > privileged information for the sole use of the person or entity to whom > > > this > > > > message was originally addressed. Any review, e-transmission dissemination > > > > or other use of or taking of any action in reliance upon this information > > > by > > > > persons or entities other than the intended recipient is prohibited. > > > If > > > you > > > > have received this e-mail in error kindly delete this e-mail from your > > > > records. If it appears that this mail has been forwarded to you without > > > > proper authority, please notify us immediately at netadmin at patni.com and > > > > delete this mail. > > > > _____________________________________________________________________ > > > > _______________________________________________ > > > > > > > > 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 > > > > > > > > > > > > > > > > > > > > -- > > > -Anand > > > > > > > > > ------------------------------ > > > > > > Message: 3 > > > Date: Mon, 28 Apr 2008 11:29:07 +0100 (BST) > > > From: Maxin B John > > > Subject: Re: > > > [BangPypers] How can I read an excel sheet using python ? > > > To: bangpypers at python.org > > > Message-ID: <91803.62659.qm at web26611.mail.ukl.yahoo.com> > > > Content-Type: text/plain; charset="iso-8859-1" > > > > > > Dear Sambasivareddy, > > > Hi all, > > > > > > > > > > > > Need help on "How can I read an excel sheet using python"? > > > > > > Try the xlrd module (http://pypi.python.org/pypi/xlrd/0.5.2). > > > > > > > > > > > > If any one have any example please send to me. Thanks in advance. > > > > > > Example is available in that module itself. > > > > > > Thanks and Regards, > > > > > > Sambasivareddy.S > > > > > > Regards, > > > > > > Maxin B John > > > Kerala > > > > > > > > > > > > --------------------------------- > > > Sent from Yahoo! Mail. > > > A Smarter Email. > > > -------------- next part -------------- > > > An HTML attachment was > > > scrubbed... > > > URL: > > > > > > > > > ------------------------------ > > > > > > _______________________________________________ > > > BangPypers mailing list > > > BangPypers at python.org > > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > > > > > End of BangPypers Digest, Vol 8, Issue 15 > > > ***************************************** > > > > > > ________________________________ > > > Get the freedom to save as many mails as you wish. Click here to know how. > > > _______________________________________________ > > > BangPypers mailing list > > > BangPypers at python.org > > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > _______________________________________________ > > BangPypers mailing list > > BangPypers at python.org > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > -- > regards, > Banibrata > http://www.linkedin.com/in/bdutta > > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- -Anand From munichlinux at gmail.com Thu May 1 15:25:07 2008 From: munichlinux at gmail.com (Prashanth) Date: Thu, 1 May 2008 18:55:07 +0530 Subject: [BangPypers] How can I read an excel sheet using python ? In-Reply-To: <48187D32.8070505@gmail.com> References: <000001c8a8fe$2a3b0650$750ba8c0@patni.com> <48187D32.8070505@gmail.com> Message-ID: <1f869bdd0805010625ta887e53h5bd1821106e99c6f@mail.gmail.com> On Wed, Apr 30, 2008 at 7:37 PM, gnuyoga wrote: > if u have java then u can use apache-poi using jython > > http://poi.apache.org/ > Bit tricky way, pyxml should work, I take it for granted that you use m$ you can read this http://www.pyzine.com/Issue008/Section_Articles/article_ExtendingApps.html?printit=1 -- regards, Prashanth http://munichlinux.blogspot.com From botsie at nixcartel.org Fri May 2 08:16:56 2008 From: botsie at nixcartel.org (Biju Chacko) Date: Fri, 02 May 2008 11:46:56 +0530 Subject: [BangPypers] BangPypers Digest, Vol 8, Issue 15 In-Reply-To: <8548c5f30804302236u152a5e26t52ce5f08b081452c@mail.gmail.com> References: <543351.43912.qm@web94611.mail.in2.yahoo.com> <7dd811cb0804300654ofa25beay858872dfde4fa8f6@mail.gmail.com> <3de8e1f70804300731s267ce67eic5e9c3a97fdbacb6@mail.gmail.com> <8548c5f30804302236u152a5e26t52ce5f08b081452c@mail.gmail.com> Message-ID: <481AB1D8.5080802@nixcartel.org> Anand Balachandran Pillai wrote: > This is a common pitfall encountered by the brand-newbie. > Use a good editor which does a good job of "untabifying" > your code. > > I use emacs+python-mode. I use tabs for writing my code > since it is easy to indent code using tabs in emacs. I have defined > a macro which converts tabs to spaces when saving the file. > > Make sure you use some good editor which allows you > complete control over your tabs and spaces. Refer to previous > discussions on Python editors in this list if you want some guidance. If you are a vim user you can add: set expandtabs to your .vimrc to ensure that vim indents with only spaces. -- b From ramdas at developeriq.com Fri May 2 21:52:51 2008 From: ramdas at developeriq.com (Ramdas S) Date: Sat, 3 May 2008 01:22:51 +0530 Subject: [BangPypers] BangPypers Digest, Vol 8, Issue 15 In-Reply-To: <481AB1D8.5080802@nixcartel.org> References: <543351.43912.qm@web94611.mail.in2.yahoo.com> <7dd811cb0804300654ofa25beay858872dfde4fa8f6@mail.gmail.com> <3de8e1f70804300731s267ce67eic5e9c3a97fdbacb6@mail.gmail.com> <8548c5f30804302236u152a5e26t52ce5f08b081452c@mail.gmail.com> <481AB1D8.5080802@nixcartel.org> Message-ID: <6e38f9f00805021252s7f5e89d3i5c244a0bd25e65c7@mail.gmail.com> try scite. Its good and works fine on Linux as well as Windows Ramdas On Fri, May 2, 2008 at 11:46 AM, Biju Chacko wrote: > Anand Balachandran Pillai wrote: > > > This is a common pitfall encountered by the brand-newbie. > > Use a good editor which does a good job of "untabifying" > > your code. > > > > I use emacs+python-mode. I use tabs for writing my code > > since it is easy to indent code using tabs in emacs. I have defined > > a macro which converts tabs to spaces when saving the file. > > > > Make sure you use some good editor which allows you > > complete control over your tabs and spaces. Refer to previous > > discussions on Python editors in this list if you want some guidance. > > > > If you are a vim user you can add: > > set expandtabs > > to your .vimrc to ensure that vim indents with only spaces. > > -- b > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jace at pobox.com Mon May 5 12:43:08 2008 From: jace at pobox.com (Kiran Jonnalagadda) Date: Mon, 5 May 2008 16:13:08 +0530 Subject: [BangPypers] How can I read an excel sheet using python ? In-Reply-To: <000001c8a8fe$2a3b0650$750ba8c0@patni.com> References: <000001c8a8fe$2a3b0650$750ba8c0@patni.com> Message-ID: <552EB171-8B88-4D9E-9C59-24D1FBA9499E@pobox.com> On 28-Apr-08, at 12:34 PM, sambasivareddy wrote: > Need help on ?How can I read an excel sheet using python?? > If any one have any example please send to me. Thanks in advance. PyExcelerator is an excellent library: http://sourceforge.net/projects/pyexcelerator Make sure to get the latest version from the CVS/SVN repo, not the 0.6.3a release. That release was made in 2005 and does not support saving to streams. The good thing about PyExcelerator as against other libraries is that it allows you to programmatically generate Excel sheets. Very useful for web apps that need to make tabular data downloadable. From jace at pobox.com Mon May 5 12:57:40 2008 From: jace at pobox.com (Kiran Jonnalagadda) Date: Mon, 5 May 2008 16:27:40 +0530 Subject: [BangPypers] BangPypers Digest, Vol 8, Issue 15 In-Reply-To: <481AB1D8.5080802@nixcartel.org> References: <543351.43912.qm@web94611.mail.in2.yahoo.com> <7dd811cb0804300654ofa25beay858872dfde4fa8f6@mail.gmail.com> <3de8e1f70804300731s267ce67eic5e9c3a97fdbacb6@mail.gmail.com> <8548c5f30804302236u152a5e26t52ce5f08b081452c@mail.gmail.com> <481AB1D8.5080802@nixcartel.org> Message-ID: <01A189F7-F904-4263-80A8-06908144C998@pobox.com> On 02-May-08, at 11:46 AM, Biju Chacko wrote: > If you are a vim user you can add: > > set expandtabs > > to your .vimrc to ensure that vim indents with only spaces. I'd recommend being more elaborate: set et " Expand tabs set ai " Auto-indent set sw=4 " Indent to 4 spaces set ts=8 " Treat tabs as 8 columns set si " Smart indent set sta " Smart tab key handling syn on " Make syntax visible " Make tabs visible if you're running gvim if has("gui_running") set lcs=tab:??,trail:?,extends:?,precedes:? endif From abpillai at gmail.com Mon May 5 13:08:58 2008 From: abpillai at gmail.com (Anand Balachandran Pillai) Date: Mon, 5 May 2008 16:38:58 +0530 Subject: [BangPypers] BangPypers Digest, Vol 8, Issue 15 In-Reply-To: <01A189F7-F904-4263-80A8-06908144C998@pobox.com> References: <543351.43912.qm@web94611.mail.in2.yahoo.com> <7dd811cb0804300654ofa25beay858872dfde4fa8f6@mail.gmail.com> <3de8e1f70804300731s267ce67eic5e9c3a97fdbacb6@mail.gmail.com> <8548c5f30804302236u152a5e26t52ce5f08b081452c@mail.gmail.com> <481AB1D8.5080802@nixcartel.org> <01A189F7-F904-4263-80A8-06908144C998@pobox.com> Message-ID: <8548c5f30805050408o3545c682v81089715b048bd20@mail.gmail.com> All right. Since vimmers are on a roll, Emacs-ians cannot be left behind ;) Here are the customizations for emacs. First you need "python-mode" for editing Python code. Get it from http://sourceforge.net/projects/python-mode/ and put the python-mode.el file in some directory which is part of your Emacs "load-path" variable. Now, in your .emacs file, add the following lines ;; These make sure that when you open a Python file ;; the python-mode is loaded automatically (add-to-list 'auto-mode-alist '("\\.py$" . python-mode)) (add-to-list 'auto-mode-alist '("\\.pyw$" . python-mode)) ;; A set of prog-modes which require tabs, example, Makefiles. (setq tabify-modes '(makefile-gmake-mode)) ;; Convert tabs to spaces and saves the buffer (defun untabify-save-buffer() (interactive) (if (not (member major-mode tabify-modes)) (untabify (point-min) (point-max))) (save-buffer)) Bind the function "untabify-save-buffer" to some convenient key. I have bound it to F2. Then press the short-cut key everytime to save an edited buffer to disk. (global-set-key [f2] 'untabify-save-buffer) That's it. Keep using tabs to format your Python source code and at the end hit F2 to save the buffer and emacs takes care of the rest. As an added customization, you could make sure you remove any additional Ctrl-Ms which are seen when you open a file edited in DOS/Windows in Unix. ;; Remove all Ctrl-Ms from a region (defun ^m-region (min max) "Remove all ^M's from the region." (interactive "r") (save-excursion (goto-char max) (while (re-search-backward "\C-m$" min t) (delete-char 1)))) ;; Remove all Ctrl-Ms from a buffer (defun ^m-buffer () "Remove all ^M's from the buffer." (interactive) (^m-region (point-min) (point-max))) Then you could define an umbrella function which performs both Ctrl-M removal and untabification in one, something like, (defun ^m-untabify-save-buffer() (interactive) (^m-buffer) (untabify-save-buffer)) And bind it to a global key. (global-set-key [f2] '^m-untabify-save-buffer) Ah, the beauties of Elisp... Regards --Anand On Mon, May 5, 2008 at 4:27 PM, Kiran Jonnalagadda wrote: > On 02-May-08, at 11:46 AM, Biju Chacko wrote: > > > > If you are a vim user you can add: > > > > set expandtabs > > > > to your .vimrc to ensure that vim indents with only spaces. > > > > I'd recommend being more elaborate: > > set et " Expand tabs > set ai " Auto-indent > set sw=4 " Indent to 4 spaces > set ts=8 " Treat tabs as 8 columns > set si " Smart indent > set sta " Smart tab key handling > syn on " Make syntax visible > > " Make tabs visible if you're running gvim > if has("gui_running") > set lcs=tab:??,trail:?,extends:?,precedes:? > endif > > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- -Anand From vsapre80 at gmail.com Mon May 5 13:11:52 2008 From: vsapre80 at gmail.com (Vishal) Date: Mon, 5 May 2008 16:41:52 +0530 Subject: [BangPypers] BangPypers Digest, Vol 8, Issue 15 In-Reply-To: <6e38f9f00805021252s7f5e89d3i5c244a0bd25e65c7@mail.gmail.com> References: <543351.43912.qm@web94611.mail.in2.yahoo.com> <7dd811cb0804300654ofa25beay858872dfde4fa8f6@mail.gmail.com> <3de8e1f70804300731s267ce67eic5e9c3a97fdbacb6@mail.gmail.com> <8548c5f30804302236u152a5e26t52ce5f08b081452c@mail.gmail.com> <481AB1D8.5080802@nixcartel.org> <6e38f9f00805021252s7f5e89d3i5c244a0bd25e65c7@mail.gmail.com> Message-ID: We've found that PyScripter is also pretty good as an IDE. On Sat, May 3, 2008 at 1:22 AM, Ramdas S wrote: > try scite. Its good and works fine on Linux as well as Windows > > Ramdas > > On Fri, May 2, 2008 at 11:46 AM, Biju Chacko wrote: > > > Anand Balachandran Pillai wrote: > > > > > This is a common pitfall encountered by the brand-newbie. > > > Use a good editor which does a good job of "untabifying" > > > your code. > > > > > > I use emacs+python-mode. I use tabs for writing my code > > > since it is easy to indent code using tabs in emacs. I have defined > > > a macro which converts tabs to spaces when saving the file. > > > > > > Make sure you use some good editor which allows you > > > complete control over your tabs and spaces. Refer to previous > > > discussions on Python editors in this list if you want some guidance. > > > > > > > If you are a vim user you can add: > > > > set expandtabs > > > > to your .vimrc to ensure that vim indents with only spaces. > > > > -- b > > > > _______________________________________________ > > 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 > > -- 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. Visit: http://members.soundclick.com/mukulsapre http://www.soundclick.com/gurusgrace Nice gist of all Goodness: ???????? ??????? ????????? ?????? ????? | ????????? ??????? ????? ??????? | -------------- next part -------------- An HTML attachment was scrubbed... URL: From jace at pobox.com Mon May 5 13:31:11 2008 From: jace at pobox.com (Kiran Jonnalagadda) Date: Mon, 5 May 2008 17:01:11 +0530 Subject: [BangPypers] BangPypers Digest, Vol 8, Issue 15 In-Reply-To: <8548c5f30805050408o3545c682v81089715b048bd20@mail.gmail.com> References: <543351.43912.qm@web94611.mail.in2.yahoo.com> <7dd811cb0804300654ofa25beay858872dfde4fa8f6@mail.gmail.com> <3de8e1f70804300731s267ce67eic5e9c3a97fdbacb6@mail.gmail.com> <8548c5f30804302236u152a5e26t52ce5f08b081452c@mail.gmail.com> <481AB1D8.5080802@nixcartel.org> <01A189F7-F904-4263-80A8-06908144C998@pobox.com> <8548c5f30805050408o3545c682v81089715b048bd20@mail.gmail.com> Message-ID: <1B8171CD-D297-4CF5-A041-57C78B74D413@pobox.com> On 05-May-08, at 4:38 PM, Anand Balachandran Pillai wrote: > As an added customization, you could make sure you remove > any additional Ctrl-Ms which are seen when you open a file edited > in DOS/Windows in Unix. > > ;; Remove all Ctrl-Ms from a region > (defun ^m-region (min max) [snip lotsa parenthesis] > And bind it to a global key. > > (global-set-key [f2] '^m-untabify-save-buffer) > > Ah, the beauties of Elisp... No wonder you folks get RSI. Contrast: set ff=dos From siddharta.lists at gmail.com Tue May 6 04:09:35 2008 From: siddharta.lists at gmail.com (Siddharta) Date: Tue, 06 May 2008 07:39:35 +0530 Subject: [BangPypers] BangPypers Digest, Vol 8, Issue 15 In-Reply-To: <8548c5f30805050408o3545c682v81089715b048bd20@mail.gmail.com> References: <543351.43912.qm@web94611.mail.in2.yahoo.com> <7dd811cb0804300654ofa25beay858872dfde4fa8f6@mail.gmail.com> <3de8e1f70804300731s267ce67eic5e9c3a97fdbacb6@mail.gmail.com> <8548c5f30804302236u152a5e26t52ce5f08b081452c@mail.gmail.com> <481AB1D8.5080802@nixcartel.org> <01A189F7-F904-4263-80A8-06908144C998@pobox.com> <8548c5f30805050408o3545c682v81089715b048bd20@mail.gmail.com> Message-ID: <481FBDDF.7040005@gmail.com> I used to be a heavy vim user for python, but now I use Wing IDE. I've tried out a number of free IDEs - SPE, Eric3, Scite, Pydev and plain old vim - and Wing is just way better. Its not free, but its worth it, especially if you do a lot of python programming involving multiple files - http://www.wingide.com/wingide/index -- Siddharta Govindaraj Anand Balachandran Pillai wrote: > All right. Since vimmers are on a roll, Emacs-ians cannot be left behind ;) > > Here are the customizations for emacs. > > First you need "python-mode" for editing Python code. Get it from > http://sourceforge.net/projects/python-mode/ and put the python-mode.el > file in some directory which is part of your Emacs "load-path" variable. > > Now, in your .emacs file, add the following lines > > ;; These make sure that when you open a Python file > ;; the python-mode is loaded automatically > (add-to-list 'auto-mode-alist '("\\.py$" . python-mode)) > (add-to-list 'auto-mode-alist '("\\.pyw$" . python-mode)) > > ;; A set of prog-modes which require tabs, example, Makefiles. > (setq tabify-modes '(makefile-gmake-mode)) > > ;; Convert tabs to spaces and saves the buffer > (defun untabify-save-buffer() > (interactive) > (if (not (member major-mode tabify-modes)) > (untabify (point-min) (point-max))) > (save-buffer)) > > Bind the function "untabify-save-buffer" to some convenient key. > I have bound it to F2. Then press the short-cut key everytime to > save an edited buffer to disk. > > (global-set-key [f2] 'untabify-save-buffer) > > That's it. Keep using tabs to format your Python source code > and at the end hit F2 to save the buffer and emacs takes care > of the rest. > > As an added customization, you could make sure you remove > any additional Ctrl-Ms which are seen when you open a file edited > in DOS/Windows in Unix. > > ;; Remove all Ctrl-Ms from a region > (defun ^m-region (min max) > "Remove all ^M's from the region." > (interactive "r") > (save-excursion > (goto-char max) > (while (re-search-backward "\C-m$" min t) > (delete-char 1)))) > > ;; Remove all Ctrl-Ms from a buffer > (defun ^m-buffer () > "Remove all ^M's from the buffer." > (interactive) > (^m-region (point-min) (point-max))) > > Then you could define an umbrella function which performs both > Ctrl-M removal and untabification in one, something like, > > (defun ^m-untabify-save-buffer() > (interactive) > (^m-buffer) > (untabify-save-buffer)) > > And bind it to a global key. > > (global-set-key [f2] '^m-untabify-save-buffer) > > Ah, the beauties of Elisp... > > Regards > > --Anand > > On Mon, May 5, 2008 at 4:27 PM, Kiran Jonnalagadda wrote: > >> On 02-May-08, at 11:46 AM, Biju Chacko wrote: >> >> >> >>> If you are a vim user you can add: >>> >>> set expandtabs >>> >>> to your .vimrc to ensure that vim indents with only spaces. >>> >>> >> I'd recommend being more elaborate: >> >> set et " Expand tabs >> set ai " Auto-indent >> set sw=4 " Indent to 4 spaces >> set ts=8 " Treat tabs as 8 columns >> set si " Smart indent >> set sta " Smart tab key handling >> syn on " Make syntax visible >> >> " Make tabs visible if you're running gvim >> if has("gui_running") >> set lcs=tab:??,trail:?,extends:?,precedes:? >> endif >> >> >> _______________________________________________ >> BangPypers mailing list >> BangPypers at python.org >> http://mail.python.org/mailman/listinfo/bangpypers >> From jace at pobox.com Tue May 6 04:45:26 2008 From: jace at pobox.com (Kiran Jonnalagadda) Date: Tue, 6 May 2008 08:15:26 +0530 Subject: [BangPypers] BangPypers Digest, Vol 8, Issue 15 In-Reply-To: <481FBDDF.7040005@gmail.com> References: <543351.43912.qm@web94611.mail.in2.yahoo.com> <7dd811cb0804300654ofa25beay858872dfde4fa8f6@mail.gmail.com> <3de8e1f70804300731s267ce67eic5e9c3a97fdbacb6@mail.gmail.com> <8548c5f30804302236u152a5e26t52ce5f08b081452c@mail.gmail.com> <481AB1D8.5080802@nixcartel.org> <01A189F7-F904-4263-80A8-06908144C998@pobox.com> <8548c5f30805050408o3545c682v81089715b048bd20@mail.gmail.com> <481FBDDF.7040005@gmail.com> Message-ID: On 06-May-08, at 7:39 AM, Siddharta wrote: > I used to be a heavy vim user for python, but now I use Wing IDE. > I've tried out a number of free IDEs - SPE, Eric3, Scite, Pydev and > plain old vim - and Wing is just way better. Its not free, but its > worth it, especially if you do a lot of python programming involving > multiple files -http://www.wingide.com/wingide/index I've actually given up on Wing after years of using it. Their Mac OS X version under X11 is simply too cumbersome no matter which way you tweak it. The job went to TextMate, which is a far less featured editor, but far more elegant. Vim remains in use at the command line and on my Linux machines. From botsie at nixcartel.org Tue May 6 06:24:27 2008 From: botsie at nixcartel.org (Biju Chacko) Date: Tue, 06 May 2008 09:54:27 +0530 Subject: [BangPypers] BangPypers Digest, Vol 8, Issue 15 In-Reply-To: References: <543351.43912.qm@web94611.mail.in2.yahoo.com> <7dd811cb0804300654ofa25beay858872dfde4fa8f6@mail.gmail.com> <3de8e1f70804300731s267ce67eic5e9c3a97fdbacb6@mail.gmail.com> <8548c5f30804302236u152a5e26t52ce5f08b081452c@mail.gmail.com> <481AB1D8.5080802@nixcartel.org> <01A189F7-F904-4263-80A8-06908144C998@pobox.com> <8548c5f30805050408o3545c682v81089715b048bd20@mail.gmail.com> <481FBDDF.7040005@gmail.com> Message-ID: <481FDD7B.70305@nixcartel.org> Kiran Jonnalagadda wrote: > On 06-May-08, at 7:39 AM, Siddharta wrote: > >> I used to be a heavy vim user for python, but now I use Wing IDE. I've >> tried out a number of free IDEs - SPE, Eric3, Scite, Pydev and plain >> old vim - and Wing is just way better. Its not free, but its worth it, >> especially if you do a lot of python programming involving multiple >> files -http://www.wingide.com/wingide/index > > I've actually given up on Wing after years of using it. Their Mac OS X > version under X11 is simply too cumbersome no matter which way you tweak > it. The job went to TextMate, which is a far less featured editor, but > far more elegant. > > Vim remains in use at the command line and on my Linux machines. I evaluated Komodo as an IDE and thought it was excellent for most scripting languages. It was too expensive for me though. They now have a free version, but is very limited. -- b From sridhar.ratna at gmail.com Tue May 6 06:32:29 2008 From: sridhar.ratna at gmail.com (Sridhar Ratnakumar) Date: Mon, 5 May 2008 21:32:29 -0700 Subject: [BangPypers] BangPypers Digest, Vol 8, Issue 15 In-Reply-To: <481FBDDF.7040005@gmail.com> References: <543351.43912.qm@web94611.mail.in2.yahoo.com> <7dd811cb0804300654ofa25beay858872dfde4fa8f6@mail.gmail.com> <3de8e1f70804300731s267ce67eic5e9c3a97fdbacb6@mail.gmail.com> <8548c5f30804302236u152a5e26t52ce5f08b081452c@mail.gmail.com> <481AB1D8.5080802@nixcartel.org> <01A189F7-F904-4263-80A8-06908144C998@pobox.com> <8548c5f30805050408o3545c682v81089715b048bd20@mail.gmail.com> <481FBDDF.7040005@gmail.com> Message-ID: <7c73a13a0805052132u52e6a3c0jd3c12b7e0bb29dc7@mail.gmail.com> On Mon, May 5, 2008 at 7:09 PM, Siddharta wrote: > Wing is just way better. Its not free, but its worth it, especially if you > do a lot of python programming involving multiple files - > http://www.wingide.com/wingide/index Wing IDE is *free* for open source projects. From gnuyoga at gmail.com Tue May 6 06:36:37 2008 From: gnuyoga at gmail.com (gnuyoga) Date: Tue, 06 May 2008 10:06:37 +0530 Subject: [BangPypers] BangPypers Digest, Vol 8, Issue 15 In-Reply-To: <481FDD7B.70305@nixcartel.org> References: <543351.43912.qm@web94611.mail.in2.yahoo.com> <7dd811cb0804300654ofa25beay858872dfde4fa8f6@mail.gmail.com> <3de8e1f70804300731s267ce67eic5e9c3a97fdbacb6@mail.gmail.com> <8548c5f30804302236u152a5e26t52ce5f08b081452c@mail.gmail.com> <481AB1D8.5080802@nixcartel.org> <01A189F7-F904-4263-80A8-06908144C998@pobox.com> <8548c5f30805050408o3545c682v81089715b048bd20@mail.gmail.com> <481FBDDF.7040005@gmail.com> <481FDD7B.70305@nixcartel.org> Message-ID: <481FE055.9050709@gmail.com> Biju Chacko wrote: > Kiran Jonnalagadda wrote: >> On 06-May-08, at 7:39 AM, Siddharta wrote: >> >>> I used to be a heavy vim user for python, but now I use Wing IDE. >>> I've tried out a number of free IDEs - SPE, Eric3, Scite, Pydev and >>> plain old vim - and Wing is just way better. Its not free, but its >>> worth it, especially if you do a lot of python programming involving >>> multiple files -http://www.wingide.com/wingide/index >> >> I've actually given up on Wing after years of using it. Their Mac OS >> X version under X11 is simply too cumbersome no matter which way you >> tweak it. The job went to TextMate, which is a far less featured >> editor, but far more elegant. >> >> Vim remains in use at the command line and on my Linux machines. > > I evaluated Komodo as an IDE and thought it was excellent for most > scripting languages. It was too expensive for me though. They now have > a free version, but is very limited. jEDIT seems to a perfect fit for me in most of my cases .... i used to work in emacs early .... jedit supports emacs key bindings as well. - sree -- http://picasaweb.google.com/gnuyoga Each soul is potentially divine. The goal is to manifest the divine by controlling nature, internal or external. Do this by work or worship or psychic control or philosophy by one or more, or all of these and be free. From banibrata.dutta at gmail.com Tue May 6 06:42:25 2008 From: banibrata.dutta at gmail.com (Banibrata Dutta) Date: Tue, 6 May 2008 10:12:25 +0530 Subject: [BangPypers] BangPypers Digest, Vol 8, Issue 15 In-Reply-To: <7c73a13a0805052132u52e6a3c0jd3c12b7e0bb29dc7@mail.gmail.com> References: <543351.43912.qm@web94611.mail.in2.yahoo.com> <7dd811cb0804300654ofa25beay858872dfde4fa8f6@mail.gmail.com> <3de8e1f70804300731s267ce67eic5e9c3a97fdbacb6@mail.gmail.com> <8548c5f30804302236u152a5e26t52ce5f08b081452c@mail.gmail.com> <481AB1D8.5080802@nixcartel.org> <01A189F7-F904-4263-80A8-06908144C998@pobox.com> <8548c5f30805050408o3545c682v81089715b048bd20@mail.gmail.com> <481FBDDF.7040005@gmail.com> <7c73a13a0805052132u52e6a3c0jd3c12b7e0bb29dc7@mail.gmail.com> Message-ID: <3de8e1f70805052142g46bda94fw8dfbf72aab57a18e@mail.gmail.com> I've been using the FOSS "PyScripter" albeit (I think) it is available only on Windows. It's very snappy, easy to use, easy to configure etc. On 5/6/08, Sridhar Ratnakumar wrote: > On Mon, May 5, 2008 at 7:09 PM, Siddharta wrote: > > > Wing is just way better. Its not free, but its worth it, especially if you > > do a lot of python programming involving multiple files - > > http://www.wingide.com/wingide/index > > Wing IDE is *free* for open source projects. > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- regards, Banibrata http://www.linkedin.com/in/bdutta From lawgon at au-kbc.org Tue May 6 06:51:00 2008 From: lawgon at au-kbc.org (Kenneth Gonsalves) Date: Tue, 6 May 2008 10:21:00 +0530 Subject: [BangPypers] BangPypers Digest, Vol 8, Issue 15 In-Reply-To: <481FE055.9050709@gmail.com> References: <543351.43912.qm@web94611.mail.in2.yahoo.com> <7dd811cb0804300654ofa25beay858872dfde4fa8f6@mail.gmail.com> <3de8e1f70804300731s267ce67eic5e9c3a97fdbacb6@mail.gmail.com> <8548c5f30804302236u152a5e26t52ce5f08b081452c@mail.gmail.com> <481AB1D8.5080802@nixcartel.org> <01A189F7-F904-4263-80A8-06908144C998@pobox.com> <8548c5f30805050408o3545c682v81089715b048bd20@mail.gmail.com> <481FBDDF.7040005@gmail.com> <481FDD7B.70305@nixcartel.org> <481FE055.9050709@gmail.com> Message-ID: <92967649-0D86-4BC0-A03B-1EE0A207FDE4@au-kbc.org> On 06-May-08, at 10:06 AM, gnuyoga wrote: > Biju Chacko wrote: >> Kiran Jonnalagadda wrote: >>> On 06-May-08, at 7:39 AM, Siddharta wrote: >>> >>>> I used to be a heavy vim user for python, but now I use Wing >>>> IDE. I've tried out a number of free IDEs - SPE, Eric3, Scite, >>>> Pydev and plain old vim - and Wing is just way better. Its not >>>> free, but its worth it, especially if you do a lot of python >>>> programming involving multiple files -http://www.wingide.com/ >>>> wingide/index >>> >>> I've actually given up on Wing after years of using it. Their Mac >>> OS X version under X11 is simply too cumbersome no matter which >>> way you tweak it. The job went to TextMate, which is a far less >>> featured editor, but far more elegant. >>> >>> Vim remains in use at the command line and on my Linux machines. >> >> I evaluated Komodo as an IDE and thought it was excellent for most >> scripting languages. It was too expensive for me though. They now >> have a free version, but is very limited. > > jEDIT seems to a perfect fit for me in most of my cases .... i used > to work in emacs early .... jedit supports emacs key bindings as well. textmate for mac and SPE or eric4 for linux -- regards Kenneth Gonsalves Associate, NRC-FOSS lawgon at au-kbc.org http://nrcfosshelpline.in/code/ From pradeep at btbytes.com Tue May 6 07:01:31 2008 From: pradeep at btbytes.com (Pradeep Gowda) Date: Tue, 6 May 2008 01:01:31 -0400 Subject: [BangPypers] BangPypers Digest, Vol 8, Issue 15 In-Reply-To: <92967649-0D86-4BC0-A03B-1EE0A207FDE4@au-kbc.org> References: <543351.43912.qm@web94611.mail.in2.yahoo.com> <7dd811cb0804300654ofa25beay858872dfde4fa8f6@mail.gmail.com> <3de8e1f70804300731s267ce67eic5e9c3a97fdbacb6@mail.gmail.com> <8548c5f30804302236u152a5e26t52ce5f08b081452c@mail.gmail.com> <481AB1D8.5080802@nixcartel.org> <01A189F7-F904-4263-80A8-06908144C998@pobox.com> <8548c5f30805050408o3545c682v81089715b048bd20@mail.gmail.com> <481FBDDF.7040005@gmail.com> <481FDD7B.70305@nixcartel.org> <481FE055.9050709@gmail.com> <92967649-0D86-4BC0-A03B-1EE0A207FDE4@au-kbc.org> Message-ID: <2C82E1A6-8541-4466-9A05-FD782BB331E1@btbytes.com> On 06-May-08, at 12:51 AM, Kenneth Gonsalves wrote: > textmate for mac and SPE or eric4 for linux > Lets me also point out that whatever you choose, dont *ever* use Notepad. Notepad is the most useless piece of software that ships with windows. I use Textmate and aquamacs (both on mac of course) and vim occasionally. For a windows new user, I recomment SciTE (which is also available via pywin IDE). I recommend it to every new student of mine and so far, I've heard no complaints. Some of them have switched to vim/emacs etc.,. But to start with SciTe is the easiest. Its super-light weight, supports lots of languages, is cross platform. An editor like SciTE which "understands" python, makes the "space is signiicant" mental block a little easy for the newbie. Also, SciTE has an easy shortcut "F5" to execute code, the result of which can be seen in split window. This also makes it attractive for "write-test" interactive mode. On the side notes: I wrote an app using Google AppEngine and Python : http://www.btbytes.com/2008/05/announcing-teh-the-minimalist-blog- tool-using-google-app-engine +Pradeep From siddharta.lists at gmail.com Tue May 6 07:48:41 2008 From: siddharta.lists at gmail.com (Siddharta) Date: Tue, 06 May 2008 11:18:41 +0530 Subject: [BangPypers] BangPypers Digest, Vol 8, Issue 15 In-Reply-To: <2C82E1A6-8541-4466-9A05-FD782BB331E1@btbytes.com> References: <543351.43912.qm@web94611.mail.in2.yahoo.com> <7dd811cb0804300654ofa25beay858872dfde4fa8f6@mail.gmail.com> <3de8e1f70804300731s267ce67eic5e9c3a97fdbacb6@mail.gmail.com> <8548c5f30804302236u152a5e26t52ce5f08b081452c@mail.gmail.com> <481AB1D8.5080802@nixcartel.org> <01A189F7-F904-4263-80A8-06908144C998@pobox.com> <8548c5f30805050408o3545c682v81089715b048bd20@mail.gmail.com> <481FBDDF.7040005@gmail.com> <481FDD7B.70305@nixcartel.org> <481FE055.9050709@gmail.com> <92967649-0D86-4BC0-A03B-1EE0A207FDE4@au-kbc.org> <2C82E1A6-8541-4466-9A05-FD782BB331E1@btbytes.com> Message-ID: <481FF139.9040006@gmail.com> The problem I have with stand alone editors is that they are okay for writing code, but absolutely lousy for reading and cleaning code. Most of the time I'm dealing with multiple files, and when reading code I want to be able to jump to the implementation of a method, then go back to where I was and so on. Then you want to rename a method or move code into a separate module and fix all the references. These kinds of things are major headaches in a standalone editor and tags/grep etc dont cut it. In any long term project, 75% of the work is in maintenance, reading and cleaning code. Unfortunately, most editors are optimised for *writing* code which is the least of my problems with Python's minimal syntax. I prefer an IDE optimized for reading, navigating and cleaning code and Wing does a pretty good job here, not as good as some other language IDEs but the best I've seen for Python. The second thing I like about Wing is that it has an interactive python shell which executes in context. Which means I can select a piece of code and run just that snippet in the shell and see the output. Also, I can put a breakpoint and then execute code in the shell with the execution context at the time of the breakpoint. Both are really useful, and again not provided in a stand alone editor. Plus a very nice debugger where you can see the call stack, breakpoints, watches, single step which are taken for granted in any language IDE but seem to be missing or poorly implemented in most Python IDEs. -- Siddharta Govindaraj Pradeep Gowda wrote: > > On 06-May-08, at 12:51 AM, Kenneth Gonsalves wrote: > >> textmate for mac and SPE or eric4 for linux >> > > Lets me also point out that whatever you choose, dont *ever* use Notepad. > Notepad is the most useless piece of software that ships with windows. > > I use Textmate and aquamacs (both on mac of course) and vim occasionally. > > For a windows new user, I recomment SciTE (which is also available via > pywin IDE). > I recommend it to every new student of mine and so far, I've heard no > complaints. Some of them have switched to vim/emacs etc.,. But to > start with SciTe is the easiest. > Its super-light weight, supports lots of languages, is cross platform. > An editor like SciTE which "understands" python, makes the "space is > signiicant" mental block a little easy for the newbie. > Also, SciTE has an easy shortcut "F5" to execute code, the result of > which can be seen in split window. This also makes it attractive for > "write-test" interactive mode. > > On the side notes: I wrote an app using Google AppEngine and Python : > http://www.btbytes.com/2008/05/announcing-teh-the-minimalist-blog-tool-using-google-app-engine > > > +Pradeep From banibrata.dutta at gmail.com Tue May 6 08:06:36 2008 From: banibrata.dutta at gmail.com (Banibrata Dutta) Date: Tue, 6 May 2008 11:36:36 +0530 Subject: [BangPypers] BangPypers Digest, Vol 8, Issue 15 In-Reply-To: <481FF139.9040006@gmail.com> References: <01A189F7-F904-4263-80A8-06908144C998@pobox.com> <8548c5f30805050408o3545c682v81089715b048bd20@mail.gmail.com> <481FBDDF.7040005@gmail.com> <481FDD7B.70305@nixcartel.org> <481FE055.9050709@gmail.com> <92967649-0D86-4BC0-A03B-1EE0A207FDE4@au-kbc.org> <2C82E1A6-8541-4466-9A05-FD782BB331E1@btbytes.com> <481FF139.9040006@gmail.com> Message-ID: <3de8e1f70805052306w7a799b03k7f0a5b592624868b@mail.gmail.com> "PyScripter" does all the above... so does "Bric", "Komodo", "Emacs", "Eclipse with the plugin" etc. IMHO, at the end of the day, we use what you are most comfortable with, and what works for us.. :-) On 5/6/08, Siddharta wrote: > The problem I have with stand alone editors is that they are okay for > writing code, but absolutely lousy for reading and cleaning code. Most of > the time I'm dealing with multiple files, and when reading code I want to be > able to jump to the implementation of a method, then go back to where I was > and so on. Then you want to rename a method or move code into a separate > module and fix all the references. These kinds of things are major headaches > in a standalone editor and tags/grep etc dont cut it. In any long term > project, 75% of the work is in maintenance, reading and cleaning code. > Unfortunately, most editors are optimised for *writing* code which is the > least of my problems with Python's minimal syntax. I prefer an IDE optimized > for reading, navigating and cleaning code and Wing does a pretty good job > here, not as good as some other language IDEs but the best I've seen for > Python. > > The second thing I like about Wing is that it has an interactive python > shell which executes in context. Which means I can select a piece of code > and run just that snippet in the shell and see the output. Also, I can put a > breakpoint and then execute code in the shell with the execution context at > the time of the breakpoint. Both are really useful, and again not provided > in a stand alone editor. Plus a very nice debugger where you can see the > call stack, breakpoints, watches, single step which are taken for granted in > any language IDE but seem to be missing or poorly implemented in most Python > IDEs. > -- > Siddharta Govindaraj > > > Pradeep Gowda wrote: > > > > On 06-May-08, at 12:51 AM, Kenneth Gonsalves wrote: > > > > > > > textmate for mac and SPE or eric4 for linux > > > > > > > > > > Lets me also point out that whatever you choose, dont *ever* use Notepad. > > Notepad is the most useless piece of software that ships with windows. > > > > I use Textmate and aquamacs (both on mac of course) and vim occasionally. > > > > For a windows new user, I recomment SciTE (which is also available via > pywin IDE). > > I recommend it to every new student of mine and so far, I've heard no > complaints. Some of them have switched to vim/emacs etc.,. But to start with > SciTe is the easiest. > > Its super-light weight, supports lots of languages, is cross platform. > > An editor like SciTE which "understands" python, makes the "space is > signiicant" mental block a little easy for the newbie. > > Also, SciTE has an easy shortcut "F5" to execute code, the result of which > can be seen in split window. This also makes it attractive for "write-test" > interactive mode. > > > > On the side notes: I wrote an app using Google AppEngine and Python : > http://www.btbytes.com/2008/05/announcing-teh-the-minimalist-blog-tool-using-google-app-engine > > > > +Pradeep > > > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- regards, Banibrata http://www.linkedin.com/in/bdutta From abpillai at gmail.com Tue May 6 08:12:01 2008 From: abpillai at gmail.com (Anand Balachandran Pillai) Date: Tue, 6 May 2008 11:42:01 +0530 Subject: [BangPypers] BangPypers Digest, Vol 8, Issue 15 In-Reply-To: <481FF139.9040006@gmail.com> References: <01A189F7-F904-4263-80A8-06908144C998@pobox.com> <8548c5f30805050408o3545c682v81089715b048bd20@mail.gmail.com> <481FBDDF.7040005@gmail.com> <481FDD7B.70305@nixcartel.org> <481FE055.9050709@gmail.com> <92967649-0D86-4BC0-A03B-1EE0A207FDE4@au-kbc.org> <2C82E1A6-8541-4466-9A05-FD782BB331E1@btbytes.com> <481FF139.9040006@gmail.com> Message-ID: <8548c5f30805052312p2aa5f749o572f68995f7def68@mail.gmail.com> I am old school when it comes to program editors. I keep away from IDEs as much as possible, unless there is not getting away from it. The only thing which a good IDE gives according to me is visual debugging. Everything else can be done by smart customization of swiss-army-knives of editors such as Emacs/Vim. Hell, I even do Java coding in Emacs + command-line ;) In my 9+ years of working in software, I have tried many editors from the stupid, simple to the complex and it has always been square one back to Emacs. I guess once you get used to the freedom and power Emacs + Lisp gives you, nothing feels comparable, taunts from vim users not withstanding. Still, some editors have impressed me - Kate (KDE Advanced Text Editor) is one which I use occasionally. For Python, I sometimes use SPE (Stani's Python Editor) especially for writing OO code, since it has a nice built-in UML generation tab, which is quite useful for refactoring old code. I wonder why nobody here has mentioned this good editor. It is strictly for Python though. However, I remain loyal to the Church of Emacs, since 1999 ! Regards On Tue, May 6, 2008 at 11:18 AM, Siddharta wrote: > The problem I have with stand alone editors is that they are okay for > writing code, but absolutely lousy for reading and cleaning code. Most of > the time I'm dealing with multiple files, and when reading code I want to be > able to jump to the implementation of a method, then go back to where I was > and so on. Then you want to rename a method or move code into a separate > module and fix all the references. These kinds of things are major headaches > in a standalone editor and tags/grep etc dont cut it. In any long term > project, 75% of the work is in maintenance, reading and cleaning code. > Unfortunately, most editors are optimised for *writing* code which is the > least of my problems with Python's minimal syntax. I prefer an IDE optimized > for reading, navigating and cleaning code and Wing does a pretty good job > here, not as good as some other language IDEs but the best I've seen for > Python. > > The second thing I like about Wing is that it has an interactive python > shell which executes in context. Which means I can select a piece of code > and run just that snippet in the shell and see the output. Also, I can put a > breakpoint and then execute code in the shell with the execution context at > the time of the breakpoint. Both are really useful, and again not provided > in a stand alone editor. Plus a very nice debugger where you can see the > call stack, breakpoints, watches, single step which are taken for granted in > any language IDE but seem to be missing or poorly implemented in most Python > IDEs. > -- > Siddharta Govindaraj > > > > Pradeep Gowda wrote: > > > > > On 06-May-08, at 12:51 AM, Kenneth Gonsalves wrote: > > > > > > > textmate for mac and SPE or eric4 for linux > > > > > > > > > > Lets me also point out that whatever you choose, dont *ever* use Notepad. > > Notepad is the most useless piece of software that ships with windows. > > > > I use Textmate and aquamacs (both on mac of course) and vim occasionally. > > > > For a windows new user, I recomment SciTE (which is also available via > pywin IDE). > > I recommend it to every new student of mine and so far, I've heard no > complaints. Some of them have switched to vim/emacs etc.,. But to start with > SciTe is the easiest. > > Its super-light weight, supports lots of languages, is cross platform. > > An editor like SciTE which "understands" python, makes the "space is > signiicant" mental block a little easy for the newbie. > > Also, SciTE has an easy shortcut "F5" to execute code, the result of which > can be seen in split window. This also makes it attractive for "write-test" > interactive mode. > > > > On the side notes: I wrote an app using Google AppEngine and Python : > http://www.btbytes.com/2008/05/announcing-teh-the-minimalist-blog-tool-using-google-app-engine > > > > +Pradeep > > > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- -Anand From lawgon at au-kbc.org Tue May 6 08:37:22 2008 From: lawgon at au-kbc.org (Kenneth Gonsalves) Date: Tue, 6 May 2008 12:07:22 +0530 Subject: [BangPypers] BangPypers Digest, Vol 8, Issue 15 In-Reply-To: <8548c5f30805052312p2aa5f749o572f68995f7def68@mail.gmail.com> References: <01A189F7-F904-4263-80A8-06908144C998@pobox.com> <8548c5f30805050408o3545c682v81089715b048bd20@mail.gmail.com> <481FBDDF.7040005@gmail.com> <481FDD7B.70305@nixcartel.org> <481FE055.9050709@gmail.com> <92967649-0D86-4BC0-A03B-1EE0A207FDE4@au-kbc.org> <2C82E1A6-8541-4466-9A05-FD782BB331E1@btbytes.com> <481FF139.9040006@gmail.com> <8548c5f30805052312p2aa5f749o572f68995f7def68@mail.gmail.com> Message-ID: On 06-May-08, at 11:42 AM, Anand Balachandran Pillai wrote: > For Python, I sometimes use SPE > (Stani's Python Editor) especially for writing OO code, since it > has a nice > built-in UML generation tab, which is quite useful for refactoring > old code. > I wonder why nobody here has mentioned this good editor. It is > strictly > for Python though. if you check the thread you will find that I have mentioned it -- regards Kenneth Gonsalves Associate, NRC-FOSS lawgon at au-kbc.org http://nrcfosshelpline.in/code/ From abpillai at gmail.com Tue May 6 08:40:51 2008 From: abpillai at gmail.com (Anand Balachandran Pillai) Date: Tue, 6 May 2008 12:10:51 +0530 Subject: [BangPypers] BangPypers Digest, Vol 8, Issue 15 In-Reply-To: References: <481FBDDF.7040005@gmail.com> <481FDD7B.70305@nixcartel.org> <481FE055.9050709@gmail.com> <92967649-0D86-4BC0-A03B-1EE0A207FDE4@au-kbc.org> <2C82E1A6-8541-4466-9A05-FD782BB331E1@btbytes.com> <481FF139.9040006@gmail.com> <8548c5f30805052312p2aa5f749o572f68995f7def68@mail.gmail.com> Message-ID: <8548c5f30805052340n5fe3d5b2h77e3e49ca9fd071c@mail.gmail.com> On Tue, May 6, 2008 at 12:07 PM, Kenneth Gonsalves wrote: > > On 06-May-08, at 11:42 AM, Anand Balachandran Pillai wrote: > > > > For Python, I sometimes use SPE > > (Stani's Python Editor) especially for writing OO code, since it has a > nice > > built-in UML generation tab, which is quite useful for refactoring old > code. > > I wonder why nobody here has mentioned this good editor. It is strictly > > for Python though. > > > > if you check the thread you will find that I have mentioned it Saw that. How do you rate Eric4 Kenneth ? I read somewhere that Eric* is a good IDE for students,teachers and perhaps not for professionals, is this True > > > > -- > regards > > Kenneth Gonsalves > Associate, NRC-FOSS > lawgon at au-kbc.org > http://nrcfosshelpline.in/code/ > > > > > _______________________________________________ > > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- -Anand From lawgon at au-kbc.org Tue May 6 09:01:23 2008 From: lawgon at au-kbc.org (Kenneth Gonsalves) Date: Tue, 6 May 2008 12:31:23 +0530 Subject: [BangPypers] BangPypers Digest, Vol 8, Issue 15 In-Reply-To: <8548c5f30805052340n5fe3d5b2h77e3e49ca9fd071c@mail.gmail.com> References: <481FBDDF.7040005@gmail.com> <481FDD7B.70305@nixcartel.org> <481FE055.9050709@gmail.com> <92967649-0D86-4BC0-A03B-1EE0A207FDE4@au-kbc.org> <2C82E1A6-8541-4466-9A05-FD782BB331E1@btbytes.com> <481FF139.9040006@gmail.com> <8548c5f30805052312p2aa5f749o572f68995f7def68@mail.gmail.com> <8548c5f30805052340n5fe3d5b2h77e3e49ca9fd071c@mail.gmail.com> Message-ID: <7B20E84F-46F8-4C1A-899E-6E0BD41748EB@au-kbc.org> On 06-May-08, at 12:10 PM, Anand Balachandran Pillai wrote: >> >> if you check the thread you will find that I have mentioned it > > Saw that. How do you rate Eric4 Kenneth ? I read somewhere that Eric* > is a good IDE for students,teachers and perhaps not for professionals, > is this True i debug using print statements, so am not really qualified to rate anything ;-) But I and all my team use eric4 - I started using SPE on sabayon because eric4 would not install. Except one member who uses kate because he does all his comments in tamil and only kate can handle that. -- regards Kenneth Gonsalves Associate, NRC-FOSS lawgon at au-kbc.org http://nrcfosshelpline.in/code/ From gurpreet.sachdeva at gmail.com Wed May 7 13:19:29 2008 From: gurpreet.sachdeva at gmail.com (Gurpreet Sachdeva) Date: Wed, 7 May 2008 16:49:29 +0530 Subject: [BangPypers] How to check file size before downloading it Message-ID: Is there a way in urllib to check file size (from the webserver) before downloading it? Or any other python module from this? Thanks and Regards, Gurpreet Singh -------------- next part -------------- An HTML attachment was scrubbed... URL: From vinayakh at gmail.com Wed May 7 13:47:26 2008 From: vinayakh at gmail.com (Vinayak Hegde) Date: Wed, 7 May 2008 17:17:26 +0530 Subject: [BangPypers] How to check file size before downloading it In-Reply-To: References: Message-ID: <38940f3c0805070447o57024badu6a02bbe6b3576980@mail.gmail.com> On Wed, May 7, 2008 at 4:49 PM, Gurpreet Sachdeva wrote: > Is there a way in urllib to check file size (from the webserver) before > downloading it? Or any other python module from this? Just do a HEAD http request and check the content-length header of the server's http response. -- Vinayak -- http://www.linkedin.com/in/VinayakH From anandology at gmail.com Wed May 7 13:50:03 2008 From: anandology at gmail.com (Anand Chitipothu) Date: Wed, 7 May 2008 17:20:03 +0530 Subject: [BangPypers] How to check file size before downloading it In-Reply-To: References: Message-ID: <41139fcb0805070450raf93538yf8ba93bfce98f4d5@mail.gmail.com> On Wed, May 7, 2008 at 4:49 PM, Gurpreet Sachdeva wrote: > Is there a way in urllib to check file size (from the webserver) before > downloading it? Or any other python module from this? If you are on *nix, you can use curl -I to make a HEAD request, which contains Content-Length header. $ curl -I http://www.google.com/favicon.ico HTTP/1.1 200 OK Content-Type: image/x-icon Last-Modified: Wed, 07 Jun 2006 19:35:34 GMT Expires: Sun, 17 Jan 2038 19:14:07 GMT Date: Wed, 07 May 2008 11:45:57 GMT Server: gws Content-Length: 1406 Age: 7 From abpillai at gmail.com Wed May 7 14:11:54 2008 From: abpillai at gmail.com (Anand Balachandran Pillai) Date: Wed, 7 May 2008 17:41:54 +0530 Subject: [BangPypers] How to check file size before downloading it In-Reply-To: <41139fcb0805070450raf93538yf8ba93bfce98f4d5@mail.gmail.com> References: <41139fcb0805070450raf93538yf8ba93bfce98f4d5@mail.gmail.com> Message-ID: <8548c5f30805070511k60e6e38ga7f936f5ef11a1b2@mail.gmail.com> Make a HEAD request. Here is one way of doing it, using urllib2. class HeadRequest(urllib2.Request): """ A request class which performs a HEAD request """ def get_method(self): return 'HEAD' req = HeadRequest(url) f = urllib2.urlopen(req) headers = dict(f.headers) print headers.get('content-length',-1) --Anand On Wed, May 7, 2008 at 5:20 PM, Anand Chitipothu wrote: > On Wed, May 7, 2008 at 4:49 PM, Gurpreet Sachdeva > wrote: > > > Is there a way in urllib to check file size (from the webserver) before > > downloading it? Or any other python module from this? > > If you are on *nix, you can use curl -I to make a HEAD request, which > contains Content-Length header. > > $ curl -I http://www.google.com/favicon.ico > HTTP/1.1 200 OK > Content-Type: image/x-icon > Last-Modified: Wed, 07 Jun 2006 19:35:34 GMT > Expires: Sun, 17 Jan 2038 19:14:07 GMT > Date: Wed, 07 May 2008 11:45:57 GMT > Server: gws > Content-Length: 1406 > Age: 7 > > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- -Anand From anandology at gmail.com Wed May 7 14:21:27 2008 From: anandology at gmail.com (Anand Chitipothu) Date: Wed, 7 May 2008 17:51:27 +0530 Subject: [BangPypers] How to check file size before downloading it In-Reply-To: <8548c5f30805070511k60e6e38ga7f936f5ef11a1b2@mail.gmail.com> References: <41139fcb0805070450raf93538yf8ba93bfce98f4d5@mail.gmail.com> <8548c5f30805070511k60e6e38ga7f936f5ef11a1b2@mail.gmail.com> Message-ID: <41139fcb0805070521qcd9757h9938122d19325518@mail.gmail.com> On Wed, May 7, 2008 at 5:41 PM, Anand Balachandran Pillai wrote: > Make a HEAD request. Here is one way of doing it, using urllib2. > > class HeadRequest(urllib2.Request): > """ A request class which performs a HEAD request """ > > def get_method(self): > return 'HEAD' > > req = HeadRequest(url) > f = urllib2.urlopen(req) > headers = dict(f.headers) > print headers.get('content-length',-1)' Here is another way. import httplib conn = httplib.HTTPConnection(host) conn.request('HEAD', path) print conn.getresponse().getheader('Content-Type') From akashmahajan at gmail.com Wed May 7 14:23:01 2008 From: akashmahajan at gmail.com (Akash) Date: Wed, 7 May 2008 17:53:01 +0530 Subject: [BangPypers] How to check file size before downloading it In-Reply-To: <8548c5f30805070511k60e6e38ga7f936f5ef11a1b2@mail.gmail.com> References: <41139fcb0805070450raf93538yf8ba93bfce98f4d5@mail.gmail.com> <8548c5f30805070511k60e6e38ga7f936f5ef11a1b2@mail.gmail.com> Message-ID: <868b524f0805070523o169c81dcj5a93c75b366bf3de@mail.gmail.com> On Wed, May 7, 2008 at 5:41 PM, Anand Balachandran Pillai wrote: > Make a HEAD request. Here is one way of doing it, using urllib2. Since we are on the subject of urllib2. Any resources you recommend other than the standard python docs ? I have referred to this sometimes : http://www.voidspace.org.uk/python/articles/urllib2.shtml Was looking to add to my bookmarks regards Akash From srsy70 at gmail.com Wed May 7 18:49:59 2008 From: srsy70 at gmail.com (S.Ramaswamy) Date: Wed, 7 May 2008 22:19:59 +0530 Subject: [BangPypers] How to check file size before downloading it In-Reply-To: References: Message-ID: On Wed, May 7, 2008 at 4:49 PM, Gurpreet Sachdeva wrote: > Is there a way in urllib to check file size (from the webserver) before > downloading it? Or any other python module from this? > Just a nit. It might be a good idea to check for the existence of the Content-Length header before trying to find it's value. It's quite common to find web servers that do not report this header. (Now you know one reason why progress bars can be cranky at times : ) Ramaswamy From gurpreet.sachdeva at gmail.com Thu May 8 07:45:22 2008 From: gurpreet.sachdeva at gmail.com (Gurpreet Sachdeva) Date: Thu, 8 May 2008 11:15:22 +0530 Subject: [BangPypers] How to check file size before downloading it In-Reply-To: References: Message-ID: Yeah thats what I found. Any idea what settings need to be done in the webserver (Apache) to report content-length header? Or any other alternative? Thanks for your help, Gurpreet On Wed, May 7, 2008 at 10:19 PM, S.Ramaswamy wrote: > On Wed, May 7, 2008 at 4:49 PM, Gurpreet Sachdeva > wrote: > > Is there a way in urllib to check file size (from the webserver) before > > downloading it? Or any other python module from this? > > > Just a nit. It might be a good idea to check for the existence of the > Content-Length header before trying to find it's value. It's quite > common to find web servers that do not report this header. (Now you > know one reason why progress bars can be cranky at times : ) > > Ramaswamy > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- Thanks and Regards, Gurpreet Singh -------------- next part -------------- An HTML attachment was scrubbed... URL: From abpillai at gmail.com Thu May 8 08:01:23 2008 From: abpillai at gmail.com (Anand Balachandran Pillai) Date: Thu, 8 May 2008 11:31:23 +0530 Subject: [BangPypers] How to check file size before downloading it In-Reply-To: <868b524f0805070523o169c81dcj5a93c75b366bf3de@mail.gmail.com> References: <41139fcb0805070450raf93538yf8ba93bfce98f4d5@mail.gmail.com> <8548c5f30805070511k60e6e38ga7f936f5ef11a1b2@mail.gmail.com> <868b524f0805070523o169c81dcj5a93c75b366bf3de@mail.gmail.com> Message-ID: <8548c5f30805072301x66b21b4sfa3eb014e88b2bc5@mail.gmail.com> On Wed, May 7, 2008 at 5:53 PM, Akash wrote: > On Wed, May 7, 2008 at 5:41 PM, Anand Balachandran Pillai > wrote: > > > Make a HEAD request. Here is one way of doing it, using urllib2. > > Since we are on the subject of urllib2. Any resources you recommend > other than the standard python docs ? > > I have referred to this sometimes : > http://www.voidspace.org.uk/python/articles/urllib2.shtml > None that I know of, but you could ping me for your urllib2 questions. I have been using this module since 2003 and HarvestMan uses it extensively. I have looked at the innards of it in detail. Often thought of writing a reference, but never got to it. > Was looking to add to my bookmarks > > regards > Akash > > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > Regards -- -Anand From samitjainmca at gmail.com Thu May 8 08:42:00 2008 From: samitjainmca at gmail.com (Samit Jain) Date: Thu, 8 May 2008 12:12:00 +0530 Subject: [BangPypers] training inst in delhi?? Message-ID: Hi All, can you please tell me any training institute for python language in delhi -- Regards, Samit Jain Intellisoft Services samit at intellisoft-services.com +91-9899765287 -------------- next part -------------- An HTML attachment was scrubbed... URL: From kushaldas at gmail.com Thu May 8 20:23:02 2008 From: kushaldas at gmail.com (Kushal Das) Date: Thu, 8 May 2008 14:23:02 -0400 Subject: [BangPypers] How to sort the IP(s) Message-ID: <200805081423.03151.kushaldas@gmail.com> Hi, What is the best way to sort IP numbers numbers like 192.168.20.1 192.168.1.1 172.18.13.2 Kushal -- Fedora Ambassador, India http://kushaldas.in http://dgplug.org (Linux User Group of Durgapur) From prashanthellina at gmail.com Thu May 8 11:07:43 2008 From: prashanthellina at gmail.com (Prashanth Ellina) Date: Thu, 8 May 2008 14:37:43 +0530 Subject: [BangPypers] How to sort the IP(s) In-Reply-To: <200805081423.03151.kushaldas@gmail.com> References: <200805081423.03151.kushaldas@gmail.com> Message-ID: <281962dd0805080207q5d7d33basb5271f8080681377@mail.gmail.com> This is one way. make_num = lambda ip: [int(p) for p in ip.split('.')] ips = ['192.168.1.1','172.18.13.2', '192.168.20.1'] ips = [(make_num(ip), ip) for ip in ips] ips.sort() ips.reverse() ips = [ip[1] for ip in ips] On Thu, May 8, 2008 at 11:53 PM, Kushal Das wrote: > Hi, > What is the best way to sort IP numbers > numbers like > 192.168.20.1 > 192.168.1.1 > 172.18.13.2 > > > Kushal > -- > Fedora Ambassador, India > http://kushaldas.in > http://dgplug.org (Linux User Group of Durgapur) > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- http://blog.prashanthellina.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From anandology at gmail.com Thu May 8 11:11:04 2008 From: anandology at gmail.com (Anand Chitipothu) Date: Thu, 8 May 2008 14:41:04 +0530 Subject: [BangPypers] How to sort the IP(s) In-Reply-To: <200805081423.03151.kushaldas@gmail.com> References: <200805081423.03151.kushaldas@gmail.com> Message-ID: <41139fcb0805080211q4b5d7e7ehcca2822adcf149ec@mail.gmail.com> On Thu, May 8, 2008 at 11:53 PM, Kushal Das wrote: > Hi, > What is the best way to sort IP numbers > numbers like > 192.168.20.1 > 192.168.1.1 > 172.18.13.2 ips = ['192.168.20.1', '192.168.1.1', '172.18.13.2'] sorted(ips, key=lambda ip: [int(x) for x in ip.split('.')]) # ips.sort(key=lambda ip: [int(x) for x in ip.split('.')]) if you want to sort in-place. From abpillai at gmail.com Thu May 8 11:17:24 2008 From: abpillai at gmail.com (Anand Balachandran Pillai) Date: Thu, 8 May 2008 14:47:24 +0530 Subject: [BangPypers] How to sort the IP(s) In-Reply-To: <41139fcb0805080211q4b5d7e7ehcca2822adcf149ec@mail.gmail.com> References: <200805081423.03151.kushaldas@gmail.com> <41139fcb0805080211q4b5d7e7ehcca2822adcf149ec@mail.gmail.com> Message-ID: <8548c5f30805080217m11e504ddt745a7c55d06ab424@mail.gmail.com> Do you really need any kind of additional processing ? The basic sort algorithm is smart enough to do this by itself, >>> l=['192.168.1.1','172.18.13.2','192.168.3.2','172.19.2.1'] >>>l.sort() >>>l ['172.18.13.2', '172.19.2.1', '192.168.1.1', '192.168.3.2'] or use sorted(...) if you don't want to modify in place... Here is an even closer example to demo this... >>> l=['192.168.12.21','192.168.12.15','192.168.11.10','192.168.10.5','192.168.15.1','192.167.10.1'] >>> sorted(l) ['192.167.10.1', '192.168.10.5', '192.168.11.10', '192.168.12.15', '192.168.12.21', '192.168.15.1'] --Anand On Thu, May 8, 2008 at 2:41 PM, Anand Chitipothu wrote: > On Thu, May 8, 2008 at 11:53 PM, Kushal Das wrote: > > > Hi, > > What is the best way to sort IP numbers > > numbers like > > 192.168.20.1 > > 192.168.1.1 > > 172.18.13.2 > > ips = ['192.168.20.1', '192.168.1.1', '172.18.13.2'] > sorted(ips, key=lambda ip: [int(x) for x in ip.split('.')]) > > # ips.sort(key=lambda ip: [int(x) for x in ip.split('.')]) if you want > to sort in-place. > > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- -Anand From abpillai at gmail.com Thu May 8 11:24:16 2008 From: abpillai at gmail.com (Anand Balachandran Pillai) Date: Thu, 8 May 2008 14:54:16 +0530 Subject: [BangPypers] How to sort the IP(s) In-Reply-To: <8548c5f30805080217m11e504ddt745a7c55d06ab424@mail.gmail.com> References: <200805081423.03151.kushaldas@gmail.com> <41139fcb0805080211q4b5d7e7ehcca2822adcf149ec@mail.gmail.com> <8548c5f30805080217m11e504ddt745a7c55d06ab424@mail.gmail.com> Message-ID: <8548c5f30805080224p2fbe65d1v6cb5e4d05922c9b6@mail.gmail.com> Ok, this approach does not work well always... >>> l=['192.168.10.10','192.168.10.8','192.168.10.1','192.168.12.1'] >>> sorted(l) ['192.168.10.1', '192.168.10.10', '192.168.10.8', '192.168.12.1'] So something like Anand C's solution is required. --Anand On Thu, May 8, 2008 at 2:47 PM, Anand Balachandran Pillai wrote: > Do you really need any kind of additional processing ? > > The basic sort algorithm is smart enough to do this by itself, > >>> l=['192.168.1.1','172.18.13.2','192.168.3.2','172.19.2.1'] > >>>l.sort() > >>>l > ['172.18.13.2', '172.19.2.1', '192.168.1.1', '192.168.3.2'] > > or use sorted(...) if you don't want to modify in place... > > Here is an even closer example to demo this... > >>> l=['192.168.12.21','192.168.12.15','192.168.11.10','192.168.10.5','192.168.15.1','192.167.10.1'] > >>> sorted(l) > ['192.167.10.1', '192.168.10.5', '192.168.11.10', '192.168.12.15', > '192.168.12.21', '192.168.15.1'] > > > --Anand > > > > On Thu, May 8, 2008 at 2:41 PM, Anand Chitipothu wrote: > > On Thu, May 8, 2008 at 11:53 PM, Kushal Das wrote: > > > > > Hi, > > > What is the best way to sort IP numbers > > > numbers like > > > 192.168.20.1 > > > 192.168.1.1 > > > 172.18.13.2 > > > > ips = ['192.168.20.1', '192.168.1.1', '172.18.13.2'] > > sorted(ips, key=lambda ip: [int(x) for x in ip.split('.')]) > > > > # ips.sort(key=lambda ip: [int(x) for x in ip.split('.')]) if you want > > to sort in-place. > > > > > > _______________________________________________ > > BangPypers mailing list > > BangPypers at python.org > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > > -- > -Anand > -- -Anand From venkatasubramanian at gmail.com Thu May 8 11:19:51 2008 From: venkatasubramanian at gmail.com (venkata subramanian m) Date: Thu, 08 May 2008 14:49:51 +0530 Subject: [BangPypers] How to sort the IP(s) In-Reply-To: <8548c5f30805080217m11e504ddt745a7c55d06ab424@mail.gmail.com> References: <200805081423.03151.kushaldas@gmail.com> <41139fcb0805080211q4b5d7e7ehcca2822adcf149ec@mail.gmail.com> <8548c5f30805080217m11e504ddt745a7c55d06ab424@mail.gmail.com> Message-ID: <4822C5B7.1080404@gmail.com> Anand Balachandran Pillai wrote: > Do you really need any kind of additional processing ? > > But, string sorting might not produce proper sorting right? >>> l=['192.168.11.1','172.18.13.2','192.168.2.2','172.19.2.1'] >>> l.sort() >>> l ['172.18.13.2', '172.19.2.1', '192.168.11.1', '192.168.2.2'] But, ['172.18.13.2', '172.19.2.1', '192.168.2.2', '192.168.11.1'] is the expected order, I guess. Regards, Venkat > The basic sort algorithm is smart enough to do this by itself, > >>>> l=['192.168.1.1','172.18.13.2','192.168.3.2','172.19.2.1'] >>>> l.sort() >>>> l >>>> > ['172.18.13.2', '172.19.2.1', '192.168.1.1', '192.168.3.2'] > > or use sorted(...) if you don't want to modify in place... > > Here is an even closer example to demo this... > >>>> l=['192.168.12.21','192.168.12.15','192.168.11.10','192.168.10.5','192.168.15.1','192.167.10.1'] >>>> sorted(l) >>>> > ['192.167.10.1', '192.168.10.5', '192.168.11.10', '192.168.12.15', > '192.168.12.21', '192.168.15.1'] > > > --Anand > > On Thu, May 8, 2008 at 2:41 PM, Anand Chitipothu wrote: > >> On Thu, May 8, 2008 at 11:53 PM, Kushal Das wrote: >> >> >>> Hi, >>> >> > What is the best way to sort IP numbers >> > numbers like >> > 192.168.20.1 >> > 192.168.1.1 >> > 172.18.13.2 >> >> ips = ['192.168.20.1', '192.168.1.1', '172.18.13.2'] >> sorted(ips, key=lambda ip: [int(x) for x in ip.split('.')]) >> >> # ips.sort(key=lambda ip: [int(x) for x in ip.split('.')]) if you want >> to sort in-place. >> >> >> _______________________________________________ >> BangPypers mailing list >> BangPypers at python.org >> http://mail.python.org/mailman/listinfo/bangpypers >> >> > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From maxin_john at yahoo.co.uk Thu May 8 11:38:07 2008 From: maxin_john at yahoo.co.uk (Maxin B John) Date: Thu, 8 May 2008 10:38:07 +0100 (BST) Subject: [BangPypers] BangPypers Digest, Vol 9, Issue 7 In-Reply-To: Message-ID: <983351.12146.qm@web26614.mail.ukl.yahoo.com> Hi, Just a patch for Anand's solution using httplib :) import httplib conn = httplib.HTTPConnection(host) conn.request('HEAD', path) print conn.getresponse().getheader('Content-Length') 5c5 < print conn.getresponse().getheader('Content-Type') --- > print conn.getresponse().getheader('Content-Length') When I tried this script, >>> conn = httplib.HTTPConnection('www.visitingdc.com') >>> conn.request('HEAD','/images/la-brea-tar-pits-address.jpg') >>> print conn.getresponse().getheader('Content-Length') 123762 It shows this number ie 123.762K. I have downloaded this picture and in my system, when I checked it, it's size is 132k ie du --si la-brea-tar-pits-address.jpg 132k la-brea-tar-pits-address.jpg It seems to me like a mismatch between the actual size and the value obtained from the Content-Length. But how this happenned ? Regards, Maxin B. John __________________________________________________________ Sent from Yahoo! Mail. A Smarter Email http://uk.docs.yahoo.com/nowyoucan.html From anandology at gmail.com Thu May 8 11:41:21 2008 From: anandology at gmail.com (Anand Chitipothu) Date: Thu, 8 May 2008 15:11:21 +0530 Subject: [BangPypers] How to sort the IP(s) In-Reply-To: <8548c5f30805080217m11e504ddt745a7c55d06ab424@mail.gmail.com> References: <200805081423.03151.kushaldas@gmail.com> <41139fcb0805080211q4b5d7e7ehcca2822adcf149ec@mail.gmail.com> <8548c5f30805080217m11e504ddt745a7c55d06ab424@mail.gmail.com> Message-ID: <41139fcb0805080241l3f597eb5l41e22cd27acec970@mail.gmail.com> On Thu, May 8, 2008 at 2:47 PM, Anand Balachandran Pillai wrote: > Do you really need any kind of additional processing ? > > The basic sort algorithm is smart enough to do this by itself, > >>> l=['192.168.1.1','172.18.13.2','192.168.3.2','172.19.2.1'] > >>>l.sort() > >>>l > ['172.18.13.2', '172.19.2.1', '192.168.1.1', '192.168.3.2'] > > or use sorted(...) if you don't want to modify in place... > > Here is an even closer example to demo this... > >>> l=['192.168.12.21','192.168.12.15','192.168.11.10','192.168.10.5','192.168.15.1','192.167.10.1'] > >>> sorted(l) > ['192.167.10.1', '192.168.10.5', '192.168.11.10', '192.168.12.15', > '192.168.12.21', '192.168.15.1'] What about this? >>> ips = ['192.168.20.1', '192.168.1.1', '172.18.13.2', '27.118.13.2'] >>> sorted(ips) ['172.18.13.2', '192.168.1.1', '192.168.20.1', '27.118.13.2'] You need to sort them as tuples of 4 numbers not as strings. From abpillai at gmail.com Thu May 8 11:53:01 2008 From: abpillai at gmail.com (Anand Balachandran Pillai) Date: Thu, 8 May 2008 15:23:01 +0530 Subject: [BangPypers] How to sort the IP(s) In-Reply-To: <41139fcb0805080241l3f597eb5l41e22cd27acec970@mail.gmail.com> References: <200805081423.03151.kushaldas@gmail.com> <41139fcb0805080211q4b5d7e7ehcca2822adcf149ec@mail.gmail.com> <8548c5f30805080217m11e504ddt745a7c55d06ab424@mail.gmail.com> <41139fcb0805080241l3f597eb5l41e22cd27acec970@mail.gmail.com> Message-ID: <8548c5f30805080253w3437ac91o6c89018cb2a0c8cd@mail.gmail.com> On Thu, May 8, 2008 at 3:11 PM, Anand Chitipothu wrote: > On Thu, May 8, 2008 at 2:47 PM, Anand Balachandran Pillai > wrote: > > > Do you really need any kind of additional processing ? > > > > The basic sort algorithm is smart enough to do this by itself, > > >>> l=['192.168.1.1','172.18.13.2','192.168.3.2','172.19.2.1'] > > >>>l.sort() > > >>>l > > ['172.18.13.2', '172.19.2.1', '192.168.1.1', '192.168.3.2'] > > > > or use sorted(...) if you don't want to modify in place... > > > > Here is an even closer example to demo this... > > >>> l=['192.168.12.21','192.168.12.15','192.168.11.10','192.168.10.5','192.168.15.1','192.167.10.1'] > > >>> sorted(l) > > ['192.167.10.1', '192.168.10.5', '192.168.11.10', '192.168.12.15', > > '192.168.12.21', '192.168.15.1'] > > What about this? > > >>> ips = ['192.168.20.1', '192.168.1.1', '172.18.13.2', '27.118.13.2'] > >>> sorted(ips) > ['172.18.13.2', '192.168.1.1', '192.168.20.1', '27.118.13.2'] > > You need to sort them as tuples of 4 numbers not as strings. Read my own post with a similar example. > > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- -Anand From anandology at gmail.com Thu May 8 11:53:15 2008 From: anandology at gmail.com (Anand Chitipothu) Date: Thu, 8 May 2008 15:23:15 +0530 Subject: [BangPypers] BangPypers Digest, Vol 9, Issue 7 In-Reply-To: <983351.12146.qm@web26614.mail.ukl.yahoo.com> References: <983351.12146.qm@web26614.mail.ukl.yahoo.com> Message-ID: <41139fcb0805080253u49e1add0q6b4bd450045e4f6a@mail.gmail.com> > I have downloaded > this picture and in my system, when I checked it, it's > size is 132k > ie > du --si la-brea-tar-pits-address.jpg > 132k la-brea-tar-pits-address.jpg > > It seems to me like a mismatch between the actual size > and the value obtained from the Content-Length. But > how this happenned ? I downloaded that and it shows the correct size. anand at jungle:/tmp$ ls -l la-brea-tar-pits-address.jpg -rw-r--r-- 1 anand anand 123762 Oct 6 2007 la-brea-tar-pits-address.jpg I didn't understand why du is showing results like this: anand at jungle:/tmp$ du -b la-brea-tar-pits-address.jpg 123762 la-brea-tar-pits-address.jpg anand at jungle:/tmp$ du --si la-brea-tar-pits-address.jpg 132k la-brea-tar-pits-address.jpg anand at jungle:/tmp$ du -sk la-brea-tar-pits-address.jpg 128 la-brea-tar-pits-address.jpg From anandology at gmail.com Thu May 8 11:56:07 2008 From: anandology at gmail.com (Anand Chitipothu) Date: Thu, 8 May 2008 15:26:07 +0530 Subject: [BangPypers] BangPypers Digest, Vol 9, Issue 7 In-Reply-To: <41139fcb0805080253u49e1add0q6b4bd450045e4f6a@mail.gmail.com> References: <983351.12146.qm@web26614.mail.ukl.yahoo.com> <41139fcb0805080253u49e1add0q6b4bd450045e4f6a@mail.gmail.com> Message-ID: <41139fcb0805080256h276c419v391a248ce8a789cd@mail.gmail.com> On Thu, May 8, 2008 at 3:23 PM, Anand Chitipothu wrote: > > I have downloaded > > this picture and in my system, when I checked it, it's > > size is 132k > > ie > > du --si la-brea-tar-pits-address.jpg > > 132k la-brea-tar-pits-address.jpg > > > > It seems to me like a mismatch between the actual size > > and the value obtained from the Content-Length. But > > how this happenned ? > > I downloaded that and it shows the correct size. > > anand at jungle:/tmp$ ls -l la-brea-tar-pits-address.jpg > -rw-r--r-- 1 anand anand 123762 Oct 6 2007 la-brea-tar-pits-address.jpg > > I didn't understand why du is showing results like this: > > anand at jungle:/tmp$ du -b la-brea-tar-pits-address.jpg > 123762 la-brea-tar-pits-address.jpg > anand at jungle:/tmp$ du --si la-brea-tar-pits-address.jpg > > 132k la-brea-tar-pits-address.jpg > anand at jungle:/tmp$ du -sk la-brea-tar-pits-address.jpg > 128 la-brea-tar-pits-address.jpg > Got it du actually shows the amount of space it has taken on disk. You should use --apparent-size to see the logical file size. anand at jungle:/tmp$ du --si --apparent-size la-brea-tar-pits-address.jpg 124k la-brea-tar-pits-address.jpg anand at jungle:/tmp$ du -sh --apparent-size la-brea-tar-pits-address.jpg 121K la-brea-tar-pits-address.jpg du -b is equivalent to `--apparent-size --block-size=1'. See `man du` for details. From gates.plusplus at gmail.com Thu May 8 12:30:05 2008 From: gates.plusplus at gmail.com (Rohan Sharma) Date: Thu, 8 May 2008 16:00:05 +0530 Subject: [BangPypers] training inst in delhi?? In-Reply-To: References: Message-ID: <7dd811cb0805080330p2bd385c9nd1f5f99a4e711383@mail.gmail.com> On 5/8/08, Samit Jain wrote: > Hi All, > > can you please tell me any training institute for python language in delhi > > -- > Regards, > Samit Jain > Intellisoft Services > samit at intellisoft-services.com > +91-9899765287 > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > > A "training institute" is not at all necessary for learning a programming _language_, especially a language like Python that is relatively minimalist. I believe GVR's tutorial (http://docs.python.org/tut/tut.html) and _Dive into Python_ (http://www.diveintopython.org/#download) are all you need to become a Pythonista - and you can do so in less than a day. You might also want to buy the _Cookbook_ (http://www.oreilly.com/catalog/pythoncook2/) and read _Code Like a Pythonista_ (http://python.net/~goodger/projects/pycon/2007/idiomatic/handout.html) to get familiar with idiomatic Python. And the Python Challenge (http://www.pythonchallenge.com/) is useful for honing your skills. From maxin_john at yahoo.co.uk Thu May 8 13:15:39 2008 From: maxin_john at yahoo.co.uk (Maxin B John) Date: Thu, 8 May 2008 12:15:39 +0100 (BST) Subject: [BangPypers] Adventures with Neko, A Book on Python for Children Message-ID: <715610.34294.qm@web26604.mail.ukl.yahoo.com> Hi, Adventures with Neko (http://gnuvision.com/books/pybook/) is an introductory book on Python programming for school children by Mr. Pramode CE. It is fun for children (when I tried it, me too liked it) to do programming with Neko, the cat. It is using the Tkinter module for graphics and it works in all the platforms where python can run. Regards, Maxin B. John __________________________________________________________ Sent from Yahoo! Mail. A Smarter Email http://uk.docs.yahoo.com/nowyoucan.html From khuranavivek_in at yahoo.com Thu May 8 17:03:14 2008 From: khuranavivek_in at yahoo.com (vivek khurana) Date: Thu, 8 May 2008 08:03:14 -0700 (PDT) Subject: [BangPypers] How to sort the IP(s) In-Reply-To: <200805081423.03151.kushaldas@gmail.com> Message-ID: <872464.36281.qm@web55202.mail.re4.yahoo.com> --- On Thu, 5/8/08, Kushal Das wrote: > From: Kushal Das > Subject: [BangPypers] How to sort the IP(s) > To: bangpypers at python.org > Date: Thursday, May 8, 2008, 11:53 PM > Hi, > What is the best way to sort IP numbers > numbers like > 192.168.20.1 > 192.168.1.1 > 172.18.13.2 > this way http://wadofstuff.blogspot.com/2007/02/sorting-ip-addresses-in-python.html regards VK ____________________________________________________________________________________ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ From srsy70 at gmail.com Fri May 9 06:43:18 2008 From: srsy70 at gmail.com (S.Ramaswamy) Date: Fri, 9 May 2008 10:13:18 +0530 Subject: [BangPypers] How to check file size before downloading it In-Reply-To: References: Message-ID: On Thu, May 8, 2008 at 11:15 AM, Gurpreet Sachdeva wrote: > Yeah thats what I found. Any idea what settings need to be done in the > webserver (Apache) to report content-length header? Or any other > alternative? > > Thanks for your help, > Gurpreet > AFAIK, Apache 2 reports Content-Length by default. mod_headers can be used to configure HTTP headers ( http://httpd.apache.org/docs/2.0/mod/mod_headers.html ). You might want to check the config files. HTH Ramaswamy From srinivas_puvvala at yahoo.co.in Fri May 9 15:12:20 2008 From: srinivas_puvvala at yahoo.co.in (srinivasarao puvvala) Date: Fri, 9 May 2008 18:42:20 +0530 (IST) Subject: [BangPypers] BangPypers Digest, Vol 9, Issue 10 In-Reply-To: Message-ID: <830445.33953.qm@web94607.mail.in2.yahoo.com> An HTML attachment was scrubbed... URL: From banibrata.dutta at gmail.com Fri May 9 15:20:52 2008 From: banibrata.dutta at gmail.com (Banibrata Dutta) Date: Fri, 9 May 2008 18:50:52 +0530 Subject: [BangPypers] BangPypers Digest, Vol 9, Issue 10 In-Reply-To: <830445.33953.qm@web94607.mail.in2.yahoo.com> References: <830445.33953.qm@web94607.mail.in2.yahoo.com> Message-ID: <3de8e1f70805090620p6c4be37awe469013dc68843e6@mail.gmail.com> be prepared for atleast 20 odd suggestions... :-) you didn't mention which OS you are working on... on Windows, I use PyScripter... but Idle is also okay (though I like PyScripter better). on Linux you have lots of options, eric4, BoaConstructor, ... , emacs (of course), Vim -- not an IDE but a lot of programmers swear by it. if you already have Java IDEs s.a. Eclipse or Netbeans, plugins are available on them, for working with Python. On 5/9/08, srinivasarao puvvala wrote: > > hi friends, > > can i know which IDE is suitable to develop python applications and could u > mention the download link . > > --- On *Fri, 9/5/08, bangpypers-request at python.org < > bangpypers-request at python.org>* wrote: > > From: bangpypers-request at python.org > Subject: BangPypers Digest, Vol 9, Issue 10 > To: bangpypers at python.org > Date: Friday, 9 May, 2008, 3:30 PM > > 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: training inst in delhi?? (Rohan Sharma) > 2. Adventures with Neko, A Book on Python for Children (Maxin B John) > 3. Re: How to sort the IP(s) (vivek khurana) > 4. Re: How to check file size before downloading it (S.Ramaswamy) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Thu, 8 May 2008 16:00:05 +0530 > From: "Rohan Sharma" > Subject: Re: [BangPypers] training inst in delhi?? > To: "Bangalore Python Users Group - India" > > Message-ID: > <7dd811cb0805080330p2bd385c9nd1f5f99a4e711383 at mail.gmail.com> > Content-Type: text/plain; charset=ISO-8859-1 > > On 5/8/08, Samit Jain wrote: > > Hi All, > > > > can you please tell me any training institute for python language in delhi > > > > -- > > Regards, > > Samit Jain > > Intellisoft Services > > samit at intellisoft-services.com > > +91-9899765287 > > _______________________________________________ > > BangPypers mailing list > > BangPypers at python.org > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > > A "training institute" is not at all necessary for learning a > programming _language_, especially a language like Python that is > relatively minimalist. I believe GVR's tutorial > (http://docs.python.org/tut/tut.html) and _Dive into Python_ > (http://www.diveintopython.org/#download) are all you need to become a > Pythonista - and you can do so in less than a day. You might also want > to buy the _Cookbook_ (http://www.oreilly.com/catalog/pythoncook2/) > and read _Code Like a Pythonista_ > (http://python.net/~goodger/projects/pycon/2007/idiomatic/handout.html) > to get familiar with idiomatic Python. > > And the Python Challenge (http://www.pythonchallenge.com/) is useful > for honing your skills. > > > ------------------------------ > > Message: 2 > Date: Thu, 8 May 2008 12:15:39 +0100 (BST) > From: Maxin B John > Subject: [BangPypers] Adventures with Neko, A Book on Python for > Children > To: bangpypers at python.org > Message-ID: <715610.34294.qm at web26604.mail.ukl.yahoo.com> > Content-Type: text/plain; charset=iso-8859-1 > > Hi, > > Adventures with Neko > (http://gnuvision.com/books/pybook/) is an > introductory book on Python programming for school > children by Mr. Pramode CE. > > It is fun for children (when I tried it, me too liked > it) to do programming with Neko, the cat. It is using > the Tkinter module for graphics and it works in all > the platforms where python can run. > > Regards, > > Maxin B. John > > > > __________________________________________________________ > Sent from Yahoo! Mail. > A Smarter Email http://uk.docs.yahoo.com/nowyoucan.html > > > ------------------------------ > > Message: 3 > Date: Thu, 8 May 2008 08:03:14 -0700 (PDT) > From: vivek khurana > Subject: Re: [BangPypers] How to sort the IP(s) > To: Bangalore Python Users Group - India > Message-ID: <872464.36281.qm at web55202.mail.re4.yahoo.com> > Content-Type: text/plain; charset=us-ascii > > > --- On Thu, 5/8/08, Kushal Das wrote: > > > From: Kushal Das > > Subject: [BangPypers] How to sort the IP(s) > > To: bangpypers at python.org > > Date: Thursday, May 8, 2008, 11:53 PM > > Hi, > > What is the best way to sort IP numbers > > numbers like > > 192.168.20.1 > > 192.168.1.1 > > 172.18.13.2 > > > > this wayhttp://wadofstuff.blogspot.com/2007/02/sorting-ip-addresses-in-python.html > > regards > VK > > > > > ____________________________________________________________________________________ > Be a better friend, newshound, and > know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ > > > ------------------------------ > > Message: 4 > Date: Fri, 9 May 2008 10:13:18 +0530 > From: S.Ramaswamy > Subject: Re: [BangPypers] How to check file size before downloading it > To: "Bangalore Python Users Group - India" > > Message-ID: > > Content-Type: text/plain; charset=ISO-8859-1 > > On Thu, May 8, 2008 at 11:15 AM, Gurpreet Sachdeva > wrote: > > Yeah thats what I found. Any idea what settings need to be done in the > > webserver (Apache) to report content-length header? Or any other > > alternative? > > > > Thanks for your help, > > Gurpreet > > > AFAIK, Apache 2 reports Content-Length by default. mod_headers can be > used to configure HTTP headers (http://httpd.apache.org/docs/2.0/mod/mod_headers.html ). You might > want to check the config files. > > HTH > Ramaswamy > > > ------------------------------ > > _______________________________________________ > BangPypers mailing listBangPypers at python.orghttp://mail.python.org/mailman/listinfo/bangpypers > > > End of BangPypers Digest, Vol 9, Issue 10 > ***************************************** > > > ------------------------------ > Bring your gang together. Do your thing. Find your favourite Yahoo! Group. > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > > -- regards, Banibrata http://www.linkedin.com/in/bdutta http://octapod.wordpress.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From gates.plusplus at gmail.com Fri May 9 19:35:53 2008 From: gates.plusplus at gmail.com (Rohan Sharma) Date: Fri, 9 May 2008 23:05:53 +0530 Subject: [BangPypers] BangPypers Digest, Vol 9, Issue 10 In-Reply-To: <3de8e1f70805090620p6c4be37awe469013dc68843e6@mail.gmail.com> References: <830445.33953.qm@web94607.mail.in2.yahoo.com> <3de8e1f70805090620p6c4be37awe469013dc68843e6@mail.gmail.com> Message-ID: <7dd811cb0805091035t296632afp3dbe010b7a9f47b5@mail.gmail.com> Yeah, there are way too many IDEs around. I use Emacs + python_mode. It probably does not make me any more productive, but it sure as hell makes me geekier. I've used IDLE and Eclipse + pydev and must admit they are quite solid. Also, no matter what IDE/editor you are using, get IPython; it is much better than the default interactive interpreter. On Fri, May 9, 2008 at 6:50 PM, Banibrata Dutta wrote: > be prepared for atleast 20 odd suggestions... :-) > you didn't mention which OS you are working on... > > on Windows, I use PyScripter... but Idle is also okay (though I like > PyScripter better). > on Linux you have lots of options, eric4, BoaConstructor, ... , emacs (of > course), Vim -- not an IDE but a lot of programmers swear by it. > if you already have Java IDEs s.a. Eclipse or Netbeans, plugins are > available on them, for working with Python. > > > On 5/9/08, srinivasarao puvvala wrote: >> >> hi friends, >> >> can i know which IDE is suitable to develop python applications and could >> u mention the download link . >> >> --- On Fri, 9/5/08, bangpypers-request at python.org >> wrote: >> >> From: bangpypers-request at python.org >> Subject: BangPypers Digest, Vol 9, Issue 10 >> To: bangpypers at python.org >> Date: Friday, 9 May, 2008, 3:30 PM >> >> 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: training inst in delhi?? (Rohan Sharma) >> 2. Adventures with Neko, A Book on Python for Children (Maxin B John) >> 3. Re: How to sort the IP(s) (vivek khurana) >> 4. Re: How to check file size before downloading it (S.Ramaswamy) >> >> >> ---------------------------------------------------------------------- >> >> Message: 1 >> Date: Thu, 8 May 2008 16:00:05 +0530 >> From: "Rohan Sharma" >> Subject: Re: [BangPypers] training inst in delhi?? >> To: "Bangalore Python Users Group - India" >> >> Message-ID: >> <7dd811cb0805080330p2bd385c9nd1f5f99a4e711383 at mail.gmail.com> >> Content-Type: text/plain; charset=ISO-8859-1 >> >> On 5/8/08, Samit Jain wrote: >> > Hi All, >> > >> > can you please tell me any training institute for python language in >> > delhi >> > >> > -- >> > Regards, >> > Samit Jain >> > Intellisoft Services >> > samit at intellisoft-services.com >> > +91-9899765287 >> > _______________________________________________ >> > BangPypers mailing list >> > BangPypers at python.org >> > http://mail.python.org/mailman/listinfo/bangpypers >> > >> > >> >> A "training institute" is not at all necessary for learning a >> programming _language_, especially a language like Python that is >> relatively minimalist. I believe GVR's tutorial >> (http://docs.python.org/tut/tut.html) and _Dive into Python_ >> (http://www.diveintopython.org/#download) are all you need to become a >> Pythonista - and you can do so in less than a day. You might also want >> to buy the _Cookbook_ (http://www.oreilly.com/catalog/pythoncook2/) >> and read _Code Like a Pythonista_ >> (http://python.net/~goodger/projects/pycon/2007/idiomatic/handout.html) >> to get familiar with idiomatic Python. >> >> And the Python Challenge (http://www.pythonchallenge.com/) is useful >> for honing your skills. >> >> >> ------------------------------ >> >> Message: 2 >> Date: Thu, 8 May 2008 12:15:39 +0100 (BST) >> From: Maxin B John >> Subject: [BangPypers] Adventures with Neko, A Book on Python for >> Children >> To: bangpypers at python.org >> Message-ID: <715610.34294.qm at web26604.mail.ukl.yahoo.com> >> Content-Type: text/plain; charset=iso-8859-1 >> >> Hi, >> >> Adventures with Neko >> (http://gnuvision.com/books/pybook/) is an >> introductory book on Python programming for school >> children by Mr. Pramode CE. >> >> It is fun for children (when I tried it, me too liked >> it) to do programming with Neko, the cat. It is using >> the Tkinter module for graphics and it works in all >> the platforms where python can run. >> >> Regards, >> >> Maxin B. John >> >> >> >> __________________________________________________________ >> Sent from Yahoo! Mail. >> A Smarter Email http://uk.docs.yahoo.com/nowyoucan.html >> >> >> ------------------------------ >> >> Message: 3 >> Date: Thu, 8 May 2008 08:03:14 -0700 (PDT) >> From: vivek khurana >> Subject: Re: [BangPypers] How to sort the IP(s) >> To: Bangalore Python Users Group - India >> Message-ID: <872464.36281.qm at web55202.mail.re4.yahoo.com> >> Content-Type: text/plain; charset=us-ascii >> >> >> --- On Thu, 5/8/08, Kushal Das wrote: >> >> > From: Kushal Das >> > Subject: [BangPypers] How to sort the IP(s) >> > To: bangpypers at python.org >> > Date: Thursday, May 8, 2008, 11:53 PM >> > Hi, >> > What is the best way to sort IP numbers >> > numbers like >> > 192.168.20.1 >> > 192.168.1.1 >> > 172.18.13.2 >> > >> >> this way >> http://wadofstuff.blogspot.com/2007/02/sorting-ip-addresses-in-python.html >> >> regards >> VK >> >> >> >> >> >> ____________________________________________________________________________________ >> Be a better friend, newshound, and >> know-it-all with Yahoo! Mobile. Try it now. >> http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ >> >> >> ------------------------------ >> >> Message: 4 >> Date: Fri, 9 May 2008 10:13:18 +0530 >> From: S.Ramaswamy >> Subject: Re: [BangPypers] How to check file size before downloading it >> To: "Bangalore Python Users Group - India" >> >> Message-ID: >> >> Content-Type: text/plain; charset=ISO-8859-1 >> >> On Thu, May 8, 2008 at 11:15 AM, Gurpreet Sachdeva >> wrote: >> > Yeah thats what I found. Any idea what settings need to be done in the >> > webserver (Apache) to report content-length header? Or any other >> > alternative? >> > >> > Thanks for your help, >> > Gurpreet >> > >> AFAIK, Apache 2 reports Content-Length by default. mod_headers can be >> used to configure HTTP headers ( >> http://httpd.apache.org/docs/2.0/mod/mod_headers.html ). You might >> want to check the config files. >> >> HTH >> Ramaswamy >> >> >> ------------------------------ >> >> _______________________________________________ >> BangPypers mailing list >> BangPypers at python.org >> http://mail.python.org/mailman/listinfo/bangpypers >> >> >> End of BangPypers Digest, Vol 9, Issue 10 >> ***************************************** >> >> ________________________________ >> Bring your gang together. Do your thing. Find your favourite Yahoo! Group. >> _______________________________________________ >> BangPypers mailing list >> BangPypers at python.org >> http://mail.python.org/mailman/listinfo/bangpypers >> > > > > -- > regards, > Banibrata > http://www.linkedin.com/in/bdutta > http://octapod.wordpress.com > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > > From vsapre80 at gmail.com Fri May 9 20:46:45 2008 From: vsapre80 at gmail.com (Vishal) Date: Sat, 10 May 2008 00:16:45 +0530 Subject: [BangPypers] BangPypers Digest, Vol 9, Issue 10 In-Reply-To: <7dd811cb0805091035t296632afp3dbe010b7a9f47b5@mail.gmail.com> References: <830445.33953.qm@web94607.mail.in2.yahoo.com> <3de8e1f70805090620p6c4be37awe469013dc68843e6@mail.gmail.com> <7dd811cb0805091035t296632afp3dbe010b7a9f47b5@mail.gmail.com> Message-ID: A few days back there was a long discussion about IDEs and Editors in general. Please look at that thread. My personal choice now-a-days is PyScripter. Best regards, Vishal On Fri, May 9, 2008 at 11:05 PM, Rohan Sharma wrote: > Yeah, there are way too many IDEs around. I use Emacs + python_mode. > It probably does not make me any more productive, but it sure as hell > makes me geekier. > > I've used IDLE and Eclipse + pydev and must admit they are quite > solid. Also, no matter what IDE/editor you are using, get IPython; it > is much better than the default interactive interpreter. > > On Fri, May 9, 2008 at 6:50 PM, Banibrata Dutta > wrote: > > be prepared for atleast 20 odd suggestions... :-) > > you didn't mention which OS you are working on... > > > > on Windows, I use PyScripter... but Idle is also okay (though I like > > PyScripter better). > > on Linux you have lots of options, eric4, BoaConstructor, ... , emacs (of > > course), Vim -- not an IDE but a lot of programmers swear by it. > > if you already have Java IDEs s.a. Eclipse or Netbeans, plugins are > > available on them, for working with Python. > > > > > > On 5/9/08, srinivasarao puvvala wrote: > >> > >> hi friends, > >> > >> can i know which IDE is suitable to develop python applications and > could > >> u mention the download link . > >> > >> --- On Fri, 9/5/08, bangpypers-request at python.org > >> wrote: > >> > >> From: bangpypers-request at python.org > >> Subject: BangPypers Digest, Vol 9, Issue 10 > >> To: bangpypers at python.org > >> Date: Friday, 9 May, 2008, 3:30 PM > >> > >> 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: training inst in delhi?? (Rohan Sharma) > >> 2. Adventures with Neko, A Book on Python for Children (Maxin B John) > >> 3. Re: How to sort the IP(s) (vivek khurana) > >> 4. Re: How to check file size before downloading it (S.Ramaswamy) > >> > >> > >> ---------------------------------------------------------------------- > >> > >> Message: 1 > >> Date: Thu, 8 May 2008 16:00:05 +0530 > >> From: "Rohan Sharma" > >> Subject: Re: [BangPypers] training inst in delhi?? > >> To: "Bangalore Python Users Group - India" > >> > >> Message-ID: > >> <7dd811cb0805080330p2bd385c9nd1f5f99a4e711383 at mail.gmail.com> > >> Content-Type: text/plain; charset=ISO-8859-1 > >> > >> On 5/8/08, Samit Jain wrote: > >> > Hi All, > >> > > >> > can you please tell me any training institute for python language in > >> > delhi > >> > > >> > -- > >> > Regards, > >> > Samit Jain > >> > Intellisoft Services > >> > samit at intellisoft-services.com > >> > +91-9899765287 > >> > _______________________________________________ > >> > BangPypers mailing list > >> > BangPypers at python.org > >> > http://mail.python.org/mailman/listinfo/bangpypers > >> > > >> > > >> > >> A "training institute" is not at all necessary for learning a > >> programming _language_, especially a language like Python that is > >> relatively minimalist. I believe GVR's tutorial > >> (http://docs.python.org/tut/tut.html) and _Dive into Python_ > >> (http://www.diveintopython.org/#download) are all you need to become a > >> Pythonista - and you can do so in less than a day. You might also want > >> to buy the _Cookbook_ (http://www.oreilly.com/catalog/pythoncook2/) > >> and read _Code Like a Pythonista_ > >> (http://python.net/~goodger/projects/pycon/2007/idiomatic/handout.html > ) > >> to get familiar with idiomatic Python. > >> > >> And the Python Challenge (http://www.pythonchallenge.com/) is useful > >> for honing your skills. > >> > >> > >> ------------------------------ > >> > >> Message: 2 > >> Date: Thu, 8 May 2008 12:15:39 +0100 (BST) > >> From: Maxin B John > >> Subject: [BangPypers] Adventures with Neko, A Book on Python for > >> Children > >> To: bangpypers at python.org > >> Message-ID: <715610.34294.qm at web26604.mail.ukl.yahoo.com> > >> Content-Type: text/plain; charset=iso-8859-1 > >> > >> Hi, > >> > >> Adventures with Neko > >> (http://gnuvision.com/books/pybook/) is an > >> introductory book on Python programming for school > >> children by Mr. Pramode CE. > >> > >> It is fun for children (when I tried it, me too liked > >> it) to do programming with Neko, the cat. It is using > >> the Tkinter module for graphics and it works in all > >> the platforms where python can run. > >> > >> Regards, > >> > >> Maxin B. John > >> > >> > >> > >> __________________________________________________________ > >> Sent from Yahoo! Mail. > >> A Smarter Email http://uk.docs.yahoo.com/nowyoucan.html > >> > >> > >> ------------------------------ > >> > >> Message: 3 > >> Date: Thu, 8 May 2008 08:03:14 -0700 (PDT) > >> From: vivek khurana > >> Subject: Re: [BangPypers] How to sort the IP(s) > >> To: Bangalore Python Users Group - India > >> Message-ID: <872464.36281.qm at web55202.mail.re4.yahoo.com> > >> Content-Type: text/plain; charset=us-ascii > >> > >> > >> --- On Thu, 5/8/08, Kushal Das wrote: > >> > >> > From: Kushal Das > >> > Subject: [BangPypers] How to sort the IP(s) > >> > To: bangpypers at python.org > >> > Date: Thursday, May 8, 2008, 11:53 PM > >> > Hi, > >> > What is the best way to sort IP numbers > >> > numbers like > >> > 192.168.20.1 > >> > 192.168.1.1 > >> > 172.18.13.2 > >> > > >> > >> this way > >> > http://wadofstuff.blogspot.com/2007/02/sorting-ip-addresses-in-python.html > >> > >> regards > >> VK > >> > >> > >> > >> > >> > >> > ____________________________________________________________________________________ > >> Be a better friend, newshound, and > >> know-it-all with Yahoo! Mobile. Try it now. > >> http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ > >> > >> > >> ------------------------------ > >> > >> Message: 4 > >> Date: Fri, 9 May 2008 10:13:18 +0530 > >> From: S.Ramaswamy > >> Subject: Re: [BangPypers] How to check file size before downloading it > >> To: "Bangalore Python Users Group - India" > >> > >> Message-ID: > >> > >> Content-Type: text/plain; charset=ISO-8859-1 > >> > >> On Thu, May 8, 2008 at 11:15 AM, Gurpreet Sachdeva > >> wrote: > >> > Yeah thats what I found. Any idea what settings need to be done in the > >> > webserver (Apache) to report content-length header? Or any other > >> > alternative? > >> > > >> > Thanks for your help, > >> > Gurpreet > >> > > >> AFAIK, Apache 2 reports Content-Length by default. mod_headers can be > >> used to configure HTTP headers ( > >> http://httpd.apache.org/docs/2.0/mod/mod_headers.html ). You might > >> want to check the config files. > >> > >> HTH > >> Ramaswamy > >> > >> > >> ------------------------------ > >> > >> _______________________________________________ > >> BangPypers mailing list > >> BangPypers at python.org > >> http://mail.python.org/mailman/listinfo/bangpypers > >> > >> > >> End of BangPypers Digest, Vol 9, Issue 10 > >> ***************************************** > >> > >> ________________________________ > >> Bring your gang together. Do your thing. Find your favourite Yahoo! > Group. > >> _______________________________________________ > >> BangPypers mailing list > >> BangPypers at python.org > >> http://mail.python.org/mailman/listinfo/bangpypers > >> > > > > > > > > -- > > regards, > > Banibrata > > http://www.linkedin.com/in/bdutta > > http://octapod.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 > -- 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. Visit: http://members.soundclick.com/mukulsapre http://www.soundclick.com/gurusgrace Nice gist of all Goodness: ???????? ??????? ????????? ?????? ????? | ????????? ??????? ????? ??????? | -------------- next part -------------- An HTML attachment was scrubbed... URL: From sridhar.ratna at gmail.com Sat May 10 03:55:32 2008 From: sridhar.ratna at gmail.com (Sridhar Ratnakumar) Date: Fri, 9 May 2008 18:55:32 -0700 Subject: [BangPypers] FAQ Message-ID: <7c73a13a0805091855u4ca39950h75c1465e568c1834@mail.gmail.com> On Fri, May 9, 2008 at 11:46 AM, Vishal wrote: > A few days back there was a long discussion about IDEs and Editors in > general. > > Please look at that thread. We need a wiki that filers (according to informativeness) and archives the responses for most frequently asked questions in this mailing list. Thus avoid wasting time and resource with odd subjective repetitive emails. The same applies for any list especially the ones with a lot of beginners actively participating. From pradeep at btbytes.com Sat May 10 04:28:39 2008 From: pradeep at btbytes.com (Pradeep Gowda) Date: Fri, 9 May 2008 22:28:39 -0400 Subject: [BangPypers] FAQ In-Reply-To: <7c73a13a0805091855u4ca39950h75c1465e568c1834@mail.gmail.com> References: <7c73a13a0805091855u4ca39950h75c1465e568c1834@mail.gmail.com> Message-ID: <65BB76A0-789D-470D-A1C9-47502C649160@btbytes.com> On 09-May-08, at 9:55 PM, Sridhar Ratnakumar wrote: > On Fri, May 9, 2008 at 11:46 AM, Vishal wrote: >> A few days back there was a long discussion about IDEs and Editors in >> general. >> >> Please look at that thread. > > We need a wiki that filers (according to informativeness) and > archives the responses for most frequently asked questions in this > mailing list. Thus avoid wasting time and resource with odd subjective > repetitive emails. > http://bangpypers.jottit.com/ Its a wiki, as simple as it can get. From pradeep at btbytes.com Sat May 10 04:38:54 2008 From: pradeep at btbytes.com (Pradeep Gowda) Date: Fri, 9 May 2008 22:38:54 -0400 Subject: [BangPypers] FAQ In-Reply-To: <65BB76A0-789D-470D-A1C9-47502C649160@btbytes.com> References: <7c73a13a0805091855u4ca39950h75c1465e568c1834@mail.gmail.com> <65BB76A0-789D-470D-A1C9-47502C649160@btbytes.com> Message-ID: <7C9FC8C5-BC8E-4FDB-9395-E5585100D1C1@btbytes.com> On 09-May-08, at 10:28 PM, Pradeep Gowda wrote: > > http://bangpypers.jottit.com/ > Its a wiki, as simple as it can get. > Oh, I forgot all about our wiki on python.org.. http://wiki.python.org/moin/BangPypers Please use the python.org wiki. From banibrata.dutta at gmail.com Sat May 10 07:00:52 2008 From: banibrata.dutta at gmail.com (Banibrata Dutta) Date: Sat, 10 May 2008 10:30:52 +0530 Subject: [BangPypers] FAQ In-Reply-To: <7C9FC8C5-BC8E-4FDB-9395-E5585100D1C1@btbytes.com> References: <7c73a13a0805091855u4ca39950h75c1465e568c1834@mail.gmail.com> <65BB76A0-789D-470D-A1C9-47502C649160@btbytes.com> <7C9FC8C5-BC8E-4FDB-9395-E5585100D1C1@btbytes.com> Message-ID: <3de8e1f70805092200n927f84fod1195c22c662f5de@mail.gmail.com> Added 2 ides' to BangPypers @ wiki.python.org On 5/10/08, Pradeep Gowda wrote: > > > On 09-May-08, at 10:28 PM, Pradeep Gowda wrote: > >> >> http://bangpypers.jottit.com/ >> Its a wiki, as simple as it can get. >> >> > Oh, I forgot all about our wiki on python.org.. > http://wiki.python.org/moin/BangPypers > Please use the python.org wiki. > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- regards, Banibrata http://www.linkedin.com/in/bdutta http://octapod.wordpress.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From vsapre80 at gmail.com Sat May 10 07:04:37 2008 From: vsapre80 at gmail.com (Vishal) Date: Sat, 10 May 2008 10:34:37 +0530 Subject: [BangPypers] FAQ In-Reply-To: <3de8e1f70805092200n927f84fod1195c22c662f5de@mail.gmail.com> References: <7c73a13a0805091855u4ca39950h75c1465e568c1834@mail.gmail.com> <65BB76A0-789D-470D-A1C9-47502C649160@btbytes.com> <7C9FC8C5-BC8E-4FDB-9395-E5585100D1C1@btbytes.com> <3de8e1f70805092200n927f84fod1195c22c662f5de@mail.gmail.com> Message-ID: Banibrata, I think I've overwritten what you had posted....albeit by mistake. Here's what I have put into this page. http://wiki.python.org/moin/BangPypers/PythonEditors Gave links to the IDEs and Editor's page from the python.org wiki itself. Hope that covers PyScripter and PythonWin also. THanks and best regards, Vishal On Sat, May 10, 2008 at 10:30 AM, Banibrata Dutta wrote: > Added 2 ides' to BangPypers @ wiki.python.org > > > On 5/10/08, Pradeep Gowda wrote: >> >> >> On 09-May-08, at 10:28 PM, Pradeep Gowda wrote: >> >>> >>> http://bangpypers.jottit.com/ >>> Its a wiki, as simple as it can get. >>> >>> >> Oh, I forgot all about our wiki on python.org.. >> http://wiki.python.org/moin/BangPypers >> Please use the python.org wiki. >> >> _______________________________________________ >> BangPypers mailing list >> BangPypers at python.org >> http://mail.python.org/mailman/listinfo/bangpypers >> > > > > -- > regards, > Banibrata > http://www.linkedin.com/in/bdutta > http://octapod.wordpress.com > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > > -- 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. Visit: http://members.soundclick.com/mukulsapre http://www.soundclick.com/gurusgrace Nice gist of all Goodness: ???????? ??????? ????????? ?????? ????? | ????????? ??????? ????? ??????? | -------------- next part -------------- An HTML attachment was scrubbed... URL: From banibrata.dutta at gmail.com Sat May 10 07:32:56 2008 From: banibrata.dutta at gmail.com (Banibrata Dutta) Date: Sat, 10 May 2008 11:02:56 +0530 Subject: [BangPypers] FAQ In-Reply-To: References: <7c73a13a0805091855u4ca39950h75c1465e568c1834@mail.gmail.com> <65BB76A0-789D-470D-A1C9-47502C649160@btbytes.com> <7C9FC8C5-BC8E-4FDB-9395-E5585100D1C1@btbytes.com> <3de8e1f70805092200n927f84fod1195c22c662f5de@mail.gmail.com> Message-ID: <3de8e1f70805092232r3a923c5exe8d4a9a7ac9b4b3@mail.gmail.com> Arrgh... the Edit-lock screwed up !! ?? Anyway, what you put in there is a lot more sensible... so well done. :) On 5/10/08, Vishal wrote: > > Banibrata, > > I think I've overwritten what you had posted....albeit by mistake. > > Here's what I have put into this page. > http://wiki.python.org/moin/BangPypers/PythonEditors > > Gave links to the IDEs and Editor's page from the python.org wiki itself. > > Hope that covers PyScripter and PythonWin also. > > > THanks and best regards, > Vishal > > On Sat, May 10, 2008 at 10:30 AM, Banibrata Dutta < > banibrata.dutta at gmail.com> wrote: > >> Added 2 ides' to BangPypers @ wiki.python.org >> >> >> On 5/10/08, Pradeep Gowda wrote: >>> >>> >>> On 09-May-08, at 10:28 PM, Pradeep Gowda wrote: >>> >>>> >>>> http://bangpypers.jottit.com/ >>>> Its a wiki, as simple as it can get. >>>> >>>> >>> Oh, I forgot all about our wiki on python.org.. >>> http://wiki.python.org/moin/BangPypers >>> Please use the python.org wiki. >>> >>> _______________________________________________ >>> BangPypers mailing list >>> BangPypers at python.org >>> http://mail.python.org/mailman/listinfo/bangpypers >>> >> >> >> >> >> -- >> regards, >> Banibrata >> http://www.linkedin.com/in/bdutta >> http://octapod.wordpress.com >> _______________________________________________ >> BangPypers mailing list >> BangPypers at python.org >> http://mail.python.org/mailman/listinfo/bangpypers >> >> > > > -- > 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. > > Visit: > http://members.soundclick.com/mukulsapre > http://www.soundclick.com/gurusgrace > > Nice gist of all Goodness: > ???????? ??????? ????????? ?????? ????? | > ????????? ??????? ????? ??????? | > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > > -- regards, Banibrata http://www.linkedin.com/in/bdutta http://octapod.wordpress.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From kartheekpn at yahoo.co.in Mon May 12 07:53:44 2008 From: kartheekpn at yahoo.co.in (KartheeK) Date: Mon, 12 May 2008 06:53:44 +0100 (BST) Subject: [BangPypers] Redirection of standard output to a variable Message-ID: <914517.56617.qm@web8508.mail.in.yahoo.com> Hi, I am trying to find a way from which I could redirect standard output to a variable. The server I am using runs, Python 2.2.1 [subprocess module is not there, and my ops team denies for an upgrade] I am writing a script that downloads a configuration file from remote servers[200+], I want to process the standard output so that I can confirm if the download did happen completely/correctly. Please pass on any hints.. Thanks, KartheeK -------------- next part -------------- An HTML attachment was scrubbed... URL: From rmanocha at gmail.com Mon May 12 08:43:54 2008 From: rmanocha at gmail.com (Rishabh Manocha) Date: Mon, 12 May 2008 12:13:54 +0530 Subject: [BangPypers] Redirection of standard output to a variable In-Reply-To: <914517.56617.qm@web8508.mail.in.yahoo.com> References: <914517.56617.qm@web8508.mail.in.yahoo.com> Message-ID: <65b679260805112343k55c8cb14ha382bd5ac2e1bc07@mail.gmail.com> Did you take a look at using urllib[1] or urllib2[2]?? You can use them to download your file, save it and process any meta (header) info returned. [1] - http://docs.python.org/lib/module-urllib.html [2] - http://docs.python.org/lib/module-urllib2.html Best, Rishabh On Mon, May 12, 2008 at 11:23 AM, KartheeK wrote: > Hi, > > I am trying to find a way from which I could redirect standard output to a > variable. > The server I am using runs, Python 2.2.1 [subprocess module is not there, > and my ops team denies for an upgrade] > I am writing a script that downloads a configuration file from remote > servers[200+], I want to process the standard output so that I can confirm > if the download did happen completely/correctly. > Please pass on any hints.. > > Thanks, > > KartheeK > > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > > From srsy70 at gmail.com Mon May 12 08:48:25 2008 From: srsy70 at gmail.com (S.Ramaswamy) Date: Mon, 12 May 2008 12:18:25 +0530 Subject: [BangPypers] Redirection of standard output to a variable In-Reply-To: <914517.56617.qm@web8508.mail.in.yahoo.com> References: <914517.56617.qm@web8508.mail.in.yahoo.com> Message-ID: > > I am trying to find a way from which I could redirect standard output to a > variable. You can redirect stdout and stderr to a file. Check out the following section from Dive into Python, that has sample code: http://www.diveintopython.org/scripts_and_streams/stdin_stdout_stderr.html Ramaswamy From kartheekpn at yahoo.co.in Mon May 12 08:55:12 2008 From: kartheekpn at yahoo.co.in (KartheeK) Date: Mon, 12 May 2008 07:55:12 +0100 (BST) Subject: [BangPypers] Redirection of standard output to a variable In-Reply-To: <65b679260805112343k55c8cb14ha382bd5ac2e1bc07@mail.gmail.com> Message-ID: <743661.36281.qm@web8509.mail.in.yahoo.com> Hi Rishabh, Unfortunately the remote servers that house these config files do not have them on either www or ftp, my only mode of access is scp This was a good learning for me , i did not know that something like urllib existed.. Thanks for the inputs KartheeK Rishabh Manocha wrote: Did you take a look at using urllib[1] or urllib2[2]?? You can use them to download your file, save it and process any meta (header) info returned. [1] - http://docs.python.org/lib/module-urllib.html [2] - http://docs.python.org/lib/module-urllib2.html Best, Rishabh On Mon, May 12, 2008 at 11:23 AM, KartheeK wrote: > Hi, > > I am trying to find a way from which I could redirect standard output to a > variable. > The server I am using runs, Python 2.2.1 [subprocess module is not there, > and my ops team denies for an upgrade] > I am writing a script that downloads a configuration file from remote > servers[200+], I want to process the standard output so that I can confirm > if the download did happen completely/correctly. > Please pass on any hints.. > > Thanks, > > KartheeK > > > _______________________________________________ > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From abpillai at gmail.com Mon May 12 09:04:29 2008 From: abpillai at gmail.com (Anand Balachandran Pillai) Date: Mon, 12 May 2008 12:34:29 +0530 Subject: [BangPypers] Redirection of standard output to a variable In-Reply-To: References: <914517.56617.qm@web8508.mail.in.yahoo.com> Message-ID: <8548c5f30805120004p3b22221cm28ff5fa645c84c80@mail.gmail.com> Using os.popen for this is straight-forward. Example... [anand at localhost programming]$ python Python 2.4.4 (#1, Oct 23 2006, 13:58:00) [GCC 4.1.1 20061011 (Red Hat 4.1.1-30)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import os >>> f = os.popen("ls") >>> print f.read() #809.ods berkleyDB.pdf bittorrentecon.pdf btorrent_protocol_files btorrent_protocol.html c_network_prog_presentation.pdf ... You simply open a pipe to the process and read the output from the pipe. os.popen2/os.popen3 gives more control, using this you can manipulate both stdio and stdout and stdio, stdout and stderr of the process respectively. --Anand On Mon, May 12, 2008 at 12:18 PM, S.Ramaswamy wrote: >> >> I am trying to find a way from which I could redirect standard output to a >> variable. > > You can redirect stdout and stderr to a file. Check out the following > section from Dive into Python, that has sample code: > > http://www.diveintopython.org/scripts_and_streams/stdin_stdout_stderr.html > > Ramaswamy > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- -Anand From heshan.suri at gmail.com Mon May 12 13:05:53 2008 From: heshan.suri at gmail.com (Heshan Suriyaarachchi) Date: Mon, 12 May 2008 16:35:53 +0530 Subject: [BangPypers] Mapping python types to xml schema Message-ID: <12e5d0d90805120405i1eacb02fi6f51690c7991cbe2@mail.gmail.com> Hi, I am using a mechanism to annotate a python script, and at the deployment time I am reading the annotations and mapping the types defined in the python script to xml schema types(This is done inside java).But the problem I am facing is , since python is dynamically typed how should I map the date , time types , complex types?(I have attached below some sample code to give you an idea). The information in [1] gives a bit of an idea but it does not give any detail description.I will be grateful if anyone can give me any direction on mapping python types to xml schema.(either in python or in java) // my java imports import org.apache.ws.commons.schema.constants.Constants; // my java code HashMap simpleTypetoxsd = new HashMap(); simpleTypetoxsd.put("int", Constants.XSD_INT); // i.e. I am mapping my "int" annotation to schema type XSD_INT simpleTypetoxsd.put("integer", Constants.XSD_INT); simpleTypetoxsd.put("Integer", Constants.XSD_INT); simpleTypetoxsd.put("double", Constants.XSD_DOUBLE); simpleTypetoxsd.put("Double", Constants.XSD_DOUBLE); simpleTypetoxsd.put("string", Constants.XSD_STRING); simpleTypetoxsd.put("String", Constants.XSD_STRING); [1] - http://jython.org/Project/userguide.html#calling-java-methods-and-functions Thanx in advance -- Regards, Heshan Suriyaarachchi -------------- next part -------------- An HTML attachment was scrubbed... URL: From abpillai at gmail.com Mon May 12 15:02:23 2008 From: abpillai at gmail.com (Anand Balachandran Pillai) Date: Mon, 12 May 2008 18:32:23 +0530 Subject: [BangPypers] Mapping python types to xml schema In-Reply-To: <12e5d0d90805120405i1eacb02fi6f51690c7991cbe2@mail.gmail.com> References: <12e5d0d90805120405i1eacb02fi6f51690c7991cbe2@mail.gmail.com> Message-ID: <8548c5f30805120602h5588c8d0o155fb4d017b6afcc@mail.gmail.com> Hi, Is your problem in actually finding out the types or in arriving at a type mapping ? If the question is regarding mapping I think you can simply pass in datetime objects as seconds since epoch, in this case it will be mapped to a FLOAT or DOUBLE. The other option is to convert it to a string type using the "isoformat" method. This is the better option I think, since it can also contain the time zone information if any, contained in the datetime object. But can't you use javax.xml.namespace.QName XSD_DATETIME for representing date and time ? Complex types are more tricky, since you cannot resolve it to a single type. It can be represented as a two tuple (x, y) of floats, where x is the real part and y the imaginary part. Also take a look at how derived types are encoded in XML-RPC in Python. It could be useful. http://docs.python.org/lib/module-xmlrpclib.html --Anand On Mon, May 12, 2008 at 4:35 PM, Heshan Suriyaarachchi wrote: > Hi, > I am using a mechanism to annotate a python script, and at the deployment > time I am reading the annotations and mapping the types defined in the > python script to xml schema types(This is done inside java).But the problem > I am facing is , since python is dynamically typed how should I map the date > , time types , complex types?(I have attached below some sample code to give > you an idea). The information in [1] gives a bit of an idea but it does not > give any detail description.I will be grateful if anyone can give me any > direction on mapping python types to xml schema.(either in python or in > java) > > // my java imports > import org.apache.ws.commons.schema.constants.Constants; > > // my java code > HashMap simpleTypetoxsd = new HashMap(); > simpleTypetoxsd.put("int", Constants.XSD_INT); // i.e. I am > mapping my "int" annotation to schema type XSD_INT > simpleTypetoxsd.put("integer", Constants.XSD_INT); > simpleTypetoxsd.put("Integer", Constants.XSD_INT); > simpleTypetoxsd.put("double", Constants.XSD_DOUBLE); > simpleTypetoxsd.put("Double", Constants.XSD_DOUBLE); > > simpleTypetoxsd.put("string", Constants.XSD_STRING); > simpleTypetoxsd.put("String", Constants.XSD_STRING); > > > [1] - > http://jython.org/Project/userguide.html#calling-java-methods-and-functions > > > Thanx in advance > > > -- > Regards, > Heshan Suriyaarachchi > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > > -- -Anand From kartheekpn at yahoo.co.in Tue May 13 08:45:32 2008 From: kartheekpn at yahoo.co.in (KartheeK) Date: Tue, 13 May 2008 07:45:32 +0100 (BST) Subject: [BangPypers] Redirection of standard output to a variable In-Reply-To: <8548c5f30805120004p3b22221cm28ff5fa645c84c80@mail.gmail.com> Message-ID: <336432.54944.qm@web8505.mail.in.yahoo.com> Hi Anand, This works for ls, I also tried it to capture ping. But for some unknown reasons it is not able to capture scp's output. The variable f is empty. KartheeK Anand Balachandran Pillai wrote: Using os.popen for this is straight-forward. Example... [anand at localhost programming]$ python Python 2.4.4 (#1, Oct 23 2006, 13:58:00) [GCC 4.1.1 20061011 (Red Hat 4.1.1-30)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import os >>> f = os.popen("ls") >>> print f.read() #809.ods berkleyDB.pdf bittorrentecon.pdf btorrent_protocol_files btorrent_protocol.html c_network_prog_presentation.pdf ... You simply open a pipe to the process and read the output from the pipe. os.popen2/os.popen3 gives more control, using this you can manipulate both stdio and stdout and stdio, stdout and stderr of the process respectively. --Anand On Mon, May 12, 2008 at 12:18 PM, S.Ramaswamy wrote: >> >> I am trying to find a way from which I could redirect standard output to a >> variable. > > You can redirect stdout and stderr to a file. Check out the following > section from Dive into Python, that has sample code: > > http://www.diveintopython.org/scripts_and_streams/stdin_stdout_stderr.html > > Ramaswamy > _______________________________________________ > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From gnuyoga at gmail.com Tue May 13 09:05:18 2008 From: gnuyoga at gmail.com (gnuyoga) Date: Tue, 13 May 2008 12:35:18 +0530 Subject: [BangPypers] Redirection of standard output to a variable In-Reply-To: <336432.54944.qm@web8505.mail.in.yahoo.com> References: <336432.54944.qm@web8505.mail.in.yahoo.com> Message-ID: <48293DAE.5090503@gmail.com> KartheeK wrote: > Hi Anand, > > This works for ls, I also tried it to capture ping. > But for some unknown reasons it is not able to capture scp's output. > The variable f is empty. > > KartheeK > u have to get the standard error stream as well u can take a look at commands module ex: import commands print commands.getoutput('ls') commands.getoutput returns output stream + error stream - sree -- http://picasaweb.google.com/gnuyoga Each soul is potentially divine. The goal is to manifest the divine by controlling nature, internal or external. Do this by work or worship or psychic control or philosophy by one or more, or all of these and be free. From kartheekpn at yahoo.co.in Tue May 13 09:45:46 2008 From: kartheekpn at yahoo.co.in (KartheeK) Date: Tue, 13 May 2008 08:45:46 +0100 (BST) Subject: [BangPypers] Redirection of standard output to a variable In-Reply-To: <48293DAE.5090503@gmail.com> Message-ID: <613585.22993.qm@web8504.mail.in.yahoo.com> Hi, I tried that too but it also for some reasons fails to capture scp output although it can capture things like ping. command.getstatusoutput returns exit code but not the string. KartheeK gnuyoga wrote: KartheeK wrote: > Hi Anand, > > This works for ls, I also tried it to capture ping. > But for some unknown reasons it is not able to capture scp's output. > The variable f is empty. > > KartheeK > u have to get the standard error stream as well u can take a look at commands module ex: import commands print commands.getoutput('ls') commands.getoutput returns output stream + error stream - sree -- http://picasaweb.google.com/gnuyoga Each soul is potentially divine. The goal is to manifest the divine by controlling nature, internal or external. Do this by work or worship or psychic control or philosophy by one or more, or all of these and be free. _______________________________________________ BangPypers mailing list BangPypers at python.org http://mail.python.org/mailman/listinfo/bangpypers -------------- next part -------------- An HTML attachment was scrubbed... URL: From gnuyoga at gmail.com Tue May 13 10:38:05 2008 From: gnuyoga at gmail.com (gnuyoga) Date: Tue, 13 May 2008 14:08:05 +0530 Subject: [BangPypers] Redirection of standard output to a variable In-Reply-To: <613585.22993.qm@web8504.mail.in.yahoo.com> References: <613585.22993.qm@web8504.mail.in.yahoo.com> Message-ID: <4829536D.6020704@gmail.com> KartheeK wrote: > Hi, > > I tried that too but it also for some reasons fails to capture scp > output although it can capture things like ping. > command.getstatusoutput returns exit code but not the string. what do u mean by scp output ? commands.getstatusoutput will give you output status and message if any if 0 means the command is executed sucessfully. else it failed and reason why it failed will be returned. please remember that we cannot see you monitor ;-) - sree -- http://picasaweb.google.com/gnuyoga Each soul is potentially divine. The goal is to manifest the divine by controlling nature, internal or external. Do this by work or worship or psychic control or philosophy by one or more, or all of these and be free. From kartheekpn at yahoo.co.in Tue May 13 11:12:04 2008 From: kartheekpn at yahoo.co.in (KartheeK) Date: Tue, 13 May 2008 10:12:04 +0100 (BST) Subject: [BangPypers] Redirection of standard output to a variable In-Reply-To: <4829536D.6020704@gmail.com> Message-ID: <593207.51696.qm@web8508.mail.in.yahoo.com> A typical scp transaction would result in an output as below: ------------------------------------------------------- temp.conf 100% 23 0.0KB/s 00:00 ------------------------------------------------------- I am interested in capturing the above output in a string. gnuyoga wrote: KartheeK wrote: > Hi, > > I tried that too but it also for some reasons fails to capture scp > output although it can capture things like ping. > command.getstatusoutput returns exit code but not the string. what do u mean by scp output ? commands.getstatusoutput will give you output status and message if any if 0 means the command is executed sucessfully. else it failed and reason why it failed will be returned. please remember that we cannot see you monitor ;-) - sree -- http://picasaweb.google.com/gnuyoga Each soul is potentially divine. The goal is to manifest the divine by controlling nature, internal or external. Do this by work or worship or psychic control or philosophy by one or more, or all of these and be free. _______________________________________________ BangPypers mailing list BangPypers at python.org http://mail.python.org/mailman/listinfo/bangpypers -------------- next part -------------- An HTML attachment was scrubbed... URL: From rmanocha at gmail.com Tue May 13 11:29:41 2008 From: rmanocha at gmail.com (Rishabh Manocha) Date: Tue, 13 May 2008 14:59:41 +0530 Subject: [BangPypers] Redirection of standard output to a variable In-Reply-To: <593207.51696.qm@web8508.mail.in.yahoo.com> References: <4829536D.6020704@gmail.com> <593207.51696.qm@web8508.mail.in.yahoo.com> Message-ID: <65b679260805130229k29148f61r5ee3c7cd1c0ecc5a@mail.gmail.com> Kartheek, It seems like what you want to do is a bit complicated - http://www.linuxquestions.org/questions/linux-general-1/how-to-redirect-the-scp-command-output-to-text-file.-629034/. Maybe if you can explain why you need the exact string that scp outputs, somebody can suggest alternatives. Best, R On Tue, May 13, 2008 at 2:42 PM, KartheeK wrote: > A typical scp transaction would result in an output as below: > ------------------------------------------------------- > temp.conf 100% 23 > 0.0KB/s 00:00 > ------------------------------------------------------- > I am interested in capturing the above output in a string. > > > gnuyoga wrote: > > KartheeK wrote: > > Hi, > > > > I tried that too but it also for some reasons fails to capture scp > > output although it can capture things like ping. > > command.getstatusoutput returns exit code but not the string. > > what do u mean by scp output ? > > commands.getstatusoutput will give you output status and message if any > > if 0 means the command is executed sucessfully. > else it failed and reason why it failed will be returned. > > > please remember that we cannot see you monitor ;-) > > - sree > > -- > http://picasaweb.google.com/gnuyoga > > Each soul is potentially divine. The goal is to manifest the divine by > controlling nature, internal or external. Do this by work or worship or > psychic control or philosophy by one or more, or all of these and be free. > > _______________________________________________ > 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 kartheekpn at yahoo.co.in Tue May 13 11:48:47 2008 From: kartheekpn at yahoo.co.in (KartheeK) Date: Tue, 13 May 2008 10:48:47 +0100 (BST) Subject: [BangPypers] Redirection of standard output to a variable In-Reply-To: <65b679260805130229k29148f61r5ee3c7cd1c0ecc5a@mail.gmail.com> Message-ID: <971919.61621.qm@web8514.mail.in.yahoo.com> Hi Rishabh, My script needs to fetch some critical config files from 200+ servers, process them and put them back in place. I need to make sure at each step that I am doing the right thing. So, I though i would make sure to see "100%" each time I download a config file and then only proceed further to process it. KartheeK Rishabh Manocha wrote: Kartheek, It seems like what you want to do is a bit complicated - http://www.linuxquestions.org/questions/linux-general-1/how-to-redirect-the-scp-command-output-to-text-file.-629034/. Maybe if you can explain why you need the exact string that scp outputs, somebody can suggest alternatives. Best, R On Tue, May 13, 2008 at 2:42 PM, KartheeK wrote: > A typical scp transaction would result in an output as below: > ------------------------------------------------------- > temp.conf 100% 23 > 0.0KB/s 00:00 > ------------------------------------------------------- > I am interested in capturing the above output in a string. > > > gnuyoga wrote: > > KartheeK wrote: > > Hi, > > > > I tried that too but it also for some reasons fails to capture scp > > output although it can capture things like ping. > > command.getstatusoutput returns exit code but not the string. > > what do u mean by scp output ? > > commands.getstatusoutput will give you output status and message if any > > if 0 means the command is executed sucessfully. > else it failed and reason why it failed will be returned. > > > please remember that we cannot see you monitor ;-) > > - sree > > -- > http://picasaweb.google.com/gnuyoga > > Each soul is potentially divine. The goal is to manifest the divine by > controlling nature, internal or external. Do this by work or worship or > psychic control or philosophy by one or more, or all of these and be free. > > _______________________________________________ > 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 > > _______________________________________________ BangPypers mailing list BangPypers at python.org http://mail.python.org/mailman/listinfo/bangpypers -------------- next part -------------- An HTML attachment was scrubbed... URL: From abpillai at gmail.com Tue May 13 11:52:15 2008 From: abpillai at gmail.com (Anand Balachandran Pillai) Date: Tue, 13 May 2008 15:22:15 +0530 Subject: [BangPypers] Redirection of standard output to a variable In-Reply-To: <65b679260805130229k29148f61r5ee3c7cd1c0ecc5a@mail.gmail.com> References: <4829536D.6020704@gmail.com> <593207.51696.qm@web8508.mail.in.yahoo.com> <65b679260805130229k29148f61r5ee3c7cd1c0ecc5a@mail.gmail.com> Message-ID: <8548c5f30805130252j5fa83d8dr485e927646eb59a0@mail.gmail.com> This is not an easy thing to do. You can capture any error output by scp by redirecting the error stream, For example, $ scp names.txt anand at remote-host:/home/anand 2>out.txt $ more out.txt names.txt: no such file or directory However trying to capture the output stream (with no error) does not seem to work. $ scp names.txt anand at remote-host:/home/anand 1>out.txt $ more out.txt out.txt (END) Try the verbose mode of scp. Using this mode more information is printed to stderr, which can be captured in a file. $ scp -v names.txt anand at remote-host:/home/anand 2>out.txt $ tail out.txt debug1: Authentication succeeded (publickey). debug1: channel 0: new [client-session] debug1: Entering interactive session. debug1: Sending command: scp -v -t /home/anand Sending file modes: C0644 6 names.txt debug1: client_input_channel_req: channel 0 rtype exit-status reply 0 debug1: channel 0: free: client-session, nchannels 1 debug1: Transferred: stdin 0, stdout 0, stderr 0 bytes in 2.8 seconds debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 0.0 debug1: Exit status 0 Ideally, any code should not be relying on the output of such programs and instead should look at the exit status. If you can tell us why you want to parse the output of scp, we can advise you better. --Anand On Tue, May 13, 2008 at 2:59 PM, Rishabh Manocha wrote: > Kartheek, > > It seems like what you want to do is a bit complicated - > http://www.linuxquestions.org/questions/linux-general-1/how-to-redirect-the-scp-command-output-to-text-file.-629034/. > Maybe if you can explain why you need the exact string that scp > outputs, somebody can suggest alternatives. > > Best, > > R > > > > On Tue, May 13, 2008 at 2:42 PM, KartheeK wrote: > > A typical scp transaction would result in an output as below: > > ------------------------------------------------------- > > temp.conf 100% 23 > > 0.0KB/s 00:00 > > ------------------------------------------------------- > > I am interested in capturing the above output in a string. > > > > > > gnuyoga wrote: > > > > KartheeK wrote: > > > Hi, > > > > > > I tried that too but it also for some reasons fails to capture scp > > > output although it can capture things like ping. > > > command.getstatusoutput returns exit code but not the string. > > > > what do u mean by scp output ? > > > > commands.getstatusoutput will give you output status and message if any > > > > if 0 means the command is executed sucessfully. > > else it failed and reason why it failed will be returned. > > > > > > please remember that we cannot see you monitor ;-) > > > > - sree > > > > -- > > http://picasaweb.google.com/gnuyoga > > > > Each soul is potentially divine. The goal is to manifest the divine by > > controlling nature, internal or external. Do this by work or worship or > > psychic control or philosophy by one or more, or all of these and be free. > > > > _______________________________________________ > > 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 > > > > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- -Anand From anandology at gmail.com Tue May 13 11:53:35 2008 From: anandology at gmail.com (Anand Chitipothu) Date: Tue, 13 May 2008 15:23:35 +0530 Subject: [BangPypers] Redirection of standard output to a variable In-Reply-To: <971919.61621.qm@web8514.mail.in.yahoo.com> References: <65b679260805130229k29148f61r5ee3c7cd1c0ecc5a@mail.gmail.com> <971919.61621.qm@web8514.mail.in.yahoo.com> Message-ID: <41139fcb0805130253y3062e958v841c951198465a2@mail.gmail.com> On Tue, May 13, 2008 at 3:18 PM, KartheeK wrote: > Hi Rishabh, > > My script needs to fetch some critical config files from 200+ servers, > process them and put them back in place. I need to make sure at each step > that I am doing the right thing. > So, I though i would make sure to see "100%" each time I download a config > file and then only proceed further to process it. Then you should look at the exit status of scp command. Any non-zero exit status is failure. In python, os.system function executes a command and returns its exit status. From rmanocha at gmail.com Tue May 13 11:55:41 2008 From: rmanocha at gmail.com (Rishabh Manocha) Date: Tue, 13 May 2008 15:25:41 +0530 Subject: [BangPypers] Redirection of standard output to a variable In-Reply-To: <971919.61621.qm@web8514.mail.in.yahoo.com> References: <65b679260805130229k29148f61r5ee3c7cd1c0ecc5a@mail.gmail.com> <971919.61621.qm@web8514.mail.in.yahoo.com> Message-ID: <65b679260805130255i1a288cb8ka3e17f1148a31545@mail.gmail.com> In that case, why not use what gnuyoga suggested - i.e. - commands.getstatusoutput("scp ..."). If the first entry in the returned tuple is 0, the command executed successfully, if not, then it didn't :). I think you can trust python to get the correct exit code without actually parsing the output from the scp command to confirm this by hand (so to speak :)). Best, R On Tue, May 13, 2008 at 3:18 PM, KartheeK wrote: > Hi Rishabh, > > My script needs to fetch some critical config files from 200+ servers, > process them and put them back in place. I need to make sure at each step > that I am doing the right thing. > So, I though i would make sure to see "100%" each time I download a config > file and then only proceed further to process it. > > > KartheeK > > Rishabh Manocha wrote: > Kartheek, > > It seems like what you want to do is a bit complicated - > http://www.linuxquestions.org/questions/linux-general-1/how-to-redirect-the-scp-command-output-to-text-file.-629034/. > Maybe if you can explain why you need the exact string that scp > outputs, somebody can suggest alternatives. > > Best, > > R > > On Tue, May 13, 2008 at 2:42 PM, KartheeK wrote: > > A typical scp transaction would result in an output as below: > > ------------------------------------------------------- > > temp.conf 100% 23 > > 0.0KB/s 00:00 > > ------------------------------------------------------- > > I am interested in capturing the above output in a string. > > > > > > > gnuyoga wrote: > > > > KartheeK wrote: > > > Hi, > > > > > > I tried that too but it also for some reasons fails to capture scp > > > output although it can capture things like ping. > > > command.getstatusoutput returns exit code but not the string. > > > > what do u mean by scp output ? > > > > commands.getstatusoutput will give you output status and message if any > > > > if 0 means the command is executed sucessfully. > > else it failed and reason why it failed will be returned. > > > > > > please remember that we cannot see you monitor ;-) > > > > - sree > > > > -- > > http://picasaweb.google.com/gnuyoga > > > > Each soul is potentially divine. The goal is to manifest the divine by > > controlling nature, internal or external. Do this by work or worship or > > psychic control or philosophy by one or more, or all of these and be free. > > > > _______________________________________________ > > 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 > > > > > _______________________________________________ > 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 kartheekpn at yahoo.co.in Tue May 13 12:01:23 2008 From: kartheekpn at yahoo.co.in (KartheeK) Date: Tue, 13 May 2008 11:01:23 +0100 (BST) Subject: [BangPypers] Redirection of standard output to a variable In-Reply-To: <65b679260805130255i1a288cb8ka3e17f1148a31545@mail.gmail.com> Message-ID: <953087.87693.qm@web8501.mail.in.yahoo.com> Looks like that is the best available option.. Thank you all folks for your time and assistance. Regards, KartheeK Rishabh Manocha wrote: In that case, why not use what gnuyoga suggested - i.e. - commands.getstatusoutput("scp ..."). If the first entry in the returned tuple is 0, the command executed successfully, if not, then it didn't :). I think you can trust python to get the correct exit code without actually parsing the output from the scp command to confirm this by hand (so to speak :)). Best, R On Tue, May 13, 2008 at 3:18 PM, KartheeK wrote: > Hi Rishabh, > > My script needs to fetch some critical config files from 200+ servers, > process them and put them back in place. I need to make sure at each step > that I am doing the right thing. > So, I though i would make sure to see "100%" each time I download a config > file and then only proceed further to process it. > > > KartheeK > > Rishabh Manocha wrote: > Kartheek, > > It seems like what you want to do is a bit complicated - > http://www.linuxquestions.org/questions/linux-general-1/how-to-redirect-the-scp-command-output-to-text-file.-629034/. > Maybe if you can explain why you need the exact string that scp > outputs, somebody can suggest alternatives. > > Best, > > R > > On Tue, May 13, 2008 at 2:42 PM, KartheeK wrote: > > A typical scp transaction would result in an output as below: > > ------------------------------------------------------- > > temp.conf 100% 23 > > 0.0KB/s 00:00 > > ------------------------------------------------------- > > I am interested in capturing the above output in a string. > > > > > > > gnuyoga wrote: > > > > KartheeK wrote: > > > Hi, > > > > > > I tried that too but it also for some reasons fails to capture scp > > > output although it can capture things like ping. > > > command.getstatusoutput returns exit code but not the string. > > > > what do u mean by scp output ? > > > > commands.getstatusoutput will give you output status and message if any > > > > if 0 means the command is executed sucessfully. > > else it failed and reason why it failed will be returned. > > > > > > please remember that we cannot see you monitor ;-) > > > > - sree > > > > -- > > http://picasaweb.google.com/gnuyoga > > > > Each soul is potentially divine. The goal is to manifest the divine by > > controlling nature, internal or external. Do this by work or worship or > > psychic control or philosophy by one or more, or all of these and be free. > > > > _______________________________________________ > > 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 > > > > > _______________________________________________ > 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 > > _______________________________________________ BangPypers mailing list BangPypers at python.org http://mail.python.org/mailman/listinfo/bangpypers -------------- next part -------------- An HTML attachment was scrubbed... URL: From nishith_n at yahoo.com Thu May 15 20:22:06 2008 From: nishith_n at yahoo.com (Nishith Nand) Date: Thu, 15 May 2008 11:22:06 -0700 (PDT) Subject: [BangPypers] Autocompletion in emacs Message-ID: <384538.16571.qm@web39704.mail.mud.yahoo.com> Hi! Has anyone been able to get auto completion going in emacs python mode? I tried using rope and ropemacs but could not get it to load and run properly. I tried using SPE (Although I would prefer to use emacs) but it crashes each time I type "gtk." (without the quotes. It crashes as soon as I enter the ".", most probably something to do with auto completion). I am on a 64 bit Hardy Heron machine. Thanks and Regards, Nishith ----------------------------------------------------------------------- The problem with the world is stupidity. Not saying there should be a capital punishment for stupidity, but why don't we just take the safety labels off of everything and let the problem solve itself? -------------- next part -------------- An HTML attachment was scrubbed... URL: From munichlinux at gmail.com Thu May 15 20:38:31 2008 From: munichlinux at gmail.com (Prashanth) Date: Fri, 16 May 2008 00:08:31 +0530 Subject: [BangPypers] Autocompletion in emacs In-Reply-To: <384538.16571.qm@web39704.mail.mud.yahoo.com> References: <384538.16571.qm@web39704.mail.mud.yahoo.com> Message-ID: <1f869bdd0805151138n4abfe7a2m97a5f678dbfe205@mail.gmail.com> Hi nishith On Thu, May 15, 2008 at 11:52 PM, Nishith Nand wrote: > Hi! > > Has anyone been able to get auto completion going in emacs python mode? > I tried using rope and ropemacs but could not get it to load and run > properly. I do use and work pretty well for me, you have to install pymacs, rope and add python.el to your load path. Just follow the doc and it will work perfectly. If it dint work please paste your .emacs and the exact installation steps that you followed -- regards, Prashanth http://munichlinux.blogspot.com From maxin_john at yahoo.co.uk Fri May 16 08:54:57 2008 From: maxin_john at yahoo.co.uk (Maxin B John) Date: Fri, 16 May 2008 06:54:57 +0000 (GMT) Subject: [BangPypers] TinyPy : a small implementation of python (less than 64K of code) Message-ID: <332965.48281.qm@web26607.mail.ukl.yahoo.com> An HTML attachment was scrubbed... URL: From sarabhjeetzensar at gmail.com Mon May 19 14:08:47 2008 From: sarabhjeetzensar at gmail.com (sarabhjeet) Date: Mon, 19 May 2008 05:08:47 -0700 (PDT) Subject: [BangPypers] how to remove command line window from python's application... Message-ID: <17316657.post@talk.nabble.com> Hi all, whenever we open any python/wxpython program there is one more window other than our application is running which is command line window that black window for showing any error or any output through print statement.So i want to remove that window from my wxpython's application,how to do this?please help me... -- View this message in context: http://www.nabble.com/how-to-remove-command-line-window-from-python%27s-application...-tp17316657p17316657.html Sent from the BangPypers - Bangalore Python Users Group mailing list archive at Nabble.com. From pradeep at btbytes.com Mon May 19 14:11:21 2008 From: pradeep at btbytes.com (Pradeep Gowda) Date: Mon, 19 May 2008 08:11:21 -0400 Subject: [BangPypers] how to remove command line window from python's application... In-Reply-To: <17316657.post@talk.nabble.com> References: <17316657.post@talk.nabble.com> Message-ID: On 19-May-08, at 8:08 AM, sarabhjeet wrote: > > Hi all, > whenever we open any python/wxpython program there is one more > window other > than our application is running which is command line window that > black > window for showing any error or any output through print > statement.So i want > to remove that window from my wxpython's application,how to do this? > please > Assuming that you are on windows: --> rename your main python script to .pyw This will hide the shell when the script is executed. HTH, Pradeep From sarabhjeetzensar at gmail.com Tue May 20 06:51:12 2008 From: sarabhjeetzensar at gmail.com (sarabhjeet) Date: Mon, 19 May 2008 21:51:12 -0700 (PDT) Subject: [BangPypers] how to remove command line window from python's application... In-Reply-To: References: <17316657.post@talk.nabble.com> Message-ID: <17333190.post@talk.nabble.com> Pradeep Kishore Gowda-2 wrote: > > > On 19-May-08, at 8:08 AM, sarabhjeet wrote: > >> >> Hi all, >> whenever we open any python/wxpython program there is one more >> window other >> than our application is running which is command line window that >> black >> window for showing any error or any output through print >> statement.So i want >> to remove that window from my wxpython's application,how to do this? >> please >> > > Assuming that you are on windows: > --> rename your main python script to .pyw > This will hide the shell when the script is executed. > > HTH, > Pradeep > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > > hi there, thanks yaar my query has been solved. -- View this message in context: http://www.nabble.com/how-to-remove-command-line-window-from-python%27s-application...-tp17316657p17333190.html Sent from the BangPypers - Bangalore Python Users Group mailing list archive at Nabble.com. From lorddaemon at gmail.com Wed May 21 12:02:59 2008 From: lorddaemon at gmail.com (Darkseid) Date: Wed, 21 May 2008 15:32:59 +0530 Subject: [BangPypers] FYI: Meet Erik Dorenberg In-Reply-To: References: Message-ID: <4833F353.3090900@gmail.com> Guys, my apologies for the really short notice. This is happening today in ThoughtWorks Bangalore. ----------------------------- Erik Doernenburg ( http://erik.doernenburg.com/ ) will be talking about "Towards a testable application architecture". Eric has talked about this previously at JAOO in 2004. About Erik: Erik D?rnenburg is a Principal Consultant at ThoughtWorks Inc. where he is helping clients with the design and implementation of large- scale enterprise solutions. Building on his experience with J2EE, Microsoft .NET and other environments, Erik is continually exploring patterns of enterprise software. He is an advocate of agile development and Open Source software, holds a degree in Informatics from the University of Dortmund and has studied Computer Science and Linguistics at the University College Dublin. If you plan to land up, it would be great if you could head over to: http://thoughtworks.wikispaces.com/Confirm+Presence and sign up. This is very much an informal event and we don't discourage people who land up on a whim at the last minute - the sign up is for the organizers to get an idea of the numbers. Where: ThoughtWorks Technologies (India) Pvt Ltd. 2nd Floor, Tower C, Corporate Block, Diamond District Airport Road, Bangalore - 560 008, India t: +91 80 2508 9572 f: +91 80 2508 9584 Diamond District is on Airport Road near the 100 ft Road/Airport Road flyover, right opposite TGIF/Bombay Post. From abpillai at gmail.com Wed May 21 12:24:30 2008 From: abpillai at gmail.com (Anand Balachandran Pillai) Date: Wed, 21 May 2008 15:54:30 +0530 Subject: [BangPypers] FYI: Meet Erik Dorenberg In-Reply-To: <4833F353.3090900@gmail.com> References: <4833F353.3090900@gmail.com> Message-ID: <8548c5f30805210324y684326afx45186b828224db5a@mail.gmail.com> Thanks for the notice. Excuse my curiosity, but are you using Python for this project ? Where is the Python/vhll link here ? Thanks --Anand On Wed, May 21, 2008 at 3:32 PM, Darkseid wrote: > Guys, my apologies for the really short notice. This is happening today > in ThoughtWorks Bangalore. > ----------------------------- > Erik Doernenburg ( http://erik.doernenburg.com/ ) will be talking about > "Towards a testable application architecture". Eric has talked about > this previously at JAOO in 2004. > > About Erik: > Erik D?rnenburg is a Principal Consultant at ThoughtWorks Inc. where > he is helping clients with the design and implementation of large- > scale enterprise solutions. Building on his experience with J2EE, > Microsoft .NET and other environments, Erik is continually exploring > patterns of enterprise software. He is an advocate of agile > development and Open Source software, holds a degree in Informatics > from the University of Dortmund and has studied Computer Science and > Linguistics at the University College Dublin. > > If you plan to land up, it would be great if you could head over to: > http://thoughtworks.wikispaces.com/Confirm+Presence > and sign up. This is very much an informal event and we don't > discourage people who land up on a whim at the last minute - the sign > up is for the organizers to get an idea of the numbers. > > Where: > ThoughtWorks Technologies (India) Pvt Ltd. > 2nd Floor, Tower C, Corporate Block, Diamond District > Airport Road, Bangalore - 560 008, India > t: +91 80 2508 9572 > f: +91 80 2508 9584 > > Diamond District is on Airport Road near the 100 ft Road/Airport Road > flyover, right opposite TGIF/Bombay Post. > > > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- -Anand From zoltan.jose at gmail.com Wed May 21 12:33:26 2008 From: zoltan.jose at gmail.com (Timmy Jose) Date: Wed, 21 May 2008 16:03:26 +0530 Subject: [BangPypers] FYI: Meet Erik Dorenberg In-Reply-To: <8548c5f30805210324y684326afx45186b828224db5a@mail.gmail.com> References: <4833F353.3090900@gmail.com> <8548c5f30805210324y684326afx45186b828224db5a@mail.gmail.com> Message-ID: Sounds sarcastic to me ;-) On 5/21/08, Anand Balachandran Pillai wrote: > Thanks for the notice. Excuse my curiosity, but are you using Python > for this project ? Where is the Python/vhll link here ? > > Thanks > > --Anand > > > On Wed, May 21, 2008 at 3:32 PM, Darkseid wrote: > > Guys, my apologies for the really short notice. This is happening today > > in ThoughtWorks Bangalore. > > ----------------------------- > > Erik Doernenburg ( http://erik.doernenburg.com/ ) will be talking about > > "Towards a testable application architecture". Eric has talked about > > this previously at JAOO in 2004. > > > > About Erik: > > Erik D?rnenburg is a Principal Consultant at ThoughtWorks Inc. where > > he is helping clients with the design and implementation of large- > > scale enterprise solutions. Building on his experience with J2EE, > > Microsoft .NET and other environments, Erik is continually exploring > > patterns of enterprise software. He is an advocate of agile > > development and Open Source software, holds a degree in Informatics > > from the University of Dortmund and has studied Computer Science and > > Linguistics at the University College Dublin. > > > > If you plan to land up, it would be great if you could head over to: > > http://thoughtworks.wikispaces.com/Confirm+Presence > > and sign up. This is very much an informal event and we don't > > discourage people who land up on a whim at the last minute - the sign > > up is for the organizers to get an idea of the numbers. > > > > Where: > > ThoughtWorks Technologies (India) Pvt Ltd. > > 2nd Floor, Tower C, Corporate Block, Diamond District > > Airport Road, Bangalore - 560 008, India > > t: +91 80 2508 9572 > > f: +91 80 2508 9584 > > > > Diamond District is on Airport Road near the 100 ft Road/Airport Road > > flyover, right opposite TGIF/Bombay Post. > > > > > > > > _______________________________________________ > > 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 > -- Bwahahahahahahahahahahahaha! From soorjithp at gmail.com Wed May 21 14:03:04 2008 From: soorjithp at gmail.com (soorjith p) Date: Wed, 21 May 2008 17:33:04 +0530 Subject: [BangPypers] BangPypers Digest, Vol 9, Issue 19 In-Reply-To: References: Message-ID: Hi... How to hide this in pygtk? Regards Soorjith P On Tue, May 20, 2008 at 3:30 PM, wrote: > Send BangPypers mailing list submissions to > bangpypers at python.org > > To subscribe or unsubscribe via the World Wide Web, visit > http://mail.python.org/mailman/listinfo/bangpypers > or, via email, send a message with subject or body 'help' to > bangpypers-request at python.org > > You can reach the person managing the list at > bangpypers-owner at python.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of BangPypers digest..." > > > Today's Topics: > > 1. how to remove command line window from python's > application... (sarabhjeet) > 2. Re: how to remove command line window from python's > application... (Pradeep Gowda) > 3. Re: how to remove command line window from python's > application... (sarabhjeet) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Mon, 19 May 2008 05:08:47 -0700 (PDT) > From: sarabhjeet > Subject: [BangPypers] how to remove command line window from python's > application... > To: bangpypers at python.org > Message-ID: <17316657.post at talk.nabble.com> > Content-Type: text/plain; charset=us-ascii > > > Hi all, > whenever we open any python/wxpython program there is one more window other > than our application is running which is command line window that black > window for showing any error or any output through print statement.So i > want > to remove that window from my wxpython's application,how to do this?please > help me... > -- > View this message in context: > http://www.nabble.com/how-to-remove-command-line-window-from-python%27s-application...-tp17316657p17316657.html > Sent from the BangPypers - Bangalore Python Users Group mailing list > archive at Nabble.com. > > > > ------------------------------ > > Message: 2 > Date: Mon, 19 May 2008 08:11:21 -0400 > From: Pradeep Gowda > Subject: Re: [BangPypers] how to remove command line window from > python's application... > To: Bangalore Python Users Group - India > Message-ID: > Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed > > > On 19-May-08, at 8:08 AM, sarabhjeet wrote: > > > > > Hi all, > > whenever we open any python/wxpython program there is one more > > window other > > than our application is running which is command line window that > > black > > window for showing any error or any output through print > > statement.So i want > > to remove that window from my wxpython's application,how to do this? > > please > > > > Assuming that you are on windows: > --> rename your main python script to .pyw > This will hide the shell when the script is executed. > > HTH, > Pradeep > > > ------------------------------ > > Message: 3 > Date: Mon, 19 May 2008 21:51:12 -0700 (PDT) > From: sarabhjeet > Subject: Re: [BangPypers] how to remove command line window from > python's application... > To: bangpypers at python.org > Message-ID: <17333190.post at talk.nabble.com> > Content-Type: text/plain; charset=us-ascii > > > > > Pradeep Kishore Gowda-2 wrote: > > > > > > On 19-May-08, at 8:08 AM, sarabhjeet wrote: > > > >> > >> Hi all, > >> whenever we open any python/wxpython program there is one more > >> window other > >> than our application is running which is command line window that > >> black > >> window for showing any error or any output through print > >> statement.So i want > >> to remove that window from my wxpython's application,how to do this? > >> please > >> > > > > Assuming that you are on windows: > > --> rename your main python script to .pyw > > This will hide the shell when the script is executed. > > > > HTH, > > Pradeep > > _______________________________________________ > > BangPypers mailing list > > BangPypers at python.org > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > hi there, > thanks yaar my query has been solved. > > -- > View this message in context: > http://www.nabble.com/how-to-remove-command-line-window-from-python%27s-application...-tp17316657p17333190.html > Sent from the BangPypers - Bangalore Python Users Group mailing list > archive at Nabble.com. > > > > ------------------------------ > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > > > End of BangPypers Digest, Vol 9, Issue 19 > ***************************************** > -------------- next part -------------- An HTML attachment was scrubbed... URL: From soorjithp at gmail.com Wed May 21 14:04:43 2008 From: soorjithp at gmail.com (soorjith p) Date: Wed, 21 May 2008 17:34:43 +0530 Subject: [BangPypers] Tray Popup Message-ID: Hi,,, Anyone know how to create tray popup in pygtk? Pls let me know/ Regards Soorjith P -------------- next part -------------- An HTML attachment was scrubbed... URL: From srinivas_puvvala at yahoo.co.in Wed May 21 14:36:20 2008 From: srinivas_puvvala at yahoo.co.in (srinivasarao puvvala) Date: Wed, 21 May 2008 18:06:20 +0530 (IST) Subject: [BangPypers] about python modules In-Reply-To: Message-ID: <686134.75191.qm@web94611.mail.in2.yahoo.com> An HTML attachment was scrubbed... URL: From ataulla at gmail.com Wed May 21 14:43:33 2008 From: ataulla at gmail.com (Ataulla S H) Date: Wed, 21 May 2008 18:13:33 +0530 Subject: [BangPypers] about python modules In-Reply-To: <686134.75191.qm@web94611.mail.in2.yahoo.com> References: <686134.75191.qm@web94611.mail.in2.yahoo.com> Message-ID: hi, plz go through this doc http://docs.python.org/dist/dist.html thank u On Wed, May 21, 2008 at 6:06 PM, srinivasarao puvvala < srinivas_puvvala at yahoo.co.in> wrote: > hi friends , > i am using Python 2.5 and IDLE as editor. > i have developed some functions in python those will be calling > frequently in my main method . > now i want to know how to import my functions folder to python in > sucha way that the functions in functions folder should work like > python library modules . > > i have python in folder C:\python25\.. > and functions folder D:\programs\Functions\ > > pls help me friends how to do that. > > > > > ------------------------------ > Meet people who discuss and share your passions. Join them now. > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > > -- Ataulla SH web:www.kring.com personal blog:www.ataulla.objectis.net KRING Technologies India Pvt. Ltd. 1st Floor, Tower B, Infinity Towers, DLF II, Gurgaon-122 002 -------------- next part -------------- An HTML attachment was scrubbed... URL: From pradeep at btbytes.com Wed May 21 14:44:52 2008 From: pradeep at btbytes.com (Pradeep Gowda) Date: Wed, 21 May 2008 08:44:52 -0400 Subject: [BangPypers] about python modules In-Reply-To: <686134.75191.qm@web94611.mail.in2.yahoo.com> References: <686134.75191.qm@web94611.mail.in2.yahoo.com> Message-ID: <6378F56A-A73D-459E-A8AC-688C436D61E8@btbytes.com> On 21-May-08, at 8:36 AM, srinivasarao puvvala wrote: > hi friends , > i am using Python 2.5 and IDLE as editor. > i have developed some functions in python those will be calling > frequently in my main method . > now i want to know how to import my functions folder to python in > sucha way that the functions in functions folder should work like > python library modules . > i have python in folder C:\python25\.. > and functions folder D:\programs\Functions\ > > Modules and packages. http://docs.python.org/tut/node8.html Read the whole chapter. It has answers to all your questions. To be specific : http://docs.python.org/tut/ node8.html#SECTION008120000000000000000 -------------- next part -------------- An HTML attachment was scrubbed... URL: From maxin_john at yahoo.co.uk Thu May 22 05:40:06 2008 From: maxin_john at yahoo.co.uk (Maxin B John) Date: Thu, 22 May 2008 03:40:06 +0000 (GMT) Subject: [BangPypers] BangPypers Digest, Vol 9, Issue 20 In-Reply-To: Message-ID: <886498.75271.qm@web26602.mail.ukl.yahoo.com> An HTML attachment was scrubbed... URL: From g.forumz at gmail.com Thu May 22 21:14:44 2008 From: g.forumz at gmail.com (g sobers) Date: Thu, 22 May 2008 15:14:44 -0400 Subject: [BangPypers] Simple syntactic error? In-Reply-To: References: Message-ID: hey! Following is a small PyS60 script. The error seems related to basic syntax - "state" in keys() is not recognized although defined globally. Would appreciate assistance. ============================================= import appuifw, key_codes, e32, telephone state = None def keys(event): if event['keycode'] == key_codes.EKeyYes: appuifw.note(u"Doesn't Matter") elif (event['keycode'] == key_codes.EKeyYes) and (state == telephone.EStatusConnected): appuifw.note(u"Yes was pressed and call active") def cb_calling(args): state = args[0] def quit(): app_lock.signal() telephone.call_state(cb_calling) canvas = appuifw.Canvas(event_callback = keys) appuifw.app.body = canvas appuifw.app.exit_key_handler = quit app_lock = e32.Ao_lock() app_lock.wait() ============================================== Best, wirefree -------------- next part -------------- An HTML attachment was scrubbed... URL: From pradeep at btbytes.com Thu May 22 21:25:26 2008 From: pradeep at btbytes.com (Pradeep Gowda) Date: Thu, 22 May 2008 15:25:26 -0400 Subject: [BangPypers] Simple syntactic error? In-Reply-To: References: Message-ID: On 22-May-08, at 3:14 PM, g sobers wrote: > hey! > > Following is a small PyS60 script. The error seems related to basic > syntax - "state" in keys() is not recognized although defined > globally. > > Would appreciate assistance. > > ============================================= > import appuifw, key_codes, e32, telephone > state = None > > def keys(event): > if event['keycode'] == key_codes.EKeyYes: > appuifw.note(u"Doesn't Matter") > elif (event['keycode'] == key_codes.EKeyYes) and (state == > telephone.EStatusConnected): > appuifw.note(u"Yes was pressed and call active") > > def cb_calling(args): > state = args[0] > > def quit(): > app_lock.signal() > > telephone.call_state(cb_calling) > canvas = appuifw.Canvas(event_callback = keys) > appuifw.app.body = canvas > appuifw.app.exit_key_handler = quit > app_lock = e32.Ao_lock() > app_lock.wait() > ============================================== > > Best, > wirefree > See the code below >>> state = 99 >>> def foo(vars): ... state = vars[0] ... >>> foo([1,2]) >>> state 99 #------ this is what is happening to your code # so... try this... >>> def foo(vars): ... global state ... state = vars[0] ... >>> foo([1,2]) >>> state 1 >>> You have declare state as "global" inside the function. By default the scope of the variable is local. From abpillai at gmail.com Fri May 23 11:35:51 2008 From: abpillai at gmail.com (Anand Balachandran Pillai) Date: Fri, 23 May 2008 15:05:51 +0530 Subject: [BangPypers] Autocompletion in emacs In-Reply-To: <1f869bdd0805151138n4abfe7a2m97a5f678dbfe205@mail.gmail.com> References: <384538.16571.qm@web39704.mail.mud.yahoo.com> <1f869bdd0805151138n4abfe7a2m97a5f678dbfe205@mail.gmail.com> Message-ID: <8548c5f30805230235g5df02a3eq45a7f8a8fbc6733c@mail.gmail.com> Isn't M-x dabbrev-expand good enough ? On Fri, May 16, 2008 at 12:08 AM, Prashanth wrote: > Hi nishith > > On Thu, May 15, 2008 at 11:52 PM, Nishith Nand wrote: >> Hi! >> >> Has anyone been able to get auto completion going in emacs python mode? >> I tried using rope and ropemacs but could not get it to load and run >> properly. > > I do use and work pretty well for me, you have to install pymacs, rope > and add python.el to your load path. Just follow the doc and it will > work perfectly. If it dint work please paste your .emacs and the exact > installation steps that you followed > > > > -- > regards, > > Prashanth > http://munichlinux.blogspot.com > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- -Anand From nishith_n at yahoo.com Fri May 23 14:07:57 2008 From: nishith_n at yahoo.com (Nishith Nand) Date: Fri, 23 May 2008 05:07:57 -0700 (PDT) Subject: [BangPypers] Autocompletion in emacs In-Reply-To: <8548c5f30805230235g5df02a3eq45a7f8a8fbc6733c@mail.gmail.com> Message-ID: <339054.99343.qm@web39705.mail.mud.yahoo.com> I am a python beginner. I found the auto completion feature that IDEs like SPE provide, wherein when you type, for example, "gtk.", it shows you the list of available function calls in a dropdown box, pretty useful. Especially when the function description is also shown as a tooltip. So, I was looking for something like that in emacs. Anand Balachandran Pillai wrote: Isn't M-x dabbrev-expand good enough ? On Fri, May 16, 2008 at 12:08 AM, Prashanth wrote: > Hi nishith > > On Thu, May 15, 2008 at 11:52 PM, Nishith Nand wrote: >> Hi! >> >> Has anyone been able to get auto completion going in emacs python mode? >> I tried using rope and ropemacs but could not get it to load and run >> properly. > > I do use and work pretty well for me, you have to install pymacs, rope > and add python.el to your load path. Just follow the doc and it will > work perfectly. If it dint work please paste your .emacs and the exact > installation steps that you followed > > > > -- > regards, > > Prashanth > http://munichlinux.blogspot.com > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- -Anand ----------------------------------------------------------------------- The problem with the world is stupidity. Not saying there should be a capital punishment for stupidity, but why don't we just take the safety labels off of everything and let the problem solve itself? -------------- next part -------------- An HTML attachment was scrubbed... URL: From pradeep at btbytes.com Fri May 23 14:14:55 2008 From: pradeep at btbytes.com (Pradeep Gowda) Date: Fri, 23 May 2008 08:14:55 -0400 Subject: [BangPypers] Autocompletion in emacs In-Reply-To: <339054.99343.qm@web39705.mail.mud.yahoo.com> References: <339054.99343.qm@web39705.mail.mud.yahoo.com> Message-ID: <47ADD5D4-B07B-46F1-847A-220D7F4D94C9@btbytes.com> On 23-May-08, at 8:07 AM, Nishith Nand wrote: > I am a python beginner. I found the auto completion feature that > IDEs like SPE provide, wherein when you type, for example, "gtk.", > it shows you the list of available function calls in a dropdown > box, pretty useful. Especially when the function description is > also shown as a tooltip. So, I was looking for something like that > in emacs. > > Anand Balachandran Pillai wrote: > Isn't M-x dabbrev-expand good enough ? > I think he wants to have "Intellisense" as in visual studio/eclipse etc., I have not had much use for intellisense so far (python shell with help, __doc__ and dir() have been sufficient). my attempt at using rope emacs, pymacs has not worked. Will give it a shot again. But, to continue with Anand's suggestion, I found yasnippet http:// code.google.com/p/yasnippet to be a great extension for textmate like snippet features. One types def and and the snippets expands to def fn(): ''' ''' with subsequent taking you to the right places. -------------- next part -------------- An HTML attachment was scrubbed... URL: From botsie at nixcartel.org Fri May 23 14:21:59 2008 From: botsie at nixcartel.org (Biju Chacko) Date: Fri, 23 May 2008 17:51:59 +0530 Subject: [BangPypers] Autocompletion in emacs In-Reply-To: <47ADD5D4-B07B-46F1-847A-220D7F4D94C9@btbytes.com> References: <339054.99343.qm@web39705.mail.mud.yahoo.com> <47ADD5D4-B07B-46F1-847A-220D7F4D94C9@btbytes.com> Message-ID: <4836B6E7.8070209@nixcartel.org> Pradeep Gowda wrote: > > On 23-May-08, at 8:07 AM, Nishith Nand wrote: > >> I am a python beginner. I found the auto completion feature that IDEs >> like SPE provide, wherein when you type, for example, "gtk.", it shows >> you the list of available function calls in a dropdown box, pretty >> useful. Especially when the function description is also shown as a >> tooltip. So, I was looking for something like that in emacs. >> >> */Anand Balachandran Pillai > >/* wrote: >> >> Isn't M-x dabbrev-expand good enough ? >> > I think he wants to have "Intellisense" as in visual studio/eclipse etc., > I have not had much use for intellisense so far (python shell with help, > __doc__ and dir() have been sufficient). > my attempt at using rope emacs, pymacs has not worked. Will give it a > shot again. Use Omnicomplete in vim -- works very well. -- b From gates.plusplus at gmail.com Fri May 23 14:36:57 2008 From: gates.plusplus at gmail.com (Rohan Sharma) Date: Fri, 23 May 2008 18:06:57 +0530 Subject: [BangPypers] Autocompletion in emacs In-Reply-To: <4836B6E7.8070209@nixcartel.org> References: <339054.99343.qm@web39705.mail.mud.yahoo.com> <47ADD5D4-B07B-46F1-847A-220D7F4D94C9@btbytes.com> <4836B6E7.8070209@nixcartel.org> Message-ID: <7dd811cb0805230536p5cbdbe04i1ba9a69038e97d25@mail.gmail.com> Biju: nice try, but that won't convert us. I've tried ropemacs, and M-/ does not seem to work for me while M-? seems to work well. On 5/23/08, Biju Chacko wrote: > Pradeep Gowda wrote: > > > > > On 23-May-08, at 8:07 AM, Nishith Nand wrote: > > > > > > > I am a python beginner. I found the auto completion feature that IDEs > like SPE provide, wherein when you type, for example, "gtk.", it shows you > the list of available function calls in a dropdown box, pretty useful. > Especially when the function description is also shown as a tooltip. So, I > was looking for something like that in emacs. > > > > > > */Anand Balachandran Pillai >/* wrote: > > > > > > Isn't M-x dabbrev-expand good enough ? > > > > > > > > I think he wants to have "Intellisense" as in visual studio/eclipse etc., > > I have not had much use for intellisense so far (python shell with help, > __doc__ and dir() have been sufficient). > > my attempt at using rope emacs, pymacs has not worked. Will give it a shot > again. > > > > Use Omnicomplete in vim -- works very well. > > -- b > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From abpillai at gmail.com Fri May 23 14:41:19 2008 From: abpillai at gmail.com (Anand Balachandran Pillai) Date: Fri, 23 May 2008 18:11:19 +0530 Subject: [BangPypers] Autocompletion in emacs In-Reply-To: <4836B6E7.8070209@nixcartel.org> References: <339054.99343.qm@web39705.mail.mud.yahoo.com> <47ADD5D4-B07B-46F1-847A-220D7F4D94C9@btbytes.com> <4836B6E7.8070209@nixcartel.org> Message-ID: <8548c5f30805230541p48724a9ci3b8cc0c0d8939548@mail.gmail.com> On Fri, May 23, 2008 at 5:51 PM, Biju Chacko wrote: > Pradeep Gowda wrote: >> >> On 23-May-08, at 8:07 AM, Nishith Nand wrote: >> >>> I am a python beginner. I found the auto completion feature that IDEs >>> like SPE provide, wherein when you type, for example, "gtk.", it shows you >>> the list of available function calls in a dropdown box, pretty useful. >>> Especially when the function description is also shown as a tooltip. So, I >>> was looking for something like that in emacs. >>> >>> */Anand Balachandran Pillai >> >/* wrote: >>> >>> Isn't M-x dabbrev-expand good enough ? >>> >> I think he wants to have "Intellisense" as in visual studio/eclipse etc., >> I have not had much use for intellisense so far (python shell with help, >> __doc__ and dir() have been sufficient). >> my attempt at using rope emacs, pymacs has not worked. Will give it a shot >> again. Being a language with dynamic (duck) types, how much will intellisense help ? Perhaps for a few basic types and names, which are inferrable from a static context, like "gtk". I have never found intellisense a useful feature, because most of the time I either know what I want or I prefer to do a "dir()" or "help()". > > Use Omnicomplete in vim -- works very well. Isn't the O.P talking about Emacs ? I think you might find CEDET useful. I have never tried it except for the speedbar, which I found pretty useful, sometime back, though I felt it was more of a distraction and turned it off. http://cedet.sourceforge.net/intellisense.shtml > > -- b > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- -Anand From sridhar.ratna at gmail.com Sat May 24 05:10:22 2008 From: sridhar.ratna at gmail.com (Sridhar Ratnakumar) Date: Fri, 23 May 2008 20:10:22 -0700 Subject: [BangPypers] Tray Popup In-Reply-To: References: Message-ID: <7c73a13a0805232010o36b6fb64p627496d31ebad223@mail.gmail.com> On Wed, May 21, 2008 at 5:04 AM, soorjith p wrote: > Hi,,, > > Anyone know how to create tray popup in pygtk? You mean system tray icon? - http://www.pygtk.org/docs/pygtk/class-gtkstatusicon.html From soorjithp at gmail.com Mon May 26 10:31:21 2008 From: soorjithp at gmail.com (soorjith p) Date: Mon, 26 May 2008 14:01:21 +0530 Subject: [BangPypers] BangPypers Digest, Vol 9, Issue 23 In-Reply-To: References: Message-ID: yes system tray icon On Sat, May 24, 2008 at 3:30 PM, wrote: > Send BangPypers mailing list submissions to > bangpypers at python.org > > To subscribe or unsubscribe via the World Wide Web, visit > http://mail.python.org/mailman/listinfo/bangpypers > or, via email, send a message with subject or body 'help' to > bangpypers-request at python.org > > You can reach the person managing the list at > bangpypers-owner at python.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of BangPypers digest..." > > > Today's Topics: > > 1. Re: Autocompletion in emacs (Nishith Nand) > 2. Re: Autocompletion in emacs (Pradeep Gowda) > 3. Re: Autocompletion in emacs (Biju Chacko) > 4. Re: Autocompletion in emacs (Rohan Sharma) > 5. Re: Autocompletion in emacs (Anand Balachandran Pillai) > 6. Re: Tray Popup (Sridhar Ratnakumar) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Fri, 23 May 2008 05:07:57 -0700 (PDT) > From: Nishith Nand > Subject: Re: [BangPypers] Autocompletion in emacs > To: Bangalore Python Users Group - India > Message-ID: <339054.99343.qm at web39705.mail.mud.yahoo.com> > Content-Type: text/plain; charset="iso-8859-1" > > I am a python beginner. I found the auto completion feature that IDEs like > SPE provide, wherein when you type, for example, "gtk.", it shows you the > list of available function calls in a dropdown box, pretty useful. > Especially when the function description is also shown as a tooltip. So, I > was looking for something like that in emacs. > > Anand Balachandran Pillai wrote: Isn't M-x > dabbrev-expand good enough ? > > > On Fri, May 16, 2008 at 12:08 AM, Prashanth wrote: > > Hi nishith > > > > On Thu, May 15, 2008 at 11:52 PM, Nishith Nand wrote: > >> Hi! > >> > >> Has anyone been able to get auto completion going in emacs python > mode? > >> I tried using rope and ropemacs but could not get it to load and run > >> properly. > > > > I do use and work pretty well for me, you have to install pymacs, rope > > and add python.el to your load path. Just follow the doc and it will > > work perfectly. If it dint work please paste your .emacs and the exact > > installation steps that you followed > > > > > > > > -- > > regards, > > > > Prashanth > > http://munichlinux.blogspot.com > > _______________________________________________ > > BangPypers mailing list > > BangPypers at python.org > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > > -- > -Anand > > > > ----------------------------------------------------------------------- > The problem with the world is stupidity. Not saying there should be a > capital punishment for stupidity, but why don't we just take the > safety labels off of everything and let the problem solve itself? > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mail.python.org/pipermail/bangpypers/attachments/20080523/9b56b864/attachment-0001.htm > > > > ------------------------------ > > Message: 2 > Date: Fri, 23 May 2008 08:14:55 -0400 > From: Pradeep Gowda > Subject: Re: [BangPypers] Autocompletion in emacs > To: Bangalore Python Users Group - India > Message-ID: <47ADD5D4-B07B-46F1-847A-220D7F4D94C9 at btbytes.com> > Content-Type: text/plain; charset="us-ascii"; Format="flowed"; > DelSp="yes" > > > On 23-May-08, at 8:07 AM, Nishith Nand wrote: > > > I am a python beginner. I found the auto completion feature that > > IDEs like SPE provide, wherein when you type, for example, "gtk.", > > it shows you the list of available function calls in a dropdown > > box, pretty useful. Especially when the function description is > > also shown as a tooltip. So, I was looking for something like that > > in emacs. > > > > Anand Balachandran Pillai wrote: > > Isn't M-x dabbrev-expand good enough ? > > > I think he wants to have "Intellisense" as in visual studio/eclipse > etc., > I have not had much use for intellisense so far (python shell with > help, __doc__ and dir() have been sufficient). > my attempt at using rope emacs, pymacs has not worked. Will give it a > shot again. > > > But, to continue with Anand's suggestion, I found yasnippet http:// > code.google.com/p/yasnippet to be a great extension for textmate like > snippet features. > One types def and and the snippets expands to > def fn(): > ''' > ''' > with subsequent taking you to the right places. > > > > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mail.python.org/pipermail/bangpypers/attachments/20080523/1b6d47da/attachment-0001.htm > > > > ------------------------------ > > Message: 3 > Date: Fri, 23 May 2008 17:51:59 +0530 > From: Biju Chacko > Subject: Re: [BangPypers] Autocompletion in emacs > To: Bangalore Python Users Group - India > Message-ID: <4836B6E7.8070209 at nixcartel.org> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > Pradeep Gowda wrote: > > > > On 23-May-08, at 8:07 AM, Nishith Nand wrote: > > > >> I am a python beginner. I found the auto completion feature that IDEs > >> like SPE provide, wherein when you type, for example, "gtk.", it shows > >> you the list of available function calls in a dropdown box, pretty > >> useful. Especially when the function description is also shown as a > >> tooltip. So, I was looking for something like that in emacs. > >> > >> */Anand Balachandran Pillai >> >/* wrote: > >> > >> Isn't M-x dabbrev-expand good enough ? > >> > > I think he wants to have "Intellisense" as in visual studio/eclipse etc., > > I have not had much use for intellisense so far (python shell with help, > > __doc__ and dir() have been sufficient). > > my attempt at using rope emacs, pymacs has not worked. Will give it a > > shot again. > > Use Omnicomplete in vim -- works very well. > > -- b > > > ------------------------------ > > Message: 4 > Date: Fri, 23 May 2008 18:06:57 +0530 > From: "Rohan Sharma" > Subject: Re: [BangPypers] Autocompletion in emacs > To: "Bangalore Python Users Group - India" > Message-ID: > <7dd811cb0805230536p5cbdbe04i1ba9a69038e97d25 at mail.gmail.com> > Content-Type: text/plain; charset=ISO-8859-1 > > Biju: nice try, but that won't convert us. > > I've tried ropemacs, and M-/ does not seem to work for me while M-? > seems to work well. > > On 5/23/08, Biju Chacko wrote: > > Pradeep Gowda wrote: > > > > > > > > On 23-May-08, at 8:07 AM, Nishith Nand wrote: > > > > > > > > > > I am a python beginner. I found the auto completion feature that IDEs > > like SPE provide, wherein when you type, for example, "gtk.", it shows > you > > the list of available function calls in a dropdown box, pretty useful. > > Especially when the function description is also shown as a tooltip. So, > I > > was looking for something like that in emacs. > > > > > > > > */Anand Balachandran Pillai > >/* wrote: > > > > > > > > Isn't M-x dabbrev-expand good enough ? > > > > > > > > > > > I think he wants to have "Intellisense" as in visual studio/eclipse > etc., > > > I have not had much use for intellisense so far (python shell with > help, > > __doc__ and dir() have been sufficient). > > > my attempt at using rope emacs, pymacs has not worked. Will give it a > shot > > again. > > > > > > > Use Omnicomplete in vim -- works very well. > > > > -- b > > > > _______________________________________________ > > BangPypers mailing list > > BangPypers at python.org > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > ------------------------------ > > Message: 5 > Date: Fri, 23 May 2008 18:11:19 +0530 > From: "Anand Balachandran Pillai" > Subject: Re: [BangPypers] Autocompletion in emacs > To: "Bangalore Python Users Group - India" > Message-ID: > <8548c5f30805230541p48724a9ci3b8cc0c0d8939548 at mail.gmail.com> > Content-Type: text/plain; charset=UTF-8 > > On Fri, May 23, 2008 at 5:51 PM, Biju Chacko wrote: > > Pradeep Gowda wrote: > >> > >> On 23-May-08, at 8:07 AM, Nishith Nand wrote: > >> > >>> I am a python beginner. I found the auto completion feature that IDEs > >>> like SPE provide, wherein when you type, for example, "gtk.", it shows > you > >>> the list of available function calls in a dropdown box, pretty useful. > >>> Especially when the function description is also shown as a tooltip. > So, I > >>> was looking for something like that in emacs. > >>> > >>> */Anand Balachandran Pillai >>> >/* wrote: > >>> > >>> Isn't M-x dabbrev-expand good enough ? > >>> > >> I think he wants to have "Intellisense" as in visual studio/eclipse > etc., > >> I have not had much use for intellisense so far (python shell with help, > >> __doc__ and dir() have been sufficient). > >> my attempt at using rope emacs, pymacs has not worked. Will give it a > shot > >> again. > > Being a language with dynamic (duck) types, how much will intellisense > help ? Perhaps for a few basic types and names, which are inferrable > from a static context, like "gtk". > > I have never found intellisense a useful feature, because most of the time > I either know what I want or I prefer to do a "dir()" or "help()". > > > > Use Omnicomplete in vim -- works very well. > > Isn't the O.P talking about Emacs ? I think you might find CEDET useful. > I have never tried it except for the speedbar, which I found pretty useful, > sometime back, though I felt it was more of a distraction and turned it > off. > > http://cedet.sourceforge.net/intellisense.shtml > > > > -- b > > _______________________________________________ > > BangPypers mailing list > > BangPypers at python.org > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > > -- > -Anand > > > ------------------------------ > > Message: 6 > Date: Fri, 23 May 2008 20:10:22 -0700 > From: "Sridhar Ratnakumar" > Subject: Re: [BangPypers] Tray Popup > To: "Bangalore Python Users Group - India" > Message-ID: > <7c73a13a0805232010o36b6fb64p627496d31ebad223 at mail.gmail.com> > Content-Type: text/plain; charset=ISO-8859-1 > > On Wed, May 21, 2008 at 5:04 AM, soorjith p wrote: > > Hi,,, > > > > Anyone know how to create tray popup in pygtk? > > You mean system tray icon? - > > http://www.pygtk.org/docs/pygtk/class-gtkstatusicon.html > > > ------------------------------ > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > > > End of BangPypers Digest, Vol 9, Issue 23 > ***************************************** > -------------- next part -------------- An HTML attachment was scrubbed... URL: From vijay750 at gmail.com Mon May 26 16:04:46 2008 From: vijay750 at gmail.com (Vijay Ramachandran) Date: Mon, 26 May 2008 19:34:46 +0530 Subject: [BangPypers] [Job] Looking for web developer Message-ID: <5f4d8a540805260704w2ae7944fy1a9a50ae7817551a@mail.gmail.com> Hello. I am the founder of a web startup based in Bangalore. We're looking for a front end developer, with expertise in html, javascript, and css, and who has experience with python. Experience with pylons and MySQL is great plus. Please send your resume to jobs at wisdomtap.com. thanks! Vijay -------------- next part -------------- An HTML attachment was scrubbed... URL: From vishwanath.kamath at robosoftin.com Tue May 27 12:09:49 2008 From: vishwanath.kamath at robosoftin.com (Vishwanath Kamath Pethri) Date: Tue, 27 May 2008 15:39:49 +0530 Subject: [BangPypers] PyQT v4.4.2-1 Couldn't Generate Code Message-ID: <20080527103030.4768E1E4008@bag.python.org> Hi I have recently downloaded the "PyQt-Py2.5-gpl-4.4.2-1.exe" PyQT installer from the site. I am now facing issues as mentioned below: 1. Launch QtDesigner 2. Design a UI. Save it to a local disk. 3. Click on the "View Code" menu option. Error message, "Code Generation Failed" is displayed. Details of Error Message: Title: Code Generation Failed Message: "Unable to launch D:/PyQT/PyQt4/bin\uic" In the above mentioned message, last part "uic" is mentioned with a forward slash. Is it as expected? Else, How to overcome this? Regards Neo ----------------------------------------------- Robosoft Technologies - Come home to Technology Disclaimer: This email may contain confidential material. If you were not an intended recipient, please notify the sender and delete all copies. Emails to and from our network may be logged and monitored. This email and its attachments are scanned for virus by our scanners and are believed to be safe. However, no warranty is given that this email is free of malicious content or virus. -------------- next part -------------- An HTML attachment was scrubbed... URL: From kushaldas at gmail.com Tue May 27 12:52:20 2008 From: kushaldas at gmail.com (Kushal Das) Date: Tue, 27 May 2008 16:22:20 +0530 Subject: [BangPypers] PyQT v4.4.2-1 Couldn't Generate Code In-Reply-To: <20080527103030.4768E1E4008@bag.python.org> References: <20080527103030.4768E1E4008@bag.python.org> Message-ID: <200805271622.20743.kushaldas@gmail.com> On Tuesday 27 May 2008 03:39:49 pm Vishwanath Kamath Pethri wrote: > Hi > > > > I have recently downloaded the "PyQt-Py2.5-gpl-4.4.2-1.exe" PyQT installer > from the site. I am now facing issues as mentioned below: It is Qt not *QT* > > > 1. Launch QtDesigner > 2. Design a UI. Save it to a local disk. > 3. Click on the "View Code" menu option. I think that is for C++ Please pyuic4 to generate python code from ui files. Kushal -- Fedora Ambassador, India http://kushaldas.in http://dgplug.org (Linux User Group of Durgapur) From parth.technofreak at gmail.com Wed May 28 08:12:22 2008 From: parth.technofreak at gmail.com (Parthan SR) Date: Wed, 28 May 2008 11:42:22 +0530 Subject: [BangPypers] KDE 4.1 Videos Message-ID: <483CF7C6.7040608@gmail.com> Forwarded on a friend's request.. ------------------------------------------------------ Here are some nice videos [1] for KDE 4.1. Have a look, they look really awesome. [1] http://www.czessi.de/en/weblog/2008/05/movies-about-kde-4-1-alpha -- The KDE Project : http://www.kde.org KDE India : http://in.kde.org Mailing List : http://mail.kde.org/mailman/listinfo/kde-india --- With Regards, Parthan "technofreak" 2FF01026 http://blog.technofreak.in From supreet.sethi at gmail.com Wed May 28 08:38:25 2008 From: supreet.sethi at gmail.com (s|s) Date: Wed, 28 May 2008 12:08:25 +0530 Subject: [BangPypers] Tray Popup In-Reply-To: References: Message-ID: You can look at fbhog. Here http://code.google.com/p/fbhog/source/browse/trunk/trayicon.py regards s On Wed, May 21, 2008 at 5:34 PM, soorjith p wrote: > Hi,,, > > Anyone know how to create tray popup in pygtk? > > Pls let me know/ > > Regards > Soorjith P > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > > -- Supreet Sethi http://supreetsethi.net From ari.majumdar84 at gmail.com Wed May 28 09:46:43 2008 From: ari.majumdar84 at gmail.com (arindam majumdar) Date: Wed, 28 May 2008 13:16:43 +0530 Subject: [BangPypers] Running my first python script using mod_python Message-ID: <5d3edfaa0805280046j2ae2732au9387471e67c5a63@mail.gmail.com> Hi Guys, I am pretty new to python and was trying to execute my first python script which the same old hello world. I am running fedora core 8, apache 2.2.8 and python 3.1. MOD_PYTHON ERROR ProcessId: 9571 Interpreter: 'localhost.localdomain' ServerName: 'localhost.localdomain' DocumentRoot: '/var/www/html' URI: '/mptest.py' Location: None Directory: '/var/www/html/' Filename: '/var/www/html/mptest.py' PathInfo: '' Phase: 'PythonHandler' Handler: 'test' Traceback (most recent call last): File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line 1537, in HandlerDispatch default=default_handler, arg=req, silent=hlist.silent) File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line 1202, in _process_target module = import_module(module_name, path=path) File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line 296, in import_module log, import_path) File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line 680, in import_module execfile(file, module.__dict__) File "/var/www/html/test.py", line 3 def handler(req): ^ IndentationError: unexpected indent MODULE CACHE DETAILS Accessed: Wed May 28 12:13:56 2008 Generation: 0 _mp_a0c997aa0dc877af47e755b6b2a27f16 { FileName: '/var/www/html/test.py' Instance: 1 [IMPORT] Generation: 0 [ERROR] Modified: Wed May 28 11:58:12 2008 } Any help would be great. Cheers, Arindam MAjumdar -- I would have changed myself, but God didn't release the source code. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bharath.keshav at gmail.com Wed May 28 10:40:51 2008 From: bharath.keshav at gmail.com (Bharath Keshav) Date: Wed, 28 May 2008 14:10:51 +0530 Subject: [BangPypers] Running my first python script using mod_python In-Reply-To: <5d3edfaa0805280046j2ae2732au9387471e67c5a63@mail.gmail.com> References: <5d3edfaa0805280046j2ae2732au9387471e67c5a63@mail.gmail.com> Message-ID: Just delete the extra white space characters(if there is any) before def handler(request) in test.py and see. It is very much required to be careful about indentation in python. Also, your handler is being shown as "test". In apache htttpd.conf file try setting SetHandler as python-program and then set the python path as something like PYTHONPATH "['C:\\\\Python25\\\\Lib\\\\site-packages\\\\django\\\\bin'] + sys.path". Thanks and regards, Bharath Keshav. On Wed, May 28, 2008 at 1:16 PM, arindam majumdar wrote: > Hi Guys, > I am pretty new to python and was trying to execute my first python script > which the same old hello world. > I am running fedora core 8, apache 2.2.8 and python 3.1. > > MOD_PYTHON ERROR > > ProcessId: 9571 > > > > Interpreter: 'localhost.localdomain' > > ServerName: 'localhost.localdomain' > DocumentRoot: '/var/www/html' > > URI: '/mptest.py' > Location: None > > Directory: '/var/www/html/' > > > Filename: '/var/www/html/mptest.py' > PathInfo: '' > > Phase: 'PythonHandler' > Handler: 'test' > > Traceback (most recent call last): > > > File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line 1537, in HandlerDispatch > > > default=default_handler, arg=req, silent=hlist.silent) > > File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line 1202, in _process_target > > module = import_module(module_name, path=path) > > > > File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line 296, in import_module > log, import_path) > > File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line 680, in import_module > > > > execfile(file, module.__dict__) > > File "/var/www/html/test.py", line 3 > > def handler(req): > > ^ > > IndentationError: unexpected indent > > > MODULE CACHE DETAILS > > > Accessed: Wed May 28 12:13:56 2008 > > > Generation: 0 > > _mp_a0c997aa0dc877af47e755b6b2a27f16 { > FileName: '/var/www/html/test.py' > Instance: 1 [IMPORT] > Generation: 0 [ERROR] > > Modified: Wed May 28 11:58:12 2008 > > > } > > Any help would be great. > > Cheers, > Arindam MAjumdar > > -- > I would have changed myself, but God didn't release the source code. > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From parth.technofreak at gmail.com Wed May 28 10:41:47 2008 From: parth.technofreak at gmail.com (Parthan SR) Date: Wed, 28 May 2008 14:11:47 +0530 Subject: [BangPypers] Running my first python script using mod_python In-Reply-To: <5d3edfaa0805280046j2ae2732au9387471e67c5a63@mail.gmail.com> References: <5d3edfaa0805280046j2ae2732au9387471e67c5a63@mail.gmail.com> Message-ID: <483D1ACB.9030802@gmail.com> arindam majumdar wrote: > File "/var/www/html/test.py", line 3 > > def handler(req): > > ^ > > IndentationError: unexpected indent > > > The indentation is not proper. Can you paste your script in some pastebin and give the link in your reply? -- --- With Regards, Parthan "technofreak" 2FF01026 http://blog.technofreak.in From jace at pobox.com Wed May 28 17:14:28 2008 From: jace at pobox.com (Kiran Jonnalagadda) Date: Wed, 28 May 2008 20:44:28 +0530 Subject: [BangPypers] Adding MS SQL support to Web.py 0.23 Message-ID: <26A61725-45B4-4100-9042-DA66CDB6316A@pobox.com> Greetings, Pythonistas, I recently needed to use Web.py with MS SQL on a Windows server. Web.py doesn't support SQL Server, but it's a trivial patch using the excellent module from pymssql.sf.net. Anand, I've also reported this as a bug+patch at Launchpad. Hope it can be incorporated. === modified file 'web/db.py' --- web/db.py 2008-01-03 17:36:15 +0000 +++ web/db.py 2008-05-19 08:10:14 +0000 @@ -304,6 +304,14 @@ keywords['database'] = keywords['db'] del keywords['db'] + elif dbn == "mssql": + import pymssql as db + if 'pw' in keywords: + keywords['password'] = keywords['pw'] + del keywords['pw'] + keywords['database'] = keywords['db'] + del keywords['db'] + else: raise UnknownDB, dbn -- Kiran Jonnalagadda http://jace.seacrow.com/ http://jace.livejournal.com/ From gates.plusplus at gmail.com Wed May 28 19:36:30 2008 From: gates.plusplus at gmail.com (Rohan Sharma) Date: Wed, 28 May 2008 23:06:30 +0530 Subject: [BangPypers] KDE 4.1 Videos In-Reply-To: <483CF7C6.7040608@gmail.com> References: <483CF7C6.7040608@gmail.com> Message-ID: <7dd811cb0805281036l6cc5a59aqb9c145dba651916e@mail.gmail.com> On 5/28/08, Parthan SR wrote: > Forwarded on a friend's request.. > ------------------------------------------------------ > > > Here are some nice videos [1] for KDE 4.1. Have a look, they > look really awesome. > > [1] > http://www.czessi.de/en/weblog/2008/05/movies-about-kde-4-1-alpha > > -- The KDE Project : http://www.kde.org > KDE India : http://in.kde.org > Mailing List : > http://mail.kde.org/mailman/listinfo/kde-india > > --- > With Regards, > > Parthan "technofreak" > 2FF01026 > http://blog.technofreak.in > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > No more desktop icons: http://aseigo.blogspot.com/2008/05/no-more-desktop-icons-in-41.html From abpillai at gmail.com Thu May 29 09:59:09 2008 From: abpillai at gmail.com (Anand Balachandran Pillai) Date: Thu, 29 May 2008 13:29:09 +0530 Subject: [BangPypers] Web.py tutorial Message-ID: <8548c5f30805290059y233c9b90m1ae35f2edd68b18f@mail.gmail.com> Hi, Can someone point me to old web.py (0.1 version) tutorials ? My requirement is to learn enough to construct forms from templates and to write a cgi script using web.py which will take data from the form and generate an XML file. I don't want a link to current web.py tutorial (I know where it is) since web.py version 0.2 is not a single module anymore. Thanks -- -Anand From ari.majumdar84 at gmail.com Thu May 29 14:58:22 2008 From: ari.majumdar84 at gmail.com (arindam majumdar) Date: Thu, 29 May 2008 18:28:22 +0530 Subject: [BangPypers] My first Python script Message-ID: <5d3edfaa0805290558n7a37053at877d8dff05eec30@mail.gmail.com> Hi All, I am pretty new to python and i am having a small problem, this might be a liitle too small for you guys but still i hope u can understand that as a novice i cannot debug much, so your help is required. I am trying to run a script called mptest.py from my browser mozilla firefox 2, the operating system that i am using is fedora 8.The version of apache is 2.2.8 ,version of python is 3.1 and the version of mod_python is 3.3.1-5. I am sending you the httpd.conf file which i am using and the modules which are their in my apache webserver, i will also send you the error page and the log file which is being displayed at the browser. Take a look at the above and give a solution. P.S The project is in a very critical stage. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: httpd.conf Type: application/octet-stream Size: 33820 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: error_log Type: application/octet-stream Size: 30907 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: access_log Type: application/octet-stream Size: 3386 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: mptest.py Type: text/x-python Size: 151 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: error_page_at_browser.doc Type: application/msword Size: 108544 bytes Desc: not available URL: From anandology at gmail.com Sat May 31 06:08:27 2008 From: anandology at gmail.com (Anand Chitipothu) Date: Sat, 31 May 2008 09:38:27 +0530 Subject: [BangPypers] Web.py tutorial In-Reply-To: <8548c5f30805290059y233c9b90m1ae35f2edd68b18f@mail.gmail.com> References: <8548c5f30805290059y233c9b90m1ae35f2edd68b18f@mail.gmail.com> Message-ID: <41139fcb0805302108u389028c3nf053c3f7816edf1a@mail.gmail.com> On 5/29/08, Anand Balachandran Pillai wrote: > Hi, > > Can someone point me to old web.py (0.1 version) tutorials ? > My requirement is to learn enough to construct forms from > templates and to write a cgi script using web.py which will > take data from the form and generate an XML file. Looks like it is lost. I found it from the wayback machine. http://web.archive.org/web/20060703191823/webpy.org/tutorial > I don't want a link to current web.py tutorial (I know where it is) > since web.py version 0.2 is not a single module anymore. Though it is split into multiple files, it is self-contained. You can package it along with your application.