Re: 20050111: list basics

2005-05-16 Thread km
Hi all, > Perl's pack function will allow you to do direct memory access if you > ask it to via the "p" and "P" templates. can we do direct memory accessing in python also ? regards, KM -- http://mail.python.org/mailman/listinfo/python-list

Re: German spam event [was: Re: Schily ueber Deutschland]

2005-05-16 Thread Bernd Nawothnig
On 2005-05-16, François Pinard wrote: >> I don't think that post was really from MAL. It seems to be a >> sporgery attack on the newsgroup. Sigh. > For the last two days, I receive quite an amount of robotic rejects, > after my name was used as the forged From: Same with me after my follow-up.

Re: Safe eval, or how to get list from string

2005-05-16 Thread Edvard Majakari
[EMAIL PROTECTED] writes: > I've to use ConfigParser. > > It returns values that are exactly in the config file, so get string > variables like: > int1 with quotes and characers: "42" > this is easy to convert to int: > realint = int(int1) There's already a method getint() for that, you can just

Re: Jesus said, "I am the way, the truth and the life: no one can come to the Father(God)(in Heaven), but by me." (John 14:6) This means that if you die without trusting in Jesus Christ as your Lord and Saviour you will die in your sins and be forever sepa

2005-05-16 Thread Mike Meyer
[EMAIL PROTECTED] (Mike brown) writes: > In article <[EMAIL PROTECTED]>, "Bubba" <[EMAIL PROTECTED]> wrote: > >> I'm so glad you've decided what everyone believes >> > > > > Some of us don't. > > > > > > Believe that is. > > > > > > In anything in particular. Everybody should believe in som

Re: Have you tried eric3 ?

2005-05-16 Thread zlatozar
If you haven't tried PyDev(Eclipse plug-in) I'd encourage you to take a look. Here is URL: http://pydev.sourceforge.net/ -- http://mail.python.org/mailman/listinfo/python-list

Re: string.lstrip stripping too much?

2005-05-16 Thread M.E.Farmer
Roy Smith: > I suspect what you really want to be doing is using the os.path module. > It's got functions for tearing pathnames apart into components, and hides > all the uglyness like whether / or \ is the directory separator on your > particular system. I thought so too, maybe this will help. >

Re: Calling C/C++ not contained inside a .dll

2005-05-16 Thread Mike Meyer
[EMAIL PROTECTED] writes: > My question is.. > How do I get python scripts to call functions in my game code without > having to build a .dll that has the entire meat of my game inside of > it? Ultimately I want to be able to load scripts from my game and > have those scripts call functions in my

Re: Newbie : checking semantics

2005-05-16 Thread Mike Meyer
Dennis Lee Bieber <[EMAIL PROTECTED]> writes: > Or the infamous, and maybe urban legend, of the early FORTRAN > compiler in which literal constants weren't... > > call inc(1) > write(6, 100) 1 > 100 format("I5") > > > subroutine inc(i) > i = i + 1 > retur

Re: PythonWin + Tkinter = broken relation with WindowsXP !?!?!

2005-05-16 Thread Roger Upole
What version of pywin32 are you running ? You might want to try upgrading to build 204 if you haven't already. There was a bug where a toolbar registry key was written multiple times, which eventually fills up the registry and slows the machine down, along with some strange window behaviour.

Re: The world is really unstable these days......

2005-05-16 Thread Peter Hansen
Delaney, Timothy C (Timothy) wrote: > Absolutely. Another example of where these things can mess with > Spambayes is people replying to XL and correcting his horrendous > troll-posts. It makes it really hard for Spambayes to determine that > *anything* coming from XL is spam. Ouch. Point taken. -

Re: Detect console close

