ANN: SIP v4.4 Released

2006-03-25 Thread Phil Thompson
Riverbank Computing is pleased to announce the release of SIP v4.4 available from http://www.riverbankcomputing.co.uk/sip/. SIP is a tool for generating Python modules that wrap C or C++ libraries. It is similar to SWIG. It is used to generate PyQt and PyKDE. Full documentation is available

ANN: eric3 3.8.2 release

2006-03-25 Thread Detlev Offenbach
Hi, this is to let all of you know about the release of eric3 3.8.2. This version fixes a compatibility bug with the latest PyQt release (PyQt 3.16). Eric3 is a Python and Ruby IDE with batteries included. It is written using PyQt and is available via

Re: a problem to solve

2006-03-25 Thread [EMAIL PROTECTED]
John Salerno wrote: [EMAIL PROTECTED] wrote: If you need help in figuring out how to walk through all 4096 possible switch sets, just ask. Ok, thanks to your list, I figured out a program that works! It's probably not the best, and it doesn't really display which switches are correct in

how to format a return value by using re.sub(regx,rep1,str)?

2006-03-25 Thread dongdong
for example: re.sub('a( [^]+)+\s?[^^]*/a','',' asd gaa target=_blank href=http://www.sine.com; class=wordstyle asdgasdghae rha/a') I wish to get the return value asd ga asdgasdghae rha,how do do? I have a impression on % and {number},but forgot how to use them. --

ANN: PyQt v3.16 Released

2006-03-25 Thread Phil Thompson
Riverbank Computing is pleased to announce the release of PyQt v3.16 available from http://www.riverbankcomputing.co.uk/pyqt/. The main benefit of this release is that it can be installed side by side with the soon-to-be-released PyQt v4 (for Qt v4). Other changes since the last release

Comparisons and singletons

2006-03-25 Thread Steven Watanabe
PEP 8 says, Comparisons to singletons like None should always be done with 'is' or 'is not', never the equality operators. I know that is is an identity operator, == and != are the equality operators, but I'm not sure what other singletons are being referred to here. Also, I've seen code that

Building Python extensions from sources on Windows

2006-03-25 Thread TPJ
Hello, I have another, probably stupid, question. I'm working on some Python project, and I use some extensions written in C. I do all the development on my GNU/Linux box, so my setup.py script works just as it's supposed to work on a GNU/Linux system. But in the nearest future I'll have to make

Re: Comparisons and singletons

2006-03-25 Thread Ziga Seilnacht
Steven Watanabe wrote: PEP 8 says, Comparisons to singletons like None should always be done with 'is' or 'is not', never the equality operators. I know that is is an identity operator, == and != are the equality operators, but I'm not sure what other singletons are being referred to here.

ANN: eric3 3.8.2 release

2006-03-25 Thread Detlev Offenbach
Hi, this is to let all of you know about the release of eric3 3.8.2. This version fixes a compatibility bug with the latest PyQt release (PyQt 3.16). Eric3 is a Python and Ruby IDE with batteries included. It is written using PyQt and is available via

Re: Multiplying sequences with floats

2006-03-25 Thread Christoph Zwerschke
Caleb Hattingh wrote: 4.0//2 doesn't return an integer, but the equality against an integer still holds. I agree that integer division should return an integer, because using the operator at all means you expect one. There are actually two conflicting expectations here: You're right, the

************************************LOOK AT THIS*************************************

2006-03-25 Thread lezhewitt67
I am trying to gain sponsorship for a charity The Stroke Association for which i am doing the London Marathon in April this year. I would be greatful if all those persons who see this message would visit my webpage at www.justgiving.com/lezmarathon. All donations are welcome no matter how small.

Re: Programming challenge: wildcard exclusion in cartesian products

2006-03-25 Thread Dirk Thierbach
Dinko Tenev [EMAIL PROTECTED] wrote: Dirk Thierbach wrote: [A lot of stuff] Now clearer? Let's leave it there, and take a break. Maybe it would help to just take a concrete example, and work through it. Then you'll see exactly what happens. - Dirk --

OT: unix newbie questions

