Re: Understanding memory location of Python variables

2018-06-18 Thread Jeremy Black
Also, I don't think you can rely on memory being allocated sequentially any more now that everyone has implemented some level of ASLR. https://en.wikipedia.org/wiki/Address_space_layout_randomization On Sat, Jun 16, 2018 at 12:22 PM Alister via Python-list < python-list@python.org> wrote: > On S

Re: Console

2018-03-07 Thread Jeremy Jamar St. Julien
7, 2018 8:55:30 AM Subject: Re: Console On 07/03/18 14:41, Jeremy Jamar St. Julien wrote: > I had an problem when trying to start the python GUI. It said there was a > subprocess startup error. I was told to start IDLE in a console with idlelib > and see what python binary i was run

Console

2018-03-07 Thread Jeremy Jamar St. Julien
I had an problem when trying to start the python GUI. It said there was a subprocess startup error. I was told to start IDLE in a console with idlelib and see what python binary i was runnning IDLE with. Im using windows 10 and i guess console refers to the terminal window and i have no idea wha

Python 3.6

2018-03-07 Thread Jeremy Jamar St. Julien
How do i open python 3.6 in a console and how do i see the binary its running with -- https://mail.python.org/mailman/listinfo/python-list

Subprocess Startup Error

2018-03-06 Thread Jeremy Jamar St. Julien
Whenever I try to open the python shell it says IDLE’s subprocess didn’t make a connection. Everything worked fine yesterday and I haven’t done anything I think would cause this problem. Any way to fix this? I’ve tried repairing and redownloading -- https://mail.python.org/mailman/listinfo/pyth

Re: Processing multiple forms in a cgi script

2016-02-19 Thread Jeremy Leonard
On Friday, February 19, 2016 at 1:18:41 PM UTC-5, Jon Ribbens wrote: > On 2016-02-19, Jeremy Leonard wrote: > > I have a quick question regarding processing multiple forms. Most of > > my experience has been where there is just one form so the logic was > > pretty straig

Processing multiple forms in a cgi script

2016-02-19 Thread Jeremy Leonard
I have a quick question regarding processing multiple forms. Most of my experience has been where there is just one form so the logic was pretty straight forward for me. My question revolves around how to handle multiple forms. I've seen that you can have an id for each form, but I'm unsure how

Re: Will file be closed automatically in a "for ... in open..." statement?

2016-02-18 Thread Jeremy Leonard
On Tuesday, February 16, 2016 at 3:39:34 AM UTC-5, jf...@ms4.hinet.net wrote: > I know > > with open('foo.txt') as f: > ...do something... > > will close the file automatically when the "with" block ends. > > I also saw codes in a book: > > for line in open('foo.txt'): >

Re: Weird and sparese cgi:error

2016-02-17 Thread Jeremy Leonard
On Tuesday, February 16, 2016 at 3:02:40 PM UTC-5, Φώντας Λαδοπρακόπουλος wrote: > Hello, > > I recentely changed VPS server and when i try to load my webiste iam > receiving 500 error which i wasnt receiving in my old VPS server with the > same exact cgi scripts. > > After looking at Apacher's

Re: Writing a Financial Services App in Python

2015-11-19 Thread Jeremy Leonard
rmance. > > This seems to us like something software should help solve. We'd like to see > teams tackling each of the component issues around saving and investing, > along with ones tackling the entire package. > > > Thanks alot ! > > Cai Gengyang What platform do you want the app to target (web/desktop/etc...)? Jeremy -- https://mail.python.org/mailman/listinfo/python-list

Re: Optimizing if statement check over a numpy value

2015-07-23 Thread Jeremy Sanders
o a boolean array exclbool = N.zeros(vals.shape, dtype=bool) exclbool[exclude] = True # do replacement ones = vals==1.0 # Note: ~ is numpy.logical_not vals[ones & (~exclbool)] = 1e-20 I think you'll have to convert your HDF array into a numpy array first, using numpy.array(). Jeremy

Re: A new module for performing tail-call elimination

2015-07-16 Thread Jeremy Sanders
Robin Becker wrote: > I believe the classic answer is Ackermann's function > > http://demonstrations.wolfram.com/RecursionInTheAckermannFunction/ > > which is said to be not "primitive recursive" ie cannot be unwound into > loops; not sure whether that implies it has to be recursively defined or

