Re: Dihedral

2013-07-15 Thread Tim Delaney
On 16 July 2013 08:59, Chris Angelico wrote: > On Tue, Jul 16, 2013 at 8:54 AM, Fábio Santos > wrote: > > > >> On 07/15/2013 08:36 AM, Steven D'Aprano wrote: > >>> > >>> Devyn, > >>> > >>> 8 Dihedral is our resident bot, not a human being. Nobody knows who > >>> controls it, and why they are

a little more explicative error message?

2013-07-15 Thread Vito De Tullio
Hi I was writing a decorator and lost half an hour for a stupid bug in my code, but honestly the error the python interpreter returned to me doesn't helped... $ python3 Python 3.3.0 (default, Feb 24 2013, 09:34:27) [GCC 4.7.2] on linux Type "help", "copyright", "credits" or "license" for more i

Re: Ideal way to separate GUI and logic?

2013-07-15 Thread Chris Angelico
On Tue, Jul 16, 2013 at 10:25 AM, wrote: > Again, thanks for all the responses. I'm curious, though, what exactly is the > rationale for making functions so small? (I've heard that the function > calling of Python has relatively high overhead?) A function should be as long as it needs to be -

Re: GeoIP2 for retrieving city and region ?

2013-07-15 Thread Michael Torrie
On 07/15/2013 06:34 PM, Dennis Lee Bieber wrote: >> I have no idea how to implement the solution you proposed. >> These are nice ideas we need to have a way of implement them within a >> script. >> >> I have no way of grasping a map of cell towers of a map of wi-fi hotspots. >> > You don't.

Re: Understanding other people's code

2013-07-15 Thread asimjalis
On Friday, July 12, 2013 7:22:59 AM UTC-7, Azureaus wrote: > Hi all, > I've been asked to take over a project from someone else and to extend the > functionality of this. The project is written in Python which I haven't had > any real experience with (although I do really like it) so I've spent t

Re: Ideal way to separate GUI and logic?

2013-07-15 Thread Asim Jalis
On Mon, Jul 15, 2013 at 5:25 PM, wrote: > Again, thanks for all the responses. I'm curious, though, what exactly is > the rationale for making functions so small? (I've heard that the function > calling of Python has relatively high overhead?) > There is a small overhead, but it makes the code e

Re: UTF-EBCDIC encoding?

2013-07-15 Thread Roy Smith
In article , Owen Marshall wrote: > On 2013-07-12, Joel Goldstick wrote: > > --047d7bdc8be492d67804e154c580 Content-Type: text/plain; charset=UTF-8 > > > > On Fri, Jul 12, 2013 at 2:11 PM, Wayne Werner > > wrote: > > > >> Is anyone aware of a UTF-EBCDIC[1] decoder? > >> > >> While Python does

Re: UTF-EBCDIC encoding?

2013-07-15 Thread Owen Marshall
On 2013-07-12, Joel Goldstick wrote: > --047d7bdc8be492d67804e154c580 Content-Type: text/plain; charset=UTF-8 > > On Fri, Jul 12, 2013 at 2:11 PM, Wayne Werner > wrote: > >> Is anyone aware of a UTF-EBCDIC[1] decoder? >> >> While Python does have a few EBCDIC dialects in the codecs, it does >> no

Re: Ideal way to separate GUI and logic?

2013-07-15 Thread Owen Marshall
On 2013-07-16, fronag...@gmail.com wrote: > On Tuesday, July 16, 2013 1:06:30 AM UTC+8, asim...@gmail.com wrote: >> fron...@gmail.com wrote: >> >> > So as a general idea, I should at the very least separate the GUI >> > from the program logic by defining the logic as a function, >> > correct? And

Re: Ideal way to separate GUI and logic?

2013-07-15 Thread fronagzen
On Tuesday, July 16, 2013 1:06:30 AM UTC+8, asim...@gmail.com wrote: > fron...@gmail.com wrote: > > > So as a general idea, I should at the very least separate the GUI from the > > program logic by defining the logic as a function, correct? And the next > > level of separation is to define the l

Re: Dihedral

