Re: Variables versus name bindings [Re: A certainl part of an if() structure never gets executed.]

2013-06-17 Thread Larry Hudson
On 06/17/2013 08:50 AM, Simpleton wrote: On 17/6/2013 2:58 μμ, Michael Torrie wrote: a = 5 b = a a <---> memory address b <---> memory address I like to think a and b as references to the same memory address Not quite: a and b _are_ memory addresses, At the same time, a and b are references

Re: Tonight's meeting + s Database link -- Sorry

2013-06-17 Thread Kevin LaTona
Sorry all, I managed to send that last email to wrong Python list. -Kevin On Jun 17, 2013, at 10:55 PM, Kevin LaTona wrote: > > > First off what a fun meeting it was tonight with a great conversation. > > Let's do more of them. > > > > Next this is the link to that JSON Database I men

Re: Variables versus name bindings [Re: A certainl part of an if() structure never gets executed.]

2013-06-17 Thread Steven D'Aprano
On Tue, 18 Jun 2013 00:12:34 -0400, Dave Angel wrote: > On 06/17/2013 10:42 PM, Steven D'Aprano wrote: >> On Mon, 17 Jun 2013 21:06:57 -0400, Dave Angel wrote: >> >>> On 06/17/2013 08:41 PM, Steven D'Aprano wrote: In Python 3.2 and older, the data will be either UTF-4 or

Tonight's meeting + s Database link

2013-06-17 Thread Kevin LaTona
First off what a fun meeting it was tonight with a great conversation. Let's do more of them. Next this is the link to that JSON Database I mentioned but could not recall the name on. http://www.rethinkdb.com/ RethinkDB overview RethinkDB is built to store JSON documents, and scale to

Re: Updating a filename's counter value failed each time

2013-06-17 Thread Νίκος
Στις 18/6/2013 4:42 πμ, ο/η Dennis Lee Bieber έγραψε: Do you ever COMMIT the changes. cur.execute("update anything set something = whatever where that = this") without doing a con.commit() is just going to rollback the changes. committing the changes inst necessary neither i

Re: Fatal Python error: Py_Initialize: can't initialize sys standard streams

