Books to lean Python 3 Web Programming?

2011-10-22 Thread Jonathan Loescher
Can anyone recommend a good book to learn the web programming aspects of Python 3? -- http://mail.python.org/mailman/listinfo/python-list

Re: leftover pyc files

2011-11-03 Thread Jonathan Hartley
A task like this is more suited to bash than Python: find . -name '*.pyc' -exec rm '{}' ';' -- http://mail.python.org/mailman/listinfo/python-list

Re: leftover pyc files

2011-11-03 Thread Jonathan Hartley
This can be added to git as a post-checkout hook: In your project's .git/hooks/post-checkout: #!/usr/bin/env bash cd ./$(git rev-parse --show-cdup) find . -name '*.pyc' -exec rm '{}' ';' -- http://mail.python.org/mailman/listinfo/python-list

Re: leftover pyc files

2011-11-03 Thread Jonathan Hartley
This can be added to your project's .git/hooks/post-checkout: #!/usr/bin/env bash cd ./$(git rev-parse --show-cdup) find . -name '*.pyc' -exec rm '{}' ';' -- http://mail.python.org/mailman/listinfo/python-list

Re: leftover pyc files

2011-11-04 Thread Jonathan Hartley
I like to install a Bash shell of some kind on windows boxes I work on, specifically so I can use shell commands like this, just like on any other operating system. Cywin works just fine for this. svn also has hooks, but sadly not a checkout hook: http://svnbook.red-bean.com/en/1.1/ch05s02.html

Re: leftover pyc files

2011-11-04 Thread Jonathan Hartley
Apologies for all my messasges appearing twice. I'm using google groups web ui and have no idea why it's doing that. I'll stop using it. -- http://mail.python.org/mailman/listinfo/python-list

A Python script to put CTAN into git (from DVDs)

2011-11-06 Thread Jonathan Fine
oes not have arrays or numbers. If my project interests you, reply to this message or contact me directly (or both). -- Jonathan -- http://mail.python.org/mailman/listinfo/python-list

Re: A Python script to put CTAN into git (from DVDs)

2011-11-06 Thread Jonathan Fine
On 06/11/11 16:42, Jakub Narebski wrote: Jonathan Fine writes: Hi This it to let you know that I'm writing (in Python) a script that places the content of CTAN into a git repository. https://bitbucket.org/jfine/python-ctantools I hope that you meant "repositories" (pl

Re: A Python script to put CTAN into git (from DVDs)

2011-11-07 Thread Jonathan Fine
a tag. But no commit. That was a bad accident that there is a tag that points directly to a tree of _initial import_, not something to copy. Because git is a distributed version control system, anyone who wants to can create such a directed acyclic graph of commits. And if it's useful I'll gladly add it to my copy of the repository. best regards Jonathan -- http://mail.python.org/mailman/listinfo/python-list

Re: A Python script to put CTAN into git (from DVDs)

2011-11-07 Thread Jonathan Fine
ling me about gitpan. -- Jonathan -- http://mail.python.org/mailman/listinfo/python-list

Re: easy_install doesn't install non-package *.py file

2011-11-10 Thread Jonathan Hartley
Hey. I don't know the details, but your setup.py needs to use either the 'package_data' or the 'data_files' entry in the dict you pass to setup. These can specify files you want included in the sdist which aren't package files. There are many complications with using them though. One of them in

Re: [TIP] Anyone still using Python 2.5?

2011-12-21 Thread Jonathan Lange
On Wed, Dec 21, 2011 at 9:21 AM, Pierre-Yves David wrote: ... > The most notable exception is Ubuntu Hardy and LTS release from april 2008 > with > 2.5. But this LTS is out of support for almost 1 year now and current LTS > (Lucid) ship 2.6. Not quite. Ubuntu 8.04 LTS is supported on the server

Re: Visual Python, really "Visual"?

2005-12-13 Thread Jonathan Ellis
ly more polished than the free alternatives. For some people that's not important. For people that use their tools 40 hours a week or more, it often is. -Jonathan -- http://mail.python.org/mailman/listinfo/python-list

Re: Wingide is a beautiful application

