[issue5705] os.getpwent returns unsigned 32bit value, os.setuid refuses it

2009-09-02 Thread Joe Amenta
Changes by Joe Amenta ament...@msu.edu: -- nosy: +joe.amenta ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5705 ___ ___ Python-bugs-list mailing

[issue6767] Python as zip package

2009-08-24 Thread Joe
Joe us3...@web.de added the comment: Because, I don't need/want an installation. I only need the files whith its directory structure. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6767

[issue6767] Python as zip package

2009-08-23 Thread Joe
New submission from Joe us3...@web.de: It would be nice, if you could offer the Windows version also as a zi package, besides the msi installer. -- components: Windows messages: 91890 nosy: Joe severity: normal status: open title: Python as zip package type: feature request

[issue6767] Python as zip package

2009-08-23 Thread Joe
Joe us3...@web.de added the comment: I meant as a zip archive package -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6767 ___ ___ Python-bugs

[issue6711] macurl2path has typos that raise AttributeError

2009-08-16 Thread Joe Amenta
New submission from Joe Amenta ament...@msu.edu: In a few spots, urllib.parse misses a . after the package name. e.g., urllib.parse.quote is spelled urllib.parsequote, which generates an AttributeError when run. To reproduce, open up a python3.x interpreter and execute: from macurl2path import

[issue6583] 2to3 fails to fix test.test_support

2009-07-26 Thread Joe Amenta
New submission from Joe Amenta ament...@msu.edu: PEP 3108 states that test.test_support was renamed to test.support as a part of the Standard Library Reorganization process. However... 2to3 does not refactor (or even warn about) test.test_support. Simply adding test.test_support: test.support

Re: strptime issue in multi-threaded application

2009-06-17 Thread Joe Holloway
Christian wrote: Joe Holloway schrieb: ImportError: Failed to import _strptime because the import lockis [sic] held by another thread. The error message is my fault. The cause of the mistake is obvious: No worries. The error message is clear even with the minor typo, I just wanted

strptime issue in multi-threaded application

2009-06-16 Thread Joe Holloway
have to be in place, but something doesn't seem right about it. I thought I'd ask on the mailing list before going so far as to open a ticket, but feel free to direct me there if that's the appropriate place for this. Thanks, Joe [1] http://www.python.org/doc/2.6/c-api/import.html

[issue6185] 2to3 misses buffer slicing

2009-06-02 Thread Joe Amenta
Joe Amenta ament...@msu.edu added the comment: Patch that will fix the problem (and make the test pass) -- Added file: http://bugs.python.org/file14165/bufferfix.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6185

[issue6174] What's new in 2.6, wrong indentation in code sample

2009-06-01 Thread Joe Amenta
New submission from Joe Amenta ament...@msu.edu: In the final example in the multiprocessing package on http://docs.python.org/3.0/whatsnew/2.6.html#pep-371-the-multiprocessing-package a part of the code is not properly indented. There should be one more level of indentation starting at #Mark

[issue6070] Pyhon 2.6 makes .pyc/.pyo bytecode files executable

2009-05-22 Thread Joe Amenta
Joe Amenta ament...@msu.edu added the comment: Python writes compiled files with the same file permissions as the source module. In your specific example: $ python2.6 -c 'import module' This will produce module.pyc with the same attributes as module.py While I am not familiar with modifying

[issue6050] zipfile: Extracting a directory that already exists generates an OSError

2009-05-17 Thread Joe Amenta
New submission from Joe Amenta ament...@msu.edu: zipfile.ZipFile.extract() fails if targetpath is a directory that already exists. Bug revealed itself on Ubuntu, using extractall(). Happened on the latest 3.1 and 2.7. Attached a patch that I think will fix this issue. -- components

An unexpected visit_decref assertion fail (code works under python 2.4, doesn't under 2.5)

2009-04-24 Thread Joe Ardent
of C++ classes that get turned into python classes). Does anyone have any tips for debugging this? I'd really like to know what exactly is being decref'd. This has been driving me crazy for a while. Thanks in advance for any insights or tips! -- Joe Ardent -- http://mail.python.org/mailman

Re:

