Re: Python was designed (was Re: Multi-threading in Python vs Java)

2013-10-26 Thread Steven D'Aprano
On Fri, 25 Oct 2013 01:12:12 -0700, Peter Cacioppi wrote: On Monday, October 21, 2013 9:29:34 PM UTC-5, Steven D'Aprano wrote: On Mon, 21 Oct 2013 01:43:52 -0700, Peter Cacioppi wrote: Challenge: give some examples of things which you can do in Python, but cannot do *at all* in C, C++, C#,

Re: Python was designed (was Re: Multi-threading in Python vs Java)

2013-10-26 Thread Chris Angelico
On Sat, Oct 26, 2013 at 5:19 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: C does not natively provide garbage collection, or exceptions, or many other features. But that doesn't make it *impossible* to use these features in C, it just makes them *inconvenient and difficult*.

Re: Python was designed (was Re: Multi-threading in Python vs Java)

2013-10-26 Thread Peter Cacioppi
Steven said - In a very real sense, Python is just a convenience wrapper around a bunch of C functions to provide OOP idioms, garbage collection, dynamic typing, runtime introspection, exceptions, and similar. I can't really disagree with you in a factual sense, but somehow it doesn't really

Re: Processing large CSV files - how to maximise throughput?

2013-10-26 Thread Walter Hurry
On Thu, 24 Oct 2013 18:38:21 -0700, Victor Hooi wrote: Hi, We have a directory of large CSV files that we'd like to process in Python. We process each input CSV, then generate a corresponding output CSV file. input CSV - munging text, lookups etc. - output CSV My question is,

Obfuscated factorial

2013-10-26 Thread Steven D'Aprano
Just for fun: class Numberator: def __init__(self, number): self.__number = number def evaluate(self): return self.__number class Multiplier: def __init__(self, multiplier, multiplicand): self.multiplier = multiplier self.multiplicand = multiplicand

Re: Don't use default Google Group client (was re:....)

2013-10-26 Thread rusi
On Saturday, October 26, 2013 8:10:16 AM UTC+5:30, Steven D'Aprano wrote: Your personal attacks are not appreciated. Why can you not accept that people who post using GG's defaults cause pain and difficulty to many -- probably the great majority -- of readers who use either the mailing list

Cookie issue(cant fix it with anyhting)

2013-10-26 Thread Nick the Gr33k
Hello i having the following code to try and retrieve the visitor's saved cookie form the browser. [CODE] # initialize cookie and retrieve cookie from clients browser try: cookie = cookies.SimpleCookie( os.environ['HTTP_COOKIE'] ) cookieID = cookie['name'].value except: cookieID =

Re: Obfuscated factorial

2013-10-26 Thread Vito De Tullio
Steven D'Aprano wrote: Just for fun: [...] you miss a FactoryFactory and a couple of *Manager. Oh, and it should be xml-config-driven. -- By ZeD -- https://mail.python.org/mailman/listinfo/python-list

Re: Don't use default Google Group client

2013-10-26 Thread Ben Finney
rusi rustompm...@gmail.com writes: On Saturday, October 26, 2013 8:10:16 AM UTC+5:30, Steven D'Aprano wrote: Do you really intend to say that we have no right to complain about how difficult Google Groups makes it for us? I think you are mixing up cause and effect, symptom and disease,

Re: Obfuscated factorial

2013-10-26 Thread Chris Angelico
On Sat, Oct 26, 2013 at 11:50 PM, Vito De Tullio vito.detul...@gmail.com wrote: you miss a FactoryFactory and a couple of *Manager. Oh, and it should be xml-config-driven. Or a metaclass and a few decorators. They're inherently Pythonic, right? ChrisA --

Cookie fucking problem

2013-10-26 Thread Nick the Gr33k
Hello i having the following code to try and retrieve the visitor's saved cookie form the browser. [CODE] # initialize cookie and retrieve cookie from clients browser try: cookie = cookies.SimpleCookie( os.environ['HTTP_COOKIE'] ) cookieID = cookie['name'].value except: cookieID =

Re: Cookie issue(cant fix it with anyhting)

2013-10-26 Thread Chris Angelico
On Sat, Oct 26, 2013 at 11:29 PM, Nick the Gr33k nikos.gr...@gmail.com wrote: Can somebody explain why this is happening? SONG--ERNEST [1] Were I a king in very truth, And had a son--a guileless youth-- In probable succession;

Re: Cookie fucking problem

2013-10-26 Thread Chris Angelico
Oh! Now you have a quite different problem. I'm sure your email spam will have plenty of offers from lovely ladies who are willing to satisfy your needs, you really don't want to be getting intimate with cookies. And if that's not what you meant, then kindly refrain from posting duplicate threads