2006-03-25 Thread Gerard Flanagan
Hello all Some basic unix questions which pure laziness prevents me from googling for. Anyone feeling charitable? I'm using FreeBSD 6.0: * To create an empty __init__.py file I do 'vim __init__.py' then immediately exit vim, is there a shell or vim command which will create an empty file

Re: Incremental Compression

2006-03-25 Thread Eyal Lotem
Adam DePrince wrote: On Sat, 2006-03-25 at 03:08 +0200, Eyal Lotem wrote: Hey. I have a problem in some network code. I want to send my packets compressed, but I don't want to compress each packet separately (via .encode('zlib') or such) but rather I'd like to compress it with regard to

Re: OT: unix newbie questions

2006-03-25 Thread Rene Pijlman
Gerard Flanagan: * To create an empty __init__.py file I do 'vim __init__.py' then immediately exit vim, is there a shell or vim command which will create an empty file without opening the editor? touch __init__.py * cd ~ brings me to my home directory, is there a means by which I can set up a

Re: how to format a return value by using re.sub(regx,rep1,str)?

2006-03-25 Thread Kent Johnson
dongdong wrote: for example: re.sub('a( [^]+)+\s?[^^]*/a','',' asd gaa target=_blank href=http://www.sine.com; class=wordstyle asdgasdghae rha/a') I wish to get the return value asd ga asdgasdghae rha,how do do? I have a impression on % and {number},but forgot how to use them. Use a

Re: OT: unix newbie questions

2006-03-25 Thread Diez B. Roggisch
* If I want to do : mv mypackage-1.0.2.tar.gz subdir/mypackage-1.0.2.tar.gz then tab-completion gives me the first occurrence of the file, but I have to type the second occurrence - is there a way of not having to type it? No need to give it the name the second time. #

MySQLDB - return strange type of variable

2006-03-25 Thread Grzegorz Smith
Hi all. I'm trying get data from text field in MySQl 5.0 with my National characters. Data are stored in utf8 encodings. Here is the script: import MySQLdb, MySQLdb.cursors conn = MySQLdb.connect(host='localhost', user='root', passwd='123456', db='profile_locale') c =

MyghtyBoard 0.0.1

2006-03-25 Thread piotr maliński
MyghtyBoard 0.0.1 alfa have been released. It's a forum script written in python/myghty/hk_classes. Download: http://sourceforge.net/project/showfiles.php?group_id=163611package_id=185021release_id=404570 Few old screens: http://www.fotosik.pl/pokaz_obrazek/q0pq9tc1i6aphwc4.html

Re: encoding problems (é and è)

2006-03-25 Thread Martin v. Löwis
Serge Orlov wrote: The problem is that U+0587 is a ligature in Western Armenian dialect (hy locale) and a character in Eastern Armenian dialect (hy_AM locale). It is strange the code point is marked as compatibility char. It either mistake or political decision. It used to be a ligature before

Re: Building Python extensions from sources on Windows

2006-03-25 Thread Martin v. Löwis
TPJ wrote: And that's the problem: I understand the fact, that in order to build a non-pure distrubution, all the C sources have to be compiled (to dll libraries?). But there's the problem: I don't know which one compiler should I use. Do I have to use the same compiler, that the Python has

Beginner's question: executing scripts under Win XP pro

2006-03-25 Thread Jean-Claude Garreau
Hi, I'm a beginner with python 2.4. I use it on Win XP Pro. I have no problems with the GUI IDLE, but when I copy the instructions in a script file, say 'test.py' and double click on the file, I have just a console window for a few moments, no output shown and the window closes automatically

Re: Beginner's question: executing scripts under Win XP pro

2006-03-25 Thread [EMAIL PROTECTED]
there seems to be an error in your script. Why don't you execute it directly from IDLE (F5) ? There, you should see where the problem is. -- http://mail.python.org/mailman/listinfo/python-list

Re: How do I handle #

2006-03-25 Thread Michael Sperlle
On Sat, 25 Mar 2006 07:06:59 +0100, Fredrik Lundh wrote: Michael Sperlle wrote: I need to write out a file containing the # comment. When I try to specify it as part of a literal, everything afterward turns into a comment. turns into a comment in what sense ? from your description, it

