Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-17 Thread Brad
data, which you may find preferable to an ugly crash. OTOH, bugs that cause spectacular failures tend to be discovered. You can also initialize the stack memory with a pattern like 0xDEAD and then after sufficiently exercising the code, examine the memory contents to see the "high water mark

Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-21 Thread Brad
p.lang.forth have a penchant for sarcasm - one of the reasons I always read their posts. Maybe it gets lost on the international crowd, but I love it. -Brad -- http://mail.python.org/mailman/listinfo/python-list

Re: Sequence splitting

2009-07-02 Thread Brad
or (x,y) in xs if not y) >       return (t, f) In my testing that is 3.5x slower than the original solution (and less clear imo). I fixed my version to take a bool default. Either way, I'm not really looking for additional ways to do this in Python unless I've totally missed something

Re: Sequence splitting

2009-07-02 Thread Brad
On Jul 2, 8:17 pm, "Pablo Torres N." wrote: > On Jul 2, 9:56 pm, schickb wrote: > > > I have fairly often found the need to split a sequence into two groups > > based on a function result. > > This sounds like it belongs to the python-ideas list.  I suggest > posting there for better feedback, si

Re: Sequence splitting

2009-07-02 Thread Brad
On Jul 2, 9:08 pm, Paul Rubin <http://phr...@nospam.invalid> wrote: > Brad writes: > > On Jul 2, 8:14 pm, Paul Rubin <http://phr...@nospam.invalid> wrote: > > > schickb writes: > > > > def split(seq, func=None): > > > >     if func

Re: Sequence splitting

2009-07-02 Thread Brad
the solution here would worse if func was more complex. Either way, what I am still wondering is if people would find a built- in implementation useful? -Brad -- http://mail.python.org/mailman/listinfo/python-list

Re: Sequence splitting

2009-07-02 Thread Brad
You are not allowed to post to this mailing list" reply. Perhaps because I am posting through Google groups? Or maybe one must be an approved member to post? -Brad -- http://mail.python.org/mailman/listinfo/python-list

Re: Sequence splitting

2009-07-03 Thread Brad
g = partition(words, lambda w: len(w) < 3) d = {1 : 'w', 2 : 'x' ,3 : 'y' ,4 : 'z'} keys = [1, 3, 4, 9] found, missing = partition(keys, d.has_key) There are probably a dozen other approaches, but the existing "filter" is fast, clear, and *almos

Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-26 Thread Brad
On Aug 25, 4:05 am, Alex McDonald wrote: > Your example of writing code with > memory leaks *and not caring because it's a waste of your time* makes > me think that you've never been a programmer of any sort. "Windows applications are immune from memory leaks since programmers can count on regula

signed to unsigned

2012-02-17 Thread Brad Tilley
In C or C++, I can do this for integer conversion: unsigned int j = -327681234; // Notice this is signed. j will equal 3967286062. I thought with Python that I could use struct to pack the signed int as an unsigned int, but that fails: >>> x = struct.pack("", line 1, in struct.error: integer ou

Re: signed to unsigned

2012-02-17 Thread Brad Tilley
gt; >>> unpack('=I', pack('=i',-327681234)) > > (3967286062,) > > I would think there's some more efficient way to do this though. > > Cheers, > Chris Thanks Chris! I was doing it backwards. I only have a few of these right now, so performance isn't a concern. I appreciate the advice. Brad -- http://mail.python.org/mailman/listinfo/python-list

Re: signed to unsigned

2012-02-17 Thread Brad Tilley
> >>> 0x & -327681234 > > 3967286062 Very nice! Thanks for that example. Unsigned long longs: 0x & -9151314442815602945 9295429630893948671L -- http://mail.python.org/mailman/listinfo/python-list

Python SIG for Healthcare IT

2011-03-11 Thread Brad Allen
For those seeking to work with Python-based tools in the healthcare IT industry, this SIG ("special interest group") can provide a forum to discuss challenges and hopefully foster knowledge sharing and tools development. Relevant topics include tools for working with healthcare standard data format

