I'm confused. (Not a new experience). I've got a web application running
under Zope. I use the Wing IDE for testing and debugging. When trying to
recreate problems that come up on the web, I wrote some little routines that
pull my cookies out of the Firefox cookies.txt file into my code. That way,
I'm working with all the same options under Wing that my app uses when
running under Zope.
That's worked great until I upgraded to Firefox 3. Firefox 3 moved their
cookies from cookies.txt to cookies.sqlite. I haven't worked with SQLite at
all so I started searching for examples and found this;
import sqlite3
conn = sqlite3.connect ('test.db')
c = conn.cursor()
rows = c.execute('SELE CT * from somefile')
Looks simple enough but I can't get it to work. Here are my questions;
1. How do you get sqlite3 for Python 2.4? I can't find it anywhere.
2. If sqlite3 is only for Python 2.5, does sqlite2 work the same way?
3. Looking at the cookies.sqlite file, I see some text right at the top
"SQLite format 3". Does that mean that I need to use sqlite3?
I kind of got the above example using pysqlite2.4.1 for python 2.4. I get
through the part where I create the connection object but the resulting
object doesn't have a cursor method. I thought that maybe it wasn't
recognizing the cookies.sqlite file as a SQLite database so I tried the same
code giving it a junk text file instead and it behaved the same way. Since
I didn't get an error message, I'm thinking that I've got the wrong version
for the Firefox cookies.sqlite file.
I don't have a clue as to where else to look to trace it down. I'm hoping
that someone here is more familiar with it and can give me some pointers.
Thanks,
Joe Goldthwaite 2 3924
Hi Joe!
Am Tue, 01 Jul 2008 17:51:35 -0700 schrieb Joe Goldthwaite:
I'm confused. (Not a new experience).
Everyone looking for help in the usenet asking for help is sharing your
disease.
I've got a web application
running under Zope. I use the Wing IDE for testing and debugging.
Okay, you use the best development tool I've spotted so far...
When
trying to recreate problems that come up on the web, I wrote some little
routines that pull my cookies out of the Firefox cookies.txt file into
my code. That way, I'm working with all the same options under Wing that
my app uses when running under Zope.
That's worked great until I upgraded to Firefox 3. Firefox 3 moved their
cookies from cookies.txt to cookies.sqlite.
Which is quite handssome :-)
I haven't worked with
SQLite at all so I started searching for examples and found this;
import sqlite3 <<-- This works only if you're using Python >=2.5.x
1. How do you get sqlite3 for Python 2.4? I can't find it anywhere.
Never ever. Use http://www.pysqlite.org instead.
2. If sqlite3 is only for Python 2.5, does sqlite2 work the same way?
Think so. Never spotted problems.
3. Looking at the cookies.sqlite file, I see some text right at the top
"SQLite format 3". Does that mean that I need to use sqlite3?
No, not really.
But if I may make a suggestion, before you start spinning your brain off
with SQL syntax, analyze the database setup of firefox3 a bit and take a
look at SQLalchemy. I use it a lot and I bet you will like it - you just
have to care about your objects (in your case cookie checking) not about
the SQL at all.
I like it :-)
Regards,
Steffen
There is an "SQLite Manager" add-on for Firefox which is pretty neat.
Have a look at https://addons.mozilla.org/en-US/fir...sqlite&cat=all. Might
be useful to you!
Tim
Steffen Mutter wrote:
Hi Joe!
Am Tue, 01 Jul 2008 17:51:35 -0700 schrieb Joe Goldthwaite:
>I'm confused. (Not a new experience).
Everyone looking for help in the usenet asking for help is sharing your
disease.
> I've got a web application running under Zope. I use the Wing IDE for testing and debugging.
Okay, you use the best development tool I've spotted so far...
> When trying to recreate problems that come up on the web, I wrote some little routines that pull my cookies out of the Firefox cookies.txt file into my code. That way, I'm working with all the same options under Wing that my app uses when running under Zope.
That's worked great until I upgraded to Firefox 3. Firefox 3 moved their cookies from cookies.txt to cookies.sqlite.
Which is quite handssome :-)
> I haven't worked with SQLite at all so I started searching for examples and found this;
import sqlite3 <<-- This works only if you're using Python >=2.5.x
>1. How do you get sqlite3 for Python 2.4? I can't find it anywhere.
Never ever. Use http://www.pysqlite.org instead.
>2. If sqlite3 is only for Python 2.5, does sqlite2 work the same way?
Think so. Never spotted problems.
>3. Looking at the cookies.sqlite file, I see some text right at the top "SQLite format 3". Does that mean that I need to use sqlite3?
No, not really.
But if I may make a suggestion, before you start spinning your brain off
with SQL syntax, analyze the database setup of firefox3 a bit and take a
look at SQLalchemy. I use it a lot and I bet you will like it - you just
have to care about your objects (in your case cookie checking) not about
the SQL at all.
I like it :-)
Regards,
Steffen
-- http://mail.python.org/mailman/listinfo/python-list
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: John Salerno |
last post by:
I've been looking around and reading, and I have a few more questions
about SQLite in particular, as it relates to Python.
1. What is the current module to use for sqlite? sqlite3? or is that not
out until Python 2.5?
2. What's the difference between sqlite and pysqlite? Do you need both,
just one, or is one an older version of the same...
|
by: 7stud |
last post by:
Does sqlite come in a mac version?
Thanks.
|
by: ricardo.turpino |
last post by:
Hi,
I've installed Mac Python 2.5. I'm running Mac OS X 10.4.10 on a
Macbook 1.83GHz. I though that the python sqlite library was
installed by default as part of Mac Python 2.5, however, I still have
a problem.
Sqlite does not appear to be my system:
Traceback (most recent call last):
|
by: mikhail.savitsky |
last post by:
Hi,
Official Python distro is very stable, with release cycle of around 1
year. However, to include the new version of SQLite, which has a much
shorter release cycle, one has to rebuild the main Python distribution
(to compile with the new SQLite headers) - this is from Python docs.
Therefore, inclusion of PySQLite in Python-2.5.1 distro...
|
by: kyosohma |
last post by:
Hi,
I am trying to use sqlite to create a local database for an
application I am writing and I am getting some screwy results from it.
Basically, I have a set of values in the database and I am trying to
select a date range and sum those values.
My problem is that it only sums up every other date range and ignores
the in between ranges.
| |
by: Daniel Fetchinson |
last post by:
Does Python 2.5.2's embedded SQLite support full text searching?
Sqlite itself is not distributed with python. Only a python db api
compliant wrapper is part of the python stdlib and as such it is
completely independent of the sqlite build. In other words, if your
sqlite build supports full text searching you can use it through the
python...
|
by: Guilherme Polo |
last post by:
On Tue, Jul 1, 2008 at 9:51 PM, Joe Goldthwaite <joe@goldthwaites.comwrote:
You need sqlite itself (www.sqlite.org) and bindings, pysqlite 2
(http://oss.itsystementwicklung.de/trac/pysqlite/) or aspw
(http://code.google.com/p/apsw/)
You are confused, yes. The sqlite3 package that comes with python2.5
is actually pysqlite2, which...
|
by: Joe Goldthwaite |
last post by:
Thanks Guilherme. That helped. I guess I was thinking that pysqlite would
automatically come with some version of sqlite. The fact that it doesn't is
what was causing me to get the strange results.
I downloaded the Windows version of the SQLite3.dll. I didn't know where to
put it so I first put it in its own directory and tried to...
|
by: timotoole |
last post by:
Hi all,
On a (sun) webserver that I use, there is python 2.5.1 installed. I'd
like to use sqlite3 with this, however sqlite3 is not installed on the
webserver. If I were able to compile sqlite using a sun machine (I
normally use linux machines) and place this in my lunix home account
would I be able to use python and sqlite?
Any...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...
| |