Can not get the result of query in pymssql module of python...

2012-02-08 Thread amarjeet yadav
Hi All, This is my first post to any mailing group. I am QA engg and using python for testing automation. I need to connect with Mysql (2008) and mssql databases for executing some queries. I have installed following modules & softwares in python 2.7 : python 2.7.2 setuptools MySQLdb M

Re: Re: frozendict

2012-02-08 Thread Evan Driscoll
On 13:59, Ian Kelly wrote: > > Define "doesn't suck". If I were to hack one up, it would look > something like this: > > > from collections import Mapping, Hashable So part of my objection was that I wanted to make sure I got all of the expected functionality, and that takes a bunch of functions.

Re: Re: frozendict

2012-02-08 Thread Evan Driscoll
On 13:59, Nathan Rice wrote: >> Turn the question around: why should there be? >> Python is intentionally parsimonious in adding builtins. > > For the same reason there are frozensets? > > I put dicts in sets all the time. I just tuple the items, but that > means you have to re-dict it on the wa

Re: standalone python web server

2012-02-08 Thread anon hung
>> I am building a small intranet website and I would like to use Python. I >> was wondering if there was a easy and medium performance python based web >> server available. I would like to run it on port :8080 since I wont have >> root access also I prefer something easy to deploy meaning I would

Fwd: turbogears 1

2012-02-08 Thread anon hung
>>> Hey guys, someone asked me to maintain his old website, trouble is, >>> it's in python, more trouble is it's in turbogears 1. I'm not fluent in >>> python but all right, I can learn, but this turbogears thing.. >>> >>> First of all, is it still alive? Looks like turbogears 2 is the most

Re: turbogears 1

2012-02-08 Thread anon hung
>>> Hey guys, someone asked me to maintain his old website, trouble is, >>> it's in python, more trouble is it's in turbogears 1. I'm not fluent in >>> python but all right, I can learn, but this turbogears thing.. >>> >>> First of all, is it still alive? Looks like turbogears 2 is the most

Re: turbogears 1

2012-02-08 Thread anon hung
>> Hey guys, someone asked me to maintain his old website, trouble is, >> it's in python, more trouble is it's in turbogears 1. I'm not fluent >> in python but all right, I can learn, but this turbogears >> thing.. >> >> First of all, is it still alive? Looks like turbogears 2 is the most >

Re: Komodo 7 release (Python development tools)

2012-02-08 Thread anon hung
>> My name is Todd. I'm the lead developer for Komodo IDE (Interactive >> Development Environment) and Komodo Edit (a free, open-source editor) at >> ActiveState. I wanted to announce that the newest version, Komodo 7, has >> been released: > > This is a pretty good release announcement, but a few

Re: standalone python web server

2012-02-08 Thread Roy Smith
In article , Rodrick Brown wrote: > On Feb 8, 2012, at 11:01 PM, Rita wrote: > > > I am building a small intranet website and I would like to use Python. I > > was wondering if there was a easy and medium performance python based web > > server available. I would like to run it on port :8080

Re: Cycle around a sequence

2012-02-08 Thread Chris Angelico
On Thu, Feb 9, 2012 at 2:55 PM, Steven D'Aprano wrote: > If your data is humongous but only available lazily, buy more memory :) Or if you have a huge iterable and only need a small index into it, snag those first few entries into a list, then yield everything else, then yield the saved ones: de

Re: standalone python web server

2012-02-08 Thread Rodrick Brown
On Feb 8, 2012, at 11:01 PM, Rita wrote: > I am building a small intranet website and I would like to use Python. I was > wondering if there was a easy and medium performance python based web server > available. I would like to run it on port :8080 since I wont have root access > also I prefer

Re: Id of methods

