Re: Is there any way to find out sizeof an object

2008-06-23 Thread Martin v. Löwis
> I have written a class which has some attributes. I want to know how > do i find out the size of an instance of this class?? > class T(object): > def __init__(self, fn_name, *args, **kwds): > self.fn_name = fn_name > self.args = args > self.kwds = kwds In Python 2.6,

Any GUI lib wiget is capable of a WYSIWYG editor?

2008-06-23 Thread oyster
that is an html editor with text and picture, while the picture is linked to the local image file. for wxPython, the richtextcontrol save the image as en embedded object, so it is not my choice is there any other GUI lib and/or sample code to do so? thanks -- http://mail.python.org/mailman/listi

Python 3000 vs Perl 6

2008-06-23 Thread Corey G.
If Perl 6 ever does get on its feet and get released, how does it compare to Python 3000? Is Perl 6 more like Java now with Parrot? I just want to make sure that Python is staying competitive. If this is the wrong mailing list, just let me know. Thanks! -- http://mail.python.org/mailman/

Re: An idiom for code generation with exec

2008-06-23 Thread Maric Michaud
Le Tuesday 24 June 2008 07:18:47 eliben, vous avez écrit : > > If code generation is not the best, and I fail to see any performance > > issue that could explain such a choice, except a misunderstanding of > > what "compilation" means in python, just don't use it, use closures or > > callable insta

Re: An idiom for code generation with exec

2008-06-23 Thread Terry Reedy
eliben wrote: And while we're on the topic of what compilation means in Python, It depends on the implementation. I'm not sure I fully understand the difference between compiled (.pyc) code and exec-ed code. Is the exec-ed code turned to bytecode too, i.e. it will be as efficient as comp

Re: Fwd: xml to mysql (vice versa ) too

2008-06-23 Thread Maric Michaud
Le Tuesday 24 June 2008 07:08:46 swapna mudavath, vous avez écrit : > can anybody help me in this > > -swapna > > -- Forwarded message -- > From: swapna mudavath <[EMAIL PROTECTED]> > Date: Mon, Jun 23, 2008 at 5:27 PM > Subject: xml to mysql (vice versa ) too > To: Python-list@

Re: An idiom for code generation with exec

2008-06-23 Thread eliben
> If code generation is not the best, and I fail to see any performance issue > that could explain such a choice, except a misunderstanding of > what "compilation" means in python, just don't use it, use closures or > callable instances, there are many way to achieve this. And while we're on the t

Fwd: xml to mysql (vice versa ) too

2008-06-23 Thread swapna mudavath
can anybody help me in this -swapna -- Forwarded message -- From: swapna mudavath <[EMAIL PROTECTED]> Date: Mon, Jun 23, 2008 at 5:27 PM Subject: xml to mysql (vice versa ) too To: Python-list@python.org Hi, I need to write a python script to store data which is in XML to M

Is there any way to find out sizeof an object

2008-06-23 Thread srinivasan srinivas
Hi, I have written a class which has some attributes. I want to know how do i find out the size of an instance of this class?? class T(object):     def __init__(self, fn_name, *args, **kwds):         self.fn_name = fn_name         self.args = args         self.kwds = kwds Thanks, Srini Bol

Re: Question: How do I format printing in python

