ANN: KeepNote 0.5.2 - Note taking and organization

2009-04-13 Thread rasmus
KeepNote is a simple cross-platform note taking program implemented in Python. I have been using it for my research and class notes, but it should be applicable to many note taking situations. KeepNote is ideal for storing your class notes, TODO lists, research notes, journal entries, paper

Pydev 1.4.5 Released

2009-04-13 Thread Fabio Zadrozny
Hi All, Pydev and Pydev Extensions 1.4.5 have been released Details on Pydev Extensions: http://www.fabioz.com/pydev Details on Pydev: http://pydev.sf.net Details on its development: http://pydev.blogspot.com Release Highlights in Pydev Extensions:

Re: OverflowError while sending large file via socket

2009-04-13 Thread Gabriel Genellina
En Sun, 12 Apr 2009 19:28:43 -0300, //phr...@nospam.invalid escribió: Ryniek90 rynie...@gmail.com writes: When i wanted to send an .iso file of 4GB length, i had traceback: OverflowError: requested number of bytes is more than a Python string can hold You're not supposed to put the 4GB all

Re: choosing background color in tkfiledialog.askopenfile()

2009-04-13 Thread Gabriel Genellina
En Sun, 12 Apr 2009 22:05:21 -0300, Soumen banerjee soume...@gmail.com escribió: I want to know how i can choose a background color in tkfiledialog.askopenfilename()? Due to a certain theme i am using, i cant see any text and changing the theme settings dont seem to affect the file dialog

Re: Regular Expression Help

2009-04-13 Thread Graham Breed
Jean-Claude Neveu wrote: Hello, I was wondering if someone could tell me where I'm going wrong with my regular expression. I'm trying to write a regexp that identifies whether a string contains a correctly-formatted currency amount. I want to support dollars, UK pounds and Euros, but the

Re: HTML Conversion in python

2009-04-13 Thread Gabriel Genellina
En Mon, 13 Apr 2009 02:47:30 -0300, venutaurus...@gmail.com venutaurus...@gmail.com escribió: Is there any library defined in Python which can convert a given text file into a html page. Basically, I require functions for creating tables or filling background colours for the html

Re: Generators/iterators, Pythonicity, and primes

2009-04-13 Thread Arnaud Delobelle
Duncan Booth duncan.bo...@invalid.invalid writes: Duncan Booth duncan.bo...@invalid.invalid wrote: John Posner jjpos...@snet.net wrote: Do know what in the itertools implementation causes adding a 'if p = sqrt(n)' clause to *decrease* performance, while adding a 'takewhile()' clause

Re: Data Model:

2009-04-13 Thread Anthony
On Apr 12, 9:36 pm, Aaron Brady castiro...@gmail.com wrote: On Apr 12, 10:33 pm, Anthony alantho...@gmail.com wrote: On Apr 12, 8:10 pm, Aaron Brady castiro...@gmail.com wrote: On Apr 12, 9:14 pm, Anthony alantho...@gmail.com wrote: I'm struggling on whether or not to implement

Re: ANN: PyGUI 2.0.1

2009-04-13 Thread roee shlomo
I can't run any of the tests on windows (pywin32-213, XP SP3, Python 2.6.1). 1. Had to change the first line in Applications.py to : import win32con as wc, win32ui as ui, win32clipboard as wcb, win32api as api Otherwise it gives me a DLL Import error. I have no idea why. 2. Import fails in

how to fit a gamma distribution

2009-04-13 Thread ning luwen
hi, i need to fit a gamma distribution, is there any module can do the job? luwen -- http://mail.python.org/mailman/listinfo/python-list

Re: Data Model:

2009-04-13 Thread Aaron Brady
On Apr 13, 2:29 am, Anthony alantho...@gmail.com wrote: On Apr 12, 9:36 pm, Aaron Brady castiro...@gmail.com wrote: On Apr 12, 10:33 pm, Anthony alantho...@gmail.com wrote: On Apr 12, 8:10 pm, Aaron Brady castiro...@gmail.com wrote: On Apr 12, 9:14 pm, Anthony alantho...@gmail.com

Re: Data Model:

2009-04-13 Thread Peter Otten
Anthony wrote: On Apr 12, 7:46 pm, Aaron Watters aaron.watt...@gmail.com wrote: On Apr 12, 10:14 pm, Anthony alantho...@gmail.com wrote: I'm struggling on whether or not to implement GroupItem (below) with two separate models, or with one model that has a distinguishing key: Given:

Re: GUI Programming

