ANN: Python course, San Francisco, Nov 9-11

2009-10-28 Thread wesley chun
*FINAL REMINDER* come join us for another hardcore Python training course in San Francisco coming up in a few weeks! we have a few more slots available. bring your co-workers to take advantage of our multiple registration discount. we also feature a steeper discount for those who are

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

[ANN]: IronPython 2.6 Release Candidate 2

2009-10-28 Thread Dave Fugate
Hello Python Community, We're pleased to announce the release of IronPython 2.6 Release Candidate 2 which can be freely downloaded at http://ironpython.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=34451. Since the public availability of Release Candidate 1, we've addressed the

New mds-utils release (1.2.0)

2009-10-28 Thread Michele De Stefano
mds-utils 1.2.0 have been released. Release Notes: - Improved python/fileobj.hpp: now there are 3 helper file objects and they are copy-constructible. Derivation from boost::python::object has been mantained. - Added utilities for indexing support in Python

ffnet-0.6.2 released

2009-10-28 Thread Marek Wojciechowski
ffnet version 0.6.2 is released and is available for download at: http://ffnet.sourceforge.net This release contains minor enhancements and compatibility improvements: - ffnet works now with =networkx-0.99; - neural network can be called now with 2D array of inputs, it

Re: How would you design scalable solution?

2009-10-28 Thread Jon Clements
On 27 Oct, 17:10, Bryan bryanv...@gmail.com wrote: 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

ConfigParser.items sorting