2008-06-23 Thread Maric Michaud
Le Tuesday 24 June 2008 05:33:01 Larry Bates, vous avez écrit : > [EMAIL PROTECTED] wrote: ... > > data = '''512 Jun 5 2004 X11r6 > 22 Jan 17 2005 a2p > 22 Jan 17 2005 acctcom > 5374 Sep 15 2002 acledit > 5664 May 13 2004 aclget > 12020 May 13 2004 aclput > 115734 Jun 2 2004 adb > 46518 Jun 4 2004

Re: Using Python to run SSH commands on a remote server

2008-06-23 Thread subeen
On Jun 24, 3:51 am, John Salerno <[EMAIL PROTECTED]> wrote: > Jeffrey Froman wrote: > > Also note that "all .py files on my web server" is not necessarily > > restricted to CGI scripts -- and therein lies the real gist of my > > cautionary note. > > Yeah, I realized that afterwards. Good point. I w

Re: 32-bit python memory limits?

2008-06-23 Thread Grant Edwards
On 2008-06-24, Gary Robinson <[EMAIL PROTECTED]> wrote: > I'm running a Python job on OS X 10.5.3 and the Python 2.5.2 > that's available as a binary download at python.org for OS X. > > I ran a python program tonight that ended up using much more > memory than anticipated. It just kept on using m

Re: String question

2008-06-23 Thread Mark Tolonen
"Andreu" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Yes, ... don't ask me why, but in fact v1,v2,v3 = str1.split() does not seem to work. My original problem was I forgot about the parenthesis as Tim point out. So I ended up converting to a list as in: v = str1.split() and acc

Re: 32-bit python memory limits?

2008-06-23 Thread Larry Bates
Gary Robinson wrote: I'm running a Python job on OS X 10.5.3 and the Python 2.5.2 that's available as a binary download at python.org for OS X. I ran a python program tonight that ended up using much more memory than anticipated. It just kept on using more and more memory. Instead of killing i

Re: Question: How do I format printing in python

2008-06-23 Thread Larry Bates
[EMAIL PROTECTED] wrote: Hi All, How do I format printed data in python? I could not find this in the Python Reference Manual: http://docs.python.org/ref/print.html Nor could I find it in Matloff's great tutorial: http://heather.cs.ucdavis.edu/~matloff/Python/PythonIntro.pdf For example, how d

Re: Question: How do I format printing in python

2008-06-23 Thread Mark Tolonen
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Hi All, How do I format printed data in python? I could not find this in the Python Reference Manual: http://docs.python.org/ref/print.html Nor could I find it in Matloff's great tutorial: http://heather.cs.ucdavis.edu/~matloff/Python

Re: MD5 hash for url and utf unicode converting to ascii

2008-06-23 Thread Daniel Pitts
joe shoemaker wrote: I would like to convert url into md5 hash. My question is that md5 hash will create collision at 2^64. If you do long(value,16), where value is the md5 hash string, would value returned from long(value, 16) be unique as long as md5 hashed string is unique? when you move md5 h

Re: Passing arguments to subclasses

2008-06-23 Thread Scott David Daniels
John Dann wrote: ... the answer might have been of the 'yes, but' kind. Well, if you really care, there is a 'yes, but' answer, but it only has to do with multiple inheritance, and hence is a bit esoteric for the issues you are currently addressing. This is not meant to be a tease; I think it w

Re: IDE on the level of Eclipse or DEVc++?

2008-06-23 Thread Rich Healey
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 David wrote: > Rich Healey wrote: >> >> I don't want to start a flamewar. >> >> But I like vim. >> > Hi Rich, could I take a look at your .vimrc , the python stuff. > thanks > -- > http://mail.python.org/mailman/listinfo/python-list > hi my .vimrc i

32-bit python memory limits?

2008-06-23 Thread Gary Robinson
I'm running a Python job on OS X 10.5.3 and the Python 2.5.2 that's available as a binary download at python.org for OS X. I ran a python program tonight that ended up using much more memory than anticipated. It just kept on using more and more memory. Instead of killing it, I just watched it,

Re: IDE on the level of Eclipse or DEVc++?

2008-06-23 Thread David
Rich Healey wrote: I don't want to start a flamewar. But I like vim. Hi Rich, could I take a look at your .vimrc , the python stuff. thanks -- http://mail.python.org/mailman/listinfo/python-list -- Powered by Gentoo GNU/LINUX http://www.linuxcrazy.com -- http://mail.python.org/mailman/listi

Re: tuple.index() and tuple.count()

2008-06-23 Thread Benjamin
On Jun 23, 3:13 pm, [EMAIL PROTECTED] wrote: > never mind... a coworker pointed me to this > > http://bugs.python.org/issue1696444 > > apparently they're there in py3k... and 2.6 -- http://mail.python.org/mailman/listinfo/python-list

Re: very large graph

2008-06-23 Thread bearophileHUGS
[EMAIL PROTECTED]: > My non-directed graph will have about 63,000 nodes > and and probably close to 500,000 edges. That's large, but today not very large anymore. Today very large graphs probably have more than millions of nodes... You have to try, but I think any Python graph lib may be fit for y

Re: insertion sorts...

2008-06-23 Thread Terry Reedy
Matimus wrote: May I suggest you look into using `enumerate`: for i, val in enumerate([4,5,6]): ... print i, val ... 0 4 1 5 2 6 It allows you to get the index and the value at the same time, which should eliminate the need for `aList.index`. I thought of suggesting that, but indirectly

Re: IDE on the level of Eclipse or DEVc++?

2008-06-23 Thread Rich Healey
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 cirfu wrote: > is there an IDE for python of the same quality as Eclipse or DEVC++? > > I am currently using the editor that coems iwth python and it is all > fine but for bigger projects it would be nice to have some way to > easier browse the projec

very large graph

2008-06-23 Thread chrispoliquin
I need to represent the hyperlinks between a large number of HTML files as a graph. My non-directed graph will have about 63,000 nodes and and probably close to 500,000 edges. I have looked into igraph (http://cneurocvs.rmki.kfki.hu/igraph/doc/ python/index.html) and networkX (https://networkx.la

Re: IDE on the level of Eclipse or DEVc++?

2008-06-23 Thread lotrpy
On 6月24日, 上午7时31分, Tim Cook <[EMAIL PROTECTED]> wrote: > signature.asc > 1K下载 > > I highly recommend Winghttp://www.wingware.com. There are various > licensing levels and even one for open source only developers. The > support is AWESOME!. > > --Tim +1 for WingIDE, My favorite Python IDE. Code I

MD5 hash for url and utf unicode converting to ascii

2008-06-23 Thread joe shoemaker
I would like to convert url into md5 hash. My question is that md5 hash will create collision at 2^64. If you do long(value,16), where value is the md5 hash string, would value returned from long(value, 16) be unique as long as md5 hashed string is unique? when you move md5 hashed string to long, w

Re: IDE on the level of Eclipse or DEVc++?

2008-06-23 Thread Tim Cook
I highly recommend Wing http://www.wingware.com . There are various licensing levels and even one for open source only developers. The support is AWESOME!. --Tim On Mon, 2008-06-23 at 09:15 -0700, cirfu wrote: > is there an IDE for python of the same quality as Eclipse or DEVC++? > > I am cur

Re: Connecting a Desktop App to a Web App

2008-06-23 Thread Daniel Fetchinson
>>> Okay, well I wouldn't be creating the app, so, any hints on how to >>> figure out the API of a web app I don't know super well? >> >> Is it something like google, youtube, facebook, etc? These have >> publicly available API specifications. >> >> If it's just a random website without a well main

Re: IDE on the level of Eclipse or DEVc++?

2008-06-23 Thread Colin J. Williams
cirfu wrote: is there an IDE for python of the same quality as Eclipse or DEVC++? I am currently using the editor that coems iwth python and it is all fine but for bigger projects it would be nice to have some way to easier browse the projectfiles for example. I don't know these but you might

Re: Terminating processes on Windows (handles and IDs)

2008-06-23 Thread Val-Amart
On Jun 23, 6:33 pm, geoffbache <[EMAIL PROTECTED]> wrote: > Hi all, > > I've always wondered why os.kill isn't supported on Windows. I found a > discussion somewhere from 2006 about this so it seems others have > wanted it, but still nothing. So I have a half-baked solution > involving calling "tas

Re: Storing value with limits in object

2008-06-23 Thread Lie
#!/usr/bin/env python ## VERSION 2 ## ## changelog: ## - Uses inheritance from _Limited ## - Added _LimitedLong and llong ## - limit choose between int, long, and float class _Limited(object): def setlimits(self, lim): ''' Set the limits and if value is not within limit, r

