Re: Program inefficiency?

2007-09-30 Thread Dimiter "malkia" Stanev
Sorry for intruding here, But one inefficiency of the Windows XP (not NTFS in general) is that NTFS must generate 8.3 names (for old-DOS/Win31/Win95/Win98/WinME compatibility). Generating such a name could slow down the system, as the name must be unique, and finding such unique name would be

Re: Fwd: Using fractions instead of floats

2007-09-30 Thread Gabriel Genellina
En Mon, 01 Oct 2007 00:10:05 -0300, Andres Riofrio <[EMAIL PROTECTED]> escribi�: > From what I've read, seems that the principal reason for rejecting the > PEP is that there was not much need (enthusiasm)... Well, then I have > a question: Is there a way to make 5/2 return something other than a

Re: Balloon Taskbar Popup for Windows XP

2007-09-30 Thread makko
Thanks all. regards, Makko -- http://mail.python.org/mailman/listinfo/python-list

I earn $36800 a month with google adsense

2007-09-30 Thread panguohua
www.space666.com a good website for making money with your blog.more information there -- http://mail.python.org/mailman/listinfo/python-list

boost.python error with DirectX

2007-09-30 Thread Ling
I am using boost.python to wrap C++ function which includes directmusic libraries to simply play the midi, but lots of linkage errors "error LNK2001: unresolved external symbol". I wonder if it is possible to work with DirectX - directmusic libs. Are there any ways to wrap it? ***

Editor extensions to get a full IDE (was: An Editor that Skips to the End of a Def)

2007-09-30 Thread Ben Finney
Bruno Desthuilliers <[EMAIL PROTECTED]> writes: > Ben Finney a écrit : > > Both Emacs and Vim are highly customisable text editors. They are > > configurable with complete programming languages specific to the > > program, and both have a huge community of programmers writing > > useful extensions

Re: Using fractions instead of floats

2007-09-30 Thread Terry Reedy
"Andres Riofrio" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | a question: Is there a way to make 5/2 return something other than an | integer? >>> from __future__ import division >>> 1/2 0.5 >>> 5/2 2.5 tjr -- http://mail.python.org/mailman/listinfo/python-list

Re: Command-line does work when scheduled

2007-09-30 Thread Jay Loden
I sometimes see issues like this at work because certain processes, including scheduled tasks if I remember right, can run as Local System user instead of as your user account. That tends to be a real pain for Python or Perl scripts because that means that they don't have the associations config

Re: s.split() on multiple separators

2007-09-30 Thread Gabriel Genellina
En Sun, 30 Sep 2007 16:16:30 -0300, <[EMAIL PROTECTED]> escribi�: >> From my POV, if I want sequence from here to there, it should include > both here and there. > > I do understand the consequences of making high bound exclusive, which > is more elegant code: xrange(len(c)). But it does seem a bi

Creating a custom python python distribution

2007-09-30 Thread shailesh
Hi, I wish to create a Python distribution includind Python and some other libraries (Zope 3, PyWin32, numpy, lxml, etc.) which are required for my applications. e.g. there are Enthough and ASPN distributions of Python. Unfortunately, I have not been able to find the right documentation for this p

Re: Using fractions instead of floats

2007-09-30 Thread Gabriel Genellina
En Sun, 30 Sep 2007 23:36:23 -0300, George Sakkis <[EMAIL PROTECTED]> escribi�: > On Sep 30, 9:35 pm, andresj <[EMAIL PROTECTED]> wrote: >> I was doing some programming in Python, and the idea came to my mind: >> using fractions instead of floats when doing 2/5. >> (...) >> I would like to get

Fwd: Using fractions instead of floats

2007-09-30 Thread Andres Riofrio
PS: Sorry, George Sakkis, for the double emailing... I forgot to add python-list in the To: field the first time. :) Haha. Ok. Thank you for pointing me to those links :). I hadn't thought of searching for the word 'rational' instead of 'decimal'... >From what I've read, seems that the principal

call for collaboration (python / freesound)

2007-09-30 Thread patrick
hi, i have an idea, who doesn't have? the technologies required: gtk+ glade gobject Queue threading gstreamer (GNonLin) config here's the result of my week-end trying to understand how it's working: http://www.workinprogress.ca/pd/freesound.png the idea is to make a

