Re: First python program, syntax error in while loop

2013-05-06 Thread alex23
On May 6, 10:37 pm, Mark Lawrence wrote: > One of these days I'll work out why some people insist on using > superfluous parentheses in Python code.  Could it be that they enjoy > exercising their fingers by reaching for the shift key in conjunction > with the 9 or 0 key? One of these days I'll w

Re: Message passing syntax for objects | OOPv2

2013-05-09 Thread alex23
On 10 May, 03:33, Ian Kelly wrote: > You've been posting on this > topic for going on two months now, and I still have no idea of what > the point of it all is. As Charlie Brooker put it: "almost every monologue consists of nothing but the words PLEASE AUTHENTICATE MY EXISTENCE, repeated over and

Re: Message passing syntax for objects | OOPv2

2013-05-09 Thread alex23
On 10 May, 07:51, Mark Janssen wrote: > You see Ian, while you and the other millions of coding practitioners > have (mal)adapted to a suboptimal coding environment where "hey > there's a language for everyone"  and terms are thrown around, > misused, this is not how it needs or should be. Please

Re: Python for philosophers

2013-05-11 Thread alex23
On 12 May, 06:10, Mark Janssen wrote: > Wow.  You must be from another planet.  Find Socrates if you wish to > know these things.  He's from there also. Now now, there's no need for a turf war, there's plenty of room on this list for crazies. -- http://mail.python.org/mailman/listinfo/python-li

Re: Message passing syntax for objects | OOPv2

2013-05-11 Thread alex23
On 10 May, 13:07, Chris Angelico wrote: > Now, whether or not it's worth _debating_ the expressiveness of a > language... well, that's another point entirely. But for your major > project, I think you'll do better working in Python than in machine > code. I wasn't disagreeing with the concept of

Re: Python for philosophers

2013-05-12 Thread alex23
On May 13, 12:30 am, Steven D'Aprano wrote: > If you are interested in the intersection of programming and philosophy, > I strongly recommend that you read "Gödel, Escher, Bach: An Eternal > Golden Braid" by Douglas R. Hofstadter. +1 -- http://mail.python.org/mailman/listinfo/python-list

Re: Python for philosophers

