i have an Item which belongs to a Category, so Item has:
- item.categoryId, the database primary key of its Category
- item.category, a reference to its Category. this null unless i need a
reference from item to its Category object, in which case i call
setCategory(category)
sometimes i want a
for Windows (XP) ?
I looked at www.python.org and do not see a py.dll file in the
self-installation or .tgz versions of 2.2.1 that are posted.
Thanks !
Mike
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I am new with python. Is it possible to have an MFC application and
develop some module using python? what are the steps in doing this? can
anybody give me a url or some documentation for this.. thanks..
mike
--
http://mail.python.org/mailman/listinfo/python-list
Thanks Chris..
I was also advised to build the python core (pythoncore.vcproj) with my
C++ program. By that way I would not have to load the python core
anymore during runtime. Is this a good approach?
I am currently using VC++ 7 and python 2.4.
- mike
Christopher De Vries wrote:
On Sun, Jan 30
Hello All,
I'm working ( and a beginner ) with mixing Python scripting and C++.
And I need some little help. :)
I've searched on the net, but found no answer. So I ask you directly.
Globally, I'd like to do 2 things.
The first, when I'm in the program, I call a script, which call a function
Ben Finney [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Howdy all,
How can a (user-defined) class ensure that its instances are
immutable, like an int or a tuple, without inheriting from those
types?
What caveats should be observed in making immutable instances?
IMHO, this
Giovanni Bajo [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Mike wrote:
How can a (user-defined) class ensure that its instances are
immutable, like an int or a tuple, without inheriting from those
types?
What caveats should be observed in making immutable instances?
IMHO
Antoon Pardon [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Op 2005-11-24, Mike schreef [EMAIL PROTECTED]:
[...snip...]
...but I think Python's voluntary
DoThis, _DoThisIfYouReallyHaveTo, and __You'dBetterKnowWhatYou'reDoing__
approach is a better way to go than
[EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Mike Meyer wrote:
Giovanni Bajo [EMAIL PROTECTED] writes:
Mike Meyer wrote:
Note that this property of __slots__ is an implementation detail. You
can't rely on it working in the future.
I don't rely on it. I just want to catch
You need to call keybd_event which is (or was in win3.x - win95 at least) in
USER32.DLL.
Simulate return keypress:
keybd_event(VK_RETURN,0,0,0);
keybd_event(VK_RETURN,0,KEYEVENTF_KEYUP,0);
Google turned this up:
http://www.howtodothings.com/viewarticle.aspx?article=395
Note: This is
Christensen 5446 Santa Barbara Sparks, NV 89436
#2 Randall Hines 22 Stature Dr. Newark DE 19713
#3 Mike Sharrer 921 West State St. Coopersburg PA 18036
#4 Travis Montgomery 2211 Elmers Lane Norfolk NE 68701
#5 James Adair the third 22 Over Rd. Feasterville PA 19053
#6 Michael Lescault 123 Rhode Island Ave
Sounds like what I need. Thanks Irmen. I heard google uses python with
multiple machines... how do they do it?
Mike
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I have two machines. A python program on machine 1 needs to make a
python call to a method in machine 2. What is the most efficient / fast
/ programmer friendly way to do it?
- XML-RPC?
- Http Call?
Thanks,
Mike
--
http://mail.python.org/mailman/listinfo/python-list
Thanks Everyone for your input.
Mike
--
http://mail.python.org/mailman/listinfo/python-list
,
Mike
--
http://mail.python.org/mailman/listinfo/python-list
to store this data safely in my database as CLEAR TEXT, not
BLOB. It seems to me that it should work just fine since it is string
anyways. So, why does O'reilly's Python Cookbook is insisting in saving
it as a binary file and BLOB type?
Am I missing out something?
Thanks,
Mike
--
http
doing it now. Thanks,
Mike
--
http://mail.python.org/mailman/listinfo/python-list
I think he's looking for diagrams of the batteries-included modules and
classes.
My guess is that he thinks there's a set of framework classes that is a
lot deeper and class-ier than it is, similar to what you'd find in C++, C#,
Java, etc.
So, OP - who won the guessing game :)
m
gene tani
Steve Holden [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Jim Hugunin's keynote speech at this year's PyCon was accompanied by a
projection if his interactive interpreter session, and I know I wasn't
alone in finding this a convincing example of Microsoft's (well, Jim's,
I was able to do something like this in Python a while back. You'll need one
of:
(a) A telephone line dialer/monitor DTMF I/O board that works through the
serial port, and a phone audio tap that mixes the soundcard I/O to the phone
(b) A TAPI-compliant modem that does everything you need
(c) A
Steve Holden [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Mike wrote:
Steve Holden [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Jim Hugunin's keynote speech at this year's PyCon was accompanied by a
projection if his interactive interpreter session, and I know I
Mike [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Looks like I'm having a bad week w/these URLs, because now I'm not able to
access http://lists.ironpython.com/listinfo.cgi/users-ironpython.com .
I was hoping to get at the archives to see if I can glean more info before
I
Hi, I am using Python to scrape web pages and I do not have problem
unless I run into a site that is utf-8. It seems is changed to amp;
when the site is utf-8.
If I try to replace it with .replace('amp;','') it for some reason
does not replace it.
For example:
the the contents link it shows it the same as when it
was assigned.
Richard Brodie wrote:
Mike [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]
However when I pull it into python the URL ends up looking like this
(notice the amp; instead of just in the URL)
Any ideas?
Some code
Steve Holden wrote:
You must be doing *something* wrong:
link =
/news/newsArticle.aspx?type=businessNewsamp;amp;storyID=2005-10-05T151245Z_01_HO548006_RTRUKOC_0_UK-AIRLINES-BA.xml
link = link.replace('amp;amp;','')
link
In playing with this I found link.replace does work but when I use
link.replace('amp;','')
it replaces it with amp; instead of just . link.replace is working
for me since if I changed the second option from to something else I
see the change.
So it seems link.replace() function reads
i'd like to use
os.access(path,mode)
where path may contain linux style wildcards.
i've failed so far.
my workaround is the bash command.
os.system('[ -e %s ]' % fn )
any suggestions?
--
http://mail.python.org/mailman/listinfo/python-list
thanks Leif. poor question on my part.
I had been using
glob.glob(path)==[]
and was looking for something more readable, hence
os.system('[ -e %s ]' % path )
but that doesn't seem like a good idiom for crossplatform.
I thought there may either be a way to escape the wildcards, or an
thanks Leif. poor question on my part.
I had been using
glob.glob(path)==[]
and was looking for something more readable, hence
os.system('[ -e %s ]' % path )
but that doesn't seem like a good idiom for crossplatform.
I thought there may either be a way to escape the wildcards, or an
Test for the existence of one or more matches of the wildcard
expression.
For example:
Are there any files that begin with 2005?
This doesn't work (wish it did):
os.access('2005*',os.F_OK)
However, these work arounds do the job:
glob.glob('2005*')==[]
as does this bash command:
Test for the existence of one or more matches of the wildcard
expression.
For example:
Are there any files that begin with 2005?
This doesn't work (wish it did):
os.access('2005*',os.F_OK)
However, these work arounds do the job:
glob.glob('2005*')==[]
as does this bash command:
dude, you are the sap that wrote it's not clear. get a life.
--
http://mail.python.org/mailman/listinfo/python-list
No need to apologize for continuing to waste your
time, self.plonk. Get a life, though, and you'll be happier.
As to your question, well, not before you apologize for
thread crapping.
As for your possible solutions, if you consider any
of yours to be readable, then i have no interest in
coding
Thanks Mike. Would there be an idiom using is?
somethng like
glob.glob('2005*) is not Empty
I have not figured out what to put on the right hand
side of is
I guess, for readability, nothing has come up that
seems _great_. One last effort would be to hide
the code behind a method, and use
Hi Dan,
It works, it's elegant, and it uses python strengths.
I guess I have to settle the question of who my audience is. That is
who do I want to make it readable for.
All the solutions so far require some python specific knowledge, and
there are some which are horendous even at that.
ugly. i guess this thread shows that you are clueless regarding your
thread crapping.
--
http://mail.python.org/mailman/listinfo/python-list
os.path.exists()
--
there should be no room for magic in a computer
for a professional programmer.
well put. sounds like the makings of a good signature...
--
http://mail.python.org/mailman/listinfo/python-list
Wait a sec. \x00 may represent a byte when unmarshaled, but as long as
marshal likes it as \x00, I think my db is capable of storing \ x 0 0
characters. What is the problem? Is it that \? I could escape that...
actually I think my django framework already does that for me.
Thanks,
Mike
--
http
Wait a sec. \x00 may represent a byte when unmarshaled, but as long as
marshal likes it as \x00, I think my db is capable of storing \ x 0 0
characters. What is the problem? Is it that \? I could escape that...
actually I think my django framework already does that for me.
Thanks,
Mike
--
http
Thanks everyone. It seems broken storing complex structures as escaped
strings, but I think I'll take my changes.
Thanks,
Mike
--
http://mail.python.org/mailman/listinfo/python-list
:
- Save my structure as binary data, and reference the file from my db
- Find a clean method of saving bytes into my db
Thanks again,
Mike
--
http://mail.python.org/mailman/listinfo/python-list
then it might do the job. But trying
to optimise code that hasn't even been written yet is a sure way to
trouble.
Thanks. Will do.
Regards,
Mike
--
http://mail.python.org/mailman/listinfo/python-list
then it might do the job. But trying
to optimise code that hasn't even been written yet is a sure way to
trouble.
Thanks. Will do.
Regards,
Mike
--
http://mail.python.org/mailman/listinfo/python-list
rain :)
Mike
--
http://mail.python.org/mailman/listinfo/python-list
in clear text.
Thanks,
Mike
--
http://mail.python.org/mailman/listinfo/python-list
HI
I WAS A MARINE MECHANIC working boat engines for 20 years and now I have
started making money for the rest of my life after i got into my own business
but I wish I had started many years ago, check it out for yourself
you'll be HAPPY you did. This site changed my life and my families
and it
Thanks.
I should've mentioned I want StdoutLog to subclass the 'file' type
because I need all the file attributes available.
I could add all the standard file methods and attributes to StdoutLog
without subclassing 'file' but I'd rather avoid this if I can.
--
?
It looks like the superclass's write() method is getting called instead
of the StdoutLog instance's write() method.
The python documentation says 'print' should write to
sys.stdout.write() but that doesn't seem to be happening.
Any idea what's going one?
Or ideas on how to debug this?
Thanks, Mike
flushing stdout has no effect.
I've got an implementation that does not subclass file. It's not as
nice but it works.
--
http://mail.python.org/mailman/listinfo/python-list
Perfect. This is what Ill use. Thanks! Mike
--
http://mail.python.org/mailman/listinfo/python-list
)
...
(compare to Perl:)
if($foo =~ /(\w+)\s*(\w+)/) {
$field1 = $1;
$field2 = $2;
...
}
Problem is, my python is invalid above. What's the pythonic way to do
this?
Thanks in advance O Python Charmers
Mike
--
http://mail.python.org/mailman/listinfo/python-list
On Mar 28, 10:01 am, Jason Kristoff deevine-removethis-
[EMAIL PROTECTED] wrote:
I'm trying to make something that once it is disconnected will
automatically try to reconnect. I'll add some more features in later so
it doesn't hammer the server but right now I just want to keep it simple
and
Hello,
I'm trying to use the feedparser module (http://www.feedparser.org/).
Is it possible to use this without running the setup program?
I don't see why not, seems like I'm missing something obvious.
My directory structure is:
myprogram.py
/feedparser
/feedparser.py
I know I
On Tue, May 13, 2008 at 11:16 PM, [EMAIL PROTECTED] wrote:
On May 13, 6:06 am, Gabriel Genellina [EMAIL PROTECTED]
wrote:
En Tue, 13 May 2008 07:30:44 -0300, Mike [EMAIL PROTECTED] escribió:
I'm trying to use the feedparser module (http://www.feedparser.org/).
Is it possible
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}))
Hi,
I'm writing client-server application in Python. It's monitoring
system, where server listen and waits for TCP connections, and every
connection takes own thread. Every thread puts data from clients to
Queue and exits. Then there is one DB loader thread, which loads all
data from Queue to
On May 30, 9:16 am, Dennis Lee Bieber [EMAIL PROTECTED] wrote:
On Thu, 29 May 2008 12:01:30 -0700 (PDT), Mike [EMAIL PROTECTED]
declaimed the following in comp.lang.python:
I observed, that every thread reserved some memory, and after exit
thread doesn't freed it. When i leaved my server
On May 30, 9:42 am, Mike [EMAIL PROTECTED] wrote:
On May 30, 9:16 am, Dennis Lee Bieber [EMAIL PROTECTED] wrote:
On Thu, 29 May 2008 12:01:30 -0700 (PDT), Mike [EMAIL PROTECTED]
declaimed the following in comp.lang.python:
I observed, that every thread reserved some memory, and after
On Tue, Jun 10, 2008 at 10:42 PM, Mike [EMAIL PROTECTED] wrote:
Hello,
I've spent the last couple of nights hacking away at a Python wrapper for
the Twitter API that I can use for various things.
I'm having trouble with one of the methods: user_timeline. (
http://groups.google.com/group
Hello,
I've spent the last couple of nights hacking away at a Python wrapper for
the Twitter API that I can use for various things.
I'm having trouble with one of the methods: user_timeline. (
http://groups.google.com/group/twitter-development-talk/web/api-documentation#HelpMethods
).
This is
On Tue, Jun 10, 2008 at 11:03 PM, Mike [EMAIL PROTECTED] wrote:
On Tue, Jun 10, 2008 at 10:42 PM, Mike [EMAIL PROTECTED] wrote:
Hello,
I've spent the last couple of nights hacking away at a Python wrapper for
the Twitter API that I can use for various things.
I'm having trouble with one
Web.py also springs to mind, I'd say it's worth looking at.
Well, in that case you could simply append the new output to a static file
every 10 seconds, or whenever there is new output. That way, you just need
to refresh the static file in your browser to see updates... Given what I
On Wed, Jun 11, 2008 at 2:16 PM, asdf [EMAIL PROTECTED] wrote:
On Wed, 11 Jun 2008 11:20:48 +1000, Aidan wrote:
asdf wrote:
Well, there's a few ways you could approach it.
You could create a cgi program from your script - this is probably the
solution you're looking for.
Output
On Jun 30, 10:57 am, Bruno Desthuilliers bruno.
[EMAIL PROTECTED] wrote:
Some (if not most) templating systems use their own mini-language to
handle presentation logic.
IMHO this is the funniest (worst) part of all this 'templating'
buss :)
It reminds me the good old slogan: Have you
On Jun 30, 1:41 pm, George Sakkis [EMAIL PROTECTED] wrote:
Because _typically_ a web template consists of mostly HTML, with
relatively little presentational logic and (ideally) no business
logic. Now, if all one wants to do is a quick and dirty way to, say,
view a log file in the browser, a
On Jun 30, 1:49 pm, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
Then what is so *good* about it, why embedding HTML into Python is not
good?
Who said embedding HTML in Python was bad ? Did you _carefully_ read
John's question ?-)
I should have say why embedding HTML into Python is not
On Jul 2, 11:09 am, George Sakkis [EMAIL PROTECTED] wrote:
On Jun 30, 3:16 pm, Mike [EMAIL PROTECTED] wrote:
On Jun 30, 1:41 pm, George Sakkis [EMAIL PROTECTED] wrote:
Because _typically_ a web template consists of mostly HTML, with
relatively little presentational logic and (ideally
On Jul 26, 8:46 am, Daniel Nogradi [EMAIL PROTECTED] wrote:
A very simple question: I currently use a cumbersome-looking way of
getting the first, second, etc. line of a text file:
for i, line in enumerate( open( textfile ) ):
if i == 0:
print 'First line is: ' + line
On Aug 17, 11:07 am, yadin [EMAIL PROTECTED] wrote:
class big(self):
x = 32
list = []
def inside (self):
class small(self): # a new class defined inside the first
y = 348
list.append(y) # send the value to first list
list.append(x)
this possibly be? The caller print statement obviously
shows a is singular.
Thanks in advance for any and all insight...
Mike
--
http://mail.python.org/mailman/listinfo/python-list
You know, every once in a while, self really bites me. (I program in
Java too much)
Thanks for everyone who replied quickly.
Mike wrote:
[ a bunch of crap because I forgot self, nevermind sorry ]
--
http://mail.python.org/mailman/listinfo/python-list
the appropriate bindings?
Thanks in advance for all advice!
Mike
--
http://mail.python.org/mailman/listinfo/python-list
Sweet! Thanks!
Mike
On Jan 7, 8:30 am, Guilherme Polo [EMAIL PROTECTED] wrote:
globals() =)
--
http://mail.python.org/mailman/listinfo/python-list
On Dec 27 2007, 5:25 pm, Ian Clark [EMAIL PROTECTED] wrote:
On 2007-12-27, SMALLp [EMAIL PROTECTED] wrote:
connectionString = {host:localhost, user:root,
passwd:pofuck, db:fileshare}
dataTable = files
conn = mysql.connect(host=connectionString[host],
user=connectionString[user],
setup.py bdist_wininst
...for executable installers.
If you can provide a valid setup.py, I can probably create the exe/
msi.
Mike
--
http://mail.python.org/mailman/listinfo/python-list
and setup-tools, I was
referred to the Distutils user group. I would cross-post there for
double the fun!
http://mail.python.org/mailman/listinfo/distutils-sig
Mike
--
http://mail.python.org/mailman/listinfo/python-list
it at some point? It would be nice to have a
complete library reference with a good index at times.
Thank you,
Mike
--
http://mail.python.org/mailman/listinfo/python-list
/graphs.html
Some of these may have dependencies, such as numpy or scipy. Be sure
to read the docs for full details either way.
Mike
--
http://mail.python.org/mailman/listinfo/python-list
be wonderful.
wxPython can most likely do what you like and they have a very helpful
user's group. But if you're leaning more towards using Python on the
web, you'll probably want to take a look at the usual suspects:
Django, Turbogears, Pylons or Plone/Zope.
Mike
--
http://mail.python.org/mailman
) You see, we build to that. -- Jack Handey |
Ben Finney
I would recommend Lutz's other book, the wonderful Python tome
Programming Python 3rd Ed. as well. It's good for getting into the
deepest part of Python's jungle.
Mike
--
http://mail.python.org/mailman/listinfo/python-list
website: www.wxpython.org
Mike
--
http://mail.python.org/mailman/listinfo/python-list
In the following Display inherits from the Tkinter class Canvas:
import sys
from Tkinter import *
class Display(Canvas) :
...
def fill_canvas() :
slop=self.slop
set_sr(int(self.cget('width'))+slop,
int(self.cget('height'))+slop)
self.refresh()
...
Oops. I just forgot self.
--
http://mail.python.org/mailman/listinfo/python-list
On May 3, 11:25 pm, Gabriel Genellina [EMAIL PROTECTED]
wrote:
En Thu, 03 May 2007 16:52:55 -0300, Mike [EMAIL PROTECTED] escribió:
I was messing around with adding methods to a class instance at
runtime and saw the usual code one finds online for this. All the
examples I saw say
On May 4, 2:05 pm, Peter Otten [EMAIL PROTECTED] wrote:
Mike wrote:
staticmethod makes the function available to the whole class according
to the docs. What if I only want it to be available on a particular
instance? Say I'm adding abilities to a character in a game and I want
to give
On May 4, 5:46 pm, Peter Otten [EMAIL PROTECTED] wrote:
Mike wrote:
I just realized in working with this more that the issues I was having
with instancemethod and other things seems to be tied solely to
What you describe below is a function that happens to be an attribute of an
instance
Thanks Alan,
I am still perplexed why the default value of this object is shared.
hemm...d
Back to programming, :)
Sia
On May 23, 7:19 am, Alan Franzoni
[EMAIL PROTECTED] wrote:
Il 23 May 2007 04:07:19 -0700, Siah ha scritto:
Ready to go insane here. Class A, taking on a default value for
Are there key listeners for Python? Either built in or third party?
--
http://mail.python.org/mailman/listinfo/python-list
guys,
I've researched python pretty much but still have no idea how to print
out each single character from a string in HEX format? Hope someone
can give me some hints. Thanks a lot.
e.g.###here is a string
a='01234'
###how to print out it out in this way
Great! It works.
Thanks a lot.
--
http://mail.python.org/mailman/listinfo/python-list
([EMAIL PROTECTED])
..
but still, the server can only receive the first line, and keep
waiting for the second line. So, in my mind the second line is still
in the sending buffer, and not reach the server side.
Any hints would be appreciated.
Mike
--
http://mail.python.org/mailman
.
|
|
=
|
| In article [EMAIL PROTECTED],
| Mike Corley [EMAIL PROTECTED] wrote:
|
| John J Smith ([EMAIL PROTECTED]) wrote:
|
| : b) we do know who you are. Or are you someone else we
don't know about?
| : You are currently known as That bloody persistant net
nutter, who's
changed the code to run a non-exist command
wrong_command_test(commented the open and sleep lines), then the
script printed:
sh: wrong_command_test: command not found
well Done
Any opinions would be appreciated.
Mike
--
http://mail.python.org/mailman/listinfo/python-list
On Jun 14, 2:55 am, Michael Hoffman [EMAIL PROTECTED] wrote:
Gabriel Genellina wrote:
En Wed, 13 Jun 2007 21:47:16 -0300, mike [EMAIL PROTECTED] escribió:
Following piece of code can capture IOError when the file doesn't
exist, also, other unknown exceptions can be captured when I press
,
Mike
--
http://mail.python.org/mailman/listinfo/python-list
are essential).
Thanks for your help,
Mike
--
http://mail.python.org/mailman/listinfo/python-list
Answers interspersed.
David Boddie wrote:
On Saturday 24 March 2007 23:08, Mike wrote:
I'm having a problem with modal forms on windows. I've written a very
short test program, with a main window and a form called from the main
window. The form is set to modal with form.setModal(1) before
in advance.
Mike
--
http://mail.python.org/mailman/listinfo/python-list
Thanks, Troy. I never cease to be amazed at what can be discovered by
reading the manual! self bangs head on wall
Mike
Troy Melhase wrote:
On 4/14/07, Mike [EMAIL PROTECTED] wrote:
While trying to write a recursive function involving lists, I came
across some (to me) odd behavior which I
1 - 100 of 3413 matches
Mail list logo