Re: Using fractions instead of floats

2007-09-30 Thread George Sakkis
On Sep 30, 9:35 pm, andresj <[EMAIL PROTECTED]> wrote: > I was doing some programming in Python, and the idea came to my mind: using > fractions instead of floats when doing 2/5. > (...) > I would like to get some feedback on this idea. Has this been posted > before? If so, was it rejected? and fo

Re: Using fractions instead of floats

2007-09-30 Thread [EMAIL PROTECTED]
On Sep 30, 8:35?pm, andresj <[EMAIL PROTECTED]> wrote: > I was doing some programming in Python, and the idea came to my mind: > using fractions instead of floats when doing 2/5. > > The problem arises when you try to represent some number, like 0.4 in > a float. It will tell you that it's equal to

Re: Using fractions instead of floats

2007-09-30 Thread andresj
On Sep 30, 6:48 pm, Ben Finney <[EMAIL PROTECTED]> wrote: > andresj <[EMAIL PROTECTED]> writes: > > The problem arises when you try to represent some number, like 0.4 in > > a float. > > Which is really a specific case of the general problem that, for any > given number base, some non-integer numbe

Re: which language allows you to change an argument's value?

2007-09-30 Thread Roedy Green
On Sun, 30 Sep 2007 10:47:13 -, Summercool <[EMAIL PROTECTED]> wrote, quoted or indirectly quoted someone who said : >and now n will be 3. I think C++ and PHP can let you do that, using >their reference (alias) mechanism. And C, Python, and Ruby probably >won't let you do that. What about J

Re: Using fractions instead of floats

2007-09-30 Thread Ben Finney
andresj <[EMAIL PROTECTED]> writes: > The problem arises when you try to represent some number, like 0.4 in > a float. Which is really a specific case of the general problem that, for any given number base, some non-integer numbers cannot be exactly represented as fractions. > Secondly, what hap

Using fractions instead of floats

2007-09-30 Thread andresj
I was doing some programming in Python, and the idea came to my mind: using fractions instead of floats when doing 2/5. The problem arises when you try to represent some number, like 0.4 in a float. It will tell you that it's equal to 0.40002. "This is easy to fix", you may say. "You j

Re: Command-line does work when scheduled

2007-09-30 Thread Jim
On Sep 30, 6:37 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Sun, 30 Sep 2007 11:42:56 -0300, Jim <[EMAIL PROTECTED]> escribi?: > > > > > > > On Sep 29, 8:45 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> > > wrote: > >> The %* at the end is important: if you created the association by usin

ANN: PyPE 2.8.8

