crossplatform standalone python apps

2008-10-16 Thread Gabriel Rossetti
Hello everyone, I like to create a cross-platform standalone python application, like Mac OS *.app dirs. The idea is to distribute a zip file containing everything (the python interpreter and all) so that a user just unzips it and runs it. Has anyone ever done anything like that? I searched g

Re: [ANN] Data Plotting Library DISLIN 9.4

2008-10-16 Thread Helmut Michels
Méta-MCI (MVP) wrote: Hello! version 9.4 of DISLIN Thanks! I like Dislin. But... I don't found the release (binary/win) for Python 2.6... -- Michel Claveau I have now added a Dislin distribution for Python 2.6 and Windows. -- Helmut Michels -- http://mail.python.org/mailman/listinfo/

Error when import pycurl

2008-10-16 Thread neil
Guys, I meet a error when I import pycurl. Python 2.5.2 (r252:60911, Sep 8 2008, 16:01:08) [GCC 4.1.1 20070105 (Red Hat 4.1.1-52)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import pycurl Traceback (most recent call last): File "", line 1, in ImportErr

Re: Hi, I am getting the following errorTypeError: sort() takes no keyword arguments

2008-10-16 Thread Aidan
gaurav kashyap wrote: Hi all, I am using python version 2.3.in a program , I have called the sort function.Wherein, a.sort(reverse=True) is giving the following error: TypeError: sort() takes no keyword arguments. It works in python 2.4,What can be the alternative in python 2.3 Thanks , Gaurav

Re: Unicode File Names

2008-10-16 Thread John Machin
On Oct 17, 2:56 pm, Jordan <[EMAIL PROTECTED]> wrote: > I'm not quite sure now if the problem is me, windows, or zipfile > (which I kinda failed to mention before). Using > os.listdir(unicode(os.listdir())) You mean os.listdir(unicode(os.getcwd())), I presume. > seems to have been a step in the

Hi, I am getting the following errorTypeError: sort() takes no keyword arguments

2008-10-16 Thread gaurav kashyap
Hi all, I am using python version 2.3.in a program , I have called the sort function.Wherein, a.sort(reverse=True) is giving the following error: TypeError: sort() takes no keyword arguments. It works in python 2.4,What can be the alternative in python 2.3 Thanks , Gaurav -- http://mail.python.

Re: twisted and py2exe

2008-10-16 Thread Waldemar Osuch
On Oct 16, 11:47 am, Linnorm <[EMAIL PROTECTED]> wrote: > I've written an app using twisted to create an ssh forwarding tunnel > for our erp app.  When I run it with the interpreter it works > perfectly, but when I package it up with py2exe it looks like the > tunnel never gets created.  I don't ge

Re: Unicode File Names

2008-10-16 Thread Jordan
On Oct 16, 10:18 pm, John Machin <[EMAIL PROTECTED]> wrote: > On Oct 17, 12:52 pm, Jordan <[EMAIL PROTECTED]> wrote: > > > > > On Oct 16, 9:20 pm, John Machin <[EMAIL PROTECTED]> wrote: > > > > On Oct 17, 11:43 am, Jordan <[EMAIL PROTECTED]> wrote: > > > > > I've got a bunch of files with Japanese

Re: regular expression question (re module)

2008-10-16 Thread Philip Semanchuk
On Oct 16, 2008, at 11:25 PM, Steve Holden wrote: Pat wrote: Faheem Mitha wrote: Hi, I need to match a string of the form capital_letter underscore capital_letter number against a string of the form anything capital_letter underscore capital_letter number some_stuff_not_starting with a nu

Re: regular expression question (re module)

2008-10-16 Thread Steve Holden
Pat wrote: > Faheem Mitha wrote: >> Hi, >> >> I need to match a string of the form >> >> capital_letter underscore capital_letter number >> >> against a string of the form >> >> anything capital_letter underscore capital_letter number >> some_stuff_not_starting with a number >> > >> DUKE1_plat

Re: Finding the instance reference of an object

2008-10-16 Thread Joe Strout
On Oct 16, 2008, at 7:30 PM, Steven D'Aprano wrote: However, 'bob' here really is a variable. It's a variable whose value (at the moment) is a reference to some object. Traditionally, a "variable" is a named memory location. Agreed. The main objection I have to using "variable" to descr

Re: how to get the recipients addresses of an outlook mail in python...

2008-10-16 Thread Steve Holden
[EMAIL PROTECTED] wrote: > On Oct 16, 5:22 pm, Miki <[EMAIL PROTECTED]> wrote: >>> Can some one help me in obtaining the set of recipients email >>> addresses from an outlook mail? I tried various options like ... >> message["To"] >> message["Cc"] >> >> HTH, >> -- >> Mikihttp://pythonwise.b

Re: Finding the instance reference of an object

2008-10-16 Thread Larry Bates
Joe Strout wrote: On Oct 16, 2008, at 10:59 AM, Larry Bates wrote: how do i find that the name is 'bob' Short answer is that you can't. This because Python's names (bob) are bound to objects (modulename.objectname()). They are NOT variables as they are in "other" programming languages.

Re: Unicode File Names

2008-10-16 Thread Jordan
On Oct 16, 10:18 pm, John Machin <[EMAIL PROTECTED]> wrote: > On Oct 17, 12:52 pm, Jordan <[EMAIL PROTECTED]> wrote: > > > > > On Oct 16, 9:20 pm, John Machin <[EMAIL PROTECTED]> wrote: > > > > On Oct 17, 11:43 am, Jordan <[EMAIL PROTECTED]> wrote: > > > > > I've got a bunch of files with Japanese

Re: Finding the instance reference of an object

2008-10-16 Thread Aaron "Castironpi" Brady
On Oct 16, 8:30 pm, Steven D'Aprano <[EMAIL PROTECTED] cybersource.com.au> wrote: > On Thu, 16 Oct 2008 11:51:43 -0700, Aaron \"Castironpi\" Brady wrote: > > If you're sure it's unique, why not just scan through the pairs in > > locals()? > > > for k, v in locals(): > >   if v is the_object_im_look

Re: Finding the instance reference of an object

2008-10-16 Thread Terry Reedy
Astley Le Jasper wrote: I'm creating mulitple instances, putting them in a list, iterating through the list to send them to some functions where process them with some instance specific parameters. Something along the lines of: bob = someobject() harry = someobject() fred = someobject() parame

Re: default value in __init__

2008-10-16 Thread Aaron "Castironpi" Brady
On Oct 16, 7:54 pm, Steven D'Aprano <[EMAIL PROTECTED] cybersource.com.au> wrote: > On Thu, 16 Oct 2008 12:18:49 -0700, Aaron \"Castironpi\" Brady wrote: > > [snip] > > >> If Python re-evaluated the default value i=i at runtime, the above > >> would break. > > > Not with a mere extra lambda. > > No

Re: Can Python fix vcard files?

2008-10-16 Thread Tommy Nordgren
On Oct 14, 2008, at 3:23 AM, Dotan Cohen wrote: 2008/10/14 <[EMAIL PROTECTED]>: Dotan> Can Python go through a directory of files and replace each Dotan> instance of "newline-space" with nothing? Sure. Something like (*completely* untested, so caveat emptor): import glob import os

Re: Unicode File Names

2008-10-16 Thread John Machin
On Oct 17, 12:52 pm, Jordan <[EMAIL PROTECTED]> wrote: > On Oct 16, 9:20 pm, John Machin <[EMAIL PROTECTED]> wrote: > > > > > On Oct 17, 11:43 am, Jordan <[EMAIL PROTECTED]> wrote: > > > > I've got a bunch of files with Japanese characters in their names and > > > os.listdir() replaces those charac

Re: Unicode File Names

2008-10-16 Thread Chris Rebert
2008/10/16 Jordan <[EMAIL PROTECTED]>: > On Oct 16, 9:20 pm, John Machin <[EMAIL PROTECTED]> wrote: >> On Oct 17, 11:43 am, Jordan <[EMAIL PROTECTED]> wrote: >> >> > I've got a bunch of files with Japanese characters in their names and >> > os.listdir() replaces those characters with ?'s. I'm tryin

Re: Unicode File Names

2008-10-16 Thread Jordan
On Oct 16, 9:20 pm, John Machin <[EMAIL PROTECTED]> wrote: > On Oct 17, 11:43 am, Jordan <[EMAIL PROTECTED]> wrote: > > > I've got a bunch of files with Japanese characters in their names and > > os.listdir() replaces those characters with ?'s. I'm trying to open > > the files several steps later,

Re: Finding the instance reference of an object

2008-10-16 Thread Steven D'Aprano
On Thu, 16 Oct 2008 11:51:43 -0700, Aaron \"Castironpi\" Brady wrote: > If you're sure it's unique, why not just scan through the pairs in > locals()? > > for k, v in locals(): > if v is the_object_im_looking_for: > name_im_looking_for= k > > This method can sometimes return more than one

Re: Finding the instance reference of an object

2008-10-16 Thread Steven D'Aprano
On Thu, 16 Oct 2008 11:24:28 -0600, Joe Strout wrote: > On Oct 16, 2008, at 10:59 AM, Larry Bates wrote: > >>> how do i find that the name is 'bob' >> >> Short answer is that you can't. This because Python's names (bob) are >> bound to objects (modulename.objectname()). They are NOT variables a

Re: Unicode File Names

2008-10-16 Thread Seun Osewa
Try Python 3. Python 3 strings are native by default, so the os.listdir() in Python 3 should support the Japanese characters. On Oct 17, 1:43 am, Jordan <[EMAIL PROTECTED]> wrote: > I've got a bunch of files with Japanese characters in their names and > os.listdir() replaces those characters with

Re: Unicode File Names

2008-10-16 Thread John Machin
On Oct 17, 11:43 am, Jordan <[EMAIL PROTECTED]> wrote: > I've got a bunch of files with Japanese characters in their names and > os.listdir() replaces those characters with ?'s. I'm trying to open > the files several steps later, and obviously Python isn't going to > find '01-.jpg' (formally '0

Re: python3 - the hardest hello world ever ?

2008-10-16 Thread Terry Reedy
Helmut Jarausch wrote: I have always worked with latin-1 strings with an US locale under python-2.x with x < 6 (I haven't tried 2.6, though). I hope to switch to 3.0 as soon as possible. Having the luxury of not needing 3rd party extensions for my current work, I already have, and love it.

Re: default value in __init__

2008-10-16 Thread Steven D'Aprano
On Thu, 16 Oct 2008 12:18:49 -0700, Aaron \"Castironpi\" Brady wrote: [snip] >> If Python re-evaluated the default value i=i at runtime, the above >> would break. > > Not with a mere extra lambda. Not so. It has nothing to do with lambda, lambda just happens to be a convenient example. Here's

Unicode File Names

2008-10-16 Thread Jordan
I've got a bunch of files with Japanese characters in their names and os.listdir() replaces those characters with ?'s. I'm trying to open the files several steps later, and obviously Python isn't going to find '01-.jpg' (formally '01-ひらがな.jpg') because it doesn't exist. I'm not sure where in th

Re: Trying to install module, No module named scipy_distutils.core (but i have scipy)

2008-10-16 Thread Benjamin Kaplan
On Thu, Oct 16, 2008 at 8:28 PM, process <[EMAIL PROTECTED]> wrote: > trying to install PyKF-0.1 (Kalman Filters) > http://pykf.sourceforge.net/ > > > > I have Numpy, Scipy, Matplotlib installed an have successfully > installed other packages using them. > > > $ setup.py > Traceback (most recent c

Trying to install module, No module named scipy_distutils.core (but i have scipy)

2008-10-16 Thread process
trying to install PyKF-0.1 (Kalman Filters) http://pykf.sourceforge.net/ I have Numpy, Scipy, Matplotlib installed an have successfully installed other packages using them. $ setup.py Traceback (most recent call last): File "./setup.py", line 2, in from scipy_distutils.core import setup

Re: ImportError in python 2.5 in C API DLL

2008-10-16 Thread Martin v. Löwis
> Would really appreciate any assistance. You should change your project to create a .pyd file instead of a .dll file. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: ImportError in python 2.5 in C API DLL

2008-10-16 Thread Matimus
On Oct 16, 10:58 am, Henrik <[EMAIL PROTECTED]> wrote: > Hi, > > We are upgrading from Python 2.3 to verion 2.5 and when we recompile > we get ImportError. > > To test we took the spam example from the web documentation and > compiled it with Py23 and it imports without a problem. Changing the > li

Re: Emacs users: feedback on diffs between python-mode.el and python.el?

2008-10-16 Thread Malte Helmert
[EMAIL PROTECTED] wrote: > If you're an Emacs user who has used both python-mode.el (the python mode > code distributed with Python and XEmacs) and python.el (the python mode code > distributed with GNU Emacs), I'd like to get your impressions on how they > compare and where you feel the bugs lie.

Re: python3 - the hardest hello world ever ?

2008-10-16 Thread Martin v. Löwis
> I meant setting the default encoding which is used by print (e.g.) when > outputting the internal unicode string to a file. Having such a thing would be conceptually wrong. What encoding should be used depends on the file - different files may have different encodings. When opening a file, you n

RE: Dictionary of Dicts question

2008-10-16 Thread John Townsend
Here are some sample lines. Text file 1 contains: DescribeImage AllAdjustments.psd 0.66812636 0.046 0.426 0.06475 0.06475 0.005875 DescribeImage All_Options_Multi.psd 0.552750021219 0.046 0.355875 0.01525 0.0171250.0 DescribeImage All_Options_Quad.psd

Re: Overloading operators

2008-10-16 Thread Mr . SpOOn
On Thu, Oct 16, 2008 at 10:54 PM, Lie Ryan <[EMAIL PROTECTED]> wrote: > On Wed, 15 Oct 2008 14:34:14 +0200, Mr.SpOOn wrote: > Something that is more pythonic is something that doesn't use > multimethods. It's just an elaborated way to do type checking. In python, > you usually avoid type checking a

Re: PYTHON WORKING WITH PERL ??

2008-10-16 Thread J Kenneth King
Joshua Kugler <[EMAIL PROTECTED]> writes: > Pat wrote: >>> Rewrite everything in python. Save yourself now...while you still >>> can. >>> >>> ~Sean >> >> Trust me. Sean is absolutely correct. I'm currently in the process of >> converting a large Perl project to Python (and learning Python at th

Re: xor incongruences

2008-10-16 Thread John Machin
On Oct 17, 7:02 am, Michele <[EMAIL PROTECTED]> wrote: > Hi, > I write a simple encoder in python and Java; they do the same > computations, with the same inputs No they don't. > however they won't produce the same > output. > Let me explain with code. You have a strange understanding of the wor

Re: xor incongruences

2008-10-16 Thread Peter Otten
Michele wrote: > Hi, > I write a simple encoder in python and Java; they do the same > computations, with the same inputs: however they won't produce the same > output. > Let me explain with code. > > First of all, you need a test file for input: > $ dd if=/dev/urandom of=test.img bs=1048576 coun

Re: How to transfer data structure or class from Python to C/C++?

2008-10-16 Thread Aaron "Castironpi" Brady
On Oct 16, 9:10 am, Hongtian <[EMAIL PROTECTED]> wrote: > Not exactly. > > In my C/C++ application, I have following function or flow: > > void func1() > { >     call PyFunc(struct Tdemo, struct &Tdemo1); > > } > > I mean I want to invoke Python function 'PyFunc' and transfer a data > structure

RE: Dictionary of Dicts question

2008-10-16 Thread John Townsend
Joe had a good point! Let me describe what problem I'm trying to solve and the list can recommend some suggestions. I have two text files. Each file contains data like this: Test file 1234 4567 8975 I want to compare the numbers in each text file. The data set (i.e. the numbers) has a unique i

Re: Dictionary of Dicts question

2008-10-16 Thread William Purcell
I believe that myDict['TestName'] = {'NewFileName': {}, } should be myDict['TestName']['NewFileName'] = {} -Bill On Thu, Oct 16, 2008 at 3:44 PM, Chris Rebert <[EMAIL PROTECTED]> wrote: > On Thu, Oct 16, 2008 at 12:19 PM, John Townsend <[EMAIL PROTECTED]> > wrote: > > I'm working with a Dictiona

Re: Overloading operators

2008-10-16 Thread Lie Ryan
On Wed, 15 Oct 2008 14:34:14 +0200, Mr.SpOOn wrote: > Hi, > in a project I'm overloading a lot of comparison and arithmetic > operators to make them working with more complex classes that I defined. > > > What is the best way to do this? Shall I use a lot of "if...elif" > statements inside the ov

Re: PYTHON WORKING WITH PERL ??

2008-10-16 Thread Joshua Kugler
Pat wrote: >> Rewrite everything in python. Save yourself now...while you still >> can. >> >> ~Sean > > Trust me. Sean is absolutely correct. I'm currently in the process of > converting a large Perl project to Python (and learning Python at the > same time) and the improvement in code is incred

Re: Dictionary of Dicts question

2008-10-16 Thread Chris Rebert
On Thu, Oct 16, 2008 at 12:19 PM, John Townsend <[EMAIL PROTECTED]> wrote: > I'm working with a Dictionary of Dicts. Something like this: > > myDict = { > 'TestName': { > 'FileName':{ > >

Dictionary of Dicts question

2008-10-16 Thread John Townsend
I'm working with a Dictionary of Dicts. Something like this: myDict = { 'TestName': { 'FileName':{ 'ct_in

Re: xor incongruences

2008-10-16 Thread bearophileHUGS
Michele: > in Java this block has an hash which is different from the Python one. Note that integer numbers in Python are multiprecision by default, this may cause differences. You can put some prints in various stages of the data flow (or breakpoints for your debuggers, etc) to spot where the va

Re: del and sets proposal

2008-10-16 Thread Henk . van . Asselt
"Life was like a box of chocolates. You never know what you're gonna get." Regardless of how it is implemented, mathematically a set is a collection of items. The order does not matter, an item is part of a set, or is not part of a set. Period. Henk -- http://mail.python.org/mailman/listinfo/py

Re: python3 - the hardest hello world ever ?

2008-10-16 Thread Helmut Jarausch
Paul Boddie wrote: On 16 Okt, 11:28, Helmut Jarausch <[EMAIL PROTECTED]> wrote: I meant setting the default encoding which is used by print (e.g.) when outputting the internal unicode string to a file. As far as I understood, currently I am fixed to setting either the 'locale' or to switch setti

xor incongruences

2008-10-16 Thread Michele
Hi, I write a simple encoder in python and Java; they do the same computations, with the same inputs: however they won't produce the same output. Let me explain with code. First of all, you need a test file for input: $ dd if=/dev/urandom of=test.img bs=1048576 count=1 I have attached the code. A

Re: default value in __init__

2008-10-16 Thread David C. Ullrich
In article <[EMAIL PROTECTED]>, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > David C. Ullrich a écrit : > > In article <[EMAIL PROTECTED]>, > > Bruno Desthuilliers <[EMAIL PROTECTED]> > > wrote: > > > >> David C. Ullrich a écrit : > (snip) > >>> Seems to me that people often site the "imp

fcgi.py on windows?

2008-10-16 Thread bryan rasmussen
As per the subject, anyone know of a version of fcgi.py out there somewhere that works on windows yet. Best Regards, Bryan Rasmussen -- http://mail.python.org/mailman/listinfo/python-list

Re: default value in __init__

2008-10-16 Thread Aaron "Castironpi" Brady
On Oct 16, 12:23 pm, Steven D'Aprano <[EMAIL PROTECTED] cybersource.com.au> wrote: > On Thu, 16 Oct 2008 17:05:40 +1300, Lawrence D'Oliveiro wrote: > > In message <[EMAIL PROTECTED]>, Steven D'Aprano > > wrote: > > >> On Thu, 09 Oct 2008 01:39:30 -0700, kenneth (a.k.a. Paolo) wrote: > > >>> On Oct

Re: default value in __init__

2008-10-16 Thread Aaron "Castironpi" Brady
On Oct 16, 1:05 am, "Chris Rebert" <[EMAIL PROTECTED]> wrote: > On Wed, Oct 15, 2008 at 9:43 PM, Aaron Castironpi Brady > > > > <[EMAIL PROTECTED]> wrote: > > On Oct 15, 11:33 pm, Steve Holden <[EMAIL PROTECTED]> wrote: > >> Aaron "Castironpi" Brady wrote: > > >> [about how default argument behavio

Re: Finding the instance reference of an object

2008-10-16 Thread Aaron "Castironpi" Brady
On Oct 16, 12:25 pm, Astley Le Jasper <[EMAIL PROTECTED]> wrote: > Thanks for all the responses. That helps. > > Ta > > ALJ If you're sure it's unique, why not just scan through the pairs in locals()? for k, v in locals(): if v is the_object_im_looking_for: name_im_looking_for= k This meth

Re: Emacs users: feedback on diffs between python-mode.el and python.el?

2008-10-16 Thread Carl Banks
On Oct 16, 12:21 pm, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > Carl Banks a écrit : > > > On Oct 14, 1:05 pm, Bruno Desthuilliers > > <[EMAIL PROTECTED]> wrote: > >> - a slightly less but still annoying problem (I wouldn't > > call it a bug) > >> is the handling of indentation for nested lit

Re: Emacs users: feedback on diffs between python-mode.el and python.el?

2008-10-16 Thread Bruno Desthuilliers
rustom a écrit : (snip) I am interested in knowing which mode supports better the use of pdb inside emacs? Since you mention this, I think I remember having a couple issues here with python-mode.el - but that was a long time ago, and I usually don't use pdb within the emacs-python-shell (mos

Re: Emacs users: feedback on diffs between python-mode.el and python.el?

2008-10-16 Thread Bruno Desthuilliers
Carl Banks a écrit : On Oct 14, 1:05 pm, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: - a slightly less but still annoying problem (I wouldn't call it a bug) is the handling of indentation for nested litteral dicts/lists/tuples. The python-mode.el on Subversion (python-mode's Subversion o

ImportError in python 2.5 in C API DLL

2008-10-16 Thread Henrik
Hi, We are upgrading from Python 2.3 to verion 2.5 and when we recompile we get ImportError. To test we took the spam example from the web documentation and compiled it with Py23 and it imports without a problem. Changing the libs in visual studio 2008 to point to Py25 and we get: >>> import spa

twisted and py2exe

2008-10-16 Thread Linnorm
I've written an app using twisted to create an ssh forwarding tunnel for our erp app. When I run it with the interpreter it works perfectly, but when I package it up with py2exe it looks like the tunnel never gets created. I don't get any exceptions during the build, but I do get the following:

Re: Emacs users: feedback on diffs between python-mode.el and python.el?

2008-10-16 Thread Carl Banks
On Oct 14, 1:05 pm, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > - a slightly less but still annoying problem (I wouldn't call it a bug) > is the handling of indentation for nested litteral dicts/lists/tuples. The python-mode.el on Subversion (python-mode's Subversion on source forge, not the

Re: Finding the instance reference of an object

2008-10-16 Thread Astley Le Jasper
Thanks for all the responses. That helps. Ta ALJ -- http://mail.python.org/mailman/listinfo/python-list

Re: Finding the instance reference of an object

2008-10-16 Thread Astley Le Jasper
On 16 Oct, 18:53, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > Astley Le Jasper schrieb: > > > > > On 16 Oct, 16:52, Carsten Haese <[EMAIL PROTECTED]> wrote: > >> Astley Le Jasper wrote: > >>> Sorry for the numpty question ... > >>> How do you find the reference name of an object? > >>> So if i

Re: default value in __init__

2008-10-16 Thread Steven D'Aprano
On Thu, 16 Oct 2008 17:05:40 +1300, Lawrence D'Oliveiro wrote: > In message <[EMAIL PROTECTED]>, Steven D'Aprano > wrote: > >> On Thu, 09 Oct 2008 01:39:30 -0700, kenneth (a.k.a. Paolo) wrote: >> >>> On Oct 9, 10:14 am, Christian Heimes <[EMAIL PROTECTED]> wrote: >>> No, it always contains

Re: Finding the instance reference of an object

2008-10-16 Thread Joe Strout
On Oct 16, 2008, at 10:59 AM, Larry Bates wrote: how do i find that the name is 'bob' Short answer is that you can't. This because Python's names (bob) are bound to objects (modulename.objectname()). They are NOT variables as they are in "other" programming languages. Which other progr

RE: account balance checker

2008-10-16 Thread Support Desk
I was also looking at the ClientForm Library http://wwwsearch.sourceforge.net/ClientForm/ which can get me past the first username form, but I noticed it then goes to a challenge question form and im not sure how to take the resulting for and resubmit it with new information and then resubmit the

Re: Finding the instance reference of an object

2008-10-16 Thread Larry Bates
Astley Le Jasper wrote: Sorry for the numpty question ... How do you find the reference name of an object? So if i have this bob = modulename.objectname() how do i find that the name is 'bob' Short answer is that you can't. This because Python's names (bob) are bound to objects (modulenam

Re: Finding the instance reference of an object

2008-10-16 Thread Diez B. Roggisch
Astley Le Jasper schrieb: On 16 Oct, 16:52, Carsten Haese <[EMAIL PROTECTED]> wrote: Astley Le Jasper wrote: Sorry for the numpty question ... How do you find the reference name of an object? So if i have this bob = modulename.objectname() how do i find that the name is 'bob' Why do you need t

Re: like using python

2008-10-16 Thread Gerhard Häring
[EMAIL PROTECTED] wrote: as the subject me2 -- http://mail.python.org/mailman/listinfo/python-list

Re: Finding the instance reference of an object

2008-10-16 Thread Steven D'Aprano
On Thu, 16 Oct 2008 08:04:23 -0700, Astley Le Jasper wrote: > I'm creating mulitple instances, putting them in a list, iterating > through the list to send them to some functions where process them with > some instance specific parameters. Something along the lines of: > > bob = someobject() > ha

Re: PYTHON WORKING WITH PERL ??

2008-10-16 Thread Diez B. Roggisch
> Trust me. Sean is absolutely correct. I'm currently in the process of > converting a large Perl project to Python (and learning Python at the > same time) and the improvement in code is incredible. After you learn > Python, you'll come to despise Perl. +1 QOTW Diez -- http://mail.python.org/

Re: PYTHON WORKING WITH PERL ??

2008-10-16 Thread J Kenneth King
Pat <[EMAIL PROTECTED]> writes: > Sean DiZazzo wrote: >> On Sep 29, 12:44 pm, "Blubaugh, David A." <[EMAIL PROTECTED]> >> wrote: >>> Sir, >>> >>> You are absolutely correct. I was praying to G_d I did not have to >>> slaughter my project's source code in this manner. However, like life >>> itsel

Re: account balance checker

2008-10-16 Thread Chris Rebert
You'd probably have to use something like mechanize (http://wwwsearch.sourceforge.net/mechanize/) to fill out the forms, but if BofA's website uses Javascript at all, you're probably out of luck. Cheers, Chris -- Follow the path of the Iguana... http://rebertia.com On Wed, Oct 15, 2008 at 8:09 A

account balance checker

2008-10-16 Thread Support Desk
Hello all, I was wondering if it would be possible to make a script to grab my balance account balance a few times a day without having to login every time. I know I can use the urlib2 library, but not sure how to go about filling in the forms and submitting them. BOA has a mobile site th

ZSI: Classless complexType didn't get dictionary

2008-10-16 Thread Heston James - Cold Beans
Guys, I'm in need of some help. I've got an array of objects I'm trying to send to a remote server using ZSI. I've defined my class and type codes as described in the documentation, and I pass the module containing the class/typecode definition into the 'typesmodule' parameter of the ServicePro

Re: Finding the instance reference of an object

2008-10-16 Thread Astley Le Jasper
On 16 Oct, 16:52, Carsten Haese <[EMAIL PROTECTED]> wrote: > Astley Le Jasper wrote: > > Sorry for the numpty question ... > > > How do you find the reference name of an object? > > > So if i have this > > > bob = modulename.objectname() > > > how do i find that the name is 'bob' > > Why do you nee

Re: PYTHON WORKING WITH PERL ??

2008-10-16 Thread Pat
Sean DiZazzo wrote: On Sep 29, 12:44 pm, "Blubaugh, David A." <[EMAIL PROTECTED]> wrote: Sir, You are absolutely correct. I was praying to G_d I did not have to slaughter my project's source code in this manner. However, like life itself, I was given legacy source code (i.e. someone else erro

Re: Finding the instance reference of an object

2008-10-16 Thread Michele Simionato
On Oct 16, 4:01 pm, Astley Le Jasper <[EMAIL PROTECTED]> wrote: > Sorry for the numpty question ... > > How do you find the reference name of an object? > > So if i have this > > bob = modulename.objectname() > > how do i find that the name is 'bob' This is a FAQ: http://www.python.org/doc/faq/p

Re: Finding the instance reference of an object

2008-10-16 Thread Carsten Haese
Astley Le Jasper wrote: > Sorry for the numpty question ... > > How do you find the reference name of an object? > > So if i have this > > bob = modulename.objectname() > > how do i find that the name is 'bob' Why do you need to find that? You know that its name is 'bob'. -- Carsten Haese htt

Re: python debugger tips?

2008-10-16 Thread Pat
[EMAIL PROTECTED] wrote: Hi All, I'm switching to python from perl, and like the language a ton, but I find pdb and pydb to be vastly inferior debuggers to the perl version. In particular, I've grown very used to stepping into arbitrary functions interactively. For instance, in perl you can do

Re: Best way to spawn process on back end computer

2008-10-16 Thread Paul Boddie
On 16 Okt, 15:51, Robin Becker <[EMAIL PROTECTED]> wrote: > sophie_newbie wrote: > > I'm running a python cgi script on a frontend web server and I want it > > to spawn another script (that takes a long time to run) on a backend > > number crunching server thats connected to the same network. What

Re: File management

2008-10-16 Thread Ronny Sonntag
erict1689 schrieb: def closeUp(): # Purpose: end of program housekeeping global empName, previousYTD, payRate, hoursWorked, recordCount, eof, payFile, \ payFileUpdated, newYTD, currentPay payFile.close() payFileUpdated.close() print "\nNumber of records in the

Re: How to transfer data structure or class from Python to C/C++?

2008-10-16 Thread Hongtian
Not exactly. In my C/C++ application, I have following function or flow: void func1() { call PyFunc(struct Tdemo, struct &Tdemo1); } I mean I want to invoke Python function 'PyFunc' and transfer a data structure 'Tdemo' to this function. After some process in Python, I want it return 'Td

Re: urllib accept-language doesn't have any effect

2008-10-16 Thread Martin Bachwerk
Hey Philip, thanks for the snipplet, but I have tried that code already. It does indeed give me a swedish version.. of www.google.de :) That's the beauty about Google that they have all languages for all domains available. However if I try it with www.gizmodo.com (a tech blog in several lang

Finding the instance reference of an object

2008-10-16 Thread Astley Le Jasper
Sorry for the numpty question ... How do you find the reference name of an object? So if i have this bob = modulename.objectname() how do i find that the name is 'bob' -- http://mail.python.org/mailman/listinfo/python-list

Re: regular expression question (re module)

2008-10-16 Thread Pat
Faheem Mitha wrote: Hi, I need to match a string of the form capital_letter underscore capital_letter number against a string of the form anything capital_letter underscore capital_letter number some_stuff_not_starting with a number DUKE1_plateD_A12.CEL. Thanks in advance. Please cc

Re: urllib accept-language doesn't have any effect

2008-10-16 Thread Philip Semanchuk
On Oct 16, 2008, at 6:50 AM, Martin Bachwerk wrote: Hmm, thanks for the ideas, I've checked the requests in Firefox one more time after deleting all the cookies and both google.com and gizmodo.com do indeed forward me to the German site without caring about the browser settings. wget s

Re: Best way to spawn process on back end computer

2008-10-16 Thread Robin Becker
sophie_newbie wrote: Hi, I'm running a python cgi script on a frontend web server and I want it to spawn another script (that takes a long time to run) on a backend number crunching server thats connected to the same network. What do you think is the best way to do this? I have a few ideas but I

Re: Python equivalent to SharePoint?

2008-10-16 Thread Mike Hjorleifsson
On Oct 15, 11:17 am, Joe Strout <[EMAIL PROTECTED]> wrote: > We've got a client who has been planning to use SharePoint for   > managing their organization documents, but has recently dropped that   > idea and is looking for an alternative.  Is there any Python package   > with similar functionalit

Re: IDE Question

2008-10-16 Thread Tim Cook
On Oct 15, 2:19 pm, "Steve Phillips" <[EMAIL PROTECTED]> wrote: > Hi All, > I am just wondering what seems to be the most popular IDE. Well, you have already had many replies. For some context; I am an serious open source advocate. But for productivity I haven't been able to beat WingIDE. Thei

Re: how to get the recipients addresses of an outlook mail in python...

2008-10-16 Thread [EMAIL PROTECTED]
On Oct 16, 5:22 pm, Miki <[EMAIL PROTECTED]> wrote: > >         Can some one help me in obtaining the set of recipients email > > addresses from an outlook mail? I tried various options like ... > > message["To"] > message["Cc"] > > HTH, > -- > Mikihttp://pythonwise.blogspot.com Thanks for your re

Re: Append a new value to dict

2008-10-16 Thread Pat
paul wrote: Pat schrieb: I know it's not "fair" to compare language features, but it seems to me (a Python newbie) that appending a new key/value to a dict in Python is awfully cumbersome. In Python, this is the best code I could come up with for adding a new key, value to a dict mytable.s

Re: python3 - the hardest hello world ever ?

2008-10-16 Thread Paul Boddie
On 16 Okt, 11:28, Helmut Jarausch <[EMAIL PROTECTED]> wrote: > > I meant setting the default encoding which is used by print (e.g.) when > outputting the internal unicode string to a file. > As far as I understood, currently I am fixed to setting either > the 'locale' or to switch settings for each

Re: Best way to spawn process on back end computer

2008-10-16 Thread Simon Brunning
2008/10/16 sophie_newbie <[EMAIL PROTECTED]>: > I'm running a python cgi script on a frontend web server and I want it > to spawn another script (that takes a long time to run) on a backend > number crunching server thats connected to the same network. What do > you think is the best way to do thi

Re: Python equivalent to SharePoint?

2008-10-16 Thread Paul Boddie
On 15 Okt, 22:50, Lawrence D'Oliveiro <[EMAIL PROTECTED] central.gen.new_zealand> wrote: > In message <[EMAIL PROTECTED]>, Paul Boddie wrote: > > ... any absence of steep licensing costs isn't necessarily > > an advantage in the consulting business since such stuff usually gets > > passed onto the

Re: how to get the recipients addresses of an outlook mail in python...

2008-10-16 Thread Miki
>         Can some one help me in obtaining the set of recipients email > addresses from an outlook mail? I tried various options like ... message["To"] message["Cc"] HTH, -- Miki http://pythonwise.blogspot.com -- http://mail.python.org/mailman/listinfo/python-list

Re: urllib accept-language doesn't have any effect

2008-10-16 Thread Diez B. Roggisch
Martin Bachwerk wrote: > Hmm, thanks for the ideas, > > I've checked the requests in Firefox one more time after deleting all > the cookies and both google.com and gizmodo.com do indeed forward me to > the German site without caring about the browser settings. > > wget shows me that the server d

Acer Laptops 4520NWXMi Athlon LX.AHS0C.032

2008-10-16 Thread Shopping.homeshop
Based on the powerful and affordable AMD Turion 64 X2 Mobile Technology, the Aspire 4520 is well suited for any home computing environment. Featuring impressive graphics solutions from NVIDIA, a 14.1"Acer CrystalBrite display, ultra-realistic Dolby surround sound, they excel at video/audio playback

how to get the recipients addresses of an outlook mail in python...

2008-10-16 Thread [EMAIL PROTECTED]
Hi all, Can some one help me in obtaining the set of recipients email addresses from an outlook mail? I tried various options like message.Recipient.Address message.To.Address message.Receiver.Address etc.. but I could get the senders address using message.Sender.Address. Thanks

Best way to spawn process on back end computer

2008-10-16 Thread sophie_newbie
Hi, I'm running a python cgi script on a frontend web server and I want it to spawn another script (that takes a long time to run) on a backend number crunching server thats connected to the same network. What do you think is the best way to do this? I have a few ideas but I'm sure there is a "bes

  1   2   >