Re: What text editor is everyone using for Python

2009-05-26 Thread Ben Finney
Lacrima writes: > I am new to python. > And now I am using trial version of Wing IDE. > But nobody mentioned it as a favourite editor. > So should I buy it when trial is expired or there are better choices? I think your time will be better spent learning a powerful, mature, well-supported, free-

Re: What text editor is everyone using for Python

2009-05-26 Thread Ben Finney
Steven D'Aprano writes: > nano is basically an updated (forked?) version of pico. Re-implemented http://www.nano-editor.org/dist/v1.2/faq.html#6>. Pico was under a non-free license, so Nano was written to be a feature-compatible free-software clone. -- \ “If you ever catch on fire, try to

Re: What text editor is everyone using for Python

2009-05-26 Thread Paul Rudin
Lawrence D'Oliveiro writes: > In message , Jean-Michel > Pichavant wrote: > >> Why buy an IDE when you just need a text editor ? > > Because all the cool kids have one. If you want to be different and > individual like them, you have to have what they have. Of course it's not always clear what

Re: How to reuse TCP listening socket immediately after it was connected at least once?

2009-05-26 Thread Lawrence D'Oliveiro
In message , Roy Smith wrote: > In article , > Lawrence D'Oliveiro wrote: > >> In message , Roy Smith wrote: >> >> > In article , >> > Lawrence D'Oliveiro wrote: >> > >> >> The right thing to do is try to ensure that all your connections are >> >> properly closed at shutdown. That may not b

Re: What text editor is everyone using for Python

2009-05-26 Thread Lawrence D'Oliveiro
In message , Teguh Iskanto wrote: > Have you tried vim ? it has got tons of tons of features ... So has everything else these days. > for example: you're working in the office and connected to your remote > CVS server ... Wouldn't it be easier to use a distributed VCS? -- http://mail.python.

Re: What text editor is everyone using for Python

2009-05-26 Thread Teguh Iskanto
Have you tried vim ? it has got tons of tons of features, like ( just to name a few) : file manager, color syntax, tab screen, command/syntax completion (cache only) , vertical split, horizontal split, colorful diffing, create a patch, etc .. you name it !! . There's also plugins / script that pe

Re: How do I sample randomly based on some probability(wightage)?

2009-05-26 Thread Jaime Fernandez del Rio
On Tue, May 26, 2009 at 8:42 PM, Sumitava Mukherjee wrote: > On May 26, 11:39 pm, Sumitava Mukherjee wrote: > > [Oh, I forgot to mention. I am looking for sampling without replacement.] That means that, you'll have to code something that updates the sums of probabilities after each extractio

Re: What text editor is everyone using for Python

2009-05-26 Thread Ankit
On May 26, 6:04 pm, J Kenneth King wrote: > Lacrima writes: > > I am new to python. > > And now I am using trial version of Wing IDE. > > But nobody mentioned it as a favourite editor. > > So should I buy it when trial is expired or there are better choices? > I will suggest u to use TEXTPAD 4 o

Re: 4 hundred quadrillonth?

2009-05-26 Thread Steven D'Aprano
On Wed, 27 May 2009 11:33:51 +1200, Lawrence D'Oliveiro wrote: > Chaitin is trying to use only computable numbers. Pi is computable, as > is e, sqrt(2), the Feigenbaum constant, and many others familiar to us > all. > > Trouble is, they only make up 0% of the reals. It's the other 100% he > wants

Re: What text editor is everyone using for Python

2009-05-26 Thread John Yeung
On May 26, 9:43 am, Mel wrote: >  SciTE > I like one big uncomplicated window, tabbed file panes, > syntax coloring and help with indentation.  There's > nothing to it I hate.  It would be nice if > customization were easier. This is a decent summary of SciTE, but I kind of marvel at how few peo

Re: What text editor is everyone using for Python

2009-05-26 Thread Lawrence D'Oliveiro
In message , Roy Smith wrote: > The real problem is when you get dumped into some editor other than you > one you expected and don't realize it for a while. It's really amazing > how much damage you can do to a file by typing (for example) emacs > commands at vi. Doesn't work the other way round

Re: What text editor is everyone using for Python

2009-05-26 Thread Lawrence D'Oliveiro
In message , Jean-Michel Pichavant wrote: > Why buy an IDE when you just need a text editor ? Because all the cool kids have one. If you want to be different and individual like them, you have to have what they have. -- http://mail.python.org/mailman/listinfo/python-list