2013-05-13 Thread alex23
On May 13, 5:13 pm, Steven D'Aprano wrote: > I'm not trying to beat the original Poster up for making an error, but > demonstrating just how badly off track you can get by trying to reason > from first principles (as Plato may have done) instead of empirical study > (as Aristotle or Bacon may have

Re: Fwd: Fwd: Python for philosophers

2013-05-15 Thread alex23
On May 16, 5:55 am, Citizen Kant wrote: > As a matter of > class, the word python names first a python snake than a Monty Python, > which is 50% inspired by that python word, word that's been being > considered the given name of a particular kind of snake since times in > which Terry Gilliam wasn'

Re: Unicode humor

2013-05-15 Thread alex23
On May 16, 12:09 am, "D'Arcy J.M. Cain" wrote: > It's sort of like when Bush said "The French don't even have a word for > entrepreneur." Or "The Russians have no word for it, therefore detente must be a one- way street." -- http://mail.python.org/mailman/listinfo/python-list

Re: Fractal

2013-05-15 Thread alex23
On May 15, 10:07 pm, "Colin J. Williams" wrote: > Google is your friend.  Try "Mandelbrot Python" My favourite is this one: http://preshing.com/20110926/high-resolution-mandelbrot-in-obfuscated-python -- http://mail.python.org/mailman/listinfo/python-list

Re: Python for philosophers

2013-05-15 Thread alex23
On May 16, 11:17 am, Tim Daneliuk wrote: >    http://pvspade.com/Sartre/cookbook.html Best recipe for tuna casserole ever! Cheers for this :) -- http://mail.python.org/mailman/listinfo/python-list

Re: so if zodb has no index or search, how run fast query?

2013-05-16 Thread alex23
On May 17, 4:14 am, visphatesj...@gmail.com wrote: > how? > > and what package provides such? https://pypi.python.org/pypi/zope.index https://pypi.python.org/pypi/zope.app.catalog I can see how those would be pretty difficult to find... -- http://mail.python.org/mailman/listinfo/python-list

Re: any cherypy powred sites I can check out?

2013-05-16 Thread alex23
On May 17, 10:00 am, visphatesj...@gmail.com wrote: > is a cherrypy list accessible here on web thru google groups? Is an apology for your offensive response to Chris Angelico forthcoming? -- http://mail.python.org/mailman/listinfo/python-list

Re: serialize a class to XML and back

2013-05-23 Thread alex23
On May 23, 8:37 pm, Schneider wrote: > My aim is to store instances of this class in a database. Have you considered just pickling the classes instead? -- http://mail.python.org/mailman/listinfo/python-list

Re: Issue converting to string to integer.

2013-06-02 Thread alex23
On Jun 3, 11:12 am, Fdama wrote: > I combined the int conversion and the input on the same line, rather than to > have two different statements. But  got an error message: > > Traceback (most recent call last): >   File "C:\Users\Faisal\Documents\python\pizza_slicer.py", line 23, in > >     sta

Re: Too many python installations. Should i remove them all and install the latest?

2013-06-02 Thread alex23
On Jun 1, 1:20 am, Νικόλαος Κούρας wrote: > Why so many pythons in my system. Because _you_ installed them. And we _know_ this because you've posted multiple threads relating to your problems with _your_ installations of Python 3. Even more entertainingly: > root@nikos [~]# which python3 > /root

Re: xsd:anyType parameter in suds!

2013-06-02 Thread alex23
On Jun 2, 12:56 pm, Tamer Higazi wrote: > The original sample is an application, where a "PHP Array" is being > passed for the remoted method. What is the same type in python to > accomplish the task?! In this case, you probably want to use a dict(). -- http://mail.python.org/mailman/listinfo/p

Re: How to Begin Web Development with Python ?

2013-06-02 Thread alex23
On Jun 1, 11:23 pm, Giorgos Tzampanakis wrote: > Modulok suggested using ORM software. ORM should not really be needed if > you are aiming at scientific content for your application, you should > be fine with straight SQL (many consider ORM a hindrance rather than > help for any project  [1], [2])

Re: Too many python installations. Should i remove them all and install the latest?

2013-06-04 Thread alex23
On Jun 4, 5:11 pm, Νικόλαος Κούρας wrote: > So, i guess its something like 'yum install python-pip' > i cannot find it, have searched it in variosu ways. If you're going to claim to have tried something, can you at least tell us what you tried? Because quelle surprise! the most obvious combinatio

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-04 Thread alex23
On Jun 5, 5:32 am, Νικόλαος Κούρας wrote: > Lele the output of: > > stmt = "cur.execute('''SELECT url FROM files WHERE url = %s''', ( fullpath, )" > chars_count = Counter(stmt) > print("Number of '(': %d" % chars_count['(']) > print("Number of ')': %d" % chars_count[')']) > > is: > > Number of '('

Re: Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-04 Thread alex23
On Jun 5, 2:09 am, Rick Johnson wrote: > This is how you design a language for consistency and readability. Great! Now you can shut up and get back to work on RickPython4000. Come back and let us know all about it when it's done. -- http://mail.python.org/mailman/listinfo/python-list

Re: Issue values dictionary

2013-06-04 Thread alex23
On Jun 5, 12:41 pm, claire morandin wrote: > But I have a problem storing all size length to the value size as it is > always comes back with the last entry. > Could anyone explain to me what I am doing wrong and how I should set the > values for each dictionary? Your code has two for loops, on

Re: Apache and suexec issue that wont let me run my python script

2013-06-04 Thread alex23
On Jun 5, 1:55 pm, Νικόλαος Κούρας wrote: > [Wed Jun 05 06:49:56 2013] [error] [client 46.12.95.59] (2)No such file or > directory: exec of '/home/nikos/public_html/cgi-bin/koukos.py' failed > The script though its interpretign  correctly as seen from > ni...@superhost.gr [~/www/cgi-bin]# python

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-04 Thread alex23
On Jun 5, 1:28 pm, Νικόλαος Κούρας wrote: > AS you have seen i've been struggling days now to get a solution to this and > the closing parenthesis is not the prbpoem here, unicode. Oh really? > if they are unicode then i really see no trouble when trying to: > cur.execute('''SELECT url FROM fil

Re: Apache and suexec issue that wont let me run my python script

2013-06-04 Thread alex23
On Jun 5, 2:40 pm, Νικόλαος Κούρας wrote: > Of course '/home/nikos/public_html/cgi-bin' = '/home/nikos/www/cgi-bin' > What this has to do with what i asked? You display an error of "No such file or directory" and you wonder why I'm trying to confirm the two locations are the same. Can you finall

Re: Apache and suexec issue that wont let me run my python script

2013-06-04 Thread alex23
On Jun 5, 3:11 pm, Νικόλαος Κούρας wrote: > I'm not trolling, you are the one that do not understand. > > Here i swicthed the code from: > path = "/home/nikos/www/data/apps/" > > to this since '/home/nikos/public_html/cgi-bin' = '/home/nikos/www/cgi-bin' > as i said: > > # Compute a set of curren

Re: Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-04 Thread alex23
On Jun 5, 3:28 pm, Steven D'Aprano wrote: > How many years has Rick been coming here, proclaiming loudly [a]nd yet, > he still has no clue what > actually means. It's not just duck typing. -- http://mail.python.org/mailman/listinfo/python-list

Re: Apache and suexec issue that wont let me run my python script

2013-06-05 Thread alex23
On Jun 5, 6:53 pm, Νικόλαος Κούρας wrote: > So, iam to blame this for trusting you? I'm sure you were smart enough to get Chris to sign a contract before giving him the keys to your kingdom, no? -- http://mail.python.org/mailman/listinfo/python-list

Re: Apache and suexec issue that wont let me run my python script

2013-06-05 Thread alex23
On Jun 5, 6:41 pm, Chris Angelico wrote: > This matter is far more serious than you seem to be giving it > consideration for. You complain that I violated your trust; you > violated the trust of people who are paying you money. I think the term I'm looking for here is: EPIC WIN :D -- http://mai

Re: Apache and suexec issue that wont let me run my python script

2013-06-05 Thread alex23
On Jun 5, 7:46 pm, Νικόλαος Κούρας wrote: > And here us Alex23 private mail that sent out to me: Which I spared the list from because it was off-topic, but I don't think that's a concept you're overly familiar with given your posting history. -- http://mail.python.org/mailm

Re: Issue values dictionary

2013-06-05 Thread alex23
On Jun 5, 5:43 pm, Peter Otten <__pete...@web.de> wrote: > You can remove all strip() methods here as split() already strips off any > whitespace from the columns. > > Not really important, but the nitpicker in me keeps nagging ;) Thanks, I really should have checked but just pushed the OPs code i

