Re: Python's great, in a word

2008-01-10 Thread Caleb
> The best thing about Python is ___. this. -- http://mail.python.org/mailman/listinfo/python-list

Re: I'm searching for Python style guidelines

2008-01-10 Thread Caleb
difficult to go far wrong regarding style if you do a lot of what's in this list. This list is not mine. I jotted these points down, but this information is continually repeated by the actual wise people (not me) in this newsgroup. Caleb -- http://mail.python.org/mailman/listinfo/python-list

Re: Strip lines from files

2008-01-10 Thread Caleb
with a os.listdir lookup as in filenamelist = [filename for filename in os.listdir('.') if filename.find('.pdb.')] Caleb -- http://mail.python.org/mailman/listinfo/python-list

Re: Two classes problem

2005-02-02 Thread Caleb Hattingh
odule* a to the constructor for aclass, and that constructor modified the module variable "test". This is a way to avoid using 'global', or in other words, the namespaces of things are still clear (for me anyway). Cya Caleb On Thu, 3 Feb 2005 00:13:05 +0530, Gurpreet Sac

Re: python and visual C++

2005-02-02 Thread Caleb Hattingh
y way I ever intend making native binary additions to my own programs. Regards Caleb On Wed, 2 Feb 2005 12:35:08 +0100, Olivier Ravard <[EMAIL PROTECTED]> wrote: Hi, When I tryed to compile a python module using distutils under windows, and there is an error message if we do not hav

Re: Two classes problem

2005-02-02 Thread Caleb Hattingh
iers (from within a class or function). To the OP: In general, this seems like a bad organization strategy for your code. What is your actual use case? Agreed. It is an interesting intellectual exercise, but there is surely a better way of controlling access to 'test' in the OP's

Re: Basic file operation questions

2005-02-02 Thread Caleb Hattingh
he Python tutorial, which gets installed as part of the documentation. That tutorial can get you much of the knowledge you will ever need with Python. thx Caleb On 2 Feb 2005 13:27:49 -0800, alex <[EMAIL PROTECTED]> wrote: Hi, I am a beginner with python and here is my first question: How can

Re: Basic file operation questions

2005-02-03 Thread Caleb Hattingh
st majority of cases, but I'm naturally curious :) thx Caleb -- http://mail.python.org/mailman/listinfo/python-list

Re: python and visual C++

2005-02-03 Thread Caleb Hattingh
te. thx Caleb -- http://mail.python.org/mailman/listinfo/python-list

Re: Two classes problem

2005-02-03 Thread Caleb Hattingh
ss: '+test my_a = a(test) test = my_a.givetest() print 'Outside after class: '+test *** So here we explicitly pass "test" into the class, do stuff with it, and rewrite test again with a method. Does this satisfy the technical problem? regards Caleb On Thu, 3 Feb 200

Re: Opinions on KYLIX 3 (Delphi 4 Linux)

2005-07-18 Thread Caleb Hattingh
into the executable. This is somewhat of a problem for me but I expect this will change within a release or two. Lazarus is _very_ much like Delphi, and works on Windows, Linux, and possibly several other platforms. cya Caleb > and net for info about Borlands KYLIX 3 and have found litt

Re: OO design

2005-07-19 Thread Caleb Hattingh
to you or not - It certainly feels "right" to me, but then that is hardly surprising. In any case, what I presented almost exactly fits how I "think" about the problem, and that is what I want. > bwaha. ? regards Caleb -- http://mail.python.org/mailman/listinfo/python-list

Re: Finding # prefixing numbers

2005-07-19 Thread Caleb Hattingh
You really owe it to yourself to try the PyParsing package, if you have to do this kind of thing with any frequency. The syntactic difference between PyParsing and regular expressions is greater than the syntactic difference between Python and C. thx Caleb On Tue, 19 Jul 2005 13:35:02 +0200

Re: is this pythonic?

