Re: Bug(s) in Python 3.1.1 Windows installation

2009-10-29 Thread Alf P. Steinbach
* Gabriel Genellina: En Wed, 28 Oct 2009 21:06:03 -0300, Alf P. Steinbach escribió: The installer did manage to do the rest of that part correctly: file associations and PATHEXT variable. The Python installer from python.org does NOT add .py and .pyw to PATHEXT; the ActivePython one does.

Re: Newbie advice

2009-10-29 Thread alex23
CSharpner wrote: > Here's what I /want/ to do, but don't know where to begin: Welcome to the fun :) > - Write web services in Python (I've done plenty of this in .NET, > BTW). I'm a big fan of CherryPy: http://www.cherrypy.org/ It's very straightforward and easy to get into. > - Write plain D

Re: Python newbie data structures question

2009-10-29 Thread alex23
On Oct 29, 4:31 pm, codingJoe wrote: > I am trying to choose the right data structure to do a value lookup > with multiple keys. Hey Joe, Is something like this what you're after? >>> from collections import defaultdict >>> sports = defaultdict(list) >>> sports['winter','indoors'].append('bball

Re: Python newbie data structures question

2009-10-29 Thread Chris Rebert
On Wed, Oct 28, 2009 at 11:31 PM, codingJoe wrote: > Hi all! > > I am trying to choose the right data structure to do a value lookup > with multiple keys. > > > I want to lookup data by:  key, key,{ values } > > My final product should be able to reference this datastructure from > within a django

Re: Problem embedding Python.

2009-10-29 Thread Brandon Keown
On Oct 27, 7:48 pm, "Gabriel Genellina" wrote: > En Tue, 27 Oct 2009 06:36:18 -0300, Brandon Keown > escribió: > > > On Oct 27, 2:47 am, "Gabriel Genellina" > > wrote: > > >> You didn't test for the fopen result; are you sure "test.py" exists in   > >> the current directory at the time you run i

Re: Web development with Python 3.1

2009-10-29 Thread Dotan Cohen
> I think you're misunderstanding how Python and the web work together. Python > is not PHP -- it was not designed to replace HTML, and it is in itself not a > templating language. If you would like to use Python code embedded in HTML, > the way PHP is typically used, you may want to look at Python

Re: Web development with Python 3.1

2009-10-29 Thread Dotan Cohen
2009/10/29 Albert Hopkins : > On Wed, 2009-10-28 at 16:38 +0200, Dotan Cohen wrote: >> > return HttpResponse(unmaintanable_html % data) >> > >> >> That's fine for single variables, but if I need to output a table of >> unknown rows?  I assume that return means the end of the script. >> Therefore I

Re: problems on installing PyGTK in Windows XP

2009-10-29 Thread News123
Hi Yang, Did you modify the path environment variable to point to your gtk lib? This might be the problem. Below the steps, that I followed. > General instructions are under http://www.pygtk.org/downloads.html > > In detail: > > Install the GTK+ bundle > > * Download the bundle > http

Re: Newbie advice

2009-10-29 Thread Diez B. Roggisch
CSharpner schrieb: Alright, I'm not new to programming, but I'm diving in head first into Python for the first time. I'm running on Windows 7, just installed "Eclipse Java EE IDE for Web Developers" and installed PyDev in it and installed Python 2.6. I've written my first "Hello World" program,

Re: Web development with Python 3.1

2009-10-29 Thread Bruno Desthuilliers
Dotan Cohen a écrit : Clearly. I was referring to stdout being send to the browser as the http response. s/browser/web server/ - it's the web server that reads your app's stdout and send it (as is or not FWIW) back to the client. As is, in my case. Actually, what use case is there for having

Re: Web development with Python 3.1

2009-10-29 Thread Bruno Desthuilliers
Dotan Cohen a écrit : (snip) Yes, I like to separate HTML from code. However, often I need to output something in the middle of the page. How could I do that with a template? Perhaps learning to use some templating system could help ?-) I'd personnaly suggest either Mako (possibly one of the

Win XP: How to hide command window for sub processes?

2009-10-29 Thread klausfpga
Hi, I have a Python script which wants to start a subprocess and wait for it to finish. However I would like to have NO command window popping up during execution. My main Python script is started with the .pyw suffix, thus I got rid of the main console and I just see my GUI. So far I tried os.

Re: Web development with Python 3.1

2009-10-29 Thread Dotan Cohen
>> As is, in my case. Actually, what use case is there for having Apache >> reprocess the HTML output of the script? > > compression, cache, whatever... > Thanks. I actually did think of compression. >>> It's not that it was unclear, but that it's innaccurate. "outputting to >>> stdout" is an im