2005-12-17 Thread Jonathan Ellis
hat about call > tips? Just as important and every other Python IDE has it. Wing shows calltip info in the Source Assistant panel. (Pro version only, IIRC.) -Jonathan -- http://mail.python.org/mailman/listinfo/python-list

Re: Queueing in Python (ala JMS)

2005-12-20 Thread Jonathan LaCour
but in the meantime, you can achieve most of what you need with spread. -- Jonathan LaCour http://cleverdevil.org -- http://mail.python.org/mailman/listinfo/python-list

Re: I need some help

2006-07-12 Thread Jonathan Harris
ne aware of an existing Python module to read MP4/AAC tags? Jonathan. -- http://mail.python.org/mailman/listinfo/python-list

Re: running python from a memory stick?

2006-07-13 Thread Jonathan Harris
nother machine? If the latter, then look at http://www.py2exe.org/ - "convert python scripts into standalone windows programs". Jonathan. -- http://mail.python.org/mailman/listinfo/python-list

Re: Need a compelling argument to use Django instead of Rails

2006-07-26 Thread Jonathan Ellis
ooks like it's going nowhere fast to me. -Jonathan -- http://mail.python.org/mailman/listinfo/python-list

testing for data type

2006-07-29 Thread Jonathan Bowlas
Hi Listers,   I have a requirement to test for a data type could someone tell me if this is possible in python?   Basically I have a ZPT in Zope that users can select checkboxes in a form which pass arguments for a python function, however if there is only one checkbox selected it is pa

Newbie help - test for data type

2006-07-31 Thread Jonathan Bowlas
Hi Listers, I have a requirement to test for a data type could someone tell me if this is possible in python? Basically I have a ZPT in Zope that users can select checkboxes in a form which pass arguments for a python function, however if there is only one checkbox selected it is passed as a stri

Re: Newbie help - test for data type

2006-07-31 Thread Jonathan Bowlas
for data type   Jonathan Bowlas wrote: > Hi Listers, > > I have a requirement to test for a data type could someone tell me if this > is possible in python? > > Basically I have a ZPT in Zope that users can select checkboxes in a form > which pass arguments for a pyt

Re:Newbie help - test for data type

2006-07-31 Thread Jonathan Bowlas
Thanks Bruno, I’ll use this.   Much appreciated.   Jon   -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bruno Desthuilliers Sent: 31 July 2006 10:37 To: [email protected] Subject: Re: [OT]Newbie help - test for data type   Jonathan

Re: pass parameters in SPYCE

2006-07-31 Thread Jonathan Ellis
nk4 > > I want all theses html links to point to process.spy with the value of > the link as parameter ( equivalent to call process.spy -link1 ). > > Is this feasible with html links or I have to use forms and replace my > links with buttons? You mean, a href=process.spy?link=1

Re: file system iteration

2006-10-09 Thread Jonathan Hartley
' /proc' type complexities by not doing anything to walked directories that '/proc' type entries cannot deal with. I think (no sarcasm intended) the point of offering a directory-like interface to '/proc' was so one can perform directory-like operations on

Convert StringIO to string

2006-10-16 Thread Jonathan Bowlas
Hi listers, I've written this little script to generate some html but I cannot get it to convert to a string so I can perform a replace() on the >, < characters that get returned. from StringIO import StringIO def generator_file(rsspath,titleintro,tickeropt): scripter=StringIO()

RE: Convert StringIO to string

2006-10-16 Thread Jonathan Bowlas
Ahh thanks, I'll give that a try. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: 16 October 2006 14:00 To: [email protected] Subject: Re: Convert StringIO to string Jonathan Bowlas wrote: > But obviously replace()

RE: Convert StringIO to string

2006-10-16 Thread Jonathan Bowlas
Ok, I think I'm explaining this badly because I've used getvalue() in the script I originally submitted to the list, see below:   from StringIO import StringIO   def generator_file(rsspath,titleintro,tickeropt):   scripter=StringIO()   scripter.write('\n')

RE: Convert StringIO to string

