Pyaudio and sockets

2016-03-28 Thread Shiva Upreti
I am trying to send audio using sockets to a different PC, but audio is not clear on the other end and I cant understand why. Here is the code: import socket import pyaudio import wave import sys import pickle import time HOST="" PORT=1061 s=socket.socket(socket.AF_INET, socket.SOCK_STREAM) CHU

Re: wxpython strange behaviour

2016-01-15 Thread Shiva Upreti
On Saturday, January 16, 2016 at 4:39:12 AM UTC+5:30, Dietmar Schwertberger wrote: > On 15.01.2016 18:05, Shiva Upreti wrote: > > Please help me solve these issues. > Please decide first on which list or forum you want your questions to be > answered. Once people find out that you

Re: wxpython strange behaviour

2016-01-15 Thread Shiva Upreti
On Saturday, January 16, 2016 at 2:22:24 AM UTC+5:30, Mark Lawrence wrote: > On 15/01/2016 17:05, Shiva Upreti wrote: > > https://gist.github.com/anonymous/4baa67aafd04555eb4e6 > > > > I wrote the above code to display a toasterbox, and I didnt want it to > > displ

Re: wxpython strange behaviour

2016-01-15 Thread Shiva Upreti
On Friday, January 15, 2016 at 10:55:59 PM UTC+5:30, Ian wrote: > On Fri, Jan 15, 2016 at 10:05 AM, Shiva Upreti > wrote: > > https://gist.github.com/anonymous/4baa67aafd04555eb4e6 > > > > I wrote the above code to display a toasterbox, and I didnt want it to >

Re: wxpython strange behaviour

2016-01-15 Thread Shiva Upreti
On Friday, January 15, 2016 at 10:55:59 PM UTC+5:30, Ian wrote: > On Fri, Jan 15, 2016 at 10:05 AM, Shiva Upreti > wrote: > > https://gist.github.com/anonymous/4baa67aafd04555eb4e6 > > > > I wrote the above code to display a toasterbox, and I didnt want it to >

Re: wxpython strange behaviour

2016-01-15 Thread Shiva Upreti
On Friday, January 15, 2016 at 10:35:57 PM UTC+5:30, Shiva Upreti wrote: > https://gist.github.com/anonymous/4baa67aafd04555eb4e6 > > I wrote the above code to display a toasterbox, and I didnt want it to > display any frames on the screen, just a toasterbox. The problem with thi

wxpython strange behaviour

2016-01-15 Thread Shiva Upreti
https://gist.github.com/anonymous/4baa67aafd04555eb4e6 I wrote the above code to display a toasterbox, and I didnt want it to display any frames on the screen, just a toasterbox. The problem with this code is that it runs fine when I run it the first time, but when I run it next time it shows s

Create notifications in python

2016-01-13 Thread Shiva Upreti
I want to create notification box using python just like I get when battery is running low or something similar. I can do it using libnotify in linux, but I cant figure out how to do it in windows. I got some codes on internet for this like: https://gist.github.com/wontoncc/1808234, however it d

Re: ConnectionError handling problem

2015-09-29 Thread shiva upreti
On Friday, September 25, 2015 at 12:55:01 PM UTC+5:30, Cameron Simpson wrote: > On 24Sep2015 22:46, shiva upreti wrote: > >On Friday, September 25, 2015 at 10:55:45 AM UTC+5:30, Cameron Simpson wrote: > >> On 24Sep2015 20:57, shiva upreti wrote: > >> >Thank you Came

Re: ConnectionError handling problem

2015-09-24 Thread shiva upreti
On Friday, September 25, 2015 at 10:55:45 AM UTC+5:30, Cameron Simpson wrote: > On 24Sep2015 20:57, shiva upreti wrote: > >Thank you Cameron. > >I think the problem with my code is that it just hangs without raising any > >exceptions. And as mentioned by Laura above that wh

Re: ConnectionError handling problem