2005-07-20 Thread Caleb Hattingh
Wow, I didn't know about enumerate. Many thanks Caleb On Wed, 20 Jul 2005 15:19:50 +0200, Simon Brunning <[EMAIL PROTECTED]> wrote: > On 7/20/05, Mage <[EMAIL PROTECTED]> wrote: >> Or is there better way? >> >> for (i, url) in [(i,links[i]) for i in

Re: is this pythonic?

2005-07-22 Thread Caleb Hattingh
newsgroup to fill in the blanks for me. It is guys like you who are willing to take the time to give responses that make it what it is. In another newsgroup, I could have been flamed for letting Simon know he helped more than just the OP with his post :) Thanks Caleb On Wed, 20 Jul 2005

Re: GUI - Windows: Where to get started

2005-07-26 Thread Caleb Hattingh
idget toolkit you want to use. Also, you would have to decide if you want to do GUI-building via text-files or through a graphical method. The simplest method (for the latter) I have seen so far is Glade, but perhaps other posters will have better advice than me. rgds Caleb On Tue, 26 Jul 20

Re: Emacs skeletons

2005-07-26 Thread Caleb Hattingh
options within a word. It's not true completion (using valid completions for class hierarchies, a la Delphi/VB), but I get a lot of mileage out of it with my python coding. I fully expect Emacs has something similar, though I can't tell you how (I hardly know emacs at all).

Re: Is this Pythonic?

2005-08-01 Thread Caleb Hattingh
ract class method is being called in error). regards Caleb On Mon, 01 Aug 2005 18:52:02 +0200, Peter Hansen <[EMAIL PROTECTED]> wrote: > phil hunt wrote: >> Suppose I'm writing an abstract superclass which will have some >> concrete subclasses. I want to signal in m

Re: Python IDE's

2005-08-01 Thread Caleb Hattingh
but I know from personal experience that it would take a very special IDE to compete with Vim for the manipulation of text (GUI design, of course, is another story altogether). regards Caleb On Mon, 01 Aug 2005 18:57:51 +0200, projecktzero <[EMAIL PROTECTED]> wrote: > VIM or Emacs. I

Re: very high-level IO functions?

2005-09-19 Thread Caleb Hattingh
York Short answer: yes We use python and R at work, and in general you will find python syntax a little cleaner for functionality they have in common. R is better for some of the more hard-wired stats stuff, though. On Mon, 19 Sep 2005 20:04:37 +0200, York <[EMAIL PROTECTED]> wrote: > Hi,

Re: p2exe using wine/cxoffice

2005-09-19 Thread Caleb Hattingh
The other thing (and this is always true) is that "better" needs definition. On purely technical grounds, on average, MSOffice is better than OO. However, holistically, OO is probably better (no lock-in, open standards, multiplatform and so on). Those soft issues do matter. On Mon, 19 Sep

mathschallenge.net WAS Brute force sudoku cracker

2005-09-19 Thread Caleb Hattingh
Very interesting that sudoku solving appears on the python group - there is a programming competition at mathschallenge.net (euler) where one of the puzzles is developing a sudoku solving algorithm... Actually the python entrants are giving the C guys a good run! On Mon, 19 Sep 2005 09:12:54

Re: newbie wants to compile python list of filenames in selected directories

2005-02-06 Thread Caleb Hattingh
rrent folder namesToMatch = ['readme.txt','readme.doc'] # Buncha names to find for item in fileNames: # check every filename if item in namesToMatch: # is this item in the required list? print 'Match found: '+item # if you found one, say so. *** Hope this helps.

Re: loops -> list/generator comprehensions

2005-02-06 Thread Caleb Hattingh
I would be interested to see an example of code that is more concise but yet as *clear* as the one you already have. I can actually read and understand what you've got there. That's cool :) On 6 Feb 2005 11:28:37 -0800, <[EMAIL PROTECTED]> wrote: I wrote this little piece of code to get a l

Re: Multiple constructors

2005-02-06 Thread Caleb Hattingh
may be different in number and type. I don't have the years of experience that Alex has, however, so I may end up regretting it but right now, it seems to me to be the clearest approach in this situation. thx Caleb -- http://mail.python.org/mailman/listinfo/python-list

