[Tutor] sqlite3 woes opening Moz, FFox sqlite db with only the inevitable 'DatabaseError: file is encrypted or is not a database' occurring...

2013-07-23 Thread Paul Smith
title = three days lost and counting... Thanks in advance all: Ok- I want to work with data in FFox, specifically a sqlite db found here.. 'C:\Users\Hive2\AppData\Roaming\Mozilla\Firefox\Profiles\zabt0uq4.default\places.sqlite' ...more specifically my FFox history found in a table 'moz_places'.

Re: [Tutor] Off Topic re: unichr not working as expected

2013-07-23 Thread Asokan Pichai
On Wed, Jul 24, 2013 at 1:50 AM, Steven D'Aprano wrote: > On 24/07/13 04:53, Jim Mooney wrote: > >> On 23 July 2013 07:28, Steven D'Aprano wrote: >> >> >>> (I trust that everyone remembers enough high school chemistry to >>> understand why Mercurial is called hg? Hg is the chemical symbol for >>>

[Tutor] Off Topic re: unichr not working as expected

2013-07-23 Thread Steven D'Aprano
On 24/07/13 04:53, Jim Mooney wrote: On 23 July 2013 07:28, Steven D'Aprano wrote: (I trust that everyone remembers enough high school chemistry to understand why Mercurial is called hg? Hg is the chemical symbol for Mercury.) And I recall my high school chemistry teacher claiming the nobl

Re: [Tutor] unichr not working as expected

2013-07-23 Thread Marc Tompkins
On Tue, Jul 23, 2013 at 12:31 PM, Dave Angel wrote: > The three distributed version control systems I know of are: >git, mercurial, and bazaar > Not to overplay my Joel Spolsky fanboiism, but are you aware of Kiln from Fog Creek? It started out as an enterprise-friendly wrapper around Mercu

Re: [Tutor] unichr not working as expected

2013-07-23 Thread Dave Angel
On 07/23/2013 03:20 PM, Alan Gauld wrote: On 23/07/13 18:41, wolfrage8...@gmail.com wrote: Although I can not say for sure. It appears to me, they are trying to do a better job at merging from distributed branches Thanks for the memory jog. Yes i remember reading an interview with linus when

Re: [Tutor] 2d rotation gives unexpected results.

2013-07-23 Thread Dave Angel
On 07/23/2013 08:27 AM, enmce wrote: Hello! This is my first post, nice to meet you all! I`m biology student from Russia, trying to learn python to perform some simple simulations. Hello, and welcome. However, please don't post identical messages on tutor and python-list. The response you g

Re: [Tutor] close, but no cigar

2013-07-23 Thread Steven D'Aprano
On 24/07/13 03:01, Marc Tompkins wrote: On Tue, Jul 23, 2013 at 7:46 AM, Steven D'Aprano wrote: This is not quite as silly as saying that an English E, a German E and a French E should be considered three distinct characters, but (in my opinion) not far off it. I half-agree, half-disagree.

Re: [Tutor] unichr not working as expected

2013-07-23 Thread Alan Gauld
On 23/07/13 18:41, wolfrage8...@gmail.com wrote: Although I can not say for sure. It appears to me, they are trying to do a better job at merging from distributed branches Thanks for the memory jog. Yes i remember reading an interview with linus when he referred to the difficulty of using CVS

Re: [Tutor] object size in python is in what units?

2013-07-23 Thread Alan Gauld
On 23/07/13 19:27, Jim Mooney wrote: And yet I still get 36 with this: bigKronk = Kronk('supercalifracilisticexpalidocious, even though the sound of it is really quite atrocious') sys.getsizeof(bigKronk) 36 So I guess the object is only pointing to its contents. Python namespaces are effecti

Re: [Tutor] unichr not working as expected

2013-07-23 Thread Jim Mooney
On 23 July 2013 07:28, Steven D'Aprano wrote: > > (I trust that everyone remembers enough high school chemistry to > understand why Mercurial is called hg? Hg is the chemical symbol for > Mercury.) > And I recall my high school chemistry teacher claiming the noble gases could never combine, unti

Re: [Tutor] object size in python is in what units?

2013-07-23 Thread Jim Mooney
On 23 July 2013 07:19, Steven D'Aprano wrote: > Some day, I'll invent my own version of Python, and make object IDs be > consecutive prime numbers. That'll teach people to rely on them. > --- Why "consecutive?" That's still way too predictable (Yes, the obvious flaw already occurred to me ;')

Re: [Tutor] close, but no cigar

2013-07-23 Thread Jim Mooney
On 23 July 2013 07:46, Steven D'Aprano wrote:People who talk about "extended ASCII" are confused, and all you need to do to show up their confusion is to ask "which extended ASCII do you mean?" There are dozens. I think I was too impressed by all those wonderful old ASCII-art pics on bulletin

Re: [Tutor] object size in python is in what units?

2013-07-23 Thread Jim Mooney
On 23 July 2013 07:21, Oscar Benjamin wrote: > > > You can check the size in bytes of an object with sys.getsizeof e.g.: > > >>> import sys > >>> sys.getsizeof(lardKronk) > 36 > And yet I still get 36 with this: bigKronk = Kronk('supercalifracilisticexpalidocious, even though the sound of it is

Re: [Tutor] hi

2013-07-23 Thread Vick
Hello, Thanks for taking the time to reply! However, I had already solved the problem a few days ago on my own. The DOPRI 8(7)13 is the Dormand Prince 8th order with 13 stages method for solving ordinary differential equati

[Tutor] Question

2013-07-23 Thread Amandeep Behl
def Move(label): label = "Anything" a_list = [1,2,3] Move(a_list) I don't see any error when executing above but when i manually assign [1,2,3] = "Anything" i get error Why? ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscripti

Re: [Tutor] 3 Dimensional Dictionaries

2013-07-23 Thread David Hutto
You could find several url's to scrape the data from, and I believe it was mentioned you could use a list of dicts, but it seems that you might want to sub tier your dicts, It's been a while since I've pythoned so this a little longer that usual, but this may help if you pull in the countries/conti

Re: [Tutor] suggestions for splitting file based on date

2013-07-23 Thread David Hutto
Why not use the actual month? With a simple x/y canvas in Tkinter you could plot by the months with polygon coordinates as your data visualization, or in 30 day /etc windows, just the price(y) being a derivative of x(the frequency of changes), and create simple line segments with polygon coordinat

Re: [Tutor] suggestions for splitting file based on date

2013-07-23 Thread David Hutto
You could also begin a little stats(I think steven D'aprano did pystats), which would show rhythms within those particular frequency windows, using y as a basis for your model On Sat, Jul 20, 2013 at 1:10 AM, David Hutto wrote: > Why not use the actual month? With a simple x/y canvas in Tkinter

Re: [Tutor] A list of 100+ projects to complete to master Python.

2013-07-23 Thread David Hutto
The offsite backups, are just a safety measure for your programs, this can include things such as sourceforge so you don't lose your work to a glitch, which can happen without a moments notice. You want to master python, then reinvemnt the wheel sometimes. Most everything has beeen done. It's data

Re: [Tutor] unichr not working as expected

2013-07-23 Thread Alan Gauld
On 23/07/13 16:08, Dave Angel wrote: git is free, and is usually installed on individual machines. It's also easy to set up and use for a single user. I prefer Mercurial (also known as hg). And I've used SVN in recent years and found it... OK. But my question is: Why is there such a rash

Re: [Tutor] close, but no cigar

2013-07-23 Thread Marc Tompkins
On Tue, Jul 23, 2013 at 7:46 AM, Steven D'Aprano wrote: > This is not quite as silly as saying that an English E, a German E and a > French E should be considered three distinct characters, but (in my > opinion) not far off it. > I half-agree, half-disagree. It's true that the letter "E" is used

Re: [Tutor] unichr not working as expected

2013-07-23 Thread Dave Angel
On 07/23/2013 10:28 AM, Steven D'Aprano wrote: On 24/07/13 00:14, Dave Angel wrote: On 07/23/2013 02:10 AM, Jim Mooney wrote: On 22 July 2013 21:00, Steven D'Aprano wrote: (By the way, you're very naughty. The code you show *cannot possibly generate the error you claim it generates*. Bad Ji

Re: [Tutor] close, but no cigar

2013-07-23 Thread Steven D'Aprano
On 23/07/13 04:27, Jim Mooney wrote: Okay, I'm getting there, but this should be translating A umlaut to an old DOS box character, according to my ASCII table, I understand what you mean, but I should point out that what you say is *literally impossible*, since neither Ä nor any box-drawing c

Re: [Tutor] object size in python is in what units?

2013-07-23 Thread Steven D'Aprano
On 23/07/13 18:17, Jim Mooney wrote: On 23 July 2013 00:40, Steven D'Aprano wrote: No no no, a thousand times no!!! IDs are just numeric IDs, that is all, like your social security number or driver's licence number. Don't think of them as having any meaning at all, except that they are unique

Re: [Tutor] object size in python is in what units?

2013-07-23 Thread Steven D'Aprano
On 24/07/13 00:21, Oscar Benjamin wrote: The reason for the patterns that you observe are related to CPython's memory pool allocator. You can read the long source comment describing this here: http://hg.python.org/cpython/file/a5681f50bae2/Objects/obmalloc.c#l367 [...] Nice analysis! Thanks

Re: [Tutor] unichr not working as expected

2013-07-23 Thread Steven D'Aprano
On 24/07/13 00:14, Dave Angel wrote: On 07/23/2013 02:10 AM, Jim Mooney wrote: On 22 July 2013 21:00, Steven D'Aprano wrote: (By the way, you're very naughty. The code you show *cannot possibly generate the error you claim it generates*. Bad Jim, no biscuit!) I know. I need a personal git

Re: [Tutor] object size in python is in what units?

2013-07-23 Thread Steven D'Aprano
On 23/07/13 18:19, Marc Tompkins wrote: A couple of clarifications I wish I'd made before hitting Send: I shouldn't have said that IDs are "derived" or "calculated"; they're "assigned", presumably on a first-come, first-served basis; Actually, in CPython they are derived, from the memory loca

Re: [Tutor] unichr not working as expected

2013-07-23 Thread Dave Angel
On 07/23/2013 02:10 AM, Jim Mooney wrote: On 22 July 2013 21:00, Steven D'Aprano wrote: (By the way, you're very naughty. The code you show *cannot possibly generate the error you claim it generates*. Bad Jim, no biscuit!) I know. I need a personal github. git is free, and is usually ins

Re: [Tutor] object size in python is in what units?

2013-07-23 Thread Jordan
Speaking of brain dead, I was taking a break from Python by looking at a video on finite state machines and the very first example was tennis scoring. I think the $#@! insane tennis scoring was harder to understand than the subject. That got me laughing pretty good, since I too was recently

Re: [Tutor] object size in python is in what units?

2013-07-23 Thread Jim Mooney
On 23 July 2013 01:13, Marc Tompkins wrote: When I saved your code as a file on my machine (Python 2.7 on Win8 64-bit) > and ran it from the command line, I got the same result as you - three IDs, > 40 apart every time. However, I initially pasted your code into > PyScripter, and when I ran it i

Re: [Tutor] slashes in paths

2013-07-23 Thread Jim Mooney
On 23 July 2013 00:42, Steven D'Aprano wrote: My, that is simple. The Python docs should start with simple explanations like that so people would keep on reading instead of throwing up their hands in despair ;') > > - use the encode method to go from text to bytes, and decode to go the > other w

Re: [Tutor] object size in python is in what units?

2013-07-23 Thread Marc Tompkins
On Tue, Jul 23, 2013 at 1:17 AM, Jim Mooney wrote: > On 23 July 2013 00:40, Steven D'Aprano wrote: > >> >> No no no, a thousand times no!!! IDs are just numeric IDs, that is all, >> like your social security number or driver's licence number. Don't think of >> them as having any meaning at all, e

Re: [Tutor] object size in python is in what units?

2013-07-23 Thread Marc Tompkins
On Tue, Jul 23, 2013 at 1:13 AM, Marc Tompkins wrote: > As an experiment, I added a couple of extra methods and attributes to the > Kronk class, but it didn't change anything - IDs still incremented by 40 > each time. eryksun will no doubt chime in to tell us exactly how object > IDs are derived

Re: [Tutor] object size in python is in what units?

2013-07-23 Thread Jim Mooney
On 23 July 2013 00:40, Steven D'Aprano wrote: > > No no no, a thousand times no!!! IDs are just numeric IDs, that is all, > like your social security number or driver's licence number. Don't think of > them as having any meaning at all, except that they are unique during the > lifetime of the obj

Re: [Tutor] object size in python is in what units?

2013-07-23 Thread Marc Tompkins
On Tue, Jul 23, 2013 at 12:09 AM, Jim Mooney wrote: > I've noticed that when I create a number of objects from a class, one > after another, they're at different IDs, but the IDs all appear to be > equidistant, so that they all appear to have the same size. But what does > that size represent? is

Re: [Tutor] slashes in paths

2013-07-23 Thread Steven D'Aprano
On 23/07/13 04:33, Marc Tompkins wrote: On Mon, Jul 22, 2013 at 11:30 AM, Jim Mooney wrote: On 22 July 2013 11:26, Marc Tompkins wrote: If you haven't already read it, may I suggest Joel's intro to Unicode? http://www.joelonsoftware.com/articles/Unicode.html I had a bad feeling I'd end

Re: [Tutor] object size in python is in what units?

2013-07-23 Thread Steven D'Aprano
On 23/07/13 17:09, Jim Mooney wrote: I've noticed that when I create a number of objects from a class, one after another, they're at different IDs, but the IDs all appear to be equidistant, so that they all appear to have the same size. But what does that size represent? is it bytes? No no no,

Re: [Tutor] object size in python is in what units?

2013-07-23 Thread Hugo Arts
On Tue, Jul 23, 2013 at 9:09 AM, Jim Mooney wrote: > I've noticed that when I create a number of objects from a class, one > after another, they're at different IDs, but the IDs all appear to be > equidistant, so that they all appear to have the same size. But what does > that size represent? is i

Re: [Tutor] close, but no cigar

2013-07-23 Thread Steven D'Aprano
On 23/07/13 09:39, Marc Tompkins wrote: On Mon, Jul 22, 2013 at 3:22 PM, Jim Mooney wrote: On 22 July 2013 14:11, Marc Tompkins wrote: One way to deal with this is to specify an encoding: newchar = char.decode('cp437').encode('utf-8') Works fine, but I decided to add a dos graphics

[Tutor] object size in python is in what units?

2013-07-23 Thread Jim Mooney
I've noticed that when I create a number of objects from a class, one after another, they're at different IDs, but the IDs all appear to be equidistant, so that they all appear to have the same size. But what does that size represent? is it bytes? ie - if I run this over and over I get different id