linregress and polyfit

2013-09-17 Thread Krishnan
I created an xy pair y = slope*x + intercept then I added some noise to "y" using numpy.random.normal - call it z I could recover the slope, intercept from (x,y) using linregress BUT cannot calculate the slope, intercept from (x, z) What is puzzling is that for both pairs (x,y) and (x,z) the

your web page details

2011-03-29 Thread radha krishnan
http://123maza.com/65/agent409/ -- http://mail.python.org/mailman/listinfo/python-list

Forcing prompt to be on newline when embedding Python with stdin/out redirection

2017-01-05 Thread H Krishnan
27;, '__name__', '__package__']>>> Why doesn't the prompt appear in a new line as with the default stdout? Thanks, Krishnan -- https://mail.python.org/mailman/listinfo/python-list

Re: Forcing prompt to be on newline when embedding Python with stdin/out redirection

2017-01-05 Thread H Krishnan
2.x __builtin__). > I tried replacing sys.displayhook with a function that does not print newline but the newline still got inserted. So, I am not sure where the newline is coming from. In any case, I could override sys.displayhook to add a newline at the end and that seems to resolve my problem. > -- > https://mail.python.org/mailman/listinfo/python-list > Thanks, Krishnan -- https://mail.python.org/mailman/listinfo/python-list

Re: Forcing prompt to be on newline when embedding Python with stdin/out redirection

2017-01-06 Thread H Krishnan
Hello Mr.Eryk, Thanks for the detailed explanation. After I added attribute support to my extension class for stdio, the problem was resolved. Regards, Krishnan On Fri, Jan 6, 2017 at 9:24 AM, eryk sun wrote: > On Fri, Jan 6, 2017 at 1:06 AM, H Krishnan wrote: > > I tried

Re: Forcing prompt to be on newline when embedding Python with

2017-01-06 Thread H Krishnan
Hello Mr.Eryk, Thanks for the detailed explanation. After I added attribute support to my extension class for stdio, the problem was resolved. Regards, Krishnan On Fri, Jan 6, 2017 at 9:24 AM, eryk sun wrote: > On Fri, Jan 6, 2017 at 1:06 AM, H Krishnan wrote: > > I tried

Re: Forcing prompt to be on newline when embedding Python with

2017-01-06 Thread H Krishnan
__builtin__). > I tried replacing sys.displayhook with a function that does not print newline but the newline still got inserted. So, I am not sure where the newline is coming from. In any case, I could override sys.displayhook to add a newline at the end and that seems to resolve my problem. > -- > https://mail.python.org/mailman/listinfo/python-list > Thanks, Krishnan -- https://mail.python.org/mailman/listinfo/python-list

Re: Reading csv file

2013-12-16 Thread Krishnan Shankar
reader.next() line++ continue # process the CSV Rest of the things are pretty much straightforward. Regards, Krishnan On Tue, Dec 17, 2013 at 10:50 AM, Igor Korot wrote: > Hi, ALL, > Is there a better way to do that: > > def Re

Python Basic Doubt

2013-08-10 Thread Krishnan Shankar
variables a and b it is ok. But why c taking the same location? Regards, Krishnan -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Basic Doubt

2013-08-10 Thread Krishnan Shankar
#x27; Because i recommended this should not be done. But my colleagues say it is correct. Regards, Krishnan On Sat, Aug 10, 2013 at 10:10 PM, Tim Chase wrote: > On 2013-08-10 21:03, Krishnan Shankar wrote: > > >>> a=10 > > >>> id(a) > > 21665504 > > &g

Introduction to my fellow Python Friends

2013-08-11 Thread Krishnan Shankar
Hi Friends, I would like to introduce myself. I am Krishnan from Chennai, India. I am using python for 2 years for Test Automation. I am fascinated by the language and its capabilities. I am willing to move into Python development and I am doing the best i can to learn the language completely

Re: .split() Qeustion

2013-08-13 Thread Krishnan Shankar
'split', 'splitlines', 'startswith', 'strip', 'swapcase', 'title', 'translate', 'upper', 'zfill'] >>> var.split() ['Hello', 'how', 'r', 'u?'] >>> >

Re: Verifying Variable value

2013-08-14 Thread Krishnan Shankar
import pdb;pdb.set_trace() <<<-- import and set_trace() a = 20 b =30 c = a + b method() While running you will get pdb prompt to debug the code line by line. The execution will be in user's hands. Like below, > c:\users\krishnan\desktop\test.py(3)method() -

