Which GUI toolkit (was: Tkinter or wxpython?)

2007-08-07 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Bryan Hepworth <[EMAIL PROTECTED]> wrote: . [waaay too much quoted text for my taste] . . >> I'm not trying to claim that there are no benefit

Re: Tkinter or wxpython?

2007-08-07 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Paul Rubin wrote: . . . >I should also add: there is also the possibility of running a Python >program with an embedded http server on the same desktop as the >browser

Re: Issues of state (was: Tkinter or wxpython?)

2007-08-08 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Paul Rubin wrote: . . . >I'm not sure what you're getting at in this context. You can write a >desktop app where the window system communicates with a gui toolkit >th

Re: Issues of state (was: Tkinter or wxpython?)

2007-08-09 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Paul Rubin <http://[EMAIL PROTECTED]> wrote: >[EMAIL PROTECTED] (Cameron Laird) writes: >> Others have answered this at other levels. In elementary terms, >> there truly is a difference, Paul, and one that's widely reified: >>

Re: The Future of Python Threading

2007-08-10 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Bjoern Schliessmann <[EMAIL PROTECTED]> wrote: >Justin T. wrote: > >> The detrimental effects of the GIL have been discussed several >> times and nobody has ever done anything about it. > >Also it has been discussed that dropping the GIL concept requires >very fine

Re: The Future of Python Threading

2007-08-11 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Seun Osewa <[EMAIL PROTECTED]> wrote: >> I think I've heard Guido say the last attempt at removing the Global >> Interpreter Lock (GIL) resulted in a Python that was much slower... > >What is it about Python that makes a thread-safe CPython version much >slower? Wh

Re: The Future of Python Threading

2007-08-11 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Chris Mellon <[EMAIL PROTECTED]> wrote: . . . >There's nothing "undocumented" about IPC. It's been around as a >technique for decades. Message passing is as old as the hills.

Re: Process Control Help

2007-08-13 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Azazello <[EMAIL PROTECTED]> wrote: >On Jul 31, 12:45 pm, Walt Leipold <[EMAIL PROTECTED]> wrote: . . . >> It has nothing to do with 'proprietary issues'. A lot of it has to do >> with the perc

Re: Process Control Help

2007-08-13 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]> wrote: > > >I'm attempting to start some process control using Python. I've have . . . >Is there an existing forum on this already? .

Re: Process Control Help

2007-08-13 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, I mused: >In article <[EMAIL PROTECTED]>, >Azazello <[EMAIL PROTECTED]> wrote: >>On Jul 31, 12:45 pm, Walt Leipold <[EMAIL PROTECTED]> wrote: > . > . > . >>> It has nothing to do with 'proprietary iss

Re: Simple python iteration question

2007-08-15 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Shawn Milochik <[EMAIL PROTECTED]> wrote: . . . >Just for my own sanity: Isn't this the third response advocating the >use of enumerate()? Did the other responses not get through, or was >this a

Re: Simple python iteration question

2007-08-15 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, BartlebyScrivener <[EMAIL PROTECTED]> wrote: >On Aug 14, 11:59 am, "Shawn Milochik" <[EMAIL PROTECTED]> wrote: > >> Just for my own sanity: Isn't this the third response advocating the >> use of enumerate()? Did the other responses not get through, or was >> this a

Re: Server-side scripting in python

2007-08-21 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Nagarajan <[EMAIL PROTECTED]> wrote: >Hi group, >I need to develop a web application. I am in a fix as to choose among >the various server-side scripting options. I want to explore python >(am a newbie) to gain expertise and upon search, I learnt about >PSP(Python S

Re: Server-side scripting in python

2007-08-22 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Nagarajan <[EMAIL PROTECTED]> wrote: >> >> . >> . >> . >Let me phrase my problem in a finer way. >I have done simple projects in python. >I wanted to explore web programming facet of python. The

Re: simple spider in python

2007-08-23 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]> wrote: >thanks everybody, s kind. I'll take a look at booth. >have a nice day/night (depending on your latitude!) ^_^ > >ciao! > Somewhere in the middle between the two suggestions you've already received is http://www.unixreview.com/documen