2009-04-13 Thread Gabriel
Gabriel wrote: Hello, I'm python newbie and i need to write gui for my school work in python. I need to write it really quick, because i haven't much time .) So question is, which of gui toolkits should i pick and learn? I heard PyGTK and Glade are best for quick gui programming? Is it good

Re: Definition of Pythonic?

2009-04-13 Thread Francesco Bochicchio
John Yeung ha scritto: On Apr 11, 10:08 am, Emmanuel Surleau emmanuel.surl...@gmail.com wrote: Having written a few trivial scripts in Python, I'm curious as to how you would sum up the Pythonic philosophy of development. A couple of others have already mentioned the Zen of Python, available

Using a decorator to *remove* parameters from a call

2009-04-13 Thread Michel Albert
A small foreword: This might look like a cherrypy-oriented post, and should therefore go to the cherrypy group, but if you read to the end, you'll see it's a more basic python problem, with cherrypy only as an example. ;) From the decorator PEP (318) I get it that you can /add/ parameters to a

Re: [ANN] Falcon - powering innovation

2009-04-13 Thread Gerhard Häring
Kless wrote: If anybody is interesed in new technologies, you'll love this new language called Falcon [1], which has been open sourced ago little time. Falcon is a scripting engine ready to empower mission-critical multithreaded applications. Mission-critical and empower sound like a good

Re: video capture in Python ?

2009-04-13 Thread Stef Mientki
Tim Roberts wrote: Stef Mientki stef.mien...@gmail.com wrote: has anyone got video capturing (from a webcam) successful running in a wxPython application under winXP ? I got some links, but it seems quit complicated to get everything installed, and all the packages you need don't

Re: Using a decorator to *remove* parameters from a call

2009-04-13 Thread Aaron Brady
On Apr 13, 5:11 am, Michel Albert exh...@gmail.com wrote: A small foreword: This might look like a cherrypy-oriented post, and should therefore go to the cherrypy group, but if you read to the end, you'll see it's a more basic python problem, with cherrypy only as an example. ;) From the

Re: numpy permutations with replacement

2009-04-13 Thread Chris Rebert
On Mon, Apr 13, 2009 at 4:05 AM, skorpi...@gmail.com skorpi...@gmail.com wrote: I am trying to generate all possible permutations of length three from elements of [0,1]. i.e in this scenario there are a total of 8 distinct permutations: [0,0,0] [0,0,1] [0,1,0]    .    .    . [1,1,1]

Re: regex for multiple whitespace-only lines

2009-04-13 Thread MRAB
Phil Mayes wrote: I am trying to search for 1 or more empty or white-space-only lines. Empty lines work: re.compile('(?m)(^$){1,2}') _sre.SRE_Pattern object at 0x010F9218 One line with possible whitespace works: re.compile('(?m)(^\s*$)') _sre.SRE_Pattern object at 0x010F7860 Multiple lines

Re: [ANN] Falcon - powering innovation

2009-04-13 Thread Tim Chase
Gerhard Häring wrote: Kless wrote: If anybody is interesed in new technologies, you'll love this new language called Falcon [1], which has been open sourced ago little time. Falcon is a scripting engine ready to empower mission-critical multithreaded applications. Mission-critical and

Re: numpy permutations with replacement

2009-04-13 Thread skorpi...@gmail.com
On Apr 13, 7:13 am, Chris Rebert c...@rebertia.com wrote: On Mon, Apr 13, 2009 at 4:05 AM, skorpi...@gmail.com skorpi...@gmail.com wrote: I am trying to generate all possible permutations of length three from elements of [0,1]. i.e in this scenario there are a total of 8 distinct

Re: Using a decorator to *remove* parameters from a call

2009-04-13 Thread Jon Clements
On 13 Apr, 11:11, Michel Albert exh...@gmail.com wrote: A small foreword: This might look like a cherrypy-oriented post, and should therefore go to the cherrypy group, but if you read to the end, you'll see it's a more basic python problem, with cherrypy only as an example. ;) From the

numpy permutations with replacement

2009-04-13 Thread skorpi...@gmail.com
I am trying to generate all possible permutations of length three from elements of [0,1]. i.e in this scenario there are a total of 8 distinct permutations: [0,0,0] [0,0,1] [0,1,0] . . . [1,1,1] Does numpy define a function to achieve this ? Thanks in advance --

Re: Generators/iterators, Pythonicity, and primes

2009-04-13 Thread Aaron Brady
On Apr 13, 1:39 am, Arnaud Delobelle arno...@googlemail.com wrote: Duncan Booth duncan.bo...@invalid.invalid writes: Duncan Booth duncan.bo...@invalid.invalid wrote: John Posner jjpos...@snet.net wrote: Do know what in the itertools implementation causes adding a 'if p = sqrt(n)' clause