Re: Python versus Perl ?

2005-02-06 Thread Caleb Hattingh
that, perhaps try to convince of our particular world-view, and so on. By the end of the tutorial (more likely at halfway) you will probably know whether this is worth pursuing or not. Oh, and do this before you invest too much time in Perl :) Keep well Caleb On 6 Feb 2005 05:19:09

Re: loops -> list/generator comprehensions

2005-02-06 Thread Caleb Hattingh
n't know python as well as I should (certainly not as well as others here!). I guess it is just familiarity. A single comprehension is ok, nesting them gets tricky, and 3 times is a strike for me. I will practise :) keep well Caleb -- http://mail.python.org/mailman/listinfo/python-list

Re: loops -> list/generator comprehensions

2005-02-07 Thread Caleb Hattingh
hole thing a little bit - and (mental note) I *must* remember this when I explain stuff to people at work, having now experienced it first hand. Thanks again Caleb -- http://mail.python.org/mailman/listinfo/python-list

Re: Multiple constructors

2005-02-07 Thread Caleb Hattingh
Sure, Nick, I agree with you completely. I generally try to make sure that my classes are limited in what they do/provide, so it is not often a problem that a class may need to be instantiated in several very different ways. But your point is well taken. Thanks Caleb -- http://mail.python.org

Re: Basic file operation questions

2005-02-07 Thread Caleb Hattingh
Peter, that was very clear, thanks. > So not only is > > for line in file(...): ># do stuff > > the most elegant, it is also the fastest. file.readlines() comes close, but > is only viable for "small" files. -- http://mail.python.org/mailman/listinfo/python-list

Pypy - Which C modules still need converting to py?

2005-02-08 Thread Caleb Hattingh
slated into python? thanks Caleb -- http://mail.python.org/mailman/listinfo/python-list

Re: Python versus Perl ?

2005-02-08 Thread Caleb Hattingh
numerical code and python for everything else. You really will have to convince people here that execution speed is a real issue for your programming task (in order to continue this discussion). Otherwise the debate will go south real quick. Keep well Caleb On Tue, 08 Feb 2005 12:17:05 -0600,

Re: python code with indention

2005-02-08 Thread Caleb Hattingh
ng to type all those delimiters). Caleb -- http://mail.python.org/mailman/listinfo/python-list

Re: Loop in list.

2005-02-08 Thread Caleb Hattingh
e to correlate the answer with the loop, but you should be able to see after a while that this nesting is the same as '>>> a = [] '>>> for b in range(4): '>>> for i in range(3): '>>> a.append(i*2*b) keep well Caleb -- http://mail.python.org/mailman/listinfo/python-list

Re: Choosing the right parser for parsing C headers

2005-02-08 Thread Caleb Hattingh
of dynamic markup which pym executes while parsing the file. In other words, you can write python code within a comment block in your C-header to generate unit-tests into other files, and get that code executed with pym. Keep well Caleb On Tue, 08 Feb 2005 19:58:33 GMT, Paddy McCarthy <[EM

Re: Basic file operation questions

2005-02-08 Thread Caleb Hattingh
Marc I don't know how it is handled, but I expect also that there is an implied close(). thanks Caleb When you read a file with that method, is there an implied close() call on the file? I assume there is, but how is that handled? -- http://mail.python.org/mailman/listinfo/python-list

Re: variable declaration

2005-02-08 Thread Caleb Hattingh
k c) not force everyone else to have to deal with variable declarations that will be only an annoyance 95% percent of the time. Is there a specific reason you want this added to the *language* itself? Thanks Caleb -- http://mail.python.org/mailman/listinfo/python-list

Re: Loop in list.

2005-02-08 Thread Caleb Hattingh
Stephen You're gonna have to help me here.what is the effective difference? Thanks Caleb '>>> a = [] '>>> for b in range(4): '>>> for i in range(3): '>>> a.append(i*2*b) There is a subtle error in this explanation. T

