Seeking IDE

2005-06-30 Thread Nick Mountford
Hi, Complete newb to Python and programming, looking for an open source IDE to download. Any suggestions? Thanks, Nick -- http://mail.python.org/mailman/listinfo/python-list

Re: map vs. list-comprehension

2005-06-30 Thread Tom Anderson
On Fri, 1 Jul 2005, Mike P. wrote: "Björn Lindström" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] "F. Petitjean" <[EMAIL PROTECTED]> writes: res = [ bb+ii*dd for bb,ii,dd in zip(b,i,d) ] Hoping that zip will not be deprecated. Nobody has suggested that. The ones that are pla

Re: Seeking IDE

2005-06-30 Thread Philippe C. Martin
Linux: Eric3 All: Eclipe: my choice (might be tough to get into) Nick Mountford wrote: > Hi, > > Complete newb to Python and programming, looking for an open source > IDE to download. Any suggestions? > > Thanks, > > Nick -- http://mail.python.org/mailman/listinfo/python-list

Re: Seeking IDE

2005-06-30 Thread Philippe C. Martin
oops: "eclipse" Philippe C. Martin wrote: > Linux: Eric3 > All: Eclipe: my choice (might be tough to get into) > > > > Nick Mountford wrote: > >> Hi, >> >> Complete newb to Python and programming, looking for an open source >> IDE to download. Any suggestions? >> >> Thanks, >> >> Nick --

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-06-30 Thread Tom Anderson
On Thu, 30 Jun 2005, Benji York wrote: > python-needs-more-duct-tape'ly yours, You're in luck: Python 3000 will replace duck typing with duct taping. tom -- I know you wanna try and get away, but it's the hardest thing you'll ever know -- http://mail.python.org/mailman/listinfo/python-list

Re: Seeking IDE

2005-06-30 Thread gene tani
http://www.python.org/cgi-bin/moinmoin/IntegratedDevelopmentEnvironments http://wiki.python.org/moin/PythonEditors http://groups-beta.google.com/group/comp.lang.python/browse_frm/thread/6ab929ca5507a05/ebf77ab2ea664a3c?q=IDE+group:comp.lang.python&rnum=6&hl=en#ebf77ab2ea664a3c -- http://mail.pyt

Re: Programmers Contest: Fit pictures on a page

2005-06-30 Thread Dan Sommers
On Thu, 30 Jun 2005 13:09:02 -0400, Peter Hansen <[EMAIL PROTECTED]> wrote: > This problem is well suited to the abilities of genetic algorithms, > and this would probably be an excellent way to learn more about them, > even if you don't get the best solution. There's some sort of irony or someth

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-06-30 Thread Tom Anderson
On Thu, 30 Jun 2005, Simon Brunning wrote: > On 29 Jun 2005 15:34:11 -0700, Luis M. Gonzalez <[EMAIL PROTECTED]> wrote: > >> What's exactly the "cockney" accent? Is it related to some place or >> it's just a kind of slang? > > The cockney accent used to be pretty distinct, but these days it's >

Re: Seeking IDE

