Re: Writing an immutable object in python

2005-10-17 Thread Diez B. Roggisch
> The change in the poision occurs becouse int() is an immutable object. > > if I will do the same with a user-defined object, This reference > manipulating will not happen. So, every entry in the array will refer > to the same instance. > > Is there a way to bypass it (or perhaps to write a self

Re: Installing Python at Work

2005-10-17 Thread Diez B. Roggisch
Nikola wrote: > I'm currently learning Python for my own use. > I'm considering installing it on a work laptop, knowing that it is > non-licensed, distributable software. Here comes a little bit nitpicking: Python is not "non-licensed" - it has a license, which makes it available for you free and

Re: ordered keywords?

2005-10-17 Thread Diez B. Roggisch
Ron Adam wrote: > > Is there a way to preserve or capture the order which keywords are given? > > >>> def foo(**kwds): > ...print kwds > ... > >>> foo(one=1, two=2, three=3) > {'three': 3, 'two': 2, 'one': 1} > > > I would love to reverse the *args, and **kwds as well so I can use kwds

Re: Repost: Text not showing up

2005-10-17 Thread Diez B. Roggisch
>> Hi all, I am new to python and trying to write a simple GUI that would >> call 2 growisofs processes (dvd burning) at the same time, and retrive >> the exit code to be printed on a text box (couldn't find any program >> that could use multiple dvd burners, not even k3b). Excuse me if this >>

Re: Repost: Text not showing up

2005-10-17 Thread Diez B. Roggisch
> The problem is that the changes take effect after gtk has reentered its > event-loop. Which won't happen until your programs terminate. With programs I mean of course the burning commandos. Diez -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP: Adding decorators for everything

2005-10-18 Thread Diez B. Roggisch
riable, not a instance variable. So - I'm not very much in favour of these enhancements. > It would also be better if multiple decorators could be written on the > same line. E.g.: > @A @B(x, y) @C > def foo(): ... That one I like. Diez -- http://mail.python.org/mailman/listinfo/python-list

Re: A little help with time calculations

2005-10-18 Thread Diez B. Roggisch
iminal wrote: > I am trying to make a very simple program and am very new to the whole > programming thing. my program is supposed to ask a user for any time in > the for format XX:XX:XX and then ask for a time corrrection to add or > subtract to this. my only problem is that once the user inputs t

Re: New Website

2005-10-20 Thread Diez B. Roggisch
I get a 404 - as Linux and MacOs-User, I'm pretty ignorant of Viruses/Malware. So, I'm not sure but I think it's possible that this site is spreading such malicious content. -- http://mail.python.org/mailman/listinfo/python-list

Re: A macro editor

2005-10-20 Thread Diez B. Roggisch
> My teammates and I were talking about to use one of Python, Ruby or > Groovy. But, we haven't decided which to use. > > What seems to be easier is to use Python, you know.. because of the > Jython thing. But, it is probably a mistake to take Jython without a > extensive analysis of the all po

Re: Set operations for lists: pythonic hints please!

2005-10-20 Thread Diez B. Roggisch
[EMAIL PROTECTED] wrote: > Working with several thousand tagged items on a Tkinter Canvas, I want > to change different configurations of objects having a certain group of > tags. > > I've used the sets module, on the tuple returned by Tkinter.Canvas. > find_withtag() method. > > Since this metho

Re: Execute C code through Python

2005-10-20 Thread Diez B. Roggisch
Ernesto wrote: > What's the easiest and quickest way to execute a compiled C "command > line interface" program THROUGH Python? I don't know what you mean by THROUGH. But the subprocess, popen2 and os-modules deal with calling other programs. Try them in that order. Diez -- http://mail.python.o

Re: KeyboardInterrupt vs extension written in C

2005-10-20 Thread Diez B. Roggisch
Tamas Nepusz wrote: > Hi everyone, > > I have tried to do some googling before asking my question here, but I > haven't found any suitable answer. I am developing a Python API for a > graph library written in pure C. The library is doing an awful lot of > math computations, and some of them can ta

Re: Python variables are bound to types when used?

2005-10-21 Thread Diez B. Roggisch
ou cannot change the type. > > > Especially what's going on here: > > >>>>class a(object): > > ... pass > ... > >>>>class b(a): > > ... pass > ... > >>>>x=b() >>>>x.attr=1 >>>>type(x) &

Re: PID and/or handle assistance. . .?

2005-10-22 Thread Diez B. Roggisch
Michael Williams wrote: > Hi All, > > Can anyone explain how to both spawn processes from PYTHON and acquire > their process IDs or a handle to them for use later? I'd also like to > acquire the stdout of each spawned process. Google dead today? Well, check out the modules subprocess, popen2

Re: Python/Apache Oddness On OSX

2005-10-24 Thread Diez B. Roggisch
John Abel wrote: > Hi, > > I'm running Python 2.3.5/2.4.2 on OSX 10.4.2, and am trying to run CGI > scripts using the builtin Apache. For ease, I've symlinked my custom > modules into the /Library/Python/2.3/site-packages directory, and they > import OK via command line python. However, when

Re: Newbie question: string replace

2005-10-25 Thread Diez B. Roggisch
[EMAIL PROTECTED] wrote: > I have a config file with the following contents: > service A = { > params { > dir = "c:\test", > username = "test", > password = "test" > } > } > > I want to find username and replace the value with another value. I > don't know what the username value i

Re: Windows vs Linux [was: p2exe using wine/cxoffice]

2005-10-26 Thread Diez B. Roggisch
> Thanks to both of you. But that much I already knew. It's not > that I have *no* knowledge about readline: I did at least > read the manuals when I got stuck! But as far as I can tell > from my experience and from the docs -- and I'm not near a > Linux box at the mo -- having used ctrl-r to reca

Weekly Python Patch/Bug Summary

2005-10-27 Thread Kurt B. Kaiser
Patch / Bug Summary ___ Patches : 360 open (+16) / 2956 closed ( +1) / 3316 total (+17) Bugs: 893 open (+10) / 5353 closed (+12) / 6246 total (+22) RFE : 199 open ( -2) / 189 closed ( +2) / 388 total ( +0) New / Reopened Patches __ Patch for

Re: How do I sort these?

2005-10-28 Thread Diez B. Roggisch
KraftDiner wrote: > I have two lists. > I want to sort by a value in the first list and have the second list > sorted as well... Any suggestions on how I should/could do this? I guess you mean that you have two lists of same size where each index position pointing to corrsponding items - like two

Re: How do I sort these?

2005-10-29 Thread Diez B. Roggisch
KraftDiner wrote: > unzip doesn't seem to work for me... Mrmpf, my bad. The operation is called unzip, but implpemented by using zip - so unzip(l) == zip(*l) So the exchange unzip with zip in my example. Diez -- http://mail.python.org/mailman/listinfo/python-list

Re: Recursive generators and backtracking search

2005-10-30 Thread Diez B. Roggisch
>>for pos in qsearch( pos ): >> yield pos > Um - do you really want to reuse the variable pos here? Yeah, it > works, but this strikes me as very confusing. I'm not sure that it > might not be implementation dependent. Certainly not. pos is - and that

Re: cx_Oracle, is anything selected?

2005-10-31 Thread Diez B. Roggisch
Damjan wrote: > Is there a way to see if the SELECT in cx_Oracle didn't return anything? > I want to optimize the situation when the number of selected rows is zero. > Is select count(*) the only option, seems inefficient? I don't understand your problem - if your select doesn't return anything,

Re: cx_Oracle, is anything selected?

2005-11-01 Thread Diez B. Roggisch
> > I don't understand your problem - if your select doesn't return > > anything, the fetch* methods on the cursor will tell you if there is any > > data to expect at all. Additionally there is teh rowcount-property that > > holds the number of rows the last execute* yielded. > > This is a simplif

Re: python, mssql and unicode

2005-11-03 Thread Diez B. Roggisch
in - at least with oracle that's possible. Regards, Diez B. Roggisch -- http://mail.python.org/mailman/listinfo/python-list

Re: control webbrowser remotely?

2005-11-05 Thread Diez B. Roggisch
Martin Bless wrote: > Web browsers like Firefox have really cool abilities nowadays. Objects > in the current document can be addressed and manipulated by > Javascript. Not very comfortable and not easy to debug. > > Q: Is there a way to reach objects in the document from Python? > That would be c

Re: Python gui

2005-11-05 Thread Diez B. Roggisch
Philippe C. Martin wrote: > Hi, > > Is wxWidget now part of python ? or will it be ? 1) No. 2) I guess no. Because it has pretty heavy dependencies (wx, GTK/other toolkit) Tkinter is what comes ou of the box - and thats it. Regards, Diez -- http://mail.python.org/mailman/listinfo/python-lis