Re: variable declaration

2005-02-08 Thread Caleb Hattingh
forever (perhaps even only in other peoples code who decided to use the "option"), it is not much to ask (I work in pascal a lot - I know all about tons and tons of declarations). thx Caleb You can also get all places where said variable exists by using grep, or your editor's sea

Re: Python versus Perl ?

2005-02-08 Thread Caleb Hattingh
ePascal, make a DLL and use ctypes to call it. I do not know C and have no desire to learn now :)On the other hand, I know pascal quite well. keep well Caleb -- http://mail.python.org/mailman/listinfo/python-list

Re: Loop in list.

2005-02-08 Thread Caleb Hattingh
them first. Thanks again Caleb > (to translate a list comprehension to nested statements, remove > the result expression, insert colons and newlines between the for/if > statement parts, and put the append(result expression) part inside > the innermost statement) > > -- http

Re: Python versus Perl ?

2005-02-09 Thread Caleb Hattingh
uld give it some more thought anyways. Thanks again Caleb On Wed, 09 Feb 2005 12:38:37 -0500, Joe Francia <[EMAIL PROTECTED]> wrote: Caleb Hattingh wrote: As you might imagine, I think about this constantly. However, there are many other issues that make it complicated, such as having to w

Re: Python and version control

2005-02-09 Thread Caleb Hattingh
is a really great feature for this type of thing. Of course, I have only used JEDI VCS, so I have nothing to compare it to: ymmv. keep well Caleb -- http://mail.python.org/mailman/listinfo/python-list

Re: Is Python as capable as Perl for sysadmin work?

2005-02-09 Thread Caleb Hattingh
Roy How about the Yoda version: do: statement do not do: statement The Yoda version actually goes statement :do statement :not do Caleb -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie: SWIG or SIP?

2005-02-09 Thread Caleb Hattingh
Brent Google "python ctypes". ctypes is cool :) keep well Caleb On Wed, 9 Feb 2005 13:44:44 -0700, Brent W. Hughes <[EMAIL PROTECTED]> wrote: I have a third-party DLL and it's associated .h file. The DLL was written in C. I have neither the associated .c files nor t

Re: some qustions on python

2005-02-15 Thread Caleb Hattingh
http://www.python.org On Tue, 15 Feb 2005 13:16:53 -0500, samar bazied <[EMAIL PROTECTED]> wrote: Hi.. plz can u help me?? I am very new in python and I have some qustions about it. can u give me design process of python and their related langauges? and I will be very habby if u give me small ev

Re: python open source charting solutions ?

2005-03-08 Thread Caleb Hattingh
I have had good success with pygnuplot. On Tue, 8 Mar 2005 20:45:22 +0200, ionel <[EMAIL PROTECTED]> wrote: i need some pointers. so far i've tryed matplotlib ... -- http://mail.python.org/mailman/listinfo/python-list

PIL 1.1.4 paste PNG's with transparency problem

2004-11-29 Thread Caleb Hattingh
of the original first image would peer through the transparent bits of the original second image. I fully expect I am doing something wrong here, I just don't know what. Thanks Caleb -- http://mail.python.org/mailman/listinfo/python-list

Re: slicing, mapping types, ellipsis etc.

2004-11-29 Thread Caleb Hattingh
I'm going to assume the following is self-explanatory - type the commands in yourself. '>>> a = 'hello my name is caleb' '>>> b = a.split() '>>> b ['hello', 'my', 'name', 'is', 'caleb'] &

Re: asynchat and threading

2004-11-29 Thread Caleb Hattingh
I heartily support something like this, but alas I have not the time to help out with it. I like the Enthought python distribution because it installs several packages in one shot. A pity there isn't a similar thing for python addons in Linux (or is there?). Something apt-get-like would be

Re: PIL 1.1.4 paste PNG's with transparency problem