Re: Cookie fucking problem

2013-10-26 Thread Ben Finney
Nick the Gr33k nikos.gr...@gmail.com writes: Hello i having the following code to try and retrieve the visitor's saved cookie form the browser. The fact that you've posted Python code does not make this a Python question. Your issue is with HTTP cookies, as you have been told several times.

Re: Cookie fucking problem

2013-10-26 Thread Yaşar Arabacı
I didn't follow the thread, I am sorry if this is duplicate, but don't catch all Exceptions, catch only the ones you expect, so that you can identify unexpected errors: cookie = cookies.SimpleCookie( os.environ['HTTP_COOKIE'] ) try: cookieID = cookie['name'].value except

Printing a drop down menu for a specific field.

2013-10-26 Thread Nick the Gr33k
[QUOTE=turvey]Say your data is like the following: data = [('alice', 1), ('alice', 2), ('bob', 5), ('bob', 10), ('carrie', 3)] Where the first entry is your user and the second entry is a timestamp. Your data is structured basically like this, except I stripped the irrelevant details. [CODE]

Re: Cookie fucking problem

2013-10-26 Thread Mark Lawrence
On 26/10/2013 14:27, Nick the Gr33k wrote: Buy a sex manual. -- Python is the second best programming language in the world. But the best has yet to be invented. Christian Tismer Mark Lawrence -- https://mail.python.org/mailman/listinfo/python-list

Re: Don't use default Google Group client (was re:....)

2013-10-26 Thread rurpy
On 10/25/2013 06:25 PM, Chris Angelico wrote: On Sat, Oct 26, 2013 at 10:44 AM, ru...@yahoo.com wrote: Peter, you can ignore Terry's advice if Google Groups works for you. There are a small number of Google haters here who seem larger due to their obnoxious noisiness. I've been using Google

Re: Cookie fucking problem

2013-10-26 Thread Nick the Gr33k
Στις 26/10/2013 5:34 μμ, ο/η Mark Lawrence έγραψε: On 26/10/2013 14:27, Nick the Gr33k wrote: Buy a sex manual. No need, i can practice with your mother. -- What is now proved was at first only imagined! WebHost http://superhost.gr -- https://mail.python.org/mailman/listinfo/python-list

Re: Don't use default Google Group client (was re:....)

2013-10-26 Thread rurpy
On 10/25/2013 06:19 PM, Mark Lawrence wrote: On 26/10/2013 00:44, ru...@yahoo.com wrote: On 10/25/2013 02:05 PM, Terry Reedy wrote: On 10/25/2013 2:57 PM, Peter Cacioppi wrote: The default Google Group client is notoriously cruddy with quotes attribution. So don't use it. Get any decent

Re: Don't use default Google Group client (was re:....)

2013-10-26 Thread rurpy
On 10/25/2013 06:35 PM, Terry Reedy wrote: On 10/25/2013 7:44 PM, ru...@yahoo.com wrote: On 10/25/2013 02:05 PM, Terry Reedy wrote: On 10/25/2013 2:57 PM, Peter Cacioppi wrote: The default Google Group client is notoriously cruddy with quotes attribution. So don't use it. Get any decent

Re: Don't use default Google Group client (was re:....)

2013-10-26 Thread rurpy
On 10/25/2013 08:40 PM, Steven D'Aprano wrote: On Fri, 25 Oct 2013 16:44:45 -0700, rurpy wrote: On 10/25/2013 02:05 PM, Terry Reedy wrote: On 10/25/2013 2:57 PM, Peter Cacioppi wrote: The default Google Group client is notoriously cruddy with quotes attribution. So don't use it. Get any

Re: Don't use default Google Group client (was re:....)

2013-10-26 Thread rurpy
On 10/26/2013 06:15 AM, rusi wrote: [...] Google-groups consist of the 'children-population' (so to speak); newsgroups etc consist of the adult population with some exceptions. The appropriate way of dealing with children is not to say Dont be children! but to say This kind of behavior is

Re: Cookie fucking problem

2013-10-26 Thread Mark Lawrence
On 26/10/2013 15:55, Nick the Gr33k wrote: Στις 26/10/2013 5:34 μμ, ο/η Mark Lawrence έγραψε: On 26/10/2013 14:27, Nick the Gr33k wrote: Buy a sex manual. No need, i can practice with your mother. An interesting combination of stupid, tight fisted and a necrophiliac. -- Python is the

Re: Cookie fucking problem

2013-10-26 Thread Nick the Gr33k
Στις 26/10/2013 6:21 μμ, ο/η Mark Lawrence έγραψε: On 26/10/2013 15:55, Nick the Gr33k wrote: Στις 26/10/2013 5:34 μμ, ο/η Mark Lawrence έγραψε: On 26/10/2013 14:27, Nick the Gr33k wrote: Buy a sex manual. No need, i can practice with your mother. An interesting combination of stupid,

