On Thu, 12 Mar 2009 04:34:57 -, W. eWatson
wrote:
I happened to notice that BJ and Rhondi started a small subthread to
Nice to know your observation skills are up to scratch :-(
this, so I thought I'd explore it. It led to interesting things, but not
for its content. I reviewed some
Hi,
Is it possible to convert a string to a function parameter?
Ex:
str = 'True, type=rect, sizes=[3, 4]'
and I should be able to use it as:
test(convert(str)) and the behaviour should be same as calling test
with those values :
i.e. test(True, type=rect, sizes=[3, 4])
I tried eval, but it did
On Fri, Mar 13, 2009 at 12:52 AM, koranthala wrote:
> Hi,
> Is it possible to convert a string to a function parameter?
> Ex:
> str = 'True, type=rect, sizes=[3, 4]'
> and I should be able to use it as:
> test(convert(str)) and the behaviour should be same as calling test
> with those values :
On Mar 13, 1:01 pm, Chris Rebert wrote:
> On Fri, Mar 13, 2009 at 12:52 AM, koranthala wrote:
> > Hi,
> > Is it possible to convert a string to a function parameter?
> > Ex:
> > str = 'True, type=rect, sizes=[3, 4]'
> > and I should be able to use it as:
> > test(convert(str)) and the behaviou
2009/3/13 hendra kusuma :
> you may want to use os.sep to replace manually written "/" "\" ":" for each
> os
> I heard that unix/linux use "/" as directory separator while windows use "\"
> and mac os use ":"
>
Thanks for the notice about the ":" path separator on mac;
windows uses "\" but normally
MRAB wrote:
> andrew cooke wrote:
>> MRAB wrote:
>> [...]
>>> The other special case is with \u in a Unicode string:
>>>
>>> >>> ur"\u0041"
>>> u'A'
>>
>> this isn't true for 3.0:
>>
> r"\u0041"
>> '\\u0041'
>>
>> (there's no "u" because it's a string, not a bytes literal)
>>
>> and as far as
Hallo,
has anyone experience with installing Python and pywin32 to Windows XP
Pro running in a VMware environment?
At the end of installing pywin32 I get following error:
Traceback (most recent call last):
File "", line
Hi ,
I have an issue regarding connectivity between client and com server.
I have a com server implemented in MFC dll having MFC as static library.
The requirement is to write python wrapper to it .
Using ctypes I wrote a wrapper to MFC dll which exports couple of functions
for com initiali
[Lie Ryan]
> A hyphotetical code using conv function and the microlanguage could look
> like this:
>
> >>> num = 213210.3242
> >>> fmt = create_format(sep='-', decsep='@')
> >>> print fmt
> 50|\/|3_v3ry_R34D4|3L3_C0D3
> >>> '{0!{1}}'.format(num, fmt)
> '213-...@3242'
LOL, it's like APL all ove
Lie Ryan wrote:
But ruby don't bite...
Neither does a python, it is a constrictor, meaning it has a firm grip
on the modules imported :-)
--
mph
--
http://mail.python.org/mailman/listinfo/python-list
Raymond Hettinger wrote:
> [Lie Ryan]
>> A hyphotetical code using conv function and the microlanguage could look
>> like this:
>>
>> >>> num = 213210.3242
>> >>> fmt = create_format(sep='-', decsep='@')
>> >>> print fmt
>> 50|\/|3_v3ry_R34D4|3L3_C0D3
>> >>> '{0!{1}}'.format(num, fmt)
>> '213-.
John Crawford a écrit :
I'm looking for good open-source software for forums. There is a *lot* out
there, for instance Lussumo's Vanilla gets good reviews, but most are
PHP-based, and I would obviously prefer to use Python, with or without Django.
Two packages that are Django-based that I have
Raymond Hettinger writes:
> The proposal is roughly:
> If you want commas in the output,
> put a comma in the format string.
> It's not rocket science.
What if you want to change the separator? Europeans usually
use periods instead of commas: one thousand = 1.000.
--
http://mail.python.org/m
[andrew cooke]
> would it break anything to also allow
>
> >>> format(1234567, 'd') # what we have now
> '1234567'
> >>> format(1234567, '.d') # proposed new option
> '1.234.567'
> >>> format(1234.5, ',2f') # proposed new option
> '1234,50'
> >>> format(1234.5, '.,2f') # prop
[Paul Rubin]
> What if you want to change the separator? Europeans usually
> use periods instead of commas: one thousand = 1.000.
That is supported also.
--
http://mail.python.org/mailman/listinfo/python-list
Hoi,
I've written an extension in C++ which compiles wonderfully. However, I
want to compile it using a setup script with distutils and distutils
gives the compiler the unwanted (!) flag "-Wstrict-prototypes", which is
a flag only understood when compiling C. The C++ compiler runs, but
issues
On Fri, Mar 13, 2009 at 8:20 PM, gopal mishra wrote:
>
>
> error: Setup script exited with error: None
numpy 1.2.1 does not officially support python 2.6. Specially on
windows, there are some issues like this one.
Numpy 1.3.0 (to be released 1st April 2009) will contain everything to
be buildabl
2009/3/12 Raymond Hettinger :
> If anyone here is interested, here is a proposal I posted on the
> python-ideas list.
>
> The idea is to make numbering formatting a little easier with the new
> format() builtin
> in Py2.6 and Py3.0: http://docs.python.org/library/string.html#formatspec
As far as
Hi,
I am trying to install SciPy and NumPy in Python 2.6 (OS - Win XP).
http://downloads.sourceforge.net/numpy/numpy-1.2.1.tar.gz
http://downloads.sourceforge.net/scipy/scipy-0.7.0.tar.gz
While installing numpy It gives following installation error.
Running from numpy source directory.
Lie Ryan wrote:
> Scott David Daniels wrote:
>> Aahz wrote:
>>> In article ,
>>> Rhodri James wrote: ...
sys.path.append("C:\\DataFileTypes")
>>>
>>> My preference:
>>> sys.path.append(r"C:\DataFileTypes")
>>> This doesn't work if you need to add a trailing backslash, though.
>>
>> Also my pr
I need an architecture in a project using Django and Python + MySQL, so that
when I put a python script in specified directory, that should be loaded and
its methods/functions can be used.
As far as i have thought on this, I am going to scan that particular
directory, list out the files, import th
>From the PSF board candidates statements:
Tim Peters
==
While my efforts to get the PSF recognized as a bank holding company
(and so qualify for billions of dollars in US TARP aid) haven't yet
succeeded, I'm apparently the only director who even thought about it --
>> I would have thought someone would have noticed by now. Am I the only
>> person who uses Windows?
Apparently just you and the guy who built the distribution.
Skip
--
http://mail.python.org/mailman/listinfo/python-list
Paul> I have the problem that my shelve(s) sometimes corrupt (looks like
Paul> it has after python has run out of threads).
Paul> I am using the default shelve so on linux I get the dbhash
Paul> version. Is there a different DB type I can choose that is known
Paul> to be more
John Crawford wrote in
news:newztoolz_rulz!_www.techsono.com_3319721838_653...@speakea
sy.net:
>
> Two packages that are Django-based that I have found, are
> Snap and SCT. They both look pretty good (and Snap was
> influenced by Vanilla). Does anyone have any experience with
> these packages,
On Fri, Mar 13, 2009 at 8:31 PM, Ravi Kumar wrote:
> I need an architecture in a project using Django and Python + MySQL, so that
> when I put a python script in specified directory, that should be loaded and
> its methods/functions can be used.
> As far as i have thought on this, I am going to sc
Vlastimil Brom wrote:
> 2009/3/13 hendra kusuma :
>> you may want to use os.sep to replace manually written "/" "\" ":" for each
>> os
>> I heard that unix/linux use "/" as directory separator while windows use "\"
>> and mac os use ":"
>>
> Thanks for the notice about the ":" path separator on mac
On Freitag, 13. März 2009, Raymond Hettinger wrote:
> [Paul Rubin]
> > What if you want to change the separator? Europeans usually
> > use periods instead of commas: one thousand = 1.000.
>
> That is supported also.
do you support just a fixed set of separators or anything?
how about this: (Swi
Hello
I must be dense, but I still don't understand 1) why Python sometimes
barfs out this type of error when displaying text that might not be
Unicode-encoded, 2) whether I should use encode() or decode() to solve
the issue, or even 3) if this is a Python issue or due to APWS SQLite
wrapper that
On Mar 13, 12:52 am, koranthala wrote:
> Hi,
> Is it possible to convert a string to a function parameter?
> Ex:
> str = 'True, type=rect, sizes=[3, 4]'
> and I should be able to use it as:
> test(convert(str)) and the behaviour should be same as calling test
> with those values :
> i.e. test(
Gilles Ganault wrote:
> I must be dense, but I still don't understand 1) why Python sometimes
> barfs out this type of error when displaying text that might not be
> Unicode-encoded, 2) whether I should use encode() or decode() to solve
> the issue, or even 3) if this is a Python issue or due to A
On Mar 12, 9:02 am, SamuelXiao wrote:
> On Mar 12, 11:17 pm, Piet van Oostrum wrote:
>
>
>
> > > SamuelXiao (S) wrote:
> > >S> I want to input data by using pickle
> > >S> First of all, I have a database.txt
> > >S> The content is like:
> > >S> AAA,aaalink
> > >S> BBB,bbblink
> > >S> CCC,ccc
andrew cooke wrote:
MRAB wrote:
andrew cooke wrote:
MRAB wrote:
[...]
The other special case is with \u in a Unicode string:
>>> ur"\u0041"
u'A'
this isn't true for 3.0:
r"\u0041"
'\\u0041'
(there's no "u" because it's a string, not a bytes literal)
and as far as i can tell, that's cor
This proposal (a) ignores Guido's clear-cut decision that lambda is
good as it is, (b) is weird in proposing a special-case syntax, (c) is
several Python versions too late for a graceful transition by 3.0.
But I don't won't to just throw the idea away, so I'm posting here.
If there is serious posit
Hello,
(Competition language: English)
First round of Python competition at "Python Evaluator" will be next
Saturday at 17:00 ( UTC ).
If you want to register:
http://evaluator.vdekovic.net/index.php?select=register.php
Rules:
http://evaluator.vdekovic.net/index.php?select=rules.php
http://eva
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 following:
NAME = lambda ARGUMENTS: EXPRESSION
except that NAME is also
On Mar 13, 7:06 am, Tim Rowe wrote:
> 2009/3/12 Raymond Hettinger :
>
> > If anyone here is interested, here is a proposal I posted on the
> > python-ideas list.
>
> > The idea is to make numbering formatting a little easier with the new
> > format() builtin
> > in Py2.6 and Py3.0: http://docs.py
MRAB wrote:
In Python 3.x a backslash doesn't have a special meaning in a raw
string, except that it can prevent a following quote from ending the
string, but the backslash is still included. Why? How useful is that? I
think it would've been simpler if a backslash had _no_ special effect,
not ev
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 following:
NAME = lambda ARGUMENTS: EXPRESSION
exce
I'm reading in some rather large files (28 files each of 130MB). Each
file is a genome coordinate (chromosome (string) and position (int))
and a data point (float). I want to read these into a list of
coordinates (each a tuple of (chromosome, position)) and a list of
data points.
This has taught m
2009/3/13 :
> I think this proposal is more for debugging big numbers and meant mostly
> for programmers' eyes. We are already using the dot instead of comma
> decimal separator in our programming languages that one more
> Americanism won't kill us.
If it were for the programmers' eyes then it wo
koranthala wrote:
Hi,
Is it possible to convert a string to a function parameter?
Ex:
str = 'True, type=rect, sizes=[3, 4]'
and I should be able to use it as:
test(convert(str)) and the behaviour should be same as calling test
with those values :
i.e. test(True, type=rect, sizes=[3, 4])
I tr
Steve Holden wrote:
Lie Ryan wrote:
Scott David Daniels wrote:
Aahz wrote:
In article ,
Rhodri James wrote: ...
sys.path.append("C:\\DataFileTypes")
My preference:
sys.path.append(r"C:\DataFileTypes")
This doesn't work if you need to add a trailing backslash, though.
Also my preference (ex
On Fri, Mar 13, 2009 at 10:59 AM, psaff...@googlemail.com
wrote:
> I'm reading in some rather large files (28 files each of 130MB). Each
> file is a genome coordinate (chromosome (string) and position (int))
> and a data point (float). I want to read these into a list of
> coordinates (each a tupl
Rhodri James wrote:
On Fri, 13 Mar 2009 14:49:17 -, Beni Cherniavsky
wrote:
...Allow keyword arguments in function call to take this form:
NAME ( ARGUMENTS ) = EXPRESSION
which is equivallent to the following:
NAME = lambda ARGUMENTS: EXPRESSION
except that NAME is also assigned as
On Fri, 2009-03-13 at 08:59 -0700, psaff...@googlemail.com wrote:
> I'm reading in some rather large files (28 files each of 130MB). Each
> file is a genome coordinate (chromosome (string) and position (int))
> and a data point (float). I want to read these into a list of
> coordinates (each a tupl
On Mar 13, 2:52 am, koranthala wrote:
> Hi,
> Is it possible to convert a string to a function parameter?
> Ex:
> str = 'True, type=rect, sizes=[3, 4]'
> and I should be able to use it as:
> test(convert(str)) and the behaviour should be same as calling test
> with those values :
> i.e. test(T
Hi,
I have 2 lists
a = [(4, 1), (7, 3), (3, 2), (2, 4)]
b = [2, 4, 1, 3]
Now, I want to order _a_ (a[1]) based on _b_.
i.e. the second element in tuple should be the same as b.
i.e. Output would be [(3, 2), (2, 4), (4, 1), (7, 3)]
I did the same as follows:
>>> l = len(a) * [N
Hi all,
I wrote a few c++ classes for some data analysis on a physics
esperiment. Now I want to glue the lot with Python, so I built the
necessary wrap code with SWIG and compiled the library with Distutils.
All is fine, I can import the module and classes work as expected...
...but for one thing
MRAB writes:
sorted(range(9), def key(n): n % 3)
> [0, 3, 6, 1, 4, 7, 2, 5, 8]
Given the recent pattern of syntactic constructs for expressions using
(ternary if, listcomps, genexps), and avoiding
the use of colon in expressions, maybe it should be:
sorted(range(9), key=n % 3 def key(n)
On Fri, Mar 13, 2009 at 11:33 AM, Kurt Smith wrote:
[snip OP]
>
> Assuming your data is in a plaintext file something like
> 'genomedata.txt' below, the following will load it into a numpy array
> with a customized dtype. You can access the different fields by name
> ('chromo', 'position', and 'd
On Mar 13, 12:03 pm, Matteo wrote:
> Hi all,
>
> I wrote a few c++ classes for some data analysis on a physics
> esperiment. Now I want to glue the lot with Python, so I built the
> necessary wrap code with SWIG and compiled the library with Distutils.
> All is fine, I can import the module and cl
Kottiyath wrote:
Hi,
I have 2 lists
a = [(4, 1), (7, 3), (3, 2), (2, 4)]
b = [2, 4, 1, 3]
Now, I want to order _a_ (a[1]) based on _b_.
i.e. the second element in tuple should be the same as b.
i.e. Output would be [(3, 2), (2, 4), (4, 1), (7, 3)]
I did the same as follows:
While Kurt gave some excellent ideas for using numpy, there were
some missing details in your original post that might help folks
come up with a "work smarter, not harder" solution.
Clearly, you're not loading it into memory just for giggles --
surely you're *doing* something with it once it's
Hrvoje Niksic wrote:
MRAB writes:
sorted(range(9), def key(n): n % 3)
[0, 3, 6, 1, 4, 7, 2, 5, 8]
Given the recent pattern of syntactic constructs for expressions using
(ternary if, listcomps, genexps), and avoiding
the use of colon in expressions, maybe it should be:
sorted(range(9), k
MRAB wrote:
Kottiyath wrote:
Hi,
I have 2 lists
a = [(4, 1), (7, 3), (3, 2), (2, 4)]
b = [2, 4, 1, 3]
Now, I want to order _a_ (a[1]) based on _b_.
i.e. the second element in tuple should be the same as b.
i.e. Output would be [(3, 2), (2, 4), (4, 1), (7, 3)]
I did the same
On 13 Mar, 18:19, Aaron Brady wrote:
> On Mar 13, 12:03 pm, Matteo wrote:
>
>
>
> > Hi all,
>
> > I wrote a few c++ classes for some data analysis on a physics
> > esperiment. Now I want to glue the lot with Python, so I built the
> > necessary wrap code with SWIG and compiled the library with Di
Kottiyath writes:
> Hi,
> I have 2 lists
> a = [(4, 1), (7, 3), (3, 2), (2, 4)]
> b = [2, 4, 1, 3]
>
> Now, I want to order _a_ (a[1]) based on _b_.
> i.e. the second element in tuple should be the same as b.
> i.e. Output would be [(3, 2), (2, 4), (4, 1), (7, 3)]
[...]
> whe
> I have 2 lists
> a = [(4, 1), (7, 3), (3, 2), (2, 4)]
> b = [2, 4, 1, 3]
>
> Now, I want to order _a_ (a[1]) based on _b_.
> i.e. the second element in tuple should be the same as
> b.
> i.e. Output would be [(3, 2), (2, 4), (4, 1), (7, 3)]
>
> I did the same as follows:
>
Thanks for all the replies.
First of all, can anybody recommend a good way to show memory usage? I
tried heapy, but couldn't make much sense of the output and it didn't
seem to change too much for different usages. Maybe I was just making
the h.heap() call in the wrong place. I also tried getrusag
Raymond Hettinger wrote:
[andrew cooke]
would it break anything to also allow
format(1234567, 'd') # what we have now
'1234567'
format(1234567, '.d') # proposed new option
'1.234.567'
format(1234.5, ',2f') # proposed new option
'1234,50'
format(1234.5, '.,2f') # pr
psaffrey googlemail.com googlemail.com> writes:
>
> First of all, can anybody recommend a good way to show memory usage?
Python 2.6 has a function called sys.getsizeof().
--
http://mail.python.org/mailman/listinfo/python-list
Hrvoje Niksic wrote:
> Kottiyath writes:
>
>> Hi,
>> I have 2 lists
>> a = [(4, 1), (7, 3), (3, 2), (2, 4)]
>> b = [2, 4, 1, 3]
>>
>> Now, I want to order _a_ (a[1]) based on _b_.
>> i.e. the second element in tuple should be the same as b.
>> i.e. Output would be [(3, 2), (2, 4),
hmmm... looks like SWIG has a problem with double pointers. I googled
around a bit and found:
http://osdir.com/ml/programming.swig/2003-02/msg00029.html
anyone knows how to write a small wrapper to do the appropriate
dereferencing?
--
http://mail.python.org/mailman/listinfo/python-list
MRAB wrote:
> >>> a = [(4, 1), (7, 3), (3, 2), (2, 4)]
> >>> b = [2, 4, 1, 3]
> >>> d = dict((v, k) for k, v in a)
> >>> c = [(d[s], s) for s in b]
> >>> c
> [(3, 2), (2, 4), (4, 1), (7, 3)]
ah, that is more efficient than the suggestions i posted.
andrew
--
http://mail.python.org/mailman/
MRAB:
> >>> sorted(range(9), def key(n): n % 3)
I am fine with the current lambda syntax, but another possibility:
sorted(range(9), n => n % 3)
Bye,
bearophile
--
http://mail.python.org/mailman/listinfo/python-list
En Fri, 13 Mar 2009 14:27:27 -0200, Lie Ryan escribió:
Steve Holden wrote:
Lie Ryan wrote:
Scott David Daniels wrote:
Aahz wrote:
In article ,
Rhodri James wrote: ...
sys.path.append("C:\\DataFileTypes")
My preference:
sys.path.append(r"C:\DataFileTypes")
This doesn't work if you need to
En Fri, 13 Mar 2009 14:49:51 -0200, Tim Wintle
escribió:
If the same chromosome string is being used multiple times then you may
find it more efficient to reference the same string, so you don't need
to have multiple copies of the same string in memory. That may be what
is taking up the space
wow, ok, thank you Gabriel, I wasn't aware of x,'y',z
This is what I decided to go with for now in one of my classes, but another
class will need a modified version of this, as mentioned x,'y',z
B=_brush()
list( ( self.__setattr__(x.replace("b_",""),getattr(B,x)) for x in
dir(B)
On Fri, Mar 13, 2009 at 2:12 PM, John Posner wrote:
>
>> I have 2 lists
>> a = [(4, 1), (7, 3), (3, 2), (2, 4)]
>> b = [2, 4, 1, 3]
>>
>> Now, I want to order _a_ (a[1]) based on _b_.
>> i.e. the second element in tuple should be the same as
>> b.
>> i.e. Output would be [(3, 2), (2
On Fri, Mar 13, 2009 at 3:13 PM, Miles wrote:
> [snip]
Sorry, didn't see the original thread on this.
-Miles
--
http://mail.python.org/mailman/listinfo/python-list
En Fri, 13 Mar 2009 17:12:49 -0200, alex goretoy
escribió:
wow, ok, thank you Gabriel, I wasn't aware of x,'y',z
This is what I decided to go with for now in one of my classes, but
another
class will need a modified version of this, as mentioned x,'y',z
B=_brush()
list(
"andrew cooke" writes:
> Hrvoje Niksic wrote:
>> Kottiyath writes:
>>
>>> Hi,
>>> I have 2 lists
>>> a = [(4, 1), (7, 3), (3, 2), (2, 4)]
>>> b = [2, 4, 1, 3]
>>>
>>> Now, I want to order _a_ (a[1]) based on _b_.
>>> i.e. the second element in tuple should be the same as b.
>>> i
Scott David Daniels wrote:
> Aahz wrote:
>> In article ,
>> Rhodri James wrote: ...
>>> sys.path.append("C:\\DataFileTypes")
>>
>> My preference:
>> sys.path.append(r"C:\DataFileTypes")
>> This doesn't work if you need to add a trailing backslash, though.
>
> Also my preference (except, due to ag
dot wrote:
> has anyone experience with installing Python and pywin32 to Windows XP
> Pro running in a VMware environment?
>
> At the end of installing pywin32 I get following error:
>
>
> Traceback (most recent call last):
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 client for the Windows platform. I have this very simple
> > question which I've been unable to answer. I'm listen
Hello I need some hello I need some help with a programingproject, I'm
fairly new to programming so I do find it slightly confusing.
Here is my code for my main function which
passes my variable from a text file,
however when i run it I get the error code:
import math
import quadroot
def main():
On Fri, Mar 13, 2009 at 4:06 PM, Daniel Sidorowicz wrote:
> Hello I need some hello I need some help with a programingproject, I'm
> fairly new to programming so I do find it slightly confusing.
>
> Here is my code for my main function which
> passes my variable from a text file,
> however when i
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.com/ml/programming.swig/2003-02/msg00029.html
>
> anyone knows how to write a small wrapper to do the appropriate
> dereferencing?
If you can't sol
On Fri, Mar 13, 2009 at 1:13 PM, psaff...@googlemail.com
wrote:
> Thanks for all the replies.
>
[snip]
>
> The numpy solution does work, but it uses more than 1GB of memory for
> one of my 130MB files. I'm using
>
> np.dtype({'names': ['chromo', 'position', 'dpoint'], 'formats': ['S6',
> 'i4', 'f8
> If you don't want to build the intermediary dict, a
> less efficient
> version that runs in O(n^2):
>
> a.sort(key=lambda k: b.index(k[1]))
>
> Which is mostly similar to John's solution, but still
> more efficient
> because it only does a b.index call once per 'a'
> item instead of twice
> pe
Hey,
I work at a company where I'm lucky enough to write web apps using
Python and WSGI :). We develop more and more stuff in Python and it's
becoming a mess of dependencies, so we thought we would create a
guideline for developers that describes the whole process of deploying
a Python app on a se
On Mar 13, 11:46 am, Aaron Brady wrote:
> On Mar 13, 2:52 am, koranthala wrote:
>
> > Hi,
> > Is it possible to convert a string to a function parameter?
> > Ex:
> > str = 'True, type=rect, sizes=[3, 4]'
> > and I should be able to use it as:
> > test(convert(str)) and the behaviour should be
Announcing Urwid 0.9.8.4
Urwid home page:
http://excess.org/urwid/
Tarball:
http://excess.org/urwid/urwid-0.9.8.4.tar.gz
RSS:
http://excess.org/feeds/tag/urwid/
About this release:
===
This is a maintenance release that adds compatibility with P
On Mar 10, 1:35 pm, Rob Clewley wrote:
> Dear Pythonistas,
>
> Our open-source software project (PyDSTool) has money to hire an
> experienced Python programmer on a short-term, per-task basis as a
> technical consultant (i.e., no fringe benefits offered). The work can
> be done remotely and will b
I've had this trouble before, how do I find the details of how "in"
works in the documentation. E.g. the details of:-
if string in bigstring:
It gets a mention in the "if" section but not a lot.
--
Chris Green
--
http://mail.python.org/mailman/listinfo/python-list
What's the neatest way to do the following in case insensitive fashion:-
if stringA in stringB:
bla bla bla
I know I can just do:-
if stringA.lower() in stringB.lower():
bla bla bla
But I was wondering if there's a neater/easier way?
--
Chris Green
--
http://mail.pytho
Hi
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 thread that takes all the
gathered data and concatenates it sequentially.
An example is if we want to get various ranges of
> > The separators can be any one of COMMA,
> > SPACE, DOT, UNDERSCORE, or NON-BREAKING-SPACE.
>
> What if I want other separators?
format(n, ',d').replace(",", yoursep)
> How about this idea: make the format has "long" format, which is a bit
> more verbose, flexible, and unambiguous, and the cu
Good day.
As the title sais, i am trying to extract pixel colors from images, in
Python 3.
I know that for python 2.x, PIL (Python image library) can do that,
via Image > getpixel((x,y)). It returns the colors as a list with 3
parameters, Red, Green and Blue. This is exactly what i want.
Now, the
On Fri, 2009-03-13 at 21:01 +, tinn...@isbd.co.uk wrote:
> I've had this trouble before, how do I find the details of how "in"
> works in the documentation. E.g. the details of:-
>
> if string in bigstring:
>
> It gets a mention in the "if" section but not a lot.
>
>From http://docs.py
isbd.co.uk> writes:
>
> I've had this trouble before, how do I find the details of how "in"
> works in the documentation. E.g. the details of:-
>
> if string in bigstring:
>
> It gets a mention in the "if" section but not a lot.
Look here: http://docs.python.org/reference/expressions.ht
On Fri, 2009-03-13 at 21:04 +, tinn...@isbd.co.uk wrote:
> What's the neatest way to do the following in case insensitive fashion:-
>
> if stringA in stringB:
> bla bla bla
>
> I know I can just do:-
>
> if stringA.lower() in stringB.lower():
> bla bla bla
>
> But I
"psaff...@googlemail.com" writes:
> However, I still need the coordinates. If I don't keep them in a list,
> where can I keep them?
See the docs for the array module:
http://docs.python.org/library/array.html
--
http://mail.python.org/mailman/listinfo/python-list
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...
So, not good.
--
http://mail.python.org/mailman/listinfo/python-list
On Fri, Mar 13, 2009 at 5:01 PM, Daniel Sidorowicz wrote:
> For instructions open file named README
> Enter control-C to quit
> Traceback (most recent call last):
> File "main.py", line 57, in
> main()
> File "main.py", line 16, in main
> S = L.split()
> AttributeError: 'list' object
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.com/ml/programming.swig/2003-02/msg00029.html
>
> anyone knows how to write a small wrapper to do the appropriate
> dereferencing?
'ctypes' may be a
On Mar 13, 9:31 pm, Albert Hopkins wrote:
> On Fri, 2009-03-13 at 21:04 +, tinn...@isbd.co.uk wrote:
> > What's the neatest way to do the following in case insensitive fashion:-
>
> > if stringA in stringB:
> > bla bla bla
>
> > I know I can just do:-
>
> > if stringA.lower() i
On Mar 13, 1:13 pm, "psaff...@googlemail.com"
wrote:
> Thanks for all the replies.
>
> First of all, can anybody recommend a good way to show memory usage? I
> tried heapy, but couldn't make much sense of the output and it didn't
> seem to change too much for different usages. Maybe I was just mak
I've had this trouble before, how do I find the details of how "in"
works in the documentation. E.g. the details of:-
if string in bigstring:
It's tough to find those generic keywords. It happens to be
documented a bit here:
http://docs.python.org/library/operator.html#operator.contain
1 - 100 of 143 matches
Mail list logo