Re: Instead of obsessing over the library *reference*, why not use other documentation?

2005-11-06 Thread Diez B. Roggisch
> People are linking to Xah??? Or he is google-bombing? I guess /F meant the results on google that show this very NG/ML. Diez -- http://mail.python.org/mailman/listinfo/python-list

Re: Learning multiple languages (question for general discussion)

2005-11-06 Thread Diez B. Roggisch
> Do you have any opinion of "Types and Programming Languages" by > Pierce? Autrijus Tang (the guy who started PUGS, the Perl 6 > implementation in Haskell) raves about it in an interview, and another > guy I know recommended it too, but I haven't actually looked at a copy > yet (stores I've looke

Re: Learning multiple languages (question for general discussion)

2005-11-06 Thread Diez B. Roggisch
Paul Rubin wrote: > "Diez B. Roggisch" <[EMAIL PROTECTED]> writes: > >>It's a great book - I cetainly owe it the better part of my thesis >>about multi level specification for functional languages. If you want >>to understand type-systems, its a gre

Re: Validate string as UTF-8?

2005-11-06 Thread Diez B. Roggisch
Tony Nelson wrote: > I'd like to have a fast way to validate large amounts of string data as > being UTF-8. > > I don't see a fast way to do it in Python, though: > > unicode(s,'utf-8').encode('utf-8) > > seems to notice at least some of the time (the unicode() part works but > the encode(

Re: UnicodeEncodeError: 'ascii' codec can't encode character u'\xe1' in position 99: ordinal not in range(128)

2005-11-06 Thread Diez B. Roggisch
> I would've thought that the 'b' option meant I can write any binary > code I like to the file, > but that's not so? You can. But if you write a unicode-object (wich is an abstract data type with no byte representation), it has to be converted to a string - which y

Re: mod_python

2005-11-06 Thread Diez B. Roggisch
> I hate to ask, but what happens when I enter "a, b, c);DROP DATABASE;" as > the entry for z_name? (Or some similar attempt to close the > SQL statement and start a new one). I think you want to google for "SQL > injection" and think about sanitising user input a

Re: Python and PL/SQL

2005-11-07 Thread Diez B. Roggisch
vb_bv wrote: > Thanks for your answers. > I would like to document with Python PL/SQL of programs, so similarly > as javadoc for Java. > I do not know whether it is possible. If yes, I would like to know how. Is it possible - yes. Has it been done? I doubt it. You can fetch the sourcecode of ora

Weekly Python Patch/Bug Summary

2005-11-07 Thread Kurt B. Kaiser
Patch / Bug Summary ___ Patches : 365 open ( +5) / 2961 closed ( +5) / 3326 total (+10) Bugs: 904 open (+11) / 5367 closed (+14) / 6271 total (+25) RFE : 200 open ( +1) / 189 closed ( +0) / 389 total ( +1) New / Reopened Patches __ new funct

Re: Cursor Position.

2005-11-09 Thread Diez B. Roggisch
Samantha wrote: > I will be using Tkinter. All I need is a way to get the X,Y position from a > mouse click. I am trying to have an image loaded to click on, but that seems > to be a problem. So if I can just get the position from the screen of a > graphics program, showing an image, it will wor

Re: cx_Oracle callproc output parameters

2005-11-09 Thread Diez B. Roggisch
infidel wrote: > I have a stored procedure that has a single output parameter. Why do I > have to pass it a string big enough to hold the value it is to receive? > Why can't I pass an empty string or None? > > import cx_Oracle as oracle connection = oracle.connect('usr/[EMAIL PROTECTED]

Re: Installing Tkinter on knoppix

2005-11-09 Thread Diez B. Roggisch
Jon Monteleone wrote: > Greetings, > Does anybody have a website where I can download a copy of Tkinter to install > onto > knoppix? > Is it a pretty straightforward install? Knoppix is debian-based - you can use apt-get. But installing on a CD is impossible - do you want to alter the packages t

Re: Is it a bug?

2005-11-09 Thread Diez B. Roggisch
Darren Cui Liang wrote: > Hi, there! > > Now I am working around with the "logging" module. Here is the code: > > > >>> import logging > >>> log1=logging.getLogger("a") > >>> log1.critical("msg") > No handlers could be found for logger "a" > >>> logging.critical("msg") > CRITICAL:root:msg >

Re: cx_Oracle callproc output parameters

2005-11-09 Thread Diez B. Roggisch
Gerhard Häring wrote: > You have to use variable objects to the callproc() that will hold the > output values. This is an example using three VARCHAR output parameters. Oh boy, one never stops learning... I still thing a single in-out-value is crying for a function - but in case of several parame

Re: Wrapping C functions in Pyrex and distutils problem

2005-11-09 Thread Diez B. Roggisch
Use additional_objects: LINKBASE = "link-4.1b" setup( name = "LinkWrapper", ext_modules = [ Extension("link", ["link.pyx"], include_dirs = ["%s/include" % LINKBASE], extra_objects = glob.glob("%s/obj/*" % LINKBASE), ) ], cmdclass

Re: Cursor Position.

2005-11-09 Thread Diez B. Roggisch
> That is my exact problem. I want to have the mouse event captured from > another application window. In this case an image window opened in Paint > Shop Pro that by the way uses Python to make scripts. I would like to be > able to click on the image and get the X,Y positions. I have been able

Re: passing values from one form to another

2005-11-12 Thread Diez B. Roggisch
[EMAIL PROTECTED] wrote: > hi > > i have 3 python cgi scripts created, one is a login page(login.py), > another is the main page(main.py) with a lot of user inputs and the > last one is a python cgi script results.py to process main.py > > In main.py, i am able to check for the value of the user

Re: about python ide

2005-11-13 Thread Diez B. Roggisch
赵光 wrote: > i am use python2.4.2 on my gentoo linux system > i want to find some ide of python > but i am using gtk2.8,wxPython has some bug on it.i cant emerge it correctly. > i want some ide use pygtk or other lib of python gui except > wxpython(wxWidgets) Take astab at eric3. Uses Qt + PyQt

Re: Making a persistent HTTP connection

2005-11-14 Thread Diez B. Roggisch
David Rasmussen wrote: > I use urllib2 to do some simple HTTP communication with a web server. In > one "session", I do maybe 10-15 requests. It seems that urllib2 opens op > a connection every time I do a request. Can I somehow make it use _one_ > persistent connection where I can do multiple G

Re: Inheritance in nested classes

2005-11-15 Thread Diez B. Roggisch
Martin Skou wrote: > I'm experimenting with using Python for a small web interface, using > Mark Hammond's nice win32 extensions. > > I use a small class hierarchy which uses inheritance and nested classes. > > Here are a small extract of the code: > > class page: > > def __init__(s

Re: Current execution frame of another thread?

2005-11-17 Thread Diez B. Roggisch
[EMAIL PROTECTED] wrote: > I would like to try a sampling approach to profiling. My thought is to have > a profiling thread that samples the execution frame of all the other > started threads. I don't see any path from the threads returned by > threading.enumerate() to their current frames. Am I

Re: Current execution frame of another thread?

2005-11-17 Thread Diez B. Roggisch
[EMAIL PROTECTED] wrote: > I would like to try a sampling approach to profiling. My thought is to have > a profiling thread that samples the execution frame of all the other > started threads. I don't see any path from the threads returned by > threading.enumerate() to their current frames. Am I

Re: Confused about namespaces

2005-11-18 Thread Diez B. Roggisch
> Am I understanding correctly that if you have a module foo importing wx > and a module main importing both foo and wx there are actually two > instances of wx created, one referenced to by (at top level) foo.wx.* > and one wx.*? If this is indeed the case it isn't too good for the > performance

Weekly Python Patch/Bug Summary

2005-11-18 Thread Kurt B. Kaiser
Patch / Bug Summary ___ Patches : 379 open (+14) / 2968 closed ( +7) / 3347 total (+21) Bugs: 910 open ( +6) / 5384 closed (+17) / 6294 total (+23) RFE : 200 open ( +0) / 191 closed ( +2) / 391 total ( +2) New / Reopened Patches __ PythonD D

Re: Can you set a class instance's attributes to zero by setting the instance to zero?

2005-11-19 Thread Diez B. Roggisch
Gerard Flanagan wrote: > Hello > > If I have the Vector class below, is there a means by which I can have > the following behaviour > > > A = Vector(1, 2) print A > > (1, 2) > A = 0 print A > > (0, 0) > > If there is such a means, will it still work with the __slots__ > attr

Re: Obtaining an member function by name

2005-11-19 Thread Diez B. Roggisch
guy lateur wrote: > Hi all, > > Suppose you have this class: > > class foo: > def bar(): > > Suppose you also have the strings "foo" and "bar". How can you obtain the > function foo.bar()? > > Surely somebody knows.. getattr helps. However, your example won't work: it misses either a sta

Re: Can a function access its own name?

2005-11-19 Thread Diez B. Roggisch
[EMAIL PROTECTED] wrote: > Look at the code below: > > # mystringfunctions.py > > def cap(s): > print s > print "the name of this function is " + "???" > > cap ("hello") > > > Running the code above gives the following output > > >>> > hello > the name

Re: custom xml pretty print

2005-11-20 Thread Diez B. Roggisch
akbar wrote: > Hi, > > I have Document. If I print it like this: > > print doc.toprettyxml(" ") > > I will get this: > > > > blablablabla > > > > > What do I have to do if I want to print it like this: > > > blablablabla > > Use a SAX-Handler, parse it your

Re: about polygon

2005-11-20 Thread Diez B. Roggisch
Shi Mu wrote: > On 11/20/05, Jan Voges <[EMAIL PROTECTED]> wrote: > >>Hi! >> >>Am Sun, 20 Nov 2005 03:55:21 -0800 schrieb Shi Mu: >> >> >>>Why I got a black polygon in the following code? >>>How can I make it no-color filled? >> >>Use create_line instead: >>c.create_line(60,60,100,60,100,100,60,12

Re: Command line

2005-11-20 Thread Diez B. Roggisch
amfr wrote: > Hoe would I call something on the command line from python, e.g. "ls > -la"? Use the module subprocess - otherwise maybe popen2 or os. Regards, Diez -- http://mail.python.org/mailman/listinfo/python-list

Re: combine doxygen and doc-strings?

2005-11-20 Thread Diez B. Roggisch
Gabriel Zachmann wrote: > Is there a way to combine doxygen comments, like this one If you are not tied to doxygen, you might consider epydoc - it uses the docstrings, and restructured text which is friendly to the eye. Regards, Diez -- http://mail.python.org/mailman/listinfo/python-list

Re: Aproximative string matching

2005-11-21 Thread Diez B. Roggisch
if levenshtein(s, target) <= dist: > found.append(s) > return s I compute a relative metric based on th every same implementation like this: def relative(a, b): """ Computes a relative distance between two strings. Its in the range (0

Re: newbie class question

2005-11-23 Thread Diez B. Roggisch
>>What I am trying to accomplish should be pretty self explanatory when >>looking at the following: It seems to me that what you are after is a nested or inner class like in JAVA. You can't do that in the same way as in JAVA, as nested classes in python don't know about their surrounding class/c

Re: Mixed types and variants

2005-11-23 Thread Diez B. Roggisch
> If this is not possible, such variants don't look very useful in > general for SS. > > My possible answers: > - "Value" types only can be better than nothing, because such variants > can be used to make mixed dicts, those mixed lists, etc. Some > functionality reduction is better than an even bi

Re: icmp - should this go in itertools?

2005-11-26 Thread Diez B. Roggisch
Tom Anderson wrote: > Hi all, > > This is a little function to compare two iterators: > > > > def icmp(a, b): > for xa in a: > try: > xb = b.next() > d = cmp(xa, xb) > if (d != 0): >

Re: SOAP - Beginner Desperately looking for Help

2005-11-26 Thread Diez B. Roggisch
Rodney Garland wrote: > Hi All, > > I am a relative beginner to Python and am looking for help with sending and > XML message and getting back a return file. The server is: > > https://node.deq.state.or.us/node/node.asmx > > I have have successfully sent and recieved using the PING, AUTHENTICA

Re: SOAP - Beginner Desperately looking for Help

2005-11-26 Thread Diez B. Roggisch
> I wanted to attach these - however, > taht didn't work for NNTP, so I mail them to you. Didn't work - my mail server won't let me send these to you. So you're on your own here. Shouldn't be too hard :) Diez -- http://mail.python.org/mailman/listinfo/python-list

Weekly Python Patch/Bug Summary

2005-11-26 Thread Kurt B. Kaiser
Patch / Bug Summary ___ Patches : 372 open ( -7) / 2980 closed (+12) / 3352 total ( +5) Bugs: 908 open ( -2) / 5395 closed (+11) / 6303 total ( +9) RFE : 200 open ( +0) / 191 closed ( +0) / 391 total ( +0) New / Reopened Patches __ CodeConte

Re: passing artibrary strings into a database

2005-11-27 Thread Diez B. Roggisch
[EMAIL PROTECTED] wrote: > Hi All, > > I was wondering if there is a helper library out there that will nicely > encode artibrary text so that I can put in into a TEXT field in a > database and then retrieve it without getting into trouble with ',",new > lines or other such things that would foul

Re: exception KeyboardInterrupt and os.system command

2005-11-27 Thread Diez B. Roggisch
darren kirby wrote: > Hello all. > > I have a python script here which is just a wrapper for 2 or more system > commands. I would estimate the program spends at least 95.5% of 'real' time > running the system commands. > > I want to trap the [crtl-c] key combo and exit (somewhat) gracefully if

Re: exception KeyboardInterrupt and os.system command

2005-11-27 Thread Diez B. Roggisch
[EMAIL PROTECTED] wrote: > You can tell by the exit code from system() whether the subprocess > exited due to a signal. Consider this code: > import os > while 1: > print os.system("sleep 1") > unless you happen to hit ctrl-c at the right time, you'll see it print > "2" (and "0" wh

Re: oval

2005-12-04 Thread Diez B. Roggisch
anvas.create_oval(10,10,20,20,tags='oval1',fill='blue') > b=canvas.create_oval(50,50,80,80,tags='oval2',fill='red') > def myEvent(event): > if a: Here is your problem. a is a name, bound to some value. So - it is true, as python semantics are that

Re: oval

2005-12-04 Thread Diez B. Roggisch
>> >>What you want instead is something like >> >>if event.source == a: >>... >> >>Please note that I don't know what event actually looks like in Tkinter, >>so check the docs what actually gets passed to you. > > > got AttributeError: Event instance has no attribute 'source' As I said: I do

Re: Detect character encoding

2005-12-04 Thread Diez B. Roggisch
Michal wrote: > Hello, > is there any way how to detect string encoding in Python? > > I need to proccess several files. Each of them could be encoded in > different charset (iso-8859-2, cp1250, etc). I want to detect it, and > encode it to utf-8 (with string function encode). You can only gues

Re: Detect character encoding

2005-12-04 Thread Diez B. Roggisch
Mike Meyer wrote: > "Diez B. Roggisch" <[EMAIL PROTECTED]> writes: > >>Michal wrote: >> >>>is there any way how to detect string encoding in Python? >>>I need to proccess several files. Each of them could be encoded in >>>different c

Re: Creating referenceable objects from XML

2005-12-05 Thread Diez B. Roggisch
Michael Williams wrote: > I'm looking for a quality Python XML implementation. All of the DOM > and SAX implementations I've come across so far are rather > convoluted. Welcome to the wonderful world of XML. > I need it to somehow convert my XML to intuitively referenceable > object. Any ideas?

Re: Ant (with Python extensions) good replacement for distutils?

2005-12-05 Thread Diez B. Roggisch
[EMAIL PROTECTED] wrote: > I know distutils well but don't know anything about Ant except that it > is a build > tool from Apache project. > > Could it possible be better or as good as distutils? > (There are extensions for Python.) No way. Ant sucks. Big-time. I actually enhance it with embedded

Re: idea of building python module using pyrex

2005-12-09 Thread Diez B. Roggisch
[EMAIL PROTECTED] wrote: > Hello, > > I have an idea to build python module to speed up python code in some > of field where pyrex shines such as numeric, code which needs a lot of > looping etc. Isn't numeric already written in C? -- Regards, Diez B. Roggisch -- ht

Weekly Python Patch/Bug Summary

2004-12-31 Thread Kurt B. Kaiser
Patch / Bug Summary ___ Patches : 261 open ( +4) / 2718 closed ( +3) / 2979 total ( +7) Bugs: 801 open ( -6) / 4733 closed (+16) / 5534 total (+10) RFE : 165 open ( +2) / 139 closed ( +0) / 304 total ( +2) New / Reopened Patches __ Patch for

Re: what is lambda used for in real code?

2005-01-01 Thread Diez B. Roggisch
ave to create a mapping between the pure, unwrapped function and the wrapped one so that I can recreate all properties. Thanks for nudging me in that direction :) -- Regards, Diez B. Roggisch -- http://mail.python.org/mailman/listinfo/python-list

Re: IDLE question

2005-01-02 Thread Kurt B. Kaiser
Ishwor <[EMAIL PROTECTED]> writes: > On Sun, 26 Dec 2004 13:02:01 +0100, Rolf Wester > <[EMAIL PROTECTED]> wrote: >> Hi, >> >> I would like to use IDLE as interactively as I can with Emacs. In Emacs >> I can send a marked region to the Python interpreter. Is there any way >> to do the same thing

Re: Async-signal safe functions in signal handlers (unix)

2005-01-03 Thread Diez B. Roggisch
> So, is there a) any mechanism inside Python that can detect if the > current code is executed in a signal handler, or b) a list of > statements that must not be used in a Python signal handler in order > to avoid glibc function calls that are not async-signal safe? The executi

Weekly Python Patch/Bug Summary

2005-01-08 Thread Kurt B. Kaiser
/1097671 opened by Kurt B. Kaiser Direct framework linking for MACOSX_DEPLOYMENT_TARGET < 10.3 (2005-01-07) http://python.org/sf/1097739 opened by Bob Ippolito Encoding for Code Page 273 used by EBCDIC Germany Austria (2005-01-07) http://python.org/sf/1097797 opened by Mich

Re: Command line and GUI tools : need a single threading solution

2005-01-10 Thread Diez B. Roggisch
I would strongly advise against using qthreads with your commandline-tools, as these then would only run on machines where pyqt is installed - which opens a small part of "dependency hell" for your users. -- Regards, Diez B. Roggisch -- http://mail.python.org/mailman/listinfo/python-list

Re: Port blocking

2005-01-10 Thread Diez B. Roggisch
port? It has always been my impression that this was to create less administrative troubles for firewall admins. But its not inherently more secure. That's a property of the application running. -- Regards, Diez B. Roggisch -- http://mail.python.org/mailman/listinfo/python-list

Re: Python serial data aquisition

2005-01-11 Thread Diez B. Roggisch
the specification you gave - look at the Byte2 spec closely. -- Regards, Diez B. Roggisch -- http://mail.python.org/mailman/listinfo/python-list

Re: Iteration over two sequences

2005-01-12 Thread Diez B. Roggisch
zip or izip is your friend: import itertools a = [1,2,3] b = ['a', 'b', 'c'] for a,b in itertools.izip(a, b): print a, b -- Regards, Diez B. Roggisch -- http://mail.python.org/mailman/listinfo/python-list

Re: Iteration over two sequences

2005-01-13 Thread Diez B. Roggisch
My example is somewhat flawed because it assigns a and b the values of the iteration - so in the end, b is 'c', and only setting a to [1,2] will show your results. Use c and d for the variables in the for-statments, and things work as expected. -- Regards, Diez B. Roggisc

Re: Unclear On Class Variables

2005-01-13 Thread Diez B. Roggisch
of x and y, they are indeed unique to the *instance* rather than the > class. > > It is late and I am probably missing the obvious. Enlightenment > appreciated ... Without actual code how you set the vars, no one can answer that question. -- Regards, Diez B. Roggisch -- http://mail.python.org/mailman/listinfo/python-list

Re: Pygtk: How to remove title bar from a window

2005-01-13 Thread Diez B. Roggisch
the window - xkill is at hand, and even if the average user doesn't know about it - it _will_ be used. -- Regards, Diez B. Roggisch -- http://mail.python.org/mailman/listinfo/python-list

Weekly Python Patch/Bug Summary

2005-01-16 Thread Kurt B. Kaiser
Patch / Bug Summary ___ Patches : 272 open ( +5) / 2737 closed (+10) / 3009 total (+15) Bugs: 793 open ( -5) / 4777 closed (+29) / 5570 total (+24) RFE : 165 open ( +0) / 141 closed ( +1) / 306 total ( +1) New / Reopened Patches __ Enhance t

Re: generator expressions: performance anomaly?

2005-01-18 Thread Diez B. Roggisch
, it e.g. forbids functions like time.time() - a too huge paradigm shift for python. -- Regards, Diez B. Roggisch -- http://mail.python.org/mailman/listinfo/python-list

Re: generator expressions: performance anomaly?

2005-01-18 Thread Diez B. Roggisch
in xrange(10)) tpl = tuple(time.time() for i in xrange(10)) -- Regards, Diez B. Roggisch -- http://mail.python.org/mailman/listinfo/python-list

Re: generator expressions: performance anomaly?

2005-01-18 Thread Diez B. Roggisch
xample make it possible to alter time.time like this time.time = random.random() so that it behaves totally different - while the syntactically equivalence still holds. No chance of catching that. -- Regards, Diez B. Roggisch -- http://mail.python.org/mailman/listinfo/python-list

Re: generator expressions: performance anomaly?

2005-01-18 Thread Diez B. Roggisch
shure returns the same values in every execution. This > *IS* a useless feature, but I think it's possible to make it work. What makes the leftmost expression different from the iterable returning expression inside the for? The same arguments apply there. -- Regards, Diez B. Roggisch -- http://mail.python.org/mailman/listinfo/python-list

Re: generator expressions: performance anomaly?

2005-01-18 Thread Diez B. Roggisch
most primitive of examples, the reason beeing that due to the dynamic features syntactically equivalent expressions can have totally different semantics. So its not really worth the effort. -- Regards, Diez B. Roggisch -- http://mail.python.org/mailman/listinfo/python-list

Re: Class introspection and dynamically determining function arguments

2005-01-20 Thread Diez B. Roggisch
for is it planned? -- Regards, Diez B. Roggisch -- http://mail.python.org/mailman/listinfo/python-list

Re: Class introspection and dynamically determining function arguments

2005-01-20 Thread Diez B. Roggisch
on't know what kind of editing widget to use for a property. -- Regards, Diez B. Roggisch -- http://mail.python.org/mailman/listinfo/python-list

sys.stdin and idle bug?

2005-01-20 Thread Jason B Burke
Greetings All, I apologize if this has been brought up before, but I'm having a small issue with the handling of sys.stdin in Idle. I'm using a routine to mimic the c library function getch(), to get a single character from the keyboard. The function works in the standard python shell, but in I

Re: What YAML engine do you use?

2005-01-20 Thread Diez B. Roggisch
hed if the number of yaml objects grew larger. So I still use yaml. > > For those of you who don't know what YAML is: visit http://yaml.org/! > You will be amazed, and never think of XML again. Well, almost. It is certainly nice. -- Regards, Diez B. Roggisch -- http://mail.pyt

Re: Python and SOAP

2005-01-21 Thread Diez B. Roggisch
> I'd like to write a SOAP client and a SOAP server > in Python. > > Is SOAPy still the way to go, or are there better > methods? If you really need SOAP, Nelson did answer your question. But if you are only communicating between two python processes, I suggest pyro.

Re: how to write a tutorial

2005-01-21 Thread Diez B. Roggisch
age comparison, and the plethorea of posts requesting to stop that and limit yourself to your mailing list - I doubt you'll get much attention for that. -- Regards, Diez B. Roggisch -- http://mail.python.org/mailman/listinfo/python-list

RE: Class introspection and dynamically determining function arguments

2005-01-21 Thread Diez B. Roggisch
html not really - and there are no special moduls neccessary, as everything is at your hands using __dict__ and so on. -- Regards, Diez B. Roggisch -- http://mail.python.org/mailman/listinfo/python-list

Re: tkinter socket client ?

2005-01-21 Thread Diez B. Roggisch
isted, it comes with a tkinter-aware exec-loop: http://twistedmatrix.com/documents/howto/choosing-reactor#auto16: -- Regards, Diez B. Roggisch -- http://mail.python.org/mailman/listinfo/python-list

Re: debugging xmlrpc servers

2005-01-23 Thread Diez B. Roggisch
I have difficulties understanding your probelem - is your own method giving you trouble (and the 'exceptions.ValueError:too many values to unpack') error or is it the remote debugger? Or do you simply not understand the error message itself. The error itself is raised in cases like th

<    1   2   3   4   5   6   7   8   9   10   >