Re: How to test that an exception is raised ?

2005-01-31 Thread Antoon Pardon
Op 2005-01-28, StepH schreef <[EMAIL PROTECTED]>: > Antoon Pardon a écrit : >> Op 2005-01-28, StepH schreef <[EMAIL PROTECTED]>: >> >>>Thanks for you answer. >>>I'm new to Python (coming from C/C++). >>> >>>Do you say that it's not possible to test (using unittest) if an exception >>>is well raise

Re: variable declaration

2005-01-31 Thread Peter Otten
Alexander Zatvornitskiy wrote: > epsilon=0 > S=0 > while epsilon<10: > S=S+epsilon > epselon=epsilon+1 > print S > > It will print zero, and it is not easy to find such a bug! pychecker may help you find misspelled variable names. You have to move the code into a function, though: $ cat eps

COM on a network drive can't find pywintypes23.dll

2005-01-31 Thread Marco Aschwanden
Hi I have installed Python (2.3.4) on a shared network drive. I use it to run a bunch of application on the workstations (Win2K). Now I am running into the first problem ever. I try to use COM to generate a word-file. It runs fine on my machine (Python installed locally). When I deploy it an

Re: Nested scopes and class variables

2005-01-31 Thread [EMAIL PROTECTED]
To me it seems you should do it something like this: -def f(x): -class C(object): -def __init__(self, x): -self.x = x # here you set the attribute for class C -c = C(x) # instantiate a C object -print c.x -f(5) -- http://mail.python.org/mailman/listinfo/python-lis

Re: Nested scopes and class variables

