Re: Don't feed the troll...

2013-06-15 Thread rurpy
On Saturday, June 15, 2013 2:04:31 PM UTC-6, Νικόλαος Κούρας wrote: > Thank you ruspy. Don't thank me. You are not contributing in a positive way to the situation. -- http://mail.python.org/mailman/listinfo/python-list

Re: Pattern Search Regular Expression

2013-06-15 Thread Terry Reedy
On 6/15/2013 12:28 PM, subhabangal...@gmail.com wrote: Suppose I want a regular expression that matches both "Sent from my iPhone" and "Sent from my iPod". How do I write such an expression--is the problem, "Sent from my iPod" "Sent from my iPhone" which can be written as, re.compile("Sent fro

Re: Timsort in Cpython

2013-06-15 Thread alphonse23
Hey guys, Thanks for the quick reply! So why did they decide to call it listsort in the source instead? Why didn't they keep it as Timsort? Well. I'm going to have a ton of fun trying to make sense of this. -- http://mail.python.org/mailman/listinfo/python-list

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

2013-06-15 Thread Benjamin Schollnick
>> Nick, at this point, you need to hire someone to do your work for you. > > The code is completely ready. > Some detail is missing and its not printing the files as expected. Then the code is not completely ready, it has bugs, and your trying to have the list debug and fix it for you for free.

Re: A few questiosn about encoding

2013-06-15 Thread Benjamin Schollnick
Nick, >> The only thing that i didn't understood is this line. >> First please tell me what is a byte value >> >>> \x1b is a sequence you find inside strings (and "byte" strings, the >>> b'...' format). >> >> \x1b is a character(ESC) represented in hex format >> >> b'\x1b' is a byte object that

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

2013-06-15 Thread Joshua Landau
On 15 June 2013 20:51, 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. > Some detail is missing and its not printing the files as expected. Look, Nick, A lot of peo

Re: Pattern Search Regular Expression

2013-06-15 Thread rurpy
Oops... On Saturday, June 15, 2013 12:47:18 PM UTC-6, ru...@yahoo.com wrote: > Links to the Python reference documentation are useful for people > just beginning with some aspect of Python; they are for people who > already know Python and want to look up details. That was supposed to be: Link

Re: Timsort in Cpython

2013-06-15 Thread Robert Kern
On 2013-06-15 21:21, alphons...@gmail.com wrote: Hey guys, Thanks for the quick reply! So why did they decide to call it listsort in the source instead? Why didn't they keep it as Timsort? This was the first implementation of the algorithm. The algorithm was only colloquially named "Timsort"

Re: Pattern Search Regular Expression

2013-06-15 Thread Joshua Landau
On 15 June 2013 11:18, Mark Lawrence wrote: > I tend to reach for string methods rather than an RE so will something like > this suit you? > > c:\Users\Mark\MyPython>type a.py > for s in ("In the ocean", > "On the ocean", > "By the ocean", > "In this group", >

Re: Pattern Search Regular Expression

2013-06-15 Thread Mark Lawrence
On 15/06/2013 22:03, Joshua Landau wrote: On 15 June 2013 11:18, Mark Lawrence wrote: I tend to reach for string methods rather than an RE so will something like this suit you? c:\Users\Mark\MyPython>type a.py for s in ("In the ocean", "On the ocean", "By the ocean",

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

2013-06-15 Thread lucabrasi154
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 open them. Here is what the thing says when Inkscape tried to

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

2013-06-15 Thread Mark Lawrence
On 15/06/2013 20:38, Nick the Gr33k wrote: Thank you and please whoever does not feel like helping, please at least not spam the thread. Your arrogance clearly has no bounds. This is a public forum and people can say what they like. You've wasted enough time as it is, so why don't you sim

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

2013-06-15 Thread Mark Lawrence
On 15/06/2013 22:29, 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 open them.

Re: Timsort in Cpython

2013-06-15 Thread alphonse23
Ahh, that makes perfect sense. Thanks for clearing that up. On Saturday, June 15, 2013 1:55:29 PM UTC-7, Robert Kern wrote: > On 2013-06-15 21:21, alphons...@gmail.com wrote: > > > Hey guys, > > > Thanks for the quick reply! So why did they decide to call it listsort in > > the source instead?

Re: Version Control Software

2013-06-15 Thread Tim Delaney
On 16 June 2013 01:29, Giorgos Tzampanakis wrote: > On 2013-06-15, Roy Smith wrote: > > Also, is working without connection to the server such big an issue? One > would expect that losing access to the central server would indicate > significant problems that would impact development anyway. > I

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: Don't feed the troll...

2013-06-15 Thread Mark Lawrence
On 15/06/2013 22:47, alex23 wrote: 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

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-15 Thread Chris Angelico
On Sun, Jun 16, 2013 at 6:29 AM, Benjamin Schollnick wrote: > cur.execute('''SELECT ID FROM counters WHERE url = %s''', page ) > cur.execute('''INSERT INTO counters (url) VALUES (%s)''', page ) > > Sure, whoever wrote that code is a fool. > > http://xkcd.com/327/ > > They didn't sanitize your data

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

2013-06-15 Thread lucabrasi
On Saturday, June 15, 2013 3:10:07 PM UTC-7, alex23 wrote: > 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 rec

Re: Version Control Software

2013-06-15 Thread Chris Angelico
On Sun, Jun 16, 2013 at 4:29 AM, Dan Sommers wrote: > On Sat, 15 Jun 2013 15:29:27 +, Giorgos Tzampanakis wrote: > >> Also, is working without connection to the server such big an issue? >> One would expect that losing access to the central server would >> indicate significant problems that wo

Re: Don't feed the troll...

2013-06-15 Thread Chris Angelico
On Sun, Jun 16, 2013 at 3:47 AM, Steven D'Aprano wrote: > On Sat, 15 Jun 2013 19:25:21 +0200, Chris “Kwpolska” Warrick wrote: >> The source code seems to think otherwise: > > Mailman is not the only mailing list software in the world, and the > feature you are referring to is optional. > >> http:/

Re: Version Control Software

2013-06-15 Thread Chris Angelico
On Sun, Jun 16, 2013 at 12:16 AM, Roy Smith wrote: > The advantage of DVCS is that everybody has a full copy of the repo. > The disadvantage of the DVCS is that every MUST have a full copy of the > repo. When a repo gets big, you may not want to pull all of that data > just to get the subtree you

Python MegaMan X clone - full game engine

2013-06-15 Thread Turtle Wizard
Hi all, I made a codebase which is easy for extensions of making enemy AI's (anything really), most is based on inheritance of some good classes. Here it is including first level : https://github/zork9/pygame-pyMM Enjoy! -- Time heals. my blog : http://thediaryofelvishhealer.blogspot.be/ --

Re: Python MegaMan X clone - full game engine

2013-06-15 Thread chetaget
On 2013-06-15 23:10:46 +, Turtle Wizard said: Hi all, I made a codebase which is easy for extensions of making enemy AI's (anything really), most is based on inheritance of some good classes. Here it is including first level : https://github/zork9/pygame-pyMM Enjoy! Cool stuff, but the

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

2013-06-15 Thread MRAB
On 15/06/2013 23:10, alex23 wrote: 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 a

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

2013-06-15 Thread Steven D'Aprano
On Sat, 15 Jun 2013 22:29:29 +0100, Mark Lawrence wrote: > Your arrogance clearly has no bounds. This is a public forum and people > can say what they like. You've wasted enough time as it is, so why > don't you simply bugger off. Congratulation. You have just entered an extremely exclusive clu

Re: Don't feed the troll...

2013-06-15 Thread Steven D'Aprano
On Sun, 16 Jun 2013 09:09:37 +1000, Chris Angelico wrote: > On Sun, Jun 16, 2013 at 3:47 AM, Steven D'Aprano > wrote: >> On Sat, 15 Jun 2013 19:25:21 +0200, Chris “Kwpolska” Warrick wrote: >>> The source code seems to think otherwise: >> >> Mailman is not the only mailing list software in the wor

Imports (in Py3), please help a novice

2013-06-15 Thread John Ladasky
I'm currently running Python 3.3 on Ubuntu 13.04. Up until now, I have gotten away with writing modules whose namespace is completely defined within a single Python script. That has allowed me to use the following, simple setup script for installation by distutils: ## setup.py ## from distuti

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

2013-06-15 Thread Nick the Gr33k
On 16/6/2013 12:29 πμ, Mark Lawrence wrote: On 15/06/2013 20:38, Nick the Gr33k wrote: Thank you and please whoever does not feel like helping, please at least not spam the thread. Your arrogance clearly has no bounds. Your spamming to my threads in an unproductive and yet bitching way ha

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

2013-06-15 Thread Nick the Gr33k
On 16/6/2013 1:51 πμ, Chris Angelico wrote: On Sun, Jun 16, 2013 at 6:29 AM, Benjamin Schollnick wrote: cur.execute('''SELECT ID FROM counters WHERE url = %s''', page ) cur.execute('''INSERT INTO counters (url) VALUES (%s)''', page ) Sure, whoever wrote that code is a fool. http://xkcd.com/32

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

2013-06-15 Thread Mark Lawrence
On 16/06/2013 02:03, Nick the Gr33k wrote: On 16/6/2013 12:29 πμ, Mark Lawrence wrote: On 15/06/2013 20:38, Nick the Gr33k wrote: Thank you and please whoever does not feel like helping, please at least not spam the thread. Your arrogance clearly has no bounds. Your spamming to my thread

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

2013-06-15 Thread Nick the Gr33k
On 16/6/2013 1:51 πμ, Chris Angelico wrote: On Sun, Jun 16, 2013 at 6:29 AM, Benjamin Schollnick wrote: cur.execute('''SELECT ID FROM counters WHERE url = %s''', page ) cur.execute('''INSERT INTO counters (url) VALUES (%s)''', page ) Sure, whoever wrote that code is a fool. http://xkcd.com/32

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

2013-06-15 Thread Nick the Gr33k
On 16/6/2013 1:51 πμ, Chris Angelico wrote: On Sun, Jun 16, 2013 at 6:29 AM, Benjamin Schollnick wrote: cur.execute('''SELECT ID FROM counters WHERE url = %s''', page ) cur.execute('''INSERT INTO counters (url) VALUES (%s)''', page ) Sure, whoever wrote that code is a fool. http://xkcd.com/32

CC etiquette for mailing lists (was: Don't feed the troll...)

2013-06-15 Thread W. Trevor King
On Sun, Jun 16, 2013 at 12:51:04AM +, Steven D'Aprano wrote: > On Sun, 16 Jun 2013 09:09:37 +1000, Chris Angelico wrote: > > Mailman is the software that runs python-list@python.org, so this > > *is* applicable to everyone who reads the mailing list (including > > myself). The fact that there'

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

2013-06-15 Thread Nick the Gr33k
On 16/6/2013 4:10 πμ, Mark Lawrence wrote: I have no intention of kill-filing you, muting your threads or ignoring you. I do intend hounding you until with any luck you crawl off into a hole somewhere and leave this group in peace. No such luck i'm afraid for you. And it seems to me that you a

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

2013-06-15 Thread Tim Roberts
Nick the Gr33k wrote: > >but i'm doing this all day long i just dont comprehend why it works this >way. >it doesn't make any sense to me. It's just a rule you'll have to learn. The "and" and "or" operators in Python simply do not return a boolean value. The expression "a or b" is evaluated as:

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

2013-06-15 Thread lucabrasi
On Saturday, June 15, 2013 5:03:27 PM UTC-7, MRAB wrote: > On 15/06/2013 23:10, alex23 wrote: > > > 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

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

2013-06-15 Thread lucabrasi
On Saturday, June 15, 2013 7:44:09 PM UTC-7, lucabrasi wrote: > On Saturday, June 15, 2013 5:03:27 PM UTC-7, MRAB wrote: > > > On 15/06/2013 23:10, alex23 wrote: > > > > > > > On Jun 16, 7:29 am, lucabrasi...@gmail.com wrote: > > > > > > >> I get this error when I try to save .dxf files in I

Re: Imports (in Py3), please help a novice

2013-06-15 Thread John Ladasky
Followup to my own post: I am sticking pretty closely to this example from Mike Driscoll which, admittedly, is based on Python 2.6: http://www.blog.pythonlibrary.org/2012/07/08/python-201-creating-modules-and-packages/ I'm trying to do this one step at a time. First try a local import, then i

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

2013-06-15 Thread Dave Angel
On 06/15/2013 10:44 PM, lucabrasi wrote: On Saturday, June 15, 2013 5:03:27 PM UTC-7, MRAB wrote: On 15/06/2013 23:10, alex23 wrote: should be banned> Do you have a separate installation of Python? It's possible it may be conflicting. If you rename it's folder to something else

Re: Timsort in Cpython

2013-06-15 Thread Terry Reedy
On 6/15/2013 4:21 PM, alphons...@gmail.com wrote: Well. I'm going to have a ton of fun trying to make sense of this. http://hg.python.org/cpython/file/default/Objects/listsort.txt is pretty clear (to me) for most of the basics. -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/p

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

2013-06-15 Thread Terry Reedy
On 6/15/2013 8:03 PM, MRAB wrote: On 15/06/2013 23:10, alex23 wrote: \__init__.py", line 123 raise CodecRegistryError,\ ^ SyntaxError: invalid syntax To me that traceback looks like it's Python 3 trying to run code written for Python 2. If that is the case, the ^ should be under the ',' (a

Re: Version Control Software

2013-06-15 Thread rusi
On Jun 16, 4:14 am, Chris Angelico wrote: > On Sun, Jun 16, 2013 at 12:16 AM, Roy Smith wrote: > > The advantage of DVCS is that everybody has a full copy of the repo. > > The disadvantage of the DVCS is that every MUST have a full copy of the > > repo.  When a repo gets big, you may not want to

Re: Timsort in Cpython

2013-06-15 Thread alphonse23
Yes I've read it. Very interesting read. There are other resources too online that make it very clear, for instance the wikipedia articles is pretty good. Though, if anyone would be interested in helping me out further -- though by all means, I'm not lazy, I can figure it myself. But, I wanted t

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

2013-06-15 Thread Larry Hudson
On 06/15/2013 03:10 PM, alex23 wrote: On Jun 16, 7:29 am, lucabrasi...@gmail.com wrote: Here's a report of a similar issue with Blender (which also provides a local install of Python under Windows): http://translate.google.com.au/translate?hl=en&sl=fr&u=http://blenderclan.tuxfamily.org/html/m

Re: Version Control Software

2013-06-15 Thread Chris Angelico
On Sun, Jun 16, 2013 at 1:55 PM, rusi wrote: > On Jun 16, 4:14 am, Chris Angelico wrote: >> On Sun, Jun 16, 2013 at 12:16 AM, Roy Smith wrote: >> > The advantage of DVCS is that everybody has a full copy of the repo. >> > The disadvantage of the DVCS is that every MUST have a full copy of the >>

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

2013-06-15 Thread Steven D'Aprano
On Sat, 15 Jun 2013 18:55:05 -0700, Tim Roberts wrote: > Nick the Gr33k wrote: >> >>but i'm doing this all day long i just dont comprehend why it works this >>way. it doesn't make any sense to me. > > It's just a rule you'll have to learn. The "and" and "or" operators in > Python simply do not

Python Greek mailing list [was Re: Why 'files.py' does not print the filenames into a table format?]

2013-06-15 Thread Steven D'Aprano
Nikos, Have you considered subscribing to this? http://mail.python.org/mailman/listinfo/python-greece Possibly some of these concepts will be easier for you to understand if explained to you in your native language. Or you might be able to join a local Users Group who can help you. -- Ste

Re: Version Control Software

2013-06-15 Thread Steven D'Aprano
On Sun, 16 Jun 2013 14:13:13 +1000, Chris Angelico wrote: > I didn't think there would be that much difference, tbh. Mainly, I'm > just seeing cpython as not being 200MB of history, or so I'd thought. > Pike has ~30K commits (based on 'git log --oneline|wc -l'); CPython has > roughly 80K (based on

Re: Version Control Software

2013-06-15 Thread Chris Angelico
On Sun, Jun 16, 2013 at 3:20 PM, Steven D'Aprano wrote: > On Sun, 16 Jun 2013 14:13:13 +1000, Chris Angelico wrote: > >> I didn't think there would be that much difference, tbh. Mainly, I'm >> just seeing cpython as not being 200MB of history, or so I'd thought. >> Pike has ~30K commits (based on

Re: Debugging memory leaks

2013-06-15 Thread dieter
Chris Angelico writes: > ... > Right. Everything needs to be scaled. Everything needs to be in > perspective. Losing 1 kilobit per day is indeed trivial; even losing > one kilobyte per day, which is what I assume you meant :), isn't > significant. But it's not usually per day, it's per leaking act

Re: Memory usage steadily going up while pickling objects

2013-06-15 Thread dieter
Giorgos Tzampanakis writes: > ... > So it seems that the pickle module does keep some internal cache or > something like that. This is highly unlikely: the "ZODB" (Zope object database) uses pickle (actually, it is "cPickle", the "C" implementation of the "pickle" module) for serialization. The "

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

2013-06-15 Thread Denis McMahon
On Sat, 15 Jun 2013 19:18:53 +0300, Nick the Gr33k wrote: > In both situations we still have 2 memory units holding values, so hows > that different? Consider that each named variable is a pointer to a memory location that holds a value. This is one of the ways in that a typed compiled language

<    1   2