Re: Does python hate cathy?

2008-03-24 Thread Patrick Mullen
It seems like this is mostly a non-issue. The original code actually works correctly (of course the updated versions that solve the exception problem are probably better). The only thing that is going haywire is the interpreter shutdown process. I think it is going a bit overboard to "consider _

Re: Does python hate cathy?

2008-03-24 Thread Gabriel Genellina
En Tue, 25 Mar 2008 02:09:58 -0300, Edward A. Falk <[EMAIL PROTECTED]> escribió: > However, Adding > > self.myclass = Person > > to the __init__() method didn't stop the problem. I thought it might, > because > then each of the objects would have held a reference to Person. > Actuall

Re: Does python hate cathy?

2008-03-24 Thread Edward A. Falk
Interestingly, if you change swaroop = Person('Swaroop', 'M') swaroop.sayHi() swaroop.howMany() kalam = Person('Abdul Kalam', 'M') kalam.sayHi() kalam.howMany() cathy = Person('Catherine', 'F') cathy.sayHi() cathy.howMany() swaroop.sayHi() swaroop.howMany() to def main()

Non-buffering stdout

2008-03-24 Thread Cecil Westerhof
With python -u script, you can make stdout unbuffered. Is there a way to do it in the script itself? I use just a script with a shebang (#!/usr/bin/env python) and then it is not possible to use -u. -- http://mail.python.org/mailman/listinfo/python-list

Re: "Soup Strainer" for ElementSoup?

2008-03-24 Thread John Nagle
erikcw wrote: > Hi all, > > I was reading in the Beautiful Soup documentation that you should use > a "Soup Strainer" object to keep memory usage down. > > Since I'm already using Element Tree elsewhere in the project, I > figured it would make sense to use ElementSoup to keep the api > consisten

Re: Python 2.2.1 and select()

2008-03-24 Thread Gabriel Genellina
En Mon, 24 Mar 2008 23:03:56 -0300, Derek Martin <[EMAIL PROTECTED]> escribió: > On Mon, Mar 24, 2008 at 05:52:54PM -0700, Noah wrote: >> On Mar 24, 2:58 pm, Derek Martin <[EMAIL PROTECTED]> wrote: >> > If and only if the total amount of output is greater than the >> > specified buffer size, then

Re: Beautiful Soup Looping Extraction Question

2008-03-24 Thread Paul McGuire
On Mar 24, 7:56 pm, Tess <[EMAIL PROTECTED]> wrote: > > Anyhow, a simple regex took care of the issue in BS: > > for i in soup.findAll(re.compile('^p|^div'),align=re.compile('^center| > ^left')): >     print i > But I thought you only wanted certain combinations: "My goal is to extract all elem

Re: Is IronPython real Python?

2008-03-24 Thread Benjamin
On Mar 24, 12:00 pm, jmDesktop <[EMAIL PROTECTED]> wrote: > I know that IronPython and CPython are different in that one does not > use the .net framework, but are they both really the same Python > language. From my basic understanding, it will depend on what the > programmer's goal is as to whic

Python based server Uptime

2008-03-24 Thread Jaimy Azle
Hi, I'm just curious, if anyone ever implement python based application server just like CheryPy, Django, TinyERP, or something else, how many requests do they proceed and what is the longest runing server ever reached before downtime? Salam, -Jaimy. -- http://mail.python.org/mailman/list

Re: Python 2.2.1 and select()

2008-03-24 Thread Derek Martin
On Mon, Mar 24, 2008 at 05:52:54PM -0700, Noah wrote: > On Mar 24, 2:58 pm, Derek Martin <[EMAIL PROTECTED]> wrote: > > If and only if the total amount of output is greater than the > > specified buffer size, then reading on this file hangs indefinitely. > I think this is more of a limitation with

Re: Calling a shared library using C types

2008-03-24 Thread Nathan Harmston
On 25/03/2008, Gabriel Genellina <[EMAIL PROTECTED]> wrote: > > En Mon, 24 Mar 2008 19:56:08 -0300, Nathan Harmston > <[EMAIL PROTECTED]> escribió: > > > > import ctypes > > t = ctypes.CDLL('./Simulation.so') > > this works fine, I have a simple function I ve put in for testing which > > just > > r

New Full Tkinter document editor widget -- suggestions, comments, etc.

2008-03-24 Thread Ron Provost
I've posted a demo (http://tkinter.unpy.net/wiki/StyledEditor). This demo creates a widget with full "styled editing" capabilities; sort of a mini-word processor. It runs "as is" on my WinXP machine with Python 2.5. The demo allows styling of any selected text via toolbars; just select the te

RE: Breaking the barrier of a broken paradigm... part 1

2008-03-24 Thread Ryan Ginstrom
> On Behalf Of john s. > import os, sys, string, copy, getopt, linecache > from traceback import format_exception > > #The file we read in... > fileHandle = "/etc/passwd" > srcFile = open(fileHandle,'r') > srcList = srcFile.readlines() > > #yah, a for loop that "iterates" through the file of "lin

Re: Calling a shared library using C types

2008-03-24 Thread Gabriel Genellina
En Mon, 24 Mar 2008 19:56:08 -0300, Nathan Harmston <[EMAIL PROTECTED]> escribió: > import ctypes > t = ctypes.CDLL('./Simulation.so') > this works fine, I have a simple function I ve put in for testing which > just > returns the integer 4. However when I try to access this function it > doe

Breaking the barrier of a broken paradigm... part 1

2008-03-24 Thread john s.
Hi Everyone, I hope not to offend you with too many question.. I've been lurking a long time. I'm not keen on keeping e-mails or data stored in the public space so this is my first post to the group. That being said, I'm keen on refining my skills, I hope that I can prove that I've move on beyond

Re: Beautiful Soup Looping Extraction Question

2008-03-24 Thread Tess
Paul - thanks for the input, it's interesting to see how pyparser handles it. Anyhow, a simple regex took care of the issue in BS: for i in soup.findAll(re.compile('^p|^div'),align=re.compile('^center| ^left')): print i Thanks again! T -- http://mail.python.org/mailman/listinfo/python-li

Re: Python 2.2.1 and select()

2008-03-24 Thread Noah
On Mar 24, 2:58 pm, Derek Martin <[EMAIL PROTECTED]> wrote: > If and only if the total amount of output is greater than the > specified buffer size, then reading on this file hangs indefinitely. > For what it's worth, the program whose output I need to capture with > this generates about 17k of out

Re: New to group

2008-03-24 Thread pythonnubie
On Mar 24, 12:18 pm, George Sakkis <[EMAIL PROTECTED]> wrote: > On Mar 24, 3:13 pm, pythonnubie <[EMAIL PROTECTED]> wrote: > > > > > > > > > i  have  come across my first exeption using randrange . The exeption > > > > is " no such  attribute " in  module random > > > > > platform  is xp  home  and

Re: Why I hate lambdas (Re: Do any of you recommend Python as afirst programming language?)

2008-03-24 Thread Terry Reedy
"Arnaud Delobelle" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >From what I remember when I looked at the source: stack frames execute code objects, not functions. They don't know what function has spawned them, only what code object they are executing. In fact when one thinks o

Re: Beautiful Soup Looping Extraction Question

2008-03-24 Thread Paul McGuire
On Mar 24, 6:32 pm, Tess <[EMAIL PROTECTED]> wrote: > Hello All, > > I have a Beautiful Soup question and I'd appreciate any guidance the > forum can provide. > I *know* you're using Beautiful Soup, and I *know* that BS is the de facto HTML parser/processor library. Buut, I just couldn't help

PyGTK localisation on Win32

2008-03-24 Thread jwesonga
I've built an app on linux which we have managed to localise into at least three languages, the app runs well using this command LANG=fr_FR python app.py which would translate the app into french. We've tried the replicate the same principle on windows but so far nothing works, the app will need to

Re: Serving another web site which requires authentication

2008-03-24 Thread hasnihon . support
Hi binaryj, Yeah I feel lucky, thanks... Well, actually, I want my users to be able to see the auction information about some vehicles. It's a Japanese site (https://www.iauc.co.jp/) I've no experience about the proxy staff, but when I googled I found; - Twisted - pyCurl but, I don't know how to

Re: urllib leaves connections/sockets waiting. BIG problem!!!

2008-03-24 Thread Jonathan Gardner
On Mar 24, 6:57 am, binaryj <[EMAIL PROTECTED]> wrote: > hi i am using urllib2 to do some automated web thing. > basically i hit on sites and check the price what they are offering > for their product and then decide if i want to lower or increase my > pricing.so in short i have to hit hundreds of

Beautiful Soup Looping Extraction Question

2008-03-24 Thread Tess
Hello All, I have a Beautiful Soup question and I'd appreciate any guidance the forum can provide. Let's say I have a file that looks at file.html pasted below. My goal is to extract all elements where the following is true: and . The lines should be ordered in the same order as they appear in

Re: Shortcutting the function call stack

2008-03-24 Thread Arnaud Delobelle
On Mar 24, 10:05 pm, Julien <[EMAIL PROTECTED]> wrote: > Hi all, and thanks a lot for your answers! > > I'll try to explain a bit more what I'm after, and hopefully that will > be clearer. In fact, what I'm trying to do is to "hijack" (I'm making > up the term) a function: > > def hijacker(arg): >