Re: Apache and suexec issue that wont let me run my python script

2013-06-05 Thread alex23
On Jun 5, 7:48 pm, Chris Angelico wrote: > No wonder the economy of Greece is in trouble. This isn't addressed just to Chris, as this isn't the first time the joke has been made, but could we not? There's a term for applying the failings of an individual to an entire genetic or cultural collectiv

Re: Apache and suexec issue that wont let me run my python script

2013-06-05 Thread alex23
On Jun 5, 9:07 pm, Νικόλαος Κούρας wrote: > Btw, since history doesnt show me his history comamnds when he logged in from > .au(why not really?) http://lmgtfy.com/?q=centos+clear+command+line+history You're welcome. -- http://mail.python.org/mailman/listinfo/python-list

Re: Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-06 Thread alex23
On Jun 7, 3:59 am, Mark Janssen wrote: > Okay, I'm going straighten out you foo(l)s once and for all. Gosh, really?! THANKS. > Python has seduced us all into lazy typing.  That's what it is. Bulshytt. If you have no idea what polymorphism is, you shouldn't even be participating in this conversa

Re: Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-06 Thread alex23
On Jun 7, 2:39 am, Devin Jeanpierre wrote: > Languages do not exist in a vacuum. They do if all you use them for is academic point scoring over practical purposes. -- http://mail.python.org/mailman/listinfo/python-list

Re: Bools and explicitness [was Re: PyWart: The problem with "print"]

2013-06-06 Thread alex23
On Jun 7, 11:44 am, Mark Janssen wrote: > > Bulshytt. If you have no idea what polymorphism is, you shouldn't even > > be participating in this conversation. > > I am aware of what it means, but Python doesn't really have it You really need to stop commenting when you clearly have no understandin

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-07 Thread alex23
On Jun 7, 6:53 pm, Cameron Simpson wrote: >   Experiment: > >     LC_ALL=C ls -b >     LC_ALL=utf-8 ls -b >     LC_ALL=iso-8859-7 ls -b > >   And the Terminal itself is decoding the output for display, and >   encoding your input keystrokes to feed as input to the command >   line. This reminded

