sorting a file

2008-06-14 Thread Beema shafreen
Hi all, I have a file with three columns i need to sort the file with respect to the third column. How do I do it uisng python. I used Linux command to do this. Sort but i not able to do it ? can any body ssuggest me -- Beema Shafreen -- http://mail.python.org/mailman/listinfo/python-list

Re: How to sort very large arrays?

2008-06-14 Thread rent
On Jun 14, 1:54 am, kj <[EMAIL PROTECTED]> wrote: > I'm downloading some very large tables from a remote site. I want > to sort these tables in a particular way before saving them to > disk. In the past I found that the most efficient way to do this > was to piggy-back on Unix's highly optimized

Re: How to sort very large arrays?

2008-06-14 Thread rent
On Jun 14, 1:54 am, kj <[EMAIL PROTECTED]> wrote: > I'm downloading some very large tables from a remote site. I want > to sort these tables in a particular way before saving them to > disk. In the past I found that the most efficient way to do this > was to piggy-back on Unix's highly optimized

ANN: pytoken 1.0 - native 86 machine code scanner generator

2008-06-14 Thread ramb
I am pleased to announce the 1.0 version of pytoken. It is available here: http://code.google.com/p/pytoken/downloads/list What is pytoken Pytoken is a scanner generator. Given an input specification - a bunch of regular expressions - pytoken will generate x86 machine code that recognizes th

######THEY DO DIFFERENT THINGS TO GET HERE#########

2008-06-14 Thread pink
Hi girls and friends.. earn more money in my site its really very different you want like it see it . www.superthings4.blogspot.com www.superthings4.blogspot.com www.superthings4.blogspot.com www.superthings4.blogspot.com www.superthings4.blogspot.com www.superthings4.blogspo

Re: numpy: handling float('NaN') different in XP vs. Linux

