Re: Multi-threaded FTP Question

2006-07-12 Thread Jeremy Jones
ed sites that only allowed two FTP downloads at > a time... This is what I was starting to think as well. The only thing that looked funky with the OP's code was that it looked like he was writing everything to a filename of "" (unless he's intentionally modified his code

Re: Editing File

2006-07-12 Thread Jeremy Jones
butes, it automatically reserializes it. Anyway, hope this helps. - Jeremy M. Jones -- http://mail.python.org/mailman/listinfo/python-list

Re: Data access from multiple code modules

2006-07-12 Thread Jeremy Jones
onstructor. However, a main.py, gui.py, and db.py smells a little like your standard MVC, in which case, you would get your controller to pass in the data pieces as the GUI needs them. - Jeremy M. Jones -- http://mail.python.org/mailman/listinfo/python-list

Re: Editing File

2006-07-12 Thread Jeremy Jones
eed/high.mp3.xml: name: Revision3 - Diggnation w/Kevin Rose & Alex Albrecht mode: dl http://geekmuse.net/podcast/: name: Geek Muse mode: dl http://www.itconversations.com/rss/category-rss.php?k=achange2005&e=1: name: Accelerating Change 2005 mode: dl Nice and clean. - Jeremy M. Jones -- http://mail.python.org/mailman/listinfo/python-list

Re: Data access from multiple code modules

2006-07-12 Thread Jeremy Jones
[EMAIL PROTECTED] wrote: > Doh! How simple. Why didn't I think of that? I'm too used to procedural > scripts where you'd just put everything in a global data structure. I > know this is bad, but it's hard to get out of that mentality. Sounds like you got it. Just pass it on down as needed. -

Re: How to have application-wide global objects

2006-07-13 Thread Jeremy Sanders
sn't create new objects, so that's not very likely. can you > post some code so we don't have to guess what you've tried and not ? It does if you mess around with sys.path between doing two imports of the same thing (at least I found out the hard way on Python 2.4). I'm

Re: How to have application-wide global objects

2006-07-14 Thread Jeremy Sanders
ported twice, once as foo.bar and secondly as bar. The value of 42 in myvar does not get retained, as there are two copies of the module imported. -- Jeremy Sanders http://www.jeremysanders.net/ -- http://mail.python.org/mailman/listinfo/python-list

Re: How to have application-wide global objects

2006-07-14 Thread Jeremy Sanders
ike "Details of the module searching and loading process are implementation and platform specific". The results can be a little suprising! It would be include a check so that you could get a warning with debugging switched on. -- Jeremy Sanders http://www.jeremysanders.net/ -- http://mail.python.org/mailman/listinfo/python-list

Python on RedHat AS 2.1?

2006-07-14 Thread Jeremy Winters
Installable package?Any ideas?Thanks in advance,Jeremy Yahoo! Music Unlimited - Access over 1 million songs. Try it free. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python on RedHat AS 2.1?

2006-07-17 Thread Jeremy Winters
higher on this OS?Anybody?JeremyFrom: Fredrik Lundh <[EMAIL PROTECTED]>To: python-list@python.orgDate: Sat, 15 Jul 2006 10:20:21 +0200Subject: Re: Python on RedHat AS 2.1? Jeremy Winters wrote:> Installable package?> > Any ideas?is RedHat no longer providing pre

Re: pyqt scrollview layout

2006-07-21 Thread Jeremy Sanders
//www.informatik.uni-freiburg.de/~steffenh/premiselist.{html|py} You should ask on the PyQt mailing list - you're much more likely to get an answer. Jeremy -- Jeremy Sanders http://www.jeremysanders.net/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Nested function scope problem

2006-07-27 Thread Jeremy Sanders
tok = [''] def inner(): tok[0] += 'hi' ... tok[0] = 'foo' inner() print tok[0] -- Jeremy Sanders http://www.jeremysanders.net/ -- http://mail.python.org/mailman/listinfo/python-list

Python for Palm OS?

2006-07-28 Thread jeremy smith
anyone know of a python for palm application pippy is not downloading right __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: Small Troll on notation of variables over time