RE: Python Tools for Visual Studio from Microsoft - Free & Open Source

2011-03-13 Thread Brad Davies
> From: pa...@cruzio.com > To: santacruz-...@hotmail.com > Subject: Fw: Python Tools for Visual Studio from Microsoft - Free & Open > Source > Date: Thu, 10 Mar 2011 18:47:19 -0800 > > > - Original Message - > From: > To: "roland garros" ; > Sent: Thursday, March 10, 2011 2:03 AM >

python 3 - instantiating class from user input

2011-04-06 Thread Brad Bailey
I dont understand why this is such a big deal. Nor do i understand why google can't find a reasonable answer. If one can't figure out from the title what I'm trying to do, then a look at code should firmly plant the intent. The general idea of the code is, in my opinion, very basic. I notice,

Re: problem running a python script using apache,mod_python on linux

2005-10-19 Thread Brad Teale
eInfo > > > *** > I m using a .htaccess file placed under Apache2/htdocs/test/ > The .htaccess file has the following code > ** > AddHandler mod_python .py > PythonHandler mptest > PythonDebug On > ** I didn't see anything else that jumps out. Brad -- http://mail.python.org/mailman/listinfo/python-list

Re: Scriptomatic 2.0

2005-01-17 Thread Brad Clements
If you stick an 's' into the URI, so it's https:// you'll get a certificate warning from FireFox. Looks like MS is running a self-signed certificate on www.microsoft.com weird. really -- Novell DeveloperNet Sysop #5 _ "Do Re Mi chel La Si Do" <[EMAIL PROTECTED]> wrote in message news:[EMAIL P

Re: Python UPS / FedEx Shipping Module

2005-02-14 Thread Brad Clements
_ "Gabriel Cooper" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > >Are the modules just accessing the published apis for their webservices? > Yes, they use the free API's that have always been freely available. > They're just *Impossible* to find on either of UPS's OR FedEx's > we

Re: Leo 4.3-a3 Outlining IDE

2005-02-26 Thread Brad Clements
FYI, After install and you run it for the first time (and if it asks for your initials), then expect the plug-in manager to throw a bad window name error in TK. You must exit, then restart Leo before running the plugin manager after the initial install. -- Novell DeveloperNet Sysop #5 -- h

module imports and memory usage

2004-11-30 Thread Brad Tilley
script that currently uses ~ 10MB of memory if anyone is interested. Thanks, Brad -- http://mail.python.org/mailman/listinfo/python-list

Re: module imports and memory usage

2004-11-30 Thread Brad Tilley
Jp Calderone wrote: On Tue, 30 Nov 2004 10:02:27 -0500, Brad Tilley <[EMAIL PROTECTED]> wrote: When memory usage is a concern, is it better to do: from X import Y or import X There is no difference. If you are concerned about memory usage, you probably need to take a look at th

Re: module imports and memory usage

2004-11-30 Thread Brad Tilley
Brad Tilley wrote: When memory usage is a concern, is it better to do: from X import Y or import X Also, is there a way to load and unload modules as they are needed. I have some scripts that sleep for extended periods during a while loop and I need to be as memory friendly as possible. I can

Python 2.4 Uninstall Entry in WinXP Registry

2004-11-30 Thread Brad Tilley
rom uninstalling the software accidentally. Python 2.4 does not use this registry entry on the two machines I have installed it on... any tips on how to locate this? Thanks, Brad -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 2.4 Uninstall Entry in WinXP Registry

2004-12-01 Thread Brad Tilley
Martin v. Löwis wrote: Brad Tilley wrote: Python 2.3 placed a registry key under: 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Python2.3' [...] Python 2.4 does not use this registry entry on the two machines I have installed it on... any tips on how to l

Re: Python 2.4 Uninstall Entry in WinXP Registry

2004-12-01 Thread Brad Tilley
Brad Tilley wrote: Martin v. Löwis wrote: Brad Tilley wrote: Python 2.3 placed a registry key under: 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Python2.3' [...] Python 2.4 does not use this registry entry on the two machines I have installed it on... a