Re: Beginner's question: executing scripts under Win XP pro

2006-03-25 Thread Jean-Claude Garreau
Thank you for your answer. I did it. It executes perfectly in IDLE. I made a copy/paste from IDLE into the 'test.py' and I obseved the behavior I discribed. The script is extremely simple (it is just a test): n=0 while( n10 ): print n,n*n n+=1 [EMAIL PROTECTED] a écrit dans le

Re: What's The Best Editor for python

2006-03-25 Thread gene tani
Christoph Zwerschke wrote: Just because nobody has mentioned them so far: - SciTe is a perfect editor for Pyhton on Win and Linx - PyScripter is a wonderful IDE (but only on Win) - DrPython is a nice platform independent editor/mini-IDE

Re: Beginner's question: executing scripts under Win XP pro

2006-03-25 Thread Scott Souva
On Sat, 25 Mar 2006 14:45:34 +0100, Jean-Claude Garreau [EMAIL PROTECTED] wrote: Hi, I'm a beginner with python 2.4. I use it on Win XP Pro. I have no problems with the GUI IDLE, but when I copy the instructions in a script file, say 'test.py' and double click on the file, I have just a

Re: What's The Best Editor for python

2006-03-25 Thread gene tani
gene tani wrote: Christoph Zwerschke wrote: Just because nobody has mentioned them so far: http://spyced.blogspot.com/2006/02/pycon-python-ide-review.html -- http://mail.python.org/mailman/listinfo/python-list

Re: __slots__

2006-03-25 Thread David Isaac
Aahz [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Because __slots__ breaks with inheritance. I believe that was the point of Ziga's example, which I acknowledged as a good one in my reply. So there still appears to be this single reason, which applies if your class may be

Re: overlapping sets

2006-03-25 Thread Alex Martelli
Lonnie Princehouse [EMAIL PROTECTED] wrote: There is a sets.Set class built in to Python. You might want to use In 2.4, there's also a set builtin type -- you can keep using the sets module from the standard library, but the built-in set is faster. If you need compatibility with both 2.3 and

Re: Comparisons and singletons

2006-03-25 Thread David Isaac
Ziga Seilnacht [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] a = 1 b = 1 a == b True a is b False Two follow up questions: 1. I wondered about your example, and noticed a = 10 b = 10 a is b True Why the difference? 2. If I really want a value True will I ever

Re: __slots__

2006-03-25 Thread Alex Martelli
David Isaac [EMAIL PROTECTED] wrote: ... Does this beg the question of whether __slots__ *should* break with inheritance? How would you expect the following code to behave: class Base(object): def __init__(self): self.x = 23 class Derived(Base): __slots__ = 'y', ? I would expect

check object being a compiled regular expression

2006-03-25 Thread Helmut Jarausch
Hi, sorry, this seems to be a FAQ but I couldn't find anything I need to check if an object is a compiled regular expression Say import re RX= re.compile('^something') how to test if RX is a compiled regular expression type(RX) says type '_sre.SRE_Pattern' but if

Re: Comparisons and singletons

2006-03-25 Thread Chris Mellon
On 3/25/06, David Isaac [EMAIL PROTECTED] wrote: Ziga Seilnacht [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] a = 1 b = 1 a == b True a is b False Two follow up questions: 1. I wondered about your example, and noticed a = 10 b = 10 a is b True

Re: MySQLDB - return strange type of variable

2006-03-25 Thread Jeffrey Froman
Grzegorz Smith wrote: Hi all. I'm trying get data from text field in MySQl 5.0 with my National characters. Data are stored in utf8 encodings. Here is the script: import MySQLdb, MySQLdb.cursors conn = MySQLdb.connect(host='localhost', user='root', passwd='123456', db='profile_locale') c =

Re: how to format a return value by using re.sub(regx,rep1,str)?

2006-03-25 Thread Paul McGuire
dongdong [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] for example: re.sub('a( [^]+)+\s?[^^]*/a','',' asd gaa target=_blank href=http://www.sine.com; class=wordstyle asdgasdghae rha/a') I wish to get the return value asd ga asdgasdghae rha,how do do? I have a impression on % and

Re: check object being a compiled regular expression

2006-03-25 Thread James Thiele
This is crude, but works: import re RX= re.compile('^something') str(RX).find(_sre.SRE_Pattern) == 0 True -- http://mail.python.org/mailman/listinfo/python-list

Re: Python types

2006-03-25 Thread BWill
Salvatore wrote: Hello, I've read several articles where it's said that Python is weakly typed. I'm a little surprised. All objects seem to have a perfectly defined type Am i wrong? Regards Aye, the other posters are right about you being right. This is just one of the great mass

Re: Python types

2006-03-25 Thread Salvatore
Thank's everybody :-) Here is a type définition I've found on the net which I agree with : Attribute of a variable which determines the set of the values this variabe can take and the operations we can apply on it. -- http://mail.python.org/mailman/listinfo/python-list

Re: Comparisons and singletons

2006-03-25 Thread Ziga Seilnacht
David Isaac wrote: Ziga Seilnacht [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] a = 1 b = 1 a == b True a is b False Two follow up questions: 1. I wondered about your example, and noticed a = 10 b = 10 a is b True Why the difference? Python has

Re: check object being a compiled regular expression

2006-03-25 Thread Diez B. Roggisch
Helmut Jarausch schrieb: Hi, sorry, this seems to be a FAQ but I couldn't find anything I need to check if an object is a compiled regular expression Say import re RX= re.compile('^something') how to test if RX is a compiled regular expression type(RX) says type

Custom behavior defined in the imported module

2006-03-25 Thread Paul McGuire
I have a new enhancement to pyparsing that doubles the parse speed (using a technique called packrat parsing), but which is not suitable for all parsers, specifically those that have complex parse actions. I don't want to just enable this feature by default - I think there is too much risk of it

Re: __slots__

2006-03-25 Thread Ron Garret
In article [EMAIL PROTECTED], [EMAIL PROTECTED] (Alex Martelli) wrote: One other question I did not get answered: is there any simple example of a Pythonic use of __slots__ that does NOT involve the creation of **many** instances. Since the only benefit of __slots__ is saving a few

Re: Python types

2006-03-25 Thread Alex Martelli
Salvatore [EMAIL PROTECTED] wrote: Thank's everybody :-) Here is a type définition I've found on the net which I agree with : Attribute of a variable which determines the set of the values this variabe can take and the operations we can apply on it. Hmmm -- that doesn't work very well

Re: imap folder scanner

2006-03-25 Thread Sebastjan Trepca
senders is list, that is why that regex does not work. I don't like regexes that much so you can try this:parsed_senders = []sender = for item in senders: if isinstance(item,tuple): item= ''.join(item) if item==')': parsed_senders.append(sender[sender.find('From:')+5:].strip()) sender = else:

