Feedback wanted on programming introduction (Python in Windows)

2009-10-28 Thread Alf P. Steinbach
[Cross-posted comp.programming and comp.lang.python] Hi. I may finally have found the perfect language for a practically oriented introductory book on programming, namely Python. C++ was way too complex for the novice, JScript and C# suffered from too fast-changing specifications and runtime

Re: Web development with Python 3.1

2009-10-28 Thread John Nagle
Alan Harris-Reid wrote: I am very much new to Python, and one of my first projects is a simple data-based website. I am starting with Python 3.1 Until MySQLdb gets ported to something later than Python 2.5, support for a "data-based web site" probably has to be in Python 2.5 or earlier.

calling server side function

2009-10-28 Thread Paul Hartley
I have a socket set up between a client and server program. Let's say that I serialize (pickle) some data in the client and send it to the server with the intention of calling a function in the server to process the data. How would one execute the function? This is not for a web-based appli

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

2009-10-28 Thread Chris Rebert
On Tue, Oct 27, 2009 at 11:52 PM, Alf P. Steinbach wrote: > [Cross-posted comp.programming and comp.lang.python] > > Hi. > > I may finally have found the perfect language for a practically oriented > introductory book on programming, namely Python. > > C++ was way too complex for the novice, JScri

LinkedIn Messages, 10/28/2009

2009-10-28 Thread LinkedIn Communication
LinkedIn REMINDERS: Invitation Reminders: * View Invitation from Frank Pan http://www.linkedin.com/e/I2LlXdLlWUhFABKmxVOlgGLlWUhFAfhMPPF/blk/I379833192_3/0PnP8VcjcPe3ATcQALqnpPbOYWrSlI/svi/ PENDING MESSAGES: There are a total of 4 messages awaiting your res

How would you design scalable solution?

2009-10-28 Thread Bryan
I'm designing a system and wanted to get some feedback on a potential performance problem down the road while it is still cheap to fix. The system is similar to an accounting system where a system tracks "Things" which move between different "Buckets". The system answers these questions: - How ma

ANN: Resolver One 1.7 released

2009-10-28 Thread Giles Thomas
We are proud to announce the release of Resolver One, version 1.7. Resolver One is a Windows-based spreadsheet that integrates Python deeply into its recalculation loop, making the models you build more reliable and more maintainable. For version 1.7, we've made the code that you add to buttons o

transpose array