Re: regexp: match only if previous matched?

2008-06-23 Thread Carl Banks
On Jun 23, 6:02 pm, cirfu <[EMAIL PROTECTED]> wrote: > I need to extract prices froma html-document. > > [0-9]*\$ matches 112$ 45$ etc but also just a $. why that shouldnt > really matter and it is unlikely anyway to appear a $sign with no > price attahced to it I still want to prevent it. > > How

Re: String question

2008-06-23 Thread Andreu
Yes, ... don't ask me why, but in fact v1,v2,v3 = str1.split() does not seem to work. My original problem was I forgot about the parenthesis as Tim point out. So I ended up converting to a list as in: v = str1.split() and accessing the elements using v[0] v[1] ect...it is working now. Thanks. A

Re: regexp: match only if previous matched?

2008-06-23 Thread Vlastimil Brom
2008/6/24, cirfu <[EMAIL PROTECTED]>: > > I need to extract prices froma html-document. > > [0-9]*\$ matches 112$ 45$ etc but also just a $. why that shouldnt > really matter and it is unlikely anyway to appear a $sign with no > price attahced to it I still want to prevent it. > > How do I avoid ma

regexp: match only if previous matched?

2008-06-23 Thread cirfu
I need to extract prices froma html-document. [0-9]*\$ matches 112$ 45$ etc but also just a $. why that shouldnt really matter and it is unlikely anyway to appear a $sign with no price attahced to it I still want to prevent it. How do I avoid matching "$"? It has to be "nbr$". -- http://mail.pyth