Re: Python Random vs. Cython C Rand for Dice Rolls

2015-06-08 Thread Jeremy Sanders
000) b=numpy.random.randint(1,6,5000) numpy.bincount(a+b-1) array([ 0, 1999229, 4000369, 5999372, 7999232, 9998769, 8003430, 5998538, 4001160, 101]) This takes a few seconds on my system. Jeremy -- https://mail.python.org/mailman/listinfo/python-list

Re: Python, C++ interaction

2014-12-04 Thread Jeremy Sanders
and such, it requires a bit more work, however. Jeremy -- https://mail.python.org/mailman/listinfo/python-list

Re: Properly Using 3.4.1 & Valgrind

2014-09-17 Thread Jeremy Moles
On Wednesday, September 17, 2014 6:46:21 PM UTC-4, Jeremy Moles wrote: > Hey guys. I'm using the Python 3.4.1 release tarball, and am trying to > configure it for usage with valgrind. I have followed all of the common, > well-documented steps online such as uncommenting Py_USING_M

Properly Using 3.4.1 & Valgrind

2014-09-17 Thread Jeremy Moles
Hey guys. I'm using the Python 3.4.1 release tarball, and am trying to configure it for usage with valgrind. I have followed all of the common, well-documented steps online such as uncommenting Py_USING_MEMORY_DEBUGGER, compiling with --with-pydebug, --with-valgrind, and --without-pymalloc. I've

Re: checking if two things do not equal None

2014-03-31 Thread Jeremy Sanders
contact.tri...@gmail.com wrote: > if (a, b) != (None, None): > or > if a != None != b: > > Preference? Pros? Cons? Alternatives? I couldn't see anyone else give this, but I like if None not in (a, b): pass Jeremy -- https://mail.python.org/mailman/listinfo/python-list

Re: GUI:-please answer want to learn GUI programming in python , how should i proceed.