2006-08-21 Thread Jeremy Sanders
val): self.vals.append(val) a = Hist() a.set(5) print a() a.set('hi there') print a() print a(-2) Which prints 5 hi there 5 -- Jeremy Sanders http://www.jeremysanders.net/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Python and STL efficiency

2006-08-21 Thread Jeremy Sanders
const string foo = "What do you know?"; for (long int i=0; i<1 ; ++i){    a.push_back(foo); ... } as many C++ implementations use reference counting for identical strings. Jeremy -- Jeremy Sanders http://www.jeremysanders.net/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Python and STL efficiency

2006-08-22 Thread Jeremy Sanders
7:~> ./a.out What do you know? chicken crosses road fool so long... What do you know? chicken crosses road fool so long... Elapsed 2.11 Elapsed 1.11 (This is with an Althon 64 4600+ running Linux). Unfortunately the Python on this computer doesn't have set as it is too old, so I can't

Python 123 introduction

2006-10-30 Thread Jeremy Sanders
http://www-xray.ast.cam.ac.uk/~jss/lecture/computing/notes/out/python_123.pdf LaTeX source: http://www-xray.ast.cam.ac.uk/~jss/lecture/computing/notes/out/python_123.tex Jeremy -- Jeremy Sanders http://www.jeremysanders.net/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 123 introduction

2006-10-30 Thread Jeremy Sanders
needs a bit of cleaning up as it assumes things such as python being in /usr/local/bin... I may try to improve this later. Jeremy -- Jeremy Sanders http://www.jeremysanders.net/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 123 introduction

2006-10-30 Thread Jeremy Sanders
quick 2 hour course for people to work through. It overlaps quite a bit with the tutorial, but I tried to minimise any detail. I just publicised it in case anybody wanted something similar. Jeremy -- Jeremy Sanders http://www.jeremysanders.net/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Plot pkg - Multiple Y axes?

2006-11-07 Thread Jeremy Sanders
http://home.gna.org/veusz/ You can have any number of y-axes, see http://home.gna.org/veusz/screenshots/screenshot1.png The PyQt4 version is coming along nicely too... Jeremy -- Jeremy Sanders http://www.jeremysanders.net/ -- http://mail.python.org/mailman/listinfo/python-list

Re: How to choose the right GUI toolkit ?

2006-11-09 Thread Jeremy Sanders
e Windows. I too like to learn from > actual printed books, so I'll check this one out. O'Reilly should do a > book on Python GUI stuff! PyQt is well supported under native Windows. Qt-4 is now GPLd for Windows too. I'd highly recommend it. Jeremy -- Jeremy San

Re: How to choose the right GUI toolkit ?

2006-11-10 Thread Jeremy Sanders
ll. You normally use PyQt/Qt on Windows without Cygwin. There are very few bugs and lots of professional companies base their products on Qt Windows. -- Jeremy Sanders http://www.jeremysanders.net/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Programmatically finding "significant" data points

2006-11-14 Thread Jeremy Sanders
, and remove points which are more than N-times the standard deviation from the median. Jeremy -- Jeremy Sanders http://www.jeremysanders.net/ -- http://mail.python.org/mailman/listinfo/python-list

Mutual interdependency problem

2006-06-07 Thread Jeremy Sanders
dir2/foo.py then this works. Can this be explained or fixed? Maybe the "from foo import *" style in __init__.py is a bad idea, but it allows you to expose a flat namespace without having to put all the code into one file. Then naturally you need mutual interdependencies, and then it br

import hook

2006-06-11 Thread Jeremy Sanders
it should start looking for bar in the current directory which could be called "foo-0.43". I've tried overriding __import__, chopping out "foo." from package names, but that tends to break. I've also tried overriding imp.find_module() but Python never appears t

Re: import hook

2006-06-18 Thread Jeremy Sanders
'veusz' sys.modules['veusz'] = veusz This is part of the main program. If it can't import it (i.e. it is not installed), it imports the __init__ module, renames it, and corrects its path, then sticks it into the list of imported modules. Jeremy -- Jeremy Sanders http://

