Re: Creating single .exe file without py2exe and pyinstaller

2008-10-18 Thread Tino Wildenhain
Hi, Abah Joseph wrote: I have written a small application of about 40-45 lines which is about 4KB, so I want to create a single .exe file from it, using py2exe it created unnecessary files, that just increase the size of the program and also less portable to me. What else can I use? the "unn

keyword in package name.

2008-10-18 Thread Abhishek Mishra
Hello Everyone, I have the habit of using domain names (of either the application or company) in reverse in package names. for e.g. com.spam.app1 I've recently started a project for an indian domain (tld = .in), which leads to a package name like in.spam.app1 This causes a syntax error, as "in

Re: loops

2008-10-18 Thread Paul Rubin
"James Mills" <[EMAIL PROTECTED]> writes: > > for x in (2**i for i in xrange(10)): > >print x > This is by far the most concise solution I've seen so far. print '\n'.join(str(2**i) for i in xrange(10)) -- http://mail.python.org/mailman/listinfo/python-list

Re: default value in __init__

2008-10-18 Thread Steven D'Aprano
On Sun, 19 Oct 2008 02:52:52 +, Aaron Brady wrote: > Steven D'Aprano wrote: > >> On Sat, 18 Oct 2008 09:17:28 +1300, Lawrence D'Oliveiro wrote: >> >>> In message >>> <[EMAIL PROTECTED]>, >>> Aaron "Castironpi" Brady wrote: >>> The purpose of a parameter is something that the caller can

Re: Finding the instance reference of an object

2008-10-18 Thread Steven D'Aprano
On Fri, 17 Oct 2008 15:39:33 -0600, Joe Strout wrote: > On Oct 17, 2008, at 3:19 PM, Grant Edwards wrote: > >>> And my real point is that this is exactly the same as in every other >>> modern language. >> >> No, it isn't. In many other languages (C, Pascal, etc.), a "variable" >> is commonly tho

Re: Porting VB apps to Python for Window / Linux use

2008-10-18 Thread Dotan Cohen
2008/10/19 Lawrence D'Oliveiro <[EMAIL PROTECTED]>: > In message <[EMAIL PROTECTED]>, Dotan > Cohen wrote: > >> I often see mention of SMBs that either want to upgrade their Windows >> installations, or move to Linux, but cannot because of inhouse VB >> apps. > > Probably best to leave those legacy

Air Max Air Max 90 man Air Max 90 women Air Max LTD man Air Max LTD

2008-10-18 Thread 128
( paypal payment )( www.yourbestshoes.cn )Air Jordans Air Jordans 1 Air Jordans 2 Air Jordans 3 Air Jordans 3.5 Air Jordans 4 Air Jordans 4.5 Air Jordans 5 Air Jordans 6 (paypal payment )( www.yourbestshoes.cn )Air Jordans 7 Air Jordans 8 Air Jordans 9 Air Jordans 10 Air Jordans 11 Air Jordans 12 A

Re: xor: how come so slow?

2008-10-18 Thread Tim Roberts
Steven D'Aprano <[EMAIL PROTECTED]> wrote: > >On Fri, 17 Oct 2008 20:51:37 +1300, Lawrence D'Oliveiro wrote: > >> Is piece really meant to be random? If so, your create_random_block >> function isn't achieving much--xoring random data together isn't going >> to produce anything more exciting than l

Re: Linux.com: Python 3 makes a big break

2008-10-18 Thread Kay Schluehr
On 18 Okt., 22:01, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > Perhaps it also omitted the fact that nothing prevents you from defining a > function to write things to stdout (or elsewhere) in Python 2.5, making the > Python 3.x change largely a non-feature. ;) > > Jean-Paul Even more. If so

Re: __metaclass__ and deepcopy issue

2008-10-18 Thread Raymond Hettinger
On Oct 17, 1:00 am, Wouter DW <[EMAIL PROTECTED]> wrote: > I read the article > onhttp://www.python.org/download/releases/2.2/descrintro/#metaclasses > and started using autoprop. > But now I have a problem I can't seem to solve myself. > > class autoprop(type): >   def __init__(cls, name, bases,

Re: loops

2008-10-18 Thread John Machin
On Oct 19, 2:30 pm, Steven D'Aprano <[EMAIL PROTECTED] cybersource.com.au> wrote: [snip] > making your code easy to read and easy to maintain is far more important. > > for x in (2**i for i in xrange(10)): >     print x > > will also print 1, 2, 4, 8, ... up to 1000. I would say up to 512; perhaps