Re: Shortcutting the function call stack

2008-03-24 Thread John Machin
On Mar 25, 9:05 am, Julien <[EMAIL PROTECTED]> wrote: > Hi all, and thanks a lot for your answers! > > I'll try to explain a bit more what I'm after, and hopefully that will > be clearer. In fact, what I'm trying to do is to "hijack" (I'm making > up the term) a function: > > def hijacker(arg): >

Re: Calling a shared library using C types

2008-03-24 Thread Nathan Harmston
Hi, I know this is a pretty simple question but I've spent a while on this and can't see whats wrong. I'm trying to access a shared library which I've created called Simulation.so, its created as such (snip from makefile): all: simulation simulation: Simulation.so Simulation.so: Simulation.o St

Re: Paramiko bugs out on windows 2003 server

2008-03-24 Thread John Machin
On Mar 25, 7:50 am, "Tarun Kapoor" <[EMAIL PROTECTED]> wrote: > I am using the paramiko library to pull a data from a server using SFTP. > It works perfect on a windows xp machine but bugs out a windows 2003 > server. I get the following error: > Traceback (most recent call last): > File "S:\Temp

Re: Need help calling a proprietary C DLL from Python

2008-03-24 Thread Craig
On Mar 24, 3:45 pm, Craig <[EMAIL PROTECTED]> wrote: > On Mar 24, 12:27 pm, Craig <[EMAIL PROTECTED]> wrote: > > > > > On Mar 23, 7:59 pm, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > > > > On Sun, 23 Mar 2008 14:24:52 -0700 (PDT), Craig <[EMAIL PROTECTED]> > > > declaimed the following in comp.l