Re: [ANN] Falcon - powering innovation

2009-04-13 Thread Andrii V. Mishkovskyi
On Sat, Apr 11, 2009 at 4:11 PM, Kless jonas@googlemail.com wrote: [skipped buzzwords] [1] http://www.falconpl.org/ [2] http://www.computerworld.com.au/article/298655/-z_programming_languages_falcon?fp=2fpid= And this table should make you even more interested in Falcon (also called THE

Re: Using a decorator to *remove* parameters from a call

2009-04-13 Thread Michel Albert
On Apr 13, 12:52 pm, Jon Clements jon...@googlemail.com wrote: On 13 Apr, 11:11, Michel Albert exh...@gmail.com wrote: A small foreword: This might look like a cherrypy-oriented post, and should therefore go to the cherrypy group, but if you read to the end, you'll see it's a more basic

Re: Using a decorator to *remove* parameters from a call

2009-04-13 Thread Michel Albert
On Apr 13, 12:45 pm, Aaron Brady castiro...@gmail.com wrote: On Apr 13, 5:11 am, Michel Albert exh...@gmail.com wrote: A small foreword: This might look like a cherrypy-oriented post, and should therefore go to the cherrypy group, but if you read to the end, you'll see it's a more basic

Re: download robot

2009-04-13 Thread Kushal Kumaran
On Mon, Apr 13, 2009 at 11:13 AM, larryzhang zhangle2...@gmail.com wrote: Hi, Being a newbie for Python, I am trying to write a code that can act as a downloading robot. This might be useful: http://wwwsearch.sourceforge.net/mechanize/. I've only casually gone through the page, not actually

Re: video capture in Python ?

2009-04-13 Thread Tino Wildenhain
Hi Stef, Stef Mientki wrote: ... videocapture webcamwatcher opencv libvidcap hdpvrassistent they didn't run at all or they crashed within 10 seconds :-( The most promissing looks videocapture, but that also crashes within 10 seconds. Video capture is not a trivial task. to be more exactly,

Re: HTML Conversion in python

2009-04-13 Thread Aaron Watters
On Apr 13, 1:47 am, venutaurus...@gmail.com venutaurus...@gmail.com wrote: Hello All, Is there any library defined in Python which can convert a given text file into a html page. Basically, I require functions for creating tables or filling background colours for the html pages etc

Re: how to fit a gamma distribution

2009-04-13 Thread Kushal Kumaran
On Mon, Apr 13, 2009 at 1:40 PM, ning luwen ninglu...@gmail.com wrote: hi,  i need to fit a gamma distribution, is there any module can do the job? Did you try google? Searching for python curve fitting returns some promising results. -- kushal --

Re: Using a decorator to *remove* parameters from a call

2009-04-13 Thread azeem
On Apr 13, 3:45 pm, Aaron Brady castiro...@gmail.com wrote: On Apr 13, 5:11 am, Michel Albert exh...@gmail.com wrote: A small foreword: This might look like a cherrypy-oriented post, and should therefore go to the cherrypy group, but if you read to the end, you'll see it's a more basic

Python inside C++

2009-04-13 Thread AJ Mayorga
Hello all, I am looking for a way to statically compile pythonxx.dll into my C++ application, so that I can use It as an internal scripting language and either run the native python code or take an ELF from py2exe/pyinstaller and run that. The machines that will have my C++ app running on

Re: Python inside C++

2009-04-13 Thread Kushal Kumaran
On Wed, Apr 15, 2009 at 8:56 AM, AJ Mayorga a...@xernova.com wrote: Hello all, I am looking for a way  to statically compile pythonxx.dll into my C++ application, so that I can use It as an internal scripting language and either run the native python code or take an ELF from

Re: ANN: PyGUI 2.0.1

2009-04-13 Thread user
Greg Ewing wrote: PyGUI 2.0.1 is available: http://www.cosc.canterbury.ac.nz/greg.ewing/python_gui/ Fixes some problems in setup.py affecting installation on Linux and Windows. What is PyGUI? -- PyGUI is a cross-platform GUI toolkit designed to be lightweight and have a highly

Re: Using a decorator to *remove* parameters from a call

2009-04-13 Thread Aaron Brady
On Apr 13, 8:25 am, azeem quadri.az...@gmail.com wrote: On Apr 13, 3:45 pm, Aaron Brady castiro...@gmail.com wrote: snip @take_ab def f( c= 42, d= 'some' ):     print( 'in f, c= %r, d= %r'% ( c, d ) ) f( a= 'paramA', b= 'paramB', c= 'other number' ) /Output: aval 'paramA' and bval