Re: Obfuscated factorial

2013-10-26 Thread Joshua Landau
On 26 October 2013 12:55, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Just for fun: ... for i in range(16): print(i, FactorialBuilder(i).build().calculate()) Python already supports the factorial operator, -ⵘ. You just have to import it. # Import statement ⵘ =

Re: Obfuscated factorial

2013-10-26 Thread Tim Chase
On 2013-10-27 00:26, Chris Angelico wrote: On Sat, Oct 26, 2013 at 11:50 PM, Vito De Tullio vito.detul...@gmail.com wrote: you miss a FactoryFactory and a couple of *Manager. Oh, and it should be xml-config-driven. Or a metaclass and a few decorators. They're inherently Pythonic,

Logging timezones

2013-10-26 Thread Joseph L. Casale
The default converter attribute uses localtime, but often under windows when I add an additional logger, create a new file handler and set a formatter the time switches to utc. Obviously redefining a new converter class does nothing as the default is what I wanted to start with, localtime.

Re: Don't use default Google Group client (was re:....)

2013-10-26 Thread Mark Lawrence
On 26/10/2013 15:58, ru...@yahoo.com wrote: That's odd, because in https://groups.google.com/d/msg/comp.lang.python/FFAe5sJ7kQ4/GmDtHitY50QJ I responded to a direct question from you about problems with Thunderbird. If you mean instead that because *you've* experienced no problems, then

Re: decorators and mangled names for private methods

2013-10-26 Thread Tim Chase
On 2013-10-25 22:01, Peter Otten wrote: from functools import wraps class require_keys: def __init__(self, *keys): self.keys = keys def __call__(decorator_self, fn): @wraps(fn) def result_fn(method_self, *args, **kwargs): # import pdb; pdb.set_trace()

Re: Printing a drop down menu for a specific field.

2013-10-26 Thread Nick the Gr33k
Στις 26/10/2013 5:10 μμ, ο/η Nick the Gr33k έγραψε: [QUOTE=turvey]Say your data is like the following: data = [('alice', 1), ('alice', 2), ('bob', 5), ('bob', 10), ('carrie', 3)] Where the first entry is your user and the second entry is a timestamp. Your data is structured basically like this,

Re: Cookie issue(cant fix it with anyhting)

2013-10-26 Thread Steven D'Aprano
On Sat, 26 Oct 2013 15:29:52 +0300, Nick the Gr33k wrote: Can somebody explain why this is happening? It is the same answer that you were told the last time you asked this question, and the previous time you asked this question. And it will be the same answer the next time you ask. --

Re: Cookie fucking problem

2013-10-26 Thread Mark Lawrence
On 26/10/2013 16:25, Nick the Gr33k wrote: Στις 26/10/2013 6:21 μμ, ο/η Mark Lawrence έγραψε: On 26/10/2013 15:55, Nick the Gr33k wrote: Στις 26/10/2013 5:34 μμ, ο/η Mark Lawrence έγραψε: On 26/10/2013 14:27, Nick the Gr33k wrote: Buy a sex manual. No need, i can practice with your mother.

Re: Cookie fucking problem

2013-10-26 Thread Ned Batchelder
On 10/26/13 11:21 AM, Mark Lawrence wrote: On 26/10/2013 15:55, Nick the Gr33k wrote: Στις 26/10/2013 5:34 μμ, ο/η Mark Lawrence έγραψε: On 26/10/2013 14:27, Nick the Gr33k wrote: Buy a sex manual. No need, i can practice with your mother. An interesting combination of stupid, tight

Re: Cookie fucking problem

2013-10-26 Thread Steven D'Aprano
On Sat, 26 Oct 2013 16:27:03 +0300, Nick the Gr33k wrote: Can somebody explain why this is happening? Yes, anyone who reads the answer that was given the first time you asked this question will be able to explain why this is happening. The answer hasn't changed from the first time you asked,

Re: Cookie fucking problem

2013-10-26 Thread Steven D'Aprano
On Sat, 26 Oct 2013 15:34:23 +0100, Mark Lawrence wrote: On 26/10/2013 14:27, Nick the Gr33k wrote: Buy a sex manual. Mark, please resist the urge to bait Nick with insults. As entertaining as they may be, they don't actually help reduce the problem. -- Steven --

Re: Cookie fucking problem

2013-10-26 Thread rusi
On Saturday, October 26, 2013 9:20:40 PM UTC+5:30, Mark Lawrence wrote: I could almost feel sorry for you. But the more of your time I waste the longer it'll take you to get your website working. Did you ever stop to think about that? Or are you too busy trolling hundreds of other