Re: FW:Reading new mail from outlook express using Python

2008-03-24 Thread Grant Edwards
On 2008-03-24, SPJ <[EMAIL PROTECTED]> wrote: > I am trying to create new tickets in the ticketing system > using python. When I receive new email from a particular > address, I have to trigger the python script and parse the > mail in required format. > > The main hurdle here is, how to invoke t

Python 2.2.1 and select()

2008-03-24 Thread Derek Martin
Hi kids! I've got some code that uses select.select() to capture all the output of a subprocess (both stdout and stderr, see below). This code works as expected on a variety of Fedora systems running Python > 2.4.0, but on a Debian Sarge system running Python 2.2.1 it's a no-go. I'm thinking thi

Re: Shortcutting the function call stack

2008-03-24 Thread Julien
Hi all, and thanks a lot for your answers! I'll try to explain a bit more what I'm after, and hopefully that will be clearer. In fact, what I'm trying to do is to "hijack" (I'm making up the term) a function: def hijacker(arg): if I_feel_its_necessary: hijack_caller_function_and_make_

Re: Reading new mail from outlook using Python

2008-03-24 Thread Pete Stapley
Well on a FreeBSD/Unix system you can use the .forward to pipe the incoming mail for a user to a program. Below is the contents of my .forward that invokes procmail. "|/usr/local/bin/procmail -m /path/to/conf/.procmailrc" So I imagine you could do something like this in a .forward. "|/path/myp

FW:Reading new mail from outlook express using Python

2008-03-24 Thread SPJ
My previous post was not clear, hence resending this. - Hi, I am trying to create new tickets in the ticketing system using python. When I receive new email from a particular address, I have to trigger the python script and parse the mail in required format. The main

Reading new mail from outlook using Python

2008-03-24 Thread SPJ
Hi,I am trying to create new tickets in the ticketing system using python. When I receive new email from a particular address, I have to trigger the python script and parse the mail  in required format. The  main hurdle here is,  how to invoke the script on arrival of new mail? I checked the outloo

Reading new mail from outlook

2008-03-24 Thread SPJ
Hi,I am trying to create new tickets in the ticketing system using python. When I receive new email from a particular address, I have to trigger the python script and parse the mail  in required format. The  main hurdle here is,  how to invoke the script on arrival of new mail? I checked the outloo

Paramiko bugs out on windows 2003 server

2008-03-24 Thread Tarun Kapoor
I am using the paramiko library to pull a data from a server using SFTP. It works perfect on a windows xp machine but bugs out a windows 2003 server. I get the following error: Traceback (most recent call last): File "S:\Temp\ftpBOA.py", line 5, in ? import paramiko File "C:\Python23\lib\pa