Re: newbie parsing question

2006-03-25 Thread Paul McGuire
Kun [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] i have a list of that is: [('460 (BODY[HEADER.FIELDS (FROM)] {46}', 'From: Friend [EMAIL PROTECTED]\r\n\r\n'), ')', ('462 (BODY[HEADER.FIELDS (FROM)] {37}', 'From: Kun [EMAIL PROTECTED]\r\n\r\n'), ')'] how do i parse the email

Re: __slots__

2006-03-25 Thread Alex Martelli
Ron Garret [EMAIL PROTECTED] wrote: In article [EMAIL PROTECTED], [EMAIL PROTECTED] (Alex Martelli) wrote: One other question I did not get answered: is there any simple example of a Pythonic use of __slots__ that does NOT involve the creation of **many** instances. Since the

Re: image reduction script

2006-03-25 Thread Philippe Martin
Larry, I actually did not find what I needed in PIL (missed it ?) but found this package quite usefull: http://www.imagemagick.org/script/index.php Philippe Larry Bates wrote: Philippe Martin wrote: Hi, I need to write a script to reduce the resolution/color depth of an image (ex:

Accessing func_name from inside a function

2006-03-25 Thread James Thiele
I'd like to access the name of a function from inside the function. My first idea didn't work. def foo(): ... print func_name ... foo() Traceback (most recent call last): File stdin, line 1, in ? File stdin, line 2, in foo NameError: global name 'func_name' is not defined My second

Re: Python types