2006-10-16 Thread Jonathan Bowlas
Of Rob Williscroft Sent: 16 October 2006 14:37 To: [email protected] Subject: Re: Convert StringIO to string Jonathan Bowlas wrote in news:[EMAIL PROTECTED] in comp.lang.python: > Hi listers, > > I've written this little script to generate some html but I cannot get > it to co

Re:RELEASED Python 2.4.4, release candidate 1

2006-10-16 Thread Jonathan Smith
Anthony Baxter wrote: > On behalf of the Python development team and the Python community, > I'm happy to announce the release of Python 2.4.4 (release candidate 1). When trying to build 2.4.4c1 with cross-compiling, I get the following error. checking for /dev/ptmx... configure: error: cannot

Re: Pygtk but no gtk?

2006-10-20 Thread Jonathan Smith
[EMAIL PROTECTED] wrote: > I am trying to build an app that requires pygtk so I installed the > latter. The app does the following: > import pygtk > ... > import gtk > > This crashes with > ImportError: No module named gtk. > > I dont know where to get this gtk module from. I assumed pygtk would

Re: ANN: Diamanda Wiki and MyghtyBoard Forum Test 1

2006-10-25 Thread Jonathan Ellis
[EMAIL PROTECTED] wrote: > Diamanda Wiki and MyghtyBoard Forum Test 1 > > Diamanda is a wiki django application and Myghty Board is a bulletin > board application. Both written in Django >= 0.95. Might want to re-think your bboard app's name; people might think it runs on M

Re: Python memory usage

2006-11-13 Thread Jonathan Ballet
ld fix this behaviour, doesn't it ? Jonathan -- http://mail.python.org/mailman/listinfo/python-list

Re: Python memory usage

2006-11-13 Thread Jonathan Ballet
Le Mon, 13 Nov 2006 21:30:35 +0100, Fredrik Lundh <[EMAIL PROTECTED]> a écrit : > Jonathan Ballet wrote: > > >> http://effbot.org/pyfaq/why-doesnt-python-release-the-memory-when-i-delete-a-large-object > > > > Is it still true with Python 2.5 ? > >

subprocesses, stdin/out, ttys, and beating insubordinate processes into the ground

2006-06-06 Thread Jonathan Smith
First a bit about what I'm trying to do. I need a function which takes a patchfile and patches a source directory. Thats it. However, I need to be able to do so no matter what the patchlevel (-px) of the diff is. So, my solution is to just try to patch until it works or you try a level more tha

Re: Get my airlines boarding pass

2006-06-11 Thread Jonathan Ellis
ill never write HTMLParser-based screen scrapers again. :) -Jonathan -- http://mail.python.org/mailman/listinfo/python-list

Re: Very nice python IDE (windows only)

2006-06-12 Thread Jonathan Ellis
are probably going > to enjoy it. Windows only unfortunately. > > http://mmm-experts.com/Products.aspx?ProductId=4 Not to rain on anyone's parade, but I'd recommend using an IDE that isn't based on an obviously dead-end platform. (PyScripter is written in Delphi.) -Jonathan

Re: Py2exe make wxPython window looks bad

2006-07-04 Thread Jonathan Harris
'\n'+ '\n'+ '\n') 2. Within your setup routine, change your 'windows' entry to: windows = [{'script': 'mainframe.py', 'other_resources': [(24,1,manifest)], }], Jonathan. -- http://mail.python.org/mailman/listinfo/python-list

Re: Pros/Cons of Turbogears/Rails?

2006-08-27 Thread Jonathan Ellis
e framework." IIANM in TurboGears all you have to do is return a file-like object from your page handler. -Jonathan -- http://mail.python.org/mailman/listinfo/python-list

Re: Is this a good idea or a waste of time?

2006-08-29 Thread Jonathan Gardner
Simon Forman wrote: > > If you have a reason to restrict your code to using only ints (perhaps > you're packing them into an array of some sort, or passing them to a C > extension module) then yes, of course it's appropriate. I politely disagree. Rather than an interface that demands an actual in

Re: Building Python Based Web Application

2006-09-08 Thread Jonathan LaCour
oproject.com/). I have had good luck with both in the past, and TurboGears is my current framework of choice. There are a bunch of other frameworks out there as well, but I would guess that these are the two most popular. Best of luck - -- Jonathan LaCour http://cleverdevil.org -- http://mai

