hi i have a suggestion, surely this wont wonk, and is merely a suggestion to
aedd this type of syntax to python
This is an insperation from peps 318
> def foo(self):
> perform method operation
> foo = classmethod(foo)
>
> where it says perform mthod operation, why not have that be an actual
s
sweet, I've been wondering how those work. I've read some stuff about them
and still doesn't make sense to me. Why would I want to use itPlease
explain, thank you
-Alex Goretoy
http://www.goretoy.com
On Sun, Mar 15, 2009 at 1:05 AM, Michele Simionato <
michele.simion...@gmail.com> wrote:
>
On Mar 15, 12:09 am, s...@pobox.com wrote:
> I'm doing this in my code, how to make it define all this functions for me
> with lambda, I've been up for a while and cant seem to figure it out,
> whats
> the most efficient way to do it? with lambda? how? thx
>
> def red(self,value,co
I am very new to the python C API, and have written a simple type
called SU2 that has 4 members that are all doubles. Everything seems
to work fine (can import my module and instantiate the new type and
act on it with various methods I have defined), except for when I
attempt to use my new type wi
I would imagine that I could do this with a generator and setattr, but I am
still learning how to do that kinda of codingmaybe if I had a dictionary
like this and then loaded it
d={
"site_name":["s","site",'sites','site_name','site_names'],
"jar_name":["j","jar",'jars','jar_name','jar_
Nice, this is good code. Thank you. Seeing as we are still on the same
subject, how would I do it on sysarg values from getopt?
I have a main method defined like so
def main(self):
#XXX
"""
1
#get site_name: prepend to curl get/post requests
Aahz wrote:
In article ,
wrote:
I think this is the key point. I am an experienced Python programmer,
and I had to think long and hard about what you were saying, Mark, in
order to understand how it applied to Python. I think this means that
your model and/or your level of abstraction is not
andrew cooke wrote:
I was going to file a bug report for this, but then I wondered if it was
considered normal behaviour. Am I wrong in thinking there should be a
better error message?
class NoHash:
... def __hash__(self):
... pass
...
frozenset([NoHash()])
Traceback (most recent call
On Mar 14, 3:03 am, Roman Medina-Heigl Hernandez
wrote:
> Karthik Gurusamy escribió:
>
>
>
> > On Mar 13, 6:39 pm, Roman Medina-Heigl Hernandez
> > wrote:
> >> Hi,
>
> >> I'm experimenting with Python and I need a little help with this. What I'd
> >> like is to launch an interactive shell, having
In article ,
wrote:
>
>I think this is the key point. I am an experienced Python programmer,
>and I had to think long and hard about what you were saying, Mark, in
>order to understand how it applied to Python. I think this means that
>your model and/or your level of abstraction is not "natural
alex goretoy wrote:
I'm doing this in my code, how to make it define all this functions for
me with lambda, I've been up for a while and cant seem to figure it out,
whats the most efficient way to do it? with lambda? how? thx
def red(self,value,color='red',level='INFO'):
self.write
On Fri, 13 Mar 2009 15:33:26 -, MRAB
wrote:
Rhodri James wrote:
On Fri, 13 Mar 2009 14:49:17 -, Beni Cherniavsky
wrote:
Specification
=
Allow keyword arguments in function call to take this form:
NAME ( ARGUMENTS ) = EXPRESSION
which is equivallent to the foll
On Fri, 13 Mar 2009 16:39:16 -, Scott David Daniels
wrote:
The original proposal was initially appealing to me until I saw this
comment. That means a relatively "invisible typo" would turn into good
syntax. Possibley this is exactly what Rhodri James is talking about,
but just to be exp
Hello guys i am trying to make a simple sql parser and i found pyparse , my
question here is does it return a data structure like an abstract syntax
tree of the sql query.Any help is appreciated
Aditya
--
http://mail.python.org/mailman/listinfo/python-list
Maxim Khitrov wrote:
On Sat, Mar 14, 2009 at 5:38 PM, Matthew Woodcraft
wrote:
Gary Herron writes:
I think this code is in poor taste: it's clear that it will confuse
people (which is what Maxim was asking about in the first place).
Careful now -- I didn't write that. (Although I ag
is this what you want (python 3.0)?
>>> class Colours:
... def __init__(self):
... for colour in ['red', 'blue']:
... setattr(self, colour, lambda value, c=colour: self.write(value, c))
... def write(self, value, colour):
... print(value, colour)
...
>>> c = Colours()
>>> c.red(
Maxim Khitrov wrote:
On Sat, Mar 14, 2009 at 4:31 PM, Gary Herron wrote:
Perhaps a different example would help explain what I'm trying to do:
class Case1(object):
def __init__(self):
self.count = 0
self.list = []
def inc(self):
s
I would suggest using functools.partial like this
from functools import partial
class Foo(object):
#...
red = partial(color='red')
--
http://mail.python.org/mailman/listinfo/python-list
Martin P. Hellwig schrieb:
Try a google search on:
tkinter overrideredirect
thx! That's it!
--
http://mail.python.org/mailman/listinfo/python-list
I'm doing this in my code, how to make it define all this functions for me
with lambda, I've been up for a while and cant seem to figure it out, whats
the most efficient way to do it? with lambda? how? thx
def red(self,value,color='red',level='INFO'):
self.write(value,color
Ekkard Gerlach wrote:
Hi,
is tkinter able to start a windows without the frame of the according
window manager? (only needed for Linux, KDE desktop)
The window should only be closed by click on a button within the window!
I should not be moved, it should not be close, ... and so on. The
soluti
I was going to file a bug report for this, but then I wondered if it was
considered normal behaviour. Am I wrong in thinking there should be a
better error message?
>>> class NoHash:
... def __hash__(self):
... pass
...
>>> frozenset([NoHash()])
Traceback (most recent call last):
File ""
I'm doing this in my code, how to make it define all this functions for me
with lambda, I've been up for a while and cant seem to figure it out, whats
the most efficient way to do it? with lambda? how? thx
def red(self,value,color='red',level='INFO'):
self.write(value,color,level)
Krishnakant writes:
> based on your code snippid I added a couple of lines to actually center
> align text in the merged cell in first row.
Sorry, guess I should have verified handling all the requirements :-)
I think there's two issues:
* I neglected to add the style I created to the document
Hallöchen!
Stefan Behnel writes:
> Torsten Bronger wrote:
>
>> [...]
>>
>> My problem is that if there is only ASCII, these methods return
>> ordinary strings instead of unicode. So sometimes I get str,
>> sometimes I get unicode. Can one change this globally so that
>> they only return unicod
Torsten Bronger wrote:
> I parse an XML file with ElementTree and get the contets with
> the .attrib, .text, .get etc methods of the tree's nodes.
> Additionally, I use the "find" and "findtext" methods.
>
> My problem is that if there is only ASCII, these methods return
> ordinary strings instead
Hallöchen!
Maxim Khitrov writes:
> [...]
>
> The advantage of doing this is that the assignments are evaluated
> once and thus the creation of that class is a bit faster. Access
> is still performed through self.some_value and
> self.another_value. Is there a reason to prefer the first style
> ov
On Sat, Mar 14, 2009 at 5:38 PM, Matthew Woodcraft
wrote:
> Gary Herron writes:
> I think this code is in poor taste: it's clear that it will confuse
> people (which is what Maxim was asking about in the first place).
Yes, I see that now, thanks :)
- Max
--
http://mail.python.org/mailman/listin
On Sat, Mar 14, 2009 at 4:31 PM, Gary Herron wrote:
>> Perhaps a different example would help explain what I'm trying to do:
>>
>> class Case1(object):
>> def __init__(self):
>> self.count = 0
>> self.list = []
>>
>> def inc(self):
>> sel
Gary Herron writes:
> But now you are not listening to what people are telling you. It has
> *nothing* to do with the mutability/immutability of the integer and the list
> your two classes create.
No! Did you run the code he posted? The immutability makes all the
difference.
> The difference
Hi,
is tkinter able to start a windows without the frame of the according
window manager? (only needed for Linux, KDE desktop)
The window should only be closed by click on a button within the window!
I should not be moved, it should not be close, ... and so on. The
solution would be: start with
Linos wrote:
I know that this can be evident for most of the people but i would like
to know the reply and the reasoning if possible:
Should my python application have a difference in speed of execution after
change the encoding header of the file from nothing (ascii) to latin-1
or utf-8?
If y
On Mar 14, 7:11 am, Ahmad Syukri bin Abdollah
wrote:
> I'm trying this on Python 3.0.1
> Consider the following code:
> """
> import multiprocessing as mp
>
> def jambu(b,i,gl):
> for n in range(10):
> with gl[i]:
> b[i]+=2
> with gl[3-i]:
> b[3-i]-=1
Hi David,
based on your code snippid I added a couple of lines to actually center
align text in the merged cell in first row.
Please note in the following code that I have added ParagraphProperties
in the imports and created one style with textalign="center" as an
attribute.
*** code follows ***
I know that this can be evident for most of the people but i would like to know
the reply and the reasoning if possible:
Should my python application have a difference in speed of execution after
change the encoding header of the file from nothing (ascii) to latin-1 or utf-8?
If yes, only when th
Maxim Khitrov wrote:
Perhaps a different example would help explain what I'm trying to do:
class Case1(object):
def __init__(self):
self.count = 0
self.list = []
def inc(self):
self.count += 1
self.list.append(sel
Maxim Khitrov wrote:
On Sat, Mar 14, 2009 at 2:07 PM, Gary Herron wrote:
Maxim Khitrov wrote:
Very simple question on the preferred coding style. I frequently write
classes that have some data members initialized to immutable values.
For example:
class Test(object):
def __init__(se
How can I convert the following string:
'AAR','ABZ','AGA','AHO','ALC','LEI','AOC',
EGC','SXF','BZR','BIQ','BLL','BHX','BLQ'
into this sequence:
['AAR','ABZ','AGA','AHO','ALC','LEI','AOC',
EGC','SXF','BZR','BIQ','BLL','BHX','BLQ']
Though several other options have come through:
>>> s = "'
bieff...@gmail.com writes:
> On 14 Mar, 17:31, Dan Davison wrote:
>> I'm new to python. Could someone please explain the following behaviour
>> of a recursive data structure?
>>
>> def new_node(id='', daughters=[]):
>> return dict(id=id, daughters=daughters)
>>
>
> Most probably, here is the
On Sat, Mar 14, 2009 at 12:32 PM, Maxim Khitrov wrote:
> Very simple question on the preferred coding style. I frequently write
> classes that have some data members initialized to immutable values.
> For example:
>
> class Test(object):
> def __init__(self):
> self.some_value = 0
>
On Mar 14, 3:01 am, "Gabriel Genellina"
wrote:
> En Fri, 13 Mar 2009 19:07:46 -0200, aiwarrior
> escribió:
>
> > I recently am meddling with threads and wanted to make a threaded
> > class that instead of processing anything just retrieves data from a
> > file and returns that data to a main th
In article ,
Tim Chase wrote:
>> I am interested in writing an application that functions like a Unix
>> or Linux top in the way it displays data.
>> It should be command-line based but dynamically refreshing.
>
>You might look at the sourcecode for "iotop"[1] which would make
>a good example (i
This is a file that is going into the new version of python-stdout-colors
> project location:
> http://code.google.com/p/python-stdout-colors/
-Alex Goretoy
http://www.goretoy.com
On Sat, Mar 14, 2009 at 10:45 AM, alex goretoy
wrote:
> My new class I've been working on might help you. It doe
On Sat, Mar 14, 2009 at 2:07 PM, Gary Herron wrote:
> Maxim Khitrov wrote:
>>
>> Very simple question on the preferred coding style. I frequently write
>> classes that have some data members initialized to immutable values.
>> For example:
>>
>> class Test(object):
>> def __init__(self):
>>
dmitrey wrote:
> This doesn't work for
> costlyFunction2 = lambda x: 11
> as well; and it doesn't work for imap, apply_async as well (same
> error).
> So, isn't it a bug, or it can be somehow fixed?
> Thank you in advance, D.
It's not a bug but a limitation of the pickle protocol. Pickle can't
han
bieff...@gmail.com wrote:
On 14 Mar, 17:31, Dan Davison wrote:
I'm new to python. Could someone please explain the following behaviour
of a recursive data structure?
def new_node(id='', daughters=[]):
return dict(id=id, daughters=daughters)
Most probably, here is the problem : try this
dmitrey wrote:
# THIS WORKS OK
from multiprocessing import Pool
N = 400
K = 800
processes = 2
def costlyFunction2(z):
r = 0
for k in xrange(1, K+2):
r += z ** (1 / k**1.5)
return r
class ABC:
def __init__(self): pass
def testParallel(self):
po = Pool(processe
Maxim Khitrov wrote:
On Sat, Mar 14, 2009 at 12:50 PM, MRAB wrote:
Maxim Khitrov wrote:
Very simple question on the preferred coding style. I frequently write
classes that have some data members initialized to immutable values.
For example:
class Test(object):
def __init__(self):
se
Jan Decaluwe wrote:
I am the author of MyHDL, a Python package that turns Python
into a hardware description language (HDL).
Integer arithmetic is very important in hardware design,
but with traditional HDLs such as Verilog and VHDL it is
complicated and confusing. MyHDL has a better solution,
i
John Nagle wrote:
Any idea when PyWin32 will be available for Python 3.x?
John Nagle
Release 213 is out already:
http://sourceforge.net/project/showfiles.php?group_id=78018&package_id=79063&release_id=661475
I think it's still considered a little bit beta. There have been
On 3/13/2009 10:29 PM, Paul Rubin wrote:
Saurabh writes:
> Hi all,
> I am an experienced C programmer, I have done some perl code as well.
> But while thinking about large programs,I find perl syntax a
> hinderance.
I would say read the online tutorial, then "Python in a Nutshell".
That
Colin J. Williams wrote:
Tim Golden wrote:
Colin J. Williams wrote:
Piet van Oostrum wrote:
tinn...@isbd.co.uk (t) wrote:
t> I've had this trouble before, how do I find the details of how "in"
t> works in the documentation. E.g. the details of:-
t> if string in bigstring:
t> It g
Maxim Khitrov wrote:
Very simple question on the preferred coding style. I frequently write
classes that have some data members initialized to immutable values.
For example:
class Test(object):
def __init__(self):
self.some_value = 0
self.another_value = None
Similar effect
Maxim Khitrov:
> When the types are immutable, there is no difference.
But you may want different instances to have different immutable data.
Generally if the data (immutable or not) is the same for all the
instances, use class attributes, otherwise use instance attributes.
Bye,
bearophile
--
ht
Any idea when PyWin32 will be available for Python 3.x?
John Nagle
--
http://mail.python.org/mailman/listinfo/python-list
On Mar 14, 5:30 pm, Nick Craig-Wood wrote:
> BeniCherniavsky wrote:
> > This proposal outrageously suggests a special syntax for in-line
> > functions passed as keyword arguments::
>
> > >>> sorted(range(9), key(n)=n%3)
> > [0, 3, 6, 1, 4, 7, 2, 5, 8]
>
> > The claim is that such spec
Krishnakant writes:
> However when I apply the same elements and attributes to the one I am
> creating with odfpy, I get "attribute not allowed " errors.
> If some one is interested to look at the code, please let me know, I can
> send an attachment off the list so that others are not forced to
>
# THIS WORKS OK
from multiprocessing import Pool
N = 400
K = 800
processes = 2
def costlyFunction2(z):
r = 0
for k in xrange(1, K+2):
r += z ** (1 / k**1.5)
return r
class ABC:
def __init__(self): pass
def testParallel(self):
po = Pool(processes=processes)
On Sat, Mar 14, 2009 at 12:50 PM, MRAB wrote:
> Maxim Khitrov wrote:
>>
>> Very simple question on the preferred coding style. I frequently write
>> classes that have some data members initialized to immutable values.
>> For example:
>>
>> class Test(object):
>> def __init__(self):
>> se
On 14 Mar, 17:31, Dan Davison wrote:
> I'm new to python. Could someone please explain the following behaviour
> of a recursive data structure?
>
> def new_node(id='', daughters=[]):
> return dict(id=id, daughters=daughters)
>
Most probably, here is the problem : try this instead:
def new_no
How about:
from datetime import date, timedelta
# Define the weekday mnemonics to match the date.weekday function
(MON, TUE, WED, THU, FRI, SAT, SUN) = range(7)
def workdays(start_date, end_date, whichdays=(MON,TUE,WED,THU,FRI)):
'''
Calculate the number of working days between two dates
Dan Davison wrote:
I'm new to python. Could someone please explain the following behaviour
of a recursive data structure?
def new_node(id='', daughters=[]):
return dict(id=id, daughters=daughters)
n0 = new_node(id='n0')
n1 = new_node(id='n1')
[snip]
See
http://www.python.org/doc/faq/gene
On Sat, Mar 14, 2009 at 12:31 PM, Dan Davison wrote:
> I'm new to python. Could someone please explain the following behaviour
> of a recursive data structure?
>
> def new_node(id='', daughters=[]):
> return dict(id=id, daughters=daughters)
This is something of a FAQ:
http://effbot.org/zone/de
Maxim Khitrov wrote:
Very simple question on the preferred coding style. I frequently write
classes that have some data members initialized to immutable values.
For example:
class Test(object):
def __init__(self):
self.some_value = 0
self.another_value = None
Similar effect
I'm new to python. Could someone please explain the following behaviour
of a recursive data structure?
def new_node(id='', daughters=[]):
return dict(id=id, daughters=daughters)
n0 = new_node(id='n0')
n1 = new_node(id='n1')
## Seems OK so far:
n0 # {'id': 'n0'
Hallöchen!
I parse an XML file with ElementTree and get the contets with
the .attrib, .text, .get etc methods of the tree's nodes.
Additionally, I use the "find" and "findtext" methods.
My problem is that if there is only ASCII, these methods return
ordinary strings instead of unicode. So someti
Very simple question on the preferred coding style. I frequently write
classes that have some data members initialized to immutable values.
For example:
class Test(object):
def __init__(self):
self.some_value = 0
self.another_value = None
Similar effect can be achieved by defi
Tim Golden wrote:
Colin J. Williams wrote:
Piet van Oostrum wrote:
tinn...@isbd.co.uk (t) wrote:
t> I've had this trouble before, how do I find the details of how "in"
t> works in the documentation. E.g. the details of:-
t> if string in bigstring:
t> It gets a mention in the "if"
My new class I've been working on might help you. It does what you are
asking without eval (I'm still working on it) Anyone have any ideas aswell
along with the OP, thank you
#!/usr/bin env python
#
# -*- coding: UTF-8 -*-
#
# PyNutButter BETA Version 0.1.0.1
#
# Copyright 2009 - Infinity by Alex
Beni Cherniavsky wrote:
> This proposal outrageously suggests a special syntax for in-line
> functions passed as keyword arguments::
>
> >>> sorted(range(9), key(n)=n%3)
> [0, 3, 6, 1, 4, 7, 2, 5, 8]
>
> The claim is that such specialization hits a syntax sweet spot, and
> that thi
On Mar 15, 12:13 am, Gonsolo wrote:
> I found no solution on the net so I am posting my solution here.
> It can be called with "python cwd 1-1-2009 14-3-2009"
>
> from dateutil.rrule import *
> from dateutil.parser import *
> from datetime import *
> from sys import *
H ... I wonder what the
farsi...@gmail.com wrote:
> Thanks all, that's very helpful, sorry to waste your time with a
> common question. I have tried the decimal module and will definitely
> keep using it if I need to do this kind of calculation again.
>
> I have 1 more question that the floating point article that was li
tinn...@isbd.co.uk wrote:
...
But I was wondering if there's a neater/easier way?
How is "if stringA.lower() in stringB.lower():" complex/messy?
Well I guess I was just looking for "incase" a bit like "strcasecmp"
in C.
Which locales case folding do you want to have applied?
Tino
smime.p
Daniel Fetchinson wrote:
I've noticed that Pygame has some similar implementation.
It's a little harder to use, but efficient.
And i think it depends on PIL too.
And Pygame is Python 2.x too...
...
When I asked about it there I was told that some work already has
started on porting PIL to py
Carl Banks wrote:
> On Mar 8, 5:32 am, Lie Ryan wrote:
>> Mel wrote:
>>> wrote:
Steven D'Aprano writes:
> It is never
> correct to avoid using "is" when you need to compare for identity.
When is it ever necessary to compare for identity?
>>> Ho-hum. MUDD game.
>>> def broadcas
Paul Rubin wrote:
> Steven D'Aprano writes:
>> It is never
>> correct to avoid using "is" when you need to compare for identity.
>
> When is it ever necessary to compare for identity?
For example when providing a unique "sentinel" value as a function
argument. The parameter must be tested for i
Gary Herron wrote:
> Robert Kern wrote:
>> On 2009-03-06 14:23, Gary Herron wrote:
>>> Robert Kern wrote:
On 2009-03-06 13:46, Gary Herron wrote:
> Emanuele D'Arrigo wrote:
>> Hi everybody,
>>
>> while testing a module today I stumbled on something that I can work
>> around
On Mar 14, 12:04 pm, Chris Rebert wrote:
> On Fri, Mar 13, 2009 at 10:29 PM, Paul Rubin wrote:
> > Saurabh writes:
> >> Hi all,
> >> I am an experienced C programmer, I have done some perl code as well.
> >> But while thinking about large programs,I find perl syntax a
> >> hinderance.
>
> > I wo
I found no solution on the net so I am posting my solution here.
It can be called with "python cwd 1-1-2009 14-3-2009"
from dateutil.rrule import *
from dateutil.parser import *
from datetime import *
from sys import *
start = parse( argv[1] )
#end = datetime.now()
end = parse( argv[2] )
workday
Thanks much.
-=roger
> Yet more specifically: if the extension module or Python host opens
> a file with fopen(), and passes it to PyRun_{Any|Simple}File[Ex][Flags],
> Python will crash.
>
> HTH,
> Martin
>
> P.S. There may be more cases in which you get crashes - the list above
> includes just th
I'm trying this on Python 3.0.1
Consider the following code:
"""
import multiprocessing as mp
def jambu(b,i,gl):
for n in range(10):
with gl[i]:
b[i]+=2
with gl[3-i]:
b[3-i]-=1
def main():
b = mp.RawArray('i',4)
gl = []
proc = []
for i
jkn wrote:
On Mar 14, 7:00 am, Tim Golden wrote:
Well, this may not solve the OP's problem, but the current
(2.7a0) .chm file has a much better index for operators and
keywords. And "in" is in there. If you're interested in
comparing, there's a copy here:
http://timgolden.me.uk/python/downloa
Il Sat, 14 Mar 2009 12:13:31 +0100, Peter Otten ha scritto:
> mattia wrote:
>
>> Il Sat, 14 Mar 2009 10:35:59 +0100, Peter Otten ha scritto:
>>
>>> mattia wrote:
>>>
How can I convert the following string:
'AAR','ABZ','AGA','AHO','ALC','LEI','AOC',
EGC','SXF','BZR','BIQ','B
mattia wrote:
> Il Sat, 14 Mar 2009 10:35:59 +0100, Peter Otten ha scritto:
>
>> mattia wrote:
>>
>>> How can I convert the following string:
>>>
>>> 'AAR','ABZ','AGA','AHO','ALC','LEI','AOC',
>>> EGC','SXF','BZR','BIQ','BLL','BHX','BLQ'
>>>
>>> into this sequence:
>>>
>>> ['AAR','ABZ','AGA',
Colin J. Williams wrote:
> Piet van Oostrum wrote:
> >> tinn...@isbd.co.uk (t) wrote:
> >
> >> t> I've had this trouble before, how do I find the details of how "in"
> >> t> works in the documentation. E.g. the details of:-
> >
> >> t> if string in bigstring:
> >
> >> t> It gets a ment
On 13 mrt, 23:30, "Gabriel Genellina" wrote:
> En Fri, 13 Mar 2009 17:59:34 -0200, escribió:
>
>
>
> > On 12 mrt, 18:43, "Gabriel Genellina" wrote:
> >> En Thu, 12 Mar 2009 07:21:35 -0200, escribió:
>
> >> > I'm not so much involved in any Windows programming however I needed
> >> > to write a
On Mar 14, 7:00 am, Tim Golden wrote:
> Well, this may not solve the OP's problem, but the current
> (2.7a0) .chm file has a much better index for operators and
> keywords. And "in" is in there. If you're interested in
> comparing, there's a copy here:
>
> http://timgolden.me.uk/python/downloads/
Il Sat, 14 Mar 2009 10:35:59 +0100, Peter Otten ha scritto:
> mattia wrote:
>
>> How can I convert the following string:
>>
>> 'AAR','ABZ','AGA','AHO','ALC','LEI','AOC',
>> EGC','SXF','BZR','BIQ','BLL','BHX','BLQ'
>>
>> into this sequence:
>>
>> ['AAR','ABZ','AGA','AHO','ALC','LEI','AOC',
>> E
mattia wrote:
> Il Sat, 14 Mar 2009 10:30:43 +0100, Vlastimil Brom ha scritto:
>
>> 2009/3/14 mattia :
>>> How can I convert the following string:
>>>
>>> 'AAR','ABZ','AGA','AHO','ALC','LEI','AOC',
>>> EGC','SXF','BZR','BIQ','BLL','BHX','BLQ'
>>>
>>> into this sequence:
>>>
>>> ['AAR','ABZ','AGA'
mattia wrote:
Il Sat, 14 Mar 2009 10:30:43 +0100, Vlastimil Brom ha scritto:
2009/3/14 mattia :
How can I convert the following string:
'AAR','ABZ','AGA','AHO','ALC','LEI','AOC',
EGC','SXF','BZR','BIQ','BLL','BHX','BLQ'
into this sequence:
['AAR','ABZ','AGA','AHO','ALC','LEI','AOC',
EGC','S
Il Sat, 14 Mar 2009 10:30:43 +0100, Vlastimil Brom ha scritto:
> 2009/3/14 mattia :
>> How can I convert the following string:
>>
>> 'AAR','ABZ','AGA','AHO','ALC','LEI','AOC',
>> EGC','SXF','BZR','BIQ','BLL','BHX','BLQ'
>>
>> into this sequence:
>>
>> ['AAR','ABZ','AGA','AHO','ALC','LEI','AOC',
>>
Re-posting in more simple and precise terms from a previous thread
http://groups.google.it/group/comp.lang.python/browse_thread/thread/6dd7bd9a09b8a011/5119cf15ebfa38b8
Problem:
SWIG doesn't properly wrap c++ arrays of pointers, therefore when you
try to call a c++ function which requires them, a
On 14 Mar, 02:08, Aaron Brady wrote:
> On Mar 13, 5:42 pm, Matteo wrote:
>
>
>
> > On 13 Mar, 22:35, Aaron Brady wrote:
>
> > > On Mar 13, 1:34 pm, Matteo wrote:
>
> > > > hmmm... looks like SWIG has a problem with double pointers. I googled
> > > > around a bit and found:
>
> > > >http://osdir
Karthik Gurusamy escribió:
> On Mar 13, 6:39 pm, Roman Medina-Heigl Hernandez
> wrote:
>> Hi,
>>
>> I'm experimenting with Python and I need a little help with this. What I'd
>> like is to launch an interactive shell, having the chance to send first
>> several commands from python. I've written th
Peter Billam wrote:
>> Peter Billam wrote:
>> window = MainWindow(application)
>> if (len(sys.argv) > 1) and os.path.exists(sys.argv[1]):
>> window.loadFile(sys.argv[1])
>> application.mainloop()
>> File "./midimix", line 465, in loadFile
>> space0.grid(row=grid_row,
>> pady
Il Sat, 14 Mar 2009 10:24:38 +0100, Ulrich Eckhardt ha scritto:
> mattia wrote:
>> How can I convert the following string:
>>
>> 'AAR','ABZ','AGA','AHO','ALC','LEI','AOC',
>> EGC','SXF','BZR','BIQ','BLL','BHX','BLQ'
>>
>> into this sequence:
>>
>> ['AAR','ABZ','AGA','AHO','ALC','LEI','AOC',
>>
mattia wrote:
> How can I convert the following string:
>
> 'AAR','ABZ','AGA','AHO','ALC','LEI','AOC',
> EGC','SXF','BZR','BIQ','BLL','BHX','BLQ'
>
> into this sequence:
>
> ['AAR','ABZ','AGA','AHO','ALC','LEI','AOC',
> EGC','SXF','BZR','BIQ','BLL','BHX','BLQ']
>>> s = "'AAR','ABZ','AGA','AHO'
2009/3/14 mattia :
> How can I convert the following string:
>
> 'AAR','ABZ','AGA','AHO','ALC','LEI','AOC',
> EGC','SXF','BZR','BIQ','BLL','BHX','BLQ'
>
> into this sequence:
>
> ['AAR','ABZ','AGA','AHO','ALC','LEI','AOC',
> EGC','SXF','BZR','BIQ','BLL','BHX','BLQ']
>
> Thanks a lot,
> Mattia
> --
mattia wrote:
> How can I convert the following string:
>
> 'AAR','ABZ','AGA','AHO','ALC','LEI','AOC',
> EGC','SXF','BZR','BIQ','BLL','BHX','BLQ'
>
> into this sequence:
>
> ['AAR','ABZ','AGA','AHO','ALC','LEI','AOC',
> EGC','SXF','BZR','BIQ','BLL','BHX','BLQ']
import string
string.split("a,b,c
> Peter Billam wrote:
> window = MainWindow(application)
> if (len(sys.argv) > 1) and os.path.exists(sys.argv[1]):
> window.loadFile(sys.argv[1])
> application.mainloop()
> File "./midimix", line 465, in loadFile
> space0.grid(row=grid_row,
> pady=round(0.5*(ymid[track_num]-y
1 - 100 of 113 matches
Mail list logo