class factory question

2013-06-26 Thread Tim
nd,) {}) tmp.__name__ = name Is there a more pythonic way? thanks, --Tim -- http://mail.python.org/mailman/listinfo/python-list

Re: class factory question

2013-06-26 Thread Tim
On Wednesday, June 26, 2013 9:39:12 AM UTC-4, Peter Otten wrote: > Tim wrote: > > I am extending a parser and need to create many classes that are all > > subclassed from the same object (defined in an external library). When my > > module is loaded I need all the classes

Re: class factory question

2013-06-26 Thread Tim
On Wednesday, June 26, 2013 10:46:55 AM UTC-4, Peter Otten wrote: > Tim wrote: > > I am not completely understanding the type function I guess. Here is an > > example from the interpreter: > > No, you are not understanding how Python namespaces work ;) > To get a Vspace

Re: class factory question

2013-06-27 Thread Tim
On Thursday, June 27, 2013 9:16:50 AM UTC-4, Joshua Landau wrote: > On 26 June 2013 14:09, Tim wrote: > > > I am extending a parser and need to create many classes that are all > > subclassed from the same object (defined in an external library). When my > > module

Re: class factory question

2013-06-27 Thread Tim
r describes inheriting like I was doing in the first place. With a parser, I really don't know any better way but then I'm not a parsing expert. I will delve into the code and try to get a better handle on how the parser finds the definitions it needs in order to tokenize the input. thanks! --Tim -- http://mail.python.org/mailman/listinfo/python-list

timing issue: shutil.rmtree and os.makedirs

2013-07-29 Thread Tim
_init__.py", line 35, in make_clean_dir os.makedirs(directory) File "/usr/local/lib/python2.7/os.py", line 157, in makedirs mkdir(name, mode) OSError: [Errno 17] File exists: '/users/tim/testing/testing_html' The directory 'testing_html' existed when I exec

Re: timing issue: shutil.rmtree and os.makedirs

2013-07-30 Thread Tim
On Monday, July 29, 2013 7:52:36 PM UTC-4, Chris Angelico wrote: > On Mon, Jul 29, 2013 at 8:16 PM, Tim wrote: > > My intent is to pass it a directory name or path and if it exists, use > > shutil.rmtree to remove whatever is there (if it isn't a directory, try to >

Re: timing issue: shutil.rmtree and os.makedirs

2013-07-30 Thread Tim
On Tuesday, July 30, 2013 9:27:10 AM UTC-4, Chris Angelico wrote: > On Tue, Jul 30, 2013 at 2:10 PM, Tim wrote: > > hmm, now that you mention it, this is executing on a remote box with access > > to the same file system my local calling program is on. That is, there is a >

web access to configuration database

2012-09-27 Thread Tim
che thrift?) Currently learning Redis. thanks, --Tim -- http://mail.python.org/mailman/listinfo/python-list

Re: communicate with external process via pty

2012-10-10 Thread Tim
On Wednesday, October 10, 2012 2:58:55 AM UTC-4, Peter Otten wrote: > Tim Arnold wrote: > > > import os,sys > > import subprocess > > import shlex > > import pty > > cmd = 'tralics --interactivemath' > > (master, slave) = pty.openpty() >

simple web/html testing

