Re: I want to insert beacon scan result in to a database using python and mysql

2016-11-10 Thread Michael Torrie
On 11/10/2016 06:10 PM, Dennis Lee Bieber wrote: > {I could swear I'd included an example of a parameterized query in my > response... I didn't want to go into the details of "SQL injection attack" > as, based on the rest of the OPs post, it would have needed a large > explanation... And the bigges

Re: I want to insert beacon scan result in to a database using python and mysql

2016-11-10 Thread Michael Torrie
On 11/10/2016 11:32 AM, Chris Angelico wrote: > The easiest way is to use a parameterized query: > > cur.execute("insert into beacon VALUES(null, %s)", (beacon,)) > > I don't understand why so many people conflate parameterized with > prepared. "Prepared statements" have a two-step execution. > "

Re: I want to insert beacon scan result in to a database using python and mysql

2016-11-10 Thread Chris Angelico
On Fri, Nov 11, 2016 at 2:36 AM, Michael Torrie wrote: > On 11/10/2016 06:15 AM, Dennis Lee Bieber wrote: >> On Wed, 9 Nov 2016 21:05:50 -0800 (PST), sudeeratechn...@gmail.com >> declaimed the following: >> >>> >>> sql = "insert into beacon VALUES(null, '%s')" % \ >>> (beacon) >>> >> DON'T D

Re: I want to insert beacon scan result in to a database using python and mysql

2016-11-10 Thread Michael Torrie
On 11/10/2016 06:15 AM, Dennis Lee Bieber wrote: > On Wed, 9 Nov 2016 21:05:50 -0800 (PST), sudeeratechn...@gmail.com > declaimed the following: > >> >> sql = "insert into beacon VALUES(null, '%s')" % \ >> (beacon) >> > DON'T DO THAT... Wouldn't hurt to include a brief why on this, and the

I want to insert beacon scan result in to a database using python and mysql

2016-11-09 Thread sudeeratechneed
when this files run gives corresponding output values as; # test BLE Scanning software # jcs 6/8/2014 import MySQLdb as my import blescan import sys import bluetooth._bluetooth as bluez dev_id = 0 db = my.connect(host="localhost", user="root", passwd="root", db="test" ) cursor = db.cursor

Re: Python and mysql 3 tier programming

2013-08-25 Thread Gary Roach
On 08/23/2013 08:38 AM, Jason Friedman wrote: System Debian Wheezy Linux Python 2.7 Mysql 5.5.31 Apache Server I am somewhat conversant with html, css, SQL, mysql, Apache and Debian Linux. Actually I have been using Debian for over 10 year. I spent over 5 year, prior to retirement, programming d

Re: Python and mysql 3 tier programming

2013-08-23 Thread Jason Friedman
> System Debian Wheezy Linux > Python 2.7 > Mysql 5.5.31 > Apache Server > > I am somewhat conversant with html, css, SQL, mysql, Apache and Debian > Linux. Actually I have been using Debian for over 10 year. I spent over 5 > year, prior to retirement, programming database based applications in > F

Python and mysql 3 tier programming

2013-08-21 Thread Gary Roach
Hi all, I'm now to the list so apologies if I don't always follow the local protocol. My problem is the interface between python and mysql using a three tier model. First, some background: System Debian Wheezy Linux Python 2.7 Mysql 5.5.31 Apache Server I am somewhat conversant

Re: Copyright issues for an application developed using django, python and mySQL

2008-07-04 Thread Nagu
Thank you for your explanations. On Jul 3, 6:27 pm, Ben Finney <[EMAIL PROTECTED]> wrote: > Nagu <[EMAIL PROTECTED]> writes: > > I made a small recommendation engine for our company using python, > > django, and mySQL. My supervisor and the senior management are > > worried about the copyright and

Re: Copyright issues for an application developed using django, python and mySQL

2008-07-03 Thread Ben Finney
Nagu <[EMAIL PROTECTED]> writes: > I made a small recommendation engine for our company using python, > django, and mySQL. My supervisor and the senior management are > worried about the copyright and licensing issues. It's good that they're raising these concerns and making sure. > They want to

Re: Copyright issues for an application developed using django, python and mySQL

2008-07-03 Thread [EMAIL PROTECTED]
On Jul 3, 8:33 pm, Nagu <[EMAIL PROTECTED]> wrote: > ... > How do I go about addressing the copyright and licensing issues? (I do > not know if licensing is the right word here). > > Please advice. > > Thank you, > Nagu I suggest you take the advice of random idiots on a python mailing list. -- ht

Copyright issues for an application developed using django, python and mySQL

2008-07-03 Thread Nagu
Hi, I made a small recommendation engine for our company using python, django, and mySQL. My supervisor and the senior management are worried about the copyright and licensing issues. They want to find out the details on how to go about start using it, like quoting python/django/ mySQL specificall

RE: crawler in python and mysql

2007-11-12 Thread Adam Pletcher
on -- Adam Pletcher Technical Art Director Volition/THQ <http://www.volition-inc.com/> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Fabian López Sent: Monday, November 12, 2007 12:33 PM To: Python-list@python.org Subject: crawler in python and mysql Hi, I would like

crawler in python and mysql

2007-11-12 Thread Fabian López
Hi, I would like to write a code that needs to crawl an url and take all the HTML code. I have noticed that there are different opensource webcrawlers, but they are very extensive for what I need. I only need to crawl an url, and don't know if it is so easy as using an html parser. Is it? Which lib

Re: how to store and still search special characters in Python and MySql

2007-02-15 Thread Justin Ezequiel
On Feb 12, 12:26 pm, "ronrsr" <[EMAIL PROTECTED]> wrote: > I have an MySQL database called zingers. The structure is: > > I am having trouble storing text, as typed in latter two fields. > Special characters and punctuation all seem not to be stored and > retrieved correctly. > > Special apostroph

how to store and still search special characters in Python and MySql

2007-02-11 Thread ronrsr
I have an MySQL database called zingers. The structure is: zid - integer, key, autoincrement keyword - varchar citation - text quotation - text I am having trouble storing text, as typed in latter two fields. Special characters and punctuation all seem not to be stored and retrieved correctly. S

Re: Special Characters (Unicode, Ascii) in Python and MySQL

2007-01-02 Thread Carsten Haese
On Mon, 2007-01-01 at 21:57 -0800, ronrsr wrote: > I have an MySQL database called zingers. The structure is: > > zid - integer, key, autoincrement > keyword - varchar > citation - text > quotation - text > > I am having trouble storing text, as typed in latter two fields. > Special characters an

Special Characters (Unicode, Ascii) in Python and MySQL

2007-01-01 Thread ronrsr
I have an MySQL database called zingers. The structure is: zid - integer, key, autoincrement keyword - varchar citation - text quotation - text I am having trouble storing text, as typed in latter two fields. Special characters and punctuation all seem not to be stored and retrieved correctly. S

Re: dealing with special characters in Python and MySQL

2006-12-18 Thread Leo Kislov
ronrsr wrote: > > > > > Try putting "use_unicode=True" in the MySQLdb "connect" call. > > tried that, and also added charset="utf8" - > > now, I can't do any string operations, I get the error msg: > > descriptor 'lower' requires a 'str' object but received a 'unicode' > args = ("descript

Re: dealing with special characters in Python and MySQL

2006-12-18 Thread Fredrik Lundh
ronrsr wrote: > querystring = "update zingers set keywords = '%s', citation = > '%s', quotation = %s' where zid = %d" % > (keywords,citation,quotation,zid) that's not a good way to pass strings to the database. for the right way to do this, see: http://effbot.org/pyfaq/how-do-i-e

Re: dealing with special characters in Python and MySQL

2006-12-18 Thread Fredrik Lundh
ronrsr wrote: > now, I can't do any string operations, I get the error msg: > > descriptor 'lower' requires a 'str' object but received a 'unicode' > args = ("descriptor 'lower' requires a 'str' object but received > a 'unicode'",) what's a "string operation" in this context? are you tryi

Re: dealing with special characters in Python and MySQL

2006-12-17 Thread ronrsr
> > > Try putting "use_unicode=True" in the MySQLdb "connect" call. tried that, and also added charset="utf8" - now, I can't do any string operations, I get the error msg: descriptor 'lower' requires a 'str' object but received a 'unicode' args = ("descriptor 'lower' requires a 'str'

Re: dealing with special characters in Python and MySQL

2006-12-17 Thread fumanchu
ronrsr wrote: > code for storing to database: > > querystring = "update zingers set keywords = '%s', citation = > '%s', quotation = %s' where zid = %d" % > (keywords,citation,quotation,zid) You're missing a single quote in there around the quotation %s. Are you also replacing "\\" w

Re: dealing with special characters in Python and MySQL

2006-12-17 Thread ronrsr
version of python is either 2.2 or 2.4 bests, -rsr- John Nagle wrote: > ronrsr wrote: -- http://mail.python.org/mailman/listinfo/python-list

Re: dealing with special characters in Python and MySQL

2006-12-17 Thread ronrsr
version of python is 2.2 - -- http://mail.python.org/mailman/listinfo/python-list

Re: dealing with special characters in Python and MySQL

2006-12-17 Thread John Nagle
ronrsr wrote: >>are you passing in the strings as Unicode strings, or as something else? >> if you're using something else, what have you done to tell the >>database what it is? >> > > > > not at all sure what I'm passing it as. > > The database default encoding is utf-8 > the database collat

Re: dealing with special characters in Python and MySQL

2006-12-17 Thread ronrsr
> > are you passing in the strings as Unicode strings, or as something else? > if you're using something else, what have you done to tell the > database what it is? > not at all sure what I'm passing it as. The database default encoding is utf-8 the database collation is utf-8 the page encod

Re: dealing with special characters in Python and MySQL

2006-12-17 Thread ronrsr
structure for the DB: CREATE TABLE `zingers` ( `zid` int(9) unsigned NOT NULL auto_increment, `keywords` varchar(255) default NULL, `citation` text, `quotation` text, PRIMARY KEY (`zid`) ) ENGINE=MyISAM DEFAULT CHARSET=UTF8 AUTO_INCREMENT=422 ; code for stor

Re: dealing with special characters in Python and MySQL

2006-12-17 Thread Fredrik Lundh
ronrsr wrote: > I have an MySQL database called zingers. The structure is: > > zid - integer, key, autoincrement > keyword - varchar > citation - text > quotation - text > > the encoding and collation is utf-8 > > I am having trouble storing text, as typed in last two fields. S

dealing with special characters in Python and MySQL

2006-12-17 Thread ronrsr
I have an MySQL database called zingers. The structure is: zid - integer, key, autoincrement keyword - varchar citation - text quotation - text the encoding and collation is utf-8 I am having trouble storing text, as typed in last two fields. Special characters and punctuation

Re: Python and MySQL

2005-11-03 Thread Thomas Bartkus
"Magnus Lycka" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Thomas Bartkus wrote: > > But heck! Now I'm looking at the /usr/lib/python2.3/site-packages on a > > Mandrake Linux box. No [_mysql.] pyd here! Fewer files overall and while > > there are other file extensions, everythin

Re: Python and MySQL

2005-11-03 Thread Magnus Lycka
Thomas Bartkus wrote: > But heck! Now I'm looking at the /usr/lib/python2.3/site-packages on a > Mandrake Linux box. No [_mysql.] pyd here! Fewer files overall and while > there are other file extensions, everything seems to have a corresponding > [.py]. I suspect you might find _mysql.so there.

Re: Python and MySQL

2005-11-03 Thread Gerhard Häring
Thomas Bartkus wrote: > [some posters having the idea that MySQLdb works without a C extension] > Okay - I neglected to look at the [site-packages] directory itself. Here I > do find [_mysql.pyd] full of binary code. A MySQLdb related file that > doesn't seem to have a corresponding file with Pyt

Re: Python and MySQL

2005-11-03 Thread Thomas Bartkus
"Steve Holden" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Thomas Bartkus wrote: > > "Steve Holden" <[EMAIL PROTECTED]> wrote in message > > news:[EMAIL PROTECTED] > > > >>I have a _mysql.c as a part of my distrbution of MySQLdb. Don't you? > >> > > > > > > You made me give that l

Re: Python and MySQL

2005-11-03 Thread Sion Arrowsmith
Aquarius <[EMAIL PROTECTED]> wrote: >I want to know if there is a way to interface a MySQL database without >Python-MySQL or without installing anything that has C files that need >to be compiled. The reason for this, is that I want to develop a >certain web application, but my hosting provider ([E

Re: Python and MySQL

2005-11-03 Thread Aquarius
I am also have _mysql.c that has to be compiled. I downloaded 1.2.0 from here http://sourceforge.net/project/showfiles.php?group_id=22307&package_id=15775 (the .tar.gz). Do you mean, that if I drop the import _mysql and from _mysql import ... lines everything will work OK? I "private install" would

Re: Python and MySQL

2005-11-02 Thread Steve Holden
Thomas Bartkus wrote: > "Steve Holden" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > >>Thomas Bartkus wrote: >> >>>Well, I'm looking at the source for the ever popular MySQLdb library. It >>>appears to be nothing but straight up Python source code. I see no > > reason > >>>why

Re: Python and MySQL

2005-11-02 Thread Thomas Bartkus
"Steve Holden" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Thomas Bartkus wrote: > > Well, I'm looking at the source for the ever popular MySQLdb library. It > > appears to be nothing but straight up Python source code. I see no reason > > why you couldn't just take these modules

Re: Python and MySQL

2005-11-02 Thread Steve Holden
Thomas Bartkus wrote: > "Aquarius" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > >>I appologize in advance for this strange (and possibly stupid) >>question. >> >>I want to know if there is a way to interface a MySQL database without >>Python-MySQL or without installing anything

Re: Python and MySQL

2005-11-02 Thread Thomas Bartkus
"Aquarius" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I appologize in advance for this strange (and possibly stupid) > question. > > I want to know if there is a way to interface a MySQL database without > Python-MySQL or without installing anything that has C files that need > t

Re: Python and MySQL

2005-11-02 Thread Magnus Lycka
Aquarius wrote: > I appologize in advance for this strange (and possibly stupid) > question. > > I want to know if there is a way to interface a MySQL database without > Python-MySQL or without installing anything that has C files that need > to be compiled. The reason for this, is that I want to

Re: Python and MySQL

2005-11-02 Thread Steve Holden
Aquarius wrote: > I appologize in advance for this strange (and possibly stupid) > question. > > I want to know if there is a way to interface a MySQL database without > Python-MySQL or without installing anything that has C files that need > to be compiled. The reason for this, is that I want to

Re: Python and MySQL

2005-11-02 Thread Alan Kennedy
[Aquarius] > I appologize in advance for this strange (and possibly stupid) > question. > > I want to know if there is a way to interface a MySQL database without > Python-MySQL or without installing anything that has C files that need > to be compiled. The reason for this, is that I want to devel

Python and MySQL

2005-11-02 Thread Aquarius
I appologize in advance for this strange (and possibly stupid) question. I want to know if there is a way to interface a MySQL database without Python-MySQL or without installing anything that has C files that need to be compiled. The reason for this, is that I want to develop a certain web applic

python and MySQL - 3 questions

2005-10-09 Thread el chupacabra
I'm using mysqldb module and python 2.4. I'm a newbie. Thanks in advance. 1. Output desired: "hello" "world" I know that MySQL takes \n and \t and what not. But my python script, it takes that \n as literal. Meaning, when I retrieve the records, they show up like "hello \n world". How can

Re: Python and MySQL server

2005-07-14 Thread Bruno Desthuilliers
Unknown a écrit : > Python 2.4 > Linux kernel 2.6.12 > > Hi, > > 1. How do I make the following statement to search for all Strings I > input from console? > > for example, with the code below I need to enter %hello world% (yeah, > including the % symbols) to find all entries for hello world on

Python and MySQL server

2005-07-14 Thread Unknown
Python 2.4 Linux kernel 2.6.12 Hi, 1. How do I make the following statement to search for all Strings I input from console? for example, with the code below I need to enter %hello world% (yeah, including the % symbols) to find all entries for hello world on the tableName. But I want to set the %

Re: How to connect python and Mysql?

2005-06-29 Thread Andy Dustman
Post your question here: http://sourceforge.net/forum/forum.php?forum_id=70461 -- http://mail.python.org/mailman/listinfo/python-list

Re: How to connect python and Mysql?

2005-06-29 Thread bruno modulix
praba kar wrote: > Dear All, > > I am using python2.4 and Mysql 4.0.20. Now I am > want to connect python and mysql. I have problem to > install Mysql-python-1.2.0 interface into my machine. > When I try to install this interface the following > error rest

How to connect python and Mysql?

2005-06-29 Thread praba kar
Dear All, I am using python2.4 and Mysql 4.0.20. Now I am want to connect python and mysql. I have problem to install Mysql-python-1.2.0 interface into my machine. When I try to install this interface the following error restrict to install fully. /System/Links/Executables/ld: cannot