473,397 Members | 1,961 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Python timing

Would anyone know how to write a program in python that takes a directory (source) and backs up that directory into another directory (target directory)? I've been trying to work on it, but I have had no luck...any help?
Dec 23 '06 #1
37 5739
bvdet
2,851 Expert Mod 2GB
Would anyone know how to write a program in python that takes a directory (source) and backs up that directory into another directory (target directory)? I've been trying to work on it, but I have had no luck...any help?
Python library modules 'os', 'os.path', and 'shutil' can be used to accomplish this task. This will get you on the way:
Expand|Select|Wrap|Line Numbers
  1. import os, shutil
  2.  
  3. def dir_list(dir_name):
  4.     fileList = []
  5.     for file in os.listdir(dir_name):
  6.         dirfile = os.path.join(dir_name, file)
  7.         if os.path.isfile(dirfile):
  8.             fileList.append(dirfile)
  9.     return fileList
  10.  
  11. if __name__ == '__main__':
  12.     dirNameS = (os.path.join('C:\\', 'SDS2_7.0', 'macro'))
  13.     dirNameT = (os.path.join('C:\\', 'target_directory'))
  14.     fileList = dir_list(dirNameS)
  15.     for f in fileList:
  16.         print f, os.path.getsize(f), os.path.getmtime(f)
  17.  
  18.         # Untested
  19.         # You could test whether the file to be copied has a different size or a later date
  20.         # copy the file f to file or directory 'dirNameT'
  21.         # shutil.copy(f, dirNameT) 
  22.  
Dec 23 '06 #2
Python library modules 'os', 'os.path', and 'shutil' can be used to accomplish this task. This will get you on the way:
Expand|Select|Wrap|Line Numbers
  1. import os, shutil
  2.  
  3. def dir_list(dir_name):
  4.     fileList = []
  5.     for file in os.listdir(dir_name):
  6.         dirfile = os.path.join(dir_name, file)
  7.         if os.path.isfile(dirfile):
  8.             fileList.append(dirfile)
  9.     return fileList
  10.  
  11. if __name__ == '__main__':
  12.     dirNameS = (os.path.join('C:\\', 'SDS2_7.0', 'macro'))
  13.     dirNameT = (os.path.join('C:\\', 'target_directory'))
  14.     fileList = dir_list(dirNameS)
  15.     for f in fileList:
  16.         print f, os.path.getsize(f), os.path.getmtime(f)
  17.  
  18.         # Untested
  19.         # You could test whether the file to be copied has a different size or a later date
  20.         # copy the file f to file or directory 'dirNameT'
  21.         # shutil.copy(f, dirNameT) 
  22.  

Thank you, but I'm new to python so where in this do i put the directory thats to be copied and where do i put the directory where its copied to?
Dec 23 '06 #3
bvdet
2,851 Expert Mod 2GB
Thank you, but I'm new to python so where in this do i put the directory thats to be copied and where do i put the directory where its copied to?
Instead of the line:
Expand|Select|Wrap|Line Numbers
  1. print f, os.path.getsize(f), os.path.getmtime(f)
use something like this:
Expand|Select|Wrap|Line Numbers
  1. shutil.copy(f, dirNameT)
In the sample code, dirNameS is the source directory and dirNameT is the target directory.
Dec 23 '06 #4
Instead of the line:
Expand|Select|Wrap|Line Numbers
  1. print f, os.path.getsize(f), os.path.getmtime(f)
use something like this:
Expand|Select|Wrap|Line Numbers
  1. shutil.copy(f, dirNameT)
In the sample code, dirNameS is the source directory and dirNameT is the target directory.
ok so this is what I have:

Expand|Select|Wrap|Line Numbers
  1. import os, shutil
  2.  
  3. def dir_list(dir_name):
  4.     fileList = []
  5.     for file in os.listdir(dir_name):
  6.         dirfile = os.path.join(dir_name, file)
  7.         if os.path.isfile(dirfile):
  8.             fileList.append(dirfile)
  9.     return fileList
  10.  
  11. if __name__ == '__main__':
  12.     dirNameS = (os.path.join('C:\\drivers\\audio'))
  13.     dirNameT = (os.path.join('C:\\Drivers'))
  14.     fileList = dir_list(dirNameS)
  15.     for f in fileList:
  16.         shutil.copy(f, dirNameT)
Dec 23 '06 #5
ok so this is what I have:


import os, shutil