2013-07-15 Thread Chris Angelico
On Tue, Jul 16, 2013 at 8:54 AM, Fábio Santos wrote: > >> On 07/15/2013 08:36 AM, Steven D'Aprano wrote: >>> >>> Devyn, >>> >>> 8 Dihedral is our resident bot, not a human being. Nobody knows who >>> controls it, and why they are running it, but we are pretty certain that >>> it is a bot respo

Re: Dihedral

2013-07-15 Thread Fábio Santos
> On 07/15/2013 08:36 AM, Steven D'Aprano wrote: >> >> Devyn, >> >> 8 Dihedral is our resident bot, not a human being. Nobody knows who >> controls it, and why they are running it, but we are pretty certain that >> it is a bot responding mechanically to keywords in people's posts. >> >> It's a

Re: UTF-EBCDIC encoding?

2013-07-15 Thread Wayne Werner
On Mon, 15 Jul 2013, Kev Dwyer wrote: Joel Goldstick wrote: On Fri, Jul 12, 2013 at 3:12 PM, Skip Montanaro wrote: I can't help you. I'm astonished. Trying to imagine the work environment where this technology would be necessary http://www.iseriespython.com/app/ispMain.py/Start?job=Ho

Re: Dihedral

2013-07-15 Thread Wayne Werner
On Mon, 15 Jul 2013, Devyn Collier Johnson wrote: On 07/15/2013 08:36 AM, Steven D'Aprano wrote: On Mon, 15 Jul 2013 06:06:06 -0400, Devyn Collier Johnson wrote: On 07/14/2013 02:17 PM, 8 Dihedral wrote: [...] Do we want volunteers to speed up search operations in the string module in

Re: Question regarding building Python Windows installer

2013-07-15 Thread Zachary Ware
(Side note: Please avoid top-posting in future. Bottom-posting keeps context more clearly) On Mon, Jul 15, 2013 at 2:27 PM, Mcadams, Philip W wrote: > Yes. My goal was to create the installer to put the modified python on my > Mercurial server. So I could have effectively copied over the wit

Re: UTF-EBCDIC encoding?

2013-07-15 Thread Kev Dwyer
Joel Goldstick wrote: > On Fri, Jul 12, 2013 at 3:12 PM, Skip Montanaro wrote: > >> > I can't help you. I'm astonished. Trying to imagine the work >> environment >> > where this technology would be necessary >> >> http://www.iseriespython.com/app/ispMain.py/Start?job=Home >> >> Skip >> > I rem

RE: Question regarding building Python Windows installer

2013-07-15 Thread Mcadams, Philip W
Yes. My goal was to create the installer to put the modified python on my Mercurial server. So I could have effectively copied over the \Lib\site-packages on the server? What I was trying to resolve was the issue with large Mercurial pushes. I instead am using the IIS Crypto tool to resolve

Re: Understanding other people's code