Re: Receing a form variable as a list instead of as a string

2013-06-11 Thread alex23
On Jun 12, 5:42 am, Νικόλαος Κούρας wrote: > Indeed as Andreas said i was overusing the form variable 'page' No. You're simply _not_ thinking about what you're doing. > elif page or form.getvalue('show'): >         # it is a python script >         page = page > else: >         #when everything

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

2013-06-11 Thread alex23
On Jun 12, 6:20 am, Νικόλαος Κούρας wrote: > [code] http://pythonconquerstheuniverse.wordpress.com/2009/09/10/debugging-in-python/ "Hey, I have a problem, here is my code, you work it out" is not a valid debugging technique. -- http://mail.python.org/mailman/listinfo/python-list

Re: Split a list into two parts based on a filter?

2013-06-11 Thread alex23
On Jun 11, 9:08 am, Fábio Santos wrote: > On 10 Jun 2013 23:54, "Roel Schroeven" wrote: > > new_songs, old_songs = [], [] > > [(new_songs if s.is_new() else old_songs).append(s) for s in songs] > > This is so beautiful! No, it's actually pretty terrible. It creates a list in order to populate _t

Re: Receing a form variable as a list instead of as a string

2013-06-11 Thread alex23
On Jun 12, 6:16 am, Νικόλαος Κούρας wrote: > I get the error that i cannot use 'replac'e to a 'list'. > How can i avoid that? BY NOT USING STRING METHODS ON A LIST. Ulrich even *told* you what to do: "convert it to a string yourself" Do you do that in your code? No. Instead, you assign a value

Re: Why doesn't nose see my plugin?

2013-06-11 Thread alex23
On Jun 12, 10:54 am, Roy Smith wrote: > I'm attempting to write a nose plugin.  Nosetests (version 1.3.0) is not > seeing it. > > setup( >     entry_points = { >         'nose.plugins.1.10': ['mongoreporter = > mongo_reporter.MongoReporter'], >         }, Hey Roy, I've never actually written a

Re: Why doesn't nose see my plugin?

2013-06-11 Thread alex23
On Jun 12, 11:43 am, Roy Smith wrote: > Just to see what would happen, I tried changing it to: > >     entry_points = { >         'nose.plugins.1.3.0': ['mongoreporter = > testing.nose.mongo_reporter.MongoReporter'], >         }, > > didn't appear to make any difference. Yeah, reading some more i

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

2013-06-11 Thread alex23
On Jun 12, 11:46 am, Rick Johnson wrote: > Utilizing the power of interactive sessions, for learning and debugging, > should be a cornerstone fundamental of your programming "work-flow" when > writing code in an interpreted language like Python. Unfortunately with Ferrous, the process is more lik

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

2013-06-11 Thread alex23
On Jun 12, 12:05 pm, Chris Angelico wrote: > You have to include the coding phase. How else would he get into an error > state? Via copy & paste. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Game Development?

2013-06-11 Thread alex23
On Jun 8, 1:53 am, letsplaysf...@gmail.com wrote: > I was planning on making a small 2D game in Python. Are there any libraries > for this? I know of: > • Cocos2D - Won't install and cant find any support Cocos2D is what I tend to recommend. What issues did you have with installing it? For suppo

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

2013-06-11 Thread alex23
On Jun 12, 3:44 pm, Tim Roberts wrote: > It seems silly to fire up a regular expression compiler to look for a > single character. >     if name.find('=') < 0 and month.find('=') < 0 and year.find('=') < 0: If truthiness is the only concern, I prefer using `in`: if '=' in name and '=' in mon

Re: Why doesn't nose see my plugin? (FIXED)

2013-06-12 Thread alex23
On Jun 13, 2:12 am, r...@panix.com (Roy Smith) wrote: > Still strugging to get my head fully around setuptools :-) We should start a club! :D -- http://mail.python.org/mailman/listinfo/python-list

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

2013-06-13 Thread alex23
On Jun 14, 2:24 am, Νικόλαος Κούρας wrote: > iam researchign a solution to this as we speak. Spamming endless "ZOMG HELP ME I'M INCOMPETENT" posts isn't "research". -- http://mail.python.org/mailman/listinfo/python-list

Re: Eval of expr with 'or' and 'and' within