def dir_list(dir_name):
fileList = []
for file in os.listdir(dir_name):
dirfile = os.path.join(dir_name, file)
if os.path.isfile(dirfile):
fileList.append(dirfile)
return fileList

if __name__ == '__main__':
dirNameS = (os.path.join('C:\\drivers\\audio'))
dirNameT = (os.path.join('C:\\Drivers'))
fileList = dir_list(dirNameS)
for f in fileList:
shutil.copy(f, dirNameT)

sweet NVM I figured it out, I wasn't writing each specific folder after a comma, Thank you so much
Dec 23 '06 #6
bvdet
2,851 Expert Mod 2GB
ok so this is what I have:


import os, shutil

def dir_list(dir_name):
fileList = []
for file in os.listdir(dir_name):
dirfile = os.path.join(dir_name, file)
if os.path.isfile(dirfile):
fileList.append(dirfile)
return fileList

if __name__ == '__main__':
dirNameS = (os.path.join('C:\\drivers\\audio'))
dirNameT = (os.path.join('C:\\Drivers'))
fileList = dir_list(dirNameS)
for f in fileList:
shutil.copy(f, dirNameT)
Indentation is an important part of Python. Without code tags the program structure is confuscated. See 'REPLY GUIDELINES' on this page.

You will not need 'os.path.join()' if you supply the full path for dirNameS and dirNameT. For a backup program, you should test for the existance of the file on the target and provide the user a means to decide whether or not to overwrite it. The code should work for a simple copy utility.

Barton is right. If you are new to Python and learning to program, start simple and build on what you have learned a little at a time.
Dec 23 '06 #7
Indentation is an important part of Python. Without code tags the program structure is confuscated. See 'REPLY GUIDELINES' on this page.

You will not need 'os.path.join()' if you supply the full path for dirNameS and dirNameT. For a backup program, you should test for the existance of the file on the target and provide the user a means to decide whether or not to overwrite it. The code should work for a simple copy utility.

Barton is right. If you are new to Python and learning to program, start simple and build on what you have learned a little at a time.

This is kind of python related, but would you know how I can find the directory name of a USB port such as when I hook up my digital camera it doesn't come out as I: drive as it does for flash drives and so on, how could I find the path name of the usb port, I am trying to create a back up of all the picture son my digital camera using this python backup program.
Dec 23 '06 #8
I am at the end of the program....What do I type into the program to have it run every 5 seconds?
Dec 23 '06 #9
bvdet
2,851 Expert Mod 2GB
This is kind of python related, but would you know how I can find the directory name of a USB port such as when I hook up my digital camera it doesn't come out as I: drive as it does for flash drives and so on, how could I find the path name of the usb port, I am trying to create a back up of all the picture son my digital camera using this python backup program.
I do not know how to do that directly from the camera. Many card readers show up as drives, so it would be straightforward accessing the card that way. Maybe one of our experts can help. You might post this question to the Techie Talk forum.
Dec 23 '06 #10
I do not know how to do that directly from the camera. Many card readers show up as drives, so it would be straightforward accessing the card that way. Maybe one of our experts can help. You might post this question to the Techie Talk forum.

Yea I figured it out, you can't do the camera, it just won't show up as a mass storage device so I just plug the memory card in, but would you by any chance know how to make the program run every 5 seconds? Thats all I need and the program will be finished.
Dec 23 '06 #11
bartonc
6,596 Expert 4TB
I am at the end of the program....What do I type into the program to have it run every 5 seconds?
Please read "Posting Guidelines" to learn what CODE tags look like. Post your program (try to use CODE tags). I'll show you how to run your program ever 5 seconds.
Dec 23 '06 #12
Please read "Posting Guidelines" to learn what CODE tags look like. Post your program (try to use CODE tags). I'll show you how to run your program ever 5 seconds.
thank you, yea I have no clue on how to do the code thing I keep on trying but I'll try again now, ok so here it is with help from the other thread this is the code.

Expand|Select|Wrap|Line Numbers
  1. import os, shutil
  2.  
  3. def dir_list(dir_name):
  4.     fileList = []
  5.     for file in os.listdir(dir_name):
  6.         dirfile = os.path.join(dir_name, file)
  7.         if os.path.isfile(dirfile):
  8.             fileList.append(dirfile)
  9.     return fileList
  10.  
  11. if __name__ == '__main__':
  12.     dirNameS = (os.path.join('E:\\', 'DCIM', '140canon'))
  13.     dirNameT = (os.path.join('C:\\', 'Camera'))
  14.     fileList = dir_list(dirNameS)
  15.     for f in fileList:
  16.        shutil.copy(f, dirNameT)
  17.  