Re: learning unit testing in python

2008-06-23 Thread BJörn Lindqvist
On Mon, Jun 23, 2008 at 2:55 PM, Alex <[EMAIL PROTECTED]> wrote: > Hi all. > > I'd like learn some basic unit testing with python. > I red some articles about different testing framework like unittest or > nose, but I'm a bit confused: what is the best choice? I'm not a > professional developer (I'

Re: learning unit testing in python

2008-06-23 Thread Alex
On 23 Giu, 21:26, "Josip" <[EMAIL PROTECTED]> wrote: > > Hi all. > > > I'd like learn some basic unit testing with python. > > I red some articles about different testing framework like unittest or > > nose, but I'm a bit confused: what is the best choice? I'm not a > > professional developer (I'm

Re: Using Python to run SSH commands on a remote server

2008-06-23 Thread John Salerno
Jeffrey Froman wrote: Also note that "all .py files on my web server" is not necessarily restricted to CGI scripts -- and therein lies the real gist of my cautionary note. Yeah, I realized that afterwards. Good point. I was assuming all my executable files would be CGI, but that's not a good

Re: insertion sorts...

2008-06-23 Thread Matimus
On Jun 23, 11:52 am, python_newbie <[EMAIL PROTECTED]> wrote: > I don't know this list is the right place for newbie questions. I try > to implement insertion sort in pyhton. At first code there is no > problem. But the second one ( i code it in the same pattern i think ) > doesn't work. Any ideas

Re: Storing value with limits in object

2008-06-23 Thread Lie
On Jun 23, 1:24 am, "Josip" <[EMAIL PROTECTED]> wrote: > > Why not make it a function? > > > function assignLimited(value, vmin, vmax): > >     value = max(vmin, value) > >     value = min(vmax, value) > >     return value > > > a = assignLimited(7, 0, 10) > > > Seems like it solves your problem re

Re: Storing value with limits in object

2008-06-23 Thread Lie
On Jun 23, 1:24 am, "Josip" <[EMAIL PROTECTED]> wrote: > > Why not make it a function? > > > function assignLimited(value, vmin, vmax): > >     value = max(vmin, value) > >     value = min(vmax, value) > >     return value > > > a = assignLimited(7, 0, 10) > > > Seems like it solves your problem re

Re: [2to3] Bug converting import

2008-06-23 Thread Christian Heimes
Helmut Jarausch wrote: > Now, when I invoke Master.py I get > > Traceback (most recent call last): > File "Master.py", line 2, in > from . import Slave > ValueError: Attempted relative import in non-package > > > thanks for looking into it, The cause of the bug is in fixes/fix_import.py pro

Re: 2to3 bug and question

2008-06-23 Thread Terry Reedy
Helmut Jarausch wrote: is this the right group to ask / report problems with python3.0 ? It is certainly a place. Given the number of bogus bug reports on bugs.python.org, asking here is often a good idea. In this and your other post, the problems you report look like probable bugs to me

Re: insertion sorts...

2008-06-23 Thread Terry Reedy
python_newbie wrote: I don't know this list is the right place for newbie questions. It is. We get them all the time. There is also a tutor mailing list. > I try to implement insertion sort in pyhton. python > At first code there is no problem. It is pretty straightforward. But the se

Re: 2to3 bug and question

2008-06-23 Thread Christian Heimes
Helmut Jarausch wrote: > Hi, > > is this the right group to ask / report problems with python3.0 ? While the general Python list is the right place to discuss bugs it's not sensible to report them here. Most Python core developers except Martin, me and a few more aren't reading this list at all.

Re: Using Python to run SSH commands on a remote server

2008-06-23 Thread Jeffrey Froman
John Salerno wrote: > I guess a blanket process might be a tad risky, but don't you want all CGI > files to be executable by all? Typically, I prefer CGI scripts to be executable only the owner. If the web server runs those scripts as a different user, then that user must also be permitted to exe

Re: tuple.index() and tuple.count()

2008-06-23 Thread hall . jeff
never mind... a coworker pointed me to this http://bugs.python.org/issue1696444 apparently they're there in py3k... -- http://mail.python.org/mailman/listinfo/python-list

Re: Using Python to run SSH commands on a remote server

2008-06-23 Thread Grant Edwards
On 2008-06-23, John Salerno <[EMAIL PROTECTED]> wrote: > Generally speaking, what tools would I use to do this? In shell scripts I use expect to automate ssh stuff, so I would probably give pyexpect or pexpect a try: http://sourceforge.net/projects/pexpect/ > Is there a built-in module for it