Re: Python 3000 and "Python Regrets"

2004-12-01 Thread Brad Tilley
Matt Gerrans wrote: Anyway, what's to worry about?When the time comes just whip out a little script that converts Python 1.6 (or whatever you like) to Python3K; it will only take seven lines of P3K code. How about 'import classic' -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 2.4 Uninstall Entry in WinXP Registry

2004-12-01 Thread Brad Tilley
Martin v. Löwis wrote: Brad Tilley wrote: I found the documentation here: http://python.fyxm.net/2.4/msi.html The original, of course, is at http://python.org/2.4/msi.html Regards, Martin Thanks Martin... going to a .msi was a great move... we can do fully automated, unattended installs now. I

Re: Python Win32 Silent Install

2004-12-01 Thread Brad Tilley
Peter Hansen wrote: ... innocent and ignorant users who are concerned about finding this thing called "Python" on their new machines, and most of them seem curiously more interested in removing it than in discovering what it actually is there for. This has been my experience as well. I don't have m

Re: Need help on program!!!

2004-12-03 Thread Brad Tilley
Grant Edwards wrote: On 2004-12-03, Max M <[EMAIL PROTECTED]> wrote: That was also my impression. Even the description of the problem looks like it's just copied from the assignment, so probably didn't even take the time to restate the problem in his own words. [...] Hopefully his teacher doesn

Re: Need help on program!!!

2004-12-03 Thread Brad Tilley
Darth Haggis wrote: I need help writing a program You are to write a python program to accomplish the following: a.. Play a dice game of Craps using a random number generator to simulate the roll of the dice, the code for the rolling of the dice should take place in a user written module nam

Re: Need help on program!!!

2004-12-03 Thread Brad Tilley
Max M wrote: Dan Perl wrote: That was also my impression. Even the description of the problem looks like it's just copied from the assignment, so probably didn't even take the time to restate the problem in his own words. But we're speculating. Either way, this is not a normal request: "I nee

Python Docs. Hardcopy 2.4 Library Reference, interested?

2004-12-08 Thread Brad Clements
Is anyone interested in purchasing a hardcopy version of the Python 2.4 Library reference? That is, assuming it was NOT a direct print of current html/pdf versions. So, nicely formatted for a printed book (spiral bound probably), with several indexes as appropriate, or perhaps a permutted index.

results of division

2004-12-09 Thread Brad Tilley
Hello, What is the proper way to limit the results of division to only a few spaces after the decimal? I don't need rocket-science like precision. Here's an example: 1.775 is as exact as I need to be and normally, 1.70 will do. Thank you, Brad -- http://mail.python.org/mailman/listi

Re: results of division

2004-12-09 Thread Brad Tilley
Simon Brunning wrote: On Thu, 09 Dec 2004 09:38:55 -0500, Brad Tilley <[EMAIL PROTECTED]> wrote: What is the proper way to limit the results of division to only a few spaces after the decimal? I don't need rocket-science like precision. Here's an example: 1.775 is as exact as

Re: results of division

2004-12-09 Thread Brad Tilley
Peter Hansen wrote: Brad Tilley wrote: What is the proper way to limit the results of division to only a few spaces after the decimal? I don't need rocket-science like precision. Here's an example: 1.775 is as exact as I need to be and normally, 1.70 will do. The answer is "what

Calling a C program from a Python Script

2004-12-09 Thread Brad Tilley
? Thank you, Brad -- http://mail.python.org/mailman/listinfo/python-list

Re: Calling a C program from a Python Script

2004-12-09 Thread Brad Tilley
Grant Edwards wrote: Huh? What do you mean "write a file open"? You want to read a C source file and execute the C source? If you have access to a C interpreter, I guess you could invoke the interpreter from python using popen, and feed the C source to it. Alternatively you could invoke a compi

Re: Calling a C program from a Python Script

2004-12-09 Thread Brad Tilley
Steven Bethard wrote: for root, files, dirs in os.walk(path) for f in files: try: x = file(f, 'rb') data = x.read() x.close() Remember that CPython is implemented in C, and so all the builtin types (including file) basically execute C code dire