2013-06-14 Thread alex23
On Saturday, 15 June 2013 02:09:20 UTC+10, Steven D'Aprano wrote: > To everyone else... I know that Nikos' posts are draining. Sometimes he > brings me to the brink of despair too. But if you aren't part of the > solution, you are part of the problem: writing short-tempered, insulting > posts a

Re: Don't feed the troll...

2013-06-15 Thread alex23
On Jun 16, 5:29 am, Steven D'Aprano wrote: > And others have publicly thanked me for giving useful answers to Nikos, > because they have learned from them. I take it you'll also be critical of people on list now saying "we don't do your homework for you"? Or is there some fundamental difference h

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

2013-06-15 Thread alex23
On Jun 16, 7:43 am, Mark Lawrence wrote: > Your Python version would help :)  How did you install Inkscape?  It > looks strange to see it in Program Files, I'd normally expect to see it > in the site packages directory. Inkscape is an application, not a library. It provides its own local install

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

2013-06-15 Thread alex23
On Jun 16, 7:29 am, lucabrasi...@gmail.com wrote: > I get this error when I try to save .dxf files in Inkscape: > > Fatal Python error: Py_Initialize: can't initialize sys standard streams > > Then it seems to recover but it doesn't really recover. It saves the files > and then DraftSite won't ope

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

2013-06-16 Thread alex23
On Jun 16, 10:10 am, Steven D'Aprano wrote: > Congratulation. You have just entered an extremely exclusive club. See > you in a month. > > *plonk* So yours are the only pissy one-liner responses that shouldn't be taken off-list? -- http://mail.python.org/mailman/listinfo/python-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: 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. >

Re: Default Value

2013-06-20 Thread alex23
On 21/06/2013 4:07 AM, Rick Johnson wrote: Okay. So now you are admitting the problem. That is a good start. Thanks for being honest. If you think mutable default arguments is a "problem", then you don't really understand Python. The only "gotcha" here is in people's heads. -- http://mail.py

Re: (newbye) exceptions list for python3 classes

2013-06-24 Thread alex23
On 25/06/2013 7:43 AM, chrem wrote: Le 24/06/13 23:35, chrem a écrit : what is the best way to find out all exceptions for a class? E.g. I want to find out all exceptions related to the zipfile (I'm searching for the Bad password exception syntax). The only way is to look at the source code fo

Re: Is this PEP-able? fwhile

2013-06-24 Thread alex23
On 25/06/2013 6:12 AM, Ian Kelly wrote: On Mon, Jun 24, 2013 at 1:52 PM, wrote: Syntax: fwhile X in ListY and conditionZ: fwhile would act much like 'for', but would stop if the condition after the 'and' is no longer True. I would advocate using the break myself. Another alternative is thi

Re: n00b question on spacing

2013-06-24 Thread alex23
On 23/06/2013 3:43 AM, Mark Janssen wrote: There was a recent discussion about this (under "implicit string concatenation"). It seems this is a part of the python language specification that was simply undefined. It's part of the language reference, not an accidental artifact: http://docs.pyth

Re: Is this PEP-able? fwhile

2013-06-24 Thread alex23
On 25/06/2013 9:35 AM, Fábio Santos wrote: > I'd probably just go with a generator expression to feed the for loop: > > for X in (i for i in ListY if conditionZ): > That is nice but it's not lazy. If the condition or the iterables took too long to compute, it would be troubl

Re: What is the semantics meaning of 'object'?

2013-06-27 Thread alex23
On 26/06/2013 9:19 AM, Mark Janssen wrote: Did you ever hear of the Glass Bead Game? Which was Hesse's condemnation of the pure-academic-understanding-unbound-by-pragmatic-use approach as mental masturbation, _not_ a recommendation for how human knowledge should work. If you think otherwise,

Re: Running programs on mobile phones

2013-06-27 Thread alex23
On 28/06/2013 1:11 AM, Mok-Kong Shen wrote: Could one write Python codes and have them run on one's own mobile phone? If yes, are there some good literatures? Thanks in advance. Kivy is a well-documented & multi-platform approach to doing this: http://kivy.org/ -- http://mail.python.org/mailm

Re: SQL code generation from table-free boolean queries?

2013-06-27 Thread alex23
On 27/06/2013 9:17 AM, Foo Stack wrote: Given string input such as: foo=5 AND a=6 AND date=now OR date='2013/6' AND bar='hello' I am going to implement: - boolean understanding (which operator takes precendence) - spliting off of attributes into my function which computes their table in th

Re: Closures in leu of pointers?

2013-06-30 Thread alex23
On 30/06/2013 3:46 PM, Ian Kelly wrote: In general I agree, although when reading code I would definitely prefer if the locals were declared. If you import the code into the interpreter as an adjunct to reading it you can see the locals with: >>> somefunc.func_code.co_varnames # 2.x >>> somefu

Re: python adds an extra half space when reading froma string or list -- back to the question

2013-07-01 Thread alex23
On 2/07/2013 5:32 AM, Joel Goldstick wrote: I copied the original question so that the rant on the other > thread can continue. Let's keep this thread ontopic You've included the same set of code twice. Also, it doesn't run as is, so you haven't reduced it to a minimal working example for us t

Re: python adds an extra half space when reading from a string or list

2013-07-01 Thread alex23
On 1/07/2013 7:37 PM, Νίκος wrote: I dont expect anyone to solve my problems, This is not consistent with the number of "HELP ME I BROKE MY BUSINESS" posts you've made. iam happy if they point me to a direction which i can solve it myself This is not consistent with your repeated claim that

Re: Read active tab URL from a browser with Python ?

2013-07-02 Thread alex23
On 3/07/2013 10:51 AM, goldtech wrote: I've goggled this but haven't found a way (at least a way I understand) for a running Python script to get the current URL in a browser's location bar. Is there a way? I'm using Windows so maybe that would provide a way (or not). This isn't for a browser c

Whatever happened to the Effbot? [was Re: python adds an etc]

2013-07-03 Thread alex23
On 4/07/2013 3:08 AM, ru...@yahoo.com wrote: Effbot was around when I first started reading c.l.p Does anyone know if Fredrik Lundh is still an active Python user? His site hasn't been updated for 3-4+ years now (there's an index error on the articles page of effbot.org). Has he pulled a Pilgri