2004-11-30 Thread Caleb Hattingh
Wow, that was pretty clueless of me...right there on the *next* page of the manual (I thought "im.paste(image, box)" and "im.paste(image, color)" were the general forms for "paste", apparently didn't look further) thx Caleb On 29 Nov 2004 22:17:36 -0800, To

Re: PIL interpolation access

2004-11-30 Thread Caleb Hattingh
Hi I can't help you directly, but I am also finding im.putpixel to be extremely slow - as the docs recommend, can you try using the pixel-placing method of Draw? This is what I am going to try for my application (resampling algorithms). Thx Caleb On 30 Nov 2004 11:18:40 -0800, irond

Re: Regular Expression Problem...

2004-12-01 Thread Caleb Hattingh
Obviously, Peter and Jorge are hardcore, but below is what a beginner like me hacked up: My point, I guess, is that it is possible to quickly get a solution to a specific problem like this without being a total expert. The code below was typed out once, and with only one minor correction be

New experiences with PythonForDelphi

2004-12-07 Thread Caleb Hattingh
(good) news to me that C is not the only game in town for creating binary python extensions. Just a heads-up is all Caleb -- http://mail.python.org/mailman/listinfo/python-list

Re: Import a module without executing it?

2004-12-07 Thread Caleb Hattingh
Hi You could just parse the model file. Off the top of my head *** f = open('ModuleYouWantToExamine.py','r') for i in f: if i.find('def ') > -1: print 'Found a function!: '+i.replace('def ','') f.close() *** You would have to build this up for a more complete examination. Of course,

Re: How do I do this? (eval() on the left hand side)

2004-12-07 Thread Caleb Hattingh
aiming for something like pointer emulation with simple datatypes? Thanks Caleb -- http://mail.python.org/mailman/listinfo/python-list

Re: Import a module without executing it?

2004-12-07 Thread Caleb Hattingh
], CallFunc(Getattr(Name('Tkinter'), 'Text'), [Name('app'), Keyword('state', Const('disabled'))], None, None)), Discard(CallFunc(Getattr(Name('t'), 'pack'), [], None, None)), Assign([AssName('info', 'OP_ASSIGN'

Re: How do I do this? (eval() on the left hand side)

2004-12-07 Thread Caleb Hattingh
'a' '>>> a # The value of a is changed. 8 '>>> Is this kinda what you mean? I'm still new at this (and don't know REXX from Adam). Thanks Caleb There are many situations where this is useful. For instance, you might be getting a

Re: sys.stdin.read question

2004-12-07 Thread Caleb Hattingh
Hi You are probably typing this within IDLE. Try it after starting python in a shell like DOS or Bash. Should work then (works for me, and I also get the AttributeError in IDLE. Thanks Caleb On Tue, 07 Dec 2004 21:15:51 GMT, It's me <[EMAIL PROTECTED]> wrote: Why do I get an &quo

Re: sys.stdin.read question

2004-12-07 Thread Caleb Hattingh
that I am only taking 5 characters, but where does the newline (\n) come from? Is that a remnant from when I terminated the previous 'g' input? Thanks Caleb On Tue, 07 Dec 2004 23:36:56 -0500, Caleb Hattingh <[EMAIL PROTECTED]> wrote: Hi You are probably typing this within

Re: sys.stdin.read question

2004-12-08 Thread Caleb Hattingh
ppens. thx Caleb On Tue, 7 Dec 2004 23:16:50 +0100, Lars Tengnagel <[EMAIL PROTECTED]> wrote: Hej Caleb and others I've been strugling with the same problem where i try to use popen3 to run a program. If I use a piped commandline the program can read the file without problems but in t

Re: How do I do this? (eval() on the left hand side)

2004-12-08 Thread Caleb Hattingh
to access them through a string name? I don't know very much about the garbage collector, so I can't say for sure. thx Caleb On Wed, 08 Dec 2004 10:38:30 -0500, Peter Hansen <[EMAIL PROTECTED]> wrote: Nick Coghlan wrote: Generally, altering the contents of the dicts returned

Re: updating locals() and globals() (WAS: How do I do this? (eval() on the left hand side))

2004-12-08 Thread Caleb Hattingh
x had not yet been initialised, maybe. What I am seeing is that "x" does not seem to update when being assigned to - I guess this is what you are referring to by being unreliable. But "unreliable" sounds kinda vague and intermittent, and I assume that is not the case here

Re: How do I do this? (eval() on the left hand side)

2004-12-08 Thread Caleb Hattingh
lso be nice if globals and locals behaved the same, differing only in scope (which is what I expected originally anyway). But we can't have everything, I guess :) Caleb On Wed, 08 Dec 2004 20:49:53 +0100, Peter Otten <[EMAIL PROTECTED]> wrote: Caleb Hattingh wrote: In what way is it u

Re: How do I do this? (eval() on the left hand side)

2004-12-09 Thread caleb . hattingh
ave a clear idea of how to play nice with locals(). thx Caleb Peter Otten wrote: > Caleb Hattingh wrote: > > > I am convinced now that locals() doesn't work as (I) expected. Steven > > says there was some or other reason why locals() as used in this context > > is not

Re: dictionary initialization

2004-12-09 Thread caleb . hattingh
Hi Dan I must confess that upon rereading my words, there is some irony there (but not really sarcasm, is there?). However, I *really* tried to keep my tone, well, professional. I realise I didn't do a good job and apologise. I hope that's ok. Keep well Caleb -- http://mail.

Re: Pictograms and Python

2004-12-09 Thread caleb . hattingh
Diez Ya got me there! """ I have a sript that downloads a webpage. According to the picture on this webpage I need to pass a parameter to this , running script a few lines later. """ Err, ya, I guess I would be suspicious too. Sorry about that! Keep well Cal

Re: Ideas for projects

2004-12-09 Thread Caleb Hattingh
Here is something I would try but don't have the guts for: If you could write an extension to idle (yes, idle, not Boa, not Eric, etc) that pops up a small list of possible completions in a listbox when you type a '.' (period) after any object name or module name (including builtins), that wo

Re: How do I do this? (eval() on the left hand side)

2004-12-09 Thread Caleb Hattingh
other reason is because of the magical little menu that pops up when I type the period after "Self", and lets me pick a class member by typing the first few letters... Keep well Caleb On Thu, 09 Dec 2004 09:39:58 -0800, Jeff Shannon <[EMAIL PROTECTED]> wrote: -- heck, even be

Re: Calling a C program from a Python Script

2004-12-09 Thread Caleb Hattingh
oo. I would be interested in hearing what to look out for in the learning stage of developing C-extensions, for when I am overcome by curiosity and feel the need to try it out. Keep well Caleb I just want to know the basics of using C and Python together when the need arises, that's a

Re: large dictionary creation takes a LOT of time.

2005-04-29 Thread Caleb Hattingh
In fact, as one of the Peter's (either Otten or Hansen) explained to me, for line in open(file): is actually both faster (being buffered) and generally better for very large files because it doesn't read the whole file into memory, like readlines does (if you have a memory limitation). On Fri,

Re: looking for a simple way to load a program from another python program..

2006-08-13 Thread Caleb Hattingh
o your python executable is on the PATH environment variable. If you run other commands from python quite frequently, it is probably a good idea to look into the "os.popen" set of commands, for more flexibilty. Caleb -- http://mail.python.org/mailman/listinfo/python-list

And now for something completely different...

2006-12-12 Thread Caleb Hattingh
and wanted to share it. Not saying that such a thing couldn't ever be said about some given implementation of something complex in python (or any language, for that matter), but I still had a good chuckle. Caleb -- http://mail.python.org/mailman/listinfo/python-list

Re: automatically grading small programming assignments

2006-12-15 Thread Caleb Hattingh
server procedure can return True or False. One benefit is that if you change the input to the tests, you need only update the server.Actually, you could let the procedures on the server accept test input and student results, and return True or False. This would be cool :) Caleb On Dec 14

Re: Writing and reading variables to/from flat file

2006-12-15 Thread Caleb Hattingh
s','r')) I recently did a ton of scientific data analysis looking for trends in 10 years of data for a petrochemical plant, and I learned just how convenient dicts and pickles can be to manage one's sanity :) Caleb On Dec 14, 4:31 pm, Kevin Walzer <[EMAIL PROTECTED]> wrote:

Re: concatenating strings

2006-12-15 Thread Caleb Hattingh
Hi Erich If you're going to be doing a lot of string substitution, you should look at the Templating support in the library: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/304005 and (a little bit fancier): http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/335308 Regards

Re: Is there a way to push data into Microsoft Excel & Word from Python ?

2006-12-16 Thread Caleb Hattingh
e and the applescript interface that at least lets your business logic sit in one place. The wrapper can use the right API depending on the platform it finds itself on at runtime. Regards Caleb -- http://mail.python.org/mailman/listinfo/python-list

Re: Dictionary, iterate & update objects

2006-12-16 Thread Caleb Hattingh
ed? If you are this Henning Jansen: http://www.henning-jansen.com/ you may get a lot much more accurate help from others in this group by mentioning that you have some Ruby experience. That way, the guys in here who also know Ruby (not me :) can quickly point out the differences in behaviour for your specific question. Regards Caleb -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there a way to push data into Microsoft Excel & Word from Python ?

2006-12-21 Thread Caleb Hattingh
Hi Paul > Thanks for the kind words! No, thank _you_ for taking the time to write such a useful document. regards Caleb -- http://mail.python.org/mailman/listinfo/python-list

Re: rsync for python?

2006-12-22 Thread Caleb Hattingh
ux) or Scheduled Tasks (windows), if that was the functionality you wanted in a server implementation of such a tool. regards Caleb -- http://mail.python.org/mailman/listinfo/python-list