Re: py2exe, PyQT, QtWebKit and jpeg problem

2008-06-23 Thread David Boddie
On Monday 23 June 2008 15:02, Carbonimax wrote: > If I copy the dll in the dist directory, and I use QPluginLoader() and > load(), > it does work in the .py but it doesn't in .exe made with py2exe > > my code : > dll = QPluginLoader(path_to_dll) > res = dll.load() > > res == true in the .py > re

tuple.index() and tuple.count()

2008-06-23 Thread hall . jeff
Before the inevitable response comes, let me assure you I've read through the posts from Guido about this. 7 years ago Guido clearly expressed a displeasure with allowing these methods for tuple. Let me lay out (in a fresh way) why I think we should reconsider. 1) It's counterintuitive to exclude

Re: Going from Tkinter to pyQT

2008-06-23 Thread Sebastian "lunar" Wiesner
Alex Bryan <[EMAIL PROTECTED]>: > I had a guy on this mailing list tell me that pyQT is much better than > Tkinter, and after looking into it a bit I think he is right. However, > I can't find much on it. I want to know if there are any good books or > online tutorials that would be helpful. I dou

Re: installed 3.0, rebind winprompt to 2.5?

2008-06-23 Thread Terry Reedy
cirfu wrote: i installed python 3.0. now when im laucnhing from the dos prompt in win vista it searches in python3.0 i want to rebind it to 2.5, what do i need to change? When you install any Python on Windows with the .msi installer, there is a box something like [x] make this the defa

Re: An idiom for code generation with exec

2008-06-23 Thread Fuzzyman
On Jun 21, 7:52 am, Peter Otten <[EMAIL PROTECTED]> wrote: > eliben wrote: > > On Jun 20, 2:44 pm, Peter Otten <[EMAIL PROTECTED]> wrote: > >> eliben wrote: > >> > Additionally, I've found indentation to be a problem in such > >> > constructs. Is there a workable way to indent the code at the level

Re: Fast and easy GUI prototyping with Python

2008-06-23 Thread Sebastian "lunar" Wiesner
Michael Torrie <[EMAIL PROTECTED]>: > Pete Kirkham wrote: >> 2008/6/21 Val-Amart <[EMAIL PROTECTED]>: >> >>> Use PyQt. You will gain great portability +all the functionality built >>> in qt. >>> You can try PyGTK also, though i wont recommend it. >>> >> Why would you not recommend it? I've been u

Re: learning unit testing in python

2008-06-23 Thread Josip
> Hi all. > > I'd like learn some basic unit testing with python. > I red some articles about different testing framework like unittest or > nose, but I'm a bit confused: what is the best choice? I'm not a > professional developer (I'm a SEO) but I belive that unit testing is a > good and pragmatic

Re: installed 3.0, rebind winprompt to 2.5?

2008-06-23 Thread Fuzzyman
On Jun 23, 6:53 pm, cirfu <[EMAIL PROTECTED]> wrote: > i installed python 3.0. now when im laucnhing from the dos prompt in > win vista it searches in python3.0 > > i want to rebind it to 2.5, what do i need to change? Reinstalling 2.5 should work. Michael Foord http://www.ironpythoninaction.com/

Re: learning unit testing in python

2008-06-23 Thread Josh English
A good starting point is Mark Pilgrim's Dive Into Python. http://www.diveintopython.org/unit_testing/index.html Josh On Jun 23, 7:55 am, Alex <[EMAIL PROTECTED]> wrote: > Hi all. > > I'd like learn some basic unit testing with python. > I red some articles about different testing framework like u

Re: socket error: connection refused?

2008-06-23 Thread cirfu
On 23 Juni, 20:55, [EMAIL PROTECTED] wrote: > It's a security conflict. You should be able to run it again and have > it work. Our company's cisco does the same thing (even after we > approve the app) doesnt work but i found out i should open the task manager and kill all the python processes, the

Re: socket error: connection refused?

2008-06-23 Thread hall . jeff
It's a security conflict. You should be able to run it again and have it work. Our company's cisco does the same thing (even after we approve the app) -- http://mail.python.org/mailman/listinfo/python-list

Re: Using Python and MS-SQL Server

2008-06-23 Thread Tim Golden
[EMAIL PROTECTED] wrote: I have programmed before, but I am new to using Python. I am currently using the ArcGIS software which uses Python as its scripting language for automating tasks. The current script that I am working on requires pulling in some information from a Microsoft SQL Server.

