On 10/24/07, Bruno Desthuilliers
<[EMAIL PROTECTED]> wrote:
> dineshv a écrit :
> > We have a list of N (>2,000) keywords (of datatype string). Each of
> > the N keywords has associated with it a list of names of varying
> > numbers. For example, keyword(1) will have a list of L1 names
> > associ
[EMAIL PROTECTED] wrote in news:1193127053.740024.144730
@q5g2000prf.googlegroups.com:
>
> Do note that the reason you may not see images is that the website
> has, '''correctly''', identified your program as an automated bot and
> blocked it access to things...
Probably so, I did not get anythi
On Oct 23, 3:37 am, kettle <[EMAIL PROTECTED]> wrote:
> Hi,
> I am rather new to python, and am currently struggling with some
> encoding issues. I have some utf-8-encoded text which I need to
> encode as iso-2022-jp before sending it out to the world. I am using
> python's encode functions:
> -
"Jon Ribbens" wrote:
> On 2007-10-23, Hendrik van Rooyen <[EMAIL PROTECTED]> wrote:
> > Yuk. Reminds me of one of the Hitachi processors that
> > has a single depth hardware "link register" that tells a
> > subroutine where it was called from.
>
> That's how ARM processors work, and they're e
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 called
> or if Python compile and generate a new function object e
Recently I started an open source project "cutils" on the sourceforge:
http://sourceforge.net/projects/crablfs/
The document can be found at:
http://crablfs.sourceforge.net/#ru_data_man
This project's mirrord/fs_mirror tool is a near realtime file system
mirroring application across 2 or more
[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?
>
> Thanks
>
> import urllib,urllib2,cookielib
>
> passlst = open(passfile, 'r').re
Thanks Leo, and everyone else, these were very helpful replies. The
issue was exactly as Leo described, and I apologize for not being
aware of it, and thus not quite reporting it correctly.
At the moment I don't care about round-tripping between half-width and
full-width kana, rather I need only
I can remember Python having a feature which allowed you to add some
simple tests to your code, something like adding console output to your
actual python script, like so:
>>> 1+1
2
>>> 2*7
14
... then python would actually run these queries and check that the
expected results occurred.
I
Alex Hunsley wrote:
> I can remember Python having a feature which allowed you to add some
> simple tests to your code, something like adding console output to your
> actual python script, like so:
>
>
> >>> 1+1
> 2
> >>> 2*7
> 14
>
>
> ... then python would actually run these queries and ch
Diez B. Roggisch wrote:
> Alex Hunsley wrote:
>
>> I can remember Python having a feature which allowed you to add some
>> simple tests to your code, something like adding console output to your
>> actual python script, like so:
>>
>>
>> >>> 1+1
>> 2
>> >>> 2*7
>> 14
>>
>>
>> ... then python wou
Hello,
I'm trying to package my python program into a linux executable using
cx_freeze. The goal is that the user should require python on their
system.
I've managed to make the binaries on Fedora Core 6 and they run fine.
However, when I move to Ubuntu (tested on Ubuntu Server 7.04 and
xUbuntu D
On 22/10/2007, Andy Kittner <[EMAIL PROTECTED]> wrote:
> >> Are you running this on vim or gvim? If you are running on gvim, my
> >> guess is that the handles that you are passing are not valid. In
> >> either case, try creating explicit handles that are valid (such as for
> >> /dev/null) and creat
--
http://mail.python.org/mailman/listinfo/python-list
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.append(arg)
else:
lOptional.append(arg)
return (lMandatory, lOptional)
I think there is a better way, but I can't see how...
--
htt
Prateek wrote:
> I'm trying to package my python program into a linux executable
> using cx_freeze. The goal is that the user should require python
> on their system.
>
> I've managed to make the binaries on Fedora Core 6 and they run
> fine. However, when I move to Ubuntu (tested on Ubuntu Serve
On 24 Okt, 14:20, Bjoern Schliessmann 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. What if
your application uses various extension modules which in turn rely on
various li
BBands a écrit :
> On Oct 23, 4:20 pm, [EMAIL PROTECTED] wrote:
>> Hello. Indeed the doStuff function in the doStuff module can't do 'a.b
>> = 0' (the double dot was just a typo, right?)
>
> Yes.
>
>> because it doesn't know anything about an object named a.
>
> I was trying to understand why it
TheFlyingDutchman wrote:
> I am trying to install Python 2.5 on Windows XP. It installs into
> the root directory on C:\ instead of C:\Python25
BTW, what exactly is behind the idea to install to c:\python25
instead of %PROGRAMFILES%\python25?
Regards,
Björn
--
BOFH excuse #339:
manager in t
On Wed, Oct 24, 2007 at 12:09:40PM -, Alexandre Badez wrote regarding
Better writing in python:
>
> lMandatory = []
> lOptional = []
> for arg in cls.dArguments:
> if arg is True:
> lMandatory.append(arg)
> else:
> lOptional.append(arg)
> return (lMandatory, lOptional)
>
> I thin
On Wed, 24 Oct 2007 12:09:40 +, Alexandre Badez 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.append(arg)
> else:
> lOptional.append(arg)
> return (lManda
On Oct 24, 1:09 pm, 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.append(arg)
> else:
> lOptional.append(arg)
> return (lMan
On Oct 24, 1:09 pm, 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.append(arg)
> else:
> lOptional.append(arg)
> return (lMan
On Oct 24, 1:09 pm, 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.append(arg)
> else:
> lOptional.append(arg)
> return (lMan
On Oct 24, 7:27 am, Bjoern Schliessmann wrote:
> TheFlyingDutchman wrote:
> > I am trying to install Python 2.5 on Windows XP. It installs into
> > the root directory on C:\ instead of C:\Python25
>
> BTW, what exactly is behind the idea to install to c:\python25
> instead of %PROGRAMFILES%\python
On Oct 24, 7:09 am, 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.append(arg)
> else:
> lOptional.append(arg)
> return (lMan
On 10/24/07, J. Clifford Dyer <[EMAIL PROTECTED]> wrote:
>
> On Wed, Oct 24, 2007 at 12:09:40PM -, Alexandre Badez wrote regarding
> Better writing in python:
> >
> > lMandatory = []
> > lOptional = []
> > for arg in cls.dArguments:
> > if arg is True:
> > lMandatory.append(arg)
> > els
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.append(arg)
> else:
> lOptional.append(arg)
> return (lMandat
Hi Alexandre,
On Oct 24, 2:09 pm, Alexandre Badez <[EMAIL PROTECTED]> wrote:
> I'm just wondering, if I could write a in a "better" way this code
Please tell us, what it is you want to achieve. And give us some
context
for this function.
> lMandatory = []
> lOptional = []
> for arg in cls.dArgum
sandipm wrote:
> hi james,
> this is one implementation using python dictionaries.
>
> report ={}
> for row in data:
> if not row[0] in report:
I'd use:
if row[0] not in report:
> report[row[0]] = [row[0], row[1], 0, 0, 0, 0, 0, 0, 0, 0, 0,
> 0, 0, 0]
> if row[2]:
>
ANNOUNCE: NUCULAR 0.1 Fielded Full Text Indexing [BETA]
Nucular is a system for creating disk based full text indices
for fielded data. It can be accessed via a Python API
or via a suite of command line interfaces, and an example
Web based archive browser.
The 0.1 release adds a bunch of features
Alexandre Badez <[EMAIL PROTECTED]> wrote:
> Thanks for your try Cliff, I was very confused :P
> More over I made some mistake when I post (to make it easiest).
>
> Here is my real code:
>
> with
> dArguments = {
> 'argName' : {
> 'mandatory' : bool, # True or False
> [...], # other fi
Thanks for your try Cliff, I was very confused :P
More over I made some mistake when I post (to make it easiest).
Here is my real code:
with
dArguments = {
'argName' : {
'mandatory' : bool, # True or False
[...], # other field we do not care here
}
}
lMandatory = []
lOptional = []
fo
On Oct 24, 8:02 am, [EMAIL PROTECTED] wrote:
> On Oct 24, 7:09 am, 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.app
> 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.append(arg)
> else:
> lOptional.append(arg)
> return (lMand
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):
...
def __enter__(self):
self.acquire()
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
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? Closely following a specific
programming parad
Paul Boddie wrote:
> It's not usually the absence of Python that's the problem. What if
> your application uses various extension modules which in turn rely
> on various libraries (of the .so or .a kind)? It may be more
> convenient to bundle all these libraries instead of working out
> the package
On Oct 24, 2:02 pm, [EMAIL PROTECTED] wrote:
> On Oct 24, 7:09 am, 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.app
Thanks Gabriel. You are correct - this is even documented in the MySQLdb User's
Guide (http://mysql-python.sourceforge.net/MySQLdb.html), but it's certainly
not intuitive, given how python string interpolation normally works.
Gabriel Genellina <[EMAIL PROTECTED]> wrote: En Tue, 23 Oct 2007 20:50
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
objects and methods available is n
> Here is my real code:
>
> with
> dArguments = {
> 'argName' : {
> 'mandatory' : bool, # True or False
> [...], # other field we do not care here
> }
> }
>
> lMandatory = []
> lOptional = []
> for arg in cls.dArguments:
> if cls.dArguments[arg]['mandatory']:
> lMandatory.append
On Oct 24, 4:15 pm, Paul Hankin <[EMAIL PROTECTED]> wrote:
> On Oct 24, 2:02 pm, [EMAIL PROTECTED] wrote:
>
>
>
> > On Oct 24, 7:09 am, Alexandre Badez <[EMAIL PROTECTED]> wrote:
>
> > > I'm just wondering, if I could write a in a "better" way this code
>
> > > lMandatory = []
> > > lOptional = []
On Oct 24, 2:28 am, Paul Hankin <[EMAIL PROTECTED]> wrote:
> On Oct 23, 9:21 am, [EMAIL PROTECTED] wrote:
>
> > This one uses a dictionary to store prime values of each letter in the
> > alphabet and for each line multiple the results of the characters
> > (which is unique for each anagram) and add
On Mon, 22 Oct 2007 09:07:37 -0400, Lew <[EMAIL PROTECTED]> wrote:
>Xah Lee wrote:
>> i have written ... No coherent argument,
I've long killfiled XL to the effect that all of his threads are
ignored altogether, since the guy is "nice" enough to only take part
to his own rants, but occasionally
On Oct 24, 10:42 am, [EMAIL PROTECTED] wrote:
> On Oct 24, 4:15 pm, Paul Hankin <[EMAIL PROTECTED]> wrote:
>
>
>
> > On Oct 24, 2:02 pm, [EMAIL PROTECTED] wrote:
>
> > > On Oct 24, 7:09 am, Alexandre Badez <[EMAIL PROTECTED]> wrote:
>
> > > > I'm just wondering, if I could write a in a "better" way
On 24 Okt, 16:10, Bjoern Schliessmann wrote:
> Paul Boddie wrote:
> > It's not usually the absence of Python that's the problem. What if
> > your application uses various extension modules which in turn rely
> > on various libraries (of the .so or .a kind)? It may be more
> > convenient to bundle
> 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
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
[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
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
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
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
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
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
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.
> 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
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))
>
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?
>
> >
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
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
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
>> 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
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:
> >
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
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
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
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
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
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
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
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).
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
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
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
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
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
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
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
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
+---+ .:\:\:/:/:
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
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,
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
> >
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)*(
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
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
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.
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
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
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
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):
> .
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
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
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
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
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
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.
>>
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
Thank you.
jab
--
http://mail.python.org/mailman/listinfo/python-list
1 - 100 of 148 matches
Mail list logo