On Sep 12, 1:30 am, Steven D'Aprano
<[EMAIL PROTECTED]> wrote:
> On Thu, 11 Sep 2008 22:40:01 -0700, Dennis Lee Bieber wrote:
> > On 12 Sep 2008 03:37:51 GMT, Steven D'Aprano
> > <[EMAIL PROTECTED]> declaimed the following in
> > comp.lang.python:
>
> >> I'm pretty sure you're wrong. XML can be use
On Thu, 11 Sep 2008 22:40:01 -0700, Dennis Lee Bieber wrote:
> On 12 Sep 2008 03:37:51 GMT, Steven D'Aprano
> <[EMAIL PROTECTED]> declaimed the following in
> comp.lang.python:
>
>
>> I'm pretty sure you're wrong. XML can be used for serialization, but
>> that doesn't mean it is only sequential
Henry Chang wrote:
Instead of getting integers with weekday(), Monday == 0 ... Sunday == 6;
is there a way to get the actual names, such as "Monday ... Sunday"? I
would like to do this without creating a data mapping. :)
The 'actual names' in which language? Chinese, Russian, French, ... :)
On Sep 5, 9:38 am, Helmut Jarausch <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I need to hash arrays of integers (from the hash module).
>
> So, I have to derive from array and supply a __hash__ method.
I don't believe you need to derive from an array.
Here are two simple and well known hash functions y
Gabriel Genellina wrote:
> En Thu, 11 Sep 2008 10:59:10 -0300, Matt Nordhoff
> <[EMAIL PROTECTED]> escribió:
>
>>>result = "%s\t%s\t%s" %(id,gene_symbol,ptms)
>>
>> This is very trivial, but you could change the above line to:
>>
>>result = "\t".join(id, gene_symbol, ptms)
On Sep 11, 10:37 pm, Steven D'Aprano
<[EMAIL PROTECTED]> wrote:
> On Thu, 11 Sep 2008 10:20:41 -0700, Aaron \"Castironpi\" Brady wrote:
> > XML is the wrong word for the example I was thinking of (as was already
> > pointed out in another thread). XML is by definition sequential.
>
> I'm pretty su
Hi,all:I make the SQLObject as the ORM in turbogears ,now I meet a problems
on selecting records for a given date . Here is the define for my class:
class updateHistory(SQLObject):
actionTime = DateTimeCol(default=datetime.now)
actionContent = UnicodeCol(length=500,default="")
Then how ca
On Thu, 11 Sep 2008 10:20:41 -0700, Aaron \"Castironpi\" Brady wrote:
> XML is the wrong word for the example I was thinking of (as was already
> pointed out in another thread). XML is by definition sequential.
I'm pretty sure you're wrong. XML can be used for serialization, but that
doesn't me
if you just type "python wx" you will get 2,080,000 results. The first
by luck (not chance) is wxPython.
it scares me when ppl start to post on newsgroups before even searching
in the web for a second!
how old r u Mr. Chance not Choice?
on 09/12/2008 02:32 AM Fredrik Lundh wrote :
Desmon
On Tue, Sep 9, 2008 at 9:35 PM, alex23 <[EMAIL PROTECTED]> wrote:
> On Sep 10, 7:30 am, "Blake Garner" <[EMAIL PROTECTED]> wrote:
>> I'm looking for suggestions on how to approach generating rss feed
>> .xml files using python. What modules to people recommend I start
>> with?
pylons webhelpers ma
En Thu, 11 Sep 2008 10:43:08 -0300, john <[EMAIL PROTECTED]> escribió:
I wrapped some fortran code using F2PY and need to be able to catch
fortran runtime errors to run the following:
[reindented]
# "grid" is a wrapped fortran module
# no runtime errors incurred when run with the correct inpu
On Sep 11, 6:11 pm, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
[snip]
> (the next step towards true Pythonicness would be to store your data in
> class instances instead of dictionaries in the first place, but one step
> at a time...)
>
Surely the word is "Pythonicity"? :-)
--
http://mail.python.org/
En Thu, 11 Sep 2008 10:59:10 -0300, Matt Nordhoff
<[EMAIL PROTECTED]> escribió:
result = "%s\t%s\t%s" %(id,gene_symbol,ptms)
This is very trivial, but you could change the above line to:
result = "\t".join(id, gene_symbol, ptms)
So trivial that you did not even attem
On Sep 10, 7:01 pm, Sean DiZazzo <[EMAIL PROTECTED]> wrote:
> On Sep 10, 6:04 pm, [EMAIL PROTECTED] wrote:
>
>
>
> > Hey , I need toSSHinto a server .. (10.8.42.38) usingpexpectthe
> > username is 'admin' and password is 'abc123' so far i have the
> > following code
>
> > importpexpect
> > import s
Chris wrote:
Ok, thanks for the confirmation. We'd been hoping to avoid creating
such a struct...
Don't worry, a C extension with its own struct isn't hard to write. Your
C code can access the member variables w/o using any Python API. You'll
get the full speed of C. :]
Christian
--
http:/
On 11 Sep, 19:31, "Aaron \"Castironpi\" Brady" <[EMAIL PROTECTED]>
wrote:
>
> An acquaintance suggests that defragmentation would be a useful
> service to provide along with memory management too, which also
> requires an index.
I presume that you mean efficient access to large amounts of data in
On Sep 10, 7:41 am, Chris <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'd like to be able to access an attribute of a particular Python
> object as fast as possible from some C code.
>
> I wondered if using __slots__ to store the attribute would allow me to
> do this in a faster way.
>
> The reason I'd li
On Sep 11, 10:25 am, nntpman68 <[EMAIL PROTECTED]> wrote:
> >> doesn't exactly work for Python scripts, though:
>
> >> $ cat env.py
> >> #!/usr/bin/env python
> >> import os
> >> os.environ["TEST"] = "hello"
>
> >> $ . ./env.py && env | grep TEST
> >> import: unable to open X server `'.
> >> bash:
Hi,
I'm trying to build Python on Windows using Visual Studio 2005. I have
no trouble compiling tcl/tk 8.5, but when I subsequently build Python
it doesn't find tcl/tk (I get a message about being unable to find
tcl.h).
I'm using the source distribution of Python 2.5.2, not the svn
version. I'm t
>> ok but if len is O(1) then it doesnt matter? compared to
>> if not lista:
>> return []
>> i mean.
Depends on how often the test is performed, e.g.:
>>> def f(a):
... if not a: return []
...
>>> dis.dis(f)
2 0 LOAD_FAST
process wrote:
ok but if len is O(1) then it doesnt matter? compared to
if not lista:
return []
what doesn't matter?
--
http://mail.python.org/mailman/listinfo/python-list
doesn't exactly work for Python scripts, though:
$ cat env.py
#!/usr/bin/env python
import os
os.environ["TEST"] = "hello"
$ . ./env.py && env | grep TEST
import: unable to open X server `'.
bash: os.environ[TEST]: command not found
There's two options for the desperate ones.
1. Assumin
ok but if len is O(1) then it doesnt matter? compared to
if not lista:
return []
i mean.
--
http://mail.python.org/mailman/listinfo/python-list
Hrvoje Niksic xemacs.org> writes:
...
> [ You can use the capi-sig for questions like this; see
> http://mail.python.org/mailman/listinfo/capi-sig ]
Thanks, I had no idea about that.
> PyObject_GetAttrString is convenient, but it creates a Python string
> only so it can intern it (and in most
Christian Heimes cheimes.de> writes:
...
> You can use slots to increase the performance but it doesn't work
> like you think. If you need it *really* fast than write a C
> Extension, store the data in a C struct and access the data via
> PyMemberDef.
Ok, thanks for the confirmation. We'd been ho
On Thu, Sep 11, 2008 at 12:02 PM, Daniel Fetchinson
<[EMAIL PROTECTED]> wrote:
>
>
>>> Thanking you,
>>>
>>> Ms. Vaidehi Pawar
>>
>> How much do you pay?
>>
>>> How much do you ask for
>>>
>>> cheers
>>> Ms. Vaidehi
>
> I was just kidding. But if you seriously need people to do this kind
> of
On Sep 11, 3:50 am, thebjorn <[EMAIL PROTECTED]>
wrote:
> On Sep 10, 9:44 pm, Waldemar Osuch <[EMAIL PROTECTED]> wrote:
>
>
>
> > On Sep 10, 1:23 pm, thebjorn <[EMAIL PROTECTED]>
> > wrote:> I've been trying to use SOAPpy and ZSI (with and without the use of
> > > wsdl2py) to communicate with a SOA
>> Thanking you,
>>
>> Ms. Vaidehi Pawar
>
> How much do you pay?
>
>> How much do you ask for
>>
>> cheers
>> Ms. Vaidehi
I was just kidding. But if you seriously need people to do this kind
of job it's better to post the amount you are willing to pay otherwise
nobody will take it seriously
If you follow the bug report, you might notice that this is probably
an issue of socket flags. I know that *BSD and Linux handle sockets
slightly differently, but that about covers my knowledge of these
things. Maybe a solution can be found simply by setting the right
flags for the socket...
Any i
On Thu, 11 Sep 2008 16:17:58 +0200, Thorben Krueger wrote:
> Do you see this too?
>
> Mor information and testcase here:
>
> http://bugs.python.org/issue3766
>
> I would also be interested in the profiler output under windows.
>
> All the best
> Thorben
I regret that I don't have a lot of tim
On Sep 11, 11:39 am, Sean DiZazzo <[EMAIL PROTECTED]> wrote:
> On Sep 11, 9:59 am, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
>
>
>
> > [EMAIL PROTECTED] wrote:
> > > I want to build a desktop application. I am searching for some kind of
> > > environment that would provide all the elements ready (Wi
On Sep 11, 9:59 am, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > I want to build a desktop application. I am searching for some kind of
> > environment that would provide all the elements ready (Windows...).
> > Then I would have to code the business logic only.
>
> start
Desmond Scott E wrote:
I'm am a Python novice by chance not choice. (Although it appears to be
a nice tool. Plus anything based on Monte Python can't be bad!)
My Quest is to migrate a Python-based process from Windows2000/Python
v2.4.2 (#67) to WindowsXP/Python v2.5.2 (r252:60911).
I've s
The module you are talking about is a python GUI toolkit named WxPython,
which is a port of the cross platform C++ GUI toolkit wxwidgets. It's an
excelent gui toolkit , easy to learn and code on. Well documented and has an
excelent community around it. Here are the links for both sites:
http://www.
Monu wrote:
So Can't I choose which module to use. Is there any preferance on
which shelve chooses these modules?
it uses the anydbm module to look for available DBM-style drivers, which
looks for modules in the following order: dbhash, gdbm, dbm, dumbdbm.
if you know which one you want, yo
I'm am a Python novice by chance not choice. (Although it appears to be
a nice tool. Plus anything based on Monte Python can't be bad!)
My Quest is to migrate a Python-based process from Windows2000/Python
v2.4.2 (#67) to WindowsXP/Python v2.5.2 (r252:60911).
I've searched the Python website and
Diez B. Roggisch wrote:
Any reason why
os.path.normpath(a).startswith(os.normpath(b)) doesn't do the trick?
Except for the trivial type, you mean? That depends on whether "c:\foo"
should be seen as a subpath to "c:\foobar" or not. I'd probably go for
(also untested):
def issubpath(a, b)
On Sep 8, 1:47 pm, [EMAIL PROTECTED] wrote:
> Monu> When I am using shelve on my local machine it generates the db
> Monu> file as given filename. But in another machine it's generating
> Monu> .dat and .dir. can anyone tell me how can I force sheve
> Monu> module to write the db i
On Sep 8, 1:47 pm, [EMAIL PROTECTED] wrote:
> Monu> When I am using shelve on my local machine it generates the db
> Monu> file as given filename. But in another machine it's generating
> Monu> .dat and .dir. can anyone tell me how can I force sheve
> Monu> module to write the db i
Giampaolo Rodola' schrieb:
Hi,
I'm trying to implement a function which returns whether a path is a
subpath of another one (e.g. /a/b/c is a subpath of /a/b).
I wrote this function which apparently seems to work fine:
import os
def issubpath(path1, path2):
"""Return True if path1 is a sub p
i3dmaster schrieb:
Is there a feature in distutils or easy_install to specify what
version of python that the target package can be installed? For
example, if a package has a module that only needed if the python
version < 2.6, is there a way to specifiy that in setup.py or
easy_install cfg file
On Sep 11, 5:40 pm, "Giampaolo Rodola'" <[EMAIL PROTECTED]> wrote:
> Hi,
> I'm trying to implement a function which returns whether a path is a
> subpath of another one (e.g. /a/b/c is a subpath of /a/b).
> I wrote this function which apparently seems to work fine:
>
> import os
>
> def issubpath(p
On Sep 11, 10:52 am, hofer <[EMAIL PROTECTED]> wrote:
> On Sep 11, 10:36 am, Nick Craig-Wood <[EMAIL PROTECTED]> wrote:
>
> >I'd type the explicit
>
> > v1,v2,v3 = mydict['one'], mydict['two'], mydict['two'] # 54 chars > Either
> > is only a couple more
> > characters to type. It is completely
On Sep 11, 4:48 pm, Manuel Ebert <[EMAIL PROTECTED]> wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Ah, well. Don't know whether it meets your aesthetic standards, but:
> >>> my_list = ['tree', 'hug', 'flower', 'hug', 'bear', 'run']
> >>> my_list[0:len(a):2]
> ['tree', 'flower', 'be
On Sep 11, 5:35 am, Paul Boddie <[EMAIL PROTECTED]> wrote:
> On 11 Sep, 10:34, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
>
>
>
> > And as I said before, the only use case for *huge* XML files I've ever
> > seen used in practice is to store large streams of record-style data;
>
> I can imagine that t
Awesome, that worked. Thanks so much!
On Thu, Sep 11, 2008 at 10:16 AM, Fredrik Lundh <[EMAIL PROTECTED]>wrote:
> Henry Chang wrote:
>
> Instead of getting integers with weekday(), Monday == 0 ... Sunday == 6;
>> is there a way to get the actual names, such as "Monday ... Sunday"? I
>> would l
On Sep 11, 2:40 am, Steven D'Aprano
<[EMAIL PROTECTED]> wrote:
> On Wed, 10 Sep 2008 11:59:35 -0700, Aaron \"Castironpi\" Brady wrote:
> > On Sep 10, 5:24 am, Steven D'Aprano
> > <[EMAIL PROTECTED]> wrote:
> >> On Wed, 10 Sep 2008 09:26:20 +0200, Fredrik Lundh wrote:
> >> > Steven D'Aprano wrote:
>
Henry Chang wrote:
Instead of getting integers with weekday(), Monday == 0 ... Sunday == 6;
is there a way to get the actual names, such as "Monday ... Sunday"? I
would like to do this without creating a data mapping. :)
if you have a datetime or date object, you can use strftime with the
hofer wrote:
The real example would be more like:
name,age,country = itemgetter('name age country'.split())(x)
ouch.
if you do this a lot (=more than once), just wrap your dictionaries in a
simple attribute proxy, and use plain attribute access. that is, given
class AttributeWrapper:
Instead of getting integers with weekday(), Monday == 0 ... Sunday == 6; is
there a way to get the actual names, such as "Monday ... Sunday"? I would
like to do this without creating a data mapping. :)
--
http://mail.python.org/mailman/listinfo/python-list
thebjorn wrote:
> I've been trying to use SOAPpy and ZSI (with and without the use of
> wsdl2py) to communicate with a SOAP server (looks like it's a WebLogic
> server(?) in front of some enterprise java bean) and not having much
> luck.
Have you tried using soaplib? I find it very usable and from
Version 2.2 of the ReportLab open-source toolkit is out! You find downloads and
src instructions at http://www.reportlab.org/downloads.html.
Contributions
=
Thanks to everybody who has contributed to the open-source toolkit in the run-up
to the 2.2 release, whether by reporting bugs
On Sep 11, 1:11 am, Uwe Schmitt <[EMAIL PROTECTED]>
wrote:
> > Kelie
>
> look atwww.sagemath.com. it is great.
>
> greetings, uwe
Thanks Uwe!
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
I want to build a desktop application. I am searching for some kind of
environment that would provide all the elements ready (Windows...).
Then I would have to code the business logic only.
start here:
http://wiki.python.org/moin/GuiProgramming
The big ones are Tki
carriere.jonat...:
> I want to build a desktop application. I am searching for some kind of
> environment that would provide all the elements ready (Windows...).
> Then I would have to code the business logic only.
I don't think there's such thing in Python, "all elements ready"
sounds strange :-)
On Sep 10, 2:04 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] schrieb:
>
>
>
> > On 9 Set, 17:55, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> >> I would go for a slightly different approach: make your server have a
> >> dispatch-method that delegates the calls to the und
On Sep 11, 11:13 am, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> On Sep 11, 4:19 pm, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
>
>
>
> > [EMAIL PROTECTED] wrote:
>
> > > I wonder if there is a platform written in python. The equivalent of
> > > the Netbeans platformhttp://platform.netbeans.or
Hi,
I'm trying to implement a function which returns whether a path is a
subpath of another one (e.g. /a/b/c is a subpath of /a/b).
I wrote this function which apparently seems to work fine:
import os
def issubpath(path1, path2):
"""Return True if path1 is a sub path of path2."""
if path1
Is there a feature in distutils or easy_install to specify what
version of python that the target package can be installed? For
example, if a package has a module that only needed if the python
version < 2.6, is there a way to specifiy that in setup.py or
easy_install cfg file so that when installi
On 2008-09-11, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote:
> On Wed, 10 Sep 2008 21:36:36 -0500, Grant Edwards <[EMAIL PROTECTED]>
> declaimed the following in comp.lang.python:
>
>
>> Wrong. I didn't send _any_ e-mail. Why should I get bounce
>> messages?
>>
> One: Comp.lang.python is dua
hofer:
> The real example would be more like:
> name,age,country = itemgetter('name age country'.split())(x) # or any
> of my above versions
That solution is very clever, and the inventor smart, but it's too
much out of standard and complex to be used in normal real code.
Learning tricks is useful
On Thu, 11 Sep 2008 12:43:34 +0200, Thomas Guettler wrote:
> why does Python only raise ImportError if it fails caused by a recursive
> import?
>
> I know what's wrong. But I guess many beginner don't know what's wrong.
> I don't want much, just "RecursiveImportError" instead of "ImportError".
>
On Sep 11, 4:48 pm, Manuel Ebert <[EMAIL PROTECTED]> wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Ah, well. Don't know whether it meets your aesthetic standards, but:
> >>> my_list = ['tree', 'hug', 'flower', 'hug', 'bear', 'run']
> >>> my_list[0:len(a):2]
> ['tree', 'flower', 'be
On Sep 11, 10:36 am, Nick Craig-Wood <[EMAIL PROTECTED]> wrote:
>I'd type the explicit
>
> v1,v2,v3 = mydict['one'], mydict['two'], mydict['two'] # 54 chars > Either
> is only a couple more
> characters to type. It is completely
> explicit and comprehensible to everyone, in comparison to
>
>
Thanks a lot for all your answers.
There's quite some things I learnt :-)
[v1,v2,v3] = ...
can be typed as
v1,v2,v3 = . . .
I also wasn't used to
map(myhash.get, ['one', 'two', 'two'])
itemgetter('one', 'one', 'two')(x)
I also didn't know
print "%(one)s\n%(two)s\n%(two)s" % mydict
The reason
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Ah, well. Don't know whether it meets your aesthetic standards, but:
>>> my_list = ['tree', 'hug', 'flower', 'hug', 'bear', 'run']
>>> my_list[0:len(a):2]
['tree', 'flower', 'bear']
>>> my_list[1:len(a):2]
['hug', 'hug', 'run']
and hence
>>> zip(my_
On Sep 11, 9:23 am, Sean Davis <[EMAIL PROTECTED]> wrote:
> On Sep 10, 7:54 pm, John Machin <[EMAIL PROTECTED]> wrote:
>
>
>
> > On Sep 11, 8:01 am, MRAB <[EMAIL PROTECTED]> wrote:
>
> > > On Sep 10, 6:59 pm, Sean Davis <[EMAIL PROTECTED]> wrote:
>
> > > > I have a large file that I would like to t
Grant Edwards <[EMAIL PROTECTED]> writes:
> Could whoever is responsible for the gateway that is grabbing
> my postings off of Usenet and e-mailing them out please fix the
> headers in the mail messages so that I don't get the bounce
> messages?
>
> While you're at it, might as well fix it for
On Sep 11, 4:04 pm, Manuel Ebert <[EMAIL PROTECTED]> wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Hi Andy,
>
> by the looks of it I'd say that the problem is that the second
> parameter you passed to start_element is not a dictionary at all (the
> clue is in the "AttributeError:
On Sep 11, 4:19 pm, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
>
> > I wonder if there is a platform written in python. The equivalent of
> > the Netbeans platformhttp://platform.netbeans.org/in the Python
> > world. Do you know such a thing?
>
> You (or maybe the Java f
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi Andy,
by the looks of it I'd say that the problem is that the second
parameter you passed to start_element is not a dictionary at all (the
clue is in the "AttributeError: 'LIST' object" ...).
>>> d = ['tree', 'house']
>>> start_element("Thin
On 2008-09-11, Steven D'Aprano <[EMAIL PROTECTED]> wrote:
> On Thu, 11 Sep 2008 15:25:57 +1000, Ben Finney wrote:
>
>>> > The bounce messages are sent to you because you sent the original.
>>>
>>> Wrong. I didn't send _any_ e-mail. Why should I get bounce messages?
>>
>> You asked for email to
Hi
I'm new to Python and trying to pick up good, idiomatic usage right
from the offset.
As I was familiar with Expat from C++ (directly and via expatpp) I'm
trying to write a little script - using xml.parsers.expat - to search
and replace XML attribute values.
As I want the attributes to stay in
[EMAIL PROTECTED] wrote:
> I wonder if there is a platform written in python. The equivalent of
> the Netbeans platform http://platform.netbeans.org/ in the Python
> world. Do you know such a thing?
You (or maybe the Java folks) seem to have missed that platform has a
rather specific meaning in
Do you see this too?
Mor information and testcase here:
http://bugs.python.org/issue3766
I would also be interested in the profiler output under windows.
All the best
Thorben
--
http://mail.python.org/mailman/listinfo/python-list
Hello all;
I wonder if there is a platform written in python. The equivalent of
the Netbeans platform http://platform.netbeans.org/ in the Python
world. Do you know such a thing?
Thanks a lot.
Jonathan.
--
http://mail.python.org/mailman/listinfo/python-list
Beema Shafreen wrote:
> hi all,
>
> I have a script using functions , I have a problem in returning the
> result. My script returns only one line , i donot know where the looping
> is giving problem, Can any one suggest, why this is happening and let me
> know how to return all the lines
>
> def
Greg, as an addition to what I already said to you, you can consider
taking a look at oood from ERP5 project
http://wiki.erp5.org/HowToUseOood
OOOd (openoffice.org daemon) runs openoffice behind the scene, and
allows you to interact with it via XML-RPC; it should be quite robust,
since it is acti
thanks for your valuable comments. I could solve the problem wiht your
comments
On Thu, Sep 11, 2008 at 7:07 PM, Fredrik Lundh <[EMAIL PROTECTED]>wrote:
> make that:
>
> note that you put the "return" statement inside the loop, so returning
>> only one line is the expected behaviour.
>>
>
> to f
sturlamolden wrote:
On Sep 10, 6:39 am, Travis Oliphant <[EMAIL PROTECTED]> wrote:
I wanted to point anybody interested to a blog post that describes a
useful pattern for having a NumPy array that points to the memory
created by a different memory manager than the standard one used by
NumPy.
I wrapped some fortran code using F2PY and need to be able to catch
fortran runtime errors to run the following:
# "grid" is a wrapped fortran module
# no runtime errors incurred when run with the correct inputs for
filetype
#---
def readGrid( self, coord='xyz'
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Thursday, September 11, 2008 8:54 AM
To: python-list@python.org
Subject: Re: removing text string
Ahmed, Shakir:
> Actually the number I am getting it is from slicing from a long tex
On Sep 11, 7:04 am, "Colin J. Williams" <[EMAIL PROTECTED]> wrote:
> Marco Bizzarri wrote:
> > On Wed, Sep 10, 2008 at 10:04 PM, Greg Lindstrom <[EMAIL PROTECTED]> wrote:
> >> Hello,
>
> >> I would like to create and manipulate Open Office documents using Python.
> >> I
> >> have found then UNO P
make that:
note that you put the "return" statement inside the loop, so returning
only one line is the expected behaviour.
to fix this, you can append the result strings to the data_lis list
inside the loop:
result = "%s\t%s\t%s" %(id,gene_symbol,ptms)
data_lis.append(r
Beema Shafreen wrote:
I have a script using functions , I have a problem in returning the
result. My script returns only one line , i donot know where the looping
is giving problem, Can any one suggest, why this is happening and let me
know how to return all the lines
def get_ptm():
fh =
Ahmed, Shakir:
> Actually the number I am getting it is from slicing from a long text
> line. I need to slice 10 characters from that line but no string only
> numeric numbers. When I am slicing 10 characters those A, c, O is coming
> at the end.
It's better to avoid Regular expressions when they
On Thu, 11 Sep 2008 02:31:23 -0700 (PDT), ruqiang826 wrote:
> I have written a service running backgroud to do something in linux.
> unfortunately$B!$(BI deleted the source code by mistake, and I can still
> see the process running background using "ps aux" :
>
> username 13820 0.0 0.0 60368
hi all,
I have a script using functions , I have a problem in returning the result.
My script returns only one line , i donot know where the looping is giving
problem, Can any one suggest, why this is happening and let me know how to
return all the lines
def get_ptm():
fh = open('file.txt',
chusky wrote:
> Hi !
>
> I have Python installed on C:\Python25
> Yesterday I added new "wx" library to the Python
>
> when I run C:\Python25\python.exe from the command line there is a
> problem with finding libraries:
>
> C:\Python25>python.exe
> Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:4
chusky wrote:
File "C:\Python25\Lib\site-packages\wx-2.8-msw-ansi\wx\_core.py",
line 5, in <
module>
import new
File "new.py", line 1
import
^
SyntaxError: invalid syntax
wxPython tries to import the module "new" from Python's standard
library, but picks up a broken modul
Thanks
Actually the number I am getting it is from slicing from a long text
line. I need to slice 10 characters from that line but no string only
numeric numbers. When I am slicing 10 characters those A, c, O is coming
at the end.
Thanks
-Original Message-
From: [EMAIL PROTECTED]
[mail
"Ricardo Tiago" <[EMAIL PROTECTED]> wrote:
> is there a package in python that allows to mount/umount and format
> (to ext3) a filesystem? I know that this is possible by just calling
> the os commands 'mount/umount and mkfs' but this would imply to have
> to change sudoers to run the script as no
On Sep 11, 11:55 am, srinivasan srinivas <[EMAIL PROTECTED]>
wrote:
> Hi,
> I am trying to download data from a webpage. I use mechanize python module.
> Could someone tell me how to set/pass an agent like Mozilla or IE that we do
> in perl's WWW::Mechanize??
>
> Thanks,
> Srini
>
> Be the f
ruqiang826 wrote:
hi
I have written a service running backgroud to do something in linux.
unfortunately,I deleted the source code by mistake, and I can still
see the process running background using "ps aux" :
username 13820 0.0 0.0 60368 2964 ?SAug20 0:33
python ./UpdateJobSta
Hi Matt,
> Have a look at this:http://www.python.org/dev/peps/pep-0372/
>
Thanks, that was very useful. Good to know these things are being
considered.
> Looking at the config parser module, it looks like there are only a
> couple of places where {} is used. I would create a mixin class to
> re
[ You can use the capi-sig for questions like this; see
http://mail.python.org/mailman/listinfo/capi-sig ]
Chris <[EMAIL PROTECTED]> writes:
> I'd like to be able to access an attribute of a particular Python
> object as fast as possible from some C code.
>
> I wondered if using __slots__ to sto
On 10 Sep., 09:57, Anders Eriksson <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I have a C++ library compiled as Windows DLL's. It consists of 32 .h and 1
> .lib and 1 .dll files. I don't have the source code.
>
> How can I create a Python module from these files?
Do you need the full library including
On 11 Sep., 09:09, Kelie <[EMAIL PROTECTED]> wrote:
> Hello group,
>
> Is there any packages in Python that will help me solve functions
> similar to this:
>
> x = a*(1+bx)**2.5-c where a, b, c is known and the task to solve x?
>
> Thank you,
>
> Kelie
look at www.sagemath.com . it is great.
gree
On 11 Sep., 11:55, srinivasan srinivas <[EMAIL PROTECTED]>
wrote:
> Hi,
> I am trying to download data from a webpage. I use mechanize python module.
> Could someone tell me how to set/pass an agent like Mozilla or IE that we do
> in perl's WWW::Mechanize??
>
> Thanks,
> Srini
>
http://wwwsearch.
>
> doesn't exactly work for Python scripts, though:
>
True, but you can use it in the following (admittedly messy) way:
jl> cat setenv.sh
/usr/bin/env python $@
. ./settmp
rm settmp
jl> cat env.py
#!/usr/bin/python
command = "export TEST='hello'\n"
open('settmp', 'w').write(command)
jl> . sete
1 - 100 of 132 matches
Mail list logo