Re: Cookie fucking problem

2013-10-26 Thread Mark Lawrence
On 26/10/2013 17:00, Steven D'Aprano wrote: On Sat, 26 Oct 2013 15:34:23 +0100, Mark Lawrence wrote: On 26/10/2013 14:27, Nick the Gr33k wrote: Buy a sex manual. Mark, please resist the urge to bait Nick with insults. As entertaining as they may be, they don't actually help reduce the

Re: Printing a drop down menu for a specific field.

2013-10-26 Thread Steven D'Aprano
On Sat, 26 Oct 2013 18:40:52 +0300, Nick the Gr33k wrote: Can someone write this properly? i tried but cannot make it work. Start by writing down what problem you are trying to solve with this code, and what you expect the code to do. In detail. What input data does it take, what result

Re: Cookie fucking problem

2013-10-26 Thread Mark Lawrence
On 26/10/2013 17:05, rusi wrote: On Saturday, October 26, 2013 9:20:40 PM UTC+5:30, Mark Lawrence wrote: I could almost feel sorry for you. But the more of your time I waste the longer it'll take you to get your website working. Did you ever stop to think about that? Or are you too busy

Re: Sexism in the Ruby community: how does the Python community manage it?

2013-10-26 Thread Steven D'Aprano
On Wed, 16 Oct 2013 23:13:33 -0400, Owen Jacobson wrote: Last week, Elad Maidar wrote a fairly short but readable opinion piece[0] illustrating some long-standing social problems in the Ruby community, [...] Well, this has been a big disappointment. The author of this post, Owen Jacobson,

Re: Python was designed

2013-10-26 Thread Paul Rubin
Peter Cacioppi peter.cacio...@gmail.com writes: Challenge: give some examples of things which you can do in Python, but cannot do *at all* in C, C++, C#, Java? Please. No exceptions is huge. No garbage collection is huge. But you can do anything with a Turing machine. ... Lumping C, C++,

Re: Don't use default Google Group client (was re:....)

2013-10-26 Thread Steven D'Aprano
On Sat, 26 Oct 2013 08:05:27 -0700, rurpy wrote: On 10/25/2013 08:40 PM, Steven D'Aprano wrote: [...] However, looking now, I see you pointed out that Peter originally cross-posted his two messages to four groups: I think you are confused. I haven't said anything about Peter Cacioppi

Check if this basic Python script is coded right

2013-10-26 Thread HC
I'm doing my first year in university and I need help with this basic assignment. Assignment: Write Python script that prints sum of cubes of numbers between 0-200 that are multiples of 3. 3^3+6^3+9^3+12^3+198^3=? My script: count = 0 answer = 0 while count200: if count%3==0:

Re: Check if this basic Python script is coded right

2013-10-26 Thread Joel Goldstick
On Sat, Oct 26, 2013 at 1:36 PM, HC hik...@jafarli.net wrote: I'm doing my first year in university and I need help with this basic assignment. Assignment: Write Python script that prints sum of cubes of numbers between 0-200 that are multiples of 3. 3^3+6^3+9^3+12^3+198^3=? My

Re: Check if this basic Python script is coded right

2013-10-26 Thread Mark Lawrence
On 26/10/2013 18:36, HC wrote: I'm doing my first year in university and I need help with this basic assignment. Assignment: Write Python script that prints sum of cubes of numbers between 0-200 that are multiples of 3. 3^3+6^3+9^3+12^3+198^3=? My script: count = 0 answer = 0 while

Re: Check if this basic Python script is coded right

2013-10-26 Thread John Ladasky
HC, you have come straight out and told us honestly that you are seeking help with homework. That is refreshing. You should know that people in programming newsgroups generally do not want to do your homework for you. Many of us are willing to teach you HOW to program, but that's different

Re: Check if this basic Python script is coded right

2013-10-26 Thread MRAB
On 26/10/2013 18:36, HC wrote: I'm doing my first year in university and I need help with this basic assignment. Assignment: Write Python script that prints sum of cubes of numbers between 0-200 that are multiples of 3. 3^3+6^3+9^3+12^3+198^3=? My script: count = 0 answer = 0 while

Re: Printing a drop down menu for a specific field.

2013-10-26 Thread rurpy
On 10/20/2013 05:30 PM, Νίκος Αλεξόπουλος wrote: try: cur.execute( '''SELECT host, city, useros, browser, ref, hits, lastvisit FROM visitors WHERE counterID = (SELECT ID FROM counters WHERE url = %s) ORDER BY lastvisit DESC''', page ) data = cur.fetchall()

Python on a MacBook Pro (not my machine)