Re: No speedup on multi-processor machine?

2007-04-21 Thread Caleb Hattingh
robably because of something called GIL in Python. > How can I get around > that GIL and get speed-up? > Thanks in advance. > Daniel Perhaps try http://www.parallelpython.com/ or http://www.its.caltech.edu/~astraw/seppo.html Caleb -- http://mail.python.org/mailman/listinfo/python-list

Re: I need suggests

2007-01-23 Thread Caleb Hattingh
Pat wrote: > I have to do a big programm. Could someone give me some suggests about > IDE (on Linux) and books to learn. http://groups.google.com/groups/search?q=python+ide&qt_s=Search Lots and lots to read :) Caleb -- http://mail.python.org/mailman/listinfo/python-list

Monitoring the output of an external program

2007-12-12 Thread Caleb Marcus
I'm writing something that has to invoke an external program, and every time the external program prints something, update a UI. How would I go about doing this? signature.asc Description: This is a digitally signed message part -- http://mail.python.org/mailman/listinfo/python-list

Can one query full name (or version) of selected packages at pypi?

2006-04-20 Thread Caleb Hattingh
and compare it with what I have on disk. At this stage, just reporting the differences is fine. I could do these steps myself with normal http access and screen-scraping, but is there already such a system/script somewhere? Alternatively, how do you all keep versions of python addons up-to-date?