2006-03-25 Thread Salvatore
Grazie ALex, for your comment. -- http://mail.python.org/mailman/listinfo/python-list

Re: __slots__

2006-03-25 Thread Duncan Booth
Ron Garret wrote: [EMAIL PROTECTED] (Alex Martelli) wrote: One other question I did not get answered: is there any simple example of a Pythonic use of __slots__ that does NOT involve the creation of **many** instances. Since the only benefit of __slots__ is saving a few bytes per

Re: Accessing func_name from inside a function

2006-03-25 Thread Martin v. Löwis
James Thiele wrote: Is there a standard way of getting the name of a function from inside the function? No, there isn't. Martin -- http://mail.python.org/mailman/listinfo/python-list

HIRING: PHP Developer

2006-03-25 Thread HiringDivision
From: In Need - view profile Date: Fri, Mar 24 2006 10:39 pm Email: In Need [EMAIL PROTECTED] Groups: hfx.forsale Not yet ratedRating: show options Reply | Reply to Author | Forward | Print | Individual Message | Show original | Report Abuse | Find messages by this author We are hiring

detecting drives for windows and linux

2006-03-25 Thread BWill
Hi, I'm writing a file browser, but I'm not sure how I could go about detecting the drives available on windows and linux systems (preferably using the standard modules if possible). I guess I could just try to list root on each letter of the alphabet for windows and see if it works, but that

Re: Custom behavior defined in the imported module

2006-03-25 Thread Kent Johnson
Paul McGuire wrote: The alternatives I've come up with for the user to enable this packrat parse mode are: 1. Add a staticmethod enablePackrat() to the pyparsing ParserElement class, to modify the ParserElement defintion of the internal (non-packrat) parse() method. This method essentially

Re: Accessing func_name from inside a function

2006-03-25 Thread Kent Johnson
James Thiele wrote: I'd like to access the name of a function from inside the function. http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/66062 Kent -- http://mail.python.org/mailman/listinfo/python-list

Re: Custom behavior defined in the imported module

2006-03-25 Thread Paul McGuire
Kent Johnson [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Paul McGuire wrote: The alternatives I've come up with for the user to enable this packrat parse mode are: 1. Add a staticmethod enablePackrat() to the pyparsing ParserElement class, to modify the ParserElement

Re: Custom behavior defined in the imported module

2006-03-25 Thread Paul McGuire
Kent Johnson [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Paul McGuire wrote: The alternatives I've come up with for the user to enable this packrat parse mode are: 1. Add a staticmethod enablePackrat() to the pyparsing ParserElement class, to modify the ParserElement

Re: Accessing func_name from inside a function

2006-03-25 Thread James Thiele
OK. But that's just as ugly as my attempt. -- http://mail.python.org/mailman/listinfo/python-list

Re: Custom behavior defined in the imported module

2006-03-25 Thread Paul McGuire
Kent Johnson [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Paul McGuire wrote: The alternatives I've come up with for the user to enable this packrat parse mode are: 1. Add a staticmethod enablePackrat() to the pyparsing ParserElement class, to modify the ParserElement

a somewhat off-topic question about linux

2006-03-25 Thread John Salerno
I'm interested in trying out Linux, probably Ubuntu, but I was wondering which distribution you guys like to use (because it's a pain trying to decide!) and you guys are smart. And to keep it Python related, I'll also ask, is there anything special I need to know about using Python on Linux?

Re: a somewhat off-topic question about linux

2006-03-25 Thread Christoph Haas
On Sat, Mar 25, 2006 at 03:09:53PM -0500, John Salerno wrote: I'm interested in trying out Linux, probably Ubuntu, but I was wondering which distribution you guys like to use (because it's a pain trying to decide!) and you guys are smart. We had this discussion a couple of time during the

Re: detecting drives for windows and linux

2006-03-25 Thread Tim Golden
BWill wrote: Hi, I'm writing a file browser, but I'm not sure how I could go about detecting the drives available on windows and linux systems (preferably using the standard modules if possible). I guess I could just try to list root on each letter of the alphabet for windows and see if it

Re: Comparisons and singletons

2006-03-25 Thread Felipe Almeida Lessa
Em Sáb, 2006-03-25 às 09:11 -0800, Ziga Seilnacht escreveu: Python has a special internal list of integers in which it caches numbers smaller than 1000 (I'm not sure that the number is correct), but that is an implementation detail and you should not rely on it. By testing: a = 10 b = 10 a

Re: a somewhat off-topic question about linux

2006-03-25 Thread John Salerno
Christoph Haas wrote: On Sat, Mar 25, 2006 at 03:09:53PM -0500, John Salerno wrote: I'm interested in trying out Linux, probably Ubuntu, but I was wondering which distribution you guys like to use (because it's a pain trying to decide!) and you guys are smart. We had this discussion a

pondering about the essence of types in python

2006-03-25 Thread gangesmaster
let's start with a question: == class z(object): ... def __init__(self): ... self.blah=5 ... class x(object): ... def __init__(self): ... z.__init__(self) ... y=x() Traceback (most recent call last): File stdin, line 1, in ? File stdin, line 3, in

Re: detecting drives for windows and linux

2006-03-25 Thread BWill
Tim Golden wrote: BWill wrote: Hi, I'm writing a file browser, but I'm not sure how I could go about detecting the drives available on windows and linux systems (preferably using the standard modules if possible). I guess I could just try to list root on each letter of the alphabet for

Re: a somewhat off-topic question about linux

2006-03-25 Thread Duncan Booth
John Salerno wrote: I'm interested in trying out Linux, probably Ubuntu, but I was wondering which distribution you guys like to use (because it's a pain trying to decide!) and you guys are smart. If you just want to try out Linux then a very easy way is to use VMWare Player: download it