Dec 23 '06 #13
bartonc
6,596 Expert 4TB
thank you, yea I have no clue on how to do the code thing I keep on trying but I'll try again now, ok so here it is with help from the other thread this is the code.

Expand|Select|Wrap|Line Numbers
  1. import os, shutil
  2. def dir_list(dir_name):
  3.     fileList = []
  4.     for file in os.listdir(dir_name):
  5.         dirfile = os.path.join(dir_name, file)
  6.         if os.path.isfile(dirfile):
  7.             fileList.append(dirfile)
  8.     return fileList
  9.  
  10. if __name__ == '__main__':
  11.     dirNameS = (os.path.join('E:\\', 'DCIM', '140canon'))
  12.     dirNameT = (os.path.join('C:\\', 'Camera'))
  13.     fileList = dir_list(dirNameS)
  14.     for f in fileList:
  15.        shutil.copy(f, dirNameT)
  16.  
Well, you did it! Great job!
Expand|Select|Wrap|Line Numbers
  1. import os, shutil
  2. from time import time
  3.  
  4. def dir_list(dir_name):
  5.     fileList = []
  6.     for file in os.listdir(dir_name):
  7.         dirfile = os.path.join(dir_name, file)
  8.         if os.path.isfile(dirfile):
  9.             fileList.append(dirfile)
  10.     return fileList
  11.  
  12. if __name__ == '__main__':
  13.     def CopyFiles():
  14.         dirNameS = (os.path.join('E:\\', 'DCIM', '140canon'))
  15.         dirNameT = (os.path.join('C:\\', 'Camera'))
  16.         fileList = dir_list(dirNameS)
  17.         for f in fileList:
  18.             shutil.copy(f, dirNameT)
  19.     duration = 30 # run for 30 seconds total
  20.     hasrunfor = 0 # count how long we have run
  21.     while hasrunfor < duration:
  22.         endTime = time() + 5  # time() counts in seconds
  23.         CopyFiles()
  24.         while time() < endTime:
  25.             pass
  26.         hasrunfor += 5
This will run for 30 seconds total trying to copy files every 5 seconds. I expect that you may get a file error before the 30 seconds are up (especially if you unplug your memory stick). There are ways to make python ignore errors, but this is very advanced programming.
Dec 23 '06 #14
Well, you did it! Great job!
Expand|Select|Wrap|Line Numbers
  1. import os, shutil
  2. from time import time
  3.  
  4. def dir_list(dir_name):
  5.     fileList = []
  6.     for file in os.listdir(dir_name):
  7.         dirfile = os.path.join(dir_name, file)
  8.         if os.path.isfile(dirfile):
  9.             fileList.append(dirfile)
  10.     return fileList
  11.  
  12. if __name__ == '__main__':
  13.     def CopyFiles():
  14.         dirNameS = (os.path.join('E:\\', 'DCIM', '140canon'))
  15.         dirNameT = (os.path.join('C:\\', 'Camera'))
  16.         fileList = dir_list(dirNameS)
  17.         for f in fileList:
  18.             shutil.copy(f, dirNameT)
  19.     duration = 30 # run for 30 seconds total
  20.     hasrunfor = 0 # count how long we have run
  21.     while hasrunfor < duration:
  22.         endTime = time() + 5  # time() counts in seconds
  23.         CopyFiles()
  24.         while time() < endTime:
  25.             pass
  26.         hasrunfor += 5