Re: Python inside C++

2009-04-13 Thread Aaron Brady
On Apr 13, 8:41 am, Kushal Kumaran kushal.kuma...@gmail.com wrote: On Wed, Apr 15, 2009 at 8:56 AM, AJ Mayorga a...@xernova.com wrote: Hello all, I am looking for a way  to statically compile pythonxx.dll into my C++ application, so that I can use It as an internal scripting language and

Can I replace this for loop with a join?

2009-04-13 Thread WP
Hello, I have dictionary {1:astring, 2:anotherstring, etc} I now want to print: Press 1 for astring Press 2 for anotherstring etc I could do it like this: dict = {1:'astring', 2:'anotherstring'} for key in dict.keys(): print 'Press %i for %s' % (key, dict[key]) Press 1 for astring Press 2

Re: sharing/swapping items between lists

2009-04-13 Thread Ross
On Apr 11, 1:10 pm, a...@pythoncraft.com (Aahz) wrote: In article 4fd78ac3-ba83-456b-b768-3a0043548...@f19g2000vbf.googlegroups.com, Ross  ross.j...@gmail.com wrote: I'm trying to design an iterator that produces two lists. The first list will be a list of unique pairings and the second

Re: Can I replace this for loop with a join?

2009-04-13 Thread Kushal Kumaran
On Mon, Apr 13, 2009 at 8:33 PM, WP no.i.d...@want.mail.from.spammers.com wrote: Hello, I have dictionary {1:astring, 2:anotherstring, etc} I now want to print: Press 1 for astring Press 2 for anotherstring etc I could do it like this: dict = {1:'astring', 2:'anotherstring'} for key in

Re: Can I replace this for loop with a join?

2009-04-13 Thread Tim Chase
WP wrote: Hello, I have dictionary {1:astring, 2:anotherstring, etc} I now want to print: Press 1 for astring Press 2 for anotherstring etc I could do it like this: dict = {1:'astring', 2:'anotherstring'} for key in dict.keys(): print 'Press %i for %s' % (key, dict[key]) Press 1 for

Re: Can I replace this for loop with a join?

2009-04-13 Thread Nicolas Dandrimont
* WP no.i.d...@want.mail.from.spammers.com [2009-04-13 17:03:17 +0200]: Hello, I have dictionary {1:astring, 2:anotherstring, etc} I now want to print: Press 1 for astring Press 2 for anotherstring etc I could do it like this: dict = {1:'astring', 2:'anotherstring'} for key in

wxpython question

2009-04-13 Thread isam uraiqat
hello fellow geeks i am trying to run the demo for wxpython, and once i click on it i get the sand clock coming up for a second and then that's it, it is not running no matter what i do. i tried it on another computer and im getting the same thing! it used to work earlier i dont know what

Imports in python are static, any solution?

2009-04-13 Thread Ravi
foo.py : i = 10 def fi(): global i i = 99 bar.py : import foo from foo import i print i, foo.i foo.fi() print i, foo.i This is problematic. Well I want i to change with foo.fi() . -- http://mail.python.org/mailman/listinfo/python-list

RE:wxpython question

2009-04-13 Thread isam uraiqat
I HATE VISTA!! it just needed to be installed on the site packages library, because it was installed by default on program files, hope this might help another poor vista user cheers -- http://mail.python.org/mailman/listinfo/python-list

Re: sharing/swapping items between lists

2009-04-13 Thread Aahz
In article c569228f-f391-4317-83a2-08621c601...@r8g2000yql.googlegroups.com, Ross ross.j...@gmail.com wrote: I'm sorry...my example was probably a bad one. A better example of output I would like would be something like [[1,2],[3,4],[5,6]] and then for the leftovers list [7,8,9,10 etc]. What I'm

Re: possible pairings in a set

2009-04-13 Thread Przemyslaw Kaminski
Ross wrote: I'm new to python and I'm trying to come up with a function that takes a given number of players in a game and returns all possible unique pairings. Here's the code I've come up with so far, but I'm not getting the output I'd like to: def all_pairings(players): cleanlist = []

Re: Imports in python are static, any solution?

2009-04-13 Thread Luis Alberto Zarrabeitia Gomez
Quoting Ravi ra.ravi@gmail.com: This is problematic. Well I want i to change with foo.fi() . You can't. i and foo.i are _different_ variables that just happen to share the same value initially. What you are observing is no different than i = 10 j = i i = 99 print i # prints 99 print j