Re: Verifying Variable value

2013-08-14 Thread Krishnan Shankar
You can even use logging module in python to validate the variable values. You can import the module and use any of the following levels in your program import logging logging.CRITICAL, logging.ERROR, logging.WARNING, logging.INFO, logging.DEBUG For more you can refer to, http://docs.python.or

List getting extended when assigned to itself

2013-08-24 Thread Krishnan Shankar
nd var[:0] = var almost meens the same. But why is the difference in output? Can anyone explain what happens when slicing assignment and direct assignment. Regards, Krishnan -- http://mail.python.org/mailman/listinfo/python-list

Re: TypeError: 'int' object is not callable

2013-08-26 Thread Krishnan Shankar
returns non zero if defined. >>> import time >>> a = time.daylight() Traceback (most recent call last): File "", line 1, in TypeError: 'int' object is not callable >>> a = time.daylight >>> a 0 >>> type(time.daylight) Regards, Kr

Doubt on generators behavior

2013-10-13 Thread Krishnan Shankar
gt;>> res2 = test_gen(77) >>> res2.next() The number is 77 Number is odd Traceback (most recent call last): File "", line 1, in StopIteration >>> How did this happen automatically? I am not able to get the execution of a generator. Can someone please help me in understanding? Regards, Krishnan -- https://mail.python.org/mailman/listinfo/python-list

Accessing the Taskbar icons

2013-11-07 Thread Krishnan Shankar
e the icon yet. Can you guide me how to do the same using pywinauto or pywin32? Regards, Krishnan -- https://mail.python.org/mailman/listinfo/python-list

SWIG, C++, and Mac OS X

2006-07-05 Thread Siddartha Krishnan
Hi, I'm new to using python and SWIG. I am running Mac OS X 10.4. I have a C++ class which I want to access from python, however I am unable to compile it as a shared module in Mac OS X. I have tried using Distutils and have successfully created a C extension module, however I am unable to

urllib2 on Windows Vista

2006-07-08 Thread Sriram Krishnan
I'm running Python 2.4.3 on Windows Vista June CTP. I'm not able to open any site using the urllib2 and related family of modules Here's what I get >>> import urllib2 >>> urllib2.urlopen("http://www.microsoft.com";) Traceback (most recent call last): File "", line 1, in ? File "D:\python24\li

Re: urllib2 on Windows Vista

2006-07-09 Thread Sriram Krishnan
Rune Strand wrote: > My wil guess is that it is a firewall problem. Perhaps you'll have to > specify that python.exe is trusted. Tried that - it didn't work. I also tried turning off the User Account Control and ran as full administrator - that didn't work too. -- http://mail.python.org/mailman

Re: editor for Python on Linux

2006-02-19 Thread Sriram Krishnan
Mladen Adamovic wrote: > Hi! > > I wonder which editor or IDE you can recommend me for writing Python > programs. I tried with jEdit but it isn't perfect. > Check out http://wiki.python.org/moin/PythonEditors. I personally use Emacs -- Sriram -- http://mail.python.org/mailman/listinfo/python

Newbie Question:Please help

2008-09-08 Thread Karthik Krishnan
Hi, I am a newbie to python and I hope this is not a stupid question. I am trying to run a main method from a Python command line using the command shell using the command. python main_test.py I get the following error. File "", line 1 python main_test.py Syntax Error: invalid syntax My ma

Python 2.6 and sys.exit()

2009-11-12 Thread H Krishnan
>>> I couldn't find anything related to this in "What's new in 2.6". Is there any way I can get 2.6 to behave like 2.5? Thank you for your help, Regards, H. Krishnan -- http://mail.python.org/mailman/listinfo/python-list

In Python and Windows environment how to supress certain key press and send some other key event for it

2017-04-02 Thread Krishnan Shankar
name__ == "__main__": main() <<<<< This is working for sending the event for key press but the initial keypress is also being send. The supress=True is not working. Am I doing something wrong or is there any better way to supress the initial key event and send another key event in place of that. Regards, Krishnan -- https://mail.python.org/mailman/listinfo/python-list

Load averages and Python threads on different Linux cloud provider setup

2011-05-31 Thread Mohanaraj Gopala Krishnan
Hello, Apologies if this post is off topic. We have a Python application that polls directories using threads and inotify watchers. We have always run this application in a cloud server provided by Voxel (http://www.voxel.net). We are currently testing a different cloud server provider StormOnDem