Re: Web development with Python 3.1

2009-10-29 Thread Bruno Desthuilliers
Dotan Cohen a écrit : What do you mean by "in the middle of the page"? Do you mean, for instance, the behavior of "middle.php" in the following PHP example: Is that what you are after? Yes, that is what I am after. Django's templating system has an "include" statement, but also something

Re: Feedback wanted on programming introduction (Python in Windows)

2009-10-29 Thread Dotan Cohen
> What would be good is if there was a "balancing book" eg. one specifically > targeting ubuntu, which is gaining popularity as we mail. > Agreed 100%. I opened this thread as I am learning Python, but my platform is Kubuntu. Of the students in my faculty, about one third have already moved to Ubu

Re: Building Python on Solaris 10?

2009-10-29 Thread M.-A. Lemburg
Judy Booth wrote: > Can anyone point me towards some instructions for building Python on > Solaris 10? > We need this for some of our test scripts and so far we cannot get this > to build. > > We have tried both Python 2.6.4 and 3.1.1 and both fail with messages > like this: > Include/pyport.h:

Re: Web development with Python 3.1

2009-10-29 Thread Dotan Cohen
> Perhaps this might better answer your questions: > http://docs.djangoproject.com/en/dev/topics/templates/#id1 > Actually, that example just proves my point! Look at this "templating code": {% for entry in blog_entries %} {{ entry.title }} {{ entry.body }} {% endfor %} Why would I want t

Re: Web development with Python 3.1

2009-10-29 Thread Bruno Desthuilliers
Dotan Cohen a écrit : Ok, here's a Django example without a template: # views.py def index(request): torvalds = request.GET.get("torvalds", "No torvalds here") return HttpResponse("%s" % torvalds) Allright, but what if I need to output in the middle of the page? Say, one row of a tabl

Re: Python 2.6 Global Variables