SimpleXMLRPCServer and client IP address

2006-06-28 Thread Jeremy Monnet
27;t understand why in the middle of my function the server.socket.getpeername() says it's not connected. I'm using python2.3 on linux (debian sid). Thanks for any help ! Jeremy -- Linux Registered User #317862 Linux From Scratch Registered User #16571 Please do not send me .doc, .xl

Re: SimpleXMLRPCServer and client IP address

2006-06-28 Thread Jeremy Monnet
y not to show it) and I plan to add several more in the near future. Overloading verify_request() in this way means I can't use the same xmlrpcserver for other methods ? Or am I just wrong ? (I should probably have a look at "request", maybe that's a key ?) Or is it the "more contro

Re: Multi-threaded FTP Question

2006-07-11 Thread Jeremy Jones
e?  Are you trying to pass the same FTP connection object to all 5 threads? -- Jeremy M. Joneshttp://jeremymjones.com -- http://mail.python.org/mailman/listinfo/python-list

Re: ntp in python

2006-08-29 Thread Jeremy Sanders
delay out from the ntpdc console using dmpeers, or lopeers in ntpq. You could have two peers either side of the link and measure the delay from NTP. You may also be able to query remote ntp servers to get their delays to their peers. Jeremy -- Jeremy Sanders http://www.jeremysanders

Re: ntp in python

2006-08-30 Thread Jeremy Sanders
ithm. I saw something about ntp on the twisted mailing list, so you could ask there. Jeremy -- Jeremy Sanders http://www.jeremysanders.net/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Force sleep to ignore interrupts

2006-09-14 Thread Jeremy Sanders
> the event loop out of sync with real time. Maybe you could install a signal handler to ignore ctrl+c, when required import signal signal.signal(signal.SIGINT, signal.SIG_IGN) -- Jeremy Sanders http://www.jeremysanders.net/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Is it possible to save a running program and reload next time ?

2006-09-21 Thread Jeremy Sanders
I don't know which ones work with python. -- Jeremy Sanders http://www.jeremysanders.net/ -- http://mail.python.org/mailman/listinfo/python-list

Re: naming objects from string

2006-09-21 Thread Jeremy Sanders
']['apple'] = (1,2,3,4) myvals['bob']['orange'] = (2,3,4) myvals['pete']['red'] = (4,5,6,7) and so on >>> myvals {'pete': {'red': (4, 5, 6, 7)}, 'bob': {'orange': (2, 3, 4), 'apple': (1, 2, 3,4)}} -- Jeremy Sanders http://www.jeremysanders.net/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Writing 2d array in an ascci file

2006-09-28 Thread Jeremy Sanders
>>f, str(x).replace('[',' ').replace(']', ' ') f.close() Jeremy -- Jeremy Sanders http://www.jeremysanders.net/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Best way to handle large lists?

2006-10-03 Thread Jeremy Sanders
Chaz Ginger wrote: > What would sets do for me over lists? It's faster to tell whether something is in a set or dict than in a list (for some minimum size). Jeremy -- Jeremy Sanders http://www.jeremysanders.net/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Best way to handle large lists?

2006-10-03 Thread Jeremy Sanders
Jeremy Sanders wrote: > Chaz Ginger wrote: > >> What would sets do for me over lists? > > It's faster to tell whether something is in a set or dict than in a list > (for some minimum size). As a footnote, this program import random num = 10 a = set( range(nu

Re: PyQt app in seperate thread

2006-11-23 Thread Jeremy Sanders
allows the user to send it python commands from the main thread. Have a look at this code to see how it works: http://svn.gna.org/viewcvs/veusz/branches/qt4/embed.py?rev=530&view=markup Jeremy -- Jeremy Sanders http://www.jeremysanders.net/ -- http://mail.python.org/mailman/listinfo/python-list

Wrapping A Shell

2006-11-28 Thread Jeremy Moles
I'm not sure if this is really the right place to ask this question, but since the implementation is in Python, I figured I'd give it a shot. I want to "wrap" a shell process using popen inside of python program rather than creating a new shell process for each line I process in the app. For examp

