On Fri, Jun 10, 2011 at 12:58 PM, Mark Phillips
m...@phillipsmarketing.biz wrote:
How do I write my script so it picks up argument from the output of commands
that pipe input into my script?
def main():
import sys
print sys.stdin.read()
if __name__ == '__main__':
main()
$ echo
On Wed, Feb 16, 2011 at 12:35 PM, snorble snor...@hotmail.com wrote:
I use Python a lot, but not well. I usually start by writing a small
script, no classes or modules. Then I add more content to the loops,
and repeat. It's a bit of a trial and error learning phase, making
sure I'm using the
On Thu, Jan 6, 2011 at 3:32 PM, Alan Meyer amey...@yahoo.com wrote:
On 1/5/2011 11:40 AM, Tomasz Rola wrote:
On Tue, 4 Jan 2011, Roy Smith wrote:
There. Now that I've tossed some gasoline on the language wars fire,
I'll duck and run in the other direction :-)
May I suggest a better
On Thu, Mar 11, 2010 at 8:57 AM, gb345 gb...@invalid.com wrote:
I'm hoping to get advice from anyone with prior experience setting
up a Python group.
A friend of mine and I have been trying to start a
scientific-programming-oriented Python group in our school (of
medecine and bio
On Thu, Feb 18, 2010 at 10:46 PM, Steve Howell showel...@yahoo.com wrote:
On Feb 18, 2:49 pm, Jonathan Gardner jgard...@jonathangardner.net
wrote:
On Feb 18, 8:15 am, Steve Howell showel...@yahoo.com wrote:
def print_numbers()
[1, 2, 3, 4, 5, 6].map { |n|
[n *
On Wed, Feb 17, 2010 at 9:08 AM, mk mrk...@gmail.com wrote:
Bruno Desthuilliers wrote:
mk a écrit :
P.S. Method resolution order in Python makes me want to kill small
kittens.
mro is only a problem when using MI.
Oh sure! And I have the impression that multiple inheritance is not used
On Wed, Jan 20, 2010 at 9:32 AM, KB ke...@nekotaku.com wrote:
Hi there,
I have an application that only publishes a Java API. I can use jython
to access java classes, but jython currently (to the best of my
knowledge) does not support numpy/scipy.
Ideally I would like to have jython call a
On Sun, Aug 23, 2009 at 9:21 AM, Stefan Behnelstefan...@behnel.de wrote:
n...@cam.ac.uk wrote:
I am interested in surveying people who want to interoperate between
Fortran and Python to find out what they would like to be able to do
more conveniently, especially with regard to types not
On Wed, Jul 22, 2009 at 2:48 AM, Bearophilebearophileh...@lycos.com wrote:
greg:
Posting benchmark times for Pyrex or Cython is pretty
meaningless without showing the exact code that was
used, since times can vary enormously depending on
how much you C-ify things.
Was this link, shown by
On Fri, Jul 10, 2009 at 2:22 PM, walterbyrdwalterb...@iname.com wrote:
I believe Guido himself has said that all indentions should be four
spaces - no tabs.
Since backward compatibility is being thrown away anyway, why not
enforce the four space rule?
At least that way, when I get python
On Mon, Jun 22, 2009 at 9:49 PM, Andras
Piklerandras.pik...@students.olin.edu wrote:
Hi!
Short: I need to turn a Python program that I (mostly) wrote into C code,
and I am at a loss.
Long: I’m doing research/programming for a professor, and we are working
with MIDI files (a type of
On Tue, Jun 16, 2009 at 7:48 AM, Lucas P Melolukepada...@gmail.com wrote:
Is there any tool for browsing python code? (I'm having a hard time trying
to figure this out)
Anything like cscope with vim would be great.
Check out pycscope:
http://pypi.python.org/pypi/pycscope/0.3
I use it myself,
On Fri, Mar 13, 2009 at 10:59 AM, psaff...@googlemail.com
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
On Fri, Mar 13, 2009 at 11:33 AM, Kurt Smith kwmsm...@gmail.com 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
On Fri, Mar 13, 2009 at 1:13 PM, psaff...@googlemail.com
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':
On Tue, Mar 10, 2009 at 12:39 PM, s...@pobox.com wrote:
John The only complaint I have there is that mixing tabs and spaces for
John indentation should be detected and treated as a syntax error.
Guido's time machine strikes again (fixed in Python 3.x):
% python3.0 ~/tmp/mixed.py
On Sat, Feb 28, 2009 at 10:08 AM, steven.oldner steven.old...@gmail.com wrote:
Thanks guys. While shopping today I've thought of a few more columns
for my data so my first item will be building the 3 DB tables and a
way to populate them. Since this was intended to automate what I do
on a
On Fri, Feb 20, 2009 at 4:27 PM, Grant Edwards inva...@invalid wrote:
On one hand, the upshot of that is that by finding an
appropriate library module you might gain some of the same
benefits as removing the GIL.
On the other hand, that doesn't help if you're doing something
original enough
On Thu, Feb 19, 2009 at 12:55 PM, Ron Garret rnospa...@flownet.com wrote:
I'm trying to split a CamelCase string into its constituent components.
This kind of works:
re.split('[a-z][A-Z]', 'fooBarBaz')
['fo', 'a', 'az']
but it consumes the boundary characters. To fix this I tried using
On Wed, Feb 18, 2009 at 2:18 PM, eliben eli...@gmail.com wrote:
Hello,
What are some good recommended number theory libs for Python (or
accessible interfaces to C libs), for things like primes,
factorization, etc. Naturally, speed is of utmost importance here.
In other words, which Python
On Sat, Feb 14, 2009 at 2:06 PM, tripp trippl...@gmail.com wrote:
OK. It sounds like it would be easiest for me, then, to dump the
arrays to a binary file (much faster than dumping it to a text) from
the fortran program. Then use f2py to load a fortran module to read
it.?.
I've done
On Wed, Dec 17, 2008 at 1:52 PM, Rominsky john.romin...@gmail.com wrote:
On Dec 17, 10:59 am, Christian Heimes li...@cheimes.de wrote:
Rominsky schrieb:
I am trying to use dir to generate a list of methods, variables, etc.
I would like to be able to go through the list and seperate the
On Thu, Oct 30, 2008 at 9:37 AM, Łukasz Ligowski [EMAIL PROTECTED]wrote:
Hi,
There is small inconsistency (or I don't understand it right) between
python
2.5 docs and python 2.6 docs.
2.5 docs say that:
a.has_key(k) Equivalent to k in a, use that form in new code
Meaning: don't use
On Fri, Oct 17, 2008 at 11:48 AM, Joe Strout [EMAIL PROTECTED] wrote:
On Oct 17, 2008, at 10:35 AM, coldpizza wrote:
If you are using and IDE, such as Eclipse, PyScripter, etc, then CTR
+click on 'this' should do the trick.
In ipython you can do 'import this' and then type 'this??' Or if you
On Sun, Sep 7, 2008 at 5:41 PM, Mars creature [EMAIL PROTECTED] wrote:
Hi guys,
I am new to Python, and thinking about migrating to it from matlab
as it is a really cool language. Right now, I am trying to figure out
If you're trying to migrate from matlab to python I'd take a look at numpy:
On Fri, Jul 25, 2008 at 5:02 PM, aditya shukla
[EMAIL PROTECTED] wrote:
Hello folks,
I have a list say
data=[0.99,0.98,0.98,0.98,0.97,0.93,0.92,0.92,0.83,0.66,0.50,0.50]
i am trying to plot histogram of these values
i have installed numpy and matplotlib and this is what i am doing*
On Thu, May 22, 2008 at 10:55 AM, duli [EMAIL PROTECTED] wrote:
Hi:
I would like recommendations for books (in any language, not
necessarily C++, C, python) which have walkthroughs for developing
a big software project ? So starting from inception, problem
definition, design, coding and final
On Wed, Mar 26, 2008 at 12:15 AM, skunkwerk [EMAIL PROTECTED] wrote:
On Mar 25, 9:25 pm, Gabriel Genellina [EMAIL PROTECTED]
wrote:
En Wed, 26 Mar 2008 00:39:05 -0300, skunkwerk [EMAIL PROTECTED]
escribió:
i'm trying to call subprocess.popen on the 'rename' function in
Hi List:
Class inheritance noob here.
For context, I have the following base class and subclass:
class Base(object):
def __init__(self, val):
self.val = val
class Derived1(Base):
def __init__(self, val):
super(Derived1, self).__init__(val)
I'm curious as to other's
On 10/15/07, Gary Herron [EMAIL PROTECTED] wrote:
Dmitri O.Kondratiev wrote:
Gary, thanks for lots of info!
Python strings are not lists! I got it now. That's a pity, I need two
different functions: one to reverse a list and one to reverse a string:
True, they are not both lists, but they
On 10/4/07, Casey [EMAIL PROTECTED] wrote:
[snippage]
Following the reference to section 3.2 provides a (non-rigorous)
description of what a slice object is, in terms of the extended
slicing semantics. But it doesn't shed any additional light on the
meaning of [::-1].
From this, I would
On 9/17/07, Stefano Esposito [EMAIL PROTECTED] wrote:
Hi all
what i'm trying to do is this:
def foo ():
... return None
...
def bar ():
... print called bar
...
def assigner ():
... foo = bar
...
You need to tell assigner() that foo doesn't belong to the local
(function)
On 8/12/07, Ghirai [EMAIL PROTECTED] wrote:
Hello list,
I need to draw a graph, 2 axes, 2D, nothing fancy.
One of the axes is time, the other one is a series of integers.
I don't care much about the output format.
Are there any specialized libraries for this, or should i use PIL?
Thanks.
Sorry, forgot to Reply to all.
On 8/3/07, Stephen Webb [EMAIL PROTECTED] wrote:
Greetings all,
snippage
Also, I've been having trouble with the plot function in matplotlib. For
example, I enter the following in the terminal:
from pylab import *
plot([1,2,3])
[matplotlib.lines.Line2D
On 8/3/07, Stephen Webb [EMAIL PROTECTED] wrote:
Greetings all,
I've recently begun using Python to do scientific computation, and I wrote
the following script to find approximate eigenvalues for a semi-infinite
matrix:
from pylab import *
from numpy import *
from scipy import *
def
35 matches
Mail list logo