2009-10-28 Thread yoshco
hello everyone i have 3 arrays xVec=[a1,a2,a3,a4,a5] yVec=[b1.b2.b3.b4.b5] zVec=[c1,c2,c3,c4,c5] and i want to output them to a ascii file like so a1,b1,c1 a2,b2,c2 a3,b3,c3 ... now i'm using print >>f, str(xVec).replace('[',' ').replace(']', ' ') print >>f, str(yVec).replace('[',' ').rep

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

2009-10-28 Thread Steven D'Aprano
On Wed, 28 Oct 2009 07:52:17 +0100, Alf P. Steinbach wrote: > Unfortunately Google docs doesn't display the nice table of contents in > each document, but here's the public view of ch 1 (complete) and ch 2 > (about one third completed, I've not yet settled on a title so it's just > chapter "asd"):

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

2009-10-28 Thread Alf P. Steinbach
* Chris Rebert: On Tue, Oct 27, 2009 at 11:52 PM, Alf P. Steinbach wrote: [Cross-posted comp.programming and comp.lang.python] Hi. I may finally have found the perfect language for a practically oriented introductory book on programming, namely Python. C++ was way too complex for the novice,

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

2009-10-28 Thread Jon Clements
On 28 Oct, 07:31, Steven D'Aprano wrote: > On Wed, 28 Oct 2009 07:52:17 +0100, Alf P. Steinbach wrote: > > Unfortunately Google docs doesn't display the nice table of contents in > > each document, but here's the public view of ch 1 (complete) and ch 2 > > (about one third completed, I've not yet

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

2009-10-28 Thread Olof Bjarnason
2009/10/28 Alf P. Steinbach > * Chris Rebert: > >> On Tue, Oct 27, 2009 at 11:52 PM, Alf P. Steinbach >> wrote: >> >>> [Cross-posted comp.programming and comp.lang.python] >>> >>> Hi. >>> >>> I may finally have found the perfect language for a practically oriented >>> introductory book on progra

Re: anydbm, gdbm, dbm

2009-10-28 Thread Lacrima
On Oct 27, 4:36 pm, Tim Chase wrote: > Lacrima wrote: > > I want to store some data, using anydbm module. > > According to docs the object returned by anydbm.open() supports most > > of the same functionality as dictionaries; keys and their > > corresponding values can be stored, retrieved, and de

Re: calling server side function

2009-10-28 Thread Gabriel Genellina
En Wed, 28 Oct 2009 04:04:50 -0300, Paul Hartley escribió: I have a socket set up between a client and server program. Let's say that I serialize (pickle) some data in the client and send it to the server with the intention of calling a function in the server to process the data. How w

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

2009-10-28 Thread Jon Clements
On 28 Oct, 07:44, Jon Clements wrote: > On 28 Oct, 07:31, Steven D'Aprano > > > > wrote: > > On Wed, 28 Oct 2009 07:52:17 +0100, Alf P. Steinbach wrote: > > > Unfortunately Google docs doesn't display the nice table of contents in > > > each document, but here's the public view of ch 1 (complete)

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

2009-10-28 Thread Richard Heathfield
In , Alf P. Steinbach wrote: > I may finally have found the perfect language for a practically > oriented introductory book on programming, namely Python. > I don't know whether this will ever become an actual book. I hope > so! > So I would would be very happy for feedback. "Sorry, bu

Re: a simple unicode question

2009-10-28 Thread Gabriel Genellina
En Wed, 28 Oct 2009 02:28:01 -0300, Chris Jones escribió: On Tue, Oct 27, 2009 at 06:21:11AM EDT, Lie Ryan wrote: Chris Jones wrote: Best part of Unicode is that there are multiple encodings, right? ;-) No, the best part about Unicode is there is no encoding! Unicode does not define any enco

Re: ConfigParser.items sorting

2009-10-28 Thread Steven D'Aprano
On Tue, 27 Oct 2009 23:21:00 -0700, Dean McClure wrote: > Hi, > > Just wondering how I can get the items() command from ConfigParser to > not resort all the item pairs that it presents. > > I am trying to get it to read some data in order: > > [Relay Info] > relay_name: IPC > relay_current_rang

Re: Web development with Python 3.1

2009-10-28 Thread Dotan Cohen
> A webframework is *written* in python. Your whole line of argumentation > boils down to "I can write things myself in python, why use > libraries/frameworks". Yes. You can also delete your standard-lib, and code > everything in there yourself - with the same argument. > > Using a framework is abo

Re: Web development with Python 3.1

2009-10-28 Thread Paul Rubin
John Nagle writes: > Until MySQLdb gets ported to something later than Python 2.5, support > for a "data-based web site" probably has to be in Python 2.5 or earlier. Even 2.6 is too bleeding-edge? Uh oh, Fedora 12 is shipping it. -- http://mail.python.org/mailman/listinfo/python-list

Re: Strange behavior related to value / reference

2009-10-28 Thread Lambda
On Oct 28, 10:40 am, Chris Rebert wrote: > On Tue, Oct 27, 2009 at 7:15 PM, Lambda wrote: > > I defined a function to raise a 2x2 matrix to nth power: > > > def matrix_power(m, n): > >  result = m[:] > > Note that this only copies the *outer* list. It does NOT copy any of > the inner, nested list

Re: Web development with Python 3.1

2009-10-28 Thread Dotan Cohen
> While I know that to be true in the general sense, from what I've > looked at Django and other frameworks it seems that the web frameworks > push the coder to use templates, not letting him near the HTML. > > For instance, I was looking for a class / framework that provided a > proven method of d

Reference values for exec

2009-10-28 Thread Garito
Hi! I'm trying to use exec in a recursive way but I have a problem When I read the manual I understand that the globals and the locals are passed by reference but if I try to use it in a recursive way the new values added in a step are not passed to the next one Could someone point me how to do t

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

2009-10-28 Thread 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 not a good idea to teach programming with a focus on a