2013-06-17 Thread alex23
On Jun 16, 2:09 pm, Larry Hudson wrote: > On 06/15/2013 03:10 PM, alex23 wrote: > > (Sorry for the ugly url, it's a Google translation of a french > > language page) > > Somewhat OT, but have you ever looked at tinyurl.com?  Very useful for this > sort of thing. >From past comments on this list,

Re: Don't feed the troll...

2013-06-17 Thread alex23
On Jun 18, 2:19 am, Simpleton wrote: > I like things to be put up simple and i'am not trolling this group. > I respect this group. There are a number of things you could to do confirm this: 1. Stop changing your name. 2. Stop bumping your threads if no one responds. 3. Stop exaggerating the "ben

Re: Variables versus name bindings [Re: A certainl part of an if() structure never gets executed.]

2013-06-17 Thread Dave Angel
On 06/17/2013 10:42 PM, Steven D'Aprano wrote: On Mon, 17 Jun 2013 21:06:57 -0400, Dave Angel wrote: On 06/17/2013 08:41 PM, Steven D'Aprano wrote: In Python 3.2 and older, the data will be either UTF-4 or UTF-8, selected when the Python compiler itself is compiled. I think that was

Re: Variables versus name bindings [Re: A certainl part of an if() structure never gets executed.]

2013-06-17 Thread Marcin Szamotulski
> While you said to me to forget about memory locations, and that's indeed > made things easy to follow i still keep wondering, how Python internally > keeping tracks of 'x' and 'y' names as well as their referenced objects > (i.e. number 6). There is an excellent blog post about CPython intern

Re: Variables versus name bindings [Re: A certainl part of an if() structure never gets executed.]

2013-06-17 Thread Steven D'Aprano
On Tue, 18 Jun 2013 02:38:20 +, Steven D'Aprano wrote: > On Tue, 18 Jun 2013 00:41:53 +, Steven D'Aprano wrote: > >> In Python 3.2 and older, the data will be either UTF-4 or UTF-8, >> selected when the Python compiler itself is compiled. In Python 3.3, >> the data will be stored in eithe

Re: Variables versus name bindings [Re: A certainl part of an if() structure never gets executed.]

2013-06-17 Thread Steven D'Aprano
On Mon, 17 Jun 2013 21:06:57 -0400, Dave Angel wrote: > On 06/17/2013 08:41 PM, Steven D'Aprano wrote: >> >> >> >> In Python 3.2 and older, the data will be either UTF-4 or UTF-8, >> selected when the Python compiler itself is compiled. > > I think that was a typo. Do you perhaps UCS-2 or U

Re: Variables versus name bindings [Re: A certainl part of an if() structure never gets executed.]

2013-06-17 Thread Steven D'Aprano
On Tue, 18 Jun 2013 00:41:53 +, Steven D'Aprano wrote: > In Python 3.2 and older, the data will be either UTF-4 or UTF-8, > selected when the Python compiler itself is compiled. In Python 3.3, the > data will be stored in either Latin-1, UTF-4, or UTF-8, depending on the > contents of the stri

Re: Problems with Python documentation [Re: Don't feed the troll...]

2013-06-17 Thread Joel Goldstick
On Mon, Jun 17, 2013 at 6:50 PM, Steven D'Aprano < steve+comp.lang.pyt...@pearwood.info> wrote: > On Mon, 17 Jun 2013 07:41:54 -0700, rurpy wrote: > > > On 06/17/2013 01:23 AM, Chris Angelico wrote: > >> On Mon, Jun 17, 2013 at 3:04 PM, Ferrous Cranus > >> wrote: > >>> The only thing i'm feeling

Re: Don't feed the troll...

2013-06-17 Thread rurpy
On 06/17/2013 04:22 PM, Mark Lawrence wrote: > On 17/06/2013 15:41, ru...@yahoo.com wrote: >> It is NOT a matter of simply reading the documentation. >> I have posted here several times as have many others about >> some of the problems the documentation has, especially for >> people who don't alrea

Re: Variables versus name bindings [Re: A certainl part of an if() structure never gets executed.]

2013-06-17 Thread Dave Angel
On 06/17/2013 08:41 PM, Steven D'Aprano wrote: In Python 3.2 and older, the data will be either UTF-4 or UTF-8, selected when the Python compiler itself is compiled. I think that was a typo. Do you perhaps UCS-2 or UCS-4 In Python 3.3, the data will be stored in either Latin-1, UTF-4,

Re: Don't feed the troll...

2013-06-17 Thread rurpy
On 06/17/2013 03:43 PM, Chris Angelico wrote: > On Tue, Jun 18, 2013 at 12:41 AM, wrote: >> On 06/17/2013 01:23 AM, Chris Angelico wrote: >>> On Mon, Jun 17, 2013 at 3:04 PM, Ferrous Cranus >>> wrote: The only thing i'm feeling guilty is that instead of reading help files and PEP's wh

Re: Variables versus name bindings [Re: A certainl part of an if() structure never gets executed.]

2013-06-17 Thread Steven D'Aprano
On Tue, 18 Jun 2013 02:26:39 +0300, Νίκος wrote: > Στις 18/6/2013 2:09 πμ, ο/η Steven D'Aprano έγραψε: >> {"a": "Hello world"} >> >> Do you see a memory location there? There is no memory location. There >> is the name, "a", and the object it is associated with, "Hello world". >> Either the dict,

Re: Updating a filename's counter value failed each time

2013-06-17 Thread Νίκος
Στις 18/6/2013 2:30 πμ, ο/η Dennis Lee Bieber έγραψε: In the case of MySQLdb -- IT will wrap each argument with quotes, along with escaping any special characters. Even if the query is something like: http://superhost.gr/cgi-bin/files.py?filename="Select."; From what exactly the

Re: Updating a filename's counter value failed each time

2013-06-17 Thread Νίκος
Finally i made it!! Here it is: # = # Have 1:1 mapping of files <-> database records, delete spurious # ==

Re: Variables versus name bindings [Re: A certainl part of an if() structure never gets executed.]

2013-06-17 Thread Νίκος
Στις 18/6/2013 2:09 πμ, ο/η Steven D'Aprano έγραψε: {"a": "Hello world"} Do you see a memory location there? There is no memory location. There is the name, "a", and the object it is associated with, "Hello world". Either the dict, or the string, may move around memory if the underlying memory m

Re: Updating a filename's counter value failed each time

2013-06-17 Thread Steven D'Aprano
On Mon, 17 Jun 2013 19:39:16 +0300, Simpleton wrote: > Hello again, something simple this time: Have you read these links yet? http://sscce.org/‎ http://www.catb.org/esr/faqs/smart-questions.html‎ Especially the first one. Until you read it, and follow it's advice, I will not answer your ques

Re: Natural Language Processing with Python .dispersion_plot returns nothing

2013-06-17 Thread Steven D'Aprano
On Mon, 17 Jun 2013 09:31:18 -0700, sixtyfourbit wrote: > I'm in the first chapter of Natural Language Processing with Python and > am trying to run the example .dispersion_plot. I am using Python 2.7.4 > (Anaconda) on Mac OSX 10.8. > > When I load all of the necessary modules and try to create t

Re: Updating a filename's counter value failed each time

2013-06-17 Thread Νίκος
Στις 18/6/2013 1:22 πμ, ο/η MRAB έγραψε: On 17/06/2013 21:44, John Gordon wrote: In Alister writes: > #update file's counter if cookie does not exist cur.execute('''UPDATE > files SET hits = hits + 1, host = %s, lastvisit = > %s WHERE url = %s''', (host, lastvisit, filename) ) > > if cur.row

Re: Don't feed the troll...

2013-06-17 Thread Steven D'Aprano
On Mon, 17 Jun 2013 09:31:53 +0200, Antoon Pardon wrote: > Op 16-06-13 22:04, Steven D'Aprano schreef: >> On Sun, 16 Jun 2013 20:16:34 +0200, Antoon Pardon wrote: >> >>> You are trying to get it both ways. On the one hand you try to argue >>> that there are no boundaries >> I have never, ever argu

Re: Variables versus name bindings [Re: A certainl part of an if() structure never gets executed.]

2013-06-17 Thread Steven D'Aprano
On Mon, 17 Jun 2013 14:34:57 +0300, Simpleton wrote: > On 17/6/2013 9:51 πμ, Steven D'Aprano wrote: >> Now, in languages like Python, Ruby, Java, and many others, there is no >> table of memory addresses. Instead, there is a namespace, which is an >> association between some name and some value: >

Problems with Python documentation [Re: Don't feed the troll...]

2013-06-17 Thread Steven D'Aprano
On Mon, 17 Jun 2013 07:41:54 -0700, rurpy wrote: > On 06/17/2013 01:23 AM, Chris Angelico wrote: >> On Mon, Jun 17, 2013 at 3:04 PM, Ferrous Cranus >> wrote: >>> The only thing i'm feeling guilty is that instead of reading help >>> files and PEP's which seem too technical for me, i prefer the liv

Re: My son wants me to teach him Python

2013-06-17 Thread Ian Kelly
On Sun, Jun 16, 2013 at 3:55 AM, Cameron Simpson wrote: > On 14Jun2013 20:12, Dennis Lee Bieber wrote: > | [...] PowerShell has been > | available as a download on WinXP and standard on Win7 [PS 3 is a > | download for Win7, stock on real Win8]. > | While I'm not fluent in it, there are som

Re: Don't feed the troll...

2013-06-17 Thread Mark Lawrence
On 17/06/2013 15:41, ru...@yahoo.com wrote: It is NOT a matter of simply reading the documentation. I have posted here several times as have many others about some of the problems the documentation has, especially for people who don't already know Python. It's extremely easy to change the Pyt

Re: Updating a filename's counter value failed each time

2013-06-17 Thread MRAB
On 17/06/2013 21:44, John Gordon wrote: In Alister writes: > #update file's counter if cookie does not exist cur.execute('''UPDATE > files SET hits = hits + 1, host = %s, lastvisit = > %s WHERE url = %s''', (host, lastvisit, filename) ) > > if cur.rowcount: >print( " database has

Re: Variables versus name bindings [Re: A certainl part of an if() structure never gets executed.]

2013-06-17 Thread Terry Reedy
On 6/17/2013 1:17 PM, Νίκος wrote: On Mon, Jun 17, 2013 at 8:55 AM, Simpleton wrote: On 17/6/2013 5:22 μμ, Terry Reedy wrote: When you interpret Python code, do you put data in locations with integer addresses? I lost you here. Memory in biological brains is not a linear series of bits,

Re: Don't feed the troll...

2013-06-17 Thread Chris Angelico
On Tue, Jun 18, 2013 at 12:41 AM, wrote: > On 06/17/2013 01:23 AM, Chris Angelico wrote: >> On Mon, Jun 17, 2013 at 3:04 PM, Ferrous Cranus wrote: >>> The only thing i'm feeling guilty is that instead of reading help files and >>> PEP's which seem too technical for me, i prefer the live help of

Re: My son wants me to teach him Python

2013-06-17 Thread Alister
On Sun, 16 Jun 2013 15:33:29 -0700, Rick Johnson wrote: > On Sunday, June 16, 2013 4:52:16 PM UTC-5, Chris Angelico wrote: > >> Okay... I'm trying to get my head around what you've done here. Isn't >> it simply that you've made a way to, with what looks like a >> point-and-click interface, let th

Re: Updating a filename's counter value failed each time

2013-06-17 Thread John Gordon
In Alister writes: > > #update file's counter if cookie does not exist cur.execute('''UPDATE > > files SET hits = hits + 1, host = %s, lastvisit = > > %s WHERE url = %s''', (host, lastvisit, filename) ) > > > > if cur.rowcount: > > print( " database has been affected" ) > > > > ind

Re: Updating a filename's counter value failed each time

2013-06-17 Thread Alister
On Mon, 17 Jun 2013 20:26:57 +, Alister wrote: > On Mon, 17 Jun 2013 22:30:57 +0300, Νίκος wrote: > >> On 17/6/2013 10:05 μμ, Alister wrote: >>> You are correct Nicos, passing the values as a parameter list does >>> protect you from SQL injection JT has made an error. >> >> Even if the query

Re: Updating a filename's counter value failed each time

2013-06-17 Thread Alister
On Mon, 17 Jun 2013 20:44:03 +, John Gordon wrote: > In Alister > writes: > >> > #update file's counter if cookie does not exist cur.execute('''UPDATE >> > files SET hits = hits + 1, host = %s, lastvisit = >> > %s WHERE url = %s''', (host, lastvisit, filename) ) >> > >> > if cur.rowcount:

Re: Updating a filename's counter value failed each time

2013-06-17 Thread Alister
On Mon, 17 Jun 2013 22:28:47 +0300, Νίκος wrote: > On 17/6/2013 10:19 μμ, John Gordon wrote: >> Print the cur.rowcount attribute, which contains the number of rows >> that were affected by the update. If it's zero, that should tell you >> something. > > > #update file's counter if cookie does n

Re: Updating a filename's counter value failed each time

2013-06-17 Thread Alister
On Mon, 17 Jun 2013 19:16:02 +, Jens Thoms Toerring wrote: > MRAB wrote: >> On 17/06/2013 19:32, Jens Thoms Toerring wrote: >> > As I wrote you need *single* quotes around strings in SQL statements. >> > Double quotes won't do - this is SQL and not Python so you're dealing >> > with a differe

Re: Updating a filename's counter value failed each time

2013-06-17 Thread Alister
On Mon, 17 Jun 2013 22:30:57 +0300, Νίκος wrote: > On 17/6/2013 10:05 μμ, Alister wrote: >> You are correct Nicos, passing the values as a parameter list does >> protect you from SQL injection JT has made an error. > > Even if the query is somehting like: > > http://superhost.gr/cgi-bin/files.py

Re: Don't feed the troll...

2013-06-17 Thread Guy Scree
I recommend that all participants in this thread, especially Alex and Anton, research the term "Pathological Altruism" -- http://mail.python.org/mailman/listinfo/python-list

Re: Updating a filename's counter value failed each time

2013-06-17 Thread Νίκος
On 17/6/2013 10:05 μμ, Alister wrote: You are correct Nicos, passing the values as a parameter list does protect you from SQL injection JT has made an error. Even if the query is somehting like: http://superhost.gr/cgi-bin/files.py?filename="Select."; From what exactly the comma protects

Re: Updating a filename's counter value failed each time

2013-06-17 Thread Νίκος
On 17/6/2013 10:19 μμ, John Gordon wrote: Print the cur.rowcount attribute, which contains the number of rows that were affected by the update. If it's zero, that should tell you something. #update file's counter if cookie does not exist cur.execute('''UPDATE files SET hits = hits + 1, host =

Re: Updating a filename's counter value failed each time

2013-06-17 Thread John Gordon
In Simpleton writes: > if form.getvalue('filename'): > cur.execute('''UPDATE files SET hits = hits + 1, host = %s, lastvisit = > %s WHERE url = %s''', (host, lastvisit, filename) ) Add an 'else' statement above that prints something, so you will at least know if the UPDATE statement is e

Re: Updating a filename's counter value failed each time

2013-06-17 Thread Jens Thoms Toerring
MRAB wrote: > On 17/06/2013 19:32, Jens Thoms Toerring wrote: > > As I wrote you need *single* quotes around strings in > > SQL statements. Double quotes won't do - this is SQL > > and not Python so you're dealing with a different lan- > > guage and thus different rules apply. The triple single >

Re: Updating a filename's counter value failed each time

2013-06-17 Thread Alister
On Mon, 17 Jun 2013 21:06:16 +0300, Νίκος wrote: > > But the comma inside the execute statement doesn't protect me from such > actions opposed when i was using a substitute operator? You are correct Nicos, passing the values as a parameter list does protect you from SQL injection JT has made an

Re: Updating a filename's counter value failed each time

2013-06-17 Thread MRAB
On 17/06/2013 19:32, Jens Thoms Toerring wrote: Νίκος wrote: On 17/6/2013 8:54 μμ, Jens Thoms Toerring wrote: > Also take care to check the filename you insert - a malicous > user might cobble together a file name that is actually a SQL > statement and then do nasty things to your database. I.e

Re: Updating a filename's counter value failed each time

2013-06-17 Thread Jens Thoms Toerring
Νίκος wrote: > On 17/6/2013 8:54 μμ, Jens Thoms Toerring wrote: > > Also take care to check the filename you insert - a malicous > > user might cobble together a file name that is actually a SQL > > statement and then do nasty things to your database. I.e. never > > insert values you received from

Re: Updating a filename's counter value failed each time

2013-06-17 Thread Νίκος
On 17/6/2013 8:54 μμ, Jens Thoms Toerring wrote: Also take care to check the filename you insert - a malicous user might cobble together a file name that is actually a SQL statement and then do nasty things to your database. I.e. never insert values you received from a user without checking them.

Re: Using Python to automatically boot my computer at a specific time and play a podcast

2013-06-17 Thread Giorgos Tzampanakis
On 2013-06-16, C. N. Desrosiers wrote: > I'm planning to buy a Macbook Air and I want to use it as a sort of > alarm. I'd like to write a program that boots my computer at a specific > time, loads iTunes, and starts playing a podcast. Is this sort of thing > possible in Python? I would suggest

Re: Don't feed the troll...

2013-06-17 Thread rurpy
On 06/17/2013 02:15 AM, Antoon Pardon wrote: > Op 17-06-13 05:46, ru...@yahoo.com schreef: >> On 06/16/2013 02:04 PM, Steven D'Aprano wrote: >> >>> Yes. Trying to start flame wars with Nikos is unacceptable behaviour. It >>> is unproductive, it makes this a hostile, unpleasant place to be, it >>>

Re: Don't feed the troll...

2013-06-17 Thread Νίκος
On 17/6/2013 8:42 μμ, Oscar Benjamin wrote: On 17 June 2013 17:35, D'Arcy J.M. Cain wrote: On Mon, 17 Jun 2013 14:39:56 + (UTC) Grant Edwards wrote: I don't want _any_ copies from from Mailman. I don't subscribe to whatever mailing list you're talking about. I'm reading this via an NNTP

Re: Updating a filename's counter value failed each time

2013-06-17 Thread Jens Thoms Toerring
In article you wrote: > After a user selects a file from the form, that sleection of his can be > found form reading the variable 'filename' > If the filename already exists in to the database i want to update its > counter and that is what i'm trying to accomplish by: > --- > if form.

Re: Updating a filename's counter value failed each time

2013-06-17 Thread Νίκος
On 17/6/2013 8:40 μμ, MRAB wrote: On 17/06/2013 17:39, Simpleton wrote: Hello again, something simple this time: After a user selects a file from the form, that sleection of his can be found form reading the variable 'filename' If the filename already exists in to the database i want to update

Re: Updating a filename's counter value failed each time

2013-06-17 Thread John Gordon
In Simpleton writes: > Hello again, something simple this time: > After a user selects a file from the form, that sleection of his can be > found form reading the variable 'filename' > If the filename already exists in to the database i want to update its > counter and that is what i'm tryin

Re: Don't feed the troll...

2013-06-17 Thread Oscar Benjamin
On 17 June 2013 17:35, D'Arcy J.M. Cain wrote: > On Mon, 17 Jun 2013 14:39:56 + (UTC) > Grant Edwards wrote: >> I don't want _any_ copies from from Mailman. I don't subscribe to >> whatever mailing list you're talking about. I'm reading this via an >> NNTP server. Keep replies in the group

Re: Natural Language Processing with Python .dispersion_plot returns nothing

2013-06-17 Thread Peter Otten
sixtyfourbit wrote: > I'm in the first chapter of Natural Language Processing with Python and am > trying to run the example .dispersion_plot. I am using Python 2.7.4 > (Anaconda) on Mac OSX 10.8. > > When I load all of the necessary modules and try to create the dispersion > plott, I get no retu

Re: Updating a filename's counter value failed each time

2013-06-17 Thread MRAB
On 17/06/2013 17:39, Simpleton wrote: Hello again, something simple this time: After a user selects a file from the form, that sleection of his can be found form reading the variable 'filename' If the filename already exists in to the database i want to update its counter and that is what i'm t

Re: Variables versus name bindings [Re: A certainl part of an if() structure never gets executed.]

2013-06-17 Thread Νίκος
On 17/6/2013 7:23 μμ, Benjamin Kaplan wrote: On Mon, Jun 17, 2013 at 8:55 AM, Simpleton wrote: On 17/6/2013 5:22 μμ, Terry Reedy wrote: On 6/17/2013 7:34 AM, Simpleton wrote: On 17/6/2013 9:51 πμ, Steven D'Aprano wrote: Now, in languages like Python, Ruby, Java, and many others, there is

Re: Using Python to automatically boot my computer at a specific time and play a podcast

2013-06-17 Thread Irmen de Jong
On 17-6-2013 15:24, inq1ltd wrote: > On Sunday, June 16, 2013 12:06:08 PM C. N. Desrosiers wrote: > >> Hi, > >> > >> I'm planning to buy a Macbook Air and I want to use it as a sort of alarm. >> I'd like to write a program that boots my computer at a specific time, >> loads iTunes, and starts pl

Re: Natural Language Processing with Python .dispersion_plot returns nothing

2013-06-17 Thread sixtyfourbit
I let it run for 5-10 minutes. It's doing this no matter which text I try to run the dispersion plot on On Monday, June 17, 2013 12:38:58 PM UTC-4, John Gordon wrote: > In <05bb0af7-a20b-4b89-92bb-ff25ebd69...@googlegroups.com> sixtyfourbit > writes: > > > > > When I load all of the necess

Updating a filename's counter value failed each time

2013-06-17 Thread Simpleton
Hello again, something simple this time: After a user selects a file from the form, that sleection of his can be found form reading the variable 'filename' If the filename already exists in to the database i want to update its counter and that is what i'm trying to accomplish by: --

Re: Natural Language Processing with Python .dispersion_plot returns nothing

2013-06-17 Thread John Gordon
In <05bb0af7-a20b-4b89-92bb-ff25ebd69...@googlegroups.com> sixtyfourbit writes: > When I load all of the necessary modules and try to create the dispersion > plott, I get no return - no plot, no error message, not even a new >>> > prompt, just a blinking cursor under the last line I typed. How

Re: Don't feed the troll...

2013-06-17 Thread D'Arcy J.M. Cain
On Mon, 17 Jun 2013 14:39:56 + (UTC) Grant Edwards wrote: > I don't want _any_ copies from from Mailman. I don't subscribe to > whatever mailing list you're talking about. I'm reading this via an > NNTP server. Keep replies in the group or on the list. And that is part of the problem. I h

Natural Language Processing with Python .dispersion_plot returns nothing

2013-06-17 Thread sixtyfourbit
I'm in the first chapter of Natural Language Processing with Python and am trying to run the example .dispersion_plot. I am using Python 2.7.4 (Anaconda) on Mac OSX 10.8. When I load all of the necessary modules and try to create the dispersion plott, I get no return - no plot, no error message

Re: Variables versus name bindings [Re: A certainl part of an if() structure never gets executed.]

2013-06-17 Thread Benjamin Kaplan
On Mon, Jun 17, 2013 at 8:55 AM, Simpleton wrote: > On 17/6/2013 5:22 μμ, Terry Reedy wrote: >> >> On 6/17/2013 7:34 AM, Simpleton wrote: >>> >>> On 17/6/2013 9:51 πμ, Steven D'Aprano wrote: Now, in languages like Python, Ruby, Java, and many others, there is no table of memory addr

Re: Variables versus name bindings [Re: A certainl part of an if() structure never gets executed.]

2013-06-17 Thread Joel Goldstick
On Mon, Jun 17, 2013 at 11:55 AM, Simpleton wrote: > On 17/6/2013 5:22 μμ, Terry Reedy wrote: > >> On 6/17/2013 7:34 AM, Simpleton wrote: >> >>> On 17/6/2013 9:51 πμ, Steven D'Aprano wrote: >>> Now, in languages like Python, Ruby, Java, and many others, there is no table of memory addre

Re: Don't feed the troll...

2013-06-17 Thread Simpleton
On 17/6/2013 7:14 μμ, Grant Edwards wrote: But failing _isn't_ inevitible. If you take the time to actually learn Python by reading the references people provide, by studying small examples, and by experimenting with Python code, there's no reason why you should fail. I'am and i feel better ex

Re: Don't feed the troll...

2013-06-17 Thread Grant Edwards
On 2013-06-17, Simpleton wrote: > On 16/6/2013 9:39 , Antoon Pardon wrote: >> If nikos's project was a college project we would have told >> him he has to make his homework himself. > > This is where you all mistaken. > > You see, my website could be done ina CMS like (Joomla or Drupal) or >

Re: Don't feed the troll...

2013-06-17 Thread Simpleton
On 16/6/2013 9:39 μμ, Antoon Pardon wrote: If nikos's project was a college project we would have told him he has to make his homework himself. This is where you all mistaken. You see, my website could be done ina CMS like (Joomla or Drupal) or even in DreamWeaver. I choosed Python because

Re: Variables versus name bindings [Re: A certainl part of an if() structure never gets executed.]

2013-06-17 Thread Simpleton
On 17/6/2013 5:22 μμ, Terry Reedy wrote: On 6/17/2013 7:34 AM, Simpleton wrote: On 17/6/2013 9:51 πμ, Steven D'Aprano wrote: Now, in languages like Python, Ruby, Java, and many others, there is no table of memory addresses. Instead, there is a namespace, which is an association between some nam

Re: Variables versus name bindings [Re: A certainl part of an if() structure never gets executed.]

2013-06-17 Thread Simpleton
On 17/6/2013 2:58 μμ, Michael Torrie wrote: In python just think of assignment as making a name *be* an object. And if you assign one name to another name, that makes both names be the same object. When names are unbound (either they go out of scope or you manually unbind them), the objects the

Re: Don't feed the troll...

2013-06-17 Thread Joel Goldstick
On Sun, Jun 16, 2013 at 2:39 PM, Antoon Pardon wrote: > Op 15-06-13 21:54, ru...@yahoo.com schreef: > > On 06/15/2013 12:18 PM, rusi wrote: >> >>> On Jun 15, 10:52 pm, Steven D'Aprano>> +comp.lang.pyt...@pearwood.**info > >>> wrote: >>> On Sat, 15 Jun 2013 10:36:00 -0700, rusi wrote:

Re: Using Python to automatically boot my computer at a specific time and play a podcast

2013-06-17 Thread Lefavor, Matthew (GSFC-582.0)[MICROTEL LLC]
And as for launching iTunes and playing a Podcast, you should take a look at AppleScript. AppleScript is designed specifically for running and controlling Mac OS X applications—iTunes among them. (I once wrote a script to sync my iTunes play counts from last.fm, for example.) You might also loo

Re: Don't feed the troll...

2013-06-17 Thread Antoon Pardon
Op 15-06-13 21:54, ru...@yahoo.com schreef: On 06/15/2013 12:18 PM, rusi wrote: On Jun 15, 10:52 pm, Steven D'Aprano wrote: On Sat, 15 Jun 2013 10:36:00 -0700, rusi wrote: With you as our spamming-guru, Onward! Sky is the limit! If you're going to continue making unproductive, off-topic, in

Re: RFD: rename comp.lang.python to comp.support.superhost

2013-06-17 Thread Antoon Pardon
Op 15-06-13 19:51, Steven D'Aprano schreef: On Sat, 15 Jun 2013 18:43:42 +0100, Mark Lawrence wrote: A classic example of the pot calling the kettle black. If you're going to continue making unproductive, off-topic, inflammatory posts that prolong these already excessively large threads, Niko

Re: Don't feed the troll...

2013-06-17 Thread D'Arcy J.M. Cain
On 15 Jun 2013 15:40:35 GMT Steven D'Aprano wrote: > On Sat, 15 Jun 2013 07:58:27 -0400, D'Arcy J.M. Cain wrote: > > I suggested including the poster that you are replying to. > > In the name of all that's good and decent in the world, why on earth > would you do that when replying to a mailing

Re: Why 'files.py' does not print the filenames into a table format?

2013-06-17 Thread Grant Edwards
On 2013-06-15, Nick the Gr33k wrote: > On 15/6/2013 10:46 ??, Jarrod Henry wrote: >> Nick, at this point, you need to hire someone to do your work for you. > > The code is completely ready. OK. Good-bye then. -- Grant Edwards grant.b.edwardsYow! Th' MIND is the Pizza

Re: Don't feed the troll...

2013-06-17 Thread rurpy
On 06/17/2013 01:23 AM, Chris Angelico wrote: > On Mon, Jun 17, 2013 at 3:04 PM, Ferrous Cranus wrote: >> The only thing i'm feeling guilty is that instead of reading help files and >> PEP's which seem too technical for me, i prefer the live help of an actual >> expert human being. > > This is de

Re: Don't feed the troll...

2013-06-17 Thread Grant Edwards
On 2013-06-15, Chris ???Kwpolska??? Warrick wrote: > On Sat, Jun 15, 2013 at 5:40 PM, Steven D'Aprano > wrote: >> On Sat, 15 Jun 2013 07:58:27 -0400, D'Arcy J.M. Cain wrote: >> >>> I suggested including the poster that you are replying to. >> >> In the name of all that's good and decent in the wor

Re: Variables versus name bindings [Re: A certainl part of an if() structure never gets executed.]

2013-06-17 Thread Terry Reedy
On 6/17/2013 7:34 AM, Simpleton wrote: On 17/6/2013 9:51 πμ, Steven D'Aprano wrote: Now, in languages like Python, Ruby, Java, and many others, there is no table of memory addresses. Instead, there is a namespace, which is an association between some name and some value: global namespace:

Re: Using Python to automatically boot my computer at a specific time and play a podcast

2013-06-17 Thread inq1ltd
On Sunday, June 16, 2013 12:06:08 PM C. N. Desrosiers wrote: > Hi, > > I'm planning to buy a Macbook Air and I want to use it as a sort of alarm. > I'd like to write a program that boots my computer at a specific time, > loads iTunes, and starts playing a podcast. Is this sort of thing possible

Re: Variables versus name bindings [Re: A certainl part of an if() structure never gets executed.]

2013-06-17 Thread Michael Torrie
On 06/17/2013 05:34 AM, Simpleton wrote: > So is it safe to say that in Python a == &a ? (& stands for memory address) > > is the above correct? It might be partially equivalent inside the interpreter, but it's not something you should concern yourself with. And in general, no it's not safe to s

ANN: Python Meeting Düsseldorf - 16.07.2013

2013-06-17 Thread eGenix Team: M.-A. Lemburg
[This announcement is in German since it targets a local user group meeting in Düsseldorf, Germany] ANKÜNDIGUNG Python Meeting Düsseldorf http://pyddf.de/ Ein Treffen v

Re: Variables versus name bindings [Re: A certainl part of an if() structure never gets executed.]

2013-06-17 Thread Simpleton
On 17/6/2013 9:51 πμ, Steven D'Aprano wrote: Now, in languages like Python, Ruby, Java, and many others, there is no table of memory addresses. Instead, there is a namespace, which is an association between some name and some value: global namespace: x --> 23 y --> "hello world" Firs

Re: Python API

2013-06-17 Thread python27
On Monday, June 17, 2013 2:38:56 PM UTC+8, Ganesh Pandi wrote: > Hi > > What are all the python api, u used in your python programming, we > used more api but may we forgot those, so i just want to list down the api we > familiar aboutplease add your replies... you s

Re: Why 'files.py' does not print the filenames into a table format?

2013-06-17 Thread Simpleton
On 17/6/2013 12:07 μμ, Simpleton wrote: On 17/6/2013 10:00 πμ, Steven D'Aprano wrote: On Mon, 17 Jun 2013 09:11:05 +0300, Νίκος wrote: everything work as expected but not the part when the counter of a filename gets increased when the file have been requested. I don't see how since: if filen

Re: Why 'files.py' does not print the filenames into a table format?

2013-06-17 Thread Simpleton
On 17/6/2013 12:07 μμ, Simpleton wrote: # Load'em for filename in filenames: try: # Check the presence of current filename against it's database presence cur.execute('''SELECT url FROM files WHERE url = %s''', filename ) data = cur.fetchone() if not data:

Re: Why 'files.py' does not print the filenames into a table format?

2013-06-17 Thread Simpleton
On 17/6/2013 10:00 πμ, Steven D'Aprano wrote: On Mon, 17 Jun 2013 09:11:05 +0300, Νίκος wrote: everything work as expected but not the part when the counter of a filename gets increased when the file have been requested. I don't see how since: if filename: #update file counter

Re: A certainl part of an if() structure never gets executed.

2013-06-17 Thread Michael Weylandt
On Jun 17, 2013, at 6:17, Νίκος wrote: > On 16/6/2013 9:53 μμ, R. Michael Weylandt wrote: >> On Sun, Jun 16, 2013 at 2:47 PM, Ferrous Cranus wrote: >>> On 16/6/2013 2:13 μμ, Jussi Piitulainen wrote: If, instead of the above, you have a = 6 b = a b = 5

Re: A few questiosn about encoding

2013-06-17 Thread Antoon Pardon
Op 17-06-13 09:08, Cameron Simpson schreef: > On 17Jun2013 08:49, Antoon Pardon wrote: > | Op 15-06-13 02:28, Cameron Simpson schreef: > | > On 14Jun2013 15:59, Nikos as SuperHost Support > wrote: > | > | So, a numeral = a string representation of a number. Is this correct? > | > > | > No, a num

Re: A few questiosn about encoding

2013-06-17 Thread Antoon Pardon
Op 17-06-13 09:08, Cameron Simpson schreef: > On 17Jun2013 08:49, Antoon Pardon wrote: > | Op 15-06-13 02:28, Cameron Simpson schreef: > | > On 14Jun2013 15:59, Nikos as SuperHost Support > wrote: > | > | So, a numeral = a string representation of a number. Is this correct? > | > > | > No, a num

Re: Don't feed the troll...

2013-06-17 Thread Antoon Pardon
Op 17-06-13 07:04, Ferrous Cranus schreef: > On 17/6/2013 6:46 πμ, ru...@yahoo.com wrote: >> I could be wrong but I don't think Nikos is a pure troll -- >> someone motivated purely by provoking reaction and discord. >> He has a real website and his problems with Python seem like >> genuine problem

Re: Don't feed the troll...

2013-06-17 Thread Antoon Pardon
Op 17-06-13 05:46, ru...@yahoo.com schreef: > On 06/16/2013 02:04 PM, Steven D'Aprano wrote: > >> Yes. Trying to start flame wars with Nikos is unacceptable behaviour. It >> is unproductive, it makes this a hostile, unpleasant place to be, it >> ruins the environment for the rest of the community

Re: Don't feed the troll...

2013-06-17 Thread Antoon Pardon
Op 16-06-13 22:04, Steven D'Aprano schreef: > On Sun, 16 Jun 2013 20:16:34 +0200, Antoon Pardon wrote: > >> You are trying to get it both ways. On the one hand you try to argue >> that there are no boundaries > I have never, ever argued that there are no boundaries. I have repeatedly > made it cl

Re: Don't feed the troll...

2013-06-17 Thread Chris Angelico
On Mon, Jun 17, 2013 at 3:04 PM, Ferrous Cranus wrote: > The only thing i'm feeling guilty is that instead of reading help files and > PEP's which seem too technical for me, i prefer the live help of an actual > expert human being. > This is definitely a reason to feel guilty. You are asking peo

Re: A few questiosn about encoding

2013-06-17 Thread Cameron Simpson
On 17Jun2013 08:49, Antoon Pardon wrote: | Op 15-06-13 02:28, Cameron Simpson schreef: | > On 14Jun2013 15:59, Nikos as SuperHost Support wrote: | > | So, a numeral = a string representation of a number. Is this correct? | > | > No, a numeral is an individual digit from the string representation

Re: Why 'files.py' does not print the filenames into a table format?

2013-06-17 Thread Steven D'Aprano
On Mon, 17 Jun 2013 09:11:05 +0300, Νίκος wrote: > everything work as expected but not the part when the counter of a > filename gets increased when the file have been requested. > > I don't see how since: > > if filename: > #update file counter > cur.execute('''UPDATE files SET hits