Re: Imports in python are static, any solution?

2009-04-13 Thread David Stanek
On Mon, Apr 13, 2009 at 11:59 AM, Ravi ra.ravi@gmail.com wrote: foo.py :    i = 10   def fi():      global i      i = 99 bar.py :    import foo    from foo import i    print i, foo.i    foo.fi()    print i, foo.i This is problematic. Well I want i to change with foo.fi() .

RE: Imports in python are static, any solution?

2009-04-13 Thread AJ Mayorga
For something like this I generally create a superclass to hold configuration variables that will change overtime, doing that will save you from insanity. Class configVar: #set initial values Def __init__(self): Self.A = 5 Self.B = 10

tkFileDialog - ImportError: No module named shell

2009-04-13 Thread Alan G Isaac
Why do I get the ImportError below? What is the right way to do this? Thanks, Alan Isaac Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit (Intel)] on win32 Type help, copyright, credits or license for more information. import Tkinter as tk root=tk.Tk() import

sending and receiving ipv6 multicasts

2009-04-13 Thread Kai Timmer
I am trying to send and receive packages via an ipv6 multicast. But I can't get it working. What I thought was, that on the listener site, I just need to bind my socket to the interfaces ipv6 local link address and on the sender site, to the multicast address (in my case ff02::). That doesn't work

Who is your daddy: Can I find what object instantiates another object?

2009-04-13 Thread hubritic
I want to build a parser object that handles two different log file formats. I have an object that handles Connection logs and an object for Filter logs. Each will instantiate a Parser object, passing in the path to individual log files. There are a number of ways I could figure out whether I

Re: Who is your daddy: Can I find what object instantiates another object?

2009-04-13 Thread Jean-Paul Calderone
On Mon, 13 Apr 2009 09:53:04 -0700 (PDT), hubritic colinland...@gmail.com wrote: I want to build a parser object that handles two different log file formats. I have an object that handles Connection logs and an object for Filter logs. Each will instantiate a Parser object, passing in the path

Re: Who is your daddy: Can I find what object instantiates another object?

2009-04-13 Thread Diez B. Roggisch
hubritic schrieb: I want to build a parser object that handles two different log file formats. I have an object that handles Connection logs and an object for Filter logs. Each will instantiate a Parser object, passing in the path to individual log files. There are a number of ways I could

Re: numpy permutations with replacement

2009-04-13 Thread Mensanator
On Apr 13, 6:36 am, skorpi...@gmail.com skorpi...@gmail.com wrote: On Apr 13, 7:13 am, Chris Rebert c...@rebertia.com wrote: On Mon, Apr 13, 2009 at 4:05 AM, skorpi...@gmail.com skorpi...@gmail.com wrote: I am trying to generate all possible permutations of length three from

Re: sending and receiving ipv6 multicasts

2009-04-13 Thread Martin v. Löwis
Kai Timmer wrote: I am trying to send and receive packages via an ipv6 multicast. But I can't get it working. What I thought was, that on the listener site, I just need to bind my socket to the interfaces ipv6 local link address and on the sender site, to the multicast address (in my case

Re: Data Model:

2009-04-13 Thread Anthony
On Apr 13, 1:26 am, Peter Otten __pete...@web.de wrote: Anthony wrote: On Apr 12, 7:46 pm, Aaron Watters aaron.watt...@gmail.com wrote: On Apr 12, 10:14 pm, Anthony alantho...@gmail.com wrote: I'm struggling on whether or not to implement GroupItem (below) with two separate models, or

Re: Who is your daddy: Can I find what object instantiates another object?

2009-04-13 Thread Aahz
In article 74ha3lf10bj9...@mid.uni-berlin.de, Diez B. Roggisch de...@nospam.web.de wrote: hubritic schrieb: Can the Parser object know who its Daddy is? Yes, by Daddy telling him so. That's how nature does it, and how you should do it. Or do you think that because DNA-tests are available to

cx_Oracle - DLL load failed

2009-04-13 Thread cwurld
Hi, I am having some trouble getting cx_Oracle to work. When I try to import cx_Oracle, I get the following error message: ImportError: DLL load failed: %1 is not a valid Win32 application. I am using Python 2.6 on WIndows. Oracle Client 10g. Any ideas? Thanks --

Re: numpy permutations with replacement

2009-04-13 Thread skorpi...@gmail.com
On Apr 13, 1:17 pm, Mensanator mensana...@aol.com wrote: On Apr 13, 6:36 am, skorpi...@gmail.com skorpi...@gmail.com wrote: On Apr 13, 7:13 am, Chris Rebert c...@rebertia.com wrote: On Mon, Apr 13, 2009 at 4:05 AM, skorpi...@gmail.com skorpi...@gmail.com wrote: I am trying to

