Re: Pyrex installation on windows XP: step-by-step guide

2006-04-19 Thread Julien Fiore
To install Pyton, I simply used the python Windows installer (python-2.4.2.msi) available at python.org. Julien -- http://mail.python.org/mailman/listinfo/python-list

Re: COM object pointer cast

2006-04-19 Thread Axel Bock
late but still - thanks a lot :) . works like a charm. cheers, Axel. -- http://mail.python.org/mailman/listinfo/python-list

Re: How do you guys print out a binary tree?

2006-04-19 Thread Anthony Liu
Hi, Bayer Munich, I implemented a syntax parser from bottom up using a CNF grammar. I actually know what part of the triangle of the matrix I need to turn into a tree, but it is kinda hard to describe in text. So, I just made it easy by giving a triangle of the matrix. Anyway, thanks for your h

Re: BIOCHIP --->>> NO GOOD !!

2006-04-19 Thread Petr Prikryl
rainbow.cougar wrote in message > okay wrote: > > To Archbishop Christodoulos Paraskevaides of the Greek Orthodox Church > > in Athens and Greece Archbishop, > > I talked with a Greek Orthodox believer in Australia and he told me two > > I'm thinking a list comprehension... Possibly some filter(m

Re: How do you guys print out a binary tree?

2006-04-19 Thread Anthony Liu
Hi, Dave, That looks nice, I'll definitely try it out. --- Dave Hansen <[EMAIL PROTECTED]> wrote: > On Tue, 18 Apr 2006 08:17:22 -0700 (PDT) in > comp.lang.python, Anthony > Liu <[EMAIL PROTECTED]> wrote: > > > > > > >--- bayerj <[EMAIL PROTECTED]> wrote: > > > >> Hi, > >> > >> > 1 2 3

Re: Lamdba forms

2006-04-19 Thread Paddy
To expand on the above, Python does not have statements in its lambda forms, but that does not stop pythoneers from getting the job done. I use a named function for that, but if you have an issue with that, it really is worth following Terry's advice as the subject has been tackled at great length

Re: python pyc or pyo files

2006-04-19 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > This is an expected behaviour right? why is B.pyc not generated? PYC files are only generated for modules that are imported, not for toplevel scripts. also see: http://pyfaq.infogami.com/how-do-i-create-a-pyc-file -- http://mail.python.org/mailman/listinfo/p

Re: freakin out over C++ module in python

2006-04-19 Thread Serge Orlov
[EMAIL PROTECTED] wrote: > wow , thanks for the tips and the link.. i can at least see whats going > on here. > this project is beginning to look believable to me. > > i have another question.. later , in this same class, after it goes > thru some error handling, it returns like this > return COM_

Re: python pyc or pyo files

2006-04-19 Thread micklee74
thanks ! can i ask again... I have two scripts , A.py and B.py In B.py, i have an import statement to import A.py When i executed B.py, i saw a A.pyc in the same directory, but not B.pyc This is an expected behaviour right? why is B.pyc not generated? thanks -- http://mail.python.org/mailm

Re: python pyc or pyo files

2006-04-19 Thread Fredrik Lundh
"[EMAIL PROTECTED]" wrote: > any good websites or articles that describes about pyc or pyo files , > how they are generated and what's the difference between them and > Java's bytecode?? they're described in the Python tutorial: http://docs.python.org/tut/node8.html#SECTION008120

Error with OpenOffice