insertion sorts...

2008-06-23 Thread python_newbie
I don't know this list is the right place for newbie questions. I try to implement insertion sort in pyhton. At first code there is no problem. But the second one ( i code it in the same pattern i think ) doesn't work. Any ideas ? def in

Re: Using Python to run SSH commands on a remote server

2008-06-23 Thread John Salerno
"Jeffrey Froman" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Be careful, this procedure sounds potential risky, security-wise ;-) I guess a blanket process might be a tad risky, but don't you want all CGI files to be executable by all? -- http://mail.python.org/mailman/listi

Re: Using Python to run SSH commands on a remote server

2008-06-23 Thread Jeffrey Froman
John Salerno wrote: > Generally speaking, what tools would I use to do this? Is there a built-in > module for it? I've had a very nice experience using the 3rd-party package "paramiko" for ssh communication. There's nothing in the standard library that I know of. > I looked at the telnetlib modu

Re: Using Python to run SSH commands on a remote server

2008-06-23 Thread Mark Wooding
John Salerno <[EMAIL PROTECTED]> wrote: > Generally speaking, what tools would I use to do this? Is there a built-in > module for it? There's paramiko (q.g.). I can't personally vouch for it, but it seems popular... It seems to depend on a separate crypto library. > Is Telnet and SSH even th

socket error: connection refused?

2008-06-23 Thread cirfu
The first time i start the shell it always works. But often after closing it and restarting it I get: Two windows pops up and the shell, after clicking the windows the shell just closes by itself. socket error: connection refused IDLE's subprocess didnt make connection. im using python 2.5.1

Re: IDE on the level of Eclipse or DEVc++?

2008-06-23 Thread cirfu
i downloaded the extension for eclipse, nice. any opinions of netbeans vs eclipse for python? -- http://mail.python.org/mailman/listinfo/python-list

Re: Question: How do I format printing in python

2008-06-23 Thread Mensanator
On Jun 23, 12:47 pm, Mensanator <[EMAIL PROTECTED]> wrote: > On Jun 23, 12:12 pm, [EMAIL PROTECTED] wrote: > > > > > > > Hi All, > > > How do I format printed data in python? > > I could not find this in the Python Reference > > Manual:http://docs.python.org/ref/print.html > > Nor could I find it

installed 3.0, rebind winprompt to 2.5?

2008-06-23 Thread cirfu
i installed python 3.0. now when im laucnhing from the dos prompt in win vista it searches in python3.0 i want to rebind it to 2.5, what do i need to change? -- http://mail.python.org/mailman/listinfo/python-list

Re: Question: How do I format printing in python

2008-06-23 Thread Mensanator
On Jun 23, 12:12 pm, [EMAIL PROTECTED] wrote: > Hi All, > > How do I format printed data in python? > I could not find this in the Python Reference > Manual:http://docs.python.org/ref/print.html > Nor could I find it in Matloff's great > tutorial:http://heather.cs.ucdavis.edu/~matloff/Python/Pyth

Re: Using Python to run SSH commands on a remote server

2008-06-23 Thread Jean-Paul Calderone
On Mon, 23 Jun 2008 13:30:55 -0400, John Salerno <[EMAIL PROTECTED]> wrote: Generally speaking, what tools would I use to do this? Is there a built-in module for it? I looked at the telnetlib module, but the documentation wasn't really complete enough for me to get a good idea of it. Is Telnet an

Re: Question: How do I format printing in python

2008-06-23 Thread Saul Spatz
format the strings: http://www.python.org/doc/2.1.3/lib/typesseq-strings.html [EMAIL PROTECTED] wrote: Hi All, How do I format printed data in python? I could not find this in the Python Reference Manual: http://docs.python.org/ref/print.html Nor could I find it in Matloff's great tutorial: h

Re: Going from Tkinter to pyQT

2008-06-23 Thread kib2
Alex Bryan a écrit : I had a guy on this mailing list tell me that pyQT is much better than Tkinter, and after looking into it a bit I think he is right. However, I can't find much on it. I want to know if there are any good books or online tutorials that would be helpful. I doubt there is one,

Using Python to run SSH commands on a remote server

2008-06-23 Thread John Salerno
Generally speaking, what tools would I use to do this? Is there a built-in module for it? I looked at the telnetlib module, but the documentation wasn't really complete enough for me to get a good idea of it. Is Telnet and SSH even the same thing? Basically, I want to write a script that will a

