Hi
I wonder if anyone can help me with a problem that I have with MSDE
SQL db. [I am changing to SQL server soon].
I have an app that runs on a server that communicates with remote
devices using email, this and other similar servers then sends
XML/SOAP messages to a master application.
I am in
Thanks. Please refer to following snipt:
1 >>> class Printable(type):
2 ... def __str__(cls):
3 ... return "This is class %s" % cls.__name__
4 ...
5 >>> class C(object):
6 ... __metaclass__ = Printable
7 ...
8 >>>
9 >>> C.__str__
10
11 >>>
12 >>> print C
13 This is class C
I see,
gregarican wrote:
> gavino wrote:
> > wtf
>
> You have to be trolling I would think. For most people I think they
> would like to code in Python if they had a personal choice. But for
> professional reasons they are likely forced to code in Java because of
> the sheep mentality of the large corpor
George Sakkis:
> You can also save an attribute lookup for append; just add
> append = primes.append
> outside of the loop and replace primes.append(x) with append(x)
> That should cut down a few fractions of second.
We were talking about Psyco, and I think with Psyco (just released for
Py 2.5, BT
"Scheol Service" <[EMAIL PROTECTED]> wrote:
>
>Im just unsure on how to compile python code into .exe executionable
>files. Is there a simple way to do this?
Sort of. Python code is not compiled to machine language. Instead, it is
compiled to an intermediate language that is then interpreted.
Steve Bergman wrote:
...
> Why? It doesn't seem intuitive to me. To me, it makes it harder, not
> easier, to work with slices than if indexing started at 1 and the
> above expression got you the 2nd throught the 5th character.
Dijkstra has an article about this:
http://www.cs.utexas.edu/users
I work with Python on mac os 10.3.9
First of all :
Install a newer version of python for mac, from
http://pythonmac.org/packages/
(python 2.4.4 -> http://pythonmac.org/packages/py24-fat/index.html)
(python 2.5 -> http://pythonmac.org/packages/py25-fat/index.html)
you have a more "standard" pyt
On Wed, Nov 29, 2006 at 03:15:45PM -0800, SPE - Stani's Python Editor wrote:
> Do you have python-wxversion installed?
>
> $sudo apt-get install python-wxversion
>
That helped. But why isn't it included in the wxPython download ?
Anyway, the first screen looks great. I will explore spe.
Thanks.
e
Steven D'Aprano wrote:
> On Wed, 29 Nov 2006 17:00:30 +0100, Fredrik Lundh wrote:
>
>> Neil Cerutti wrote:
>>
BTW, iterating over range(len(a)) is an anti-pattern in Python.
>>>
>>> Unless you're modifying elements of a, surely?
>>
>> and needs to run on a Python version that doesn't suppo
has any one tried py gtk on windows?
I tried to do a google search for accessibility related issues but did
not find any thing specific to pygtk and windows accessibility.
I even tried to search for just gtk and windows accessibility but
again no result.
so I am now posting this message as a last h
Steven D'Aprano wrote:
> And remember that if alist is truly huge, you may take a performance hit
> due to duplicating all those megabytes of data when you slice it.
Having the same object in two lists simultaneously does not double the total
amount of memory; you just need space for an extra po
On 30 nov, 10:50, egbert <[EMAIL PROTECTED]> wrote:
> On Wed, Nov 29, 2006 at 03:15:45PM -0800, SPE - Stani's Python Editor wrote:>
> Do you have python-wxversion installed?
>
> > $sudo apt-get install python-wxversionThat helped. But why isn't it
> > included in the wxPython download ?
I was sur
Peter Otten <[EMAIL PROTECTED]> wrote:
> That example was chosen to prove your point. The real contender for the
> "swap items" problem are slices.
>
> def swap_slice(items):
> left = items[::2]
> items[::2] = items[1::2]
> items[1::2] = left
> return items
>
It makes no differ
Duncan Booth wrote:
> items[::2], items[1::2] = items[1::2], items[::2]
Cool. I really should have found that myself.
Peter
--
http://mail.python.org/mailman/listinfo/python-list
[Adam]
> For the life of me I can't understand why he would troll
> comp.lang.python when comp.lang.lisp is there.
+1 QOTW!
--
Richie Hindle
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
SPE - Stani's Python Editor schrieb:
> On 30 nov, 10:50, egbert <[EMAIL PROTECTED]> wrote:
>> On Wed, Nov 29, 2006 at 03:15:45PM -0800, SPE - Stani's Python Editor
>> wrote:> Do you have python-wxversion installed?
>>
>>> $sudo apt-get install python-wxversionThat helped. But why isn't it
>>> inc
which version of SPE are you using? You'll need SPE 0.8.3.c for
wxPython 2.7 I've fixed this bug already in the latest version.
http://prdownload.berlios.de/python/SPE-0.8.3.c-wx2.6.1.0-no_setup.zip
Stani
On 30 nov, 12:23, Thomas Ploch <[EMAIL PROTECTED]> wrote:
> SPE - Stani's Python Editor sch
Do you think that the following could became PEP (pre PEP).
Please, read it, comment it, reformulate it,...
Abstract
Introduction of the mechanism for language extensions via
modules written using other languages. Extensions of
Python could be done via special interpreter extensions.
F
gavino escreveu:
> I want to learn to program and I can't seem to pick a direction. A
> java guy I know makes a lot of $, but a lot of reading I have done
> shows lisp smalltalk and haskell to be really nice, as well as of
> course python. It seems python is 4/5 way to lisp yet has a lot of
> p
Richie Hindle wrote:
> [Adam]
> > For the life of me I can't understand why he would troll
> > comp.lang.python when comp.lang.lisp is there.
>
> +1 QOTW!
Overruled! ;-)
Mostly because comp.lang.lisp seems to have become a much better place
to get quotes of the week about Python than comp.lang.py
[Adam]
> For the life of me I can't understand why he would troll
> comp.lang.python when comp.lang.lisp is there.
[Richie]
> +1 QOTW!
[Paul]
> Overruled! ;-)
>
> Mostly because comp.lang.lisp seems to have become a much better place
> to get quotes of the week about Python than comp.lang.pytho
On Thu, 30 Nov 2006 11:17:17 +0100, Peter Otten wrote:
> Steven D'Aprano wrote:
>
>> And remember that if alist is truly huge, you may take a performance hit
>> due to duplicating all those megabytes of data when you slice it.
>
> Having the same object in two lists simultaneously does not doub
Steven D'Aprano <[EMAIL PROTECTED]> wrote:
> Everybody always forgets corner cases... like lists with odd number of
> items... *wink*
>
I didn't forget. I just assumed that raising an exception was a more useful
response.
> Here is a version that handles both odd and even length lists:
>
> def
Chuck Rhode wrote:
> I couldn't find a routine to clean up, regularize, and reformat Python
> code, so I wrote one:
>
> http://www.lacusveris.com/PythonTidy/PythonTidy.python
>
> Now, I'm looking for beta-testers. Compensation is a bit on the low
> side. In fact it's limited to the satisfactio
Maybe this help someone else.
The solution comes with old VB6. It's "COM Land" so
introspecting the VB WebBrowser Control object I found properties and
methods to correctly access all parts of the python IEC.Document object
returned by the IEC Controller
http://www.mayukhbose.com/python/IEC/inde
Roberto Bonvallet a écrit :
> Chuck Rhode wrote:
>> I couldn't find a routine to clean up, regularize, and reformat Python
>> code, so I wrote one:
>>
>> http://www.lacusveris.com/PythonTidy/PythonTidy.python
>>
>> Now, I'm looking for beta-testers. Compensation is a bit on the low
>> side. In f
[Roberto]
> # vim: set fileencoding=utf-8 :
> ...
> # -*- coding: utf-8 -*-
> ...
> About changing the encoding declaration from vim-style to emacs-style:
> I'll take it as an insult :)
[Laurent]
> This is not "emacs-style", this is Python normalized source encoding
> directive for correct interp
Laurent Pointal wrote:
> ...
>> # vim: set fileencoding=utf-8 :
> ...
>> # -*- coding: utf-8 -*-
> ...
>
> This is not "emacs-style", this is Python normalized source encoding
> directive for correct interpretation of u"..." strings by Python
> interpreter.
>
> See http://www.python.org/dev/peps/
In <[EMAIL PROTECTED]>, Laurent Pointal wrote:
> Roberto Bonvallet a écrit :
>> # vim: set fileencoding=utf-8 :
> ...
>> # -*- coding: utf-8 -*-
> ...
>> About changing the shebang line: I'll take it as a bug.
>> About changing the encoding declaration from vim-style to emacs-style:
>> I'll take
Laurent Pointal a écrit :
> See http://www.python.org/dev/peps/pep-0263/
Aye, sorry for my missreading...
[seem I hurt the emacs guy]
--
http://mail.python.org/mailman/listinfo/python-list
In article <[EMAIL PROTECTED]>,
Steve Bergman wrote:
>BTW, can this code be made any more efficient?
>def primes():
>primes=[3]
>for x in xrange(5,1000,2):
>maxfact = int(math.sqrt(x))
>flag=True
>for y in primes:
>if y > maxfact:
>br
Hi,
is there a more elegant way to get o.__class__.__name__. For instance I
would imagine name(o).
--
alf
--
http://mail.python.org/mailman/listinfo/python-list
Pekka Karjalainen wrote:
> You can omit the call to math.sqrt if you test this instead.
>
> y*y > x
>
> in place of if y > maxfact: .
Or use
sqrt = lambda x: x ** .5
Cheers,
--
Klaus Alexander Seistrup
http://klaus.seistrup.dk/
--
http://mail.python.org/mailman/listinfo/python-li
alf wrote:
> Hi,
> is there a more elegant way to get o.__class__.__name__. For instance I
> would imagine name(o).
def name_of_type(o):
return o.__class__.__name__
name_of_type(o)
Carl Banks
P.S. name(o) suggests it's the name of the object, not the type
P.P.S. you could use type(o).__na
"alf" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi,
> is there a more elegant way to get o.__class__.__name__. For instance I
> would imagine name(o).
>
> --
> alf
>>> name = lambda o : o.__class__.__name__
>>> name(1)
'int'
Go for it!
-- Paul
--
http://mail.python.org
Grant Edwards wrote:
> On 2006-11-29, Bart Ogryczak <[EMAIL PROTECTED]> wrote:
> >
> > Fredrik Lundh wrote:
> >> Bart Ogryczak wrote:
> >>
> >> > I´ve got this problem with pickle, it seems it doesn´t handle
> >> > correctly infinite values (nor does Python return overflow/underflow
> >> > error).
Roberto Bonvallet wrote this on Thu, Nov 30, 2006 at 01:21:55PM +. My
reply is below.
> About changing the shebang line: I'll take it as a bug.
> About changing the encoding declaration from vim-style to
> emacs-style: I'll take it as an insult :)
Ooh!
> Both are comments, and should be
On Tue, 28 Nov 2006 04:30:09 -0600, Nick Craig-Wood
<[EMAIL PROTECTED]> wrote:
>I'm not sure how you do open stdout to /dev/null in python though!
>
>I suspect something like this...
>
> import posix
> posix.close(1)
> posix.open("/dev/null", posix.O_WRONLY)
Thanks everyone, but no go :-/ Neith
Petr Prikryl wrote:
> Do you think that the following could became PEP (pre PEP).
> Please, read it, comment it, reformulate it,...
>
> Abstract
>
> Introduction of the mechanism for language extensions via
> modules written using other languages. Extensions of
> Python could be done via spe
On Thu, 30 Nov 2006 15:38:11 +0100, Vincent Delporte <[EMAIL PROTECTED]>
wrote:
>Here's my Python rewrite:
>http://codecomplete.free.fr/asterisk/python_cid.txt
More information. Here's what Asterisk says when I call in:
*CLI>
-- Executing LookupCIDName("SIP/fxo-0844e458", "") in new stack
On Thu, 30 Nov 2006 15:48:53 +0100, Vincent Delporte <[EMAIL PROTECTED]>
wrote:
>-- Launched AGI Script /var/lib/asterisk/agi-bin/ncid.python.agi
>Failed to execute '/var/lib/asterisk/agi-bin/ncid.python.agi': Exec
>format error
Stupid me :-/ Forgot the all-important
#!/usr/bin/python
Sorry
Chuck Rhode wrote:
[...]
> Thanks, too, for trying *PythonTidy*.
No, thanks you for writing such a tool!
> [...] nevertheless, most [options] are declared near the beginning where
> they sit just begging for end-user involvement. See: CODING_SPEC and
> SHEBANG.
The fact that I immediately notic
On Nov 30, 3:19 am, "gavino" <[EMAIL PROTECTED]> wrote:
> I want to learn to program and I can't seem to pick a direction. A
> java guy I know makes a lot of $, but a lot of reading I have done
> shows lisp smalltalk and haskell to be really nice, as well as of
> course python. It seems python is
Vincent Delporte wrote:
> On Thu, 30 Nov 2006 15:38:11 +0100, Vincent Delporte <[EMAIL PROTECTED]>
> wrote:
>
>> Here's my Python rewrite:
>> http://codecomplete.free.fr/asterisk/python_cid.txt
>>
First line of your script should be:
#! /usr/bin/env python
which is how Linux knows what in
Hi,
I have a very simple Python script that performs some batch processing
as follows: a list of system commands is set up in an automated way
and then each of the processes is launched separately using threads -
a basic producer-consumer thing.
I found a recipe on ASPN on how to intercept keyboa
Bruce Eckel states the case pretty well in this interview:
http://www.artima.com/intv/aboutme.html
Bruce is the author of "Thinking In Java" and other excellent books,
but has migrated from the Java camp. (I'm excited to see him getting at
least a bit involved in TurboGears. He has a lot to offe
On Thu, 30 Nov 2006 10:18:24 -0500, "Mike C. Fletcher"
<[EMAIL PROTECTED]> wrote:
>which is how Linux knows what interpreter to use for the script.
Thanks. That's what I found out after a bit more research. I didn't
pay attention to this because it's not needed to run under Windows,
and I was focu
if by 'accessibility' you mean 'usable' (like python and firefox are
usable), then yes. there are pygtk bindings for windows, and they work.
http://python-forum.org/py/viewtopic.php?t=116
if by 'accessibility' you mean 'usable for the blind/deaf', then i
think that is up to you as an application de
gavino wrote:
> I want to learn to program and I can't seem to pick a direction. A
Learning how to program and learning a programming language are
completely different things.
The former far more difficult then the latter. There is nothing better
than Python to learn how to program because it i
Hello all,
i try to install ZSI under python 2.5 and windows 2000.
I Downloaded the egg and tried the following
c:\Python25\Scripts>easy_install.exe c:\download\ZSI-2.0_rc3-py2.5.egg
The result is that pythonwin pops up and shows the file :
c:\Python25\Scripts\easy_install-script.py :
---
Steven D'Aprano wrote:
> On Wed, 29 Nov 2006 19:42:16 -0800, rjtucke wrote:
>
>> I want an iterable from 0 to N except for element m (<=M).
> x = range(m-1) + range(m+1, N)
Should be range(m) + range(m+1, N)
Kent
--
http://mail.python.org/mailman/listinfo/python-list
Norbert wrote:
> Hello all,
> i try to install ZSI under python 2.5 and windows 2000.
> I Downloaded the egg and tried the following
>
> c:\Python25\Scripts>easy_install.exe c:\download\ZSI-2.0_rc3-py2.5.egg
>
> The result is that pythonwin pops up and shows the file :
> c:\Python25\Scripts\easy_i
The written apology reads:
"The United States of America apologizes to Mr. Brandon Mayfield and
his family for the suffering caused by the FBI's misidentification of
Mr. Mayfield's fingerprint and the resulting investigation of Mr.
Mayfield, including his arrest as a material witness in connection
The written apology reads:
"The United States of America apologizes to Mr. Brandon Mayfield and
his family for the suffering caused by the FBI's misidentification of
Mr. Mayfield's fingerprint and the resulting investigation of Mr.
Mayfield, including his arrest as a material witness in connection
The written apology reads:
"The United States of America apologizes to Mr. Brandon Mayfield and
his family for the suffering caused by the FBI's misidentification of
Mr. Mayfield's fingerprint and the resulting investigation of Mr.
Mayfield, including his arrest as a material witness in connection
> Why? It doesn't seem intuitive to me. To me, it makes it harder, not
> easier, to work with slices than if indexing started at 1 and the
> above expression got you the 2nd throught the 5th character.
Zero-based indices and excluding last index often works nicer, it is
not the rule, but all m
http://www.sciencedaily.com/releases/2006/11/061130081347.htm
World's Oldest Ritual Discovered -- Worshipped The Python 70,000 Years
Ago
Nick
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I am writing code to sort the columns according to the sum of each
column. The dataset is huge (50k rows x 300k cols), so i need to read
line by line and do the summation to avoid the out-of-memory problem.
But I don't know why it runs very slow, and part of the code is as
follows. I suspect i
I would recommend learning one language out of each of three potential
groups. Just my $0.02 USD:
1) Larger commercial languages - Java, C++, C#.
2) Fun, productive scripting languages - Python, Ruby
3) Academic languages - C, Lisp, Haskell, Smalltalk
This doesn't mean that Python can't be a larg
Gheorghe Postelnicu wrote:
> I found a recipe on ASPN on how to intercept keyboard interrupts and
> that is useful if I need to brutally kill the launching process.
>
> However, my question regards killing the actual children threads -
> they are spending lots of time in system calls, so I cannot i
Hello,
Can somebody give me shtoom examples or source code for making PC2Phone
calls and pc to pc
calls. (if you give me source code,please give me full url to that
source or send me to email:
[EMAIL PROTECTED])
Thanks,I will really appreciate that
--
http://mail.p
On 2006-11-19 15:50:14 +0100, Thomas Ploch <[EMAIL PROTECTED]> said:
> Hello,
>
> I followed the instructions in the Mac/README file.
>
> I ran ./configure --enable-framework
>
> But when I try to build from source with gcc 4.0.2, following happens:
>
>
> [snip]
> libtool: can't locate file f
The module is not found on the system, althouhg I can use python2.4. i
am using fedoralinux5
Thanks
--
http://mail.python.org/mailman/listinfo/python-list
Grace Fang wrote:
> Hi,
>
> I am writing code to sort the columns according to the sum of each
> column. The dataset is huge (50k rows x 300k cols), so i need to read
> line by line and do the summation to avoid the out-of-memory problem.
> But I don't know why it runs very slow, and part of the
Nick schrieb:
> http://www.sciencedaily.com/releases/2006/11/061130081347.htm
>
> World's Oldest Ritual Discovered -- Worshipped The Python 70,000 Years
> Ago
>
> Nick
>
That's really interesting since there is an indio tribe in the amazonas
jungle which also worships python.
That just tells m
In article <[EMAIL PROTECTED]>,
Antoon Pardon <[EMAIL PROTECTED]> wrote:
...
> $ telnet machine.domain imap
> Trying xxx.xxx.xxx.xxx...
> Connected to machine.domain
> Escape character is '^]'.
> * OK maxi Cyrus IMAP4 v2.2.13 server ready
> 0001 LOGIN ...
> 0001 OK User logged in
> 0002 LIST
Markus Rosenstihl schrieb:
> On 2006-11-19 15:50:14 +0100, Thomas Ploch <[EMAIL PROTECTED]> said:
>
>> Hello,
>>
>> I followed the instructions in the Mac/README file.
>>
>> I ran ./configure --enable-framework
>>
>> But when I try to build from source with gcc 4.0.2, following happens:
>>
>>
>> [
Hi,
I have a situation of the following type:
for line in lineList:
for item in line.split()
myArray[counter, itemCounter]
itemCounter = itemCounter + 1
counter = counter +1
Is there a way to get rid of the manual incrementation of the 2 counters?
Thanks,
--
Gheorghe Po
Hi will,Thanks for your reply. The simplified code is as follows, and
you can run it if you like. It takes 7 seconds to process 1000 rows,
which is tolerable, but I wonder why it takes so long, because I also
did one for loop through all of the same rows without accessing array,
which only takes 1
Gheorghe Postelnicu wrote:
>...
> However, my question regards killing the actual children threads -
> they are spending lots of time in system calls, so I cannot insert
> some while loop in a derived Thread class.
>
> Any suggestions would be apreciated.
>
Have the threads look for a semaphore fi
Gheorghe Postelnicu wrote:
> Hi,
>
> I have a situation of the following type:
>
> for line in lineList:
> for item in line.split()
> myArray[counter, itemCounter]
> itemCounter = itemCounter + 1
> counter = counter +1
>
> Is there a way to get rid of the manual incrementat
Hi all,
Have a look at this snippet, I have a file direct.txt and I want to
read it as rfc8222.Message() so that I get the Subject: and Mood: as
Dict Keys and content separately, but I am unable to get the Content
Properly.
>>> fhandle = open('direct.txt','r')
>>> print fhandle.read()
Subject: te
Gheorghe Postelnicu schrieb:
> Hi,
>
> I have a situation of the following type:
>
> for line in lineList:
> for item in line.split()
> myArray[counter, itemCounter]
> itemCounter = itemCounter + 1
> counter = counter +1
>
> Is there a way to get rid of the manual increme
Phoe6 wrote:
> Have a look at this snippet, I have a file direct.txt and I want to
> read it as rfc8222.Message() so that I get the Subject: and Mood: as
> Dict Keys and content separately, but I am unable to get the Content
> Properly.
>
fhandle = open('direct.txt','r')
print fhandle.
On 2006-11-30, Phoe6 <[EMAIL PROTECTED]> wrote:
> Hi all,
> Have a look at this snippet, I have a file direct.txt and I want to
> read it as rfc8222.Message() so that I get the Subject: and Mood: as
> Dict Keys and content separately, but I am unable to get the Content
> Properly.
>
fhandle =
On 2006-11-30, Thomas Ploch <[EMAIL PROTECTED]> wrote:
> Gheorghe Postelnicu schrieb:
>> Hi,
>>
>> I have a situation of the following type:
>>
>> for line in lineList:
>> for item in line.split()
>> myArray[counter, itemCounter]
>> itemCounter = itemCounter + 1
>> counter
Will McGugan wrote:
> Grace Fang wrote:
>
> > Hi,
> >
> > I am writing code to sort the columns according to the sum of each
> > column. The dataset is huge (50k rows x 300k cols), so i need to read
> > line by line and do the summation to avoid the out-of-memory problem.
> > But I don't know why i
Fredrik Lundh wrote:
> Phoe6 wrote:
>
> > Have a look at this snippet, I have a file direct.txt and I want to
> > read it as rfc8222.Message() so that I get the Subject: and Mood: as
> > Dict Keys and content separately, but I am unable to get the Content
> > Properly.
>
> because the rfc822.Messa
Gheorghe Postelnicu wrote:
> Hi,
>
> I have a situation of the following type:
>
> for line in lineList:
> for item in line.split()
> myArray[counter, itemCounter]
What do you imagine that the above line is doing? Alternatively, should
you be posting in comp.lang.somelanguageotherthan
Boneh wrote:
> The module is not found on the system, althouhg I can use python2.4. i
> am using fedoralinux5
>
> Thanks
--
http://mail.python.org/mailman/listinfo/python-list
John Machin wrote:
> Hi Grace,
> What Will McGugan said, plus:
> 1. Post *much* more of your code e.g. all relevant parts :-)
Note that Grace has also posted this to numpy-discussion and with prompting
provided the following snippet as a distillation of the key slow part:
from numpy import *
co
Boneh wrote:
>> The module is not found on the system, althouhg I can use python2.4. i
>> am using fedoralinux5
>
>
I see lots of question marks, but I don't see a question. are you
asking why a module you haven't installed isn't installed? have you
tried
I have a Python ap that needs current stock prices, which I want to get
from eSignal's DDE server. Following the win32all example:
import win32ui
import dde
server = dde.CreateServer()
server.Create("eSignalDDE")
conversation = dde.CreateConversation(server)
conversation.ConnectTo("WINROS", "Last"
If I have a list of say, 10 elements and I need to slice it into
irregular size list, I would have to create a bunch of temporary
variables and then regroup them afterwords, like:
# Just for illustration. Alist can be any existing 10 element list
a_list=("",)*10
(a,b,c1,c2,c3,d1,d2,d3,d4,d5)=a_lis
Anyone else getting "Python-related" spam? So far, I've seen messages
"from" Barry Warsaw and Skip Montanaro (although of course header
analysis proves they didn't send it).
--
Aahz ([EMAIL PROTECTED]) <*> http://www.pythoncraft.com/
Usenet is not a democracy. It is a weird cr
John Henry schrieb:
> If I have a list of say, 10 elements and I need to slice it into
> irregular size list, I would have to create a bunch of temporary
> variables and then regroup them afterwords, like:
>
> # Just for illustration. Alist can be any existing 10 element list
> a_list=("",)*10
> (
On 11/30/06, Thomas Ploch <[EMAIL PROTECTED]> wrote:
> John Henry schrieb:
> > If I have a list of say, 10 elements and I need to slice it into
> > irregular size list, I would have to create a bunch of temporary
> > variables and then regroup them afterwords, like:
> >
> > # Just for illustration.
BBands schrieb:
> I have a Python ap that needs current stock prices, which I want to get
> from eSignal's DDE server. Following the win32all example:
>
> import win32ui
> import dde
> server = dde.CreateServer()
> server.Create("eSignalDDE")
> conversation = dde.CreateConversation(server)
> conve
Well, pardoon me.
Next.
Thomas Ploch wrote:
> John Henry schrieb:
> > If I have a list of say, 10 elements and I need to slice it into
> > irregular size list, I would have to create a bunch of temporary
> > variables and then regroup them afterwords, like:
> >
> > # Just for illustration. Alist
John Henry wrote:
> Can I say something to the effect of:
>
> (a,b,c[0:2],d[0:5])=a_list# Obviously this won't work
Your best bet is probably:
x = [...some list...]
a,b,c,d = x[:1],x[1:2],x[2:5],x[5:]
> I am asking this because I have a section of code that contains *lots*
> of things like t
On 2006-11-30, John Henry <[EMAIL PROTECTED]> wrote:
> If I have a list of say, 10 elements and I need to slice it into
> irregular size list, I would have to create a bunch of temporary
> variables and then regroup them afterwords, like:
>
> # Just for illustration. Alist can be any existing 10 el
On 2006-11-30, Neil Cerutti <[EMAIL PROTECTED]> wrote:
> On 2006-11-30, John Henry <[EMAIL PROTECTED]> wrote:
>> If I have a list of say, 10 elements and I need to slice it into
>> irregular size list, I would have to create a bunch of temporary
>> variables and then regroup them afterwords, like:
"John Henry" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> If I have a list of say, 10 elements and I need to slice it into
> irregular size list, I would have to create a bunch of temporary
> variables and then regroup them afterwords, like:
>
> # Just for illustration. Alist can
"Paul McGuire" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> "John Henry" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
snip
G... that's what I get for not keeping editor and interpreter windows in
sync. My post was referencing vars I had defined in the inte
[EMAIL PROTECTED] wrote:
> John Henry wrote:
> > Can I say something to the effect of:
> >
> > (a,b,c[0:2],d[0:5])=a_list# Obviously this won't work
>
> Your best bet is probably:
>
> x = [...some list...]
> a,b,c,d = x[:1],x[1:2],x[2:5],x[5:]
>
Dude! Why didn't I think of that (tunnel visio
Paul McGuire wrote:
> "Paul McGuire" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > "John Henry" <[EMAIL PROTECTED]> wrote in message
> > news:[EMAIL PROTECTED]
> snip
>
> G... that's what I get for not keeping editor and interpreter windows in
> sync. My post was referencin
John Henry wrote:
> Paul McGuire wrote:
> > "Paul McGuire" <[EMAIL PROTECTED]> wrote in message
> > news:[EMAIL PROTECTED]
> > > "John Henry" <[EMAIL PROTECTED]> wrote in message
> > > news:[EMAIL PROTECTED]
> > snip
> >
> > G... that's what I get for not keeping editor and interpreter windows
Thomas Heller wrote:
> Looks like a bug, either in the dde module or the dde server.
> But it's easy to find a workaround:
>
'1402.6700\x00\x12\x00*\x00\x00\x004\xfb\x12\x00\xfd\x1a\xd9w4\xc1\x00'.split("\0")[0]
> '1402.6700'
float(last.split("\0")[0]) works for me.
Thanks for tha
One of the things I find annoying about Python is that when you make a
change to a method definition that change is not reflected in existing
instances of a class (because you're really defining a new class when
you reload a class definition, not actually redefining it). So I came
up with thi
Aahz schrieb:
> Anyone else getting "Python-related" spam? So far, I've seen messages
> "from" Barry Warsaw and Skip Montanaro (although of course header
> analysis proves they didn't send it).
I'm getting spam not only from Barry, but also from myself ;-) with forged
headers.
But I'm not sure w
1 - 100 of 180 matches
Mail list logo