PyProg PyProg wrote:
Hello all,
I want to use an equivalent of sets module with Python 2.6 ... but
sets module is deprecated on 2.6 version.
set is now a built-in type.
Replace sets.Set() with set()
In fact I want to make that but with Python 2.6:
toto_1 = [0, 1, 2, 3, 4]
toto_2 = [1
I've collected my training materials plus a few more advanced
topics and I've also written up a reasonably large set of Python
exercises. Then, I turned all of the above into a "book".
If you have comments, suggestions, corrections, etc, I'll
appreciate them.
You can get it at no cost, in variou
"Chris Lee" wrote
_tkinter.TclError: Couldn't open "base.gif": no such file or directory
... I linked an image to the python file, but the exe can't find it..
(right?)
Correct
> base = pic(file="base.gif")
Now, I'm just wondering... for the "base.gif" part, would it be better
to write
"Stefan Lesicnik" wrote
I am a relative newbie to python and OOP concepts and am trying to
work through wxpython. I've seen understanding classes is essential to
this and have been trying to work through them.
Steve gave you the basic explanation, I'll try a slightly different tack
- which ma
"Skipper Seabold" wrote
tutorial or documentation re OOP and classes?
I've found Alan Gauld's tutorials to be very useful when just getting
started in both OOP and Python.
http://www.freenetpages.co.uk/hp/alan.gauld/
Thanks for the plug :-)
However the URL has changed since freenetpages
Hi tutors,
So I finally made my program. When I run it with python, it works perfectly!
But when I convert it to an executable using py2exe (correctly), I get an error:
Traceback (most recent call last):
File "oentry.py", line 52, in
File "Tkinter.pyc", line 3270, in __init__
On Fri, Apr 10, 2009 at 5:08 PM, Sander Sweers wrote:
> Hello Tutors,
>
> I am having some issues with a malformed tag in a html page.
> BeautifulSoup barfs with the following.
>
> raceback (most recent call last):
> File "C:\Python25\lib\HTMLParser.py", line 115, in error
> raise HTMLParseEr
Hello Tutors,
I am having some issues with a malformed tag in a html page.
BeautifulSoup barfs with the following.
raceback (most recent call last):
File "", line 1, in
tsoup = BeautifulSoup(readPage('http://url.sanitized'))
File "C:\Python25\lib\site-packages\BeautifulSoup.py", line 149
On Fri, Apr 10, 2009 at 08:44:37PM +0200, Stefan Lesicnik wrote:
> I am a relative newbie to python and OOP concepts and am trying to
> work through wxpython. I've seen understanding classes is essential to
> this and have been trying to work through them.
Welcome! If you're really new, wxpython
On Fri, Apr 10, 2009 at 2:44 PM, Stefan Lesicnik wrote:
> I guess as a general kind of question, can anyone recommend some
> tutorial or documentation re OOP and classes?
I've found Alan Gauld's tutorials to be very useful when just getting
started in both OOP and Python.
http://www.freenetpages
Hi guys,
I am a relative newbie to python and OOP concepts and am trying to
work through wxpython. I've seen understanding classes is essential to
this and have been trying to work through them.
I have a few questions re the below code (i suspect its due to a lack
of my understanding of classes)
In my last e-mail I think I suggested making an Item object. This time I'll
suggest an ItemCollection object. Now you can have an Add(self, item) that
could validate. This could be some rather simple loop and test logic.
--
Ronald Weidner
From: tutor-bounces+rweidner=ea@python.org
[mai
On Fri, Apr 10, 2009 at 12:34 PM, C or L Smith wrote:
> Unum is a module that allows one to handle units with numbers, e.g. 3*M -> 3
> [m], a measurement of 3 meters.
>
> I have a module that I wrote some time ago that handles uncertainties with
> numbers as they are involved with calculations.
On Fri, Apr 10, 2009 at 1:12 PM, Sander Sweers wrote:
> results = []
>
> for line in text_file:
> if 'FULLNAME' in line and line not in results:
> results.append(line)
> write_file.write(line)
In general it is better to use a set for this kind of application, it
will have much be
2009/4/10 Spencer Parker :
> The question is now...what do I do to find duplicate entries in the text
> file I am reading. I just want to filter them out. There are a ton of
> duplicate entries in there.
>>> for line in text_file: # No need for readlines(), a file is iterable
>>> if 'FULLNAME
The question is now...what do I do to find duplicate entries in the text
file I am reading. I just want to filter them out. There are a ton of
duplicate entries in there.
On Fri, Apr 10, 2009 at 10:43 AM, Spencer Parker wrote:
> Oh...nice...this makes things much easier than what I had before.
Unum is a module that allows one to handle units with numbers, e.g. 3*M -> 3
[m], a measurement of 3 meters.
I have a module that I wrote some time ago that handles uncertainties with
numbers as they are involved with calculations. Let's call it the pnum module
(for physical numbers) e.g. pnum(
On Friday 10 April 2009 09:41:13 am johnf wrote:
> On Friday 10 April 2009 08:35:13 am johnf wrote:
> > I can get the following to work:
> > os.system('lp -d printer invoice.pdf')
> >
> > but what I think is the correct way for the future is:
> > subprocess.Popen('lp -d printer invoice.pdf')
> > an
Oh...nice...this makes things much easier than what I had before.
I mainly used writelines because I couldn't figure out why it was only
writing one line. Then I did and never took out the writelines...I just did
and it works just fine for the most part.
Thanks again for the help.
On Fri, Apr 1
On Friday 10 April 2009 08:35:13 am johnf wrote:
> I can get the following to work:
> os.system('lp -d printer invoice.pdf')
>
> but what I think is the correct way for the future is:
> subprocess.Popen('lp -d printer invoice.pdf')
> and it does not work???
>
> Can someone explain what I'm doing wr
I can get the following to work:
os.system('lp -d printer invoice.pdf')
but what I think is the correct way for the future is:
subprocess.Popen('lp -d printer invoice.pdf')
and it does not work???
Can someone explain what I'm doing wrong?
Traceback (most recent call last):
File "/home/johnf/
On Fri, Apr 10, 2009 at 12:04 PM, Spencer Parker wrote:
>
> This is my code:
> http://pastebin.com/m11053edf
I guess you have something like this now:
for line in text_file.readlines():
if line.find('FULLNAME')>=0:
write_file.writelines(line)
This can be better written a
I forgot to respond back to the list:
The only info I really need is the name. So I have been using readlines()
to go through and find the lines that have fullname,
if line.find("FULLNAME")>=0:
I am now having issues with it writing it to a file.
This is my code:
http://pastebin.com/m11053edf
I have a flat file database that I want to get information from. The basic
text looks like this:
ITEM{
"FULLNAME" "apps114.chgit.com!file:/etc"
"RECOVERY" "0"
}
They are all on a separate line in the text file. I had thought about
trying to drop it into a list or a
"Spencer Parker" wrote in message
I have a flat file database that I want to get information from. The
basic
text looks like this:
ITEM{
"FULLNAME" "apps114.chgit.com!file:/etc"
"RECOVERY" "0"
}
They are all on a separate line in the text file. I had thought ab
I have a flat file database that I want to get information from. The basic
text looks like this:
ITEM{
"FULLNAME" "apps114.chgit.com!file:/etc"
"RECOVERY" "0"
}
They are all on a separate line in the text file. I had thought about
trying to drop it into a list or a
Title: Signature.html
Thanks. Interesting.
BTW, the short one didn't work, but the long one did. It's always a
good idea to put <> around a url. It keeps the url on one line.
Ken Oliver wrote:
Try this:
http://www.ask.com/bar?q=what+is+daniweb&page=1&qsrc=121&ab=0&u=http%3A%2F%2F
On Fri, Apr 10, 2009 at 4:59 AM, ShivKumar Anand wrote:
> I have to implement HL7 in my existing application.
> so, I have to send/receive messages which are in a text file (not
> implementing v3.0, in which the messages are in xml format)
Googling "python hl7" finds a couple of hints for the se
Thanks Alan for reply.
I have to implement HL7 in my existing application.
so, I have to send/receive messages which are in a text file (not implementing
v3.0, in which the messages are in xml format)
I found tutorial on socket programming and trying from that.
By importing socket.
"ShivKumar Anand" wrote
I have developed an application in Python 2.4.2, TurboGears 1.0, cherryPy
2.3.1.
Well done.
Now, I have to develop a server, which listens to a specific port (104)
and save the file to a specific location (/tmp/myDir) on RHEL 4/5.
Does this server have anything to
Title: Signature.html
Try this:http://www.ask.com/bar?q=what+is+daniweb&page=1&qsrc=121&ab=0&u=http%3A%2F%2Fwww.daniweb.com%2Fforums%2Ffaq.php%3Ffaq%3Ddaniweb_faqor shorterhttp://tinyurl.com/cfsvpa-Original Message-
From: Wayne Watson
Sent: Apr 9, 2009 11:52 PM
To: "tutor@python.org"
Subj
31 matches
Mail list logo