Re: encoding/decoding issue with python2.5 and pymssql

2008-03-24 Thread Rob Williscroft
Tzury Bar Yochay wrote in news:3a6c32fe-e7c1-4230-882d-efb3415196c1 @b1g2000hsg.googlegroups.com in comp.lang.python: > for example: > the value > 'EE604EE3-4AB0-4EE7-AF4D-018124393CD7' > is represent as > '\xe3N`\xee\xb0J\xe7N\xafM\x01\x81$9<\xd7' > from uuid import * u = UUID( bytes = '\xe3N`

SoC project: Python-Haskell bridge - request for feedback

2008-03-24 Thread Michał Janeczek
Hi, I am a student interested in participating in this year's SoC. At http://tsk.ch.uj.edu.pl/~janeczek/socapp.html (and also below in this email) you can find a draft of my project proposal. I'd like to ask you to comment on it, especially the deliverables part. Are you interested in such a proj

Re: Is this doable

2008-03-24 Thread Tobiah
> I have a little problem. I have a script that is in the scheduler > (win32). But every now and then I update this script and I dont want > to go to every computer and update it. Can't you just put the script on a network share? Tobiah -- Posted via a free Usenet account from http://www.terane

Re: PyCon video editing

2008-03-24 Thread Mike Driscoll
On Mar 18, 10:09 am, amk <[EMAIL PROTECTED]> wrote: > On Mar 17, 10:00 pm, dundeemt <[EMAIL PROTECTED]> wrote: > > > Anyone know who is in charge of this? I'd like to help out if I > > could. > > I am, but haven't set anything up yet, such as a mailing list or a > host for the video. > I'll update

Re: beginners question about return value of re.split

2008-03-24 Thread klaus
On Fri, 21 Mar 2008 13:34:27 -0700, John Machin wrote: > On Mar 22, 2:53 am, klaus <[EMAIL PROTECTED]> wrote: >> On Fri, 21 Mar 2008 10:31:20 -0500, Tim Chase wrote: >> >> <..> >> >> Ok thank you ! >> >> I think I got a bit lost in all the possibilities python has to offer. > > IMHO you g

Re: Need help calling a proprietary C DLL from Python

2008-03-24 Thread Craig
On Mar 24, 12:27 pm, Craig <[EMAIL PROTECTED]> wrote: > On Mar 23, 7:59 pm, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > > > > > On Sun, 23 Mar 2008 14:24:52 -0700 (PDT), Craig <[EMAIL PROTECTED]> > > declaimed the following in comp.lang.python: > > > > This dll was designed to be used from eithe

Re: New to group

2008-03-24 Thread pythonnubie
On Mar 24, 12:18 pm, George Sakkis <[EMAIL PROTECTED]> wrote: > On Mar 24, 3:13 pm, pythonnubie <[EMAIL PROTECTED]> wrote: > > > > > > > > > i  have  come across my first exeption using randrange . The exeption > > > > is " no such  attribute " in  module random > > > > > platform  is xp  home  and

Re: New to group

2008-03-24 Thread George Sakkis
On Mar 24, 3:13 pm, pythonnubie <[EMAIL PROTECTED]> wrote: > > > i have come across my first exeption using randrange . The exeption > > > is " no such attribute " in module random > > > > platform is xp home and the python build is activestate 2.5 > > > Welcome aboard! > > > There's defini

Re: New to group

2008-03-24 Thread Peter Otten
pythonnubie wrote: > On Mar 24, 11:57 am, Jeff <[EMAIL PROTECTED]> wrote: >> What does the code look like? > > # Random Access > # Demonstrates string indexing > # Michael Dawson - 1/27/03 > > import random > > word = "index" > print "The word is: ", word, "\n" > > high = len(word) > low = -le

Re: New to group

2008-03-24 Thread Jeffrey Froman
pythonnubie wrote: > The exeption > is " no such  attribute " in  module random Is your own source file named "random.py" by chance? If so, rename it, and be sure to remove the leftover random.pyc file as well. Jeffrey -- http://mail.python.org/mailman/listinfo/python-list

Re: New to group

2008-03-24 Thread George Sakkis
On Mar 24, 3:03 pm, pythonnubie <[EMAIL PROTECTED]> wrote: > On Mar 24, 11:57 am, Jeff <[EMAIL PROTECTED]> wrote: > > > What does the code look like? > > # Random Access > # Demonstrates string indexing > # Michael Dawson - 1/27/03 > > import random > > word = "index" > print "The word is: ", word,

Re: New to group

2008-03-24 Thread pythonnubie
> > > i  have  come across my first exeption using randrange . The exeption > > is " no such  attribute " in  module random > > > platform  is xp  home  and the python  build is activestate 2.5 > > Welcome aboard! > > There's definitely a randrange function in the random module, so > something else

Re: New to group

2008-03-24 Thread Robert Kern
pythonnubie wrote: > On Mar 24, 11:57 am, Jeff <[EMAIL PROTECTED]> wrote: >> What does the code look like? > > # Random Access > # Demonstrates string indexing > # Michael Dawson - 1/27/03 > > import random Make sure that you do not have a random.py module in the current directory. Python check

Re: New to group

2008-03-24 Thread George Sakkis
On Mar 24, 2:53 pm, pythonnubie <[EMAIL PROTECTED]> wrote: > Hi Everyone > > I am new to programming in general although I have read alot and > done alot of experimentation as well as researched afew languages > namely java python and visual basic . My conclusion is that python > is one of

Re: New to group

2008-03-24 Thread pythonnubie
On Mar 24, 11:57 am, Jeff <[EMAIL PROTECTED]> wrote: > What does the code look like? # Random Access # Demonstrates string indexing # Michael Dawson - 1/27/03 import random word = "index" print "The word is: ", word, "\n" high = len(word) low = -len(word) for i in range(10): position = rand

Re: New to group

2008-03-24 Thread Mike Driscoll
On Mar 24, 1:53 pm, pythonnubie <[EMAIL PROTECTED]> wrote: > Hi Everyone > > I am new to programming in general although I have read alot and > done alot of experimentation as well as researched afew languages > namely java python and visual basic . My conclusion is that python > is one of

Re: New to group

2008-03-24 Thread Jeff
What does the code look like? -- http://mail.python.org/mailman/listinfo/python-list

Re: behavior varied between empty string '' and empty list []

2008-03-24 Thread Gabriel Genellina
En Mon, 24 Mar 2008 15:22:43 -0300, Tzury Bar Yochay <[EMAIL PROTECTED]> escribió: > while I can invoke methods of empty string '' right in typing > (''.join(), etc.) I can't do the same with empty list > > example: > a = [1,2,3] b = [].extend(a) b b = [] b.extend(a) >>>

New to group

2008-03-24 Thread pythonnubie
Hi Everyone I am new to programming in general although I have read alot and done alot of experimentation as well as researched afew languages namely java python and visual basic . My conclusion is that python is one of the best because it eliminates the need to learn about access modifi

Re: importing package contents from multiple places in PYTHONPATH

2008-03-24 Thread Gabriel Genellina
En Mon, 24 Mar 2008 15:06:51 -0300, <[EMAIL PROTECTED]> escribió: > Hi all, > > I'm new to python, and am trying to determine if it's possible to do > the following... > > I have a directory structure like this, with both 'dir1' and 'dir2' in > my PYTHONPATH > > dir1/ > foo/ > __init__.py >

Re: Problems with wxPython

2008-03-24 Thread David Anderson
Thanx On Mon, Mar 24, 2008 at 2:00 PM, Frank Niessink <[EMAIL PROTECTED]> wrote: > Hi David, > > 2008/3/24, David Anderson <[EMAIL PROTECTED]>: > > Hi, If ther's anyone who knows pretty much about wxPython can e-mail me? > I'm > > having some trouble in dealing with some guis here, I would thank

Impersonate another user (Guest) on Windows

2008-03-24 Thread Giampaolo Rodola'
Hi, I'm trying to write a plug-in for a ftp server of mine to permit the integration with accounts defined on the Windows system. What I basically need is impersonating a user, execute e filesystem call (e.g. create a directory via os.mkdir()) and then switch back to the original user (Administrato

behavior varied between empty string '' and empty list []

2008-03-24 Thread Tzury Bar Yochay
while I can invoke methods of empty string '' right in typing (''.join(), etc.) I can't do the same with empty list example: >>> a = [1,2,3] >>> b = [].extend(a) >>> b >>> b = [] >>> b.extend(a) >>> b [1,2,3] I would not use b = a since I don't want changes on 'b' to apply on 'a' do you think t

ANN: Tobu 0.4j

2008-03-24 Thread AK
This is an initial announcement. Tobu is a freeform database / tagger / PIM and more. It works in both Linux and Windows and uses wxPython framework and pysqlite. Comments, suggestions, feature requests and critique are gladly appreciated. Tutorial with links to download page and to graphical o

importing package contents from multiple places in PYTHONPATH

2008-03-24 Thread joshetomlinson
Hi all, I'm new to python, and am trying to determine if it's possible to do the following... I have a directory structure like this, with both 'dir1' and 'dir2' in my PYTHONPATH dir1/ foo/ __init__.py a.py b.py dir2/ foo/ __init__.py a.py c.py I'd like to be able t

Serving an external web site which requires authentication

2008-03-24 Thread Kaze
Hi, I need your suggestions about the topic. Actually, I'm not sure where to start but basically, I want to make something like; (I have an account on a site which requires log-in) - I'll be logged-in to that site with my account in my server. - And when a user connects to my site, I'll forward h

Re: Installing Mutagen Package On Windows

2008-03-24 Thread Gabriel Genellina
En Mon, 24 Mar 2008 03:25:02 -0300, Benjamin Serrato <[EMAIL PROTECTED]> escribió: > Hey, I've run into another problem. I am trying to install the Mutagen > package to use as my first useful program, but can't figure out how to > install it on windows. The README says it is a simple application

Re: Is IronPython real Python?

2008-03-24 Thread Mike Driscoll
On Mar 24, 12:00 pm, jmDesktop <[EMAIL PROTECTED]> wrote: > I know that IronPython and CPython are different in that one does not > use the .net framework, but are they both really the same Python > language. From my basic understanding, it will depend on what the > programmer's goal is as to whic

Is IronPython real Python?

2008-03-24 Thread jmDesktop
I know that IronPython and CPython are different in that one does not use the .net framework, but are they both really the same Python language. From my basic understanding, it will depend on what the programmer's goal is as to which of the two would be used, but I didn't know if they were really

Re: Problems with wxPython

2008-03-24 Thread Frank Niessink
Hi David, 2008/3/24, David Anderson <[EMAIL PROTECTED]>: > Hi, If ther's anyone who knows pretty much about wxPython can e-mail me? I'm > having some trouble in dealing with some guis here, I would thank u very > much if you could help me You should subscribe to the wxPython users mailinglist and

Re: python, dbus and pointers help.

2008-03-24 Thread Glich
or a way of letting me see the message then cancel sending it then I could create a new message and send that one. but I cant see this in the documentation -- http://mail.python.org/mailman/listinfo/python-list

python, dbus and pointers help.

2008-03-24 Thread Glich
''' hello, using pidgin instant messenger I can get the value of 'message' when one is being sent but, I dont know how to chage the value of message. from the documentation (http://developer.pidgin.im/doxygen/dev/html/ conversation-signals.html#sending-im-msg): _ sendin

Re: Need help calling a proprietary C DLL from Python

2008-03-24 Thread Craig
On Mar 23, 7:59 pm, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > On Sun, 23 Mar 2008 14:24:52 -0700 (PDT), Craig <[EMAIL PROTECTED]> > declaimed the following in comp.lang.python: > > > > > This dll was designed to be used from either C or Visual Basic 6. > > > I have the declare statements for V

Problems with wxPython

2008-03-24 Thread David Anderson
Hi, If ther's anyone who knows pretty much about wxPython can e-mail me? I'm having some trouble in dealing with some guis here, I would thank u very much if you could help me bye []'s -- http://mail.python.org/mailman/listinfo/python-list

RE: Element Tree Help

2008-03-24 Thread Reedick, Andrew
Robert Rawlins wrote: > I have little to no experiance with element tree and I'm struggling to > find a way to parse the details from the XML document (attached) into > my application. Essentialy I'm looking to take the following document > and turn it into a dict of tuples, each dict element de

Re: Why I hate lambdas (Re: Do any of you recommend Python as a firstprogramming language?)

2008-03-24 Thread bearophileHUGS
Paul Rubin>It's at least pretty good. It's not ideal, but nothing ever is.< I agree. At the moment Python is among the best languages for that, but it's not perfect for that purpose. I think newbies may need a bit more structured language, where you have to put things in a certain order to have a

Re: python library to manipulate PALM documents ?

2008-03-24 Thread Francesco Bochicchio
Il Mon, 24 Mar 2008 12:08:59 -0300, Guilherme Polo ha scritto: > 24 Mar 2008 13:36:13 GMT, Francesco Bochicchio <[EMAIL PROTECTED]>: >> Hi all, >> >> anybody knows a python equivalent of the perl PALM::Doc module (and >> eventually other PALM::). >> >> I have a e-book device wich reads mobi-poc

Re: Disable resize button

2008-03-24 Thread Francesco Bochicchio
Il Mon, 24 Mar 2008 04:38:50 -0700, myonov ha scritto: > Hi! > > I need to disable resize button in Tkinter. I inherit the Frame class. > Then in the constructor i make my buttons, labels, etc. Then I pack them > and when move borders of the frame everything changes it's location and > it looks r

Re: URL encoding

2008-03-24 Thread Stefan Behnel
binaryj wrote: > On Mar 24, 7:04 pm, [EMAIL PROTECTED] wrote: >> Is there any method in the standard modules that can perform proper >> url encoding according to RFC? > > whats wrong with the current encoding ??? it just works fine!!! > > or is it that u dont know about urllib.urlencode() ?? I t

Re: Element Tree Help

2008-03-24 Thread Stefan Behnel
Stefan Behnel schrieb: > Robert Rawlins wrote: >> Hello Guys,I have little to no experiance with element tree and I'm >> struggling to find a way to parse the details from the XML document >> (attached) into my application. Essentialy I'm looking to take the >> following document and turn it into a

Re: Element Tree Help

2008-03-24 Thread Stefan Behnel
Robert Rawlins wrote: > Hello Guys,I have little to no experiance with element tree and I'm > struggling to find a way to parse the details from the XML document > (attached) into my application. Essentialy I'm looking to take the > following document and turn it into a dict of tuples, each dict el

pythonweb and Leopard

2008-03-24 Thread brianrpsgt1
I am trying to create a simple web application that is written in python, using apache and mysql. It appears as though the python web modules have been installed, however, whenever I try to run a python script, it only displays the code in the browser. It is like the python code is not getting pr

Re: dividing tuple elements with an int or float

2008-03-24 Thread castironpi
On Mar 23, 12:22 pm, Lie <[EMAIL PROTECTED]> wrote: > On Mar 22, 2:23 pm, [EMAIL PROTECTED] wrote: > > > > Sane programmers don't write such semi-functional things (unless it > > > helps expressing the problem in certain domains). > > > I now think that deprecating map, lambda & Co. was a good thin

what are generators?

2008-03-24 Thread castironpi
I'm looking for a cool trick using generators. Know any exercises I can work? -- http://mail.python.org/mailman/listinfo/python-list

Element Tree Help

2008-03-24 Thread Robert Rawlins
Hello Guys,I have little to no experiance with element tree and I'm struggling to find a way to parse the details from the XML document (attached) into my application. Essentialy I'm looking to take the following document and turn it into a dict of tuples, each dict element defines a datasource

Re: Shortcutting the function call stack

2008-03-24 Thread castironpi
On Mar 24, 9:48 am, Jason <[EMAIL PROTECTED]> wrote: > On Mar 24, 5:21 am, Julien <[EMAIL PROTECTED]> wrote: > > > > > > > Hello all, > > > I would like to do something like: > > > def called(arg) > >     if arg==True: > >         !!magic!!caller.return 1 > > > def caller(arg) > >     called(arg) >

Re: python library to manipulate PALM documents ?

2008-03-24 Thread Guilherme Polo
24 Mar 2008 13:36:13 GMT, Francesco Bochicchio <[EMAIL PROTECTED]>: > Hi all, > > anybody knows a python equivalent of the perl PALM::Doc module (and > eventually other PALM::). > > I have a e-book device wich reads mobi-pocket format (among others). I > have downloaded from a forum a set of pe

Re: Shortcutting the function call stack

2008-03-24 Thread Jason
On Mar 24, 5:21 am, Julien <[EMAIL PROTECTED]> wrote: > Hello all, > > I would like to do something like: > > def called(arg) > if arg==True: > !!magic!!caller.return 1 > > def caller(arg) > called(arg) > return 2 > > Here, the fake !!!magic!!! represents a statement (which I ig

Re: Why I hate lambdas (Re: Do any of you recommend Python as afirst programming language?)

2008-03-24 Thread Arnaud Delobelle
On Mar 24, 2:01 pm, Steven D'Aprano <[EMAIL PROTECTED] cybersource.com.au> wrote: [...] > > Yes, but what I'm asking is why the code objects have a co_name > attribute. And even if there's a good reason for code objects to have a > name, why do tracebacks use func.func_code.co_name instead of > fun

Re: Multiline CSV export to Excel produces unrecognized characters?

2008-03-24 Thread felciano
> > Any chance you are doing this on Windows and Excel doesn't like the > return+linefeed line endings that Windows produces when writing files in > text mode? Try 'wb' as mode for the output file. > > Ciao, > Marc 'BlackJack' Rintsch > Fixed! Can't believe I missed that... Thank you for

Re: On copying arrays

2008-03-24 Thread Steven D'Aprano
On Mon, 24 Mar 2008 09:52:21 +, Duncan Booth wrote: > The method usually recommended is: > > best = list(test) > > as it has no side effects In general, you can't assume *anything* in Python has no side effects, unless you know what sort of object is being operated on. Here's an example

Re: URL encoding

2008-03-24 Thread binaryj
On Mar 24, 7:04 pm, [EMAIL PROTECTED] wrote: > Is there any method in the standard modules that can perform proper > url encoding according to RFC? whats wrong with the current encoding ??? it just works fine!!! or is it that u dont know about urllib.urlencode() ?? -- http://mail.python.org/mail

URL encoding

2008-03-24 Thread vvangelovski
Is there any method in the standard modules that can perform proper url encoding according to RFC? -- http://mail.python.org/mailman/listinfo/python-list

Re: Serving another web site which requires authentication

2008-03-24 Thread binaryj
ur in luck i am an expert at this! tell me the details , site name etc you would have to proxy everything, basically the urls in the copied page have to be changed to point to ur site. its highly possible. a minor adjustment to ur urlconf and it will work. -- http://mail.python.org/mailman/listi

Re: Why I hate lambdas (Re: Do any of you recommend Python as afirst programming language?)

2008-03-24 Thread Steven D'Aprano
On Mon, 24 Mar 2008 06:48:10 -0700, Arnaud Delobelle wrote: > On Mar 24, 1:26 pm, Steven D'Aprano <[EMAIL PROTECTED] > cybersource.com.au> wrote: >> On Mon, 24 Mar 2008 04:33:53 -0400, Terry Reedy wrote: >> > The fact that .func_name (which is writeable) is not used at first >> > surprised me unti

urllib leaves connections/sockets waiting. BIG problem!!!

2008-03-24 Thread binaryj
hi i am using urllib2 to do some automated web thing. basically i hit on sites and check the price what they are offering for their product and then decide if i want to lower or increase my pricing.so in short i have to hit hundreds of sites! for the problem: = i run 20 threads all

Re: Shortcutting the function call stack

2008-03-24 Thread Steven D'Aprano
On Mon, 24 Mar 2008 04:21:29 -0700, Julien wrote: > Hello all, > > I would like to do something like: > > def called(arg) > if arg==True: > !!magic!!caller.return 1 Instead of writing "if arg==True", or "if (arg==True)==True", or even "if ((arg==True)==True)==True", you should just

Serving another web site which requires authentication

2008-03-24 Thread hasnihon . support
Hi, I need your suggestions about the topic. Actually, I'm not sure where to start but basically, I want to make something like; (I have an account on a site which requires log-in) - I'll be logged-in to that site with my account in my server. - And when a user connects to my site, I'll forward h

Re: Why I hate lambdas (Re: Do any of you recommend Python as afirst programming language?)

2008-03-24 Thread Arnaud Delobelle
On Mar 24, 1:26 pm, Steven D'Aprano <[EMAIL PROTECTED] cybersource.com.au> wrote: > On Mon, 24 Mar 2008 04:33:53 -0400, Terry Reedy wrote: > > The fact that .func_name (which is writeable) is not used at first > > surprised me until I remembered that code objects can potentially be > > used by mult

python library to manipulate PALM documents ?

2008-03-24 Thread Francesco Bochicchio
Hi all, anybody knows a python equivalent of the perl PALM::Doc module (and eventually other PALM::). I have a e-book device wich reads mobi-pocket format (among others). I have downloaded from a forum a set of perl scripts to convert HTML to unencripted mobipocket format and vice-versa. It use

Re: parsing json output

2008-03-24 Thread Paul McGuire
On Mar 18, 9:10 pm, Gowri <[EMAIL PROTECTED]> wrote: > Hi, > > I have a service running somewhere which gives me JSON data. What I do > is this: > > import urllib,urllib2 > import cjson > > url = 'http://cmsdoc.cern.ch/cms/test/aprom/phedex/dev/gowri/datasvc/ > tbedi/requestDetails' > params = {'fo

Re: Why I hate lambdas (Re: Do any of you recommend Python as afirst programming language?)

2008-03-24 Thread Steven D'Aprano
On Mon, 24 Mar 2008 04:33:53 -0400, Terry Reedy wrote: > The fact that .func_name (which is writeable) is not used at first > surprised me until I remembered that code objects can potentially be > used by multiple function objects and hence are not connected to any one > in particular. How does t

Re: Installing Mutagen Package On Windows

2008-03-24 Thread Diez B. Roggisch
Benjamin Serrato schrieb: > Hey, I've run into another problem. I am trying to install the Mutagen > package to use as my first useful program, but can't figure out how to > install it on windows. The README says it is a simple application of-- > > Installing > -- > $ ./setup.py build >

  1   2   >