Re: How to tell Script to use pythonw.exe ?

2013-07-03 Thread alex23
On 4/07/2013 2:50 AM, Νίκος wrote: I dont understand you. I explicitly state via cmd to have the .html files opened with Chrome instead of IE. Tried it with the way you said and evben with "open with.." but all that fails. some seriosu damaged must have happened and assoc are refusing to change.

Re: [SPOILERS] Python easter eggs

2013-07-03 Thread alex23
On 4/07/2013 10:59 AM, Ben Finney wrote: Ian Kelly writes: import __hello__ Different between Python 2 and Python 3 — try it in both! Is it meant to imply that Py2 is weary while Py3 is still enthusiastic, or is that just my personal take? :) -- http://mail.python.org/mailman/listinfo/pyth

Re: Why this code works in python3, but not python 2:

2013-07-03 Thread alex23
On 4/07/2013 1:52 PM, Maciej Dziardziel wrote: Out of curiosity: Does anyone know why the code below is valid in python3, but not python2: def foo(*args, bar=1, **kwargs): pass It was an explicit syntax change for Python3. You can read about the reasoning behind it here: http://www.pyth

Re: Why this code works in python3, but not python 2:

2013-07-03 Thread alex23
On 4/07/2013 2:12 PM, Joshua Landau wrote: On 4 July 2013 04:52, Maciej Dziardziel wrote: def foo(*args, bar=1, **kwargs): pass Try "foo(1)" and it will fail -- "bar" needs to be given as a keyword. No it won't, because it is supplied with a default. You may be confusing it with the r

Re: Illegal suggestions on python list

2013-07-04 Thread alex23
On 5/07/2013 4:18 AM, feedthetr...@gmx.de wrote: Oh, sorry, we forgot, that the US legal system is the only one applicable > to the internt (and of course to the whole world). Given that Australian citizens (at least) have been extradited to the US for piracy crimes that weren't commited on US

Re: Default scope of variables

2013-07-08 Thread alex23
On 7/07/2013 11:43 PM, Chris Angelico wrote: Yep. There's a problem, though, when you bring in subtransactions. The logic wants to be like this: with new_transaction(conn) as tran: tran.query("blah") with tran.subtransaction() as tran: tran.query("blah") with tran.sub

Re: ipython