2013-10-26 Thread John Ladasky
Hi folks, My side job as a Python tutor continues to grow. In two weeks, I will start working with a high-school student who owns a MacBook Pro. I have had students with Linux systems (my preference) and Windows systems before, but not Macs. On my first visit, I set up each student's

status of new python.org

2013-10-26 Thread Joaquin Abian
Is there any updated roadmap/schedule for the new python.org site ? It has been in beta mode at http://preview.python.org/ for several months but I can not find in there any indication of the progress or the possible date for publishing it. Most paragraphs are still with Lore Ipsum. --

Re: Don't use default Google Group client (was re:....)

2013-10-26 Thread Chris Angelico
On Sat, Oct 26, 2013 at 11:15 PM, rusi rustompm...@gmail.com wrote: tl;dr I think Mark's scoldings in this regard will work if they come not just from him but from any and every one. They are likely to have a larger subscription if you would agree to change: Dont use GG!! to Users of GG

Re: Cookie aint retrieving when visiting happens from a backlink.

2013-10-26 Thread Antoon Pardon
Op 25-10-13 17:04, Nick the Gr33k schreef: Στις 25/10/2013 5:21 μμ, ο/η Mark Lawrence έγραψε: On 25/10/2013 13:54, Nick the Gr33k wrote: Στις 25/10/2013 3:35 μμ, ο/η Chris Angelico έγραψε: On Fri, Oct 25, 2013 at 11:20 PM, Nick the Gr33k nikos.gr...@gmail.com wrote: Στις 25/10/2013 3:11 μμ,

Re: Cookie (expletive) problem

2013-10-26 Thread Zero Piraeus
: On Sat, Oct 26, 2013 at 04:27:03PM +0300, Nick the Gr33k wrote: [... the same thing, yet again, with added profanity ...] Stop that right now. You have been told repeatedly: 1. That this is the wrong forum to address your problem. 2. What other avenues to explore to fix it. 3. To stop

Re: Obfuscated factorial

2013-10-26 Thread Gene Heskett
On Saturday 26 October 2013 10:12:33 Steven D'Aprano did opine: Just for fun: class Numberator: def __init__(self, number): self.__number = number def evaluate(self): return self.__number class Multiplier: def __init__(self, multiplier, multiplicand):

Re: Cookie fucking problem

2013-10-26 Thread Antoon Pardon
Op 26-10-13 18:00, Steven D'Aprano schreef: On Sat, 26 Oct 2013 15:34:23 +0100, Mark Lawrence wrote: On 26/10/2013 14:27, Nick the Gr33k wrote: Buy a sex manual. Mark, please resist the urge to bait Nick with insults. As entertaining as they may be, they don't actually help reduce the

Re: Cookie fucking problem

2013-10-26 Thread Antoon Pardon
Op 26-10-13 18:19, Mark Lawrence schreef: On 26/10/2013 17:00, Steven D'Aprano wrote: On Sat, 26 Oct 2013 15:34:23 +0100, Mark Lawrence wrote: On 26/10/2013 14:27, Nick the Gr33k wrote: Buy a sex manual. Mark, please resist the urge to bait Nick with insults. As entertaining as they may

Re: Python was designed (was Re: Multi-threading in Python vs Java)

2013-10-26 Thread Peter Cacioppi
Paul Rubin said: FYI, there is real though imprecise garbage collection for C. Web search for Boehm garbage collection should find more info Very interesting. This wasn't around the last time I launched a C/C++ project from scratch. Thanks for the tip. I have to admit, off the top of my head

Re: Cookie xxxxing problem

2013-10-26 Thread Stephan Vladimir Bugaj
I rarely ever post here. But I wanted to say that people responding to this Nikos troll makes reading this list a nuisance. You've never ever been successful in convincing him to behave, and it's been going on for quite a while now. I remain subscribed for occasional interesting new idioms

Re: Check if this basic Python script is coded right

2013-10-26 Thread Terry Reedy
On 10/26/2013 2:20 PM, MRAB wrote: On 26/10/2013 18:36, HC wrote: I'm doing my first year in university and I need help with this basic assignment. Assignment: Write Python script that prints sum of cubes of numbers between 0-200 that are multiples of 3. 3^3+6^3+9^3+12^3+198^3=? My

Re: Python on a MacBook Pro (not my machine)

2013-10-26 Thread Shao Hong
Hi John, In my college, we are using Python 3.x to teach and personally I am using a Mac and it works well so far. But back to development work, I use 2.7x because of libraries I using. As for ide, we are using IDLE, we understand it is clumsy but it is the most basic and since it comes with it,

trying to strip out non ascii.. or rather convert non ascii