RE: How to read the directory which the actively running python file islocated in?

2006-12-01 Thread Jeremy Sanders
Michael Malinowski wrote: > Nevermind, I got it using the sys.argv[0] That doesn't always work, as on unix the path isn't prepended onto sys.argv[0] necessarily. import os.path ... os.path.dirname(os.path.abspath(__file__)) may be better. -- Jeremy Sanders http://www.jere

Re: Synchronization methodology

2007-01-03 Thread Jeremy Dillworth
Hi Chris, Have you looked at the mutex module? Jeremy -- http://mail.python.org/mailman/listinfo/python-list

Re: PyGTK

2006-02-09 Thread Jeremy Sanders
ose it depends on what sort of image manipulation you need. Jeremy -- Jeremy Sanders http://www.jeremysanders.net/ -- http://mail.python.org/mailman/listinfo/python-list

Re: is there a better way?

2006-02-10 Thread Jeremy Sanders
. There are never O's between > X's. What not for x in list: if x == O: break storage.append(x) ?? -- Jeremy Sanders http://www.jeremysanders.net/ -- http://mail.python.org/mailman/listinfo/python-list

Re: is there a better way?

2006-02-10 Thread Jeremy Dillworth
ot currently the case, things can always change. Lastly, you could do this: - list.append(O) storage += list[:list.index(O)] - The first line makes sure there is always an O in list, otherwise index(O) will throw an exception. That's sligh

Re: Poisson Distribution (for a newbie)

2006-02-16 Thread Jeremy Sanders
sed numarray's poisson distribution generator, which was very useful. There may well be something similar in NumPy/Numeric/SciPy. e.g. from numarray.random_array import poisson for i in xrange(100): print poisson(10) Where 10 is the mean. Jeremy -- Jeremy Sanders http://www.jeremysanders.net/

Re: ls files --> list packer

2006-02-24 Thread Jeremy Sanders
I V wrote: > snd_filelist = [f for f in os.listdir('/snd/Public/') if > f.endswith('.aiff')] Or even from glob import glob snd_filelist = glob('/snd/Public/*.aiff') Jeremy -- Jeremy Sanders http://www.jeremysanders.net/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Printing a file

2006-02-28 Thread Jeremy Sanders
ce to the dialog to get the user-selected page range, etc. Jeremy -- Jeremy Sanders http://www.jeremysanders.net/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Printing a file

2006-03-02 Thread Jeremy Sanders
e printer as usual. No - that was in my example. The work I was refering to was taking the user's input to the dialog and writing the pages to the device in the right order (I don't think this is done automatically). Jeremy -- Jeremy Sanders http://www.jeremysanders.net/ -- http://mail.python.org/mailman/listinfo/python-list

[ANNOUNCE] PyIW and PyWPA

2006-03-03 Thread Jeremy Moles
Many updates to the modules I'm writing for interacting with wireless networking in Linux using Python. PyIW - Python bindings to libiw. PyWPA - Python bindings/wrapper for wpa_supplicant. They can be found here: http://downloads.emperorlinux.com/contrib/pyiw http://downloads.emperorlinux.com/c

[ANNOUNCE] PyIW and PyWPA

2006-03-03 Thread Jeremy Moles
Sorry for the double-post; that's what I get for using busted, Dapper Evolution. :) Many updates to the modules I'm writing for interacting with wireless networking in Linux using Python. PyIW - Python bindings to libiw. PyWPA - P

Re: compare two voices

2005-04-30 Thread Jeremy Bowers
On Sat, 30 Apr 2005 20:00:57 -0700, Qiangning Hong wrote: > I want to make an app to help students study foreign language. I want the > following function in it: > > The student reads a piece of text to the microphone. The software records > it and compares it to the wave-file pre-recorded by th

Re: Python interpreter in Basic or a Python-2-Basic translator.

2005-05-01 Thread Jeremy Bowers
On Sun, 01 May 2005 06:18:27 -0700, Engineer wrote: > The security 'droids have decided that since the MS Office Suite is a > "standard" application then software written in MS Office VBA must be > "safe." "Melissa". (Google hint: "Virus".) Given the brazen stupidity demonstrated by these decisio