2005-05-16 Thread Peter Hansen
new pip wrote: > In Windows, when I double click on my .py file, the program runs with > a console. How can I detect when the console is closed? Any code > samples are appreciated. When the console has closed, your program has already exited, if I understand you correctly (which isn't certain: th

RE: Detect console close

2005-05-16 Thread new pip
> > >new pip wrote: >> In Windows, when I double click on my .py file, the program runs with >> a console. How can I detect when the console is closed? Any code >> samples are appreciated. > >When the console has closed, your program has already exited, if I >understand you correctly (which isn't

Re: Resizing VListBox on parent (wxPython)

2005-05-16 Thread Ivan Voras
Ivan Voras wrote: > - panel, vertical BoxSizer > - a single VListBox Forgot to mention it - I'm using wx.GROW flag on both of them. -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie : checking semantics

2005-05-16 Thread Stefan Nobis
"LDD" <[EMAIL PROTECTED]> writes: > The fact that python doesn't check if the symbol > AFunctionThatIsntDefined is defined, is really bad when you > develop big pieces of code. Yes, that's one of my two points, that i think are misfeatures in Python, too. The problem is, that Python don't disting

Re: Detect console close

2005-05-16 Thread Peter Hansen
new pip wrote: > Actually I want to do some clean up (or operation) before the program > actually exits. Is there any way to do that? Ah, that's easier. :-) It might help (if this answer isn't sufficient) to post a snippet of code showing a very small example that we could talk about. You might

Calling PySys_WriteStdout from embedded Python

2005-05-16 Thread Eli
Hello all, I'm embedding Python in my C application. The application makes several calls to PySys_WriteStdout from the main thread and so far it's ok. A problem occurs when I'm creating another thread (in Windows with CreateThread) and trying to call PySys_WriteStdout from there; at the first try i

Re: tree functions daily exercise

2005-05-16 Thread xah
K! http://en.wikipedia.org/wiki/K_programming_language Interesting. Looking at your program, they are so short. I don't know if they are full implementation or what... Btw, the functions listed at http://xahlee.org/PerlMathematica_dir/Matica.html are motly from Mathematica, except the Tree Index

Re: Detect console close

2005-05-16 Thread Duncan Booth
Peter Hansen wrote: > new pip wrote: >> Actually I want to do some clean up (or operation) before the program >> actually exits. Is there any way to do that? > > Ah, that's easier. :-) > > It might help (if this answer isn't sufficient) to post a snippet of > code showing a very small example t

Re: Mandrake 10.1 and Python 2.3.4

2005-05-16 Thread Joal Heagney
*sighs* Still not able to find a version of Mandrake Python which won't give me this problem, so I just went into site.py and edited it. Replace all occurances of sys.lib to "lib" and site.py loads up. Incidently it fixed all the other import issues that I'd been having with Python. Strange th

Re: BluWater: God is not a man

2005-05-16 Thread Anthra Norell
- Original Message - From: "flamesrock" <[EMAIL PROTECTED]> Newsgroups: microsoft.public.windowsxp.network_web, rec.music.beatles,rec.music.makers.guitar.acoustic, alt.showbiz.gossip,comp.lang.python To: Sent: Thursday, May 12, 2005 2:04 AM Subject: Re: BluWater: God is not a man > I'm c

Re: German spam event [was: Re: Schily ueber Deutschland]

2005-05-16 Thread Skip Montanaro
Bernd> Looks like another windows worm. Now they seem to come with a Bernd> more sofisticated 'payload'. I am sure that will increase in the Bernd> future. It is just the beginning ... Indeed. This turns out to be the Sober.Q worm. Sober.P infected gazillions of machines with its "

Re: problem uploading ZIP file tp PyPI

2005-05-16 Thread richard
John Machin wrote: > richard wrote: >> John Machin wrote: >> > Sorry in advance if this is not the correct forum ... >> >> Quite. The support link for PyPI is in the sidebar of the site. >> > > Tried that, when I was trying to register and getting strange error > messages about the user name, like

Reg Date string conversion into timestamp function

2005-05-16 Thread praba kar
Dear All, I have doubt regarding date string to time conversion function. In Python I cannot find flexible date string conversion function like php strtotime. I try to use following type function 1) parsedate function failed if a date string like below format "16-MAY-2005 01:26" 2)parsedate

Web server platform for beginner

2005-05-16 Thread Chris
Hi, I'm looking at python as a serious alternative for Windows Forms, C# and ASP.Net as it is completely open source. I've determined that wxPython is the best replacement for Windows Forms but have not managed to find a comprehensive list of all the web platforms that python runs on apart from Z

Re: An example in point 2

2005-05-16 Thread Steve Holden
Lee Cullens wrote: > *From: * [EMAIL PROTECTED] > *Subject: **RE:** **An example in point 2* > *Date: *May 15, 2005 8:35:01 PM EDT > *To: * [EMAIL PROTECTED] > > I guess Python is just a cover for this list.

cddb and mci produce an ImportError