Re: Calling a C program from a Python Script

2004-12-09 Thread Brad Tilley
Grant Edwards wrote: On 2004-12-09, Brad Tilley <[EMAIL PROTECTED]> wrote: Steven Bethard wrote: for root, files, dirs in os.walk(path) for f in files: try: x = file(f, 'rb') data = x.read() x.close() Remember that CPython is imple

Re: Python 2.3.5 ?

2004-12-10 Thread Brad Tilley
Tim Peters wrote: Not everyone is willing and able to switch to a new 2.j release as soon as it appears. The reason I jumped on 2.4 right away was the msi installer for Windows systems. We can do unattended/automated installs... it's really great... a killer feature for Windows users who need to

Re: uptime for Win XP?

2004-12-12 Thread Brad Tilley
Esmail Bonakdarian wrote: Hi, Is there a way to display how long a Win XP system has been up? Somewhat analogous to the *nix uptime command. Thanks, Esmail Just run the built-in Windows utility 'systeminfo' from a cmd prompt. Python can call 'systeminfo' like this: import os uptime = os.popen('sy

Re: Looking for a coder to do some work

2004-12-14 Thread Brad Clements
Sounds like a generic html based information kiosk. Anyone can do this pretty easily using embedded IE or Mozilla ActiveX control wrapped up in Venster. Just run an internal http server in another thread.. I've done this for desktop apps. Though, full-screen windows I haven't tried, but should be

Re: uptime for Win XP?

2004-12-12 Thread Brad Tilley
Fredrik Lundh wrote: Brad Tilley wrote Just run the built-in Windows utility 'systeminfo' from a cmd prompt. you're a bit late, aren't you? for line in data: if line contains "System Up Time": print line what Python version is this? Sorry, lang mix-up: x =

Automate Python-2.4 Installs on Windows

2004-12-13 Thread Brad Tilley
Windows users may find this of interest: http://filebox.vt.edu/users/rtilley/downloads/automatic_python_install.html -- http://mail.python.org/mailman/listinfo/python-list

select() on pipe

2005-04-25 Thread Brad Murdoch
im trying to run the select.selct() on a unix pipe, my expectation is that it will block untill there is something there to read, then continue. It seems to do this untill the pipe is written to once, then i get a busy while loop. shouldnt this stop each time, to wait for something to be writte

subprocess command fails

2015-02-20 Thread Brad s
# cat makekeys.py #!/usr/bin/python3.4 import subprocess import sys import string import os.path import datetime import shlex from time import gmtime, strftime from subprocess import Popen, PIPE, STDOUT pretime = strftime("%Y%m%d%H", gmtime()) time = datetime.datetime.strptime(pretime,'%Y%m%d%H')

Re: subprocess command fails

2015-02-20 Thread Brad s
Yes, the program deletes the same files it produces. It looks to see if old stuff is there and if it exist, it deletes the files and creates and entirely new DNS zone with keys and then it is supposed to sign it. The last step is where it is still failing but your code helped me to figure out wh

Re: subprocess command fails

2015-02-20 Thread Brad s
Time adjustment error: # python3.4 timefix.py 2015022105 2015-02-21 05:00:00 Traceback (most recent call last): File "timefix.py", line 15, in ndate = datetime.datetime.strptime(timeadd, '%Y%m%d%H') TypeError: must be str, not datetime.datetime # cat timefix.py #!/usr/bin/python3.4 impor

Re: subprocess command fails

2015-02-20 Thread Brad s
fixed with now = datetime.datetime.now() later = now + datetime.timedelta(days=2*365) striplater = later.strftime('%Y%m%d%H') # python3.4 makekeys.py Enter the domain to configure keys for? test1234.com Generating key pair..

Re: Venus / GuthVenus for iPhone, Nexus, Droid and Android Jelly Bean

2014-03-17 Thread Brad Guth
On 3/17/2014 3:33 PM, Thrinaxodon wrote: In article <71ab5220-6d5d-46bf-b33a-16aae6c87...@googlegroups.com>, bradg...@gmail.com says... On Wednesday, February 5, 2014 2:59:23 PM UTC-8, Brad Guth wrote: On Saturday, January 11, 2014 3:52:10 PM UTC-8, Brad Guth wrote: NOVA and Dis

Google Web Search API

2015-04-29 Thread brad . ahlers
Does anyone know of any current Python projects that utilize Google's search engine to return quick answers to questions? For example, if you Google "When did Abraham Lincoln die", Google returns "April 15, 1865" before listing any results. I know of many projects that utilize Google search to r

Make a small function thread safe

2011-12-16 Thread Brad Tilley
++counter; 111 } A thread locks the function on entrance and then releases it on exit. What is the equivalent way to do this in Python? Many thanks! Brad -- http://mail.python.org/mailman/listinfo/python-list