SOAPpy

2006-10-04 Thread Jonathan Morgan
Hi, I'm just started playing around with Python to trigger a method in a web service. I've been using SOAPpy and it's incredibly badly documented so i'm not getting very far. What I need to do is create the following in my SOAP body: http://www.csapi.org/schema/etc...";>

Re: SQLite3__Python2.3-SQLite__Problem

2006-11-24 Thread Jonathan Ballet
Le Fri, 24 Nov 2006 13:18:14 -0600, Cousin Stanley <[EMAIL PROTECTED]> a écrit : > >This problem is occuring under Debian GNU/Linux Sarge >using Python 2.3 > Hi, if you look at http://packages.debian.org/stable/python/python2.3-sqlite, you will see that the python2.3-sqlite packag

Re: why would anyone use python when java is there?

2006-11-28 Thread Jonathan Smith
gavino wrote: > wtf Java is a coffee, and coffee comes from exploited Ethiopians (they do have some damn fine coffee, though). Most of us prefer to exploit Englishmen instead. (damn them and their humor!) -smithj -- http://mail.python.org/mailman/listinfo/python-list

Python library for reading ODF Spreadsheets

2006-12-03 Thread Jonathan Hunt
o get this job done. Thanks in advance for any help. Jonny (I'm not on the list. Please CC me answers). -- Jonathan Hunt <[EMAIL PROTECTED]> Website: http://www.me.net.nz (PGP Public Key available there) Ph: +6463535975 Mob: +64212106185 Work: +6463505799x3529 "He is no fool who

Re: Ensure a variable is divisible by 4

2006-12-04 Thread Jonathan Smith
> <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> I am sure this is a basic math issue, but is there a better way to >> ensure an int variable is divisible by 4 than by doing the following; >> >> x = 111 >> x = (x /4) * 4 >> >> Just seems a bit clunky to me. if ( x % 4 ) == 0:

Re: Ensure a variable is divisible by 4

2006-12-05 Thread Jonathan Smith
MRAB wrote: >> if ( x % 4 ) == 0: >> whatever # x is divisible by 4 >> >> modulus is your friend :) >> >> -smithj > > > It's "modulo"; "modulus" is a different operation. > > Wikipedia says "modulus may refer to... %, the modulo operator of various programming languages" http://en.wikip

Re: Anyone use GD with pyhton?

2006-12-08 Thread Jonathan Curran
wcenturycomputers.net/projects/gdmodule.html Hope this helps, Jonathan -- http://mail.python.org/mailman/listinfo/python-list

Re: How to create a global hotkey?

2006-12-08 Thread Jonathan Curran
ui/x/xlib/input/XGrabKey.html Example: http://tigerdyr.wheel.dk/ctwm-archive/1328.html It's done here in C, hopefully you can do the same with the python module for xlib that was mentioned earlier. - Jonathan Google = best friend -- http://mail.python.org/mailman/listinfo/python-list

Re: Interacting with keyboard LEDs

2006-12-08 Thread Jonathan Curran
/html/python-xlib_16.html Take a look at get_keyboard_control() and change_keyboard_control(). As far as knowing how to properly invoke them, I have no idea, maybe you could google for examples or take a look at the setleds source? - Jonathan -- http://mail.python.org/mailman/listinfo/python-list

Re: Interacting with keyboard LEDs

2006-12-09 Thread Jonathan Curran
If you can manage to convert his code into python w/python-xlib you will be set. When you do, e-mail me the snippet will you ;) - Jonathan -- http://mail.python.org/mailman/listinfo/python-list

Re: speed of python vs matlab.

2006-12-13 Thread Jonathan Curran
MD 3200+ (2.2GHz) w/ 1GB RAM. Yours is a lot faster in terms of clock speed. Anyway, do take a look at some of the available python compilers. They should help considerably. - Jonathan -- http://mail.python.org/mailman/listinfo/python-list

Re: Strange return value from SOAP call

