Re: Convert tuples into string

2012-11-25 Thread Tim Chase
On 11/25/12 20:24, Smaran Harihar wrote: > I was able to solve it using the following loop, > > conn=psycopg2.connect(connstr) > cursor=conn.cursor() > cursor.execute("SELECT tablename FROM pg_tables where tablename like '%"+ > inp +"%'") > records = cursor.fetchall() > str="" > for rec in record

Re: Convert tuples into string

2012-11-25 Thread Smaran Harihar
I was able to solve it using the following loop, conn=psycopg2.connect(connstr) cursor=conn.cursor() cursor.execute("SELECT tablename FROM pg_tables where tablename like '%"+ inp +"%'") records = cursor.fetchall() str="" for rec in records: if str == "": str="".join(rec) else: m="".join(rec) st

Re: Convert tuples into string

2012-11-25 Thread Cameron Simpson
On 25Nov2012 19:09, Smaran Harihar wrote: | I am connecting to postgres database and fetching the table names but it | seems that they are being returned in | | How can I convert them to string? Please show: - the code fetching the names; we do not know what library you are using or how

Convert tuples into string

2012-11-25 Thread Smaran Harihar
Hi Guys, I am connecting to postgres database and fetching the table names but it seems that they are being returned in How can I convert them to string? -- Thanks & Regards Smaran Harihar -- http://mail.python.org/mailman/listinfo/python-list

Re: Re: How to get a "screen" length of a multibyte string?

2012-11-25 Thread Evan Driscoll
On 11/25/2012 07:48 AM, kobayashi wrote: Encoding is utf-8. I use "screen length" means as that; that of ascii character is 1, and that of character having double width than ascii character is 2. It's not bytes, but drawing width. As you say, it depends font. I'll be considering carefully. Do

Re: only .exe

2012-11-25 Thread Steven D'Aprano
On Sun, 25 Nov 2012 14:09:49 -0800, bakie wrote: > how to make to complie my python code ? python -m compileall filename.py If this does not answer your question, please explain your question more carefully. We are not mind-readers, we cannot tell what you are thinking, only what you post.

Re: How to pass class instance to a method?

2012-11-25 Thread Gregory Ewing
ALeX inSide wrote: I suppose there shall be some kind of method decorator to treat an argument as an > instance of class? You can do this: xxx = MyClass.some_method and then i = MyClass() xxx(i, foo, bar) Does that help? -- Greg -- http://mail.python.org/mailman/listinfo/python-li

Re: only .exe

2012-11-25 Thread bakie
ha !!! Is it not complie ? plz see bro / woman http://effbot.org/zone/python-compile.htm how to make only excutable file for python code ? -- http://mail.python.org/mailman/listinfo/python-list

Re: only .exe

2012-11-25 Thread bakie
how to make to complie my python code ? -- http://mail.python.org/mailman/listinfo/python-list

Direct Client is looking for two C/C++ Developer in Germantown MD for longterm contract.

2012-11-25 Thread sush@AjelTechnologies
Dear Partner, Hope you are doing well. I am a Resource Specialist working for a rapidly growing IT Services company 'Ajel Technologies'. We have a current opportunity which might be interest for you or your consultant. We are looking for a candidate with 7 plus years of experience in C / C++ as a

Re: How to get a "screen" length of a multibyte string?

2012-11-25 Thread Serhiy Storchaka
On 25.11.12 12:19, kobayashi wrote: Under platform that has fixed pitch font, I want to get a "screen" length of a multibyte string --- sample --- s1 = u"abcdef" s2 = u"あいう" # It has same "screen" length as s1's. print len(s1) # Got 6 print len(s2) # Got 3, but I want get 6. -- Ab

Re: Migrate from Access 2010 / VBA

2012-11-25 Thread Wolfgang Keller
> I am the lone developer of db apps at a company of 350+ employees. > Everything is done in MS Access 2010 and VBA. I'm frustrated with the > limitations of this platform and have been considering switching to > Python. > > I've been experimenting with the language for a year or so, > and feel com

ANN: unicode 0.9.7

2012-11-25 Thread garabik-news-2005-05
unicode is a simple python command line utility that displays properties for a given unicode character, or searches unicode database for a given name. It was written with Linux in mind, but should work almost everywhere (including MS Windows and MacOSX), UTF-8 console is recommended. ˙pɹɐpu

Re: How to get a "screen" length of a multibyte string?