Re: Why is this loop heavy code so slow in Python? Possible Project Euler spoilers

2007-09-02 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Mark Dickinson <[EMAIL PROTECTED]> wrote: >On Sep 2, 9:45 am, [EMAIL PROTECTED] wrote: >> [snip code] >> >> Thanks for that. I realise that improving the algorithm will speed >> things up. I wanted to know why my less than perfect algorithm was so >> much slower in

Re: Basic GUI

2007-09-12 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]> wrote: . . . >You can also use threads, which is a little bit more portable than >using Python's fork methodology, or so I've read. The concepts on this >page can be applied

My first Python CGI (was: Coming from Perl)

2007-09-13 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Amer Neely <[EMAIL PROTECTED]> wrote: >Amer Neely wrote: >> TheFlyingDutchman wrote: >>> On Sep 12, 5:30 pm, Amer Neely <[EMAIL PROTECTED]> wrote: I'm a complete newbie with Python, but have several years experience with Perl in a web environment. >>>

Re: automatic parallelization

2007-09-13 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Michael Schlenker <[EMAIL PROTECTED]> wrote: >Mikhail Teterin schrieb: >> While C/C++ and Fortran have OpenMP (http://www.OpenMP.org/), there is >> nothing comparable in Tcl (nor, as far as I know, in the two other >> scripting languages). >> >> Or is there? I'd li

Re: Wikipedia and a little piece of Python History

2007-03-21 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Paddy <[EMAIL PROTECTED]> wrote: >On Mar 21, 8:20 pm, [EMAIL PROTECTED] (John J. Lee) wrote: >> "Paddy" <[EMAIL PROTECTED]> writes: >> > I just had a link to Tim peters first post on doctest: >> >http://groups.google.com/group/comp.lang.python/msg/1c57cfb7b3772763 >>

Re: Printing __doc__

2007-03-21 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, gtb <[EMAIL PROTECTED]> wrote: >On Mar 21, 3:35 pm, Peter Otten <[EMAIL PROTECTED]> wrote: . . . >> >>> import sys >> >>> def docstring(): >> >> ... return sys._getframe(1).f_code.co_consts[0

Re: regex reading html

2007-03-21 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, ben miller <[EMAIL PROTECTED]> wrote: >Hello, >I've a program I'm working on where we scrape some of our web pages >using Mechanize libraries and then parse what we've scraped using >different regex functions. However, I've noticed that no matter what I >do with the

Re: Garbage collection

2007-03-21 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: >On Wed, 21 Mar 2007 15:32:17 +, Tom Wright <[EMAIL PROTECTED]> >declaimed the following in comp.lang.python: > >> >> True, but why does Python hang on to the memory at all? As I understand it, >> it's keeping a big

Python-URL! - weekly Python news and links (Mar 22)

2007-03-21 Thread Cameron Laird
This is the first time you've received "Python-URL!" in 2007. No, that's not the fault of your mail server; we've just been on sabbatical. Now we're back. QOTW: "'Doesn't seem to work' is effectivly even more useless than 'doesn't work' [as a symptomatic description]." - Bruno Desthuilliers

Re: Tkinter Toplevel geometry

2007-03-25 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Chris <[EMAIL PROTECTED]> wrote: > >> After playing with this an inordinate amount of time, I found that one >> does need to supply parameters, namely the null parameter of an empty >> string. Try: >> >>sometop.geometry('') >> >> This repacks according to the wid

Re: call to function by text variable

2007-03-25 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Jan Schilleman <[EMAIL PROTECTED]> wrote: >Hi, > >try this: >func = getattr(operations, ["Replace", "ChangeCase", "Move"][n]) > >HTH, >Jan > >"ianaré" <[EMAIL PROTECTED]> schreef in bericht >news:[EMAIL PROTECTED] >> yeah the subject doesn't really make sense does i

Re: Fortran vs Python - Newbie Question

2007-03-26 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: >On 26 Mar 2007 06:20:32 -0700, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: >>OK... >>I've been told that Both Fortran and Python are easy to read, and are > >Python is hugely easier to read. > >>quite useful in crea

Re: Fortran vs Python - Newbie Question

2007-03-26 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: . . . >> You can get the speed of fortran in Python by using libraries like >> Numeric without losing the readability of Python. >> > >Can you back th

Re: Fortran vs Python - Newbie Question

2007-03-26 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: . . . >Is there a mac version?? >Thanks >Chris > Yes. Several, in fact--all available at no charge. The Python world is different from what experie

Re: Fortran vs Python - Newbie Question

2007-03-26 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Alex Martelli <[EMAIL PROTECTED]> wrote: >[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > ... >> > So I'ld suggest to start with downloading the Enthought edition of Python, >> > and you can judge for yourself within 10 minutes, >> > if it's fast enough. >> > >> > c

Re: call to function by text variable

2007-03-26 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Steve Holden <[EMAIL PROTECTED]> wrote: >Cameron Laird wrote: >> In article <[EMAIL PROTECTED]>, >> Jan Schilleman <[EMAIL PROTECTED]> wrote: >>> Hi, >>> >>> try this: >>> func = get

Re: Fortran vs Python - Newbie Question

2007-03-27 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Beliavsky <[EMAIL PROTECTED]> wrote: . . . >Your experience with Fortran is dated -- see below. > >> >> I'll be more clear: Fortran itself is a distinguished >> language with many meritorious im

Re: Memory testing in Python

2007-03-30 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]> wrote: >Hi all > >I want to test my python code for memory efficiency in gnu/linux.How >can I do this? . . . What does "memory efficiency" mean to you? Are you asking how to

Re: PyPy for dummies

2007-03-30 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Paddy <[EMAIL PROTECTED]> wrote: . . . >It is also European funding for an open source project with sprints. >I'm sure some eurocrat will be dissecting the project to see if it is >aa good way to

Re: Memory testing in Python

2007-03-30 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, mkPyVS <[EMAIL PROTECTED]> wrote: >>While I have a great deal of interest in memory management, >>my general reaction to your question as you've posed it is, >>"Don't; concentrate for now on good Python style." > >I agree but for monitoring... > >I've had good luck w

Python-URL! - weekly Python news and links (Mar 30)

2007-03-30 Thread Cameron Laird
QOTW: "I have a fake supervisor reference generator for job interviews, a fake house inspection generator for real estate transactions, and a fake parole testimony generator - maybe you could adapt one of them (unfortunately, they are written in dissembler)." - Paul McGuire "... I think that [PyP

Re: Newbie Question (real-time communication between apps: audio, 3d, PD, Blender)

2007-03-30 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Grant Edwards <[EMAIL PROTECTED]> wrote: >On 2007-03-30, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > >> I'm just beginning my exploration of Python and I have a rather >> general question. If two particular programs have Python scripting >> capabilities, does tha

Re: Extract information from HTML table

2007-04-02 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, anjesh <[EMAIL PROTECTED]> wrote: >On Apr 2, 12:54 am, "Dotan Cohen" <[EMAIL PROTECTED]> wrote: >> On 1 Apr 2007 07:56:04 -0700, Ulysse <[EMAIL PROTECTED]> wrote: >> >> > I have seen the Beautiful Soup online help and tried to apply that to >> > my problem. But it se

Python-URL! - weekly Python news and links (Apr 2)

2007-04-02 Thread Cameron Laird
QOTW: "This whole charset mess is not meant to be solved by mere mortals." - Thorsten Kampe, a day or so before solving his symptom with a codecs method: http://groups.google.com/group/comp.lang.python/msg/a2e573ccc54f66db http://groups.google.com/group/comp.lang.python/msg/a2e573ccc54f66

Re: SNMP agent

2007-04-05 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, alain <[EMAIL PROTECTED]> wrote: >On Apr 4, 1:30 pm, alf <[EMAIL PROTECTED]> wrote: > >> twistedmatrix.org? > >I already took a look at it but the agent functionality is somewhat >primitive. I need something production-ready. > >Alain > 'Doesn't exist. I understand

Re: SNMP agent

2007-04-06 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, alain <[EMAIL PROTECTED]> wrote: . . . >I still find it strange that, in all these years of existence, no one >felt the need for a SNMP agent in Python. > >Do Pythoneers only write test tools and

Re: How to get IP address of client from CGI module?

2007-04-11 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, John Nagle <[EMAIL PROTECTED]> wrote: > The documentation for Python's CGI module doesn't seem to say how to get >the IP address of the client. Don't see an obvious way to get that info >from reading the source, either. Ideas? > >

Python-URL! - weekly Python news and links (Apr 11)

2007-04-11 Thread Cameron Laird
QOTW: "Dictionaries are one of the most useful things in Python. Make sure you know how to take adavantage of them..." - Jeremy Sanders "Python has consistently failed to disappoint me." - Tal Einat "super() only works on new-style classes ..." and "has its own set of gotchas":

Re: python - dll access (ctypes or swig)

2007-04-17 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Larry Bates <[EMAIL PROTECTED]> wrote: >Daniel Watrous wrote: >> Hello, >> >> I am interested in using python to script access to some hardware for >> which there are existing drivers in the form of DLLs. The DLLs each >> have four exported functions and a host of

Re: automatic parallelization

2007-09-14 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Mikhail Teterin <[EMAIL PROTECTED]> wrote: . . . >> I'm fond of Linda > http://www.unixreview.com/documents/s=10125/ur0704l/ >, Parallel >> Python http://www.parallelpython.com/ > only one of s

Re: Python+Expect+Win32 = Not Possible?

2007-09-15 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, gamename <[EMAIL PROTECTED]> wrote: >On Sep 13, 1:42 am, [EMAIL PROTECTED] wrote: >> On Sep 12, 9:27 pm, gamename <[EMAIL PROTECTED]> wrote: >> >> > Hi, >> >> > Is it still the case there is no practical Expect-like module for >> > win32? I know that cygwin can supp

Re: python in academics?

2007-11-01 Thread Cameron Walsh
sandipm wrote: > seeing posts from students on group. I am curious to know, Do they > teach python in academic courses in universities? > Sydney University teaches user interface design, some data mining and some natural language processing in Python. Software development is still largely a Jav

Freeze packaging for Debian

2007-02-13 Thread Cameron Laird
How is Freeze--freeze.py http://wiki.python.org/moin/Freeze >--packaged for Debian? *Is* it packaged for Debian? -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie help looping/reducing code

2007-02-19 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Paul Rubin wrote: >Lance Hoffmeyer <[EMAIL PROTECTED]> writes: >> def even_odd_round(num): >> if(round(num,2) + .5 == int(round(num,2)) + 1): >> if num > .5: >> if(int(num) % 2): >>

Re: how to do the mapping btw numpy arrayvalues and matrix columns

2007-11-02 Thread Cameron Walsh
sorted list of unique values from your original matrix. Use these values as keys for val_col_map. Eww... but it works. You'll want to be really careful with floating point numbers as keys, see http://docs.python.org/tut/node16.html for more details. Best of luck, Cameron. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python good for data mining?

2007-11-03 Thread Cameron Walsh
Jens wrote: > I'm starting a project in data mining, and I'm considering Python and > Java as possible platforms. > > I'm concerned by performance. Most benchmarks report that Java is > about 10-15 times faster than Python, and my own experiments confirms > this. I could imagine this to become a p

Re: how to iterate through each set

2007-11-03 Thread Cameron Walsh
Tom_chicollegeboy wrote: > > > Here is my code: > > def speed(): > infile = open('speed.in', 'r') > line = infile.readline() > read = int(line) > print line > i = 0 > t0 = 0 > v = 0 > > while i line = infile.readline() > list = line.split() >

Re: how to iterate through each set

2007-11-04 Thread Cameron Walsh
Tom_chicollegeboy wrote: > I figured out problem. here is my code. now it works as it should! > Thank you everyone! > I decided my 4th clue earlier was too much, so I removed it before posting. It looks like you got it anyway =) You've now solved it the way the course instructor intended you to

Re: Python good for data mining?

2007-11-04 Thread Cameron Walsh
the client's browser, so the script will have to print html. The cgi module handles form data, typically formdata = cgi.FieldStorage() will be filled when a form is sent to the script. print it and see what's in it. From here, there's a huge number of tutorials on python and cgi on the web and I'm tired. Best of luck, Cameron. -- http://mail.python.org/mailman/listinfo/python-list

Re: manually cutting a picture

2007-11-07 Thread Cameron Walsh
the edge to a specific range, to avoid problems where the blob of one square is stuck on the furthest corner, but the piece touching that corner has had its edge moved in too far so the blob would overlap two squares. Let me know how it goes, it sounds like a fun problem. Cameron. -- http://mail.python.org/mailman/listinfo/python-list

Re: webbrowser

2007-11-13 Thread Cameron Walsh
er module is present in python 2.3 but it is not what you want. You might also have other unrelated problems in the code. Use import cgitb; cgitb.enable() and check your server logs. Hope that helps, Cameron. -- http://mail.python.org/mailman/listinfo/python-list

Alternative to python -u for binary upload to cgi on windows?

2007-12-14 Thread Cameron Walsh
:\Python\python.exe -u Is there another fix that doesn't require python to be run in unbuffered mode? What performance hits would I expect for running in unbuffered mode? Best regards, Cameron. Example code: import cgi, os.path as path form = cgi.FieldStorage() new_file = form.get

Re: Alternative to python -u for binary upload to cgi on windows?

2007-12-22 Thread cameron . walsh
On Dec 14, 6:58 pm, Cameron Walsh <[EMAIL PROTECTED]> wrote: > Hi all, > > Using a pythoncgiscript such as the one below to handle uploaded > binary files will end up with atruncatedfile (truncates when it hits > ^Z) on Windows systems. On linux systems the code

Re: what has python added to programming languages? (lets be esoteric, shall we ; )

2006-04-21 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Carl Banks <[EMAIL PROTECTED]> wrote: >Wildemar Wildenburger wrote: >> Are there any concepts that python has not borrowed, concepts that were >> not even inspired by other languages? I'm just interested if it is >> "merely" a best-of collection of language features

Re: help

2006-04-27 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, NavyJay <[EMAIL PROTECTED]> wrote: >For such a simple task, I would use MATLAB. >http://www.mathworks.com/products/matlab/ . [pertinent Python comments] . . ... and some people wo

Re: stdin: processing characters

2006-04-30 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Edward Elliott <[EMAIL PROTECTED]> wrote: >Kevin Simmons wrote: >> I have a python script that prompts the user for input from stdin via a >> menu. I want to process that input when the user types in two characters >> and not have to have the user press . As a compa

Re: An Atlas of Graphs with Python

2006-05-01 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Giandomenico Sica <[EMAIL PROTECTED]> wrote: > Call for Cooperation >An Atlas of Linguistic Graphs > >I'm a researcher in graph theory and networks. >I'm working about a project connected with the theory and the applications >of >linguistic graphs, which are mathema

Re: Zope Guru...

2006-05-03 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, bruce <[EMAIL PROTECTED]> wrote: >Hi.. > >In doing some research into Workflow apps regarding document management, I >came across Zope. Given that it's Python Based, I figured I'd shout to the >group here... > >Are there any Zope gurus that I can talk to regarding Zo

Re: A critic of Guido's blog on Python's lambda

2006-05-06 Thread Cameron MacKinnon
Alex Martelli wrote: > Ken Tilton <[EMAIL PROTECTED]> wrote: >... > >>True but circular, because my very point is that () was a great design >>choice in that it made macros possible and they made CL almost >>infinitely extensible, while indentation-sensitivity was a mistaken >>design choice

Python's DSLs (was: A critic of Guido's blog on Python's lambda)

2006-05-08 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Alex Martelli <[EMAIL PROTECTED]> wrote: . . . >Of course, the choice of Python does mean that, when we really truly >need a "domain specific little language", we have to implement it as a >langu

Re: Econometrics in Panel data?

2006-05-09 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, DeepBlue <[EMAIL PROTECTED]> wrote: >so are you saying that Python is not an appropriate language for doing >econometrics stuff? > > >Dennis Lee Bieber wrote: >> On Tue, 09 May 2006 05:58:10 +0800, DeepBlue <[EMAIL PROTECTED]> declaimed >> the >> following in comp

Re: Python's DSLs

2006-05-09 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Alex Martelli <[EMAIL PROTECTED]> wrote: >Cameron Laird <[EMAIL PROTECTED]> wrote: > ... >> On this one isolated matter, though, I'm confused, Alex: I sure >> think *I* have been writing DSLs as specializations of Pyt

Re: Econometrics in Panel data?

2006-05-09 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, I counseled: >In article <[EMAIL PROTECTED]>, >DeepBlue <[EMAIL PROTECTED]> wrote: >>so are you saying that Python is not an appropriate language for doing >>econometrics stuff? >> >> >>Dennis Lee Bieber wrote: >>> On Tue, 09 May 2006 05:58:10 +0800, DeepBlue <[EMA

Re: data entry tool

2006-05-10 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]> wrote: >Peter wrote>Wow - why so big for such a simple tool? 2MB sounds like a >LOT of coding.< > >Yes, it's a lot of code, but it's code written by other people (Python, >Tkinter). Using Tkinter your program will probably be quite short, even >i

Re: 2 books for me

2006-05-11 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Ed Leafe <[EMAIL PROTECTED]> wrote: >On May 11, 2006, at 3:32 PM, Robert Hicks wrote: > >> Wouldn't portability go with Tkinter since that is installed with >> every >> Python? > > Dunno about other platforms, but it's not on my Mac.

Re: count items in generator

2006-05-14 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Alex Martelli <[EMAIL PROTECTED]> wrote: . . . >My preference would be (with the original definition for >words_of_the_file) to code > > numwords = sum(1 for w in words_of_the_file(thefilepath)

Re: count items in generator

2006-05-15 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Alex Martelli <[EMAIL PROTECTED]> wrote: >Cameron Laird <[EMAIL PROTECTED]> wrote: > >> In article <[EMAIL PROTECTED]>, >> Alex Martelli <[EMAIL PROTECTED]> wrote: >> . >>

Re: count items in generator

2006-05-15 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Alex Martelli <[EMAIL PROTECTED]> wrote: . . . >I'd be a bit worried about having len(x) change x's state into an >unusable one. Yes, it happens in other cases (if y in x:), but adding >more such

Test professionalism (was: count items in generator)

2006-05-15 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Delaney, Timothy (Tim) <[EMAIL PROTECTED]> wrote: . . . >That's exactly my point. Assuming your test coverage is good, such an >error would be caught by the MemoryError. An infinite loop should a

Re: how to make the program notify me explicitly

2006-05-18 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, alex23 <[EMAIL PROTECTED]> wrote: >hankssong wrote: >> may be message dialog is the best way to let me be informed! > >EasyGui is possibly the simplest and fastest way to get message >dialogue boxes in Python: > >http://www.ferg.org/easygui/ > >- alex23 > No. Tha

Exception style (was: calling python functions using variables)

2006-05-19 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Grant Edwards <[EMAIL PROTECTED]> wrote: >On 2006-05-19, bruno at modulix <[EMAIL PROTECTED]> wrote: > >>> Either deal with the resulting NameError exception (EAFP[0]) >> >> try: >> getattr(commands, VARIABLE)() >> except NameError: >> print >> sys.stderr, "Unkn

Virtual Collaboratory Announcement

2006-05-23 Thread Cameron Brown
er at opensource.perpich.com to join the meeting. Please stop by and ask us any questions about the Collaboratory that you may have. Thanks, Cameron begin:vcard fn:Cameron Brown n:Brown;Cameron org:JGPerpich LLC adr:Suite 500 East;;7315 Wisconsin Avenue;Bethesda;MD;20814;USA email;internet:[EMAIL PROT

Re: real time info to web browser from apache side ?

2006-05-23 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Ben Finney <[EMAIL PROTECTED]> wrote: >"Joseph" <[EMAIL PROTECTED]> writes: > >> So I am looking more for a push technology than a pull from teh >> browser (user hit Ctrl-R to refresh is a pull). > >Not necessarily; just write the web page so that it instructs the >

Re: Python for my mum

2006-05-26 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, vbgunz <[EMAIL PROTECTED]> wrote: >maybe you can tell your moms what to do and what binaries to download >or maybe you can download them for her and either send it to her >through email or put it on a disc for her... I understand the Windows >XP installation binary i

Re: pexpect ssh login and ls | grep

2007-12-31 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, crybaby <[EMAIL PROTECTED]> wrote: >I need to ssh into a remote machine and check if mytest.log file is >there. I have setup ssh keys to handle login authentications. > >How do I determine if mytest.log is there by using Pexpect. What I >have done so far is spawned

Re: cloud computing (and python)?

2008-01-01 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Aaron Watters <[EMAIL PROTECTED]> wrote: >So, in between skiing runs I noticed >a Business Week cover story on >"cloud computing". The article had >lots of interesting information in it like >about how somebody's mom used to >be an airline stewardess and the >inter

Re: Combinatorics

2008-02-12 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]> wrote: >Michael Robertson: >> I'm guessing sage has this, but shouldn't something like this be part of >> the standard library (perhaps in C)? > >My answer is positive. As a reference point you can look at the >combinatorics module of Mathematica

Re: Combinatorics

2008-02-13 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]> wrote: >Cameron Laird: >> It does occur to me, though, that even more widely applicable >> than the combinatorics module of Mathematica (if only because of >> its licensing) might be such resources as > &g

Re: executing multiple functions in background simultaneously

2009-01-14 Thread Cameron Simpson
from a function run as a thread? The easy thing is to use a Queue object. The background thread uses .put() to place a computed result on the QUeue and the caller uses .get() to read from the queue. There's an assortment of other ways too. Cheers, -- Cameron Simpson DoD#743 http://www.csk

Re: executing multiple functions in background simultaneously

2009-01-14 Thread Cameron Simpson
On 14Jan2009 17:11, Catherine Moroney wrote: > Cameron Simpson wrote: >> On 14Jan2009 15:50, Catherine Moroney >> wrote: >>> James Mills wrote: >>>> On Wed, Jan 14, 2009 at 11:02 AM, Catherine Moroney >>>> wrote: >>>>> I would l

Re: spam on the list - how are things now?

2009-01-16 Thread Cameron Simpson
On 16Jan2009 10:22, Hendrik van Rooyen wrote: | I read this solely via the mailing list - and Yes, whatever was done has helped | a lot. I use the mailing list. The spam is mch reduced. Thanks! -- Cameron Simpson DoD#743 -- http://mail.python.org/mailman/listinfo/python-list

Re: process command line parameter

2009-01-17 Thread Cameron Simpson
ke find=".co.uk" all_links=False find=None for arg in sys.argv[1:]: if arg == "--": break elif arg =="--all": all_links=True elif arg.startswith("find="): find=arg[5:] else: # unhandled argument: complain o

Re: How many followers of comp.lang.python

2009-01-27 Thread Cameron Laird
In article <8692c77c-0498-4c68-940f-e4d4427f3...@x37g2000yqj.googlegroups.com>, rantingrick wrote: >Seems like the only thing people are interested in is bickering and >name calling. I noticed the post "Does Python really follow..." has >over 400 post mainly from the same 10 people. Maybe this is

Re: New to python, open source Mac OS X IDE?

2009-01-28 Thread Cameron Laird
In article <33d59aa0-e73b-45f8-bdfe-4c78717c6...@v5g2000prm.googlegroups.com>, joseph.a.mar...@gmail.com wrote: >On Jan 27, 6:47 pm, André wrote: >> On Jan 27, 7:06 pm, "joseph.a.mar...@gmail.com" >> >> wrote: >> > Greetings! I've heard enough raving about Python, I'm going to see for >> > mysel

Re: Python Application Server

2009-01-28 Thread Cameron Laird
In article , James Mills wrote: >On Wed, Jan 28, 2009 at 2:42 PM, James Mills > wrote: >(...) > >> Might I recommend circuits (1) as a general purpose >> framework that you can build your application on top of. >> >> circuits will allow you to communicate with long-running >> background processes

Re: New to python, open source Mac OS X IDE?

2009-01-28 Thread Cameron Laird
In article , 7stud wrote: . . . >> Vim and a terminal works for me, specifically with screen. > >What does 'with screen' mean? > http://www.gnu.org/software/screen/ > -- http://mail.python.org/mailman/listinfo/python-list

Re: How to execute a hyperlink?

2009-01-28 Thread Cameron Laird
In article <8uvfl.45$n_6...@newsfe22.ams2>, Roel Schroeven wrote: >Muddy Coder schreef: >> Hi Folks, >> >> Module os provides a means of running shell commands, such as: >> >> import os >> os.system('dir .') >> >> will execute command dir >> >> I think a hyperlink should also be executed. I t

Re: Results of executing hyperlink in script

2009-01-28 Thread Cameron Laird
In article , MRAB wrote: >Muddy Coder wrote: . . . >You could put quotes around the URL: > >os.startfile('"%s"' % URL) > >or: > >os.system('start "%s"' % URL) > >if "&" has a special meaning to the command-line. In fact, no,

Re: Ordered dict by default

2009-02-06 Thread Cameron Simpson
cts are ordered, it can be possible to add an | unordereddict to the collections module to be used by programmers when | max performance or low memory usage is very important :-) I would much rather keep dictionaries as performant as possible, as a bare mapping, and add an odict for when order matter

