Re: Financial time series data

2010-09-03 Thread Nanjundi
On Sep 2, 1:12 pm, Virgil Stokes v...@it.uu.se wrote:   Has anyone written code or worked with Python software for downloading financial time series data (e.g. from Yahoo financial)? If yes,  would you please contact me. --Thanks, V. Stokes matplotlib has a finance module you can refer to.

Re: () vs []

2009-10-15 Thread Nanjundi
On Oct 14, 1:05 pm, mattia ger...@gmail.com wrote: Any particular difference in using for a simple collection of element () over [] or vice-versa? Thanks, Mattia From: http://www.faqs.org/docs/diveintopython/odbchelper_tuple.html 1 You can’t add elements to a tuple. Tuples have no

Re: Nested try...except

2008-04-02 Thread Nanjundi
On Apr 2, 9:22 am, [EMAIL PROTECTED] wrote: On 2 Apr, 15:15, [EMAIL PROTECTED] wrote: On 2 Apr, 15:12, [EMAIL PROTECTED] wrote: On Apr 2, 3:06 pm, [EMAIL PROTECTED] wrote: Hi, I found the following code on the net -

Re: sympy: what's wrong with this picture?

2008-03-05 Thread Nanjundi
On Mar 4, 3:13 pm, Mensanator [EMAIL PROTECTED] wrote: On Mar 4, 12:32 pm, Nanjundi [EMAIL PROTECTED] wrote: Does seeding ( random.seed ) random with time fix this? It should. I suppose that depends on how long it takes factorint() to process a number. If the seed is reset before the next

Re: sympy: what's wrong with this picture?

2008-03-05 Thread Nanjundi
On Mar 5, 3:34 pm, Mensanator [EMAIL PROTECTED] wrote: On Mar 5, 9:29 am, Nanjundi [EMAIL PROTECTED] wrote: On Mar 4, 3:13 pm, Mensanator [EMAIL PROTECTED] wrote: On Mar 4, 12:32 pm, Nanjundi [EMAIL PROTECTED] wrote: Does seeding ( random.seed ) random with time fix this? It should

Re: sympy: what's wrong with this picture?

2008-03-04 Thread Nanjundi
On Mar 3, 3:40 pm, Mensanator [EMAIL PROTECTED] wrote: Notice anything funny about the random choices? import sympy import time import random f = [i for i in sympy.primerange(1000,1)] for i in xrange(10): f1 = random.choice(f) print f1, f2 = random.choice(f) print f2, C

Re: unicode box drawing

2008-03-04 Thread Nanjundi
On Mar 4, 12:51 pm, jefm [EMAIL PROTECTED] wrote: How can I print the unicode box drawing characters in python: print u'\u2500' print u'\u2501' print u'\u2502' print u'\u2503' print u'\u2504' Traceback (most recent call last): File \test.py, line 3, in ? print u'\u2500' File

Re: _struct in Python 2.5.2

2008-03-03 Thread Nanjundi
On Feb 24, 10:39 am, Olaf Schwarz [EMAIL PROTECTED] wrote: Hi, I am trying to run this applicationhttp://svn.navi.cx/misc/trunk/python/bemused/ on uNSLUng Linux 6.10 using the optware python packages. As I obtained segmentation faults using Python 2.4, I have upgraded to 2.5.2. Now the

Re: split parameter line with quotes

2008-01-11 Thread Nanjundi
On Jan 11, 1:50 pm, teddyber [EMAIL PROTECTED] wrote: Hello, first i'm a newbie to python (but i searched the Internet i swear). i'm looking for some way to split up a string into a list of pairs 'key=value'. This code should be able to handle this particular example string :

Re: Newbie question on Classes

2008-01-11 Thread Nanjundi
On Jan 10, 5:32 pm, Steven Clark [EMAIL PROTECTED] wrote: l = [] l.append(man) l.append(woman) # Print the state. for item in l: print item.state() Small, off-topic nitpick: please don't use l (lower-case el) as a variable name. Fromhttp://www.python.org/dev/peps/pep-0008/:

Re: Newbie question on Classes

2008-01-10 Thread Nanjundi
On Jan 10, 4:46 pm, Adrian Wood [EMAIL PROTECTED] wrote: Hi al! I'm new to the list, and reasonably new to Python, so be gentle. Long story short, I'm having a hard time finding a way to call a function on every object of a class at once. Example: I have a class Person, which has a function

