Heli Nix wrote:
> Is there any way that I can optimize this if statement.
Array processing is much faster in numpy. Maybe this is close to what you
want
import numpy as N
# input data
vals = N.array([42, 1, 5, 3.14, 53, 1, 12, 11, 1])
# list of items to exclude
exclude = [1]
# convert to a bool
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
C.D. Reimer wrote:
> Is there something in the Cython code that I need to change and/or find
> a better C random number generator?
This may not be helpful, but numpy is pretty helpful for this sort of thing:
import numpy
import numpy.random
a=numpy.random.randint(1,6,5000)
b=numpy.random.ra
Michael Kreim wrote:
> What are you using to wrap C++ classes for Python?
I'm using SIP, as it fits nicely with my PyQt user interface.
http://www.riverbankcomputing.com/software/sip/intro
It's a pretty flexible and fast way of wrapping C++ and C.
If you want to pass numpy arrays and such, it
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
Michael Torrie wrote:
> I think PyQt is slowly being pushed aside in favor of PySide, which is
> more license-friendly for use in closed or open projects. I would
> recommend using PySide unless PyQt is a requirement for your project.
That's not the impression I get from the PySide mailing lists
Robert Voigtländer wrote:
> I try to squeeze out some performance of the code pasted on the link
> below. http://pastebin.com/gMnqprST
>
> The code will be used to continuously analyze sonar sensor data. I set
> this up to calculate all coordinates in a sonar cone without heavy use of
> trigonome
Roy Smith wrote:
> Threads are lighter-weight. That means it's faster to start a new
> thread (compared to starting a new process), and a thread consumes fewer
> system resources than a process. If you have lots of short-lived tasks
> to run, this can be significant. If each task will run for a
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/mailman/listinf
wxjmfa...@gmail.com wrote:
> Short example. Writing an editor with something like the
> FSR is simply impossible (properly).
http://www.gnu.org/software/emacs/manual/html_node/elisp/Text-Representations.html#Text-Representations
"To conserve memory, Emacs does not hold fixed-length 22-bit number
Mihai Badoiu wrote:
> How do I do interactive plots in python? Say I have to plot f(x) and g(x)
> and I want in the plot to be able to click on f and make it disappear.
> Any python library that does this?
You could try veusz, which is a python module and plotting program combined.
You can als
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
amfr...@web.de wrote:
> i have a script that reads and writes linux paths in a file. I save the
> path (as unicode) with 2 other variables. I save them seperated by "," and
> the "packets" by newlines. So my file looks like this:
> path1, var1A, var1B
> path2, var2A, var2B
> path3, var3A, var3B
I
Brandon Harris wrote:
> I'm trying to read in and parse an ascii type file that contains
> information that can span several lines.
> Example:
What about something like this (you need re.MULTILINE):
In [16]: re.findall('^([^ ].*\n([ ].*\n)+)', a, re.MULTILINE)
Out[16]:
[('createNode animCurveTU
.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
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
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
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
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
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
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?
>
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
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
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
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
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
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
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
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=
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:
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
"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
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
ite a
lot of distributions. See help(numpy.random).
Jeremy
--
Jeremy Sanders
http://www.jeremysanders.net/
--
http://mail.python.org/mailman/listinfo/python-list
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
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
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
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
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
past.
Thanks, Jeremy.
--
Jeremy Sanders
http://www.jeremysanders.net/
--
http://mail.python.org/mailman/listinfo/python-list
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
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
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
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
):
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
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
..), (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
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
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
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
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/
--
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
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
ialiasing is
optional for bitmap formats.
Jeremy
--
Jeremy Sanders
http://www.jeremysanders.net/
--
http://mail.python.org/mailman/listinfo/python-list
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
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:
.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
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
- 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
-
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
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.
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
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
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
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
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
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
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
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
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
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
, 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
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
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
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
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
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
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
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
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
>>f, str(x).replace('[',' ').replace(']', ' ')
f.close()
Jeremy
--
Jeremy Sanders
http://www.jeremysanders.net/
--
http://mail.python.org/mailman/listinfo/python-list
']['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
I don't know which ones work with
python.
--
Jeremy Sanders
http://www.jeremysanders.net/
--
http://mail.python.org/mailman/listinfo/python-list
> 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
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
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
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
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
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
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
//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
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
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
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
'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://
o use my version.
Any ideas?
Thanks
Jeremy
--
Jeremy Sanders
http://www.jeremysanders.net/
--
http://mail.python.org/mailman/listinfo/python-list
eaks! I can work around it by removing the "as XXX" parts on the
import statement, but it gets annoying having to specify the full path.
Jeremy
--
Jeremy Sanders
http://www.jeremysanders.net/
--
http://mail.python.org/mailman/listinfo/python-list
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
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
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
1 - 100 of 147 matches
Mail list logo