simple string search and replace

2006-03-25 Thread Kun
hey guys, here's my code, senders = [('460 (BODY[HEADER.FIELDS (FROM)] {46}', 'From: Friend [EMAIL PROTECTED]\r\n\r\n'), ')', ('462 (BODY[HEADER.FIELDS (FROM)] {37}', 'From: Kun [EMAIL PROTECTED]\r\n\r\n'), ')'] print senders parsed_senders = [] sender = for item in senders: if

(not really) randon ideas

2006-03-25 Thread oluoluolu
I have been programming in Python for many years, and I generally have run into alot of the same problems repeatedly. What is the consensus on these ideas please? * enums * constants * an imagefile ala smalltalk * symbols ala lisp/scheme thx in advance --

Re: a somewhat off-topic question about linux

2006-03-25 Thread John Salerno
Duncan Booth wrote: John Salerno wrote: I'm interested in trying out Linux, probably Ubuntu, but I was wondering which distribution you guys like to use (because it's a pain trying to decide!) and you guys are smart. If you just want to try out Linux then a very easy way is to use

is mysqlsb compatible with MySQL 5.0?

2006-03-25 Thread John Salerno
My web server told me it isn't, which is why they are sticking with MySQL 4.0 for now, but I'm obsessed with using the latest versions, so I just want to be sure. According to the mysqldb download page at sourceforge, it is compatible with 5.0 Thanks. --

Re: simple string search and replace

2006-03-25 Thread bearophileHUGS
Generally, to remove a substring (like ) from a string you can use the replace method (that returns a new string): s = ...anon.wharton.com... s.replace(, ) '...anon.wharton.com...' You can use it with something like: print [s.replace(, ) for s in parsed_senders] or you can put the replace()

Re: Why are so many built-in types inheritable?

2006-03-25 Thread Fabiano Sidler
Kent Johnson [EMAIL PROTECTED] wrote: You could do this with a simple decorator: http://wiki.python.org/moin/PythonDecoratorLibrary#head-d4ce77c6d6e75aad25baf982f6fec0ff4b3653f4 or I think your class PrintingFunction would work as class PrintingFunction(object): def __init__(self, func):

using regex to pull out email addresses

2006-03-25 Thread Kun
i have a regular expression that searches a string and plucks out email addresses however it doesn't work for email addresses w/a subdomain e.g. [EMAIL PROTECTED] emails = re.findall('([EMAIL PROTECTED])', senderlist) -- my code is there any way to modify that to include email addresses that

Re: is mysqlsb compatible with MySQL 5.0?

