On Tue, Sep 30, 2008 at 12:04 PM, Ken D'Ambrosio [EMAIL PROTECTED] wrote:
First, apologies for such a newbie question; if there's a better forum (I've
poked around, some) feel free to point it out to me. Anyway, a mere 25-odd
years after first hearing about OOP, I've finally decided to go
rmac a écrit :
Ah! Arghh!!! You are so correct on the usage of the ':'
Python syntax is a little different from what I am used to.
I don't know what you're used to, but chances are that more than the
syntax differs !-)
--
http://mail.python.org/mailman/listinfo/python-list
rmac a écrit :
the following code attempts to extract a symbol name from a string:
extensionStart = int(filename.rfind('.'))
rfind returns an int, so passing it to the int type constructor is useless.
filenameStart = int(filename.rfind('/'))
idem
#print 'Extension Start - '
the following code attempts to extract a symbol name from a string:
extensionStart = int(filename.rfind('.'))
filenameStart = int(filename.rfind('/'))
#print 'Extension Start - ' + str(extensionStart)
#print 'FileName Start - ' + str(filenameStart)
rmac wrote:
the following code attempts to extract a symbol name from a string:
extensionStart = int(filename.rfind('.'))
filenameStart = int(filename.rfind('/'))
#print 'Extension Start - ' + str(extensionStart)
#print 'FileName Start - ' + str(filenameStart)
currentSymbol=filename[int(filenameStart),int(extensionStart)]
Should be
currentSymbol=filename[int(filenameStart):int(extensionStart)]
(change , to :)
You don't need to convert to int all the time, rfind will return an
integer.
Also you can use os.path for this
from os.path import
Ah! Arghh!!! You are so correct on the usage of the ':'
Python syntax is a little different from what I am used to.
Thank you.
--
http://mail.python.org/mailman/listinfo/python-list
for example:
X.py is in aaa.bbb and it has a line like import aaa.bbb.Y
how can I run X.py avoiding it saying such like ImportError: No
module named aaa.bbb?
Is all runnable script must be in the default package?
thanks.
--
http://mail.python.org/mailman/listinfo/python-list
neoedmund schrieb:
for example:
X.py is in aaa.bbb and it has a line like import aaa.bbb.Y
how can I run X.py avoiding it saying such like ImportError: No
module named aaa.bbb?
Is all runnable script must be in the default package?
There is no such thing as a default package
All imports are
On Sep 5, 8:12 pm, Diez B. Roggisch [EMAIL PROTECTED] wrote:
neoedmund schrieb:
for example:
X.py is in aaa.bbb and it has a line like import aaa.bbb.Y
how can I run X.py avoiding it saying such like ImportError: No
module named aaa.bbb?
Is all runnable script must be in the default
hi all,
i am new to python.
i fetch a webpage with urllib, extract a few numbers in a format as follow;
10,884
24,068
my question is how to remove the comma between the number, since i have to
add them up later.
sorry for my bad english.
--
http://mail.python.org/mailman/listinfo/python-list
sharon k wrote:
hi all,
i am new to python.
i fetch a webpage with urllib, extract a few numbers in a format as follow;
10,884
24,068
my question is how to remove the comma between the number, since i have
to add them up later.
Strings have a replace method. Calling replace(,, ) on the
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi sharon,
as I understand, you want to remove certain characters of a string. Try:
number = int(fetched_number.replace(',', ''))
this will first remove any , characters and then convert the string
into an integer.
Best,
Manuel
On Aug 25,
thank you for your prompt reply.
sorry seems i run into another problem, as follow;
a = 12,123
b = str(a)
c = int(b.replace(',', ''))
Traceback (most recent call last):
File stdin, line 1, in module
ValueError: invalid literal for int() with base 10: '(12 123)'
the comma has
Hi sharon,
the problem is here that
a = 12,123
will actually create a tuple with two elements (namely 12 and 123):
a = 12,123
a
(12, 123)
Converting this to a string yields '(12, 123)', which is not what you
want (sounds confusing, bit soon you'll see how many amazing things
can be done
much thanks, your instructions are clear, problem solved!
:)
On Mon, Aug 25, 2008 at 11:43 PM, Manuel Ebert [EMAIL PROTECTED] wrote:
Hi sharon,
the problem is here that
a = 12,123
will actually create a tuple with two elements (namely 12 and 123):
a = 12,123
a
(12, 123)
Converting
En Fri, 22 Aug 2008 18:25:49 -0300, n00m [EMAIL PROTECTED] escribió:
Is it possible to communicate in loop fashion?
import subprocess as s
proc = s.Popen('cmd.exe', stdin=s.PIPE, stdout=s.PIPE)
while 1:
cmd = raw_input('cmd:')
res =
Is it possible to communicate in loop fashion?
import subprocess as s
proc = s.Popen('cmd.exe', stdin=s.PIPE, stdout=s.PIPE)
while 1:
cmd = raw_input('cmd:')
res = proc.communicate(cmd + '\n')[0]
print res
En Tue, 19 Aug 2008 16:48:26 -0300, aditya shukla
[EMAIL PROTECTED] escribi�:
I am using windows vista and i am trying to send data to the command
prompt
,this is what is done.
import subprocess
proc =subprocess.Popen('cmd.exe',stdin=subprocess.PIPE)
proc.communicate('abc')
when i run this
Hello folks,
I am using windows vista and i am trying to send data to the command prompt
,this is what is done.
import subprocess
proc =subprocess.Popen('cmd.exe',stdin=subprocess.PIPE)
proc.communicate('abc')
when i run this the command prompt just blinks and disappears , can anyone
explain
Try this:
# The player tries to guess it and the computer lets
# the player know if the guess is too high, too low
# or right on the money
import random
print \tWelcome to 'Guess My Number'!
print \nI'm thinking of a number between 1 and 100.
print Try to guess it in as few attempts as
stuck on python for absolute beginners
chapter 6
i actually done what i was supposed to do use the function ask_number for guess
a number
but for some reason it does not count correctly the number of tries
# Guess My Number
#
# The computer picks a random number between 1 and 100
# The
garywood wrote:
stuck on python for absolute beginners
chapter 6
i actually done what i was supposed to do use the function ask_number
for guess a number
but for some reason it does not count correctly the number of tries
# Guess My Number
#
# The computer picks a random number between 1
:[EMAIL PROTECTED] Behalf Of garywood
Sent: Thursday, August 07, 2008 1:56 PM
To: python-list@python.org
Subject: very newbie question
stuck on python for absolute beginners
chapter 6
i actually done what i was supposed to do use the function ask_number for guess
a number
but for some reason
Hello! I am writing some software that will have many users accessing
the same file resource at once for reading purposes only. I am
programming on (Ubuntu) Linux and my question is in Windows, can I
have it so that the same file can be open in read mode by more than
one person or could Window's
Sparky wrote:
Hello! I am writing some software that will have many users accessing
the same file resource at once for reading purposes only. I am
programming on (Ubuntu) Linux and my question is in Windows, can I
have it so that the same file can be open in read mode by more than
one person or
On Jul 15, 11:38 am, Tim Golden [EMAIL PROTECTED] wrote:
Sparky wrote:
Hello! I am writing some software that will have many users accessing
the same file resource at once for reading purposes only. I am
programming on (Ubuntu) Linux and my question is in Windows, can I
have it so that
Hi list,
i'm running Ubuntu Hardy Desktop and i've installed Tim Golden WMI.
However importing wmi module i have this error:
import wmi
Traceback (most recent call last):
File stdin, line 1, in module
File /usr/lib/python2.5/site-packages/wmi.py, line 141, in module
from win32com.client
So, i can't use wmi module on linux?
On Wed, Jul 9, 2008 at 9:14 AM, Lamonte Harris [EMAIL PROTECTED] wrote:
I think the win32 module is only for windows.
--
http://mail.python.org/mailman/listinfo/python-list
On 2008-07-09, |e0 [EMAIL PROTECTED] wrote:
So, i can't use wmi module on linux?
On Wed, Jul 9, 2008 at 9:14 AM, Lamonte Harris [EMAIL PROTECTED] wrote:
I think the win32 module is only for windows.
Welcome to the world outside MS.
Many python modules don't actually do anything than passing
A.T.Hofkamp wrote:
On 2008-07-09, |e0 [EMAIL PROTECTED] wrote:
So, i can't use wmi module on linux?
On Wed, Jul 9, 2008 at 9:14 AM, Lamonte Harris [EMAIL PROTECTED] wrote:
I think the win32 module is only for windows.
Welcome to the world outside MS.
Many python modules don't actually do
I did not mean to use WMI on linux, but query win machines *from* linux.
Thank you for your clarifications
- Leonardo
On Wed, Jul 9, 2008 at 11:04 AM, A.T.Hofkamp [EMAIL PROTECTED] wrote:
Welcome to the world outside MS.
Many python modules don't actually do anything than passing on calls to
|e0 wrote:
I did not mean to use WMI on linux, but query win machines *from* linux.
Thank you for your clarifications
In principle you ought to be able to use some kind of DCOM bridge
(since WMI access if via COM/DCOM). I've no idea if anyone's attempted
this or even if all the pieces are in
|e0 wrote:
I did not mean to use WMI on linux, but query win machines *from* linux.
What do you mean by query? Using the WMI module? No. It's Windows only.
Diez
--
http://mail.python.org/mailman/listinfo/python-list
On Jul 9, 2:19 am, |e0 [EMAIL PROTECTED] wrote:
So, i can't use wmi module on linux?
On Wed, Jul 9, 2008 at 9:14 AM, Lamonte Harris [EMAIL PROTECTED] wrote:
I think the win32 module is only for windows.
WMI is a Windows thing. It stands for Windows Management
Instrumentation. So it's not
On Jul 7, 7:09 pm, Jeff [EMAIL PROTECTED] wrote:
When you call c3.createJoe(c1.fred), you are passing a copy of the
value stored in c1.fred to your function. Python passes function
parameters by value.
No, python doesn't pass variable either by value or by reference. The
behavior in python is
Why can I not the change the value of a variable in another class,
when I have passed it via a parameter list.
I am sure I am being stupid, but I thought passed objects were Read/
Write
eg
#!/usr/bin/python
class one(): #my Global
mcl wrote:
Why can I not the change the value of a variable in another class,
when I have passed it via a parameter list.
I am sure I am being stupid, but I thought passed objects were Read/
Write
In Python, there are names which are bound to objects. Doing foo = bar
and then foo = spam
When you call c3.createJoe(c1.fred), you are passing a copy of the
value stored in c1.fred to your function. Python passes function
parameters by value. The function will not destructively modify its
arguments; you must expliticly state your intention to modify an
object:
class one():
fred
On 7 Jul, 13:09, Jeff [EMAIL PROTECTED] wrote:
When you call c3.createJoe(c1.fred), you are passing a copy of the
value stored in c1.fred to your function. Python passes function
parameters by value. The function will not destructively modify its
arguments; you must expliticly state your
mcl wrote:
On 7 Jul, 13:09, Jeff [EMAIL PROTECTED] wrote:
When you call c3.createJoe(c1.fred), you are passing a copy of the
value stored in c1.fred to your function. Python passes function
parameters by value. The function will not destructively modify its
arguments; you must expliticly
On Mon, Jul 7, 2008 at 7:30 AM, mcl [EMAIL PROTECTED] wrote:
I did not think you had to make the distinction between 'byvar' and
'byref' as in Basic.
Python does not use call by value or call by reference semantics.
Instead, python's model is call by object. See this writeup for
some details:
On Mon, 7 Jul 2008 05:41:22 -0700 (PDT), mcl [EMAIL PROTECTED] wrote:
[snip]
My use of classes is because I want two classes one for global
variables and one for global functions.
One of the many lovely things about programming in the
Python style is that very few things need to be global.
Jerry Hill wrote:
On Mon, Jul 7, 2008 at 7:30 AM, mcl [EMAIL PROTECTED] wrote:
I did not think you had to make the distinction between 'byvar' and
'byref' as in Basic.
Python does not use call by value or call by reference semantics.
Instead, python's model is call by object. See this
On Jul 7, 5:07 pm, Dennis Lee Bieber [EMAIL PROTECTED] wrote:
On Mon, 7 Jul 2008 05:41:22 -0700 (PDT), mcl [EMAIL PROTECTED]
declaimed the following in comp.lang.python:
My use of classes is because I want two classes one for global
variables and one for global functions.
Which
Jeff wrote:
When you call c3.createJoe(c1.fred), you are passing a copy of the
value stored in c1.fred to your function. Python passes function
parameters by value.
These statements are both wrong. Function argument objects or objects
derived therefrom are bound to function parameter
idiolect wrote:
On Jun 25, 7:26 pm, Terry Reedy [EMAIL PROTECTED] wrote:
idiolect wrote:
Hi all - Sorry to plague you with another newbie question from a
lurker. Hopefully, this will be simple.
I have a list full of RGB pixel values read from an image. I want to
test each RGB band
Hi all - Sorry to plague you with another newbie question from a
lurker. Hopefully, this will be simple.
I have a list full of RGB pixel values read from an image. I want to
test each RGB band value per pixel, and set it to something else if it
meets or falls below a certain threshold - i.e
On Jun 25, 2:37 pm, idiolect [EMAIL PROTECTED] wrote:
Hi all - Sorry to plague you with another newbie question from a
lurker. Hopefully, this will be simple.
I have a list full of RGB pixel values read from an image. I want to
test each RGB band value per pixel, and set it to something
On Jun 26, 7:37 am, idiolect [EMAIL PROTECTED] wrote:
Hi all - Sorry to plague you with another newbie question from a
lurker. Hopefully, this will be simple.
I have a list full of RGB pixel values read from an image. I want to
test each RGB band value per pixel, and set it to something
First, I second Matt's comment about using a boring old for loop when
it is the simplest way to express what you want to do. Being Pythonic
is not about using exotic features to scrunch your code down to a cool
one-liner. It is about expressing your intentions in a simple, direct
way. Sometimes
idiolect wrote:
Hi all - Sorry to plague you with another newbie question from a
lurker. Hopefully, this will be simple.
I have a list full of RGB pixel values read from an image. I want to
test each RGB band value per pixel, and set it to something else if it
meets or falls below a certain
On Jun 25, 7:26 pm, Terry Reedy [EMAIL PROTECTED] wrote:
idiolect wrote:
Hi all - Sorry to plague you with another newbie question from a
lurker. Hopefully, this will be simple.
I have a list full of RGB pixel values read from an image. I want to
test each RGB band value per pixel
On Wed, 25 Jun 2008 16:02:52 -0700, John Machin wrote:
Here's one approach (requires Python 2.5 or later):
[(50 if x 50 else x, 50 if y 50 else y, 50 if z 50 else z) for
(x, y, z) in source]
[(max(x, 50), max(y, 50), max(z, 50)) for (x, y, z) in source]
--
09 F9 11 02 9D 74 E3 5B D8 41
En Mon, 16 Jun 2008 22:51:30 -0300, John Salerno [EMAIL PROTECTED] escribió:
takayuki wrote:
I'm early on in my python adventure so I'm not there yet on the strip
command nuances.I'm reading How to think like a python
programmer first. It's great.
Then Learning python. I've read
Gabriel Genellina wrote:
En Mon, 16 Jun 2008 22:51:30 -0300, John Salerno [EMAIL PROTECTED] escribió:
takayuki wrote:
I'm early on in my python adventure so I'm not there yet on the strip
command nuances.I'm reading How to think like a python
programmer first. It's great.
Then Learning
On Jun 16, 2:35 pm, takayuki [EMAIL PROTECTED] wrote:
def hasnolet2(avoid):
fin = open('animals.txt')
for line in fin:
word = line.strip()
length = len(avoid)
x = 0
noprint = 0
while length -1 = x:
if
takayuki [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
John: There were two inchworms because c is in inchworm so it
shouldn't print. Thanks for your detailed description of the for
loop.
lol, I even sat there looking at the word and said to myself ok, it doesn't
contain any of
takayuki [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
fin = open('animals.txt')
for line in fin:
You can write this as:
for line in open('animals.txt'):
#do stuff
Of course, you can't explicitly close the file this way, but that probably
doesn't matter. Another way, I
On Jun 16, 7:17 am, Paul Hankin [EMAIL PROTECTED] wrote:
On Jun 16, 2:35 pm, takayuki [EMAIL PROTECTED] wrote:
def hasnolet2(avoid):
fin = open('animals.txt')
for line in fin:
word = line.strip()
length = len(avoid)
x = 0
On Jun 15, 6:23 pm, takayuki [EMAIL PROTECTED] wrote:
def hasnolet(avoid):
fin = open('animals.txt')
for line in fin:
word = line.strip()
for letter in avoid:
if letter in word:
break
On Jun 16, 2:34 pm, Thomas Hill [EMAIL PROTECTED] wrote:
On Jun 15, 6:23 pm, takayuki [EMAIL PROTECTED] wrote:
def hasnolet(avoid):
fin = open('animals.txt')
for line in fin:
word = line.strip()
for letter in avoid:
Paul,
Thank you for the informative reply.
Yes, I created the indent problem when manually copying the original
script when I posted. (I'm using an old laptop to study python and
posting here using the desktop.)
Your examples really helped. Last night I played with using a for
loop instead of
On Jun 17, 6:34 am, Thomas Hill [EMAIL PROTECTED] wrote:
On Jun 15, 6:23 pm, takayuki [EMAIL PROTECTED] wrote:
def hasnolet(avoid):
fin = open('animals.txt')
for line in fin:
word = line.strip()
for letter in avoid:
takayuki wrote:
I'm early on in my python adventure so I'm not there yet on the strip
command nuances.I'm reading How to think like a python
programmer first. It's great.
Then Learning python. I've read parts of Dive into Python and will
work through it fully when I'm a little farther
takayuki wrote:
Paul,
Thank you for the informative reply.
Yes, I created the indent problem when manually copying the original
script when I posted. (I'm using an old laptop to study python and
posting here using the desktop.)
Your examples really helped. Last night I played with using a
Hi,
I'm studying python via the exellent book How to think like a python
programmer by Allen Downey.
Noob question follows...
animals.txt is a list of animals, each on a separate line: aardvard,
bat, cat, dog, elephant, fish, giraffe, horse, insect, jackelope
I want to loop through the list of
In article
[EMAIL PROTECTED],
takayuki [EMAIL PROTECTED] wrote:
Hi,
I'm studying python via the exellent book How to think like a python
programmer by Allen Downey.
Noob question follows...
animals.txt is a list of animals, each on a separate line: aardvard,
bat, cat, dog, elephant,
On 09:23, lunedì 16 giugno 2008 takayuki wrote:
word = line.strip()
Try
word= line.split()
and at the end of the loop add one more print to go to new line.
--
Mailsweeper Home : http://it.geocities.com/call_me_not_now/index.html
--
http://mail.python.org/mailman/listinfo/python-list
takayuki wrote:
for letter in avoid:
if letter in word:
break
else:
print word
Take the word 'dog', for example. What the above loop is doing is
basically this:
takayuki wrote:
inchworm
inchworm
P.S. Why does 'inchworm' only print twice? Or is that not the full output?
--
http://mail.python.org/mailman/listinfo/python-list
Thanks to everyone for the excellent advice.
Roy: I did as you suggested and could see after staring at the output
for awhile what was going on. The print statements really helped to
put a little light on things. Yes, I agree that learning to fish is
the best way.
John: There were two
You won't believe how helpful your reply was. I was looking for a
problem that did not exist.
You wrote : (3) why you think you need to have data.decode(.)
at all
and after that : (7) are you expecting non-ASCII characters after
H_C= ? what
characters? when you open your xml file in a
Johannes Bauer [EMAIL PROTECTED] wrote:
import time
localtime = time.localtime(1234567890)
fmttime = %04d-%02d-%02d %02d:%02d:%02d % (localtime[0], localtime[1],
localtime[2], localtime[3], localtime[4], localtime[5])
print fmttime
fmttime = %04d-%02d-%02d %02d:%02d:%02d % ([localtime[i]
Johannes Bauer wrote:
Hello group,
I'm currently doing something like this:
import time
localtime = time.localtime(1234567890)
fmttime = %04d-%02d-%02d %02d:%02d:%02d % (localtime[0], localtime[1],
localtime[2], localtime[3], localtime[4], localtime[5])
print fmttime
For the third line
I just spent a whole day trying to read an xml file and I got stuck
with the following error:
Exception Type: UnicodeEncodeError
Exception Value:'charmap' codec can't encode characters in position
164-167: character maps to undefined
Exception Location:
On Jun 8, 10:12 am, nikosk [EMAIL PROTECTED] wrote:
I just spent a whole day trying to read an xml file and I got stuck
with the following error:
Exception Type: UnicodeEncodeError
Exception Value:'charmap' codec can't encode characters in position
164-167: character maps to
Hello group,
I'm currently doing something like this:
import time
localtime = time.localtime(1234567890)
fmttime = %04d-%02d-%02d %02d:%02d:%02d % (localtime[0], localtime[1],
localtime[2], localtime[3], localtime[4], localtime[5])
print fmttime
For the third line there is, I suppose, some
Johannes Bauer wrote:
Hello group,
I'm currently doing something like this:
import time
localtime = time.localtime(1234567890)
fmttime = %04d-%02d-%02d %02d:%02d:%02d % (localtime[0], localtime[1],
localtime[2], localtime[3], localtime[4], localtime[5])
print fmttime
For the third line
Hans Nowak schrieb:
In this case, you can just use a slice, as localtime is a tuple:
fmttime = %04d-%02d-%02d %02d:%02d:%02d % localtime[:6]
Hope this helps! ^_^
Ahh, how cool! That's *exactly* what I meant with awesome Python magic :-)
Amazing language, I have to admit.
Regards,
hi everyone,
I'm totally new to SOAP.
Can anyone help with this soap question.
I'm trying to use soaplib.
I can't find many examples on using soaplib and what I have below if the
standard hello world example I find online.
Say I want to call the zzz service at yyy.
I know that the service
you put your pth file in (same configuration:
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-
packages/
--
http://mail.python.org/mailman/listinfo/python-list
Robbie wrote:
I can't seem to figure out where to put this file so that Python will
recognize it when I start it up.
You need to put this file in your site-packages directory.
To get the location of your site-packages directory, type in Python
interactive shell:
from distutils.sysconfig
Hello All,
Hopefully this is an easy question: I'd like to use a .pth file on my
Macintosh so that I can easily import modules that I've created in my
own working directory. I've created a file called Robbie.pth. It
includes a single line:
/Robbie/PythonWork
I can't seem to figure out where
Hmmm, for lack of a better response, here are some suggestions, based
on what I've seen on Windows+Linux.
#1 put the .pth in the site-packages directory (this is what I do on
Linux). I think Python considers it special and looks for pth.
you can probably get that directory from doing
import
Nick Craig-Wood a écrit :
Banibrata Dutta [EMAIL PROTECTED] wrote:
I've gone through the list of language differences between 2.3 / 2.4
2.5 of CPython. I've spend around 2 weeks now, learning v2.5 of
CPython, and I consider myself still very very newbie. So, unable to
take a call as to
On 5/6/08, Bruno Desthuilliers
[EMAIL PROTECTED] wrote:
Nick Craig-Wood a écrit :
Banibrata Dutta [EMAIL PROTECTED] wrote:
I've gone through the list of language differences between 2.3 / 2.4
2.5 of CPython. I've spend around 2 weeks now, learning v2.5 of
CPython, and I consider
2.5 seems the defacto standard now for a new user, NB: probably not
the standard for the common business productions. However are you on
Windows or *nix? *nix may ship a certain version, so for ease of use
it would be best to use that.
Personally I use 2.5 because it is a complete version, and
Banibrata Dutta [EMAIL PROTECTED] wrote:
As such 2.6 3.0 are also cooking, but from what I see on the mailing
list, some of the features are a bit controversial. So if I start with
2.5 now, unless there are some break-thru preformance gains, or
annoying defects fixed, I'd stick to it. If
Hi,
I've gone through the list of language differences between 2.3 / 2.4
2.5 of CPython. I've spend around 2 weeks now, learning v2.5 of
CPython, and I consider myself still very very newbie. So, unable to
take a call as to how-important or desirable the newer language
features are -- so whether
Banibrata Dutta [EMAIL PROTECTED] wrote:
I've gone through the list of language differences between 2.3 / 2.4
2.5 of CPython. I've spend around 2 weeks now, learning v2.5 of
CPython, and I consider myself still very very newbie. So, unable to
take a call as to how-important or desirable
On Sat, Apr 26, 2008 at 4:14 AM, Gabriel Genellina
[EMAIL PROTECTED] wrote:
The short answer is: don't do that! __init__.py may import any module, but
other modules in the package should not import anything from __init__.py
The same rule applies to the main module in an application: it can
Hi all. I'm trying to do something with python import but isn't working for me.
Using python 2,5 I've a program structured like this:
* a main module called (for example) mommy with an __init__.py and a
file called mommy.py
* a __version__ var defined inside the main __init__.py
From the
Luca wrote:
Hi all. I'm trying to do something with python import but isn't working for me.
Using python 2,5 I've a program structured like this:
* a main module called (for example) mommy with an __init__.py and a
file called mommy.py
* a __version__ var defined inside the main __init__.py
On 25 Apr., 20:03, Luca [EMAIL PROTECTED] wrote:
Hi all. I'm trying to do something with python import but isn't working for
me.
Using python 2,5 I've a program structured like this:
* a main module called (for example) mommy with an __init__.py and a
file called mommy.py
* a __version__
I'm working with the HTMLParser module and have implemented
HTMLParser.handle_starttag() and I see there is a separate handle_data
method (which can be implemented), but I am not clear how to tie this
together with a given start tag, so I only get the data I want.
For example, I'd like to get a
I'm working with the HTMLParser module and have implemented
HTMLParser.handle_starttag() and I see there is a separate
handle_data
method (which can be implemented), but I am not clear how to tie this
together with a given start tag, so I only get the data I want.
For example, I'd like to get a
En Fri, 25 Apr 2008 19:35:58 -0300, John [EMAIL PROTECTED] escribió:
I'm working with the HTMLParser module and have implemented
HTMLParser.handle_starttag() and I see there is a separate
handle_data
method (which can be implemented), but I am not clear how to tie this
together with a given
En Fri, 25 Apr 2008 15:03:18 -0300, Luca [EMAIL PROTECTED] escribió:
Hi all. I'm trying to do something with python import but isn't working
for me.
Using python 2,5 I've a program structured like this:
* a main module called (for example) mommy with an __init__.py and a
file called
Thanks for the tip!
--
http://mail.python.org/mailman/listinfo/python-list
601 - 700 of 1781 matches
Mail list logo