Brian Hicks wrote:
> Hi, I'm making a webcam automation script (for a project 365 photo
> thing) and I can't figure out how to increment the filename every time
> the script saves an image. I'm using this snippet of code to count
> the tiles in the directory:
>
> filecount = len(os.walk("C:
On 11/07/07, Brian Hicks <[EMAIL PROTECTED]> wrote:
> Hi, I'm making a webcam automation script (for a project 365 photo thing)
> and I can't figure out how to increment the filename every time the script
> saves an image. I'm using this snippet of code to count the tiles in the
> directory:
[...
Hi, I'm making a webcam automation script (for a project 365 photo
thing) and I can't figure out how to increment the filename every time
the script saves an image. I'm using this snippet of code to count the
tiles in the directory:
filecount = len(os.walk("C:\Users\Username\Desktop").next
Alan Gauld <[EMAIL PROTECTED]> wrote:"Sara Johnson" wrote
> this is sort of a script that was written and I'm making
> modifications to. Due to my serious lack of experience,
> I'm afraid to rewrite anything.
This is probably a long shot given the code you've posted so far,
but I don't
I will work with this further, and report back once I find Alan's method...
but for now, this seems to work:
for i in range(0,20):
y=d[i][2].split('\xb0')
x=d[i][3].split('\xb0')
ydeg,ymin=int(y[0].rstrip()),float(y[1].strip('\' N'))
xdeg,xmin=int(x[0].rstrip()),float(x[1].rstrip("\' E").rstrip("
"John" <[EMAIL PROTECTED]> wrote
> you can see what my problem was:
>
> for i in range(0,344)
> y=d[i][2].split('\xb0')
> x=d[i][3].split('\xb0')
> ...
> declon=int(xdeg)+(float(xmin)/60)
The first thing I'd suggest is not to try to do it all in one step.
Break it into chunks and wri
On Sat, 7 Jul 2007, Alan Gauld wrote:
> I'm intrigued as to why people are using weird combinations
> of math to manipulate bitstrings given that Python has a full
> set of bitwise operators. Surely it is easier and more obvious
> to simply shift the bits right or left using >> and << and use
> bi
A little closer, this seems to work, but it's not catching the 'W' or 'S'
cases to make it negative...
for i in range(0,20):
y=d[i][2].split('\xb0')
x=d[i][3].split('\xb0')
ydeg,ymin=int(y[0].rstrip()),float(y[1].strip('\' N'))
xdeg,xmin=int(x[0].rstrip()),float(x[1].rstrip("\' E").rstrip
Hi Everybody,
I have been working on a parser for myself. I want to create methods on
the fly with the information that I get from a file. Here is my question:
class configure:
<.stuff deleted..>
def parseGlobal(self,projectName,section,project):
for ele
On 7/10/07, John <[EMAIL PROTECTED]> wrote:
I was trying to read in a tab delimited file i was given with lat and lon,
the thing is I needed decimal lat, and decimal long... well, anyway I think
you can see what my problem was:
for i in range(0,344)
y=d[i][2].split('\xb0')
x=d[i][3].spli
Luke, Albert:
Thanks.. yes I'm thinking re is what I need... and using negative values for
west, and positive for east is our convention. The problem I have is that
not all the data was provided in that format, so I'm in the process of
converting...
There are a number of problems with my origina
John wrote:
> Just a quick follow up.. it doesn't work :s
>
> There are definitely some problems... ideas are welcome!
I have an idea: use a regular expression :D
Unfortunately, I don't have the knowledge of these down well enough to
just spout one off OTOH,
and I've got somewhere I have to be,
Just a quick follow up.. it doesn't work :s
There are definitely some problems... ideas are welcome!
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
I was trying to read in a tab delimited file i was given with lat and lon,
the thing is I needed decimal lat, and decimal long... well, anyway I think
you can see what my problem was:
for i in range(0,344)
y=d[i][2].split('\xb0')
x=d[i][3].split('\xb0')
ydeg,ymin=y[0].strip(),y[1].rstrip(
thank you so much :)
On 7/10/07, Bob Gailer <[EMAIL PROTECTED]> wrote:
max . wrote:
> hello i am writing a population script and was wondering if i can
> just keep writing to the same line instead of printing a new line
> every second
import time
for i in range(5):
print chr(13), i,
max . wrote:
> hello i am writing a population script and was wondering if i can
> just keep writing to the same line instead of printing a new line
> every second
import time
for i in range(5):
print chr(13), i,
time.sleep(1)
# chr(13) = carriage return, and the trailing , suppress
"max ." <[EMAIL PROTECTED]> wrote
> hello i am writing a population script and was wondering if i can
> just keep
> writing to the same line instead of printing a new line every second
Depending on the terminal type you can use control codes to
move the cursor. Thus on most Unix terminals you c
"Dave Pata" <[EMAIL PROTECTED]> wrote
> I am currently doing an assignment for school using python
> and im at the stage of make it look good and i need more
> colours.
More colours rarely means it looks good, just garish!
Good UI's are built by following style guidelines that
allow the user
hello i am writing a population script and was wondering if i can just keep
writing to the same line instead of printing a new line every second
thanks
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
"Tony Noyeaux" <[EMAIL PROTECTED]> wrote
> import randomprint random.choice(['Apple', 'Pear', 'Shrimp',
> 'Death', 'Life'])
Your formatting is a little strange as seen above but...
> Works in IDLE gui, no problem.
Do you mean the interactive shell in IDLE?
Or are you actually comparing like fo
On Tue, Jul 10, 2007 at 01:37:34PM -0400, Tony Noyeaux wrote:
>
> Simple Random code.
>
>
> import randomprint random.choice(['Apple', 'Pear', 'Shrimp', 'Death', 'Life'])
>
>
> Works in IDLE gui, no problem. Gives me a random pick no problem.
>
> When i changed to DrPython, to continue b
Simple Random code.
import randomprint random.choice(['Apple', 'Pear', 'Shrimp', 'Death', 'Life'])
Works in IDLE gui, no problem. Gives me a random pick no problem.
When i changed to DrPython, to continue building parts of my code.. it won't
take that code.
Gives me this error.
C:/P
"Dave Pata" <[EMAIL PROTECTED]> wrote
> I was wondering if anyone knows how to insert graphic images,
> such as JPEG and BMP, into a simple Tk GUI and use them
> as the background. Any help will be appreciated.
since its for homework onl;y hints are allowed.
You need to look at the Image obje
"Mihai Iacob" <[EMAIL PROTECTED]> wrote
> Is there a function that converts from integer to
> binary (or a module that handles this)?
Remember that integers are binary. Thats how they are stored.
What I think you want is something that will represent an
integer as a string of 1s and 0s. Somethin
On Tue, Jul 10, 2007 at 08:24:36AM -0400, bhaaluu wrote:
> Thank you for the clarification.
> One pitfall of experimentation as a Noob is in not knowing enough to
> figure out what or why errors are generated. Thus, this Tutor list is very
> helpful. I really appreciate the feedback.
>
You might
At 07:27 AM 7/10/2007, Mihai Iacob wrote:
>Hello,
>
>Is there a function that converts from integer to
>binary (or a module that handles this)?
>
>The only thing close to it that i found in the manual
>is the binascii module but i can't get it to work.
Here's one:
def base10ToBaseN(n, base=2):
Hello,
Is there a function that converts from integer to
binary (or a module that handles this)?
The only thing close to it that i found in the manual
is the binascii module but i can't get it to work.
Thanks
_
> -Original Message-
>[...]
> I have a file like this one:
>
> command = func_babara
> parameter_1 = 300
> parameter_2 = 300
> parameter_3 = 50
> parameter_4 = 0
> parameter_5 = 0
> parameter_6 = 0
>
>
> ,as you see, i need to process it one line at a time and use
> this .ini file
Greetings,
On 7/9/07, John Fouhy <[EMAIL PROTECTED]> wrote:
> On 10/07/07, bhaaluu <[EMAIL PROTECTED]> wrote:
> > >>> file.readlines()
> > Traceback (most recent call last):
> > File "", line 1, in ?
> > AttributeError: 'str' object has no attribute 'readlines'
>
> This error here is caused by t
Hello,
I was wondering if anyone knows how to insert graphic images, such as JPEG and BMP, into a simple Tk GUI and use them as the background. Any help will be appreciated.
Cheers.Crowded House Time on Earth catch them live in the USA! Enter here.
__
Hello,
I am currently doing an assignment for school using python and im at the stage of make it look good and i need more colours. So if anyone has URL with a list of colours, or even a list established by yourself. Anything of the sort would be appreciated.
P.S I dont know if this has any effect
"elis aeris" <[EMAIL PROTECTED]> wrote
> python 3.9 File Objects of Python Library Reference
>
Learning to program from the reference manual is possible,
especially if you use the interpreter to experiment as John
has suggested. But it will be much faster and less error prone
if you just work th
"bhaaluu" <[EMAIL PROTECTED]> wrote
>> The best way to find out what the functions do is to experiment
>> with them.
>>
>> eg:
>>
>> >>> f = open('text.txt', 'r')
>> >>> f.readlines()
>>
>> and look at the output.
>
> I like that idea. I made a simple english plain text file, thus:
>
> first lin
33 matches
Mail list logo