Re: Console UI

2007-04-09 Thread Jeremy Sanders
e http://tvision.sourceforge.net/ ). I haven't used these, but I fondly remember turbovision from my Turbo Pascal/Turbo C++ days. I think it is still a good text based GUI. Jeremy -- Jeremy Sanders http://www.jeremysanders.net/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Database in memory

2007-04-09 Thread Jeremy Sanders
f name and age data = [ ['fred', 42], ['jim', 16], ... ] name_index = {} for item in data: name_index[item[0]] = item >>> name_index['fred'] ['fred', 42] Dictionaries are one of the most useful things in Python. Make sure you know how to take adavantage

Re: Managing a file buffer

2007-04-09 Thread Jeremy Sanders
n play from one. e.g. http://www2.linuxjournal.com/article/2156 You can create a named pipe from python. Jeremy -- Jeremy Sanders http://www.jeremysanders.net/ -- http://mail.python.org/mailman/listinfo/python-list

Re: limiting memory consumption of Python itself or a dict in a Python program

2007-09-20 Thread Jeremy Sanders
keeps track of the total space of the items stored (using len on the strings)? It could automatically clean out old entries when the memory usage becomes too much. Jeremy -- Jeremy Sanders http://www.jeremysanders.net/ -- http://mail.python.org/mailman/listinfo/python-list

Re: sorteddict PEP proposal [started off as orderedict]

2007-09-25 Thread Jeremy Sanders
ccessing the last item in the dictionary. By the way, I think a LRU cache dictionary would be a great addition to the standard library. Is there any speed advantage from implementing the sorteddict as a red-black tree or something similar in C? Jeremy -- Jeremy Sanders http://www.jeremysanders.ne

Re: sorteddict PEP proposal [started off as orderedict]

2007-09-26 Thread Jeremy Sanders
..), (or you could > create a sorteddict and use update() since that takes the same args as > dict's constructor). first() and last() would also be nice on a sorted dict. Jeremy -- Jeremy Sanders http://www.jeremysanders.net/ -- http://mail.python.org/mailman/listinfo/python-list

Wrapper functions and arguments

2007-10-01 Thread Jeremy Sanders
f __init__(self, func): self.func = func def __call__(self, *args, **argsk): self.func(*args, **argsk) Jeremy -- Jeremy Sanders http://www.jeremysanders.net/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Stopping a fucntion from printing its output on screen

2007-10-17 Thread Jeremy Sanders
): print "this is a test" nullwrite = NullWriter() oldstdout = sys.stdout sys.stdout = nullwrite # disable output testfunc() sys.stdout = oldstdout # enable output testfunc() -- Jeremy Sanders http://www.jeremysanders.net/ -- http://mail.python.org/mailman/listinfo/python-list

ANN: Veusz 1.0 - a scientific plotting package

2007-10-29 Thread Jeremy Sanders
I'm pleased to announce Veusz 1.0. Source, windows and linux i386 binaries are available. Jeremy Sanders Veusz 1.0 - Velvet Ember Under Sky Zenith - http://home.gna.org/veusz/ Veusz is Copyright (C) 2003-2007 Jeremy Sanders <[EMAIL PROTECTED]> Lic

Re: ANN: Veusz 1.0 - a scientific plotting package

2007-10-29 Thread Jeremy Sanders
mitive to use as a backend for Veusz (see previous threads on this subject). Maybe that has changed now, but IMHO Veusz output still looks better. Jeremy -- Jeremy Sanders http://www.jeremysanders.net/ -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: Veusz 1.0 - a scientific plotting package

2007-10-29 Thread Jeremy Sanders
Wildemar Wildenburger wrote: > Oh, OK. I though it was a library. I now see that it is an actual > application. Sorry to have bothered you :) It's a library too :-) -- Jeremy Sanders http://www.jeremysanders.net/ -- http://mail.python.org/mailman/listinfo/python-list

Re: maximum number of threads

2007-01-10 Thread Jeremy Sanders
address space is still used up. So, > when you try to create the 383rd thread, the kernel can't find anyplace > to put its stack. So you can't create it. Interesting. That's why I can get over 3000 on my x86-64 machine... Much more address space. -- Jeremy Sanders