Re: Strange behavior related to value / reference

2009-10-28 Thread Mark Dickinson
On Oct 28, 8:24 am, Lambda wrote: > Thank you! > Following is my final code: Looks good, but are you sure about that word 'final'? ;-) > > def matrix_power(m, n): >   """ >   Raise 2x2 matrix m to nth power. >   """ >   if n == 0: return [[1, 0], [0, 1]] > >   x = matrix_power(m, n / 2) I sugg

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

2009-10-28 Thread Alf P. Steinbach
* 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 not a good idea to teach programming with a foc

Re: Web development with Python 3.1

2009-10-28 Thread Dotan Cohen
> Even 2.6 is too bleeding-edge?  Uh oh, Fedora 12 is shipping it. > Fedora has traditionally been known as a bleeding edge distro. -- Dotan Cohen http://what-is-what.com http://gibberish.co.il -- http://mail.python.org/mailman/listinfo/python-list

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

2009-10-28 Thread Olof Bjarnason
2009/10/28 Alf P. Steinbach > * 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 thin

Re: Web development with Python 3.1

2009-10-28 Thread Diez B. Roggisch
Dotan Cohen schrieb: While I know that to be true in the general sense, from what I've looked at Django and other frameworks it seems that the web frameworks push the coder to use templates, not letting him near the HTML. For instance, I was looking for a class / framework that provided a proven

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

2009-10-28 Thread eb303
On Oct 28, 7:52 am, "Alf P. Steinbach" wrote: [snip] > But since I don't know much Python -- I'm *learning* Python as I write -- I > know > that there's a significant chance of communicating misconceptions, > non-idiomatic > ways to do things, bad conventions, etc., in addition to of course plai

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

2009-10-28 Thread Jon Clements
On 28 Oct, 08:58, "Alf P. Steinbach" wrote: [snip] > Without reference to an OS you can't address any of the issues that a beginner > has to grapple with, including most importantly tool usage, without which it's > not even possible to get started, but also, very importantly, a file system. > > Le

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

2009-10-28 Thread 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 not a good idea to tea

Re: Web development with Python 3.1

2009-10-28 Thread Diez B. Roggisch
John Nagle schrieb: Alan Harris-Reid wrote: I am very much new to Python, and one of my first projects is a simple data-based website. I am starting with Python 3.1 Until MySQLdb gets ported to something later than Python 2.5, support for a "data-based web site" probably has to be in Pytho

Re: Web development with Python 3.1

2009-10-28 Thread Bruno Desthuilliers
Dotan Cohen a écrit : declarative mapping of urls to code Apache does this, unless I am misunderstanding you. Using url rewriting ? Yes, fine. Then tell me how you implement "reverse" url generation (like Django or Routes do). of code to templates Those who code in HTML don't need thi

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

2009-10-28 Thread Olof Bjarnason
2009/10/28 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,

Re: Web development with Python 3.1

2009-10-28 Thread Bruno Desthuilliers
Dotan Cohen a écrit : Well, yes- but it's also DRY, and while DRTW (like the acronym, btw) helps to prevent your code from being unreadable to someone else, DRY helps to ensure that when you have to change something you don't have to worry about changing it in 37 and a half other places at the sa

[PyWin32] "Hello, world"?

2009-10-28 Thread Gilles Ganault
Hello I'm reading O'Reily's "Python Programming on Win32", but couldn't find a simple example on how to create a window with just a label and pushbutton. If someone has such a basic example handy, I'm interested. Thank you. -- http://mail.python.org/mailman/listinfo/python-list

Re: transpose array

2009-10-28 Thread yoshco
On Oct 28, 4:48 am, alex23 wrote: > On Oct 28, 8:26 am, yoshco wrote: > > > hello everyone > > i have 3 arrays > > xVec=[a1,a2,a3,a4,a5] > > yVec=[b1.b2.b3.b4.b5] > > zVec=[c1,c2,c3,c4,c5] > > > and i want to output them to a ascii file like so > > > a1,b1,c1 > > a2,b2,c2 > > a3,b3,c3 > > ... > >

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