Re: zProblem

2009-04-13 Thread norseman
Gabriel Genellina wrote: En Fri, 10 Apr 2009 21:14:01 -0300, norseman norse...@hughes.net escribió: norseman wrote: Gabriel Genellina wrote: En Fri, 10 Apr 2009 14:50:57 -0300, norseman norse...@hughes.net escribió: ...(snip) I didn't understand what your problem is actually.

Re: zProblem

2009-04-13 Thread norseman
Steven D'Aprano wrote: On Fri, 10 Apr 2009 10:50:57 -0700, norseman wrote: Moderator: I apologize for attaching anything. This newsgroup has no moderator. However, in order to explain my problem, I need to control the font since text graphics only work for a given font. Use the least

Re: tkFileDialog - ImportError: No module named shell

2009-04-13 Thread Mike Driscoll
On Apr 13, 11:26 am, Alan G Isaac alan.is...@gmail.com wrote: Why do I get the ImportError below? What is the right way to do this? Thanks, Alan Isaac Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit (Intel)] on win32 Type help, copyright, credits or license for more

Re: GUI Programming

2009-04-13 Thread norseman
Gabriel wrote: r wrote: On Apr 12, 8:07 am, Gabriel dun...@dreams.sk wrote: Hello, I'm python newbie and i need to write gui for my school work in python. I need to write it really quick, [snip] Tkinter is built-in, why not start there? from Tkinter import * root = Tk()

Re: Python and XML Help

2009-04-13 Thread Scott David Daniels
ookrin wrote: I'm in the process of learning python and PyQt4. I had decided to make myself a simple app and soon discovered that I needed to crash into xml to use some of the data I was going to be getting off of the server. I picked up enough xml to use the sax parser to get the data out of

REG: python c++ bindings

2009-04-13 Thread ext-golla.anil-ku...@nokia.com
Hi I need some material or link contain examples on python C++ bindings( calling C++ methods in python) Can any body share the information. Thanks, Anil kumar. -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: PyGUI 2.0.1

2009-04-13 Thread Andrew MacKeith
Greg Ewing wrote: PyGUI 2.0.1 is available: http://www.cosc.canterbury.ac.nz/greg.ewing/python_gui/ Fixes some problems in setup.py affecting installation on Linux and Windows. What is PyGUI? -- PyGUI is a cross-platform GUI toolkit designed to be lightweight and have a

Re: Detecting -i in a script

2009-04-13 Thread Marek Szuba
On 2009-04-13, Chris Rebert c...@rebertia.com wrote: The sys.flags.interactive bool. Details: http://docs.python.org/library/sys.html#sys.flags Hmm, New in version 2.6... Are you aware of any way of extracting this information in older versions of Python? My code needs to be 2.3-compatible.

Re: cx_Oracle - DLL load failed

2009-04-13 Thread Martin P. Hellwig
cwurld wrote: Hi, I am having some trouble getting cx_Oracle to work. When I try to import cx_Oracle, I get the following error message: ImportError: DLL load failed: %1 is not a valid Win32 application. I am using Python 2.6 on WIndows. Oracle Client 10g. Any ideas? Thanks Hmm some time

Re: tkFileDialog - ImportError: No module named shell

2009-04-13 Thread Alan G Isaac
On Apr 13, 11:26 am, Alan G Isaac alan.is...@gmail.com wrote: Why do I get the ImportError below? What is the right way to do this? Thanks, Alan Isaac Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit (Intel)] on win32 Type help, copyright, credits or license for more

Re: Detecting -i in a script

2009-04-13 Thread Chris Rebert
On Mon, Apr 13, 2009 at 12:09 PM, Marek Szuba mare...@fake.address wrote: Hello there, Is there any way of detecting in a script whether the interpreter session running it has been launched with the -i option? My Google fu has failed me on this subject... Thanks in advance. The

Re: REG: python c++ bindings

2009-04-13 Thread Diez B. Roggisch
ext-golla.anil-ku...@nokia.com schrieb: Hi Please don't reply to existing posts. People read news and mails threaded, and this makes a post appear below other, non-related posts causes confusion. Create a new thread instead, by directly posting to the group or ML. I need some

Re: tkFileDialog - ImportError: No module named shell