2013-07-08 Thread alex23
On 9/07/2013 12:44 AM, davide.dalma...@gmail.com wrote: Hi, I work with Python 3.3. I downloaded an IPython executable version from http://www.lfd.uci.edu/~gohlke/pythonlibs/ I installed it but no shortcut appears in my start menu. How can I launch it or alternatively is there some other free so

Re: Default scope of variables

2013-07-08 Thread alex23
On 9/07/2013 3:07 PM, Chris Angelico wrote: The subtransactions are NOT concepted as separate transactions. They are effectively the database equivalent of a try/except block. Sorry, I assumed each nested query was somehow related to the prior one. In which case, I'd probably go with Ethan's su

Re: crack a router passcode

2013-07-09 Thread alex23
On 10/07/2013 6:59 AM, Dave Angel wrote: On 07/09/2013 12:06 PM, Ferrous Cranus wrote: What is the reason of a spambot? Spam a usenet forum to gain what? All I know is it was obvious that there were about 8 spam messages, and so I ignored them. They were from one email address (then two), and

Re: Stack Overflow moderator “animuson”

2013-07-10 Thread alex23
On 10/07/2013 10:13 PM, Mats Peterson wrote: You're obviously trying hard to be funny. It fails miserably. It's obvious that you are quite familiar with miserableness. Also obvious is that animuson did the world of StackOverflow quite the favour. If only e moderated this list... -- http://m

Re: Stack Overflow moderator “animuson”

2013-07-10 Thread alex23
On 10/07/2013 11:53 PM, Benedict Verheyen wrote: Op Wed, 10 Jul 2013 12:06:06 +, schreef Mats Peterson: And why would I use any "custom" version of Python, when I don't have to do that with Perl? If you're able to do that with Perl, and Perl is faster that Python, why would you want to bot

Re: Documenting builtin methods

2013-07-10 Thread alex23
On 11/07/2013 1:15 PM, Joshua Landau wrote: I have this innocent and simple code: from collections import deque exhaust_iter = deque(maxlen=0).extend exhaust_iter.__doc__ = "Exhaust an iterator efficiently without caching any of its yielded values." Obviously it does not work. Is there a way to

Re: Documenting builtin methods

2013-07-11 Thread alex23
On 12/07/2013 9:11 AM, Joshua Landau wrote: I also feel that: def factory(): eatit = deque(maxlen=0).extend def exhaust_iter(it): """Doc string goes here""" eatit(it) return exhaust_iter exhaust_it = factory() del factory is a very unobvious way to change a doc

Re: GeoIP2 for retrieving city and region ?

2013-07-16 Thread alex23
On 16/07/2013 12:48 PM, Michael Torrie wrote: I've posted a link to detailed information on this no less than three times, yet Nikos has not read any of it, sadly. Just a quick reminder for everyone: "Ferrous Cranus is utterly impervious to reason, persuasion and new ideas, and when engaged i

Re: Homework help requested (not what you think!)

2013-07-16 Thread alex23
On 17/07/2013 8:43 AM, John Ladasky wrote: The kids all claim to be interested. They all want to write the next great 3D video game. Thus, I'm a little surprised that the kids don't actually try to sit down and code without me prompting them. I think that they're disappointed when I show th

Re: Python HTTP POST

2013-07-17 Thread alex23
On 18/07/2013 4:49 AM, Matt Graves wrote: How would I submit a python HTTP POST request to... for example, go to google.com, enter "Pie" into the search box and submit (Search) Other replies have suggested how you could do it by building the request yourself. Another approach is to interact d

Re: Homework help requested (not what you think!)

2013-07-17 Thread alex23
On 17/07/2013 11:29 PM, Chris Angelico wrote: On Wed, Jul 17, 2013 at 11:20 PM, Neil Cerutti wrote: Markov chains are an advanced technique you could introduce, but you'd need a huge list of names broken into syllables from somewhere. You could use names broken into letters... or skip the not

Re: Play Ogg Files

2013-07-22 Thread alex23
On 20/07/2013 10:25 PM, Devyn Collier Johnson wrote: I have not heard of Pyaudio; I will look into that. As for Pygame, I have not been able to find any good documentation for playing audio files. Plus, I recently learned that Pygame is not Python3 compatible. Another option would be Pyglet, wh

Re: How to read a make file in python and access its elements

2013-07-22 Thread alex23
On 23/07/2013 5:09 AM, san wrote: How to read/load the cmake file in python and access its elements. I have a scenario, where i need to load the make file and access its elements. I have tried reading the make file as text file and parsing it,but its not the ideal solution Please let me know ho