2009-10-29 Thread Bruno Desthuilliers
Ronn Ross a écrit : (please don't top-post - fixed) On Oct 28, 2009, at 20:50, mattofak wrote: Hi All; I'm new to Python and moving from C, which is probably a big source of my confusion. I'm struggling with something right now though and I hope you all can help. I have a global configuratio

Trying to contact Nathaniel Wilson

2009-10-29 Thread Steven D'Aprano
Hi, Nathaniel, if you are there, you emailed me privately regarding sorting in Python. I have tried to reply, but your mail server has bounced my email due to "policy reasons". Do you have another email address I can send to? -- Steven -- http://mail.python.org/mailman/listinfo/python-list

Re: logging from several independent classes

2009-10-29 Thread Sandy
> All named loggers (including "A", "B" etc.) inherit from the root logger, > obtained by doing > > root_logger = logging.getLogger() > > or > > root_logger = logging.getLogger("") Somehow I missed this in the docs. Thanks Vinay. -- http://mail.python.org/mailman/listinfo/python-list

RE: Python 2.6 Global Variables

2009-10-29 Thread VYAS ASHISH M-NTB837
Dear all How do I write a code that gets executed 'every x' minutes? I know how to do it 'after x' minutes, I do the following: def doAtTimerFire(): """ The things I want to do 'after x' minutes go here. """ And then from main code, I do this: tmr = threading.Timer(timeInSeconds,

Re: Win XP: How to hide command window for sub processes?

2009-10-29 Thread Rüdiger Ranft
klausfpga schrieb: > Hi, > > I have a Python script which wants to start a subprocess and wait for > it to finish. > > However I would like to have NO command window popping up during > execution. You need to specify the hide parameter for windows. import subprocess kwargs = {} if subprocess.ms

Re: Python 2.6 Global Variables

2009-10-29 Thread Chris Rebert
On Thu, Oct 29, 2009 at 3:25 AM, VYAS ASHISH M-NTB837 wrote: > > Dear all > > How do I write a code that gets executed 'every x' minutes? > > > > I know how to do it 'after x' minutes, I do the following: > > def doAtTimerFire(): >        """ The things I want to do 'after x' minutes go here. """

ANN: Jump 0.9.5.1 released!

2009-10-29 Thread Olli Wang
I am proud to announce that Jump 0.9.5.1 is released! You can find the Jump project at http://gitorious.org/jump, and its documentation at http://gitorious.org/jump/pages/Home. Jump is a build tool for distributing Jython applications in a really easy step. Features: * Distributing Jython applica

Re: Win XP: How to hide command window for sub processes?

2009-10-29 Thread Chris Rebert
On Thu, Oct 29, 2009 at 3:25 AM, Rüdiger Ranft <_r...@web.de> wrote: > klausfpga schrieb: >> Hi, >> >> I have a Python script which wants to start a subprocess and wait for >> it to finish. >> >> However I would like to have NO command window popping up during >> execution. > > You need to specify

Another (simple) unicode question

2009-10-29 Thread Rustom Mody
Construct http://construct.wikispaces.com/ is a kick-ass binary file structurer (written by a 21 year old!) I thought of trying to port it to python3 but it barfs on some unicode related stuff (after running 2to3) which I am unable to wrap my head around. Can anyone direct me to what I should read

How to run a repeating timer every n minutes?

2009-10-29 Thread VYAS ASHISH M-NTB837
Dear All How do I write a code that gets executed 'every x' minutes? I know how to do it 'after x' minutes, I do the following: def doAtTimerFire(): """ The things I want to do 'after x' minutes go here. """ And then from main code, I do this: tmr = threading.Timer(timeInSeconds,

Re: How to run a repeating timer every n minutes?

2009-10-29 Thread Wesley Brooks
I use the wx.Timer for this: import wx timer = wx.Timer(self, -1) # update gui every 1/4 second (250ms) timer.Start(250) Bind(wx.EVT_TIMER, OnUpdateValues) In the above I'm running the OnUpdateValues function every 250ms. Regards, Wesley Brooks 2009/10/29 VYAS ASHISH M-NTB837 > > Dear All

Re: How to run a repeating timer every n minutes?

2009-10-29 Thread Martin P. Hellwig
VYAS ASHISH M-NTB837 wrote: You might want to start a thread with a continues loop that primarily sleeps (time.sleep) but wakes up at regular intervals and executes what needs to be. -- MPH http://blog.dcuktec.com 'If consumed, best digested with added seasoning to own preference.' -- http://

Re: Win XP: How to hide command window for sub processes?

2009-10-29 Thread Martin P. Hellwig
Chris Rebert wrote: On Thu, Oct 29, 2009 at 3:25 AM, Rüdiger Ranft <_r...@web.de> wrote: klausfpga schrieb: Hi, I have a Python script which wants to start a subprocess and wait for it to finish. However I would like to have NO command window popping up during execution. You need to specify

Re: Win XP: How to hide command window for sub processes?

2009-10-29 Thread Chris Rebert
On Thu, Oct 29, 2009 at 4:37 AM, Martin P. Hellwig wrote: > Chris Rebert wrote: >> >> On Thu, Oct 29, 2009 at 3:25 AM, Rüdiger Ranft <_r...@web.de> wrote: >>> >>> klausfpga schrieb: Hi, I have a Python script which wants to start a subprocess and wait for it to finish. >>>

Re: How to run a repeating timer every n minutes?

2009-10-29 Thread Frank Millman
Ashish Vyas wrote: > Dear All > > How do I write a code that gets executed 'every x' minutes? > [...] > Regards, > Ashish Vyas Here is one way - import threading class Timer(threading.Thread): def __init__(self): threading.Thread.__init__(self) self.event = threading.Event

Re: cool-compiling python 3

2009-10-29 Thread Lie Ryan
Rustom Mody wrote: I guess this is a bit OT but anyhow. I just finished compiling compiling python 3 on ubuntu and discovered that my laptop has a builtin toaster :-; Yeah I know this is not a python issue and probably modern laptops are meant to run wondrous beautiful elephantaneous th

Re: Win XP: How to hide command window for sub processes?

2009-10-29 Thread Martin P. Hellwig
Chris Rebert wrote: Except for here: http://msdn.microsoft.com/en-us/library/ms682425%28VS.85%29.aspx I was referring to the following bits of the subprocess module used in the above code: Me too actually :-) subprocess.mswindows subprocess.STARTUPINFO() subprocess.STARTF_USESHOWWINDOW sub

Re: Win XP: How to hide command window for sub processes?

2009-10-29 Thread Chris Rebert
On Thu, Oct 29, 2009 at 4:57 AM, Martin P. Hellwig wrote: > Chris Rebert wrote: > >>> >>> Except for here: >>> http://msdn.microsoft.com/en-us/library/ms682425%28VS.85%29.aspx >> >> I was referring to the following bits of the subprocess module used in >> the above code: > > Me too actually :-) >

RE: How to run a repeating timer every n minutes?

2009-10-29 Thread VYAS ASHISH M-NTB837
Thanks a lot, this helps. -Original Message- From: python-list-bounces+ntb837=motorola@python.org [mailto:python-list-bounces+ntb837=motorola@python.org] On Behalf Of Frank Millman Sent: Thursday, October 29, 2009 5:19 PM To: python-list@python.org Subject: Re: How to run a repea

Re: Another (simple) unicode question

2009-10-29 Thread John Machin
On Oct 29, 10:02 pm, Rustom Mody wrote: > Constructhttp://construct.wikispaces.com/is a kick-ass binary file > structurer (written by a 21 year old!) > I thought of trying to port it to python3 but it barfs on some unicode > related stuff (after running 2to3) which I am unable to wrap my head > ar

Re: Web development with Python 3.1

2009-10-29 Thread Bruno Desthuilliers
Dotan Cohen a écrit : 2009/10/29 Albert Hopkins : On Wed, 2009-10-28 at 16:38 +0200, Dotan Cohen wrote: return HttpResponse(unmaintanable_html % data) That's fine for single variables, but if I need to output a table of unknown rows? I assume that return means the end of the script. Therefor

RE: Copying a ZipExtFile

2009-10-29 Thread Moore, Mathew L
> On October 28, 2009 8:33 PM, "ryles" wrote: > > > with io.BytesIO() as memio: > > shutil.copyfileobj(f, memio) > > zip = zipfile.ZipFile(file=memio) > > # Can't use zip.extract(), because I want to ignore paths > > # within archive. > > src = zip.open(

Re: Newbie advice

2009-10-29 Thread CSharpner
On Oct 29, 3:00 am, alex23 wrote: > CSharpner wrote: > > Here's what I /want/ to do, but don't know where to begin: > > Welcome to the fun :) > > > - Write web services in Python (I've done plenty of this in .NET, > > BTW). > > I'm a big fan of CherryPy:http://www.cherrypy.org/ > > It's very stra

Re: Newbie advice

2009-10-29 Thread CSharpner
On Oct 29, 4:25 am, "Diez B. Roggisch" wrote: > CSharpner schrieb: > > > Alright, I'm not new to programming, but I'm diving in head first into > > Python for the first time.  I'm running on Windows 7, just installed > > "Eclipse Java EE IDE for Web Developers" and installed PyDev in it and > > in

Re: Web development with Python 3.1

2009-10-29 Thread Bruno Desthuilliers
Dotan Cohen a écrit : Perhaps this might better answer your questions: http://docs.djangoproject.com/en/dev/topics/templates/#id1 Actually, that example just proves my point! Which one ? Look at this "templating code": {% for entry in blog_entries %} {{ entry.title }} {{ entry.body

Re: Another (simple) unicode question

2009-10-29 Thread Carl Banks
On Oct 29, 4:02 am, Rustom Mody wrote: > Constructhttp://construct.wikispaces.com/is a kick-ass binary file > structurer (written by a 21 year old!) > I thought of trying to port it to python3 but it barfs on some unicode > related stuff (after running 2to3) which I am unable to wrap my head > aro

Re: Another (simple) unicode question

2009-10-29 Thread Scott David Daniels
John Machin wrote: On Oct 29, 10:02 pm, Rustom Mody wrote:... I thought of trying to port it to python3 but it barfs on some unicode related stuff (after running 2to3) which I am unable to wrap my head around. Can anyone direct me to what I should read to try to understand this? to which Jon

list comprehension problem

2009-10-29 Thread mk
Hello everyone, print hosts hosts = [ s.strip() for s in hosts if s is not '' and s is not None and s is not '\n' ] print hosts ['9.156.44.227\n', '9.156.46.34 \n', '\n'] ['9.156.44.227', '9.156.46.34', ''] Why does the hosts list after list comprehension still contain '' in last position?

ImportError: No module named _md5 - please help

2009-10-29 Thread user7304
Hi, I am trying to run a python script and got this error. >>import _md5 >>ImportError: No module named _md5 Googling the problem suggested that I install the 'py25-hashlib'. the following does not work for me 'sudo port install py25-hashlib' , trying to install MacPorts raised many problems.

annotate a traceback

2009-10-29 Thread Robin Becker
I want to annotate a traceback in routine A which is raised in B. Useful information in A is not available in B I propose to use something like def A(info): try: B() except: t,v,b=sys.exc_info() v.args = (' '.join(map(str,v.args))+', info=%r' % info,) rai

ImportError: No module named _md5 - Please help

2009-10-29 Thread wadi wadi
Hi, I am trying to run a python script and got this error. >>import _md5 >>ImportError: No module named _md5 Googling the problem suggested that I install the 'py25-hashlib'. the following does not work for me 'sudo port install py25-hashlib' , trying to install MacPorts raised many problems.

Re: list comprehension problem

2009-10-29 Thread Gary Herron
mk wrote: Hello everyone, print hosts hosts = [ s.strip() for s in hosts if s is not '' and s is not None and s is not '\n' ] print hosts ['9.156.44.227\n', '9.156.46.34 \n', '\n'] ['9.156.44.227', '9.156.46.34', ''] Why does the hosts list after list comprehension still contain '' in last

Re: ImportError: No module named _md5 - Please help

2009-10-29 Thread Diez B. Roggisch
Hi, please don't post this to comp.lang.python *and* the python mailinglist. Both are synchronized, so your post shows up twice on both. > I am trying to run a python script and got this error. > >>>import _md5 >>>ImportError: No module named _md5 I've never seen this import. Normally, it shoul

Re: annotate a traceback

2009-10-29 Thread Diez B. Roggisch
Robin Becker wrote: > I want to annotate a traceback in routine A which is raised in B. Useful > information in A is not available in B > > I propose to use something like > > def A(info): > try: > B() > except: > t,v,b=sys.exc_info() > v.args = (' '.join(map

Re: list comprehension problem

2009-10-29 Thread Diez B. Roggisch
mk wrote: > Hello everyone, > > print hosts > hosts = [ s.strip() for s in hosts if s is not '' and s is not None and > s is not '\n' ] > print hosts > > ['9.156.44.227\n', '9.156.46.34 \n', '\n'] > ['9.156.44.227', '9.156.46.34', ''] > > Why does the hosts list after list comprehension still c

Re: Web development with Python 3.1

2009-10-29 Thread Ethan Furman
Bruno Desthuilliers wrote: Dotan Cohen a écrit : I don't want to learn some "templating language" that duplicates what Python already has built in! Then use Mako - it uses plain Python to manage the presentation logic. And if you go for Mako, then you might as well switch to Pylons. Great f

Re: ImportError: No module named _md5 - Please help

2009-10-29 Thread wadi wadi
I can't alter the import statement as the error log is pointing to one of the installed python files 'hashlib.py' /python/2.6.2/lib/python2.6/hashlib.py and I don't have the right permissions to alter the python installation. Any idea? On 10/29/09, Diez B. Roggisch wrote: > Hi, > > please don't

Recommended number of threads? (in CPython)

2009-10-29 Thread mk
Hello everyone, I wrote run-of-the-mill program for concurrent execution of ssh command over a large number of hosts. (someone may ask why reinvent the wheel when there's pssh and shmux around -- I'm not happy with working details and lack of some options in either program) The program has a

Re: ImportError: No module named _md5 - please help

2009-10-29 Thread Falcolas
On Oct 29, 9:13 am, user7304 wrote: > Hi, > > I am trying to run a python script and got this error. > > >>import _md5 > >>ImportError: No module named _md5 > > Googling the problem suggested that I install the 'py25-hashlib'. > > the following does not work for me 'sudo port install py25-hashlib'

Re: How to run a repeating timer every n minutes?

2009-10-29 Thread mk
Frank Millman wrote: class Timer(threading.Thread): def __init__(self): threading.Thread.__init__(self) self.event = threading.Event() def run(self): while not self.event.is_set(): """ The things I want to do go here. """ self.event.wait

Re: Feedback wanted on programming introduction (Python in Windows)

2009-10-29 Thread osmium
"Richard Heathfield" wrote: > A man who cannot express what he needs to express /without/ resorting > to .pdf format is computer-illiterate. What format do you suggest? I have some ideas on what I would have used, but you seem to love these veiled references that there is a better way, if the

Re: Recommended number of threads? (in CPython)

2009-10-29 Thread Falcolas
On Oct 29, 9:56 am, mk wrote: > Hello everyone, > > I wrote run-of-the-mill program for concurrent execution of ssh command > over a large number of hosts. (someone may ask why reinvent the wheel > when there's pssh and shmux around -- I'm not happy with working details > and lack of some options

Re: list comprehension problem

2009-10-29 Thread MRAB
Diez B. Roggisch wrote: mk wrote: Hello everyone, print hosts hosts = [ s.strip() for s in hosts if s is not '' and s is not None and s is not '\n' ] print hosts ['9.156.44.227\n', '9.156.46.34 \n', '\n'] ['9.156.44.227', '9.156.46.34', ''] Why does the hosts list after list comprehension st

Re: list comprehension problem

2009-10-29 Thread Falcolas
On Oct 29, 9:31 am, "Diez B. Roggisch" wrote: > mk wrote: > > Hello everyone, > > > print hosts > > hosts = [ s.strip() for s in hosts if s is not '' and s is not None and > > s is not '\n' ] > > print hosts > > > ['9.156.44.227\n', '9.156.46.34 \n', '\n'] > > ['9.156.44.227', '9.156.46.34', ''] >

PyQT4 user group

2009-10-29 Thread Chris
Hi! I'm starting to learn and use PyQT4 at work. Is there a good user group or forum out there that I should know about? Thanks! -- http://mail.python.org/mailman/listinfo/python-list

Re: Bug(s) in Python 3.1.1 Windows installation

2009-10-29 Thread Ethan Furman
Mark Hammond wrote: On 29/10/2009 11:06 AM, Alf P. Steinbach wrote: So I suggest switching to some other more light-weight installer technology. Thanks for the suggestion, but I expect we will stick with MSI even with its shortcomings. Using MSI files has significant other advantages, par

Re: ImportError: No module named _md5 - Please help

2009-10-29 Thread Diez B. Roggisch
wadi wadi wrote: > I can't alter the import statement as the error log is pointing to one > of the installed python files 'hashlib.py' > > /python/2.6.2/lib/python2.6/hashlib.py > > and I don't have the right permissions to alter the python installation. > Any idea? Which is something different

Re: ftpilb.FTP.stor...() freeze mystery

2009-10-29 Thread Anthra Norell
Gabriel Genellina wrote: En Wed, 28 Oct 2009 08:05:22 -0300, Anthra Norell escribió: Gabriel Genellina wrote: En Tue, 27 Oct 2009 07:53:36 -0300, Anthra Norell escribió: I am trying to upload a bunch of web pages to a hosting service.[...] I wrote a loop that iterates through the file name

Re: How to run a repeating timer every n minutes?

2009-10-29 Thread Diez B. Roggisch
mk wrote: > Frank Millman wrote: > >> class Timer(threading.Thread): >> def __init__(self): >> threading.Thread.__init__(self) >> self.event = threading.Event() >> >> def run(self): >> while not self.event.is_set(): >> """ The things I want to do go h

Re: PyQT4 user group

2009-10-29 Thread Diez B. Roggisch
Chris wrote: > Hi! > > I'm starting to learn and use PyQT4 at work. Is there a good user > group or forum out there that I should know about? The PyQt Mailinglist. Diez -- http://mail.python.org/mailman/listinfo/python-list

Re: list comprehension problem

2009-10-29 Thread Bruno Desthuilliers
Falcolas a écrit : (snip) > I'd also recommend trying the following filter, since it is identical to what you're trying to do, and will probably catch some additional edge cases without any additional effort from you. [s.strip() for s in hosts if s.strip()] The problem with this expression is

Re: list comprehension problem

2009-10-29 Thread Bruno Desthuilliers
mk a écrit : Hello everyone, print hosts ['9.156.44.227\n', '9.156.46.34 \n', '\n'] Just for the record, where did you get this "hosts" list from ? (hint : depending on the answer, there might be a way to avoid having to filter out the list) -- http://mail.python.org/mailman/listinfo/py

Re: PSP problem showing images

2009-10-29 Thread Alfons Nonell-Canals
Anybody of you have any idea? Alfons Nonell-Canals wrote: > Hi Lawrence, > Yes, I've tried it! I've saw the code, copyed the src path ans pasted > into the browser and it works. I think it not works only unther a psp > hostname/directory, for this reason I thought the problem is in the > apache2 (

Re: Web development with Python 3.1

2009-10-29 Thread Diez B. Roggisch
Dotan Cohen wrote: >> Perhaps this might better answer your questions: >> http://docs.djangoproject.com/en/dev/topics/templates/#id1 >> > > Actually, that example just proves my point! Look at this "templating > code": > {% for entry in blog_entries %} > {{ entry.title }} > {{ entry.body

Re: PyQT4 user group

2009-10-29 Thread denis
For detailed questions, try http://stackoverflow.com/questions/tagged/pyqt or pyqt4 (the " or " may have to be escaped as "%20or%20" in some browsers.) -- http://mail.python.org/mailman/listinfo/python-list

Re: ImportError: No module named _md5 - Please help

2009-10-29 Thread Sean DiZazzo
On Oct 29, 8:49 am, wadi wadi wrote: > I can't alter the import statement as the error log is pointing to one > of the installed python files 'hashlib.py' > > /python/2.6.2/lib/python2.6/hashlib.py > > and I don't have the right permissions to alter the python installation. > Any idea? > > On 10/2

Re: ImportError: No module named _md5 - please help

2009-10-29 Thread wadi wadi
Hi Garrick, My python script depends on another framework that is implemented in python. The error is originating from the framework code note my script and I cannot change the framework. Also, it works on other machines. So my guess is that I have no choice I need to install the 'py25-hashlib' o

Are *.pyd's universal?

2009-10-29 Thread Bakes
Can I use a pyd compiled on linux in a Windows distribution? Or must I recompile it for windows users? -- http://mail.python.org/mailman/listinfo/python-list

Re: Web development with Python 3.1

2009-10-29 Thread Bruno Desthuilliers
Diez B. Roggisch a écrit : The point is that using templates allows you to express your rendering-logic in terms of the desired output language (HTML in this case). Well, for Django, Mako, Cheetah and quite a few others, this might not be _that_ true - you can use any of the templating system

Re: Feedback wanted on programming introduction (Python in Windows)

2009-10-29 Thread Alf P. Steinbach
* Martin P. Hellwig: Alf P. Steinbach wrote: * tm: On 28 Okt., 07:52, "Alf P. Steinbach" wrote: [Cross-posted comp.programming and comp.lang.python] Looking at your topic '(Python in Windows)', without taking a glimpse at your actual introduction, I have the following to say: I think it is

Re: ImportError: No module named _md5 - Please help

2009-10-29 Thread wadi wadi
Sorry for the confusion. In summary I have the same issue shown here with its solution. It seems to be a common problem. http://recurser.com/articles/2009/06/06/python-25-importerror-no-module-named-_md5-on-os-x/ However, their solution does not work with me as I am using a linux machine and they

Re: Newbie advice

2009-10-29 Thread Bryan
On Oct 28, 9:53 pm, CSharpner wrote: > Alright, I'm not new to programming, but I'm diving in head first into > Python for the first time.  I'm running on Windows 7, just installed > "Eclipse Java EE IDE for Web Developers" and installed PyDev in it and > installed Python 2.6.  I've written my fir

Re: ImportError: No module named _md5 - Please help

2009-10-29 Thread Robert Kern
On 2009-10-29 11:28 AM, Sean DiZazzo wrote: On Oct 29, 8:49 am, wadi wadi wrote: I can't alter the import statement as the error log is pointing to one of the installed python files 'hashlib.py' /python/2.6.2/lib/python2.6/hashlib.py and I don't have the right permissions to alter the python

Re: ImportError: No module named _md5 - please help

2009-10-29 Thread Robert Kern
On 2009-10-29 11:39 AM, wadi wadi wrote: Hi Garrick, My python script depends on another framework that is implemented in python. The error is originating from the framework code note my script and I cannot change the framework. Also, it works on other machines. So my guess is that I have no ch

Re: Feedback wanted on programming introduction (Python in Windows)

2009-10-29 Thread Alf P. Steinbach
* James Harris: On 28 Oct, 08:58, "Alf P. Steinbach" wrote: * tm: On 28 Okt., 07:52, "Alf P. Steinbach" wrote: [Cross-posted comp.programming and comp.lang.python] Looking at your topic '(Python in Windows)', without taking a glimpse at your actual introduction, I have the following to say

Re: Are *.pyd's universal?

2009-10-29 Thread Diez B. Roggisch
Bakes wrote: > Can I use a pyd compiled on linux in a Windows distribution? > > Or must I recompile it for windows users? Yes, you must. Diez -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 2.6 Global Variables

2009-10-29 Thread AK Eric
> 2/ in Python, "global" really means "module-level" - there's nothing > like a "true" global namespace. Isn't that __main__? import __main__ __main__.foo = "asdfasdf" print foo # asdfasdf Not advocating, but it does serve the purpose. -- http://mail.python.org/mailman/listinfo/python-list

Re: Are *.pyd's universal?

2009-10-29 Thread Jerry Hill
On Thu, Oct 29, 2009 at 12:44 PM, Bakes wrote: > Can I use a pyd compiled on linux in a Windows distribution? No. > Or must I recompile it for windows users? Yes. -- http://mail.python.org/mailman/listinfo/python-list

Re: ImportError: No module named _md5 - Please help

2009-10-29 Thread Diez B. Roggisch
wadi wadi wrote: > Sorry for the confusion. > In summary I have the same issue shown here with its solution. It > seems to be a common problem. > > http://recurser.com/articles/2009/06/06/python-25-importerror-no-module-named-_md5-on-os-x/ > > However, their solution does not work with me as I a

Re: Feedback wanted on programming introduction (Python in Windows)

2009-10-29 Thread Martin P. Hellwig
Alf P. Steinbach wrote: In an environment with other folks that the student can seek help from it works well, but in a book it's rather off-putting: "hey, it's page 90!, when are we getting to do real programming?". Well, in the college where I used to train my pupils I had written a number

Re: Feedback wanted on programming introduction (Python in Windows)

2009-10-29 Thread Ethan Furman
Alf P. Steinbach wrote: * James Harris: You get way too deep into Python in places (for a beginner's course in programming). For example, "from now on I’ll always use from __future__ in any program that uses print." Sorry, but I think that hiding such concerns is a real disservice. The diss

Re: Feedback wanted on programming introduction (Python in Windows)

2009-10-29 Thread Richard Heathfield
In <7ktsj6f3bciq...@mid.individual.net>, osmium wrote: > "Richard Heathfield" wrote: > >> A man who cannot express what he needs to express /without/ >> resorting to .pdf format is computer-illiterate. > > What format do you suggest? Firstly, I want to make clear that I'm not objecting to the O

Re: Are *.pyd's universal?

2009-10-29 Thread Christian Heimes
Bakes wrote: > Can I use a pyd compiled on linux in a Windows distribution? > > Or must I recompile it for windows users? On Linux and several other Unices the suffix is .so and not .pyd. The compiled extensions depend on the Python version, operating system as well as platform and architecture.

Re: Bug(s) in Python 3.1.1 Windows installation

2009-10-29 Thread Ethan Furman
Alf P. Steinbach wrote: * Ethan Furman: Mark Hammond wrote: On 29/10/2009 11:06 AM, Alf P. Steinbach wrote: So I suggest switching to some other more light-weight installer technology. Thanks for the suggestion, but I expect we will stick with MSI even with its shortcomings. Using MSI

Checking if a function invocation will throw a TypeError?

2009-10-29 Thread Andrey Fedorov
Is there a standard function that will check whether certain *args, and **kwargs satisfy a argspec of a function (s.t. it does not throw a TypeError). Say: def foo(a,b=1): pass check(foo, 1,2) # True check(foo, 1) # True check(foo) # False check(foo, 1, a=2) # False Cheers, Andrey -- http:/

disutils, project structure & developing - n00b question

2009-10-29 Thread Wells
So I have my project partitioned like so: ./setup.py ./pymlb/ ./pymlb/fetcher.py ./demos ./demos/demo.py In demo.py I have: from pymlb import fetcher However, it fails b/c pymlb is up a folder. It's also NOT installed as a module in my module directory because it's a development effort and I do

Re: Feedback wanted on programming introduction (Python in Windows)

2009-10-29 Thread osmium
"Richard Heathfield" wrote: >> if the OP had just been smarter. > > Er, no, I didn't have that in mind at all. In some cultures, implying that someone is illiterate suggests "not smart". There is a formal disconnect there but possibly you can see how someone might infer that. At least I found

Python2.6 + win32com crashes with unicode bug

2009-10-29 Thread GerritM
I have automated image generation with Python, win32com and Visio5.0. This works well upto Python2.5 but fails with Python 2.6. Short term solution is to return to 2.5 :-(. I have reproduced the bug below with a minimum of Python lines. Below the problem the working example from 2.5 kind rega

Re: disutils, project structure & developing - n00b question

2009-10-29 Thread Simon Forman
On Thu, Oct 29, 2009 at 2:42 PM, Wells wrote: > So I have my project partitioned like so: > > ./setup.py > ./pymlb/ > ./pymlb/fetcher.py > ./demos > ./demos/demo.py > > In demo.py I have: > > from pymlb import fetcher > > However, it fails b/c pymlb is up a folder. It's also NOT installed as > a m

Re: disutils, project structure & developing - n00b question

2009-10-29 Thread Simon Forman
On Thu, Oct 29, 2009 at 3:45 PM, Simon Forman wrote: > In order for "from pymlb import fetcher" no work you must make the s/no/to/ D'oh! -- http://mail.python.org/mailman/listinfo/python-list

Re: Feedback wanted on programming introduction (Python in Windows)

2009-10-29 Thread Alf P. Steinbach
* Ethan Furman: Alf P. Steinbach wrote: * James Harris: You get way too deep into Python in places (for a beginner's course in programming). For example, "from now on I’ll always use from __future__ in any program that uses print." Sorry, but I think that hiding such concerns is a real disse

Re: Feedback wanted on programming introduction (Python in Windows)

2009-10-29 Thread Alf P. Steinbach
* Richard Heathfield: The best way is the simplest technology that will do the job properly. If that truly is PDF, okay, use PDF. But it is hard for me to envisage circumstances where Web content is best presented in that way. Google docs sharing. It made a mess of my *Word* documents. Ch

  1   2   >