2006-12-14 Thread Jonathan Curran
erve/retrieve actual data structures. I don't know all the details but SOAPpy is an incomplete library from what I've read. It works for me though (for now anyway) b/c I only use simple single dimensioned arrays. Let me know if you make any progress. Jonathan Curran-- http://mail.pyth

Re: Writing and reading variables to/from flat file

2006-12-14 Thread Jonathan Curran
lized properly. I'm not > sure what I'm doing wrong here--can anyone point me in the right > direction? Thanks. > > -- > Kevin Walzer > Code by Kevin > http://www.codebykevin.com I'm surprised that no one has mentioned the wonderful ConfigParser class. Documentation

Re: connecting webservers through HTTP port using python

2006-12-18 Thread Jonathan Curran
ve read & possibly misunderstood, it seems that you want to be able to retreive data from a web page. If so you might want to glance at http://diveintopython.org/http_web_services/ and also take a look at the SGML section that is mentioned earlier on in the book. - Jonathan Curran -- http:/

Re: Windows Authetication vs seperate process

2006-12-18 Thread Jonathan Curran
the local machine was part of a domain. If not then inform the user that they need to be. 2. Check to see if the user who ran the application is part of a specific group in AD. I would assign each group a certain 'level' of privilege and accordingly let the user do what they should be a

Re: Is there any python-twisted tutorial or texts?

2006-12-18 Thread Jonathan Curran
try-level book at best, but it does go over quite a lot of things that the Twisted library is capable of. Available at amazon.com: http://www.amazon.com/Twisted-Network-Programming-Essentials-Fettig/dp/0596100329/sr=8-1/qid=1166501681/ref=sr_1_1/102-5086830-3709707?ie=UTF8&s=books - Jonathan

Re: regexp

2006-12-19 Thread Jonathan Curran
o Python.' http://diveintopython.org/toc/index.html You can modify the code there and get the results that you need. Buy the book if you can :) It has lots of neat examples. - Jonathan Curran -- http://mail.python.org/mailman/listinfo/python-list

Re: regexp

2006-12-19 Thread Jonathan Curran
problem ? > > Yes. Use DOTALL mode. Paul, I mentioned Chapter 8 so that the HTML processing section would be taken a look at. What Vertigo wants can be done with relative ease with SGMLlib. Anyway, if you (Vertigo) want to use regular expressions to do this, you can try and use some regular expression testing programs. I'm not quite sure of the name but there is one that comes with KDE. - Jonathan Curran -- http://mail.python.org/mailman/listinfo/python-list

13 second delay using select() with Popen3()

2006-12-21 Thread Jonathan Mark
the select loop wrong somehow, or what else might be wrong. Thanks!! Jonathan Mark --- import os, popen2, select def execCommand(cmd, mergeErrors = False): popen3 = popen2.Popen3(cmd, capturestderr = True) popen3.tochild.close() strOutput = '' strErrors = '

Re: Website Capture

2006-12-24 Thread Jonathan Curran
gets/WxPython is one option, and the only other I can think of is GTK/pyGTK. I hope this helps a little, and Merry Christmas! - Jonathan Curran -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 2.4.4 vs. 2.3.6

2006-12-27 Thread Jonathan Smith
I would say 2.4.4, since it has the latest bugfixes of the series most distros use. --- Sent with ChatterEmail+ True push email for the Treo Smartphone http://get.chatteremail.com -Original Message- From: [EMAIL PROTECTED] Date: Wednesday, Dec 27, 2006 9:05 pm Subject:

Re: Dividing integers...Convert to float first?

2007-01-05 Thread Jonathan Smith
Thomas Ploch wrote: > [EMAIL PROTECTED] schrieb: >> I'm still pretty new to Python. I'm writing a function that accepts >> thre integers as arguments. I need to divide the first integer by te >> second integer, and get a float as a result. I don't want the caller of >> the function to have to pass

Re: python, zlib, and fedora 64bits

2007-01-06 Thread Jonathan Curran
#x27;t used any redhat deviant in a while, but I think the command should be: yum search python. This should bring up a list of packages that are installable. The rest should be simple as: yum install . I hope this helps. - Jonathan -- http://mail.python.org/mailman/listinfo/python-list

