well could and would you help me out on how to get started and what I need to do? Basically can you help me write a program that will extract all images from the digital camera once it is hooked up into the USB port of my computer not the USB hub?
How much python do you know at this point?
13 1194
How much python do you know at this point?
just started learning it, =] hehehe I know I'm pathetic, but I'm learning, I'm taking a computer programming class this year, but we are just now starting on Java and python at the end of the year, but from what i've heard Python is the best to use when programming....so I thought I'd try it out, I'm reading how to program in python as we speak, but could you still help me on how to get started?
just started learning it, =] hehehe I know I'm pathetic, but I'm learning, I'm taking a computer programming class this year, but we are just now starting on Java and python at the end of the year, but from what i've heard Python is the best to use when programming....so I thought I'd try it out, I'm reading how to program in python as we speak, but could you still help me on how to get started?
Yeah, we'll help you get started. Just not started talking to hardware. Python is by far the easiest way to program your computer, but there are many things you need to know in order to write a program that talks to many systems (files, display, USB, etc.). Once you can read and write files and do work on those (copy a file from one directory to another would be a good exercise) and then do it with a file dialog box, and so on. Do you see where I'm going with all this?
Yeah, we'll help you get started. Just not started talking to hardware. Python is by far the easiest way to program your computer, but there are many things you need to know in order to write a program that talks to many systems (files, display, USB, etc.). Once you can read and write files and do work on those (copy a file from one directory to another would be a good exercise) and then do it with a file dialog box, and so on. Do you see where I'm going with all this?
Yes I do could you help me get started on how to do it? like the exercise that you told me? Right now I am reading this http://swaroopch.info/text/Byte_of_Python:Control_Flow It seems to be pretty good so far. Is this any good?
Yes I do could you help me get started on how to do it? like the exercise that you told me? Right now I am reading this http://swaroopch.info/text/Byte_of_Python:Control_Flow It seems to be pretty good so far. Is this any good?
Yep. That looks like a good starting place.
Yep. That looks like a good starting place.
ok can you help me out
so I am in the process of baking up a file using python, but it never works here it is: -
import os, time
-
-
# 1. The files and directories to be backed up are specified in a list.
-
source = [r'I:\']
-
# If you are using Windows, use source = [r'C:\Documents', r'D:\Work'] or something like that
-
-
# 2. The backup must be stored in a main backup directory.
-
target_directory = 'C:\\'
-
-
# 3. The files are backed up into a zip file.
-
# 4. The name of the zip archive is the current date and time
-
target = target_directory + time.strftime('%Y%m%d_%H%M%S') + '.zip'
-
-
# 5. We use the standard ``zip`` command to put the files in a zip archive
-
zip_command = "zip -qr '%s' %s" % (target, ' '.join(source))
-
print zip_command
-
-
# Run the backup
-
if os.system(zip_command) == 0:
-
print 'Successful backup to', target
-
else:
-
print 'Backup FAILED'
and I don't see why it doesn't work, it comes back Backup failed..but why?
ok can you help me out
so I am in the process of baking up a file using python, but it never works here it is: -
import os, time
-
-
# 1. The files and directories to be backed up are specified in a list.
-
source = [r'I:\']
-
# If you are using Windows, use source = [r'C:\Documents', r'D:\Work'] or something like that
-
-
# 2. The backup must be stored in a main backup directory.
-
target_directory = 'C:\\'
-
-
# 3. The files are backed up into a zip file.
-
# 4. The name of the zip archive is the current date and time
-
target = target_directory + time.strftime('%Y%m%d_%H%M%S') + '.zip'
-
-
# 5. We use the standard ``zip`` command to put the files in a zip archive
-
zip_command = "zip -qr '%s' %s" % (target, ' '.join(source))
-
print zip_command
-
-
# Run the backup
-
if os.system(zip_command) == 0:
-
print 'Successful backup to', target
-
else:
-
print 'Backup FAILED'
and I don't see why it doesn't work, it comes back Backup failed..but why?
Is it really your intention to zip the entire I drive contents????
You should really start smaller like we have already discussed.
This script calls your system cmd.exe so you are already complicating things.
You need two things on you system for this to work. 1) an "I" drive, and 2) zip installed on the system PATH. If you don't know how to run zip from the command line, you are starting of with too many unknowns. If you can run zip from the command line, try to do the zip by hand. That will tell you if that part is working. If it is, then we can work on your script.
Think "baby steps". You tend to jump into the deep end a lot.
Is it really your intention to zip the entire I drive contents????
You should really start smaller like we have already discussed.
This script calls your system cmd.exe so you are already complicating things.
You need two things on you system for this to work. 1) an "I" drive, and 2) zip installed on the system PATH. If you don't know how to run zip from the command line, you are starting of with too many unknowns. If you can run zip from the command line, try to do the zip by hand. That will tell you if that part is working. If it is then we can work on your script.
Think "baby steps". You tend to jump into the deep end a lot.
ok so wait lets say I take the zip thing out, now the I drive is my flash drive that is plugged in and it only has like 3 files on it right now which are small, but what I am trying to do is back the SD folder on my I drive up to the C drive in a folder called drivers.... so my code now is
import os, time
# 1. The files and directories to be backed up are specified in a list.
source = [r'I:\SD']
# If you are using Windows, use source = [r'C:\Documents', r'D:\Work'] or something like that
# 2. The backup must be stored in a main backup directory.
target_directory = r'C:\Drivers'
and it still doesn't work, what am I doing wrong, do you have AIM or something so I can communicate with you easier?
ok so wait lets say I take the zip thing out, now the I drive is my flash drive that is plugged in and it only has like 3 files on it right now which are small, but what I am trying to do is back the SD folder on my I drive up to the C drive in a folder called drivers.... so my code now is
import os, time
# 1. The files and directories to be backed up are specified in a list.
source = [r'I:\SD']
# If you are using Windows, use source = [r'C:\Documents', r'D:\Work'] or something like that
# 2. The backup must be stored in a main backup directory.
target_directory = r'C:\Drivers'
and it still doesn't work, what am I doing wrong, do you have AIM or something so I can communicate with you easier?
I think that you are still aiming a little too high, for now. In order to work with path names, you'll need to have good string manipulation skills. This is very basic and easy to learn, but path names have many more issues (is it file? is it a folder?, etc.)
In #1 above, there is a list of strings (Ok, only one string in the list) so you need to know how lists work, too.
Pick something fun and interesting and easy to start with. The most common first program is "hello world". I'll start very simple and add to it as we go along. OK? - # this is a comment. you write notes about what the lines below do
-
# This program prints "hello world" ten times
-
# using a for loop over a list of integers
-
# the list of integers is generated by the built-in function: range()
-
# blank lines are a really good thing to make your code readable
-
-
for i in range(10): # the colon says 'the indented lines below belong to the for
-
print "hello world"
-
-
# In this example, there are 2 built-in operators and 2 built-in functions
-
# and a string object. Can you pick out the functions from the operators?
I think that you are still aiming a little too high, for now. In order to work with path names, you'll need to have good string manipulation skills. This is very basic and easy to learn, but path names have many more issues (is it file? is it a folder?, etc.)
In #1 above, there is a list of strings (Ok, only one string in the list) so you need to know how lists work, too.
Pick something fun and interesting and easy to start with. The most common first program is "hello world". I'll start very simple and add to it as we go along. OK? - # this is a comment. you write notes about what the lines below do
-
# This program prints "hello world" ten times
-
# using a for loop over a list of integers
-
# the list of integers is generated by the built-in function: range()
-
# blank lines are a really good thing to make your code readable
-
-
for i in range(10): # the colon says 'the indented lines below belong to the for
-
print "hello world"
-
-
# In this example, there are 2 built-in operators and 2 built-in functions
-
# and a string object. Can you pick out the functions from the operators?
Yea I already did hello world as the first thing
i= 'hello world'
print i
but yea I'm kind of trying to make a back up a folder and back up files program could you teach me how to do it, because I really don't have much time to learn this stuff I somehow need to get that usb program done..so i was thinking about starting off with backing up files, do you know how its done?
Yea I already did hello world as the first thing
i= 'hello world'
print i
but yea I'm kind of trying to make a back up a folder and back up files program could you teach me how to do it, because I really don't have much time to learn this stuff I somehow need to get that usb program done..so i was thinking about starting off with backing up files, do you know how its done?
I will show you when you can answer the question in the last post correctly.
Please slow down a little and try again.
I will show you when you can answer the question in the last post correctly.
Please slow down a little and try again.
I'm sorry about the lack of information, well what I am trying to do is make a backup of a folder and place the backup in another directory. Does that answer the question?
Python is by far the easiest way to program your computer, but there
Barton do you think so? What editor do you use to create python programs? I'm interested in learning a new language.
Barton do you think so? What editor do you use to create python programs? I'm interested in learning a new language.
Yes! Especially if you know C or C++, picking up python is a snap. The syntax is very natural and doesn't have all those parentheses and required semi-colons that always confused me in C. The really cool thing is interactive testing with the interpreter (shell) that lets you type in a line of code and see the results imediately. Dynamic Typing is also very cool. It lets you pass any type of argument to a function. Then the function can do different things based on the type of the argument(s). Many cool features, lots of libraries, great language!
Keep posting,
Barton
PS Get an avatar so that I can see who's posting (dang it).
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Bicho Verde |
last post by:
I have now free time and money to do what I want :-)
I have some basic skills in programming (C, Pascal, Macromedia
Actionscript) but don't know exactly what to do in the world of programming.
And...
|
by: Charif Lakchiri |
last post by:
Okay, here's what I know so far about Python:
It's an object-oriented scripting language, supported on many platforms.
Now here are my questions:
It is easy to learn?
Does it support GUI...
|
by: Robert Oschler |
last post by:
Hello all,
I have set up a forum dedicated to WordNet Developers. I just added a
section for Python developers that are using PyWordNet or other Python based
WordNet interface modules or code. ...
|
by: Jonas Melian |
last post by:
Hi,
I'm going to say a suggestion, why don't you create a forum like the one
of Ruby (http://www.rubyforums.com/)? for the novices this is a great
help, better than a mail list
It's also...
|
by: john67 |
last post by:
Every time I attempt to look at the Python Business
Forum (www.python-in-business.org), I encounter an error that starts
like this:
Site Error
An error was encountered while publishing this...
|
by: Hermawih |
last post by:
Hello ,
I want your opinion about this .
In order to say it clearly , I think I have to describe it in long sentences .
I could consider myself as Intermediate/Advance Access Developer ;...
|
by: SeNTry |
last post by:
Hello,
Are there any good active python forums online? Especially any forum that
has an uber-noob section!
|
by: fyleow |
last post by:
Hi guys,
I'm a student/hobbyist programmer interested in creating a web project.
It's nothing too complicated, I would like to get data from an RSS
feed and store that into a database. I want...
|
by: Katie Tam |
last post by:
I am new to this filed and begin to learn this langague. Can you tell
me the good books to start with ?
Katie Tam
Network administrator
http://www.linkwaves.com/main.asp...
|
by: Chris Carlen |
last post by:
Hi:
From what I've read of OOP, I don't get it. I have also found some
articles profoundly critical of OOP. I tend to relate to these articles.
However, those articles were no more objective...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
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...
|
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...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |