RE: tkFileDialogs

2012-07-06 Thread brandon harris
It doesn't matter whether I pass the actual path in or the global variable name. The result is the same. Brandon L. Harris From: Karim [kliat...@gmail.com] Sent: Friday, July 06, 2012 12:42 AM To: brandon harris Subject: Re: tkFileDialogs Le 06/07

tkFileDialogs

2012-07-05 Thread brandon harris
I'm wanting to allow users to select hidden directories in windows and it seems that using the tkFileDialog.askdirectory() won't allow for that. It's using the tkFileDialog.Directory class which calls an internal command 'tk_chooseDirectory' . However the file selector dialogs

Python Pickling Issue

2011-11-03 Thread Brandon Harris
I have written a fairly large DAG with python and I've run into an issue when attempting to pickle the data to disk. It will pickle fine the first time, but if I call pickle again, it throws this error. /usr/lib64/python2.6/copy_reg.py in _reduce_ex(self, proto) 68 else: 69

Re: Python Pickling Issue

2011-11-03 Thread Brandon Harris
After digging around a while I discovered I was attempting to pickle a third party class that can't be pickled. Initially I was removing it before pickling and everything was kosher, but at some point it got back onto the class. Apologies. Brandon L. Harris On 11/03/2011 09:42 AM, Brandon

Re: PEP 8 and extraneous whitespace

2011-07-22 Thread Brandon Harris
Poor sod? Makes it sound bad when you say it like that. I am not forced to work at that fixed width, but when I work with code, I often have my vim session split vertically and it's super important to keep things at 80 character to quickly read/edit code. Brandon L. Harris On 07/22/2011

Re: PEP 8 and extraneous whitespace

2011-07-21 Thread Brandon Harris
I don't really think lining things up makes them any easier to read. In fact, the consistency in a single space on either side of an operator keeps things neat and clean. Also easier to maintain in any editor. Always lining up columns of stuff requires readjusting text every time you add a new

Python threading/multiprocessing issue.

2011-07-15 Thread Brandon Harris
I'm working on a tool that runs a number of process is separate thread. I've, up to this point, been using threading.Thread, but from what I read multiprocess will allow multiple processors to be used From the python docs on multiprocessing. Due to this, the multiprocessing module allows the

Re: Python threading/multiprocessing issue.

2011-07-15 Thread Brandon Harris
I see. Well I was hoping to see the same result in the multiprocessing example as using the threading example. What you pointed out makes sense though, but what I don't understand is how modifying the queue in the example works fine in both. Possibly it was designed for that kind of use?

Python threading/multiprocessing issue.

2011-07-14 Thread Brandon Harris
I'm working on a tool that runs a number of process is separate thread. I've, up to this point, been using threading.Thread, but from what I read multiprocess will allow multiple processors to be used From the python docs on multiprocessing. Due to this, the multiprocessing module allows the

Passing File Objects into Subprocess.Popen

2010-11-04 Thread Brandon Harris
I'm running python 2.5 and have bumped into an issue whereby the PIPE in subprocess.Popen locks up after taking too many characters. I found some documentation that discuss this problem and offers some ideas for solutions, the best one being to pass a file object into subprocess instead of

Re: Passing File Objects into Subprocess.Popen

2010-11-04 Thread Brandon Harris
What do you mean by rewind the file pointer before reading from it? Seek back to the beginning? And It sounded very unlikely to me too, but it's the only thing I have found that explains why a very verbose job with tons of feedback locks up at the same point and won't process at all. I did

Re: Passing File Objects into Subprocess.Popen

2010-11-04 Thread Brandon Harris
ok. Jumping back to the start of the file solved the problem. (file.seek(0)) Big thanks for that insight! Brandon L. Harris On 11/04/2010 05:49 PM, Brandon Harris wrote: What do you mean by rewind the file pointer before reading from it? Seek back to the beginning? And It sounded very

eval string

2010-09-30 Thread Brandon Harris
Needing to pass a string command into a third party program and having issues creating a string to do what I need. here's what I have so far. eval('import sys; sys.stderr.write(\'\n\n\nCompleted!!!\nCompleted!!!\nCompleted!!!\nCompleted!!!\nCompleted!!!\nCompleted!!!\n\n\n\');') Traceback

Using re.sub with %s

2010-08-18 Thread Brandon Harris
Having trouble using %s with re.sub test = '/my/word/whats/wrong' re.sub('(/)word(/)', r'\1\%s\2'%'1000', test) return is /my/@0/whats/wrong however if I cast a value with letters as opposed to numbers re.sub('(/)word(/)', r'\1\%s\2'%'gosh', test) return is /my/gosh/whats/wrong Any help

Multiline regex

2010-07-21 Thread Brandon Harris
I'm trying to read in and parse an ascii type file that contains information that can span several lines. Example: createNode animCurveTU -n test:master_globalSmooth; setAttr .tan 9; setAttr -s 4 .ktv[0:3] 101 0 163 0 169 0 201 0; setAttr -s 4 .kit[3] 10; setAttr -s 4 .kot[3] 10;

Re: Multiline regex

2010-07-21 Thread Brandon Harris
out the fields you need. Sent from my iPhone 4. On Jul 21, 2010, at 10:42 AM, Brandon Harris brandon.har...@reelfx.com wrote: I'm trying to read in and parse an ascii type file that contains information that can span several lines. Example: createNode animCurveTU -n test:master_globalSmooth

Re: Multiline regex

2010-07-21 Thread Brandon Harris
At the moment I'm trying to stick with built in python modules to create tools for a much larger pipeline on multiple OSes. Brandon L. Harris Eknath Venkataramani wrote: On Wed, Jul 21, 2010 at 8:12 PM, Brandon Harris brandon.har...@reelfx.com mailto:brandon.har...@reelfx.com wrote

Re: RE: Multiline regex

2010-07-21 Thread Brandon Harris
I could make it that simple, but that is also incredibly slow and on a file with several million lines, it takes somewhere in the league of half an hour to grab all the data. I need this to grab data from many many file and return the data quickly. Brandon L. Harris Andreas Tawn wrote: I'm

Re: Multiline regex

2010-07-21 Thread Brandon Harris
Could it be that there isn't just that type of data in the file? there are many different types, that is just one that I'm trying to grab. Brandon L. Harris Andreas Tawn wrote: I could make it that simple, but that is also incredibly slow and on a file with several million lines, it takes