2009-10-28 Thread Alf P. Steinbach
* eb303: On Oct 28, 7:52 am, "Alf P. Steinbach" wrote: [snip] But since I don't know much Python -- I'm *learning* Python as I write -- I know that there's a significant chance of communicating misconceptions, non-idiomatic ways to do things, bad conventions, etc., in addition to of course plai

Re: Web development with Python 3.1

2009-10-28 Thread Bruno Desthuilliers
Dotan Cohen a écrit : A webframework is *written* in python. Your whole line of argumentation boils down to "I can write things myself in python, why use libraries/frameworks". Yes. You can also delete your standard-lib, and code everything in there yourself - with the same argument. Using a fra

Re: Web development with Python 3.1

2009-10-28 Thread Bruno Desthuilliers
John Nagle a écrit : Alan Harris-Reid wrote: I am very much new to Python, and one of my first projects is a simple data-based website. I am starting with Python 3.1 Until MySQLdb gets ported to something later than Python 2.5, support for a "data-based web site" probably has to be in Pyth

Re: Web development with Python 3.1

2009-10-28 Thread Mikhail M.Smagin
Hello, Dotan On Wed, 28 Oct 2009 10:26:22 +0200 Dotan Cohen wrote: > I should probably expand on this: > > How can I get an array with all the GET variables in Python? > How can I get an array with all the POST variables in Python? > How can I get an array with all the COOKIE variables in Python

Re: Web development with Python 3.1