Re: Passing arguments to subclasses

2008-06-23 Thread John Dann
Thanks for the responses - they're much appreciated. And I understand the slight impatience with questions that could possibly be answered without recourse to a forum - I'm usually in the opposite position of fielding many newbie questions in a forum in a completely different field! But don't be t

Question: How do I format printing in python

2008-06-23 Thread joemacbusiness
Hi All, How do I format printed data in python? I could not find this in the Python Reference Manual: http://docs.python.org/ref/print.html Nor could I find it in Matloff's great tutorial: http://heather.cs.ucdavis.edu/~matloff/Python/PythonIntro.pdf For example, how do I turn this: 512 Jun 5 2

Re: IDE on the level of Eclipse or DEVc++?

2008-06-23 Thread Tim Arnold
"cirfu" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > is there an IDE for python of the same quality as Eclipse or DEVC++? > > I am currently using the editor that coems iwth python and it is all > fine but for bigger projects it would be nice to have some way to > easier browse th

Re: IDE on the level of Eclipse or DEVc++?

2008-06-23 Thread Andrii V. Mishkovskyi
2008/6/23 cirfu <[EMAIL PROTECTED]>: > is there an IDE for python of the same quality as Eclipse or DEVC++? > > I am currently using the editor that coems iwth python and it is all > fine but for bigger projects it would be nice to have some way to > easier browse the projectfiles for example. Act

Re: Find class attributes creation order

2008-06-23 Thread Michele Simionato
On Jun 23, 5:53 pm, Marcob <[EMAIL PROTECTED]> wrote: > Let's see these simple classes: > >     class base_foo() >          pass > >     class foo(base_foo): >          a=1 >          b={} >          c="zz" > > I would like to find class foo attributes creation order. > Using __metaclass__ is not o

Re: Find class attributes creation order

2008-06-23 Thread Marcob
On 23 Giu, 18:08, Cédric Lucantis <[EMAIL PROTECTED]> wrote: > Le Monday 23 June 2008 17:53:07 Marcob, vous avez écrit : > > > Let's see these simple classes: > > >     class base_foo() > >          pass > > >     class foo(base_foo): > >          a=1 > >          b={} > >          c="zz" > > > I w

IDE on the level of Eclipse or DEVc++?

2008-06-23 Thread cirfu
is there an IDE for python of the same quality as Eclipse or DEVC++? I am currently using the editor that coems iwth python and it is all fine but for bigger projects it would be nice to have some way to easier browse the projectfiles for example. -- http://mail.python.org/mailman/listinfo/python-

Using Python and MS-SQL Server

2008-06-23 Thread hwcowan
Hello, I have programmed before, but I am new to using Python. I am currently using the ArcGIS software which uses Python as its scripting language for automating tasks. The current script that I am working on requires pulling in some information from a Microsoft SQL Server. I was wondering if

Re: Find class attributes creation order

2008-06-23 Thread Cédric Lucantis
Le Monday 23 June 2008 17:53:07 Marcob, vous avez écrit : > Let's see these simple classes: > > class base_foo() > pass > > class foo(base_foo): > a=1 > b={} > c="zz" > > I would like to find class foo attributes creation order. > Using __metaclass__ is n

Going from Tkinter to pyQT

2008-06-23 Thread Alex Bryan
I had a guy on this mailing list tell me that pyQT is much better than Tkinter, and after looking into it a bit I think he is right. However, I can't find much on it. I want to know if there are any good books or online tutorials that would be helpful. I doubt there is one, but if there is

Re: Passing arguments to subclasses

2008-06-23 Thread Gary Herron
John Dann wrote: May I ask a simple newbie question, which I presume is true, but for which I can't readily find confirmation: Let's say I have a parent class with an __init__ method explicitly defined: class ParentClass(object): def __init__(self, keyword1, keyword2): e

Re: Passing arguments to subclasses

2008-06-23 Thread Bruno Desthuilliers
John Dann a écrit : May I ask a simple newbie question, which I presume is true, but for which I can't readily find confirmation: Let's say I have a parent class with an __init__ method explicitly defined: class ParentClass(object): def __init__(self, keyword1, keyword2):

Find class attributes creation order

2008-06-23 Thread Marcob
Let's see these simple classes: class base_foo() pass class foo(base_foo): a=1 b={} c="zz" I would like to find class foo attributes creation order. Using __metaclass__ is not of help because special method __new__ receive attrs as a dictionary and so

Passing arguments to subclasses