Re: compare two voices

2005-05-02 Thread Jeremy Bowers
On Mon, 02 May 2005 13:58:07 -0500, phil wrote: > You didn't indicate how deep you want to get into the code yourself. > > I am gonna step way out of my mathematical depth here I mean no disrespect, but this is the last accurate statement you made. I wouldn't say this, except that if the origin

Re: compare two voices (Jeremy Bowers)

2005-05-02 Thread Jeremy Bowers
On Mon, 02 May 2005 16:37:19 -0500, phil wrote: > I will defend one statement though. I have yet to see anything which > Python would not make a good wrapper for. Some of the OpenGL pygame stuff > is very cool. Alright, you got me :-) I got excessively broad. -- http://mail.python.org/mailman/l

Re: empty lists vs empty generators

2005-05-02 Thread Jeremy Bowers
On Mon, 02 May 2005 16:14:57 -0700, Brian Roberts wrote: > Q1: Is there a better or alternate way to handle this? Q2: Is there a way > that handles both lists and generators, so I don't have to worry about > which one I've got? Are you in control of your generators? You could put a method on them

[JOB] The Weather Channel in Atlanta, GA

2005-05-03 Thread Jeremy Jones
or jmjones at weather dot com. Jeremy Jones -- http://mail.python.org/mailman/listinfo/python-list

Problems calling cdrdao from python 2.3

2005-05-04 Thread Jeremy Wilkins
Hi all, I'm trying to use popen3 to call cdrdao from within python, it gets half way through though then hangs. This is easy to replicate from the interpreter. import popen2 child = popen2.Popen3('cdrdao disk-info --device 0,0,0'.split(' '), 1, 100) child.fromchild.read() The above code works f

Re: empty lists vs empty generators

2005-05-04 Thread Jeremy Bowers
On Wed, 04 May 2005 13:45:00 +, Leif K-Brooks wrote: > Jeremy Bowers wrote: >> def __init__(self, generator): >> self.generator = generator > > You'll want to use iter(generator) there in order to handle reiterables. Can you expand that explanation a

Re: How to write this regular expression?

2005-05-04 Thread Jeremy Bowers
On Wed, 04 May 2005 20:24:51 +0800, could ildg wrote: > Thank you. > > I just learned how to use re, so I want to find a way to settle it by > using re. I know that split it into pieces will do it quickly. I'll say this; you have two problems, splitting out the numbers and verifying their confor

Re: empty lists vs empty generators

2005-05-04 Thread Jeremy Bowers
On Wed, 04 May 2005 20:33:31 +, Leif K-Brooks wrote: > With the EmptyGeneratorDetector class as you defined it, lists will fail: > > >>> EmptyGeneratorDetector([]) > Traceback (most recent call last): >File "", line 1, in ? >File "", line 15, in __init__ > AttributeError: 'list' objec

Re: How to write this regular expression?