2015-09-24 Thread shiva upreti
On Thursday, September 24, 2015 at 4:09:04 PM UTC+5:30, Laura Creighton wrote: > In a message of Wed, 23 Sep 2015 19:49:17 -0700, shiva upreti writes: > >Hi > >If my script hangs because of the reasons you mentioned above, why doesnt it > >catch ConnectionError? > >My s

Re: ConnectionError handling problem

2015-09-24 Thread shiva upreti
On Thursday, September 24, 2015 at 4:09:04 PM UTC+5:30, Laura Creighton wrote: > In a message of Wed, 23 Sep 2015 19:49:17 -0700, shiva upreti writes: > >Hi > >If my script hangs because of the reasons you mentioned above, why doesnt it > >catch ConnectionError? > >My s

Re: ConnectionError handling problem

2015-09-24 Thread shiva upreti
Thank you Cameron. I think the problem with my code is that it just hangs without raising any exceptions. And as mentioned by Laura above that when I press CTRL+C, it just catches that exception and prints ConnectionError which is definitely a lie in this case as you mentioned. As my code doesnt

Re: ConnectionError handling problem

2015-09-24 Thread shiva upreti
Thank you. I didnt know about keyboard interrupt exception. It means my code hangs without raising any exceptions, what should i do in this case? -- https://mail.python.org/mailman/listinfo/python-list

Re: ConnectionError handling problem

2015-09-23 Thread shiva upreti
On Sunday, September 20, 2015 at 8:11:18 PM UTC+5:30, Laura Creighton wrote: > The discussion about why or why not to use a bare except has gotten us > away from the problem reported, which is "why is my script hanging?" > > In a message of Sat, 19 Sep 2015 17:18:12 +0100, Mark Lawrence writes: >

Re: for loop

2015-09-20 Thread shiva upreti
On Sunday, September 20, 2015 at 1:34:32 PM UTC+5:30, paul.ant...@gmail.com wrote: > On Sunday, September 20, 2015 at 9:56:06 AM UTC+2, shiva upreti wrote: > > https://ideone.com/BPflPk > > > > Please tell me why 'print s' statement is being executed inside loo

Re: for loop

2015-09-20 Thread shiva upreti
On Sunday, September 20, 2015 at 1:33:57 PM UTC+5:30, Chris Warrick wrote: > On 20 September 2015 at 09:55, shiva upreti wrote: > > https://ideone.com/BPflPk > > > > Please tell me why 'print s' statement is being executed inside loop, > > though I put it

for loop

2015-09-20 Thread shiva upreti
https://ideone.com/BPflPk Please tell me why 'print s' statement is being executed inside loop, though I put it outside. Please help. I am new to python. -- https://mail.python.org/mailman/listinfo/python-list

ConnectionError handling problem

2015-09-18 Thread shiva upreti
I am learning python. I wrote a script using requests module. The scripts runs fine for sometime, but after a while it hangs. When I press CTRL+C it shows ConnectionError even though I have included exception handling. I am not sure as to why it cant handle ConnectionError when the script runs for

need help with selenium

2015-09-14 Thread shiva upreti
I wrote this code in python for submitting a login form: from selenium import webdriver from selenium.webdriver.common.keys import Keys driver = webdriver.Firefox() driver.get('some url') elem = driver.find_element_by_name("username") elem.send_keys('13103666') elem = driver.find_elemen

Selenium

2015-09-14 Thread shiva upreti
I wrote this code in python for submitting a login form: from selenium import webdriver from selenium.webdriver.common.keys import Keys driver = webdriver.Firefox() driver.get('some url') elem = driver.find_element_by_name("username") elem.send_keys('13103666') elem = driver.find_element_by_nam

"no module named kivy" import error in ubuntu 14.04

2015-08-16 Thread shiva upreti
Hi I am new to linux. I tried various things in attempt to install kivy. I installed python 2.7.10 (I think python3 was already installed in ubuntu 14.04). Then i downloaded kivy from https://pypi.python.org/packages/source/K/Kivy/Kivy-1.9.0.tar.gz, extracted it and tried to execute "python set