Re: Keep one GUI always on TOP while python code is running

2014-08-07 Thread Chris Angelico
On Fri, Aug 8, 2014 at 3:57 PM, Jaydeep Patil wrote: > I mean to say, One GUI should be always on top from start to end of code > running. > So that user cant do any other operation. > I am using wxpython Ah, that would be called "System Modal", and should be reserved for absolutely critical sys

Re: Keep one GUI always on TOP while python code is running

2014-08-07 Thread Jaydeep Patil
Chris, I mean to say, One GUI should be always on top from start to end of code running. So that user cant do any other operation. I am using wxpython Regards Jay -- https://mail.python.org/mailman/listinfo/python-list

Re: AttributeError: 'module' object has no attribute 'fork'

2014-08-07 Thread Steven D'Aprano
Rustom Mody wrote: > On Thursday, August 7, 2014 10:26:56 PM UTC+5:30, Steven D'Aprano wrote: >> Roy Smith wrote: > >> > Peter Otten wrote: >> >> os.fork() >> >> Fork a child process. >> >> ... >> >> Availability: Unix. >> >> """ >> >> You are using the wrong operating system ;) >> > To be hone

Re: AttributeError: 'module' object has no attribute 'fork'

2014-08-07 Thread Rustom Mody
On Friday, August 8, 2014 10:49:27 AM UTC+5:30, Rustom Mody wrote: > On Thursday, August 7, 2014 10:26:56 PM UTC+5:30, Steven D'Aprano wrote: > > Roy Smith wrote: > > > Peter Otten wrote: > > >> os.fork() > > >> Fork a child process. > > >> ... > > >> Availability: Unix. > > >> """ > > >> You ar

Re: AttributeError: 'module' object has no attribute 'fork'

2014-08-07 Thread Rustom Mody
On Thursday, August 7, 2014 10:26:56 PM UTC+5:30, Steven D'Aprano wrote: > Roy Smith wrote: > > Peter Otten wrote: > >> os.fork() > >> Fork a child process. > >> ... > >> Availability: Unix. > >> """ > >> You are using the wrong operating system ;) > > To be honest, this could be considered a bu

Re: How to get mac address of bluetooth with python in win7?

2014-08-07 Thread Ben Finney
elearn writes: > How to get mac address of bluetooth with python in win7? This may not be a Python-specific question. How would you get the MAC adress of a Bluetooth device in Windows, in any programming language? My advice is for you to do a web search https://duckduckgo.com/?q=python+blueto

How to get mac address of bluetooth with python in win7?

2014-08-07 Thread elearn
How to get mac address of bluetooth with python in win7? -- https://mail.python.org/mailman/listinfo/python-list

Re: more simple to split the string?

2014-08-07 Thread Christopher Welborn
On 08/07/2014 07:23 PM, elearn wrote: str='(\\HasNoChildren \\Junk) "/" "[Gmail]/&V4NXPpCuTvY-"' x=str.split(' "') [i.replace('"','') for i in x] ['(\\HasNoChildren \\Junk)', '/', '[Gmail]/&V4NXPpCuTvY-'] x.strip(" ") will create four parts. is there more simple to do that ? There are many di

Re: Test for an empty directory that could be very large if it is not empty?

2014-08-07 Thread Roy Smith
In article , Tim Chase wrote: > On 2014-08-07 08:19, Roy Smith wrote: > > > My glob.iglob() uses os.listdir() behind the scenes (see glob1() > > > in glob.py) > > > > > > -tkc > > > > In which case, the documentation for iglob() is broken. It says: > > > > "Return an iterator which yields

more simple to split the string?

2014-08-07 Thread elearn
str='(\\HasNoChildren \\Junk) "/" "[Gmail]/&V4NXPpCuTvY-"' x=str.split(' "') [i.replace('"','') for i in x] ['(\\HasNoChildren \\Junk)', '/', '[Gmail]/&V4NXPpCuTvY-'] x.strip(" ") will create four parts. is there more simple to do that ? -- https://mail.python.org/mailman/listinfo/python-list

Re: Test for an empty directory that could be very large if it is not empty?