Re: when format strings attack

2007-01-19 Thread Jeremy Sanders
des arguments that trigger that > bug, then naturally your application will inherit whatever security > vulnerabilities the external application suffers from. No surprises there. There are also big risks like this filename = 'foo; rm importantfile' cmd = 'ls %s' % filename o

Re: PyQt4 strangeness

2007-01-23 Thread Jeremy Sanders
ke: import PyQt4.Qt as Qt which imports QtCore and QtGui Jeremy -- Jeremy Sanders http://www.jeremysanders.net/ -- http://mail.python.org/mailman/listinfo/python-list

Re: How to call a function defined in another py file

2007-02-19 Thread Jeremy Gransden
from a import test be sure a is in your path. jeremy On Feb 19, 2007, at 3:20 PM, [EMAIL PROTECTED] wrote: > Hi, > > I have a function called 'test' defined in A.py. > How can I call that function test in my another file B.py? > > Thank you. > > -- > ht

Re: How to call a function defined in another py file

2007-02-19 Thread Jeremy Gransden
be in the same directory. A.py needs to be in your path. > And do I need to compile A.py before I can import it to B.py? No jeremy -- http://mail.python.org/mailman/listinfo/python-list

Re: Installing java2python (Newbie)

2007-02-27 Thread Jeremy Dillworth
I haven't used that particular package, but the norm for setup.py is this command line: python setup.py install Hope this helps, Jeremy -- http://mail.python.org/mailman/listinfo/python-list

Re: Installing java2python (Newbie)

2007-02-27 Thread Jeremy Dillworth
You'll need to run the command in the command-line window. If you're unfamiliar, here's how to start it up: Click "Start" then "Run..." then type "Cmd" in the open field. Click OK. Once you're at the command line there will be a little variation depending on where things are located on your PC.

Re: Drawing charts in Qt

2007-11-06 Thread Jeremy Sanders
re almost like bar charts...). It is implemented with PyQt4. You can use the windows.PlotWindow widget in your PyQt4 app, but unfortunately I haven't got round to documenting this properly... If you're interested I can give instructions. Jeremy -- Jeremy Sanders http://www.jeremysa

Extended date and time

2007-11-10 Thread Jeremy Sanders
past. Thanks, Jeremy. -- Jeremy Sanders http://www.jeremysanders.net/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Extended date and time

2007-11-12 Thread Jeremy Sanders
cross all platforms. Is there any way to convert a datetime into seconds from a certain date? Is the most robust way of doing it just to subtract two datetime objects and turn the timedelta into a floating point number? Thanks Jeremy -- Jeremy Sanders http://www.jeremysanders.net/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Is it possible to use sockets to login to a website that uses php?

2007-11-19 Thread Jeremy Dillworth
s a testing tool which can login to web apps as you describe. It also has a Python API here: http://darcs.idyll.org/~t/projects/twill/doc/python-api.html - Jeremy Dillworth -- http://mail.python.org/mailman/listinfo/python-list

Re: multidimensional "arrays"

2007-12-06 Thread Jeremy Sanders
Horacius ReX wrote: > do you know how to do similar but in two dimensions ? Investigate the numpy module if you are dealing with numbers. Jeremy -- Jeremy Sanders http://www.jeremysanders.net/ -- http://mail.python.org/mailman/listinfo/python-list

Open Source Symposium CFP ending soon

2007-12-07 Thread Jeremy Fluhmann
ks to your presentation Time slot (20, 50 minute, or requested time) Please visit http://www.texasoss.org/cfp for more information. Thanks, Jeremy Fluhmann Open Source Symposium 2008 http://www.texasoss.org/ -- http://mail.python.org/mailman/listinfo/python-list

newbie OO question

2006-04-20 Thread Jeremy Winters
modified default sequence*. what is going on here? how do I instantiate without explicitly defining a new sequence each time? or is this even possible? thanks in advance, jeremy __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Why 3.0/5.0 = 0.59999...

2006-05-09 Thread Jeremy Sanders
Davy wrote: > Is there some precision loss? And how to overcome it? See http://docs.python.org/tut/node16.html for some useful information. -- Jeremy Sanders http://www.jeremysanders.net/ -- http://mail.python.org/mailman/listinfo/python-list