2006-03-25 Thread Ravi Teja
Yes! It does. Assuming that you are not terribly bandwidth constrained, isn't it easier for you to try it yourself on your own machine than wait for other people to assure you, given that both are free and pretty much run on any platform? -- http://mail.python.org/mailman/listinfo/python-list

noobie mkdir problem/question

2006-03-25 Thread ProvoWallis
Hi, I'm trying to write a script that will create a new directory and then write the results to this newly created directory but it doesn't seem to work for me and I don't know why. I'm hoping someone can see my mistake or at least point me in the right direction. I start like this capturing the

Re: HIRING: PHP Developer

2006-03-25 Thread Jerry Stuckle
[EMAIL PROTECTED] wrote: From: In Need - view profile Date: Fri, Mar 24 2006 10:39 pm Email: In Need [EMAIL PROTECTED] Groups: hfx.forsale Not yet ratedRating: show options Reply | Reply to Author | Forward | Print | Individual Message | Show original | Report Abuse | Find

Re: (not really) randon ideas

2006-03-25 Thread Marc 'BlackJack' Rintsch
In [EMAIL PROTECTED], oluoluolu wrote: I have been programming in Python for many years, and I generally have run into alot of the same problems repeatedly. What is the consensus on these ideas please? * enums There's a cookbook recipe:

Re: is mysqlsb compatible with MySQL 5.0?

2006-03-25 Thread John Salerno
Ravi Teja wrote: Yes! It does. Assuming that you are not terribly bandwidth constrained, isn't it easier for you to try it yourself on your own machine than wait for other people to assure you, given that both are free and pretty much run on any platform? Yeah, actually I went ahead and

Re: using regex to pull out email addresses

2006-03-25 Thread Arne Ludwig
senderlist=na nu [EMAIL PROTECTED] hu [EMAIL PROTECTED] [EMAIL PROTECTED] fa hu print [ s[0] for s in re.findall((\w+@(\w+\.)+\w+),senderlist) ] ['[EMAIL PROTECTED]', '[EMAIL PROTECTED]'] -- http://mail.python.org/mailman/listinfo/python-list

Re: pondering about the essence of types in python

2006-03-25 Thread Steve Holden
gangesmaster wrote: let's start with a question: == class z(object): ... def __init__(self): ... self.blah=5 ... class x(object): ... def __init__(self): ... z.__init__(self) ... y=x() Traceback (most recent call last): File stdin,

Re: simple string search and replace

2006-03-25 Thread Steve Holden
Kun wrote: hey guys, here's my code, senders = [('460 (BODY[HEADER.FIELDS (FROM)] {46}', 'From: Friend [EMAIL PROTECTED]\r\n\r\n'), ')', ('462 (BODY[HEADER.FIELDS (FROM)] {37}', 'From: Kun [EMAIL PROTECTED]\r\n\r\n'), ')'] print senders parsed_senders = [] sender = for item in

sending emails to a list of recipients

2006-03-25 Thread Kun
i have the following code: -- import smtplib from email.MIMEText import MIMEText fp = open('confirmation.txt', 'rb') msg = MIMEText(fp.read()) From = '[EMAIL PROTECTED]' msg['Subject'] = 'Purchase Confirmation' msg ['From'] = From msg['To'] = emails s =

Re: sending emails to a list of recipients [update]

2006-03-25 Thread Kun
Kun wrote: i have the following code: -- import smtplib from email.MIMEText import MIMEText fp = open('confirmation.txt', 'rb') msg = MIMEText(fp.read()) From = '[EMAIL PROTECTED]' msg['Subject'] = 'Purchase Confirmation' msg ['From'] = From

Re: (not really) randon ideas

2006-03-25 Thread [EMAIL PROTECTED]
regarding the constants, this is more for the vm (and type safety). actually enums, constants and symbols can prolly be implemented more or less the same. -- http://mail.python.org/mailman/listinfo/python-list

Re: __slots__

2006-03-25 Thread John J. Lee
[EMAIL PROTECTED] (Alex Martelli) writes: [...] you should be using pychecker or pylint [...] I'm curious, as somebody who doesn't regularly use these tools: How do they fit into your workflow? Do you run them every few hours, every day, every time you run functional tests, every release, every