2005-06-30 Thread gene tani
woops: I like komodo (almost free, from: http://wiki.python.org/moin/Komodo and jedit: http://www.opensourcetutorials.com/tutorials/Server-Side-Coding/Python/review-of-python-ide/page1.html http://plugins.jedit.org/updates.php?page=3 Heard good things about WIngIDE, the other almost free IDE -

Re: I have a question.

2005-06-30 Thread Jags
Hi, You can use the "Random" module. You need to first import it using "from random import Random, random". Try the following sequence of steps on the Python/IDLE command line to get an idea: >>> from random import Random, random >>> myRandom = Random() >>> myRandom.random() Hope this helps

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-06-30 Thread Tom Anderson
On Wed, 29 Jun 2005, Michael Hoffman wrote: > Steven D'Aprano wrote: > >> Herb starts with H, not E. It isn't "ouse" or "ospital" or "istory". It >> isn't "erb" either. You just sound like tossers when you try to >> pronounce herb in the original French. Yes, i find this insanely irritating. >

Scket connection to server

2005-06-30 Thread JudgeDread
hello python gurus I would like to establish a socket connection to a server running a service on port 2. the host address is 10.214.109.50. how do i do this using python? many thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: Favorite non-python language trick?

2005-06-30 Thread Terry Reedy
"Paddy" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Sadly, its not a solution that I'm after, but a particular toolkit that > can be used for solving that type of problem. Presuming this is an anwer to my comment about generators... I was pointing you more to the method used t

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-06-30 Thread Mark Lawrence
muldoon wrote: > Americans consider having a "British accent" a sign of sophistication > and high intelligence. Many companies hire salespersons from Britain to > represent their products,etc. Question: When the British hear an > "American accent," does it sound unsophisticated and dumb? > > Be b

Re: Seeking IDE

2005-06-30 Thread Jags
Hi there, You could use the IDLE that is bundled along with the Python installation. If you don't like that, you could use any of the following editors: EditPlus, TextPad, UltraEdit, WingIDE, Komodo (from ActiveState) or jEdit. All these are Windows based. Cheers! - Jags. -- http://mai

Re: Scket connection to server

2005-06-30 Thread [EMAIL PROTECTED]
The documentation gives an excellent example on how to do this, see http://docs.python.org/lib/socket-example.html -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there something similar to ?: operator (C/C++) in Python?

2005-06-30 Thread Ron Adam
Antoon Pardon wrote: > Op 2005-06-29, Scott David Daniels schreef <[EMAIL PROTECTED]>: > >>Roy Smith wrote: >> >>>Andrew Durdin <[EMAIL PROTECTED]> wrote: >>> Corrected version: result = [(lambda: expr0), lambda: expr1][bool(cond)]() >> >>Sorry, I thought cond was a standard boolean. >>

%g and fpformat.sci()

2005-06-30 Thread Sivakumar Bhaskarapanditha
Hi,   How can I control the number of digits after the decimal point using the %g format specifier. I am not able to get more than 3 digits as shown below.   >>> a = 1.234e-5 >>> '%g' % a '1.234e-005' >>> '%.2g' % a '1.2e-005' >>> '%.4g' % a '1.234e-005' >>> '%.5g' % a '1.234e-0

Re: Seeking IDE

2005-06-30 Thread Ruben Baumann
"Nick Mountford" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Hi, Complete newb to Python and programming, looking for an open source IDE to download. Any suggestions? Thanks, Nick SPE (Can be used in editor mode only if desired, but comes with WxGlade for GUI) Boa Construc

Generic communications module with a little help from classes...

2005-06-30 Thread [EMAIL PROTECTED]
Hi, What I want to do is create a module that offers a generic set of functions (send, recieve, etc...) and reffers the request to the correct module (rs-232, tcp/ip, etc..). I want all this to be unseen by the script that calls this module. I want the script to specify the communication type, and

Re: Scket connection to server

2005-06-30 Thread Steve Horsley
JudgeDread wrote: > hello python gurus > > I would like to establish a socket connection to a server running a service > on port 2. the host address is 10.214.109.50. how do i do this using > python? > > many thanks > > Off the top of my head (so there could be errors): import socket s =

Controlling WinAMP (WM_COPYDATA problem)

2005-06-30 Thread The Collector
Hi, I've been looking for almost two full days now to get full control of WinAMP using python. Simple play/stop functions are no problem. It's the WM_COPYDATA that's used by IPC_PLAYFILE (=add a file to the playlist) that's giving me troubles big time! My latest test code: ---

Re: %g and fpformat.sci()

2005-06-30 Thread Tim Peters
[Sivakumar Bhaskarapanditha] > How can I control the number of digits after the decimal point using the %g > format specifier. You cannot. See a C reference for details; in general, %g is required to truncate trailing zeroes, and in %.g the is the maximum number of significant digits displayed (

Re: Scket connection to server

2005-06-30 Thread Jp Calderone
On Thu, 30 Jun 2005 18:39:27 +0100, Steve Horsley <[EMAIL PROTECTED]> wrote: >JudgeDread wrote: >> hello python gurus >> >> I would like to establish a socket connection to a server running a service >> on port 2. the host address is 10.214.109.50. how do i do this using >> python? >> >> many t

Re: python commmand line params from c++

2005-06-30 Thread Wesley Henwood
Thanks Denis. PySys_SetArgv should do the trick. The nested function calls are there because the FILE structrure produced by fopen is not always compatible with the FILE structure produced by the Python C++ functions. Something do with the Python C being built with different version ofthe c run-

Re: Seeking IDE

2005-06-30 Thread Jeffrey Maitland
I am currently using synEdit. That is because it is a free, small, and very customizable and highlites pythn keywords.(and was on the system at work) Where as at home I use Emacs, or GNUEmacs (depends on which boot up I chose at the time). Jeff -- http://mail.python.org/mailman/listinfo/python

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-06-30 Thread George Sakkis
"Tom Anderson" <[EMAIL PROTECTED]> wrote: > if it hadn't been for the quirks of the Cockney accent, we'd all be using > curly > brackets and semicolons. +1 QOTW George -- http://mail.python.org/mailman/listinfo/python-list

Re: python commmand line params from c++

2005-06-30 Thread ej
Ummm, just a guess from looking at the output (not familiar with C++ interface)... the error seems to complain about what's in someScript.py, not the call to it. What's in someScript.py? "Wesley Henwood" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > What is the proper way to pass

saving pre-compiled scripts

2005-06-30 Thread Derek van Vliet
Hi, I'm working on an application that reads python scripts from XML elements and compiles them during my app's startup process using. The application then runs the resulting compiled PyCodeObjects using PyEval_EvalCode as they are needed. Now I'm wondering if its possible to pre-compile the scri

Re: python commmand line params from c++

2005-06-30 Thread Wesley Henwood
Thanks Denis. PySys_SetArgv should do the trick. The nested function calls are there because the FILE structrure produced by fopen is not always compatible with the FILE structure produced by the Python C++ functions. Something do with the Python C being built with different version ofthe c run-

Re: Life of Python

2005-06-30 Thread ABO
> Okay. This makes sense if the software is: > > 1) Designed by one institution. > 2) Designed almost entirely before deployment. > 3) Not designed to be worked on by users and > semi-trained developers. > > In other words --- proprietary software. In my experience, it doesn't work well even i