This will run for 30 seconds total trying to copy files every 5 seconds. I expect that you may get a file error before the 30 seconds are up (especially if you unplug your memory stick). There are ways to make python ignore errors, but this is very advanced programming.
Thank you so much, ouch so there comes a error? I was thinking about having it run all the time and even if there isn't the memory stick in it, but once there is for it to work, I'm going to test it out right now to see if it will work...Thank you for all of yourhelp, this is the best python forum...I will tell you what results I got
Dec 23 '06 #15
ok so everything runs smooth, but the program won't even run when the directory is not there( when the memory stick is taken out), which kind of defeats the purpose of having it run even if the directory isn't there and not showing errors, but extracting the files when the directory is there....even though it is advance programming would you know how I could get python to ignore it even if the memory stick is plugged out but to get the files once the memory stick is in? Could this be solved by just adding another source from where to copy files such as a hard drive would that ignore the fact that one of the drives to be copied is plugged out?
Dec 23 '06 #16
bartonc
6,596 Expert 4TB
ok so everything runs smooth, but the program won't even run when the directory is not there( when the memory stick is taken out), which kind of defeats the purpose of having it run even if the directory isn't there and not showing errors, but extracting the files when the directory is there....even though it is advance programming would you know how I could get python to ignore it even if the memory stick is plugged out but to get the files once the memory stick is in? Could this be solved by just adding another source from where to copy files such as a hard drive would that ignore the fact that one of the drives to be copied is plugged out?
Please post the error that you are getting.
Dec 23 '06 #17
bvdet
2,851 Expert Mod 2GB
Yea I figured it out, you can't do the camera, it just won't show up as a mass storage device so I just plug the memory card in, but would you by any chance know how to make the program run every 5 seconds? Thats all I need and the program will be finished.
Expand|Select|Wrap|Line Numbers
  1. from time import sleep
  2. while True:
  3.     try:
  4.         for f in os.listdir('D:\\'):
  5.             print f
  6.         sleep(5)
  7.     except:
  8.         break
Replace "D:\\" with the path to the media. Replace 'print f' with whatever you want to do to each file. This script will run until the media is removed or ejected.
Dec 23 '06 #18
Please post the error that you are getting.
Oh no it doesn't give me a error, what happens is I converted it to a .exe file when the flash drive is in, it runs smooth and the command window for that file is open, when i take out the flash drive and click on the exe the program turns on and the window closes automatically now to get the error you are asking for I'll take the flash drive out and run it in PythonWin, and this is the error

fileList = dir_list(dirNameS)
File "C:\Documents and Settings\Robert\Desktop\Python Files\backuptry.py", line 6, in dir_list
for file in os.listdir(dir_name):
WindowsError: [Error 2] The system cannot find the path specified: 'I:\\SD/*.*'
Dec 23 '06 #19
Expand|Select|Wrap|Line Numbers
  1. from time import sleep
  2. while True:
  3.     try:
  4.         for f in os.listdir('D:\\'):
  5.             print f
  6.         sleep(5)
  7.     except:
  8.         break
Replace "D:\\" with the path to the media. Replace 'print f' with whatever you want to do to each file. This script will run until the media is removed or ejected.

Yea but I need something that will ignore the errors and ignore if the media was ejected and keep working and once the media is plugged back in to keep on backing up
Dec 23 '06 #20
bvdet
2,851 Expert Mod 2GB
Yea but I need something that will ignore the errors and ignore if the media was ejected and keep working and once the media is plugged back in to keep on backing up
This will run forever. It's not a good thing to do though.
Expand|Select|Wrap|Line Numbers
  1. from time import sleep
  2. while True:
  3.     try:
  4.         for f in os.listdir('D:\\'):
  5.             print f
  6.         sleep(5)
  7.     except:
  8.         pass
Dec 23 '06 #21
This will run forever. It's not a good thing to do though.
Expand|Select|Wrap|Line Numbers
  1. from time import sleep
  2. while True:
  3.     try:
  4.         for f in os.listdir('D:\\'):
  5.             print f
  6.         sleep(5)
  7.     except:
  8.         pass
But will it ignore the error if the drive is taken out? because thats all that matters, and I shut it off by just exiting out of the exe that I make out of the python file?
Dec 23 '06 #22
bvdet
2,851 Expert Mod 2GB
thank you, yea I have no clue on how to do the code thing I keep on trying but I'll try again now, ok so here it is with help from the other thread this is the code.

Expand|Select|Wrap|Line Numbers
  1. import os, shutil
  2.  
  3. def dir_list(dir_name):
  4.     fileList = []
  5.     for file in os.listdir(dir_name):
  6.         dirfile = os.path.join(dir_name, file)
  7.         if os.path.isfile(dirfile):
  8.             fileList.append(dirfile)
  9.     return fileList
  10.  
  11. if __name__ == '__main__':
  12.     dirNameS = (os.path.join('E:\\', 'DCIM', '140canon'))
  13.     dirNameT = (os.path.join('C:\\', 'Camera'))
  14.     fileList = dir_list(dirNameS)
  15.     for f in fileList:
  16.        shutil.copy(f, dirNameT)
  17.  