Best Mobile Devices for Python

2006-05-12 Thread Jeremy Winters
o get to know the true usability of a device... as well as the ease of development for it... unless you actually have one.I don't need a GUI... a text based interface is fine for what I'm doing.Any suggestions for devices?  Anybody ever done something similar?Thanks!Jeremy New Yahoo!

Re: linecache and glob

2008-01-03 Thread Jeremy Dillworth
linecache.getline(filename, 4) Maybe you could explain more about what you are trying to do and we could help more? Hope this helps, Jeremy On Jan 3, 10:02 pm, jo3c <[EMAIL PROTECTED]> wrote: > hi everyone happy new year! > im a newbie to python > i have a question > by using li

Re: breaking out of outer loops

2008-01-29 Thread Jeremy Sanders
ntinue > break Perhaps Python needs a "continue N" or a "break N" statement :-) for i in outerLoop: for j in innerLoop: if condition: break 2 Seeing as we can't have a goto :-) Jeremy -- Jeremy Sanders http://www.jeremysanders.net/ -- http://mail.python.org/mailman/listinfo/python-list

Trouble with variable "leakage"?

2008-03-20 Thread Jeremy N
I am working with Python in Maya, and have run into a problem with a variable changing its contents without being scripted to do so. The various print() statements below were from my efforts to track down where it was occurring. I left them in so that anyone running this will more easily see what's

Re: Best way to dynamically get an attribute from a module from within the same module

2008-12-01 Thread Jeremy Sanders
n a dict? That would be clearer, would not mess around with global namespace, and more pythonic IMHO. Jeremy -- Jeremy Sanders http://www.jeremysanders.net/ -- http://mail.python.org/mailman/listinfo/python-list

Re: subprocess.Popen inheriting

