How can I assign the result of a SQL query to a variable?
The following code snippet doesn't work:
query_result=cur.execute("SELECT column_name FROM table_name WHERE
my_variable = 'my_value'",)
> Thomas Jollans wrote:
* get the record you're interested in
--
http://mail.python.org/mailman/li
Hi Rodrick,
On 2010-08-17 18:40, Rodrick Brown wrote:
> I have a fairly large file 1-2GB in size that I need to
> process line by line but I first need to convert the file
> to text using a 3rd party tool that prints the records
> also line by line.
>
> I've tried using Popen to do this with no l
Julia Jacobson wrote:
> How can I assign the result of a SQL query to a variable?
> The following code snippet doesn't work:
> query_result=cur.execute("SELECT column_name FROM table_name WHERE
> my_variable = 'my_value'",)
To retrieve an image from a table "images" by its name you could do
(unt
In message <8dbb89fi3...@mid.individual.net>, Gregory Ewing wrote:
> Lawrence D'Oliveiro wrote:
>
>> Someone who doesn’t understand how positive feedback can lead to
>> instabilities in a dynamical system.
>
> Let's hope the person they hire makes it his first task
> to introduce a big dollop of
On Aug 23, 9:37 am, Julia Jacobson wrote:
> How can I assign the result of a SQL query to a variable?
> The following code snippet doesn't work:
> query_result=cur.execute("SELECT column_name FROM table_name WHERE
> my_variable = 'my_value'",)
>
> > Thomas Jollans wrote:
>
>
>
> > * get the recor
Rony wrote:
> Is a PYD file created from Pyrex faster in execution then a PYD file
> created from python source ?
What do you mean? An African or European swallow?
Of course it depends on your choice of algorithm, programmer ability.familarity
with the respective langugage, ...
cu
Phili
On Aug 22, 7:38 am, Anssi Saari wrote:
> kimjeng writes:
> > the thing is i have installed gtkglextmm both from source and via a
> > slackbuilds package script and i still get the same error,
> > help would be a appreciated
>
> You'll just have to check what it is configure actually tests for and
hello,
I'm looking for a sample using a Global Hook for Window Creation and
Destruction in python 2.6 in win32 env...
I've found some samples in c# or delphi but nothing in python.
I'll try to catch any WM_CREATE events, like pyHook do to catch event
from keyboard and mouse...
any idea ?
thx
--
Hello all,
I freshly subscribed to this list, because I search a solution for a
very special problem. Is this the appropriate list?
Context
==
I try if it is possible to bootstrap Gentoo Prefix, upon the Cygwin
compatibility layer on Windows.
Gentoo Prefix is not a virtual machine but a bun
Thomas Jollans, 19.08.2010 20:47:
On Thursday 19 August 2010, it occurred to Rony to exclaim:
Is a PYD file created from Pyrex faster in execution then a PYD file
created from python source ?
How do you plan to create an extension module (*.so, *.pyd on Windows) from
Python source then?
You
> Problem
> ==
>
> After compiling pyhton I run into errors when I start to use it in
> form of emerge. It says something like this in the logger module:
>
> Import Error sys, os, types, time, string, cStringIO, traceback.
> Permission denied.
>
> I researched the web. One discssion told to try
I want to know the best way to organise a bunch of functions designed to
operate on instances of a given class without cluttering the class itself with
a bunch of unrelated methods.
What I've done is make what I think are called helper classes, each of which
are initialized with an instance of
Rony, 19.08.2010 21:41:
The question actually is, is a PYD file created from C faster then a
PYD file from Pyrex ?
Most likely, yes.
However, when comparing to Cython instead of Pyrex, the answer really
depends on your code. Cython cannot be faster than the equivalent C code,
simply because
John O'Hagan wrote:
> I want to know the best way to organise a bunch of functions designed to
> operate on instances of a given class without cluttering the class itself
> with a bunch of unrelated methods.
>
> What I've done is make what I think are called helper classes, each of
> which are in
I seem to talk to myself. So for the archives:
This is no python thingy. It is a windows/cygwin one.
The second error message brings good search results in the web.
Search for: "cygwin, dll to same address as parent, rebaseall"
Al
--
http://mail.python.org/mailman/listinfo/python-list
Hi Members,
I am learning python 3.1.2 on windows XP. I wanted to do experiments
on importing real time data from QuoteCenter with DDE. After searching
relevant module, I found dde module only for Python 2.6, but not for
3.1.2.
Kindly guide me if there is any other way I can communicate with DDE
Dear All,
I have a python module named "book.py" I want to import it in a destructor of a
class.
class Excel:
def __init__( self, ... ):
. . .
def __del__( self ):
import book
but I got error. Would you please help me? Can I import a module in a
destructor?
Madhusoodan, 23.08.2010 13:50:
I am learning python 3.1.2 on windows XP. I wanted to do experiments
on importing real time data from QuoteCenter with DDE.
What's DDE here?
After searching
relevant module, I found dde module only for Python 2.6, but not for
3.1.2.
Could you provide a link t
On 23/08/2010 13:02, Stefan Behnel wrote:
Madhusoodan, 23.08.2010 13:50:
I am learning python 3.1.2 on windows XP. I wanted to do experiments
on importing real time data from QuoteCenter with DDE.
What's DDE here?
It'll be Microsoft's Dynamic Data Exchange :
http://msdn.microsoft.com/en-u
On Mon, Aug 23, 2010 at 5:00 AM, Navid Parvini wrote:
> Dear All,
>
> I have a python module named "book.py" I want to import it in a destructor of
> a class.
>
> class Excel:
>
> def __init__( self, ... ):
> . . .
>
> def __del__( self ):
> import book
>
> but I got
Navid Parvini wrote:
> I have a python module named "book.py" I want to import it in a destructor
> of a class.
Why would you do that?
> class Excel:
>
> def __init__( self, ... ):
> . . .
>
> def __del__( self ):
> import book
>
> but I got error. Would you please help me? Can I import a mo
Laszlo Nagy wrote:
In my shopzeus.db.pivot.convert.py file, in the run() method of my
Data2Facts class, I can write this into the docstring:
...you may have more joy asking about this on the Sphinx list:
http://groups.google.com/group/sphinx-dev
cheers,
Chris
--
http://mail.python.org/mai
Hi All,
I'm looking to build a script that has command line options as follows:
./myscript.py command subcommand [options]
I can do up to the command [options] bit with add_subparsers in
argparse, but how do I then add a second level of subparsers?
cheers,
Chris
--
http://mail.python.org/m
On Aug 20, 10:04 pm, Thomas Jollans wrote:
> On Thursday 19 August 2010, it occurred to ata.jaf to exclaim:
>
>
>
> > On Aug 17, 11:55 pm, Thomas Jollans wrote:
> > > On Tuesday 17 August 2010, it occurred to ata.jaf to exclaim:
> > > > I am developing a little program in Mac with wxPython.
> > >
I have snow leopard and a brand new mac book pro. After running python from
x11, I saw that I had python 2.5.1 installed on this laptop, so went to
python.org to download Python 2.7, as I was "strongly encouraged" to do on
the website.
The problem is that Mac doesn't come with a text editor for w
On Aug 21, 8:10 am, Tim Golden wrote:
> On 20/08/2010 11:54 PM, vsoler wrote:
>
> > I'am testing your library. I am mainly interested in knowing the
> > access attributes of directories in the local(C:\) or shared unit(W:\)
> > of my system.
>
> > Using your script with 'c:\\' I get an error messa
The following script runs without problems on Ubuntu and Windows 7.
h5py is a package wrapping the hdf5 library (http://code.google.com/p/
h5py/):
from multiprocessing import Pool
import h5py
def update(i):
print i
def f(i):
"hello foo"
return i*i
if __name__ == '__main__':
pool
www.127760.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
On Mon, Aug 23, 2010 at 9:45 AM, Frederick Manley wrote:
> I have snow leopard and a brand new mac book pro. After running python from
> x11, I saw that I had python 2.5.1 installed on this laptop,
That should be 2.6.1 if you're on Snow Leopard. Also, why were you
running Python from an xterm? J
On 23/08/2010 14:55, vsoler wrote:
On Aug 21, 8:10 am, Tim Golden wrote:
On 20/08/2010 11:54 PM, vsoler wrote:
I'am testing your library. I am mainly interested in knowing the
access attributes of directories in the local(C:\) or shared unit(W:\)
of my system.
Using your script with 'c:\\'
Chris Withers wrote:
Hi All,
I'm looking to build a script that has command line options as follows:
./myscript.py command subcommand [options]
I can do up to the command [options] bit with add_subparsers in
argparse, but how do I then add a second level of subparsers?
Answering my own ques
Chris Withers wrote:
> I'm looking to build a script that has command line options as follows:
>
> ./myscript.py command subcommand [options]
>
> I can do up to the command [options] bit with add_subparsers in
> argparse, but how do I then add a second level of subparsers?
It looks like subpars
kimjeng writes:
> On Aug 22, 7:38 am, Anssi Saari wrote:
>> kimjeng writes:
>> > the thing is i have installed gtkglextmm both from source and via a
>> > slackbuilds package script and i still get the same error,
>> > help would be a appreciated
>>
>> You'll just have to check what it is config
On 20 Aug, 01:51, Tim Daneliuk wrote:
> On 8/19/2010 7:23 PM, Steven D'Aprano wrote:
>
> > On Thu, 19 Aug 2010 18:27:11 -0500, Tim Daneliuk wrote:
>
> >> Problem:
>
> >> Given tuples in the form (key, string), use 'key' to determine what
> >> string method to apply to the string:
>
> tabl
On 8/23/2010 10:35 AM, Jon Clements wrote:
> On 20 Aug, 01:51, Tim Daneliuk wrote:
>> On 8/19/2010 7:23 PM, Steven D'Aprano wrote:
>>
>>> On Thu, 19 Aug 2010 18:27:11 -0500, Tim Daneliuk wrote:
>>
Problem:
>>
Given tuples in the form (key, string), use 'key' to determine what
st
Em 23-08-2010 06:16, Ian Kelly escreveu:
> On Sun, Aug 22, 2010 at 9:53 PM, Paulo da Silva
> wrote:
>> Em 23-08-2010 04:30, James Mills escreveu:
>>> On Mon, Aug 23, 2010 at 12:49 PM, Paulo da Silva
>>> wrote:
I understand the concept of a static method.
However I don't know what is a c
John,
I agree with you and I also think the definition given on the official
python site is somewhat confusing, at least for an engineer like myself.
But I'll take a stab at explaning it using what I know thus far.
I think to understand what a class method is you have to first understand
wha
On 8/23/2010 10:05 AM, Benjamin Kaplan wrote:
From the title, this may be relevant, but I'm not sure because I'm
having trouble accessing the bug tracker right now.
http://bugs.python.org/issue9227
Also, this one:
http://bugs.python.org/issue9620
Tracker is still down (site maintainers have
On Monday 23 August 2010, it occurred to John O'Hagan to exclaim:
> I want to know the best way to organise a bunch of functions designed to
> operate on instances of a given class without cluttering the class itself
> with a bunch of unrelated methods.
>
> What I've done is make what I think are
Hi,
I would like to run an external program, and discard anything written
to stderr during its execution, capturing only stdout. My code
currently looks like:
def blaheta_tag(filename):
blaheta_dir = '/home/leon/signal_annotation/parsers/blaheta/'
process = subprocess.Popen([blahe
On 8/23/2010 11:57 AM, Tim Daneliuk wrote:
On 8/23/2010 10:35 AM, Jon Clements wrote:
Another more generic option would be to use methodcaller from the
operator module.
Could you say a bit more about just why you prefer this approach?
Clearly, it *is* more generic, but in looking it over, i
Thanks for reply Thomas. I am running make install DESTDIR=/home/foo/
bar.
Martin- Asking for help :)
On Aug 21, 4:43 am, "Martin v. Loewis" wrote:
> > The whole point of DESTDIR is that it should be prepended to all
> > installed paths, but the binaries should not contain any references to
> > i
On Monday 23 August 2010, it occurred to Leon Derczynski to exclaim:
> Hi,
>
> I would like to run an external program, and discard anything written
> to stderr during its execution, capturing only stdout. My code
> currently looks like:
>
> def blaheta_tag(filename):
> blaheta_dir = '/ho
I wonder if there is a way to save and load all python variables just like
matlab does, so I can build a code step by step by loading previous states.
I am handling a python processing code for very large files and multiple
processing steps. Each time I find a bug, I have to run the whole thing
ag
On Tue, Aug 24, 2010 at 4:38 AM, Leon Derczynski wrote:
> Hi,
>
> I would like to run an external program, and discard anything written
> to stderr during its execution, capturing only stdout. My code
> currently looks like:
>
> def blaheta_tag(filename):
>blaheta_dir = '/home/leon/signal_
Hi everybody,
I would like to know if its possible to modify a list of entry that is
define into a list and replace it by another list ?
I try this piece of code, but Im pretty sure I messed something:
http://pastebin.com/HfdkGeB3
Any help appreciated,
Thank you :)
--
http://mail.python.org/ma
Hi Everyone,
Our company is looking for an experienced full time Django programmer to work
with our development team on a contract basis. We are a start up that is
developing a large web application with extensive database interfaces. We are
based in the US so living in the US is a plus. The e
On 8/23/2010 11:22 AM Alban Nona said...
Hi everybody,
I would like to know if its possible to modify a list of entry that is
define into a list and replace it by another list ?
I try this piece of code, but Im pretty sure I messed something:
http://pastebin.com/HfdkGeB3
The code you posted
> writes:
>> - Pull out text from each PDF page (to search for specific words)
>> - Combine separate pdf documents into one document
>> - Add bookmarks (with destination settings)
> PDF Shuffler is a Python app which does PDF merging and splitting very
> well. I don't think it does anything else
On 8/23/2010 12:13 PM Emile van Sebille said...
On 8/23/2010 11:22 AM Alban Nona said...
Hi everybody,
I would like to know if its possible to modify a list of entry that is
define into a list and replace it by another list ?
I try this piece of code, but Im pretty sure I messed something:
htt
> I wonder if there is a way to save and load all python variables just like
> matlab does, so I can build a code step by step by loading previous states.
>
> I am handling a python processing code for very large files and multiple
> processing steps. Each time I find a bug, I have to run the whole
On 23-08-2010 21:44, Daniel Fetchinson wrote:
>> I wonder if there is a way to save and load all python variables just like
>> matlab does, so I can build a code step by step by loading previous states.
>>
>> I am handling a python processing code for very large files and multiple
>> processing st
On Mon, Aug 23, 2010 at 10:37 AM, Sang-Ho Yun wrote:
> I wonder if there is a way to save and load all python variables just like
> matlab does, so I can build a code step by step by loading previous states.
>
> I am handling a python processing code for very large files and multiple
> processing
On 23 Aug, 16:57, Tim Daneliuk wrote:
> On 8/23/2010 10:35 AM, Jon Clements wrote:
>
>
>
> > On 20 Aug, 01:51, Tim Daneliuk wrote:
> >> On 8/19/2010 7:23 PM, Steven D'Aprano wrote:
>
> >>> On Thu, 19 Aug 2010 18:27:11 -0500, Tim Daneliuk wrote:
>
> Problem:
>
> Given tuples in the for
On 8/23/10 12:37 PM, Sang-Ho Yun wrote:
I wonder if there is a way to save and load all python variables just like
matlab does, so I can build a code step by step by loading previous states.
I am handling a python processing code for very large files and multiple
processing steps. Each time I fi
In article
,
Benjamin Kaplan wrote:
> On Mon, Aug 23, 2010 at 9:45 AM, Frederick Manley wrote:
> > so went to
> > python.org to download Python 2.7, as I was "strongly encouraged" to do on
> > the website.
[...]
> >The only problem is, whenever I start it
> > up (I've tried starting it from the
Hello,
I am new to the python world. I'm trying the install the pymssql
package and have been unsuccessful. I am running Win7 x64. Here is
the output I get when I try to build the pymssql package:
running build
running build_ext
cythoning _mssql.pyx to _mssql.c
building '_mssql' extension
crea
On 23 August 2010 19:37, Sang-Ho Yun wrote:
> I wonder if there is a way to save and load all python variables just like
> matlab does, so I can build a code step by step by loading previous states.
>
> I am handling a python processing code for very large files and multiple
> processing steps. E
> Martin- Asking for help :)
Ok. Please try the patch below.
If this works, please make a bug report.
Regards,
Martin
Index: Lib/distutils/util.py
===
--- Lib/distutils/util.py (Revision 84197)
+++ Lib/distutils/util.py
On 8/23/10 3:18 PM, Robert Kern wrote:
On 8/23/10 12:37 PM, Sang-Ho Yun wrote:
I wonder if there is a way to save and load all python variables just like
matlab does, so I can build a code step by step by loading previous states.
I am handling a python processing code for very large files and m
Ata Jafari writes:
> Finally I did it.
> I was doing some stupid mistakes.
> Thanks alot.
For the benefit of future readers of this thread, could you please
describe what the errors were and how you discovered them? Also what the
eventual solution was.
--
\ “When I get new information,
On Monday 23 August 2010, it occurred to f1crazed to exclaim:
> Hello,
>
> I am new to the python world. I'm trying the install the pymssql
> package and have been unsuccessful. I am running Win7 x64. Here is
> the output I get when I try to build the pymssql package:
>
> [snip: missing symbol
writes:
> Our company is looking for an experienced full time Django programmer
[…]
Please don't use the Python forum for this. Instead, post it to the
Python Jobs Board http://www.python.org/community/jobs/>.
> Accepted applicants will be required to sign a non-disclosure agreement.
I would s
Tim Daneliuk writes:
>You can get away with this because all string objects appear to point to
> common
>method objects. That is,: id("a".lower) == id("b".lower)
A side note: your use of `id' has misled you. id(X)==id(Y) is not a
perfect substitue for the X is Y. :)
"a".lower and "b
I started learning python with ver 2.6. Then I switched to 3.1 after
uninstalling the previous version.
Now I find that many of the code snippets that I would need are
written for py 2.6. Sometimes the automatic converter 2to3 doesn't
help, because it is not able to complete its objective and req
> I tried to change file associations, first manually, in a CMD window.
> But the system was responding "access denied" even when I used an
> Administrator account (I was using FTYPE python.file="C:
> \Python26\python.exe" "%1" %*).
That works, in principle. Put that command into py26.bat, then, i
On 24 ago, 00:55, "Martin v. Loewis" wrote:
> > I tried to change file associations, first manually, in a CMD window.
> > But the system was responding "access denied" even when I used an
> > Administrator account (I was using FTYPE python.file="C:
> > \Python26\python.exe" "%1" %*).
>
> That work
> When I am logged-in in a session as an administrator, the BAT file on
> the Desktop, and I double-click on it, it does not work.
This is not what I meant. Instead, right-click on the BAT file,
and select "run as administrator".
> When you say to double-escape the percent signs, do you mean that
On Aug 24, 1:33 am, "Martin v. Loewis" wrote:
> > When I am logged-in in a session as an administrator, the BAT file on
> > the Desktop, and I double-click on it, it does not work.
>
> This is not what I meant. Instead, right-click on the BAT file,
> and select "run as administrator".
>
> > When y
On Aug 21, 12:32 pm, Alex McDonald wrote:
> "Scintilla" gets about 2,080,000 results on google; "blather" gets
> about 876,000 results. O Hugh, you pseudo-intellectual you!
>
> > with gutter language such as
> > "turd"
>
> About 5,910,000 results. It has a long history, even getting a mention
> in
Martin v. Loewis wrote:
When I am logged-in in a session as an administrator, the BAT file on
the Desktop, and I double-click on it, it does not work.
This is not what I meant. Instead, right-click on the BAT file,
and select "run as administrator".
When you say to double-escape the percent s
On Aug 22, 3:40 pm, 1001nuits <1001nu...@gmail.com> wrote:
> Another thing you learn in studying in University is the fact that you can
> be wrong, which is quite difficult to accept for self taught people.
Yet another thing you learn in studying in University, is the art of
apple polishing! LOL
On Aug 23, 2:23 pm, "Martin v. Loewis" wrote:
> > Martin- Asking for help :)
>
> Ok. Please try the patch below.
>
> If this works, please make a bug report.
>
> Regards,
> Martin
>
> Index: Lib/distutils/util.py
> ===
> --- Lib/distu
On Aug 23, 2010, at 16:47 , Almar Klein wrote:
A year ago or so I designed a simple file format that could do that
and is also human readable (binary data is compressed and then
base64 encoded). I use it extensively to store experiment data for
my research and also for configuration files f
Iran's self-defense options 'limitless' - against the YANQUI and
KHAZAR Bustards - Brilliant ANALYSIS
Iran's self-defense options 'limitless'
Tue Aug 24, 2010 12:9AM
President Mahmoud AhmadinejadIran's President Mahmoud Ahmadinejad says
no military action is expected to be taken against the Islam
"Russ P." wrote:
> However, I've switched from Python to
> Scala, so I really don't care.
Really? Your endless whining in this thread would seem to indicate
otherwise.
--
http://mail.python.org/mailman/listinfo/python-list
On Mon, 23 Aug 2010 10:38:02 -0700, Leon Derczynski wrote:
> I would like to run an external program, and discard anything written
> to stderr during its execution, capturing only stdout. My code
> currently looks like:
>
> def blaheta_tag(filename):
> blaheta_dir = '/home/leon/signal_ann
YANQUI cry babies concerned that Iran has achieved parity in DRONES
and against the massive AIRCRAFT carriers which are like SITTING
DUCKS. A nation needs AIRCRAFT carriers to venture out for
IMPERIALISTIC assaults but cant go out on speed boats. Yet the
NUMEROUS fast boats can sink the AIRCRAFT ca
On Aug 23, 7:46 pm, alex23 wrote:
> "Russ P." wrote:
> > However, I've switched from Python to
> > Scala, so I really don't care.
>
> Really? Your endless whining in this thread would seem to indicate
> otherwise.
Yes, I guess I care some, but not much. I still use Python for some
things, and I
I am new to python .I have a corpus which is written in Bengali and i
want to read that file using python code.Can anyone help me in this
matter.
Thank You
--
http://mail.python.org/mailman/listinfo/python-list
> Thanks Martin. That seems to work. I will file a bug report. Also, can
> you describe what the problem was?
If you have / as the prefix, you get two leading slashes, e.g. for
//lib/python2.x. Any other prefix would have given you only a single
slash: e.g. if it had been /usr, then you end up wit
81 matches
Mail list logo