Re: Controlling WinAMP (WM_COPYDATA problem)

2005-06-30 Thread Thomas Heller
"The Collector" <[EMAIL PROTECTED]> writes: > Hi, > > I've been looking for almost two full days now to get full control of > WinAMP using python. Simple play/stop functions are no problem. It's > the WM_COPYDATA that's used by IPC_PLAYFILE (=add a file to the > playlist) that's giving me troubles

Re: Scket connection to server

2005-06-30 Thread André Egners
Steve Horsley wrote: > JudgeDread wrote: > >> hello python gurus >> >> I would like to establish a socket connection to a server running a >> service >> on port 2. the host address is 10.214.109.50. how do i do this using >> python? >> >> many thanks >> >> > > Off the top of my head (so there

doc 2 pdf

2005-06-30 Thread Alberto Vera
Hello. I tried to use reportlab to convert a doc to pdf file, but i didn't found any script to do this using python.   Do you have any script to convert a doc file? (doc->pdf)   Regards -- http://mail.python.org/mailman/listinfo/python-list

Re: saving pre-compiled scripts

2005-06-30 Thread Derek van Vliet
Another thing which may be important to note re: my constraints is that each script is essentially being run as a function. In fact, every script element I parse in XML gets wrapped in a function def before I send it to Py_CompileString. I then PyEval the result of that function, and then run Py_

Re: Controlling WinAMP (WM_COPYDATA problem)

2005-06-30 Thread The Collector
Hi, i changed the code to this: -- from win32gui import FindWindow from win32api import SendMessage import struct import array hWnd = FindWindow('Winamp v1.x', None) def packData( dwData, item ): global cds, lpData lpData = array.array('c', item) lpData

Re: Seeking IDE

2005-06-30 Thread Bruno Desthuilliers
Nick Mountford a écrit : > Hi, > > Complete newb to Python and programming, looking for an open source > IDE to download. Any suggestions? Use something simple. Start with Idle (it comes with Python, and has all the basic features you may need to learn Python). When you'll have learn the bases,

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-06-30 Thread Bill
James Stroud wrote: > Frankly, I can't watch Shakespeare or movies like "the full monty" or > "trainspotting" because I can't understand a damn word they say. British talk > sounds like gibberish to me for the most part. Have you had your hearing checked recently? Seriously. I have a hearing defec

class attribute to instance attribute

2005-06-30 Thread Donnal Walter
This is a question about Python patterns or idioms. Over a period of time, I have evolved a pattern of usage that seems to work better for me than other ways I tried previously, but in writing some documentation I don't know what to call this syntax or how best to describe it. I have not seen i

Python for everything?

2005-06-30 Thread xeys_00
I posted a article earlier pertaining programming for my boss. Now I am gonna ask a question about programming for myself. I just finished my first C++ Class. Next semester is a class on encryption(and it's probably gonna be a math class too). And finally back in programming in the fall with C++ an

Re: saving pre-compiled scripts

2005-06-30 Thread Derek van Vliet
I probably should have also mentioned that my application is written in C++ and using the Python/C API. -- http://mail.python.org/mailman/listinfo/python-list

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-06-30 Thread James Stroud
Well--to take this as far OT as imaginable, yes I do have strange hearing problems. I have difficulty recognizing speech of any kind with my right ear. Amazing to think that this would be enhanced for British, but it would be consistent with my experience, which seems similar to yours. James O

Re: Python for everything?

2005-06-30 Thread Devan L
Python for everything except things that need to be ridiculously optimized for speed. Thats what C embedded in Python and Psyco enhanced Python code is for. Oh wait, thats still all Python... -- http://mail.python.org/mailman/listinfo/python-list

Re: class attribute to instance attribute

2005-06-30 Thread Devan L
Why make it an instance attribute? Couldn't you just look at the class attribute? If its something that depends on each instance's value assigned to the attribute, why not make it an instance attribute to start with? -- http://mail.python.org/mailman/listinfo/python-list

Re: Python for everything?

2005-06-30 Thread Larry Bates
Short answer is yes. Longer answer: You will still need C for device drivers and other applications that have high performance demands. Calling C from Python is quite easy. Python can be used from short "shell" scripting to projects that very large (see Zope, Plone, ReportLab, etc). Other than

Newbie backreference question

2005-06-30 Thread paulm
Hi, In perl I can do something like: $a = 'test string'; $a =~ /test (\w+)/; $b = $1; print $b . "\n"; and my output would be "string". How might this snippet be written in python? Thanks to all... -- http://mail.python.org/mailman/listinfo/python-list

Re: Python for everything?

2005-06-30 Thread Roy Smith
<[EMAIL PROTECTED]> wrote: > I have read in the old days that C was used for everything. It was a > systems programming language, and also did a lot of the same stuff > Bash scripts and perl do now. I learned C in "the old days" (1977 or maybe 78). We had plenty of other tools for scripting. Bef

Re: Python for everything?

2005-06-30 Thread phil
Python is in my opinion the best "all-purpose" language ever designed ( lisp is extremely cool but not as all purpose.) Much more elegant than perl and far far easier to do cool things than java (java is c++ on valium). HOWEVER, "all purpose" needs a little disclosure. A well coded C program may b

Re: how to shrink a numarray array?

2005-06-30 Thread Diez B. Roggisch
Qiangning Hong wrote: > To draw a large array of data on a small panel, I need to shrink it to a > given size. e.g: > > To draw numarray.arange(1) on a panel of width of 100, I only need > to draw the points of (0, 100, 200, 300, ...) instead of (0, 1, 2, ...). > So I need a method to shrink

Re: Newbie backreference question

2005-06-30 Thread Larry Bates
a='test string' print a.split()[:-1] I'm assuming that you want the last space separated word? Larry Bates paulm wrote: > Hi, > In perl I can do something like: > > $a = 'test string'; > $a =~ /test (\w+)/; > $b = $1; > print $b . "\n"; > > and my output would be "string". > > Ho

Re: Newbie backreference question

2005-06-30 Thread Robert Kern
paulm wrote: > Hi, > In perl I can do something like: > > $a = 'test string'; > $a =~ /test (\w+)/; > $b = $1; > print $b . "\n"; > > and my output would be "string". > > How might this snippet be written in python? http://docs.python.org/lib/module-re.html -- Robert Kern [EMAIL P

Re: Which kid's beginners programming - Python or Forth?

2005-06-30 Thread Mike Meyer
[EMAIL PROTECTED] (Roy Smith) writes: > There's a reprint this morning on slashdot of a 1984 review Byte did > on the brand-new Macintosh (executive summary: cool machine, needs > more memory). The first four software packages available for the new > machine? > > MacWrite/MacPaint (they seem to c

Lost in a sea of documentation...can you point me in the right direction?

2005-06-30 Thread MooMaster
I'm a complete beginner in Python, but I've been fooling around with Java for a couple years, so I have decent programming experience... Anyway, I was sitting around playing with Python, when I thought to myself: "I know! I'd like to write a program that I can pass a path to (say: My Pictures) and

Re: Newbie backreference question

2005-06-30 Thread George Sakkis
> Hi, > In perl I can do something like: > > $a = 'test string'; > $a =~ /test (\w+)/; > $b = $1; > print $b . "\n"; > > and my output would be "string". > > How might this snippet be written in python? > > Thanks to all... import re a = 'test string' b = re.match(r'test (\w+)', a).group(1) print

Re: Modules for inclusion in standard library?

2005-06-30 Thread Mike Meyer
Harry George <[EMAIL PROTECTED]> writes: > b) Installing distutils-aware python packages is trivial. I'd rather > the energy which might go into a bigger std library go instead into > helping projects which don't have distutils-style builds. How about integrating distutils and PyPI, so that dist

Re: script fichiers binaires lecture écriture

2005-06-30 Thread Mike Meyer
bruno modulix <[EMAIL PROTECTED]> writes: >> Be aware that I'm >> using pyhton 1.5, > Err... latest is 2.4.1, and the language has really, really changed. You > should consider upgrading... > >> unfortunately... > > BTW, in 1.5.x, you can use the String module instead of string class > methods:

Re: building 2.4.1 on HPUX

2005-06-30 Thread Richard Patterson
In case someone else reads these for information about a simliar problem It turns out, that I did not need to edit the setup.py script, I could just ignore the compile time INFO statements regarding Tk/Tcl libs and includes.. I did need to modify the Modules/Setup file however... But the fina

Re: Newbie backreference question

2005-06-30 Thread paulm
Larry Bates <[EMAIL PROTECTED]> wrote: > a='test string' > print a.split()[:-1] > > I'm assuming that you want the last space separated word? > > Larry Bates > > > paulm wrote: >> Hi, >> In perl I can do something like: >> >> $a = 'test string'; >> $a =~ /test (\w+)/; >> $b = $1; >> prin

RE: When someone from Britain speaks, Americans hear a "Britishaccent"...

2005-06-30 Thread Delaney, Timothy (Tim)
Tom Anderson wrote: > How about carrier? Ends in an "a" (Australian ;) Tim Delaney -- http://mail.python.org/mailman/listinfo/python-list

Re: Modules for inclusion in standard library?

2005-06-30 Thread Robert Kern
Mike Meyer wrote: > Harry George <[EMAIL PROTECTED]> writes: > >>b) Installing distutils-aware python packages is trivial. I'd rather >>the energy which might go into a bigger std library go instead into >>helping projects which don't have distutils-style builds. > > How about integrating distut