2009-04-18 Thread Joe Riopel
On Sat, Apr 18, 2009 at 12:56 PM, karlos barlos karlosbar...@yahoo.com wrote: LDAP://CN=bessy,OU=sales,DC=shay,DC=com LDAP://CN=ron,OU=legal,DC=shay,DC=com to a text \  csv file ... can any one help ?? Have a look at this:

Beginner: Portable Python, BeautifulSoup ScrapeNFeed

2009-04-14 Thread Joe Larson
Hello list! I am a Python Beginner. I thought a good beginning project would be to use the Portable Python environment http://www.portablepython.com/ with Beautiful Soup http://www.crummy.com/software/BeautifulSoup/ and Scrape 'N' Feed http://www.crummy.com/software/ScrapeNFeed/ to create and

Re: Python3: to add, remove and change

2009-04-05 Thread Joe P. Cool
tried to do too much). How about moving these lines to a separate message with a matching header? Regards, Joe. P. Cool -- http://mail.python.org/mailman/listinfo/python-list

Re: xml to xhtml

2009-04-01 Thread Joe Riopel
On Wed, Apr 1, 2009 at 10:43 AM, jud...@gmail.com wrote: If anyone can give me some guidance what should be the best way to generate html/xhtml page using python would be great. I am open to other options like xsl or anything else that can make things simple. Since you're open to other

Re: script files with python (instead of tcsh/bash)?

2009-03-21 Thread Joe Riopel
On Sat, Mar 21, 2009 at 9:26 AM, Esmail ebo...@hotmail.com wrote: In any case, the scripts are starting to look pretty hairy and I was wondering if it would make sense to re-write them in Python. I am not sure how suitable it would be for this. Are these scripts run on computers that are

Re: Subprocess module: running an interactive shell

2009-03-15 Thread Joe Tyson
involved in handling this. Check out this recipe on activestate: http://code.activestate.com/recipes/278731/ - Joe -- http://mail.python.org/mailman/listinfo/python-list

Re: how to convert from network to host byte order

2009-03-05 Thread Joe Riopel
On Thu, Mar 5, 2009 at 7:26 AM, Evan xdi...@gmail.com wrote: Hello ~ I'm new with python,  what my problem is, I have a binary file, I want to read first 2 bytes and convert it to host byte order, then write it to another file. Have you checked out socket.htons, socket.ntohs, etc ? --

Re: Can Python do shopping cart?

2009-03-05 Thread Joe Riopel
On Thu, Mar 5, 2009 at 5:40 PM, SpamMePlease PleasePlease spankthes...@googlemail.com wrote: Python can do that and a lot more! For this purpose I would go to http://djangoproject.com/ Django is neat, but there are more choices for you: http://wiki.python.org/moin/WebFrameworks --

[issue4111] Add DTrace probes

2009-02-19 Thread Joe Ranieri
Changes by Joe Ranieri j...@alacatialabs.com: -- nosy: +sirg3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4111 ___ ___ Python-bugs-list mailing

Re: best set of modules for web automation without javascript

2009-02-13 Thread Joe Riopel
On Fri, Feb 13, 2009 at 9:04 AM, News123 news...@free.fr wrote: Hi, I'd like to do some web automation with python 2.5 - https: - a cookiejar - some forms to be filled in what is the best set of modules. I have automated some testing of our product, using it's web UI with Python with

Re: *nix tail -f multiple log files with Thread

2009-02-13 Thread Joe Riopel
On Fri, Feb 13, 2009 at 12:03 PM, David da...@abbottdavid.com wrote: Hi everyone, I copied a program from C to track multiple log files. I would like to be able to print a label when a log file is updated. Here is the program; Since you're calling tail itself, why not just use tail's ability

Python at the SoCal Linux Expo

2009-02-10 Thread joe
! Joe Smith Southern California Linux Expo [1] https://socallinuxexpo.org/reg7/ -- http://mail.python.org/mailman/listinfo/python-list

Re: UnitTest break on failure