2005-05-04 Thread Jeremy Bowers
On Thu, 05 May 2005 09:30:21 +0800, could ildg wrote: > Jeremy Bowers wrote: >> Python 2.3.5 (#1, Mar 3 2005, 17:32:12) [GCC 3.4.3 (Gentoo Linux >> 3.4.3, ssp-3.4.3-0, pie-8.7.6.6)] on linux2 Type "help", "copyright", >> "credits" or "

Re: How to detect a double's significant digits

2005-05-05 Thread Jeremy Bowers
On Thu, 05 May 2005 18:42:17 +, Charles Krug wrote: > On 5 May 2005 10:37:00 -0700, mrstephengross <[EMAIL PROTECTED]> > wrote: >> Hi all... How can I find out the number of significant digits (to the >> right of the decimal place, that is) in a double? At least, I *think* >> that's what I'm a

Re: How to detect a double's significant digits

2005-05-05 Thread Jeremy Bowers
On Fri, 06 May 2005 02:44:43 +, Grant Edwards wrote: > On 2005-05-05, Jeremy Bowers <[EMAIL PROTECTED]> wrote: > >> Since I think he mentioned something about predicting how much space it >> will take to print out, my suggestion is to run through whatever >> p

Re: How to detect a double's significant digits

2005-05-05 Thread Jeremy Bowers
On Thu, 05 May 2005 20:08:46 -0700, Erik Max Francis wrote: > Grant's point was that as significance is used in scientific studies, > there's no way to answer the question without having the number in > advance. My point was that the original poster never defined "significance" in that manner, and

Re: How to detect a double's significant digits

2005-05-06 Thread Jeremy Bowers
On Fri, 06 May 2005 08:27:03 +0200, Fredrik Lundh wrote: > Jeremy Bowers wrote: > >> > A step which will require him to tell the printing routine how many >> > digits he wants printed. >> >> Not necessarily; consider the str() of a float in Python, especia

Re: Listening to changes in a C++ variable from python

2005-05-06 Thread Jeremy Bowers
On Fri, 06 May 2005 19:56:34 -0700, lamthierry wrote: > Let's say I have the following source code in C++: > > // The following is in a .cpp file > > int val = 0; > for ( int i = 0; i < 10; i++ ) >val = i; > > > // Now I'm in a python GUI, glade or GTK > Is it possible from the GUI side to

Re: Listening to changes in a C++ variable from python

2005-05-07 Thread Jeremy Bowers
On Sat, 07 May 2005 07:16:58 -0700, lamthierry wrote: > Is there some python method which can do the polling you are talking > about? Or can you send me a link to some existing example? Take a moment to go back to the basics. C++ is, in general, a simple system. The *language* is complicated at t

Re: Need help subclassing Borg

2005-05-07 Thread Jeremy Bowers
On Sun, 08 May 2005 02:42:09 +1000, Steven D'Aprano wrote: > I'm thinking what I might need is a function that generates a Borg-like > class. So I would do something like: > > Rabbit = MakeBorgClass() > # Rabbit is now a class implementing shared state > # all instances of Rabbit share the same st

Re: Newbie: saving dialog variables

2005-05-07 Thread Jeremy Bowers
On Sat, 07 May 2005 13:24:34 +, jeff elkins wrote: > Howdy, > > I've written a program that calls an imported dialog to gather some needed > input. What's the common method for passing that data back to the caller? > I've > tried a 'return data' prior to self.Close() ... all that happens t

Re: Q: The `print' statement over Unicode

2005-05-07 Thread Jeremy Bowers
On Sat, 07 May 2005 12:10:46 -0400, FranÃois Pinard wrote: > [Martin von LÃwis] > >> FranÃois Pinard wrote: >> >> > Am I looking in the wrong places, or else, should not the standard >> > documentation more handily explain such things? > >> It should, but, alas, it doesn't. Contributions are wel

Re: Newbie: saving dialog variables

2005-05-07 Thread Jeremy Bowers
On Sat, 07 May 2005 15:43:08 +, jeff elkins wrote: > === > import wx > > def create(parent): > return vents(parent) > > [wxID_VENTS, wxID_VENTSEXITBUTTON, > wxID_VENTSVENTTYPETEXT, > [snip] > > ] = [wx.NewId() for _init_ctrls in range(14) ] > > class vents(wx.Dialog): >

Re: Newbie : checking semantics

2005-05-07 Thread Jeremy Bowers
On Sat, 07 May 2005 15:05:20 -0700, LDD wrote: > The fact that python doesn't check if the symbol > AFunctionThatIsntDefined is defined, is really bad when you develop big > pieces of code. You will never be sure that your code is free of this > kind of dummy errors and testing every possible execu

Re: Q: The `print' statement over Unicode

2005-05-08 Thread Jeremy Bowers
On Sun, 08 May 2005 13:46:22 +, John J. Lee wrote: > I don't mean to put words into FranÃois' mouth, but IIRC he managed, > for example, GNU tar for some time and, while using some kind of > tracking system "under the covers", didn't impose it on his users. > > IMVHO, that was very nice of him

file corruption on windows - possible bug

2005-05-09 Thread Jeremy Jones
nd no "\x00" characters (file size difference on Windows and Linux is due to line ending). I'm still doing a setdefault on the dictionary to create an object if the key doesn't exist, but I'm using a cStringIO object rather than a file object. So, I'm treating this ju

Re: file corruption on windows - possible bug

2005-05-09 Thread Jeremy Jones
Fredrik Lundh wrote: Jeremy Jones wrote: # file_dict = {} a_list = [("a", "a%s" % i) for i in range(2500)] b_list = [("b", "b%s" % i) for i in range(2500)] c_list = [("c", "c%s" % i) for

Re: Faster GUI text control

2005-05-13 Thread Jeremy Bowers
On Fri, 13 May 2005 15:44:24 -0500, none wrote: > I'm trying to decide what is the best replacement for the control. I > was originally planning on redoing the GUI with wxpython, but I've seen > people indicate I would have the same problem. Honestly, if this is important to you, the best thin

ANN: Veusz 0.6 - a scientific plotting package

2005-05-19 Thread Jeremy Sanders
Veusz 0.6 - Velvet Ember Under Sky Zenith - http://home.gna.org/veusz/ Veusz is Copyright (C) 2003-2005 Jeremy Sanders <[EMAIL PROTECTED]> Licenced under the GPL (version 2 or greater) Veusz is a scientific plotting package written in Python (current

Re: [ZODB-Dev] ZODB memory problems (was: processing a Very Large file)

2005-05-22 Thread Jeremy Hylton
ttp://www.zope.org/Wikis/ZODB/guide/node6.html Jeremy -- http://mail.python.org/mailman/listinfo/python-list

Re: __init__() not called automatically

2005-05-26 Thread Jeremy Sanders
and which are not, unless the author used a clear naming convention. Jeremy -- http://mail.python.org/mailman/listinfo/python-list

couple of new python articles on onlamp

2005-06-03 Thread Jeremy Jones
I've got a couple of new articles on ONLamp: Writing Google Desktop Search Plugins http://www.onlamp.com/pub/a/python/2005/06/01/kongulo.html and Python Standard Logging http://www.onlamp.com/pub/a/python/2005/06/02/logging.html Comments, criticisms, flames all welcome. Jeremy

Re: collect data using threads

2005-06-14 Thread Jeremy Jones
nd pull stuff off from the other side (again, you can have as many consumers as you'd like as well) in a thread safe manner. HTH, Jeremy Jones -- http://mail.python.org/mailman/listinfo/python-list

Re: collect data using threads

2005-06-14 Thread Jeremy Jones
? [snip sample with a list] I am not very sure about the get_data() method. Will it cause data lose if there is a thread is appending data to self.data at the same time? That will not work, and you will get data loss, as Jeremy points out. Normally

Re: Subprocess and time-out

2005-06-16 Thread Jeremy Sanders
W_NOHANG to see whether the process has stopped, and if not kill it with os.kill. Jeremy -- http://mail.python.org/mailman/listinfo/python-list

Re: Multiple instances of a python program

2005-06-17 Thread Jeremy Sanders
ary, then this probably won't make much difference. Jeremy -- http://mail.python.org/mailman/listinfo/python-list

Re: Matrix Multiplication

2007-06-18 Thread Jeremy Sanders
- you do need to use its special matrix type to get this. You can use the dot function to get matrix multiplication with its normal arrays. Jeremy -- Jeremy Sanders http://www.jeremysanders.net/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Matrix Multiplication

2007-06-19 Thread Jeremy Sanders
t. I was just clarifying it for a reader who may not have instantly realised that there were multiple array types in numpy (I didn't for a while), and could have wasted many hours and been discouraged. Explaining clearly is indeed important. -- Jeremy Sanders http://www.jeremysanders.net/ -- h

Re: stripping the first byte from a binary file

2007-07-10 Thread Jeremy Sanders
.read(1) # read 1st byte and ignore it rest = f.read() # read rest or data = f.read() data = data[1:] # skip 1st byte ? -- Jeremy Sanders http://www.jeremysanders.net/ -- http://mail.python.org/mailman/listinfo/python-list

Lists in classes

2007-07-12 Thread Jeremy Lynch
Hello, Learning python from a c++ background. Very confused about this: class jeremy: list=[] def additem(self): self.list.append("hi") return temp = jeremy() temp.additem() temp.additem() print temp.list temp

Re: Lists in classes

2007-07-12 Thread Jeremy Lynch
Thanks for all the replies, very impressive. Got it now. Jeremy. On Jul 12, 4:23 pm, Jeremy Lynch <[EMAIL PROTECTED]> wrote: > Hello, > > Learning python from a c++ background. Very confused about this: > > ==== > class jeremy: > list=[] >

Re: questions about functions inside a function

2007-07-16 Thread Jeremy Sanders
ng like class MyFunc(object): """A function object.""" def __init__(self, val): self.val = val def __call__(self): """Return value squared""" return self.val**2 a = [] for i in range(4): a.append(MyFunc(i)) for f in a:

Re: Beginner: Formatting text output (PyQt4)

2007-04-19 Thread Jeremy Sanders
nt(QFont('fixed')) work? It seems to work for me if you use plain text. Tabs or html/rich text formatting should be a better way to get the layout (or just use a table). Jeremy -- Jeremy Sanders http://www.jeremysanders.net/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Screen Scraper

2007-04-24 Thread Jeremy Sanders
Michael Bentley wrote: > Possibly the easiest thing will be to read from firefox' cache. > Otherwise I think your only real options are to either build a proxy > or sniff the wire... Maybe another way would be to write a firefox addon/plugin. I believe python is now supported.

ANN: Veusz-0.99.0 - a scientific plotting package

2007-05-24 Thread Jeremy Sanders
- http://home.gna.org/veusz/ Veusz is Copyright (C) 2003-2007 Jeremy Sanders <[EMAIL PROTECTED]> Licenced under the GPL (version 2 or greater). Veusz is a scientific plotting package written in Python, using PyQt4 for display and user-interfaces, and numpy for handling the n

Re: Smoother Lines in Turtle Graphics

2007-08-10 Thread Jeremy Sanders
with). I suppose turtle wouldn't be that hard to reimplement it to use Qt/Gtk instead. Jeremy -- Jeremy Sanders http://www.jeremysanders.net/ -- http://mail.python.org/mailman/listinfo/python-list

Re: best GUI library for vector drawing program

2007-08-17 Thread Jeremy Sanders
ialiasing is optional for bitmap formats. Jeremy -- Jeremy Sanders http://www.jeremysanders.net/ -- http://mail.python.org/mailman/listinfo/python-list

Re: best GUI library for vector drawing program

2007-08-17 Thread Jeremy Sanders
an old distribution helps the compatibility (I use centos 3 in a virtual environment). jeremy -- Jeremy Sanders http://www.jeremysanders.net/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Co-developers wanted: document markup language

2007-08-24 Thread Jeremy Sanders
ough controls for users over what they always complain about: fonts, page breaking, and positioning of figures? Maybe it's an okay first step however. Jeremy -- Jeremy Sanders http://www.jeremysanders.net/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Co-developers wanted: document markup language

2007-08-25 Thread Jeremy Sanders
gonality in its commands (e.g. why no 8pt option for the document, why the crazy \small, \LARGE, etc commands?), and fixing the font system to be based around modern fonts. Finally making bibtex part of the core and making it easy to use would be great. -- Jeremy Sanders http://www.jeremysanders.net/ --

Re: newbie: self.member syntax seems /really/ annoying

2007-09-12 Thread Jeremy Sanders
as self as "s", it's only two more characters per variable access, which is the same as the C++ "m_" naming convention. -- Jeremy Sanders http://www.jeremysanders.net/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Watching a file another app is writing

2007-03-12 Thread Jeremy Sanders
d manually readlines() from it to keep up to date, > it's the automatic part I'm having trouble with. This is on Windows. It occurs to me under Unix you could perhaps get your first program to write to a "named pipe", which you 2nd program could read from. See http://en.wikipe

<    1   2   3   4   5   6   7   >