Python bindings for RCS apps

2006-12-04 Thread [EMAIL PROTECTED]
There is pySVN for subversion but does other revision control system systems have some good python bindings/apis ? with good docs and some examples. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python bindings for RCS apps

2006-12-04 Thread [EMAIL PROTECTED]
I want some RCS for document management which could be controlled by python :) a bit like a wiki. -- http://mail.python.org/mailman/listinfo/python-list

Re: sending string or list to a function

2006-12-04 Thread [EMAIL PROTECTED]
Or, just always send the function a list. If you have one string, send it a list containing that one string. Cheers, -T -- http://mail.python.org/mailman/listinfo/python-list

Re: Async callback in python

2006-12-04 Thread [EMAIL PROTECTED]
Did you flush the buffer? It might be that the print statements are being called in the order you expect but that they are all written to the screen only at the end. I've had that happen before. Cheers, -T Linan wrote: > Hi, > > In javascript, code could be written like this: > > ... > > v

Re: how to invoke the shell command and then get the result in python

2006-12-05 Thread [EMAIL PROTECTED]
Fredrik Lundh wrote: > import os > for line in os.popen("grep pattern *.txt"): > print line, > > also see os.system and subprocess. > > note that if you want to write portable code, you can implement your own > "grep" using the "re" module: > Also, for a wrapper a

Re: how to invoke the shell command and then get the result in python

2006-12-05 Thread [EMAIL PROTECTED]
Nick Craig-Wood wrote: > > What if I entered "; rm -rf * ;" as my pattern? > Assuming the script isn't setuid, this would do no more damage than the user could do directly on the command line. I agree, when dealing with web applications or setuid programs, direct shell access isn't a good idea.

Re: Tkinter on Silicon Graphics machine?

2006-12-05 Thread [EMAIL PROTECTED]
David Lees wrote: > Does anyone have advice on installing Tkinter on s Silicon Graphics > machine (under IRIX 6, I think). The SysAdmin at work build Python 2.4.3 > for me on the SGI box, but it does not have Tkinter. Are there any > prebuilt distributions for SGI machines that include Tkinter? >

CVXOPT

2006-12-05 Thread [EMAIL PROTECTED]
Hi, I want to use CVXOPT for my optimization problem but I am not able to find a good tutorial for that. Can someone give me a good link or tell me some basic steps how to write a simple code for a problem like following: min c'x subject to: x'Ax=0 x'Bx=b Thanks Amit -- http://

Re: About the 79 character line recommendation

2006-12-06 Thread [EMAIL PROTECTED]
Olivier Langlois wrote: > There was a coding standard where I worked and the intention behind this > requirement was to make the code printer friendly. Printing code source > with lines longer than 80 chars greatly hinder readability on paper. > I don't think I've ever seen Python code printed out

Re: Getting started with the Python source

2006-12-06 Thread [EMAIL PROTECTED]
Actually IDLE was written purley in python, you can find the sources to it in... UNIX: /usr/lib/python/idlelib Windows: C:\Python\Lib\idlelib If you are looking to modifly mostly just the IDE I would start there, however if you are more interesting in modifying python Itself just look around in t

Re: how to get all the "variables" of a string formating?

2006-12-06 Thread [EMAIL PROTECTED]
"Is there an easy (i.e.: no regex) way to do get the names of all parameters? " ...regexp is the easy way :D GHUM wrote: > imagine: > > > template=""" Hello %(name)s, how are you %(action)s""" > > > we can use it to do things like: > > print template % dict (name="Guido", action="indenting") > >

Re: Am I stupid or is 'assert' broken in Python 2.5??

2006-12-06 Thread [EMAIL PROTECTED]
The reason why it won't raise the AssertionError is because the condition in the assert statement is a non-empty tuple, and its boolean value would be True, not False, which is required to raise an assertion error. antred wrote: > Yeah, it hit me seconds after I had posted my message. =0 Why didn'

Re: Getting started with the Python source

2006-12-06 Thread [EMAIL PROTECTED]
code for the Python interpreter, and what is the name of > the toplevel source code file for IDLE? Does that make sense? > > Thanks again. > > [EMAIL PROTECTED] wrote: > > Actually IDLE was written purley in python, you can find the sources to > > it in... > > >

Re: Mirror imaging binary numbers