2013-12-16 Thread Jeremy Sanders
PySide mailing lists. Work seems slow now everyone is a volunteer. For example, Qt 5 is not yet supported (there's no effort towards this according to the mailing list) and bugs seem to take a long time to be fixed. PyQt support is much better, even when I'm using it for a free proje

Re: squeeze out some performance

2013-12-06 Thread Jeremy Sanders
s = all_y[radiussqd < 50**2] Jeremy -- https://mail.python.org/mailman/listinfo/python-list

Re: Multiple scripts versus single multi-threaded script

2013-10-04 Thread Jeremy Sanders
/questions/807506/threads-vs-processes-in-linux Combined with the lack of a GIL-conflict, processes can be pretty efficient. Jeremy -- https://mail.python.org/mailman/listinfo/python-list

Re: semicolon at end of python's statements

2013-09-05 Thread Jeremy Sanders
Chris Angelico wrote: > Because s/he thought it made for better code, or as a joke? Usually I > see this sort of thing as the latter... http://oldhome.schmorp.de/marc/bournegol.html http://utcc.utoronto.ca/~cks/space/blog/programming/BourneGol Jeremy -- https://mail.python.org/m

Re: RE Module Performance

2013-07-25 Thread Jeremy Sanders
ds UTF-8 to represent the additional codepoints it uses for raw 8- bit bytes and characters not unified with Unicode. " Jeremy -- http://mail.python.org/mailman/listinfo/python-list

Re: interactive plots

2011-07-06 Thread Jeremy Sanders
You can also embed it in a PyQt program. Jeremy -- http://mail.python.org/mailman/listinfo/python-list

Re: How can I define __getattr__ to operate on all items of container and pass arguments?

2011-02-24 Thread Jeremy
On Tuesday, February 15, 2011 2:58:11 PM UTC-7, Jeremy wrote: > > > So the arguments haven't yet been passed when __getattr__() is > > invoked. Instead, you must return a function from __getattr__(); this > > function will then get called with the arguments. Thu

Re: What is the preferred way to sort/compare custom objects?

2011-02-24 Thread Jeremy
On Thursday, February 24, 2011 10:09:53 AM UTC-7, Chris Rebert wrote: > On Thu, Feb 24, 2011 at 8:27 AM, Jeremy wrote: > > I just discovered the wiki page on sorting > > (http://wiki.python.org/moin/HowTo/Sorting/).  This describes the new way > > of sorting a container ins

Re: Preferred method of sorting/comparing custom objects

2011-02-24 Thread Jeremy
Sorry for double posting. Google Groups was acting funny this morning. -- http://mail.python.org/mailman/listinfo/python-list

Re: What is the preferred way to sort/compare custom objects?

2011-02-24 Thread Jeremy
Sorry for double posting. Google Groups was acting funny this morning. -- http://mail.python.org/mailman/listinfo/python-list

Preferred method of sorting/comparing custom objects

2011-02-24 Thread Jeremy
preferred/accepted way. Thanks, Jeremy -- http://mail.python.org/mailman/listinfo/python-list

What is the preferred way to sort/compare custom objects?

2011-02-24 Thread Jeremy
? Is this better than defining a key for sorting my custom objects? Thanks, Jeremy -- http://mail.python.org/mailman/listinfo/python-list

Re: Making Line Graphs

2011-02-19 Thread Jeremy Sanders
spam head wrote: > Does anybody have any recommendations for a good program from > generating these simple graphs? Have a look at Veusz, written in python: http://home.gna.org/veusz/ (I am the lead author). Jeremy -- http://mail.python.org/mailman/listinfo/python-list

Re: How can I define __getattr__ to operate on all items of container and pass arguments?

2011-02-15 Thread Jeremy
On Tuesday, February 15, 2011 1:44:55 PM UTC-7, Chris Rebert wrote: > On Tue, Feb 15, 2011 at 12:29 PM, Jeremy wrote: > > I have a container object.  It is quite frequent that I want to call a > > function on each item in the container.  I would like to do this whenever I > &g

How can I define __getattr__ to operate on all items of container and pass arguments?

2011-02-15 Thread Jeremy
pass 'abc' to the 'itemMethod' method of each item in the container. Does someone know how I can accomplish this? Thanks, Jeremy -- http://mail.python.org/mailman/listinfo/python-list

Re: Convert unicode escape sequences to unicode in a file

2011-01-11 Thread Jeremy
On Tuesday, January 11, 2011 3:36:26 PM UTC-7, Alex wrote: > > Are you _sure_ that your file contains the characters '\', 'u', '0', > '0', 'e' and '9'? I expect that actually your file contains a byte > with value 0xe9 and you have inspected the file using Python, which > has printed the byte usi

Convert unicode escape sequences to unicode in a file

2011-01-11 Thread Jeremy
ec can't encode character u'\xe9' in position 947: ordinal not in range(128) It appears that the data isn't being converted when writing to the file. Can someone please help? Thanks, Jeremy if __name__ == "__main__": f = codecs.open(filename, 'r'

Re: Regular Expression for Finding and Deleting comments

2011-01-04 Thread Jeremy
On Tuesday, January 4, 2011 11:26:48 AM UTC-7, MRAB wrote: > On 04/01/2011 17:11, Jeremy wrote: > > I am trying to write a regular expression that finds and deletes (replaces > > with nothing) comments in a string/file. Comments are defined by the first > > non-whitespace

Regular Expression for Finding and Deleting comments

2011-01-04 Thread Jeremy
#x27;t too hard. The trouble is, the comments are replaced with a new-line; or the new-line isn't captured in the regular expression. Below, I have copied a minimal example. Can someone help? Thanks, Jeremy import re text = """ c C - Second full line comment (first comme

Re: How can I define class methods outside of the class?

2010-12-02 Thread Jeremy
On Dec 2, 10:26 am, "bruno.desthuilli...@gmail.com" wrote: > On 2 déc, 15:45, Jeremy wrote: > > > > > > > On Dec 1, 10:47 pm, James Mills wrote: > > > > On Thu, Dec 2, 2010 at 3:36 PM, Jeremy wrote: > > > > I have some methods that I ne

Re: How can I define class methods outside of the class?

2010-12-02 Thread Jeremy
On Dec 1, 10:47 pm, James Mills wrote: > On Thu, Dec 2, 2010 at 3:36 PM, Jeremy wrote: > > I have some methods that I need (would like) to define outside of the > > class.  I know this can be done by defining the function and then > > setting it equal to some member of an

How can I define class methods outside of the class?

2010-12-01 Thread Jeremy
ds) I would rather not do this. Can someone show me how to do this? Is it even possible? Can decorators be used here? Thanks, Jeremy -- http://mail.python.org/mailman/listinfo/python-list

Re: Compiling/Installing Python 2.7 on OSX 10.6

2010-11-04 Thread Jeremy
w I just have to copy the installation to ~/Library/ Frameworks or just link to the local copy. I started the compilation when I left, tomorrow I'll finish up and see how it went. I don't anticipate any more problems. Thanks, Jeremy -- http://mail.python.org/mailman/listinfo/python-list

Re: Compiling/Installing Python 2.7 on OSX 10.6

2010-11-04 Thread Jeremy
On Nov 4, 1:23 pm, Ned Deily wrote: > In article > <3d9139ae-bd6f-4567-bb02-b21a8ba86...@o15g2000prh.googlegroups.com>, > > > > > >  Jeremy wrote: > > I'm having trouble installing Python 2.7 on OSX 10.6  I was able to > > successfully compile i

Compiling/Installing Python 2.7 on OSX 10.6

2010-11-04 Thread Jeremy
; ../configure --prefix=$HOME/usr/local \ --enable-framework=$HOME/Library/Frameworks \ --disable-toolbox-glue \ MACOSX_DEPLOYMENT_TARGET=10.6 make make install Can anyone help me fix the install error? Thanks, Jeremy PS. Python compiled correctly, but a few modules were not found/

Re: Saving (unusual) linux filenames

2010-08-31 Thread Jeremy Sanders
eparator, making sure that you replace multiple slashes in the path which a single slash (which are equivalent). Jeremy -- http://mail.python.org/mailman/listinfo/python-list

Re: Multiline regex

2010-07-21 Thread Jeremy Sanders
n "test:master_faceRig";\nsetAttr ".tan" 9;\n setAttr ".ktv[0]" 103 0;\n', 'setAttr ".ktv[0]" 103 0;\n')] If you blocks start without a space and subsequent lines with a space. Jeremy -- http://mail.python.org/mailman/listinfo/python-list

Re: GUIs - A Modest Proposal

2010-06-13 Thread Jeremy Sanders
.py Personally I find the Qt layout to be much better than anything provided by CSS and HTML. Personally I'd rather be writing complex C++ templates that those, though it does give you a feeling of achievement when you get what you want with CSS. Jeremy -- Jeremy Sanders http://www.jeremy

Re: How to read file during module import?

2010-04-09 Thread Jeremy
On Apr 9, 4:02 pm, "Gabriel Genellina" wrote: > En Fri, 09 Apr 2010 18:04:59 -0300, Jeremy escribió: > > > How can I locate the file during the import statement.  The supporting > > file is located in the same directory as the module, but when I import > > I get

How to read file during module import?

2010-04-09 Thread Jeremy
file every time? I tried pickling but that wouldn't work because I have custom classes. (Either that or I just don't know how to pickle—this is a highly probable event.) Thanks, Jeremy -- http://mail.python.org/mailman/listinfo/python-list

Re: Dictionary or Database—Please advise

2010-02-26 Thread Jeremy
On Feb 26, 9:29 am, Chris Rebert wrote: > On Fri, Feb 26, 2010 at 7:58 AM, Jeremy wrote: > > I have lots of data that I currently store in dictionaries.  However, > > the memory requirements are becoming a problem.  I am considering > > using a database of some sorts inst

Dictionary or Database—Please advise

2010-02-26 Thread Jeremy
independence without having to install a database and Python interface on all the platforms I'll be using. Is there something built-in to Python that will allow me to do this? Thanks, Jeremy -- http://mail.python.org/mailman/listinfo/python-list

Re: Can I specify regex group to return float or int instead of string?

2010-02-25 Thread Jeremy
On Feb 25, 9:41 am, Steven D'Aprano wrote: > On Thu, 25 Feb 2010 07:48:44 -0800, Jeremy wrote: > > I have a regular expression that searches for some numbers and puts them > > into a dictionary, i.e. > > > '(?P\d+)\s+(?P\d+\.\d+)' > > > Is it poss

Can I specify regex group to return float or int instead of string?

2010-02-25 Thread Jeremy
I have a regular expression that searches for some numbers and puts them into a dictionary, i.e. '(?P\d+)\s+(?P\d+\.\d+)' Is it possible to have the results of the matches returned as int or float objects instead of strings? Thanks, Jeremy -- http://mail.python.org/mailman/listinfo/python-list

Re: Please help with MemoryError

2010-02-12 Thread Jeremy
On Feb 11, 6:50 pm, Steven D'Aprano wrote: > On Thu, 11 Feb 2010 15:39:09 -0800, Jeremy wrote: > > My Python program now consumes over 2 GB of memory and then I get a > > MemoryError.  I know I am reading lots of files into memory, but not 2GB > > worth. > > Are

Please help with MemoryError

2010-02-11 Thread Jeremy
ust a pointer to the data. 2.When do I need to manually allocate/deallocate memory and when can I trust Python to take care of it? 3.Any good practice suggestions? Thanks, Jeremy -- http://mail.python.org/mailman/listinfo/python-list

ANN: Veusz 1.6

2010-01-26 Thread Jeremy Sanders
Veusz 1.6 - Velvet Ember Under Sky Zenith - http://home.gna.org/veusz/ Veusz is Copyright (C) 2003-2010 Jeremy Sanders Licenced under the GPL (version 2 or greater). Veusz is a Qt4 based scientific plotting package. It is written in Python, using PyQt4 for

distutils not finding all of my pure python modules

2010-01-21 Thread Jeremy
file exists in the same directory as regex.py and has the same permissions. Does anyone know what is going on here? I'm using Python 2.6.4. Thanks, Jeremy -- http://mail.python.org/mailman/listinfo/python-list

Re: os.system function

2010-01-12 Thread Jeremy Sanders
aws in your program. - It's inefficient as you have to start a new program to do the work (slow on windows) - Error handling from the xcopy process will not be easy -- Jeremy Sanders http://www.jeremysanders.net/ -- http://mail.python.org/mailman/listinfo/python-list

Re: What is built-in method sub

2010-01-11 Thread Jeremy
On Jan 11, 1:15 pm, "Diez B. Roggisch" wrote: > Jeremy schrieb: > > > > > > > On Jan 11, 12:54 pm, Carl Banks wrote: > >> On Jan 11, 11:20 am, Jeremy wrote: > > >>> I just profiled one of my Python scripts and discovered that >

Re: What is built-in method sub

2010-01-11 Thread Jeremy
On Jan 11, 12:54 pm, Carl Banks wrote: > On Jan 11, 11:20 am, Jeremy wrote: > > > I just profiled one of my Python scripts and discovered that >99% of > > the time was spent in > > > {built-in method sub} > > > What is this function and is there a way t

What is built-in method sub

2010-01-11 Thread Jeremy
I just profiled one of my Python scripts and discovered that >99% of the time was spent in {built-in method sub} What is this function and is there a way to optimize it? Thanks, Jeremy -- http://mail.python.org/mailman/listinfo/python-list

Re: Different number of matches from re.findall and re.split

2010-01-11 Thread Jeremy
a \n instead of a ^ for > >> split. > > > You could use the .split method of a pattern object instead: > > >      tables = re.compile('^ 1', re.MULTILINE).split(line) > > or you might include the flag in the regular expression literal: '(?m)^ 1' Ano

Re: Different number of matches from re.findall and re.split

2010-01-11 Thread Jeremy
On Jan 11, 8:44 am, Iain King wrote: > On Jan 11, 3:35 pm, Jeremy wrote: > > > > > > > Hello all, > > > I am using re.split to separate some text into logical structures. > > The trouble is that re.split doesn't find everything while re.findall >

Re: How to prevent re.split() from removing part of string

2009-12-01 Thread Jeremy
On Nov 30, 5:24 pm, MRAB wrote: > Jeremy wrote: > > I am using re.split to... well, split a string into sections.  I want > > to split when, following a new line, there are 4 or fewer spaces.  The > > pattern I use is: > > >         sections = re.split('\n\

How to prevent re.split() from removing part of string

2009-11-30 Thread Jeremy
I know I can put parentheses around [^s] and keep the matched character, but the character is placed in it's own element of the list instead of with the rest of the lineoftext. Does anyone know how I can accomplish this without losing the matched character? Thanks, Jeremy -- http://mail.pyt

Re: Psyco on 64-bit machines

2009-11-16 Thread Jeremy Sanders
n x86 mode, so Python will typically run faster in 64 bit mode (this is more pronounced in AMD processors, in my experience). It will depend on your application whether 32 bit mode plus Psyco is faster than 64 bit mode. Jeremy -- Jeremy Sanders http://www.jeremysanders.net/ -- http://m

Re: Please help with regular expression finding multiple floats

2009-10-26 Thread Jeremy
t; > Sorry for the line noise folks. One of these days I'm going to learn > gnus. Yep now that works. Thanks for the help. Jeremy -- http://mail.python.org/mailman/listinfo/python-list

Re: Please help with regular expression finding multiple floats

2009-10-23 Thread Jeremy
On Oct 23, 3:48 am, Edward Dolan wrote: > On Oct 22, 3:26 pm, Jeremy wrote: > > > My question is, how can I use regular expressions to find two OR three > > or even an arbitrary number of floats without repeating %s?  Is this > > possible? > > > Thanks, > &g

Please help with regular expression finding multiple floats

2009-10-22 Thread Jeremy
27;)] as a result. I have the regular expression pattern fp1 = '([-+]?\d*\.?\d+(?:[eE][-+]?\d+)?)\s+' which can find a floating point number followed by some space. I can find three floats with found = re.findall('%s%s%s' %fp1, text) My question is, how can I use regular expressions to find two OR three or even an arbitrary number of floats without repeating %s? Is this possible? Thanks, Jeremy -- http://mail.python.org/mailman/listinfo/python-list

