Just curious to wonder if Python can be used to write a
program to check an HTTP mail server for mail,
Yes, you would probably use the urllib module for that.
and check more than one server,
Yes that would be a fairly typical use for Python as
a web client.
even if they are using
I had a co-worker say to me at work that Python was related
to or based upon BASIC. Is this true, and if not, how can I
tell my friend why they are similar?
Both Python and BASIC are interpreted languages intended to
be used (amongst other things) to learn how to program.
There the
What if I were to use ID's for the students and use the ID's as the
sequence
index, and link the students and their grades to the IDs?
Its not necessary for what you are doing but it's how you'd normally
do it
in a relational database, so if you ever needed to turn your file
based
program
I want to write a program that will convert time in any other
time zone to my time zone.
This is a deceptively complex task. There are around 40 timezones
varying by anything from 15 minutes to 2 hours. And some places
change timezone throughout the year. Others have multiple daylight
I forgot to tell that I use Python 2.2.3. When I first got Python, I
got
2.4.1, but it refused to run the second time. So I went and got
2.2.3. Your answer would make sense if I had 2.4.1, but I don't.
Version 2.3 should work and has the datetime stuff I think
- just checked and it does...
Mohammad Moghimi a crit:
[...]
checking that Python has a working distutils... configure: error:
* Distutils is not available or is incomplete for /usr/bin/python
* If you installed Python from RPM (or other package manager)
* be sure to install the -devel package, or install
[EMAIL PROTECTED] wrote:
Quoting Dick Moores [EMAIL PROTECTED]:
Why are list comprehensions called that?
Because that's what they're called in Haskell, I guess..
It's historical, based on the term set comprehension from mathematics, also
known as set builder notation:
Hello.
I have created a program that automatically downloads some files I need.
It can be .zip, .jpg, .mpg or .txt. However, a lot of the time urlretrieve
downloads the file, gives no error, but the downloaded file is corrupted.
I use a simple check for the size of the file. If it is way too
Thanks.
Its works very well.
Santosh.
On 8/1/05, Jorge Louis de Castro [EMAIL PROTECTED] wrote:
I found a way to do it but I'm not sure it is the cleanest. Maybe someone
else on this list can offer a better solution.
I use the text's configuration to define tags that I apply to sections of
Hi all,
I want to know if a file is a directory or a simple file.
I have done a little ugly script :
# i is my filename, os is imported
old = os.getcwd()
try:
chdir(i)
is_dir = True
except:
is_dir = False
os.chdir(old)
return is_dir
But maybe there is a better way ?
If you know a
Damien wrote:
Hi all,
I want to know if a file is a directory or a simple file.
Look at os.path.isdir()
Kent
I have done a little ugly script :
# i is my filename, os is imported
old = os.getcwd()
try:
chdir(i)
is_dir = True
except:
is_dir = False
os.chdir(old)
return
Damien wrote:
Hi all,
I want to know if a file is a directory or a simple file.
I have done a little ugly script :
# i is my filename, os is imported
old = os.getcwd()
try:
chdir(i)
is_dir = True
except:
is_dir = False
os.chdir(old)
return is_dir
But maybe there is a
Ok, sorry. In the future, I will look more closely the module before
sending my question.
Thanks.
Kent Johnson a crit:
Damien wrote:
Hi all,
I want to know if a file is a directory or a simple file.
Look at os.path.isdir()
Kent
I have done a little ugly
Hi all,
I am using time.sleep to stop my program execution for some time. I
have imported time and am able to use it sucessfully in the main
program.
However if I use it in any function I get the following error:
the time.sleep(1) command generates this error :
TypeError : 'int' object is not
sunny sunny wrote:
Hi all,
I am using time.sleep to stop my program execution for some time. I
have imported time and am able to use it sucessfully in the main
program.
However if I use it in any function I get the following error:
the time.sleep(1) command generates this error :
Some additional information:
I am calling this function from a thread and I get the error.
However if I call the function from the main program it works fine.
I am using thread.start_new_thread() to start the thread.
Thanks.
Santosh.
On 8/2/05, sunny sunny [EMAIL PROTECTED] wrote:
Hi all,
sunny sunny napsal(a):
Hi all,
I am using time.sleep to stop my program execution for some time. I
have imported time and am able to use it sucessfully in the main
program.
However if I use it in any function I get the following error:
the time.sleep(1) command generates this error :
TypeError
Hi
Pawel Kraszewski wrote:
4. The answer is symmetrical - usually you take only half of it. I
don't
remember the exact difference between the halves, but you may find it
in any
article on FFT.
The real part is identical the imaginary part has the opposite sign
(same amplitude, opposite
I think I'll leave this one for someone else. I got too confused too quick.
- Original Message -
From: Alan G [EMAIL PROTECTED]
To: Nathan Pinno [EMAIL PROTECTED]; Tutor mailing list
tutor@python.org
Sent: Tuesday, August 02, 2005 1:47 AM
Subject: Re: [Tutor] I need advice.
I want to
This is a totally unrelated question but does anyone know a good free iso
image burner?
greg
_
Express yourself instantly with MSN Messenger! Download today - it's FREE!
Greg Janczak schrieb:
This is a totally unrelated question but does anyone know a good free iso
image burner?
Well, what don't you like about cdrecord? Otherwise, specifying which
operating system you're intending to use this on would be quite a good
idea. ;)
Cheers,
Kris
--
Sei Du selbst
geon napsal(a):
sunny sunny napsal(a):
Hi all,
I am using time.sleep to stop my program execution for some time. I
have imported time and am able to use it sucessfully in the main
program.
However if I use it in any function I get the following error:
the time.sleep(1) command
I am writing a Blackjack program, and was wondering how to reset the values
to zero, e.g. cash = 0?
Thanks,
Nathan Pinno,Crew, Camrose McDonalds and owner/operator of
Woffee
BEGIN:VCARD
VERSION:2.1
N:Pinno;Nathan;Paul;Mr.
FN:Pinno, Nathan Paul
ORG:Woffee;Executive
TITLE:Owner/operator
pyserial provides serial communication but I think I require an interface that
would abstract/simplify the JBUS/MODBUS protocol.
Thanks Danny and Alan for all the help.
Will check out comp.lang.python for advice.
Best Miguel
---
Chegou o Clix ADSL até 16 Megas
On Tue, 2 Aug 2005, [iso-8859-1] �yvind wrote:
Is there some function/modulte that checks a files integrity wheter or
not the file is corrupt or not?
Hello!
A general technique that people have used before is to provide file
checksums of large files. These checksums can be used to verify
Øyvind napsal(a):
Hello.
I have created a program that automatically downloads some files I need.
It can be .zip, .jpg, .mpg or .txt. However, a lot of the time urlretrieve
downloads the file, gives no error, but the downloaded file is corrupted.
I use a simple check for the size of the file. If
/listinfo/tutor
-- next part --
An HTML attachment was scrubbed...
URL:
http://mail.python.org/pipermail/tutor/attachments/20050802/b0b6ad7c/attachment-0001.htm
--
Message: 8
Date: Tue, 2 Aug 2005 12:10:59 -0400
From: sunny sunny [EMAIL
-- Forwarded message --
Date: Tue, 2 Aug 2005 22:12:34 +0200 (CEST)
From: [iso-8859-1] �yvind [EMAIL PROTECTED]
To: Danny Yoo [EMAIL PROTECTED]
Subject: Re: [Tutor] Corrupt files
Hello and thank you.
I don't really think that will help. The files are mostly smaller ones of
for
I have created a program that automatically downloads some files I
need.
It can be .zip, .jpg, .mpg or .txt. However, a lot of the time
urlretrieve
downloads the file, gives no error, but the downloaded file is
corrupted.
I use a simple check for the size of the file. If it is way too
small, I
Rumor has it that geon may have mentioned these words:
Øyvind napsal(a):
Hello.
I have created a program that automatically downloads some files I need.
It can be .zip, .jpg, .mpg or .txt. However, a lot of the time urlretrieve
downloads the file, gives no error, but the downloaded file is
On Tue, 2 Aug 2005, Greg Lindstrom wrote:
This must be simple, but for the life of me I can't figure out how to
delete an entry from a dictionary. For example,
meals = {}
meals['breakfast'] = 'slimfast'
meals['lunch'] = 'slimfast'
meals['dinner'] = 'something sensible'
How do I
meals.pop(key) will do it.
Example:
meals = {}
meals['breakfast'] = 'slimfast'
meals['lunch'] = 'slimfast'
meals['dinner'] = 'something sensible'
meals
{'lunch': 'slimfast', 'breakfast': 'slimfast', 'dinner': 'something sensible'}
meals.pop(breakfast)
'slimfast'
meals
{'lunch': 'slimfast',
Hello group:
I have a file (3339203 lines) that looks like this:
(col:1)(col:2) (col:3)
AD134KL
X X
X X
X X
AD144KL
Y Y
Y Y
Now I have to fill the rows in
On Tue, 2 Aug 2005, Victor Reijs wrote:
This is in a seperate text box, but I want to have the colors
(bold/italics) in the default IDLE window.
[Note: please use Reply-to-all]
This will probably be more difficult. I don't believe IDLE itself allows
a user's program to set its own fonts
Hello Danny,
Danny Yoo wrote:
This is in a seperate text box, but I want to have the colors
(bold/italics) in the default IDLE window.
This will probably be more difficult. I don't believe IDLE itself allows
a user's program to set its own fonts and colors within the running IDLE
window.
Hi Christian,
sorry for the lack of detail. how about I use a sine wave because I know what the output should look like - amplitude of one at frequency equal to the frequency of the sine wave.
one period of a sin wave that cycles at one hertz:
period = 1
input =
36 matches
Mail list logo