Re: Python enabled gdb on Windows and relocation

2011-05-13 Thread Doug Evans
On Thu, May 12, 2011 at 9:19 AM, Ruben Van Boxem wrote: > (now in plain-text as required by gdb mailing list) > > Hi, > > I am currently trying to integrate Python support into my toolchain > build (including GDB of course). It is a sysrooted > binutils+GCC+GDB+mingw-w64 toolchain. > > I currently

Re: checking if a list is empty

2011-05-13 Thread Ian Kelly
On Fri, May 13, 2011 at 10:47 PM, harrismh777 wrote: > http://www.inf.ed.ac.uk/teaching/courses/inf1/fp/ > > http://www.cs.ou.edu/~rlpage/fpclassSpring97/ > > > There are lots of these...   the two above afaik are still doing this at the > entry level...    ... supposedly, these kids are 'mostly'

turn monitor off and on

2011-05-13 Thread Astan Chee
Hi, I'm trying to turn off my monitor, pause and then turn it on again. I'm doing this in python 2.6 and windows xp. Here is my script so far (that doesn't work): import time import win32gui import win32con import win32api def turnOffMonitor(): SC_MONITORPOWER = 0xF170 win32gui.SendMessage(wi

Re: Get IP address of WIFI interface

2011-05-13 Thread Ishwor Gurung
Hi. On 14 May 2011 14:46, Far.Runner wrote: > Hi Python Experts: > There are two network interfaces on my laptop, one is > 100M Ethernet interface, the other is wifi interface, both are connected and > has an IP address. then the question is: how to get the ip address of the > wifi interface in a

How to get the IP address of the wifi interface?

2011-05-13 Thread Jun Hu
Hi python experts: There are two network interfaces on my laptop, one is 100M Ethernet, the other is wifi, both are connected and have IP addresses. The question is: how to get the ip address of WIFI interface without parsing the output of a shell command like "ipconfig" or "ifconfig"? OS: Windows

Get the IP address of WIFI interface

2011-05-13 Thread Far.Runner
Hi python experts: There are two network interfaces on my laptop: one is 100M Ethernet interface, the other is wifi interface, both are connected and has an ip address. The question is: How to get the ip address of the wifi interface in a python script without parsing the output of a shell command

Re: checking if a list is empty

2011-05-13 Thread harrismh777
Ian Kelly wrote: >> Well, at least Haskell is probably better as an introductory language >> than Lisp or Scheme. But what schools actually do this? http://www.inf.ed.ac.uk/teaching/courses/inf1/fp/ http://www.cs.ou.edu/~rlpage/fpclassSpring97/ There are lots of these... the two above

Get IP address of WIFI interface

2011-05-13 Thread Far.Runner
Hi Python Experts: There are two network interfaces on my laptop, one is 100M Ethernet interface, the other is wifi interface, both are connected and has an IP address. then the question is: how to get the ip address of the wifi interface in a python script? OS: Windows or Linux -- http://mail.py

Re: How best to convert a string "list" to a python list

2011-05-13 Thread John Posner
On 5/13/2011 3:38 PM, noydb wrote: > I want some code to take the items in a semi-colon-delimted string > "list" and places each in a python list. I came up with below. In > the name of learning how to do things properly, No big deal that you weren't aware of the split() method for strings. Sin

Re: checking if a list is empty

2011-05-13 Thread Gregory Ewing
rusi wrote: Dijkstra's problem (paraphrased) is that python, by choosing the FORTRAN alternative of having a non-first-class boolean type, hinders scientific/mathematical thinking/progress. Python doesn't have the flaw that Dijkstra was talking about. Fortran's flaw wasn't so much the lack of

Re: checking if a list is empty

2011-05-13 Thread Gregory Ewing
harrismh777 wrote: ... and I'm also lumping two other languages into this 'category'... namely, Scheme, and Erlang. Scheme isn't really a functional language, though. You can use a subset of it in a functional way, but it doesn't have the sort of built-in support for pattern matching and cas

Re: checking if a list is empty

2011-05-13 Thread Gregory Ewing
Ian Kelly wrote: If a math major comes to you wanting to learn some programming for theorem-proving, bearing in mind that they probably aren't interested in learning more than a single language, I would question whether theorem-proving is the *only* thing they will ever want to do with a progra

Re: checking if a list is empty

2011-05-13 Thread Ian Kelly
On Fri, May 13, 2011 at 6:48 PM, harrismh777 wrote: > Ian Kelly wrote: >> >> Well, at least Haskell is probably better as an introductory language >> than Lisp or Scheme.  But what schools actually do this? > > http://www.cs.kent.ac.uk/teaching/resources/haskell/HugsResources.html > http://researc

Re: unicode by default

2011-05-13 Thread Terry Reedy
On 5/13/2011 3:53 PM, harrismh777 wrote: The unicode consortium is very careful to make sure that thousands of symbols have a unique code point (that's great !) but how do these thousands of symbols actually get displayed if there is no font consortium? Are there collections of 'standard' fonts

Re: checking if a list is empty

2011-05-13 Thread harrismh777
Ian Kelly wrote: Well, at least Haskell is probably better as an introductory language than Lisp or Scheme. But what schools actually do this? http://www.cs.kent.ac.uk/teaching/resources/haskell/HugsResources.html http://research.cs.queensu.ca/home/cisc260/2010w/haskell.html These are just

Re: Regular Expression for words (with umlauts, without numbers)

2011-05-13 Thread Vlastimil Brom
2011/5/13 MRAB : > The latest release is here: > >    http://pypi.python.org/pypi/regex > -- Wow, set operators were added recently ... https://code.google.com/p/mrab-regex-hg/wiki/GeneralDetails ok, it might be not necassary to sove this exact problem with respect to the solutions already mentione

Re: Parsing a graph image

2011-05-13 Thread Dan Stromberg
You could convert the image to a netpbm format, like ppm, pgm or pbm. If the image has few colors, that should be quite viable. Each of these formats are easy to work with in Python. ppm is for color, pgm is for grayscale, pbm is for strictly black and white, pnm pertains to any of the 3. There

Re: Recursion or iteration (was Fibonacci series recursion error)

2011-05-13 Thread Mark Dickinson
On May 11, 11:06 pm, Hans Mulder wrote: > On 03/05/2011 09:52, rusi wrote: > > > [If you believe it is, then try writing a log(n) fib iteratively :D ] > > It took me a while, but this one seems to work: > > from collections import namedtuple > > Triple = namedtuple('Triple', 'hi mid lo') > Triple.

Re: How best to convert a string "list" to a python list

2011-05-13 Thread Eric Snow
On Fri, May 13, 2011 at 11:15 AM, noydb wrote: > I want some code to take the items in a semi-colon-delimted string > "list" and places each in a python list. I came up with below. In > the name of learning how to do things properly, do you experts have a > better way of doing it? > > Thanks fo

Re: checking if a list is empty

2011-05-13 Thread Ian Kelly
On Fri, May 13, 2011 at 1:41 PM, harrismh777 wrote: > On the other hand, kids today are dumped into a first comp sci course in > programming and plopped in-front of a Hugs interactive shell and then are > expected to learn programming and be successful by trying to grasp pure > functional programm

Re: unicode by default

2011-05-13 Thread Robert Kern
On 5/13/11 2:53 PM, harrismh777 wrote: The unicode consortium is very careful to make sure that thousands of symbols have a unique code point (that's great !) but how do these thousands of symbols actually get displayed if there is no font consortium? Are there collections of 'standard' fonts fo

Re: unicode by default

2011-05-13 Thread harrismh777
jmfauth wrote: to worry about encodings are when you're encoding unicode characters > to byte strings, or decoding bytes to unicode characters A small but important correction/clarification: In Unicode, "unicode" does not encode a*character*. It encodes a*code point*, a number, the integer as

Re: Recursion or iteration (was Fibonacci series recursion error)

2011-05-13 Thread Hans Mulder
On 13/05/2011 13:11, rusi wrote: On May 12, 3:06 am, Hans Mulder wrote: On 03/05/2011 09:52, rusi wrote: [If you believe it is, then try writing a log(n) fib iteratively :D ] It took me a while, but this one seems to work: from collections import namedtuple Triple = namedtuple('Triple', '

Re: checking if a list is empty

2011-05-13 Thread harrismh777
ru...@yahoo.com wrote: http://www.codinghorror.com/blog/2006/07/separating-programming-sheep-from-non-programming-goats.html A later paper by the same authors... (http://www.eis.mdx.ac.uk/research/PhDArea/saeed/paper3.pdf) These papers are fascinating reading, not only for philosophy sake i

Re: Parsing a graph image

2011-05-13 Thread Robert Kern
On 5/13/11 7:24 AM, Bastian Ballmann wrote: Hi, Am Fri, 13 May 2011 14:01:48 +0200 schrieb Ulrich Eckhardt: I'm not sure I understand 100% what you want. If you want to extract ("parse") the data that is contained in an image file, I have no clue how to do that. Yes, I want to extract the da

Re: How best to convert a string "list" to a python list

2011-05-13 Thread Redcat
On Fri, 13 May 2011 10:15:29 -0700, noydb wrote: > I want some code to take the items in a semi-colon-delimted string > "list" and places each in a python list. I came up with below. In the > name of learning how to do things properly, do you experts have a better > way of doing it? How about t

Import on case insensitive filesystem

2011-05-13 Thread Mitchell Hashimoto
Hello, I'm developing an app which runs Python on a filesystem which is not case sensitive (Mac OS X), but is mounted as an NFS drive on a remote machine. This causes errors because of the import being case sensitive but accessing an FS which is case insensitive. Short of copying the entire direct

Re: how to install easy_install

2011-05-13 Thread Ian Kelly
On Fri, May 13, 2011 at 11:40 AM, rusi wrote: > I tried to install easy_install (This is on windows) > I downloaded the executable and ran it. It claimed to have done its > job. > > But now when I type easy_install at a cmd prompt I get > easy_install is not a command... > > [I guess I am a perenn

how to install easy_install

2011-05-13 Thread rusi
I tried to install easy_install (This is on windows) I downloaded the executable and ran it. It claimed to have done its job. But now when I type easy_install at a cmd prompt I get easy_install is not a command... [I guess I am a perennial noob to windows, never being able to comprehend the PATH

Re: How best to convert a string "list" to a python list

2011-05-13 Thread MRAB
On 13/05/2011 18:15, noydb wrote: I want some code to take the items in a semi-colon-delimted string "list" and places each in a python list. I came up with below. In the name of learning how to do things properly, do you experts have a better way of doing it? Thanks for any inputs! *** x = "

Re: Regular Expression for words (with umlauts, without numbers)

2011-05-13 Thread MRAB
On 13/05/2011 17:14, Tim Chon wrote: Hallo Jens, In current python re module, you have to do something like: ((?!\d|_\w)+ which uses the negative look ahead to grab all words except integers and underscore. Of course, if you turn on the unicode flag re.U or use it inline like, (?u) then this wi

Re: How best to convert a string "list" to a python list

2011-05-13 Thread noydb
On May 13, 1:25 pm, Mark Niemczyk wrote: > There are a series of built-in methods for string objects; including the > split method which will accomplish exactly the result you are looking for. > > >>> x = "red;blue;green;yellow" > >>> color_list = x.split(';') > >>> color_list > > ['red', 'blue',

Re: How best to convert a string "list" to a python list

2011-05-13 Thread Jerry Hill
On Fri, May 13, 2011 at 1:15 PM, noydb wrote: > I want some code to take the items in a semi-colon-delimted string > "list" and places each in a python list.  I came up with below.  In > the name of learning how to do things properly, do you experts have a > better way of doing it? Strings have a

Re: How best to convert a string "list" to a python list

2011-05-13 Thread Mark Niemczyk
There are a series of built-in methods for string objects; including the split method which will accomplish exactly the result you are looking for. >>> x = "red;blue;green;yellow" >>> color_list = x.split(';') >>> color_list ['red', 'blue', 'green', 'yellow'] >>> Here is the link to a discussio

How best to convert a string "list" to a python list

2011-05-13 Thread noydb
I want some code to take the items in a semi-colon-delimted string "list" and places each in a python list. I came up with below. In the name of learning how to do things properly, do you experts have a better way of doing it? Thanks for any inputs! *** x = "red;blue;green;yellow" ## string of

Re: os.popen command working differently on Windows

2011-05-13 Thread Hans Mulder
On 12/05/2011 16:21, Tim Golden wrote: On 12/05/2011 15:11, Ayaskanta Swain wrote: Please help me in solving the following issue I am facing while executing my python script. Basically I am executing the OS specific move command to move a file/dir from one location to another. Why? Why not use

Re: Regular Expression for words (with umlauts, without numbers)

2011-05-13 Thread Jens Lechtenboerger
On 2011-05-13, Peter Otten wrote: > Jens Lechtenboerger wrote: > >> I'm looking for a regular expression to recognize natural language >> words with umlauts but without numbers. While \w with re.U does >> recognize words with umlauts, it also matches numbers, which I do >> not want. >> >> Is the

Re: Regular Expression for words (with umlauts, without numbers)

2011-05-13 Thread Peter Otten
Jens Lechtenboerger wrote: > I'm looking for a regular expression to recognize natural language > words with umlauts but without numbers. While \w with re.U does > recognize words with umlauts, it also matches numbers, which I do > not want. > > Is there a better way than an exhaustive enumerati

Re: Regular Expression for words (with umlauts, without numbers)

2011-05-13 Thread Tim Chon
Hallo Jens, In current python re module, you have to do something like: ((?!\d|_\w)+ which uses the negative look ahead to grab all words except integers and underscore. Of course, if you turn on the unicode flag re.U or use it inline like, (?u) then this will grab your desired umlauts. I'd actu

Regular Expression for words (with umlauts, without numbers)

2011-05-13 Thread Jens Lechtenboerger
Dear experts, I'm looking for a regular expression to recognize natural language words with umlauts but without numbers. While \w with re.U does recognize words with umlauts, it also matches numbers, which I do not want. Is there a better way than an exhaustive enumeration such as [-a-zàáâãäåæ..

My direct client Hiring and interviewing going on Live today.

2011-05-13 Thread Yagnesh from CyberThink
Hi, My direct client Hiring and interviewing going on Live today. I am having some very good direct client openings currently. I can get the consultant interviewed within 24 business hours. Please drop me an email to get all my direct client openings. I will reply to only those emails which are d

My direct client Hiring and interviewing going on Live today.

2011-05-13 Thread Yagnesh from CyberThink
Hi, My direct client Hiring and interviewing going on Live today. I am having some very good direct client openings currently. I can get the consultant interviewed within 24 business hours. Please drop me an email to get all my direct client openings. I will reply to only those emails which are d

Re: Recursion or iteration (was Fibonacci series recursion error)

2011-05-13 Thread Ian Kelly
On Fri, May 13, 2011 at 5:11 AM, rusi wrote: > The tightest way I knew so far was this: > The 2x2 matrix > 0 1 > 1 1 > raised to the nth power gives the nth fibonacci number. [And then use > a logarithmic matrix mult] > Your version is probably tighter than this. Oh, nice! I did it this way once

Re: Parsing a graph image

2011-05-13 Thread Neil Cerutti
On 2011-05-13, Bastian Ballmann wrote: > Hi python lovers out there, > > I am searching for a library to parse data from a graph in an > image file something like > http://pytseries.sourceforge.net/_images/yahoo.png Any > suggestions, hints, links? You can do this with PIL http://www.pythonware.c

problem with GKT module?

2011-05-13 Thread alister ware
I am using gtk.builder with a glade generated GUI I have a simple call back defined for a radio button widget when I use widget.name in linux I get a value of None, windows returns the widget name as I would expect. is this a bug? if not how should i find the name of the widget that has trigge

Re: Parsing a graph image

2011-05-13 Thread Laurent Claessens
I guess it requires some kind of image processing , where you can move around image pixel by pixel and somehow figure out what color is present in that pixel . If there isn’t much noise in the image you should sharp contrast and would be able to differentiate between two colors ? if yes ( I don

Re: Assistance in understanding the sub-Process module

2011-05-13 Thread Tim Golden
On 13/05/2011 12:03, vijay swaminathan wrote: 1. The class definition as per the documentation is: /class /subprocess.Popen(/args/, /bufsize=0/, /executable=None/, /stdin=None/, /stdout=None/, /stderr=None/, /preexec_fn=None/, /close_fds=False/, /shell=False/, /cwd=None/, /env=None/, /universal_n

Re: Parsing a graph image

2011-05-13 Thread saurabh verma
On 13-May-2011, at 5:54 PM, Bastian Ballmann wrote: > Hi, > > Am Fri, 13 May 2011 14:01:48 +0200 > schrieb Ulrich Eckhardt : > >> I'm not sure I understand 100% what you want. If you want to extract >> ("parse") the data that is contained in an image file, I have no clue >> how to do that. >

Re: Parsing a graph image

2011-05-13 Thread Laurent Claessens
Yes, I want to extract the data that is contained in an image file. Greets Basti > Yes, I want to extract the data that is contained in an image file. > Greets Maybe ask to imagemagick's or matplotlib. They should know if it is possible at all. Good luck. Laurent -- http://mail.python.o

Re: Parsing a graph image

2011-05-13 Thread Laurent Claessens
Yes, I want to extract the data that is contained in an image file. Greets Maybe ask to imagemagick's or matplotlib. They should know if it is possible at all. Good luck. Laurent -- http://mail.python.org/mailman/listinfo/python-list

Re: Parsing a graph image

2011-05-13 Thread Laurent Claessens
Yes, I want to extract the data that is contained in an image file. Greets Maybe ask to imagemagick's or matplotlib. They should know if it is possible at all. Good luck. Laurent -- http://mail.python.org/mailman/listinfo/python-list

Re: Parsing a graph image

2011-05-13 Thread Laurent Claessens
Yes, I want to extract the data that is contained in an image file. Greets Maybe ask to imagemagick's or matplotlib. They should know if it is possible at all. Good luck. Laurent -- http://mail.python.org/mailman/listinfo/python-list

Re: Parsing a graph image

2011-05-13 Thread Laurent Claessens
Yes, I want to extract the data that is contained in an image file. Greets Maybe ask to imagemagick's or matplotlib. They should know if it is possible at all. Good luck. Laurent -- http://mail.python.org/mailman/listinfo/python-list

Re: Parsing a graph image

2011-05-13 Thread Bastian Ballmann
Hi, Am Fri, 13 May 2011 14:01:48 +0200 schrieb Ulrich Eckhardt : > I'm not sure I understand 100% what you want. If you want to extract > ("parse") the data that is contained in an image file, I have no clue > how to do that. Yes, I want to extract the data that is contained in an image file. G

Re: Parsing a graph image

2011-05-13 Thread Ulrich Eckhardt
Bastian Ballmann wrote: > I am searching for a library to parse data from a graph in an image file > something like http://pytseries.sourceforge.net/_images/yahoo.png > Any suggestions, hints, links? I'm not sure I understand 100% what you want. If you want to extract ("parse") the data that is c

Re: Recursion or iteration (was Fibonacci series recursion error)

2011-05-13 Thread rusi
On May 12, 3:06 am, Hans Mulder wrote: > On 03/05/2011 09:52, rusi wrote: > > > [If you believe it is, then try writing a log(n) fib iteratively :D ] > > It took me a while, but this one seems to work: > > from collections import namedtuple > > Triple = namedtuple('Triple', 'hi mid lo') > Triple._

Assistance in understanding the sub-Process module

2011-05-13 Thread vijay swaminathan
Hi Gurus, I'm new to Python programming and in the process of learning the sub process module. I went through the python documentation http://docs.python.org/library/subprocess.html and I have the following queries 1. The class definition as per the documentation is: *class *subprocess.Popen(*ar

Re: checking if a list is empty

2011-05-13 Thread rusi
On May 13, 1:02 pm, Chris Rebert wrote: > On Thu, May 12, 2011 at 11:46 PM, rusi wrote: > > > The boolean domain is only a 100 years old. > > Unsurprisingly it is not quite 'first-class' yet: See > > It is nowadays. Every halfway-mainstream language I can think of has > an explicit boolean dataty

Parsing a graph image

2011-05-13 Thread Bastian Ballmann
Hi python lovers out there, I am searching for a library to parse data from a graph in an image file something like http://pytseries.sourceforge.net/_images/yahoo.png Any suggestions, hints, links? TIA && have a nice day! :) Basti signature.asc Description: PGP signature -- http://mail.python

Call for Papers (CFP)

2011-05-13 Thread saeed
= Journal of Emerging Trends in Computing and Information Sciences Call for Research Papers (Vol. 2 No. 6) June 2011 http://cisjournal.org/ = Dear Sir/ Madam, Journal of Emerging Trends

Re: os.popen command working differently on Windows

2011-05-13 Thread Nobody
On Thu, 12 May 2011 15:21:41 +0100, Tim Golden wrote: > os.popen returns a file-like object from which you can read any error > messages generated. The documentation doesn't say, but if it's anything like the Unix popen() function, with mode='r' the returned file-like object will correspond to th

Re: checking if a list is empty

2011-05-13 Thread Hans Georg Schaathun
On Thu, 12 May 2011 23:20:20 +1000, Chris Angelico wrote: : Writing a program requires expertise both in programming and in the : purpose for which it's being written. Ultimately, a programmer is a : translator; without proper comprehension of the material he's : translating, he can't make a

Re: checking if a list is empty

2011-05-13 Thread Chris Rebert
On Thu, May 12, 2011 at 11:46 PM, rusi wrote: > The boolean domain is only a 100 years old. > Unsurprisingly it is not quite 'first-class' yet: See It is nowadays. Every halfway-mainstream language I can think of has an explicit boolean datatype. Heck, as of C99, even C has one now. I conjecture

Re: Need Assistance on this program.

2011-05-13 Thread Tim Golden
On 13/05/2011 06:22, vijay swaminathan wrote: Hi Tim., Thanks.. This works as I had expected. are there any documentation for the subprocess.call method? I tried going through the python doc but could not narrow down. http://docs.python.org/library/subprocess.html?highlight=subprocess%20call#