Hello:
I keep thinking from some time ago in how to conect two or more
Python interpreters. This began as interest in calling Java code from
C program, which was solved (at the time) using an intermediate file.
But having CPython and Jython, I think it would be great to call a
function from,
On Oct 22, 10:42 am, geremy condra wrote:
> On Wed, Oct 21, 2009 at 9:45 PM, holmes86 wrote:
> > Hi,everyone
>
> > I'm a python newbie,and I want to write a facebook client.But I don't
> > know how to do it.Meanwhile I have any write web experience,so I also
> > don't know how to analyse web page
En Tue, 20 Oct 2009 19:57:19 -0300, Ethan Furman
escribió:
Steven D'Aprano wrote:
On Tue, 20 Oct 2009 14:45:49 -0700, Zac Burns wrote:
My preference would be that failIfEqual checks both != and ==. This is
practical, and would benefit almost all use cases. If "!=" isn't "not
==" (IEEE NaNs
On Oct 22, 6:34 am, "Gabriel Genellina"
wrote:
> > class AttrDict(dict):
> > """A dict whose items can also be accessed as member variables."""
> > def __init__(self, *args, **kwargs):
> > dict.__init__(self, *args, **kwargs)
> > self.__dict__ = self
>
> > def copy
hello,
i have some form which split by iframe.
subject field is no probelm ,but content field was come from another iframe
source..
so i can't input text in content's field..
im using PAMIE and win32com module..
i have to put text in 'contents.contentsValue' here.
but i have no luck..anyone can h
Steven D'Aprano writes on 20 Oct 2009
05:35:18 GMT:
> As far as I'm concerned, asking for help on homework without being honest
> up-front about it and making an effort first, is cheating by breaking the
> social contract. Anyone who rewards cheaters by giving them the answer
> they want is pa
Hello
As my Master's dissertation I chose Cpython optimization. That's why
i'd like to ask what are your suggestions what can be optimized. Well,
I know that quite a lot. I've downloaded the source code (I plan to
work on Cpython 2.6 and I've downloaded 2.6.3 release). By looking at
the code I've
On Wed, 21 Oct 2009 22:53:29 -0700, rurpy wrote:
> On 10/21/2009 03:13 PM, Lie Ryan wrote:
>> > [email protected] wrote:
>>> >> On 10/21/2009 01:40 AM, Lie Ryan wrote:
> [...]
>>> As a metaphor, which one do you think is better in the long term:
>>> charities or microcredits?
>>> >>
>>> >>
On 10/21/2009 03:13 PM, Lie Ryan wrote:
> > [email protected] wrote:
>> >> On 10/21/2009 01:40 AM, Lie Ryan wrote:
[...]
>>> >>> As a metaphor, which one do you think is better in the long term:
>>> >>> charities or microcredits?
>> >>
>> >> Both of course. Why on earth would anyone think there
>> >
On 10/22/2009 12:35 AM, Steven D'Aprano wrote:
> On Wed, 21 Oct 2009 22:53:29 -0700, rurpy wrote:
>
>> On 10/21/2009 03:13 PM, Lie Ryan wrote:
>>> > [email protected] wrote:
>> On 10/21/2009 01:40 AM, Lie Ryan wrote:
>> [...]
> >>> As a metaphor, which one do you think is better in the long
On Wed, Oct 21, 2009 at 10:04 PM, Dieter Maurer wrote:
> Steven D'Aprano writes on 20 Oct
> 2009 05:35:18 GMT:
> > As far as I'm concerned, asking for help on homework without being honest
> > up-front about it and making an effort first, is cheating by breaking the
> > social contract. Anyone w
On Thu, Oct 22, 2009 at 7:04 AM, Dieter Maurer wrote:
> Steven D'Aprano writes on 20 Oct 2009
> 05:35:18 GMT:
>> As far as I'm concerned, asking for help on homework without being honest
>> up-front about it and making an effort first, is cheating by breaking the
>> social contract. Anyone who r
"Gabriel Genellina" writes:
> En Wed, 21 Oct 2009 06:24:55 -0300, Lele Gaifax
> escribió:
>
>> "Gabriel Genellina" writes:
>>
> nosetest should do nothing special. You should configure the environment
> so Python *knows* that your console understands utf-8. Once Python is
> aware of the *real*
Hi guys,
I am new to python and wed-development, I managed to have some nice example
running up till now.
I am playing with google app engine, I have this situation:
I have a text box in an html page, I want to get the value in it and pass it
to the python script to process it
I can pass values f
On Oct 22, 4:05 am, TerryP wrote:
> On Oct 21, 9:04 pm, nusch wrote:
>
> > Is there any simple command which allows me to save position of all
> > windows: QMainWindow, QDialogs and qdockwidgets with their sizes,
> > dock state and positions ? Or do I need to store those values
> > manually, how
Emmanuel Surleau a écrit :
It still manages to retain flexibility, but you're basically stuck with
Django's ORM
You're by no way "stuck" with Django's ORM - you are perfectly free not
to use it. But then you'll obviously loose quite a lot of useful
features and 3rd part apps...
You lose most of
En Wed, 21 Oct 2009 12:24:37 -0300, Tim Arnold
escribió:
Hi, I'm writing a script to capture a command on the commandline and run
it
on a remote server.
I guess I don't understand subprocess because the code below exec's the
user's .cshrc file even though by default shell=False in the Popen
En Wed, 21 Oct 2009 15:14:32 -0300, escribió:
On Oct 21, 4:59 am, Bruno Desthuilliers wrote:
beSTEfar a écrit :
(snip)
> When parsing strings, use Regular Expressions.
And now you have _two_ problems
For some simple parsing problems, Python's string methods are powerful
enough to make REs
nusch wrote:
> Is there any simple command which allows me to save position of all
> windows: QMainWindow, QDialogs and qdockwidgets with their sizes,
> dock state and positions ? Or do I need to store those values
> manually, how can I do it fast?
You can use saveState() from QMainWindow to sav
If you use the logging package but don't like using the ConfigParser-based
configuration files which it currently supports, keep reading. I'm proposing to
provide a new way to configure logging, using a Python dictionary to hold
configuration information. It means that you can convert a text file s
On Wed, Oct 21, 2009 at 12:35:11PM EDT, Nobody wrote:
[..]
> Characters outside the 16-bit range aren't supported on all builds.
> They won't be supported on most Windows builds, as Windows uses 16-bit
> Unicode extensively:
I knew nothing about UTF-16 & friends before this thread.
Best part of
Hi all
I want to output the date of the with this format strftime('%d%m%y') but the
date ie '%d' should be the date of yesterday
eg
import time
strftime('%d%m%y') # something like minus a day..
Thank you..am a newbie to python
baboucarr sanneh wrote:
Hi all
I want to output the date of the with this format strftime('%d%m%y') but the
date ie '%d' should be the date of yesterday
eg
import time
strftime('%d%m%y') # something like minus a day..
Thank you..am a newbie to python
import datetime
yesterday = datetime.d
Hi All,
Need some idea here:
On my windows machine, there is a Java based program that runs all the time.
Every now and then, a popup appears out of this program.
To close this popup, it requires user to Check the Do-not-show-this-popup
check box and then, click on OKAY button.
Is there a python
En Thu, 22 Oct 2009 05:25:16 -0300, Lele Gaifax
escribió:
"Gabriel Genellina" writes:
En Wed, 21 Oct 2009 06:24:55 -0300, Lele Gaifax
escribió:
"Gabriel Genellina" writes:
nosetest should do nothing special. You should configure the environment
so Python *knows* that your console under
En Thu, 22 Oct 2009 07:14:31 -0300, Vinay Sagar Prakash
escribió:
On my windows machine, there is a Java based program that runs all the
time.
Every now and then, a popup appears out of this program.
To close this popup, it requires user to Check the Do-not-show-this-popup
check box and th
Hi tim,
well i tried what your script but i do have an error
>>> import datetime
>>> yesterday = datetime.date.today () - datetime.timedelta (days=1)
>>> print yesterday.strftime ("%d%m%y")
SyntaxError: invalid syntax (, line 1)
when i jus check the variable i.e yesterday i do get the out put b
baboucarr sanneh wrote:
Hi tim,
well i tried what your script but i do have an error
import datetime
yesterday = datetime.date.today () - datetime.timedelta (days=1)
print yesterday.strftime ("%d%m%y")
SyntaxError: invalid syntax (, line 1)
when i jus check the variable i.e yesterday i do ge
On Thu, 2009-10-22 at 10:44 +0200, Ahmed Barakat wrote:
> Hi guys,
>
> I am new to python and wed-development, I managed to have some nice
> example running up till now.
> I am playing with google app engine, I have this situation:
>
> I have a text box in an html page, I want to get the value in
Hi tim
Thank you very much ...I have got it now..now i can continue with the backup
script i want to make
$LIM $...@dy
> Date: Thu, 22 Oct 2009 11:36:50 +0100
> From: [email protected]
> CC: [email protected]
> Subject: Re: Date strftime('%d%m%y') date to be of yesterday
>
> babou
baboucarr sanneh wrote:
Hi tim
Thank you very much ...I have got it now..now i can continue with the backup
script i want to make
By the way, the convention on this list is to bottom-post,
that is to add your comments / reply to the bottom of the
post you're replying to. These things vary
$LIM $...@dy
> Date: Thu, 22 Oct 2009 11:51:08 +0100
> From: [email protected]
> CC: [email protected]
> Subject: Re: Date strftime('%d%m%y') date to be of yesterday
>
> baboucarr sanneh wrote:
> >
> > Hi tim
> >
> > Thank you very much ...I have got it now..now i can continue wi
Hi,
I'm using the logging module.
At one point in my code I disable logging like this:
logging.disable(logging.INFO)
But how can I enable the logging again further on?
I've tried the following, which doesn't work for re-enabling the logger:
my_logger.setLevel(logging.INFO)
I've also tried to d
jorma kala wrote:
Hi,
I'm using the logging module.
At one point in my code I disable logging like this:
logging.disable(logging.INFO)
But how can I enable the logging again further on?
I've tried the following, which doesn't work for re-enabling the logger:
my_logger.setLevel(logging.INF
Hi,
I have an annoying problem connecting to a remote host via the
socket module from Python 2.5 / 2.6 on WinXP. :-(
Short description
-
socket.connect(("host", port)) times out with socket.error
10060, while other applications on the same box can connect
to the remote site with
Hi guys
I want to make a script that can copy files and folders from one location and
paste it to another location..
e.g from c:\test to d:\test
thanks regrads
$LIM $...@dy
_
Windows L
baboucarr sanneh wrote:
I want to make a script that can copy files and folders from one location and
paste it to another location..
e.g from c:\test to d:\test
Have a look at the shutil module
TJG
--
http://mail.python.org/mailman/listinfo/python-list
I want to collect the the information from cisco devices through ssh. Using
pexpect logout method seems good but maxread attribute is limited to 1168
characters. Allthough I set it to 2000, when I do show running-config on cisco
router output comes to the logfile until the 1168 character is reac
On Wed, 2009-10-21, [email protected] wrote:
> Hello,
> I would like to make a program that takes a text file with the
> following representation:
>
> outlook = sunny
> | humidity <= 70: yes (2.0)
> | humidity > 70: no (3.0)
> outlook = overcast: yes (4.0)
> outlook = rainy
> | windy = TRUE: n
Ben Finney writes:
> Richard Riley writes:
>
>> Ben Finney writes:
>> > Reported to service provider as spam.
>>
>> Please don't reply to SPAM. You just make it visible to those of us
>> with better filters. Hint : spammers do not read your reply.
>
> I didn't quote the spam except to be clear
"Gabriel Genellina" writes:
> En Thu, 22 Oct 2009 05:25:16 -0300, Lele Gaifax
> escribió:
>> Who is the culprit here?
>
> unittest, or ultimately, this bug: http://bugs.python.org/issue4947
Thank you. In particular I found
http://bugs.python.org/issue4947#msg87637 as the best fit, I think
that
"Albert Hopkins" wrote in message
news:[email protected]...
> On Thu, 2009-10-22 at 10:44 +0200, Ahmed Barakat wrote:
>> Hi guys,
>>
>> I am playing with google app engine, I have this situation:
>>
>> I have a text box in an html page, I want to get the value i
On Wed, 21 Oct 2009 22:47:24 -0700 (PDT), Carl Banks
wrote:
>On Oct 21, 12:46 pm, David C Ullrich wrote:
>> On Tue, 20 Oct 2009 15:22:55 -0700, Mensanator wrote:
>> > On Oct 20, 1:51 pm, David C Ullrich wrote:
>> > I'm not saying either behaviour is wrong, it's just not obvious that the
>> > on
Hi,
I have a python build script that calls various commands, some using
os.system().
Often, if I want to terminate the script prematurely, I press ctrl-c,
but I have to do this many times before I can kill the script for
good. I was wondering is there a way that I define a signal handler
and kil
On Wed, 21 Oct 2009 14:43:48 -0700 (PDT), Mensanator
wrote:
>On Oct 21, 2:46 pm, David C Ullrich wrote:
>> On Tue, 20 Oct 2009 15:22:55 -0700, Mensanator wrote:
>> > On Oct 20, 1:51 pm, David C Ullrich wrote:
>> >> On Thu, 15 Oct 2009 18:18:09 -0700, Mensanator wrote:
>> >> > All I wanted to do
On Thu, Oct 22, 2009 at 8:46 AM, Balban wrote:
> Hi,
>
> I have a python build script that calls various commands, some using
> os.system().
>
> Often, if I want to terminate the script prematurely, I press ctrl-c,
> but I have to do this many times before I can kill the script for
> good. I was w
Balban wrote:
Hi,
I have a python build script that calls various commands, some using
os.system().
Often, if I want to terminate the script prematurely, I press ctrl-c,
but I have to do this many times before I can kill the script for
good. I was wondering is there a way that I define a signal
On Thu, Oct 22, 2009 at 4:01 PM, Jean-Michel Pichavant
wrote:
> Balban wrote:
>>
>> Hi,
>>
>> I have a python build script that calls various commands, some using
>> os.system().
>>
>> Often, if I want to terminate the script prematurely, I press ctrl-c,
>> but I have to do this many times before
On Oct 22, 7:47�am, David C. Ullrich wrote:
> On Wed, 21 Oct 2009 14:43:48 -0700 (PDT), Mensanator
>
>
>
>
>
> wrote:
> >On Oct 21, 2:46�pm, David C Ullrich wrote:
> >> On Tue, 20 Oct 2009 15:22:55 -0700, Mensanator wrote:
> >> > On Oct 20, 1:51�pm, David C Ullrich wrote:
> >> >> On Thu, 15 Oct
Hi all
This is just out of curiosity.
I have a tuple, and I want to create a new tuple with a new value in the
first position, and everything else unchanged.
I figured out that this would work -
>>> t = ('a', 'b', 'c')
>>> t2 = ('x',) + t[1:]
>>> t2
('x', 'b', 'c')
Then I thought I would neat
On Wed, 21 Oct 2009 14:43:48 -0700 (PDT), Mensanator
wrote:
>On Oct 21, 2:46 pm, David C Ullrich wrote:
>> On Tue, 20 Oct 2009 15:22:55 -0700, Mensanator wrote:
>> > On Oct 20, 1:51 pm, David C Ullrich wrote:
>> >> On Thu, 15 Oct 2009 18:18:09 -0700, Mensanator wrote:
>> >> > All I wanted to do
Frank Millman wrote:
> Hi all
>
> This is just out of curiosity.
>
> I have a tuple, and I want to create a new tuple with a new value in the
> first position, and everything else unchanged.
>
> I figured out that this would work -
>
t = ('a', 'b', 'c')
t2 = ('x',) + t[1:]
t2
>
Gabriel Genellina wrote:
En Tue, 20 Oct 2009 19:57:19 -0300, Ethan Furman
escribió:
Steven D'Aprano wrote:
On Tue, 20 Oct 2009 14:45:49 -0700, Zac Burns wrote:
My preference would be that failIfEqual checks both != and ==. This is
practical, and would benefit almost all use cases. If "!="
Greetings, List!
Say I have an old-fashioned dbf style table, with a single name field of
50 characters:
names = dbf.Table(':memory:', 'name C(40)')
Then I add a bunch of names from who-knows-where:
for name in some_iterable():
names.append((name))
Now I want to know how many start wi
On Thu, 22 Oct 2009 10:56:07 +
baboucarr sanneh wrote:
> > By the way, the convention on this list is to bottom-post,
>
> okay i got that will be doing so from now on :)thnx
Thanks but what the previous poster forgot to mention was that you
should also trim the text that you are replying
Diez B. Roggisch wrote:
> Frank Millman wrote:
>
>>
> t = ('a', 'b', 'c')
> t2 = 'x', + t[1:]
>> Traceback (most recent call last):
>> File "", line 1, in
>> TypeError: bad operand type for unary +: 'tuple'
>
>>
>
> the operator precedence. Sure you want to write
>
> (a, -b, c)
>
>
geremy condra wrote:
I decided to play around with nonlocal declarations today, and was
somewhat surprised when a call to nonlocals() resulted in 'nonlocals
is not defined'. Is there an a standard equivalent to globals() or
locals() for variables in outer nested scopes?
Geremy Condra
Not that
Hi all
I posted the following to the pyodbc google group, but got no reply - it
seems a bit quiet there. I hope someone here can help.
I am using pyodbc version 2.1.6 on Windows Server 2003, connecting to Sql
Server 2005.
This works -
>>> cur.execute('select ?', None)
>>> cur.fetchall()
[(No
Aaron Watters writes:
> On Oct 16, 10:35 am, mario ruggier wrote:
>> On Oct 5, 4:25 pm, Aaron Watters wrote:
>>
>> > Occasionally I fantasize about making a non-trivial change
>> > to one of these programs, but I strongly resist going further
>> > than that because the ORM meatgrinder makes it
Frank Millman wrote:
I posted the following to the pyodbc google group, but got no reply - it
seems a bit quiet there. I hope someone here can help.
I am using pyodbc version 2.1.6 on Windows Server 2003, connecting to Sql
Server 2005.
This works -
cur.execute('select ?', None)
cur.fetc
Hello Group,
If a reference to an imported module reaches zero will Python cleanup
everything related to that module and unload the compiled code, etc, etc...?
For example:
import sys
m = [__import__(str(x)) for x in xrange(1,4)]
del sys.modules['1']
del m[0]
print m
Is module['1'] really un
Carl Banks wrote:
s.split() and s.split(sep) do different things, and there is no string
sep that can make s.split(sep) behave like s.split(). That's not
unheard of but it does go against our typical expectations. It would
have been a better library design if s.split() and s.split(sep) were
d
On 2009-10-22, Florian Berger wrote:
> I think I narrowed it down to the fact that Python 2.x on
> WinXP won't connect in this setup.
>
> Does anyone have a hint what to do?
I'd probably fire up Wireshark and capture the network traffic
to/from the remote host when the Python app attempts to con
I'm trying to do FastCgiAccessChecker with a django project; the base idea is to
use the django controlled logins to control access to an apache down load area.
My original idea was to make django responsible for the FastCgiAccessChecker
script itself since we're running django as an external f
On 10/22/2009 02:24 AM, Andre Engels wrote:
> On Thu, Oct 22, 2009 at 7:04 AM, Dieter Maurer wrote:
>> Steven D'Aprano writes on 20 Oct
>> 2009 05:35:18 GMT:
>>> As far as I'm concerned, asking for help on homework without being honest
>>> up-front about it and making an effort first, is cheatin
On Oct 22, 8:17 am, David C. Ullrich wrote:
> On Wed, 21 Oct 2009 14:43:48 -0700 (PDT), Mensanator
>
>
>
>
>
> wrote:
> >On Oct 21, 2:46 pm, David C Ullrich wrote:
> >> On Tue, 20 Oct 2009 15:22:55 -0700, Mensanator wrote:
> >> > On Oct 20, 1:51 pm, David C Ullrich wrote:
> >> >> On Thu, 15 Oct
On Oct 22, 10:05 am, John Posner wrote:
> Carl Banks wrote:
>
>
>
> > s.split() and s.split(sep) do different things, and there is no string
> > sep that can make s.split(sep) behave like s.split(). That's not
> > unheard of but it does go against our typical expectations. It would
> > have bee
On Thu, 22 Oct 2009 10:27:57 -0700 (PDT), Steve wrote:
> I have some data that I'm performing some analysis on.
> How do I grab the numerical value if it's present and ignore
> otherwise. So in the following example
> I would have assign the following values to my var
> 16
> 20
> 2
> 7
> 0
>
>
> In
On Oct 22, 11:27 am, Steve wrote:
> I have some data that I'm performing some analysis on.
> How do I grab the numerical value if it's present and ignore
> otherwise. So in the following example
> I would have assign the following values to my var
> 16
> 20
> 2
> 7
> 0
>
> In Field6
> Sample Strin
Francesco Bochicchio wrote:
> As a simple and plain python user, I would value a version of cython that
> can be used to built faster executables out of almost-python code (that
> is python code with a few additional restructions). Maybe using typing
> inference to avoid declaring explicitely th
Qrees wrote:
>> http://www.cython.org/
>
> I was thinking about sacrificing some flexibility of Python and thank
> you for pointing me to this project. I didn't about it.
> [...]
> BTW: My seminar deals with object oriented programming.
It's actually not hard to extend the set of optimisations in
On 10/22/2009 07:17 AM, David C. Ullrich wrote:
> On Wed, 21 Oct 2009 14:43:48 -0700 (PDT), Mensanator
> wrote:
>
>>On Oct 21, 2:46 pm, David C Ullrich wrote:
>>> On Tue, 20 Oct 2009 15:22:55 -0700, Mensanator wrote:
>>> > On Oct 20, 1:51 pm, David C Ullrich wrote:
>>> >> On Thu, 15 Oct 2009 18:
On 10/22/2009 06:32 AM, David C. Ullrich wrote:
> On Wed, 21 Oct 2009 22:47:24 -0700 (PDT), Carl Banks
> wrote:
>
>>On Oct 21, 12:46 pm, David C Ullrich wrote:
>>> On Tue, 20 Oct 2009 15:22:55 -0700, Mensanator wrote:
>>> > On Oct 20, 1:51 pm, David C Ullrich wrote:
>>> > I'm not saying either b
On Wed, 21 Oct 2009 11:24:37 -0400, Tim Arnold wrote:
> Hi, I'm writing a script to capture a command on the commandline and run it
> on a remote server.
> I guess I don't understand subprocess because the code below exec's the
> user's .cshrc file even though by default shell=False in the Popen
On 10/22/2009 03:23 AM, Gabriel Genellina wrote:
> En Wed, 21 Oct 2009 15:14:32 -0300, escribió:
>
>> On Oct 21, 4:59 am, Bruno Desthuilliers > [email protected]> wrote:
>>> beSTEfar a écrit :
>>> (snip)
>>> > When parsing strings, use Regular Expressions.
>>>
>>> And now you h
On Wed, Oct 21, 2009 at 1:28 PM, Qrees wrote:
> Hello
>
> As my Master's dissertation I chose Cpython optimization. That's why
> i'd like to ask what are your suggestions what can be optimized. Well,
> I know that quite a lot. I've downloaded the source code (I plan to
> work on Cpython 2.6 and I'
Greetings, all!
I would like to add unicode support to my dbf project. The dbf header
has a one-byte field to hold the encoding of the file. For example,
\x03 is code-page 437 MS-DOS.
My google-fu is apparently not up to the task of locating a complete
resource that has a list of the 256 p
Hi Grant,
thanks for the reply!
> I'd probably fire up Wireshark and capture the network traffic
> to/from the remote host when the Python app attempts to connect
> and when another client connects.
Yes, low level traffic analyzing would have been the next logical step.
However, mysteriously thi
Dan Guido gmail.com> writes:
>
> Hi Anthony,
>
> Thanks for your reply, but I don't think your tests have any control
> characters in them. Try again with a \v, a \n, or a \x in your input
> and I think you'll find it doesn't work as expected.
>
> --
> Dan Guido
Why don't you try it yourself
En Thu, 22 Oct 2009 17:08:21 -0300, escribió:
On 10/22/2009 03:23 AM, Gabriel Genellina wrote:
En Wed, 21 Oct 2009 15:14:32 -0300, escribió:
On Oct 21, 4:59 am, Bruno Desthuilliers wrote:
beSTEfar a écrit :
(snip)
> When parsing strings, use Regular Expressions.
And now you have _two_ p
Hi,
I have to pass over 150 parameters to a print statement ala:
print "%s %s %s <150'th unique text> %s" % (v
[0], v[1], ... v[150])
I can't use a for loop like I normally would over the list "v" due to
the different text fragments between each var.
Is there a lambda function I can use i
KB wrote:
Hi,
I have to pass over 150 parameters to a print statement ala:
print "%s %s %s <150'th unique text> %s" % (v
[0], v[1], ... v[150])
I can't use a for loop like I normally would over the list "v" due to
the different text fragments between each var.
Is there a lambda function
Mensanator wrote:
That's interesting. If string.splitfields(delim) was equivalent to
str.split(sep), it would have been useful to add the phrase
"str.split(sep) is equivalent to the old string.splitfields(delim)
which no longer exists." to the docs. That way, a search on
"splitfields" would direc
KB wrote:
Hi,
I have to pass over 150 parameters to a print statement ala:
print "%s %s %s <150'th unique text> %s" % (v
[0], v[1], ... v[150])
I can't use a for loop like I normally would over the list "v" due to
the different text fragments between each var.
Is there a lambda function
On Thu, Oct 22, 2009 at 5:16 PM, KB wrote:
> Hi,
>
> I have to pass over 150 parameters to a print statement ala:
>
> print "%s %s %s <150'th unique text> %s" % (v
> [0], v[1], ... v[150])
>
> I can't use a for loop like I normally would over the list "v" due to
> the different text fragment
KB writes:
> I have to pass over 150 parameters to a print statement ala:
>
> print "%s %s %s <150'th unique text> %s" % (v
> [0], v[1], ... v[150])
>
> I can't use a for loop like I normally would over the list "v" due to
> the different text fragments between each var.
print "%s ..." %
[resend, with Subject line corrected and formatting crud deleted]
Mensanator wrote:
That's interesting. If string.splitfields(delim) was equivalent to
str.split(sep), it would have been useful to add the phrase
"str.split(sep) is equivalent to the old string.splitfields(delim)
which no longer ex
On Thu, Oct 22, 2009 at 11:16 PM, KB wrote:
> Hi,
>
> I have to pass over 150 parameters to a print statement ala:
>
> print "%s %s %s <150'th unique text> %s" % (v
> [0], v[1], ... v[150])
>
> I can't use a for loop like I normally would over the list "v" due to
> the different text fragmen
I have text that looks like the following (but all in one string with
'\n' separating the lines):
1.E-08 1.58024E-06 0.0048
1.E-07 2.98403E-05 0.0018
1.E-06 8.85470E-06 0.0026
1.E-05 6.08120E-06 0.0032
1.E-03 1.61817E-05 0.0022
1.E+00 8.3
If there is a number in the line I want the number otherwise I want a
0
I don't think I can use strip because the lines have no standards
Thanks again
Steve
On Oct 22, 1:53 pm, [email protected] wrote:
> On Oct 22, 11:27 am, Steve wrote:
>
>
>
>
>
> > I have some data that I'm performing some ana
On Oct 22, 4:35 pm, John Posner wrote:
> [resend, with Subject line corrected and formatting crud deleted]
>
> Mensanator wrote:
> > That's interesting. If string.splitfields(delim) was equivalent to
> > str.split(sep), it would have been useful to add the phrase
> > "str.split(sep) is equivalent
Excuse the top-post, but thanks to all, the tuple was the way to go.
On Oct 22, 2:16 pm, KB wrote:
> Hi,
>
> I have to pass over 150 parameters to a print statement ala:
>
> print "%s %s %s <150'th unique text> %s" % (v
> [0], v[1], ... v[150])
>
> I can't use a for loop like I normally wou
On Thu, 22 Oct 2009 23:26:01 +0100, Jeremy wrote:
I have text that looks like the following (but all in one string with
'\n' separating the lines):
1.E-08 1.58024E-06 0.0048
[snip]
5.E+00 2.42717E-05 0.0017
total 1.93417E-04 0.0012
I want to capture the two or
Hello Everybody... here we go - my question:
1. I am using Eclipse IDE with Python 2.5 and pyodbc25 - winXP; need to read
content from a
Lotus Notes database, so run some basic query like - SELECT personname FROM
tablename.
2. 'import pyodbc' is ok - python see it!
3. But it doesn't connect, when
I'm using pySerial to connect to a serial port (rs232) on a windows xp
machine. I'm using python interactive interpretor to interact with the
device. I type the following:
import serial
ser = serial.Serial(2)
ser.write("command")
But this does nothing to the control. I have been able to connect vi
Sorry, I still don't understand.
I gather you don't literally want a "0" output
for every line that does not contain a number
since then your output would be, 0, 0, 16, 20, ...
(I'm assuming you want to ignore the "6" in "In Field6")
which does not match your sample output. Do you mean,
for every
> I have text that looks like the following
> (but all in one string with '\n' separating the lines):
>
>
> I want to capture the two or three floating point numbers in each line
> and store them in a tuple.
>
> I have the regular expression pattern
>
Jeremy
For a non-r
On Oct 23, 7:28 am, Ethan Furman wrote:
> Greetings, all!
>
> I would like to add unicode support to my dbf project. The dbf header
> has a one-byte field to hold the encoding of the file. For example,
> \x03 is code-page 437 MS-DOS.
>
> My google-fu is apparently not up to the task of locating
On Thu, Oct 22, 2009 at 13:59 +0200, Lele Gaifax wrote:
> "Gabriel Genellina" writes:
>> unittest, or ultimately, this bug: http://bugs.python.org/issue4947
> http://bugs.python.org/issue4947#msg87637 as the best fit, I think
You might also want to have a look at:
http://bugs.python.org/iss
On 22Oct2009 16:03, Bahadir Balban wrote:
| On Thu, Oct 22, 2009 at 4:01 PM, Jean-Michel Pichavant
| wrote:
| > Balban wrote:
| >> I have a python build script that calls various commands, some using
| >> os.system().
| >>
| >> Often, if I want to terminate the script prematurely, I press ctrl-c,
1 - 100 of 126 matches
Mail list logo