2009-10-28 Thread Dean McClure
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_range: [60, 64, 68, 72, 76, 80, 84, 88, 92, 96, 100, 104, 108, 112, 116]

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

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

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 al...@start.no 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

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

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 many

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

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('[','

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 al...@start.no 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

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

2009-10-28 Thread Jon Clements
On 28 Oct, 07:31, Steven D'Aprano ste...@remove.this.cybersource.com.au 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

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

2009-10-28 Thread Olof Bjarnason
2009/10/28 Alf P. Steinbach al...@start.no * Chris Rebert: On Tue, Oct 27, 2009 at 11:52 PM, Alf P. Steinbach al...@start.no 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

Re: anydbm, gdbm, dbm

2009-10-28 Thread Lacrima
On Oct 27, 4:36 pm, Tim Chase python.l...@tim.thechases.com 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

Re: calling server side function

2009-10-28 Thread Gabriel Genellina
En Wed, 28 Oct 2009 04:04:50 -0300, Paul Hartley luapyelt...@hotmail.com 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

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

2009-10-28 Thread Jon Clements
On 28 Oct, 07:44, Jon Clements jon...@googlemail.com wrote: On 28 Oct, 07:31, Steven D'Aprano ste...@remove.this.cybersource.com.au 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,

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

2009-10-28 Thread Richard Heathfield
In hc8pn3$dd...@news.eternal-september.org, Alf P. Steinbach wrote: snip I may finally have found the perfect language for a practically oriented introductory book on programming, namely Python. snip I don't know whether this will ever become an actual book. I hope so! snip So I

Re: a simple unicode question

2009-10-28 Thread Gabriel Genellina
En Wed, 28 Oct 2009 02:28:01 -0300, Chris Jones cjns1...@gmail.com 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

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_range: [60,

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 about

Re: Web development with Python 3.1

2009-10-28 Thread Paul Rubin
John Nagle na...@animats.com 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. --

Re: Strange behavior related to value / reference

2009-10-28 Thread Lambda
On Oct 28, 10:40 am, Chris Rebert c...@rebertia.com wrote: On Tue, Oct 27, 2009 at 7:15 PM, Lambda stephenh...@gmail.com 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

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

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

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

2009-10-28 Thread tm
On 28 Okt., 07:52, Alf P. Steinbach al...@start.no 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

Re: Strange behavior related to value / reference

2009-10-28 Thread Mark Dickinson
On Oct 28, 8:24 am, Lambda stephenh...@gmail.com 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)

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 al...@start.no 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

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 al...@start.no 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

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 Python

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

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

2009-10-28 Thread Olof Bjarnason
2009/10/28 Martin P. Hellwig martin.hell...@dcuktec.org Alf P. Steinbach wrote: * tm: On 28 Okt., 07:52, Alf P. Steinbach al...@start.no wrote: [Cross-posted comp.programming and comp.lang.python] Looking at your topic '(Python in Windows)', without taking a glimpse at your actual

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

[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: 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 dotanco...@gmail.com 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

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

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: code import win32api win32api.MessageBox (None, Hello, World!, Greetings) /code but that

Re: Web development with Python 3.1

2009-10-28 Thread Dotan Cohen
2009/10/28 Bruno Desthuilliers bruno.42.desthuilli...@websiteburo.invalid: 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

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. Django and

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 m =

Re: anydbm, gdbm, dbm

2009-10-28 Thread Lawrence D'Oliveiro
In message b0ec6512-ac80-4372- bdb8-1a8a4e030...@r5g2000yqb.googlegroups.com, 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. --

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

2009-10-28 Thread eb303
On Oct 28, 10:48 am, Alf P. Steinbach al...@start.no wrote: * eb303: On Oct 28, 7:52 am, Alf P. Steinbach al...@start.no 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,

Re: Hello, world?

2009-10-28 Thread Francesco Bochicchio
On 28 Ott, 10:40, Gilles Ganault nos...@nospam.com 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

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=75599r2=75918 All feedback gratefully received! Cheers, Vinay Sajip --

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

2009-10-28 Thread James Harris
On 28 Oct, 08:58, Alf P. Steinbach al...@start.no wrote: * tm: On 28 Okt., 07:52, Alf P. Steinbach al...@start.no 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

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 all I want: no

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 --

Re: Hello, world?

2009-10-28 Thread eb303
On Oct 28, 11:23 am, Francesco Bochicchio bieff...@gmail.com wrote: On 28 Ott, 10:40, Gilles Ganault nos...@nospam.com 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

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 al...@start.no wrote: * eb303: On Oct 28, 7:52 am, Alf P. Steinbach al...@start.no 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,

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

2009-10-28 Thread Garito
jajajajajajajajajaja +1 for Francesco 2009/10/28 Francesco Bochicchio bieff...@gmail.com 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

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 anthra.nor...@bluewin.ch 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

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

2009-10-28 Thread tm
On 28 Okt., 09:58, Alf P. Steinbach al...@start.no wrote: * tm: On 28 Okt., 07:52, Alf P. Steinbach al...@start.no 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

Re: Web development with Python 3.1

2009-10-28 Thread Bruno Desthuilliers
Dotan Cohen a écrit : 2009/10/28 Bruno Desthuilliers bruno.42.desthuilli...@websiteburo.invalid: 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

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

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,

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 al...@start.no 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

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 (everything

Re: Strange behavior related to value / reference

2009-10-28 Thread Dave Angel
Mark Dickinson wrote: On Oct 28, 8:24 am, Lambda stephenh...@gmail.com 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

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 al...@start.no wrote: * Jon Clements: On 28 Oct, 08:58, Alf P. Steinbach al...@start.no 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

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

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

Re: ANN: WHIFF += Mako treeview url rewrites

2009-10-28 Thread Paul Boddie
On 27 Okt, 18:26, Aaron Watters aaron.watt...@gmail.com 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

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

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

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

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 *

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=hellovar2=world

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. Why so ?

Re: What IDE has good git and python support?

2009-10-28 Thread J Kenneth King
Aweks a...@ewadev.com 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 that I

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: def

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 yourself. From

Re: Python + twisted = Raindrop (in part)

2009-10-28 Thread J Kenneth King
Terry Reedy tjre...@udel.edu 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

Re: logging from several independent classes

2009-10-28 Thread Vinay Sajip
Sandy dksreddy at 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

Re: popen function of os and subprocess modules

2009-10-28 Thread Jon Clements
On 28 Oct, 13:39, banu varun.nagp...@gmail.com 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'

Re: Question on PEP 337

2009-10-28 Thread Vinay Sajip
Gabor Urban urbangabo at 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

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

Re: popen function of os and subprocess modules

2009-10-28 Thread Benjamin Kaplan
On Wed, Oct 28, 2009 at 9:39 AM, banu varun.nagp...@gmail.com 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 =

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 al...@start.no wrote: * Jon Clements: On 28 Oct, 08:58, Alf P. Steinbach al...@start.no wrote: [snip] Without reference to an OS you can't address any of the issues that a beginner has to grapple with, including most

Re: popen function of os and subprocess modules

2009-10-28 Thread banu
On Oct 28, 3:02 pm, Jon Clements jon...@googlemail.com wrote: On 28 Oct, 13:39, banu varun.nagp...@gmail.com 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

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

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

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

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 yourself. From

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.

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

Re: popen function of os and subprocess modules

2009-10-28 Thread banu
On Oct 28, 3:18 pm, Benjamin Kaplan benjamin.kap...@case.edu wrote: On Wed, Oct 28, 2009 at 9:39 AM, banu varun.nagp...@gmail.com 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

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 gagsl-...@yahoo.com.ar 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

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 generating

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

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

Re: What IDE has good git and python support?

2009-10-28 Thread Simon Forman
On Tue, Oct 27, 2009 at 11:56 AM, Aweks a...@ewadev.com wrote: what do you use? I use IDLE for python and Bash for GIT. Regards, ~Simon -- http://mail.python.org/mailman/listinfo/python-list

Re: Reference values for exec

2009-10-28 Thread Dave Angel
(You top-posted, so I almost missed your addition. It's conventional on this newsgroup to bottom-post -- inline where appropriate, or at the end) Garito wrote: 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

Re: Reference values for exec

2009-10-28 Thread Garito
Ok, imagine then that I need to execute code from a database query What I'm trying to do is something similar that Python Scripts in Zope. Do you know it? How can I do that? Thanks you !! 2009/10/28 Dave Angel da...@ieee.org (You top-posted, so I almost missed your addition. It's

  1   2   3   >