2009-02-10 Thread Joe Riopel
On Tue, Feb 10, 2009 at 11:48 AM, Qian Xu quian...@stud.tu-ilmenau.de wrote: self.assertEquals(testMethod1(), expected_value1); self.assertEquals(testMethod2(), expected_value2); However, if the first test item is failed, no more tests will be executed. Can I tell Python, 1. go ahead, if a

Re: what IDE is the best to write python?

2009-02-02 Thread Joe Riopel
I typically use vim/vi, because it's usually already installed on the OS's I work with and vim for Windows works the same. Also, using the same editor across these different OS's, I don't have to worry too much soft/hard tabs. The contents of rc files on both Windows and UNIX/Linux are the same

Re: New to python, open source Mac OS X IDE?

2009-01-27 Thread Joe Strout
. I tried several IDEs and didn't really find any of them stable and feature-rich enough to be worth the bother (though Editra came close). Lack of a really top-notch IDE is one of the primary drags harshing on my Python buzz (as the young people say). Best, - Joe -- http://mail.python.org

Re: OCaml, Language syntax, and Proof Systems

2009-01-24 Thread Joe Riopel
On Fri, Jan 23, 2009 at 6:16 PM, Xah Lee xah...@gmail.com wrote: The haskell tutorials you can find online are the most mothefucking stupid unreadable fuck. The Haskll community is almost stupid. What they talk all day is about monads, currying, linder myer fuck type. That's what they talk

Re: English-like Python

2009-01-22 Thread Joe Strout
. (And RB doesn't have any equivalent of lambda functions, so the code you wrote isn't easily translatable into RB.) But I suggest that regular function calls are far more common than use of function references, even in Python. Cheers, - Joe -- http://mail.python.org/mailman/listinfo/python

Re: English-like Python

2009-01-21 Thread Joe Strout
way to distinguish between those -- and if tuple syntax didn't look the same as method call arguments -- THEN they would be unnecessary. But those would be very substantial changes to Python syntax, and I'm not seriously proposing them. Best, - Joe -- http://mail.python.org/mailman/listinfo

Re: English-like Python

2009-01-21 Thread Joe Strout
the day. I think I agree (if I follow you correctly). But then some other syntax would be needed for when you really mean a=f (i.e., make 'a' refer to the same function as 'f'). Best, - Joe -- http://mail.python.org/mailman/listinfo/python-list

Re: English-like Python

2009-01-20 Thread Joe Strout
of the code IMHO. Cheers, - Joe -- http://mail.python.org/mailman/listinfo/python-list

Re: English-like Python

2009-01-20 Thread Joe Strout
this into Python -- some of Python's other language features make this difficult. Just pointing out that your original wish is possible in at least some languages. Best, - Joe -- http://mail.python.org/mailman/listinfo/python-list

function to find the modification date of the project

2009-01-19 Thread Joe Strout
be in the current directory, then os.path.dirname of it returns the empty-string -- yet the empty-string is not a valid argument to os.listdir(). Is there a better way to a list of files in the same directory as a given file? Cheers, - Joe -- http://mail.python.org/mailman/listinfo/python-list

Re: function to find the modification date of the project

2009-01-19 Thread Joe Strout
James Mills wrote: You know you could just store a __version__ attribute in your main library (__init__.py). :) What, and update it manually? I don't trust myself to remember to do that every time! Best, - Joe -- http://mail.python.org/mailman/listinfo/python-list

Re: function to find the modification date of the project

2009-01-19 Thread Joe Strout
, and presumably if some power user did this, then that would be the intended effect. Not sure why they'd do that, but they must have a good reason -- who am I to stop them? Cheers, - Joe -- http://mail.python.org/mailman/listinfo/python-list

Re: function to find the modification date of the project

2009-01-19 Thread Joe Strout
to be), and tell them to re-download it. But really, this is NOT going to happen. These users wouldn't even know how to open the app bundle to find the Python files. Any comments on the functioning and platform-independence of the code? Thanks, - Joe -- http://mail.python.org/mailman/listinfo/python

Invitation for Python at the Southern California Linux Expo

2009-01-14 Thread joe
California area, and would like to set up a booth, I encourage you to apply. Any questions, please do not hesitate to ask. Thanks for your time! Joe Smith http://scale7x.socallinuxexpo.org/conference-info/call-for-dotorg-exhibitors -- http://mail.python.org/mailman/listinfo/python-list

