Re: How to open and read an unknown extension file

2010-04-09 Thread varnikat t
And I am using python and GLADE for GUI On Fri, Apr 9, 2010 at 6:30 PM, varnikat t wrote: > Hey thanks a lot to all of youNow i understood the concept and can use > it the right way > > I have another doubt regarding using radio buttons > > I am using two radio buttons for user to se

Re: How to open and read an unknown extension file

2010-04-09 Thread varnikat t
Hey thanks a lot to all of youNow i understood the concept and can use it the right way I have another doubt regarding using radio buttons I am using two radio buttons for user to select either of the two options: Landscape Portrait When i run the program it shows both radio buttons

Re: How to open and read an unknown extension file

2010-04-08 Thread Tim Chase
On 04/08/2010 12:22 PM, varnikat t wrote: it gives me this error TypeError: coercing to Unicode: need string or buffer, list found Thanks for the help.it detects now using glob.glob("*.*.txt") Can u suggest how to open and read file this way? *if glob.glob("*.*.txt"): file=open(gl

Re: How to open and read an unknown extension file

2010-04-08 Thread Kushal Kumaran
On Thu, Apr 8, 2010 at 10:39 PM, varnikat t wrote: > Hey, > Thanks for the help.it detects now using glob.glob("*.*.txt") > Can u suggest how to open and read file this way? > > if glob.glob("*.*.txt"): >             file=open(glob.glob("*.*.txt")) >             self.text_view.get_buffer().set_tex

Re: How to open and read an unknown extension file

2010-04-08 Thread varnikat t
it gives me this error TypeError: coercing to Unicode: need string or buffer, list found On Thu, Apr 8, 2010 at 10:48 PM, varnikat t wrote: > > > > > Hey, > Thanks for the help.it detects now using glob.glob("*.*.txt") > Can u suggest how to open and read file this way? > > *if glob.glob("*.*.

How to open and read an unknown extension file

2010-04-08 Thread varnikat t
Hey, Thanks for the help.it detects now using glob.glob("*.*.txt") Can u suggest how to open and read file this way? *if glob.glob("*.*.txt"): file=open(glob.glob("*.*.txt")) self.text_view.get_buffer().set_text(file.read()) else: file=open(glob.glob("*

Re: How to open and read an unknown extension file

2010-04-08 Thread Steven Howe
On 04/08/2010 08:57 AM, Chris Colbert wrote: On Thu, Apr 8, 2010 at 11:42 AM, Kushal Kumaran wrote: On Thu, Apr 8, 2010 at 9:00 PM, varnikat t wrote: I am trying to do this if os.path.exists("*.*.txt"): file=open("*.*.txt") self.text_view.get_buffer().set_

Re: How to open and read an unknown extension file

2010-04-08 Thread Chris Colbert
On Thu, Apr 8, 2010 at 11:42 AM, Kushal Kumaran wrote: > On Thu, Apr 8, 2010 at 9:00 PM, varnikat t wrote: >> I am trying to do this >> if os.path.exists("*.*.txt"): >>             file=open("*.*.txt") >>             self.text_view.get_buffer().set_text(file.read()) >> else: >>             file=o

Re: How to open and read an unknown extension file

2010-04-08 Thread Kushal Kumaran
On Thu, Apr 8, 2010 at 9:00 PM, varnikat t wrote: > I am trying to do this > if os.path.exists("*.*.txt"): >             file=open("*.*.txt") >             self.text_view.get_buffer().set_text(file.read()) > else: >             file=open("*.*.html") >             self.text_view.get_buffer().set_te

How to open and read an unknown extension file

2010-04-08 Thread varnikat t
I am trying to do this if os.path.exists("*.*.txt"): file=open("*.*.txt") self.text_view.get_buffer().set_text(file.read()) else: file=open("*.*.html") self.text_view.get_buffer().set_text(file.read()) It gives error *.*.txt not existingThere are