2007-09-30 Thread Josiah Carlson
=== What is PyPE? === PyPE (Python Programmers' Editor) was written in order to offer a lightweight but powerful editor for those who think emacs is too much and idle is too little. Syntax highlighting is included out of the box, as is multiple open documents via tabs. Beyond the basic functional

Re: Can you please give me some advice?

2007-09-30 Thread Alex Martelli
Byung-Hee HWANG <[EMAIL PROTECTED]> wrote: > Hi there, > > What is different between Ruby and Python? Not all that much; Python is more mature, Ruby more fashionable. I am wondering what language > is really mine for work. Somebody tell me Ruby is clean or Python is > really easy! Anyway I wil

Re: Command-line does work when scheduled

2007-09-30 Thread Gabriel Genellina
En Sun, 30 Sep 2007 11:42:56 -0300, Jim <[EMAIL PROTECTED]> escribi�: > On Sep 29, 8:45 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> > wrote: >> The %* at the end is important: if you created the association by using >> "Open with...", or selecting Python from the list of installed programs, >> ve

Re: Command-line does work when scheduled

2007-09-30 Thread Jim
On Sep 30, 6:16 pm, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > On Sun, 30 Sep 2007 07:42:56 -0700, Jim <[EMAIL PROTECTED]> > declaimed the following in comp.lang.python: > > > What else could be wrong? > > Thanks, > > Possibly those associations are only defined for your login account,

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-09-30 Thread Ken Tilton
Matthias Benkard wrote: >>So this has nothing to >>do with freedom in /any/ sense of the word, it has to do with a >>political agenda opposed to the idea of private property. > > > Freedom is inherently political, you know. You're condemning the FSF > for being political, although the FSF's st

Re: [Python] Matrix convergence

2007-09-30 Thread Robert Israel
Zhengzheng Pan <[EMAIL PROTECTED]> writes: > Hi all, > > I'm trying to check whether a (stochastic/transition) matrix > converges, i.e. a function/method that will return True if the input > matrix sequence shows convergence and False otherwise. The background > is a Markov progress, so the speci

Re: Can you please give me some advice?

2007-09-30 Thread Bjoern Schliessmann
[EMAIL PROTECTED] wrote: > And, as someone who has been learning Python from almost no > knowledge of programming, I've found it is not too bad in trying > to keep as reasonably close to a natural language like English > as possible. Sure, your next project should be learning COBOL -- it must be

Re: s.split() on multiple separators

2007-09-30 Thread Paul Hankin
On Sep 30, 8:16 pm, [EMAIL PROTECTED] wrote: > > > c=' abcde abc cba fdsa bcd '.split() > > > dels='ce ' > > > for j in dels: > > >cp=[] > > >for i in xrange(0,len(c)-1): > > > The "-1" looks like a bug; remember in Python 'stop' bounds > > are exclusive. The indexes of c are simply xran

Re: Matrix convergence

2007-09-30 Thread Mark Dickinson
On Sep 30, 3:10 pm, Zhengzheng Pan <[EMAIL PROTECTED]> wrote: > I'm trying to check whether a (stochastic/transition) matrix > converges, i.e. a function/method that will return True if the input > matrix sequence shows convergence and False otherwise. The background > is a Markov progress, so the

Re: notify when process finishes (on unix)

2007-09-30 Thread Dan Stromberg
On Sun, 30 Sep 2007 11:54:38 -0700, Michael Bentley wrote: > On Sep 30, 2007, at 7:11 AM, bahoo wrote: >> I'd like to write a script that sends me an email when a unix (Linux) >> process ends running (or CPU drops below some threshold). Could anyone >> point me to the relevant functions, or show

ANN: Generating svn:externals by inspecting a repository - z3c.repoexternals

2007-09-30 Thread Ross Patterson
z3c.repoexternals recursively retrieves subversion directory listings from the url or path and matches directories against a previous set of svn:externals if provided then against regular expressions and generates qualifying svn:externals lines. The defaults generate a set of svn:externals for all

Re: which language allows you to change an argument's value?

2007-09-30 Thread Arne Vajhøj
Erik Wikström wrote: >> their reference (alias) mechanism. And C, Python, and Ruby probably >> won't let you do that. What about Java and Perl? > > C will let you do it with pointers (it is just a syntactical difference > from references in this case) and Java's references allows it. Neither C

Re: Create a string array of all comments in a html file...

2007-09-30 Thread Paul McGuire
On Sep 30, 10:39 am, sophie_newbie <[EMAIL PROTECTED]> wrote: > Hi, I'm wondering how i'd go about extracting a string array of all > comments in a HTML file, HTML comments obviously taking the format > "". > > I'm fairly stumped on how to do this? Maybe using regular expressions? > > Thanks. >>>

Re: GUI for viewing/editing python data structures?

2007-09-30 Thread timaranz
On Sep 27, 11:23 am, "Joshua J. Kugler" <[EMAIL PROTECTED]> wrote: > A while back, I seem to remember coming across a small program that could > view and edit python data structures via a nice expanding tree view. I'm > now in need of something like that (to verify data is imported correctly > int

Re: Delete spaces

2007-09-30 Thread William James
John Machin wrote: > On Sep 29, 1:43 am, [EMAIL PROTECTED] wrote: > > If I have a text file that is delimited by spaces, how do I import it > > and get to comma delimited? Here is a row of data from the text file: > > > > 1110:55:14 265 8.5 > > 1.4+1.1 2.5

Re: which language allows you to change an argument's value?

2007-09-30 Thread Jerry Stuckle
Erik Wikström wrote: > On 2007-09-30 18:49, Summercool wrote: >> On Sep 30, 4:18 am, 7stud -- <[EMAIL PROTECTED]> wrote: >>> SpringFlowers AutumnMoon wrote: we have no way of knowing what we pass in could get changed. >>> Sure you do. You look at the function's signature. In order to us

Re: Can you please give me some advice?

2007-09-30 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : (snip) > I know nothing of Ruby, but just the fact that in Ruby the Hello World > program is > > puts 'Hello, World!' > > whereas the Python Hello World program is > > print 'Hello, World!' > > suggests to me that Python is more intuitive because the word "print" > h

Re: Can you please give me some advice?

2007-09-30 Thread George Sakkis
On Sep 30, 2:54 pm, Ricardo Aráoz <[EMAIL PROTECTED]> wrote: > > Errhhh. guys.. I think .kr means Korea so he would speak > Korean, not Chinese In this case, http://kr.diveintopython.org/html/index.htm might be more useful ;-) George -- http://mail.python.org/mailman/listinfo/python

Re: which language allows you to change an argument's value?

2007-09-30 Thread Bryan Olson
Summercool wrote: > I wonder which language allows you to change an argument's value? > like: > > foo(&a) { > a = 3 > } > > n = 1 > print n > > foo(n) # passing in n, not &n > print n > > and now n will be 3. I think C++ and PHP can let you do that, using > their reference (alias) mechan

Re: s.split() on multiple separators

2007-09-30 Thread mrkafk
> > c=' abcde abc cba fdsa bcd '.split() > > dels='ce ' > > for j in dels: > >cp=[] > >for i in xrange(0,len(c)-1): > > The "-1" looks like a bug; remember in Python 'stop' bounds > are exclusive. The indexes of c are simply xrange(len(c)). Yep. Just found it out, though this seems a bi

Re: which language allows you to change an argument's value?

2007-09-30 Thread Michael Fesser
.oO(Summercool) >I think in Pascal and C, we can never have an >argument modified unless we explicitly allow it, by passing in the >pointer (address) of the argument. Pascal also allows passing by reference, which is done with the keyword 'var' when declaring the function parameters. Object Pasca

[Python] Matrix convergence

2007-09-30 Thread Zhengzheng Pan
Hi all, I'm trying to check whether a (stochastic/transition) matrix converges, i.e. a function/method that will return True if the input matrix sequence shows convergence and False otherwise. The background is a Markov progress, so the special thing about the transition matrix is the values of el

Re: s.split() on multiple separators

2007-09-30 Thread mrkafk
On 30 Wrz, 20:27, William James <[EMAIL PROTECTED]> wrote: > On Sep 30, 8:53 am, [EMAIL PROTECTED] wrote: > E:\Ruby>irb > irb(main):001:0> ' abcde abc cba fdsa bcd '.split(/[ce ]/) > => ["", "ab", "d", "", "ab", "", "", "ba", "fdsa", "b", "d"] That's acceptable only if you write perfect ruby-to-p

Re: s.split() on multiple separators

2007-09-30 Thread mrkafk
> > ['ab', 'd', '', 'ab', '', ''] > > Given your original string, I'm not sure how that would be the > expected result of "split c on the characters in dels". Oops, the inner loop should be: for i in xrange(0,len(c)): Now it works. > >>> c=' abcde abc cba fdsa bcd ' > >>> import re > >>

Re: notify when process finishes (on unix)

2007-09-30 Thread Michael Bentley
On Sep 30, 2007, at 7:11 AM, bahoo wrote: > I'd like to write a script that sends me an email when a unix (Linux) > process ends running (or CPU drops below some threshold). Could > anyone point me to the relevant functions, or show me an example? man at. -- http://mail.python.org/mailman/lis

Re: Can you please give me some advice?

2007-09-30 Thread Ricardo Aráoz
[EMAIL PROTECTED] wrote: >> Hello World in Ruby (and a few other >> languages):http://www.oreillynet.com/ruby/blog/2005/12/hello_world.html > >> Hello World in >> Python:http://python.about.com/od/gettingstarted/ss/helloworld.htm > > I know nothing of Ruby, but just the fact that in Ruby the He

Re: Can you please give me some advice?

2007-09-30 Thread Byung-Hee HWANG
On Sun, 2007-09-30 at 17:27 +, [EMAIL PROTECTED] wrote: > I know nothing of Ruby, but just the fact that in Ruby the Hello World > program is > > puts 'Hello, World!' > > whereas the Python Hello World program is > > print 'Hello, World!' > > suggests to me that Python is more intuitive bec

Re: Create a string array of all comments in a html file...

2007-09-30 Thread William James
On Sep 30, 10:39 am, sophie_newbie <[EMAIL PROTECTED]> wrote: > Hi, I'm wondering how i'd go about extracting a string array of all > comments in a HTML file, HTML comments obviously taking the format > "". > > I'm fairly stumped on how to do this? Maybe using regular expressions? > > Thanks. E:\R

Re: Python and SSL

2007-09-30 Thread Heikki Toivonen
John Nagle wrote: > Any progress on getting M2Crypto 0.18 to build successfully > on Fedora Core? I have had no luck getting a Fedora Core environment running. Ubuntu is my main OS, but I do have VMWare installed. I tried to install FC7 from the live CD into VMWare, but the installer dies. I a

Re: s.split() on multiple separators

2007-09-30 Thread William James
On Sep 30, 8:53 am, [EMAIL PROTECTED] wrote: > Hello everyone, > > OK, so I want to split a string c into words using several different > separators from a list (dels). > > I can do this the following C-like way: > > >>> c=' abcde abc cba fdsa bcd '.split() > >>> dels='ce ' > >>> for j in dels: > >

Re: code for number guessing by computer

2007-09-30 Thread Tim Chase
> hi, please help me,, a newbie...send me code for a programme > in which the computer tell u the number that u guessed I can think of at least two versions of this: >>> _ = raw_input("Think of an integer greater than 1 and less than 3") >>> print "Your number was 2! This cod

Re: How to display a videostream in the PyQt GUI by a efficient way

2007-09-30 Thread David Boddie
On Sun Sep 30 09:10:40 CEST 2007, Kivilaya wrote: >I read the method in the given link and learn a lot from it. I'll > try to display the data inside a QWidget directly instead of the > current way. But I still have a question, is there any way to make the > displaying of RGB data in a QWidget

Re: New to python

2007-09-30 Thread Bruno Desthuilliers
Googy a écrit : > I am new to python... > > The programming language i know well is C > Can any one recommend me the good ebook for beginners. I have loads of > ebooks but i am not able to decide which to start with which book. > Also i am learning XML so later on i can switch to books on Python a

Re: Can you please give me some advice?

2007-09-30 Thread Bruno Desthuilliers
Byung-Hee HWANG a écrit : > Hi there, > > What is different between Ruby and Python? Not much - both are hi-level dynamic object oriented languages with some functional aspects - and quite a lot (their respective object models are totally different). Also, Python, being somewhat older, has pe

Re: which language allows you to change an argument's value?

2007-09-30 Thread Jerry Stuckle
Summercool wrote: > On Sep 30, 4:18 am, 7stud -- <[EMAIL PROTECTED]> wrote: >> SpringFlowers AutumnMoon wrote: >>> we have no way >>> of knowing what we pass in could get changed. >> Sure you do. You look at the function's signature. In order to use >> someone else's library, you have to know the

code for number guessing by computer

2007-09-30 Thread [EMAIL PROTECTED]
hi, please help me,, a newbie...send me code for a programme in which the computer tell u the number that u guessed -- http://mail.python.org/mailman/listinfo/python-list

Re: which language allows you to change an argument's value?

2007-09-30 Thread Erik Wikström
On 2007-09-30 18:49, Summercool wrote: > On Sep 30, 4:18 am, 7stud -- <[EMAIL PROTECTED]> wrote: >> SpringFlowers AutumnMoon wrote: >> > we have no way >> > of knowing what we pass in could get changed. >> >> Sure you do. You look at the function's signature. In order to use >> someone else's lib

Re: s.split() on multiple separators

2007-09-30 Thread Bryan Olson
[EMAIL PROTECTED] wrote: > Hello everyone, > > OK, so I want to split a string c into words using several different > separators from a list (dels). > > I can do this the following C-like way: > > c=' abcde abc cba fdsa bcd '.split() > dels='ce ' > for j in dels: > cp=[] > for i i

Re: Can you please give me some advice?

2007-09-30 Thread cmpython
> Hello World in Ruby (and a few other > languages):http://www.oreillynet.com/ruby/blog/2005/12/hello_world.html > Hello World in > Python:http://python.about.com/od/gettingstarted/ss/helloworld.htm I know nothing of Ruby, but just the fact that in Ruby the Hello World program is puts 'Hello,

Re: which language allows you to change an argument's value?

2007-09-30 Thread Daniel Pitts
On Sep 30, 3:47 am, Summercool <[EMAIL PROTECTED]> wrote: > I wonder which language allows you to change an argument's value? > like: > > foo(&a) { > a = 3 > > } > > n = 1 > print n > > foo(n) # passing in n, not &n > print n > > and now n will be 3. I think C++ and PHP can let you do that,

Re: s.split() on multiple separators

2007-09-30 Thread Tim Chase
> OK, so I want to split a string c into words using several different > separators from a list (dels). > > I can do this the following C-like way: > c=' abcde abc cba fdsa bcd '.split() dels='ce ' for j in dels: > cp=[] > for i in xrange(0,len(c)-1): > cp

Re: which language allows you to change an argument's value?

2007-09-30 Thread Summercool
On Sep 30, 4:18 am, 7stud -- <[EMAIL PROTECTED]> wrote: > SpringFlowers AutumnMoon wrote: > > we have no way > > of knowing what we pass in could get changed. > > Sure you do. You look at the function's signature. In order to use > someone else's library, you have to know the function's signature

Re: Can you please give me some advice?

2007-09-30 Thread George Sakkis
On Sep 30, 6:22 am, Byung-Hee HWANG <[EMAIL PROTECTED]> wrote: > Hi there, > > What is different between Ruby and Python? I am wondering what language > is really mine for work. Somebody tell me Ruby is clean or Python is > really easy! Anyway I will really make decision today what I have to > stud

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-09-30 Thread Matthias Benkard
> So this has nothing to > do with freedom in /any/ sense of the word, it has to do with a > political agenda opposed to the idea of private property. Freedom is inherently political, you know. You're condemning the FSF for being political, although the FSF's stated purpose is a political one. H

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-09-30 Thread Timofei Shatrov
On Sun, 30 Sep 2007 08:43:39 +0200, Klaus Schilling <[EMAIL PROTECTED]> tried to confuse everyone with this message: > >that's because it's immoral not to give it all > >which is necessary in a moral culture. >Only an immoral culture may accept non-disclosure > >private property is unethical > I

ANN: eric 4.0.2 released

2007-09-30 Thread Detlev Offenbach
Hi, this is to inform you about the release of eric 4.0.2. This is mainly a bugfix release. As usual you may get it at http://www.die-offenbachs.de/eric/index.html ChangeLog - - compatibility fixes for Debian - added '-z' to the installer to inhibit compilation of the python files - chan

Re: Create a string array of all comments in a html file...

2007-09-30 Thread Robin Becker
sophie_newbie wrote: > Hi, I'm wondering how i'd go about extracting a string array of all > comments in a HTML file, HTML comments obviously taking the format > "". > > I'm fairly stumped on how to do this? Maybe using regular expressions? > > Thanks. > You should probably eat beautiful soup at

Re: s.split() on multiple separators

2007-09-30 Thread Francesco Guerrieri
On 9/30/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hello everyone, > > OK, so I want to split a string c into words using several different > separators from a list (dels). Have a look at this recipe: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/303342 which contains several w

Re: s.split() on multiple separators

2007-09-30 Thread Francesco Guerrieri
On 9/30/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hello everyone, > > OK, so I want to split a string c into words using several different > separators from a list (dels). Have a look at this recipe: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/303342 which contains several w

Create a string array of all comments in a html file...

2007-09-30 Thread sophie_newbie
Hi, I'm wondering how i'd go about extracting a string array of all comments in a HTML file, HTML comments obviously taking the format "". I'm fairly stumped on how to do this? Maybe using regular expressions? Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: How to unload a module after I've imported it.

2007-09-30 Thread Fuzzyman
On Sep 29, 9:32 pm, marvinla <[EMAIL PROTECTED]> wrote: > Have you tried a del? > > >> import socket > >> dir() > > ['__builtins__', '__doc__', '__name__', 'socket']>> del socket > >> dir() > > ['__builtins__', '__doc__', '__name__'] > > See you! >>> import socket >>> import sys >>> 'socket' in sy

Re: Command-line does work when scheduled

2007-09-30 Thread Jim
On Sep 29, 8:45 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Sat, 29 Sep 2007 22:04:06 -0300, Jim <[EMAIL PROTECTED]> escribi?: > > >> If it works this way, maybe the .py file extension is not correctly > >> registered. > > > Yes, it works this way. > > How do I register the .py extensio

notify when process finishes (on unix)

2007-09-30 Thread bahoo
Hi, I'd like to write a script that sends me an email when a unix (Linux) process ends running (or CPU drops below some threshold). Could anyone point me to the relevant functions, or show me an example? Thanks bahoo -- http://mail.python.org/mailman/listinfo/python-list

s.split() on multiple separators

2007-09-30 Thread mrkafk
Hello everyone, OK, so I want to split a string c into words using several different separators from a list (dels). I can do this the following C-like way: >>> c=' abcde abc cba fdsa bcd '.split() >>> dels='ce ' >>> for j in dels: cp=[] for i in xrange(0,len(c)-1):

Re: Can you please give me some advice?

2007-09-30 Thread Byung-Hee HWANG
On Sun, 2007-09-30 at 10:36 +, Steven D'Aprano wrote: [...snip...] > Sorry about the English. That's alright. I am always struggling against English. It is not strange now. Thank you for your kindness. Byung-Hee -- http://mail.python.org/mailman/listinfo/python-list

Re: Optparse and help formatting?

2007-09-30 Thread Tim Chase
>> def format_option(self, option): >> # The help for each option consists of two parts: >> # * the opt strings and metavars > [snip] > > Tim, I notice you're using lots of # lines as comments to describe the > function. Perhaps you should consider using docstrings instead. > > Pard

Re: is it possible to use different font within one wxpython static text widget?

2007-09-30 Thread hyena
[EMAIL PROTECTED] : > On Sep 12, 10:26 am, "hyena" <[EMAIL PROTECTED]> wrote: >> problem is as title, bear me if this too silly or too naive. >> >> I use wx.statictext widget to show some information in GUI, there are some >> numbers in the text to be emphasized in bigger other color. For examp

Re: Can you please give me some advice?

2007-09-30 Thread Byung-Hee HWANG
On Sun, 2007-09-30 at 12:33 +0200, morphine wrote: > Byung-Hee HWANG wrote: > > > Hi there, > > > > What is different between Ruby and Python? I am wondering what language > > is really mine for work. Somebody tell me Ruby is clean or Python is > > really easy! Anyway I will really make decision

Re: Optparse and help formatting?

2007-09-30 Thread Steven D'Aprano
On Sun, 30 Sep 2007 07:37:10 -0500, Tim Chase wrote: > def format_option(self, option): > # The help for each option consists of two parts: > # * the opt strings and metavars [snip] Tim, I notice you're using lots of # lines as comments to describe the function. Perhaps you should c

Re: Optparse and help formatting?

2007-09-30 Thread Tim Chase
>> I've been learning the ropes of the optparse module and have been >> having some trouble getting the help to format the way I want. > > A quick perusal of the 'optparse.py' code shows me this: > > > [...] > class OptionParser([...]): > def __init__([...], > format

OSDC 2007 earlybird registration now open!

2007-09-30 Thread Richard Jones
[and now with more information] The Open Source Developers' Conference is designed by open source developers, for developers and business people. It covers numerous programming languages across a range of operating systems, and related topics such as business processes, licensing, and strategy.

Re: which language allows you to change an argument's value?

2007-09-30 Thread Erik Wikström
On 2007-09-30 12:47, Summercool wrote: > I wonder which language allows you to change an argument's value? > like: > > foo(&a) { > a = 3 > } > > n = 1 > print n > > foo(n) # passing in n, not &n > print n > > and now n will be 3. I think C++ and PHP can let you do that, using Since you

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-09-30 Thread Klaus Schilling
Ken Tilton <[EMAIL PROTECTED]> writes: > > Sure, but where does the infection thing come in? Suppose RMS > publishes a new library call add-42, whose api is add-42, inputs n, > outputs n+42, source left as an exercise, and Kenny decides he can use > it, it is great. Now if Kenny uses it in his comm

Re: which language allows you to change an argument's value?

2007-09-30 Thread Gabriel Genellina
En Sun, 30 Sep 2007 07:47:13 -0300, Summercool <[EMAIL PROTECTED]> escribi�: > I wonder which language allows you to change an argument's value? > like: > > foo(&a) { > a = 3 > } > > n = 1 > print n > > foo(n) # passing in n, not &n > print n > > and now n will be 3. I think C++ and PHP c

Re: which language allows you to change an argument's value?

2007-09-30 Thread rolkA
On 30 sep, 12:47, Summercool <[EMAIL PROTECTED]> wrote: > I wonder which language allows you to change an argument's value? > like: > > foo(&a) { > a = 3 > > } > > ... > is there any way to prevent a function from changing the argument's > value? > ... > Is there a way to prevent it from happenin

which language allows you to change an argument's value?

2007-09-30 Thread Summercool
I wonder which language allows you to change an argument's value? like: foo(&a) { a = 3 } n = 1 print n foo(n) # passing in n, not &n print n and now n will be 3. I think C++ and PHP can let you do that, using their reference (alias) mechanism. And C, Python, and Ruby probably won't le

Re: Can you please give me some advice?

2007-09-30 Thread Steven D'Aprano
On Sun, 30 Sep 2007 19:22:07 +0900, Byung-Hee HWANG wrote: > Hi there, > > What is different between Ruby and Python? I am wondering what language > is really mine for work. Somebody tell me Ruby is clean or Python is > really easy! Anyway I will really make decision today what I have to > study

Re: Can you please give me some advice?

2007-09-30 Thread morphine
Byung-Hee HWANG wrote: > Hi there, > > What is different between Ruby and Python? I am wondering what language > is really mine for work. Somebody tell me Ruby is clean or Python is > really easy! Anyway I will really make decision today what I have to > study from now on. What kind of advice d

Can you please give me some advice?

2007-09-30 Thread Byung-Hee HWANG
Hi there, What is different between Ruby and Python? I am wondering what language is really mine for work. Somebody tell me Ruby is clean or Python is really easy! Anyway I will really make decision today what I have to study from now on. What I make the decision is more difficult than to know why

Re: Balloon Taskbar Popup for Windows XP

2007-09-30 Thread momobear
On Sep 29, 6:40 pm, makko <[EMAIL PROTECTED]> wrote: > Greetings, > I need to create a function that will produce a balloon popup in the > taskbar when called. Whats the shortest and easiest way to do this? > Thanks. > > regards, > Makko look at the website, maybe helpful to you. http://xoomer.ali

Re: How to display a videostream in the PyQt GUI by a efficient way

2007-09-30 Thread kivilaya
Hi, David, thank you for your help! ^__^ I read the method in the given link and learn a lot from it. I'll try to display the data inside a QWidget directly instead of the current way. But I still have a question, is there any way to make the displaying of RGB data in a QWidget more quickly.

Re: Optparse and help formatting?

2007-09-30 Thread Steven Bethard
Tim Chase wrote: > I've been learning the ropes of the optparse module and have been > having some trouble getting the help to format the way I want. > > I want to specify parts of an option's help as multiline. > However, the optparse formatter seems to eat newlines despite my > inability to find

Re: New to python

2007-09-30 Thread James Matthews
Both are good however when looking for a book i would recommend core python programming version 2! Enjoy OOP On 30 Sep 2007 05:21:50 GMT, Stargaming <[EMAIL PROTECTED]> wrote: > > On Sat, 29 Sep 2007 21:20:10 -0700, Googy wrote: > > > I am new to python... > > > > The programming language i know w