2005-01-31 Thread Nick Coghlan
Dave Benjamin wrote: I ran into an odd little edge case while experimenting with functions that create classes on the fly (don't ask me why): It gets even kookier: Py> x = 5 Py> def f(y): ... class C(object): ... x = x ... print C.x ... Py> f(5) # OK with x bound at global 5 Py> def f(x): .

Re: Dynamic class methods misunderstanding

2005-01-31 Thread TZOTZIOY
On Sat, 29 Jan 2005 10:24:27 +0100, rumours say that [EMAIL PROTECTED] (Alex Martelli) might have written: >Bill Mill <[EMAIL PROTECTED]> wrote: > ... >> > class Test: >> > def __init__(self, method): >> > self.m = new.instancemethod(method, self, Test) >> >> Beautiful! thank you ve

Re: COM on a network drive can't find pywintypes23.dll

2005-01-31 Thread Roger Upole
This means the machine is finding an older verion of pywintypes23.dll first, rather than not finding it at all. You may have an old version hanging around in the \system32 directory on that machine. (or anywhere else that it would be found first). You might also want to verify that the dll's you'

Re: Nested scopes and class variables

2005-01-31 Thread Nick Coghlan
[EMAIL PROTECTED] wrote: To me it seems you should do it something like this: -def f(x): -class C(object): -def __init__(self, x): -self.x = x # here you set the attribute for class C -c = C(x) # instantiate a C object -print c.x -f(5) That does something different -

Re: Dynamic class methods misunderstanding

2005-01-31 Thread Alex Martelli
Christos TZOTZIOY Georgiou <[EMAIL PROTECTED]> wrote: ... > >> > class Test: > >> > def __init__(self, method): > >> > self.m = new.instancemethod(method, self, Test) ... > >self.m = method.__get__(self, Test) > > Almost true; not all builtin functions are descriptors though.

Re: test_socket.py failure

2005-01-31 Thread Nick Coghlan
[EMAIL PROTECTED] wrote: hi all, Linux 2.4.28 Glibc 2.2.5 gcc 2.95.3 I'm new to Python. I've compiled Python 2.4 from tar file. When running 'make test' i'm getting a failure in test_socket. Two questions. First, what does the following code give when you r

Re: Nested scopes and class variables

2005-01-31 Thread Alex Martelli
Dave Benjamin <[EMAIL PROTECTED]> wrote: > I ran into an odd little edge case while experimenting with functions that > create classes on the fly (don't ask me why): "Why not?". But classes have little to do with it, in my view. > >>> def f(x): > ... class C(object): > ... x = x Y

Re: The next Xah-lee post contest

2005-01-31 Thread Steve Holden
[EMAIL PROTECTED] wrote: Tragi-comic. really. BTW you forgot cross-post to c.l.scheme, C, smalltalk and C++ Would there, I wonder, be any enthusiasm for a "Best Xah Lee impression" prize at PyCon? regards Steve -- Steve Holden http://www.holdenweb.com/ Python Web Programming htt

Re: variable declaration

2005-01-31 Thread Alex Martelli
Alexander Zatvornitskiy <[EMAIL PROTECTED]> wrote: > Hello All! > > I'am novice in python, and I find one very bad thing (from my point of > view) in language. There is no keyword or syntax to declare variable, like > 'var' in Since the lack of declarations is such a crucial design choice for Py

½Ã°£¿¡ ´ëÇÑ ¸í¾ð

2005-01-31 Thread °Ç°­ÇÑ»ç¶÷
¾È³çÇϼ¼¿ä ^^; ¹Ý°©½À´Ï´Ù.. ¿ì¸® Ŭ·´À» ¼Ò°³ÇÕ´Ï´Ù. [¿ÏÀüºñ¿µ¸®¿î¿µ][¼ø¼öÇÏ°Ô À£ºùÁ·¸¸ ¿À¼Å¿ä] wonkiup.cyworld.com 1ºÐÀ̸é 10³âÀ» Àþ°í °Ç°­ÇÏ°Ô »ìºñ°áÀ» µå¸³´Ï´Ù. ¿À¼Å¼­ Á¤º¸ ¸¶´Ï ¸¶´Ï ¾ò¾î°¡¼¼¿ä.   ¾î·Á¿ï¶§ Àϼö·Ï ¿ìÁÖ¿¡³ÊÁö(Ѩ)¸¦ ¹ÞÀ¸½Ã¸é ¿îÀÌ ¿­¸³´Ï´Ù.Ѩ°¡ ¾øÀ¸¸é ¿îµµ¾ø´Ù. Ѩ°¡ ÀÖÀ¸¸é ¿îµ

implicit conversion

2005-01-31 Thread Benjamin Schmeling
Hi, I am working on exposing a bigint class to python. Now I've got the problem that methods which take an bigint as an parameter do not accept Python longs. For example: import _PythonLiDIA x=123L; c=_PythonLiDIA.bigint(); _PythonLiDIA.gcd(c,x); Traceback (most recent call last): File "test.py"

Re: The next Xah-lee post contest

2005-01-31 Thread Arthur
On Mon, 31 Jan 2005 07:40:40 -0500, Steve Holden <[EMAIL PROTECTED]> wrote: >[EMAIL PROTECTED] wrote: > >> Tragi-comic. really. BTW you forgot cross-post to c.l.scheme, C, >> smalltalk and C++ >> >Would there, I wonder, be any enthusiasm for a "Best Xah Lee impression" >prize at PyCon? And th

Re: variable declaration

2005-01-31 Thread Steve Holden
Alex Martelli wrote: Alexander Zatvornitskiy <[EMAIL PROTECTED]> wrote: Hello All! I'am novice in python, and I find one very bad thing (from my point of view) in language. There is no keyword or syntax to declare variable, like 'var' in [...] There are zillions of languages -- use another one. [

Re: Where can I find sample "beginner" programs to study?

2005-01-31 Thread Franz Steinhaeusler
On Fri, 28 Jan 2005 21:41:05 +0100, moma <[EMAIL PROTECTED]> wrote: >Eggs are here. Bring some bacon. >http://www.python-eggs.org/links.html Hi, interesting site, but who is maintaining this page. I'd like to add some new links. -- Franz Steinhaeusler -- http://mail.python.org/mailman/listinfo

Re: how do i create such a thing?

2005-01-31 Thread Alex Martelli
Steven Bethard <[EMAIL PROTECTED]> wrote: > Of if you only want to deal with the case where the attribute doesn't > exist, you can use getattr, which gets called when the attribute can't > be found anywhere else: > > py> class DefaultAttr(object): > ... def __init__(self, default): > ...

Re: implicit conversion

2005-01-31 Thread Alex Martelli
Benjamin Schmeling <[EMAIL PROTECTED]> wrote: ... > I don't know how to achieve implicit conversion at this point, turning an > long automatically into an bigint. The other way round, turning an bigint > into long can be realized by defining __long__. Perhaps adding to your bigint class a const

Re: What's so funny? WAS Re: rotor replacement

2005-01-31 Thread Nick Craig-Wood
Paul Rubin wrote: > Actually and surprisingly, that's not really true. Crypto algorithms > are pretty straightforward, so if you examine the code and check that > it passes a bunch of test vectors, you can be pretty sure it's > correct. I was going to write pretty much the same thing. If a

Report

2005-01-31 Thread decoder-x-mac-gujarati
The original message was received at Mon, 31 Jan 2005 19:08:12 +0500 from [140.253.248.170] - The following addresses had permanent fatal errors - python-list@python.org -- http://mail.python.org/mailman/listinfo/python-list

re module - cannot make expression

2005-01-31 Thread Laszlo Zsolt Nagy
Hi All! I would like to match strings not beginning with '/webalizer'. How can I do this? The only one negation command is ^ inside [] but it cannot be used here. I looked over "re" examples on the net but I could not find an example about how to match "not beginning with" type expressions. Tha

Want to meet any of these people? They are registered for PyCon

2005-01-31 Thread Steve Holden
In accordance with PyCon's privacy policy, there are currently 29 PyCon registrants who have asked that their names not be published. The remainder, however, are listed here just in case you've ever wanted to meet any of them, and could do so by registering for PyCon at http://www.python.org/

Re: re module - cannot make expression

2005-01-31 Thread Steve Holden
Laszlo Zsolt Nagy wrote: Hi All! I would like to match strings not beginning with '/webalizer'. How can I do this? The only one negation command is ^ inside [] but it cannot be used here. I looked over "re" examples on the net but I could not find an example about how to match "not beginning wit

import directory error

2005-01-31 Thread Olivier Noblanc ATOUSOFT
Hello, When i want to import a .py fire from another subdirectory i make import inc/setupxml but that make me an error message. A man tell me to put a dot but that doesn't work. Can you help me ? Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: PyGame not working(?) (was: trouble installing numeric)

2005-01-31 Thread Kamilche
Are you using Python 2.3? Pygame doesn't work with 2.4, unfortunately. It's the reason I removed 2.4 from my machine. I'll upgrade once PyGame upgrades. -- http://mail.python.org/mailman/listinfo/python-list

Re: import directory error

2005-01-31 Thread Ola Natvig
Olivier Noblanc ATOUSOFT wrote: Hello, When i want to import a .py fire from another subdirectory i make import inc/setupxml but that make me an error message. A man tell me to put a dot but that doesn't work. Can you help me ? Thanks. You should write import inc.setupxml this imports the module l

Re: import directory error

2005-01-31 Thread Steve Holden
Olivier Noblanc ATOUSOFT wrote: Hello, When i want to import a .py fire from another subdirectory i make import inc/setupxml but that make me an error message. A man tell me to put a dot but that doesn't work. Can you help me ? Thanks. If you want to import a single .py (a Python module) then the

Re: import directory error

2005-01-31 Thread Olivier Noblanc ATOUSOFT
Problem solved thanks a lot "Steve Holden" <[EMAIL PROTECTED]> a écrit dans le message de news: [EMAIL PROTECTED] > Olivier Noblanc ATOUSOFT wrote: > >> Hello, >> >> >> When i want to import a .py fire from another subdirectory i make >> >> import inc/setupxml >> >> >> but that make me an error

Re: how to find number of processors in python

2005-01-31 Thread Christopher De Vries
"/usr/sbin/psrinfo -p" will print the number of physical processors on the system, though it does not indocate if they are on- or off-line. You could also write an extension which gets processor information using the sys/processor library. Example code is available in the "p_online" man page. Chr

Using HTTPSConnection and verifying server's CRT

2005-01-31 Thread Marc Poulhiès
Hi, I'm trying to build a system using HTTPS with python clients that have to verify the server's identity. From the Python document, it seems that the server's certificate is not veryfied, and authentication can only be in the other way (client authentication). I know usually users only click on

import doesn't work as i want

2005-01-31 Thread Olivier Noblanc ATOUSOFT
Hello, In the botom of this post you will see my source code. The problem is when i launch main.py that doesn't make anything why ? Thanks olivier noblanc Atousoft http://www.logiciel-erp.fr I have main.py : - import wx import inc.importlist --

barchart for webpage needed

2005-01-31 Thread dimitri pater
Hello, I am looking for a Python tool to create graphs and charts on a webpage. Chartdirector is too expensive for me. A simple script for creating a barchart should be sufficient as a starting point. Thanks! Dimitri -- Please visit dimitri's website: www.serpia.com -- http://mail.python.org/ma

Re: Best python postgres module?

2005-01-31 Thread Frank Miles
In article <[EMAIL PROTECTED]>, Robert Brewer <[EMAIL PROTECTED]> wrote: >Roland Heiber wrote: >> i recently migrated from mysql to postgresql and did use >> severel python >> postgres-modules. All do what they are designed for, so >> which one would >> you use? psycopg, pygresql, pypgsql? psyc

Re: import doesn't work as i want

2005-01-31 Thread Fredrik Lundh
Olivier Noblanc wrote: > In the botom of this post you will see my source code. > > The problem is when i launch main.py that doesn't make anything why ? the "if __name__" statement checks the name of the module. if you run Python file as a script, by passing a filename to the python interpreter

Re: barchart for webpage needed

2005-01-31 Thread John Hunter
> "dimitri" == dimitri pater <[EMAIL PROTECTED]> writes: dimitri> Hello, I am looking for a Python tool to create graphs dimitri> and charts on a webpage. Chartdirector is too expensive dimitri> for me. A simple script for creating a barchart should be dimitri> sufficient as a

RE: variable declaration

2005-01-31 Thread Robert Brewer
Alex Martelli wrote: > If Python doesn't fit YOUR brain, for example because your brain is > ossified around a craving for the declaration of variables, > then, unless > you're specifically studying a new language just for personal growth > purposes, I think you might well be better off with a lan

Re: variable declaration

2005-01-31 Thread Michael Tobis
With all due respect, I think "so go away if you don't like it" is excessive, and "so go away if you don't like it and you obviously don't like it so definitely go away" is more so. The writer is obviously neither a native speaker of English nor an accomplished user of Python, so there are two lang

Re: Nested scopes and class variables

2005-01-31 Thread Steven Bethard
Alex Martelli wrote: def f(x): ... class C: ... x = x ... return C ... [snip] def f(x): ... def g(): ... x = x ... return x ... return g ... [snip] See the difference? In a function, the 'x = x' compiles into LOAD_FAST, STORE_FAST, which only looks at locals and nowhere el

Re: Microsoft Visual C++ and pyton

2005-01-31 Thread Christopher De Vries
On Sun, Jan 30, 2005 at 03:12:06PM -0800, mike wrote: > I am new with python. Is it possible to have an MFC application and > develop some module using python? what are the steps in doing this? can > anybody give me a url or some documentation for this.. thanks.. It is possible to embed python in

Re: variable declaration

2005-01-31 Thread Fredrik Lundh
Michael Tobis wrote: > Also, the assertion that "Python has no declarations whatsoever" is no > longer obviously true. In the 2.4 decorator syntax, a decorator line is > not executable that's a nice theory, but since the decorator line is executed by the inter- preter, it's a little weak. -

Re: import doesn't work as i want

2005-01-31 Thread Olivier Noblanc ATOUSOFT
how to move in function ? "Fredrik Lundh" <[EMAIL PROTECTED]> a écrit dans le message de news: [EMAIL PROTECTED] > Olivier Noblanc wrote: > >> In the botom of this post you will see my source code. >> >> The problem is when i launch main.py that doesn't make anything why ? > > the "if __name__" s

Re: Using HTTPSConnection and verifying server's CRT

2005-01-31 Thread Ng Pheng Siong
According to Marc Poulhiès <[EMAIL PROTECTED]>: > I tried to see if the M2Crypto has this possibility, but from my tests > and from what I can find on the website, it seems not :/ How did you test and where on the website does it say not? > Can someone confirm me this is not possible or point me

Re: re module - cannot make expression

2005-01-31 Thread Steven Bethard
Laszlo Zsolt Nagy wrote: I would like to match strings not beginning with '/webalizer'. How can I do this? Are you sure you need a regular expression? The str.startswith method is what I would normally use to solve this kind of problem: py> lst = ['aax', 'abx', 'acx', 'aay', 'aby', 'acy'] py> [

Re: import doesn't work as i want

2005-01-31 Thread Fredrik Lundh
Olivier Noblanc wrote: > how to move in function ? how to put code in a function? the same way you put code in a method. change if __name__ == "__main__": app = wx.PySimpleApp(0) wx.InitAllImageHandlers() frame_1 = MyFrame(None, -1, "") app.SetTopWindow(frame_1) frame_1.Sho

Re: Using HTTPSConnection and verifying server's CRT

2005-01-31 Thread Marc Poulhiès
[EMAIL PROTECTED] (Ng Pheng Siong) writes: Hi, > According to Marc Poulhiès <[EMAIL PROTECTED]>: >> I tried to see if the M2Crypto has this possibility, but from my tests >> and from what I can find on the website, it seems not :/ > > How did you test and where on the website does it say not? I

Crude statistics on the standard library

2005-01-31 Thread F. Petitjean
I have written a script to find the modules which export the largest number of names. The gc.getreferrers(*objs) function gives also an idea of the dependencies between the modules. The code (statsmod.py) : #!/usr/bin/env python # -*- coding: latin-1 -*- """ statsmod.py module rudimentaire de

Re: variable declaration

2005-01-31 Thread Michael Tobis
> that's a nice theory, but since the decorator line is executed by the inter- > preter, it's a little weak. Well, uh, who else would process it? "use strict' and 'my epsilon' in perl are executed by the perl interpreter as well, but they have a declarative flavor. A decorator is a modifier to a

Twain problems

2005-01-31 Thread Mikael Olofsson
Hi all! Sorry for this rather lengthy post. It's a long preamble followed by a few questions based on that. Here's my situation: I am trying to write a specialized scanner utility for my own needs, and I want to use the module twain to control my scanner. I haven't used the twain module before,

Re: variable declaration

2005-01-31 Thread Fredrik Lundh
Michael Tobis wrote: >> that's a nice theory, but since the decorator line is executed by the >> interpreter, it's a little weak. > > Well, uh, who else would process it? the compiler. from __future__ is a declaration. @expression is an executable statement. -- http://mail.python.org/mai

Re: variable declaration

2005-01-31 Thread Alex Martelli
Robert Brewer <[EMAIL PROTECTED]> wrote: > Bah. Nothing teaches you a new language like having your job depend upon > it. People who study languages merely for "personal growth" learn 50% of > the syntax and 1% of the concepts, and then fritter that learning away > on inconsequential newsgroups th

re: variable declaration

2005-01-31 Thread ajsiegel
MT writes - >In summary, again with all due respect and gratitude for the >spectacularly excellent product that Python is today, I wonder *why* >this strong aversion to declarative statements, and *whether* decorator >syntax constitutes a violation of it. I'd appreciate any responses or >links

Re: variable declaration

2005-01-31 Thread DogWalker
"EP" <[EMAIL PROTECTED]> said: >> Original Message >> From: [EMAIL PROTECTED] (Alexander Zatvornitskiy) > >> >> Hello All! >> >> I'am novice in python, and I find one very bad thing (from my point of >> view) in >> language. There is no keyword or syntax to declare variab

RE: variable declaration

2005-01-31 Thread Robert Brewer
Alex Martelli wrote: > > Robert Brewer <[EMAIL PROTECTED]> wrote: > > > Bah. Nothing teaches you a new language like having your > job depend upon > > it. People who study languages merely for "personal growth" > learn 50% of > > the syntax and 1% of the concepts, and then fritter that > learn

Re: variable declaration

2005-01-31 Thread Diez B. Roggisch
> A decorator is a modifier to a subsequent binding, and it modifies the > reference and not the referent. So how is it anythng but declarative? I learned the hard way that it still is simply interpreted - its a pretty straight forward syntactic sugaring, as this shows: foo = classmethod(foo) be

how to access class methods via their name-as-string

2005-01-31 Thread phil_nospam_schmidt
I'd like to be able to look up a method name by passing a string with the method name. I thought I could use self.__dict__ to get at the method names, but as my example shows, this is obviously not working. I've also tried self.__class__.__dict__ without success. Can anyone point me in the right d

Re: variable declaration

2005-01-31 Thread Alex Martelli
Michael Tobis <[EMAIL PROTECTED]> wrote: > With all due respect, I think "so go away if you don't like it" is > excessive, and "so go away if you don't like it and you obviously don't > like it so definitely go away" is more so. The writer is obviously I disagree: I believe that, if the poster re

Re: how to access class methods via their name-as-string

2005-01-31 Thread Steven Bethard
[EMAIL PROTECTED] wrote: I'd like to be able to look up a method name by passing a string with the method name. Use getattr: py> class A(object): ... def f(self): ... pass ... def g(self): ... pass ... py> class B(A): ... def h(self): ... pass ... py> getattr(B()

stop program in komodo

2005-01-31 Thread [EMAIL PROTECTED]
Hello, How can we stop this peace of code in KOMODO: while 1: print "helo" I can't stop it, even using Ctrl+C pujo -- http://mail.python.org/mailman/listinfo/python-list

Re: implicit conversion

2005-01-31 Thread Benjamin Schmeling
Alex Martelli wrote: Benjamin Schmeling <[EMAIL PROTECTED]> wrote: ... I don't know how to achieve implicit conversion at this point, turning an long automatically into an bigint. The other way round, turning an bigint into long can be realized by defining __long__. Perhaps adding to you

Re: variable declaration

2005-01-31 Thread Steve Holden
Alex Martelli wrote: Michael Tobis <[EMAIL PROTECTED]> wrote: [...] Let me add that I remain unconvinced that a language cannot combine the best features of Python with very high performance, which is ultimately I'm also unconvinced. Fortunately, so is the EU, so they have approved very substanti

Re: stop program in komodo

2005-01-31 Thread Will McGugan
[EMAIL PROTECTED] wrote: Hello, How can we stop this peace of code in KOMODO: while 1: print "helo" I can't stop it, even using Ctrl+C Are you sure that is what is happening? When I tried it, it appeared as though nothing had happened after pressing the break button. But it was just that the

Relocatable binary installs....

2005-01-31 Thread [EMAIL PROTECTED]
Hello all, I'm currently working on a software package that is going to be distributed in binary form (with accompanying source) for lot of different unixes (Linux, AIX, HP-UX and others). Parts of the package are written in Python... so we are going to want to distribute our own version of pytho

Re: Relocatable binary installs....

2005-01-31 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > Is there a way to make a relocateable python binary... that is... a > python installation that won't care where it is on the machine... and > won't care if it gets put somewhere else besides / ? the standard CPython interpreter is 100% "relocatable". If you think it i

Re: stop program in komodo

2005-01-31 Thread [EMAIL PROTECTED]
Hello Will, I have received information from [EMAIL PROTECTED] That he has already added this problem as bug. "I've added a bug for this: http://bugs.activestate.com/show_bug.cgi?id=36443 Regards, Shane" So stay tune. Pujo -- http://mail.python.org/mailman/listinfo/python-list

Re: The next Xah-lee post contest

2005-01-31 Thread Erik Max Francis
Steve Holden wrote: Would there, I wonder, be any enthusiasm for a "Best Xah Lee impression" prize at PyCon? I imagine standing in a corner, facing the wall, and screaming incoherently at the top of your lungs would be guaranteed at least second place. -- Erik Max Francis && [EMAIL PROTECTED] &

Re: ANNOUNCE: KirbyBase 1.7

2005-01-31 Thread Paul McGuire
"Jamey Cribbs" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Paul Rubin wrote: > > That's cute, especially the part about using Python expressions > > instead of SQL to express queries. I don't see anything in the info > > page about what happens when you have multiple clients upda

[ANN] Spike Asset Manager release 0.13

2005-01-31 Thread mh
Spike Asset Manager (SAM) is an open-source cross-platform framework written in python for probing a system for components and reporting them. It includes a driver file that probes for components commonly found in a LAMPJ stack (Apache, MySQL, PHP, Tomcat, etc). Note that the L in LAMP could be Li

Re: Relocatable binary installs....

2005-01-31 Thread Steve Holden
Fredrik Lundh wrote: [EMAIL PROTECTED] wrote: Is there a way to make a relocateable python binary... that is... a python installation that won't care where it is on the machine... and won't care if it gets put somewhere else besides / ? the standard CPython interpreter is 100% "relocatable". If

Q: quoting string without escapes

2005-01-31 Thread Xah Lee
in Python, is there a way to quote a string as to avoid escaping ' or " inside the string? i.e. like Perl's q or qq. thanks. Xah [EMAIL PROTECTED] http://xahlee.org/PageTwo_dir/more.html -- http://mail.python.org/mailman/listinfo/python-list

Re: Q: quoting string without escapes

2005-01-31 Thread Steve Holden
Xah Lee wrote: in Python, is there a way to quote a string as to avoid escaping ' or " inside the string? i.e. like Perl's q or qq. thanks. Xah [EMAIL PROTECTED] http://xahlee.org/PageTwo_dir/more.html Aren't you the guy who's telling the whole world how to write Python and Perl? Unusual to fin

Re: Relocatable binary installs....

2005-01-31 Thread Fredrik Lundh
Steve Holden wrote: >>>Is there a way to make a relocateable python binary... that is... a >>>python installation that won't care where it is on the machine... and >>>won't care if it gets put somewhere else besides / ? >> >> >> the standard CPython interpreter is 100% "relocatable". If you thin

Re: Relocatable binary installs....

2005-01-31 Thread Steve Holden
Fredrik Lundh wrote: Steve Holden wrote: Is there a way to make a relocateable python binary... that is... a python installation that won't care where it is on the machine... and won't care if it gets put somewhere else besides / ? the standard CPython interpreter is 100% "relocatable". If you

Re: variable declaration

2005-01-31 Thread Thomas Bartkus
"Alexander Zatvornitskiy" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hello All! > > I'am novice in python, and I find one very bad thing (from my point of view) in > language. There is no keyword or syntax to declare variable, like 'var' in > Pascal, or special syntax in C. It ca

Re: [ANN] Spike Asset Manager release 0.13

2005-01-31 Thread Skip Montanaro
Matt> Spike Asset Manager (SAM) is an open-source cross-platform Matt> framework written in python for probing a system for components Matt> and reporting them. Matt, That's a pretty generic description. Pardon my ignorance, but what's the advantage over, for example, "rpm -aq | gre

msvcp71.dll and Python 2.4 C++ extensions

2005-01-31 Thread Matthias Baas
Hi, are there any guidelines about what to do if a Windows extension for Python 2.4 requires the C++ runtime (msvcp71.dll)? If I want to distribute a binary installer of an extension that contains C++ code, should I really include the msvcp71.dll in the package? It doesn't sound like a good idea

py-xmlrpc postpone question

2005-01-31 Thread elbertlev
Hi! I'm trying to use py-xmlrpc. All works fine (and very fast) in one-threaded case, but I really have to serve many clients. As advertised, py-xmlrpc supports non-blocking calls (via select). When request is received the handler is called with proper parameters. As I understood from reading the

Re: [ANN] Spike Asset Manager release 0.13

2005-01-31 Thread Fredrik Lundh
Skip Montanaro wrote: >Matt> Spike Asset Manager (SAM) is an open-source cross-platform >Matt> framework written in python for probing a system for components >Matt> and reporting them. > > That's a pretty generic description. Pardon my ignorance, but what's the > advantage over, for

Handling MySQL connection

2005-01-31 Thread Josh
Hi, First off, I am a newbie to Python and so far I must say that we're getting along pretty well. My schooling was is C/C++, but have been writing code in, dare I say it, VB, for the past 4 years. Here is the problem I have run across. I am using SPE w/WXGlade to setup the GUI, so it handled the

Re: python and gpl

2005-01-31 Thread Scott Robinson
On 30 Jan 2005 21:59:25 -0800, Paul Rubin wrote: >John Hunter <[EMAIL PROTECTED]> writes: >> The question is: does shipping a backend which imports a module that >> links with GPL code make some or all of the library GPL. > >Literally speaking, no, not automatically, any

Re: Description Field in WinXP Services

2005-01-31 Thread Larry Bates
Roger, I wrote an extension to Mark Hammond's win32serviceutil.ServiceFramework class (that I submitted to him also) that extends the class to provide you with this functionality (along with the ability to support py2exe frozen services better). Here it is: import _winreg import os import win32ev

Re: barchart for webpage needed

2005-01-31 Thread Larry Bates
dimitri pater wrote: Hello, I am looking for a Python tool to create graphs and charts on a webpage. Chartdirector is too expensive for me. A simple script for creating a barchart should be sufficient as a starting point. Thanks! Dimitri ReportLab's Graphics module is free and works quite well for

[perl-python] find & replace strings for all files in a dir

2005-01-31 Thread Xah Lee
suppose you want to do find & replace of string of all files in a directory. here's the code: ©# -*- coding: utf-8 -*- ©# Python © ©import os,sys © ©mydir= '/Users/t/web' © ©findStr='' ©repStr='' © ©def replaceStringInFile(findStr,repStr,filePath): ©"replaces all findStr by repStr in file file

Re: python and gpl

2005-01-31 Thread Steve Holden
Scott Robinson wrote: On 30 Jan 2005 21:59:25 -0800, Paul Rubin wrote: John Hunter <[EMAIL PROTECTED]> writes: The question is: does shipping a backend which imports a module that links with GPL code make some or all of the library GPL. Literally speaking, no, not automa

Anyone else experience Thread.join() returning early?

2005-01-31 Thread Michael Hobbs
I just wanted to see if anyone else experienced a problem with the Thread.join() method in Python 2.4. Unfortunately, I did not debug this problem fully before re-writing my code to avoid Thread.join(). My specific situation was that I called subprocess.Popen() to spawn a separate process with th

Re: variable declaration

2005-01-31 Thread Carl Banks
Thomas Bartkus wrote: > Python *does* require that your variables be declared and initialized before > you use them. You did that with epsilon=0 and S=0 at the top. It is > unfortunate, however, that the statement epselon=epsilon+1 also declares a > new variable in the wrong place at the wrong ti

Re: [ANN] Spike Asset Manager release 0.13

2005-01-31 Thread mh
The idea is to have a framework to do this in a semi-crossplatform manner. The framework could be updated to know about apt, portage repositories as well as talk to to the windows registry. Not everyone is running redhat ;) -- http://mail.python.org/mailman/listinfo/python-list

Request for Feedback; a module making it easier to use regular expressions.

2005-01-31 Thread Kenneth McDonald
I'm working on the 0.8 release of my 'rex' module, and would appreciate feedback, suggestions, and criticism as I work towards finalizing the API and feature sets. rex is a module intended to make regular expressions easier to create and use (and in my experience as a regular expression user, it ma

Re: python and gpl

2005-01-31 Thread Tim Churches
John Hunter wrote: I have a question about what it takes to trigger GPL restrictions in python code which conditionally uses a GPL library. Here is the context of my question. matplotlib, which I develop, is a plotting module which is distributed under a PSF compatible license, and hence we avoid

Re: [ANN] Spike Asset Manager release 0.13

2005-01-31 Thread mh
Fredrik- This is a known issue. The tool currently only looks in certain locations or hints rather then spidering the whole hard drive (which could take a bit of time). If you have installed in a non-standard location (or are using a platform or version of software that hasn't been tested agains

Re: variable declaration

2005-01-31 Thread Aahz
In article <[EMAIL PROTECTED]>, Alex Martelli <[EMAIL PROTECTED]> wrote: > >Some people claim a language should change the way you think -- a >frequent poster, excellent Python contributor, and friend, even has that >claim in his signature. Generally speaking, I change my .sig either when I get

Re: Want to meet any of these people? They are registered for PyCon

2005-01-31 Thread Aahz
In article <[EMAIL PROTECTED]>, Steve Holden <[EMAIL PROTECTED]> wrote: > >Note that the sort order isn't perfect - I just sorted on the second >"word" in each name. PyCon is a *great* place to meet people and discuss >ideas. Hope to see you there. Good thing I'm not coming this year, eh? ;-)

Re: Q: quoting string without escapes

2005-01-31 Thread Daniel Bickett
On Mon, 31 Jan 2005 14:09:10 -0500, Steve Holden <[EMAIL PROTECTED]> wrote: > Use triple-quoting. An example, for the sake of examples: Python 2.3.4 (#53, May 25 2004, 21:17:02) [MSC v.1200 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> st

Spawning, and Killing, a Process

2005-01-31 Thread brolewis
I am writing a program on Windows (XP Pro) that as part of the application takes advantage of rsync's ability to synchronize a client and server computer. However, because of the nature of our company's policies and our proxy, I must connect using SSH and use it as a tunnel to get to the location I

"Mail receiver server"

2005-01-31 Thread manatlan
In an intranet/lan, i'd like to put a "python server script" (which run forever) on a computer A... On another computer B, I'd like to send smtp-email to the computer A ... (send to "[EMAIL PROTECTED]", for example ...126.52.12.12 is the ip address of "B") in fact, i'd like to control "compute

serializing data structures

2005-01-31 Thread Philippe C. Martin
Hi, I am trying to figure out the traps/issues about sending data structures through a TCP/IP socket under the following circumstances: 1) there could be a different O/S on both side of the socket 2) there could be a difference CPU architecure on both side of the socket 3) there could be a differ

Re: "Mail receiver server"

2005-01-31 Thread Mitja
On Mon, 31 Jan 2005 23:23:46 +0100, manatlan <[EMAIL PROTECTED]> wrote: in fact, i'd like to control "computer A" by sending smtp email from "computer B". What kind of server should i write on computer "B", a smtp server ? a pop server ? It would be easier if you used an existing mail serve

Re: Microsoft Visual C++ and pyton

2005-01-31 Thread mike
Thanks Chris.. I was also advised to build the python core (pythoncore.vcproj) with my C++ program. By that way I would not have to load the python core anymore during runtime. Is this a good approach? I am currently using VC++ 7 and python 2.4. - mike Christopher De Vries wrote: > On Sun, Jan 30,

Re: Request for Feedback; a module making it easier to use regular expressions.

2005-01-31 Thread Skip Montanaro
Ken> rex is a module intended to make regular expressions easier to Ken> create and use... Have you checked out Ping's rxb module? http://lfw.org/python/ Skip -- http://mail.python.org/mailman/listinfo/python-list

  1   2   >