2012-02-08 Thread Terry Reedy
On 2/8/2012 10:48 PM, Emeka wrote: class Boo(object): def __init__(self , moon, sun): self.moon = moon self.sun = sun def daf(self): return self.sun + self.moon def ball(self): return self.sun * self.moon print Boo.__dict__ {'__module__': '__main__',

Re: Id of methods

2012-02-08 Thread Chris Angelico
On Thu, Feb 9, 2012 at 2:48 PM, Emeka wrote: > I am trying to see if I could get more of Python without being insane. Oh, I thought insanity was a prerequisite... anyway. > print Boo.__dict__ > > {'__module__': '__main__', 'ball': , 'daf': > , '__dict__ ..} > > print  hex(id(Boo.daf)) > 0x27

standalone python web server

2012-02-08 Thread Rita
I am building a small intranet website and I would like to use Python. I was wondering if there was a easy and medium performance python based web server available. I would like to run it on port :8080 since I wont have root access also I prefer something easy to deploy meaning I would like to move

Re: Cycle around a sequence

2012-02-08 Thread Steven D'Aprano
On Wed, 08 Feb 2012 01:10:28 +, Mark Lawrence wrote: > I'm looking at a way of cycling around a sequence i.e. starting at some > given location in the middle of a sequence and running to the end before > coming back to the beginning and running to the start place. If you have a sequence, and

Id of methods

2012-02-08 Thread Emeka
Hell All, I am trying to see if I could get more of Python without being insane. class Boo(object): def __init__(self , moon, sun): self.moon = moon self.sun = sun def daf(self): return self.sun + self.moon def ball(self): return self.sun * self.moon print B

Re: frozendict

2012-02-08 Thread Nathan Rice
> Turn the question around: why should there be? > Python is intentionally parsimonious in adding builtins. For the same reason there are frozensets? I put dicts in sets all the time. I just tuple the items, but that means you have to re-dict it on the way out to do anything useful with it. I a

Re: when to use import statements in the header, when to use import statements in the blocks where they are used?

2012-02-08 Thread Steven D'Aprano
On Tue, 07 Feb 2012 21:41:49 -0500, Dave Angel wrote: > On 02/07/2012 09:32 PM, Patto wrote: >> However I find in the file path/to/djcelery/loaders.py from >> django-celery source, there are so many import/from statements used >> inside functions, I do not know why the author coded like this. Are

Re: frozendict

2012-02-08 Thread Ian Kelly
On Wed, Feb 8, 2012 at 6:23 PM, Evan Driscoll wrote: > Hi all, > > I've been trying for a few days (only a little bit at a time) to come up > with a way of implementing a frozendict that doesn't suck. I'm gradually > converging to a solution, but I can't help but think that there's some > subtlety

Re: frozendict

2012-02-08 Thread Terry Reedy
On 2/8/2012 8:23 PM, Evan Driscoll wrote: Hi all, I've been trying for a few days (only a little bit at a time) to come up with a way of implementing a frozendict that doesn't suck. I'm gradually converging to a solution, but I can't help but think that there's some subtlety that I'm probably mi

Re: frozendict

2012-02-08 Thread Steven D'Aprano
On Wed, 08 Feb 2012 19:23:19 -0600, Evan Driscoll wrote: > Hi all, > > I've been trying for a few days (only a little bit at a time) to come up > with a way of implementing a frozendict that doesn't suck. I'm gradually > converging to a solution, but I can't help but think that there's some > sub

frozendict

2012-02-08 Thread Evan Driscoll
Hi all, I've been trying for a few days (only a little bit at a time) to come up with a way of implementing a frozendict that doesn't suck. I'm gradually converging to a solution, but I can't help but think that there's some subtlety that I'm probably missing which is why it's not already provided

How to make PyDev pep8 friendly?

2012-02-08 Thread Ali Zandi
Hi, I was trying to find a way to configure PyDev e.g. in Eclipse to be pep8 friendly. There are a few configurations like right trim lines, use space after commas, use space before and after operators, add new line at the end of file which can be configured via Eclipse -> Window -> Preferences -

Re: Cycle around a sequence

2012-02-08 Thread Mark Lawrence
On 08/02/2012 14:25, Neil Cerutti wrote: On 2012-02-08, Mark Lawrence wrote: I'm looking at a way of cycling around a sequence i.e. starting at some given location in the middle of a sequence and running to the end before coming back to the beginning and running to the start place. About the b

Re: Komodo 7 release (Python development tools)

2012-02-08 Thread Terry Reedy
On 2/8/2012 3:14 PM, Todd Whiteman wrote: My name is Todd. I'm the lead developer for Komodo IDE (Interactive Development Environment) and Komodo Edit (a free, open-source editor) at ActiveState. I wanted to announce that the newest version, Komodo 7, has been released: This is a pretty good r

Re: changing sys.path

2012-02-08 Thread John Nagle
On 2/1/2012 8:15 AM, Andrea Crotti wrote: So suppose I want to modify the sys.path on the fly before running some code which imports from one of the modules added. at run time I do sys.path.extend(paths_to_add) but it still doesn't work and I get an import error. Do import sys fi

Komodo 7 release (Python development tools)

2012-02-08 Thread Todd Whiteman
Hello, My name is Todd. I'm the lead developer for Komodo IDE (Interactive Development Environment) and Komodo Edit (a free, open-source editor) at ActiveState. I wanted to announce that the newest version, Komodo 7, has been released: http://www.activestate.com/komodo-ide Python has lo

Re: Cycle around a sequence

2012-02-08 Thread Terry Reedy
On 2/8/2012 9:25 AM, Neil Cerutti wrote: On 2012-02-08, Mark Lawrence wrote: I'm looking at a way of cycling around a sequence i.e. starting at some given location in the middle of a sequence and running to the end before coming back to the beginning and running to the start place. About the b

Re: MySQLdb not allowing hyphen

2012-02-08 Thread John Nagle
On 2/5/2012 2:46 PM, Chris Rebert wrote: On Sun, Feb 5, 2012 at 2:41 PM, Emeka wrote: Hello All, I noticed that MySQLdb not allowing hyphen may be way to prevent injection attack. I have something like below: "insert into reviews(message, title)values('%s', '%s')" %( "We don't know where to

Re: Naming convention for in-house modules (Newbie question)

2012-02-08 Thread Chris Rebert
On Wed, Feb 8, 2012 at 9:15 AM, HoneyMonster wrote: > I am quite new to Python (2.7 on Linux), and have built a few modules > using wxPython/wxGlade for GUI elements and Psycopg2 for database access. > I adhere mostly to the PEP8 guidelines, and use Pylint to help with > quality control. > > So fa

Re: Looking for PyPi 2.0...

2012-02-08 Thread Chris Rebert
On Wed, Feb 8, 2012 at 8:54 AM, Nathan Rice wrote: > As a user: > * Finding the right module in PyPi is a pain because there is limited, > low quality semantic information, and there is no code indexing. > * I have to install the module to examine it;  I don't need to look at > docs all the time,

Re: Looking for PyPi 2.0...

2012-02-08 Thread Amirouche Boubekki
Héllo Nathan, See below, 2012/2/8 Nathan Rice > As a user: > * Finding the right module in PyPi is a pain because there is limited, > low quality semantic information, and there is no code indexing. > * I have to install the module to examine it; I don't need to look at > docs all the time, so

Naming convention for in-house modules (Newbie question)

2012-02-08 Thread HoneyMonster
I am quite new to Python (2.7 on Linux), and have built a few modules using wxPython/wxGlade for GUI elements and Psycopg2 for database access. I adhere mostly to the PEP8 guidelines, and use Pylint to help with quality control. So far I have been *very* impressed. Due to Python's straightforwa

Looking for PyPi 2.0...

2012-02-08 Thread Nathan Rice
As a user: * Finding the right module in PyPi is a pain because there is limited, low quality semantic information, and there is no code indexing. * I have to install the module to examine it; I don't need to look at docs all the time, sometimes I just want a package/class/function/method breakdow

PyDev not saving Ipython History between sessions

2012-02-08 Thread Wanderer
One feature I like about Ipython is that it saves the history between sessions. The history isn't saved if you close Ipython with the corner X, but if you type 'exit()' it is saved. This doesn't work when using Ipython as the console in Pydev. Do I have something setup wrong? Is there a different c

Re: Cycle around a sequence

2012-02-08 Thread Neil Cerutti
On 2012-02-08, Mark Lawrence wrote: > I'm looking at a way of cycling around a sequence i.e. starting > at some given location in the middle of a sequence and running > to the end before coming back to the beginning and running to > the start place. About the best I could come up with is the > fo

Re: PyCrypto builds neither with MSVC nor MinGW

2012-02-08 Thread Case Van Horsen
On Wed, Feb 8, 2012 at 4:24 AM, Alec Taylor wrote: > Thanks, but to get it to work with pip, wouldn't I need to add it to > PATH? - Or can I just add those library args to pip? I don't think so. pyCrypto probably builds a single DLL so the MPIR library is statically linked into that DLL. Only the

Re: convert perl-script for voltcraft voltmeter to python [newbie]

2012-02-08 Thread Jean Dupont
On 8 feb, 01:26, Dietmar Schwertberger wrote: > Am 03.02.2012 14:11, schrieb Jean Dupont:> As my request might have been too > much asked, I have started doing > > some coding myself. > > I'm in doubt about the readline statement -which doesn't show anything > > received- as the meter sends conti

Re: PyCrypto builds neither with MSVC nor MinGW

2012-02-08 Thread Alec Taylor
Thanks, but to get it to work with pip, wouldn't I need to add it to PATH? - Or can I just add those library args to pip? On Wed, Feb 8, 2012 at 9:48 PM, Case Van Horsen wrote: > On Tue, Feb 7, 2012 at 9:37 PM, Alec Taylor wrote: >> Thanks all for your replies. >> >> I have now installed MSVC8 a

Re: PyCrypto builds neither with MSVC nor MinGW

2012-02-08 Thread Case Van Horsen
On Tue, Feb 7, 2012 at 9:37 PM, Alec Taylor wrote: > Thanks all for your replies. > > I have now installed MSVC8 and YASM. I assume you installed Visual Studio. I've omitted the commands to use the SDK compiler below. > > I was able to successfully run configure.bat and make.bat (including > make.

Re: python file synchronization

2012-02-08 Thread Cameron Simpson
[ Please reply inline; it makes the discussion read like a converation, with context. - Cameron ] On 08Feb2012 08:57, Sherif Shehab Aldin wrote: | Thanks a lot for your help, I just forgot to state that the FTP server is | not under my command, I can't control how the file grow, or how the reco

would u wanna details about ur life partner.click here free registration.

2012-02-08 Thread vetri vijay
http://123maza.com/46/river834/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Cycle around a sequence

2012-02-08 Thread Tim Golden
On 08/02/2012 08:26, Mark Lawrence wrote: On 08/02/2012 01:26, Dennis Lee Bieber wrote: On Wed, 08 Feb 2012 01:10:28 +, Mark Lawrence wrote: I'm looking at a way of cycling around a sequence i.e. starting at some given location in the middle of a sequence and running to the end before com

Re: Cycle around a sequence

2012-02-08 Thread Mark Lawrence
On 08/02/2012 01:26, Dennis Lee Bieber wrote: On Wed, 08 Feb 2012 01:10:28 +, Mark Lawrence wrote: I'm looking at a way of cycling around a sequence i.e. starting at some given location in the middle of a sequence and running to the end before coming back to the beginning and running to t

Re: when to use import statements in the header, when to use import statements in the blocks where they are used?

2012-02-08 Thread Mark Lawrence
On 08/02/2012 02:41, Dave Angel wrote: You forgot to include the list in your reply, so I'm forwarding it for you. One way you could have done it was to reply-all. On 02/07/2012 09:32 PM, Patto wrote: Dave Angel: On Wed, Feb 8, 2012 at 10:05 AM, Dave Angel wrote: On 02/07/2012 08:48 PM, Lei