Re: os.system()

2012-04-20 Thread Yigit Turgut
On Apr 19, 11:02 pm, "Steve" wrote: > > "Yigit Turgut"  wrote in message > >news:b9a8bb28-3003-4a36-86fb-339ef697b...@i2g2000vbd.googlegroups.com... > > When I use os.system() function, script waits for termination of the > > windows that is opened by

os.system()

2012-04-19 Thread Yigit Turgut
When I use os.system() function, script waits for termination of the windows that is opened by os.system() to continue thus throwing errors and etc. How can i tell Python to let it go and keep on with the next execution after os.system() ? -- http://mail.python.org/mailman/listinfo/python-list

Re: Splitting a file from specific column content

2012-01-22 Thread Yigit Turgut
On Jan 22, 9:37 pm, Roy Smith wrote: > On Jan 22, 2012, at 2:34 PM, Tim Chase wrote: > > > On 01/22/12 13:26, Roy Smith wrote: > >>> If you wanted to do it in one pass using standard unix > >>> tools, you can use: > > >>> sed -n -e'/^[0-2]/w first-three.txt' -e'/^[34]/w > >>> next-two.txt' -e'/^[5

Re: Splitting a file from specific column content

2012-01-22 Thread Yigit Turgut
On Jan 22, 6:56 pm, MRAB wrote: > On 22/01/2012 16:17, Yigit Turgut wrote: > [snip] > > > > > > > > > On Jan 22, 5:39 pm, Arnaud Delobelle  wrote: > [snip] > >>  Or more succintly (but not tested): > > >>  sections = [ > >>    

Re: Splitting a file from specific column content

2012-01-22 Thread Yigit Turgut
On Jan 22, 4:45 pm, Roy Smith wrote: > In article > , > Yigit Turgut wrote: > > Hi all, > > > I have a text file approximately 20mb in size and contains about one > > million lines. I was doing some processing on the data but then the > > data rate incr

Splitting a file from specific column content

2012-01-22 Thread Yigit Turgut
Hi all, I have a text file approximately 20mb in size and contains about one million lines. I was doing some processing on the data but then the data rate increased and it takes very long time to process. I import using numpy.loadtxt, here is a fragment of the data ; 0.06 -0.0004 0.00

Weird Loop Behaviour

2012-01-20 Thread Yigit Turgut
Hi, In the following code, I am trying to run "black" screen for 3 seconds and respectively 2 seconds "white" screen. Black routine takes 3 seconds and white 2 seconds, 2 x black + white = 8 seconds which should be the expected value but when I run it I get black-white-black- white instead of bl

Plot square wave

2012-01-18 Thread Yigit Turgut
Hi all, I am trying to generate a pseudo pwm signal, low-high transition will take place when screen goes from black to white and high-low transition when white to black. As a result I am trying to plot the signal. Here is my code; import time, pylab, numpy, scipy, pygame def _func1(): glob

Re: Parallel Processing

2012-01-08 Thread Yigit Turgut
On Jan 9, 12:02 am, Dave Angel wrote: > On 01/08/2012 11:39 AM, Yigit Turgut wrote: > > > > > > > > > > > screen = pygame.display.set_mode((0, 0), pygame.FULLSCREEN) > > timer = pygame.time.Clock() > > white = True > > start = time.ti

Re: Parallel Processing

2012-01-08 Thread Yigit Turgut
On Jan 8, 6:00 pm, Chris Angelico wrote: > On Mon, Jan 9, 2012 at 2:45 AM, Yigit Turgut wrote: > > job1 = job_server.submit(test1,()) > > job2 = job_server.submit(test2()) > > The first of these passes test1 and an empty tuple as arguments to > submit(). The second calls

Re: Parallel Processing

2012-01-08 Thread Yigit Turgut
On Jan 8, 4:34 pm, Dave Angel wrote: > On 01/08/2012 08:23 AM, Yigit Turgut wrote: > > > > > > > > > Hi all, > > > I am trying to run two functions at the same time with Parallel > > Processing (pp) as following ; > > > import pygame > &

Parallel Processing

2012-01-08 Thread Yigit Turgut
Hi all, I am trying to run two functions at the same time with Parallel Processing (pp) as following ; import pygame import sys import time import math import pp screen = pygame.display.set_mode((0, 0), pygame.FULLSCREEN) timer = pygame.time.Clock() white = True start = time.time() end = time.ti

Re: Calling a variable inside a function of another class

2012-01-07 Thread Yigit Turgut
On Jan 7, 6:01 pm, Steven D'Aprano wrote: > On Sat, 07 Jan 2012 07:00:57 -0800, Yigit Turgut wrote: > > I am trying to call a variable located in a function of a class from > > main but couldn't succeed.Any ideas? > > You cannot access local variables from out

Calling a variable inside a function of another class

2012-01-07 Thread Yigit Turgut
class test(test1): def __init__(self, device): . . . def _something(self, x=1) self.dt = data if __name__ == "__main__": test.something.dt ??? I am trying to call a variable located in a function of a class from main but couldn't succeed.Any ideas? -- http:/

Re: Multithreading

2011-12-26 Thread Yigit Turgut
On Dec 26, 10:01 pm, Ian Kelly wrote: > On Mon, Dec 26, 2011 at 11:31 AM, Yigit Turgut wrote: > > I have a loop as following ; > > > start = time.time() > > end = time.time() - start > >  while(end >          data1 = self.chan1.getWaveform() >

Re: Multithreading

2011-12-26 Thread Yigit Turgut
On Dec 26, 10:03 pm, Ian Kelly wrote: > On Mon, Dec 26, 2011 at 1:01 PM, Ian Kelly wrote: > > You essentially have two completely independent loops that need to run > > simultaneously with different timings.  Sounds like a good case for > > multiple threads (or processes if you prefer, but these

Re: Plot seems weird

2011-12-26 Thread Yigit Turgut
On Dec 26, 8:58 pm, Lie Ryan wrote: > On 12/27/2011 04:08 AM, Yigit Turgut wrote: > > > > > > > > > > > On Dec 26, 11:28 am, Lie Ryan  wrote: > >> On 12/26/2011 05:27 AM, Yigit Turgut wrote: > > >>> On Dec 25, 7:06 pm, Rick Johnso

Multithreading

2011-12-26 Thread Yigit Turgut
I have a loop as following ; start = time.time() end = time.time() - start while(endhttp://mail.python.org/mailman/listinfo/python-list

Re: Plot seems weird

2011-12-26 Thread Yigit Turgut
On Dec 26, 11:28 am, Lie Ryan wrote: > On 12/26/2011 05:27 AM, Yigit Turgut wrote: > > > > > > > > > > > On Dec 25, 7:06 pm, Rick Johnson  wrote: > >> On Dec 25, 9:33 am, Yigit Turgut  wrote: > >>> Hi all, > > >>> I have a

Re: Plot seems weird

2011-12-25 Thread Yigit Turgut
On Dec 25, 7:06 pm, Rick Johnson wrote: > On Dec 25, 9:33 am, Yigit Turgut wrote: > > Hi all, > > > I have a text file as following; > > > 0.200047        0.00 > > 0.200053        0.16 > > 0.200059        0.00 > > 0.200065        0.080

Plot seems weird

2011-12-25 Thread Yigit Turgut
Hi all, I have a text file as following; 0.2000470.00 0.2000530.16 0.2000590.00 0.2000650.08 0.2000720.00 0.2000780.16 And I am trying to plot it with ; filenames = sys.argv[1:] if len(filenames) == 0: filenames = [sys.

Re: Text Processing

2011-12-22 Thread Yigit Turgut
On Dec 21, 2:01 am, Alexander Kapps wrote: > On 20.12.2011 22:04, Nick Dokos wrote: > > > > > > > > > > >>> I have a text file containing such data ; > > >>>          A                B                C > >>> --- > >>> -2.0100e-01    8.000e-02  

Text Processing

2011-12-20 Thread Yigit Turgut
Hi all, I have a text file containing such data ; ABC --- -2.0100e-018.000e-028.000e-05 -2.e-010.000e+00 4.800e-04 -1.9900e-014.000e-021.600e-04 But I only need Section B, and I

Re: Screen Control Fullscreen ON/OFF

2011-12-15 Thread Yigit Turgut
On Dec 15, 4:19 pm, Ulrich Eckhardt wrote: > Am 15.12.2011 12:12, schrieb yeet: > > > My LCD has 2ms respond time thus it can handle a maximum of 50Hz ON/ > > OFF (white/black) thus seems to fit my 1-40Hz range. > > You might want to ask Santa for a new calculator, as in my book a > response time