2014-08-07 Thread John Gordon
In Virgil Stokes writes: > Suppose I have a directory C:/Test that is either empty or contains more > than 200 files, all with the same extension (e.g. *.txt). How can I > determine if the directory is empty WITHOUT the generation of a list of > the file names in it (e.g. using os.listdi

Re: Test for an empty directory that could be very large if it is not empty?

2014-08-07 Thread Tim Chase
On 2014-08-07 08:19, Roy Smith wrote: > > My glob.iglob() uses os.listdir() behind the scenes (see glob1() > > in glob.py) > > > > -tkc > > In which case, the documentation for iglob() is broken. It says: > > "Return an iterator which yields the same values as glob() without > actually stori

Re: AttributeError: 'module' object has no attribute 'fork'

2014-08-07 Thread Steven D'Aprano
Roy Smith wrote: > In article , > Peter Otten <__pete...@web.de> wrote: > >> os.fork() >> Fork a child process. >> ... >> Availability: Unix. >> """ >> >> You are using the wrong operating system ;) > > To be honest, this could be considered a buglet in the os module. It > really should raise

cinspect

2014-08-07 Thread Mark Lawrence
I'd never heard of this. I thought it might be of interest to those of you who like to know what goes on under the bonnet in cPython. Find it here https://github.com/punchagan/cinspect -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. M

Re: Wikibooks example doesn't work

2014-08-07 Thread Seymore4Head
On Wed, 06 Aug 2014 21:59:12 -0700, Larry Hudson wrote: >On 08/06/2014 08:48 PM, Seymore4Head wrote: >> On Thu, 07 Aug 2014 13:43:40 +1000, Steven D'Aprano >> wrote: >> >>> Seymore4Head wrote: >>> On Wed, 06 Aug 2014 22:58:51 -0400, Seymore4Head wrote: > >[snip] >>> Ah, now thing

Infinite Mandelbrot Set Tutorial - Video

2014-08-07 Thread EYN2K
Created a cool Infinite (16 trillion zoom) Mandelbrot set in Python. Only two for loops, one while loop and one if-elif-else for control flow. I hope you enjoy Free video link : https://www.youtube.com/watch?v=WqfbDAzA1Sw Thank you -- https://mail.python.org/mailman/listinfo/python-list

33 Video free Course - Python

2014-08-07 Thread Everything You Need To Know
We have put together a neat playlist to learn python, with some really neat tricks and exercises. Playlist Link : https://www.youtube.com/channel/UCad91ea17ynqc0cTokBG3bg/playlists exercises include : Graphics Calculator with check for zeros Zoom Function for Graphics Window Mandelbrot set Game

Re: Keep one GUI always on TOP while python code is running

2014-08-07 Thread Chris Angelico
On Thu, Aug 7, 2014 at 9:24 PM, Jaydeep Patil wrote: > I have one query. I have did some programming which copies and paste data > using system clipboard. I need to keep one GUI always on top till my python > code is running. > "till" or "while"? If you mean "while", then yes. But it depends o

Re: Test for an empty directory that could be very large if it is not empty?

2014-08-07 Thread Roy Smith
In article , Tim Chase wrote: > On 2014-08-07 07:54, Roy Smith wrote: > > I wonder if glob.iglob('*') might help here? > > My glob.iglob() uses os.listdir() behind the scenes (see glob1() in > glob.py) > > -tkc In which case, the documentation for iglob() is broken. It says: "Return an iter

Re: Test for an empty directory that could be very large if it is not empty?

2014-08-07 Thread Akira Li
Virgil Stokes writes: > Suppose I have a directory C:/Test that is either empty or contains > more than 200 files, all with the same extension (e.g. *.txt). How > can I determine if the directory is empty WITHOUT the generation of a > list of the file names in it (e.g. using os.listdir('C:/Te

Re: Test for an empty directory that could be very large if it is not empty?

2014-08-07 Thread Tim Chase
On 2014-08-07 07:54, Roy Smith wrote: > I wonder if glob.iglob('*') might help here? My glob.iglob() uses os.listdir() behind the scenes (see glob1() in glob.py) -tkc -- https://mail.python.org/mailman/listinfo/python-list

Re: Test for an empty directory that could be very large if it is not empty?

2014-08-07 Thread Peter Otten
Roy Smith wrote: > In article , > Gregory Ewing wrote: > >> Virgil Stokes wrote: >> > How can I >> > determine if the directory is empty WITHOUT the generation of a list of >> > the file names >> >> Which platform? >> >> On Windows, I have no idea. >> >> On Unix you can't really do this prop

Re: Test for an empty directory that could be very large if it is not empty?

2014-08-07 Thread Roy Smith
In article , Gregory Ewing wrote: > Virgil Stokes wrote: > > How can I > > determine if the directory is empty WITHOUT the generation of a list of > > the file names > > Which platform? > > On Windows, I have no idea. > > On Unix you can't really do this properly without access > to opendir

Re: AttributeError: 'module' object has no attribute 'fork'

2014-08-07 Thread Roy Smith
In article , Peter Otten <__pete...@web.de> wrote: > os.fork() > Fork a child process. > ... > Availability: Unix. > """ > > You are using the wrong operating system ;) To be honest, this could be considered a buglet in the os module. It really should raise: NotImplementedError("fork() is on

Keep one GUI always on TOP while python code is running

2014-08-07 Thread Jaydeep Patil
Hi all, I have one query. I have did some programming which copies and paste data using system clipboard. I need to keep one GUI always on top till my python code is running. Can we do like this? Regards Jaydeep -- https://mail.python.org/mailman/listinfo/python-list

Re: Test for an empty directory that could be very large if it is not empty?

2014-08-07 Thread Tim Chase
On 2014-08-07 11:27, Ben Finney wrote: > > The difference in timings when serving a web-request are > > noticeable (in my use-case, I had to change my algorithm and > > storage structure to simplify/avoid heavily-populated > > directories) > > So, if the requirement is “test whether the director

Re: Test for an empty directory that could be very large if it is not empty?

2014-08-07 Thread Ethan Furman
On 08/06/2014 03:26 PM, Ben Finney wrote: Virgil Stokes writes: Suppose I have a directory C:/Test that is either empty or contains more than 200 files, all with the same extension (e.g. *.txt). How can I determine if the directory is empty WITHOUT the generation of a list of the file name

Re: Test for an empty directory that could be very large if it is not empty?

2014-08-07 Thread Cameron Simpson
On 07Aug2014 18:14, Greg Ewing wrote: Virgil Stokes wrote: How can I determine if the directory is empty WITHOUT the generation of a list of the file names Which platform? On Windows, I have no idea. On Unix you can't really do this properly without access to opendir() and readdir(), which

Re: AttributeError: 'module' object has no attribute 'fork'

2014-08-07 Thread Peter Otten
Satish ML wrote: > Hi, > > Code: > import os, time > def child(pipeout): > zzz = 0 > while True: > time.sleep(zzz) > msg = ('Spam %03d' % zzz).encode() > os.write(pipeout, msg) > zzz = (zzz+1) % 5 > def parent(): > pipein, pipeout = os.pipe() > if o