2008-06-23 Thread John Dann
May I ask a simple newbie question, which I presume is true, but for which I can't readily find confirmation: Let's say I have a parent class with an __init__ method explicitly defined: class ParentClass(object): def __init__(self, keyword1, keyword2): etc and I subclass

Terminating processes on Windows (handles and IDs)

2008-06-23 Thread geoffbache
Hi all, I've always wondered why os.kill isn't supported on Windows. I found a discussion somewhere from 2006 about this so it seems others have wanted it, but still nothing. So I have a half-baked solution involving calling "taskkill" on Windows Vista or "tskill" on Windows XP via the shell. I fe

Re: Regular expression problem

2008-06-23 Thread MRAB
On Jun 22, 10:13 pm, abranches <[EMAIL PROTECTED]> wrote: > Hello everyone. > > I'm having a problem when extracting data from HTML with regular > expressions. > This is the source code: > > You are ready in the next style="display: inline;">12 span>M 48S > > And I need to get the remaining time. U

Re: String question

2008-06-23 Thread cokofreedom
On Jun 23, 4:45 pm, Andreu <[EMAIL PROTECTED]> wrote: > I want to split a sentence and assign each word to a variable. > In Ruby I can do it as: > > v1,v2,v3,v4,v5 = str1.split > > Which will be the Python equivalent ? Thanks. > > Andrew. Well a straight copy would be... >>> example = "Hello, how

Re: -1/2

2008-06-23 Thread Duncan Booth
Lie <[EMAIL PROTECTED]> wrote: > On Jun 23, 1:32 am, "Serve Lau" <[EMAIL PROTECTED]> wrote: >> What is the expected result of -1/2 in python? > > > Operator precedence: > Both python 2 and 3 follows the same rule for operator precedence, > see: > http://www.ibiblio.org/g2swap/byteofpython/read/o

learning unit testing in python

2008-06-23 Thread Alex
Hi all. I'd like learn some basic unit testing with python. I red some articles about different testing framework like unittest or nose, but I'm a bit confused: what is the best choice? I'm not a professional developer (I'm a SEO) but I belive that unit testing is a good and pragmatic way to produ

Re: String question

2008-06-23 Thread Andreu
Wow...about ten seconds to get a kind response Thanks Tim. Andrew. Tim Golden wrote: Andreu wrote: I want to split a sentence and assign each word to a variable. In Ruby I can do it as: v1,v2,v3,v4,v5 = str1.split Which will be the Python equivalent ? Thanks. That would be: str1 = "T

Re: String question

2008-06-23 Thread Tim Golden
Andreu wrote: I want to split a sentence and assign each word to a variable. In Ruby I can do it as: v1,v2,v3,v4,v5 = str1.split Which will be the Python equivalent ? Thanks. That would be: str1 = "The quick brown fox jumps" v1, v2, v3, v4, v5 = str1.split () TJG -- http://mail.python.org/m

String question

2008-06-23 Thread Andreu
I want to split a sentence and assign each word to a variable. In Ruby I can do it as: v1,v2,v3,v4,v5 = str1.split Which will be the Python equivalent ? Thanks. Andrew. -- http://mail.python.org/mailman/listinfo/python-list

PyOpenGL New Installation

2008-06-23 Thread Colin J. Williams
I have just installed PyOpenGL and get a series of warning messages: Best match: PyOpenGL 3.0.0b3 Downloading http://downloads.sourceforge.net/pyopengl/PyOpenGL-3.0.0b3.zip?modtime=1213363873&big_mirror=0 Processing PyOpenGL-3.0.0b3.zip Running PyOpenGL-3.0.0b3\setup.py -q bdist_egg --dist-di

Re: Distutils and unit test files

2008-06-23 Thread Cédric Lucantis
> On Mon, Jun 23, 2008 at 9:59 AM, Cédric Lucantis <[EMAIL PROTECTED]> wrote: > > Yes a checksuite should be kept separate from the 'real' code. You can > > run it locally by setting the PYTHONPATH environment variable : > > > > PYTHONPATH=/path/to/your/modules python checksuite.py > > So I could

[ANN] Virtual Worlds Open Grid Protocols testing library in Python (pyogp)

2008-06-23 Thread Lawson English
A new open source project has been started by Linden Lab, makers of the Second Life™ virtual worlds, and the Second Life Architecture Working Group (AWG) to test LL's proposed virtual worlds Open Grid Protocols (OGP) that will allow any virtual world to support multi-world login, between-world

  1   2   >