Re: Make a small function thread safe

2011-12-16 Thread Brad Tilley
On Fri, Dec 16, 2011 at 8:33 AM, Tim Wintle wrote: > On Fri, 2011-12-16 at 05:21 -0800, Brad Tilley wrote: > > 107 void increment_counter( unsigned int& counter ) > > 108 { > > 109 boost::mutex::scoped_lock lock( counter_lock ); > >

Re: Make a small function thread safe

2011-12-16 Thread Brad Tilley
On Fri, Dec 16, 2011 at 9:24 AM, Brad Tilley wrote: > > > On Fri, Dec 16, 2011 at 8:33 AM, Tim Wintle wrote: > >> On Fri, 2011-12-16 at 05:21 -0800, Brad Tilley wrote: >> > 107 void increment_counter( unsigned int& counter ) >> > 108

Re: Make a small function thread safe

2011-12-16 Thread Brad Tilley
than the explicit acquire() and release() so I'll use that approach. I appreciate your advice. Brad -- http://mail.python.org/mailman/listinfo/python-list

Re: Xah's Edu Corner: Examples of Quality Technical Writing

2005-12-31 Thread Brad Baxter
th most quality tech writing.) -We must truely appreciate the authors of the PHP doc. Because, PHP, as +We must truly appreciate the authors of the PHP doc. Because PHP, as a free shit in the unix shit culture, with extreme ties to Perl and -Apache (both of which has extremely motherfucked docs), but can wean +Apache (both of which have extremely motherfucked docs), can wean itself from a shit milieu and stand pure and clean to become a paragon of technical writing. HTH -- Brad -- http://mail.python.org/mailman/listinfo/python-list

Re: [Mailman-Developers] Parsing and Rendering rfc8222

2006-07-04 Thread Brad Knowles
ense), or that you know which features you're not going to implement and why. It all comes down to knowing what the expectations are for people who are going to be administering and using Mailman, and then being able to manage those expectations with regards to what you're doing. --

Re: [Mailman-Developers] Parsing and Rendering rfc2822

2006-07-06 Thread Brad Knowles
found at least one more. I'm sure he can tell you the search process he used to find all the others, so that you can take a look at all the ones he found and then see if there are any others you can discover on top of that. But this is a pretty big undertaking. -- Brad Knowles, <[EMAIL PRO

Re: [Mailman-Developers] Parsing and Rendering rfc8222

2006-07-06 Thread Brad Knowles
and non-Python solutions, before deciding what was going to be done and how. I wasn't advocating the incorporation of ht:dig itself into the stuff we ship. At least, I didn't mean for it to come off that way. -- Brad Knowles, <[EMAIL PROTECTED]> "Those who would give up esse

introspection

2006-08-31 Thread brad tilley
How do I import a module and then ask it to show me its methods or other aspects about itself during execution? I'd like to do something such as this: import win32api print win32api.methods() I'd like to write some test scripts that load modules and probe them for information about themselves

Re: Pythondocs.info : collaborative Python documentation project

2006-09-16 Thread Brad Allen
Here is an idea for improving Python official documentation: Provide a tab-based interface for each entry, with the overview/summary at the top-level, with a row of tabs underneath: 1. Official documentation, with commentary posted at the bottom (ala Django documentation) 2. Exampl