2011-06-07 Thread Tim
omatic generation of test result reports. Any pointers or suggestions for this type of web testing (I guess it's really html testing since this is static html)? thanks, --Tim Arnold -- http://mail.python.org/mailman/listinfo/python-list

Re: simple web/html testing

2011-06-07 Thread Tim
roup/selenium-users/browse_thread/thread/7d8e0874d6c2595f Do you think I could configure selenium to run the tests? At this moment, I'm looking at using Jenkins to run the tests as self- written python scripts using lxml, among other things. thanks, --Tim -- http://mail.python.org/mailman/listinfo/python-list

Re: simple web/html testing

2011-06-08 Thread Tim
I can rewrite that as a nose test and execute it with Jenkins and the broken-link portion of the tests should be done. Does that sound appropriate for my use-case (jenkins/nose-> static html)? The testing is for a large set of documentation that is built daily. thanks again, --Tim -- http://mail.python.org/mailman/listinfo/python-list

python2.7.1 freebsd development version

2011-04-01 Thread Tim
bugs.python.org/file19836/freebsd_ldshared.patch Where should I look for the updated version? thanks, --Tim Arnold -- http://mail.python.org/mailman/listinfo/python-list

Re: python2.7.1 freebsd development version

2011-04-01 Thread Tim
On Apr 1, 10:55 am, Tim Golden wrote: > On 01/04/2011 15:25, Tim wrote: > > > hi, > > I can't seem to find the development version of python2.7.1; maybe > > there isn't one any longer, but according to this post, there was a > > bug in the configure script

Re: Let's talk about debuggers!

2017-10-25 Thread Tim
On Wednesday, October 25, 2017 at 9:07:47 AM UTC-4, Thomas Jollans wrote: > Hi, > > I just wanted to know what tools everyone used for debugging Python > applications - scripts / backend / desktop apps / notebooks / whatever. > Apart from the usual dance with log files and strategically inserted >

segfault using shutil.make_archive

2016-10-06 Thread Tim
x27;, tgt_dir) I guess I could drop the convenience of make_archive and use zipfile but that seems to be exactly what make_archive does. I'm on FreeBSD, python2.7. Anyone seen this before? thanks, --tim -- https://mail.python.org/mailman/listinfo/python-list

Re: segfault using shutil.make_archive

2016-10-06 Thread Tim
On Thursday, October 6, 2016 at 2:04:20 PM UTC-4, Random832 wrote: > On Thu, Oct 6, 2016, at 13:45, Random832 wrote: > > On Thu, Oct 6, 2016, at 12:46, Tim wrote: > > > I need to zip up a directory that's about 400mb. > > > I'm using shutil.make_

Re: segfault using shutil.make_archive

2016-10-07 Thread Tim
rg issue. > > ChrisA Thanks. I can make a test case. It doesn't look like it has been reported before; I'll add an issue once I can reproduce. --tim -- https://mail.python.org/mailman/listinfo/python-list

Re: segfault using shutil.make_archive

2016-10-10 Thread Tim
On Friday, October 7, 2016 at 1:05:43 PM UTC-4, Michael Torrie wrote: > On 10/06/2016 10:46 AM, Tim wrote: > > I need to zip up a directory that's about 400mb. > > I'm using shutil.make_archive and I'm getting this response: > > > > Segmentation fa

__init__ patterns

2018-08-30 Thread Tim
e my pattern but I'm willing to learn. thanks, --Tim -- https://mail.python.org/mailman/listinfo/python-list

Re: How do you draw this layout with wxpython?

2005-10-17 Thread Tim
Young H. Rhiu wrote: > See: http://hilug.org/img/app_layout.GIF > > I'm implementing an album-like application with wxpython but I'm new to > wxPython though I know how to program with python. The problem is that > it's not easy for me to deal with drawing layout stuff with wxpython. > What layout

Controlling windows gui applications from python

2005-11-18 Thread tim
ts a simple scripting language that allows you to automate button clicks, mouse movement, starting programs, checking the state of a window, changing the focus, type text into an input field...etc. Is there a way to do these things from within Python? Thanks Tim -- http://mail.python.org/mailman/listinfo/python-list

Re: Controlling windows gui applications from python

2005-11-21 Thread tim
led with win32gui.error " + WinGuiAutoError: EnumChildWindows failed with win32gui.error 1442992, wantedText='Pref', wantedClass=None, selectionFunction=None, maxWait=1, retryInterval=0.1 Opening the application is the only thing that always works... thanks! Simon Brunning wrote: &

Re: Controlling windows gui applications from python

2005-11-21 Thread tim
+ WinGuiAutoError: EnumChildWindows failed with win32gui.error 1442992, wantedText='Pref', wantedClass=None, selectionFunction=None, maxWait=1, retryInterval=0.1 Opening the application is the only thing that always works... thanks! Simon Brunning wrote: > On 18/11/05, tim &l