Re: PyQt4 - remember widget positions

2009-10-22 Thread Jeremy Sanders
ainWindow to save the dockwidget geometries. I save the size and position of the main window separately and restore it with resize() and move(). You need to make sure all your toolbars and dockwidgets have unique object names for saveState to work. Jeremy -- Jeremy Sanders http://www.jerem

Re: How to schedule system calls with Python

2009-10-15 Thread Jeremy
On Oct 15, 6:47 pm, Ishwor Gurung wrote: > Jeremy, > Hi > > > I need to write a Python script that will call some command line > > programs (using os.system).  I will have many such calls, but I want > > to control when the calls are made.  I won't know in advanc

Re: How to schedule system calls with Python

2009-10-15 Thread Jeremy
On Oct 15, 6:32 pm, MRAB wrote: > TerryP wrote: > > On Oct 15, 7:42 pm, Jeremy wrote: > >> I need to write a Python script that will call some command line > >> programs (using os.system).  I will have many such calls, but I want > >> to control when the call

Re: How to schedule system calls with Python

2009-10-15 Thread Jeremy
On Oct 15, 2:15 pm, TerryP wrote: > On Oct 15, 7:42 pm, Jeremy wrote: > > > I need to write a Python script that will call some command line > > programs (using os.system).  I will have many such calls, but I want > > to control when the calls are made.  I won't know