Re: Lost in a sea of documentation...can you point me in the right direction?

2005-06-30 Thread Bruno Desthuilliers
MooMaster a écrit : (snip) > I'd like to write a program that I can pass a path to > (say: My Pictures) and at a timer interval will pick a picture from it > and set my wallpaper to that" So I started reading about os, threads, > and the path for the special folders What's a "special folder" ???

Re: Python syntax high-lighting and preservation on web

2005-06-30 Thread Ryan Bowman
--- Gregory Piñero <[EMAIL PROTECTED]> wrote: > Hey guys, > > Does anyone know where I can pick up a style sheet (css) and/or other > files/programs I might need to display python code on my website with > tab preservation(or replace with spaces) and colored syntax? I want > something similar

Re: Newbie backreference question

2005-06-30 Thread George Sakkis
"paulm" <[EMAIL PROTECTED]> wrote: > No, sorry - my bad. I am looking to assign the > backreference to another variable so it can be treated > seperately. So perhaps: > > $a = 'test string two'; > $a =~ /test \w{2}([\W\w]+)/; > $b = $1; > print $b . "\n"; > > producing "ring two". > > I have read

pdf in full-color

2005-06-30 Thread Alberto Vera
Hello.   I got a pdf file from a microsoft word document using Linbox-converter. The problem is that I got a pdf file in white&black color.   Do you know another library to convert this to a full-color? Is it possible to do that using Linbox-converter?   Regards -- http://mail.python.org/ma

