Wow.. I have visions of writing a little wanna-be VNC client/server now using the ImageGrab.grab() =DThis ImageGrab trick does exactly what I wanted. Thanks for the tip!Actually, I want to write a little package for the learning experience sometime over the holidays (plus I use VNC fairly often), b
Chris Hengge wrote:
> Wow.. I have visions of writing a little wanna-be VNC client/server
> now using the ImageGrab.grab() =D
> This ImageGrab trick does exactly what I wanted. Thanks for the tip!
>
> Actually, I want to write a little package for the learning experience
> sometime over the holid
Hi Folks,
I want to implement a simple program that verifies the IP provided by the user is in the right format or not.
How to go about it..?
Any suggestions..
TIA.
Regards,
Asrarahmed
-- To HIM you shall return.
___
Tutor maillist - Tutor@pyt
Chuck Coker wrote:
> Hi Folks,
>
> I am new to Python, but I have many years experience in software
> development. I have a question about variable scope. I'm having a
> problem that I suspect is merely a syntax error or something of that
> nature.
>
> I'm not real clear on variable scoping rules
Asrarahmed Kadri wrote:
>
> Hi Folks,
>
> I want to implement a simple program that verifies the IP provided by
> the user is in the right format or not.
>
> How to go about it..?
> Any suggestions..
How about googling 'python ip address'?
You seem to come here first when you need to do som
Sorry.
I will try to first go to GOOGLE and if I cannot find there, then I'll post my query.
Thanks for all the support till now.
Regards,
Asrarahmed
On 11/3/06, Kent Johnson <[EMAIL PROTECTED]> wrote:
Asrarahmed Kadri wrote:>> Hi Folks,>> I want to implement a simple program that verifies t
Hi,
I would probably take the string, separate the numbers and check they
are acceptable:
def correct_ip(ip):
# Check if my IP address has 4 numbers separated by dots
num=ip.split('.')
if not len(num)==4:
return False
# Check each of the 4 numbers is between 0 and 255
for n
I think I don't understand the OOP in python, could anyone explain why
this code works?
class example:
atribute = "hello world"
print example.atribute
Why you don't have to make an object of the class to access to the
atribute?
( class example:
atribute = "hello world"
obj
Because your atribute is a class attribute:
class C:
ca = 123
print C.ca # 123
c1 = C()
print c1.ca# 123
c1.ca = 140
print c1.ca# 140
print C.ca # 123
c2 = C()
print c2.ca# 123
C.ca = 141
print C.ca # 141
print c1.ca# 140
print c2.ca
Andreas Kostyrka escribió:
> Because your atribute is a class attribute:
>
> class C:
> ca = 123
>
> print C.ca # 123
> c1 = C()
> print c1.ca# 123
> c1.ca = 140
> print c1.ca# 140
> print C.ca # 123
> c2 = C()
> print c2.ca# 123
> C.ca = 141
> print C.c
Alan Gauld escribió:
> Hi folks,
>
> In just thought I'd mention that my web tutor has now passed
> the million visitors mark. Thanks to all those on the tutor
> list who have paid a visit.
>
> Alan Gauld
> Author of the Learn to Program web site
> http://www.freenetpages.co.uk/hp/alan.gauld
> __
>>> I think I don't understand the OOP in python, could anyone explain why
>>> this code works?
>>>
>>> class example:
>>> atribute = "hello world"
>>>
>>> print example.atribute
>>>
>>> Why you don't have to make an object of the class to access to the
>>> atribute?
>>>
because t
Howdy,
I'm a college student and for one of we are writing programs to
numerically compute the parameters of antenna arrays. I decided to use
Python to code up my programs. Up to now I haven't had a problem,
however we have a problem set where we are creating a large matrix and
finding it's i
"euoar" <[EMAIL PROTECTED]> wrote in
> Thank you for your answer and the examples.
> So without self it is an instance variable (like "static"
> in java/c#).
Without self it is a class attribute like static etc in C++/Java.
An instance variable is one that is unique to an instance!
Although
Oh wow! That is great trick for lowering network requirements. Have you actually implimented that into a working app for test? You could shave a bit more from the bandwidth using that trick if you locked to a specific window for transfer *thinking blinking tray icons etc would get stripped*. How ar
Alan Gauld wrote:
> "euoar" <[EMAIL PROTECTED]> wrote in
>> So, in python, you can add methods at run time to an
>> object, and even you can add them to a class at run time?
>
> I'm not sure about adding methods at run time, I've never
> tried it but I think the magic around the self parameter
Date: Thu, 02 Nov 2006 20:09:59 -0500From: Bill Burns <[EMAIL PROTECTED]>Subject: Re: [Tutor] Print Screen
To: Chris Hengge <[EMAIL PROTECTED]>Cc: pythontutor <
tutor@python.org>Message-ID: <[EMAIL PROTECTED]>Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>>pressed, try pyHook. Note: p
t; > Actually, I've never tried it, but I'm pretty sure that's how the GUI> > packages' key capturing works.> > You may be asking 'well, it sounds like pyHook does a better job of this> > anyway!'> > Yeah, you're right.> > However, as Alan ex
I am wanting to get into some GUI coding with Python and have heard about PyQT and wxPython. Now I am definately not looking for some type of holy war but can anyone give me a good reason to pick one over the other.
Also I would like to have a designer with it or a seperate designer that could b
Thank you folks, for your excellent answers. This is really a fantastic
place to learn python :-)
__
LLama Gratis a cualquier PC del Mundo.
Llamadas a fijos y móviles desde 1 céntimo por minuto.
http://es.voice.yahoo.com
First, I have to thank Alan Gauld for his previous helpful posts--I didn't
get to thank him last until the topic had changed much so I felt I missed
that window. Also, big congratz on 1 millionth visitor to his great site (I
like to think it may have been me that day or at least close). And th
wxPython is good for cross-platform stuff and has a few gui designers
(Boa Constructor and others comes to mind), I don't know much about
PyQT state in this, but PyGtk + Glade (Gui Designer) is a very good
combo.
Is about choise, I suggest you to do some simple tests with everything
until you find
I vouch for the SPE with wxGlade and XRC! (packaged together with IDE)On 11/3/06, Carlos Daniel Ruvalcaba Valenzuela <
[EMAIL PROTECTED]> wrote:wxPython is good for cross-platform stuff and has a few gui designers
(Boa Constructor and others comes to mind), I don't know much aboutPyQT state in this
On Fri, 3 Nov 2006, dean dermody wrote:
>
> thank you .you can stop sending me these now thanks
Done. In the future, please know that you can usually unsubscribe
yourself from these kinds of technical mailing lists. Instructions on how
to do so are usually at the footer of each message you
At 02:10 PM 11/3/2006, Chris Hengge wrote:
I vouch for the SPE with wxGlade
and XRC! (packaged together with IDE)
I'd be very interested in hearing why you suggest that
combination.
Dick Moores
On 11/3/06, Carlos Daniel
Ruvalcaba Valenzuela <
[EMAIL PROTECTED]> wrote:
wxPython is good for cros
I don't get the output I would expect from the following.
The variable clean1 gives me an empty string. But if i change the for
loop to print i[26:40] I get all the info.
what do I need to do to capture all the data to clean1?
Thanks.
>>> a = open('arp.txt')
>>> file = a.read()
>>> file =
"Kent Johnson" <[EMAIL PROTECTED]> wrote
> Alan Gauld wrote:
>> I'm not sure about adding methods at run time, I've never
> Sure it works:
>
> In [1]: class foo(object): pass
>...:
> In [4]: def show(self): print "Hi, I'm a foo"
>
> In [5]: foo.show=show
>
> In [6]: f.show()
> Hi, I'm a fo
Well, I use SPE which comes with wxGlade and XRC. For the small amount of gui I've done with python I think SPE offers the best IDE coder experience (coming from a VS world). The tools make sense to me.wxGlade is a GUI designer written in Python with the popular GUI toolkit
wxPython,
that helps yo
"Doug Potter" <[EMAIL PROTECTED]> wrote
>I don't get the output I would expect from the following.
> >>> a = open('arp.txt')
> >>> file = a.read()
> >>> file = file.split('\n')
Easier to do
file = open('arp.txt').readlines()
But file is a bad name since its an alias for open...
> >>> b = open
Hi Doug,
I'm not a Python guru, but shouldn't you be putting the output of
file.split('\n') into a list, and not back into a string (for clarity's
sake?).
Also, if you have two trailing newlines on the file, your final string
will be '', so you should be doing clean1.append(i[26:40]) in your f
30 matches
Mail list logo