How to schedule system calls with Python

2009-10-15 Thread Jeremy
one or two processors. I want to run one at a time (or two if I have two processors), wait until it's finished, and then call the next one. How can I use Python to schedule these commands? Thanks, Jeremy -- http://mail.python.org/mailman/listinfo/python-list

Re: Copy directory tree without copying files

2009-09-23 Thread Jeremy Conlin
On Sep 23, 9:44 am, Grant Edwards wrote: > On 2009-09-23, Jeremy Conlin wrote: > > > I am trying to copy a folder hierarchy from one location to another. > > I can use the shutil.copytree function to copy the folder tree, but I > > don't want the files copied, just

Re: Copy directory tree without copying files

2009-09-23 Thread Jeremy Conlin
On Sep 23, 9:31 am, Tim Golden wrote: > Jeremy Conlin wrote: > > On Sep 23, 9:15 am, Tim Golden wrote: > >> Jeremy Conlin wrote: > >>> I am trying to copy a folder hierarchy from one location to another. > >>> I can use the shutil.copytree function to co

Re: Copy directory tree without copying files

2009-09-23 Thread Jeremy Conlin
like def ignore_files(dirpath): ignore = [] for f in os.listdir(dirpath) if os.path.isfile(f): ignore.append(f) return ignore That seems like it will work (haven't tested yet). Thanks for the help. Jeremy -- http://mail.python.org/mailman/listinfo/python-list

Re: Copy directory tree without copying files

2009-09-23 Thread Jeremy Conlin
On Sep 23, 9:15 am, Tim Golden wrote: > Jeremy Conlin wrote: > > I am trying to copy a folder hierarchy from one location to another. > > I can use the shutil.copytree function to copy the folder tree, but I > > don't want the files copied, just the folders.  What is

Copy directory tree without copying files

2009-09-23 Thread Jeremy Conlin
I am trying to copy a folder hierarchy from one location to another. I can use the shutil.copytree function to copy the folder tree, but I don't want the files copied, just the folders. What is a good way to approach this? Thanks, Jeremy -- http://mail.python.org/mailman/listinfo/python-list

Install setup tools for 2.6

2009-08-05 Thread Jeremy Cowles
Ok, I feel like this is a really stupid question, but how do you install setup tools for Python 2.6 under windows? The only format is .egg which requires setup tools to install, doesn't it? Thanks, Jeremy -- http://mail.python.org/mailman/listinfo/python-list

Bug with Python, Cygwin and /dev/urandom?

2009-07-31 Thread Jeremy Cowles
uot;, line 1, in IOError: [Errno 0] Error Errno 0 is supposed to be impossible according to the following thread. Apparently this same issue also causes Mercurial to crash: http://www.nabble.com/hg-1.0-exits-with-abort:-Error-td19021833.html Is this a bug? -- Jeremy -- http://mail.python.org/mailman/listinfo/python-list

Import hashlib fails, embedded

2009-07-19 Thread Jeremy Cowles
bject* mod = PyImport_Import(name); Py_DECREF(name); if (!mod) { cerr << "Error loading module" << endl; PyErr_Print(); return 1; } Py_DECREF(mod); Py_Finalize(); } -- Jeremy -- http://mail.python.org/mailman/listinfo/python-list