Re: Python 3: dict & dict.keys()

2013-07-24 Thread alex23
On 25/07/2013 4:31 AM, Ethan Furman wrote: 2) Hopefully learn something about when a view is useful. I haven't seeen this mentioned - forgive me if it's a repeat - but views are constant references to whichever set they represent. Python 2.7: >>> dd = dict(a=1,b=2,c=3) >>> keys = dd.keys

Re: virtualenv problem

2013-07-25 Thread alex23
On 25/07/2013 11:48 PM, D. Xenakis wrote: I think there is something wrong with the installation because when i run through idle the virtual-env scripts located in "C:\Python33\Scripts" then i get the following.. virtualenv is intended to be a command line tool, so running it through idle is

Re: Hello Everyone! A simple questions!

2013-07-25 Thread alex23
On 26/07/2013 12:15 PM, Thanatos xiao wrote: values = [0, 1, 2] values[1] = values values [0, [...], 2] why?? First, it helps if you tell us what you were expecting instead. In your example, you have a list where you have replaced the 2nd element with the list itself. The [...] i

Re: Help

2013-07-25 Thread alex23
On 26/07/2013 3:06 PM, ty...@familyrobbins.com wrote: I'm a bit new to python and I'm trying to create a simple program which adds words and definitions to a list, and then calls them forward when asked to. --- choice =

Re: virtualenv problem

2013-07-29 Thread alex23
On 26/07/2013 10:25 PM, D. Xenakis wrote: Apparently my problem was that i did not have correctly setup the new path.. But hey - learning is a good thing +1! Also, good job on posting the solution you found as well, that's always helpful if anyone else hits the same problem. Personally, I t

Re: Question:Programming a game grid ...

2012-06-27 Thread alex23
On Jun 28, 8:21 am, iconoclast011 wrote: > Fairly new to Python ... Is there a way to efficiently (different from my > brute > force code shown below) to set up a game grid of buttons (ie with pygame) > responding to mouse clicks ?   I would want to vary the size of the grid ... It hasn't been u

Re: exception problem

2012-06-27 Thread alex23
On Jun 28, 10:13 am, Charles Hixson wrote: > On 06/25/2012 12:48 AM, Steven D'Aprano wrote: > > "Catch any exception" is almost certainly the wrong thing to do, almost > > always. > This time it was the right thing, as I suspected that *SOME* exception > was being thrown, but had no idea what one

Re: Why has python3 been created as a seperate language where there is still python2.7 ?

2012-06-27 Thread alex23
On Jun 28, 8:11 am, Christian Tismer wrote: > Random notes without context and reasoning are no better than spam. > My answer as well, of course, so let's stop here. It's more that all of this has been discussed at length. Repeatedly. It's very easy to criticise the current state of affairs when

Re: Slow output

2012-06-27 Thread alex23
On Jun 28, 3:33 am, subhabangal...@gmail.com wrote: > May any one suggest me what may be the likely issue? In situations like this, it always helps to see your code, especially if you can reduce it down to only the part doing the loading. One thing that can help reduce memory usage is to replace

Re: Question:Programming a game grid ...

2012-06-27 Thread alex23
On Jun 28, 12:15 pm, woo...@gmail.com wrote: > You assume too much IMHO.  Vars() was not declared in > the code provided and I do not think that we should be > assuming that it is a function returning a dictionary instead > of an error. http://docs.python.org/library/functions.html#vars Do you ha

Re: Why has python3 been created as a seperate language where there is still python2.7 ?

2012-06-27 Thread alex23
Rick, fix your mail reader/sender, your lines aren't wrapping properly. On Jun 28, 1:53 pm, rantingrickjohn...@gmail.com wrote: > Unfortunately, even though "print" is supposedly only used by the neophytes, > the python<3.0 stdlib is full of print statements. For instance, out of 3173 > files, 9

Re: code review

2012-06-28 Thread alex23
On Jun 29, 12:57 pm, "Littlefield, Tyler" wrote: > I was curious if someone wouldn't mind poking at some code. > The project page is at:http://code.google.com/p/pymud > Any information is greatly appreciated. I couldn't find any actual code at that site, the git repository is currently empty. --

  1   2   3   4   5   6   7   8   9   10   >