2006-12-06 Thread [EMAIL PROTECTED]
Craig wrote: > Matimus wrote: > > > Craig wrote: > > > I'm trying to switch binary numbers around so that the MSB becomes the > > > LSB etc. > > > > What do you mean 'binary numbers'? They are all binary. If you mean the > > int type, they are 32 bits long and there are 16 bits between the MSB > >

how to delete matplotlib data between ploting

2006-12-07 Thread [EMAIL PROTECTED]
I want to make few plots from CSV files. I have the code below - it works - the first plot is ok, the second one has the first and the current data set and so on - I can't delete the plot data between plots. ## # -*- coding: utf-8 -*- from pylab import * fro

Re: How to create a global hotkey?

2006-12-07 Thread [EMAIL PROTECTED]
hon-xlib.sourceforge.net/ > - wxPython unter Windows: > http://wxpython.org/docs/api/wx.Window-class.html#RegisterHotKey > > regards, > Gerold > :-) > > -- > > Gerold Penz - bcom - Programmierung >

Re: how to delete matplotlib data between ploting

2006-12-07 Thread [EMAIL PROTECTED]
clf() works :) thanks -- http://mail.python.org/mailman/listinfo/python-list

Can't 'register' to Cheese Shop from command line..only web + egg dependency question

2006-12-07 Thread [EMAIL PROTECTED]
I seem to be able to register and upload from web site but not command line. Command line register attempts keep giving " Server response (401): Authorization Required" Any ideas? & What must I do to make installation of my egg also install dependencies? I did an install and noticed other eg

*** C.L.L README/FAQ *** (Was: merits of Lisp vs Python)

2006-12-08 Thread [EMAIL PROTECTED]
Sounds like it's time for: A Beginners' Meta FAQ for comp.lang.lisp: http://nostoc.stanford.edu/jeff/llisp/cllfaq.html The purpose of this page is to help those new to Lisp (aka. "newbies") gain some background before they enter the fray of comp.lang.lisp (c.l.l). This is not a complete Lisp F

Snake references just as ok as Monty Python jokes/references in python community? :)

2006-12-08 Thread [EMAIL PROTECTED]
I'm semi-seriously wondering if snake jokes are valid in the Python community since technically, Python came from Monty Python, not slithery animals. Problem is I don't know that anyone born after Elvis died gets any of these Monty Python jokes. Is it kosher to make snake jokes/references even th

Re: Snake references just as ok as Monty Python jokes/references in python community? :)

