On Oct 25, 9:04 pm, rh0dium wrote:
> On Oct 22, 9:05 pm, Carl Banks wrote:
> > This should suffice for you:
>
> > class Borg(object):
> > __shared_state = {}
> > def __init__(self, noSend=False,reportLevel=30,
> > reportMethods="BaseReport",
> > contacts=
PyQt is what we use at work and it is excellent and easy to learn too! I
definitely recommend it.
-Original Message-
From: Philip Semanchuk [mailto:phi...@semanchuk.com]
Sent: 26 October 2009 03:42 AM
To: Python-list (General)
Subject: Re: Python GUI
On Oct 25, 2009, at 8:39 PM, Ronn
On Sat, 24 Oct 2009 00:19:12 +, kj wrote:
> I like Python a lot, and in fact I'm doing most of my scripting in
> Python these days, but one thing that I absolutely *DETEST*
> about Python is that it does allow an internal function to modify
> variables in the enclosing local scope.
Yo
On Sat, 24 Oct 2009 00:19:12 +, kj wrote:
> I like Python a lot, and in fact I'm doing most of my scripting in
> Python these days, but one thing that I absolutely *DETEST*
> about Python is that it does allow an internal function to modify
> variables in the enclosing local scope.
Yo
"Dave Angel" wrote in message
news:4ae43150.9010...@ieee.org...
Joe wrote:
For the reason BK explained, the important difference is that I ran in
the IDLE shell, which handles screen printing of unicode better ;-)
Something still does not seem right here to me.
In the example above the by
On Sun, Oct 25, 2009 at 4:47 PM, Peng Yu wrote:
> Although, python can be used to provide web service. The following
> webpage also mentioned, "Apache the best and most widely used web
> server on the Internet today, check it out. If you want to run your
> own web server this is the one to get, yo
Carl,
First off - Thanks your post was exactly the kind of informative
example driven learnings that help — Thanks!!
On Oct 22, 9:05 pm, Carl Banks wrote:
>
> Before we get into object semantics, I'm not sure why you'd need to
> override __new__ for Borg pattern, unless they're working around
On 2009-10-26, Philip Semanchuk wrote:
>
> On Oct 25, 2009, at 8:39 PM, Ronn Ross wrote:
>
>> I need to create a gui for python. I'm looking for something that is
>> easy to
>> learn and cross platform. Any suggestions? If you have any good
>> tutorials
>> please send along. Thanks in advance.
On Sun, Oct 25, 2009 at 10:03 PM, Ronn Ross wrote:
> Philip,
>
> PySide looks nice and you are right it is still very young. I'm still going
> to give it a try. Thanks for your help.
>
> On Sun, Oct 25, 2009 at 9:41 PM, Philip Semanchuk
> wrote:
>>
>> On Oct 25, 2009, at 8:39 PM, Ronn Ross wrote:
Philip,
PySide looks nice and you are right it is still very young. I'm still going
to give it a try. Thanks for your help.
On Sun, Oct 25, 2009 at 9:41 PM, Philip Semanchuk wrote:
>
> On Oct 25, 2009, at 8:39 PM, Ronn Ross wrote:
>
> I need to create a gui for python. I'm looking for something
On Oct 25, 2009, at 8:39 PM, Ronn Ross wrote:
I need to create a gui for python. I'm looking for something that is
easy to
learn and cross platform. Any suggestions? If you have any good
tutorials
please send along. Thanks in advance.
wxPython (which wraps wxWidgets) is popular and IMO re
>
> Anyway, for simple web programming, frameworks are not worth the
> hassle. Just use the cgi module.
>
>
I can vouch for what Paul says. I started in Python 3 years ago, and I did
so with a web application (still working on it!). I'm using the cgi
approach, and it certainly teaches you the conc
On 25 Oct, 11:52 pm, a...@baselinedata.co.uk wrote:
I am very much new to Python, and one of my first projects is a simple
data-based website. I am starting with Python 3.1 (I can hear many of
you shouting "don't - start with 2.6"), but as far as I can see, none
of the popular python-to-web fr
Alan Harris-Reid writes:
> I am very much new to Python, and one of my first projects is a simple
> data-based website. I am starting with Python 3.1 (I can hear many of
> you shouting "don't - start with 2.6"), but as far as I can see, none
> of the popular python-to-web frameworks (Django, Cherr
I need to create a gui for python. I'm looking for something that is easy to
learn and cross platform. Any suggestions? If you have any good tutorials
please send along. Thanks in advance.
--
http://mail.python.org/mailman/listinfo/python-list
I am very much new to Python, and one of my first projects is a simple
data-based website. I am starting with Python 3.1 (I can hear many of
you shouting "don't - start with 2.6"), but as far as I can see, none of
the popular python-to-web frameworks (Django, CherryPy, web.py, etc.)
are Python
Muhammad Alkarouri schrieb:
> I was having a go at a simple implementation of Maybe in Python when I
> stumbled on a case where x.__mul__(y) is defined while x*y is not.
>
> class Maybe(object):
> def __init__(self, obj):
> self.o = obj
> def __repr__(self):
> return 'Maybe
Although, python can be used to provide web service. The following
webpage also mentioned, "Apache the best and most widely used web
server on the Internet today, check it out. If you want to run your
own web server this is the one to get, you can get binaries for both
Windows and Unix. You can dow
Michal Ostrowski writes:
> def MakeLambdaBad():
> a = []
> for x in [1,2]:
> a.append(lambda q: x + q)
> return a
The problem here is that x is a free variable in the lambdas that you
put in a. When you actually evaluate those lambdas, they use whatever
the value of x happens to be a
Michal Ostrowski wrote:
...
[a,b] = MakeLambda()
print a(10)
print b(10)
Here is yet another way to solve the problem:
import functools
def AddPair(x, q):
return x + q
a, b = [functools.partial(AddPair, x) for x in [1, 2]]
print a(10)
print b(10)
Or even, since the
Hi,
I've installed setuptools for my default python installation and it
works perfectly without even asking for admin credentials to install
packages.
After that I've installed virtualenv.
If I do:
>>> virtualenv x
... a new virtual environment is created, but whenever I try to run
easy_instal
Greetings all.
Working with data from 'http://www.finviz.com/quote.ashx?t=SRS', I was able
to get the info using re, however I thought using Beautifulsoup a more
elegant approach.
Having a bit of a problem though...
Trying to extract text:
SMA20 -1.77%
SMA50 -9.73%
utilizing attribute bod
Hi;
Completely OT, but my back's up against the wall. I'm convinced that the
reason my codes keep breaking--and even stable installations of s/w from
SourceForge such as SimpleMail--on the hosts I've been using is because
their hardware should have conservatively been trashed 5 years ago. It's
simp
On Oct 25, 5:07 pm, Tim Chase wrote:
> >> t...@rubbish:~/tmp$ rm test.py test.pyc
> >> t...@rubbish:~/tmp$ python2.5
> >> >>> import test
> >> >>> dir(test)
> >> ['__builtins__', '__doc__', '__file__', '__name__', '__path__']
> >> >>> test.__file__
> >> '/usr/lib/python2.5/test/__init__.pyc'
>
QOTW: "It was intended to be understood, not copied." - Dave Angel comments
on a characteristic of didactic examples
http://groups.google.com/group/comp.lang.python/msg/61e2d60d08f1c630
Altering the default character encoding (sys.setdefaultencoding) is never
a good idea:
QOTW: "It was intended to be understood, not copied." - Dave Angel
comments
on a characteristic of didactic examples
http://groups.google.com/group/comp.lang.python/msg/61e2d60d08f1c630
Altering the default character encoding (sys.setdefaultencoding) is
never
a good idea:
^://gr
Hi all,
I would like to introduce a couple examples of easy & convenient
modelling and solving System of Linear Equation (SLE) by FuncDesigner
(a python-written tool, BSD license). It doesn't require to construct
matrices A and b (Ax = b) by user, they are created automatically. See
here for detail
t...@rubbish:~/tmp$ rm test.py test.pyc
t...@rubbish:~/tmp$ python2.5
>>> import test
>>> dir(test)
['__builtins__', '__doc__', '__file__', '__name__', '__path__']
>>> test.__file__
'/usr/lib/python2.5/test/__init__.pyc'
because there's apparently a module named "test" in the standard
distribu
On Sat, Oct 24, 2009 at 4:53 PM, John Nagle wrote:
> Gabriel Genellina wrote:
>
>> En Fri, 23 Oct 2009 20:56:21 -0300, Ronn Ross
>> escribió:
>>
>>
>> I have tried setting the baud rate with no success. Also I'm using port
>>> #2
>>> because I"m using a usb to serial cable.
>>>
>>
>> Note that
On 2009-10-25, linda.s wrote:
> When I click "quit" button, why the following code has problem?
It works fine for me (running Gentoo Linux on IA32).
--
Grant
--
http://mail.python.org/mailman/listinfo/python-list
linda.s wrote:
When I click "quit" button, why the following code has problem?
from Tkinter import *
colors = ['red', 'green', 'yellow', 'orange', 'blue', 'navy']
def gridbox(parent):
r = 0
for c in colors:
l = Label(parent, text=c, relief=RIDGE, width=25)
e = Entry(pa
On Oct 25, 1:32 pm, Tim Chase wrote:
> > If I just input dir(test) I don't get "a" in my list.
>
> import test
> dir(test)
> > ['__builtins__', '__doc__', '__file__', '__name__', '__package__',
> > '__path__']
>
> > I am using python 2.6
>
> > Am I doing anything wrong?
>
> Are you impor
Michiel Overtoom wrote:
elca wrote:
im sorry ,also im not familiar with newsgroup.
It's not a newsgroup, but a mailing list. And if you're new to a certain
community you're not familiar with, it's best to lurk a few days to see
how it is used.
Pot. Kettle. Black.
comp.lang.python really i
elca wrote:
http://news.search.naver.com/search.naver?sm=tab_hty&where=news&query=korea+times&x=0&y=0
that is korea portal site and i was search keyword using 'korea times'
and i want to scrap resulted to text name with 'blogscrap_save.txt'
Aha, now we're getting somewhere.
Getting and parsin
Wolodja Wentland cl.uni-heidelberg.de> writes:
> > You are right, unless handlers (and filters, formatters etc.) are given
> > names which can be used to refer to them across multiple configuration
> > calls.
> > This is something I am thinking about and will probably update PEP 391
> > with my
elca wrote:
im sorry ,also im not familiar with newsgroup.
It's not a newsgroup, but a mailing list. And if you're new to a certain
community you're not familiar with, it's best to lurk a few days to see
how it is used.
so this position is bottom-posting position?
It is, but you should
On Oct 25, 11:12 pm, Dale Gerdemann
wrote:
> I've written simple code in 2.6 and 3.0 to read every charcter of a
> set of files and print out some information for each of these
> characters. I tested each program on a large Cyrillic/Latin text. The
> result was that the 2.6 version was about 5x fa
If I just input dir(test) I don't get "a" in my list.
import test
dir(test)
['__builtins__', '__doc__', '__file__', '__name__', '__package__',
'__path__']
I am using python 2.6
Am I doing anything wrong?
Are you importing the module you think you are?
t...@rubbish:~/tmp$ echo "a=42" > tes
On Sun, Oct 25, 2009 at 10:48 +, Vinay Sajip wrote:
> Wolodja Wentland cl.uni-heidelberg.de> writes:
[ HTMLHandler, multiple configuration files ]
OK! I agree that these parts are hard to standardise and do not really
belong in the *logging* module.
Maybe a kind soul implements a "configura
On Oct 25, 12:01 pm, Tim Chase wrote:
> > Say that a have:
>
> > # file test.py
> > a=7
>
> > At the prompt:
> > import test
> > dir()
>
> > I would like to see the variables created in the test namespace.
> > However, variable "a" does not appear in the list, only "test". Since
> > I know that va
I've written simple code in 2.6 and 3.0 to read every charcter of a
set of files and print out some information for each of these
characters. I tested each program on a large Cyrillic/Latin text. The
result was that the 2.6 version was about 5x faster. Here are the two
programs:
#!/usr/bin/env pyt
I'm working with ctypes on a bridge (?) from WiiUse; a new and improved
PyWiiUse, but I'm having a problem:
When connecting to the wiimotes with the init function it gives me back
an array with pointers. Every pointer points to a WiiMote structure, this
all
goes well.
Now when trying to poll the w
vsoler wrote:
Say that a have:
# file test.py
a=7
At the prompt:
import test
dir()
I would like to see the variables created in the test namespace.
However, variable "a" does not appear in the list, only "test". Since
I know that var "a" is reachable from the prompt by means of test.a,
how ca
paul kölle wrote:
>
> elca schrieb:
>> Hi,
>> thanks a lot.
>> studying alone is tough thing :)
>> how can i improve my skill...
> 1. Stop top-posting.
> 2. Read documentation
> 3. Use the interactive prompt
>
> cheers
> Paul
>
>>
>>
>> paul kölle wrote:
>>> elca schrieb:
Hello,
>>>
vsoler writes:
> At the prompt:
> import test
> dir()
>
> I would like to see the variables created in the test namespace.
> However, variable "a" does not appear in the list, only "test". Since
> I know that var "a" is reachable from the prompt by means of test.a,
> how can I list this sort of v
Joe wrote:
For the reason BK explained, the important difference is that I ran in
the IDLE shell, which handles screen printing of unicode better ;-)
Something still does not seem right here to me.
In the example above the bytes were decoded to 'UTF-8' with the
*nope* you're decoding
Say that a have:
# file test.py
a=7
At the prompt:
import test
dir()
I would like to see the variables created in the test namespace.
However, variable "a" does not appear in the list, only "test". Since
I know that var "a" is reachable from the prompt by means of test.a,
how can I list this s
elca schrieb:
Hi,
thanks a lot.
studying alone is tough thing :)
how can i improve my skill...
1. Stop top-posting.
2. Read documentation
3. Use the interactive prompt
cheers
Paul
paul kölle wrote:
elca schrieb:
Hello,
Hi,
following is script source which can beautifulsoup and PAMIE
Wolodja Wentland cl.uni-heidelberg.de> writes:
> Could a HTMLHandler be added to the standard set? Preferably one that
> leaves the choice of the template engine to the user.
I haven't done this precisely because users' requirements will be very
different for such a handler. For the same reason,
Say that a have:
# file test.py
a=7
At the prompt:
import test
dir()
I would like to see the variables created in the test namespace.
However, variable "a" does not appear in the list, only "test". Since
I know that var "a" is reachable from the prompt by means of test.a,
how can I list this so
Hi,
thanks a lot.
studying alone is tough thing :)
how can i improve my skill...
paul kölle wrote:
>
> elca schrieb:
>> Hello,
> Hi,
>
>> following is script source which can beautifulsoup and PAMIE work
>> together.
>> but if i run this script source error was happened.
>>
>> AttributeErro
elca schrieb:
Hello,
Hi,
following is script source which can beautifulsoup and PAMIE work together.
but if i run this script source error was happened.
AttributeError: PAMIE instance has no attribute 'pageText'
File "C:\test12.py", line 7, in
bs = BeautifulSoup(ie.pageText())
You could
Michal Ostrowski wrote:
> def MakeLambdaBad():
> a = []
> for x in [1,2]:
> a.append(lambda q: x + q)
> return a
Two things to remember when using lambda:
1. You can always replace lambda with one line function returning the same
result. The only difference is that you have to give
Hello,
actually what i want is,
if you run my script you can reach this page
'http://news.search.naver.com/search.naver?sm=tab_hty&where=news&query=korea+times&x=0&y=0'
that is korea portal site and i was search keyword using 'korea times'
and i want to scrap resulted to text name with 'blogscra
En Sat, 24 Oct 2009 06:40:08 -0300, John O'Hagan
escribió:
I have several instances of the same generator function running
simultaneously, some within the same process, others in separate
processes. I
want them to be able to share data (the dictionaries passed to them as
arguments), in suc
elca wrote:
actually what i want to parse website is some different language site.
A different website? What website? What text? Please show your actual
use case, instead of smokescreens.
so i was quote some common english website for easy understand. :)
And, did you learn somethin
Hello,
thanks for your reply.
actually what i want to parse website is some different language site.
so i was quote some common english website for easy understand. :)
by the way, is it possible to use with PAMIE and beautifulsoup work
together?
Thanks a lot
motoom wrote:
>
> elca wrote:
>
elca, 25.10.2009 08:46:
> im very sorry my english.
It's fairly common in this news-group that people do not have a good level
of English, so that's perfectly ok. But you should try to provide more
information in your posts. Be explicit about what you tried and what failed
(and how!), and provide
elca wrote:
yes i want to extract this text 'CNN Shop' and linked page
'http://www.turnerstoreonline.com'.
Well then.
First, we'll get the page using urrlib2:
doc=urllib2.urlopen("http://www.cnn.com";)
Then we'll feed it into the HTML parser:
soup=BeautifulSoup(doc)
Next, we'll loo
hello,
im very sorry my english.
yes i want to extract this text 'CNN Shop' and linked page
'http://www.turnerstoreonline.com'.
thanks a lot!
motoom wrote:
>
>
> On 25 Oct 2009, at 08:33 , elca wrote:
>
>> www.cnn.com in main website page.
>> for example ,if you see www.cnn.com's html source
On 25 Oct 2009, at 08:33 , elca wrote:
www.cnn.com in main website page.
for example ,if you see www.cnn.com's html source, maybe you can
find such
like line of html source.
http://www.turnerstoreonline.com/ CNN Shop
and for example if i want to extract 'CNN Shop' text in html source.
So,
hello,
www.cnn.com in main website page.
for example ,if you see www.cnn.com's html source, maybe you can find such
like line of html source.
http://www.turnerstoreonline.com/ CNN Shop
and for example if i want to extract 'CNN Shop' text in html source.
and i want to add such like function ,wit
On 25 Oct 2009, at 08:06 , elca wrote:
because of javascript im trying to insist use PAMIE.
I see, your problem is not with lxml or BeautifulSoup, but getting the
raw data in the first place.
i want to extract some text in CNN website with 'CNN Shop'
'Site map' in bottom of CNN website
Hello,
yes there is some reason why i nave to insist internet explorere interface.
because of javascript im trying to insist use PAMIE.
i was tried some other solution urlopen or mechanize and so on.
but it hard to use javascript.
can you show me some sample for me ? :)
such like if i want to extr
64 matches
Mail list logo