Re: why cannot assign to function call

2009-01-10 Thread Joe Strout
, then foo = SomeNewArray(); would change bar if it were passed by reference; it would not affect bar at all if it were passed by value. The two are quite distinct. Best, - Joe -- http://mail.python.org/mailman/listinfo/python-list

Re: why cannot assign to function call

2009-01-10 Thread Joe Strout
) that held or generated the reference in the calling code. This is very odd, and I see it quite a bit. Me: You pass the object. Joe: That's correct. You pass the reference. What was wrong with my original? I'm saying that I believe your idea was correct, but worded imprecisely (IMHO of course

Re: why cannot assign to function call

2009-01-09 Thread Joe Strout
a different example to illustrate that, but it's true nonetheless. Best, - Joe -- http://mail.python.org/mailman/listinfo/python-list

Re: why cannot assign to function call

2009-01-09 Thread Joe Strout
of a function. But it's not and it doesn't. Best, - Joe -- http://mail.python.org/mailman/listinfo/python-list

Re: why cannot assign to function call

2009-01-09 Thread Joe Strout
don't think so. More likely, people are being confused by the claim that Python's assignments are NOT like other languages, when in fact they are. Best, - Joe -- http://mail.python.org/mailman/listinfo/python-list

Re: why cannot assign to function call

2009-01-09 Thread Joe Strout
; Now, for any code using the FooPtr type, the data model is the same as Python (or as Java, RB, .NET, etc., again for code that's using only reference types). Best, - Joe -- http://mail.python.org/mailman/listinfo/python-list

Re: why cannot assign to function call

2009-01-08 Thread Joe Strout
understand the other models myself. Best, - Joe [1] http://www.strout.net/info/coding/valref/ -- http://mail.python.org/mailman/listinfo/python-list

Re: why cannot assign to function call

2009-01-08 Thread Joe Strout
variable is NOT a reference (and thus does not behave exactly as in Python, Java, REALbasic, C++, etc.), then that language is either a dinosaur or some weird academic oddity. Best, - Joe -- http://mail.python.org/mailman/listinfo/python-list

Re: image recogniton?

2009-01-07 Thread Joe Strout
hardware, or spend a bit more for something with a USB or serial interface built in, like this: http://www.oceanserver-store.com/osevkitsorus.html Best, - Joe -- http://mail.python.org/mailman/listinfo/python-list

Re: why cannot assign to function call

2009-01-07 Thread Joe Strout
makes Python a little more restricted and uniform. For details, see: http://www.strout.net/info/coding/valref/ Best, - Joe -- http://mail.python.org/mailman/listinfo/python-list

Re: why cannot assign to function call

2009-01-06 Thread Joe Strout
://www.strout.net/info/coding/valref/, as it may be clearer than my own. Best, - Joe -- http://mail.python.org/mailman/listinfo/python-list

Re: python is great

2009-01-06 Thread Joe Strout
part. Best, - Joe -- http://mail.python.org/mailman/listinfo/python-list

Re: If your were going to program a game...

2009-01-06 Thread Joe Strout
it just last week, and apart from the nasty C-derived syntax, it's quite nice. It has a good IDE, good performance, great portability, and it's easy to use. It just surprises me that after all these years, the Python community hasn't done something similar. Best, - Joe -- http

Re: python is great

2009-01-06 Thread Joe Strout
to, anyway). Thanks, - Joe -- http://mail.python.org/mailman/listinfo/python-list

Re: embedding python in wxpython

2008-12-30 Thread Joe Strout
, while False does not redirect it. However, neither setting will create a bidirectional console or evaluation environment as the OP was asking for. (But other wx widgets do provide that, as other replies have pointed out.) Best, - Joe -- http://mail.python.org/mailman/listinfo/python-list

Re: Python's popularity

2008-12-22 Thread Joe Strout
Alvin ONeal wrote: Also worthy of mention: I've seen python pre-installed on consumer HP desktops (I think as part of a backup/restore script, but I'm not sure) It's pre-installed on every Mac (both desktop and laptop), too. Cheers, - Joe -- http://mail.python.org/mailman/listinfo/python