Re: What text editor is everyone using for Python

2009-05-26 Thread Lawrence D'Oliveiro
In message , Arnaud Delobelle wrote: > That's why I use ed. After 20 years of suffering with vi, I finally decided to switch to Emacs. Yes, it has lots of fancy features and "modes" and things, but it wasn't hard to figure out how to turn the intrusive stuff off, and still leave a very powerfu

Re: How does Python's OOP feel?

2009-05-26 Thread Teguh Iskanto
Ikon wrote: >I'm rather new to Python. I have PHP for my main language and I do >some Java. They all have a very strict OO schema. As I red through >Python's tutorial it seams it has nothing of those rules. No statical, >abstract classes, functions, or variables. > >I wish someone, who has experien

Re: How to ask smart questions question

2009-05-26 Thread Martin P. Hellwig
Martin P. Hellwig wrote: I can do a quick one albeit without citation: - Have you googled/searched? - No really, have you? - Are you really, really sure? - So what did you 'search for|tried before' which didn't returned a result you can work with? - What does that tell you about yourself? -

Re: What text editor is everyone using for Python

2009-05-26 Thread Roy Smith
In article , "Rhodri James" wrote: > On Tue, 26 May 2009 14:22:29 +0100, Roy Smith wrote: > > > My pet peeve is syntax-aware editors which get things wrong. For > > example, > > the version of emacs I'm using now doesn't parse this properly: > > > > '''A triple-quoted string. Some editors

Re: How to ask smart questions question

2009-05-26 Thread Martin P. Hellwig
Carl Banks wrote: On May 26, 7:48 am, Gary Herron wrote: John wrote: I'm okay with init, but it seems to me that enter is redundant since it appears that anything you want to execute in enter can be done in init. The proper response to a question like this has to be http://www.catb.org/~es

How to ask smart questions question

2009-05-26 Thread Carl Banks
On May 26, 7:48 am, Gary Herron wrote: > John wrote: > > I'm okay with init, but it seems to me that enter is redundant since > > it appears that anything you want to execute in enter can be done in > > init. > > The proper response to a question like this has to be >    http://www.catb.org/~esr/f

Re: What text editor is everyone using for Python

2009-05-26 Thread Rhodri James
On Tue, 26 May 2009 14:22:29 +0100, Roy Smith wrote: My pet peeve is syntax-aware editors which get things wrong. For example, the version of emacs I'm using now doesn't parse this properly: '''A triple-quoted string. Some editors won't get this right''' The solution is to change the oute

Re: What text editor is everyone using for Python

2009-05-26 Thread Roy Smith
In article , Bar Shirtcliff wrote: > I can't say a thing about other editors, except that when some shell > script perversely dumped me into vi a month ago, I felt as horrified > as if some actually living bugs had crawled out of my own reflection > on the computer screen and fallen, clicking an

Re: What text editor is everyone using for Python

2009-05-26 Thread Roy Smith
In article , Arnaud Delobelle wrote: > That's why I use ed. Ed is the standard text editor [1]. Ed is open > source [2]. I still use ed sometimes. If I'm on a box which doesn't have emacs installed (or using something whose terminal emulation is totally broken), it lets me get work done. -

Re: 4 hundred quadrillonth?

2009-05-26 Thread Lawrence D'Oliveiro
In message , Steven D'Aprano wrote: > On Sun, 24 May 2009 22:47:51 +1200, Lawrence D'Oliveiro > declaimed the following in > gmane.comp.python.general: > >> .. Gregory Chaitin among others has been trying to rework physics to get >> rid of real numbers altogether. > > (1/2) If you "get rid of

Re: any lib to extract pages form pdf and then merge?

2009-05-26 Thread David Boddie
On Tuesday 26 May 2009 06:47, oyster wrote: > I want to extract some pages from vary pdf files, then write them > with/witout rotation into one new pdf file. something likes this [...] > I have tried pypdf, but it errs and exits on some of my pdfs(no, the > files have no password) Maybe you cou

RE: What text editor is everyone using for Python

