On Tue, Mar 30, 2021 at 12:12:19PM +0100, Alan Gauld via Python-list wrote:
> I've just published, in Kindle and paperback formats,
> my book on "Programming curses with Python".
>
> https://www.amazon.co.uk/dp/B091B85B77/
>
> (It should be available in most other Amazon stores too)
This looks h
OS: windows 7
Python: 3.8
I am trying to track which files have been modified in a directory on a
network mount. When I call the os.stat function for a given file in
that directory the stat_result.st_ino changes every time I call it:
```
>>> os.stat('U:\data\current\myfile')
os.stat_result(st_mod
When I enter the word python in the search box on my Chrome Windows 10, this is
what comes up. Can you tell me what each of these "types" of Python mean? Thank
you.
[cid:aa3fd74d-d71d-42c0-b063-4f20c463987b]
From: Python-list on
behalf of python-list-requ...@p
27;ll check out the FOR Loop in python and see how it is
different from the WHILE Loop.
____
From: nelson jon kane
Sent: Sunday, January 28, 2018 6:05:04 PM
To: python-list@python.org
Subject: Re: Welcome to the "Python-list" mailing list (Digest mode)
W
I was thinking a bit about the following pattern:
value = get_some_value()
while value in undesired_values:
value = get_some_value()
I've always hated code that looks like this. Partly due to the repetition, but
partly also due to the fact that without being able to immediately recognise
th
I also believe in this more 'BSD-like' view, but from a business point of view.
No one is going to invest in a business that can't guarantee against piracy,
and such a business is much less likely to receive profit (see Ardour).
Don't get me wrong - I love free software. It's seriously awesome t
>
> An interesting concept. AI monitoring systems have never really
>
> appealed to me; I personally prefer something with simpler and clearer
>
> rules (eg "if server load exceeds 3.0, raise an alert"), coupled with
>
> information retrieval commands that read like commands, not natural
>
>
Hello all,
For the first time in well... a very long time I am coming to a loss on where
to really get started here on the project I wish to undertake to help me really
get into Python programming.
A quick explanation of how I learn. I learn best with example working small
code bits. With the
On Tue, Oct 02, 2012 at 07:23:05AM -0700, Demian Brecht wrote:
> I don't use them anymore, but I'm curious about others opinions on this
> list...
I like them. In particular, I like that I can enumerate all the
subclasses that happen to implement the ABC via the metaclass's
__subclas
On Thu, Sep 13, 2012 at 09:00:19AM -0700, andrea crotti wrote:
> I have to give a couple of Python presentations in the next weeks, and
> I'm still thinking what is the best approach.
>
> In one presentation for example I will present decorators and context
> managers, and my biggest doubt is how
> What are your favorites?
I think I've posted this before, but I love my
3-lines-if-you-ignore-the-scaffolding language translator. Not because it's
clever code -- quite the opposite, the code is dead simple -- but because it
encompasses one of the things I love about Python the most: it gets
> 1. Are you sure you want to use python because threading is not
good due
> to the Global Lock (GIL)? Is this really an issue for multi-threaded
> web services as seems to be indicated by the articles from a Google
> search? If not, how do you avoid this issue in a multi-threaded process
> to t
I'm currently using QNX 6.4.1 with Python 2.5. I went to install
numpy 1.4.1, but the install kicks bakc an error saying that it cannot
find Python.h and that I should install python-dev|python-devel. I
look online and I can only find those two packages in relation to
Ubuntu, which obviously will
Hi all,
I have this function, defined in a string and ecetuted through ad
exec call
def cell1(d):
x=d.get('x')
print x
import y
return y.add(y.add(self.adf0(x),self.adf0(x)),self.adf0(x))
d is a dict of this kind {'x':2}
I receive the following exception, that i find very st
On 03-Sep-10 1:48 PM, Frederic Rentsch wrote:
And do let us know if you get an answer from Yahoo. Hacks like this
are unreliable. They fail almost certainly the next time a page gets
redesigned, which can be any time.
Indeed -- see my other post (regarding ystockquote.py). There's a CSV
On 03-Sep-10 7:29 AM, Virgil Stokes wrote:
A more direct question on accessing stock information from Yahoo.
First, use your browser to go to:
http://finance.yahoo.com/q/cp?s=%5EGSPC+Components
Now, you see the first 50 rows of a 500 row table of information on S&P
500 index. You can LM click
On 9 May 2010, at 16:29, Xavier Ho wrote:
On Sun, May 9, 2010 at 6:20 PM, gopi krishna
mailto:dasarathulag...@gmail.com>> wrote:
Why list comprehension faster than for loop?
Because Python optimises for certain special cases, when the number of
iterations is predicable in a list comprehension.
> I'm interested in improving my python design by studying a large,
> well-designed codebase.
I'll tell you one of the best ways to improve your Python code: attend
one of Raymond Hettinger's Code Clinic workshops at a Python conference
and put some up of your work up on the projector for 20+ deve
ome/stephen/scratch/test-data.txt'):
lines +=1
line = line.strip()
match = regex.match(line)
if match:
data = match.groupdict()
if data['SiteIntelligenceCookie'] == '':
no_cookies +=1
else:
print "Couldn't match ", line
unmatched +=1
print "I analysed %s lines." % (lines,)
print "There were %s lines with missing Site Intelligence cookies." %
(no_cookies,)
print "I was unable to process %s lines." % (unmatched,)
How can I make the regex a bit more resilient so it doesn't break when
" " is embedded?
--
Stephen Nelson-Smith
Technical Director
Atalanta Systems Ltd
www.atalanta-systems.com
--
http://mail.python.org/mailman/listinfo/python-list
On Feb 26, 2:05 pm, Stephen Nelson-Smith wrote:
> Hello,
I'm sorry - I hadn't realised that python-list ended up here as well.
Sincere apologies for double-posting.
S.
--
http://mail.python.org/mailman/listinfo/python-list
Hello,
System:
# rpm -q python m2crypto
python-2.4.3-27.el5
m2crypto-0.16-6.el5.6
# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.4 (Tikanga)
I have the following method:
def ftp_tarball(aggregation_dir, date_format, ftp_server, ftp_user,
ftp_pass):
date = datetime.today(
System:
# rpm -q python m2crypto
python-2.4.3-27.el5
m2crypto-0.16-6.el5.6
# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.4 (Tikanga)
I have the following method:
def ftp_tarball(aggregation_dir, date_format, ftp_server, ftp_user,
ftp_pass):
date = datetime.today().strftim
I downloaded the 3.1.1 dmg from http://www.python.org/download/releases/3.1.1/
but when I run it I get the error "The folowing install step failed:
run postflight script for python documentation." The bugs list has
this bug at http://bugs.python.org/issue6934 but it's described as
fixed. Is it on
le solution?
I will surely use wxpython for the UI on the client and on the server.
Thank for any advice,
nelson
--
Consulenze Linux e Windows
http://nelsonenterprise.net
--
http://mail.python.org/mailman/listinfo/python-list
Thanks for the responses. I've tried the same script on a Server 2003
install, and Python 2.5 and it ran without a hitch. So, it's either a
problem with Python 2.6 or with Windows 7.
Thanks for all the responses. You've been great.
Best,
Jonathan
On Jun 5, 7:39 am, Jonatha
I'm working with Feedparser on months old install of Windows 7, and
now programs that ran before are broken, and I'm getting wierd
messages that are rather opaque to me. Google, Bing, News groups
have all left me empty handed.
I was wondering if I could humbly impose upon the wizards of
comp.lan
I'm trying to add a feedreader element to my django project. I'm
using Mark Pilgrim's great feedparser library. I've used it before
without any problems. I'm getting a TypeError I can't figure out.
I've tried searching google, bing, google groups to no avail.
Here's the dpaste of what I'm tryin
Can someone explain to me what's going on here?
>>> __import__('some.package.module', {}, {}, [])
>>> __import__('some.package.module', {}, {}, [''])
(Note that '' is two single quotes)
Thanks,
Scott
--
http://mail.python.org/mailman/listinfo/python-list
I'm not sure what to say about that. The company I work for is
committed to Python (our product is mostly Python source), and my
current job is to make our software work on Itanium, which means
providing an Itanium build of Python. As long as I have this job I
suspect that I will be maintaining i
On Thu, Sep 04, 2008 at 11:39:42AM -0700, Fett wrote:
> I need a crypto package that works on windows with python 2.5. Can
> anyone suggest one for me?
You could always rely on the the APIs Windows provides to do this
sort out stuff, either via pywin32 or ctypes.
Trent.
--
h
Just a friendly reminder that this weekend is the Python sprint weekend! Look
forward to seeing everyone on #python-dev irc.freenode.net over the course of
the weekend!
Trent.
On 16 Apr, 18:52, Trent Nelson wrote:
>
>Following on from the success of previous sprint/bugfix we
> Are there any completely free developent tools for python
> scripts like IDLE. I have used IDLE , but I want to try out
> others also. I saw stuff like PyCrust, but I don't see that
> it can run the script as well.
> Thanks,
Ignoring the 'free' part of your question, I've recently moved from Py
> > I have the need to occasionally translate a single word
> > programatically. Would anyone have a Python script that
> > would let me do this using Google (or another) translation
> > service?
As a matter of fact, yes, I do! This happens to be my most favourite piece of
Python code I've ever
Following on from the success of previous sprint/bugfix weekends and
sprinting efforts at PyCon 2008, I'd like to propose the next two
Global Python Sprint Weekends take place on the following dates:
* May 10th-11th (four days after 2.6a3 and 3.0a5 are released)
* June
> Another xkcd plug for Python: http://xkcd.com/409/
Damn it. There goes another 40 minutes of my life magically whisked away by
that more-addictive-than-crack 'RANDOM' button.
--
http://mail.python.org/mailman/listinfo/python-list
> But people will always prefer complaining on the grounds of
> insufficient information to keeping quiet on the basis of knowledge.
+1 QOTW!
--
http://mail.python.org/mailman/listinfo/python-list
In article <[EMAIL PROTECTED]>,
BartlebyScrivener <[EMAIL PROTECTED]> wrote:
> Is the main Python tutorial posted on single searchable page
> somewhere? As opposed to browsing the index and clicking NEXT etc.
For completeness (though a bit late), I'll mention that Google can
search a group of
> i have a function that I could like to call, but to make it more
> dynamic I am constructing a string first that could equivalent to the
> name of the function I wish to call. how could I do that? the string
> could might include name of the module.
>
> for example
>
> a_string = 'datetime.' +
> def A():
> print 'warp in A'
> def why(self, *arg, **kw):
> print 'in A'
> print self
> print arg
> print kw
> #self(*arg, **kw)
>
> return why
>
> class T(object):
> @A()
> def test(g, out):
>
I was looking at adding dtrace-like dynamic tracing to Python. Note that
this isn't dtrace itself. The basic rationale:
1. A lot of enterprise-level software is written in Python. It is difficult
to impossible to reproduce the customer environment in a test lab.
Sometimes applications hang myst
> > > On Sep 5, 8:58 pm, planetmatt <[EMAIL PROTECTED]> wrote:
>
> > > > I am a Python beginner. I am trying to loop through a CSV file which
> > > > I can do. What I want to change though is for the loop to start at
> > > > row 2 in the file thus excluding column headers.
The DictReader object
Roger,
I tried modifying my code so that I have
def OnBeforeClick(self, Button, Shift, X, Y, Cancel):
print "click"
Cancel = True
return Cancel
But this doesn't seem to have changed anything. Am I doing this wrong?
OLIVER
Roger Upole wrote:
> O
nly a different model than the standard wx event system...
OLIVER
[EMAIL PROTECTED] wrote:
> On Aug 17, 11:54 pm, Oliver Nelson <[EMAIL PROTECTED]> wrote:
>> I have MapPoint working in Python, and I'm trying to cancel events on
>> the map, but I can't seem to make that happ
I have MapPoint working in Python, and I'm trying to cancel events on
the map, but I can't seem to make that happen. I'm responding to the
events successfully in my panel object. My code is like this:
global MapPointMod
MapPointMod =
win32com.client.gencache.EnsureModule("{51C0A9CA-F7B7-4F5A-
James,
I was getting an error everytime so I thought I had a setup problem...
Sorry everybody...
OLIVER
James Stroud wrote:
> Oliver, wait a while before you panic about your post not getting through!
>
> James
>
--
http://mail.python.org/mailman/listinfo/python-list
I have MapPoint working in Python, and I'm trying to cancel events on
the map, but I can't seem to make that happen. I'm responding to the
events successfully in my panel object. My code is like this:
global MapPointMod
MapPointMod =
win32com.client.gencache.EnsureModule("{51C0A9CA-F7B7-4F5A-
I have MapPoint working in Python, and I'm trying to cancel events on
the map, but I can't seem to make that happen. I'm responding to the
events successfully in my panel object. My code is like this:
global MapPointMod
MapPointMod =
win32com.client.gencache.EnsureModule("{51C0A9CA-F7B7-4F5A-
I have MapPoint working in Python, and I'm trying to cancel events on
the map, but I can't seem to make that happen. I'm responding to the
events successfully in my panel object. My code is like this:
global MapPointMod
MapPointMod =
win32com.client.gencache.EnsureModule("{51C0A9CA-F7B7-4F5A-
I have MapPoint working in Python, and I'm trying to cancel events on
the map, but I can't seem to make that happen. I'm responding to the
events successfully in my panel object. My code is like this:
global MapPointMod
MapPointMod =
win32com.client.gencache.EnsureModule("{51C0A9CA-F7B7-4F5A-
I have MapPoint working in Python, and I'm trying to cancel events on
the map, but I can't seem to make that happen. I'm responding to the
events successfully in my panel object. My code is like this:
global MapPointMod
MapPointMod =
win32com.client.gencache.EnsureModule("{51C0A9CA-F7B7-4F5A-
On Aug 15, 8:39 am, "Sebastian Bassi" <[EMAIL PROTECTED]>
wrote:
> That was easy :)
> What about extending it for N elements inside the dictionary? Sounds
> like a work for a recursive function.
Here's my attempt:
[code]
def backtrack(groups,position=0, answer=''):
if position==len(groups)
Does anyone know where I could find help on condor_compiling a python
interpreter? My own attempts have failed, and I can't find anything
on google.
Here's the condor page:
http://www.cs.wisc.edu/condor/
Thanks,
Tom
--
http://mail.python.org/mailman/listinfo/python-list
On Jun 2, 11:43 am, Tim Golden <[EMAIL PROTECTED]> wrote:
> Thomas Nelson wrote:
> > from subprocess import Popen
> > from time import sleep
> > import win32api
> > war3game = Popen(["C:\Program Files\Warcraft III\Frozen Throne.exe"])
>
Hi, I'd like to start a program, run it for a while, then terminate
it. I can do this on linux, but I'm new to working with windows.
Here's my script:
from subprocess import Popen
from time import sleep
import win32api
war3game = Popen(["C:\Program Files\Warcraft III\Frozen Throne.exe"])
sleep(30
On May 14, 11:05 am, [EMAIL PROTECTED] wrote:
> I have the following implementations of quicksort and insertion sort:
>
> def qSort(List):
> if List == []: return []
> return qSort([x for x in List[1:] if x< List[0]]) + List[0:1] + \
>qSort([x for x in List[1:] if x>=List[0]])
>
In article <[EMAIL PROTECTED]>,
Kaz Kylheku <[EMAIL PROTECTED]> wrote:
> On May 2, 5:19 pm, sturlamolden <[EMAIL PROTECTED]> wrote:
> > On May 3, 2:15 am, Kaz Kylheku <[EMAIL PROTECTED]> wrote:
> >
> > > Kindly refrain from creating any more off-topic, cross-posted threads.
> > > Thanks.
> >
> >
On May 4, 7:59 am, [EMAIL PROTECTED] wrote:
> On 4 ÍÁÊ, 09:08, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote:
>
> > En Fri, 04 May 2007 01:34:20 -0300, <[EMAIL PROTECTED]> escribio:
> > > I'm not against 'dir(MyClass)'; the question is, what should I 'dir()'
> > > to get methods of 'pyuno' type ins
I want to generate all the fractions between 1 and limit (with
limit>1) in an orderly fashion, without duplicates.
def all_ratios(limit):
s = set()
hi = 1.0
lo = 1.0
while True:
if hi/lo not in s:
s.add(hi/lo)
yield (hi,lo)
hi += 1
if
On Apr 27, 11:37 am, Tommy Grav <[EMAIL PROTECTED]> wrote:
> > him> I do not have a text editor, but here are the answers to
> > him> questions 1-5.
>
> > Now, frankly, I don't think this answer is correct, since I know OS
> > X is
> > a UNIX derivative, but I am loathe to involve a programming n
On Apr 23, 10:38 pm, Mel Wilson <[EMAIL PROTECTED]> wrote:
> Neil Cerutti wrote:
> > The interpreter explains it: "A list is not a hashable object."
> > Choosing a hash table instead of some kind of balanced tree seems
> > to be just an optimization. ;)
>
> Even with a balanced tree, if a key in a
Occasionally people post complaining about the lack of a
"repeat...until" structure in python. I thought about it and came up
with this recipe that I like. The only ugly thing is having to use
lambdas, otherwise it's very terse and readable. Tell me what you
think, and if anyone besides me think
Occasionally someone posts to this group complaining about the lack of
"repeat ... until" in python. I too have occasionally wished for such
a construct, and after some thinking, I came up with the class below.
I'm hoping to get some feedback here, and if people besides me think
they might use it
On Apr 3, 1:49 pm, [EMAIL PROTECTED] wrote:
> On Apr 3, 1:31 pm, "Matimus" <[EMAIL PROTECTED]> wrote:
>
> > It depends on your application, but a 'set' might really be what you
> > want, as opposed to a list.
>
> > >>> s = set(["0024","haha","0024"])
> > >>> s
>
> > set(["0024","haha"])>>> s.remove
bahoo wrote:
> Hi,
>
> I have a list like ['0024', 'haha', '0024']
> and as output I want ['haha']
>
> If I
> myList.remove('0024')
>
> then only the first instance of '0024' is removed.
>
> It seems like regular expressions is the rescue, but I couldn't find
> the right tool.
>
> Thanks!
> bahoo
In article <[EMAIL PROTECTED]>,
"bobmon" <[EMAIL PROTECTED]> wrote:
> Hello, and please be gentle...
>
> I'm trying to build Python 2.5 on my Fedora Core 6 installation. I
> think I've resolved most of my problems, but "make test" reports an
> error for test_socket.py, shown below.
>
> I suppo
In article <[EMAIL PROTECTED]>,
"Andy Watson" <[EMAIL PROTECTED]> wrote:
...
> If I could have a heap that is larger and does not need to be
> dynamically extended, then the Python GC could work more efficiently.
...
GC! If you're allocating lots of objects and holding on to them, GC
will ru
Check out the dir() function. It does what you want, I think.
Tom
On Feb 22, 9:27 am, [EMAIL PROTECTED] wrote:
> Hello,
> Sorry guys for this newbie questions. But I wonder if there is a
> standard or build-in method to know the methods of a class?
>
> I'm not originally a progrommer and I have
e floatcanvas in the right position... it is'n displaied... can
annyone give me an example of use of floatcanvas in an application
with more than one panel...
thanks a lot!
nelson
--
http://mail.python.org/mailman/listinfo/python-list
On Feb 12, 1:35 pm, andrew clarke <[EMAIL PROTECTED]> wrote:
> Thomas, I sent you a message off-list but it bounced due to your mailbox
> being full.
>
> Short answer: Subscribe to the c-prog@yahoogroups.com mailing list and
> ask your C/C++ questions there.
>
> Regards
> Andrew
I have to edit a
I realize I'm approaching this backwards from the direction most
people go, but does anyone know of a good c/c++ introduction for
python programmers?
Thanks,
Thomas
--
http://mail.python.org/mailman/listinfo/python-list
On Jan 30, 5:55 pm, [EMAIL PROTECTED] wrote:
> I can't seem to get this nailed down and I thought I'd toss it out
> there as, by gosh, its got to be something simple I'm missing.
>
> I have two different database tables of events that use different
> schemas. I am using python to collate these reco
On Jan 28, 3:13 pm, Wojciech Muła
<[EMAIL PROTECTED]> wrote:
>Define method __gt__.
This works, thanks. I was a little surprised though. is __cmp__ used
by any builtin functions?
Thanks,
THN
--
http://mail.python.org/mailman/listinfo/python-list
My code:
class Policy(list):
def __cmp__(self,other):
return cmp(self.fitness,other.fitness)
j = Policy()
j.fitness = 3
k = Policy()
k.fitness = 1
l = Policy()
l.fitness = 5
print max([j,k,l]).fitness
prints 3, when I was expecting it to print 5. What have I done wrong?
Thanks for
lee wrote:
> I getting familiarised with python...can any one suggest me a good
> editor available for python which runs on windows xpone more
> request guys...can nyone tell me a good reference manual for python..
I think vim is a very good editor for python, and it's certainly
available for
There's an optional count argument that will give what you want. Try
re.sub('a.*b','','ababc',count=1)
Carsten Haese wrote:
> On Thu, 2006-12-14 at 06:45 -0800, [EMAIL PROTECTED] wrote:
> > Can someone please explain why these expressions both produce the same
> > result? Surely this means that
picture of the desktop client. Is it a thing that i can do in
python? any advice? I googled but i can't find something too useful...
II know i can use vnc, but i want a pure python solution... if it's
possibile... Doing it using VNC it seems not so "clear"... :)
thanks,
nel
In article <[EMAIL PROTECTED]>,
Bjoern Schliessmann <[EMAIL PROTECTED]>
wrote:
> Michael Hobbs wrote:
>
> > That is, assume that the expression ends at the colon, not at the
> > newline. That would make this type of statement possible:
> > if color == red or
> > color == blue or
> >
How hard would it be to have numpy/ scipy part of the python standard
library?
Tom
mattf wrote:
> I've discovered Python and have been trying it out lately as a possible
> replacement for computations that would ordinarily be done with a
> commercial package like Matlab or IDL. I'd like to mentio
alf wrote:
> Hi,
>
> wonder if in the python I could treat modules imorts like classes
> instances. It means I could import it twice or more times under
> different names.
>
> --
> alfz1
You can always give any object as many names as you want:
>>> import sys
>>> s1 = sys
>>> s2 = sys
>>> s1.path
Hi paul,
i look at slut and it seem very good... Can i embed it into a
wxpython application?
thanks,
nelson
--
http://mail.python.org/mailman/listinfo/python-list
x27;t find nothing interesting... (the best would be a
pure python solution)
Thanks,
nelson
--
http://mail.python.org/mailman/listinfo/python-list
shaded
> shapes? And with or without hidden line removal?
>
i'm goind the same. I looked to vpython, but i can't make it go with
wxpython. So i make a slightly different question. There is a library
that fits well with wxpython that have features similar to vpython?
thanks,
ersections...
thanks,
nelson
--
http://mail.python.org/mailman/listinfo/python-list
/pyfuzzylib
good afternoon,
nelson
--
http://mail.python.org/mailman/listinfo/python-list
Yi Xing wrote:
> On a related question: how do I initialize a list or an array with a
> pre-specified number of elements, something like
> int p[100] in C? I can do append() for 100 times but this looks silly...
>
> Thanks.
>
> Yi Xing
Use [0]*100 for a list.
THN
--
http://mail.python.org/ma
Perhaps __init__.py has what you're looking for?
THN
[EMAIL PROTECTED] wrote:
> I just started working with Python and ran into an annoyance. Is there
> a way to avoid having to use the "from xxx import yyy" syntax from
> files in the same directory? I'm sure it's been asked a million times,
> b
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] (Alex Martelli) wrote:
> LaGuna <[EMAIL PROTECTED]> wrote:
>
> > Se si come?
> >
> > Ciao by Enzo
>
> Questo newsgroup preferisce l'inglese -- per favore, chiedi su
> it.comp.lang.python invece che qui.
>
> This newsgroup prefers English -- pl
In article <[EMAIL PROTECTED]>,
"Simon Forman" <[EMAIL PROTECTED]> wrote:
...
> Python also concatenates adjacent strings, but the "real" newlines
> between your strings will need to be escaped (otherwise, because the
> newlines are statement separators, you will have one print statement
> follow
I strongly recommend trying to come up with your own projects. Just
pick small things that reflect something you actually want to do: maybe
make a simple board game, or a few scripts to help you keep all your
files organized, etc. Generally speaking I think it's easier to teach
yourself a languag
How about
my_string = "We the people of the United States, in order to form a
more perfect union, establish justice, insure domestic
tranquility,.."
print (x for x in my_string.split(",") if "justice" in x).next()
This isn't a regular expression, but it gives what you're looking for.
THN
--
Actually, after a little looking, the simple stats.py module at
http://www.nmr.mgh.harvard.edu/Neural_Systems_Group/gary/python.html
is exactly what I needed. It may not be as fast or as comprehensive as
scipy or R, but installation simply involves downloading the module and
importing into the cod
As described in the docs I pointed to before:
subprocess.call("foo.sh",shell=True)
Is the way to do it without args. I think it is simplest to learn the
subprocess module because (quoting from the docs) this module intends
to replace several other, older modules and functions, such as:
os.system
o
If your script is foo.sh and takes args:
import subprocess
subprocess.call(["foo.sh","args"],shell=True)
Should work fine. check out
http://www.python.org/dev/doc/maint24/lib/module-subprocess.html
Enjoy,
THN
spec wrote:
> Hi all, I know nothing about Python. What I need to do is to get a
> Pyth
Sorry if this is a FAQ, but I couldn't find a good summary through
google. What kinds of statistical analysis tools exist in python? I
really just need t-tests, chi-squared test, and other such tests of
statistical significance. A few things point to numpy and scipy, but I
was surprised to find
Yes, I highly recommend the subprocess module. subprocess.call() can
do almost anything you want to do, and the options are all pretty
intuitive Whenever I need to write quick scripts for myself, it's what
I use.
THN
Roy Smith wrote:
> In article <[EMAIL PROTECTED]>,
> Donald Duck <[EMAIL PRO
Thanks to everyone who posted. First, I don't think my question was
clear enough: Rob Cowie, Ant, Simon Forman, [EMAIL PROTECTED], and Jon
Ribbens offered solutions that don't quite work as-is, because I need
multiple values to map to a single type. Tim Chase and Bruno
Destuilliers both offer ver
I have this code:
type1 = [0]
type2 = [0]
type3 = [0]
map = {0:type1, 1:type1, 2:type3, 3:type1, 4:type2} # the real map is
longer than this
def increment(value):
map[value][0] += 1
increment(1)
increment(1)
increment(0)
increment(4)
#increment will actually be called many times through
In article <[EMAIL PROTECTED]>,
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> if you want to interrupt the code to find out where it is,
> you can instead connect to it in gdb and get the python traceback of
> each thread.
> if you're interested I'll post the necesary gdb-macro for that (didn'
I've been trying to figure out why Ctl-C sometimes doesn't interrupt
yum. It appears to be unresolved Python bug 926423, unresolved proposed
patch 1102879, don't know if anything ever came of it. Note that I
cannot ask all yum users to apply the patch. I'm not sure I should be
getting rid of
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] wrote:
> Tony Nelson wrote:
> > I'm trying to find out what is eating some KeyboardInterrupt exceptions
> > in a fairly large program (yum). My KeyboardInterrupt handler is called
> > for some Ctl-C presses,
1 - 100 of 175 matches
Mail list logo