2013-07-15 Thread CM
On Monday, July 15, 2013 6:02:30 AM UTC-4, Azureaus wrote: > To be fair to who programmed it, most functions are commented and I can't > complain about the messiness of the code, It's actually very tidy. (I suppose > Python forcing it's formatting is another reason it's an easily readable > lan

Re: Question regarding building Python Windows installer

2013-07-15 Thread Zachary Ware
On Mon, Jul 15, 2013 at 1:02 PM, Mcadams, Philip W wrote: > Thanks for the reply Zachery. We have decided to just use another solution. > Out of curiosity though I wanted to clarification on your statement: > > just stick the hg modules somewhere on PYTHONPATH. > > Are you saying that I would jus

RE: Question regarding building Python Windows installer

2013-07-15 Thread Mcadams, Philip W
Thanks for the reply Zachery. We have decided to just use another solution. Out of curiosity though I wanted to clarification on your statement: just stick the hg modules somewhere on PYTHONPATH. Are you saying that I would just map hg modules i.e.: C:\Users\pwmcadam\Downloads\Python-2.7.4\Pyth

Re: Tutorials on Jinja

2013-07-15 Thread asimjalis
On Wednesday, June 24, 2009 11:46:55 AM UTC-7, Saurabh wrote: > Hi All, > > I am trying to move my application on a MVC architecture and plan to > use Jinja for the same. Can anyone provide me with few quick links > that might help me to get started with Jinja? > > Thanks, > Saby The documentati

Re: Python - remote object protocols and security

2013-07-15 Thread Jean-Michel Pichavant
- Original Message - > On 15-7-2013 13:17, Dave Angel wrote: > > On 07/15/2013 06:20 AM, Jean-Michel Pichavant wrote: > >> In text format... sorry for my previous html post > >> > >> Hello everyone, > >> > >> I'd like to exchange some simple python objects over the internet. > >> I initiall

Re: Ideal way to separate GUI and logic?

2013-07-15 Thread asimjalis
fron...@gmail.com wrote: > So as a general idea, I should at the very least separate the GUI from the > program logic by defining the logic as a function, correct? And the next > level of separation is to define the logic as a class in one or more separate > files, and then import it to the file

Re: Python - remote object protocols and security

2013-07-15 Thread Irmen de Jong
On 15-7-2013 18:57, Irmen de Jong wrote: >> Note that DOS attacks are possible whatever encoding scheme you have. Make >> sure that >> self-references within the data are well-defined (or impossible), and put >> limits on size >> per transaction, and transactions per minute per legitimate user.

Re: Beginner - GUI devlopment in Tkinter - Any IDE with drag and drop feature like Visual Studio?

2013-07-15 Thread asimjalis
Take a look at kivy at http://kivy.org. On Thursday, July 4, 2013 6:23:41 AM UTC-7, Aseem Bansal wrote: > I want to start GUI development using Tkinter in Python 2.7.5. > > > > I have been searching all over google but couldn't find any IDE that has > drag-and-drop feature for Python GUI devel

Re: Python - remote object protocols and security

2013-07-15 Thread Irmen de Jong
On 15-7-2013 13:17, Dave Angel wrote: > On 07/15/2013 06:20 AM, Jean-Michel Pichavant wrote: >> In text format... sorry for my previous html post >> >> Hello everyone, >> >> I'd like to exchange some simple python objects over the internet. >> I initially planned to use Pyro, after reading >> http:

Re: Python - remote object protocols and security

2013-07-15 Thread Chris Angelico
On Tue, Jul 16, 2013 at 2:31 AM, Burak Arslan wrote: > On 07/15/13 16:53, Chris Angelico wrote: >> I haven't looked into the details, but there was one among a list of >> exploits that was being discussed a few months ago; it involved XML >> schemas, I think, and quite a few generic XML parsers co

Re: Python - remote object protocols and security

2013-07-15 Thread Burak Arslan
On 07/15/13 16:53, Chris Angelico wrote: > I haven't looked into the details, but there was one among a list of > exploits that was being discussed a few months ago; it involved XML > schemas, I think, and quite a few generic XML parsers could be tricked > into fetching arbitrary documents. Whether

Re: Is this a bug?

2013-07-15 Thread Chris Angelico
On Tue, Jul 16, 2013 at 1:50 AM, Jack Bates wrote: > Hello, > > Is the following code supposed to be an UnboundLocalError? > Currently it assigns the value 'bar' to the attribute baz.foo > >foo = 'bar' >class baz: > foo = foo > -- > http://mail.python.org/mailman/listinfo/python-list

Re: Is this a bug?

2013-07-15 Thread Joshua Landau
On 15 July 2013 16:50, Jack Bates wrote: > Hello, > > Is the following code supposed to be an UnboundLocalError? > Currently it assigns the value 'bar' to the attribute baz.foo > >foo = 'bar' >class baz: > foo = foo I have two responses because I'm not sure what you're saying. Take

Re: Is this a bug?

2013-07-15 Thread Zachary Ware
On Mon, Jul 15, 2013 at 10:50 AM, Jack Bates wrote: > Hello, > > Is the following code supposed to be an UnboundLocalError? > Currently it assigns the value 'bar' to the attribute baz.foo > >foo = 'bar' >class baz: > foo = foo No bug. It's not an error because of differences in the

Is this a bug?

2013-07-15 Thread Jack Bates
Hello, Is the following code supposed to be an UnboundLocalError? Currently it assigns the value 'bar' to the attribute baz.foo foo = 'bar' class baz: foo = foo -- http://mail.python.org/mailman/listinfo/python-list

Re: Python - remote object protocols and security

2013-07-15 Thread Chris Angelico
On Tue, Jul 16, 2013 at 1:42 AM, Burak Arslan wrote: > On 07/15/13 13:57, Chris Angelico wrote: >> But what I meant was that the [Json] protocol itself is designed with >> security restrictions in mind. It's designed not to fetch additional >> content from the network (as XML can), > > Can you exp

Re: Question regarding building Python Windows installer

2013-07-15 Thread Zachary Ware
On Mon, Jul 15, 2013 at 8:11 AM, Mcadams, Philip W wrote: > I’m attempting to create a Python 64-bit Windows Installer. Following the > instructions here: http://docs.python.org/2/distutils/builtdist.html I’m to > navigate to my Python folder and user command: > > > > python setup.py build --plat

Re: Python - remote object protocols and security

2013-07-15 Thread Burak Arslan
On 07/15/13 13:51, Chris Angelico wrote: > So the only bit you still need is: How do you transmit this across the > network? Since it's now all just bytes, that's easy enough to do, eg > with TCP. But that depends on the rest of your system, and is a quite > separate question - and quite probably o

[ANN]:JSONStream

2013-07-15 Thread Sol Toure
I was trying to process a large file containing a number of distinct JSON object as a stream, but I couldn't find anything readily available to that. (maybe I didn't search hard enough) So I came up with this: https://github.com/qrtz/JSONStream I hope you find it useful too. -- http://mail.pytho