2013-10-26 Thread bruce
hi.. getting some files via curl, and want to convert them from what i'm guessing to be unicode. I'd like to convert a string like this:: div class=profNamea href=ShowRatings.jsp?tid=1312168Alcántar, Iliana/a/div to:: div class=profNamea href=ShowRatings.jsp?tid=1312168Alcantar, Iliana/a/div

Re: Check if this basic Python script is coded right

2013-10-26 Thread Terry Reedy
On 10/26/2013 1:36 PM, HC wrote: I'm doing my first year in university and I need help with this basic assignment. Assignment: Write Python script that prints sum of cubes of numbers between 0-200 that are multiples of 3. 3^3+6^3+9^3+12^3+198^3=? My script: count = 0 answer = 0 while

Re: Possibly better loop construct, also labels+goto important and on the fly compiler idea.

2013-10-26 Thread Peter Cacioppi
Rusi said: Users of GG are requested to read and follow these instructions https://wiki.python.org/moin/GoogleGroupsPython Yes, I read those instructions and found them fairly opaque. If you want to instruct children (odd that I find myself categorized that way on a CS forum, but whatever)

Re: trying to strip out non ascii.. or rather convert non ascii

2013-10-26 Thread MRAB
On 26/10/2013 21:11, bruce wrote: hi.. getting some files via curl, and want to convert them from what i'm guessing to be unicode. I'd like to convert a string like this:: div class=profNamea href=ShowRatings.jsp?tid=1312168Alcántar, Iliana/a/div to:: div class=profNamea

Re: Cookie fucking problem

2013-10-26 Thread Mark Lawrence
On 26/10/2013 18:23, Antoon Pardon wrote: Op 26-10-13 18:19, Mark Lawrence schreef: On 26/10/2013 17:00, Steven D'Aprano wrote: On Sat, 26 Oct 2013 15:34:23 +0100, Mark Lawrence wrote: On 26/10/2013 14:27, Nick the Gr33k wrote: Buy a sex manual. Mark, please resist the urge to bait Nick

Re: Python Front-end to GCC

2013-10-26 Thread Mark Janssen
[Getting back to some old comments] A language specification in BNF is just syntax. It doesn't say anything about semantics. So how could this be used to produce executable C code for a program? BNF is used to produce parsers. But a parser isn't sufficient. A C program is just syntax

Re: status of new python.org

2013-10-26 Thread Mark Lawrence
On 26/10/2013 20:12, Joaquin Abian wrote: Is there any updated roadmap/schedule for the new python.org site ? It has been in beta mode at http://preview.python.org/ for several months but I can not find in there any indication of the progress or the possible date for publishing it. Most

Re: Python Front-end to GCC

2013-10-26 Thread Mark Janssen
Apologies will be accepted on the list. BTW, I can't resist pointing out that you guys are like a cup already full of (black) coffee -- too full to allow the pure water of clarity to enter. (cf. Buddhism) .. (boom) MarkJanssen Tacoma, Washington --

Re: Python Front-end to GCC

2013-10-26 Thread John Nagle
On 10/25/2013 12:18 PM, Mark Janssen wrote: As for the hex value for Nan who really gives a toss? The whole point is that you initialise to something that you do not expect to see. Do you not have a text book that explains this concept? No, I don't think there is a textbook that explains

Re: Python was designed (was Re: Multi-threading in Python vs Java)

2013-10-26 Thread Mark Lawrence
On 26/10/2013 20:24, Peter Cacioppi wrote: Paul Rubin said: FYI, there is real though imprecise garbage collection for C. Web search for Boehm garbage collection should find more info Very interesting. This wasn't around the last time I launched a C/C++ project from scratch. Thanks for the

Re: Python Front-end to GCC

2013-10-26 Thread Mark Lawrence
On 26/10/2013 22:33, Mark Janssen wrote: Apologies will be accepted on the list. BTW, I can't resist pointing out that you guys are like a cup already full of (black) coffee -- too full to allow the pure water of clarity to enter. (cf. Buddhism) .. (boom) MarkJanssen Tacoma, Washington

Re: Cookie fucking problem

2013-10-26 Thread Ben Finney
Mark Lawrence breamore...@yahoo.co.uk writes: I could almost feel sorry for you. But the more of your time I waste the longer it'll take you to get your website working. Feel free to occupy your time with baiting Nikos. But *do not* do it in this forum. -- \ “I love and treasure

Re: Cookie fucking problem