Re: loops

2008-10-18 Thread James Mills
On Sun, Oct 19, 2008 at 1:44 PM, James Mills <[EMAIL PROTECTED]> wrote: > On Sun, Oct 19, 2008 at 1:30 PM, Steven D'Aprano > <[EMAIL PROTECTED]> wrote: >> for x in (2**i for i in xrange(10)): >>print x > > This is by far the most concise solution I've seen so far. > And it should never be about

Creating single .exe file without py2exe and pyinstaller

2008-10-18 Thread Abah Joseph
I have written a small application of about 40-45 lines which is about 4KB, so I want to create a single .exe file from it, using py2exe it created unnecessary files, that just increase the size of the program and also less portable to me. What else can I use? I am on windows XP. Python 2.5 -- http

Re: heapreplace, methodcaller

2008-10-18 Thread Raymond Hettinger
On Oct 18, 7:01 am, [EMAIL PROTECTED] wrote: > To improve name coherence I think this method of the heapq module: > heapq.heapreplace(heap, item) > > can grow an alias in Python 2.6.1/2.7 and 3.0/3.1: > heapq.heappoppush(heap, item) > > So later the heapreplace() name can be deprecated. Too late f

Re: loops

2008-10-18 Thread James Mills
On Sun, Oct 19, 2008 at 1:30 PM, Steven D'Aprano <[EMAIL PROTECTED]> wrote: > for x in (2**i for i in xrange(10)): >print x This is by far the most concise solution I've seen so far. And it should never be about conserving code. Also, Python IS NOT C (to be more specific: Python is not a C-cla

Re: xor: how come so slow?

2008-10-18 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Steven D'Aprano wrote: > On Sat, 18 Oct 2008 09:16:11 +1300, Lawrence D'Oliveiro wrote: > >> Data can come in fractional bits. That's how compression works. > > If you don't believe me, try compressing a single bit and see if you get > a "fractional bit". If both

Re: loops

2008-10-18 Thread Steven D'Aprano
On Sat, 18 Oct 2008 03:52:51 -0700, Gandalf wrote: > I was hopping to describe it with only one command. most of the > languages I know use this. > It seems weird to me their is no such thing in python. it's not that I > can't fined a solution it's all about saving code It shouldn't be about savi

Re: loops

2008-10-18 Thread Terry Reedy
MRAB wrote: On Oct 18, 7:31 pm, Terry Reedy <[EMAIL PROTECTED]> wrote: Python provide while loops for more fine-grain control, and a protocol so *reuseable* iterators can plug into for loops. Duncan showed you both. If you *need* a doubling loop variable once, you probably need one more than

Re: memory use with regard to large pickle files

2008-10-18 Thread Aaron Brady
Catherine Moroney wrote: > I'm writing a python program that reads in a very large > "pickled" file (consisting of one large dictionary and one > small one), and parses the results out to several binary and hdf > files. > > The program works fine, but the memory load is huge. The size of > the pi

Re: xor: how come so slow?

2008-10-18 Thread Steven D'Aprano
On Sat, 18 Oct 2008 09:16:11 +1300, Lawrence D'Oliveiro wrote: > In message <[EMAIL PROTECTED]>, Sion Arrowsmith > wrote: > >> Maybe it should be "fewer random data". > > Except these days we tend to think of "data" being, say, more like > "flour" than "bees", so it's "less data", like "less flo

Re: Help with Iteration

2008-10-18 Thread Aaron Brady
Chris McComas wrote: > On Oct 18, 3:46 pm, Aaron Brady <[EMAIL PROTECTED]> wrote: >> Chris McComas wrote: >> > actually i'm running it online, with a mysql db. so in the db there is >> > a table CollegeYear with the following fields: >> >> > name >> > rating >> > change >> > wp >> >> > then anothe

Re: Kicking off a python script using Windows Scheduled Task

2008-10-18 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, korean_dave wrote: > Does anyone know how to properly kick off a script using Windows > Scheduled Task? The script calls other python modules within itself. > HERE'S THE CATCH: > I am used to running the script directly from the command window and > the print() is v

Re: default value in __init__

2008-10-18 Thread Aaron Brady
Steven D'Aprano wrote: > On Sat, 18 Oct 2008 09:17:28 +1300, Lawrence D'Oliveiro wrote: > >> In message >> <[EMAIL PROTECTED]>, >> Aaron "Castironpi" Brady wrote: >> >>> The purpose of a parameter is something that the caller can supply, but >>> doesn't have to. It is not for internal-use-only i

Re: memory use with regard to large pickle files

2008-10-18 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Catherine Moroney wrote: > I'm writing a python program that reads in a very large > "pickled" file (consisting of one large dictionary and one > small one), and parses the results out to several binary and hdf > files. Job for a database? -- http://mail.python.org

Re: IO error

2008-10-18 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Rajan Arora wrote: > On Oct 18, 5:52 pm, Lawrence D'Oliveiro <[EMAIL PROTECTED] > central.gen.new_zealand> wrote: >> In message >> <[EMAIL PROTECTED]>, >> Rajan >> >> Arora wrote: >> > I am trying to get the data out of an instrument through its GPIB >> > port... >>

Re: default value in __init__

2008-10-18 Thread Steven D'Aprano
On Sat, 18 Oct 2008 09:17:28 +1300, Lawrence D'Oliveiro wrote: > In message > <[EMAIL PROTECTED]>, > Aaron "Castironpi" Brady wrote: > >> The purpose of a parameter is something that the caller can supply, but >> doesn't have to. It is not for internal-use-only items. > > Exactly! Says who? U

Re: xor: how come so slow?

2008-10-18 Thread Steven D'Aprano
On Fri, 17 Oct 2008 13:59:27 +0100, Sion Arrowsmith wrote: > [I think these attributions are right] Steven D'Aprano > <[EMAIL PROTECTED]> wrote: >>On Fri, 17 Oct 2008 22:45:19 +1300, Lawrence D'Oliveiro wrote: >>> In message <[EMAIL PROTECTED]>, Steven >>> D'Aprano wrote: ... why do you say

Re: Help with Iteration

2008-10-18 Thread John Machin
On Oct 19, 11:59 am, Chris McComas <[EMAIL PROTECTED]> wrote: > On Oct 18, 3:46 pm, Aaron Brady <[EMAIL PROTECTED]> wrote: > > > > > Chris McComas wrote: > > > actually i'm running it online, with a mysql db. so in the db there is > > > a table CollegeYear with the following fields: > > > > name >

Re: IO error

2008-10-18 Thread Rajan Arora
On Oct 18, 5:52 pm, Lawrence D'Oliveiro <[EMAIL PROTECTED] central.gen.new_zealand> wrote: > In message > <[EMAIL PROTECTED]>, Rajan > > Arora wrote: > > I am trying to get the data out of an instrument through its GPIB port... > > > When i try read() command it gives me an IO timeout error. > > Wh

Re: Help with Iteration

2008-10-18 Thread Chris McComas
On Oct 18, 3:46 pm, Aaron Brady <[EMAIL PROTECTED]> wrote: > Chris McComas wrote: > > actually i'm running it online, with a mysql db. so in the db there is > > a table CollegeYear with the following fields: > > > name > > rating > > change > > wp > > > then another table Games > > > date > > year

Re: inserting Unicode character in dictionary - Python

2008-10-18 Thread gitaziabari
On Oct 17, 2:38 pm, Joe Strout <[EMAIL PROTECTED]> wrote: > Thanks for the answers. That clears things up quite a bit. > > >> What if your source file is set to utf-8? Do you then have a proper > >> UTF-8 string, but the problem is that none of the standard Python > >> library methods know how to

Re: better scheduler with correct sleep times

2008-10-18 Thread James Mills
On Sat, Oct 18, 2008 at 10:09 PM, qvx <[EMAIL PROTECTED]> wrote: [ ... ] > Is there a better way or some library that does that? How about this ? $ ./timerexamples.py Time: 1224375945.336958 Timer 2 fired at: 1224375945.840600 Timer 1 fired at: 1224375955.336889 #!/usr/bin/env python import

Re: Porting VB apps to Python for Window / Linux use

2008-10-18 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Dotan Cohen wrote: > I often see mention of SMBs that either want to upgrade their Windows > installations, or move to Linux, but cannot because of inhouse VB > apps. Probably best to leave those legacy VB apps alone and develop new replacements in a more open, cro

Re: Linux.com: Python 3 makes a big break

2008-10-18 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Aahz wrote: > In article <[EMAIL PROTECTED]>, > Lawrence D'Oliveiro <[EMAIL PROTECTED]> wrote: > >>In message <[EMAIL PROTECTED]>, Terry >>Reedy wrote: >>> >>> "For instance, the print statement got turned into a print function ... >>> " >> >>Except I never use pri

Re: loops

2008-10-18 Thread MRAB
On Oct 18, 7:31 pm, Terry Reedy <[EMAIL PROTECTED]> wrote: > Gandalf wrote: > > On Oct 18, 12:39 pm, Duncan Booth <[EMAIL PROTECTED]> > > wrote: > >> Gandalf <[EMAIL PROTECTED]> wrote: > >>> how can I do width python a normal for loop width tree conditions like > >>> for example : > >>> for x=1;x<=

Re: Linux.com: Python 3 makes a big break

2008-10-18 Thread Aahz
In article <[EMAIL PROTECTED]>, Lawrence D'Oliveiro <[EMAIL PROTECTED]> wrote: >In message <[EMAIL PROTECTED]>, Terry >Reedy wrote: >> >> "For instance, the print statement got turned into a print function ... " > >Except I never use print in scripts. "What, never?" -- Aahz ([EMAIL PROTECTED])

Re: Linux.com: Python 3 makes a big break

2008-10-18 Thread Aahz
In article <[EMAIL PROTECTED]>, Lawrence D'Oliveiro <[EMAIL PROTECTED]> wrote: >In message <[EMAIL PROTECTED]>, Aahz wrote: >> >> (There's a significant amount of JavaScript, much of which is generated by >> Python code.) > >Been there, done that. Triple backslashes, anybody? :) Why would you nee