2006-12-08 Thread [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote: > I'm semi-seriously wondering if snake jokes are valid in the Python > community since technically, Python came from Monty Python, not > slithery animals. > > Problem is I don't know that anyone born after Elvis died gets any of > these M

Re: merits of Lisp vs Python

2006-12-08 Thread [EMAIL PROTECTED]
Okay, since everyone ignored the FAQ, I guess I can too... Mark Tarver wrote: > How do you compare Python to Lisp? What specific advantages do you > think that one has over the other? (Common) Lisp is the only industrial strength language with both pure compositionality and a real compiler. What

Re: merits of Lisp vs Python

2006-12-08 Thread [EMAIL PROTECTED]
> I heard it's scheduled right after strong AI and before time > travel... I think that time travel predated strong AI, although I'm not sure since it's a little hard to pin down the time coordinates of time travel (probably The Time Machine will do > A quick look at > http://www.tiobe.com/tpci.h

Re: merits of Lisp vs Python

2006-12-08 Thread [EMAIL PROTECTED]
Paul Rubin wrote: > "Mark Tarver" <[EMAIL PROTECTED]> writes: > > Thanks; a quick read of your reference to Norvig's analysis > > > > http://norvig.com/python-lisp.html > > > > seems to show that Python is a cut down (no macros) version of Li

Re: merits of Lisp vs Python

2006-12-08 Thread [EMAIL PROTECTED]
> ... you can't implement Python generators as Lisp macros in any reasonable > way. You could do them in Scheme using call-with-current-continuation > but Lisp doesn't have that. Well, okay, Scheme [same thing (to me), although I realize that they aren't, quite -- and CWCC is one place where they

Re: merits of Lisp vs Python

2006-12-08 Thread [EMAIL PROTECTED]
> Yeah, Lisp macros are Turing-complete and you could basically > implement a coroutine-supporting compiler out of macros and do all of > the above, but the target language wouldn't be Lisp any more. First off, it probably would be Lisp, but this is a mere issue of semantics. More importantly, eve

Re: merits of Lisp vs Python

2006-12-09 Thread [EMAIL PROTECTED]
Carl Banks wrote: > [EMAIL PROTECTED] wrote: > > Okay, since everyone ignored the FAQ, I guess I can too... > [snip] > > What Python has is stupid slogans > > ("It fits your brain." "Only one way to do things.") and an infinite > > community of

Re: merits of Lisp vs Python

2006-12-09 Thread [EMAIL PROTECTED]
Thankfully folks (including me) seem to be starting to cool off, so perhaps we can disucss this in somewhat calmer register. I think that Kenny unintentionally sold macros short by implying that they are merely window-dressing for boilerplate, and you seem to have a misunderstanding of macros, whic

Re: merits of Lisp vs Python

2006-12-11 Thread [EMAIL PROTECTED]
Bill Atkins wrote: > > On the plus side, Python makes less demands on the > > capabilities of the editor. All you really need > > is block-shifting commands. Bracket matching is > > handy for expressions but not vital, and you > > certainly don't need bracket-based auto-indenting. > > Oh, please.

Re: merits of Lisp vs Python

2006-12-11 Thread [EMAIL PROTECTED]
Kay Schluehr wrote: [Interesting and useful analysis of issues in language homogenization snipped.] > > You might even get a compiler out of the deal, at > > a pretty low cost, too! If you get macros, and get a compiler, I'm > > pretty sure that you will have no problem winning over the Lisp > >

Re: merits of Lisp vs Python

2006-12-11 Thread [EMAIL PROTECTED]
> > > Python has this unsung module called doctest that neatly shows some of > > > the strengths of python: http://en.wikipedia.org/wiki/Doctest > > Now I'm *certain* that you're just pulling my leg: You guys document > > all your random ten-line hacks in Wikipedia?!?! What a brilliant idea! >

Re: merits of Lisp vs Python

2006-12-11 Thread [EMAIL PROTECTED]
> Yes, but these are community symbols or tribe marks. They don't have > much meaning per se, just like the language name or a corporate > identity. Unfortunately, I don't believe that this is entirely correctI do lurk c.l.p and see quite often people arguing (if briefly) about what the one (a

Re: merits of Lisp vs Python

2006-12-11 Thread [EMAIL PROTECTED]
> So, how would I do that? For Python, that was simple. I learned the > basics, then moved to the libraries, learning as I went. We've already all agreed that Python has a much larger set of standard libraries than Lisp. You're right; This is an advantage that we all recognize, and would love to h

Can't register to CheeseShop at command line...only on web?!..

2006-12-11 Thread [EMAIL PROTECTED]
I created $HOME/.pypirc with this: [server-login] username:seberino password:SECRET but I can still only do CheeseShop tasks at web interface. Here is what happens when I try to register at command line with .pypirc above... Using PyPI login from /home/seb/.pypirc Server response (401): Authoriz

Re: merits of Lisp vs Python

2006-12-11 Thread [EMAIL PROTECTED]
greg wrote: > [EMAIL PROTECTED] wrote: > > So if you guys would just fix > > your language by adding homogeneous syntax and all that it brings with > > it (macros, compilers, etc) we'd be happy to use your version of Lisp, > > and all its great libraries, instea

namespace question

2006-12-11 Thread [EMAIL PROTECTED]
Hi , class Test: a = 1 b = 2 c = 1+2 Now, all a,b and c would be directly visible to the user from the instance of Test. I am looking for a way to make only c directly visible from the instance. -- Suresh -- http://mail.python.org/mailman/listinfo/python-list

Re: namespace question

2006-12-11 Thread [EMAIL PROTECTED]
Marc 'BlackJack' Rintsch wrote: > In <[EMAIL PROTECTED]>, > [EMAIL PROTECTED] wrote: > > > class Test: > >a = 1 > >b = 2 > >c = 1+2 > > > > Now, all a,b and c would be directly visible to the user from the > &g

Re: Can't register to CheeseShop at command line...only on web?!..

2006-12-12 Thread [EMAIL PROTECTED]
> > Here is what happens when I try to register at command line with > > .pypirc above... > > > > Using PyPI login from /home/seb/.pypirc > > Server response (401): Authorization Required > > Do you use a proxy to access the web? Not that I'm aware of unless my job uses one without my knowing abo

Forking in windows. Possible?

2006-12-12 Thread [EMAIL PROTECTED]
I know under mac/*nix it's possible to fork the proccess to the background and exit the parent process. I have used this on a couple of my projects, but right now I am working on a project that will be required to run in the background, I have considered using the .pyw extension on my files, but th

Re: Is anyone using Python for embedded applications?

2006-12-12 Thread [EMAIL PROTECTED]
Carl J. Van Arsdall wrote: > I'm aware of a couple python projects for embedded systems. I am > currently considering using Python on an embedded platform to develop a > simple application as a personal project, mostly to see if it will > work. I was wondering if anyone here was using python for

Re: merits of Lisp vs Python

2006-12-12 Thread [EMAIL PROTECTED]
Bjoern Schliessmann wrote: > Robert Uhl wrote: > > > Because it's the language for which indentation is automatically > > determinable. That is, one can copy/paste a chunk of code, hit a > > key and suddenly everything is nicely indented. > > Cool, so in other languages I need to set block marks

Re: merits of Lisp vs Python

2006-12-12 Thread [EMAIL PROTECTED]
Robert Uhl wrote: > "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > > I have the code here (probably not the latest bcs I left the company > > when it was acquired), let's do a little experiment, for what it's > > worth: 89727 lines of Lisp code in

Re: merits of Lisp vs Python

2006-12-12 Thread [EMAIL PROTECTED]
> greg <[EMAIL PROTECTED]> writes: > > >> A compiler shifts a lot of decisions that an > >> interpreter would have to make at runtime to compile-time. There is > >> no reason a dynamic language can't enjoy this efficiency. > > > > I'

Re: YouTube written in Python

2006-12-13 Thread [EMAIL PROTECTED]
Leif K-Brooks wrote: > Terry Reedy wrote: > > In a thread on the PyDev list, Guido van Rossum today wrote: > >> And I just found out (after everyone else probably :-) that YouTube is > >> almost entirely written in Python. (And now I can rub shoulders with > >> the developers since they're all Goo

Re: YouTube written in Python

2006-12-13 Thread [EMAIL PROTECTED]
Leif K-Brooks wrote: > Terry Reedy wrote: > > In a thread on the PyDev list, Guido van Rossum today wrote: > >> And I just found out (after everyone else probably :-) that YouTube is > >> almost entirely written in Python. (And now I can rub shoulders with > >> the developers since they're all Goo

Re: Conditional iteration

2006-12-13 Thread [EMAIL PROTECTED]
The proposed solution impairs readability because there's a "surprise" at the end. List comprehensions already open the language up to readability abuse. Lets not add more. To avoid the unwanted indentation, I would go with the already suggested "if not x>0: continue" solution or else something

Re: merits of Lisp vs Python

2006-12-14 Thread [EMAIL PROTECTED]
Neil Cerutti wrote: > On 2006-12-13, [EMAIL PROTECTED] > <[EMAIL PROTECTED]> wrote: > > Try reading again. In Lisp, you use () and *your editor* > > automatically indents according to the universal standard, or > > you leave it sloppy until other folks reading your

Re: merits of Lisp vs Python

2006-12-14 Thread [EMAIL PROTECTED]
Christophe wrote: > [EMAIL PROTECTED] a écrit : > > Bjoern Schliessmann wrote: > >> Robert Uhl wrote: > >> > >>> Because it's the language for which indentation is automatically > >>> determinable. That is, one can copy/paste a chunk of

Re: merits of Lisp vs Python

2006-12-14 Thread [EMAIL PROTECTED]
Neil Cerutti wrote: > On 2006-12-14, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > > Neil Cerutti wrote: > >> On 2006-12-13, [EMAIL PROTECTED] > >> <[EMAIL PROTECTED]> wrote: > >> > Expressions keep the same meaning even if

Multiple inheritance and __slots__

2006-12-14 Thread [EMAIL PROTECTED]
Hi all, >From the google search, it seems its not possible to do the following. >>> class Test1(object): ... __slots__ = ['a'] ... >>> class Test2(object): ... __slots__ = ['b'] ... >>> class Test3(Test1,Test2): ... __slots__ = ['c'] ... Traceback (most recent call last): File "", li

Re: Multiple inheritance and __slots__

2006-12-14 Thread [EMAIL PROTECTED]
Simon Brunning wrote: > On 14 Dec 2006 05:23:33 -0800, [EMAIL PROTECTED] > <[EMAIL PROTECTED]> wrote: > > Hi all, > > >From the google search, it seems its not possible to do the following. > > > > >>> class Test1(object): > > ...

FYI: Pythons Were the Oldest Gods

2006-12-14 Thread [EMAIL PROTECTED]
http://scienceblogs.com/insolence/2006/12/pythons_were_the_oldest_gods.php -- Doug Fort, Consulting Programmer http://www.dougfort.com -- http://mail.python.org/mailman/listinfo/python-list

Wrapping classes with pure virtual functions

2006-12-14 Thread [EMAIL PROTECTED]
Hi, I'm having problems wrapping a hierarchy of classes, actually having problems wrapping the base class. I don't need to use the WrapClass mechanism since I don't want to override classes in Python. My code boils down to: class Base { public: virtual ~Base() {} virtual v

distutils - rpm

2006-12-15 Thread [EMAIL PROTECTED]
When I try to create an rpm using distutils, I get an error like this: error: Installed (but unpackaged) file(s) found: /usr/share/games/pychess/sidepanel/bookPanel.pyc /usr/share/games/pychess/sidepanel/bookPanel.pyo ... I found this solution http://www.mail-archive.com/distutils-sig@pyt

catching exceptions

2006-12-16 Thread [EMAIL PROTECTED]
Hi, In the following program, I have a class Test which has a property x. Its setx function gets a string value and converts it into a float and stores into it. class Test(object): def _getx(self): return self._x def _setx(self,strvalue): try: self._x = float(st

Re: catching exceptions

2006-12-16 Thread [EMAIL PROTECTED]
Steven D'Aprano wrote: > On Sat, 16 Dec 2006 03:54:52 -0800, [EMAIL PROTECTED] wrote: > > > Hi, In the following program, I have a class Test which has a property > > x. Its setx function gets a string value and converts it into a float > > and stores into it. >

Why there isn't a sort method for array ?

2006-12-17 Thread [EMAIL PROTECTED]
Hi, It seems that an array acts like an list very much, except it doesn't have a method sort. Regards, -- http://mail.python.org/mailman/listinfo/python-list

Re: Wrapping classes with pure virtual functions

2006-12-17 Thread [EMAIL PROTECTED]
Chris Lambacher wrote: > On Thu, Dec 14, 2006 at 01:57:10PM -0800, [EMAIL PROTECTED] wrote: > > Hi, > > I'm having problems wrapping a hierarchy of classes, actually having > > problems wrapping the base class. I don't need to use the WrapClass > > mechanism s

Re: Is there a way to push data into Ical from Python ?

2006-12-17 Thread [EMAIL PROTECTED]
You might find this useful: http://doughellmann.blogspot.com/2006/12/mailbox2ics.html The Night Blogger wrote: > Is there a way to pull & push data into (Apple Mac OS X Calendar) Ical from > Python ? -- http://mail.python.org/mailman/listinfo/python-list

Re: Good Looking UI for a stand alone application

2006-12-17 Thread [EMAIL PROTECTED]
lt;[EMAIL PROTECTED]> wrote: > >They use QT. Back to read the first part of your post. > > It doesn't make much difference: > - QT is big, so even small apps carry a lot of baggage > - by not using the native widgets, you're dependent on that layer to > keep up with cha

Re: trees

2006-12-17 Thread [EMAIL PROTECTED]
You could use ElementTree for XML. Or just use nested dictionaries. -T John Nagle wrote: > Delaney, Timothy (Tim) wrote: > > vertigo wrote: > > > > > >>Hello > >> > >>What library/functions/classes could i use to create trees ? > > SpeedTree, of course. > > http://www.speedtree.com > >

python-hosting.com projects: dead?

2006-12-18 Thread [EMAIL PROTECTED]
It looks to me like python hosting, aka webfaction, have shut down access to all projects hosted under their free hosting for open source python projects program. Including mine (nose). With no notice -- at least none that I received. Surprised doesn't quite cover it. Perhaps someone from python h

Re: python-hosting.com projects: dead?

2006-12-18 Thread [EMAIL PROTECTED]
Carl Banks wrote: > [EMAIL PROTECTED] wrote: > > It looks to me like python hosting, aka webfaction, have shut down > > access to all projects hosted under their free hosting for open source > > python projects program. Including mine (nose). With no notice -- at > >

Re: Is there any python-twisted tutorial or texts?

2006-12-18 Thread [EMAIL PROTECTED]
The doc in the twisted web site is a good starting point. Also there is a book . Jia Lu wrote: > Hi all > I want to study twisted of python . But I donot know how to start. > Any suggistions? > > Thank you -- http://mail.python.org/mailman/listinfo/python-list

Re: python-hosting.com projects: dead?

2006-12-19 Thread [EMAIL PROTECTED]
Fredrik Lundh wrote: > have you tried mailing webfaction instead of ranting on the usenet? I did. I didn't get a reply within minutes (indeed not until this morning), so I posted a public message to try to find out if anyone knew what was going on -- and also to warn other people whose projects m

Re: python-hosting.com projects: dead?

2006-12-19 Thread [EMAIL PROTECTED]
Fredrik Lundh wrote: > [EMAIL PROTECTED] wrote: > > > my svn repository and tickets again. I'm sure you can understand why I > > was dismayed by this and why, unfortunately, I'll never be comfortable > > trusting my data to them again. > > not really, but m

Re: merits of Lisp vs Python

2006-12-20 Thread [EMAIL PROTECTED]
Anders J. Munch wrote: > jayessay wrote: > > Please note: GC is not part of CL's definition. It is likely not part > > of any Lisp's definition (for reasons that should be obvious), and for > > the same reasons likely not part of any language's definition. > > Really? So how do you write a por

new Python-Ideas mailing list

2006-12-20 Thread [EMAIL PROTECTED]
At Guido's suggestion, a new mailing list has been created named Python-Ideas (http://mail.python.org/mailman/listinfo/python-ideas). This list is meant as a place for speculative, pie-in-the-sky language design ideas to be discussed and honed to the point of practically being a PEP before being pr

[email protected]

2006-12-21 Thread [EMAIL PROTECTED]
I have a lot of functions returning "const std::string&". Every time I wrap one of those I have to do it like this: class_.def("name", &someclass::bla, boost::python::return_value_policy() ); Is there a way to register a return value conversion for "const std::string&" so I can omit it every time

Re: I am taking a programming performance match!

2006-12-21 Thread [EMAIL PROTECTED]
I'm sure it could do the job, but if the sole function is to be an IO relay, I would use a lower level language like C. Cheers, -T 一首诗 wrote: > Hi all, > > The question is like this: > > = > > One computer, 2 ethernet adapter. Receving UDP packages and send them > out th

Problem in using Pulp

2006-12-21 Thread [EMAIL PROTECTED]
Hi, I am trying to run the following example which uses PULP for linear optimization. But I am getting this error in the last line: "EOL while scanning single quoted string". Can anyone help me with this? thanks Amit --Code from pulp imp

Re: Problem in using Pulp

2006-12-21 Thread [EMAIL PROTECTED]
+= x+z >= 10 prob += -y+z == 7 GLPK("C:\Documents and Settings\Amit\Desktop\glpk-4.9\glpk-4.9\examples\"").solve(prob) -- Robert Kern wrote: > [EMAIL PROTECTED] wrote: > > Hi, > > I am t

Re: Using Tools/freeze.py on AIX -- having problems

2006-12-22 Thread [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote: > > Python seems to install correctly for the most part ("make test" gives > a few messages about things that are not quite right (3 failed tests > (test_mmap, test_pty, & test_resource) and 2 unexpectedly skipped Don'

Re: are there Tomboy and F-Spot equivalents?

2006-12-22 Thread [EMAIL PROTECTED]
On Dec 22, 4:01 am, "Tshepang Lekhonkhobe" <[EMAIL PROTECTED]> wrote: > Hi, > I dislike installing the entire Mono stack simply to take notes and > manage photos, and am totally biased towards Python. At least for > search I got Tracker, instead of Beagle. > Are th

Re: Why does Python never add itself to the Windows path?

2006-12-24 Thread [EMAIL PROTECTED]
I don't seem to have any problem running python programs regardless of where they are. My platform is windows xp and I have run both 2.4 and 2.5 more details about what version of windows you are running might be helpfull https://sourceforge.net/project/showfiles.php?group_id=156455&package_id=17

Re: regular expression

2006-12-25 Thread [EMAIL PROTECTED]
Rad [Visual C# MVP] wrote: > On Sun, 24 Dec 2006 16:36:31 +0100, Stef Mientki wrote: > > > Dustan wrote: > >> Kleine Aap wrote: > >>> Asper Faner wrote: > >>> > I seem to always have hard time understaing how this regular expression > works, especially how on earth do people bring it up

How to depress the output of an external module ?

2006-12-25 Thread [EMAIL PROTECTED]
Hi, I'm writing a program which imports an external module writing in C and calls a function provided by the module to do my job. But the method produces a lot of output to the stdout, and this consumes most of the running time. My question is, is there a way to depress the output produced by th

Re: How to depress the output of an external module ?

2006-12-26 Thread [EMAIL PROTECTED]
Steven D'Aprano wrote: > Try something like this: > > # WARNING: untested > def run_without_stdout(*args, **kwargs): > function = args[0] > args = args[1:] > savestdout = sys.stdout > sys.stdout = cStringIO.StringIO() > result = None > try: > result = function(*args,

Re: How to depress the output of an external module ?

2006-12-26 Thread [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote: > > I have tried your method, but I found it didn't work as expected. > > The output produced by the external function couldn't be depressed, > but the "print " statement i wrote in python is depressed. It seems > make cStringIO.St

keypressed() function

2006-12-26 Thread [EMAIL PROTECTED]
I need a function (blocking or non-blocking) that tells me if a key has been pressed (even before it has been released etc.). Also, I would of course like to know _which_ key has been pressed. I know that this probably does not exist in the Python library already as a platform-independant abstract

Re: perl better than python for users with disabilities?

2006-12-26 Thread [EMAIL PROTECTED]
Dan Jacobson wrote: > Can I feel even better about using perl vs. python, as apparently > python's dependence of formatting, indentation, etc. vs. perl's > "(){};" etc. makes writing python programs perhaps very device > dependent. Whereas perl can be written on a tiny tiny screen, and can > withst

Re: Newbie: what is a usefull IDE for Python on Windows ?

2006-12-26 Thread [EMAIL PROTECTED]
Osiris wrote: > what is a usefull IDE for Python on Windows ? The Zeus IDE: http://www.zeusedit.com/python.html Jussi -- http://mail.python.org/mailman/listinfo/python-list

Re: How to depress the output of an external module ?

2006-12-27 Thread [EMAIL PROTECTED]
Carl Banks wrote: > Carl Banks wrote: > >> [EMAIL PROTECTED] wrote: >> >>> After some trials I found that put "os.close(1)" before calling the >>> function will depress the output. In fact, "os.close(1)" closed >>> standard o

Re: Persistent variables in python

2006-12-27 Thread [EMAIL PROTECTED]
> That's a matter of taste. Try replacing the try...except block with > hasattr: > > def doStuff(): > if hasattr(doStuff, timesUsed): > doStuff.timesUsed += 1 > else: > doStuff.timesUsed = 1 > do_common_code > Ok, it is a matter of taste and I prefer the try/except way

Re: Unexpected output while walking dirs

2006-12-28 Thread [EMAIL PROTECTED]
On Dec 28, 10:25 am, Evan Carmi <[EMAIL PROTECTED]> wrote: > hi, > > i am creating a program to go through a directory structure recursively > (including directories below it) and move all files that end in .msf to > a directory above the current level. > > the code

Re: I want to see all the variables

2006-12-29 Thread [EMAIL PROTECTED]
etitem__', '__module__'] On Dec 29, 12:35 pm, johnf <[EMAIL PROTECTED]> wrote: > Hi, > When I use dir() I don't see the __ underscore items. Is there anything > that will show all the private vars and functions? > > johnf -- http://mail.python.org/mailman/listinfo/python-list

Re: I want to see all the variables

2006-12-29 Thread [EMAIL PROTECTED]
On Dec 29, 5:17 pm, Steven D'Aprano <[EMAIL PROTECTED]> wrote: > On Fri, 29 Dec 2006 07:57:30 -0800, [EMAIL PROTECTED] wrote: > > What do you mean? Can you specify which special functions you don't > > see? > > I get: > > py> class X: > >

Re: Easiest way to print from XP/DOS.

2006-12-30 Thread [EMAIL PROTECTED]
> up an xp machine for one client. > > > jim-on-linux > > > > > On Saturday 30 December 2006 03:05, Tim Roberts > wrote: > > jim-on-linux <[EMAIL PROTECTED]> wrote: > > >Did you run from a file or type in from > > > keyboard? > >

looking for a better way to call a file.

2006-12-30 Thread [EMAIL PROTECTED]
I have been auto-generating .bat files and then running os.startfile('whatever.bat'). I don't seem to be having much luck when I try other methods. All of a sudden I am stuck in a situation where I need the program that is calling to end and a new program to start (because otherwise I get several

Missing erf()

2006-12-31 Thread [EMAIL PROTECTED]
Is there a reason why erf() is not included in the math package? According to the following URL it looks like it has been standard C since 1999. http://www.opengroup.org/onlinepubs/95399/functions/erf.html -- http://mail.python.org/mailman/listinfo/python-list

Re: looking for a better way to call a file.

2006-12-31 Thread [EMAIL PROTECTED]
Thanks I will give that a try.. should clean up my code quite a bit. James Thiele wrote: > This probably will meet your needs: > > import os > os.system("csound play.orc play.sco") > > If you need more control try the subprocess module. > > [EMAIL PROT

Re: Python embedded interpreter: how to initialize the interpreter ?

2007-01-02 Thread [EMAIL PROTECTED]
> >the interpreter emits an error: tkinter module not defined Capitalize the 't', in Tkinter, its case sensitive. -- http://mail.python.org/mailman/listinfo/python-list

Re: Synchronization methodology

2007-01-03 Thread [EMAIL PROTECTED]
Chris Ashurst wrote: > Hi, I'm coming in from a despised Java background Consider strongly the fact that Python supports multiple process solutions well, so you're not stuck having to use multithreaded solutions in every circumstance (but can still use them when necessary). -- http://mail.python

When argparse will be in the python standard installation

2007-01-03 Thread [EMAIL PROTECTED]
Hi, I feel argparse has some useful things that optparse doesn't have. But I can't find it argparse in python library reference. I'm wondering when it will be available in the python standard installation. Thanks, Peng -- http://mail.python.org/mailman/listinfo/python-list

M. Hammonds python panel

2007-01-03 Thread [EMAIL PROTECTED]
Hello all I am a great fan of Mark Hammonds python pannel. But since starship went down it didn't come up again ...with the link in my favs to http://starship.python.net/crew/mhammond/mozilla/pythonpanel.xul still pointing nowhere. Maybe Mark is around here somewhere... Jürgen -- http://mail.p

Re: How do I add users using Python scripts on a Linux machine

2007-01-03 Thread [EMAIL PROTECTED]
I find that I can often live with a 0-60 sec. pause. and set command in a queue like then have a cron that runs once a min as the user you need to run this on that looks at the queue and sees if there are any pending I often use a sql database for this -- http://mail.python.org/mailman/listinfo

Undefined symbol __pure_virtual when importing MySQLdb

2007-01-04 Thread [EMAIL PROTECTED]
l: __pure_virtual By the way, mysql (5.0.27-standard)is running OK on the Mandrake system. Look: [EMAIL PROTECTED] antonyliu]$ mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 13 to server version: 5.0.27-standard Type '

Re: Undefined symbol __pure_virtual when importing MySQLdb

2007-01-04 Thread [EMAIL PROTECTED]
Fredrik Lundh wrote: > [EMAIL PROTECTED] wrote: > > > I have googled hard, and did see someone asking the same question, but > > haven't found a good solution to this problem. Could anyone give me a > > hint? Thanks a lot! > > googling for "undefined symbo

Encoding / decoding strings

2007-01-05 Thread [EMAIL PROTECTED]
Hey Everyone, Was just wondering if anyone here could help me. I want to encode (and subsequently decode) email addresses to use in URLs. I believe that this can be done using MD5. I can find documentation for encoding the strings, but not decoding them. What should I do to encode =and= decode st

Re: How to get file name on a remote server with ftplib?

2007-01-05 Thread [EMAIL PROTECTED]
alex wrote: > Hello, > > My script is trying to get a file from a remote server, every day it > ftps from a directory. My code works perfect if I know the name of the > file in the remote directory. > > ftp.retrbinary('RETR ' + filename, handleDownload) > > The problem is that in the future the na

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