2012-11-25 Thread kobayashi
I'm greateful for more detailed information and better code. I learned a lot and I use it. Thanks, -- http://mail.python.org/mailman/listinfo/python-list

Re: How to get a "screen" length of a multibyte string?

2012-11-25 Thread kobayashi
Great, It's a just good solution. I use it. Thanks, -- http://mail.python.org/mailman/listinfo/python-list

Re: How to get a "screen" length of a multibyte string?

2012-11-25 Thread kobayashi
Encoding is utf-8. I use "screen length" means as that; that of ascii character is 1, and that of character having double width than ascii character is 2. It's not bytes, but drawing width. As you say, it depends font. I'll be considering carefully. -- http://mail.python.org/mailman/listinfo/pyth

Re: 10 sec poll - please reply!

2012-11-25 Thread Michael Herrmann
On Sunday, November 25, 2012 4:56:49 AM UTC+1, Steven D'Aprano wrote: > Michael, please trim your replies. There is no need to quote nearly 200 > lines of previous emails that you don't make direct reference to in your > response. We prefer inline quoting here (where you interleave quoted text >

Re: 10 sec poll - please reply!

2012-11-25 Thread Michael Herrmann
On Sunday, November 25, 2012 12:23:13 AM UTC+1, Dennis Lee Bieber wrote: > ... > Pardon? In ASCII (and encodings that share the first 128 positions), > > a TAB is x09. > > > > >>> def show(c): > > ... print "%r is 0x%2.2X" % (c, ord(c)) > > ... > > >>> show(raw_input()[0]) > > i >

Re: How to get a "screen" length of a multibyte string?

2012-11-25 Thread Steven D'Aprano
On Sun, 25 Nov 2012 22:12:33 +1100, Chris Angelico wrote: > On Sun, Nov 25, 2012 at 9:19 PM, kobayashi wrote: >> Hello, >> >> Under platform that has fixed pitch font, I want to get a "screen" >> length of a multibyte string >> >> --- sample --- >> s1 = u"abcdef" >> s2 = u"あいう" # It has same "scr

Re: How to pass class instance to a method?

2012-11-25 Thread Steven D'Aprano
On Sun, 25 Nov 2012 04:11:29 -0800, ALeX inSide wrote: > How to "statically type" an instance of class that I pass to a method of > other instance? Please explain what you mean by this. What do you think "statically type" means? > I suppose there shall be some kind of method decorator to treat

How to pass class instance to a method?

2012-11-25 Thread ALeX inSide
How to "statically type" an instance of class that I pass to a method of other instance? I suppose there shall be some kind of method decorator to treat an argument as an instance of class? Generally it is needed so IDE (PyCharm) can auto-complete instance's methods and properties. Pseudo-pyt

Re: 10 sec poll - please reply!

2012-11-25 Thread ALeX inSide
press_keys() On Tuesday, November 20, 2012 2:18:38 PM UTC+2, Michael Herrmann wrote: > Hi, > > > > I'm developing a GUI Automation library (http://www.getautoma.com) and am > having difficulty picking a name for the function that simulates key strokes. > I currently have it as 'type' but tha

Re: How to get a "screen" length of a multibyte string?

2012-11-25 Thread Hans Mulder
On 25/11/12 11:19:18, kobayashi wrote: > Hello, > > Under platform that has fixed pitch font, > I want to get a "screen" length of a multibyte string > > --- sample --- > s1 = u"abcdef" > s2 = u"あいう" # It has same "screen" length as s1's. > print len(s1) # Got 6 > print len(s2) # Got 3, but I w

Re: How to get a "screen" length of a multibyte string?

2012-11-25 Thread Chris Angelico
On Sun, Nov 25, 2012 at 9:19 PM, kobayashi wrote: > Hello, > > Under platform that has fixed pitch font, > I want to get a "screen" length of a multibyte string > > --- sample --- > s1 = u"abcdef" > s2 = u"あいう" # It has same "screen" length as s1's. > print len(s1) # Got 6 > print len(s2) # Got

How to get a "screen" length of a multibyte string?

2012-11-25 Thread kobayashi
Hello, Under platform that has fixed pitch font, I want to get a "screen" length of a multibyte string --- sample --- s1 = u"abcdef" s2 = u"あいう" # It has same "screen" length as s1's. print len(s1) # Got 6 print len(s2) # Got 3, but I want get 6. -- Abobe can get a "character" leng