Re: Can one query full name (or version) of selected packages at pypi?

2006-04-25 Thread Caleb Hattingh
Unstable. Broadband hasn't exactly hit the local market, although things might be looking up in a few years or so. keep well Caleb -- http://mail.python.org/mailman/listinfo/python-list

Re: ConfigParser and multiple option names

2006-05-03 Thread Caleb Hattingh
creation. Caleb -- http://mail.python.org/mailman/listinfo/python-list

Re: Lambda alternative?

2009-04-15 Thread Caleb Hattingh
On Wed, 15 Apr 2009 15:47:05 +0200, wrote: But, lambda functions can't be pickled. I would like to pickle my objects, and i would really like to use parallel python (which requires pickling). If you are fixated on using lambda, you could probably use Recipe 7.6: Pickling Code Objects in the

Re: Is this possible in Python?

2006-03-13 Thread Caleb Hattingh
Hi I don't think this is what you want (a string representation of the argument passed to a function as that argument is at runtime is way beyond my abilities), but this can retrieve the literal text in the function call as it appears in the .py file, assuming you have the .py file available a

Re: Python IDE: great headache....

2006-03-13 Thread Caleb Hattingh
nning code in the IDE. Other than that, I now use SPE instead of Vim for python editing, which is a big step for me. SPE is quite slick; some ways to go, but certainly on the right track. The built-in code-completion is a godsend. Hope this helps Caleb Sullivan WxPyQtKinter wrote: > IDLE

