Hi,
On Wed, Sep 29, 2010 at 11:42 AM, Peter Otten __pete...@web.de wrote:
Carter Danforth wrote:
Thanks for the replies, Dave and Joel. The reason I'm not just using the
time or datetime modules for a random date is because it's restricted to
1970-2038; I'm pulling dates from 1600-3099.
Hi Boyks,
Boykie Mackay wrote:
Hi guys,
I have come across a bit of code to find if a group of numbers is odd or
even.The code snippet is shown below:
if not n1:
return false
The above should return false for all even numbers,numbers being
represented by n.I have tried to wrap my
Hi
Ziad Rahhal wrote:
Hi,
I installed pythin on Linux operating system but on my own tree
directory. Now I want to get rid (not deleting)
the default python installation, which means I want my own python
version to be recognized when I use python command.
PYTHONPATH has nothing to do
Hi Rob,
Rob wrote:
Hi, can someone help me interpret the error output below?
I can't tell whether this is a coding error, or a configuration error,
in which case, it would be up to my host provider.
For privacy reasons, I have changed the actual email addresses to
[EMAIL PROTECTED]
Hello!
Grady Henry wrote:
Here is a program that I wrote using the first example at 12.2.13
Examples at the www.python.org http://www.python.org website,
# Import smtplib for the actual sending function
import smtplib
# Import the email modules we'll need
from email.MIMEText import
http://mail.python.org/mailman/listinfo/tutor
--
Ing. Ewald Ertl HartterGruppe Phone :
+43-3352-33085-558
trinomic Projektmanagement Informationstechnik GmbH Fax :
+43-3352-33085-600
Wiener Straße 41mailto:[EMAIL PROTECTED
MATATA EMMANUEL wrote:
Hi there,
Can anyone tell me how I'm having trouble executing this piece of code:
mpg = raw_input ( Enter your mileage:)
distance = raw_input (Enter your distance:)
galon_price = raw_input (Enter you cost per gallon:)
make = Honda
model = Accord
##
print make,
to accomplish it.
Do you have some hints?
Where could I find code-examples which solve similar problems?
Would you recommend a different approach?
Regards,
Gregor
--
Ing. Ewald Ertl HartterGruppe Phone :
+43-3352-33085-558
trinomic Projektmanagement
Hi,
k r fry wrote:
Hi, I am new to this list, and also to Python.
I am trying to get Python to loop through the directory DATADIR which
contains the data I want to read. I get an error: oserror [errno 20]
: Not a directory: Katiescint.py
The section of code is shown below:
for
Hi Chris,
I think I've found the problem. os.listdir() gives you all entries of
the directory, but your
not changing to that directory. The os.path.getsize() just does not find the
file in the directory testFiles under
your current directory.
See my short example below.
import os
Hi!
How have you started the script? As far as I could see, in the Chapter 1 of
Dive into Python, the odbchelper.py is just a script-File and not a module
to be imported, therefore the Exception with the ImportError.
I do not have a Windows box here to check if the problem is with the PythonIDE.
Hi Kent!
You are absolutely right. Sorry for my bad description.
Kent Johnson wrote:
Ewald Ertl wrote:
Hi!
How have you started the script? As far as I could see, in the Chapter 1 of
Dive into Python, the odbchelper.py is just a script-File and not a module
to be imported, therefore
/mailman/listinfo/tutor
--
Ing. Ewald Ertl HartterGruppe Phone :
+43-3352-33085-558
trinomic Projektmanagement Informationstechnik GmbH Fax :
+43-3352-33085-600
Wiener Straße 41mailto:[EMAIL PROTECTED]
A-7400 Oberwart
Hi Shuying!
Shuying Wang wrote:
Hi,
I'm having problems understanding some code I came across:
class Singleton:
__single = None
def __init__( self ):
if Singleton.__single:
raise Singleton.__single
Singleton.__single = self
What does passing
Hi Eli!
You have a lot of calls to input() in your code.
When requesting help on input you get the following output:
help(input)
Help on built-in function input:
input(...)
input([prompt]) - value
Equivalent to eval(raw_input(prompt)).
As you can see, the data you input is put as
Hi!
I made a copy of the source you posted.
I just got a problem as expected when doing the session.login()
because the access-data is invalid.
The connection via the smtplib.SMTP() could be established.
Perhaps there is something wrong with your namelookup.
Can you try a call in the
Hi!
Intercodes wrote:
Ewald,
First off, thanks for stopping by.
The connection via the smtplib.SMTP() could be established.
I dont think so. I think it fails before the login().
--
ex= smtplib.SMTP('smtp.mail.yahoo.com
Hi!
Intercodes wrote:
My nssswitch.conf
--
passwd: compat
group: compat
hosts: files dns
networks: files dns
services: files
protocols: files
rpc:files
ethers: files
netmasks: files
netgroup:
Hi!
Ben Vinger wrote:
Hello
I've been reading about how a class has access to its
own 'self', so I tried the following, but it is not
working as I would expect:
class Skill:
def __init__(self):
self.history = []
def setName(self, skill):
self.name = skill
Hi!
vikas mohan wrote:
Hi all, this is my first program in python.
It's a currency converter mini-program, but I am not getting the desired
output. What wrong am I doing here?
*Program code:*
#converts currencies to Indian rupees
def print_options():
print Options:
Hi!
I quick solution for a name module could be:
import os
for d in os.__dict__:
... a=os. + d
... if callable( eval(a) ):
... print Callable %s % ( eval(a))
but there should also be a recipe on activestate for that problem.
I think I've red something in the Python
Hi Alberto
Alberto Troiano wrote:
Hey tutorslong time don't see...*grin*
I have a question, I've made a web page in PHP and its going to run under
Linux Red Hat 9.0
The page has scripts that has to be on a certain path off the system...I
have to make a CD to give the web page to my
Hi Don!
Don Parris wrote:
The book, Programming Python, shows an example of os.chdir() on the
Windows platform, as follows:
os.chdir(r'c:\temp')
r ... raw Strings. There will no substitution be processed.
Otherwise the \t ( Tab ) will be inserted in the string:
print a\tb
a b
Hi!
I think you just want to execute the rest of the function's in someProcedure().
Perhaps this could be the solution, what you want:
def someProcedure():
... for func in [ someFunc00, someFunc01, someFunc02, someFunc03 ]:
... try:
... func()
...
Hi!
on Thu, 7 Jul 2005 01:13:48 -0600 Nathan Pinno [EMAIL PROTECTED] wrote :
-
Nathan PinnoThanks Wolfram for help with that error.
Nathan Pinno
Nathan PinnoHere's another that popped up:
Hello!
I just looked a little over the code, what it is perhaps ment to do now.
As allready mentioned by Ziyad in your former post:
just call main_menu()
don't print main_menu()
This calls the funciton main_men(), which prints it menu and
after this the print-Command in this line
Mohammad Moghimi
--- end --
--
Ing. Ewald Ertl HartterGruppe Phone :
+43-3352-33085-558
trinomic Projektmanagement Informationstechnik GmbH Fax :
+43-3352-33085-600
Wiener Straße 41mailto
Hi!
you're missing the except-clause in the exception-handling:
on Sun, 3 Jul 2005 21:37:57 -0400 gelsey torres [EMAIL PROTECTED] wrote :
-
gelsey torres I'm new to Python and computer programming in
Hello Phil!
the HTML-Formating look's better than the text-Version.
on Thu, 23 Jun 2005 17:15:59 -0500 Phillip Hart [EMAIL PROTECTED] wrote :
-
Phillip Hart Hello,
Phillip Hart I've been using lists
Hi Shidan!
on Wed, 22 Jun 2005 00:28:44 -0400 Shidan [EMAIL PROTECTED] wrote :
-
Shidan Hi I have a list of regular expression patterns like such:
Shidan
Shidan thelist =
Hi!
I don't know if I'm right here, because I've tested a simple model of what
you're
trying to do:
on Wed, 8 Jun 2005 23:45:59 -0700 Kevin Reeder [EMAIL PROTECTED] wrote :
-
Kevin Reeder import
Hi!
I've the following solution:
for d in [ random. + d for d in dir(random)]:
... if callable( eval(d) ):
... print %30s :\n\n %s % ( d, eval( %s.__doc__ % ( d)))
...
random.Random :
Random number generator base class used by bound module functions.
HTH
Hi!
I don't have a Mac and so I don't know Macpython.
on Fri, 29 Apr 2005 07:55:20 -0500 Servando Garcia [EMAIL PROTECTED] wrote :
-
Servando Garcia Hello and thanks in advance.
Servando Garcia
Hi,
I've slightly modified the for-Loop containing the else and not the if:
x = [[1,2,3],[2,4,6],[8,4,5,6],[9,8,7]]
for num in x:
... if 5 in num:
... break
... else:
... print YES
...
second test:
x = [[1,2,3],[2,4,6],[8,4,6],[9,8,7]]
for num in x:
... if 5
Hi Jim,
on Thu, 14 Apr 2005 01:09:14 -0500 Jim and Laura Ahl [EMAIL PROTECTED]
wrote :
-
Jim and Laura Ahl How come when I ask it to print i[2:4] from an inputted
string it gives me the letters
Hi!
on Fri, 01 Apr 2005 12:01:02 +0200 Adriano Varoli Piazza [EMAIL PROTECTED]
wrote :
-
Adriano Varoli Piazza
Adriano Varoli Piazza def loadfromfile(fname):
Adriano Varoli Piazza try:
Adriano
- Tutor@python.org
Robert Storey http://mail.python.org/mailman/listinfo/tutor
Robert Storey
--- end --
--
Ing. Ewald Ertl HartterGruppe Phone :
+43-3352-33085-558
trinomic Projektmanagement Informationstechnik GmbH Fax
--- end --
--
Ing. Ewald Ertl HartterGruppe Phone :
+43-3352-33085-558
trinomic Projektmanagement Informationstechnik GmbH Fax :
+43-3352-33085-600
Wiener Straße 41mailto:[EMAIL PROTECTED]
A-7400 Oberwart
Hi Paul!
As mentioned earlier by Kent in this group under the subject:
Subject: Re: [Tutor] Downloading from http
Mark Kels wrote:
On Sat, 12 Feb 2005 09:25:10 -0500, Jacob S. [EMAIL PROTECTED] wrote:
urllib or urllib2 or maybe httplib maybe?
urlopen( url[, data])
I'm sorry,
Adam Cripps TIA
Adam Cripps Adam
--- end --
--
Ing. Ewald Ertl HartterGruppe Phone :
+43-3352-33085-558
trinomic Projektmanagement Informationstechnik GmbH Fax :
+43-3352-33085-600
Wiener Straße 41
Hi
on Tue, 1 Mar 2005 15:31:10 + Adam Cripps [EMAIL PROTECTED] wrote :
-
Adam Cripps
Adam Cripps Thanks Ewald - this is what I have so far, with a far from
perfect result:
Adam Cripps
Hello Heiko,
I do not really know what you like to get, but the hex-number's in Python are
usedd
in a numeric representation. As far as I have seen in the interpreter, this
depends
on the value:
a=0xabccddd
type(a)
type 'long'
a=0xaabb
type(a)
type 'int'
If you like to
Hi!
Using binary operations:
a='0x87BE'
str(hex(int(a,16) 0xFF))
'0xbe'
str(hex((int(a,16) 0xFF00) / 0xFF))
'0x87'
HTH Ewald
on Wed, 2 Feb 2005 15:10:36 +0800 jrlen balane [EMAIL PROTECTED] wrote :
with '' is found
i +=1 # if search should continue if another element is present
HTH Ewald
--
Ing. Ewald Ertl HartterGruppe Phone :
+43-3352-33085-558
trinomic Projektmanagement Informationstechnik GmbH Fax :
+43-3352-33085-600
Wiener Straße 41
Hi!
I#m 33, married, 2 Children ( 9 months old girl 3 year old boy ).
We are living in the south of Burgenland in Austria. My mother tounge is
german.
I attended a secondary technical school studed electronics. After school
I started working for a big company creating a power system control
45 matches
Mail list logo