Re: about functions question

2007-10-24 Thread Marc 'BlackJack' Rintsch
On Thu, 25 Oct 2007 06:28:16 +, NoName wrote: > I try it: > > def b(): > ... > a() > ... > > def a(): > ... > b() > ... > > b() > it's not work. What do you mean by not working? At the time `b()` is called, both functions are defined so it should working. Or at least it's not

Re: Regular Expression question

2007-10-24 Thread Marc 'BlackJack' Rintsch
On Thu, 25 Oct 2007 06:34:03 +, looping wrote: > Hi, > It's not really a Python question but I'm sure someone could help me. > > When I use RE, I always have trouble with this kind of search: > > Ex. > > I've a text file: > """ > create or replace package XXX > ... > > create or replace pa

Re: about functions question

2007-10-24 Thread George Sakkis
On Oct 25, 2:28 am, NoName <[EMAIL PROTECTED]> wrote: > I try it: > > def b(): > ... > a() > ... > > def a(): > ... > b() > ... > > b() > it's not work. It sure does. Please post full code and error message, something else is wrong, not the cyclic reference. George -- http://mail.p

Re: about functions question

2007-10-24 Thread Diez B. Roggisch
NoName schrieb: > I try it: > > def b(): > ... > a() > ... > > def a(): > ... > b() > ... > > b() > it's not work. It works. def a(): print "a" b() def b(): print "b" print a # not calling! b() But if you really call a in b, you create an endless loop. I

Re: Mobile Startup looking for sharp coders

2007-10-24 Thread George Sakkis
On Oct 24, 2:42 pm, Vangati <[EMAIL PROTECTED]> wrote: > Plusmo is Hiring! > > (snipped) > > Recruiting Agencies: Please do not send us unsolicited resumes. > Plusmo does not consider resumes from any agencies. Lame company headhunters: Please do not send us unsolicited spamvertisments irrelevant

Regular Expression question

2007-10-24 Thread looping
Hi, It's not really a Python question but I'm sure someone could help me. When I use RE, I always have trouble with this kind of search: Ex. I've a text file: """ create or replace package XXX ... create or replace package body XXX ... """ now I want to search the position (line) of this two st

about functions question

2007-10-24 Thread NoName
I try it: def b(): ... a() ... def a(): ... b() ... b() it's not work. Is it possible pre-define function like in c++ or place functions code after main block? int a(); int b(); int main () { ... a(); ... } int a() { ... b(); ... } int b() { ... a(); ... } =) sorry for my eng;)

Re: win32com.client documentation?

2007-10-24 Thread Tim Roberts
Mark Morss <[EMAIL PROTECTED]> wrote: > >I want to be able to script the creation of Excel spreadsheets and >Word documents, interract with Access data bases, and so forth. Empirically, the best way to do this (for me, at least) is to Google for examples. There are a few simple rules to learn on

Re: win32com.client documentation?

2007-10-24 Thread Tim Roberts
"Colin J. Williams" <[EMAIL PROTECTED]> wrote: >Mark Morss wrote: >> I am a unix person, not new to Python, but new to Python programming >> on windows. Does anyone know where to find documentation on >> win32com.client? I have successfully installed this module and >> implemented some example co

Re: Python Windows Installation

2007-10-24 Thread Tim Roberts
TheFlyingDutchman <[EMAIL PROTECTED]> wrote: > >I am trying to install Python 2.5 on Windows XP. It installs into the >root directory on C:\ instead of C:\Python25 which it shows by default >as what it plans to install to. Selecting D:\Python25 on a previous >iteration put the exe in D:\ and did no

Re: Python on Intel A110?

2007-10-24 Thread Tim Roberts
Bob Greschke <[EMAIL PROTECTED]> wrote: > >Will the "stock" Windows version of Python install on a Samsung Q1U-EL >UMPC running Vista and with an Intel A110 processor? ANYTHING that runs Vista will run Python. >I want to do some >development and just happened to think about this. I don't know

Re: Adding idle timeout capabilities to asyncore

2007-10-24 Thread Paul Rubin
Giampaolo Rodola' <[EMAIL PROTECTED]> writes: > def readable(self): > if time.time() >= self.timeout: > self.send("Timeout") > self.close() > return 1 Don't do it this way. Put all the timeouts into a priority queue (see the heapq module) so you only need to check the one

Judeo-Fascism and Chisto-Fascism Awareness week

