Hello
I wrote simple script to test communication:
When i connect via telnet like: "telnet localhost 51423" the server is
working send and receive information. but when i connected to him via
client scrip so client script receive messages from server but server
doesn't receive message from client.
> Yeah! So is my install good? Why didn't the Directory tags in
> httpd.conf work?
Ok. I got the mod_python manual's Testing directions to work as
well. The Testing section actually says:
---
Add the following Apache directives, which can appear in ... the main
server configuration file..
Steven D'Aprano <[EMAIL PROTECTED]> wrote:
>
> Instead of doing:
>
>
> if callable(function): function()
>
> you should do:
>
> try:
> function()
> except TypeError:
> pass
>
>
> That should work for most uses of callable(), but isn't quite the
> same. (What if function() has side-e
On Sun, 29 Jul 2007 23:34:14 -0700, Jia Lu wrote:
> I am making an application with wxpython.
> But I got a problem when I want to change the display string
> according to process status.
>
> I passed the frame to the processing function and use the
> frame.txtobj to change displaying strings.
The Testing section of the mod_python manual says to add the following
to httpd.conf(with my directory structure):
AddHandler mod_python .py
PythonHandler mptest
PythonDebug On
and your tutorial says to add this to httpd.conf:
---
AllowOverride FileInfo
Replace "
Stefan Scholl wrote:
> Michael L Torrie <[EMAIL PROTECTED]> wrote:
>> xml.sax's use of parseString() is exactly correct. xml.sax should
>> *never* parse python unicode strings as by definition XML must be
>> encoded as a *byte stream*, which is what a python string is.
>
> I don't care about the
Hi,
Is there some reference regarding how to package a Python application
for the various platforms? I'm familiar with Windows deployment - I use
Py2Exe & InnoSetup - but I would like more information on deploying on
Mac and Linux.
TIA,
Will McGugan
--
http://www.willmcgugan.com
--
http://ma
Marc 'BlackJack' Rintsch wrote:
> On Sun, 29 Jul 2007 23:34:14 -0700, Jia Lu wrote:
>
>> I am making an application with wxpython.
>> But I got a problem when I want to change the display string
>> according to process status.
>>
>> I passed the frame to the processing function and use the
>> f
Alberto Griggio wrote:
>> Here are some things I can think of, in no particular order:
>
> Thanks! I can't promise I'll take care of all of them (some are nontrivial
> to implement, and would probably take a lot of time), but this list is
> definitely valuable (e.g. I can circulate it through the
This is a very strange exception raised from somewhere in our program.
I have no idea how this happen. And don't know how to reproduce. It
just occurs from time to time.
Can anyone give me some suggestion to fix this?
Thanks.
--
Gilbert
--
http://mail.python.org/mailman/listinfo/python-list
Gilbert Fine wrote:
> This is a very strange exception raised from somewhere in our program.
> I have no idea how this happen. And don't know how to reproduce. It
> just occurs from time to time.
>
> Can anyone give me some suggestion to fix this?
>
If it's raised from "somewhere in your program"
Hi,
I'm porting a Python program from Linux to z/OS using
this Python port
http://www.teaser.fr/~jymengant/mvspython/mvsPythonPort.html
I get the following
Python 2.4.1 (#43, Apr 23 2005, 23:35:50) [C] on mvs
Type "help", "copyright", "credits" or "license" for more information.
>>> import str
On Mon, 30 Jul 2007 03:36:33 -0700, Gilbert Fine wrote:
> This is a very strange exception raised from somewhere in our program.
> I have no idea how this happen. And don't know how to reproduce. It
> just occurs from time to time.
Maybe different `Decimal`\s? Here's how to reproduce such a trac
On Mon, 30 Jul 2007 06:32:55 -0400, Steve Holden wrote:
> >>> [x for x in xrange(0, 101)] == [y for y in xrange(101)]
> True
First I thought: Why the unnecessary list comprehension but to my surprise:
In [33]: xrange(42) == xrange(42)
Out[33]: False
That's strange.
Ciao,
Marc 'BlackJa
Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
> On Mon, 30 Jul 2007 03:36:33 -0700, Gilbert Fine wrote:
>
>> This is a very strange exception raised from somewhere in our
>> program. I have no idea how this happen. And don't know how to
>> reproduce. It just occurs from time to time.
>
> M
On 2007-07-30, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote:
> On Sun, 29 Jul 2007 18:30:22 -0700, CC <[EMAIL PROTECTED]>
> declaimed the following in comp.lang.python:
>
>>
>> Yeah, with this I'm not that concerned about Windows. Though, can WinXP
>> still load the ansi.sys driver?
>>
> I'
The Grant Institute's Grants 101: Professional Grant Proposal Writing Workshop will be held at Simon Fraser University at Harbour Centre, September 12 - 14
, 2007. Interested development professionals, researchers, faculty, and graduate students should register as soon as possible, as demand mean
Hi,
Will McGugan wrote:
> Is there some reference regarding how to package a Python application
> for the various platforms? I'm familiar with Windows deployment - I use
> Py2Exe & InnoSetup - but I would like more information on deploying on
> Mac and Linux.
The standard way to package portable
Will McGugan wrote:
> Hi,
>
> Is there some reference regarding how to package a Python application
> for the various platforms? I'm familiar with Windows deployment - I use
> Py2Exe & InnoSetup - but I would like more information on deploying on
> Mac and Linux.
On mac, there is py2app that all
On Mon, 30 Jul 2007 07:37:05 +, Duncan Booth wrote:
> Steven D'Aprano <[EMAIL PROTECTED]> wrote:
>
>>
>> Instead of doing:
>>
>>
>> if callable(function): function()
>>
>> you should do:
>>
>> try:
>> function()
>> except TypeError:
>> pass
>>
>>
>> That should work for most us
How would one tell at runtime if a particular feature has been enabled by
the "from __future__ import thing" statement?
For example, I can do this:
if 1/2 == 0:
print "classic division in use"
else:
print "true division in use"
I could even do this:
from keyword import keyword
if keyw
Steven D'Aprano <[EMAIL PROTECTED]> wrote:
> Is there any general mechanism?
I'd just use the expected future feature and if the result is not what I
expect (or Python raises any kind of exception, like using a keyword not
present) I'd think I'm in the past :-)
--
Lawrence, oluyede.org - nerope
On 2007-07-30, Steven D'Aprano
<[EMAIL PROTECTED]> wrote:
> How would one tell at runtime if a particular feature has been
> enabled by the "from __future__ import thing" statement?
I don't understand the qualification, "at runtime," you're
making. What's wrong with just importing what you want an
On Jul 30, 9:39 am, Neil Cerutti <[EMAIL PROTECTED]> wrote:
> On 2007-07-30, Steven D'Aprano
>
> <[EMAIL PROTECTED]> wrote:
> > How would one tell at runtime if a particular feature has been
> > enabled by the "from __future__ import thing" statement?
>
> I don't understand the qualification, "at r
On 2007-07-30, at 15:29, Steven D'Aprano wrote:
> How would one tell at runtime if a particular feature has been
> enabled by
> the "from __future__ import thing" statement?
>
> (I don't especially care whether the feature in question has been
> enabled
> via an explicit call to import, or be
On 2007-07-30, André <[EMAIL PROTECTED]> wrote:
> On Jul 30, 9:39 am, Neil Cerutti <[EMAIL PROTECTED]> wrote:
>> I don't understand the qualification, "at runtime," you're
>> making. What's wrong with just importing what you want and
>> using it? If it's already been enabled, no harm will come from
On Mon, 2007-07-30 at 12:53 +, André wrote:
> On Jul 30, 9:39 am, Neil Cerutti <[EMAIL PROTECTED]> wrote:
> > On 2007-07-30, Steven D'Aprano
> >
> > <[EMAIL PROTECTED]> wrote:
> > > How would one tell at runtime if a particular feature has been
> > > enabled by the "from __future__ import thing
Neil Cerutti wrote:
> On 2007-07-30, André <[EMAIL PROTECTED]> wrote:
>> On Jul 30, 9:39 am, Neil Cerutti <[EMAIL PROTECTED]> wrote:
>>> I don't understand the qualification, "at runtime," you're
>>> making. What's wrong with just importing what you want and
>>> using it? If it's already been enab
On Jul 30, 1:34 am, Jia Lu <[EMAIL PROTECTED]> wrote:
> HI all
>
> I am making an application with wxpython.
> But I got a problem when I want to change the display string
> according to process status.
>
> I passed the frame to the processing function and use the
> frame.txtobj to change displa
On Mon, 30 Jul 2007 15:48:00 +0200, "Diez B. Roggisch" <[EMAIL PROTECTED]>
wrote:
>Neil Cerutti wrote:
>
>> On 2007-07-30, André <[EMAIL PROTECTED]> wrote:
>>> On Jul 30, 9:39 am, Neil Cerutti <[EMAIL PROTECTED]> wrote:
I don't understand the qualification, "at runtime," you're
making. W
On 2007-07-30, Diez B. Roggisch <[EMAIL PROTECTED]> wrote:
> Making the switch between different parser-implementations on
> the fly isn't technically impossible - but really, really,
> really complicated. But then, if it's lameness sucks so much,
> you might wanna take a stab at it?
I was conside
Hi,
I'm looking at page 548 of Programming Python (3rd Edition) by Mark
Lutz.
The following GUI script works with no problem, i.e., the rows and
columns expand:
=
# Gridded Widgets Expandable page 548
from Tkinter import *
colors = ["
"Diez B. Roggisch" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Tim Arnold schrieb:
>> Hi, I'm beginning to understand the encode/decode string methods, but I'd
>> like confirmation that I'm still thinking in the right direction:
>>
>> I have a file of latin1 encoded text. Let's
Hi,
I'm in the process of writing some code and noticed a strange problem
while doing so. I'm working with PythonWin 210 built for Python 2.5. I
noticed the problem for the last py file processed by this script,
where the concerned tmp file is only actually written to when
PythonWin is closed. In
On Mon, 2007-07-30 at 14:10 +, Neil Cerutti wrote:
> On 2007-07-30, Diez B. Roggisch <[EMAIL PROTECTED]> wrote:
> > Making the switch between different parser-implementations on
> > the fly isn't technically impossible - but really, really,
> > really complicated. But then, if it's lameness suc
is it possible to do this without passing it as a function argument?
On 30 Jul 2007 06:17:25 GMT, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
> On Sun, 29 Jul 2007 15:22:47 -0700, [EMAIL PROTECTED] wrote:
>
> > I create a variable in a decorator. i want to be able to access that
> > variab
Hi,
I am working with the subprocess.py module in Python 2.4.4 and I am
confused about it's functionality. It uses the standard pipe-fork-exec
method to start a subprocess:
# create pipes
pid = fork()
if pid == 0:
# child
exec(...)
# parent
status = waitpid(pid, 0
<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I'm guessing the garbage collector is causing the file to be written,
> but shouldn't close do this?
Only if you call it ;)
--
http://mail.python.org/mailman/listinfo/python-list
On Mon, 30 Jul 2007 15:59:21 +0200, Jim <[EMAIL PROTECTED]> wrote:
> Hi,
> I'm looking at page 548 of Programming Python (3rd Edition) by Mark
> Lutz.
> The following GUI script works with no problem, i.e., the rows and
> columns expand:
> ==
On Mon, 30 Jul 2007 16:36:00 +0200, <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm in the process of writing some code and noticed a strange problem
> while doing so. I'm working with PythonWin 210 built for Python 2.5. I
> noticed the problem for the last py file processed by this script,
> where the c
[EMAIL PROTECTED] wrote:
> I'm in the process of writing some code and noticed a strange problem
> while doing so. I'm working with PythonWin 210 built for Python 2.5. I
> noticed the problem for the last py file processed by this script,
> where the concerned tmp file is only actually written to
On Jul 30, 11:10 am, Neil Cerutti <[EMAIL PROTECTED]> wrote:
> On 2007-07-30, Diez B. Roggisch <[EMAIL PROTECTED]> wrote:
>
> > Making the switch between different parser-implementations on
> > the fly isn't technically impossible - but really, really,
> > really complicated. But then, if it's lame
On Mon, 30 Jul 2007 07:36:00 -0700, [EMAIL PROTECTED] wrote:
>Hi,
>
> [snip]
>f=open(fileBeginning+".tmp", 'w')
>f.write("Hello")
>f.close
>
You forgot to call close. Try this final line, instead:
f.close()
Jean-Paul
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
i am trying, to no avail yet, to take a C#'s overloaded functions
skeleton and rewrite it in Python by using closures.
I read somewhere on the net (http://dirtsimple.org/2004/12/python-is-
not-java.html) that in Python we can reduce code duplication for
overloaded functions by using closures.
> From: Jim
> Hi,
> I'm looking at page 548 of Programming Python (3rd Edition) by Mark
> Lutz.
> The following GUI script works with no problem, i.e., the rows and
> columns expand:
> =
> # Gridded Widgets Expandable page 548
>
> fro
On Jul 30, 4:42 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> Will McGugan wrote:
> > Hi,
>
> > Is there some reference regarding how to package a Python application
> > for the various platforms? I'm familiar with Windows deployment - I use
> > Py2Exe & InnoSetup - but I would like more info
On Jul 28, 1:40 am, "Hendrik van Rooyen" <[EMAIL PROTECTED]> wrote:
> <[EMAIL PROTECTED]> wrote:
>
> > I'm attempting to start some process control using Python. I've have
> > quite a bit of literature on networking, and have made some tinkering
> > servers and clients for different protocols HTT
Marc 'BlackJack' Rintsch wrote:
> On Mon, 30 Jul 2007 06:32:55 -0400, Steve Holden wrote:
>
>> >>> [x for x in xrange(0, 101)] == [y for y in xrange(101)]
>> True
>
> First I thought: Why the unnecessary list comprehension but to my surprise:
>
> In [33]: xrange(42) == xrange(42)
> Out[33]: Fal
On 2007-07-30, king kikapu <[EMAIL PROTECTED]> wrote:
> i am trying, to no avail yet, to take a C#'s overloaded
> functions skeleton and rewrite it in Python by using closures.
> I read somewhere on the net
> (http://dirtsimple.org/2004/12/python-is- not-java.html) that
> in Python we can reduce co
On Jul 29, 3:14 pm, "Gianmaria" <[EMAIL PROTECTED]> wrote:
> "David Wilson" <[EMAIL PROTECTED]> ha scritto nel messaggionews:[EMAIL
> PROTECTED]
>
>
>
> > Hi there,
>
> > Python has no built-in way of doing this. You may consider writing
> > your own class if you like this pattern (I personally do
Lawrence Oluyede wrote:
> Steven D'Aprano <[EMAIL PROTECTED]> wrote:
>> Is there any general mechanism?
>
> I'd just use the expected future feature and if the result is not what I
> expect (or Python raises any kind of exception, like using a keyword not
> present) I'd think I'm in the past :-)
It looks like both exec and execfile are converting "\n" to an actual
newline
in docstrings!
Start idle:
Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit (Intel)] on
win32
[rest of signon deleted]
>>> s = '''\
strings = 'abc'.split("\n")
'''
>>> print s
strings = 'abc'.split("
"
On 7/30/07, Steve Holden <[EMAIL PROTECTED]> wrote:
> Marc 'BlackJack' Rintsch wrote:
> > On Mon, 30 Jul 2007 06:32:55 -0400, Steve Holden wrote:
> >
> >> >>> [x for x in xrange(0, 101)] == [y for y in xrange(101)]
> >> True
> >
> > First I thought: Why the unnecessary list comprehension but to my
> The closures discussed in the article are not a solution for
> function overloading. They are a solution for function
> composition.
Hmmm
>
> Python generally has no need for function name overloading--if
> you really want it you must do it manually using runtime type
> checking.
>
> def fu
Edward K Ream wrote:
> It looks like both exec and execfile are converting "\n" to an actual
> newline
> in docstrings!
>
> Start idle:
>
> Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit (Intel)]
> on win32
> [rest of signon deleted]
>
s = '''\
> strings = 'abc'.split("\n
Edward K Ream wrote:
> It looks like both exec and execfile are converting "\n" to an actual
> newline
> in docstrings!
>
> Start idle:
>
> Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit (Intel)] on
> win32
> [rest of signon deleted]
>
s = '''\
> strings = 'abc'.split("\n
Chris Mellon wrote:
> On 7/30/07, Steve Holden <[EMAIL PROTECTED]> wrote:
>> Marc 'BlackJack' Rintsch wrote:
>>> On Mon, 30 Jul 2007 06:32:55 -0400, Steve Holden wrote:
>>>
>>> [x for x in xrange(0, 101)] == [y for y in xrange(101)]
True
>>> First I thought: Why the unnecessary list comp
king kikapu a écrit :
> Hi,
>
> i am trying, to no avail yet, to take a C#'s overloaded functions
> skeleton and rewrite it in Python by using closures.
> I read somewhere on the net (http://dirtsimple.org/2004/12/python-is-
> not-java.html) that in Python we can reduce code duplication for
> over
> The problem is because you are trying to represent a Python
program as a Python string literal, and doing it incorrectly.
Yes, that is exactly the problem. Thanks to all who replied. Changing
changing '\n' to '\\n' fixed the problem.
Edward
---
[EMAIL PROTECTED] a écrit :
(top-post corrected)
>
> On 30 Jul 2007 06:17:25 GMT, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]>
> wrote:
>> On Sun, 29 Jul 2007 15:22:47 -0700, [EMAIL PROTECTED] wrote:
>>
>>> I create a variable in a decorator. i want to be able to access that
>>> variable in the f
I've been having a few problems with connecting to SQL Server, initially I
was using dblib however found some problems with returning text fields
whereby all text fields were ignored and it bawked at multiline sql
statements.
Having found these major stumbling blocks I've started using pymssql wh
On Jul 27, 10:04 pm, Steven D'Aprano
<[EMAIL PROTECTED]> wrote:
> On Sat, 28 Jul 2007 03:10:32 +, GreenH wrote:
> > I get some string as below from a library method (qt3
> > QDropEvent.data()) I use.
> > file:///C:/Documents%20and%20Settings/Username/My%20Documents/45-61-Abc%20fold-%20den.vru
>
Thanks. I think I have some direction to do logging, to get more
information about this problem.
It seems that I don't get used to dynamic language yet.
--
Gilbert
On Jul 30, 7:20 pm, Duncan Booth <[EMAIL PROTECTED]> wrote:
> Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
>
> > On Mon, 30 J
On 7/30/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> is it possible to do this without passing it as a function argument?
>
Sort of. Functions are objects in python, so you can set attribute on them. E.g.
def foo():
return foo.c
foo.c = 1
print foo()
Which will print 1. Of course, it
On Jul 30, 8:24 am, "Hamilton, William " <[EMAIL PROTECTED]> wrote:
> > From: Jim
> > Hi,
> > I'm looking at page 548 of Programming Python (3rd Edition) by Mark
> > Lutz.
> > The following GUI script works with no problem, i.e., the rows and
> > columns expand:
> >
"king kikapu" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
| > def func(obj):
| > if isinstance(obj, bool):
| > return not obj
| > elif isinstance(obj, int):
| > return obj * 2
| > elif isinstance(obj, basestring):
| > return obj + obj
| > else:
| > raise No
QOTW: "If you really want to learn hard-core Python, probably your best bet
is:
* read everything Tim Peters has ever written in comp.lang.python
(this will take a few months), start with "import this"
* read everything the PyPy guys have ever written (particularly
Christian and
Mike Howarth wrote:
> I've been having a few problems with connecting to SQL Server, initially I
> was using dblib however found some problems with returning text fields
> whereby all text fields were ignored and it bawked at multiline sql
> statements.
>
> Having found these major stumbling block
Viktor:
This is a great idea. Thank you
I don't currently have a voice setup on my machine, but will try to get
one as soon as possible. I would be pleased to trade English practice
for Python support.
Regards,
Barry
[EMAIL PROTECTED]
541-302-1107
We who cut mere s
On Mon, 30 Jul 2007 11:00:14 -0500, Edward K Ream wrote:
>> The problem is because you are trying to represent a Python
> program as a Python string literal, and doing it incorrectly.
>
> Yes, that is exactly the problem. Thanks to all who replied. Changing
> changing '\n' to '\\n' fixed the pr
Mike Howarth schrieb:
> I've been having a few problems with connecting to SQL Server, initially I
> was using dblib however found some problems with returning text fields
> whereby all text fields were ignored and it bawked at multiline sql
> statements.
>
> Having found these major stumbling blo
En Mon, 30 Jul 2007 03:50:52 -0300, Alia Khouri <[EMAIL PROTECTED]>
escribió:
> But I'm not letting the logging module off, it's still not the easiest
> or most intuitive module to work with.
>
> For example: a basic Log class that can be programatically configured
> would be quicker to work wit
On Mon, 30 Jul 2007 11:16:01 -0400, Steve Holden wrote:
> Marc 'BlackJack' Rintsch wrote:
>> First I thought: Why the unnecessary list comprehension but to my surprise:
>>
>> In [33]: xrange(42) == xrange(42)
>> Out[33]: False
>>
>> That's strange.
>>
> Not so strange really. The two xrange obj
>From: "Steven D'Aprano" <[EMAIL PROTECTED]>
>Newsgroups: comp.lang.python
>Subject: Re: Comparing Dictionaries
>Date: Sat, 28 Jul 2007 10:21:14 +1000
>To: python-list@python.org
>
>On Fri, 27 Jul 2007 14:11:02 -0500, Kenneth Love wrote:
>
> > The published recipe (based on ConfigParser) did not h
At 03:23 AM 7/28/2007, you wrote:
>Hi Kenneth, being new to Python i wondered if you at least considered
>Doctests as part of your testing solution.
>Other languages don't have Doctest.
>
>- Paddy.
Until I read your post, I had never even heard of Doctest. I will look
into it.
Here is the list
Finally Available! Who Else Wants to Watch Satellite TV On Your
Computer Without Paying Monthly Fees... FOR FREE?
For the very first time, Satellite TV is available on your computer
with our "Cutting-Edge" Software!
It's as Easy as 1...2...3...
1. Download our TVonPCPro software
2. Click on t
Finally Available! Who Else Wants to Watch Satellite TV On Your
Computer Without Paying Monthly Fees... FOR FREE?
For the very first time, Satellite TV is available on your computer
with our "Cutting-Edge" Software!
It's as Easy as 1...2...3...
1. Download our TVonPCPro software
2. Click on t
On Jul 30, 11:42 am, "Chris Mellon" <[EMAIL PROTECTED]> wrote:
> > > On Mon, 30 Jul 2007 06:32:55 -0400, Steve Holden wrote:
>
> > >> >>> [x for x in xrange(0, 101)] == [y for y in xrange(101)]
> > >> True
> nitpick: list(xrange(42)) == list(xrange(42)) is slightly more concise
> than the list c
[EMAIL PROTECTED] wrote:
> On Jul 30, 11:42 am, "Chris Mellon" <[EMAIL PROTECTED]> wrote:
>
On Mon, 30 Jul 2007 06:32:55 -0400, Steve Holden wrote:
> >>> [x for x in xrange(0, 101)] == [y for y in xrange(101)]
> True
>
>> nitpick: list(xrange(42)) == list(xrange(42)) is slightly mor
Dick Moores wrote:
> At 01:27 PM 7/28/2007, Dennis Lee Bieber wrote:
>
>> On Fri, 27 Jul 2007 16:27:57 -0700, Dick Moores <[EMAIL PROTECTED]>
>> declaimed the following in comp.lang.python:
>>
>>
>> > Well, the publisher is Prentice Hall, "The world's leading
>> > educational publisher". Textbooks
Hi,
I am new in Python. I have one question in the database application in
python.
I have one excel file that I want to save in the database table. In the
Microsoft access, I can easy do this one by using Docmd ..
How do I use this one in Python? I already know how to connect to a
databa
hi
coulde any one show me the usage of "yield" keyword specially in this
example:
"""Fibonacci sequences using generators
This program is part of "Dive Into Python", a free Python book for
experienced programmers. Visit http://diveintopython.org/ for the
latest version.
"""
__author__ = "Mark
On Jul 30, 8:30 pm, Kenneth Love <[EMAIL PROTECTED]> wrote:
> At 03:23 AM 7/28/2007, you wrote:
>
> >Hi Kenneth, being new to Python i wondered if you at least considered
> >Doctests as part of your testing solution.
> >Other languages don't have Doctest.
>
> >- Paddy.
>
> Until I read your post,
On Jul 30, 2007, at 4:13 PM, Ehsan wrote:
> hi
> coulde any one show me the usage of "yield" keyword specially in this
> example:
>
>
> """Fibonacci sequences using generators
>
> This program is part of "Dive Into Python", a free Python book for
> experienced programmers. Visit http://diveintop
I would like to get a list of sub directories in a directory.
If I use os.listdir i get a list of directories and files in that .
i only want the list of directories in a directory and not the files
in it.
anyone has an idea regarding this.
--
http://mail.python.org/mailman/listinfo/python-list
Rohan wrote:
> I would like to get a list of sub directories in a directory.
> If I use os.listdir i get a list of directories and files in that .
> i only want the list of directories in a directory and not the files
> in it.
> anyone has an idea regarding this.
>
Look up os.walk (allows you to
On Jul 30, 4:40 pm, Erik Jones <[EMAIL PROTECTED]> wrote:
> On Jul 30, 2007, at 4:13 PM, Ehsan wrote:
>
>
>
>
>
> > hi
> > coulde any one show me the usage of "yield" keyword specially in this
> > example:
>
> > """Fibonacci sequences using generators
>
> > This program is part of "Dive Into Pytho
I have a C++ application that creates a collection of COM objects.
I would like to give the Python interpreter access to these interfaces that were
created in C++ land.
Stated another way, how can I have Python consume a IDispatch pointer from C++
and wrap it with one of those nice Python classes
Hi,
If I have a number n and want to generate a list based on like the
following:
def f(n):
l=[]
while n>0:
l.append(n%26)
n /=26
return l
I am wondering what is the 'functional' way to do the same.
Thanks,
beginner
--
http://mail.python.org/mailman/listinfo/py
Huang, Shun-Hsien ercot.com> writes:
>
but how do I copy a excel file into
> database table by using Python?
>
I'm not sure if this helps, but you can access the Excel Automation model very
easily with:
import win32com.client
x1 = client.Dispatch("Excel.Application")
Now you can use the x1
Hello Brad,
If you don't get a reply here, there is a win32 specific Python list
on ActiveState.com wher ethey do talk about excel & other Win32 python
issues.
On Jul 30, 3:49 pm, Brad Johnson <[EMAIL PROTECTED]> wrote:
> Huang, Shun-Hsien ercot.com> writes:
>
>
>
> but how do I copy a excel fi
On Jul 29, 11:35 pm, Tim Roberts <[EMAIL PROTECTED]> wrote:
> John DeRosa <[EMAIL PROTECTED]> wrote:
> >On Sat, 28 Jul 2007 00:19:02 -0700, "[EMAIL PROTECTED]"
> ><[EMAIL PROTECTED]> wrote:
>
> >>For example, how many ways can you put 492 marbles into
> >>264 ordered bins such that each bin has at
Cappy2112 gmail.com> writes:
>
>
> Hello Brad,
>
> If you don't get a reply here, there is a win32 specific Python list
> on ActiveState.com wher ethey do talk about excel & other Win32 python
> issues.
>
Thanks, but I believe this you meant to address the OP Shun-Hsien, not me. Just
wanted
Kenneth Love <[EMAIL PROTECTED]> writes:
> I will search on Google for more info on Doctest.
Doctest is recent. Try:
http://python.org/doc/lib/module-doctest.html
Diveintopython should probably be updated to use doctest instead
of unittest. unittest is Java-descended and doesn't fit into Pytho
Hello All,
I have a python module I wrote in C some time ago and I have since
forgotten how to use my functions and so I wanted to add some
doc-strings such that "help(function_name)" would give some help in the
interactive interpreter. In the cPython source, it seems like python
wrapper funct
beginner <[EMAIL PROTECTED]> writes:
> def f(n):
> l=[]
> while n>0:
> l.append(n%26)
> n /=26
> return l
>
> I am wondering what is the 'functional' way to do the same.
If you're trying to learn functional programming, maybe you should use
a functional language li
> from decimal import Decimal
>
> In [21]: a = Decimal()
>
> In [22]: class Decimal(object):
>: pass
>:
>
> In [23]: b = Decimal()
>
> In [24]: a - b
Perhaps I don't understand what you are doing here, but on line 22 you
overload Decimal. If you just have
a = Decimal()
b = Dec
On Jul 30, 3:48 pm, beginner <[EMAIL PROTECTED]> wrote:
> Hi,
>
> If I have a number n and want to generate a list based on like the
> following:
>
> def f(n):
> l=[]
> while n>0:
> l.append(n%26)
> n /=26
> return l
>
> I am wondering what is the 'functional' way to
On Mon, 30 Jul 2007 22:48:10 +, beginner wrote:
> Hi,
>
> If I have a number n and want to generate a list based on like the
> following:
>
> def f(n):
> l=[]
> while n>0:
> l.append(n%26)
> n /=26
> return l
>
> I am wondering what is the 'functional' way to
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes:
> Recursion is common in functional programming:
>
> def f(n, l=None):
> if l == None:
> l = []
> if n > 0:
> return f(n/26, l + [n%26])
> else:
> return l
>
> print f(1000)
Right, this is functional style, but q
1 - 100 of 130 matches
Mail list logo