[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

How to close a DB connection in postgres-pr?

Alexey Verkhovsky

1/6/2005 12:05:00 AM

Probably I am asking a silly question here... but maybe not too silly.

How do I close a connection created by postgres-pr? There seems to be no
"close" method anywhere in sight.

Shouldn't there be something like

class Connection
def close()
@conn.shutdown
end
end

class PGConn
def close()
@conn.close
end
end

???

Best regards,
Alexey Verkhovsky


4 Answers

Michael Neumann

1/6/2005 12:23:00 PM

0

Alexey Verkhovsky wrote:
> Probably I am asking a silly question here... but maybe not too silly.
>
> How do I close a connection created by postgres-pr? There seems to be no
> "close" method anywhere in sight.

Good question. Thanks! It's implemented in 0.3.3.

Regards,

Michael


rantingrick

12/30/2010 1:04:00 AM

0

On Dec 29, 6:41 pm, Gerry Reno <gr...@verizon.net> wrote:
> wxPython looks good but I don't see anyone developing support for things
> like smartphones.

No wx is not the answer to our problems

> Also, what do you think about frameworks such as pyjamas?  It lets you
> write in python and compiles everything down to Javascript so it can be
> used across the Web as well as on the desktop.

Hmm, this is like two double edged swords smashing one another in
battle.

Sword One: On one hand web frameworks are going to be really big soon
-- however legacy GUI's are not going away any time soon!

Sword Two: On the other hand web frameworks provide awesome cross
platform ability that is surly only going to get better as time goes
-- however i utterly hate JavaScript (although much worse web
languages exist!). And sending requests back and forth between Python,
JavaScript, and BrowserX is also a real PITA. Because even though
everyone knows this is coming all the major browsers are trying to
insert their API into the mix. So that Joe Scripter has to write code
that is compatible between many browsers. Until the world agrees on a
unified API --AND IMPLEMENTS IT SERIOUSLY-- we are at the mercy of
drunken sailors at the helm.

I believe pyjamas has a bright future in the web playground, however
we still need to focus our community efforts towards a Python based
GUI. I can see a pythonGUI and pyjamas existing side by side in mutual
harmony for many years.

Arndt Roger Schneider

12/30/2010 11:55:00 PM

0

rantingrick schrieb:
> On Dec 29, 6:41 pm, Gerry Reno <gr...@verizon.net> wrote:
>
>>wxPython looks good but I don't see anyone developing support for things
>>like smartphones.
>
>
> No wx is not the answer to our problems
>

Rather: ... to *your* problem...

>
>>Also, what do you think about frameworks such as pyjamas? It lets you
>>write in python and compiles everything down to Javascript so it can be
>>used across the Web as well as on the desktop.
>
>
> Hmm, this is like two double edged swords smashing one another in
> battle.
>
> Sword One: On one hand web frameworks are going to be really big soon
> -- however legacy GUI's are not going away any time soon!

There are enough out there in the wild,
they will last quite for awhile indeed;
but it's time for them to die.

>
> Sword Two: On the other hand web frameworks provide awesome cross
> platform ability that is surly only going to get better as time goes
> -- however i utterly hate JavaScript (although much worse web
> languages exist!). And sending requests back and forth between Python,
> JavaScript,

Apparently the authors do know that, too:
MessageID:<mailman.1298.1290672551.2218.python-list@python.org>,
*sigh* no svg.

BTW: Look in comp.lang.javascript:
javascript is framework/toolkit resistent.

and BrowserX is also a real PITA. Because even though
> everyone knows this is coming all the major browsers are trying to
> insert their API into the mix. So that Joe Scripter has to write code
> that is compatible between many browsers. Until the world agrees on a
> unified API --AND IMPLEMENTS IT SERIOUSLY-- we are at the mercy of
> drunken sailors at the helm.

svg: opera, chrome, safari(including ios), ie9, firefox.
Although svg is missing under webkit/android
--Apple kept the hardware accelerated part to themeselves.
Goolge is currently implementing hardware acceleration for svg in
chrome/webkit, likewise Microsoft/ie.
Lets wait and see when svg becomes available in android, too.

Although smil is quiet another subject.

>
> I believe pyjamas has a bright future in the web playground, however
> we still need to focus our community efforts towards a Python based
> GUI. I can see a pythonGUI and pyjamas existing side by side in mutual
> harmony for many years.
>

pyjamas: Perhaps without javascript.

-roger

rantingrick

12/31/2010 3:07:00 AM

0

On Dec 30, 7:54 pm, Katie T <ka...@coderstack.co.uk> wrote:

> It's very hard to write a good gui framework, very very few people
> have managed to do it well.

This is a very good point Katie. Creating a Python GUI is a huge
undertaking and it will take much time to work out the bugs. A truly
Pythonic GUI may be (i must admit) a pipe dream at this time. However
i know that unless we start thinking about something new right now, it
will be two, three, ten years down the road and we will be in the same
situation.

A lot of folks are probably thinking that since Python3000 is here
that Python is up to current technology but i must differ with that
opinion. Yes Python3 is much better than the 2.x line however Tkinter
and IDLE are so dated and antique that Py3000 is a bit lackluster.

Look, when Guido breathed life into Tkinter many years ago he did so
with good intentions. I believe at that time (and for a while after)
Tkinter was an asset to this community. However, now Tkinter just
looks old and dumpy.

Actually i would't mind keeping Tkinter and just tweaking it a bit but
that is impossible! There will always be a glass ceiling between us
and Tcl. We are confined from the Tcl folks and there is nothing we
can do about. Tkinter has had a decade to become more relevant in the
21st century however the Tcl folks have failed to deliver. We cannot
keep depending on outsiders, we must start the transition to something
better.


> There's not the expertise or the investment in the Python community to
> build a strong Python GUI solution. From an educational viewpoint I
> see that there could be value in having a pure Python solution, but in
> terms of having a GUI solution that people will actually want to use
> in their apps, I'm dubious that it's achievable.


Also a good point Katie. But i think i have just a little more
optimism than you :).

I will conceded that if we cannot build a truly Pythonic GUI then we
must at least pick a GUI that is up to date with Python3000. A good
choice might be a limited version of wxPython in the stdlib and a 3rd
party extension module available for download. We can use Tkinter as
the template. All you need in the stdlib are the same widgets that are
in Tkinter now. However unlike Tkinter, now a rich 3rd party module
will be available. By doing this we will have removed the glass
ceiling, and we did not have to re-invent the wheel to do it.

What is your opinion (or anyone) on wxPython?