Re: encoding problem

2008-12-19 Thread Joe Strout
automatically. I consider this one of the great shortcomings of Python, but it's mostly just a temporary inconvenience -- the world is moving to Unicode, and with Python 3, we won't have to worry about it so much. Best, - Joe -- http://mail.python.org/mailman/listinfo/python-list

Re: How to parsing a sequence of integers

2008-12-19 Thread Joe Strout
Peter Otten wrote: If you are using Python 2.x: ... So you better throw in a float(...): Or, add from __future__ import division at the top of the file. I put this at the top of all my Python files, whether I expect to be dividing or not. It just saves grief. Cheers, - Joe -- http

Re: How to parsing a sequence of integers

2008-12-19 Thread Joe Strout
the unambiguous // operator when you mean integer division. Better to do it now, I think, at least in any new code you write, to save you the hassle later. For those not familiar with the topic: http://www.python.org/dev/peps/pep-0238/ Best, - Joe -- http://mail.python.org/mailman/listinfo

Re: encoding problem

2008-12-19 Thread Joe Strout
(which is the standard encoding in RB, though it works comfily with any other too). Cheers, - Joe -- http://mail.python.org/mailman/listinfo/python-list

Re: encoding problem

2008-12-19 Thread Joe Strout
. Best, - Joe -- http://mail.python.org/mailman/listinfo/python-list

AIM client code for Python?

2008-12-16 Thread Joe Strout
the correct values (and was rather hoping that I wouldn't have to). Does anyone know how to get Py-TOC to work, or have another Python TOC implementation to suggest? Thanks, - Joe -- http://mail.python.org/mailman/listinfo/python-list

How to modify a program while it's running?

2008-12-16 Thread Joe Strout
, and is there a better way? Thanks, - Joe -- http://mail.python.org/mailman/listinfo/python-list

Re: %s place holder does not let me insert ' in an sql query with python.

2008-12-15 Thread Joe Strout
injection for details.) Note that I'm not familiar with the cursor.execute binding that RDM pointed out, so that may provide a better solution... but the above should work. Best, - Joe -- http://mail.python.org/mailman/listinfo/python-list

Re: concept of creating structures in python

2008-12-12 Thread Joe Strout
be foo.ds_obj.ele_obj. Best, - Joe -- http://mail.python.org/mailman/listinfo/python-list

Re: concept of creating structures in python

2008-12-12 Thread Joe Strout
On Dec 12, 2008, at 9:00 AM, Steve Holden wrote: Change the default value of ds_obj here to None. Otherwise, you will certainly confuse yourself (there would be just one default object shared among all instances). Joe missed a piece out here. If you change the signature of your D.__init__

Re: Call by reference in SWIG?

2008-12-11 Thread Joe Strout
enough about SWIG to suggest a work- around. Hopefully someone more versed in SWIG will have a bright idea. If you don't find anything in the Python space, you might try poking around in Java references, since Java has the same call semantics as Python. Best wishes, - Joe [1] http

Re: list organization question

2008-12-11 Thread Joe Strout
that means. HTH, - Joe -- http://mail.python.org/mailman/listinfo/python-list

any Python developers available in the Denver area?

2008-12-11 Thread Joe Strout
send me email privately. Thanks, - Joe -- http://mail.python.org/mailman/listinfo/python-list

Re: var or inout parm?

2008-12-10 Thread Joe Strout
quite what you're asking for in Python (or Java, for that matter). Best, - Joe -- http://mail.python.org/mailman/listinfo/python-list

Re: How to initialize a class variable once

2008-12-09 Thread Joe Strout
, - Joe -- http://mail.python.org/mailman/listinfo/python-list

Re: A question about reference in Python.

2008-12-08 Thread Joe Strout
, which is roughly analogous to a pointer type in C/C++. For details and examples, see: http://www.strout.net/info/coding/valref/ Best, - Joe -- http://mail.python.org/mailman/listinfo/python-list

Re: A question about reference in Python.