Re: Beginner - GUI devlopment in Tkinter - Any IDE with drag and drop feature like Visual Studio?

2013-07-15 Thread Aseem Bansal
@CM Thanks for the suggestion. I'll take a look. -- http://mail.python.org/mailman/listinfo/python-list

Re: Question regarding building Python Windows installer

2013-07-15 Thread MRAB
On 15/07/2013 14:11, Mcadams, Philip W wrote: I’m attempting to create a Python 64-bit Windows Installer. Following the instructions here: http://docs.python.org/2/distutils/builtdist.html I’m to navigate to my Python folder and user command: python setup.py build --plat-name=win-amd64 bdist_wi

Re: GeoIP2 for retrieving city and region ?

2013-07-15 Thread Νικόλας
Στις 13/7/2013 9:17 μμ, ο/η Benjamin Kaplan έγραψε: On Sat, Jul 13, 2013 at 10:43 AM, Νικόλας wrote: Στις 13/7/2013 7:54 μμ, ο/η Dennis Lee Bieber έγραψε: Are you paying for a fixed IP number? I suspect you are if you were running a world-accessible server. Obviously a fixe

Question regarding building Python Windows installer

2013-07-15 Thread Mcadams, Philip W
I'm attempting to create a Python 64-bit Windows Installer. Following the instructions here: http://docs.python.org/2/distutils/builtdist.html I'm to navigate to my Python folder and user command: python setup.py build --plat-name=win-amd64 bdist_wininst I get error: COMPILED_WTH_PYDEBUG = ('-

Re: Python - remote object protocols and security

2013-07-15 Thread Chris Angelico
On Mon, Jul 15, 2013 at 10:45 PM, Dave Angel wrote: > On 07/15/2013 08:30 AM, Chris Angelico wrote: >> >> On Mon, Jul 15, 2013 at 10:26 PM, Jean-Michel Pichavant >> wrote: >>> >>> Basically, I need to transfer numbers (int). Possibly dictionaries like >>> {string: int} in order to structure thing

Re: GeoIP2 for retrieving city and region ?

2013-07-15 Thread Wayne Werner
On Sat, 13 Jul 2013, Νικόλας wrote: But then how do you explain the fact that http://www.maxmind.com/en/geoip_demo pinpointed Thessaloníki and not Athens and for 2 friends of mine that use the same ISP as me but live in different cities also accurately identified their locations too? If you

Re: GeoIP2 for retrieving city and region ?

2013-07-15 Thread Benjamin Kaplan
On Sat, Jul 13, 2013 at 10:43 AM, Νικόλας wrote: > Στις 13/7/2013 7:54 μμ, ο/η Dennis Lee Bieber έγραψε: >> >> Are you paying for a fixed IP number? I suspect you are if you >> were >> running a world-accessible server. >> >> Obviously a fixed IP will be tied to a fixed connection

Re: Dihedral

2013-07-15 Thread Joel Goldstick
On Mon, Jul 15, 2013 at 8:52 AM, Devyn Collier Johnson < devyncjohn...@gmail.com> wrote: > > On 07/15/2013 08:36 AM, Steven D'Aprano wrote: > >> On Mon, 15 Jul 2013 06:06:06 -0400, Devyn Collier Johnson wrote: >> >> On 07/14/2013 02:17 PM, 8 Dihedral wrote: >>> >> [...] >> >>> Do we want volu

Re: GeoIP2 for retrieving city and region ?

2013-07-15 Thread Michael Torrie
On 07/12/2013 10:32 AM, Νικόλας wrote: > So, my question now is, if there is some way we can get an accurate Geo > City database. As has been said pretty much by every other poster, there is no way to do get an accurate location database. Period. The databases that do exist were built by hand,

Re: GeoIP2 for retrieving city and region ?

2013-07-15 Thread Joel Goldstick
On Fri, Jul 12, 2013 at 7:04 PM, Dennis Lee Bieber wrote: > On Sat, 13 Jul 2013 02:47:38 +1000, Chris Angelico > declaimed the following: > > > > >Oh, and just for laughs, I tried a few of my recent mobile IP > >addresses in the GeoIP lookup. All of them quoted Melbourne someplace, > >some in the

Re: Python - remote object protocols and security

2013-07-15 Thread Burak Arslan
Hi, On 07/15/13 13:30, Chris Angelico wrote: > On Mon, Jul 15, 2013 at 10:26 PM, Jean-Michel Pichavant > wrote: >> Basically, I need to transfer numbers (int). Possibly dictionaries like >> {string: int} in order to structure things a little bit. > I strongly recommend JSON, then. It's a well-k

Dihedral

2013-07-15 Thread Devyn Collier Johnson
On 07/15/2013 08:36 AM, Steven D'Aprano wrote: On Mon, 15 Jul 2013 06:06:06 -0400, Devyn Collier Johnson wrote: On 07/14/2013 02:17 PM, 8 Dihedral wrote: [...] Do we want volunteers to speed up search operations in the string module in Python? It would be nice if someone could speed it

Re: Python - remote object protocols and security

2013-07-15 Thread Chris Angelico
On Mon, Jul 15, 2013 at 10:41 PM, Jean-Michel Pichavant wrote: > - Original Message - >> > What I think I need to care about, is malicious code injections. >> > Because >> > both client/server will be in python, would someone capable of >> > executing >> > code by changing one side python

Re: Python - remote object protocols and security

2013-07-15 Thread Dave Angel
On 07/15/2013 08:30 AM, Chris Angelico wrote: On Mon, Jul 15, 2013 at 10:26 PM, Jean-Michel Pichavant wrote: Basically, I need to transfer numbers (int). Possibly dictionaries like {string: int} in order to structure things a little bit. I strongly recommend JSON, then. It's a well-known sys

Re: Python - remote object protocols and security

2013-07-15 Thread Jean-Michel Pichavant
- Original Message - > > What I think I need to care about, is malicious code injections. > > Because > > both client/server will be in python, would someone capable of > > executing > > code by changing one side python source ? > > > > How do I prevent this and still provide the source to

Re: RE Module Performance

2013-07-15 Thread Steven D'Aprano
On Mon, 15 Jul 2013 06:06:06 -0400, Devyn Collier Johnson wrote: > On 07/14/2013 02:17 PM, 8 Dihedral wrote: [...] >> Do we want volunteers to speed up >> search operations in the string module in Python? > > It would be nice if someone could speed it up. Devyn, 8 Dihedral is our residen

Re: Python - remote object protocols and security

2013-07-15 Thread Chris Angelico
On Mon, Jul 15, 2013 at 10:26 PM, Jean-Michel Pichavant wrote: > Basically, I need to transfer numbers (int). Possibly dictionaries like > {string: int} in order to structure things a little bit. I strongly recommend JSON, then. It's a well-known system, it's compact, it's secure, and Python com

Re: Python - remote object protocols and security

2013-07-15 Thread Jean-Michel Pichavant
- Original Message - > > I don't mind encrypting data, if someone wants to sniff what I'm > > sending, he's welcome. > > > > I don't think the word you need there is "mind," but I get the idea. You're right, I wanted to state actually the opposite, I don't want to encrypt data because

Re: what thread-synch mech to use for clean exit from a thread

2013-07-15 Thread MRAB
On 15/07/2013 04:04, Steven D'Aprano wrote: On Mon, 15 Jul 2013 10:27:45 +0800, Gildor Oronar wrote: A currency exchange thread updates exchange rate once a minute. If the thread faield to update currency rate for 5 hours, it should inform main() for a clean exit. This has to be done gracefully

Re: How to clean up socket connection to printer

2013-07-15 Thread loial
Well, I certainly suspect the customers network connection to the printer which is over a WAN across half of Europe, but proving that is the problem is another matter. I can replicate a "Connection reset by peer" error on own printer by pulling the network cable out of the printer. And again I

Re: Python - remote object protocols and security

2013-07-15 Thread Chris Angelico
On Mon, Jul 15, 2013 at 8:13 PM, Jean-Michel Pichavant wrote: > I'd like to exchange some simple python objects over the internet. > I initially planned to use Pyro, after reading > http://pythonhosted.org/Pyro4/security.html I'm still puzzled. > > I don't mind encrypting data, if someone wants to

Re: Python - remote object protocols and security

2013-07-15 Thread Dave Angel
On 07/15/2013 06:20 AM, Jean-Michel Pichavant wrote: In text format... sorry for my previous html post Hello everyone, I'd like to exchange some simple python objects over the internet. I initially planned to use Pyro, after reading http://pythonhosted.org/Pyro4/security.html I'm still puzzled

Re: Python - remote object protocols and security

2013-07-15 Thread Jean-Michel Pichavant
In text format... sorry for my previous html post Hello everyone, I'd like to exchange some simple python objects over the internet. I initially planned to use Pyro, after reading http://pythonhosted.org/Pyro4/security.html I'm still puzzled. I don't mind encrypting data, if someone wants to

Python - remote object protocols and security

2013-07-15 Thread Jean-Michel Pichavant
Hello everyone, I'd like to exchange some simple python objects over the internet. I initially planned to use Pyro, after reading http://pythonhosted.org/Pyro4/security.html I'm still puzzled. I don't mind encrypting data, if someone wants to sniff what I'm sending, he's welcome. What I

Re: RE Module Performance

2013-07-15 Thread Devyn Collier Johnson
On 07/14/2013 02:17 PM, 8 Dihedral wrote: On Saturday, July 13, 2013 1:37:46 PM UTC+8, Steven D'Aprano wrote: On Fri, 12 Jul 2013 13:58:29 -0400, Devyn Collier Johnson wrote: I plan to spend some time optimizing the re.py module for Unix systems. I would love to amp up my programs that

Re: Understanding other people's code

2013-07-15 Thread Azureaus
On Friday, 12 July 2013 15:22:59 UTC+1, Azureaus wrote: > Hi all, > > I've been asked to take over a project from someone else and to extend the > functionality of this. The project is written in Python which I haven't had > any real experience with (although I do really like it) so I've spent

minfuds - coding puzzle

2013-07-15 Thread alphonse23
Would anybody be up to helping me solve this? It's one of the questions on Codility. According to them, it should only take 30 mins. Two non-empty zero-indexed arrays A and B, each consisting of N integers, are given. Four functions are defined based on these arrays: F(X,K) = A[K]*X + B[K] U(X)