2008-12-17 Thread Jeremy Sanders
s instead, which seem much more portable between Windows and Unix (though you don't get to use socketpair and AF_UNIX in Windows). Jeremy -- Jeremy Sanders http://www.jeremysanders.net/ -- http://mail.python.org/mailman/listinfo/python-list

os.pipe and subprocess under Windows

2008-11-17 Thread Jeremy Sanders
s.stderr.write('* %s\n' % intext) if __name__ == '__main__': fd = int(sys.argv[1]) runSlave(fd) --- Does anyone have any ideas how to get this to work under Windows? Is it correct code under unix? Thanks Jeremy -- Jeremy Sanders http://www.jeremysanders.net/ -- http://mail.python.org/mailman/listinfo/python-list

Re: os.pipe and subprocess under Windows

2008-11-17 Thread Jeremy Sanders
wrong to me. I know Windows has no fork - that's why I used subprocess. This MSDN page suggests you you need to do something with SetHandleInformation to get them to be inherited. Doesn't subprocess do that? http://msdn.microsoft.com/en-us/library/ms682499(VS.85).aspx -- Jeremy Sanders http:

Re: os.pipe and subprocess under Windows

2008-11-17 Thread Jeremy Sanders
Jeremy Sanders wrote: > Hi - I have some code which works under linux. It starts a remote python > process using subprocess and communicates to it via a pipe created by > os.pipe. As far as I understand, child processes should inherit file > descriptors from the parent if close_fds=

Re: calling python scripts as a sub-process

2008-11-19 Thread Jeremy Sanders
ely in the list without the shell quoting and extra spaces, i.e. ['python', '../src_python/Match1.py', '--file_ref=.hdf', '--file_cmp=.hdf', '--block_start=xx', '--block_end=62', '--istep=16', '--chmetric=M2', '--use_texid=true'] Jeremy -- Jeremy Sanders http://www.jeremysanders.net/ -- http://mail.python.org/mailman/listinfo/python-list

Re: calling python scripts as a sub-process

2008-11-19 Thread Jeremy Sanders
to remove any shell quoting you may use on the unix/dos command line. Jeremy -- Jeremy Sanders http://www.jeremysanders.net/ -- http://mail.python.org/mailman/listinfo/python-list

Why can function definitions only use identifiers, and not attribute references or any other primaries?

2009-04-23 Thread Jeremy Banks
Hi. I'm sure there've been debates about this before, but I can't seem to figure out what to search for to pull them up, so I'm asking here. It seems to me that a lot of things could be made much easier if you could use primaries other than basic identifiers for the target of function definitions.

Re: Why can function definitions only use identifiers, and not attribute references or any other primaries?

2009-04-23 Thread Jeremy Banks
Thanks for your comments. On Thu, Apr 23, 2009 at 11:52, Gary Herron wrote: > > [...] > > There's no need for a specific addition to the syntax to do this. > > Try this: > >   def foo_bar(): >       return(...) >   foo.bar = foo_bar > >> [...] > > and this: > >   def foo_bar(): >       return(...

Re: Why can function definitions only use identifiers, and not attribute references or any other primaries?

2009-04-23 Thread Jeremy Banks
> Things like your suggestion are called "syntactic-sugar"  -- syntax that > adds a convenience, but *no* new functionality.  Python has plenty of > "syntactic-sugar"s, and more will be added in the future.  To make an > argument for such an addition, one would have to describe some compelling > (a

Re: Why can function definitions only use identifiers, and not attribute references or any other primaries?

2009-04-23 Thread Jeremy Banks
On Thu, Apr 23, 2009 at 13:03, John Krukoff wrote: > You probably want to be searching for multi-line lambda to find the past > decade or so of this argument, as that's where most people who argued > for this came from. But, if you'd just like a bit of discouragement, > here's GvR arguing that the

Re: Why can function definitions only use identifiers, and not attribute references or any other primaries?

2009-04-23 Thread Jeremy Banks
On Apr 23, 5:23 pm, Terry Reedy wrote: > Jeremy Banks wrote: > > Hi. I'm sure there've been debates about this before, but I can't seem > > to figure out what to search for to pull them up, so I'm asking here. > > > It seems to me that a lot of thing

Re: how to proccess the blank in the path on linux

2008-05-21 Thread Jeremy Sanders
might be better to use subprocess to launch it so that you don't need the escaping: subprocess.call(['ls', '8000 dir']) This avoids using the shell. -- Jeremy Sanders http://www.jeremysanders.net/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Python is slow

2008-05-23 Thread Jeremy Pager
On Fri, 23 May 2008 03:21:23 -0700, Ivan Illarionov <[EMAIL PROTECTED]> wrote: On 23 май, 02:20, Brad <[EMAIL PROTECTED]> wrote: cm_gui wrote: > Python is slow. It ain't C++, but it ain't a punch card either... somewhere in between. I find it suitable for lots of stuff. I use C++ when

libffi and ARM support for Python

2008-07-02 Thread Jeremy Link
The latest version of libffi is supposed to support the ARM processor. Has anyone taken this and folded into Python v2.5.2 so that we have support for this? I've tried but have run into a few issues: 1. Needed to enable FFI_CLOSURES 2. Added FFI_TRAMPOLINE_SIZE (set it to 32, not

better way to search the Python archive

2008-07-04 Thread Jeremy Link
Just an FYI out to folks that want a better way to search the Python archive. I've been using MarkMail (www.markmail.org ) to search the archives and it works MUCH better than the Google archive. It is a free hosting of all sorts of GNU/open source mailing lists (

Re: random numbers according to user defined distribution ??

2008-08-08 Thread Jeremy Sanders
ite a lot of distributions. See help(numpy.random). Jeremy -- Jeremy Sanders http://www.jeremysanders.net/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Reversing a dict?

2008-05-06 Thread Jeremy Sanders
around as the dict is modified. Have a look at diveintopython: http://www.diveintopython.org/getting_to_know_python/dictionaries.html You'll have to store your keys in a list or tuple to keep them ordered. Jeremy -- Jeremy Sanders http://www.jeremysanders.net/ -- http://mail.python.org/ma

Re: Getting references to obect instances into a list

2008-08-27 Thread Jeremy Sanders
self.lst = lst In [6]: m = foo([2,3,4]) In [7]: p = foo(['a','b','c']) In [8]: import weakref In [20]: q = [weakref.proxy(m), weakref.proxy(p)] In [23]: q[0].lst, q[1].lst Out[23]: ([2, 3, 4], ['a', 'b', 'c']) In [24]: del p In [27]: q[1].lst gives a reference error -- Jeremy Sanders http://www.jeremysanders.net/ -- http://mail.python.org/mailman/listinfo/python-list

Inquiry regarding the name of subprocess.Popen class

2008-09-01 Thread Jeremy Banks
Hi. I wondered if anyone knew the rationale behind the naming of the Popen class in the subprocess module. Popen sounds like the a suitable name for a function that created a subprocess, but the object itself is a subprocess, not a "popen". It seems that it would be more accurate to just name t

Re: indirectly addressing vars in Python

2008-10-01 Thread Jeremy Sanders
"credits" or "license" for more information. >>> oats=[1] >>> peas=[6] >>> mylist = [oats, peas] >>> mylist[1][0] = mylist[1][0]+1 >>> mylist [[1], [7]] >>> peas [7] This is because integers are immutable, but lists are mu

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

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

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: 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: 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: 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: 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

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: 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

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

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: 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. >>

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: 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: 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

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

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

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

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

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

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: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
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: 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

Python C module questions

2005-09-01 Thread jeremy . d . brewer
. And it was a lot of work. Are there any nice wrapper functions out there for turning Python sequences into C arrays and vice versa? Thanks, Jeremy Brewer The code is below: #include #include #include #include #include /* xmatch: Takes 2 sets of positions (ra1, dec1 of size len1 a

chop() and empty() functions

2006-05-26 Thread Jeremy L. Moles
I've been using the following lambda/function for a number of months now (I got the idea from someone in #python, though I don't remember who): def chop(s, n): """Chops a sequence, s, into n smaller tuples.""" return zip(*[iter(s)] * n) ...or... chop = lambda s, n: zip(*[iter(s)

Re: chop() and empty() functions

2006-05-26 Thread Jeremy L. Moles
On Sat, 2006-05-27 at 06:22 +1000, John Machin wrote: > On 27/05/2006 2:54 AM, Jeremy L. Moles wrote: > > ["chop" snipped] > > > > > Furthermore, what do people think about the idea of adding a truly > > empty, no-op global lambda somewhere in Python? I

Having to "print" before method invocation?

2006-03-08 Thread Jeremy L. Moles
I have an object (written as part C extension, part pure Python) called foo that I've been using without much fuss for a few months now. However, in my latest project (a rather large one involving multi-threading, pygtk, etc.), I'm seeing some really strange behavior with a particular instance of m

Re: Having to "print" before method invocation?

2006-03-08 Thread Jeremy L. Moles
Hey Fredrik, thanks for responding. :) Your posts are always helpful and informative! On Wed, 2006-03-08 at 15:41 +0100, Fredrik Lundh wrote: > Jeremy L. Moles wrote: > > >I have an object (written as part C extension, part pure Python) called > > foo that I've been using

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

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

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

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

Re: Ruby/Python/REXX as a MUCK scripting language

2006-11-26 Thread Jeremy C B Nicoll
so that either no commands are passed to an external environment, or that only some are. Surely that'd be less work than creating something from scratch. -- Jeremy C B Nicoll, Edinburgh, Scotland - my opinions are my own. -- http://mail.python.org/mailman/listinfo/python-list

Re: Working with fixed format text db's

2007-06-08 Thread Jeremy C B Nicoll
ed to be sure that you don't have any other code anywhere that implicitly relies on a particular field being a known fixed length. > > However, I'd like something better. What precisely do you want to achieve? -- Jeremy C B Nicoll - my opinions are my own. -- http://mail.python.org/mailman/listinfo/python-list

Re: Working with fixed format text db's

2007-06-08 Thread Jeremy C B Nicoll
Neil Cerutti <[EMAIL PROTECTED]> wrote: > On 2007-06-08, Jeremy C B Nicoll <[EMAIL PROTECTED]> wrote: > > Neil Cerutti <[EMAIL PROTECTED]> wrote: > >> Luckily, the output format has not changed yet, so issues with > >> maintaining the above haven'

What order does info get returned in by os.listdir()

2007-08-14 Thread Jeremy C B Nicoll
er than before the A-ones. I was wondering why... -- Jeremy C B Nicoll - my opinions are my own. -- http://mail.python.org/mailman/listinfo/python-list

Re: What order does info get returned in by os.listdir()

2007-08-15 Thread Jeremy C B Nicoll
Jeremy C B Nicoll <[EMAIL PROTECTED]> wrote: > When I use os.listdir() to return that list of leaf values, I do seem to > get them in alphabetical order, A before B before C etc, but the > ~-prefixed ones are returned after the Z-prefixed files rather than before > the A-ones.

Re: What order does info get returned in by os.listdir()

2007-08-15 Thread Jeremy C B Nicoll
Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > On Wed, 15 Aug 2007 12:34:27 +0100, Jeremy C B Nicoll wrote: > > > I've some supplementary questions... my original code was looking at > > each leafname in turn via > > > > for leaf in o

Finding out what other tasks are running

2007-11-23 Thread Jeremy C B Nicoll
and Linux/Unix ways of doing this? -- Jeremy C B Nicoll - my opinions are my own. -- http://mail.python.org/mailman/listinfo/python-list

Re: File to dict

2007-12-08 Thread Jeremy C B Nicoll
is vast surely there's some or a lot of point in breaking it up into a group of smaller files? -- Jeremy C B Nicoll - my opinions are my own. -- http://mail.python.org/mailman/listinfo/python-list

Re: Different kinds of Import Errors

2007-12-08 Thread Jeremy C B Nicoll
that could be raised? How does one write a try/except piece of code that works (ie traps whatever exception occurs, though obviously it can't necessarily fix an arbitrary exception) for any exception, even those not known of in advance by the author? -- Jeremy C B Nicoll - my opinions are my own. -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie edit/compile/run cycle question

2007-12-08 Thread Jeremy C B Nicoll
ython script without running it? Does a syntax check report all syntax errors or just the first one found? -- Jeremy C B Nicoll - my opinions are my own. -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie edit/compile/run cycle question

2007-12-08 Thread Jeremy C B Nicoll
Steve Howell <[EMAIL PROTECTED]> wrote: > > --- Jeremy C B Nicoll <[EMAIL PROTECTED]> wrote: > > What command (in XP) does one need to issue to > > syntax check a saved python > > script without running it? > > Perhaps oversimplifying a bit, running

Re: Different kinds of Import Errors

2007-12-09 Thread Jeremy C B Nicoll
Steven D'Aprano <[EMAIL PROTECTED]> wrote: > On Sun, 09 Dec 2007 00:25:53 +, Jeremy C B Nicoll wrote: > > > > for app_name in settings.INSTALLED_APPS: > > > try: > > > __import__(app_name + '.management',

Re: Newbie edit/compile/run cycle question

2007-12-09 Thread Jeremy C B Nicoll
Steve Howell <[EMAIL PROTECTED]> wrote: > > --- Jeremy C B Nicoll <[EMAIL PROTECTED]> wrote: > > > Steve Howell <[EMAIL PROTECTED]> wrote: > > > > > --- Jeremy C B Nicoll <[EMAIL PROTECTED]> > > wrote: > > > >

Re: searching a value of a dict (each value is a list)

2007-12-09 Thread Jeremy C B Nicoll
put to. The code someone else posted to reverse the keys is all very well, but surely hugely wasteful on cpu, maybe storage, and elapsed time. Even if the dict in this form is needed for some other reason, couldn't the code that created it also create a reverse index at the same

Re: searching a value of a dict (each value is a list)

2007-12-09 Thread Jeremy C B Nicoll
[EMAIL PROTECTED] wrote: > Jeremy C B Nicoll: > > The code someone else posted ... > > If you are talking about my D code then I know it... No I meant the code that used python to iterate over the dict and create zillions of extra keys. I've deleted earlier posts in the th

Re: searching a value of a dict (each value is a list)

2007-12-09 Thread Jeremy C B Nicoll
ored is suitable, you might sensibly use several or many smaller dicts to store all the data (and thus save time reverse-keying much less of it). -- Jeremy C B Nicoll - my opinions are my own. -- http://mail.python.org/mailman/listinfo/python-list

<    1   2   3   4   5   6   7   >