2007-10-24 Thread lemnitzer
The biggest threat to the planet today is Judeofascism and Christofascism. Actually, the correct terms and concepts are: Anti-Judeo-fascism Zionists like most jews or zionists EXCEPT the lofty and righteous neturei karta who worship God and follow torah, but the others are satanic zionist bastard

Re: How to best send email to a low volume list?

2007-10-24 Thread Steven D'Aprano
On Wed, 24 Oct 2007 23:08:14 -0500, Shane Geiger wrote: > A mailing list manager is really overkill for what he is trying to do > *IF* he is not maintaining a discussion list. It's not overkill at all. Mailman is easy to install (at least on a Red Hat based Linux system, your mileage may vary el

Re: Adding idle timeout capabilities to asyncore

2007-10-24 Thread Josiah Carlson
On Oct 23, 9:30 am, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > On Tue, 23 Oct 2007 15:34:19 -, Josiah Carlson <[EMAIL PROTECTED]> wrote: > > [snip] > > >Calling time.time() is relatively inexpensive in comparison to pure > >Python function calls, but indeed, it could be a bottleneck. > >

Re: Test for a unicode string

2007-10-24 Thread Martin v. Löwis
> I have a regular expression test in a script. When a unicode character > get tested in the regex it gives an error: > > UnicodeError: ASCII decoding error: ordinal not in range(128) > > Question: Is there a way to test a string for unicode chars (ie. test > if a string will throw the error cite

python project ideas

2007-10-24 Thread [EMAIL PROTECTED]
hi to everyone I wondered if this might be the right place to ask for some ideas for python project for university. I'd like it to be something useful and web-based. And the project must be complete in 2-3 months by 2-3 person group. May be something useful for open source or python community ... W

Re: How to best send email to a low volume list?

2007-10-24 Thread Shane Geiger
A mailing list manager is really overkill for what he is trying to do *IF* he is not maintaining a discussion list. A "newsletter" list doesn't sound like a discussion list, especially since he wants to hide the email addresses of the other people. If you want to manage your mailing list in a ma

Re: Test for a unicode string

2007-10-24 Thread Scott David Daniels
goldtech wrote: > I have a regular expression test in a script. When a unicode character > get tested in the regex it gives an error: > > UnicodeError: ASCII decoding error: ordinal not in range(128) > > Question: Is there a way to test a string for unicode chars (ie. test > if a string will thro

Re: Anagrams

2007-10-24 Thread sandipm
thanks..I am using python 2.4.4. so i couldnt find "all" either as inbuilt module or by doing "from itertools import *", "all" is not available. I think I need to move to 2.5 then but what are the pros/cons of moving to 2.5? as we are using 2.4.4 on production server which is quite stable. a

How to change IP Address by Python program on Win Platform

2007-10-24 Thread Don Bro
is there software available to change or hide my ip add? __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -- http://mail.python.org/mailman/listinfo/python-list

Re: list (range) syntax

2007-10-24 Thread Carl Banks
On Oct 24, 6:44 pm, Michal Bozon <[EMAIL PROTECTED]> wrote: > many Python newcomers are confused why > range(10), does not include 10. > > If there was a proposal for the new > syntax for ranges, which is known > e.g. from Pascal or Ruby... > > >>> [0..10] > > [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10] > >

Re: delineating by comma where commas inside quotation marks don't count

2007-10-24 Thread equand
On Oct 25, 3:56 am, "Junior" <[EMAIL PROTECTED]> wrote: > I want to open a text file for reading and delineate it by comma. I also > want any data > surrounded by quotation marks that has a comma in it, not to count the > commas inside the > quotation marks > > if the file testfile.txt contains th

About Pywin32's invoke

2007-10-24 Thread kernel1983
By reading the doc of pywin32 we can invoke COM like: o = win32com.client.Dispatch("Excel.Application") but is it possible to invoke some GUID directly? If COM was going to be invoked by python, must it support IDispatch? -- http://mail.python.org/mailman/listinfo/python-list

Re: delineating by comma where commas inside quotation marks don't count

2007-10-24 Thread Dan Bishop
On Oct 24, 8:56 pm, "Junior" <[EMAIL PROTECTED]> wrote: > I want to open a text file for reading and delineate it by comma. I also > want any data > surrounded by quotation marks that has a comma in it, not to count the > commas inside the > quotation marks Use the csv module. -- http://mail.py

Professional Grant Proposal Writing Workshop (December 2007: Seattle, Washington)

2007-10-24 Thread Anthony Jones
The Grant Institute: Certificate in Professional Program Development and Grant Communication will be held in Seattle, Washington, December 10 - 14, 2007.  Interested development professionals, researchers, faculty, and graduate students should register as soon as possible, as demand means that s

delineating by comma where commas inside quotation marks don't count

2007-10-24 Thread Junior
I want to open a text file for reading and delineate it by comma. I also want any data surrounded by quotation marks that has a comma in it, not to count the commas inside the quotation marks if the file testfile.txt contains the following; 5,Tuesday,"May is a spring month",Father's Day 1,Satu

Re: Iteration for Factorials

2007-10-24 Thread Paul Rubin
[EMAIL PROTECTED] writes: > > It's only a moment before the metaclass and > > the Twisted solution come along. :) > > I couldn't resist. It's not as elegant as I hoped, but hey, at least > it memoizes the intermediate classes :-) It gets even weirder in Haskell. http://www.willamette.edu/~fruehr

Re: Iteration for Factorials

2007-10-24 Thread Paul Rubin
Lou Pecora <[EMAIL PROTECTED]> writes: > There might even be an array method that can be adapted to get the > product. Is there a product method? (analogous to a sum method) The "reduce" function which is being removed from python in 3.0. import operator def factorial(n): return reduce(operat

RE: list (range) syntax

2007-10-24 Thread Ryan Ginstrom
> On Behalf Of Steven D'Aprano > Because in common English, counting starts at 1 and ranges > normally include both end points (that is, it is a "closed" > interval). If you say "I'll be away from the 4th to the 7th" > and then turn up on the 7th, nearly everyone will wonder why > you're back a

Re: building a linux executable

2007-10-24 Thread Carl Banks
On Oct 24, 5:08 pm, Prateek <[EMAIL PROTECTED]> wrote: > On Oct 24, 5:25 pm, Paul Boddie <[EMAIL PROTECTED]> wrote: > > > On 24 Okt, 14:20, Bjoern Schliessmann > > [EMAIL PROTECTED]> wrote: > > > > I'm sorry I cannot help, but how many linux distros have no python > > > installed or no packages of

Re: Is this a wx bug?

2007-10-24 Thread kyosohma
On Oct 23, 7:06 pm, Chris Carlen <[EMAIL PROTECTED]> wrote: > Hi: > > #!/usr/bin/env python > > """From listing 3.3 in 'wxPython in Action' > Demonstrates that something funny happens when you click&hold in the > frame, then drag the mouse over the button window. The > wx.EVT_ENTER_WINDOW event is

Re: list (range) syntax

2007-10-24 Thread Steven D'Aprano
On Wed, 24 Oct 2007 16:28:20 -0700, [EMAIL PROTECTED] wrote: > On Oct 24, 5:44 pm, Michal Bozon <[EMAIL PROTECTED]> wrote: >> many Python newcomers are confused why range(10), does not include 10. > > How can they be confused? Because in common English, counting starts at 1 and ranges normally

access.db : sendmail hash map file

2007-10-24 Thread equand
is there a way to open it? and edit? -- http://mail.python.org/mailman/listinfo/python-list

Re: [0..9] list (range) syntax

2007-10-24 Thread Michal Bozon
On Thu, 25 Oct 2007 01:16:57 +0200, Wildemar Wildenburger wrote: > Michal Bozon wrote: >> many Python newcomers are confused why >> range(10), does not include 10. >> > It produces a list of ten elements. Also the documentation is quite > clear on the topic. And lastly: This will probably really

Re: Cross-platform GUI development

2007-10-24 Thread bramble
On Oct 12, 6:30 am, Nick Craig-Wood <[EMAIL PROTECTED]> wrote: > > I'd recommend wxPython over those becase > > 1) native look and feel on all platforms > 2) doesn't require expensive licensing for non-commercial apps (QT) > 3) Isn't a pain to install on windows (GTK) > > That said, times change an

Re: Cross-platform GUI development

2007-10-24 Thread bramble
On Oct 23, 2:59 pm, "Chris Mellon" <[EMAIL PROTECTED]> wrote: > On 10/23/07, maco <[EMAIL PROTECTED]> wrote: > > > > On Oct 13, 12:34 am, Michael L Torrie <[EMAIL PROTECTED]> wrote: > > > > Qt doesn't look very native on my desktop. In fact, Qt apps have always > > > looked out of place on a Gnome

Re: Wrapping stdout in a codec

2007-10-24 Thread JKPeck
On Oct 22, 12:20 am, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > On Mon, 22 Oct 2007 02:41:17 +, JKPeck wrote: > > We want to wrap the stdout device in a codec in order to decode output > > transparently according to a particular code page (which might not be > > the system code page)

Re: Python and Combinatorics

2007-10-24 Thread none
[EMAIL PROTECTED] wrote: > On Oct 24, 5:20 pm, none <""atavory\"@(none)"> wrote: >> Hello, >> >> Is there some package to calculate combinatorical stuff like (n over >> k), i.e., n!/(k!(n - k!) ? > > Sure, the gmpy module. > Excellent, many thanks! -- http://mail.python.org/mail

Re: list (range) syntax

2007-10-24 Thread [EMAIL PROTECTED]
On Oct 24, 5:44 pm, Michal Bozon <[EMAIL PROTECTED]> wrote: > many Python newcomers are confused why > range(10), does not include 10. How can they be confused? Does base 10 have a digit ten? Does base 2 have a digit two? Does base 16 have a digit sixteen? Haven't you stopped counting on your f

Re: [0..9] list (range) syntax

2007-10-24 Thread Wildemar Wildenburger
Michal Bozon wrote: > many Python newcomers are confused why > range(10), does not include 10. > It produces a list of ten elements. Also the documentation is quite clear on the topic. And lastly: This will probably really bother you for a week, then no more. > If there was a proposal for the

Re: Python and Combinatorics

2007-10-24 Thread [EMAIL PROTECTED]
On Oct 24, 5:20 pm, none <""atavory\"@(none)"> wrote: > Hello, > > Is there some package to calculate combinatorical stuff like (n over > k), i.e., n!/(k!(n - k!) ? Sure, the gmpy module. >>> import gmpy >>> for m in xrange(10): for n in xrange(m+1): print

Re: Iteration for Factorials

2007-10-24 Thread [EMAIL PROTECTED]
On Oct 24, 5:19 pm, [EMAIL PROTECTED] wrote: > Tim Golden napisa (a): > > > It's only a moment before the metaclass and > > the Twisted solution come along. :) > > I couldn't resist. It's not as elegant as I hoped, but hey, at least > it memoizes the intermediate classes :-) > > class fact_0(object

Re: Adding idle timeout capabilities to asyncore

2007-10-24 Thread Giampaolo Rodola'
On 23 Ott, 17:34, Josiah Carlson <[EMAIL PROTECTED]> wrote: > On 22 Ott, 12:28, Giampaolo Rodola' <[EMAIL PROTECTED]> wrote: > > > > > > > Hi there. > > We're talking about an asyncore-based server. > > Just for the heck of it I'd like to set a timeout which will > > disconnects the clients if they

[0..9] list (range) syntax

2007-10-24 Thread Michal Bozon
many Python newcomers are confused why range(10), does not include 10. If there was a proposal for the new syntax for ranges, which is known e.g. from Pascal or Ruby... >>> [0..10] [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10] ...is there a chance to be approved ? We have had a short discussion on it at t

Re: TeX pestilence (was Distributed RVS, Darcs, tech love)

2007-10-24 Thread Wildemar Wildenburger
Jürgen Exner wrote: > Wildemar Wildenburger wrote: >> Joachim Durchholz wrote: >>> And yes, it [syntactically] sucks in major ways. >>> >> Oh my God, I don't want to, but I just have to ask: Why? > > Because TeX has nothing to do with either Perl, Python, Lisp, Java, or > functional programming.

Re: TeX pestilence (was Distributed RVS, Darcs, tech love)

2007-10-24 Thread Wildemar Wildenburger
Byung-Hee HWANG wrote: > On Mon, 2007-10-22 at 12:19 -0400, Lew wrote: > [something attackish] > > Well, you are making a personal attack, it's dangerous. I wish to see > only discussions about TeX ;; > On a python group? Also: Lew won't see your post, he's on c.l.java.* /W -- http://mail.pyt

Re: TeX pestilence (was Distributed RVS, Darcs, tech love)

2007-10-24 Thread J�rgen Exner
Wildemar Wildenburger wrote: > Joachim Durchholz wrote: >> And yes, it sucks in major ways. >> > Oh my God, I don't want to, but I just have to ask: Why? Because TeX has nothing to do with either Perl, Python, Lisp, Java, or functional programming. jue -- http://mail.python.org/mailman/listi

Re: name space problem

2007-10-24 Thread BBands
Thank you. jab -- http://mail.python.org/mailman/listinfo/python-list

Re: TeX pestilence (was Distributed RVS, Darcs, tech love)

2007-10-24 Thread Wildemar Wildenburger
Joachim Durchholz wrote: > And yes, it sucks in major ways. > Oh my God, I don't want to, but I just have to ask: Why? /W -- http://mail.python.org/mailman/listinfo/python-list

Re: for loop

2007-10-24 Thread Shawn Minisall
I agree, but if I want to get a A on the program, thats how my professor wants the output. :) [EMAIL PROTECTED] wrote: > On Oct 22, 9:12?pm, Shawn Minisall <[EMAIL PROTECTED]> wrote: > >> Thanks, everyone! Using everyone's suggestions and points, the program >> is working great now. >>

Python and Combinatorics

2007-10-24 Thread none
Hello, Is there some package to calculate combinatorical stuff like (n over k), i.e., n!/(k!(n - k!) ? I know it can be written in about 3 lines of code, but still... Thanks, Ami -- http://mail.python.org/mailman/listinfo/python-list

Re: Iteration for Factorials

2007-10-24 Thread marek . rocki
Tim Golden napisa (a): > It's only a moment before the metaclass and > the Twisted solution come along. :) I couldn't resist. It's not as elegant as I hoped, but hey, at least it memoizes the intermediate classes :-) class fact_0(object): value = 1 class fact_meta(object): def

Re: Hiding tracebacks from end-users

2007-10-24 Thread Matthew Woodcraft
Steven D'Aprano <[EMAIL PROTECTED]> wrote: > I'm writing a command-line application that is meant to be relatively > user friendly to non-technical users. > Consequently, I'd like to suppress Python's tracebacks if an error does > occur, replacing it with a more friendly error message. I'm doin

Re: win32com.client documentation?

2007-10-24 Thread Colin J. Williams
Mark Morss wrote: > I am a unix person, not new to Python, but new to Python programming > on windows. Does anyone know where to find documentation on > win32com.client? I have successfully installed this module and > implemented some example code. But a comprehensive explanation of the > object

ANN: Wing IDE 3.0.1 Released

2007-10-24 Thread Wingware
Hi, We're happy to announce version 3.0.1 of Wing IDE, an advanced development environment for the Python programming language. It is available from: http://wingware.com/downloads This release focuses on fixing minor usability issues found in Wing 3.0 and improves and expands the VI keyboard per

Re: Parameters in context manager's __enter__ method?

2007-10-24 Thread Matimus
On Oct 24, 7:06 am, [EMAIL PROTECTED] wrote: > I am working on a file locking class which I'd like to work with Python > 2.5's context managers. The acquire method takes an optional timeout > argument: > > class FileLock: > ... > def acquire(self, timeout=None): > .

Re: New to Vim and Vim-Python

2007-10-24 Thread Martin Marcher
Hello, 2007/10/24, Daniel Folkes <[EMAIL PROTECTED]>: > I am new to using Vim's scripts. > I was wondering if anyone uses Vim-Python and how to use it? This > includes things like key bindings and such. are you talking about * how to use vim? * http://www.vi-improved.org/tutorial.php * how to

Re: Test for a unicode string

2007-10-24 Thread Martin Marcher
2007/10/24, goldtech <[EMAIL PROTECTED]>: > Question: Is there a way to test a string for unicode chars (ie. test > if a string will throw the error cited above). yes there ist :) >>> isinstance(u"a", basestring) True >>> isinstance(u"a", unicode) True >>> isinstance("a", unicode) False >>> isins

Re: Iteration for Factorials

2007-10-24 Thread [EMAIL PROTECTED]
On Oct 24, 4:05 pm, Lou Pecora <[EMAIL PROTECTED]> wrote: > In article <[EMAIL PROTECTED]>, > Nick Craig-Wood <[EMAIL PROTECTED]> wrote: > > > > > > > Py-Fun <[EMAIL PROTECTED]> wrote: > > > I'm stuck trying to write a function that generates a factorial of a > > > number using iteration and not

Re: building a linux executable

2007-10-24 Thread Prateek
On Oct 24, 5:25 pm, Paul Boddie <[EMAIL PROTECTED]> wrote: > On 24 Okt, 14:20, Bjoern Schliessmann > [EMAIL PROTECTED]> wrote: > > > I'm sorry I cannot help, but how many linux distros have no python > > installed or no packages of it? > > It's not usually the absence of Python that's the problem.

Re: Iteration for Factorials

2007-10-24 Thread Lou Pecora
In article <[EMAIL PROTECTED]>, Nick Craig-Wood <[EMAIL PROTECTED]> wrote: > Py-Fun <[EMAIL PROTECTED]> wrote: > > I'm stuck trying to write a function that generates a factorial of a > > number using iteration and not recursion. Any simple ideas would be > > appreciated. > > Here is the mat

Re: Socket communication problem

2007-10-24 Thread Sandy Dunlop
Jean-Paul Calderone wrote: > Neither the server nor client Python programs you linked to uses the socket > API correctly. The most obvious mistake is that the code does not check the > return value of socket.send(), which you must do. > > Twisted is a third-party library which abstracts many of

Re: Iteration for Factorials

2007-10-24 Thread Nick Craig-Wood
Py-Fun <[EMAIL PROTECTED]> wrote: > I'm stuck trying to write a function that generates a factorial of a > number using iteration and not recursion. Any simple ideas would be > appreciated. Here is the math geek answer ;-) import math def factorial(i): n = i + 1 return math.exp(-n)*(

Re: crontab library

2007-10-24 Thread Guilherme Polo
2007/10/24, Martin Marcher <[EMAIL PROTECTED]>: > 2007/10/24, Guilherme Polo <[EMAIL PROTECTED]>: > > 2007/10/24, Martin Marcher <[EMAIL PROTECTED]>: > > > I had a look at the crontab docs and never realized how complex it > > > actually is. So before I spend time in creating such a thing maybe > >

Re: crontab library

2007-10-24 Thread Martin Marcher
2007/10/24, Guilherme Polo <[EMAIL PROTECTED]>: > 2007/10/24, Martin Marcher <[EMAIL PROTECTED]>: > > I had a look at the crontab docs and never realized how complex it > > actually is. So before I spend time in creating such a thing maybe > > someone did it already :) > > > > When you say complex,

Re: Easiest way to get exit code from os.popen()?

2007-10-24 Thread Karthik Gurusamy
On Oct 24, 12:07 pm, mrstephengross <[EMAIL PROTECTED]> wrote: > Hi folks. I'm using os.popen() to run a command; according to the > documentation, the filehandle.close() oepration is suppsoed to return > the exit code. However, when I execute something like "exit 5", > close() returns 1280. Here's

Re: TeX pestilence (was Distributed RVS, Darcs, tech love)

2007-10-24 Thread J�rgen Exner
Lew wrote: > Xah Lee wrote: >> i have written ... No coherent argument, Actually the modified title is wrong. It should be The Xah Lee pestilence Please see his posting history of off-topic random rambling for details. Oh, and PLEASE +---+ .:\:\:/:/:

Re: Easiest way to get exit code from os.popen()?

2007-10-24 Thread Jean-Paul Calderone
On Wed, 24 Oct 2007 19:07:44 -, mrstephengross <[EMAIL PROTECTED]> wrote: >Hi folks. I'm using os.popen() to run a command; according to the >documentation, the filehandle.close() oepration is suppsoed to return >the exit code. However, when I execute something like "exit 5", >close() returns 1

Re: Better writing in python

2007-10-24 Thread Alexandre Badez
On Oct 24, 3:46 pm, Duncan Booth <[EMAIL PROTECTED]> wrote: > For a 'python like' look lose the Hungarian notation (even Microsoft > have largely stopped using it) I wish I could. But my corporation do not want to apply python.org coding rules > increase the indentation to 4 spaces, Well, it is

Re: Socket communication problem

2007-10-24 Thread Jean-Paul Calderone
On Wed, 24 Oct 2007 20:42:49 +0100, Sandy Dunlop <[EMAIL PROTECTED]> wrote: >Hi, >I'm new here, and fairly new to Python. I have been playing around with >Python and started having a look at socket IO. I have written a script >that communicates over a network to a server which is written in C. >Whi

Re: Socket communication problem

2007-10-24 Thread Sandy Dunlop
Sandy Dunlop wrote: > Hi, > I'm new here, and fairly new to Python. I have been playing around with > Python and started having a look at socket IO. I have written a script > that communicates over a network to a server which is written in C. > While trying to get this working, I have been running

Socket communication problem

2007-10-24 Thread Sandy Dunlop
Hi, I'm new here, and fairly new to Python. I have been playing around with Python and started having a look at socket IO. I have written a script that communicates over a network to a server which is written in C. While trying to get this working, I have been running into a problem where the Pytho

Re: crontab library

2007-10-24 Thread Guilherme Polo
2007/10/24, Martin Marcher <[EMAIL PROTECTED]>: > Hello, > > is anyone aware of a crontab library. > > Possibly even more complete, something that will let me > create/manipulate/delete crontab entries in a nice way and install the > new crontab accordingly. > > I had a look at the crontab docs and

crontab library

2007-10-24 Thread Martin Marcher
Hello, is anyone aware of a crontab library. Possibly even more complete, something that will let me create/manipulate/delete crontab entries in a nice way and install the new crontab accordingly. I had a look at the crontab docs and never realized how complex it actually is. So before I spend t

Test for a unicode string

2007-10-24 Thread goldtech
Hi, I have a regular expression test in a script. When a unicode character get tested in the regex it gives an error: UnicodeError: ASCII decoding error: ordinal not in range(128) Question: Is there a way to test a string for unicode chars (ie. test if a string will throw the error cited above).

Easiest way to get exit code from os.popen()?

2007-10-24 Thread mrstephengross
Hi folks. I'm using os.popen() to run a command; according to the documentation, the filehandle.close() oepration is suppsoed to return the exit code. However, when I execute something like "exit 5", close() returns 1280. Here's the code: pipe = os.popen("exit 5") print pipe.close() # prints 1

Mobile Startup looking for sharp coders

2007-10-24 Thread Vangati
Plusmo is Hiring! Plusmo's mission is to provide the ultimate mobile experience for users by bringing together advanced technologies and easy to use services for mobile phones. Plusmo's innovative widget service lets users run cool "widgets" on their mobile phones. There are over 20,000 widgets an

New to Vim and Vim-Python

2007-10-24 Thread Daniel Folkes
I am new to using Vim's scripts. I was wondering if anyone uses Vim-Python and how to use it? This includes things like key bindings and such. Thanks in advance, Daniel Folkes [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: optparse help output

2007-10-24 Thread Steven Bethard
Dan wrote: > On Oct 24, 12:06 pm, Tim Chase <[EMAIL PROTECTED]> wrote: >>> I've been using optparse for a while, and I have an option with a >>> number of sub-actions I want to describe in the help section: >>> parser.add_option("-a", "--action", >>> help=\ >> [snipped for

Re: optparse help output

2007-10-24 Thread Dan
On Oct 24, 12:06 pm, Tim Chase <[EMAIL PROTECTED]> wrote: > > I've been using optparse for a while, and I have an option with a > > number of sub-actions I want to describe in the help section: > > > parser.add_option("-a", "--action", > > help=\ > > [snipped formatted hel

Re: How to best send email to a low volume list?

2007-10-24 Thread Adam Lanier
On Wed, 2007-10-24 at 16:54 +, chris wrote: > I need to maintain a list of subscribers to an email list for a > "newsletter" that will be sent via a web form probably once a month. > I anticipate low numbers--tens to maybe one hundred subscribers at the > most. Just curious what the best way t

How to best send email to a low volume list?

2007-10-24 Thread chris
I need to maintain a list of subscribers to an email list for a "newsletter" that will be sent via a web form probably once a month. I anticipate low numbers--tens to maybe one hundred subscribers at the most. Just curious what the best way to code this is. Should I just loop through the addresse

Re: Better writing in python

2007-10-24 Thread beginner
On Oct 24, 9:04 am, "A.T.Hofkamp" <[EMAIL PROTECTED]> wrote: > > On 2007-10-24, Alexandre Badez <[EMAIL PROTECTED]> wrote: > > I'm just wondering, if I could write a in a "better" way this > > code > > > lMandatory = [] > > lOptional = [] > > for arg in cls.dArguments: > > if arg is True: > >

Re: Anagrams

2007-10-24 Thread Tim Chase
>> Is "all" inbuilt function in python? what it does? > help(all) > Help on built-in function all in module __builtin__: > > all(...) > all(iterable) -> bool > > Return True if bool(x) is True for all values x in the iterable. It may be helpful to know that any() and all() were ad

Re: TeX pestilence (was Distributed RVS, Darcs, tech love)

2007-10-24 Thread Byung-Hee HWANG
On Mon, 2007-10-22 at 12:19 -0400, Lew wrote: > Xah Lee <[EMAIL PROTECTED]> wrote: > >> 4. Inargurated a massive collection of documents that are invalid > >> HTML. (due to the programing moron's ingorance and need to idolize a > >> leader, and TeX's inherent problem of being a typesetting system t

Re: Anagrams

2007-10-24 Thread Paul Hankin
On Oct 24, 5:03 pm, sandipm <[EMAIL PROTECTED]> wrote: > Is "all" inbuilt function in python? what it does? >>> help(all) Help on built-in function all in module __builtin__: all(...) all(iterable) -> bool Return True if bool(x) is True for all values x in the iterable. -- Paul Hankin

Re: Better writing in python

2007-10-24 Thread Bruno Desthuilliers
Bjoern Schliessmann a écrit : > Alexandre Badez wrote: >> I'm just wondering, if I could write a in a "better" way this code >> [...] >> I think there is a better way, but I can't see how... > > What's "better" for you? Shorter? More performant? More readable? > Complying with best practice? Close

Re: basic web auth and verification

2007-10-24 Thread [EMAIL PROTECTED]
On Oct 23, 12:55 am, Ralf Schönian <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] schrieb: > > > > > > > Trying to figure out how to add login verfication. I believe it is > > logging me in, but theres no way to really tell..any ideas? or > > tutorials out there that can exaplain this to me? > > >

Re: Anagrams

2007-10-24 Thread sandipm
hi, Is "all" inbuilt function in python? what it does? > from itertools import ifilter, count > > def anagram_finder(): > primes = ifilter(lambda p: all(p % k for k in xrange(2, p)), count(2)) > primeAlpha = dict(zip(string.lowercase, primes)) >

Re: optparse help output

2007-10-24 Thread Tim Chase
> I've been using optparse for a while, and I have an option with a > number of sub-actions I want to describe in the help section: > > parser.add_option("-a", "--action", > help=\ [snipped formatted help] > """) > > Unfortunately, when I run the script with --help, this

Re: Better writing in python

2007-10-24 Thread Marc 'BlackJack' Rintsch
On Wed, 24 Oct 2007 16:04:28 +0200, A.T.Hofkamp wrote: >> On 2007-10-24, Alexandre Badez <[EMAIL PROTECTED]> wrote: >> I'm just wondering, if I could write a in a "better" way this >> code >> >> lMandatory = [] >> lOptional = [] >> for arg in cls.dArguments: >> if arg is True: >> lMandatory.

optparse help output

2007-10-24 Thread Dan
I've been using optparse for a while, and I have an option with a number of sub-actions I want to describe in the help section: parser.add_option("-a", "--action", help=\ """Current supported actions: create, build, import, exp_cmd and interact. create -- Vaguely depre

Re: How to find out which functions exist?

2007-10-24 Thread Marc 'BlackJack' Rintsch
On Wed, 24 Oct 2007 15:09:02 +, mrstephengross wrote: >> import module >> from inspect import getmembers, isclass >> classes = getmembers(module, isclass) > > Ok, this makes sense. How can I do it inside the .py file I'm working > on? That is, consider this: > > class A: > pass > cla

Re: Speed of Nested Functions & Lambda Expressions

2007-10-24 Thread beginner
On Oct 24, 2:52 am, Duncan Booth <[EMAIL PROTECTED]> wrote: > beginner <[EMAIL PROTECTED]> wrote: > > It is really convenient to use nested functions and lambda > > expressions. What I'd like to know is if Python compiles fn_inner() > > only once and change the binding of v every time fn_outer() is

Re: win32com.client documentation?

2007-10-24 Thread Matimus
On Oct 24, 7:35 am, Mark Morss <[EMAIL PROTECTED]> wrote: > I am a unix person, not new to Python, but new to Python programming > on windows. Does anyone know where to find documentation on > win32com.client? I have successfully installed this module and > implemented some example code. But a c

Re: How to find out which functions exist?

2007-10-24 Thread Diez B. Roggisch
mrstephengross wrote: >> import module >> from inspect import getmembers, isclass >> classes = getmembers(module, isclass) > > Ok, this makes sense. How can I do it inside the .py file I'm working > on? That is, consider this: > > class A: > pass > class B: > pass > import inspect

Re: Better writing in python

2007-10-24 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : (snip) > Anyone know why towards arg is True and arg is False, arg is None is > faster than arg == None ... Perhaps reading about both the meaning of the 'is' operator might help ? the expression 'arg is True' will only eval to true if 'id(arg) == id(True)'. Now Pyt

Re: win32com.client documentation?

2007-10-24 Thread kyosohma
On Oct 24, 9:35 am, Mark Morss <[EMAIL PROTECTED]> wrote: > I am a unix person, not new to Python, but new to Python programming > on windows. Does anyone know where to find documentation on > win32com.client? I have successfully installed this module and > implemented some example code. But a c

Re: How to find out which functions exist?

2007-10-24 Thread mrstephengross
> import module > from inspect import getmembers, isclass > classes = getmembers(module, isclass) Ok, this makes sense. How can I do it inside the .py file I'm working on? That is, consider this: class A: pass class B: pass import inspect print inspect.getmembers(, inspect.isclass

  1   2   >