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

2013-07-21 Thread Dave Cook
load the .ui files: http://srinikom.github.io/pyside-docs/PySide/QtUiTools/QUiLoader.html Dave Cook -- http://mail.python.org/mailman/listinfo/python-list

Re: Find and Replace Simplification

2013-07-20 Thread Dave Angel
On 07/20/2013 01:03 PM, Joshua Landau wrote: On 20 July 2013 12:57, Serhiy Storchaka storch...@gmail.com wrote: 20.07.13 14:16, Joshua Landau написав(ла): snip However, some quick timing shows that translate has a very high penalty for missing characters and is a tad slower any way.

Re: Find and Replace Simplification

2013-07-20 Thread Dave Angel
On 07/20/2013 02:37 PM, Joshua Landau wrote: On 20 July 2013 19:04, Dave Angel da...@davea.name wrote: On 07/20/2013 01:03 PM, Joshua Landau wrote: Still, it seems to me that it should be optimizable for sensible builtin types such that .translate is significantly faster, as there's

Re: Stack Overflow moderator “animuson”

2013-07-19 Thread Dave Angel
On 07/19/2013 06:35 PM, Chris Angelico wrote: On Sat, Jul 20, 2013 at 4:54 AM, wxjmfa...@gmail.com wrote: And do not forget memory. The €uro just become expensive. sys.getsizeof(' ) 26 sys.getsizeof('€') 40 I do not know. When an €uro char need 14 bytes more that a dollar, I belong to

Re: Share Code Tips

2013-07-19 Thread Dave Angel
On 07/19/2013 06:08 PM, Devyn Collier Johnson wrote: On 07/19/2013 01:59 PM, Steven D'Aprano wrote: snip As for the case-insensitive if-statements, most code uses Latin letters. Making a case-insensitive-international if-statement would be interesting. I can tackle that later. For now,

Re: Find and Replace Simplification

2013-07-19 Thread Dave Angel
On 07/19/2013 05:44 PM, Devyn Collier Johnson wrote: On 07/19/2013 12:22 PM, Steven D'Aprano wrote: On Fri, 19 Jul 2013 09:22:48 -0400, Devyn Collier Johnson wrote: I have some code that I want to simplify. I know that a for-loop would work well, but can I make re.sub perform all of the

Re: Share Code Tips

2013-07-19 Thread Dave Angel
On 07/19/2013 09:04 PM, Devyn Collier Johnson wrote: snip Chris Angelico said that casefold is not perfect. In the future, I want to make the perfect international-case-insensitive if-statement. For now, my code only supports a limited range of characters. Even with casefold, I will

Re: Creating a Program to Decompose a Number and Run a Function on that Decomposition

2013-07-18 Thread Dave Angel
On 07/18/2013 07:04 PM, CTSB01 wrote: On Thursday, July 18, 2013 6:49:03 PM UTC-4, Ian wrote: On Jul 18, 2013 4:23 PM, CTSB01 scott.m...@gmail.com wrote: File pyshell#9, line 2 ... rtn = [] ^ The ... is the continuation prompt from the interactive interpreter, not

Re: Creating a Program to Decompose a Number and Run a Function on that Decomposition

2013-07-18 Thread Dave Angel
Dave, There aren't any emails in the Cc slot so I imagine that part is fine, I will definitely edit the extra quotes though I made the mistake of thinking it was just google being google. Exactly. And remember, the list is comp.lang.python, while googlegroups has tried to pre-empt it by bridging

Re: Creating a Program to Decompose a Number and Run a Function on that Decomposition

2013-07-18 Thread Dave Angel
On 07/18/2013 10:16 PM, CTSB01 wrote: Does something like def phi_m(x, m): rtn = [] for n2 in range(0, len(x) * m - 2): n = n2 / m r = n2 - n * m rtn.append(m * x[n] + r * (x[n + 1] - x[n])) print ('n2 =', n2, ': n

Re: tkinter redraw rates

2013-07-17 Thread Dave Angel
On 07/16/2013 11:04 PM, fronag...@gmail.com wrote: Noted on the quoting thing. Regarding the threading, well, first, I'm not so much a programmer as someone who knows a bit of how to program. And it seems that the only way to update a tkinter window is to use the .update() method, which is

Re: tkinter redraw rates

2013-07-17 Thread Dave Angel
On 07/17/2013 07:10 AM, fronag...@gmail.com wrote: On Wednesday, July 17, 2013 6:07:22 PM UTC+8, Dave Angel wrote: On 07/16/2013 11:04 PM, fronag...@gmail.com wrote: Noted on the quoting thing. Regarding the threading, well, first, I'm not so much a programmer as someone who knows a bit

Re: tkinter redraw rates

2013-07-17 Thread Dave Angel
On 07/17/2013 09:18 AM, fronag...@gmail.com wrote: On Wednesday, July 17, 2013 7:42:45 PM UTC+8, Dave Angel wrote: On 07/17/2013 07:10 AM, fronag...@gmail.com wrote: On Wednesday, July 17, 2013 6:07:22 PM UTC+8, Dave Angel wrote: On 07/16/2013 11:04 PM, fronag...@gmail.com wrote: Noted

Re: tkinter redraw rates

2013-07-17 Thread Dave Angel
On 07/17/2013 08:44 PM, fronag...@gmail.com wrote: On Thursday, July 18, 2013 1:38:34 AM UTC+8, Dave Angel wrote: On 07/17/2013 09:18 AM, fronag...@gmail.com wrote: On Wednesday, July 17, 2013 7:42:45 PM UTC+8, Dave Angel wrote: On 07/17/2013 07:10 AM, fronag...@gmail.com wrote: On Wednesday

Re: Need help with network script

2013-07-17 Thread Dave Angel
On 07/17/2013 09:50 PM, Chris Angelico wrote: On Thu, Jul 18, 2013 at 11:44 AM, bbech...@gmail.com wrote: Hi everyone. I am starting to learn python and I decided to start with what I though was a simple script but I guess now. All I want to do is return what current network location I am

Re: tkinter redraw rates

2013-07-17 Thread Dave Angel
On 07/18/2013 12:38 AM, fronag...@gmail.com wrote: On Thursday, July 18, 2013 9:07:24 AM UTC+8, Dave Angel wrote: On 07/17/2013 08:44 PM, fronag...@gmail.com wrote: On Thursday, July 18, 2013 1:38:34 AM UTC+8, Dave Angel wrote: On 07/17/2013 09:18 AM, fronag...@gmail.com wrote: On Wednesday

Re: Help with pygame

2013-07-16 Thread Dave Angel
On 07/16/2013 01:29 PM, Daniel Kersgaard wrote: I'm having a little trouble, tried Googling it, but to no avail. Currently, I'm working on making a snake game, however I'm stuck on a simple border. The only thing I need help with is when you run the program, the bottom right corner of the

Re: tkinter redraw rates

2013-07-16 Thread Dave Angel
On 07/16/2013 08:57 PM, fronag...@gmail.com wrote: Hm. So I've written a GUI in tkinter. I've found two performance issues, I was hoping someone could point me in the right direction. Firstly, I'm using an image as a border, namely: SNIP This works, yes, but is annoyingly laggy on an

Re: tkinter redraw rates

2013-07-16 Thread Dave Angel
On 07/16/2013 09:51 PM, fronag...@gmail.com wrote: If you are going to use googlegroups, then at least bypass its worst bugs, like double-spacing everything it quotes. http://wiki.python.org/moin/GoogleGroupsPython Yeah, I understand that tkinter isn't really designed for 'logic is

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

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 jeanmic...@sequans.com 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,

Re: Ideal way to separate GUI and logic?

2013-07-13 Thread Dave Cook
On 2013-07-13, fronag...@gmail.com fronag...@gmail.com wrote: I'm wondering what is the best, 'most pythonic' way I recommend PyPubsub: http://pubsub.sourceforge.net/ Dave Cook -- http://mail.python.org/mailman/listinfo/python-list

Re: hex dump w/ or w/out utf-8 chars

2013-07-13 Thread Dave Angel
On 07/13/2013 10:37 AM, wxjmfa...@gmail.com wrote: SNIP The FSR is naive and badly working. I can not force people to understand the coding of the characters [*]. That would be very hard, since you certainly do not. I'm the first to recognize that Python and/or Pike are free to do what

Re: Question about mailing list rules

2013-07-12 Thread Dave Angel
On 07/12/2013 08:34 AM, Chris “Kwpolska” Warrick wrote: On Fri, Jul 12, 2013 at 2:25 PM, Devyn Collier Johnson devyncjohn...@gmail.com wrote: SNIP One more thing Devyn should do is watch the “To:” field and make sure it says python-list@python.org, because the above message was sent to

Re: GeoIP2 for retrieving city and region ?

2013-07-12 Thread Dave Angel
On 07/12/2013 10:18 AM, Νικόλας wrote: Hello, iam still looking for a way to identify the city of my website visitors. SNIP I cant even import the module even though my 'pip install geopip2' wa successful Either it wasn't successful, or it's not the package you thought. There are

Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte

2013-07-12 Thread Dave Angel
On 07/12/2013 07:56 AM, Ferrous Cranus wrote: Στις 12/7/2013 2:47 μμ, ο/η Wayne Werner έγραψε: On Thu, 4 Jul 2013, Νίκος Γκρ33κ wrote: Στις 4/7/2013 6:10 μμ, ο/η MRAB έγραψε: What do you mean I don't know how to catch the exception with OSError? You've tried except socket.gaierror and except

Re: Concurrent writes to the same file

2013-07-10 Thread Dave Angel
On 07/11/2013 12:57 AM, Jason Friedman wrote: Other than using a database, what are my options for allowing two processes to edit the same file at the same time? When I say same time, I can accept delays. I considered lock files, but I cannot conceive of how I avoid race conditions. In

Re: hex dump w/ or w/out utf-8 chars

2013-07-09 Thread Dave Angel
On 07/09/2013 08:22 AM, Neil Cerutti wrote: On 2013-07-08, Dave Angel da...@davea.name wrote: I appreciate you've been around a long time, and worked in a lot of languages. I've programmed professionally in at least 35 languages since 1967. But we've come a long way from the 6bit characters I

Re: hex dump w/ or w/out utf-8 chars

2013-07-09 Thread Dave Angel
On 07/09/2013 09:00 AM, Neil Cerutti wrote: SNIP Interestingly similar scheme. It wonder if 5-bit chars was a common compression scheme. The Z-machine spec was never officially published either. I believe a task force reverse engineered it sometime in the 90's. Baudot was 5 bits. It

Re: Reading File Into 2D List

2013-07-09 Thread Dave Angel
On 07/09/2013 09:30 AM, alex.ha...@gmail.com wrote: Hello! I'm new here and fairly new to Python. I am attempting to read a data file into python and adding it to a 2D list to make it easy to use further down the line. My data file is just 7 numbers in a row seperated by commas and each bulk

Re: crack a router passcode

2013-07-09 Thread Dave Angel
On 07/09/2013 10:26 AM, Ferrous Cranus wrote: Στις 9/7/2013 4:32 μμ, ο/η Chris Angelico έγραψε: On Tue, Jul 9, 2013 at 11:23 PM, Ferrous Cranus ni...@superhost.gr wrote: Could python somehow brute force http://192.168.1.1/login.php giving user and pass trying to guess the password? Could it

Re: crack a router passcode

2013-07-09 Thread Dave Angel
On 07/09/2013 12:06 PM, Ferrous Cranus wrote: SNIP What is the reason of a spambot? Spam a usenet forum to gain what? Spam is unsolicited advertising. A bot is a robot, or other automated device. So Spambots on a usenet newsgroup send apparently innocent questions that also

Re: looking for a new router

2013-07-09 Thread Dave Angel
On 07/09/2013 01:29 AM, Kumita Bruce wrote: Agree. Sir, this mailing list is for Python discussion. :) Save your breath. saadharana and saishreemathi are spambots, and are undoubtedly not listening. -- DaveA -- http://mail.python.org/mailman/listinfo/python-list

Re: Recursive class | can you modify self directly?

2013-07-09 Thread Dave Angel
On 07/09/2013 06:01 PM, Russel Walker wrote: Sorry for the vague title. Probably best to just show you the code that explains it better. This is a simplified example of what I want to do: # THIS DOESN'T WORK from random import choice class Expr(object): Expr(expr, op, val) - an

Re: Best Scripting Language for Embedded Work?

2013-07-09 Thread Dave Angel
On 07/09/2013 09:29 PM, David T. Ashley wrote: We develop embedded software for 32-bit micros using Windows as the development platform. We are seeking a general purpose scripting language to automate certain tasks, like cleaning out certain directories of certain types of files in preparation

Re: capture html screen with pexpect

2013-07-08 Thread Dave Angel
On 07/07/2013 01:06 PM, inq1ltd wrote: python help, I can log into a web site with pexpect but what I want to do is pipe the opening window to a file. Logging into the site opens the site window but I can't get the window to a file. I can't use screen capture I need to get pexpect to pipe

Re: How do I write a script to generate 10 random EVEN numbers and write them to a .txt file?

2013-07-08 Thread Dave Angel
On 07/08/2013 08:01 AM, Kenz09 wrote: Hi, I have been given a task to do. I am a new to programming and Python. My task is to : -Create a function that is called from the main function, that accepts a number as a parameter and determines if the number is even or odd. the next one is, -To

Re: A small question about PEP 8

2013-07-08 Thread Dave Angel
On 07/08/2013 08:02 AM, Steven D'Aprano wrote: On Mon, 08 Jul 2013 11:39:21 +0100, Joshua Landau wrote: SNIP Or you can (be sane) and put it at no indentation: a_wonderful_set_of_things = { ..., not_missing_an_end_brace } I consider that the least aesthetically pleasing,

Re: How do I write a script to generate 10 random EVEN numbers and write them to a .txt file?

2013-07-08 Thread Dave Angel
On 07/08/2013 09:10 AM, Joshua Landau wrote: On 8 July 2013 13:27, Dave Angel da...@davea.name wrote: One of your classmates has already posted the question. However, you win the prize for a better subject line. Or are you the same student, changing your name and wasting our time by starting

Re: hex dump w/ or w/out utf-8 chars

2013-07-08 Thread Dave Angel
On 07/08/2013 01:53 PM, ferdy.blat...@gmail.com wrote: Hi Steven, thank you for your reply... I really needed another python guru which is also an English teacher! Sorry if English is not my mother tongue... uncorrect instead of incorrect (I misapplied the similarity principle like

Re: hex dump w/ or w/out utf-8 chars

2013-07-08 Thread Dave Angel
On 07/08/2013 05:49 PM, Chris Angelico wrote: On Tue, Jul 9, 2013 at 6:56 AM, Dave Angel da...@davea.name wrote: But Unicode has nothing to do with Guido, and it has existed for about 25 years (if I recall correctly). Depends how you measure. According to [1], the work kinda began back

Re: Geo Location extracted from visitors ip address

2013-07-06 Thread Dave Angel
On 07/06/2013 04:41 AM, Νίκος Gr33k wrote: Στις 6/7/2013 11:30 πμ, ο/η Chris Angelico έγραψε: On Sat, Jul 6, 2013 at 6:01 PM, � Gr33k ni...@superhost.gr wrote: Is there any way to pinpoint the visitor's exact location? Yes. You ask them to fill in a shipping address. They may still lie,

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

2013-07-05 Thread Dave Cook
for Eclipse that I'm aware of are for Swing or SWT. You would need to use Jython (if you want to stick with a Python implementation) to interface with these. Dave Cook -- http://mail.python.org/mailman/listinfo/python-list

Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte

2013-07-05 Thread Dave Angel
On 07/05/2013 02:51 AM, Νίκος Gr33k wrote: SNIP Please help because i just happened to noticed that after having this code: try: host = socket.gethostbyaddr( os.environ['REMOTE_ADDR'] )[0] except Exception as e: host = Reverse DNS Failed Don't ever catch a bare Exception

Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte

2013-07-05 Thread Dave Angel
On 07/05/2013 03:13 AM, Νίκος Gr33k wrote: Στις 5/7/2013 10:06 πμ, ο/η Lele Gaifax έγραψε: try: host = socket.gethostbyaddr( os.environ['REMOTE_ADDR'] )[0] except: host = Reverse DNS Failed Yes i uses to had it like that, until i was looking for ways to make it

Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte

2013-07-05 Thread Dave Angel
On 07/05/2013 04:00 AM, Νίκος Gr33k wrote: Στις 5/7/2013 10:50 πμ, ο/η Dave Angel έγραψε: The line started as: host = socket.gethostbyaddr( os.environ['REMOTE_ADDR'] )[0] refactor that to: remadd = os.environ('REMOVE_ADDR') tuple3 = socket.gethostbyaddr(remadd

Re: question please

2013-07-05 Thread Dave Angel
On 07/05/2013 03:48 AM, bill papanastasiou wrote: hello , good morning how i can pùt one python file in website ? Whose website? If it's your own, log into the server, and use cp. Or if you're remote with ssh access, use scp. And if you really have a bunch of files to remotely transfer,

Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte

2013-07-05 Thread Dave Angel
On 07/05/2013 04:49 AM, Νίκος Gr33k wrote: SNIP I don't think running it via 'cli' would help much, since its a cgi-script and ip addr function have no meaning calling them in plain our of a cgi environment but here it is: No idea how to parse have no meaning calling them in plain

Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte

2013-07-05 Thread Dave Angel
On 07/05/2013 06:33 AM, Νίκος Gr33k wrote: Στις 5/7/2013 12:21 μμ, ο/η Dave Angel έγραψε: Traceback (most recent call last): File stdin, line 1, in module File /usr/local/lib/python3.3/os.py, line 669, in __getitem__ value = self._data[self.encodekey(key)] KeyError: b'REMOTE_ADDR

Re: Geo Location extracted from visitors ip address

2013-07-05 Thread Dave Angel
On 07/05/2013 04:44 PM, Tim Roberts wrote: ? Gr33k ni...@superhost.gr wrote: Is there a way to extract out of some environmental variable the Geo location of the user being the city the user visits out website from? Perhaps by utilizing his originated ip address? It is possible to look

Re: Default scope of variables

2013-07-04 Thread Dave Angel
On 07/04/2013 01:32 AM, Steven D'Aprano wrote: SNIP Well, if I ever have more than 63,000,000 variables[1] in a function, I'll keep that in mind. SNIP [1] Based on empirical evidence that Python supports names with length at least up to one million characters long, and assuming

Re: Important features for editors

2013-07-04 Thread Dave Angel
On 07/04/2013 03:59 AM, Νίκος wrote: Στις 4/7/2013 10:32 πμ, ο/η cutems93 έγραψε: I am researching on editors for my own reference. I found that each of them has some features that other don't, but I am not sure which features are significant/necessary for a GOOD editor. What features do you a

Re: Important features for editors

2013-07-04 Thread Dave Angel
On 07/04/2013 03:32 AM, cutems93 wrote: I am researching on editors for my own reference. I found that each of them has some features that other don't, but I am not sure which features are significant/necessary for a GOOD editor. What features do you a good editor should have? Keyboard

Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte

2013-07-04 Thread Dave Angel
On 07/04/2013 04:37 AM, Νίκος wrote: I just started to have this error without changing nothing in my index.html(template) and metrites.py(which ipen the template) [Thu Jul 04 11:35:14 2013] [error] [client 108.162.229.97] Original exception was: [Thu Jul 04 11:35:14 2013] [error] [client

Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte

2013-07-04 Thread Dave Angel
On 07/04/2013 06:03 AM, Νίκος wrote: Στις 4/7/2013 12:59 μμ, ο/η Dave Angel έγραψε: On 07/04/2013 04:37 AM, Νίκος wrote: I just started to have this error without changing nothing in my index.html(template) and metrites.py(which ipen the template) [Thu Jul 04 11:35:14 2013] [error] [client

Google earth

2013-07-04 Thread dave poreh
/) that i usually take my KML files to. Is there any work similar this happened in python before? Thanks for any help in advance, Cheers, Dave -- http://mail.python.org/mailman/listinfo/python-list

Re: Coping with cyclic imports

2013-07-04 Thread Dave Angel
On 07/04/2013 08:48 AM, kanchan.n.maha...@gmail.com wrote: On Tuesday, April 8, 2008 10:06:46 PM UTC+2, Torsten Bronger wrote: Hallöchen! I have a rather fat module that represents a document parser -- inline elements, block elements, and the like. Now I want to split it into many modules to

Re: Coping with cyclic imports

2013-07-04 Thread Dave Angel
On 07/04/2013 11:11 AM, kanchan.n.maha...@gmail.com wrote: On Thursday, July 4, 2013 5:03:20 PM UTC+2, Oscar Benjamin wrote: On 4 July 2013 13:48, kanchan.n.maha...@gmail.com wrote: On Tuesday, April 8, 2008 10:06:46 PM UTC+2, Torsten Bronger wrote: [snip] If you do import foo inside

Re: Important features for editors

2013-07-04 Thread Dave Angel
Emacs/Vim will do better at REPLs, but few others will. * Etc. This goes on. Looking at Dave Angel's list, Sublime Text pretty-much aces it. What I don't understand is where he says: The main negatives I can see are: ... It's available for OS/X, Linux and Windows, with a single purchase

Re: Default scope of variables

2013-07-04 Thread Dave Angel
On 07/04/2013 09:24 PM, Steven D'Aprano wrote: On Thu, 04 Jul 2013 17:54:20 +0100, Rotwang wrote: [...] Anyway, none of the calculations that has been given takes into account the fact that names can be /less/ than one million characters long. Not in *my* code they don't!!! *wink* The

Re: OSError [Errno 26] ?!?!

2013-07-02 Thread Dave Angel
On 07/02/2013 06:06 AM, Chris “Kwpolska” Warrick wrote: On Tue, Jul 2, 2013 at 11:40 AM, Νίκος ni...@superhost.gr wrote: Στις 2/7/2013 10:21 πμ, ο/η Cameron Simpson έγραψε: On 02Jul2013 08:57, Νίκος ni...@superhost.gr wrote: | Thank you, the error have been caused due to the fact that the |

Re: File exists but Python says 'not found'.

2013-07-01 Thread Dave Angel
On 07/01/2013 07:00 AM, preri...@gmail.com wrote: I got it. The working directory was different. Sorry, I'm new and didn't the working directory has to be the location of the data. I thought the location of .py file and data file should be same. Thanks! Es. Robert Kern. Python didn't make

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

2013-07-01 Thread Dave Angel
On 07/01/2013 03:32 PM, Joel Goldstick wrote: I copied the original question so that the rant on the other thread can continue. Let's keep this thread ontopic number_drawn=() def load(lot_number,number_drawn): first=input(enter first lot: ) last=input(enter last lot: ) for

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

2013-07-01 Thread Dave Angel
On 07/01/2013 05:16 PM, rusi wrote: On Tuesday, July 2, 2013 1:32:44 AM UTC+5:30, Dave Angel wrote: SNIP Yes in this specific instance all this is probably true. I believe however, that Joel's intent in reposting this is more global (and important) in its scope, viz: If this list

Re: indexerror: list index out of range??

2013-06-29 Thread Dave Angel
'] Since you're using the arrogant and buggy GoogleGroups, this http://wiki.python.org/moin/GoogleGroupsPython. I see the line,a being correct but print (i) does not show up after 2. and index error comes up. I am too confused now. Please guide. Thanks in advance. Thanks for helping out! Dave

Re: MeCab UTF-8 Decoding Problem

2013-06-29 Thread Dave Angel
On 06/29/2013 07:29 AM, fob...@gmail.com wrote: Hi, Using Python 2.7 on Linux, presumably? It'd be better to be explicit. I am trying to use a program called MeCab, which does syntax analysis on Japanese text. The problem I am having is that it returns a byte string and if I try to print

Re: indexerror: list index out of range??

2013-06-28 Thread Dave Angel
On 06/28/2013 09:20 PM, Titiksha Joshi wrote: Hi, I am working on the following code but am getting the error: list index out of range. I surfed through the group but somehow I am not able to fix my error.Please guide.Structure is given below: m is a list of 5 elements. I have to match

Re: class factory question

2013-06-27 Thread Dave Angel
On 06/27/2013 09:37 AM, Tim wrote: On Thursday, June 27, 2013 9:16:50 AM UTC-4, Joshua Landau wrote: On 26 June 2013 14:09, Tim wrote: I am extending a parser and need to create many classes that are all subclassed from the same object (defined in an external library). When my module is

Re: Running programs on mobile phones

2013-06-27 Thread Dave Angel
On 06/27/2013 11: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. M. K. Shen I've not tried it, but that's what QPython is supposed to do. http://qpython.com/ -- DaveA --

Re: Why is the argparse module so inflexible?

2013-06-27 Thread Dave Angel
On 06/27/2013 09:49 AM, Andrew Berg wrote: On 2013.06.27 08:08, Roy Smith wrote: Can you give us a concrete example of what you're trying to do? The actual code I've written so far isn't easily condensed into a short simple snippet. I'm trying to use argparse to handle all the little details

Re: Devnagari Unicode Conversion Issues

2013-06-27 Thread Dave Angel
On 06/27/2013 11:39 AM, darpan6aya wrote: That worked out. I was trying to encode it the entire time. Now I realise how silly I am. Thanks MRAB. Once Again. :D you're not silly, it's a complex question. MRAB is good at guessing which part is messing you up. However, when you're writing a

Re: Why is the argparse module so inflexible?

2013-06-27 Thread Dave Angel
On 06/27/2013 02:05 PM, Terry Reedy wrote: On 6/27/2013 8:54 AM, Andrew Berg wrote: I've begun writing a program with an interactive prompt, and it needs to parse input from the user. I thought the argparse module would be great for this, It is outside argparse's intended domain of

Re: Unable to import NHunspell.dll using ctypes in Python

2013-06-25 Thread Dave Angel
On 06/25/2013 03:32 AM, akshay.k...@gmail.com wrote: Thanks for the reply Mark. I did what you suggested. But now I'm getting an error like this. Traceback (most recent call last): File start.py, line 15, in module hunspell =

Re: Loop Question

2013-06-25 Thread Dave Angel
On 06/24/2013 08:20 AM, Lutz Horn wrote: Hi, Am 24.06.2013 14:12 schrieb christheco...@gmail.com: username=raw_input(Please enter your username: ) password=raw_input(Please enter your password: ) if username == john doe and password == fopwpo: print Login Successful else: print

Re: Unable to import NHunspell.dll using ctypes in Python

2013-06-25 Thread Dave Angel
On 06/25/2013 03:54 AM, Chris “Kwpolska” Warrick wrote: On Tue, Jun 25, 2013 at 9:45 AM, Dave Angel da...@davea.name wrote: You're on Linux or similar, and dll's are the way a Windows executable is named. dll’s are libraries for windows, not executables (/lib not /bin) Try going back

Re: Unable to import NHunspell.dll using ctypes in Python

2013-06-25 Thread Dave Angel
On 06/25/2013 03:58 AM, akshay.k...@gmail.com wrote: Thanks Dave. I'm using Python 2.7 and am working on Linux Mint. Does it mean that I cant load the functions within the dll whilst on Linux. I thought that was what ctypes was used for. Please correct me if I misunderstood what you meant

Re: Inconsistency on getting arguments

2013-06-25 Thread Dave Angel
On 06/25/2013 09:55 AM, Peter Otten wrote: Marco Perniciaro wrote: Hi, I've been working with Python for a long time. Yet, I came across an issue which I cannot explain. Recently I have a new PC (Windows 7). Previously I could call a Python script with or without the python word at the

Re: io module and pdf question

2013-06-25 Thread Dave Angel
On 06/25/2013 12:15 PM, jyoun...@kc.rr.com wrote: Thank you Rusi and Christian! Something I don't think was mentioned was that reading a text file in Python 3, and specifying latin-1, will work simply because every possible 8-bit byte is a character in Latin-1 That doesn't mean that those

Re: Looking for a name for a deployment framework...

2013-06-25 Thread Dave Angel
On 06/25/2013 03:38 PM, Stig Sandbeck Mathisen wrote: jonathan.slend...@gmail.com writes: Any suggestions for a good name, for a framework that does automatic server deployments? Whatever you choose, make sure it is easily searchable. Googling for puppet and chef only recently gave relevant

Re: Limit Lines of Output

2013-06-25 Thread Dave Angel
On 06/25/2013 04:37 PM, Bryan Britten wrote: Joel - I don't want to send it to a text file because it's just meant to serve as a reference for the user to get an idea of what words are mentioned. The words being analyzed are responses to a survey questions and the primary function of this

Re: Parsing soap/xml result

2013-06-25 Thread Dave Angel
On 06/25/2013 06:28 PM, miguel olivares varela wrote: I try to parse a soap/xml answer like: soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; soapenv:Body

Re: Loop Question

2013-06-24 Thread Dave Angel
On 06/24/2013 03:00 PM, John Gordon wrote: In mailman.3754.1372100014.3114.python-l...@python.org =?UTF-8?B?Q2hyaXMg4oCcS3dwb2xza2HigJ0gV2Fycmljaw==?= kwpol...@gmail.com writes: while True: username = raw_input(Please enter your username: ) password = raw_input(Please enter your

Re: What's wrong with this code? (UnboundLocalError: local variable referenced before assignment)

2013-06-24 Thread Dave Angel
On 06/24/2013 04:12 PM, John Gordon wrote: In b3d3518a-f24a-4c32-a41a-b99145753...@googlegroups.com pablobarhamal...@gmail.com writes: isWhite = True def change(event): if event.x x1 and event.x x2 and event.y y1 and event.y y2: if isWhite: w.itemconfig(rect,

Re: (newbye) exceptions list for python3 classes

2013-06-24 Thread Dave Angel
On 06/24/2013 05:43 PM, chrem wrote: Le 24/06/13 23:35, chrem a écrit : Hi, 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). thanks for your help or feedback,

Re: n00b question on spacing

2013-06-22 Thread Dave Angel
On 06/22/2013 07:12 PM, Chris Angelico wrote: On Sun, Jun 23, 2013 at 1:24 AM, Rick Johnson rantingrickjohn...@gmail.com wrote: _fmtstr = Item wrote to MongoDB database {0}, {1} msg = _fmtstr.format(_arg1, _arg2) As a general rule, I don't like separating format strings and their

Re: n00b question on spacing

2013-06-22 Thread Dave Angel
On 06/22/2013 07:37 PM, Chris Angelico wrote: On Sun, Jun 23, 2013 at 9:28 AM, Dave Angel da...@davea.name wrote: On 06/22/2013 07:12 PM, Chris Angelico wrote: On Sun, Jun 23, 2013 at 1:24 AM, Rick Johnson rantingrickjohn...@gmail.com wrote: _fmtstr = Item wrote to MongoDB database {0

Re: n00b question on spacing

2013-06-22 Thread Dave Angel
On 06/22/2013 08:27 PM, Chris Angelico wrote: On Sun, Jun 23, 2013 at 9:56 AM, Dave Angel da...@davea.name wrote: On 06/22/2013 07:37 PM, Chris Angelico wrote: On the contrary, i18n should be done with config files. The format string **as specified in the physical program** is the key

Re: n00b question on spacing

2013-06-22 Thread Dave Angel
On 06/22/2013 09:20 PM, MRAB wrote: On 23/06/2013 00:56, Dave Angel wrote: SNIP Certainly the reorderability of the format string is significant. Not only can it be reordered, but more than one instance of some of the values is permissible if needed. (What's missing is a decent

Re: New line conversion with Popen attached to a pty

2013-06-21 Thread Dave Angel
On 06/20/2013 06:20 AM, Jonathan Harden wrote: Hi, We have a class which executes external processes in a controlled environment and does things specified by the client program with each line of output. To do this we have been attaching stdout from the subprocess.Popen to a pseudo terminal

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

2013-06-19 Thread Dave Angel
On 06/19/2013 03:14 AM, Chris Angelico wrote: On Wed, Jun 19, 2013 at 3:42 PM, Dave Angel da...@davea.name wrote: Names are *one of* the ways we specify which objects are to be used. (We can also specify objects via an container and a subscript or slice, or via an attribute of another object

Re: Problem with the for loop syntax

2013-06-19 Thread Dave Angel
On 06/19/2013 05:14 PM, arturo balbuena wrote: Hello guys... I´m a begginer in Python, I'm doing a Hangman game, but I'm having trouble with this blank space. I would be greatful if you help me. :) Here's my code: http://snipplr.com/view/71581/hangman/ When I run the code it says: Invalid

Re: os.putenv() has no effect

2013-06-18 Thread Dave Angel
On 06/18/2013 12:49 PM, Johannes Bauer wrote: Hi group, I've tracked down a bug in my application to a rather strange phaenomenon: os.putenv() doesn't seem to have any effect on my platform (x86-64 Gentoo Linux, Python 3.2.3): os.getenv(PATH)

Re: Why is regex so slow?

2013-06-18 Thread Dave Angel
On 06/18/2013 09:51 PM, Steven D'Aprano wrote: SNIP Even if the regex engine is just as efficient at doing simple character matching as `in`, and it probably isn't, your regex tries to match all eleven characters of ENQUEUEING while the `in` test only has to match three, ENQ. The rest of

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

2013-06-18 Thread Dave Angel
I think this is an excellent description of name binding with mutable objects. I just have one clarification to insert below. On 06/19/2013 01:08 AM, Tim Roberts wrote: Nick the Gr33k supp...@superhost.gr wrote: On 16/6/2013 4:55 ??, Tim Roberts wrote: Nick the Gr33k supp...@superhost.gr

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

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

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

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

[issue18249] Incorrect and incomplete help docs for close() method

2013-06-17 Thread Dave Angel
New submission from Dave Angel: Python 3.3.0 (default, Mar 7 2013, 00:24:38) [GCC 4.6.3] on linux q = open('/dev/null') help(q.close) the entire output is: --- Help on built-in function close: close(...) (END) --- But close

Re: OT: C vs Python terminology

2013-06-16 Thread Dave Angel
On 06/16/2013 07:22 AM, Andreas Perstinger wrote: On 16.06.2013 08:32, Denis McMahon wrote: C: int a, b; b = 6; a = b; In C, this places the numeric value 6 into the memory location identified by the variable b, so far so good. then copies the value from the location pointed to by b into

Re: OT: C vs Python terminology

2013-06-16 Thread Dave Angel
On 06/16/2013 11:02 AM, Andreas Perstinger wrote: On 16.06.2013 14:55, Dave Angel wrote: On 06/16/2013 07:22 AM, Andreas Perstinger wrote: SNIP But it doesn't. It binds b to the same object to which a is currently bound. Are you aware that Denis was talking about the behaviour of C

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: SNIP gobs of double-spaced nonsense -- stupid googlegroups should be banned Do you have a separate installation of Python? It's possible it may be

<    6   7   8   9   10   11   12   13   14   15   >