2008-12-08 Thread Joe Strout
On Dec 8, 2008, at 7:43 PM, Steven D'Aprano wrote: On Mon, 08 Dec 2008 08:18:27 -0700, Joe Strout wrote: On Dec 7, 2008, at 10:26 PM, Group wrote: Now, I want to write a Red-Black Tree, and a List structure. In C/C + +, I can use pointers to refer to children notes (or next notes

Re: how to get a beep, OS independent ?

2008-12-07 Thread Joe Strout
in console apps or in any flavor of GUI app. Is there such a module out there somewhere? Best, - Joe -- http://mail.python.org/mailman/listinfo/python-list

Re: how to get a beep, OS independent ?

2008-12-07 Thread Joe Strout
On Dec 7, 2008, at 8:48 AM, Grant Edwards wrote: On 2008-12-07, Joe Strout [EMAIL PROTECTED] wrote: But invoking the standard system beep What makes you think there is such a thing as the standard system beep? Because OS X (the platform with which I'm most familiar) certainly has one

Re: how to get a beep, OS independent ?

2008-12-07 Thread Joe Strout
required to add something to the Python system libraries, where would be the next best place for this sort of simple OS abstraction layer? Thanks, - Joe -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 3.0 automatic decoding of UTF16

2008-12-05 Thread Joe Strout
, - Joe -- http://mail.python.org/mailman/listinfo/python-list

simplest way to strip a comment from the end of a line?

2008-12-04 Thread Joe Strout
to use a loop to find each # and then count the quotation marks to its left? Thanks, - Joe -- http://mail.python.org/mailman/listinfo/python-list

using os.walk to generate objects

2008-12-03 Thread Joe Hrbek
The code below works (in linux), but I'm wondering if there is a better/easier/cleaner way? It works on directory trees that don't have a lot of .s in them or other special characters. I haven't implemented a good handler for that yet, so if you run this in your system, choose/make a simple

Re: Emacs vs. Eclipse vs. Vim

2008-11-29 Thread Joe Riopel
On Sat, Nov 29, 2008 at 3:44 PM, Josh [EMAIL PROTECTED] wrote: Thanks in advance, There is no right, or wrong, answer to this question. Try one for a few weeks, force yourself to use it as exclusively as possible for all your text editing needs. After that, repeat that process with the other

Re: Emacs vs. Eclipse vs. Vim

2008-11-29 Thread Joe Riopel
On Sat, Nov 29, 2008 at 3:44 PM, Josh [EMAIL PROTECTED] wrote: Thanks in advance, There is no right, or wrong, answer to this question. Try one for a few weeks, force yourself to use it as exclusively as possible for all your text editing needs. After that, repeat that process with the other

Re: how to dynamically instantiate an object inheriting from several classes?

2008-11-24 Thread Joe Strout
do yourself credit. Best, - Joe -- http://mail.python.org/mailman/listinfo/python-list

recommended __future__ imports for 2.5?

2008-11-24 Thread Joe Strout
as standard for any new code written in 2.5? And what else do you experienced gurus put at the top of every Python file? Thanks, - Joe -- http://mail.python.org/mailman/listinfo/python-list

Re: how to dynamically instantiate an object inheriting from several classes?

2008-11-22 Thread Joe Strout
been renamed in the meantime... Please quit trying to confuse the kids at home. Classes in Python are first-class objects, and any time you refer to a class or any other object in Python, what you have is a reference to it. http://www.strout.net/info/coding/valref/ Cheers, - Joe

Re: Official definition of call-by-value (Re: Finding the instance reference...)

2008-11-22 Thread Joe Strout
web page -- I'll try to do that this weekend.) Cheers, - Joe P.S. I've pretty well tired of this thread, but I can't let Greg stand up for truth and clarity all by himself... -- http://mail.python.org/mailman/listinfo/python-list

Re: How to read space separated file in python?

2008-11-21 Thread Joe Strout
, - Joe -- http://mail.python.org/mailman/listinfo/python-list

Re: Need help converting text to csv format

2008-11-21 Thread Joe Strout
this: 40922003,Life Fitness Products $1,12-13-08 There are lots of ways to do that. Here's one: qfields = ['' + fld.strip() + '' for fld in (num,desc,date)] out = qfields.join(',') out '40922003,Life Fitness Products $1 ,12-13-08' Cheers, - Joe P.S. Pay no attention to the grumpy

Re: Using eval, or something like it...

2008-11-21 Thread Joe Strout
this to help people in exactly your situation, so please do give me feedback and let me know how it did or didn't help. Thanks, - Joe -- http://mail.python.org/mailman/listinfo/python-list

Re: How to read space separated file in python?

2008-11-21 Thread Joe Strout
On Nov 21, 2008, at 9:00 AM, Steve Holden wrote: Joe Strout wrote: On Nov 21, 2008, at 2:08 AM, Steven D'Aprano wrote: a, b = line.split() Note that in a case like this, you may want to consider using partition instead of split: a, sep, b = line.partition(' ') This way

Re: Need help converting text to csv format

2008-11-21 Thread Joe Strout
not have it around after it's closed anyway). Is the same true in Python, or do we need to explicitly close things? Thanks, - Joe -- http://mail.python.org/mailman/listinfo/python-list

Re: Need help converting text to csv format

2008-11-21 Thread Joe Strout
that the file will be closed as soon as it loses its last reference, but I see that we shouldn't count on that in the Python world.) Best, - Joe -- http://mail.python.org/mailman/listinfo/python-list

how to dynamically instantiate an object inheriting from several classes?

2008-11-21 Thread Joe Strout
be used and in what combination. So I'd like to take a list of class references, and instantiate an object that derives from all of them, dynamically. Is this possible? If so, how? Thanks, - Joe -- http://mail.python.org/mailman/listinfo/python-list

Re: how to dynamically instantiate an object inheriting from several classes?

2008-11-21 Thread Joe Strout
/objects.html#l2h-21, and that speaks only about the traditional use of type() to check the type of an object. help(type) does mention the form you show, though it doesn't explain what the dict is for. Where would I find documentation on this nifty function? Thanks, - Joe -- http

Re: how to dynamically instantiate an object inheriting from several classes?

2008-11-21 Thread Joe Strout
() doesn't link to this page.) Best, - Joe -- http://mail.python.org/mailman/listinfo/python-list

Re: Finding the instance reference of an object

2008-11-19 Thread Joe Strout
is an object reference (as is always the case in Python). I assert that anyone who does not understand all of the above, is helping to spread confusion. I agree. Best, - Joe -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem with writing a long line in a text file

2008-11-19 Thread Joe Strout
where? Using what tool to view it? My guess is that there is nothing wrong with the file, but that whatever you're using to view it is simply displaying it as two lines even though it is actually one. HTH, - Joe -- http://mail.python.org/mailman/listinfo/python-list

Re: compressed serialization module

2008-11-17 Thread Joe Strout
? Well, here's a thought: create a zip file (using the standard zipfile module), and pickle your data into that. HTH, - Joe -- http://mail.python.org/mailman/listinfo/python-list

Re: Suggestions for an education programming project

2008-11-17 Thread Joe Strout
to install anything extra). It doesn't do the task you describe, but it does demonstrate animation and interaction with the mouse, and would be easy to extend and adapt in the direction you want. Best, - Joe -- http://mail.python.org/mailman/listinfo/python-list

Re: Python-URL! - weekly Python news and links (Nov 17)

2008-11-17 Thread Joe Strout
to make the standard definition of call by value NOT be applicable to Python as well as all other modern OOP languages [1]. Maybe we can discuss it further, and make this thread about the thread longer than the thread it's about? Cheers, - Joe [1] http://www.strout.net/info/coding/valref

Re: using private parameters as static storage?

2008-11-14 Thread Joe Strout
stuff, thank you! Best, - Joe -- http://mail.python.org/mailman/listinfo/python-list

Re: using private parameters as static storage?

2008-11-14 Thread Joe Strout
all the callers anyway. So maybe this is better. What do y'all think? I've used this myself, but to me it feels more icky than the semi- private argument trick above. Thanks for the feedback. Best, - Joe -- http://mail.python.org/mailman/listinfo/python-list

<    1   2   3   4   5   6   7   8   9   >