2009-04-13 Thread Mike Driscoll
On Apr 13, 2:29 pm, Alan G Isaac alan.is...@gmail.com wrote: On Apr 13, 11:26 am, Alan G Isaac alan.is...@gmail.com wrote: Why do I get the ImportError below? What is the right way to do this? Thanks, Alan Isaac Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit

Detecting -i in a script

2009-04-13 Thread Marek Szuba
Hello there, Is there any way of detecting in a script whether the interpreter session running it has been launched with the -i option? My Google fu has failed me on this subject... Thanks in advance. -- MS -- http://mail.python.org/mailman/listinfo/python-list

Re: binary file compare...

2009-04-13 Thread Przemyslaw Kaminski
SpreadTooThin wrote: I want to compare two binary files and see if they are the same. I see the filecmp.cmp function but I don't get a warm fuzzy feeling that it is doing a byte by byte comparison of two files to see if they are they same. What should I be using if not filecmp.cmp? Well,

Re: binary file compare...

2009-04-13 Thread SpreadTooThin
On Apr 13, 2:00 pm, Przemyslaw Kaminski cge...@gmail.com wrote: SpreadTooThin wrote: I want to compare two binary files and see if they are the same. I see the filecmp.cmp function but I don't get a warm fuzzy feeling that it is doing a byte by byte comparison of two files to see if they

Re: binary file compare...

2009-04-13 Thread Grant Edwards
On 2009-04-13, SpreadTooThin bjobrie...@gmail.com wrote: I want to compare two binary files and see if they are the same. I see the filecmp.cmp function but I don't get a warm fuzzy feeling that it is doing a byte by byte comparison of two files to see if they are they same. Perhaps I'm

Re: Overflow error (was Vol 67, Issue 192)

2009-04-13 Thread Scott David Daniels
Dave Angel wrote: Ryniek90 wrote: But i've still haven't got answer for question: What's the max. length of string bytes which Python can hold? sys.maxsize The largest positive integer supported by the platform’s Py_ssize_t type, and thus the maximum size lists, strings, dicts, and many

Re: binary file compare...

2009-04-13 Thread SpreadTooThin
On Apr 13, 2:03 pm, Grant Edwards inva...@invalid wrote: On 2009-04-13, SpreadTooThin bjobrie...@gmail.com wrote: I want to compare two binary files and see if they are the same. I see the filecmp.cmp function but I don't get a warm fuzzy feeling that it is doing a byte by byte comparison

Re: Imports in python are static, any solution?

2009-04-13 Thread norseman
AJ Mayorga wrote: For something like this I generally create a superclass to hold configuration variables that will change overtime, doing that will save you from insanity. Class configVar: #set initial values Def __init__(self): Self.A = 5

Re: GUI Programming

2009-04-13 Thread Lawson English
Gabriel wrote: Hello, I'm python newbie and i need to write gui for my school work in python. I need to write it really quick, because i haven't much time .) So question is, which of gui toolkits should i pick and learn? I heard PyGTK and Glade are best for quick gui programming? Is it good

PIL, and Parts of tuples

2009-04-13 Thread Vistro
I have two problems, and I can't find anything about either of them. The first is that PIL does not seem to have any way to search each and every pixel for a value, like for pixel in img: if pixel = ((60, 30), (58, 23), (87 57)): # Get out of the for loop # Also, save the

Re: binary file compare...

2009-04-13 Thread Grant Edwards
On 2009-04-13, Grant Edwards inva...@invalid wrote: On 2009-04-13, SpreadTooThin bjobrie...@gmail.com wrote: I want to compare two binary files and see if they are the same. I see the filecmp.cmp function but I don't get a warm fuzzy feeling that it is doing a byte by byte comparison of two

Re: PIL, and Parts of tuples

2009-04-13 Thread Chris Rebert
On Mon, Apr 13, 2009 at 1:34 PM, Vistro vis...@vistro.net wrote: I have two problems, and I can't find anything about either of them. The first is that PIL does not seem to have any way to search each and every pixel for a value, like for pixel in img:     if pixel = ((60, 30), (58, 23), (87

Re: PIL, and Parts of tuples

2009-04-13 Thread Vistro
Actually, I screwed up. See 60, 30? That's actually the range. The tuple to be checked will look like (40, 25, 51) So yeah. Sorry for the bad info. For a good time, go to Start:Run and type in format Chttp://www.vistro.net/ On Mon, Apr 13, 2009 at 3:41 PM,

Re: binary file compare...

2009-04-13 Thread SpreadTooThin
On Apr 13, 2:37 pm, Grant Edwards inva...@invalid wrote: On 2009-04-13, Grant Edwards inva...@invalid wrote: On 2009-04-13, SpreadTooThin bjobrie...@gmail.com wrote: I want to compare two binary files and see if they are the same. I see the filecmp.cmp function but I don't get a warm