2009-10-28 Thread Dotan Cohen
>> I should probably expand on this: >> >> How can I get an array with all the GET variables in Python? >> How can I get an array with all the POST variables in Python? >> How can I get an array with all the COOKIE variables in Python? >> How can I get the request URI path (everything after >> http

Re: [PyWin32] "Hello, world"?

2009-10-28 Thread Tim Golden
Gilles Ganault wrote: Hello I'm reading O'Reily's "Python Programming on Win32", but couldn't find a simple example on how to create a window with just a label and pushbutton. Well, you might mean this: import win32api win32api.MessageBox (None, "Hello, World!", "Greetings") but that obv

Re: Web development with Python 3.1

2009-10-28 Thread Dotan Cohen
2009/10/28 Bruno Desthuilliers : > Dotan Cohen a écrit : >>> >>> declarative mapping of urls to code >> >> Apache does this, unless I am misunderstanding you. > > Using url rewriting ? Yes, fine. Then tell me how you implement "reverse" > url generation (like Django or Routes do). I have no idea w

Re: Web development with Python 3.1

2009-10-28 Thread Dotan Cohen
>> While I know that to be true in the general sense, from what I've >> looked at Django and other frameworks it seems that the web frameworks >> push the coder to use templates, not letting him near the HTML. > > Well... there must be a reason, for sure... No ? > ֹYes, but I don't like it. >> D

Re: Strange behavior related to value / reference

2009-10-28 Thread Peter Otten
Lambda wrote: > I defined a function to raise a 2x2 matrix to nth power: > BTW, numpy has such a function, but it doesn't support really large > number. > Does numpy has some functions that support arbitrarily large number? You can tell it to use Python instead of C integers: >>> import numpy >

Re: anydbm, gdbm, dbm

2009-10-28 Thread Lawrence D'Oliveiro
In message , Lacrima wrote: > I don't understand how I can make a table in DBM database, or a row in > a table. Or all data must be stored just as key-value pairs? Maybe you should look at sqlite instead. -- http://mail.python.org/mailman/listinfo/python-list

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

2009-10-28 Thread eb303
On Oct 28, 10:48 am, "Alf P. Steinbach" wrote: > * eb303: > > > On Oct 28, 7:52 am, "Alf P. Steinbach" wrote: > > [snip] > >> But since I don't know much Python -- I'm *learning* Python as I write -- > >> I know > >> that there's a significant chance of communicating misconceptions, > >> non-id

Re: "Hello, world"?

2009-10-28 Thread Francesco Bochicchio
On 28 Ott, 10:40, Gilles Ganault wrote: > Hello > > I'm reading O'Reily's "Python Programming on Win32", but couldn't find > a simple example on how to create a window with just a label and > pushbutton. > This is probably because maybe the book addresses how to use python to do windows-specific

PEP 391 (Dictionary-Based Configuration for Logging) Updated

2009-10-28 Thread Vinay Sajip
I've updated PEP 391 (Dictionary-Based Configuration for Logging): http://www.python.org/dev/peps/pep-0391/ You can see the changes at http://svn.python.org/view/peps/trunk/pep-0391.txt?r1=75599&r2=75918 All feedback gratefully received! Cheers, Vinay Sajip -- http://mail.python.org/mailman

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

2009-10-28 Thread 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: Web development with Python 3.1

2009-10-28 Thread Dotan Cohen
>> How can I get an array with all the GET variables in Python? >> How can I get an array with all the POST variables in Python? >> How can I get an array with all the COOKIE variables in Python? >> How can I get the request URI path (everything after >> http://[www.?]example.com/)? >> >> That's al

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

2009-10-28 Thread Francesco Bochicchio
> > Just to fuel the flame war, consider a million line Python system. It's not > uncommon with C++. :-) > In python, with one-miliion lines of code, you can demonstrate the existence of God, and then demostrate its non-existance by changing a single line of code :-) Ciao - FB -- http://ma

Re: "Hello, world"?

2009-10-28 Thread eb303
On Oct 28, 11:23 am, Francesco Bochicchio wrote: > On 28 Ott, 10:40, Gilles Ganault wrote: > > > Hello > > > I'm reading O'Reily's "Python Programming on Win32", but couldn't find > > a simple example on how to create a window with just a label and > > pushbutton. > > This is probably because may

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

2009-10-28 Thread Alf P. Steinbach
* eb303: On Oct 28, 10:48 am, "Alf P. Steinbach" wrote: * eb303: On Oct 28, 7:52 am, "Alf P. Steinbach" wrote: [snip] But since I don't know much Python -- I'm *learning* Python as I write -- I know that there's a significant chance of communicating misconceptions, non-idiomatic ways to do

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

2009-10-28 Thread Garito
jajajajajajajajajaja +1 for Francesco 2009/10/28 Francesco Bochicchio > > > > Just to fuel the flame war, consider a million line Python system. It's > not > > uncommon with C++. :-) > > > > In python, with one-miliion lines of code, you can demonstrate > the existence of God, and then demostra

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

2009-10-28 Thread Anthra Norell
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 have a connected ftplib.FTP object and can upload files manually from an IDLE command line using the methods storlines () for html files a

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

2009-10-28 Thread tm
On 28 Okt., 09: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 sa

Re: Web development with Python 3.1

2009-10-28 Thread Bruno Desthuilliers
Dotan Cohen a écrit : 2009/10/28 Bruno Desthuilliers : Dotan Cohen a écrit : declarative mapping of urls to code Apache does this, unless I am misunderstanding you. Using url rewriting ? Yes, fine. Then tell me how you implement "reverse" url generation (like Django or Routes do). I have no

Re: Web development with Python 3.1

2009-10-28 Thread Bruno Desthuilliers
Dotan Cohen a écrit : While I know that to be true in the general sense, from what I've looked at Django and other frameworks it seems that the web frameworks push the coder to use templates, not letting him near the HTML. Well... there must be a reason, for sure... No ? ֹYes, but I don't lik

Re: Web development with Python 3.1

2009-10-28 Thread Bruno Desthuilliers
Dotan Cohen a écrit : I should probably expand on this: How can I get an array with all the GET variables in Python? How can I get an array with all the POST variables in Python? How can I get an array with all the COOKIE variables in Python? How can I get the request URI path (everything after

logging from several independent classes

2009-10-28 Thread Sandy
Hi all, I was going through the last example in logging docs: http://docs.python.org/library/logging.html#using-logging-in-multiple-modules It explains how to log from multiple classes. The example works fine as long as the logger names are in a heirarchy (spam_application.auxiliary.Auxiliary, spa

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

2009-10-28 Thread Alf P. Steinbach
* Jon Clements: On 28 Oct, 08:58, "Alf P. Steinbach" wrote: [snip] Without reference to an OS you can't address any of the issues that a beginner has to grapple with, including most importantly tool usage, without which it's not even possible to get started, but also, very importantly, a file s

Re: Web development with Python 3.1

2009-10-28 Thread Diez B. Roggisch
Dotan Cohen wrote: >>> I should probably expand on this: >>> >>> How can I get an array with all the GET variables in Python? >>> How can I get an array with all the POST variables in Python? >>> How can I get an array with all the COOKIE variables in Python? >>> How can I get the request URI path

Re: Strange behavior related to value / reference

2009-10-28 Thread Dave Angel
Mark Dickinson wrote: On Oct 28, 8:24 am, Lambda wrote: Thank you! Following is my final code: Looks good, but are you sure about that word 'final'? ;-) def matrix_power(m, n): """ Raise 2x2 matrix m to nth power. """ if n =0: return [[1, 0], [0, 1]] x =atrix_power(m,

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

2009-10-28 Thread Jon Clements
Inline reply: On 28 Oct, 11:49, "Alf P. Steinbach" wrote: > * Jon Clements: > > > On 28 Oct, 08:58, "Alf P. Steinbach" wrote: > > [snip] > >> Without reference to an OS you can't address any of the issues that a > >> beginner > >> has to grapple with, including most importantly tool usage, with

Python IDE ScriptDev V2.3 released

2009-10-28 Thread x yf
ScriptDev is developed by a powerful scripting language integrated development environment(IDE), can be used for Python, Ruby, Lua, Tcl, Perl, etc. scripting language, such as the development and debugging. ScriptDev similar to the components of the Eclipse framework to support the expansion of ric

Question on PEP 337

2009-10-28 Thread Gabor Urban
Hy guys, this PEP is very well written, and I have found the discussion inspiring. Every time I use the logging module, I have the configuration hardcoded in the application. That is why I never used the configuration file based approach. Now I will give it a try. I think we should discuss t

Re: ANN: WHIFF += Mako & treeview & url rewrites

2009-10-28 Thread Paul Boddie
On 27 Okt, 18:26, Aaron Watters wrote: > > Alex sent me the traceback (thanks!) and after consulting > the logs and the pages I figured out that the version of > Firefox in question was not ignoring my javascript links like > it should.  Instead FF was interpreting them as HTTP links to > pages th

Freezing pycrypto

2009-10-28 Thread mk
Hello everyone, I'm trying to freeze PyCrypto on Linux (using freeze.py) and having trouble with it, can you help me? PyCrypto is used by paramiko (ssh client module). I have added following in the Modules/Setup while building Python (This has to be done because freeze.py requires that all c

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

2009-10-28 Thread eb303
On Oct 28, 11:57 am, "Alf P. Steinbach" wrote: > * eb303: > > > > > On Oct 28, 10:48 am, "Alf P. Steinbach" wrote: > >> * eb303: > > >>> On Oct 28, 7:52 am, "Alf P. Steinbach" wrote: > >>> [snip] > But since I don't know much Python -- I'm *learning* Python as I write > -- I know > >>

ANN: Wing IDE 3.2.2 released

2009-10-28 Thread Wingware
Hi, Wingware has released version 3.2.2 of Wing IDE, our integrated development environment for the Python programming language. This release includes the following changes: * Added Toggle Bookmark for unnamed bookmarks, visual indicator of bookmarks, and bookmark traversal menu in editor * I

Re: Web development with Python 3.1

2009-10-28 Thread Dotan Cohen
>> I have no idea what reverse url generation is. > > It's a mean to avoid hard-coding urls in your application code - the url is > fully generated by the 'url mapping' system. > I don't need that, see below. >> I assume that the user >> will call http://example.com/path/to/script.py?var1=hello&

Re: Web development with Python 3.1

2009-10-28 Thread Dotan Cohen
While I know that to be true in the general sense, from what I've looked at Django and other frameworks it seems that the web frameworks push the coder to use templates, not letting him near the HTML. >>> >>> Well... there must be a reason, for sure... No ? >>> >> >> ֹYes, but I don'

Re: What IDE has good git and python support?

2009-10-28 Thread J Kenneth King
Aweks writes: > what do you use? emacs. -- http://mail.python.org/mailman/listinfo/python-list

Re: Web development with Python 3.1

2009-10-28 Thread Dotan Cohen
>> I insist on handling the HTML myself. > > I just don't get how embedding HTML in applicative code - a well-known > antipattern FWIW - relates to "handling the HTML yourself". Can you *please* > explain how a templating system prevents you from "handling the HTML" > yourself. > >From the little

popen function of os and subprocess modules

2009-10-28 Thread banu
Hi, I am a novice in python. I was trying to write a simple script on Linux (python 3.0) that does the following #cd directory #ls -l I use the following code, but it doesn't work: import os directory = '/etc' pr = os.popen('cd %s' % directory,'w') pr.close() pr = os.popen('ls -l','w')

Re: Web development with Python 3.1

2009-10-28 Thread Dotan Cohen
>> I insist on handling the HTML myself. As for converting the request >> variables into Python variables, if a class/framework makes that >> easier then I would gladly use it. My question was serious. How can I >> do those things? > > Using a framework? In Pylons/TG2, my code looks like this: > >

Re: Web development with Python 3.1

2009-10-28 Thread Diez B. Roggisch
Dotan Cohen wrote: >>> I insist on handling the HTML myself. >> >> I just don't get how embedding HTML in applicative code - a well-known >> antipattern FWIW - relates to "handling the HTML yourself". Can you >> *please* explain how a templating system prevents you from "handling the >> HTML" your

Re: Python + twisted = Raindrop (in part)

2009-10-28 Thread J Kenneth King
Terry Reedy writes: > Rrom: > First look: inside Mozilla's Raindrop messaging platform > > http://arstechnica.com/open-source/news/2009/10/first-look-inside-mozillas-raindrop-messaging-platform.ars > > "The backend components that are responsible for retrieving and > processing messages are coded

Re: logging from several independent classes

2009-10-28 Thread Vinay Sajip
Sandy gmail.com> writes: > > Hi all, > I was going through the last example in logging docs: > http://docs.python.org/library/logging.html#using-logging-in-multiple-modules > > It explains how to log from multiple classes. The example works fine The documentation you pointed to is about loggin

Re: popen function of os and subprocess modules

2009-10-28 Thread Jon Clements
On 28 Oct, 13:39, banu wrote: > Hi, > I am a novice in python. I was trying to write a simple script on > Linux (python 3.0) that does the following > > #cd directory > #ls -l > > I use the following code, but it doesn't work: > > import os > directory = '/etc' > pr = os.popen('cd %s' % directory,

Re: Question on PEP 337

2009-10-28 Thread Vinay Sajip
Gabor Urban gmail.com> writes: > this PEP is very well written, and I have found the discussion inspiring. > > Every time I use the logging module, I have the configuration hardcoded in > the application. That is why I never used the configuration file based > approach. Now I will give it a try.

Re: Web development with Python 3.1

2009-10-28 Thread Bruno Desthuilliers
Dotan Cohen a écrit : I have no idea what reverse url generation is. It's a mean to avoid hard-coding urls in your application code - the url is fully generated by the 'url mapping' system. I don't need that, see below. I assume that the user will call http://example.com/path/to/script.py?

Re: popen function of os and subprocess modules

2009-10-28 Thread Benjamin Kaplan
On Wed, Oct 28, 2009 at 9:39 AM, banu wrote: > Hi, > I am a novice in python. I was trying to write a simple script on > Linux (python 3.0) that does the following > > #cd directory > #ls -l > > I use the following code, but it doesn't work: > > import os > directory = '/etc' > pr = os.popen('cd %

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

2009-10-28 Thread Alf P. Steinbach
* Jon Clements: Inline reply: On 28 Oct, 11:49, "Alf P. Steinbach" wrote: * Jon Clements: On 28 Oct, 08:58, "Alf P. Steinbach" wrote: [snip] Without reference to an OS you can't address any of the issues that a beginner has to grapple with, including most importantly tool usage, without wh

Re: popen function of os and subprocess modules

2009-10-28 Thread banu
On Oct 28, 3:02 pm, Jon Clements wrote: > On 28 Oct, 13:39, banu wrote: > > > > > Hi, > > I am a novice in python. I was trying to write a simple script on > > Linux (python 3.0) that does the following > > > #cd directory > > #ls -l > > > I use the following code, but it doesn't work: > > > impo

Re: Web development with Python 3.1

2009-10-28 Thread Bruno Desthuilliers
Dotan Cohen a écrit : While I know that to be true in the general sense, from what I've looked at Django and other frameworks it seems that the web frameworks push the coder to use templates, not letting him near the HTML. Well... there must be a reason, for sure... No ? ֹYes, but I don't like

Re: Reference values for exec

2009-10-28 Thread Dave Angel
Garito wrote: Hi! I'm trying to use exec in a recursive way but I have a problem When I read the manual I understand that the globals and the locals are passed by reference but if I try to use it in a recursive way the new values added in a step are not passed to the next one Could someone poin

Re: Reference values for exec

2009-10-28 Thread Garito
Perhaps but the fact is that I need to execute code from some files in the filesystem and I need to have a common stack for them 2 questions came to my mind: 1.- How can I execute code from files in the filesystem? (I choose exec for that) 2.- If exec is my only option: how can I use a common sta

Re: Web development with Python 3.1

2009-10-28 Thread Bruno Desthuilliers
Dotan Cohen a écrit : >>> I insist on handling the HTML myself. >> I just don't get how embedding HTML in applicative code - a well-known >> antipattern FWIW - relates to "handling the HTML yourself". Can you *please* >> explain how a templating system prevents you from "handling the HTML" >> yo

Re: Web development with Python 3.1

2009-10-28 Thread Dotan Cohen
> *Why* on earth do you think using a templating system will give you any less > control on the generated HTML ? > Because I am wrong. I have already come to that conclusion. I know that Python is far enough developed that if I feel that I am fighting it, then _I_ am in the wrong, not Python. How

Re: Web development with Python 3.1

2009-10-28 Thread Bruno Desthuilliers
Dotan Cohen a écrit : *Why* on earth do you think using a templating system will give you any less control on the generated HTML ? Because I am wrong. I have already come to that conclusion. I know that Python is far enough developed that if I feel that I am fighting it, then _I_ am in the wr

Re: popen function of os and subprocess modules

2009-10-28 Thread banu
On Oct 28, 3:18 pm, Benjamin Kaplan wrote: > On Wed, Oct 28, 2009 at 9:39 AM, banu wrote: > > Hi, > > I am a novice in python. I was trying to write a simple script on > > Linux (python 3.0) that does the following > > > #cd directory > > #ls -l > > > I use the following code, but it doesn't work

Re: how to get os.system () call to cooperate on Windows

2009-10-28 Thread David Robinow
On Wed, Oct 28, 2009 at 12:43 AM, Gabriel Genellina wrote: > How can one copy files on the OS level? > The idea was just to show how to call CopyFile using ctypes, not implying > that it's the only way to do that. Everyone knows that the One and True Way > of copying files is using PIP. Yuk!

Re: Web development with Python 3.1

2009-10-28 Thread John Nagle
Diez B. Roggisch wrote: John Nagle schrieb: Alan Harris-Reid wrote: I am very much new to Python, and one of my first projects is a simple data-based website. I am starting with Python 3.1 Until MySQLdb gets ported to something later than Python 2.5, support for a "data-based web site" pr

how to zip a StringIO object?

2009-10-28 Thread Nagy Viktor
Hi, I try to run the following code: def generate_zip(object_list, template): result = StringIO.StringIO() zipped = zipfile.ZipFile(result, "w") for object in object_list: pdf = generate_pdf(object, template) if not pdf: raise IOError("Problem with generati

PyGDChart2 module

2009-10-28 Thread eb303
Hi all, I was looking for a simple chart drawing Python module and as a user of the gd library and its Python interface, I was interested in the Python interface to the gdchart library (http://www.fred.net/brv/ chart/). Unfortunately, this module seems to have disappeared: its former URL (http://w

Re: Deeper copy than deepcopy

2009-10-28 Thread Scott Pakin
Thanks everyone! The list-comprehension approach should work in my case as I know a priori that my data structure is finite. Still, it'd be awfully convenient for Python's copy module to offer a copy.deepercopy function -- even if it comes with the caveat that it will explode if given a data stru

  1   2   >