Re: Pythondocs.info : collaborative Python documentation project

2006-09-17 Thread Brad Allen
Rakotomandimby (R12y) wrote: > On Sat, 16 Sep 2006 12:30:56 -0700, Robert Hicks wrote: > > > That said...the Python docs are open source. Just start going through > > them and adding examples. > > ASPN (activestate) is a good place for examples... Yes, but that requires a separate search and depe

Python getting some positive attention at digg.com

2006-09-17 Thread Brad Allen
This made it to the front page of digg.com yesterday, and is now up to 597 diggs. It has some discussion among folks who are trying to decide which language to learn next...if any of you Pythonistas have digg accounts, you might want to chime in. http://digg.com/programming/Python_Programming_for_

Re: Pythondocs.info : collaborative Python documentation project

2006-09-17 Thread Brad Allen
Kay Schluehr wrote: > Personally, I never found the Python docs particular bad. It is > rewarding to write good documentation because documentation has > different aspects i.e. introductory/tutorial, exhaustive/manual and > design documentation aspects. Not to mention cookbook recipes. > > I also

Re: Pythondocs.info : collaborative Python documentation project

2006-09-17 Thread Brad Allen
A.M. Kuchling wrote: > However, this code isn't used at the moment because I have no idea > what to do about version controlling the links. Do we just use the > current links whenever the HTML is generated? Make a copy of the list > and commit them into SVN, so the links cease to be updated but

Re: does anybody earn a living programming in python?

2006-09-30 Thread Brad Allen
I'll attest that we have a shortage of Python developers in the Dallas area; in the DFW Python user group (dfwpython.org) we occasionally encounter local employers who have trouble finding local Python developers who can take on new work. Most of the group members are already employed, so the stand

PyCon 2007: What talks/tutorials/panels do you want to see?

2006-09-30 Thread Brad Allen
This thread is for posting ideas and general brainstorming about what kinds of talks folks would be interested in seeing at PyCon 2007. The idea is to inspire volunteer speakers to propose talks that they might not otherwise realize would be popular, and to give PyCon organizers a whiff of fresh co

Re: [dfwPython] A Few More Forrester Survey Questions

2007-05-18 Thread Brad Allen
At 10:22 AM -0500 5/18/07, Jeff Rush wrote: >I'm down to the wire here on answering the Forrester survey but am stumped on >a few questions I hope someone can help me out with. > >1) What -existing- examples of the use of Python to create social >web applications are there? These include chat,

getting thread object from SocketServer.ThreadingTCPServer

2007-05-19 Thread Brad Brock
Hi list. I have a little problem when using SocketServer.ThreadingTCPServer. I want to make a list of thread-objects generated by the ThreadingTCPServer. How can I get the thread object? Thank you. Lookin

Problem Embedding Python in small Win32 App

2007-07-26 Thread Brad Johnson
. The pointer appears to be valid, but all of the data has overwritten with 0xDBDBDBDB, with obvious consequences. Thanks for any help. ~Brad Johnson -- http://mail.python.org/mailman/listinfo/python-list

Problem embedding in small Win32 App

2007-07-27 Thread Brad Johnson
stdout object (for a print statement). The pointer appears to be valid, but all of the data has overwritten with 0xDBDBDBDB, with obvious consequences. Thanks for your help in advance. ~Brad Johnson -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem embedding in small Win32 App

2007-07-27 Thread Brad Johnson
Gabriel Genellina yahoo.com.ar> writes: > > By far, the most common problem extending/embedding Python is to do wrong > reference counts. > Read http://docs.python.org/ext/refcounts.html again (I hope you already > did!) and make sure you don't hold a pointer to an object without > increme

Utilizing a raw IDispatch Pointer from Python

2007-07-30 Thread Brad Johnson
I have a C++ application that creates a collection of COM objects. I would like to give the Python interpreter access to these interfaces that were created in C++ land. Stated another way, how can I have Python consume a IDispatch pointer from C++ and wrap it with one of those nice Python classes