Re: Traceback of hanged process

2007-01-06 Thread Jonathan Curran
t stderr to a file so that in case of a crash or fault the errors will be logged to a file. I think the following code would do it. import sys log_file = open('errors.log', 'w') sys.stderr = open('errors.log', 'w') log_file.close() Hope it helps. - Jonathan -- http://mail.python.org/mailman/listinfo/python-list

Re: Traceback of hanged process

2007-01-06 Thread Jonathan Curran
Heh, I kinda messed up the code there. It should be: import sys log_file = open('errors.log', 'w') sys.stderr = log_file log_file.close() As for the Ctrl-C, you can catch that when KeyboardInterrupt exception is raised. - Jonathan -- http://mail.python.org/mailman/listinfo/python-list

Re: still a valid book?

2006-02-08 Thread Jonathan Gardner
You may want to read http://python.org/doc/2.4.2/whatsnew/whatsnew24.html to get an idea of what has changed from 2.3 to 2.4 if you buy the 2.3 book. -- http://mail.python.org/mailman/listinfo/python-list

Soduku

2006-02-14 Thread Jonathan Gardner
Here at my job, Python gets no respect. A programmer here wanted to see which language among Python, Perl, and Java was better. So he wrote a Python, perl, and Java version. Except the Python version was 20x slower than the perl and Java versions. Well, luckily he asked around in our little Pytho

Re: Soduku