How to run jython WSGI applications on Google AppEngine.

2009-04-13 Thread Alan Kennedy
Hi all, You can find instructions about how to run jython Web applications on Google AppEngine, using WSGI and modjy, here. http://jython.xhaus.com You can see the jython 2.5 Demo WSGI application running, here. http://jywsgi.appspot.com Regards, Alan Kennedy. --

Re: binary file compare...

2009-04-13 Thread Peter Otten
Grant Edwards wrote: On 2009-04-13, Grant Edwards inva...@invalid wrote: On 2009-04-13, SpreadTooThin bjobrie...@gmail.com wrote: I want to compare two binary files and see if they are the same. I see the filecmp.cmp function but I don't get a warm fuzzy feeling that it is doing a byte by

How to convert \n and \t symbols to new lines and tabs?

2009-04-13 Thread DSblizzard
How to convert string with \n and \t symbols to natural string - with new lines and tabs? -- http://mail.python.org/mailman/listinfo/python-list

Re: ValueError: I/O operation on closed file

2009-04-13 Thread dj
On Apr 11, 12:30 am, Dennis Lee Bieber wlfr...@ix.netcom.com wrote: On Fri, 10 Apr 2009 13:25:25 -0700 (PDT), dj d.a.aberna...@gmail.com declaimed the following in gmane.comp.python.general: I have a handler which I use with a set of log levels for the python logging module.

Re: How to convert \n and \t symbols to new lines and tabs?

2009-04-13 Thread MRAB
DSblizzard wrote: How to convert string with \n and \t symbols to natural string - with new lines and tabs? You'll need to explain what you mean. A string literal represents newline and tab with \n and \t. Are you talking about that, or does the string actually contain the characters \n and

Re: Who is your daddy: Can I find what object instantiates another object?

2009-04-13 Thread Steven D'Aprano
On Mon, 13 Apr 2009 19:12:21 +0200, Diez B. Roggisch wrote: Can the Parser object know who its Daddy is? Yes, by Daddy telling him so. That's how nature does it, and how you should do it. Or do you think that because DNA-tests are available to us we should just put all kids into a big pool

Re: Who is your daddy: Can I find what object instantiates another object?

2009-04-13 Thread Aaron Brady
On Apr 13, 6:50 pm, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: On Mon, 13 Apr 2009 19:12:21 +0200, Diez B. Roggisch wrote: Can the Parser object know who its Daddy is? Yes, by Daddy telling him so. That's how nature does it, and how you should do it. Or do you think that

Re: binary file compare...

2009-04-13 Thread Steven D'Aprano
On Mon, 13 Apr 2009 15:03:32 -0500, Grant Edwards wrote: On 2009-04-13, SpreadTooThin bjobrie...@gmail.com wrote: I want to compare two binary files and see if they are the same. I see the filecmp.cmp function but I don't get a warm fuzzy feeling that it is doing a byte by byte comparison

Re: Detecting -i in a script

2009-04-13 Thread Static Vagabond
I think getopt will help you achieve what you need. http://docs.python.org/library/getopt.html Here's a quick example: import getopt import sys try: opts, args = getopt.getopt(sys.argv[1:], -i:vo:vhb?) except getopt.GetoptError, err: helpCommand() # defined elsewhere. sys.exit()

Re: PEP 3143 and daemon process

2009-04-13 Thread Ben Finney
On 13-Apr-2009, Alfredo Deza wrote: By compliant, I do mean to reference PEP 3143 for building the app. I'm still not sure what you mean by this. I can only assume you mean that your program will assume the existence of a PEP 3143 implementation (like the ‘python-daemon’ library), and your

Re: Detecting -i in a script

2009-04-13 Thread Chris Rebert
Marek Szuba wrote: On 2009-04-13, Chris Rebert c...@rebertia.com wrote: The sys.flags.interactive bool. Details: http://docs.python.org/library/sys.html#sys.flags Hmm, New in version 2.6... Are you aware of any way of extracting this information in older versions of Python? My code needs

Re: PEP 3143 and daemon process

2009-04-13 Thread Alfredo Deza
On Mon, Apr 13, 2009 at 8:33 PM, Ben Finney ben+pyt...@benfinney.id.auben%2bpyt...@benfinney.id.au wrote: On 13-Apr-2009, Alfredo Deza wrote: By compliant, I do mean to reference PEP 3143 for building the app. I'm still not sure what you mean by this. I can only assume you mean that your

  1   2   >