Re: win32 question in Python

2007-07-30 Thread Brad Johnson
Huang, Shun-Hsien ercot.com> writes: > but how do I copy a excel file into > database table by using Python? > I'm not sure if this helps, but you can access the Excel Automation model very easily with: import win32com.client x1 = client.Dispatch("Excel.Application") Now you can use the x1

Re: win32 question in Python

2007-07-30 Thread Brad Johnson
Cappy2112 gmail.com> writes: > > > Hello Brad, > > If you don't get a reply here, there is a win32 specific Python list > on ActiveState.com wher ethey do talk about excel & other Win32 python > issues. > Thanks, but I believe this you meant to address th

Re: IDE for Python

2007-08-21 Thread Brad Johnson
Joel Andres Granados gmail.com> writes: > > Hello list: > > I have tried various times to use an IDE for python put have always been > disapointed. Not sure which platform you're on, but I've really liked PyScripter for the Windows platform. -- http://mail.python.org/mailman/listinfo/python

Re: [python-advocacy] A Pythonic Way to Measure and Improve Your Programming Skills?

2007-03-10 Thread Brad Allen
At 6:05 AM -0600 3/9/07, Jeff Rush wrote: >Prior to PyCon I'd been thinking about some kind of campaign, service or >documents, that I call "So you think you know Python...". My initial idea was >for use by Python programmers, who are honest with themselves, to have a way >to measure their knowled

Re: [python-advocacy] A Pythonic Way to Measure and Improve Your Programming Skills?

2007-03-10 Thread Brad Allen
At 9:10 AM -0800 3/10/07, Michael Bernstein wrote: >On Sat, 2007-03-10 at 10:01 -0600, Brad Allen wrote: > >> When I discussed this problem with Michael Bernstein at PyCon he suggested >> the idea of creating a "chroot jail" for each web session which could run >

Multiline command line parsing

2007-09-18 Thread Brad Johnson
I am implementing a Python command line from scratch in a Win32 application. Examples online ("How do I tell incomplete input from invalid input" in the Extending and Embedding Python FAQ) show how to implement this from scratch using C code. The examples don't work. This brief snippit illustrate

Reentrancy of Python interpreter

2007-09-28 Thread Brad Johnson
I have embedded a single threaded instance of the Python interpreter in my application. I have a place where I execute a Python command that calls into C++ code which then in turn calls back into Python using the same interpreter. I get a fatal error which is "PyThreadStage_Get: no current thread.

Re: Reentrancy of Python interpreter

2007-10-01 Thread Brad Johnson
yahoo.com> writes: > Looks like ( from PyThreadStage_Get error ) that you lost the GIL. You > probably > entered some C++ code and encapsulated you're work in the > > Py_BEGIN_ALLOW_THREADS > > Py_END_ALLOW_THREADS > > but you're is calling back the Python function, and you forgot > to acqui

Re: Reentrancy of Python interpreter

2007-10-01 Thread Brad Johnson
Hrvoje Niksic xemacs.org> writes: > > Brad Johnson ballardtech.com> writes: > > > I have a place where I execute a Python command that calls into C++ > > code which then in turn calls back into Python using the same > > interpreter. I get a fatal erro

String Comparison Testing

2008-12-24 Thread Brad Causey
P:// is somehow affecting the searching capabilities of the string.find function. But I can't seem to locate any documentation online that outlines restrictions when using special characters. Any thoughts? Thanks! -Brad Causey CISSP, MCSE, C|EH, CIFI Zero Day Consulting -- http://mail.python.org/mailman/listinfo/python-list

VERY simple string comparison issue

2008-12-24 Thread Brad Causey
P:// is somehow affecting the searching capabilities of the string.find function. But I can't seem to locate any documentation online that outlines restrictions when using special characters. Any thoughts? Thanks! -Brad -- http://mail.python.org/mailman/listinfo/python-list

Programming question

2008-06-11 Thread Brad Navarro
I am stuck with 1.5. Thanks, Brad -- http://mail.python.org/mailman/listinfo/python-list