2006-02-14 Thread Jonathan Gardner
27ms == 0.027s How do you have a 16x16 grid for soduku? Are you using 16 digits? 0-F? The one I am using has 9 digits, 9 squares of 9 cells each, or 9x9 cells. The least efficient part of the algorithm is that part to calculate what to put in a hole (as anyone might've guessed.) My algorithm cal

Re: How to cat None

2006-02-14 Thread Jonathan Gardner
You can just surround the offending value with str(...). You should probably be doing that anyway, because the value might be a number or something else not stringish. -- http://mail.python.org/mailman/listinfo/python-list

Re: Databases and python

2006-02-15 Thread Jonathan Gardner
I'm no expert in BDBs, but I have spent a fair amount of time working with PostgreSQL and Oracle. It sounds like you need to put some optimization into your algorithm and data representation. I would do pretty much like you are doing, except I would only have the following relations: - word to wo

Re: Databases and python

2006-02-17 Thread Jonathan Gardner
About the filename ID - word ID table: Any good database (good with large amounts of data) will handle the memory management for you. If you get enough data, it may make sense to get bothered with PostgreSQL. That has a pretty good record on handling very large sets of data, and intermediate sets a

Re: Databases and python

2006-02-17 Thread Jonathan Gardner
About indexes everywhere: Yes, you don't have to be a DB expert to know that indexes everywhere is bad. But look at this example. There are really two ways that the data is going to get accessed in regular use. Either they are going to ask for all files that have a word (most likely) or they are go

Re: Merging two lists of data (Pythonic way)

2006-02-17 Thread Jonathan Gardner
codes = map(lambda x: x[0], list1) for d in list2: if d['code'] in codes: d['VERIFIED'] = 1 Is this what you were looking for? -- http://mail.python.org/mailman/listinfo/python-list

Re: define loop statement?

2006-02-17 Thread Jonathan Gardner
No, not in the way you think it is. What you can do instead is something like this: def do_something(i): ... do_something ... def loop(n, func): for i in range(n): func(i) loop(10, do_something) -- http://mail.python.org/mailman/listinfo/python-list

Re: Difference: __iadd__ and __add__

2006-02-17 Thread Jonathan Gardner
I would like to point out that it isn't entirely obvious where to find documentation for this particular thing. I know from experience where to go, but I remember spending a long time trying to hunt this down. For reference, you may want to check out the index of the language reference manual. ht

Re: editor for Python on Linux

2006-02-19 Thread Jonathan Daugherty
# I wonder which editor or IDE you can recommend me for writing Python # programs. I tried with jEdit but it isn't perfect. It depends on what you need; what don't you like about JEdit? What do you think a good editor or IDE should provide? -- Jonathan Daugherty http://www.

Re: Best python module for Oracle, but portable to other RDBMSes

2006-02-24 Thread Jonathan Gardner
On database portability... While it is noble to try to have a generic interface to these libraries, the end result is that the databases are always different enough that the interface just has to work differently. My experience in going from one database to another is that you should revisit your

Re: Playing with modules

2006-02-24 Thread Jonathan Gardner
You're going to have to create the home.base module somewhere. If you want to put in that some code that basically imports another module's namespace into the home.base module's namespace, then that may do what you want. -- http://mail.python.org/mailman/listinfo/python-list

Re: Best python module for Oracle, but portable to other RDBMSes

2006-02-27 Thread Jonathan Gardner
I've never seen the points of those tools. Just lay it out on paper or document it somewhere. Be consistant with your naming scheme and it shouldn't be hard to see the relations. If found that the people who don't understand how tables should relate to one another are also the same people who don't

Re: type = "instance" instead of "dict"

2006-02-27 Thread Jonathan Gardner
You should probably spend a bit more time in the documentation reading things for yourself. Read http://www.python.org/doc/2.4.2/ref/types.html under "Class Instances" for your answer. -- http://mail.python.org/mailman/listinfo/python-list

Re: Catch exceptions

2006-02-27 Thread Jonathan Gardner
(A) You'll have to be more specific about your problem if you want us to help. Under which circumstances did it work or not? What exactly is the problem? (B) Where you put your error-handling is up to you. It depends on what the function does and how it is to respond. Do you want the function to t

Re: zipimport

2005-05-04 Thread Jonathan Brady
sonally I find: import sys sys.path.insert(0, 'mymodule.zip') import submodule.submodule1 a much cleaner way of thinking about this. -- Jonathan -- http://mail.python.org/mailman/listinfo/python-list

Re: postgresql plpython bug

2005-05-04 Thread Jonathan Ellis
tain datatypes. (Are you even returning a datetime class, or a string?) You could play around with strftime to try to get something postgresql will recognize, but it's probably easier to just return an epoch value which you can turn into a postgresql timestamp with the abstime function. -Jonathan -- http://mail.python.org/mailman/listinfo/python-list

Re: What are OOP's Jargons and Complexities?

2005-05-23 Thread Jonathan Bartlett
Mike Meyer wrote: > "Xah Lee" <[EMAIL PROTECTED]> writes: > > So now we find out that Xah Lee is as ignorant of other programming > languages as he is of Python and Perl. I think you're misreading some of what is being said. > Nested subroutines date back to Algol, which was first specified in >

Writing a bytecode interpreter (for TeX dvi files)

2005-05-26 Thread Jonathan Fine
erpreter? I am already aware of opcode.py and other modules in Python Language Services, in the Library Reference. Thanks. -- Jonathan http://texd.sourceforge.net -- http://mail.python.org/mailman/listinfo/python-list

Re: Capture close window button in Tkinter

2005-06-12 Thread Jonathan Ellis
William Gill wrote: > I am trying to make a simple data editor in Tkinter where each data > element has a corresponding Entry widget. I have tried to use the > FocusIn/FocusOut events to set a 'hasChanged' flag (if a record has not > changed, the db doesn't need updating). This seems to work fi

Packing a simple dictionary into a string - extending struct?

2007-06-20 Thread Jonathan Fine
nyone know of any related work? -- Jonathan Fine -- http://mail.python.org/mailman/listinfo/python-list

Re: Packing a simple dictionary into a string - extending struct?

2007-06-20 Thread Jonathan Fine
owing adoption of JSON in Ajax programming is a strong argument for my using it in my application, although I think I'd prefer something a little more binary. So it looks like I'll be using JSON. Thanks. Jonathan -- http://mail.python.org/mailman/listinfo/python-list

Re: Packing a simple dictionary into a string - extending struct?

2007-06-22 Thread Jonathan Fine
Jonathan Fine wrote: > Thank you for this suggestion. The growing adoption of JSON in Ajax > programming is a strong argument for my using it in my application, although > I think I'd prefer something a little more binary. > > So it looks like I'll be using JSON. W

Re: Packing a simple dictionary into a string - extending struct?

2007-06-22 Thread Jonathan Fine
ell-behaved too, a very elegant response to unpack(pack({})) Yes, you're right. An attempt to read bytes that aren't there. > # Try this: > blen = len(bytes) > while ptr < blen: > key, val, ptr = unpack_entry(bytes, ptr) > bytedict[key] = val >

Repeating Thread Error

2007-07-06 Thread Jonathan Shan
to fix the error? Also, do background processes run inside while loops? Thanks in advance, Jonathan Shan -- http://mail.python.org/mailman/listinfo/python-list

Re: Video: Professor of Physics Phd at Cal Tech says: 911 Inside Job

2007-04-24 Thread Jonathan Kirwan
On Wed, 25 Apr 2007 15:33:45 +1200, Gib Bogle <[EMAIL PROTECTED]> wrote: >When did the University of Iowa (Iowhere?) become CalTech. "Grabbe earned his PhD from Caltech in 1978. He is a graduate of Caltech, but has no current academic appointment there." So I read, anyway. Jon -- http://mail.p

Re: How to say $a=$b->{"A"} ||={} in Python?

2007-08-16 Thread Jonathan Gardner
On Aug 16, 3:35 pm, beginner <[EMAIL PROTECTED]> wrote: > > In perl it is just one line: $a=$b->{"A"} ||={}. > a = b.setdefault('A', {}) This combines all two actions together: - Sets b['A'] to {} if it is not already defined - Assigns b['A'] to a More info on dict methods here: http://docs.pyt

Array and floating point

2007-08-17 Thread Jonathan Shan
11612 >>> float("0.1") 0.10001 I'm expecting x[0] = 0.10001 Thanks Jonathan Shan -- http://mail.python.org/mailman/listinfo/python-list

Re: confused about why i get a type error when i call an object's method

2007-08-21 Thread Jonathan Gardner
On Aug 21, 11:07 am, [EMAIL PROTECTED] wrote: > I'm confused about why i get a type error when i call an object's > method. Here's the example code:>>> class Foo: > > def __init__(self): > self.foo = [] > def foo(self): > print "in foo!" > > >>> f =

Re: REGULAR EXPRESSION

2007-09-04 Thread Jonathan Gardner
On Sep 4, 6:32 am, AniNair <[EMAIL PROTECTED]> wrote: > hi.. I am trying to match '+ %&/-' etc using regular expression in > expressions like 879+34343. I tried \W+ but it matches only in the > beginning of the string Plz help Thanking you in advance... You may want to read the page describing

Re: parsing long `To' and 'Cc' from email

2007-09-06 Thread Jonathan Gardner
On Sep 6, 1:25 pm, Gerardo Herzig <[EMAIL PROTECTED]> wrote: > the email.* package dont seems to parse that kind of headers > `correctly'. What i want is to get a list with all the email address in > the `To' header. > > Someone know if there is a more sofisticated parser for doing this? > If you'

Re: initializing cooperative method

2007-09-06 Thread Jonathan Gardner
On Sep 6, 11:18 am, jelle <[EMAIL PROTECTED]> wrote: > Ai, calling super(Abstract) is just getting object, sure... > > However, I'm still curious to know if there's a good idiom for > repeating the argument in __init__ for the super(Concrete, > self).__init__ ? > If you don't know what the argumen

Re: getting the current function

2007-09-06 Thread Jonathan Gardner
On Sep 6, 8:43 am, Gary Robinson <[EMAIL PROTECTED]> wrote: > > I welcome feedback of any type. > This all seems a bit too complicated. Are you sure you want to do this? Maybe you need to step back and rethink your problem. Your example can be rewritten a number of different ways that are easier

Re: why should I learn python

2007-09-06 Thread Jonathan Gardner
On Sep 6, 2:32 pm, windandwaves <[EMAIL PROTECTED]> wrote: > Can someone tell me why I should learn python? I am a webdeveloper, > but I often see Python mentioned and I am curious to find out what I > am missing out on. The reason I use Python is because I get more done quicker with fewer bugs.

<    1   2   3   4   5   6   7   >