2005-05-16 Thread flupke
Hi, i am in search of a cddb module for Python on windows. I stumbled upon http://sourceforge.net/projects/cddb-py but couldn't use it since the mci.dll is compiled against Python2.0. So i'm trying to rebuild it using Dev-C++. I've succeeded in building a dll but when i try a test program it ge

Re: 20050111: list basics

2005-05-16 Thread Steve Holden
km wrote: > Hi all, > > >>Perl's pack function will allow you to do direct memory access if you >>ask it to via the "p" and "P" templates. > > > can we do direct memory accessing in python also ? > > regards, > KM Not, I'm happy to say, without a C extension class to allow it. regards S

Re: Web server platform for beginner

2005-05-16 Thread kdahlhaus
Chris, CherryPy 2 is very easy to get started with. -- http://mail.python.org/mailman/listinfo/python-list

Re: Web server platform for beginner

2005-05-16 Thread Irmen de Jong
Chris wrote: > Hi, > > I'm looking at python as a serious alternative for Windows Forms, C# > and ASP.Net as it is completely open source. > > I've determined that wxPython is the best replacement for Windows Forms > but have not managed to find a comprehensive list of all the web > platforms tha

Re: Multiple "cmp"s chained one after another

2005-05-16 Thread Glauco Silva
You can try this : >>> l = [(2001, 5, 2),(2111,3,3),(1984, 3, 1), (2001, 1, 1)] >>> l.sort(lambda x = l[0],y = l[1] : cmp((x[1],x[2]),(y[1],y[2]))) - Original Message - From: "Volker Grabsch" <[EMAIL PROTECTED]> To: Sent: Saturday, May 14, 2005 7:09 AM Subject: Multiple "cmp"s chained on

command string good in subprocess.Popen(string) fails in process.Process(string)

2005-05-16 Thread Earl Eiland
The command string consists of "filename.exe instruction1 instruction2 ..." It works in subprocess, but in process, returns the error "can't find the file instruction1". How do I pass command line instructions in process.Process? I tried a list ['filename.exe', 'instruction1 instruction2 ...']

Re: Reg Date string conversion into timestamp function

2005-05-16 Thread Mike Meyer
praba kar <[EMAIL PROTECTED]> writes: > Dear All, > > I have doubt regarding date string to time > conversion function. In Python I cannot find flexible > date string conversion function like php strtotime. I > try to use following type > function > 1) parsedate function failed if a date str

Re: Reg Date string conversion into timestamp function

2005-05-16 Thread Peter Hansen
praba kar wrote: > I have doubt regarding date string to time > conversion function. In Python I cannot find flexible > date string conversion function like php strtotime. I > try to use following type > function > 1) parsedate function failed if a date string > like below format "16-MAY-2005

Re: command string good in subprocess.Popen(string) fails in process.Process(string)

