Tobias Weber wrote:
> In article ,
> "Mike C. Fletcher" wrote:
>
>
>> See PyDispatcher for code to do this.
>>
>
> That was the original problem. Got it now: if used inside the class
> definition dispatcher.connect will raise "cannot
On Wed, 17 Jun 2009 23:04:37 +1200
Lawrence D'Oliveiro wrote:
> In message <20090617142431.2b25f...@malediction>, Mike Kazantsev wrote:
>
> > On Wed, 17 Jun 2009 17:53:33 +1200
> > Lawrence D'Oliveiro wrote:
> >
> >> > Why not us
Hello I'm using GAEUnit to develop an app for google appengine and am having
a little trouble.
I'm trying to make a test as follows:
I have a file (say model.py) which contains Model.db model classes and some
methods for accessing them. The methods are not part of the class.
In my test I can cal
> Why is that a problem?
So you can os.listdir them?
Don't ask me what for, however, since that's the original question.
Also not every fs still in use handles this situation effectively, see
my original post.
--
Mike Kazantsev // fraggod.net
signature.asc
Description: PGP sig
On Wed, 17 Jun 2009 03:42:02 GMT
Lie Ryan wrote:
> Mike Kazantsev wrote:
> > In fact, on modern filesystems it doesn't matter whether you
> > accessing /path/f9e95ea4926a4 with million files in /path
> > or /path/f/9/e/95ea with only hundred of them in each path. Former
refix at the beginning of every line?
I'd log exception name and timestamp (or id) only, pushing the full
message with the same id to another log or facility (like mail it to
some dedicated bug-report box).
--
Mike Kazantsev // fraggod.net
signature.asc
Description: PGP signature
--
http:
95ea
with only hundred of them in each path. Former case (all-in-one-path)
would even outperform the latter with ext3 or reiserfs by a small
margin.
Sadly, that's not the case with filesystems like FreeBSD ufs2 (at least
in sixth branch), so it's better to play safe and create subdirs if
o read/write data from/to the pipes more
than once (aka communicate), using threads or any more python
subprocesses seem like hammering a nail with sledgehammer - just _read_
or _write_ to pipes asynchronously.
--
Mike Kazantsev // fraggod.net
--
http://mail.python.org/mailman/listinfo/python-list
On Jun 16, 1:24 pm, Tim Harig wrote:
> On 2009-06-16, Mike Driscoll wrote:
>
> > On Jun 16, 9:20 am, Filipe Teixeira wrote:
> >> Hi, I'm really struggling to find the best GUI to make a simple
> >> application.
> [SNIP]
> >> Basically I will use
UIs I needed to reimplement, so I went
with wxPython. I've heard good things about pyQT. If you want the
ultimate look-and-feel for Windows, you should go with IronPython.
- Mike
--
http://mail.python.org/mailman/listinfo/python-list
nthusiasm.
I've read this thread from the beginning, being tempted to insert
remarks about shelve module or ORMs like SQLAlchemy, but that'd be
meaningless without the problem description, which I haven't seen
anywhere. Is it some trick idea like "let's walk on our heads"?
, but I haven't
had to change anything in a rather long time. It pretty much just works.
Enjoy,
Mike
--
____
Mike C. Fletcher
Designer, VR Plumber, Coder
http://www.vrplumber.com
http://blog.vrplumber.com
--
http://mail.python.org/mailman/listinfo/python-list
d processes with a simple "while True: ..." loop,
consider using twisted framework - it'll allow you to do incredible
stuff with any number of sockets with just few lines of code in a
clean, abstracted way.
Latter would also mean that you can always replace os pipes with network
sockets just
nces
# You can always use it as a regular dict
print 'port' in data
print data['see_also']
# Data model propagnates itself to any sub-mappings
data.see_also.new_item = dict(x=1, y=2)
print data.see_also.keys()
data.see_also.new_item['z'] = 3
print data.see_also.new_item.z
--
Mike Kazantsev // fraggod.net
signature.asc
Description: PGP signature
--
http://mail.python.org/mailman/listinfo/python-list
t; themselves, as I was thinking. I wish listdir had been changed in 3.0
> along with map, filter, and range, but I made no effort and hence cannot
> complain.
Why? We have itertools.imap, itertools.ifilter and xrange already.
--
Mike Kazantsev // fraggod.net
signature.asc
Description: PGP signature
--
http://mail.python.org/mailman/listinfo/python-list
On Sun, 14 Jun 2009 22:45:38 -0700 (PDT)
deostroll wrote:
> I need to be able to parse a json data object using the simplejson
> package. First of all I need to know all the task needed for this job.
Note that py2.6 has a bundled json module.
--
Mike Kazantsev // fraggod.net
signatu
On Mon, 15 Jun 2009 05:37:14 -0700 (PDT)
OdarR wrote:
> On 13 juin, 07:25, Mike Kazantsev wrote:
> > There was quite interesting explaination of what happens when you send
> > ^C with threads, posted on concurrency-sig list recently:
> >
> > http://bli
or of "{0}".format(var) and I think it's a good call.
There's only so much sugar to add before it'll transform into salt and
you'll start seeing lines like these:
s**'@z!~;()=~$x>;%x>l;$(,'*e;y*%z),$;@=!;h(l~;*punch jokers;halt;*;print;
I
x27;d prefer to use dict() to declare a dict, not some mix of letters and
incomprehensible symbols, thank you.
--
Mike Kazantsev // fraggod.net
signature.asc
Description: PGP signature
--
http://mail.python.org/mailman/listinfo/python-list
On Sun, 14 Jun 2009 00:46:16 -0700 (PDT)
"Mr . Waqar Akbar" wrote:
...
Judging by the typo in the last subject, someone indeed types all this
crap in manually! Oh my god...
--
Mike Kazantsev // fraggod.net
signature.asc
Description: PGP signature
--
http://mail.python.org/mailma
;with", file should end up closed, else
os.rename might replace valid path with zero-length file.
It should be easy to use cursor with contextlib, consider using
contextmanager decorator:
from contextlib import contextmanager
@contextmanager
def get_cursor():
try:
cursor = conn.c
re other
> links?
Thanks for sharing this link, although I prefer such information in
written form - it's easier/faster to work with and much more accessible.
--
Mike Kazantsev // fraggod.net
signature.asc
Description: PGP signature
--
http://mail.python.org/mailman/listinfo/python-list
s' table (with it's own numbering),
which is usually done via special flag for sendmsg(2) in C, so you
should probably look out for py implementation of this call, which I
haven't stumbled upon, but, admittely, never looked for.
--
Mike Kazantsev // fraggod.net
signature.asc
Description: PGP signature
--
http://mail.python.org/mailman/listinfo/python-list
nyway? It's not like
you'd be able to accomplish it - code can easily grep it's process body
in memory and harvest all the "private" values, so I'd suggest getting
some fresh air when you start to feel like doing that.
--
Mike Kazantsev // fraggod.net
signature.asc
Description: PGP signature
--
http://mail.python.org/mailman/listinfo/python-list
gt;
> ... a .join() call, which is the most likely position at which the
> keyboard interrupt will be processed, killing the main program thread
> and probably generating some errors as dangling active threads are
> forceably killed.
There was quite interesting explaination o
'date':
datetime.datetime(2007, 9, 30, 16, 43, 54)}, {'name': 'AA2',
'username': 'AA2','date': datetime.datetime(2007, 9, 30, 16, 43,
54)}]
entries.sort(lambda x: (x['name'], -time.mktime(x['date'].timetuple(
Here time is inversed, yielding reverse sort order by that column.
--
Mike Kazantsev // fraggod.net
signature.asc
Description: PGP signature
--
http://mail.python.org/mailman/listinfo/python-list
On Thu, Jun 4, 2009 at 11:22 AM, Terry Reedy wrote:
> Mike wrote:
>
>
>>
>> On Thu, Jun 4, 2009 at 4:40 AM, Terry Reedy > tjre...@udel.edu>> wrote:
>>
>>Mike wrote:
>>
>>Hello,
>>
>>I'm writing an appl
On Thu, Jun 4, 2009 at 4:40 AM, Terry Reedy wrote:
> Mike wrote:
>
>> Hello,
>>
>> I'm writing an application that needs to fetch a json file from a
>> webserver. I'm writing the tests and have a question:
>>
>> if I have the following
I'm new to
using the testing framework so I'm not sure on best practises and such.
Is introducing persistance by using sql lite the best way? I should be able
to just reuse data within the object. Or is my design wrong?
Any tips or suggestions would be appreciated!
- Mike
--
ht
#x27; '
count_span_max = count_space - (count_span * len(span_min))
line = buffer(words[0])
for word in words[1:]:
if count_span_max:
count_span_max -= 1
line += span_min + ' '
else: line += span_min
line += word
print '%d chars: %r'%(len(line),
e machine, same for GLUT, GLE
and the like, but they aren't required unless you want to use them.
Heck, if you want you can even easy_install the package last I checked.
http://pyopengl.sourceforge.net/documentation/installation.html
My dictionary's defini
, 'key1': 'value1'} }
To save namespace and make it a bit more unreadable you can write it
as a one-liner:
with open('test.src') as src:
data = dict( (lines.next(), dict(it.imap(str.split, lines))) for sep,lines
in
it.groupby(it.ifilter(bool, it.imap(lambda x: x.s
On May 28, 3:10 pm, Mike Driscoll wrote:
> On May 28, 1:43 pm, Roastie wrote:
>
>
>
> > I installed the AOPython module:
>
> > % easy_install aopython
>
> > That left an aopython-1.0.3-py2.6.egg at
> > C:\mystuff\python\python_2.6.2\Lib\site
version. If you mis-spell the
version slightly, then you will probably have issues. I am guessing
that is why you received those error messages.
See the easy install official docs:
http://peak.telecommunity.com/DevCenter/EasyInstall
- Mike
--
http://mail.python.org/mailman/listinfo/python-list
onnect to Microsoft SQL 2000 right now, but I
used to use the mssql and adodb modules. The latter two worked for
what I needed, although I was always running to escaping issues with
them. SqlAlchemy is nice because it does all that for you and you can
switch database back-ends with little to no change in your code.
- Mike
--
http://mail.python.org/mailman/listinfo/python-list
On Sun, 24 May 2009 19:03:26 +0600
Mike Kazantsev wrote:
> On Sun, 24 May 2009 05:06:13 -0700 (PDT)
> Kless wrote:
>
> > Is there any way to simplify the next code? Because I'm setting a
> > variable by default of the same way than it's set in the setter.
> &g
switches are available for python ?
> (googling didn't give me any relevant hits )
You might be amazed how much insight "man python" and "python -h" can
yield ;)
--
Mike Kazantsev // fraggod.net
signature.asc
Description: PGP signature
--
http://mail.python.org/mailman/listinfo/python-list
>def bar(self, bar):
> self._bar = self._change(bar) # !!! as in init
>
> def _change(self, text):
> return text + 'any change'
> ---
--
Mike Kazantsev // fraggod.net
signature.asc
Description: PGP signature
--
http://mail.python.org/mailman/listinfo/python-list
seem to make more sense
to me than an explicit conversion.
There's also "op.itruediv" for "number /= float(total) * 100" case.
http://docs.python.org/dev/library/operator.html
--
Mike Kazantsev // fraggod.net
signature.asc
Description: PGP signature
--
http://mail.python.org/mailman/listinfo/python-list
Content-Disposition', 'attachment;
filename="%s"'% os.path.basename(file)) msg.attach(part)
smtp = smtplib.SMTP(relay)
smtp.sendmail(from, to, msg.as_string() )
smtp.close()
--
Mike Kazantsev // fraggod.net
signature.asc
Description: PGP signature
--
http://mail.python.org/mailman/listinfo/python-list
t) if absolute path gets appended to
it:
os.path.join('/some/path', '/home/jeanmichel') == '/home/jeanmichel'
> So my question is: "why the shell is adding '' when the interpreter is
> adding the full path ?"
Looks like a solid way to construct relative imports to me.
--
Mike Kazantsev // fraggod.net
signature.asc
Description: PGP signature
--
http://mail.python.org/mailman/listinfo/python-list
work much faster with buffers
than str / unicode.
text = 'some text to correct (anything, really)'
result = buffer('')
word, c = buffer(''), ''
for c in text:
if c.isalpha(): word += c
else:
if word:
result += correct(word)
Jim Qiu wrote:
> Hi everyone,
>
> Following is the code i am reading, i don't see anywhere the declaration of
> Message.root object,
> Where is it from?
...
Prehaps it gets assigned by the parent itself?
Like this:
def spawn_child(self):
child = Message()
child.r
e illogical and
counter-intuitive to create "required options", since by definition they
should be optional.
Try using arguments instead, with some type-switching flags, if
necessary - it should make CLI more consistent and save some typing by
omitting otherwise always-required option argument ("--part").
--
Mike Kazantsev // fraggod.net
signature.asc
Description: OpenPGP digital signature
--
http://mail.python.org/mailman/listinfo/python-list
a bunch of projects at the end.
It also has a chapter on testing, network programming, extending
python, packaging and more. They're not in depth, but they give you a
taste.
Lutz's "Programming Python" has some pretty in depth projects using
Tkinter. You might find the Python Cookbook helpful or you could just
look at ActiveState's cookbook which is what the book was based on:
http://code.activestate.com/recipes/langs/python/
- Mike
--
http://mail.python.org/mailman/listinfo/python-list
ted already...
import itertools as it
ftuple = tuple(it.imap( float, line.split('; ') ))
--
Mike Kazantsev // fraggod.net
signature.asc
Description: PGP signature
--
http://mail.python.org/mailman/listinfo/python-list
tes.
> >
> > What real-world scenario am I missing here?
> >
>
> ok, I admit that that the file was not good example. better example
> would be just any iterator you use in your code.
Somehow I've always managed to avoid such re-iteration scenarios, but
of course, it could be just my luck ;)
--
Mike Kazantsev // fraggod.net
signature.asc
Description: PGP signature
--
http://mail.python.org/mailman/listinfo/python-list
next "pop" won't
have to roam thru all the values again but instantly get the right one
from the cache, or just get on with that iterable until it depletes.
What real-world scenario am I missing here?
--
Mike Kazantsev // fraggod.net
signature.asc
Description: PGP signature
--
http://mail.python.org/mailman/listinfo/python-list
t for yaml built-in or possibly in the future?
>
The primary alternative to ConfigParser is Michael Foord's ConfigObj:
http://www.voidspace.org.uk/python/configobj.html
I don't know if it has yaml support or not though.
Mike
--
http://mail.python.org/mailman/listinfo/python-list
ing was like this, then it
would split:
x = "{} ABC EFG"
In the mean time, you can just use some string slicing like this:
y = x[1:-1]
That will remove the braces and allow you to manipulate the text
therein.
- Mike
--
http://mail.python.org/mailman/listinfo/python-list
n Python 3.0's release (the book is circa 2.5).
>
> Cheers,
> Chris
> --http://blog.rebertia.com
I use Hetland's "Beginning Python" and Chun's "Core Python
Programming" the most, although I haven't used them in a while. I also
use Martelli's "Python Cookbook" from time-to-time. Hopefully he will
put out a 3.0 version too.
Mike
--
http://mail.python.org/mailman/listinfo/python-list
; result should be a list of the form: [['fuzzy', 53], ...].
I recommend reading the Python Tutorial: http://python.org/doc/
If you're using Python 2.x, then check out http://www.diveintopython.org/
If you're using 3.0, your primary options are the online docs and
"Programming
sn't abandoning the processing of the rest of the script exiting the
script? You could use "return" or wrap the offending code in a try/
except block and do something on an exception...
Mike
--
http://mail.python.org/mailman/listinfo/python-list
4/04/soap.html
>
> You are right, sorry.
>
> > MS created it. That it *became* a standard of the W3C later - well, they
> > did that with OOXML as well...
>
> OpenOfficeXML document format AKA ODF? ;)
No...Office Open XML, which is used in Microsoft Office 2007 and which
Microsoft rammed through the ISO: http://en.wikipedia.org/wiki/Office_Open_XML
- Mike
--
http://mail.python.org/mailman/listinfo/python-list
first...I got plenty
of hits with "python .net web service". This one sounds good:
http://www.beardygeek.com/2009/01/how-to-call-a-net-webservice-using-python/
It sounds like you consume it much like you do with other web
services...find the API and use Python to access it or c
with that unless there are known issues listed. If you
plan to make an executable of the game, then I recommend Python 2.5
since there are some known issues with 2.6 (don't know if that's true
for 3.0 or not, but it's probable).
- Mike
--
http://mail.python.org/mailman/listinfo/python-list
t
> worddoc.Content.Text = (PBrowVal)
> PBrow = PBselCur.next()
>
> #worddoc.Close() # Close the Word Document (a save-Dialog pops up)
>
> print "Fin"
What you probably want is something like this:
rng = worddoc.Range(0,0)
while PBrow:
rng.InsertAfter(PBrowVal
o make his Python program break while
taking a pot shot at people who use that sort of thing. Whatever.
According to wikipedia, dynamic languages don't implement Abstract as
they can accomplish the same thing via duck typing:
http://en.wikipedia.org/wiki/Abstract_class . The way it describes
t
On 6 Mai, 18:14, Vinay Sajip wrote:
> On May 6, 2:41 pm, Mike wrote:
>
>
>
> > Pyinstaller seems to have a problem withlogging...
>
> > I installed pyinstaller 1.3 - using it together with Python 2.6. I
> > used pyinstaller for a small project, the created
Pyinstaller seems to have a problem with logging ...
I installed pyinstaller 1.3 - using it together with Python 2.6. I
used pyinstaller for a small project, the created .exe worked fine.
After some additional changes to my project I got strange run time
errors when running the .exe (but no probl
On May 5, 11:43 am, Paul Sijben wrote:
> Mike Driscoll wrote:
> > On Apr 29, 4:17 am, Paul Sijben wrote:
> >> Is there any way to check which is the offending pyd/dll? (normally
> >> Vista does not give out much data on what went wrong)
>
> >> Paul
>
s. Is there any IDE with support for autocomplete
> in python 2.6 with all the newer functions included?
Wingware probably does. You should just submit a bug report to Stani
though. He can probably fix SPE for you.
Mike
--
http://mail.python.org/mailman/listinfo/python-list
nger()
> chang.start()
> i=0
> This works, but is there anything simpler?
> Regards
> Soumen
For additional ideas on using threads in wxPython, see the wiki:
http://wiki.wxpython.org/LongRunningTasks
- Mike
--
http://mail.python.org/mailman/listinfo/python-list
the gui module.
>
> >> It does not mean that the guithread object has an attribute named
> >> frame_1. In order to do that, you should have written:
>
> >> guithread.frame_1 =omething
>
> >>> The idea here is to access a gui element running in a thread from a
> >>> separate thread. Please help
>
> >> I would post wxPython related questions on the wxPython mailing
> >> list, which is excellent.
> >>http://www.wxpython.org/maillist.php
>
> >> HTH,
> >> Che
> >> --
> >>http://mail.python.org/mailman/listinfo/python-list
>
> Don't top-post. It puts things entirely out of order. Now the order of
> the parts of this message are 3, 1, 2, 4
>
> Two things at least are wrong here, either of which is fatal.
> 1) you have two threads doing GUI stuff. Can't be done, at least not in
> wxPython. Certain things can be done in a second thread, but definitely not
> constructing Frames and such.
You are correct...but I think that's pretty common across GUI
toolkits. The GUI has it's own main loop that will get blocked if
another thread tries to do something or you'll end up with strange
behavior. As far as I know, each toolkit has its own methods for
working around this. In wxPython's case, you can use wx.CallAfter,
wx.CallLater and several others to manipulate the GUI from a thread.
There's some other ways of going about this on the wxPython wiki:
http://wiki.wxpython.org/LongRunningTasks
- Mike
--
http://mail.python.org/mailman/listinfo/python-list
nd in the 1st. Something
like this:
self.newFrame = NewFrame()
Then you can get at the attributes of the 2nd frame:
self.newFrame.SomeWidget.GetSomeValue()
If you're opening both at the same time, you'll have to come up with
something else, like Queues or pubsub.
- Mike
--
http://mail.python.org/mailman/listinfo/python-list
s (win32,
> wxpython)
>
> Is there any way to check which is the offending pyd/dll? (normally
> Vista does not give out much data on what went wrong)
>
> Paul
You might be able to find it using the Dependency Walker utility:
http://www.dependencywalker.com/
- Mike
--
http://mail.python.org/mailman/listinfo/python-list
there's usually a Windows installer. If I want something, it's usually
more like a 50-50 chance of there being an installer.
Anyway, hopefully the snakebite project will help with this a little.
Mike
--
http://mail.python.org/mailman/listinfo/python-list
or books or something. I think the learning process of creating some
application was probably the most valuable tool I ever had.
Mike
--
http://mail.python.org/mailman/listinfo/python-list
s so different that I don't see why they should behave
> similarly...
> Please strip it down to the bare minimum showing the discrepancy (and tell
> us *what* you see and what you expect)
>
> --
> Gabriel Genellina
Just ignore him. He re-posted to the wxPython lis
On Apr 27, 1:49 am, John Machin wrote:
> > I am
> > having a look at eval and exec
>
> WRONG WAY
> GO BACK
+1 QOTW
--
http://mail.python.org/mailman/listinfo/python-list
On Apr 24, 10:11 am, DC16 wrote:
> On Apr 23, 4:03 pm, Mike Driscoll wrote:
>
>
>
> > On Apr 23, 6:46 am, DC16 wrote:
>
> > > I am using pygame and OpenGL.
> > > How do I make a gamepad able to move the camera to a side of a cube on
> > > s
)
>
> How do I change it so that a gampad can move the camera in the same
> way.
> (Ignore the colour changing code)
>
> Thanks,
> Dexter (DC16)
>
> BTW the code was originally by someone else.
Try cross-posting to the pygame guys: http://www.pygame.org/wiki/info
I read that pyglet will have some sort of gamepad support soon too, so
you might want to check that project out as well.
- Mike
--
http://mail.python.org/mailman/listinfo/python-list
ingTasks
As you will find, there are various methods within wxPython that are
threadsafe (such as wx.CallAfter) and you can use those to communicate
with and update your GUI. From what I've read, this is normal across
GUI toolkits. They all have special ways to work with threads.
In the future, I highly recommend that you join and post to the
wxPython list as that's where you'll get the best targeted advice (see
their website). This list is great for general questions though.
- Mike
--
http://mail.python.org/mailman/listinfo/python-list
local GUI rich-client (in which case, use the GuiProgramming wiki
> link Mike sent), or you're doing web development targeting
> browsers in which case you should investigate the myriad web
> programming frameworks for Python (Django, Turbogears, CheryPy,
> web.py, webstack, etc).
ant to do and whether or not you need special widgets.
- Mike
--
http://mail.python.org/mailman/listinfo/python-list
ur ListCtrl.
List view, report, icon or what? The demo doesn't have any white space
at the end, so I can't test this easily. Are you using a sizer to hold
the widget?
- Mike
--
http://mail.python.org/mailman/listinfo/python-list
>
> CREATE TABLE prova (
> chiave INTEGER NOT NULL IDENTITY(1,1),
> PRIMARY KEY (chiave)
> )
>
> Stefano
Try re-posting to the SqlAlchemy mailing list. They'll be able to tell
you.
Mike
--
http://mail.python.org/mailman/listinfo/python-list
pick a GUI toolkit and have it display a
picture for a few seconds and then disappear. wxPython has a built-in
splash screen widget made for just this purpose. Tkinter may too, or
you could just roll your own in it.
- Mike
--
http://mail.python.org/mailman/listinfo/python-list
nks,
> Alan Isaac
One way would be to keep a list of the widgets that you want to be
able to change the color of, and then loop over the list and change
their respective colors as needed.
Mike
--
http://mail.python.org/mailman/listinfo/python-list
install
from source. However, I wouldn't bother with it and Python 2.6 until
wxPython's next release as there are some goofy things going on with
the manifest files. Maybe this doesn't affect Linux users
though...however, if you experience weird issues, that may be the
cause...or
alog, but in
> > fact, if you enter Alt+F4 in this dialog, it will close. How could I
> > do?
>
> Binds the wx.EVT_CLOSE event and ignor it in the handle function.
This is the preferred method...there is a slight caveat that when you
actually want to close the dialog, you'll need to use the dialog's
Destroy() method...
- Mike
--
http://mail.python.org/mailman/listinfo/python-list
I'd like to ship only the .pyc files for a module. I was hoping the
standard distutils setup.py could handle this, but so far, I've not
figured out how.
After a bit of work, I discovered that if I create a MANIFEST.in file,
and put 'include mymodule/*.pyc' and 'exclude mymodule/*.py' in it,
then
quot;EssentialPDF")
# now EssentialPDF should be in your python namespace
# so you can do something like this:
from EssentialPDF import SomeModule
# or
EssentialPDF.SomeModule
At least, that's how it seems to work for most .NET libraries. Hope
that helps.
- Mike
--
http://mail.python.org/mailman/listinfo/python-list
blems whatsoever installing wxPython or its demo
on Vista. What are you doing exactly?
Mike
--
http://mail.python.org/mailman/listinfo/python-list
gt; >>> import tkFileDialog
> >> >>> fh = tkFileDialog.asksaveasfile()
> >> Traceback (most recent call last):
> >> File "boot_com_servers.py", line 44, in
> >> File "tbzr.pyo", line 125, in
> >> File "tbzr.
oot_com_servers.py", line 44, in
> File "tbzr.pyo", line 125, in
> File "tbzr.pyo", line 60, in get_all_com_classes
> File "contextmenu.pyo", line 9, in
> ImportError: No module named shell
> Redirecting output to win32trace remote coll
k, I'd
appreciate it.
Thanks,
On Sat, Apr 11, 2009 at 4:18 PM, George Sakkis wrote:
> On Apr 11, 3:03 pm, Mike H wrote:
>
>> Can I not use the cursor.execute command to pass variables that aren't
>> immediately next to each other? If so, is there a better way to go
>&
ht
syntax to use near ''name', 'fileno', 'size') VALUES ('Test',
'AAA-000', 7)' at line 1")
Can I not use the cursor.execute command to pass variables that aren't
immediately next to each other? If so, is there a better way to go
a
Well, I'm an idiot. Obviously, the line "VALUES (%s, %s, %s);" needs
to be modified to adapt for the number of arguments in the list. But
otherwise
On Sat, Apr 11, 2009 at 11:28 AM, Mike H wrote:
> Ok, thanks again to everyone for their suggestions, even if it appears
>
Lcmd="INSERT INTO " + myTable + " (%s) " % ", ".join(myFields)
SQLcmd=SQLcmd + "VALUES (%s,%s,%s);"
cursor.execute(SQLcmd, (myValues))
#sets and returns SQL variable.
SQLcmd="select " + myReturnKey + ":=last_insert_id();"
c
, 1, 'two'] and have a function correct the
list for me, rather than calling the function with a strangely quoted
list e.g. ['"'test'"', 1, '"'two'"'].
Again, thanks.
On Fri, Apr 10, 2009 at 5:18 PM, John Yeung wrote:
> On
Hello all, I have a question about the if/else aspect of list comprehension:
I would like to go through a list and place quotes around an item if
it is a string, and keep the item the same if it's anything else:
e.g.['a',9,'8b'] --> ['"a"', 9, '"8b"']
I understand that if/else list comprehension
en you'll have to
change it slightly of course, probably by using a nested loop.
Hopefully this isn't a homework question, but even if it is, it's an
interesting exercise.
Mike
--
http://mail.python.org/mailman/listinfo/python-list
8-1
Zelle's Python Programming book is pretty good (and was written by a
college professor) and I've heard good things about ORielly's Learning
Python by Lutz.
- Mike
--
http://mail.python.org/mailman/listinfo/python-list
Hello all,
I'm writing a web app and wanted to do some html generation (I really do not
like to maintain or write html).
I'm thinking of writing a dsl based on the following:
def html():
return
def a():
return
def body():
return
(html,
...(head, (style, "id", {"font-color":"black"}
tion via Yahoo mail Service .
> Thanks
Google's first hit was this:
http://developer.yahoo.com/python/
It's not a library, but it's the way that Yahoo itself recommends.
- Mike
--
http://mail.python.org/mailman/listinfo/python-list
;Excel.Application")
> myExcel.Visible = 1 # or, True
>
> causes (as Rebecca notes above):
>
> AttributeError: Property 'Excel.Application.Visible' can
> not be set.
>
> Thanks,
>
> Michael
This works fine for me on Windows XP and Python 2.5. It looks like
Rebecca is using Python 2.2, which might be the issue. I would also
upgrade to the latest PyWin32 as well. I'm using 212.
- Mike
--
http://mail.python.org/mailman/listinfo/python-list
...
> "<<=" ... ">>=" ... "**=" ... "lambda" ... "not" ...
> "+" ... "-" ... "~" ... "(" ...
> "[" ... "{" ... "False" ... "True" ... "None" ...
> ... ...
> ... ... ... ...
> "\'" ... "\"" ...
> "\'\'\'" ... "\"\"\"" ... "\'" ... "\"" ... "\'\'\'"
> ... "\"\"\"" ...
>
> Can I assume pydev is wrong or am I missing something?
If it works that way in IDLE and from the command line python, then
it's almost proof positive that pydev goofed up.
Mike
--
http://mail.python.org/mailman/listinfo/python-list
On Mar 30, 10:33 am, Mike Driscoll wrote:
> Hi,
>
> This is just a reminder that we have a Pyowa meeting this week. It
> will be held at Durham Center in Ames, IA on the ISU campus from 7-9
> p.m. Directions are on the website (www.pyowa.org). Topics include the
> following:
area, come on out! Bring your friends, even if they
think Perl is the coolest thing since sliced bread. We'll set them
straight!
Mike Driscoll
www.pyowa.org
--
http://mail.python.org/mailman/listinfo/python-list
301 - 400 of 2746 matches
Mail list logo