Re: Why does producer delay halt shell pipe?

2007-12-11 Thread Nanjundi
On Dec 11, 1:05 pm, dwhall [EMAIL PROTECTED] wrote: filters. Is there any way to write the filter to make this work? thanks, !!Dean turn off python buffering it should work. export PYTHONUNBUFFERED=t n'joy -N -- http://mail.python.org/mailman/listinfo/python-list

Re: getopt with negative numbers?

2007-09-27 Thread Nanjundi
On Sep 27, 1:34 pm, Peter Otten [EMAIL PROTECTED] wrote: ... args ['-123'] Without the -- arg you will get an error: parser.parse_args([-123]) Usage: [options] : error: no such option: -1 $ Peter Passing -a-123 works options, args = parser.parse_args([-a-123]) options.a -123

Re: Problem with getting an option value

2007-04-10 Thread Nanjundi
On Apr 10, 10:23 am, Lucas Malor [EMAIL PROTECTED] wrote: Peter Otten wrote: Lucas Malor wrote: The problem is options is an instance, so options.delete, for example, is wrong; I should pass options.delete . How can I do? Use getattr(): Thank you. Do you know also if I can do a

Re: call to function by text variable

2007-03-26 Thread Nanjundi
On Mar 25, 6:36 pm, ianaré [EMAIL PROTECTED] wrote: yeah the subject doesn't really make sense does it? anyway want I want to do is this: if n == 1: self.operations.insert(pos, operations.Replace.Panel(self, main)) elif n == 2: self.operations.insert(pos,

Re: New to Python

2007-03-12 Thread Nanjundi
On Mar 12, 4:49 am, Bert Heymans [EMAIL PROTECTED] wrote: On Mar 12, 3:02 am, Alberto Vieira Ferreira Monteiro [EMAIL PROTECTED] wrote: Hi, I am new to Python, how stupid can be the questions I ask? For example, how can I add (mathematically) two tuples? x = (1,2) y = (3,4) How can I

Re: Getting to an SSH account over a HTTP proxy

2007-01-28 Thread Nanjundi
problem. I do not want to create my own SSH client and, AFAICT, there is no SSH client in Twisted. The library also seem to have some problems with handling HTTP proxies in a transparent way:http://twistedmatrix.com/trac/ticket/1774 -- mvh Björn There is a ssh implementation in

Re: Are there sprintf in Python???

2007-01-22 Thread Nanjundi
Are there any sprintf in Python? Refer module StringIO - just like file input/output operations. cStringIO is another module (faster) Quick intro: from StringIO import StringIO s = StringIO() s.write('hello') s.seek(0) print s.read() -N --

Re: Getting to an SSH account over a HTTP proxy

2007-01-22 Thread Nanjundi
BJörn Lindqvist wrote: I want to use Python to connect to a SSH account over a HTTP proxy to automate some operations. I thought paramiko would be able to do that, but it can not (it seems). Is there some other Python module that can do what I want? -- mvh Björn Did you take a look at

Re: instancemethod

2007-01-21 Thread Nanjundi
if __name__ == '__main__': gert=Db('localhost','root','**','gert') gert.excecute('select * from person') for x in range(0,gert.rowcount): print gert.fetchone() gert.close() [EMAIL PROTECTED]:~$ python ./Desktop/svn/db/Py/db.py Traceback (most recent call

Re: for v in l:

2007-01-15 Thread Nanjundi
Try: l = [i+x for i in l] OR l = map(lambda i: i+x, l) -N Gert Cuykens wrote: is there a other way then this to loop trough a list and change the values i=-1 for v in l: i=i+1 l[i]=v+x something like for v in l:

Re: Can't find module named 'svn' in python

2007-01-15 Thread Nanjundi
My first thought: Check if you have /usr/local/lib/svn-python/ in your PYTHONPATH environment variable (echo $PYTHONPATH). If its missing, set it in the environment. export PYTHONPATH=$PYTHONPATH:/usr/local/lib/svn-python -N [EMAIL PROTECTED] wrote: Hi, i have a simple test which tries to

Re: how to determine Operating System in Use?

2006-12-13 Thread nanjundi
On Dec 13, 6:32 pm, Ian F. Hood [EMAIL PROTECTED] wrote: Hi In typically windows environments I have used: if 'Windows' in os.environ['OS']... to prove it, but now I need to properly support different environments. To do so I must accurately determine what system the python instance is