Re: is mysqlsb compatible with MySQL 5.0?

2006-03-25 Thread Ravi Teja
Ah! An overzealous firewall! My sympathies :-). I am using the free Kerio personal firewall on Windows. -- http://mail.python.org/mailman/listinfo/python-list

Re: __slots__

2006-03-25 Thread Alex Martelli
John J. Lee [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] (Alex Martelli) writes: [...] you should be using pychecker or pylint [...] I'm curious, as somebody who doesn't regularly use these tools: How do they fit into your workflow? Do you run them every few hours, every day, every time

Re: noobie mkdir problem/question

2006-03-25 Thread [EMAIL PROTECTED]
if (os.path.isdir(xrefs) == 0): os.mkdir(xrefs) os.path.isdir(stuff) returns True or False -- http://mail.python.org/mailman/listinfo/python-list

Re: sending emails to a list of recipients

2006-03-25 Thread Gerard Flanagan
Kun wrote: i have the following code: -- import smtplib from email.MIMEText import MIMEText fp = open('confirmation.txt', 'rb') msg = MIMEText(fp.read()) From = '[EMAIL PROTECTED]' msg['Subject'] = 'Purchase Confirmation' msg ['From'] = From

Re: pondering about the essence of types in python

2006-03-25 Thread gangesmaster
i was taking about python... -- http://mail.python.org/mailman/listinfo/python-list

Re: Accessing func_name from inside a function

2006-03-25 Thread Ben Finney
James Thiele [EMAIL PROTECTED] writes: I'd like to access the name of a function from inside the function. A function, like most other objects in Python, can have any number of names bound to it without the object being informed. Any of those names can then be used to reference the object, and

Re: __slots__

2006-03-25 Thread Ben Caradoc-Davies
John J. Lee wrote: [EMAIL PROTECTED] (Alex Martelli) writes: you should be using pychecker or pylint I'm curious, as somebody who doesn't regularly use these tools: How do they fit into your workflow? Do you run them every few hours, every day, every time you run functional tests, every

Re: noobie mkdir problem/question

2006-03-25 Thread ProvoWallis
I understand that but I'm still puzzled. Is this the reason why I can't write files to this directory? The xrefs directory is created the way I expect it would be using mkdir but I can't seem to write to it. I thought that my results would be written to the xrefs directory here but they're ending

Re: Beginner's question: executing scripts under Win XP pro

2006-03-25 Thread J Correia
Scott Souva [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Your script may be working properly, but XP simply removes the window after the script runs. Here is a simple fix that will stop at the end of the script and leave the Command window open: print Hello World raw_input()

Re: years later DeprecationWarning

2006-03-25 Thread Steven D'Aprano
On Wed, 22 Mar 2006 13:59:00 -0800, Chris Lasher wrote: Two things: 1) math.floor returns a float, not an int. Doing an int() conversion on a float already floors the value, anyways. No it doesn't, or rather, int() is only equivalent to floor() if you limit the input to non-negative numbers:

Re: Why are so many built-in types inheritable?

2006-03-25 Thread Fabiano Sidler
25 Mar 2006 13:58:17 -0800, Ziga Seilnacht [EMAIL PROTECTED]: No, you don't have to: Okay, but I'd prefer! ;) [a lot of python code] That's what I wanted to avoid. Additionally, the possibility to do it this way doesn't make it reasonable that type 'function' is inheritable. Are there any

Re: sending emails to a list of recipients [update]

2006-03-25 Thread Larry Bates
smtplib docs http://python.active-venture.com/lib/SMTP-example.html say that the to should be a list of addresses (your emails); s.sendmail(msg['From'], emails, msg.as_string()) -Larry Bates Kun wrote: Kun wrote: i have the following code: -- import smtplib

Re: noobie mkdir problem/question

2006-03-25 Thread [EMAIL PROTECTED]
First, what version of python are you using? 2.4.2 (and some previous versions) use file() instead of open(), although open may still work. also, if your code in the previous post is still using: outputFname = given + '.log' outputFile = open(os.path.join(xrefs,outputFname), 'w') I hope you have

  1   2   >