2008-06-14 Thread John Machin
On Jun 14, 3:33 pm, "John [H2O]" <[EMAIL PROTECTED]> wrote: > John Machin wrote: > > > Avoid impolite astonishment; RTFloatingM instead: > > """ > > > HTH, > > John > > -- > > I guess the key here is that it is not an issue with Python, but C... can I > change 'the underlying C code?' The underlyi

Re: os.startfile() on a mac

2008-06-14 Thread martin . laloux
search, search for example http://groups.google.be/group/comp.lang.python/browse_thread/thread/bddbb6861bf5b084/af7070e5b3971d53?hl=fr&lnk=gst&q=os.startfile+unix#af7070e5b3971d53 -- http://mail.python.org/mailman/listinfo/python-list

Hard to understand 'eval'

2008-06-14 Thread TheSaint
Hi, It seems to be strange that give me syntax error inside an eval statement. I'm looking at it carefully but I can't see any flaw. Here it's part of the code: for nn in stn_items: value= eval('cp.%s' %nn) if value and (nn in 'log, trash, multithread, verbose, download')

write Python dict (mb with unicode) to a file

2008-06-14 Thread dmitrey
hi all, what's the best way to write Python dictionary to a file? (and then read) There could be unicode field names and values encountered. Thank you in advance, D. -- http://mail.python.org/mailman/listinfo/python-list

We are all consenting adults here

2008-06-14 Thread David Hughes
Who coined this originally? I was reminded of it having just received a text message from mobile phone company Orange, in response to my request for them to review their policy of blocking access to this group (and, I suspect, all of Usenet). I quote: "Your request has been actioned and the conten

Re: can't assign to literal

2008-06-14 Thread TheSaint
On 17:06, venerdì 13 giugno 2008 Dennis Lee Bieber wrote: > -=-=-=-=-=-=- (make sure you have a fixed width client) > Very good indeed :) Specially to do with block reformatting. I just post my script to demonstrate my thoughts in what I meant as justifying. Specially considering that I meant ch

Re: Checking list by using of exception

2008-06-14 Thread TheSaint
On 15:37, venerdì 13 giugno 2008 Nader wrote: > try: > list_of_files != [] > get the files > For file in list_of_files: try: myfile = open(file, 'r') except (IOError, OSError): print"Your %s file wasn't open" %file # here you can do something with your open file as read

Re: Debuggers

2008-06-14 Thread TheSaint
On 19:21, venerdì 13 giugno 2008 R. Bernstein wrote: > I'm not completely sure what you mean, but I gather that in > post-mortem debugging you'd like to inspect local variables defined at the > place of error. Yes, exactly. This can be seen with pdb, but not pydb. If I'm testing a piece of code a

Re: write Python dict (mb with unicode) to a file

2008-06-14 Thread Matt Nordhoff
dmitrey wrote: > hi all, > what's the best way to write Python dictionary to a file? > > (and then read) > > There could be unicode field names and values encountered. > Thank you in advance, D. pickle/cPickle, perhaps, if you're willing to trust the file (since it's basically eval()ed)? Or JSON

Re: Summing a 2D list

2008-06-14 Thread Karsten Heymann
Maric Michaud <[EMAIL PROTECTED]> writes: > Le Friday 13 June 2008 17:55:44 Karsten Heymann, vous avez écrit : >> Maric Michaud <[EMAIL PROTECTED]> writes: >> > So, writing C in python, which has dictionnary as builtin type, >> > should be considered "more elegant" ? >> >> IMO that's a bit harsh.

Re: write Python dict (mb with unicode) to a file

2008-06-14 Thread TheSaint
On 17:13, sabato 14 giugno 2008 dmitrey wrote: > hi all, > what's the best way to write Python dictionary to a file? > Pickle or ConfigParser. You may gather more details at http://docs.python.org/lib/persistence.html -- Mailsweeper Home : http://it.geocities.com/call_me_not_now/index.html -- h

Re: write Python dict (mb with unicode) to a file

2008-06-14 Thread John Machin
On Jun 14, 7:13 pm, dmitrey <[EMAIL PROTECTED]> wrote: > hi all, > what's the best way to write Python dictionary to a file? > > (and then read) > > There could be unicode field names and values encountered. I'm presuming that "field names" means "dictionary keys". If not unicode, are the remainde

WORK PART TIME GET $100 A WEEK CLICK HERE

2008-06-14 Thread PRINCE
HI I AM DOING HOME BASED BUSINESS WITH PART TIME I AM GETTING GOOD EARNING DAILY MINIMUM OF THE PAYMENT WEAKLY $100 JUST CLICK HERE YOU DEFIANTLY YOU WILL WON http://www.eyeearn.com/10122618/signup -- http://mail.python.org/mailman/listinfo/python-list

Re: python screen scraping/parsing

2008-06-14 Thread Larry Bates
Dan Stromberg wrote: BeautifulSoup is a pretty nice python module for screen scraping (not necessarily well formed) web pages. On Fri, 13 Jun 2008 11:10:09 -0700, bruce wrote: Hi... got a short test app that i'm playing with. the goal is to get data off the page in question. basically, i sh

Platform independent code?

2008-06-14 Thread saneman
I have read that Python is a platform independent language. But on this page: http://docs.python.org/tut/node4.html#SECTION00422 it seems that making a python script executable is platform dependant: 2.2.2 Executable Python Scripts On BSD'ish Unix systems, Python scripts can be

Re: numpy: handling float('NaN') different in XP vs. Linux

2008-06-14 Thread Christian Heimes
John [H2O] wrote: > I have a script: > > from numpy import float > OutD=[] > v=['3','43','23.4','NaN','43'] > OutD.append([float(i) for i in v[1]]) > > > On linux: > Python 2.5.1 (r251:54863, Mar 7 2008, 04:10:12) > [GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2 > [EMAIL P

How do I sort items in a tableview without a column being selected?

2008-06-14 Thread Constantly Distracted
I have this TableView, which is sorted by column when the user clicks on the header. The problem is though, that all the items are selected and nothing gets sorted. But if the window loses focus everything's get's sorted. Basically I have list of tags say, [{"artist":"Artist1","title":Title1"} , {

Re: Platform independent code?

2008-06-14 Thread Matthieu Brucher
Hi, Python is a platform independent language, period. You can always excute a Python script with python script.py. Now, with Windows, you can execute the script by doucle-clicking on it. With Linux, it's different, you have to use the shebang line to execute a script with the correct interpreter.

Re: Platform independent code?

2008-06-14 Thread Larry Bates
saneman wrote: I have read that Python is a platform independent language. But on this page: http://docs.python.org/tut/node4.html#SECTION00422 it seems that making a python script executable is platform dependant: 2.2.2 Executable Python Scripts On BSD'ish Unix systems, Pyth

Re: Summing a 2D list

2008-06-14 Thread sturlamolden
On Jun 12, 3:48 pm, Mark <[EMAIL PROTECTED]> wrote: > Is this possible? def foobar(user,score): sums = {} for u,s in zip(user,score): try: sums[u] += s except KeyError: sums[u] = s return [(u, sums[u]) for u in sums].sort() usersum = foobar(user,score) for

#define in swig

2008-06-14 Thread gianluca
I've a problem with python wrapper of C library. In a library's file there are #define istruction but I can't access it from python. Other functio works correctly. The define istruction is like this: #define START_OF_D _table_element=_mainsys- >matD,_table_end=_table_element+Dsize(_mainsys) #d

Re: sorting a file

2008-06-14 Thread jim-on-linux
On Saturday 14 June 2008 03:15, Beema shafreen wrote: > Hi all, > > I have a file with three columns i need > to sort the file with respect to the third > column. How do I do it uisng python. I > used Linux command to do this. Sort but i > not able to do it ? can any body ssuggest > me I have u

NATURIST

2008-06-14 Thread MERLIN
http://carsmodifications.blogspot.com http://naturismeurope.blogspot.com http://computerconstruction.blogspot.com http://scoutingguiding.blogspot.com http://britishwaterways.blogspot.com http://ukfinanceissues.blogspot.com -- http://mail.python.org/mailman/listinfo/python-list

Creating a TCP/IP connection on already-networked computers

2008-06-14 Thread John Salerno
Let me see if this question even makes sense...I'm reading Core Python Programming and I jumped ahead to the more specific topics like network programming. I plan to follow along with the example in that chapter and create a socket connection between my desktop and laptop. However, these two c

Was the move to Python 2.0 as big a deal?

2008-06-14 Thread John Salerno
Just curious if people put up any resistance to 2.0 like some people do for 3.0. Was it as big of a change in the language, or was the transition smoother? It seems silly for anyone to say they would prefer to stick with 1.x versions at this point, so perhaps we'll get there with 3.0 eventually

Re: Was the move to Python 2.0 as big a deal?

2008-06-14 Thread Martin v. Löwis
> Just curious if people put up any resistance to 2.0 like some people do > for 3.0. IIRC, yes, it was. People have continued to use Python 1.5.2 afterwards for several years. > Was it as big of a change in the language, or was the > transition smoother? The changes were significantly smaller,

Re: Creating a TCP/IP connection on already-networked computers

2008-06-14 Thread Grant Edwards
On 2008-06-14, John Salerno <[EMAIL PROTECTED]> wrote: > Let me see if this question even makes sense...I'm reading > Core Python Programming and I jumped ahead to the more > specific topics like network programming. I plan to follow > along with the example in that chapter and create a socket > c

Re: Was the move to Python 2.0 as big a deal?

2008-06-14 Thread Grant Edwards
On 2008-06-14, John Salerno <[EMAIL PROTECTED]> wrote: > Just curious if people put up any resistance to 2.0 like some > people do for 3.0. Not that I remember. > Was it as big of a change in the language, or was the > transition smoother? It was pretty much a non-event. The changes from 1.x->

Re: Automatically restarting system calls?

2008-06-14 Thread Rhamphoryncus
On Jun 13, 10:41 am, Dan Stromberg <[EMAIL PROTECTED]> wrote: > I wrote a script(1) replacement in python (http://stromberg.dnsalias.org/ > ~dstromberg/pypty/), but I'm encountering a problem in it. > > I think I know the solution to the problem, but I'd've thought python was > high level enough th

Re: best way to create a timer

2008-06-14 Thread Rhamphoryncus
On Jun 12, 11:42 pm, Alexnb <[EMAIL PROTECTED]> wrote: > I am wondering what is the best way to create a timer, like an alarm, once it > reaches a time, it triggers an event. I have a way of doing this but it > seems like it isn't good at all. If it helps at all I am using a Tkinter, > but that pro

Re: Making HEAD/PUT/DELETE requests with urllib2?

2008-06-14 Thread Diez B. Roggisch
Phillip B Oldham schrieb: Thanks for the info. That's working like a charm. Looks as though I'll be able to handle all request types with that object. I got a little worried then that the python dev's had missed something truly important! I've done that in urrlib2 like this: class MyR

Re: Platform independent code?

2008-06-14 Thread bukzor
On Jun 14, 6:28 am, "saneman" <[EMAIL PROTECTED]> wrote: > I have read that Python is a platform independent language.  But on this > page: > > http://docs.python.org/tut/node4.html#SECTION00422 > > it seems that making a python script executable is platform dependant: > > 2.2.2 Exe

Python + RDBM framework?

2008-06-14 Thread bukzor
It seems that whenever I have an application that uses a database (MySQL) I end up writing a database framework from scratch. Is there some accepted pre-existing project that has done this? I see Django, but that seems to have a lot of web-framework that I don't (necessarily) need. I just want to

Re: Making wxPython a standard module?

2008-06-14 Thread Diez B. Roggisch
Andrea Gavana schrieb: Hi Diez & All, And on a personal note: I find it *buttugly*. Do you mind explaining "why" you find it *buttugly*? I am asking just out of curiosity, obviously. I am so biased towards wxPython that I won't make any comment on this thread in particular, but I am curious t

Re: Was the move to Python 2.0 as big a deal?

2008-06-14 Thread Jason Scheirer
On Jun 14, 9:35 am, John Salerno <[EMAIL PROTECTED]> wrote: > Just curious if people put up any resistance to 2.0 like some people do > for 3.0. Was it as big of a change in the language, or was the > transition smoother? It seems silly for anyone to say they would prefer > to stick with 1.x versio

Re: Python + RDBM framework?

2008-06-14 Thread Larry Bates
bukzor wrote: It seems that whenever I have an application that uses a database (MySQL) I end up writing a database framework from scratch. Is there some accepted pre-existing project that has done this? I see Django, but that seems to have a lot of web-framework that I don't (necessarily) need.

Re: Subclassing list, what special methods do this?

2008-06-14 Thread Mike Kent
On Jun 13, 8:43 pm, Matimus <[EMAIL PROTECTED]> wrote: ...chop... > So, it looks like as long as you want to subclass list, you are stuck > implementing both __*slice__ and __*item__ methods. > > Matt Thanks. That was clear and concise, just what I needed. -- http://mail.python.org/mailman/listi

Re: Python + RDBM framework?

2008-06-14 Thread bukzor
On Jun 14, 10:43 am, Larry Bates <[EMAIL PROTECTED]> wrote: > bukzor wrote: > > It seems that whenever I have an application that uses a database > > (MySQL) I end up writing a database framework from scratch. Is there > > some accepted pre-existing project that has done this? > > > I see Django, b

Re: Subclassing list, what special methods do this?

2008-06-14 Thread Terry Reedy
"Matimus" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | So, it looks like as long as you want to subclass list, you are stuck | implementing both __*slice__ and __*item__ methods. Unless writing in 3.0, where they have finally disappeared. -- http://mail.python.org/mailman/li

Re: Creating a TCP/IP connection on already-networked computers

2008-06-14 Thread John Salerno
John Salerno wrote: if the program I write actually works and allows the two computers to speak to each other, will that be a result purely of the program, or will it have anything to do with the fact that they are already on a home network together? Here are the two programs. Server first, t

Re: Subclassing list, what special methods do this?

2008-06-14 Thread Paul McGuire
On Jun 13, 1:38 pm, Mike Kent <[EMAIL PROTECTED]> wrote: > For Python 2.5 and new-style classes, what special method is called > for mylist[2:4] = seq and for del mylist[2:4] (given that mylist is a > list, and seq is some sequence)? > > I'm trying to subclass list, and I'm having trouble determini

Re: numpy: handling float('NaN') different in XP vs. Linux

2008-06-14 Thread Terry Reedy
"Christian Heimes" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] || I've fixed the issue for Python 2.6 and 3.0 a while ago. Mark and I have | spent a lot of time on fixing several edge cases regarding inf, nan and | numerical unsound functions in Python's math und cmath module. I

Re: Creating a TCP/IP connection on already-networked computers

2008-06-14 Thread John Salerno
John Salerno wrote: - #!/usr/bin/env python from socket import * from time import ctime HOST = '192.168.1.100' - #!/usr/bin/env python from socket import * HOST = '192.168.1.100' A question about this. Is the "HOST" referring to the IP address of the server computer in both of

Re: Was the move to Python 2.0 as big a deal?

2008-06-14 Thread Terry Reedy
"John Salerno" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | Just curious if people put up any resistance to 2.0 like some people do | for 3.0. Was it as big of a change in the language, or was the | transition smoother? 2.0 (from BeOpen) was essentially 1.6 (final CNRI version)

Re: Creating a TCP/IP connection on already-networked computers

2008-06-14 Thread Timothy Grant
On Sat, Jun 14, 2008 at 11:54 AM, John Salerno <[EMAIL PROTECTED]> wrote: > John Salerno wrote: > > - >> #!/usr/bin/env python >> >> from socket import * >> from time import ctime >> >> HOST = '192.168.1.100' >> > > > - >> #!/usr/bin/env python >> >> from socket import * >> >> HOST = '19

Re: Making wxPython a standard module?

2008-06-14 Thread Grant Edwards
On 2008-06-14, Diez B. Roggisch <[EMAIL PROTECTED]> wrote: >>> And on a personal note: I find it *buttugly*. >> >> Do you mind explaining "why" you find it *buttugly*? [...] > For the curious: Not the look & feel (albeit I prefer KDE on > linux over Gnome, which is a Qt/GTK thing and thus affec

Re: Creating a TCP/IP connection on already-networked computers

2008-06-14 Thread Grant Edwards
On 2008-06-14, John Salerno <[EMAIL PROTECTED]> wrote: > John Salerno wrote: >> if the program I write actually works and allows the two >> computers to speak to each other, will that be a result purely of the >> program, or will it have anything to do with the fact that they are >> already on a

Configuration files

2008-06-14 Thread Robert
What is the most Pythonic way to maintain a configuration file? Are there any libraries mimicking registry / ini file writing that many windows programming languages/environments offer? Robert -- http://mail.python.org/mailman/listinfo/python-list

Re: Creating a TCP/IP connection on already-networked computers

2008-06-14 Thread Grant Edwards
On 2008-06-14, John Salerno <[EMAIL PROTECTED]> wrote: > John Salerno wrote: > >> - >> #!/usr/bin/env python >> >> from socket import * >> from time import ctime >> >> HOST = '192.168.1.100' > > >> - >> #!/usr/bin/env python >> >> from socket import * >> >> HOST = '192.168.1.100' > > A

Re: Making wxPython a standard module?

2008-06-14 Thread Torsten Bronger
Hallöchen! Grant Edwards writes: > On 2008-06-14, Diez B. Roggisch <[EMAIL PROTECTED]> wrote: > And on a personal note: I find it *buttugly*. >>> >>> Do you mind explaining "why" you find it *buttugly*? > > [...] > >> For the curious: Not the look & feel (albeit I prefer KDE on >> linux ove

Re: Hard to understand 'eval'

2008-06-14 Thread [EMAIL PROTECTED]
On 14 juin, 10:31, TheSaint <[EMAIL PROTECTED]> wrote: > Hi, > > It seems to be strange that give me syntax error inside an eval statement. > I'm looking at it carefully but I can't see any flaw. > > Here it's part of the code: > > for nn in stn_items: > value= eval('cp.%s' %nn) He

Re: Configuration files

2008-06-14 Thread Daniel Fetchinson
> What is the most Pythonic way to maintain a configuration file? > Are there any libraries mimicking registry / ini file writing that many > windows programming languages/environments offer? Check this out: http://www.voidspace.org.uk/python/configobj.html Cheers, Daniel -- Psss, psss, put it d

Re: Creating a TCP/IP connection on already-networked computers

2008-06-14 Thread John Salerno
Grant Edwards wrote: Shouldn't it be something different, since the requests are coming from a different computer than the server computer? Works fine for me. When I run the client program on a machine different than the server program, the server program prints out "connected from:" and then

Re: Creating a TCP/IP connection on already-networked computers

2008-06-14 Thread John Salerno
Grant Edwards wrote: That depends on your definition of "unrelated." Heh heh, you mean that wasn't specific enough!? :) I just mean completely unconnected in any possible way, network or otherwise. My two are on a home network, but if I were to run the server program and have a friend of

Re: Comments on my first script?

2008-06-14 Thread [EMAIL PROTECTED]
On 13 juin, 13:39, "D'Arcy J.M. Cain" <[EMAIL PROTECTED]> wrote: > On Fri, 13 Jun 2008 10:19:38 +0200 > > Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > > Ok, since you asked for it, let's go: > > Good commentary. One small improvement: > > > REC_CLEANERS = { > > '.net' : clean_net, > >

Re: Comments on my first script?

2008-06-14 Thread [EMAIL PROTECTED]
On 13 juin, 17:24, Lie <[EMAIL PROTECTED]> wrote: > On Jun 13, 3:19 pm, Bruno Desthuilliers [EMAIL PROTECTED]> wrote: > > Phillip B Oldham a écrit : > (snip) > > >try: > > >for line in rec.split("\n"): > > >bits = line.split(': ') > > >a = bi

XML validation in stdlib?

2008-06-14 Thread Filip Gruszczyński
Hi! I took a look at the standard library and tried to find some validation against schema tools, but found none. I googled, but found only links to external libraries, that can do some validation. Does it mean, that there is no validation in stdlib or have I just missed something? -- Filip Grus

Re: Making wxPython a standard module?

2008-06-14 Thread Grant Edwards
On 2008-06-14, Torsten Bronger <[EMAIL PROTECTED]> wrote: >> I've never used any of the designers, but I agree 100% that >> wxPython code is nasty ugly. wxPython has a very un-Pythonic >> API that's is, IMO, difficult to use. > > I know that such requests may start a never-ending thread but > I'd

Re: Creating a TCP/IP connection on already-networked computers

2008-06-14 Thread Grant Edwards
On 2008-06-14, John Salerno <[EMAIL PROTECTED]> wrote: > Grant Edwards wrote: > >>> Shouldn't it be something different, since the requests are >>> coming from a different computer than the server computer? >> >> Works fine for me. When I run the client program on a machine >> different than the

Re: Creating a TCP/IP connection on already-networked computers

2008-06-14 Thread Grant Edwards
On 2008-06-14, John Salerno <[EMAIL PROTECTED]> wrote: > Grant Edwards wrote: > >> That depends on your definition of "unrelated." > > Heh heh, you mean that wasn't specific enough!? :) > > I just mean completely unconnected in any possible way, network or > otherwise. If they're completely uncon

Re: Summing a 2D list

2008-06-14 Thread MRAB
On Jun 14, 4:05 pm, sturlamolden <[EMAIL PROTECTED]> wrote: > On Jun 12, 3:48 pm, Mark <[EMAIL PROTECTED]> wrote: > > > Is this possible? > > def foobar(user,score): >sums = {} >for u,s in zip(user,score): > try: > sums[u] += s > except KeyError: > sums[u] = s

Re: Making wxPython a standard module?

2008-06-14 Thread Torsten Bronger
Hallöchen! Grant Edwards writes: > [...] > > IMO, a few of the "un-Pythonic" things about wxPython are: > > 1) Window ID numbers. When I started to use wxPython, there was a newly-introduced wx.ID_ANY that you could give instead of -1. My eyes filtered it out after a couple of hours, just as t

Avoiding redirects with urllib

2008-06-14 Thread Fernando Rodriguez
Hi, I'musing urllib to download pages from a site. How can I detect if a given url is being redirected somewhere else? I want to avoid this, is it possible? Thanks in advance! -- http://mail.python.org/mailman/listinfo/python-list

Re: sorting a file

2008-06-14 Thread Hachey
On Jun 14, 12:00 pm, jim-on-linux <[EMAIL PROTECTED]> wrote: > On Saturday 14 June 2008 03:15, Beema > > shafreen wrote: > > Hi all, > > > I have a file with three columns i need > > to sort the file with respect to the third > > column. How do I do it uisng python. I > > used Linux command to do

Socket Programming

2008-06-14 Thread srinivasan srinivas
Hi, Is there any way(method) to find whether the socket got closed or not?? Thanks, Srini Best Jokes, Best Friends, Best Food and more. Go to http://in.promos.yahoo.com/groups/bestofyahoo/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Making wxPython a standard module?

2008-06-14 Thread Paul McNett
Grant Edwards wrote: On 2008-06-14, Torsten Bronger <[EMAIL PROTECTED]> wrote: I've never used any of the designers, but I agree 100% that wxPython code is nasty ugly. wxPython has a very un-Pythonic API that's is, IMO, difficult to use. I know that such requests may start a never-ending threa

Re: Making wxPython a standard module?

2008-06-14 Thread Grant Edwards
On 2008-06-14, Paul McNett <[EMAIL PROTECTED]> wrote: > Grant Edwards wrote: >> On 2008-06-14, Torsten Bronger <[EMAIL PROTECTED]> wrote: >> I've never used any of the designers, but I agree 100% that wxPython code is nasty ugly. wxPython has a very un-Pythonic API that's is, IMO, d

os.walk Value Error?

2008-06-14 Thread tdahsu
Hi, I'm using os.walk as follows: (basedir, pathnames, files) = os.walk("results", topdown=True) and I'm getting the error: ValueError: too many values to unpack >From my googling, that means: This is the standard message when Python tries to unpack a tuple into fewer variables than are in th

Re: Making wxPython a standard module?

2008-06-14 Thread Grant Edwards
On 2008-06-14, Torsten Bronger <[EMAIL PROTECTED]> wrote: >> [...] >> >> IMO, a few of the "un-Pythonic" things about wxPython are: >> >> 1) Window ID numbers. > > When I started to use wxPython, there was a newly-introduced > wx.ID_ANY that you could give instead of -1. My eyes filtered > it ou

Re: Avoiding redirects with urllib

2008-06-14 Thread tdahsu
On Jun 14, 5:22 pm, Fernando Rodriguez <[EMAIL PROTECTED]> wrote: > Hi, > > I'musing urllib to download pages from a site. How can I detect if a given > url is being redirected somewhere else? I want to avoid this, is it possible? > > Thanks in advance! Try this: import urllib url_opener = urllib

Re: sorting a file

2008-06-14 Thread John Machin
On Jun 15, 2:00 am, jim-on-linux <[EMAIL PROTECTED]> wrote: > On Saturday 14 June 2008 03:15, Beema > > shafreen wrote: > > Hi all, > > > I have a file with three columns i need > > to sort the file with respect to the third > > column. How do I do it uisng python. I > > used Linux command to do t

Re: Avoiding redirects with urllib

2008-06-14 Thread tdahsu
On Jun 14, 6:18 pm, [EMAIL PROTECTED] wrote: > On Jun 14, 5:22 pm, Fernando Rodriguez > > <[EMAIL PROTECTED]> wrote: > > Hi, > > > I'musing urllib to download pages from a site. How can I detect if a given > > url is being redirected somewhere else? I want to avoid this, is it > > possible? > > >

Re: Python + RDBM framework?

2008-06-14 Thread John Fabiani
bukzor wrote: > It seems that whenever I have an application that uses a database > (MySQL) I end up writing a database framework from scratch. Is there > some accepted pre-existing project that has done this? > > I see Django, but that seems to have a lot of web-framework that I > don't (necessa

Re: os.walk Value Error?

2008-06-14 Thread Larry Bates
[EMAIL PROTECTED] wrote: Hi, I'm using os.walk as follows: (basedir, pathnames, files) = os.walk("results", topdown=True) and I'm getting the error: ValueError: too many values to unpack From my googling, that means: This is the standard message when Python tries to unpack a tuple into fewe

Re: os.walk Value Error?

2008-06-14 Thread Christian Heimes
[EMAIL PROTECTED] wrote: > Is there any other reason I might get that error? Yes, you are using it the wrong way. The correct way is for root, dirs, files in os.walk(path): do something os.walk returns an iterator which yields root, dirs and files for each iteration. Christian -- http://ma

Re: Making wxPython a standard module?

2008-06-14 Thread Colin J. Williams
Grant Edwards wrote: On 2008-06-14, Diez B. Roggisch <[EMAIL PROTECTED]> wrote: And on a personal note: I find it *buttugly*. Do you mind explaining "why" you find it *buttugly*? [...] For the curious: Not the look & feel (albeit I prefer KDE on linux over Gnome, which is a Qt/GTK thing an

Re: os.walk Value Error?

2008-06-14 Thread tdahsu
On Jun 14, 7:11 pm, Larry Bates <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > Hi, > > > I'm using os.walk as follows: > > > (basedir, pathnames, files) = os.walk("results", topdown=True) > > > and I'm getting the error: > > > ValueError: too many values to unpack > > > From my googling,

Re: Creating a TCP/IP connection on already-networked computers

2008-06-14 Thread John Salerno
Dennis Lee Bieber wrote: Is there any possibility you are confusing a Windows Workgroup or Domain in this... (Assuming anyone still runs such) Or other Windows convenience features to automatically detect computers in a local area network and display them in "network neighborhood". Wha

Re: Creating a TCP/IP connection on already-networked computers

2008-06-14 Thread John Salerno
Grant Edwards wrote: If the two computers are in no way connected via any type of network, then the two programs won't be able to talk to each other. The programs can't create a network, they can only use one that already exists. But isn't that the point of the program, to create a network be

Re: Creating a TCP/IP connection on already-networked computers

2008-06-14 Thread Grant Edwards
On 2008-06-15, John Salerno <[EMAIL PROTECTED]> wrote: >> Is there any possibility you are confusing a Windows Workgroup >> or Domain in this... (Assuming anyone still runs such) Or >> other Windows convenience features to automatically detect >> computers in a local area network and display them

Re: Socket Programming

2008-06-14 Thread Jeff McNeil
On Jun 14, 5:38 pm, srinivasan srinivas <[EMAIL PROTECTED]> wrote: > Hi, > Is there any way(method) to find whether the socket got closed or not?? > Thanks, > Srini > >       Best Jokes, Best Friends, Best Food and more. Go > tohttp://in.promos.yahoo.com/groups/bestofyahoo/ That's slightly diffi

Re: Creating a TCP/IP connection on already-networked computers

2008-06-14 Thread Grant Edwards
On 2008-06-15, John Salerno <[EMAIL PROTECTED]> wrote: > Grant Edwards wrote: > >> If the two computers are in no way connected via any type of >> network, then the two programs won't be able to talk to each >> other. >> >> The programs can't create a network, they can only use one that >> already

Re: Creating a TCP/IP connection on already-networked computers

2008-06-14 Thread John Salerno
Grant Edwards wrote: "home network" is pretty much a meaningless term, so you can use it however you want. My guess is that all the "wizard" did was set up file and print sharing between two computers that were already on the same network and could already talk to each other. Yes, you're ri

Re: Python library for clustering from distance vector

2008-06-14 Thread Sengly
On May 19, 2:42 am, jay graves <[EMAIL PROTECTED]> wrote: > On May 17, 11:49 pm, Sengly <[EMAIL PROTECTED]> wrote: > > > I am looking for a python library which can cluster similar objects > > into their respective groups given their similarity score of each two > > of them. I have searched the gro

Re: sorting a file

2008-06-14 Thread Beema shafreen
Thanks lot for your valuable suggestions On Sun, Jun 15, 2008 at 4:04 AM, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > On Sat, 14 Jun 2008 12:45:47 +0530, "Beema shafreen" > <[EMAIL PROTECTED]> declaimed the following in > gmane.comp.python.general: > >Strange: I don't recall seeing thi