Re: When someone from Britain speaks, Americans hear a "Britishaccent"...

2005-06-30 Thread Grant Edwards
On 2005-06-30, Delaney, Timothy (Tim) <[EMAIL PROTECTED]> wrote: > Tom Anderson wrote: > >> How about carrier? > > Ends in an "a" (Australian ;) Right, but due to some wierd property requiring conservation of consonants, when speaking Strine you've got to take the r's removed from words like "carr

Re: Scket connection to server

2005-06-30 Thread Grant Edwards
On 2005-06-30, André Egners <[EMAIL PROTECTED]> wrote: >>> I would like to establish a socket connection to a server >>> running a service on port 2. the host address is >>> 10.214.109.50. how do i do this using python? >>> >>> many thanks >>> >>> >> >> Off the top of my head (so there could

Re: Python for everything?

2005-06-30 Thread Mike Meyer
[EMAIL PROTECTED] writes: > I posted a article earlier pertaining programming for my boss. Now I am > gonna ask a question about programming for myself. I just finished my > first C++ Class. Next semester is a class on encryption(and it's > probably gonna be a math class too). And finally back in

Re: Newbie backreference question

2005-06-30 Thread paulm
George Sakkis <[EMAIL PROTECTED]> wrote: > > Did you have a look at my other reply ? It's still the same, just > change the regexp: > > import re > a = 'test string two' > b = re.match(r'test \w{2}(.+)', a, re.DOTALL).group(1) > print b > > By the way, if you want to catch any single character (

RE: When someone from Britain speaks, Americans hear a "Britishaccent"...

2005-06-30 Thread Delaney, Timothy (Tim)
Grant Edwards wrote: > On 2005-06-30, Delaney, Timothy (Tim) <[EMAIL PROTECTED]> wrote: >> Tom Anderson wrote: >> >>> How about carrier? >> >> Ends in an "a" (Australian ;) > > Right, but due to some wierd property requiring conservation of > consonants, when speaking Strine you've got to take

OOP help needed incorporating existing modules in class

2005-06-30 Thread Koncept
I want to incorporate the datetime and other modules into my class. I am new to Python and would really appreciate some help doing this. class FooBar: def getDate(self): return ^^^ how do I do something like this? -- Koncept << "The snake that cannot shed its skin perishes. So do th

Using Numeric 24.0b2 with Scientific.IO.NetCDF

2005-06-30 Thread bandw
I am having a problem using Numeric-24.0b2 in conjunction with the NetCDF module from ScientificPython (version 2.4.9). This problem does not surface using Numeric-23.8. The problem arises in using the "min" function on a NetCDF floating array. In 23.8, the "min" function returns a floating scalar,

Re: Seeking IDE

2005-06-30 Thread gene tani
I encourage NOPs (non-original posters) to paste their thoughts into the wiki for posterity/FAQing, e.g. currently no info on synEdit: http://wiki.python.org/moin/IntegratedDevelopmentEnvironments -- http://mail.python.org/mailman/listinfo/python-list

Re: Using Numeric 24.0b2 with Scientific.IO.NetCDF

2005-06-30 Thread Robert Kern
bandw wrote: > I am having a problem using Numeric-24.0b2 in conjunction with > the NetCDF module from ScientificPython (version 2.4.9). > This problem does not surface using Numeric-23.8. The problem > arises in using the "min" function on a NetCDF floating array. > In 23.8, the "min" function ret

Re: I have a question.

2005-06-30 Thread dimitri pater
Hi, here is an example of using the random function I am working at right now (it randomizes (is that a word?) every word in a list): import string import random from itertools import ifilter, ifilterfalse def reinterpolate(word):     #thanks to Raymond Hettinger (taken from the Python list)     w

Re: Python for everything?

2005-06-30 Thread Ivan Van Laningham
Hi All-- Mike Meyer wrote: > > [EMAIL PROTECTED] writes: > > As other have noted, C was never really used for everything. Unix > tools were designed to connect together from the very beginning, which > is what makes shell scripting so powerful. This was true before there > was a C. Likewise, som

Re: Python for everything?

2005-06-30 Thread Roy Smith
Ivan Van Laningham <[EMAIL PROTECTED]> wrote: > It really was used "for everything"; C compilers have *always* let you > include assembler, with the "asm" keyword. Unless you're talking about > the early days of DOS/Windows compilers, about which I know little, but > all *K&R* compilers had asm.

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-06-30 Thread Terry Hancock
On Thursday 30 June 2005 09:49 am, Benji York wrote: > Graham Fawcett wrote: > > keep-your-stick-on-the-ice'ly yours, > > Is that a Red Green reference? Man, I didn't think this could get any > more off-topic. :) > > python-needs-more-duct-tape'ly yours, No silly, it's "duck typing", not duc

Re: Python for everything?

2005-06-30 Thread Mike Meyer
Ivan Van Laningham <[EMAIL PROTECTED]> writes: > Mike Meyer wrote: >> [EMAIL PROTECTED] writes: >> As other have noted, C was never really used for everything. Unix >> tools were designed to connect together from the very beginning, which >> is what makes shell scripting so powerful. This was true

Re: map vs. list-comprehension

2005-06-30 Thread Terry Hancock
On Thursday 30 June 2005 09:49 am, Mike P. wrote: > That really sucks, I wasn't aware of these plans. Ok, I don't use reduce > much, but I use lambda, map and filter all the time. > [...] > Also, I don't necessarily think list comprehensions are necessarily easier > to read. I don't use them all t

Re: Favorite non-python language trick?

2005-06-30 Thread Terry Hancock
On Thursday 30 June 2005 10:21 am, [EMAIL PROTECTED] wrote: > If I had to choose one feature, I would like to see better support for > nested lexical scopes. However, I imagine this is no easy "trick" to > add to the language. Doesn't that already happen in versions 2.2+? What exactly do you mea

Re: map vs. list-comprehension

2005-06-30 Thread Roy Smith
Terry Hancock <[EMAIL PROTECTED]> wrote: > One of the strengths of Python has been that the language itself is > small (which it shares with C and (if I understand correctly, not being > a lisp programmer?) Lisp), but with all the syntax enhancements going > on, Python is getting pretty complica

Re: map vs. list-comprehension

2005-06-30 Thread Robert Kern
Roy Smith wrote: > Terry Hancock <[EMAIL PROTECTED]> wrote: > >>One of the strengths of Python has been that the language itself is >>small (which it shares with C and (if I understand correctly, not being >>a lisp programmer?) Lisp), but with all the syntax enhancements going >>on, Python is g

Re: map vs. list-comprehension

2005-06-30 Thread Roy Smith
Terry Hancock <[EMAIL PROTECTED]> wrote: > One of the strengths of Python has been that the language itself is > small (which it shares with C and (if I understand correctly, not being > a lisp programmer?) Lisp), but with all the syntax enhancements going > on, Python is getting pretty complica

Re: How to compare two directories?

2005-06-30 Thread could ildg
Thank you~ I get it. On 6/30/05, Michael Hoffman <[EMAIL PROTECTED]> wrote: > could ildg wrote: > > I found dircmp compare only the direct dirs and files, > > and it will not do anything to the sub-directories. > > The documentation for dircmp.report_full_closure() disagrees with you. > -- > Mich

ANN: PL/Py 0.1 Release

2005-06-30 Thread James William Pye
After much hacking, and many liters of caffeinated beverages, it is my pleasure to announce the first development release of PL/Py, the PostgresPy Project[1]'s Backend elements for the PostgreSQL ORDBMS. The very terse project news item can be found here[2]. PL/Py, PostgresPy's Backend Project, i

It seems that ZipFile().write() can only write files, how can empty directories be put into it?

2005-06-30 Thread could ildg
I want to "create" a empty folder in a zipfile, Can ZipFile do it? If not, any other approachs? -- http://mail.python.org/mailman/listinfo/python-list

Re: Scket connection to server

2005-06-30 Thread Christopher Subich
Steve Horsley wrote: > There is a higher level socket framework called twisted that everyone > seems to like. It may be worth looking at that too - haven't got round > to it myself yet. I wouldn't say 'like,' exactly. I've cursed it an awful lot (mostly for being nonobvious), but it does a da

shelve in a ZipFile?

2005-06-30 Thread Terry Hancock
I only just recently had a look at the shelve module, and it looks pretty handy, my only question being, what if I really want two shelves? Must I use two files? Also, it seems strange that shelve only works with filenames. I would've expected there to at least be a variant that would put a sh

Threading Question

2005-06-30 Thread ncf
I've used python for a while now, and am startting to dig into threads and sockets (using asyncore/asynchat). Through all this, I've been using the -v option on python to generate verbose output and try to pinpoint any potential problems...however, one warning is eluding me as to it's cause/resolut

Escaping commas within parens in CSV parsing?

2005-06-30 Thread felciano
Hi -- I am trying to use the csv module to parse a column of values containing comma-delimited values with unusual escaping: AAA, BBB, CCC (some text, right here), DDD I want this to come back as: ["AAA", "BBB", "CCC (some text, right here)", "DDD"] I think this is probably non-standard escapi

Re: Favorite non-python language trick?

2005-06-30 Thread ncf
Eh, just figured it'd be worth noting...map, filter, and reduce should be possible with the extended list syntaxes. Well, filter I know is, but hte others /should/ be possible. filter(lambda: <>, <>) [some_var for some_var in <> if <>] Honestly, though, I hope they don't drop the map functions a

Re: map vs. list-comprehension

2005-06-30 Thread Roy Smith
Robert Kern <[EMAIL PROTECTED]> wrote: > Looks like the PSU got to yoNO CARRIER No, the trackpad on my PowerBook seems to have gone a little haywire and I'm getting the occasional random mouse click. In that case, it seemed to have clicked the "Post" button. -- http://mail.python.org/mailman/

Re: Favorite non-python language trick?

2005-06-30 Thread ncf
Hmm...I think it's time I do better justice to what I previously wrote. http://www.artima.com/weblogs/viewpost.jsp?thread=98196 The above article was linked by Python's PEP... -- http://mail.python.org/mailman/listinfo/python-list

Re: Favorite non-python language trick?

2005-06-30 Thread Erik Max Francis
ncf wrote: > Eh, just figured it'd be worth noting...map, filter, and reduce should > be possible with the extended list syntaxes. Well, filter I know is, > but hte others /should/ be possible. > > filter(lambda: <>, <>) > [some_var for some_var in <> if <>] reduce isn't. -- Erik Max Francis &

How to run commands in command line from a script

2005-06-30 Thread Ivan Shevanski
I know there is an easy way to do this, and I just can not remember. I have already searched where I thought the module would be. . . I just want to run some name specific commands. Is this easily possible? Thanks, -Ivan _ Expres

Re: Favorite non-python language trick?

2005-06-30 Thread ncf
Sorry, I realized that shortly after my post =X -- http://mail.python.org/mailman/listinfo/python-list

Re: shelve in a ZipFile?

2005-06-30 Thread Robert Kern
Terry Hancock wrote: > I only just recently had a look at the shelve module, and it > looks pretty handy, my only question being, what if I really > want two shelves? Must I use two files? > > Also, it seems strange that shelve only works with > filenames. I would've expected there to at least

Re: Escaping commas within parens in CSV parsing?

2005-06-30 Thread Skip Montanaro
Ramon> I am trying to use the csv module to parse a column of values Ramon> containing comma-delimited values with unusual escaping: Ramon> AAA, BBB, CCC (some text, right here), DDD Ramon> I want this to come back as: Ramon> ["AAA", "BBB", "CCC (some text, right here)", "DD

Re: How to run commands in command line from a script

2005-06-30 Thread Robert Kern
Ivan Shevanski wrote: > I know there is an easy way to do this, and I just can not remember. I have > already searched where I thought the module would be. . . I just want to run > some name specific commands. Is this easily possible? Quick and dirty: import os os.system('./some --comman

Re: How to run commands in command line from a script

2005-06-30 Thread Devan L
The code module, perhaps? http://www.python.org/doc/2.4.1/lib/module-code.html -- http://mail.python.org/mailman/listinfo/python-list

<    1   2   3   >