2013-10-26 Thread Ben Finney
Mark Lawrence breamore...@yahoo.co.uk writes: I wish I didn't have a combination of Asperger Syndrome, Chronic Fatigue Syndrome and Clinical Depression but sadly I'm stuck with the lot :( I wish you didn't have those. Please don't saddle this forum with the result. -- \ “And if I

array/list of sockets

2013-10-26 Thread theelder777
Hello all, I am kind of new to python. I am currently trying to make and use a list/array of sockets in a program. So I have declared an array as follows: myCSocks = ['CSock1', 'CSock2', 'CSock3', 'CSock4', 'CSock5'] and I am trying to use my array elements as follows: myCSocks[i], addr =

Re: Python Front-end to GCC

2013-10-26 Thread Mark Lawrence
On 26/10/2013 22:25, Mark Janssen wrote: Please give it a rest Mark, nobody is falling for your pseudo babel. -- Python is the second best programming language in the world. But the best has yet to be invented. Christian Tismer Mark Lawrence --

Re: array/list of sockets

2013-10-26 Thread Mark Lawrence
On 26/10/2013 22:41, theelder...@gmail.com wrote: Hello all, I am kind of new to python. I am currently trying to make and use a list/array of sockets in a program. So I have declared an array as follows: myCSocks = ['CSock1', 'CSock2', 'CSock3', 'CSock4', 'CSock5'] This is a list of Python

Re: array/list of sockets

2013-10-26 Thread Johannes Findeisen
Hi, On Sat, 26 Oct 2013 14:41:15 -0700 (PDT) theelder777@ wrote: Hello all, I am kind of new to python. I am currently trying to make and use a list/array of sockets in a program. So I have declared an array as follows: myCSocks = ['CSock1', 'CSock2', 'CSock3', 'CSock4', 'CSock5'] You

Re: Python Front-end to GCC

2013-10-26 Thread Mark Janssen
What a mess of a discussion. I see the big man stepping in to answer for his homies, but while his explanation satisfies their question of well why do these magic values get used then, if what Mark says is true?, it doesn't address the real confusion: What is the difference between script code

Re: Don't use default Google Group client (was re:....)

2013-10-26 Thread Chris Angelico
On Sun, Oct 27, 2013 at 2:05 AM, ru...@yahoo.com wrote: The large number of posts here from GG would suggest that the readership there is substantial, and the decline in web-1.0 tools (usenet, mailing lists, etc) is additional evidence that the number of GG users (who are used to and prefer

Re: array/list of sockets

2013-10-26 Thread theelder777
Thank you for your quick replies. I am trying to implement a very simple multithreaded webserver in python. Is using an array of sockets (for different clients) the correct way to go? -- https://mail.python.org/mailman/listinfo/python-list

Re: trying to strip out non ascii.. or rather convert non ascii

2013-10-26 Thread Steven D'Aprano
On Sat, 26 Oct 2013 16:11:25 -0400, bruce wrote: hi.. getting some files via curl, and want to convert them from what i'm guessing to be unicode. I'd like to convert a string like this:: div class=profNamea href=ShowRatings.jsp?tid=1312168Alcántar, Iliana/a/div to:: div

Re: array/list of sockets

2013-10-26 Thread Chris Angelico
On Sun, Oct 27, 2013 at 9:15 AM, theelder...@gmail.com wrote: Thank you for your quick replies. I am trying to implement a very simple multithreaded webserver in python. Is using an array of sockets (for different clients) the correct way to go? Firstly, before you respond any more, please

Re: array/list of sockets

2013-10-26 Thread Mark Lawrence
On 26/10/2013 23:15, theelder...@gmail.com wrote: Thank you for your quick replies. I am trying to implement a very simple multithreaded webserver in python. Is using an array of sockets (for different clients) the correct way to go? It's a list :) And if it works for you, why not, there's

Re: array/list of sockets

2013-10-26 Thread theelder777
Thank you all for your time and great replies. I think/hope I have enough info to able to implement this simple server. -- https://mail.python.org/mailman/listinfo/python-list

Re: array/list of sockets

2013-10-26 Thread Mark Lawrence
On 26/10/2013 23:42, theelder...@gmail.com wrote: Thank you all for your time and great replies. I think/hope I have enough info to able to implement this simple server. No problem but please take onboard the advice Chris Angelico gave you earlier regarding google groups, noting the

Re: array/list of sockets

2013-10-26 Thread theelder777
I apologize but I do not understand what you mean by lack of context. I have taken Chris' words into consideration, for my previous post was supposed to be my last (I just had to say thank you). This is my first google groups post, so I am a total noob. Once again, I apologize for whatever

Re: array/list of sockets

2013-10-26 Thread Chris Angelico
On Sun, Oct 27, 2013 at 10:17 AM, theelder...@gmail.com wrote: I apologize but I do not understand what you mean by lack of context. I have taken Chris' words into consideration, for my previous post was supposed to be my last (I just had to say thank you). This is my first google groups

Re: array/list of sockets

2013-10-26 Thread mm0fmf
On 27/10/2013 00:17, theelder...@gmail.com wrote: I apologize but I do not understand what you mean by lack of context. I have taken Chris' words into consideration, for my previous post was supposed to be my last (I just had to say thank you). This is my first google groups post, so I am a

Re: Printing a drop down menu for a specific field.

2013-10-26 Thread Nick the Gr33k
Στις 26/10/2013 9:33 μμ, ο/η ru...@yahoo.com έγραψε: On 10/20/2013 05:30 PM, Νίκος Αλεξόπουλος wrote: try: cur.execute( '''SELECT host, city, useros, browser, ref, hits, lastvisit FROM visitors WHERE counterID = (SELECT ID FROM counters WHERE url = %s) ORDER BY lastvisit DESC''', page )

Re: array/list of sockets

2013-10-26 Thread Mark Lawrence
On 27/10/2013 00:17, theelder...@gmail.com wrote: I apologize but I do not understand what you mean by lack of context. I have taken Chris' words into consideration, for my previous post was supposed to be my last (I just had to say thank you). This is my first google groups post, so I am a

Re: Printing a drop down menu for a specific field.

2013-10-26 Thread Nick the Gr33k
Στις 27/10/2013 2:31 πμ, ο/η Nick the Gr33k έγραψε: Στις 26/10/2013 9:33 μμ, ο/η ru...@yahoo.com έγραψε: On 10/20/2013 05:30 PM, Νίκος Αλεξόπουλος wrote: try: cur.execute( '''SELECT host, city, useros, browser, ref, hits, lastvisit FROM visitors WHERE counterID = (SELECT ID FROM counters

Re: array/list of sockets

2013-10-26 Thread theelder777
On Saturday, October 26, 2013 4:36:04 PM UTC-7, Mark Lawrence wrote: That's okay, everybody has to start somewhere :) A definition from http://www.thefreedictionary.com/context The part of a text or statement that surrounds a particular word or passage and determines its meaning.

Re: array/list of sockets

2013-10-26 Thread Chris Angelico
On Sun, Oct 27, 2013 at 10:56 AM, theelder...@gmail.com wrote: Yes, crystal clear. Thank you. Since I am writing this post, I have one final question. I got my code to work for a multithreaded web server, how do I test if it can handle multiple threads? Easy! Just make sure the threads take

Re: Printing a drop down menu for a specific field.

2013-10-26 Thread Nick the Gr33k
Στις 27/10/2013 2:52 πμ, ο/η Nick the Gr33k έγραψε: Ah foun it had to change in you code this line: key = host, city, useros, browser, ref to this line: key = host, city, useros, browser so 'ref' wouldnt be calculated in the unique combination key. I'am still trying

Re: trying to strip out non ascii.. or rather convert non ascii

2013-10-26 Thread Roy Smith
In article mailman.1626.1382835129.18130.python-l...@python.org, Dennis Lee Bieber wlfr...@ix.netcom.com wrote: Compared to Baudot, both ASCII and EBCDIC were probably considered wondrous. Wonderous, indeed. Why would anybody ever need more than one case of the alphabet? It's almost as

Re: Cookie aint retrieving when visiting happens from a backlink.

2013-10-26 Thread Piet van Oostrum
Νίκος Αλεξόπουλος nikos.gr...@gmail.com writes: There is no set of cookie returned back when visitor comes from a referer. Isn't this strange? No matter if you visit a webpage as a direct hit or via a referer the cookie on the visitor's browser should have been present. But it can only can

Re: status of new python.org

2013-10-26 Thread Chris Angelico
On Sun, Oct 27, 2013 at 8:26 AM, Mark Lawrence breamore...@yahoo.co.uk wrote: On 26/10/2013 20:12, Joaquin Abian wrote: Is there any updated roadmap/schedule for the new python.org site ? It has been in beta mode at http://preview.python.org/ for several months but I can not find in there any

Re: Cookie aint retrieving when visiting happens from a backlink.

2013-10-26 Thread Roy Smith
In article m2k3gz1ph6@cochabamba.vanoostrum.org, Piet van Oostrum p...@vanoostrum.org wrote: ÉΪίκος Αλεξόπουλος nikos.gr...@gmail.com writes: There is no set of cookie returned back when visitor comes from a referer. Isn't this strange? No matter if you visit a

Re: trying to strip out non ascii.. or rather convert non ascii

2013-10-26 Thread Tim Chase
On 2013-10-26 22:24, Steven D'Aprano wrote: Why on earth would you want to throw away perfectly good information? The main reason I've needed to do it in the past is for normalization of search queries. When a user wants to find something containing pingüino, I want to have those results come

  1   2   3   >