Re: Python code for testing well parenthesized expression

2009-07-14 Thread Jeremy Sanders
Diez B. Roggisch wrote: > Yep, you are: > > "((((" > > is certainly not "well parenthized". Thanks for that! -- Jeremy Sanders http://www.jeremysanders.net/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Python code for testing well parenthesized expression

2009-07-14 Thread Jeremy Sanders
e follows at the end. > > If you have a better algorithm or a better Python code (I'm a beginner in > the Python world), don't hesitate ... Don't you want to just test that the number of "("s equals the number of ")"s or am I missing the point? >

Re: Package for fast plotting of many data points in Python?

2009-07-10 Thread Jeremy Sanders
ple of seconds on my system. It's a bit faster without antialiasing, slower if you want to actually plot markers at each position. Jeremy -- Jeremy Sanders http://www.jeremysanders.net/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Zipped Python?

2009-07-04 Thread Jeremy Cowles
> > I'm looking for a full 2.5 or 2.6 version of Python that is zipped (i.e. no >> install). My intentions are to use it for a distributed computing project >> (PyMW) where there is no guarantee that Python is installed on the worker >> machines and an interactive install is out of the question. >>

Zipped Python?

2009-07-04 Thread Jeremy Cowles
I've been looking around, but I haven't been able to turn anything useful up so far. Any help would be appreciated. -- Jeremy -- http://mail.python.org/mailman/listinfo/python-list

Re: Status of Python threading support (GIL removal)?

2009-06-21 Thread Jeremy Sanders
27;s certainly a very interesting read if you're interested in this subject. -- Jeremy Sanders http://www.jeremysanders.net/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Once again, comparison wxpython with PyQt

2009-06-19 Thread Jeremy Sanders
PL. You have to abide by the LGPL, however, which means that the user has to be able to relink a modified form of the library, Qt, with your application should they wish. You should check whether the LGPL is appropriate for the way you want to ship your program. Jeremy -- Jeremy Sanders htt

weakrefs, threads,, and object ids

2009-06-14 Thread Jeremy
Hello, I'm using weakrefs in a small multi-threaded application. I have been using object IDs as dictionary keys with weakrefs to execute removal code, and was glad to find out that this is in fact recommended practice (http://docs.python.org/library/weakref.html) > This simple example shows how

Distributed computing & sending the interpreter

2009-06-13 Thread Jeremy Cowles
st be appropriate? Thanks, Jeremy -- http://mail.python.org/mailman/listinfo/python-list

Re: Adding a Par construct to Python?

2009-05-22 Thread jeremy
On 22 May, 05:17, "Rhodri James" wrote: > On Wed, 20 May 2009 09:19:50 +0100,   > wrote: > > > On 20 May, 03:43, Steven D'Aprano > > wrote: > >> On Tue, 19 May 2009 03:57:43 -0700, jeremy wrote: > >> > As I wrote before, concurr

Re: Adding a Par construct to Python?

2009-05-20 Thread jeremy
On 20 May, 03:43, Steven D'Aprano wrote: > On Tue, 19 May 2009 03:57:43 -0700, jeremy wrote: > >> you want it so simple to use that amateurs can mechanically replace > >> 'for' with 'par' in their code and everything will Just Work, no effort > &g

Re: Adding a Par construct to Python?

2009-05-19 Thread jeremy
ical iteration over a grid, e.g. finite elements, > calculation, where the boundary values need to be read by neighbouring > partitions before they are updated. It assumes that the new values of > the boundary values are stored in temporary variables until they can > be safely updated. >

Re: Adding a Par construct to Python?

2009-05-19 Thread jeremy
On 19 May, 10:24, Steven D'Aprano wrote: > On Mon, 18 May 2009 02:27:06 -0700, jeremy wrote: > > Let me clarify what I think par, pmap, pfilter and preduce would mean > > and how they would be implemented. > > [...] > > Just for fun, I've implemented a par

Re: Adding a Par construct to Python?

2009-05-19 Thread jeremy
n two times slower." Source: http://jessenoller.com/2009/02/01/python-threads-and-the-global-interpreter-lock/ That was ten years ago - do you have any idea as to how things have been progressing in this area since then? Jeremy -- http://mail.python.org/mailman/listinfo/python-list

Re: Adding a Par construct to Python?

2009-05-19 Thread jeremy
On 19 May, 00:32, Steven D'Aprano wrote: > On Mon, 18 May 2009 02:27:06 -0700, jeremy wrote: > > However I *do* actually want to add syntax to the language. I think that > > 'par' makes sense as an official Python construct - we already have had > > this i

Re: Adding a Par construct to Python?

2009-05-18 Thread jeremy
> will actually be and for which types of problems. I agree with this. My approach is in the same space as OpenMP - a simple way for users to define shared memory parallelism. There is no reason why it would not work with multiple disks or IO ports on the same shared memory server. However for di

Re: Adding a Par construct to Python?

2009-05-18 Thread jeremy
s with garbage collection in multi-threaded applications. Without it the reference count method is prone to race conditions. However it seems like a fairly crude mechanism to solve this problem. Individual semaphores could be used for each object reference counter, as in Java. Jeremy -- http://mail.python.org/mailman/listinfo/python-list

Re: Adding a Par construct to Python?

2009-05-18 Thread jeremy
. I like the simplicity of OpenMP, the cross-language portability of MPI and the fact the concurrency is built in to the Occam language. What I am proposing here is a hybrid of the OpenMP and Occam approaches - a change to the language which is very natural and yet is easy for programmers to understand. Concurrency is generally regarded as the hardest concept for programmers to grasp. Jeremy -- http://mail.python.org/mailman/listinfo/python-list

Re: Adding a Par construct to Python?

2009-05-17 Thread jeremy
sumes that the new values of the boundary values are stored in temporary variables until they can be safely updated. Jeremy -- http://mail.python.org/mailman/listinfo/python-list

Adding a Par construct to Python?

2009-05-17 Thread jeremy
e of this would be possible with the current implementation of Python with its Global Interpreter Lock, which effectively rules out true parallel processing. See: http://jessenoller.com/2009/02/01/python-threads-and-the-global-interpreter-lock/ What do others think? Jeremy Martin -- http

  1   2   3   4   5   6   7   >