2009-05-26 Thread Benjamin J. Racine
I use Textmate (with vim keybindings) on OS X or just vim on the others OS's. I still can't decide on which IDE between Wing, PyDev and Netbeans. Ben Racine -Original Message- From: python-list-bounces+bjracine=glosten@python.org [mailto:python-list-bounces+bjracine=glosten

Re: What text editor is everyone using for Python

2009-05-26 Thread Dave Angel
Lacrima wrote: I am new to python. And now I am using trial version of Wing IDE. But nobody mentioned it as a favourite editor. So should I buy it when trial is expired or there are better choices? I'm a little surprised nobody has explicitly mentioned Komodo IDE (the full version). Although

Re: Passing string from python programs to external programs

2009-05-26 Thread psykeedelik
On May 26, 9:16 pm, Jeff McNeil wrote: > On May 26, 2:12 pm, lone_eagle wrote: > > > Hi all, > > > On Linux, I do something like this > > > $ program_to_execute < input_file > > ... get some output ... > > > I have the content of the input_file as a string inside a python > > program and would li

Re: multiprocessing / forking memory usage

2009-05-26 Thread Piet van Oostrum
> Randall Smith (RS) wrote: >RS> I'm trying to get a grasp on how memory usage is affected when forking as >RS> the multiprocessing module does. I've got a program with a parent process >RS> using wx and other memory intensive modules. It spawns child processes (by >RS> forking) that should

distutils extension configuration problem

2009-05-26 Thread Ron Garret
I'm trying to build PyObjC on an Intel Mac running OS X 10.5.7. The build is breaking because distutils seems to want to build extension modules as universal binaries, but some of the libraries it depends on are built for intel-only, i.e.: [...@mickey:~/Desktop/pyobjc-framework-ScreenSaver-2.2

Re: How do I sample randomly based on some probability(wightage)?

2009-05-26 Thread Dave Angel
Sumitava Mukherjee wrote: Hi all, I need to randomly sample from a list where all choices have weights attached to them. The probability of them being choosen is dependent on the weights. If say Sample list of choices are [A,B,C,D,E] and weights of the same are [0.895,0.567,0.765,0.890,0.60] when

unpickling a stream

2009-05-26 Thread msolem
Hello, I want to send a stream of pickled objects over a socket. Is there a standard way of ensuring that only complete objects are unpickled on the receiving side. client pseudo code: loop forever: receive some bytes on the socket if we have received a complete pickled object: <== Ho

Re: How do I sample randomly based on some probability(wightage)?

2009-05-26 Thread Mel
Sumitava Mukherjee wrote: > Hi all, > I need to randomly sample from a list where all choices have weights > attached to them. The probability of them being choosen is dependent > on the weights. > If say Sample list of choices are [A,B,C,D,E] and weights of the same > are [0.895,0.567,0.765,0.890

Re: How do I sample randomly based on some probability(wightage)?

2009-05-26 Thread George Sakkis
On May 26, 2:39 pm, Sumitava Mukherjee wrote: > Hi all, > I need to randomly sample from a list where all choices have weights > attached to them. The probability of them being choosen is dependent > on the weights. > If say Sample list of choices are [A,B,C,D,E] and weights of the same > are [0.8

Pickle of the instance of new style class fails when execute with exec statement

2009-05-26 Thread Борис Казаков
Hi, I'm trying to execute the following code: d = {} exec('import cPickle') in d desc = """ class A(object): pass """ exec(desc) in d exec('a = A()') in d exec('cPickle.dump(a, open("tmp.txt","wb"))')in d for some reason it fails with the following traceback: Traceback (most recent call la

Re: Passing string from python programs to external programs

2009-05-26 Thread Jeff McNeil
On May 26, 2:12 pm, lone_eagle wrote: > Hi all, > > On Linux, I do something like this > > $ program_to_execute < input_file > ... get some output ... > > I have the content of the input_file as a string inside a python > program and would like to pass this string to the external program > from in

Re: Compile python extensions under windows/cygwin

2009-05-26 Thread Joshua Kugler
Joana wrote: > I mantain Python on Windows, all installed packages are under c: > \Python25\Lib\site-packages. Now I have to build C libraries used by > python extensions and I am using cygwin, but I don't know how to > install the module in Windows directory. I have used MingW to do this. Might

Re: What text editor is everyone using for Python

2009-05-26 Thread Brian Blais
On May 26, 2009, at 8:07 , Lacrima wrote: I am new to python. And now I am using trial version of Wing IDE. But nobody mentioned it as a favourite editor. So should I buy it when trial is expired or there are better choices? I have found that the appreciation of a text editor varies greatly

Re: What text editor is everyone using for Python

2009-05-26 Thread Brian Blais
On May 26, 2009, at 11:17 , Ken Seehart wrote: Lacrima wrote: I am new to python. And now I am using trial version of Wing IDE. But nobody mentioned it as a favourite editor. So should I buy it when trial is expired or there are better choices? Jean-Michel Pichavant wrote: Why buy an IDE w

Re: Passing string from python programs to external programs

2009-05-26 Thread CTO
On May 26, 2:12 pm, lone_eagle wrote: > Hi all, > > On Linux, I do something like this > > $ program_to_execute < input_file > ... get some output ... > > I have the content of the input_file as a string inside a python > program and would like to pass this string to the external program > from in

Re: [Python-Dev] PEP 384: Defining a Stable ABI

2009-05-26 Thread Martin v. Löwis
Functions declared in the following header files are not part of the ABI: - cellobject.h - classobject.h - code.h - frameobject.h - funcobject.h - genobject.h - pyarena.h - pydebug.h - symtable.h - token.h - traceback.h >>> I don't th

Re: How do I sample randomly based on some probability(wightage)?

2009-05-26 Thread Arnaud Delobelle
Sumitava Mukherjee writes: > On May 26, 11:39 pm, Sumitava Mukherjee wrote: >> Hi all, >> I need to randomly sample from a list where all choices have weights >> attached to them. The probability of them being choosen is dependent >> on the weights. >> If say Sample list of choices are [A,B,C,D,

Re: How do I sample randomly based on some probability(wightage)?

2009-05-26 Thread Emile van Sebille
On 5/26/2009 11:39 AM Sumitava Mukherjee said... Hi all, I need to randomly sample from a list where all choices have weights attached to them. The probability of them being choosen is dependent on the weights. If say Sample list of choices are [A,B,C,D,E] and weights of the same are [0.895,0.567

Re: How do I sample randomly based on some probability(wightage)?

2009-05-26 Thread Sumitava Mukherjee
On May 26, 11:39 pm, Sumitava Mukherjee wrote: > Hi all, > I need to randomly sample from a list where all choices have weights > attached to them. The probability of them being choosen is dependent > on the weights. > If say Sample list of choices are [A,B,C,D,E] and weights of the same > are [0.

How do I sample randomly based on some probability(wightage)?

2009-05-26 Thread Sumitava Mukherjee
Hi all, I need to randomly sample from a list where all choices have weights attached to them. The probability of them being choosen is dependent on the weights. If say Sample list of choices are [A,B,C,D,E] and weights of the same are [0.895,0.567,0.765,0.890,0.60] when I draw (say 2) samples then

Passing string from python programs to external programs

2009-05-26 Thread lone_eagle
Hi all, On Linux, I do something like this $ program_to_execute < input_file ... get some output ... I have the content of the input_file as a string inside a python program and would like to pass this string to the external program from inside the python program and get back the programs output

multiprocessing / forking memory usage

2009-05-26 Thread Randall Smith
I'm trying to get a grasp on how memory usage is affected when forking as the multiprocessing module does. I've got a program with a parent process using wx and other memory intensive modules. It spawns child processes (by forking) that should be very lean (no wx required, etc). Based on inspe

Re: Ted Dziuba

2009-05-26 Thread John DeRosa
On 2009-05-25 00:22:04 -0700, Lawrence D'Oliveiro said: : If you've ever had to build C extensions to Python on Windows, you can join me in a feeling of satisfaction that someone at Microsoft is going to have

test message

2009-05-26 Thread Joel Goldstick
I'm wondering why I couldn't post here. I read the email list, not from the newsgroup -- http://mail.python.org/mailman/listinfo/python-list

Re: [Python-Dev] PEP 384: Defining a Stable ABI

2009-05-26 Thread M.-A. Lemburg
Martin v. Löwis wrote: >> Now, with the PEP, I have a feeling that the Python C-API >> will in effect be limited to what's in the PEP's idea of >> a usable ABI and open up the non-inluded public C-APIs >> to the same rate of change as the private APIs. > > That's certainly not the plan. Instead, t

Re: How to test python snippets in my documents?

2009-05-26 Thread Ned Deily
In article , Matthew Wilson wrote: > I'm using a homemade script to verify some code samples in my > documentation. [...] > The script checks all the files listed as arguments. This is OK, but is > there anything better? Perhaps a test-discovery framework, like nose: http://ivory.idyll.org/ar

Re: large array in a single line

2009-05-26 Thread Arnaud Delobelle
karthik...@gmail.com writes: > On May 26, 7:26 pm, Arnaud Delobelle wrote: >> karthik...@gmail.com writes: >> > I would like to have a txt file of single line with >> > [1 2 3 .100] >> >> > I try something like >> > q=arange(100) >> > fl=file('tmp.ext','w') >> > fl.writelines(str(q)) >> >

Re: What text editor is everyone using for Python

2009-05-26 Thread Tim Chase
Zamnedix wrote: So what do you guys use, and why? Hopefully we can keep this civil. Nano! Nano! Nano Revolution!!! Thank you, Mork[1] :) -tkc (who uses Vim for Python coding, and on rare occasions, Notepad or ed) [1] http://en.wikipedia.org/wiki/Mork_%26_Mindy -- http://mail.python.o

Re: large array in a single line

2009-05-26 Thread Robert Kern
On 2009-05-26 09:18, karthik...@gmail.com wrote: I would like to have a txt file of single line with [1 2 3 .100] I try something like q=arange(100) fl=file('tmp.ext','w') fl.writelines(str(q)) fl.close() Unfortunately my output is [ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17

Re: Network programming ?

2009-05-26 Thread Benjamin Kaplan
On Tue, May 26, 2009 at 4:00 AM, Dave Angel wrote: > thushiantha...@gmail.com wrote: > >> Hi everyone, >> >> I am planning to develop a chatting software in Python, for my college >> project. I am using Windows Vista. Is it possible to do sockets >> programming in Python ? Any books or websites ?

Re: What text editor is everyone using for Python

2009-05-26 Thread Bar Shirtcliff
Ken Seehart writes: | | Lacrima wrote: | > I am new to python. | > And now I am using trial version of Wing IDE. | > But nobody mentioned it as a favourite editor. | > So should I buy it when trial is expired or there are better choices? | > | | I've heard notepad is pretty good. http://www.

Re: large array in a single line

2009-05-26 Thread Dave Angel
karthik...@gmail.com wrote: I would like to have a txt file of single line with [1 2 3 .100] I try something like q=arange(100) fl=file('tmp.ext','w') fl.writelines(str(q)) fl.close() Unfortunately my output is [ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24

Re: What text editor is everyone using for Python

2009-05-26 Thread Benjamin Kaplan
On Tue, May 26, 2009 at 8:07 AM, Lacrima wrote: > I am new to python. > And now I am using trial version of Wing IDE. > But nobody mentioned it as a favourite editor. > So should I buy it when trial is expired or there are better choices? We're mostly talking about text editors, not full-fledge

Re: What text editor is everyone using for Python

2009-05-26 Thread Ken Seehart
Lacrima wrote: I am new to python. And now I am using trial version of Wing IDE. But nobody mentioned it as a favourite editor. So should I buy it when trial is expired or there are better choices? Jean-Michel Pichavant wrote: Why buy an IDE when you just need a text editor ? I don't get i

Re: What text editor is everyone using for Python

2009-05-26 Thread Zamnedix
On May 25, 10:35 am, LittleGrasshopper wrote: > With so many choices, I was wondering what editor is the one you > prefer when coding Python, and why. I normally use vi, and just got > into Python, so I am looking for suitable syntax files for it, and > extra utilities. I dabbled with emacs at som

Re: replacement for execfile

2009-05-26 Thread Scott David Daniels
Alex Popescu wrote: "Steven D'Aprano" wrote in news:pan.2007.07.29.03.39.34.703...@remove.this.cybersource.com.au: ... you're expecting the users to write working Python code, but you think "import module" is too hard for them? That was just a cherry on the cake. The most important part is t

Re: Optimizing math functions

2009-05-26 Thread Robert Kern
On 2009-05-24 07:42, Esmail wrote: Robert Kern wrote: We have several bounded optimization routines in scipy. http://docs.scipy.org/doc/scipy/reference/optimize.html Hi Robert, Thanks for the lead .. I briefly looked at the documentation, but before I dig into this more deeply 2 quick ques

Re: large array in a single line

2009-05-26 Thread Arnaud Delobelle
karthik...@gmail.com writes: > I would like to have a txt file of single line with > [1 2 3 .100] > > I try something like > q=arange(100) > fl=file('tmp.ext','w') > fl.writelines(str(q)) > fl.close() > > Unfortunately my output is > > [ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17

Re: How to test python snippets in my documents?

2009-05-26 Thread Lie Ryan
Matthew Wilson wrote: I'm using a homemade script to verify some code samples in my documentation. Here it is: #! /usr/bin/env python2.6 # vim: set expandtab ts=4 sw=4 filetype=python: import doctest, os, sys def main(s): "Run doctest.testfile(s, None)" retur

Re: What text editor is everyone using for Python

2009-05-26 Thread David Smith
Lacrima wrote: > I am new to python. > And now I am using trial version of Wing IDE. > But nobody mentioned it as a favourite editor. > So should I buy it when trial is expired or there are better choices? I use Wing IDE and like it. It very nicely enforces consistent space indentations and othe

Re: which database is suitable for small applications

2009-05-26 Thread Kushal Kumaran
On Tue, May 26, 2009 at 2:03 PM, Kalyan Chakravarthy wrote: > Hi All, >   can any one suggest me which database I can use for my small > application(to store user names ,passwords, very few other data.. ) > I am using Python, Google Apps and guide me how to connect to database, I am > very

Re: Network programming ?

2009-05-26 Thread thushianthan15
Thank you, for all your support. I will try wxPython with the sockets module. thushanthan. -- http://mail.python.org/mailman/listinfo/python-list

Re: What is the difference between init and enter?

2009-05-26 Thread Gary Herron
John wrote: I'm okay with init, but it seems to me that enter is redundant since it appears that anything you want to execute in enter can be done in init. The proper response to a question like this has to be http://www.catb.org/~esr/faqs/smart-questions.html as anything else is complete g

scripting and uploading in Python

2009-05-26 Thread Mark Tarver
I've recently purchased a site on a Linux server which runs Python. Generally I'd like to bring myself up to speed on scripting in Python. Any good reads - dead tree or otherwise? One thing I need to learn is to be able to give folks the power to upload files onto their own disk space using pas

Re: [Python-Dev] PEP 384: Defining a Stable ABI

2009-05-26 Thread Martin v. Löwis
> Now, with the PEP, I have a feeling that the Python C-API > will in effect be limited to what's in the PEP's idea of > a usable ABI and open up the non-inluded public C-APIs > to the same rate of change as the private APIs. That's certainly not the plan. Instead, the plan is to have a stable ABI

How to test python snippets in my documents?

2009-05-26 Thread Matthew Wilson
I'm using a homemade script to verify some code samples in my documentation. Here it is: #! /usr/bin/env python2.6 # vim: set expandtab ts=4 sw=4 filetype=python: import doctest, os, sys def main(s): "Run doctest.testfile(s, None)" return doctest.testfile(s, No

Re: large array in a single line

2009-05-26 Thread Ken Seehart
Arnaud Delobelle wrote: karthik...@gmail.com writes: I would like to have a txt file of single line with [1 2 3 .100] I try something like q=arange(100) fl=file('tmp.ext','w') fl.writelines(str(q)) fl.close() Unfortunately my output is [ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14

Re: large array in a single line

2009-05-26 Thread karthik167
On May 26, 7:26 pm, Arnaud Delobelle wrote: > karthik...@gmail.com writes: > > I would like to have a txt file of single line with > > [1 2 3 .100] > > > I try something like > > q=arange(100) > > fl=file('tmp.ext','w') > > fl.writelines(str(q)) > > fl.close() > > > Unfortunately my output

Re: What text editor is everyone using for Python

2009-05-26 Thread Benjamin Kaplan
On Tue, May 26, 2009 at 11:17 AM, Ken Seehart wrote: > > Lacrima wrote: > >> I am new to python. >> And now I am using trial version of Wing IDE. >> But nobody mentioned it as a favourite editor. >> So should I buy it when trial is expired or there are better choices? >> >> > > Jean-Michel Pichav

large array in a single line

2009-05-26 Thread karthik167
I would like to have a txt file of single line with [1 2 3 .100] I try something like q=arange(100) fl=file('tmp.ext','w') fl.writelines(str(q)) fl.close() Unfortunately my output is [ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 3

Re: How to create a list of functions depending on a parameter?

2009-05-26 Thread Scott David Daniels
enzo michelangeli wrote: Let's suppose I want to create a list of n functions of a single argument, returning the sum between argument and index in the list, so that e.g.: f[0](10) will return 10 f[3](12) will return 15 ...and so on. I had naively though of coding: f = [lambda x: x+j for j in

Re: What text editor is everyone using for Python

2009-05-26 Thread Arnaud Delobelle
Lawrence D'Oliveiro writes: > In message , Hendrik van > Rooyen wrote: > >> "Lawrence D'Oliveiro" wrote: >>> >>> Why [do you want syntax highlighting]? >> >> It makes your screen look more busy as you type - for instance, if you >> type a " or a ' then it treats the rest of the file from that

Re: What text editor is everyone using for Python

2009-05-26 Thread Mel
LittleGrasshopper wrote: > With so many choices, I was wondering what editor is the one you > prefer when coding Python, and why. I normally use vi, and just got > into Python, so I am looking for suitable syntax files for it, and > extra utilities. I dabbled with emacs at some point, but couldn't

Re: which database is suitable for small applications

2009-05-26 Thread Mike Driscoll
On May 26, 8:16 am, J Kenneth King wrote: > Jean-Michel Pichavant writes: > > Kalyan Chakravarthy wrote: > >> Hi All, > >>           can any one suggest me which database I can use for my > >> small application(to store user names ,passwords, very few other > >> data.. ) > >> I am using Python, G

Re: Regarding sort()

2009-05-26 Thread Scott David Daniels
Jaime Fernandez del Rio wrote: ... the reasons are starting to pile to fare 2.6 goodbye and move on to 3.0... If you wait just a bit (TM)*, you'd be better served to move on to 3.1. I think 3.0 is for learning, both for Python developers and users, and has less "fit and polish" than previous Py

Re: What text editor is everyone using for Python

2009-05-26 Thread Ken Seehart
Lacrima wrote: I am new to python. And now I am using trial version of Wing IDE. But nobody mentioned it as a favourite editor. So should I buy it when trial is expired or there are better choices? It's my favorite. Buy it. I'm not aware of any better choices. If you can afford the Pro ver

Re: What text editor is everyone using for Python

2009-05-26 Thread Roy Smith
In article , "Hendrik van Rooyen" wrote: > [syntax coloring] makes your screen look more busy as you type - for > instance, if you > type a " or a ' then it treats the rest of the file from that point on as > belonging to the same string you are about to start typing, and colours it > all usin

Re: What text editor is everyone using for Python

2009-05-26 Thread Jean-Michel Pichavant
Why buy an IDE when you just need a text editor ? I don't get it. Anyway gvim (aka vim aka vi) and emacs are the most powerful editors for years. Both have Windows and Linux version and most important, they both are very effective at editing any file type (python, C, latex, love letters...) Ema

Re: What is the difference between init and enter?

2009-05-26 Thread Lie Ryan
Diez B. Roggisch wrote: John wrote: I'm okay with init, but it seems to me that enter is redundant since it appears that anything you want to execute in enter can be done in init. About what are you talking? Diez Do you mean __init__ and __enter__? They are used for two completely diffe

Re: which database is suitable for small applications

2009-05-26 Thread J Kenneth King
Jean-Michel Pichavant writes: > Kalyan Chakravarthy wrote: >> Hi All, >> can any one suggest me which database I can use for my >> small application(to store user names ,passwords, very few other >> data.. ) >> I am using Python, Google Apps and guide me how to connect to >> database, I

Re: What is the difference between init and enter?

2009-05-26 Thread Ken Seehart
Diez B. Roggisch wrote: John wrote: I'm okay with init, but it seems to me that enter is redundant since it appears that anything you want to execute in enter can be done in init. About what are you talking? Diez Presumably, the 'with' statement. http://www.python.org/dev/peps

Re: What text editor is everyone using for Python

2009-05-26 Thread J Kenneth King
Lacrima writes: > I am new to python. > And now I am using trial version of Wing IDE. > But nobody mentioned it as a favourite editor. > So should I buy it when trial is expired or there are better choices? That is a slightly better question. Try some of the free alternatives. I do happen to u

Re: which database is suitable for small applications

2009-05-26 Thread Tim Chase
can any one suggest me which database I can use for my small application(to store user names ,passwords, very few other data.. ) I am using Python, Google Apps and guide me how to connect to database, I am very new to these technologies Well, depending on the complexity you need, you c

Re: DB-API execute params, am I missing something?

2009-05-26 Thread Diez B. Roggisch
Gabriel Rossetti wrote: > Hello everyone, I am trying to use dbapi with mysql and I get this error: > > Traceback (most recent call last): > File "", line 1, in > File "", line 2, in getUnitParams > File "/var/lib/python-support/python2.5/MySQLdb/cursors.py", line 151, > in execute > q

Building Python with icc on 64-bit Linux

2009-05-26 Thread Konrad Hinsen
I am trying to install Python 2.6.2 on a 64-bit Linux machine (RedHat Enterprise) using the Intel compiler (version 11). Even without optimizations (-O0), I get a compilation error in the ctypes module icc -pthread -fPIC -fno-strict-aliasing -DNDEBUG -O0 -I. -I/home/shr/ khinsen/tm\ p/Python

Re: email scanning for X-Spam-Score

2009-05-26 Thread skip
Helmut>mailmsg = email.message_from_string(msg) Helmut>SPAM_CORE = mailmsg['X-Spam-Score'] Maybe lower case? SPAM_CORE = mailmsg['x-spam-score'] -- Skip Montanaro - s...@pobox.com - http://www.smontanaro.net/ America's vaunted "free press" notwithstanding, story ideas th

Re: What text editor is everyone using for Python

2009-05-26 Thread Lacrima
I am new to python. And now I am using trial version of Wing IDE. But nobody mentioned it as a favourite editor. So should I buy it when trial is expired or there are better choices? -- http://mail.python.org/mailman/listinfo/python-list

Re: What is the difference between init and enter?

2009-05-26 Thread Diez B. Roggisch
John wrote: > I'm okay with init, but it seems to me that enter is redundant since it > appears that anything you want to execute in enter can be done in init. About what are you talking? Diez -- http://mail.python.org/mailman/listinfo/python-list

DB-API execute params, am I missing something?

2009-05-26 Thread Gabriel Rossetti
Hello everyone, I am trying to use dbapi with mysql and I get this error: Traceback (most recent call last): File "", line 1, in File "", line 2, in getUnitParams File "/var/lib/python-support/python2.5/MySQLdb/cursors.py", line 151, in execute query = query % db.literal(args) TypeError:

What is the difference between init and enter?

2009-05-26 Thread John
I'm okay with init, but it seems to me that enter is redundant since it appears that anything you want to execute in enter can be done in init. -- http://mail.python.org/mailman/listinfo/python-list

Re: What text editor is everyone using for Python

2009-05-26 Thread Lawrence D'Oliveiro
In message , Hendrik van Rooyen wrote: > "Lawrence D'Oliveiro" wrote: >> >> Why [do you want syntax highlighting]? > > It makes your screen look more busy as you type - for instance, if you > type a " or a ' then it treats the rest of the file from that point on as > belonging to the same stri

Re: How to create a list of functions depending on a parameter?

2009-05-26 Thread Diez B. Roggisch
Arnaud Delobelle wrote: > "Diez B. Roggisch" writes: > >> You need to capture n into the closure of the lambda: >> >> f = [lambda x, n=n: x+j for j in xrange(n)] > > You mean [lambda x, j=j: x+j for j in xrange(n)] Ah, sorry, parentheses-problem. Diez -- http://mail.python.org/mailman/li

Re: How to create a list of functions depending on a parameter?

2009-05-26 Thread Diez B. Roggisch
Paul Rudin wrote: > "Diez B. Roggisch" writes: > >> enzo michelangeli schrieb: >>> Let's suppose I want to create a list of n functions of a single >>> argument, returning the sum between argument and index in the list, so >>> that e.g.: >>> >>> f[0](10) will return 10 >>> f[3](12) will return 1

Re: which database is suitable for small applications

2009-05-26 Thread Jean-Michel Pichavant
Kalyan Chakravarthy wrote: Hi All, can any one suggest me which database I can use for my small application(to store user names ,passwords, very few other data.. ) I am using Python, Google Apps and guide me how to connect to database, I am very new to these technologies Please help

Re: Are Python-based web frameworks reliable enough?

2009-05-26 Thread Bruno Desthuilliers
Gilles Ganault a écrit : Hello Until now, the modest web apps I wrote were all in PHP because it's available on just about any hosted server. I now have a couple of ideas for applications where I would deploy my own servers, so that I'd rather write them in Python because I find the lan

Re: Network programming ?

2009-05-26 Thread CTO
On May 25, 11:05 pm, thushiantha...@gmail.com wrote: > Hi everyone, > > I am planning to develop a chatting software in Python, for my college > project. I am using Windows Vista. Is it possible to do sockets > programming in Python ? Any books or websites ?  Also, i want to > develop a gui for tha

Re: A list with periodic boundary conditions

2009-05-26 Thread youh...@googlemail.com
Rodhri, thank you very much for your reply. I've tried to extend what you suggested; I think it can be made to work, but you're right -- it gets horrid rapidly. I'm at the start of what promises to be a large project, and I want to make sure that I get my data structures right, but my impression

  1   2   >