Barton - Maybe you should combine these threads. Is it possible?
Dec 23 '06 #23
bvdet
2,851 Expert Mod 2GB
But will it ignore the error if the drive is taken out? because thats all that matters, and I shut it off by just exiting out of the exe that I make out of the python file?
The try statement executes the code that follows. When an error occurs, execution jumps to the except statement. 'pass' does just what it says: pass - no matter what error is encountered.
Dec 23 '06 #24
bvdet
2,851 Expert Mod 2GB
Expand|Select|Wrap|Line Numbers
  1. from time import sleep
  2. while True:
  3.     try:
  4.         for f in os.listdir('D:\\'):
  5.             print f
  6.         sleep(5)
  7.     except:
  8.         sleep(5)
  9.         pass
This is better. At least the script pauses 5 seconds no matter what.
Dec 23 '06 #25
Expand|Select|Wrap|Line Numbers
  1. from time import sleep
  2. while True:
  3.     try:
  4.         for f in os.listdir('D:\\'):
  5.             print f
  6.         sleep(5)
  7.     except:
  8.         sleep(5)
  9.         pass
This is better. At least the script pauses 5 seconds no matter what.
I am about to try this code but the other one, it didn't even copy the files, with sleep are you turning off the file because I'm trying to get it to execute every 5 seconds
Dec 23 '06 #26
no wonder the last one didn't work, I forgot to change the D:\\ =[
Dec 23 '06 #27
bartonc
6,596 Expert 4TB
This will run forever. It's not a good thing to do though.
Expand|Select|Wrap|Line Numbers
  1. from time import sleep
  2. while True:
  3.     try:
  4.         for f in os.listdir('D:\\'):
  5.             print f
  6.         sleep(5)
  7.     except:
  8.         pass
A little knowledge can be a dangerous thing.
Dec 23 '06 #28
ok so if this is the code

Expand|Select|Wrap|Line Numbers
  1. import os, shutil
  2. from time import time
  3.  
  4. def dir_list(dir_name):
  5.     fileList = []
  6.     for file in os.listdir(dir_name):
  7.         dirfile = os.path.join(dir_name, file)
  8.         if os.path.isfile(dirfile):
  9.             fileList.append(dirfile)
  10.     return fileList
  11.  
  12. if __name__ == '__main__':
  13.     def CopyFiles():
  14.         dirNameS = (os.path.join('I:\\', 'SD'))
  15.         dirNameT = (os.path.join('C:\\', 'Camera'))
  16.         fileList = dir_list(dirNameS)
  17.         for f in fileList:
  18.             shutil.copy(f, dirNameT)
  19.     duration = 60 # run for 30 seconds total
  20.     hasrunfor = 0 # count how long we have run
  21.     while hasrunfor < duration:
  22.         endTime = time() + 5  # time() counts in seconds
  23.         CopyFiles()
  24.         while time() < endTime:
  25.             pass
  26.         hasrunfor += 5
  27.  
what do I add to this to ignore the errors when the flash drive is taken out?...And what do I add to keep the program running after passing the error...and once the flash drive is added in and its still running will it do the back up that it was made to do?
Dec 23 '06 #29
bartonc
6,596 Expert 4TB
The try statement executes the code that follows. When an error occurs, execution jumps to the except statement. 'pass' does just what it says: pass - no matter what error is encountered.
I'll give him this one...
Expand|Select|Wrap|Line Numbers
  1. import os, shutil
  2. from time import time
  3.  
  4. def dir_list(dir_name):
  5.     fileList = []
  6.     try:
  7.         for file in os.listdir(dir_name):
  8.             dirfile = os.path.join(dir_name, file)
  9.             if os.path.isfile(dirfile):
  10.                 fileList.append(dirfile)
  11.     except WindowsError:
  12.         pass
  13.     return fileList
  14.  
  15. if __name__ == '__main__':
  16.     def CopyFiles():
  17.        dirNameS = (os.path.join('E:\\', 'DCIM', '140canon'))
  18.         dirNameT = (os.path.join('C:\\', 'Camera'))
  19.         fileList = dir_list(dirNameS)
  20.         for f in fileList:
  21.             shutil.copy(f, dirNameT)
  22.  
  23.     duration = 30 # run for 30 seconds total
  24.     hasrunfor = 0 # count how long we have run
  25.     while hasrunfor < duration:
  26.         endTime = time() + 5  # time() counts in seconds
  27.         CopyFiles()
  28.         while time() < endTime:
  29.             pass
  30.         hasrunfor += 5