Re: Feature request: String-inferred names

2009-11-29 Thread Brad Harms
On Sun, Nov 29, 2009 at 7:49 PM, Lie Ryan wrote: > On 11/29/2009 12:22 PM, The Music Guy wrote: > >> When I first started seeing @ show up in Python code, I said "what the >> heck is that? It looks so weird and _ugly_.I would never try to mess >> with that." But I started seeing it more and more,

Re: Feature request: String-inferred names

2009-11-29 Thread Brad Harms
st definition of an attribute, but it's the best I can think of ATM.) I'm not trying to discard Python's distinction between items and attributes, but I don't want to be limited by it due to mere syntactical constraints, either. May the Penguin in the sky bless your every subroutine, Brad Harms -- http://mail.python.org/mailman/listinfo/python-list

Re: Feature request: String-inferred names

2009-12-03 Thread Brad Harms
On Tue, 2009-12-01 at 14:38 +, Steven D'Aprano wrote: > On Mon, 30 Nov 2009 18:55:46 -0800, The Music Guy wrote: > > > Lie Ryan, I think I see what you're saying about using __dict__ to add > > members to a class, but it's not quite the same. __dict__ is only for > > attributes, NOT properties

Re: Feature request: String-inferred names

2009-12-03 Thread Brad Harms
On Tue, 2009-12-01 at 16:58 +0100, Bruno Desthuilliers wrote: > The Music Guy a écrit : > (snip) > > Lie Ryan, I think I see what you're saying about using __dict__ to add > > members > > No "members" in Python - only attributes. > > to a class, but it's not quite the same. __dict__ is only for >

Re: Feature request: String-inferred names

2009-12-04 Thread Brad Harms
On Fri, 04 Dec 2009 18:05:03 +1100, Ben Finney wrote: > Brad Harms writes: > >> Anyway, it looks like the docs agree with you >> (http://docs.python.org/glossary.html#term-attribute), so I'm not going >> to argue. > > That's good, because the te

Re: Feature request: String-inferred names

2009-12-04 Thread Brad Harms
erm, because it's too cumbersome to say "properties or dynamic attributes using __getattr__ or __getattribute__" all the time. That will be my last message for a while...good night, c.p.l. -- Brad Harms -- http://alphaios.net -- http://mail.python.org/mailman/listinfo/python-list

Re: KeyboardInterrupt

2009-12-09 Thread Brad Harms
a script since you never know when the user will press it, which is why you put the try: except KeyboardInterrupt: around as much of your script as possible. The signal that the OS sends to the Python interpreter is irrelevant. -- Brad Harms -- http://alphaios.net -- http://mail.python.org/mailman/listinfo/python-list

Re: method to intercept string formatting % operations

2010-02-05 Thread Brad Allen
On Fri, Feb 5, 2010 at 9:49 AM, Jean-Michel Pichavant wrote: > Anyway why would you want to use the tuple form ? it's beaten in every > aspect by the dictionary form. I'm subclassing a namedtuple, and adding some additional functionality such as __getitem__, __setitem__, so that the namedtuple a

Re: Can I make sqlite3 or shelve work reliably on any Win/Linux/Mac?

2010-02-22 Thread Brad Harms
started: import sys # Linux binary if 'linux' in sys.platform.lower(): import _sqlite3_linux as _sqlite3 # Windows binary elif 'win32' == sys.platform: import _sqlite3_windows as _sqlite3 # Mac binary elif 'darwin' == sys.platform: import _sqlite3_m

Re: curses.setsyx()?

2008-09-23 Thread brad . at . school
On Sep 22, 11:24 pm, Tim Roberts <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > >On Sep 19, 6:42 pm, [EMAIL PROTECTED] wrote: > >> On Sep 19, 1:24 am, Tim Roberts <[EMAIL PROTECTED]> wrote: > > >> > [EMAIL PROTECTED] wrote: > > >> > >I tried curses.setsyx(2,3) in my script and it doesn't m

<    1   2