Binary python extensions with Free Pascal Compiler

2006-03-16 Thread Caleb Hattingh
t seeing, I would be glad to hear it. Regards Caleb -- http://mail.python.org/mailman/listinfo/python-list

Re: Counting nested loop iterations

2006-03-16 Thread Caleb Hattingh
animal in zoo: a = animal anum = count count = count + 1 IS a kludge, when you have this available to you: for count, animal in enumerate(zoo): a = animal anum = count I won't say how long it took me to start using list comprehensions :) regards Caleb -- http://mail.py

Re: Binary python extensions with Free Pascal Compiler

2006-03-16 Thread Caleb Hattingh
Well, there it is: * Added support for Free Pascal Compiler (http://www.freepascal.org/) and Lazarus Project (http://www.lazarus.freepascal.org/) Thanks to Michiel du Toit ([EMAIL PROTECTED]) That was easy. I just saw the new support for D2k6 recently. thx Ravi Caleb -- http

Re: Python vs. Java gzip performance

2006-03-17 Thread Caleb Hattingh
I tried this: from timeit import * #Try readlines print Timer('import gzip;lines=gzip.GzipFile("gztest.txt.gz").readlines();[i+"1" for i in lines]').timeit(200) # This is one line # Try file object - uses buffering? print Timer('import gzip;[i+"1" for i in gzip.GzipFile("gztest.txt.gz")]').time

Re: Use of Python with GDAL. How to speed up ?

2006-03-17 Thread Caleb Hattingh
. Everyone loves small optimization exercises, and there be bots here who get the optimal solution on the first try. Though I would like to (seems an interesting application), I don't have time available to go through all your code now. Thanks Caleb -- http://mail.python.org/mailman/listinfo/p

Re: Python vs. Java gzip performance

2006-03-21 Thread Caleb Hattingh
wer than ".read().splitlines(True)"? To me, the "one obvious way to do it" is ".readlines()". Caleb -- http://mail.python.org/mailman/listinfo/python-list

Simple py script to calc folder sizes

2006-03-21 Thread Caleb Hattingh
return 1 elif a.count == b.count: return 0 else: return -1 foldersizeobjects.sort(cmpfunc) tot=0 for foldersize in foldersizeobjects: tot=tot+foldersize.count print foldersize print 'Total: %.2f MB'%(tot/1024./1024.) # End regards Caleb -- http://mail.python.org/mailman/listinfo/python-list

Re: New development windows, IronPython or PythonWin

2006-03-24 Thread Caleb Hattingh
l me with great expectations either, although it would be a good thing if they really supported it well. rgds Caleb -- http://mail.python.org/mailman/listinfo/python-list

Re: Multiplying sequences with floats

2006-03-24 Thread Caleb Hattingh
reason behind this, but I don't know it. regards Caleb -- http://mail.python.org/mailman/listinfo/python-list

Re: Simple py script to calc folder sizes

2006-03-28 Thread Caleb Hattingh
Thanks John I will use your code :) 30% improvement is not insignificant, and that's what I was looking for. I find the log function a little harder to read, but I guess that is a limitation of me, not your code. Caleb -- http://mail.python.org/mailman/listinfo/python-list

Re: Multiplying sequences with floats

2006-03-28 Thread Caleb Hattingh
saw this project on the daily freshmeat newsletter, and so will probably use that code instead. regards Caleb -- http://mail.python.org/mailman/listinfo/python-list

  1   2   >