Dec 23 '06 #30
bartonc
6,596 Expert 4TB
Barton - Maybe you should combine these threads. Is it possible?
Ok, guys. I'm going to merge these threads. I'll stick with "Python timing" as the title.
Dec 23 '06 #31
ok can I just say...the code doesn't work once the WindowsError: pass thing was added, it doesn't work...when i run it I get a syntax error and when i try to convert it to a exe it won't even do it because the something is wrong with the code
Dec 23 '06 #32
bartonc
6,596 Expert 4TB
ok can I just say...the code doesn't work once the WindowsError: pass thing was added, it doesn't work...when i run it I get a syntax error and when i try to convert it to a exe it won't even do it because the something is wrong with the code
Sorry. Had bad indentation on one line. Here's the fix:
Expand|Select|Wrap|Line Numbers
  1. import os, shutil
  2. from time import time
  3.  
  4. def dir_list(dir_name):
  5.     fileList = []
  6.     try:
  7.         for file in os.listdir(dir_name):
  8.             dirfile = os.path.join(dir_name, file)
  9.             if os.path.isfile(dirfile):
  10.                 fileList.append(dirfile)
  11.     except WindowsError:
  12.         pass
  13.     return fileList
  14.  
  15. if __name__ == '__main__':
  16.     def CopyFiles():
  17.         dirNameS = (os.path.join('E:\\', 'DCIM', '140canon'))
  18.         dirNameT = (os.path.join('C:\\', 'Camera'))
  19.         fileList = dir_list(dirNameS)
  20.         for f in fileList:
  21.             shutil.copy(f, dirNameT)
  22.  
  23.     duration = 30 # run for 30 seconds total
  24.     hasrunfor = 0 # count how long we have run
  25.     while hasrunfor < duration:
  26.         endTime = time() + 5  # time() counts in seconds
  27.         CopyFiles()
  28.         while time() < endTime:
  29.             pass
  30.         hasrunfor += 5
Dec 23 '06 #33
THANK YOU FOR ALL OF THE HELP BOTH OF YOU!!!! it finally works it does exactly what I need it to do.
Dec 23 '06 #34
bartonc
6,596 Expert 4TB
THANK YOU FOR ALL OF THE HELP BOTH OF YOU!!!! it finally works it does exactly what I need it to do.
You are VERY welcome. Be sure to start a new discussion for you next question. Thanks and keep posting,
Barton
Dec 23 '06 #35
I'll be sure to ask fro help on this forum, you guys are really good at helping, other forums, rn't too good....KUDOS
Dec 23 '06 #36
bvdet
2,851 Expert Mod 2GB
I'll be sure to ask fro help on this forum, you guys are really good at helping, other forums, rn't too good....KUDOS
I am glad to help. Good work Barton!
Dec 24 '06 #37
bartonc
6,596 Expert 4TB
I am glad to help. Good work Barton!
You too. Thanks BV.
Dec 24 '06 #38

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Freddie | last post by:
Hi, I posted a while ago for some help with my word finder program, which is now quite a lot faster than I could manage. Thanks to all who helped :) This time, I've written a basic batch...
32
by: dan | last post by:
It would be an understatement to say I love this language. What used to take me all day now takes 3 hours, and I can spend the rest of the time on my bike thinking about the problems from a high...
15
by: Guyon Morée | last post by:
Hi all, I am working on a Huffman encoding exercise, but it is kinda slow. This is not a big problem, I do this to educate myself :) So I started profiling the code and the slowdown was...
24
by: Richard Blackwood | last post by:
Is it possible to prototype an operating system in Python? If so, what would such a task entail? (i.e. How would one write a boot-loader in Python?) - Richard B.
6
by: Gonzalo Monzón | last post by:
Hi all! I have been translating some Python custom C extension code into Python, as I need these modules to be portable and run on a PocketPC without the need of compile (for the purpose its a...
2
by: Oeyvind Brandtsegg | last post by:
hello I'm writing a Python application for live music performance/improivsation, using csound as the synthesis engine, and Python for compositional algorithms, GUI and control. I creating...
14
by: Hendrik van Rooyen | last post by:
Hi, I get the following: hvr@LINUXBOXMicrocorp:~/Controller/libpython display.py UpdateStringProc should not be invoked for type font Aborted and I am back at the bash prompt - this is...
0
by: Cameron Laird | last post by:
QOTW: "I have a fake supervisor reference generator for job interviews, a fake house inspection generator for real estate transactions, and a fake parole testimony generator - maybe you could...
7
by: Protocol | last post by:
Hello all Is Python suitable for building a multi-track midi sequencer (with a gui), that would run on windows / mac ? I fail to find sufficient information on this, being a newbie and all....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.