Re: IO error

2008-10-18 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Rajan Arora wrote: > I am trying to get the data out of an instrument through its GPIB port... > > When i try read() command it gives me an IO timeout error. What's the device name, device driver module name, do you have any sample or diagnostic code you can run t

Re: windows / unix path

2008-10-18 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Marcin201 wrote: > os.path.join('Pictures', '01.jpg') returns 'Pictures\\01..jpg' on > Win. When I read files created on Win under Unix this is a problem, > python cannot open 'Pictures\\01.jpg' But it can on Windows, right? os.path contains functions specific to

Re: Linux.com: Python 3 makes a big break

2008-10-18 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Terry Reedy wrote: > "For instance, the print statement got turned into a print function ... " Except I never use print in scripts. -- http://mail.python.org/mailman/listinfo/python-list

Re: Linux.com: Python 3 makes a big break

2008-10-18 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Aahz wrote: > (There's a significant amount of JavaScript, much of which is generated by > Python code.) Been there, done that. Triple backslashes, anybody? :) -- http://mail.python.org/mailman/listinfo/python-list

Re: unicode .replace not working - why?

2008-10-18 Thread Kurt Peters
Thanks, The "distraction" was my problem. I replaced the textu.replace as you suggested and it works fine. Kurt On Sun, 12 Oct 2008 19:53:09 -0700, Mark Tolonen wrote: > In your original code: > >textu.replace(unichr(167),'\n') > > as Dennis suggested (but maybe you were distracted by h

Re: Loosely-coupled development environment

2008-10-18 Thread Ben Finney
Jorgen Grahn <[EMAIL PROTECTED]> writes: > On Thu, 16 Oct 2008 07:47:36 +1100, Ben Finney <[EMAIL PROTECTED]> wrote: > > Instead, I find the greater gain comes from a working environment > > of *loosely-coupled* tools, with standard well-defined interfaces, > > that one can flexibly mold and recon

Re: IDE Question

2008-10-18 Thread Fabio Zadrozny
> Isn't Eclipse kind of project oriented? I.e. not suited for opening a > single file, anywhere, and viewing/editing it. I get the impression > that it prefers to have some "project" or "workspace" file which > groups a set of files and contains configuration, build rules and so > on. The guy thr

Re: algorizm to merge nodes

2008-10-18 Thread Scott David Daniels
JD wrote: It could be a very good "homework assignment". This is for a real application. def do_nets(pairs): r = {} for a, b in pairs: if a in r: a_net = r[a] if b not in a_net: # if not redundant link if b in r: # Need to merge nets

Re: PythonWin --> drwatson

2008-10-18 Thread Frank L. Thiel
On 18-Oct-08 16:31, this message was sent by Dennis Lee Bieber: On Sat, 18 Oct 2008 15:00:03 GMT, "Frank L. Thiel" <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: Thanks for your reply, Allan. I am not sure what you mean by "the Windows installer package" -- a *.msi file?. I

Re: PythonWin --> drwatson

2008-10-18 Thread [EMAIL PROTECTED]
On Oct 18, 4:31 pm, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > On Sat, 18 Oct 2008 15:00:03 GMT, "Frank L. Thiel" <[EMAIL PROTECTED]> > declaimed the following in comp.lang.python: > > Thanks for your reply, Allan.  I am not sure what you mean by "the > > Windows installer package" -- a *.msi f

Re: better scheduler with correct sleep times

2008-10-18 Thread sokol
> > I started googling for scheduler and found one in standard library > > but ih has the same code as mine (it calls the  functions in the > > right order and my doesn't, but it still waits too long). > > The other schedulers from web are dealing with > > repeating tasks and such. > > > I believe

Re: loops

2008-10-18 Thread robert
Aaron Brady wrote: Gandalf wrote: On Oct 18, 12:39 pm, Duncan Booth <[EMAIL PROTECTED]> wrote: Gandalf <[EMAIL PROTECTED]> wrote: how can I do width python a normal for loop width tree conditions like for example : for x=1;x<=100;x+x: print x What you wrote would appear to be an infinite

IO error

2008-10-18 Thread Rajan Arora
Hi, I am trying to get the data out of an instrument through its GPIB port and using python code. I am able to perfectly control the operation of the instrument with my code. But I have not figured out a way as yet to get the data of the GPIB. I thin that it will go through 2 steps: 1) instrument t

Re: windows / unix path

2008-10-18 Thread John Machin
On Oct 19, 6:00 am, Marcin201 <[EMAIL PROTECTED]> wrote: > Is there an built-in functionality in python to convert Windows paths > to Unix paths?  I am running into problems when creating data files on > Windows and the running them on a Unix platform.  I create paths using > os.path.join. > > os.p

Re: loops

2008-10-18 Thread Duncan Booth
wbowers <[EMAIL PROTECTED]> wrote: > I agree that using range() for simple iterations is the way to go. except that as Terry said, "The large majority of use cases for iteration are iterating though sequences" I very rarely use range() in iterations. > Here are some examples of python expressi

Re: better scheduler with correct sleep times

2008-10-18 Thread Chris Rebert
On Sat, Oct 18, 2008 at 5:09 AM, qvx <[EMAIL PROTECTED]> wrote: > I need a scheduler which can delay execution of a > function for certain period of time. > My attempt was something like this: > [code snipped] > > But then I came up with the following case: > > 1. I call delay with delay_sec = 10 >

Re: Linux.com: Python 3 makes a big break

2008-10-18 Thread Aahz
In article <[EMAIL PROTECTED]>, Terry Reedy <[EMAIL PROTECTED]> wrote: > >http://www.linux.com/feature/150399 Although I have no objections to the way I was quoted, the article didn't include the points I wanted to make. Here's my original interview: On Sat, Oct 04, 2008, [EMAIL PROTECTED] wrot

Re: Linux.com: Python 3 makes a big break

2008-10-18 Thread Jean-Paul Calderone
On Sat, 18 Oct 2008 15:30:23 -0400, Terry Reedy <[EMAIL PROTECTED]> wrote: http://www.linux.com/feature/150399 Interesting article with one minor incompleteness. "For instance, the print statement got turned into a print function; you must now put parentheses around what you want to print to the

Re: xml.etree.ElementTree and XPath

2008-10-18 Thread Stefan Behnel
xkenneth wrote: > Can I execute XPath queries on ElementTree objects ignoring the > namespace? IE './node' instead of './{http://namespace.com}node'. The XPath support in ET is very limited. You can use lxml.etree instead, which has full support for XPath 1.0, i.e. you can do tree.xpath('

Re: Interoperating with C

2008-10-18 Thread Aaron Brady
Michele wrote: > Hi there, > I would like to call C functions in a Python program, passing > user-defined objects and primitive python types (str, ints, etc.); of > course I also want to receive data from these functions, manipulating it > in my python program. > First of all: is this possible? >

Re: loops

2008-10-18 Thread wbowers
On Oct 18, 11:31 am, Terry Reedy <[EMAIL PROTECTED]> wrote: > Gandalf wrote: > > On Oct 18, 12:39 pm, Duncan Booth <[EMAIL PROTECTED]> > > wrote: > >> Gandalf <[EMAIL PROTECTED]> wrote: > >>> how can I do width python a normal for loop width tree conditions like > >>> for example : > >>> for x=1;x<

Re: Help with Iteration

2008-10-18 Thread Aaron Brady
Chris McComas wrote: > actually i'm running it online, with a mysql db. so in the db there is > a table CollegeYear with the following fields: > > name > rating > change > wp > > then another table Games > > date > year > team_1 > team_1_score > team_2 > team_2_score > > it goes through and calcula

xml.etree.ElementTree and XPath

2008-10-18 Thread xkenneth
All, Can I execute XPath queries on ElementTree objects ignoring the namespace? IE './node' instead of './{http://namespace.com}node'. Is there any support for XPath and Minidom? Regards, Ken -- http://mail.python.org/mailman/listinfo/python-list

Re: Unicode File Names

2008-10-18 Thread Mark Tolonen
""Martin v. Löwis"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Oddly, os.getcwd() and os.getcwdu() both still exist in Python 3.0. Since the behavior is now identical it seems os.getcwdu() should be dropped. It is dropped, and os.getcwdb() has been added. Must be changed po

Linux.com: Python 3 makes a big break

2008-10-18 Thread Terry Reedy
http://www.linux.com/feature/150399 Interesting article with one minor incompleteness. "For instance, the print statement got turned into a print function; you must now put parentheses around what you want to print to the screen. The change allows developers to work with print in a more flexible

hiding modules in __init__.py

2008-10-18 Thread Brendan Miller
How would I implement something equivalent to java's package private in python? Say if I have package/__init__.py package/utility_module.py and utility_module.py is an implementation detail subject to change. Is there some way to use __init__.py to hide modules that I don't want clients to see?

windows / unix path

2008-10-18 Thread Marcin201
Is there an built-in functionality in python to convert Windows paths to Unix paths? I am running into problems when creating data files on Windows and the running them on a Unix platform. I create paths using os.path.join. os.path.join('Pictures', '01.jpg') returns 'Pictures\\01..jpg' on Win.

Re: heapreplace, methodcaller

2008-10-18 Thread Marc 'BlackJack' Rintsch
On Sat, 18 Oct 2008 07:01:26 -0700, bearophileHUGS wrote: > Hello, I'm experimenting more with Python 2.6 and its numerous changes. > > […] > > Regarding the operators module, this syntax: methodcaller('replace', > 'old', 'new') > > Has this meaning: > lambda s: s.replace('old', 'new') > > I do

Re: loops

2008-10-18 Thread Terry Reedy
Gandalf wrote: On Oct 18, 12:39 pm, Duncan Booth <[EMAIL PROTECTED]> wrote: Gandalf <[EMAIL PROTECTED]> wrote: how can I do width python a normal for loop width tree conditions like for example : for x=1;x<=100;x+x: print x What you wrote would appear to be an infinite loop so I'll assume

Re: IDE Question

2008-10-18 Thread Jorgen Grahn
On Wed, 15 Oct 2008 11:02:45 -0700 (PDT), jdd <[EMAIL PROTECTED]> wrote: > On Oct 15, 1:19 pm, "Steve Phillips" <[EMAIL PROTECTED]> wrote: >> Hi All, >> I am just wondering what seems to be the most popular IDE. The reason >> I ask is I am currently at war with myself when it comes to IDE's. It >>

Re: ANN: pyparsing 1.5.1 released

2008-10-18 Thread Terry Reedy
Paul McGuire wrote: I've just uploaded to SourceForge and PyPI the latest update to (Python 3.0 uses syntax for catching exceptions that is incompatible with Python versions pre 2.6, so there is no way for me to support both existing Python releases and Python 3.0 with a common source code bas

Re: Loosely-coupled development environment (was: IDE Question)

2008-10-18 Thread Jorgen Grahn
On Thu, 16 Oct 2008 07:47:36 +1100, Ben Finney <[EMAIL PROTECTED]> wrote: > "Steve Phillips" <[EMAIL PROTECTED]> writes: > >> I am just wondering what seems to be the most popular IDE. The >> reason I ask is I am currently at war with myself when it comes to >> IDE's. It seems like every one I find

Re: IDE Question

2008-10-18 Thread Jorgen Grahn
On Wed, 15 Oct 2008 11:44:59 -0700 (PDT), jdd <[EMAIL PROTECTED]> wrote: > On Oct 15, 2:13 pm, "Fabio Zadrozny" <[EMAIL PROTECTED]> wrote: >> Now, following that route, many people call Eclipse is the 21st >> century Emacs... ;-) >> > > I don't want to kick off an editor war or anything, but I don'

Re: Some Problem about Moin

2008-10-18 Thread Paul Boddie
On 18 Okt, 06:18, Kara <[EMAIL PROTECTED]> wrote: > Hi,everyone.I'm a greenhand on Moin.I want to change my left-side of > index like Python.org that if you click one link in left-Side, it will > show sub-dirs under the link.So would you give me some "practise in > action" or ideas? The www.python

Re: Interoperating with C

2008-10-18 Thread Grant Edwards
On 2008-10-18, Michele <[EMAIL PROTECTED]> wrote: > I would like to call C functions in a Python program, passing > user-defined objects and primitive python types (str, ints, etc.); of > course I also want to receive data from these functions, manipulating it > in my python program. > First of al

Re: PythonWin --> drwatson

2008-10-18 Thread Frank L. Thiel
On 18-Oct-08 01:39, this message was sent by Allan: "Frank L. Thiel" <[EMAIL PROTECTED]> writes: I have installed PythonWin from the distribution. When I try to open it, the message "PyWin32 has encountered a problem ..." appears, and a drwatson error report is generated. Python 2.6 itself,

PyCon 2009 (US) - Call for Tutorials

2008-10-18 Thread Greg Lindstrom
The period for submitting tutorial proposals for Pycon 2009 (US) is open and will continue through Friday, October 31th. This year features two "pre-conference" days devoted to tutorials on Wednesday March 25 & Thursday March 26 in Chicago. This allows for more classes than ever. Tutorials are 3-h

Re: Interoperating with C

2008-10-18 Thread bearophileHUGS
Michele: > I would like to call C functions in a Python program, First of all take a look at the standard module ctypes. Bye, bearophile -- http://mail.python.org/mailman/listinfo/python-list

Interoperating with C

2008-10-18 Thread Michele
Hi there, I would like to call C functions in a Python program, passing user-defined objects and primitive python types (str, ints, etc.); of course I also want to receive data from these functions, manipulating it in my python program. First of all: is this possible? Secondly, what's the mapping b

heapreplace, methodcaller

2008-10-18 Thread bearophileHUGS
Hello, I'm experimenting more with Python 2.6 and its numerous changes. To improve name coherence I think this method of the heapq module: heapq.heapreplace(heap, item) can grow an alias in Python 2.6.1/2.7 and 3.0/3.1: heapq.heappoppush(heap, item) So later the heapreplace() name can be depreca

Re: python-ldap reading an OU with more than 1000 objects

2008-10-18 Thread Michael Ströder
Erick Perez - Quadrian Enterprises, S.A. wrote: > I have a MS Windows AD domain, and have one OU with more tan 1000 users > objects. When I try to read it, I hit the 1000 limit of AD while returning > objects, so I'm asking for advice as to how to read them. IIRC with MS AD you can circumvent this

Re: Help with Iteration

2008-10-18 Thread Chris McComas
On Oct 18, 12:43 am, "Aaron \"Castironpi\" Brady" <[EMAIL PROTECTED]> wrote: > On Oct 17, 10:44 pm, Chris McComas <[EMAIL PROTECTED]> wrote: > > > i have a python script that is computing ratings of sports teams. > > > what i'm trying to do is setup an iteration for the rating so that the > > pytho

Porting VB apps to Python for Window / Linux use

2008-10-18 Thread Dotan Cohen
I often see mention of SMBs that either want to upgrade their Windows installations, or move to Linux, but cannot because of inhouse VB apps. Are there any Python experts who I can reference them to for porting? I have nothing on hand at the moment, but I see this as a need without an obvious answe

Re: Unicode File Names

2008-10-18 Thread Martin v. Löwis
> Oddly, os.getcwd() and os.getcwdu() both still exist in Python 3.0. > Since the behavior is now identical it seems os.getcwdu() should be > dropped. It is dropped, and os.getcwdb() has been added. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Emacs users: feedback on diffs between python-mode.el and python.el?

2008-10-18 Thread Rob Wolfe
Alberto Griggio <[EMAIL PROTECTED]> writes: > Hello, > >> I second Bruno's points, the older python-mode.el is much >> better, > > I agree too. I can't really say what's missing from python.el, but I'm > much more comfortable with python-mode.el. The triple-quote highlight is > better in python.e

Re: Emacs users: feedback on diffs between python-mode.el and python.el?

2008-10-18 Thread Rob Wolfe
Alberto Griggio <[EMAIL PROTECTED]> writes: > Hello, > >> I second Bruno's points, the older python-mode.el is much >> better, > > I agree too. I can't really say what's missing from python.el, but I'm > much more comfortable with python-mode.el. The triple-quote highlight is > better in python.e

Re: IDE Question

2008-10-18 Thread Pat
Steve Phillips wrote: Hi All, I am just wondering what seems to be the most popular IDE. The reason I ask is I am currently at war with myself when it comes to IDE's. It seems like every one I find and try out has something in it that others don't and viceversa. I am in search for the perfect IDE

Re: Unicode File Names

2008-10-18 Thread Mark Tolonen
"Jordan" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] l = os.listdir(unicode(os.getcwd())) Other options to get the same result: l = os.listdir(os.getcwdu()) l = os.listdir(u'.') Oddly, os.getcwd() and os.getcwdu() both still exist in Python 3.0. Since the behavior is now

better scheduler with correct sleep times

2008-10-18 Thread qvx
I need a scheduler which can delay execution of a function for certain period of time. My attempt was something like this: def delay(self, func, arg, delay_sec=0): fire_at = wallclock() + delay_sec self.queue.put((fire_at, func, arg)) def runner(self): while self.a

Re: Pan/Zoom with Matplotlib

2008-10-18 Thread Czenek
On Oct 18, 1:48 am, Czenek <[EMAIL PROTECTED]> wrote: > Hi, > can I use somehow standard matplotlib's functions pan/zoom? I would > like to zoom my created graph after double-clicking and move with it > after keyboard (arrow) pressing (similar as Google Maps). And I want > also to control how much

Re: loops

2008-10-18 Thread Aaron Brady
Gandalf wrote: > On Oct 18, 12:39 pm, Duncan Booth <[EMAIL PROTECTED]> > wrote: >> Gandalf <[EMAIL PROTECTED]> wrote: >> > how can I do width python a normal for loop width tree conditions like >> > for example : >> >> > for x=1;x<=100;x+x: >> >     print x >> >> What you wrote would appear to be

Re: loops

2008-10-18 Thread robert
Gandalf wrote: On Oct 18, 12:39 pm, Duncan Booth <[EMAIL PROTECTED]> wrote: Gandalf <[EMAIL PROTECTED]> wrote: how can I do width python a normal for loop width tree conditions like for example : for x=1;x<=100;x+x: print x What you wrote would appear to be an infinite loop so I'll assume

Re: loops

2008-10-18 Thread Gandalf
On Oct 18, 12:39 pm, Duncan Booth <[EMAIL PROTECTED]> wrote: > Gandalf <[EMAIL PROTECTED]> wrote: > > how can I do width python a normal for loop width tree conditions like > > for example : > > > for x=1;x<=100;x+x: > >     print x > > What you wrote would appear to be an infinite loop so I'll ass

Re: loops

2008-10-18 Thread Gandalf
On Oct 18, 12:39 pm, Duncan Booth <[EMAIL PROTECTED]> wrote: > Gandalf <[EMAIL PROTECTED]> wrote: > > how can I do width python a normal for loop width tree conditions like > > for example : > > > for x=1;x<=100;x+x: > >     print x > > What you wrote would appear to be an infinite loop so I'll ass

Re: loops

2008-10-18 Thread Duncan Booth
Gandalf <[EMAIL PROTECTED]> wrote: > how can I do width python a normal for loop width tree conditions like > for example : > > for x=1;x<=100;x+x: > print x > What you wrote would appear to be an infinite loop so I'll assume you meant to assign something to x each time round the loop as w

loops

2008-10-18 Thread Gandalf
how can I do width python a normal for loop width tree conditions like for example : for x=1;x<=100;x+x: print x thanks -- http://mail.python.org/mailman/listinfo/python-list

(relative) import trouble, sometimes it works, sometimes it doesn't ...

2008-10-18 Thread Stef Mientki
hello, I'm running Python 2.5 and want my programs to run at least under Windows and Linux (preferable also Mac). So I guess I should always use relative paths. From most modules I can call a global function, that should import a dictionary from path deeper than the module itself. The import i

Re: Unicode File Names

2008-10-18 Thread John Machin
On Oct 18, 5:57 pm, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > > Should the note be removed, or should it say something like "Unicode > > file names are supported. New in Python 2.6."? Is there anything else > > that should be mentioned? > > The note should be corrected, documenting the behavio

Re: inserting Unicode character in dictionary - Python

2008-10-18 Thread Martin v. Löwis
> 2. Exactly what Unicode you get would be dependent on Python properly > interpreting the bytes in the source file -- which you can make it do by > adding something like "-*- coding: utf-8 -*-" in a comment at the top of > the file. That depends on the Python version. Up to (and including) 2.4, t

Re: Unicode File Names

2008-10-18 Thread Martin v. Löwis
> Should the note be removed, or should it say something like "Unicode > file names are supported. New in Python 2.6."? Is there anything else > that should be mentioned? The note should be corrected, documenting the behaviour implemented. > More on cp437: I see where you mentioned to the patch a