2005-05-16 Thread Peter Hansen
Earl Eiland wrote: > The command string consists of "filename.exe instruction1 instruction2 > ..." It works in subprocess, but in process, returns the error "can't > find the file instruction1". > > How do I pass command line instructions in process.Process? I tried a > list ['filename.exe', 'i

Applying a function to a 2-D numarray

2005-05-16 Thread Matt Feinstein
Is there an optimal way to apply a function to the elements of a two-d array? What I'd like to do is define some function: def plone(x): return x+1 and then apply it elementwise to a 2-D numarray. I intend to treat the function as a variable, so ufuncs are probably not appropriate-- I reali

Re: problem uploading ZIP file tp PyPI

2005-05-16 Thread John Machin
On Mon, 16 May 2005 22:11:49 +1000, richard <[EMAIL PROTECTED]> wrote: >John Machin wrote: >> richard wrote: >>> John Machin wrote: >>> > Sorry in advance if this is not the correct forum ... >>> >>> Quite. The support link for PyPI is in the sidebar of the site. >>> >> >> Tried that, when I was

Re: command string good in subprocess.Popen(string) fails in process.Process(string)

2005-05-16 Thread Earl Eiland
from Trent Mick [EMAIL PROTECTED]: "You might be able to use or borrow code from my process.py module. process.py is very similar to Python 2.4's subprocess. It provides a ProcessOpen class (similar to subprocess' Popen). A ProcessOpen instance has wait() and kill() methods that work fine on Window

Re: question about the id()

2005-05-16 Thread Andrew Dalke
kyo guan wrote: > Can someone explain why the id() return the same value, and why > these values are changing? Thanks you. a=A() id(a.f) > 11365872 id(a.g) > 11365872 The Python functions f and g, inside of a class A, are unbound methods. When accessed through an instan

Dr. Dobb's Python-URL! - weekly Python news and links (May 16)

2005-05-16 Thread Simon Brunning
QOTW: "As you learn Python, you will find that your PHP code will improve, possibly becoming more and more concise until it disappears completely." - Jorey Bump (Responding to a quotaton of Sturgeon's law: "Ninety percent of everything is crap.") "fwiw, this is of course why google displays 10 res

Re: Newbie : checking semantics

2005-05-16 Thread Andrew Dalke
Stefan Nobis wrote: > The other point is a missing (optional) statement to end blocks > (so you optional don't have to mark block via whitespace). IMHO > this comes very handy in some cases (like mixing Python and HTML > like in PSP). From my experience i also would say beginners have > quite some

Ruby blocks finally coming to python? (was Re: python-dev Summary for 2005-04-16 through 2005-04-30

2005-05-16 Thread Ville Vainio
Just wanted to draw the attention by changing the subject line - see parent and especially: Tony> Tony> PEP 340 Proposed Tony> Tony> In the end, Guido decided that what he really wanted as a solution to Tony> `The Control Flow Management Probl

Re: Newbie : checking semantics

2005-05-16 Thread rbt
Andrew Dalke wrote: > Stefan Nobis wrote: > >>The other point is a missing (optional) statement to end blocks >>(so you optional don't have to mark block via whitespace). IMHO >>this comes very handy in some cases (like mixing Python and HTML >>like in PSP). From my experience i also would say beg

Re: Web server platform for beginner

2005-05-16 Thread Chris
If only i'd seen that page ;-) Thanks for the heads up Cheers, - Chris. -- http://mail.python.org/mailman/listinfo/python-list

Dr. Dobb's Python-URL! - weekly Python news and links (May 16)

2005-05-16 Thread Simon Brunning
QOTW: "As you learn Python, you will find that your PHP code will improve, possibly becoming more and more concise until it disappears completely." - Jorey Bump (Responding to a quotaton of Sturgeon's law: "Ninety percent of everything is crap.") "fwiw, this is of course why google displays 10 res

Re: space saving retitle of thread

2005-05-16 Thread Johnny Gentile
And this is OK w/ Google? -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Polymorphism

2005-05-16 Thread Steffen Glückselig
> Ah, that's not polymorphism; it's method overloading. And AFAIK it is > not possible in Python. It IS polymorphism. Not the one one is usually referring to, but it is. Overloading is an 'ad hoc'-polymorphism. regards Steffen -- http://mail.python.org/mailman/listinfo/python-list

Structuring larger applications - ideas

2005-05-16 Thread [EMAIL PROTECTED]
Hello, I'm busy with a large application and feel it would eas my work if I can specify dependencies on the granularity of packages, rather than modules and classes. Eg: - By convention I do the one class per file thing. SO in python this means one class per module - naming classes after their

Re: Is isinstance always "considered harmful"?

2005-05-16 Thread Jordan Rastrick
Leif K-Brooks wrote: > Regardless of the various issues surrounding isinstance(), you have a > difference in functionality. Since you're just storing a reference in > the case of another LinkedList instead of copying it, mutating the > LinkedList will be different from mutating another iterable t

Re: mod_python and logging

2005-05-16 Thread Vinay Sajip
Daniel Lichtenberger yahoo.de> writes: > I'm looking for a logging module to be used in a mod_python-powered > website. Python 2.3's logging package seems like a good fit, however > I'm not sure if it's completely safe to use it under high load. The > library documentation states that it's thread

Re: Structuring larger applications - ideas

2005-05-16 Thread Dave Brueck
[EMAIL PROTECTED] wrote: > I'm busy with a large application and feel it would eas my work if I > can specify dependencies on the granularity of packages, rather than > modules and classes. Eg: > > - By convention I do the one class per file thing. SO in python this > means one class per module

Re: Is isinstance always "considered harmful"?

2005-05-16 Thread Jordan Rastrick
Thanks for the replies, everyone. As is usual when reading comp.lang.python, I got some invaluable exposure to new ideas (multiple dispatching in particular seems to fill a gap I've felt in OO programming in the past.) I'm starting to think this newsgroup is in its own right an excellent reason to

Re: space saving retitle of thread

2005-05-16 Thread don hindenach
On Mon, 16 May 2005 14:30:07 UTC, "Johnny Gentile" <[EMAIL PROTECTED]> wrote: > And this is OK w/ Google? > most assurredly not. the google police will come to your house and shake it until all the electrons fall out, and you can no longer connect to the internet you Have Been Warned -- -

Re: Importing and namespace visibility

2005-05-16 Thread bruno modulix
jean-marc wrote: > As an application programmer, I'm not well versed in the material > aspects of computing (memory, cpu, bus and all). My understanding of > imports in Python is such: the __main__ program is the center piece > which holds the programs reference: globals, functions, classes, > modu

Re: Optimise Europython competition

2005-05-16 Thread Carl Friedrich Bolz
Jacob Hallen wrote: > 2. A track should be continuous. Each track that is continuous gives you >10 points. What exactly do you mean by "continuous track"? Regards Carl Friedrich -- http://mail.python.org/mailman/listinfo/python-list

Re: python-dev Summary for 2005-04-16 through 2005-04-30

2005-05-16 Thread Kay Schluehr
Tony Meyer wrote: > [The HTML version of this Summary is available at > http://www.python.org/dev/summary/2005-04-16_2005-04-30.html] > > > > == > Summary Announcements > == > > --- > Exploding heads > --- > > After a gentle introduct

Re: Structuring larger applications - ideas

2005-05-16 Thread Iwan Vosloo
I know my foreign (to python) one class per module idea is what makes life more difficult for me here. And there is an argument to be made out that it is a stupid remnant I stick to from having used it in other programming languages (do I have to admit C++ in my background?) Two small examples o

Re: Structuring larger applications - ideas

2005-05-16 Thread Iwan Vosloo
I know my foreign (to python) one class per module idea is what makes life more difficult for me here. And there is an argument to be made out that it is a stupid remnant I stick to from having used it in other programming languages (do I have to admit C++ in my background?) Two small examples o

Re: Structuring larger applications - ideas

2005-05-16 Thread John Roth
"Iwan Vosloo" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > I know my foreign (to python) one class per module idea is what makes > life more difficult for me here. And there is an argument to be made > out that it is a stupid remnant I stick to from having used it in other > pr

newbie - variable "buried in quotes"

2005-05-16 Thread plsullivan
I've got a variable deep inside some quotes needed by the application I am using. I can't figure out how to make this work. (Also, is there a line continuation character?) Thanks in advance, Phil luser = win32api.GetUserName() gp.FeatureclassToCoverage_conversion("'Database [EMAIL PROTECTED]' POL

Re: question about the id()

2005-05-16 Thread Peter Dembinski
Skip Montanaro <[EMAIL PROTECTED]> writes: > kyo> Can someone explain why the id() return the same value, and > kyo> why these values are changing? > > Instance methods are created on-the-fly. So, the interpreter creates new 'point in address space' every time there is object-dot-method

Re: Importing and namespace visibility

2005-05-16 Thread jean-marc
Merci Bruno, ( and also to Fredrik ) So I think I understand correctly, if I say that: each modulkes requires its own set of reference to whatever objects it needs to speak. The interpreter wil see not to create extra copies of the compiled code if many modules import the same modules but will mak

Re: Quick Reference from module doc strings.

2005-05-16 Thread Scott David Daniels
Ron Adam wrote: > Do you have any feature suggestions, additional information that could > go in, something that would extend the content in some way and make it > more useful? > > As it stands now, it could be just a module, so you could... > The style is still a sticking point for me -- too m

Re: newbie - variable "buried in quotes"

2005-05-16 Thread Bernd Nawothnig
On 2005-05-16, plsullivan wrote: > I've got a variable deep inside some quotes needed by the application I > am using. I can't figure out how to make this work. (Also, is there a > line continuation character?) > luser = win32api.GetUserName() > gp.FeatureclassToCoverage_conversion("'Database > [

Re: command string good in subprocess.Popen(string) fails in process.Process(string)

2005-05-16 Thread Peter Hansen
Earl Eiland wrote: > from Trent Mick [EMAIL PROTECTED]: > "You might be able to use or borrow code from my process.py module. Few here have ever heard of it, I suspect. Maybe you should ask Trent for help? > >>Earl Eiland wrote: >> >>>The command string consists of "filename.exe instruction1 i

Re: command string good in subprocess.Popen(string) fails in process.Process(string)

2005-05-16 Thread Trent Mick
[Earl Eiland wrote] > > The command string consists of "filename.exe instruction1 instruction2 > ..." It works in subprocess, but in process, returns the error "can't > find the file instruction1". > > How do I pass command line instructions in process.Process? I tried a > list ['filename.exe'

Re: newbie - variable "buried in quotes"

2005-05-16 Thread plsullivan
If I follow your response Bernd, it looks like you interpreted that as several lines. It actually should all be on one line. That's what made me wonder if there is a line continuation character. Phil -- http://mail.python.org/mailman/listinfo/python-list

Re: newbie - variable "buried in quotes"

2005-05-16 Thread Peter Hansen
plsullivan wrote: > I've got a variable deep inside some quotes needed by the application I > am using. I can't figure out how to make this work. (Also, is there a > line continuation character?) > Thanks in advance, > Phil > > luser = win32api.GetUserName() > > gp.FeatureclassToCoverage_conversi

Re: question about the id()

2005-05-16 Thread Andrew Dalke
Peter Dembinski wrote: > So, the interpreter creates new 'point in address space' every time > there is object-dot-method invocation in program? Yes. That's why some code hand-optimizes inner loops by hoisting the bound objection creation, as data = [] data_append = data.append for x in some_oth

Re: newbie - variable "buried in quotes"

2005-05-16 Thread Peter Hansen
Peter Hansen wrote: > The % operator goes immediately after the string on which it operates: > > gp.FeatureclassToCoverage_conversion("'Database > [EMAIL PROTECTED]' > POLYGON" % luser, prcl83, "", "DOUBLE") Missed your buried question about line continuations. Yes, there is one, and it's the c

Re: newbie - variable "buried in quotes"

2005-05-16 Thread plsullivan
Thanks guys but I am still not getting it. This part --> gp.FeatureclassToCoverage_conv­ersion("'Database [EMAIL PROTECTED]' POLYGON", prcl83, "", "DOUBLE") <-- % luser is one long command. I need to be able to insert the luser variable deep in the middle of that. Phil -- http://mail.pytho

Re: python-dev Summary for 2005-04-16 through 2005-04-30

2005-05-16 Thread Steven Bethard
Kay Schluehr wrote: > but PEP 340 is already withdrawn by the BDFL. > There won't be any Ruby-like blocks because they hide control flow. Well, there won't be any blocks that can perform *arbitrary* control flow, but it does look like we might have blocks that can perform try/finally-like acquis

Re: newbie - variable "buried in quotes"

2005-05-16 Thread Bernd Nawothnig
On 2005-05-16, plsullivan wrote: > If I follow your response Bernd, it looks like you interpreted that as > several lines. It actually should all be on one line. That's what made > me wonder if there is a line continuation character. The lines are concatenated to one string as I wrote it. See al

Re: Applying a function to a 2-D numarray

2005-05-16 Thread Steven Bethard
Matt Feinstein wrote: > Is there an optimal way to apply a function to the elements of a two-d > array? > > What I'd like to do is define some function: > > def plone(x): > return x+1 > > and then apply it elementwise to a 2-D numarray. I intend to treat the > function as a variable, so ufu

Re: Newbie : checking semantics

2005-05-16 Thread Stefan Nobis
Andrew Dalke <[EMAIL PROTECTED]> writes: > When you say "beginners" is that people with no previous > programming experience >From time to time I teach some programming (in an institution called "Volkshochschule" here in Germany -- inexpensive courses for adults). My Python course is for absolute

Re: Newbie : checking semantics

2005-05-16 Thread Stefan Nobis
rbt <[EMAIL PROTECTED]> writes: > True beginners (no programming experience whatsoever) don't have > to deal with unlearning stuff such as the bracket plague. That's true. But they also not very used to give nothing (-> whitespace) a meaning. I teached quite some beginners and most of them had pr

Re: newbie - variable "buried in quotes"

2005-05-16 Thread Bernd Nawothnig
On 2005-05-16, plsullivan wrote: > Thanks guys but I am still not getting it. This part --> > gp.FeatureclassToCoverage_conv­ersion("'Database > [EMAIL PROTECTED]' > POLYGON", prcl83, "", "DOUBLE") <-- % luser is one long command. Yes, I understood you perfectly well. > I need to be able to

Re: newbie - variable "buried in quotes"

2005-05-16 Thread plsullivan
Ok, I see how concatenation is called for here. I'll try to use the tutorial to figure that one out. Look out I'll probably be back! Thanks for the help. Phil -- http://mail.python.org/mailman/listinfo/python-list

Re: Anyway to designating the encoding of the "source" for compile?

2005-05-16 Thread janeaustine50
[EMAIL PROTECTED] wrote: > Python's InteractiveInterpreter uses the built-in compile function. > > According to the ref. manual, it doesn't seem to concern about the > encoding of the source string. > > When I hand in an unicode object, it is encoded in utf-8 automatically. > It can be a problem wh

Re: question about the id()

2005-05-16 Thread Bengt Richter
On Mon, 16 May 2005 18:30:47 +0200, Peter Dembinski <[EMAIL PROTECTED]> wrote: >Skip Montanaro <[EMAIL PROTECTED]> writes: > >> kyo> Can someone explain why the id() return the same value, and >> kyo> why these values are changing? >> >> Instance methods are created on-the-fly. > >So, th

Re: question about the id()

2005-05-16 Thread Bengt Richter
On Mon, 16 May 2005 16:57:12 GMT, Andrew Dalke <[EMAIL PROTECTED]> wrote: >Peter Dembinski wrote: >> So, the interpreter creates new 'point in address space' every time >> there is object-dot-method invocation in program? > >Yes. That's why some code hand-optimizes inner loops by hoisting >the bo

Re: python-dev Summary for 2005-04-16 through 2005-04-30

2005-05-16 Thread TZOTZIOY
On Mon, 16 May 2005 12:06:18 +1200, rumours say that "Tony Meyer" <[EMAIL PROTECTED]> might have written: >A request for anonymous blocks by Shannon -jj Behrens launched a >massive discussion about a variety of related ideas. This discussion >is split into different sections for the sake of readab

Re: wxPython and a Control Property Editor

2005-05-16 Thread [EMAIL PROTECTED]
Please, if anyone can help -- http://mail.python.org/mailman/listinfo/python-list

Re: Applying a function to a 2-D numarray

2005-05-16 Thread Matt Feinstein
On Mon, 16 May 2005 11:07:06 -0600, Steven Bethard <[EMAIL PROTECTED]> wrote: > >I must be missing something, because the simplest possible thing seems >to work for me: > >py> import numarray as na >py> def plus1(arr): >... return arr + 1 >... >py> def apply_func(arr, f): >... return f(a

trouble with copy/deepcopy

2005-05-16 Thread Alexander Zatvornitskiy
Hello! I have trouble with copy/deepcopy. It seems, I just don't understand something. Please explain where things goes wrong and how to do it the right way. I have one class: class Distribution: __gr_on_transp=dict() __ostatok_m=dict() and so on And, I want to make full copy of it: d1=Dist

optparse global

2005-05-16 Thread [EMAIL PROTECTED]
Hello, How do i make an option passed through command line, using optparse global. I need to import this value in another file. This is what iam trying to do. $python test.py -d i should be able to store '' as global so that i could access this value in another file. If

Re: optparse global

2005-05-16 Thread Skip Montanaro
Ashton> How do i make an option passed through command line, using Ashton> optparse global. I need to import this value in another file. Place the parser's output at the module scope. global options parser = OptionParser() parser.add_option("-p", "--port", dest="port", defaul

Re: python-dev Summary for 2005-04-16 through 2005-04-30

2005-05-16 Thread Ville Vainio
> "Kay" == Kay Schluehr <[EMAIL PROTECTED]> writes: Kay> but PEP 340 is already withdrawn by the BDFL. [1] Kay> There won't be any Ruby-like blocks because they hide control Kay> flow. Bummer. I would have greatly enjoyed seeing the only real reason for choosing Ruby over Python

ElemenTree and namespaces

2005-05-16 Thread Matthew Thorley
Does any one know if there a way to force the ElementTree module to print out name spaces 'correctly' rather than as ns0, ns1 etc? Or is there at least away to force it to include the correct name spaces in the output of tostring? I didn't see anything in the api docs or the list archive, but befo

Re: Applying a function to a 2-D numarray

2005-05-16 Thread Steven Bethard
Matt Feinstein wrote: > On Mon, 16 May 2005 11:07:06 -0600, Steven Bethard > <[EMAIL PROTECTED]> wrote: > > > >>I must be missing something, because the simplest possible thing seems >>to work for me: >> >>py> import numarray as na >>py> def plus1(arr): >>... return arr + 1 >>... >>py> def

CGI on Windows

2005-05-16 Thread Rainer Mansfeld
Hi all, I'm running the following script as a minimalistic CGI server on Windows ME: httpd.py from BaseHTTPServer import HTTPServer from CGIHTTPServer import CGIHTTPRequestHandler server = HTTPServer(("", 8080), CGIHTTPRequestHandler) server.serve_forever() This works

Re: incorrect(?) shlex behaviour

2005-05-16 Thread Donn Cave
In article <[EMAIL PROTECTED]>, "bill" <[EMAIL PROTECTED]> wrote: > Consider: > >>> import shlex > >>> shlex.split('$(which sh)') > ['$(which', 'sh)'] > > Is this behavior correct? It seems that I should > either get one token, or the list > ['$','(','which','sh',')'], > but certainly breaking

abut COM using PythonCOM

2005-05-16 Thread flyaflya
I know using ActivePython can make a COM easily,but I wander how to distribute the COM,normal COM can be installed by "regsvr32", but how to install this COM? and can the code be compiled by py2exe? -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie : checking semantics

2005-05-16 Thread rbt
Stefan Nobis wrote: > rbt <[EMAIL PROTECTED]> writes: > > >>True beginners (no programming experience whatsoever) don't have >>to deal with unlearning stuff such as the bracket plague. > > > That's true. But they also not very used to give nothing (-> > whitespace) a meaning. I teached quite so

Re: Jesus said, "I am the way, the truth and the life: no one can come to the Father(God)(in Heaven), but by me." (John 14:6) This means that if you die without trusting in Jesus Christ as your Lord and Saviour you will die in your sins and be forever sepa

2005-05-16 Thread Philippe C. Martin
No need to, just give the guy a glass of water and he'll fix it for you Mike Meyer wrote: > [EMAIL PROTECTED] (Mike brown) writes: > >> In article <[EMAIL PROTECTED]>, "Bubba" <[EMAIL PROTECTED]> >> wrote: >> >>> I'm so glad you've decided what everyone believes >>> >> >> >> >> Some of us

[ANN] pysqlite 2.0.0 final released!

2005-05-16 Thread Gerhard Haering
Hello everyone, After pondering about a redesign of pysqlite for years, and now after half a year of development, I am happy to finally announce the first stable release of pysqlite2. pysqlite a DB-API 2.0-compliant database interface for SQLite. SQLite is a relational database management system

Re: question about the id()

2005-05-16 Thread Peter Dembinski
[EMAIL PROTECTED] (Bengt Richter) writes: [snap] >>So, the interpreter creates new 'point in address space' every time >>there is object-dot-method invocation in program? [optimization] > BTW, a typical performance optimization (not done automatically by python) > is to hoist unchanging-value e

Recommended version of gcc for Python?

2005-05-16 Thread Dave Kuhlman
Is there a recommended version of gcc that I should be using to compile Python? I've compiled Python 2.4 with gcc 3.3.4 on Ubuntu Debian GNU/Linux. However, I notice that gcc 3.5 and gcc 4.0 are available for installation. Dave -- http://www.rexx.com/~dkuhlman -- http://mail.python.org/mailm

Re: trouble with copy/deepcopy

2005-05-16 Thread [EMAIL PROTECTED]
Alexander Zatvornitskiy wrote: > Hello! > > I have trouble with copy/deepcopy. It seems, I just don't understand something. > Please explain where things goes wrong and how to do it the right way. > > I have one class: > > class Distribution: > __gr_on_transp=dict() > __ostatok_m=dict() > and

Python RPM and CentOS

2005-05-16 Thread rbt
Not really a Python question, but I thought some on this list may be able to answer so here goes: I have several machines on which I must install CentOS. There are many updates to CentOS and it's very time consuming to do the updates over the network. I have a local copy of all of the updat

Re: mod_python and logging

2005-05-16 Thread Daniel Lichtenberger
Hi! Vinay Sajip wrote: > If you want to have multiple processes logging to the same file, the > standard Python logging module does not support interprocess > synchronisation directly. However, it is fairly easy to set up the > processes to log events to a socket, and a socket receiver can log >

  1   2   >