hex string to hex value

2005-11-22 Thread tim
This is probably another newbie question...but... even after reading quite some messages like '..hex to decimal', 'creating a hex value' , I can't figure this out: If i do >>> m=66 >>> n=hex(m) >>> n '0x42' i cannot use n as value for a variable that takes hex values, because it throws: error

Re: hex string to hex value

2005-11-22 Thread tim
but then i get : >>> m 66 >>> n=int(hex(m)) Traceback (most recent call last): File "", line 1, in ? ValueError: invalid literal for int(): 0x42 >>> what am I missing here ? thank you Tim avnit wrote: >If you just want to convert a string to an

[Fwd: Re: hex string to hex value]

2005-11-22 Thread tim
ok, but if i do >>> n=66 >>> m=hex(n) >>> m '0x42' >>> h=int(m,16) >>> h 66 >>> I end up with 66 again, back where I started, a decimal, right? I want to end up with 0x42 as being a hex value, not a string, so i can pas it as an argument to a function that needs a hex value. (i am trying t

Re: hex string to hex value

2005-11-22 Thread tim
[EMAIL PROTECTED] wrote: >tim wrote: > > >>but then i get : >> >> >>> m >>66 >> >>> n=int(hex(m)) >>Traceback (most recent call last): >> File "", line 1, in ? >>ValueError: invalid literal for int(): 0x

Re: [Fwd: Re: hex string to hex value]

2005-11-22 Thread tim
Brett g Porter wrote: > tim wrote: > >> >> I end up with 66 again, back where I started, a decimal, right? >> I want to end up with 0x42 as being a hex value, not a string, so i >> can pas it as an argument to a function that needs a hex value. >> (i am tr

Python Midi Package: writing events non-chronologically

2005-11-24 Thread tim
Someone using Python Midi Package from http://www.mxm.dk/products/public/ lately? I want to do the following : write some note events in a midi file then after doing that, put some controllers at the beginning of the midifile (because I want to be able to make those dependant on what notes were

[Fwd: Python Midi Package: writing events non-chronologically]

2005-11-24 Thread tim
(...I sent this one a second time, waited for 60 minutes, it didn't appear, sorry if it's a double...) Someone using Python Midi Package from http://www.mxm.dk/products/public/ lately? I want to do the following : write some note events in a midi file then after doing that, put some contro

backslash plague: paths containing "\a" somewhere

2005-11-24 Thread tim
trying to work with a directory in windows, that has "\a" in the full pathname this works: >>> c = string.replace('c:\content\ce\cw\cvd', '\\', '\\') >>> c 'c:\\content\\ce\\cw\\cvd' this doesn't: >>> c = string.replace('c:\content\a\a\avd', '\\', '\\') >>> c 'c:\\content\x07\x07\x07vd' s

problem compiling executable with py2exe

2005-11-25 Thread tim
>= s: outfile.write('> is too big\n') blacklist.append(filepath) outfile.write('\n'+'\n'+ 'blacklist\n') for bl in blacklist: outfile.write(bl + '\n') outfile.close() ## here's

pyext - google

2005-11-27 Thread tim
27; using encoding style 'http://schemas.xmlsoap.org/soap/encoding/'.> attached are the original search.py script, and my modified pd-pyext version. Any clues appreciated! Tim """Search Google from the command line This program is part of "Dive Into Python&

Creating Python wrapper for DLL

2005-06-28 Thread Tim
I have a DLL, and a C .h file that exports a bunch of functions from the DLL. I would like to create a Python extension module for these functions. I have read the "Extending and Embedding" documentation in the Python 2.4 release. I understand how to extend C code for use in Python if I have acc

Re: Creating Python wrapper for DLL

2005-06-29 Thread Tim
Thanks guys, I'll take a look! -- http://mail.python.org/mailman/listinfo/python-list

Re: Regex substitution trouble

2014-10-28 Thread Tim
! You have some good answers already, but I wanted to let you know about a tool you may already have which is useful for experimenting with regexps. On windows, the file `redemo.py` is in the Tools/Scripts folder. If you're on a Mac, see http://stackoverflow.com/questions/1811236

help with creating dict from string

2014-11-06 Thread Tim
it('=') for x in s.split(',')] [['one', 'two'], [' three', 'four five'], [' six'], [' seven', 'eight']] I know I can iterate and strip each item, fixing single-element keys as I go. I just wondered if I&#x

Re: help with creating dict from string

2014-11-06 Thread Tim
On Thursday, November 6, 2014 12:41:10 PM UTC-5, Peter Otten wrote: > Tim wrote: > > > hi, I have strings coming in with this format: > > > > '[one=two, three=four five, six, seven=eight]' > > > > and I want to create from that string, this d

Re: Working with HTML5 documents

2014-11-20 Thread Tim
t; it does have most of what I'm looking for. I just need to start by giving > it "" to parse. > > -- > Denis McMahon I believe lxml should work for this. Here's a snippet that I have used to create an HTML document: from lxml import etree page = etree.Element('html') doc = etree.ElementTree(page) head = etree.SubElement(page, 'head') body = etree.SubElement(page, 'body') table = etree.SubElement(body, 'table') etc etc with open('mynewfile.html', 'wb') as f: doc.write(f, pretty_print=True, method='html') (you can leave out the method= option to get xhtml). hope that helps, --Tim -- https://mail.python.org/mailman/listinfo/python-list

Recurring Task

2014-11-23 Thread tim
ython Scheduler Has anyone done anything similar and can share some insight? Thanks! Tim -- https://mail.python.org/mailman/listinfo/python-list

recursive function: use a global or pass a parameter?

2015-01-16 Thread Tim
in obj: walk(obj[k], res) return res walk(d, set()) # returns {1, 2} Is it better to use a global to keep track of the values or does it even matter? thanks, --Tim -- https://mail.python.org/mailman/listinfo/python-list

Re: recursive function: use a global or pass a parameter?

2015-01-16 Thread Tim
On Friday, January 16, 2015 at 1:34:51 PM UTC-5, Peter Otten wrote: >> Tim wrote: >> > Globals are generally bad as they make code non-reentrant; when two calls of > the function run simultaneously the data will be messed up. > > I recommend that you use a generato

nose config help?

2013-08-15 Thread Tim
ybook', '--tc=language:en' ] + sys.argv[1:] nose.run(argv=args) I've used nose before in simpler situations, but not an expert. This is complex enough that I wonder if the above approach is correct. thanks, --Tim -- http://mail.python.org/mailman/listinfo/python-list

closure = decorator?

2013-10-10 Thread Tim
I've read a couple of articles about this, but still not sure. When someone talks about a closure in another language (I'm learning Lua on the side), is that the same concept as a decorator in Python? It sure looks like it. thanks, --Tim -- https://mail.python.org/mailman/listinfo/python-list

Re: closure = decorator?

2013-10-14 Thread Tim
On Saturday, October 12, 2013 4:54:34 PM UTC-4, Peter Cacioppi wrote: > On Thursday, October 10, 2013 6:51:21 AM UTC-7, Tim wrote: > > > I've read a couple of articles about this, but still not sure. > > When someone talks about a closure in another language (I'm l

Re: HELP!! How to ask a girl out with a simple witty Python code??

2015-03-09 Thread Tim
like If...then... but..etc. > > You will make me a very happy man!!! > > Thank you very much!!! r = False while r != 'yes': r = raw_input('do you like me (yes/no): ') print 'i like you too!' might make her smile --Tim -- https://mail.python.org/mailman/listinfo/python-list

aiohttp vs requests: async failures

2015-04-24 Thread Tim
link http://www.whitehouse.gov/omb: Cannot connect to host www.whitehouse.gov:443 ssl:True 200 sync 200 200 200 thanks for any advice, --Tim -- https://mail.python.org/mailman/listinfo/python-list

mixing set and list operations

2015-04-30 Thread Tim
x27;three', 'four']) >>> m.extend(p) >>> m ['one', 'two', 'four', 'three'] >>> m = ['one', 'two'] >>> p = set(['three', 'four']) >>> p.update(m) >>> p set(['four', 'three', 'two', 'one']) Useful if you don't care about ordering. Not sure if it's dangerous. thanks, --Tim -- https://mail.python.org/mailman/listinfo/python-list

Re: mixing set and list operations

2015-04-30 Thread Tim
On Thursday, April 30, 2015 at 1:05:05 PM UTC-4, Ben Finney wrote: > Tim writes: > > You can use 'extend' to add set elements to a list and use 'update' to > > add list elements to a set. > > And you can use both of those methods to add items from

Re: Is it normal to cry when given XML?

2015-05-05 Thread Tim
g lxml to parse and restructure the xml to a dictionary isn't too hard, but of course it depends on the xml you have to deal with. Sometimes weeping is just part of the job. good luck, --Tim -- https://mail.python.org/mailman/listinfo/python-list

method returns object reference

2015-06-23 Thread Tim
I spent a while finding this problem which looks something like the old "mutable default argument" problem. http://docs.python-guide.org/en/latest/writing/gotchas/#mutable-default-arguments I'm not crystal clear on the details, but once I found it, the fix was easy. I'm posting here just because

packaging code with compiled libraries

2015-10-05 Thread Tim
#x27;libs' etc etc. build_py.run() And that seems to work, but after reading more from the Python Packaging Authority, I wonder if that is the right way. Should I be using wheels instead? I think my brain fried a little bit while going through the doc. thanks, --Tim

Re: packaging code with compiled libraries

2015-10-06 Thread Tim
On Tuesday, October 6, 2015 at 5:51:48 AM UTC-4, Oscar Benjamin wrote: > On 5 October 2015 at 20:43, Tim wrote: > > > > I have a package I want to share but have a question about packaging. > > > > Mostly the package is pure python code, but it also requires some

ANN: driver to convert LaTeX math to MathML, using Tralics

2014-06-17 Thread Tim
pexpect package * Tralics installation * Python lxml package (elementtree could be used as well) The driver is available on GitHub; the documentation is here: http://tiarno.github.io/tralics_driver/ thanks, --Tim Arnold -- https://mail.python.org/mailman/listinfo/python-list

Re: Not Responding When Dealing with Large Data

2014-06-18 Thread Tim
don't care how long the program takes to work, just need it to stop > crashing? Please show some code. What kind of text (how long are the lines roughly)? thanks, --Tim -- https://mail.python.org/mailman/listinfo/python-list

Re: xslt with python

2014-07-15 Thread Tim
report the results? Plus your platform, python version and lxml details as described here: http://lxml.de/FAQ.html#i-think-i-have-found-a-bug-in-lxml-what-should-i-do thanks, --Tim Arnold -- https://mail.python.org/mailman/listinfo/python-list

Re: Removing xml element and strip extra space

2014-07-22 Thread Tim
the whitespace actually necessary in the original or problematic in the result? --Tim Arnold -- https://mail.python.org/mailman/listinfo/python-list

Re: Anyway to reduce size of pdf using python script.

2014-09-05 Thread Tim
after the script has run and > doing it there. > > Can this be done using python scripting or does the automation stop at > exporting the map? > > Thanks I don't have a definitive answer but I use qpdf to optimize my pdf files. Whether that reduces the size I'm not sure

Re: Recommended hosting

2014-10-02 Thread Tim
nd plain static blog sites and never had a complaint. good luck! --Tim Arnold -- https://mail.python.org/mailman/listinfo/python-list

correct usage of a generator?

2011-11-28 Thread Tim
7; % (stem,i) blarg = fname_gen('blarg') boo = fname_gen('boo') n = 3 for w in range(0,n): in_name = blarg.next() out_name = boo.next() This works, but is it the 'normal' way to accomplish the task when you don't know 'n' until run-time? thanks, --Tim -- http://mail.python.org/mailman/listinfo/python-list

Re: correct usage of a generator?

2011-11-28 Thread Tim
ogether so they increment independently. I'll keep the zero-padding advice in mind--I didn't think of that one. what a great group this is. thanks again! --Tim -- http://mail.python.org/mailman/listinfo/python-list

program with raw_input prompt behaves differently after compile

2005-12-23 Thread tim
nprefix', it is actually just the 'binary search version' I found at http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/252177 ) It works fine when I run this from PythonWin IDE, but after compiling an executable from it (py2exe) it exits whatever I type in the 'continue?' prompt. What am I doing wrong? Thanks, Tim -- http://mail.python.org/mailman/listinfo/python-list

Re: program with raw_input prompt behaves differently after compile

2005-12-25 Thread tim
It was kindof a stupid mistake on my part: I had to put 'import os' at the very beginning, and not only in one of my two function definitions. Thanks anyway, thanks to your link I also found how to change the colour of the console...neat :p ! Tim Hans Nowak wrote: >tim wrote: >

break into running code PythonWin

2005-12-25 Thread tim
Very often this doesn't work and I am forced to do ctrl+alt+del to quit pythonwin from the task manager. Is there a better way to interrupt my testruns when they hang ? thank you, Tim -- http://mail.python.org/mailman/listinfo/python-list

MidiToText : EventDispatcher instance has no attribute 'sysex_events'

2005-12-30 Thread tim
AttributeError: EventDispatcher instance has no attribute 'sysex_events' any ideas? thank you, Tim -- http://mail.python.org/mailman/listinfo/python-list

Re: MidiToText : EventDispatcher instance has no attribute 'sysex_events'

2005-12-30 Thread tim
Carsten Haese wrote: On Fri, 2005-12-30 at 09:52, tim wrote: Trying to convert midi to text using MidiToText.py. I get the following: midi_port: 0 Traceback (most recent call last): File "MidiToText.py", line 176, in ? midiIn.read() File "C:\Python24\Lib\sit

Re: Ann: Tkinter drag and drop module

2006-01-13 Thread tim
Michael Hi Michael and list, I tried to run dnddemo.py (win XP, Python2.4). but get:   File "C:\Documents and Settings\Tim\Bureaublad\installes_pc_mac\programming\python\TkinterDnD-0.4\TkinterDnD\TkinterDnD.py", line 333, in _require     tkdndver = tkroot.tk.call('pac

Re: easy questions from python newbie

2006-07-24 Thread Tim
>add a new rec with a count of 1. Then write the array to a file? > >>> > >> > >>Ah, a real question. Use a dict: > >> > >>if adict.has_key(some_key): > > > > > > Hey, d00d, ask the department sysadmin to update your Python for you, > > then you'll be able to use this: > > > > if some_key in adict: > > > > > >> adict[some_key] += 1 > >>else: > >> adict[some_key] = 1 > >> > > Last I checked, both worked. > > James > Alternatively, the whole if can be replaced with:- adict[some_key] = adict.get(some_key, 0) + 1 Tim -- http://mail.python.org/mailman/listinfo/python-list

Re: Dynamic objects

2006-08-17 Thread Tim
Mark Shewfelt wrote: > Hello, > > I have implemented a series of classes representing a Building, its > respective Equipment, and then various Components of that equipment > like so (as you'll be able to tell, I'm a newbie): > > class Building: > equipment = {} > def AddEquipment( name,

Re: CGI script running not completely in HTML

2006-08-17 Thread Tim
iting for query to complete? I had some long running scripts that would do that so I used a timer thread to print comments to the browser IE: . Brute force approach but it worked using IE with apache. If I remember right you have to call sys.stdout.flush() to force the write over s

Problem with tokenize module and indents

2006-08-23 Thread Tim
I ran into a problem with a script i was playing with to check code indents and need some direction. It seems to depend on if tabsize is set to 4 in editor and spaces and tabs indents are mixed on consecutive lines. Works fine when editors tabsize was 8 regardless if indents are mixed. Below

Can Readlines() go to next line after a Tab

2007-06-26 Thread tim
the module loading is slow. Is there a way to have readlines() go to the next line when it finds a tab '\t' instead of a newline '\n'? Is there a better way to do this? I know a second file could be made of the keywords only, but I would like to have only one file. Thanks,

shared memory pointer

2007-09-10 Thread Tim
returns a point to the data. Here is what I tried. current_time = 45.55 memcpy( current_time, self.pData, 4 ) but I get an error: ArgumentError: argument 1: : Don't know how to convert parameter 1 I need to get my floating point array casted from the self.pData. Any help would be appreciat

Re: shared memory pointer

2007-09-10 Thread Tim
On Sep 10, 10:11 am, Tim Golden <[EMAIL PROTECTED]> wrote: > Tim wrote: > > Hello Everyone, > > > I am getting shared memory in python using the following. > > > szName = c_char_p(name) > > hMapObject = windll.kernel32.CreateFileMappingA(INVALID_HANDLE_VALUE,

Re: shared memory pointer

2007-09-10 Thread Tim
On Sep 10, 10:11 am, Tim Golden <[EMAIL PROTECTED]> wrote: > Tim wrote: > > Hello Everyone, > > > I am getting shared memory in python using the following. > > > szName = c_char_p(name) > > hMapObject = windll.kernel32.CreateFileMappingA(INVALID_HANDLE_VALUE,

memcpy

2007-09-10 Thread Tim
How do I memcpy from a pointer to an array of floats in python? I get errors: NameError: global name 'row' is not defined I want to be able to get the row[i] array element. In C I would normally place the address of row as the first argument. cdll.msvcrt.memcpy( row, pData, 256 ) If I define r

Re: memcpy

2007-09-11 Thread Tim
On Sep 10, 3:31 pm, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > On Mon, 10 Sep 2007 11:38:50 -0700, Tim wrote: > > How do I memcpy from a pointer to an array of floats in python? > > > I get errors: NameError: global name 'row' is not defined

Re: memcpy

2007-09-11 Thread Tim
On Sep 11, 8:01 am, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > On Tue, 11 Sep 2007 05:09:58 -0700, Tim wrote: > > On Sep 10, 3:31 pm, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > >> On Mon, 10 Sep 2007 11:38:50 -0700, Tim wrote:

Re: shared memory pointer

2007-09-11 Thread Tim
nk of this approach? I am having trouble finding good documentation of this approach. Can you help? Thanks On Sep 11, 7:58 am, Tim Golden <[EMAIL PROTECTED]> wrote: > Tim wrote: > > I saw the mmap function in the shared memory example. I had some > > concern with my large me

py2exe: zipfile=None raised ImportError

2007-01-11 Thread Tim
ot being found in the zip, or something didn't get included that needed to be included. Does anybody know what's happening and how to fix it? Thanks. -- Tim -- http://mail.python.org/mailman/listinfo/python-list

Re: py2exe: zipfile=None raised ImportError

2007-01-11 Thread Tim
Thomas Heller wote: [..] > Tim schrieb: [...] > > > File "...boot_common.py" ... no module name linecache > > > File " ... no module named zipextimporter > > > File "my.py" ... no module name optparse [...] > Another tip: You can examine w

Re: py2exe: zipfile=None raised ImportError

2007-01-11 Thread Tim
I see the py2exe mail list posts to this group... I think I have a handle on the problem: After I build the exe, I rename it. The renamed exe is the one that raises the error. The original exe works fine. -- Tim -- http://mail.python.org/mailman/listinfo/python-list

Re: 345 free programming books

2006-05-02 Thread Tim
Thanks for notification... I am still working on to find new books.. Timetime...so little time -- http://mail.python.org/mailman/listinfo/python-list

Re: 345 free programming books

2006-05-10 Thread Tim
Anyone has any free books to submit? -- http://mail.python.org/mailman/listinfo/python-list

Programmer Need

2008-01-26 Thread tim
Hi, I have a program of about 300 lines of code that I wrote in AutoHotKeys. I am looking for someone who might be interested in making a little $ to help me bring this program into a mac compatable language. I can be reached at tim at rileyphotographic dot come -- http://mail.python.org

nth root

2009-01-30 Thread Tim
In PythonWin I'm running a program to find the 13th root (say) of millions of hundred-digit numbers. I'm using n = 13 root = base**(1.0/n) which correctly computes the root to a large number of decimal places, but therefore takes a long time. All I need is the integer component. Is there

ReportLab PDF Toolkit v2.4 released

2010-01-21 Thread Tim
We're pleased to announce the latest version of the ReportLab open source PDF toolkit, now available for download here: https://www.reportlab.com/software/opensource/rl-toolkit/download/ The ReportLab Toolkit is a library for programatically creating documents in PDF format. It's free, open-sour

Re: Sikuli: the coolest Python project I have yet seen...

2010-01-24 Thread tim
On Jan 25, 11:18 am, Ron wrote: > Sikuli is the coolest Python project I have ever seen in my ten year > hobbyist career. An MIT oepn source project, Sikuli uses Python to > automate GUI tasks (in any GUI or GUI baed app that runs the JVM) by > simply drag and dropping GUI elements into Python scr

os.system and loggers

2011-01-07 Thread Tim
am but no dice. Is there any clean way to get what I want? If not, I guess I'll override the other method with my own, but it will basically be a bunch of code copied with os.sytem replaced with subprocess, using getLogger('status').handlers[0].stream for stdout/ stderr. thank

Re: os.system and loggers

2011-01-10 Thread Tim
On Jan 7, 11:24 am, Tim wrote: > hi, I'm using a 3rd-party python program that uses the python logging > facility and also makes calls to os.system. I'm trying to capture its > output to a file. > > In my own code, I've taken control of the loggers that are s

Re: os.system and loggers

2011-01-11 Thread Tim
On Jan 10, 1:01 pm, Carl Banks wrote: > On Jan 10, 8:29 am, Tim wrote: > > > > > > > > > > > On Jan 7, 11:24 am, Tim wrote: > > > > hi, I'm using a 3rd-party python program that uses the python logging > > > facility and also makes c

client server socket interaction (inetd)

2011-02-17 Thread Tim
n't know what to put in it. Currently I just have steps 1 and 2 working. Client sends one message and gets all output back. If server asks a question, processes deadlock with server waiting and client unable to respond. thanks, --Tim Arnold # imports, constants set #def line_buffer(sock): #code

Re: client server socket interaction (inetd)

2011-02-17 Thread Tim
On Feb 17, 2:41 pm, Martin Gregorie wrote: > On Thu, 17 Feb 2011 08:14:36 -0800, Tim wrote: > > Hi, I have an inetd service on freebsd that calls a program (daemon.py) > > with which I want the remote user to communicate.  I can call daemon.py > > from the command line on th

Re: client server socket interaction (inetd)

2011-02-18 Thread Tim
On Feb 17, 6:09 pm, Martin Gregorie wrote: > On Thu, 17 Feb 2011 13:02:08 -0800, Tim wrote: > > But. The server may encounter a problem > > during the process and ask the user for more information like > > 'abort/retry' or something like that. > > Servers

throwing exceptions from csv.DictReader or even csv.reader

2010-07-05 Thread Tim
tever I use for restval could legitimately be in the data. Is there any way to get csv.DictReader to throw and exception on such simple line errors, or am I going to have to use csv.reader and explicitly check for the number of fields read in on each line? cheers Tim -- http://mail.python.org/mailman/

main in Python

2009-07-10 Thread Tim
s get run? Thanks and regards, Tim -- http://mail.python.org/mailman/listinfo/python-list

Popen

2009-07-24 Thread Tim
Hi, I wonder if I use Popen, the parent process will wait for the child process to finish or continue without waiting? Thanks and regards! -- http://mail.python.org/mailman/listinfo/python-list

Re: Popen

2009-07-24 Thread Tim
f "asynchronous"? Thanks and regards! --- On Fri, 7/24/09, Kushal Kumaran wrote: > From: Kushal Kumaran > Subject: Re: Popen > To: "Tim" > Cc: python-list@python.org > Date: Friday, July 24, 2009, 10:58 AM > On Fri, Jul 24, 2009 at 7:33 PM, > Tim > wrote:

  1   2   3   4   5   6   7   8   9   10   >