Re: wsdl2py/ZSI and complex types with arrays

2009-02-09 Thread Cameron Simpson
; is only a class for the convenience of having _foo attributes easy to assign to). Cheers, -- Cameron Simpson DoD#743 -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem with objects copying each other in memory

2009-02-12 Thread Cameron Pulsford
Thanks, that did it! Why is that the case though? Or rather, why do the assignments to temp.x and temp.y not effect the self.x and self.y? How come I only run into the problem with the list? On Feb 12, 2009, at 5:15 PM, andrew cooke wrote: you're setting the new knight's "sl" to the value

Re: can multi-core improve single funciton?

2009-02-17 Thread Cameron Laird
In article , Steven D'Aprano wrote: . . . >> And now for my version (which admitedly isn't really mine, and returns >> slightly incorrect fib(n) for large values of n, due to the limited >> floating point precision). > >The f

Re: Musings: Using decorators to reduce duplicate exception handling

2009-02-18 Thread Cameron Simpson
uplication issue and is a bit of a niche application, but it's a lot shorter than an inline try/except and to my eye reads a little better, and it keeps the exception handling up front at the calling end where it is visible. Cheers, -- Cameron Simpson DoD#743 http://www.cskk.ezoshosting.com/cs/ -- http://mail.python.org/mailman/listinfo/python-list

Re: can multi-core improve single funciton?

2009-02-19 Thread Cameron Laird
In article , Steven D'Aprano wrote: >> . >> . >> . And now for my version (which admitedly isn't really mine, and returns slightly incorrect fib(n) for large values of n, due to the limited floating point precision). >>

Re: Multiple equates

2008-11-26 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Lawrence D'Oliveiro <[EMAIL PROTECTED]> wrote: >Cameron Laird wrote: > >> I've been trying to decide if there's any sober reason to advocate >> the one-liner >> >> map(lambda i: a.__setitem__(i, False

<    16   17   18   19   20   21   22   23   24   25   >