2006-04-19 Thread Mario Lacunza
Hello, I try to make the exercises found in Ooo website but I receipt this error: [EMAIL PROTECTED]:~$ python Python 2.4.2 (#2, Sep 30 2005, 21:19:01) [GCC 4.0.2 20050808 (prerelease) (Ubuntu 4.0.1-4ubuntu8)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> imp

Re: Confused by Python and nested scoping (2.4.3)

2006-04-19 Thread Fredrik Lundh
Sean Givan wrote: > Hi. I'm new to Python, and downloaded a Windows copy a little while > ago. I was doing some experiments with nested functions, and ran into > something strange. > > This code: > > def outer(): > val = 10 > def inner(): > print val > inner() > > outer() > > ..prints out the va

python pyc or pyo files

2006-04-19 Thread micklee74
hi any good websites or articles that describes about pyc or pyo files , how they are generated and what's the difference between them and Java's bytecode?? thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: help wanted regarding displaying Japanese characters in a GUI using QT and python

2006-04-19 Thread prats
No I need to replace the text given by the user in the GUI by a new text already in ISO-2022-JP encoding. Then I would have to redisplay this new text. I explain in detail. I have a text file(say) which has something written in it using base64 encoding and using charset ISO-2022-JP. I want to displ

Re: send pdf or jpg to printer

2006-04-19 Thread Grant Edwards
On 2006-04-19, Bell, Kevin <[EMAIL PROTECTED]> wrote: > Does anyone have any suggestions on printing pdf's? This works for me: os.system("lpr filename.pdf") ;) > These pdf's don't change much, so if it be more straight > forward to convert them to jpgs, or another format, then > that'd be fi

Re: mod_python web-dav management system

2006-04-19 Thread grahamd
Kyler Laird wrote: > Damjan <[EMAIL PROTECTED]> writes: > > >Now I've been thinking that it might be pretty easy to implement a > >authorization layer with mod_python (but living handling of the web-dav > >protocol to apache)... So, has anyone already done something similar? > > Yup. I'm in the p

Re: mini component distribution question

2006-04-19 Thread Eric S. Johansson
Ben Finney wrote: > "Eric S. Johansson" <[EMAIL PROTECTED]> writes: >> Ben Finney wrote: > setuptools allows downloads and/or installs from any specified > location. The Cheeseshop is just a convenient default location. > >>> - use easy_install to automatically download and install them >>> when

Re: Python IDE for linux

2006-04-19 Thread BartlebyScrivener
Neil, If you aren't accessing this list via the web, start your browser and go to: http://groups.google.com/group/comp.lang.python In the search box at upper right, type in: ide linux It gets discussed about once a week. A recent long one: http://groups.google.com/group/comp.lang.python/brows

Re: Missing interfaces in Python...

2006-04-19 Thread Carl Banks
Ben wrote: > It seems to me that a lot of python projects reimplement interfaces or > adaption of some kind once they reach a certain size (Zope, PEAK, eggs, > TurboGears, etc), which implies that they really do have some benefits, > particularly in documentation. Yes. On my current largish proje

how to transfer a python object to other computer?

2006-04-19 Thread yy x
    Hey, all.Now I wanna to transfer a object to other computer, Maybe I could serialize the object to a file by pickle moudle, then send the file and get it from the file.But I think the efficency is awful, because the disk io is very slow. Someone could do me a favor to give me some idea?

Re: Lamdba forms

2006-04-19 Thread Terry Reedy
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > hi all, I am a python newbie. why functions created with lambda forms > cannot contain statements? Because statement do not fit in expressions. > how to get unnamed function with statements? Can't. Many discussions in archives (whi

Re: Pyrex installation on windows XP: step-by-step guide

2006-04-19 Thread vj
Can you use the stock python build or do you have to build python from scratch with mingw to use pyrex modules built with mingw? -- http://mail.python.org/mailman/listinfo/python-list

Python IDE for linux

2006-04-19 Thread Neil Isaac
I have been writing python my little python scripts in gedit and running them using the command line. At this point I'm thinking that I would like to start using a real IDE. I don't need anything special or fancy, but would like it to manage projects, etc... I do know about kdevelop and emacs/v

Re: Missing interfaces in Python...

2006-04-19 Thread Alex Martelli
Rene Pijlman <[EMAIL PROTECTED]> wrote: > Alex Martelli: > >PEAK is an interesting counterexample, particularly since Philip Eby > >tends to be "ahead of the curve": > > I never noticed PEAK before. Is it well worth studying? Oh yes. Alex -- http://mail.python.org/mailman/listinfo/python-list

Re: Ironpython book?

2006-04-19 Thread Alex Martelli
John Salerno <[EMAIL PROTECTED]> wrote: > Fredrik Lundh wrote: > > > are we talking about two different things here, perhaps ? > > > > the "Python for .Net" tool I'm talking about is an integration tool that > > lets you use CPython and CPython extensions together with CLR stuff, > > while IronP

Re: Method Call in Exception

2006-04-19 Thread Carl Banks
mwt wrote: > In my latest attempt at some Python code, I've been tempted to write > something in the form of: > > try: > [...] #doing some internet stuff > except IOError: > alternate_method_that_doesnt_need_internet() > > This works when I try it, but I feel vaguely uneasy about putting >

Re: Image open problem

2006-04-19 Thread John McMonagle
On Thu, 2006-04-20 at 10:29 +1000, John Machin wrote: > On 20/04/2006 6:55 AM, Aleksandar Cikota wrote: > > Hi all, > > > > I have a problem with openning of an image. > > > > Here is the Code: > > > > from Tkinter import * > > from PIL import Image, ImageTk Change from PIL import Image, ImageT

Re: Ironpython book?

2006-04-19 Thread Taylor Boon
"Fredrik Lundh" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Alex Martelli wrote: > >> > Just out of curiosity, is Python.NET a dead project? >> >> AFAIK, it's a long-completed research project. I do not know of anybody >> planning to fork it to a new project, though that of cour

Re: mini component distribution question

2006-04-19 Thread Jorge Godoy
Ben Finney wrote: > setuptools allows downloads and/or installs from any specified > location. The Cheeseshop is just a convenient default location. Jumping in the middle of this, is there some way to specify multiple download sites? It would be interesting as some kind of "backup URL" or even t

Re: Method Call in Exception

2006-04-19 Thread Serge Orlov
Felipe Almeida Lessa wrote: > Em Qua, 2006-04-19 às 16:54 -0700, mwt escreveu: > > This works when I try it, but I feel vaguely uneasy about putting > > method calls in exception blocks. > > What do you put in exception blocks?! > > > > So tell me, Brave Pythoneers, is this > > evil sorcery that I

Re: mini component distribution question

2006-04-19 Thread Ben Finney
"Eric S. Johansson" <[EMAIL PROTECTED]> writes: > Ben Finney wrote: > > The developing wisdom is to: > > > > - bundle up reusable discrete functional components as Python eggs > > okay. Sounds like it's worth the effort of learning. > > > - publish them on the Cheeseshop > > > > http:

Re: Method Call in Exception

2006-04-19 Thread mwt
Felipe Almeida Lessa wrote: > Em Qua, 2006-04-19 às 16:54 -0700, mwt escreveu: > > This works when I try it, but I feel vaguely uneasy about putting > > method calls in exception blocks. > > What do you put in exception blocks?! Usually I just print an error message. > > > > So tell me, Brave Py

Re: Image open problem

2006-04-19 Thread John Machin
On 20/04/2006 6:55 AM, Aleksandar Cikota wrote: > Hi all, > > I have a problem with openning of an image. > > Here is the Code: > > from Tkinter import * > from PIL import Image, ImageTk Insert here: print type(Image), type(Image.open), Image.version Here are my results: Python 2.4.2 (#67, Sep

Lamdba forms

2006-04-19 Thread lsmith234
hi all, I am a python newbie. why functions created with lambda forms cannot contain statements? how to get unnamed function with statements? -- http://mail.python.org/mailman/listinfo/python-list

Re: Confused by Python and nested scoping (2.4.3)

2006-04-19 Thread Terry Reedy
"Sean Givan" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi. I'm new to Python, and downloaded a Windows copy a little while > ago. I was doing some experiments with nested functions, and ran into > something strange. Experiments are good. Strange can be instructive. ... > I'

Re: Method Call in Exception

2006-04-19 Thread Felipe Almeida Lessa
Em Qua, 2006-04-19 às 16:54 -0700, mwt escreveu: > This works when I try it, but I feel vaguely uneasy about putting > method calls in exception blocks. What do you put in exception blocks?! > So tell me, Brave Pythoneers, is this > evil sorcery that I will end up regretting, or is it just plai

Re: Confused by Python and nested scoping (2.4.3)

2006-04-19 Thread Schüle Daniel
Sean Givan schrieb: > Hi. I'm new to Python welcome > ago. I was doing some experiments with nested functions, and ran into > something strange. > > This code: > > def outer(): > val = 10 > def inner(): > print val > inner() > > outer() > > ...prints out the value '10',

Re: Confused by Python and nested scoping (2.4.3)

2006-04-19 Thread Ben Cartwright
Sean Givan wrote: > def outer(): > val = 10 > def inner(): > print val > val = 20 > inner() > print val > > outer() > > ..I expected to print '10', then '20', but instead got an error: > >print val > UnboundLocalError: local variable 'val' ref

Re: win32com Excel bug?

2006-04-19 Thread cfriedalek
yth (Yes That Helped). You know how it goes, I thought I'd already tried to include all arguments. Obviously I didn't, or stuffed it up in some other way. Also some confusion about the meaning of "required" and "default". The doc explains these arguments as required, but some have defaults. I gues

Re: accessing a classes code

2006-04-19 Thread John Machin
On 20/04/2006 6:54 AM, bruno de chez modulix en face wrote: >> It turns out that what I want to do can be done using the inspect >> module which has methods for getsourcecode among other things. > > I never said that what you wanted to do was impossible (nor even > difficult, and FWIW, there are s

Method Call in Exception

2006-04-19 Thread mwt
In my latest attempt at some Python code, I've been tempted to write something in the form of: try: [...] #doing some internet stuff except IOError: alternate_method_that_doesnt_need_internet() This works when I try it, but I feel vaguely uneasy about putting method calls in exception blo

Re: Simple DAV server?

2006-04-19 Thread Ivan Voras
Kyler Laird wrote: > I added the ability to create and delete collections (directories), > delete members (files), authenticate users, and run per-user setuid/ > setgid. It works well with Cadaver but I'm waiting for some MS users > to report how it works under Windows. > > The only thing on my

Re: Simple DAV server?

2006-04-19 Thread Ivan Voras
robert wrote: > > thanks, that's exactly to the point: > > python server.py 8080 mydavrootfolder Thanks for the patch, I assume it's free to incorporate it into the original archive? Also, see my reply to "Kyler Laird"... -- http://mail.python.org/mailman/listinfo/python-list

Re: How do you guys print out a binary tree?

2006-04-19 Thread Dave Hansen
On Tue, 18 Apr 2006 08:17:22 -0700 (PDT) in comp.lang.python, Anthony Liu <[EMAIL PROTECTED]> wrote: > > >--- bayerj <[EMAIL PROTECTED]> wrote: > >> Hi, >> >> > 1 2 3 4 5 >> > 0 7 8 9 10 >> > 0 0 13 14 15 >> > 0 0 0 19 20 >> > 0 0 0 0 25 >> > Look at the trian

Re: Thanks from the Java Developer

2006-04-19 Thread KvS
Well then I'll also take the opportunity to put in my 2 cts. In the past I've tried several times to master Java as I at that time understood it to be *the* hype wrt programming but never really succeeded in getting beyond "Hello world" :D. Also got bored with all the technicalities pretty much eac

Re: Confused by Python and nested scoping (2.4.3)

2006-04-19 Thread Kelvie Wong
There are only two scopes in Python -- global scope and function scope. On 4/19/06, Sean Givan <[EMAIL PROTECTED]> wrote: > Hi. I'm new to Python, and downloaded a Windows copy a little while > ago. I was doing some experiments with nested functions, and ran into > something strange. > > This co

Conditions vs Events

2006-04-19 Thread Carl J. Van Arsdall
Le Monde De Python, I've been working a lot with python threads from the threading module. Specifically, when is it better to use a condition object vs an event object? It seems to me that, at least superficially, I can just about use these two mechanisms interchangeably. The only real diffe

Re: Generating Thumbnail Images of a Photo Gallery

2006-04-19 Thread Xah Lee
The Python code is archived at: http://xahlee.org/perl-python/tn_gen.html Xah [EMAIL PROTECTED] ∑ http://xahlee.org/ Xah Lee wrote: > The following is a program to generate thumbnail images for a website. > Useful, if you want to do that. > > It is used to generate the thumbnails for my “B

Re: mini component distribution question

2006-04-19 Thread Eric S. Johansson
Ben Finney wrote: > "Eric S. Johansson" <[EMAIL PROTECTED]> writes: > >> as one would expect when creating a body of software, eventually you >> create a series of relatively generic components you find yourself using >> over and over again. As a result, I'm finding myself slightly bit by >> t

Generating Thumbnail Images of a Photo Gallery

2006-04-19 Thread Xah Lee
The following is a program to generate thumbnail images for a website. Useful, if you want to do that. It is used to generate the thumbnails for my “Banners, Damsels, and Mores” project gallery. ( http://xahlee.org/Periodic_dosage_dir/lanci/lanci.html ) Comments and versions in other lang welcome

Re: mini component distribution question

2006-04-19 Thread Ben Finney
"Eric S. Johansson" <[EMAIL PROTECTED]> writes: > as one would expect when creating a body of software, eventually you > create a series of relatively generic components you find yourself using > over and over again. As a result, I'm finding myself slightly bit by > the same problem I have fac

Confused by Python and nested scoping (2.4.3)

2006-04-19 Thread Sean Givan
Hi. I'm new to Python, and downloaded a Windows copy a little while ago. I was doing some experiments with nested functions, and ran into something strange. This code: def outer(): val = 10 def inner(): print val inner() outer() ..prints out the value

mini component distribution question

2006-04-19 Thread Eric S. Johansson
as one would expect when creating a body of software, eventually you create a series of relatively generic components you find yourself using over and over again. As a result, I'm finding myself slightly bit by the same problem I have faced multiple times of the past. Namely, how do you distr

Re: send pdf or jpg to printer

2006-04-19 Thread Serge Orlov
Bell, Kevin wrote: > Does anyone have any suggestions on printing pdf's? These pdf's don't > change much, so if it be more straight forward to convert them to jpgs, > or another format, then that'd be fine too. You didn't say what OS you're using, assuming it's windows: http://tgolden.sc.sabren.

Re: send pdf or jpg to printer

2006-04-19 Thread infidel
Bell, Kevin wrote: > Does anyone have any suggestions on printing pdf's? These pdf's don't > change much, so if it be more straight forward to convert them to jpgs, > or another format, then that'd be fine too. I use GhostScript and GSPrint to send PDFs to our printer in a Windows environment. I

Re: Activating Batch Files from Python

2006-04-19 Thread Ben C
On 2006-04-19, Jeff Groves <[EMAIL PROTECTED]> wrote: >>How about sourcing it from a shell, then using that same shell instance >>to run the programs? > > How would I do that? As I've said, I haven't found a Python command > that lets you send multiple commands to the same shell yet. If I could, >

Re: Activating Batch Files from Python

2006-04-19 Thread Ben C
On 2006-04-19, Jeff Groves <[EMAIL PROTECTED]> wrote: > I'm writing a launcher that should do the following: > > 1. Activate a .bat file to set environmental variables. > 2. Start 3 programs, using said environmental variables as arguments. > > However, I can't get the environmental variables to st

send pdf or jpg to printer

2006-04-19 Thread Bell, Kevin
Does anyone have any suggestions on printing pdf's? These pdf's don't change much, so if it be more straight forward to convert them to jpgs, or another format, then that'd be fine too. Thanks in advanced, Kevin -- http://mail.python.org/mailman/listinfo/python-list

Image open problem

2006-04-19 Thread Aleksandar Cikota
Hi all, I have a problem with openning of an image. Here is the Code: from Tkinter import * from PIL import Image, ImageTk from win32com.client import gencache import tkMessageBox import win32com.client import math import time import os import threading import pythoncom chsr = win32com.client.D

Re: accessing a classes code

2006-04-19 Thread bruno de chez modulix en face
> It turns out that what I want to do can be done using the inspect > module which has methods for getsourcecode among other things. I never said that what you wanted to do was impossible (nor even difficult, and FWIW, there are simpler alternatives than using inspect - using a templating system l

Need help with python one liners which will not be caught by signal.alarm

2006-04-19 Thread vj
I'm trying to create a semi restricted env where users are not able to bring my application down. I know the following: 1**1000 will not be caught by signal.alarm since it is executed in c code. Are there other examples? Will [100]*100 be cought by signal.alarm? Thanks, VJ

Re: multiline comments

2006-04-19 Thread Jorge Godoy
rx wrote: > Still a little strange to newcomers that there are three ways to do the > same and that you should be carefull to use the right '''/""" inside the > comment else the comment will not work for some reason. > > #comment > > ''' > comment > ''' > > """ > comment > """ Please, note tha

Re: Official Python logo

2006-04-19 Thread BartlebyScrivener
logos: http://www.fastmirrors.org/python/pub/beta.python.org/resources/design/logo/ rick -- http://mail.python.org/mailman/listinfo/python-list

Re: C API - Conversions from PyInt or PyFloat to a char *

2006-04-19 Thread [EMAIL PROTECTED]
Thanks for the reply, This is the approach I have taken. Convert to a c numeric and take it from there. Is there movment to add functions like PyInt_AsString ? I noticed it mentioned in response to a PEP... thanks, ~jason -- http://mail.python.org/mailman/listinfo/python-list

Re: Official Python logo

2006-04-19 Thread rx
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Where do I find one? Is it the banner by Just van Rossum or the Picasso > snake on python.org? > Thanks. > They talk about logos - I don't know the site. http://www.pythonology.com/logos google python official logo link 6 -- htt

Re: accessing a classes code

2006-04-19 Thread Ryan Krauss
It turns out that what I want to do can be done using the inspect module which has methods for getsourcecode among other things. Ryan On 4/19/06, bruno at modulix <[EMAIL PROTECTED]> wrote: > Ryan Krauss wrote: > (top-post corrected) > > > > On 4/19/06, bruno at modulix <[EMAIL PROTECTED]> wrote:

Re: Thanks from the Java Developer

2006-04-19 Thread RK
Me too. I feel like I've been living under a rock. Did all this just happen in the last few years? -- http://mail.python.org/mailman/listinfo/python-list

Thanks from the Java Developer

2006-04-19 Thread redefined . horizons
I wanted to thank those members of the Python community that took the time to answer my questions about interfaces and plug-ins in Python. I have discovered that Python is a very powerful language, and one that I look forward to using for Linux development. I have found the support for Python much

Re: multiline comments

2006-04-19 Thread rx
"Jorge Godoy" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > rx wrote: > >> I don't understand the problem - why should comments (and I hope you >> believe there should be a one line comment at least) be restricted to one >> line. It doesn't work that way for if, while, for. > > It

Re: multiline comments

2006-04-19 Thread rx
> > Of course! You should have used """ since you already used ''' in your > triple-quoted text. But I'm just repeating what I already said (and kept > above so that you can see it again). > > -- > Jorge Godoy <[EMAIL PROTECTED]> > Sorry - I should have read more carefully. I like the ide

Re: Java Developer Exploring Python

2006-04-19 Thread [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote: > Is Python actively developed and supported on Linux? Yes. In fact, Red Hat's installation and administration tools are written in Python and have been for a decade (give or take a year or two). -- http://mail.python.org/mailman/listinfo/python-list

Re: multiline comments

2006-04-19 Thread Jorge Godoy
rx wrote: > I don't understand the problem - why should comments (and I hope you > believe there should be a one line comment at least) be restricted to one > line. It doesn't work that way for if, while, for. It is the minimum case that can solve a problem commenting one line -- or part of it as

Re: multiline comments

2006-04-19 Thread rx
"Jorge Godoy" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > rx wrote: > >> I have commented out a lot of C++ code and miss the block feature in >> python more than I missed the nested comments in C++. >> Besides nothing really strange happened. >> Sometimes you just need to diss

Re: multiline comments

2006-04-19 Thread Jorge Godoy
rx wrote: > > "Jorge Godoy" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> Edward Elliott wrote: >> > >> >> You can use either """ or '''. I don't keep changing them in my code, so >> I >> can always use the other type (usually I use " so for commenting things >> out >> I'd us

Re: multiline comments

2006-04-19 Thread Jorge Godoy
rx wrote: > I have commented out a lot of C++ code and miss the block feature in > python more than I missed the nested comments in C++. > Besides nothing really strange happened. > Sometimes you just need to dissable some of the code temporarly as quickly > as possible, and I like that it is not

Re: Better way to sift parts of URL . . .

2006-04-19 Thread Ben Wilson
In practice, I had to change this: if len(query) > 0 and query[-1] == query[-1].capitalize(): group = query.pop() to this: if len(query) > 0 and query[-1][0] == query[-1].capitalize()[0]: group = query.pop() This is because I only wanted to test the case of the first letter of the string. --

Re: pywin32 : scheduled weakup from standby/hiberate ?

2006-04-19 Thread Roger Upole
."robert" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Windows the task scheduler tool can program (the BIOS?) to weak up the > machine from standby/hibernate at certain > pre-configured times. Can this be done directly through the (py)win32 API? > > robert Pywin32 has a task

Re: Ironpython book?

2006-04-19 Thread John Salerno
Fredrik Lundh wrote: > are we talking about two different things here, perhaps ? > > the "Python for .Net" tool I'm talking about is an integration tool that > lets you use CPython and CPython extensions together with CLR stuff, > while IronPython is a pure-CLR implementation of Python. Yes, I'm

Re: Simple DAV server?

2006-04-19 Thread Kyler Laird
robert <[EMAIL PROTECTED]> writes: >For testing purposes I'm looking for a simple DAV server - best a python >thing serving a folder tree. Don't want to install/change/setup the >complex apache dav .. I'm avoiding Apache for this too. Today I've been working on PanDAV. http://ivoras.s

Re: multiline comments

2006-04-19 Thread Edward Elliott
Jorge Godoy wrote: > You can use either """ or '''. I don't keep changing them in my code, so I > can always use the other type (usually I use " so for commenting things out > I'd use ') to do that. It's close, only problem is it doesn't nest. It'll have to be good enough for now. >>Forcing p

Re: multiline comments

2006-04-19 Thread Edward Elliott
Peter Tillotson wrote: > discouraged except where vital. Perhaps we should make them really hard > and elegant - mandate latex/mathml markup so good editors can display > the equations we are implementing :-) I like this guy already! :) -- http://mail.python.org/mailman/listinfo/python-list

Re: multiline comments

2006-04-19 Thread rx
> > Also, if you remove the start of the block first, then your editor might > not > be highlighting anymore... With nested comments things get even worse > because you might miss the end of the outer block or something like that. > > -- > Jorge Godoy <[EMAIL PROTECTED]> > I have commente

Official Python logo

2006-04-19 Thread betterp
Where do I find one? Is it the banner by Just van Rossum or the Picasso snake on python.org? Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: multiline comments

2006-04-19 Thread Edward Elliott
Jorge Godoy wrote: > Edward Elliott wrote: > Try using Subversion. You can work and make diffs disconnected from the > network. rcs isn't the issue. I'm already assuming a local store, a networked one just makes my argument even easier. >>I'm not saying nested comments solve every problem, jus

Re: Pyrex installation on windows XP: step-by-step guide

2006-04-19 Thread Michel Claveau
Merci beaucoup ! Thank you very much! -- @-salutations Michel Claveau -- http://mail.python.org/mailman/listinfo/python-list

Re: Ironpython book?

2006-04-19 Thread Fredrik Lundh
John Salerno wrote: > But it sounds like, from Fred's post, that work is still being done on > it. My main point in asking was just that I hadn't heard as much about > it as IronPython lately, and I was just curious what the community would > think about two competing .NET implementations, since a

Re: multiline comments

2006-04-19 Thread Edward Elliott
Sion Arrowsmith wrote: > Jorge Godoy <[EMAIL PROTECTED]> wrote: >>Is it harder to remove "n" lines of code commented out with "#" than "n" >>lines of multiline commented code? How? > > I'd say it's harder to remove the latter, due to having to search for > the end of comment sequence, rather tha

Re: multiline comments

2006-04-19 Thread rx
"Jorge Godoy" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Edward Elliott wrote: > > > You can use either """ or '''. I don't keep changing them in my code, so > I > can always use the other type (usually I use " so for commenting things > out > I'd use ') to do that. > Try

Re: multiline comments

2006-04-19 Thread Edward Elliott
Sion Arrowsmith wrote: > Really? Under what circumstances is it easier to see what's going on > with start/end comments than with comment-to-end-of-line? Off the top of my head: 1. The code is usually easier to read as # can obscure the first token on the line. This can be alleviated by leaving

Re: accessing a classes code

2006-04-19 Thread bruno at modulix
Ryan Krauss wrote: (top-post corrected) > > On 4/19/06, bruno at modulix <[EMAIL PROTECTED]> wrote: > >>Ryan Krauss wrote: >> >>>I have a set of Python classes that represent elements in a structural >>>model for vibration modeling (sort of like FEA). Some of the >>>parameters of the model are i

Re: How do you guys print out a binary tree?

2006-04-19 Thread bayerj
The problem is that you cannot represent a matrix as a tree, due to the fact that there are more than one tree for a matrix. First you have to decide, how you will turn the matrix into a tree. -- http://mail.python.org/mailman/listinfo/python-list

Re: Activating Batch Files from Python

2006-04-19 Thread Jeff Groves
>How about sourcing it from a shell, then using that same shell instance >to run the programs? How would I do that? As I've said, I haven't found a Python command that lets you send multiple commands to the same shell yet. If I could, my problem would be solved. -- http://mail.python.org/mailman

Re: Better way to sift parts of URL . . .

2006-04-19 Thread Ben Wilson
This is what I ended up with. Slightly different approach: import urlparse def sUrl(s): page = group = '' bits = urlparse.urlsplit(s) url = '//'.join([bits[0],bits[1]]) + '/' query = bits[2].split('/') if '' in query: query.remove('') if len(query) > 1: page = quer

Re: multiline comments

2006-04-19 Thread rx
"Edward Elliott" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Ben Finney wrote: >> Indeed. Using revision control means never needing to comment out >> blocks of code. > > Typing (* and *) on a few line will always be quicker, easier, and less > confusing than any rcs diffs/rest

Re: += append class operator

2006-04-19 Thread schwehr
Awesome. Thanks! -kurt -- http://mail.python.org/mailman/listinfo/python-list

Re: += append class operator

2006-04-19 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > This is probably a FAQ, but is there an operator mapping for += for > classes? obj.__iadd__(other) > Or does a += b get converted to a = a + b? only if __iadd__ is not defined. > I would like to make this operator faster for the BitVector class, but > I don't se

What interface Can I use for Python?

2006-04-19 Thread Tomás Rodriguez Orta
Hello. I am looking a good interface for doing app similar to Visaul C++, but for python over windows.   some can Help me. Thanks very mouch.   TOMAS- Este correo fue escaneado en busca de virus con el MDaemon Antivirus 2.2

+= append class operator

2006-04-19 Thread schwehr
Hi All, This is probably a FAQ, but is there an operator mapping for += for classes? Or does a += b get converted to a = a + b? I would like to make this operator faster for the BitVector class, but I don't see += in http://docs.python.org/lib/operator-map.html I could always create an append m

Re: How protect proprietary Python code? (bytecode obfuscation?, what better?)

2006-04-19 Thread bruno at modulix
Ben Sizer wrote: > bruno at modulix wrote: > >>[EMAIL PROTECTED] wrote: >> >>>I suppose another idea is to rewrite entire Python app in C if compiled >>>C code >>>is harder to decompile. >> >>Do you really think "native" code is harder to reverse-engineer than >>Python's byte-code ? > > > Yes, u

Re: accessing a classes code

2006-04-19 Thread rx
"Ryan Krauss" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Is there a way for a Python instance to access its own code (especially the __init__ method)? And if there is, is there a clean way to write the modified code back to a file? I assume that if I can get the code as a lis

  1   2   >