I am trying to make the win32com HelloWorld server work with a VBA
client but I get:
Run-time error '-2147467259(80004005)':
Automation error
Unspecified error
I googled for the error but the suggested solutions (commenting out
_reg_class_spec_ and putting the server on the python path) do not se
On Mon, 27 Mar 2006 07:50:01 -0800, Arne Ludwig wrote:
> Just for completeness: The functions in Steve's original post named
> maximum calculate the minimum.
Er, yes. I benchmarked them but clearly I should have function-tested
them as well.
Here is, I hope, my last word on maximum(). It figu
John Salerno wrote:
> I think it has to do with the exception I'm using. For the leap year
> program, it should be ValueError. For the other one, its' a combination
> of that and the input function.
Hmm, turns out something was wrong with the indentation of the second
while loop! Even though i
Robin Becker wrote:
> Steven Bethard wrote:
> ...
>>>
>>> http://www.doxdesk.com/img/software/py/icons.zip
>>
>> I just wanted to say that I've been using these icons for almost a
>> week now and I love them! I'd like to reiterate EuGeNe's request that
>> these go into the Python 2.5 relea
Ok I felt a little bad for my quick answer, these just seem like
homework problems.
first problem - it's scope. (there are two scope errors in the sample)
white space is meaningful. get consistent with tabs or spaces, or
choose an editor that replaces tab press with space. It'll make life a
lot
I have two tuples: keys and subjects. How do I construct a dictionary using these two tuples?CheersTommy[EMAIL PROTECTED]http://homepage.mac.com/tgrav/"Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the
Ha, you found it all before I could fire it up.
The whitespace thing is very odd, and it took about a month before I
was comfortable using it for scope.
On the bright side, scope errors are a lot easier to find than you
might think, once you get used to looking at py code.
I thought, if your in t
I have done a few GUI apps in python. I like many started with
tKinter.
tKinter is quick, easy, ugly and limited. It did really well for
little programs I wrote for my wife, like a shopping cart, and some
quick admin tools for clients.
Now I'm a big wxPython fan.
wxPython has a small learning cu
John --
I looked at your exercise. As it appears in my browser, there appear
to be a couple of problems with the bottom "While" block.
0 Alignment problem with the "except" clause.
As I'm sure you've already discovered, Python is "whitespace
sensitive". If it looks like a block, it is; other
[EMAIL PROTECTED] (Alex Martelli) wrote:
> Max <[EMAIL PROTECTED]> wrote:
>
>> BWill wrote:
>>
>> > oh, I wasn't expecting a single solution for both platforms, just some
>> > good solutions
>> >
>> > thanks
>>
>> Are you aware that this idea is somewhat foreign to Linux? (Maybe you
>> are and
I have a 6 months contract position open in one of my client sites
at San Jose, CA. Here is the job description:
General Linux Application Developer:
Job Description:
Develop a wide variety of user space features using C, Java, Python,
Perl, and various shell scripts. Development includes, wr
Yanping Zhang wrote:
> Hello everyone,
>
> I am pretty new in python. Please give me any idea about
> this issue:
>
> There is a function like this in my c dll:
>
> typedef void (WINAPI *myCallBack) (unsigned int myarg1, unsigned int myarg2)
>
> bool myfunc(myCallBack mycall)
>
>
> In my python co
Shi, Jue wrote:
> Hello, Gurus,
>
> I have a question on wrapping C function in Python.
>
>
> My C code is like this:
>
> typedef void (WINAPI *myCallBack) (unsigned int myarg1, unsigned int myarg2)
>
> bool myfunc(myCallBack callfunc)
>
>
> Now I want to call myfunc in Python, what should I do?
Sorry, this post had to go on Django Users group. I'll post it there.
You may ignore this post here.
Sia
--
http://mail.python.org/mailman/listinfo/python-list
Gary wrote:
> 0 Alignment problem with the "except" clause.
> As I'm sure you've already discovered, Python is "whitespace
> sensitive".
Wow, I'm really confused. As it turns out, whitespace *was* the problem,
but it looks no different now (as it works) than it did then (when it
didn't work
Em Seg, 2006-03-27 às 14:26 -0500, Tommy Grav escreveu:
> I have two tuples: keys and subjects. How do I construct a dictionary
> using these two tuples?
dict(zip(keys, subjects))
--
Felipe.
--
http://mail.python.org/mailman/listinfo/python-list
Yes, there is literature on the generating side of the regular
expression/FSM model. In fact, the matching problem and the
generating problems are exactly equivalent. A slight variation of the
definition of how a matcher works, turns it into a generator and vice
versa. To directly generate (rath
Siah wrote:
> I just launched my django site for a client. My problem is something
> is caching my db data in a bizzar way. Here are some of the behaviours
> I get:
>
> - I login, and every other page it makes me login again for a 5 minutes
> or so and then it remembers that I am logged in.
> -
Folks-
I've created some python code for accessing JSON-RPC (think xmlrpc but
replace XML with JSON). I've written an article about it here:
http://developer.spikesource.com/wiki/index.php/Article:Accessing_JSON-RPC_with_Python
Let me know if you have any questions or feedback.
I also have a qu
abcd wrote:
>>>anyone have v2.x of pysqlite that I could download? the website is
>>>down for a hardware upgrade with no date as to when it will be back.
>>>
>>
>
> I need v 2.x for windows, running python v2.4
I sent pysqlite-2.0.4.win32-py2.4.exe
Kent
--
http://mail.python.org/mailman/listin
It has been a while since the last release of Dabo (version 0.5.1
back in January), but we haven't been standing still. A big reason
for the long span was PyCon Dallas back in February, which involved
lots of preparation beforehand, as well as lots of work after from
the great respo
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Python has sys.path
If you want to add dirs into your PYTHONPATH add them to sys.path
Jesus Rivero - (Neurogeek)
ACB wrote:
> I have been trying to get the gdmodule installed and have run into
> an issue. When I import gd I get the following error.
Sullivan WxPyQtKinter wrote:
> 1. Are there any method (in python of course) to redirect to a web page
> without causing a "Back" button trap(ie, when user click the back
> button on their web browser, they are redirect to their current page,
> while their hope is probably to go back to the last pa
Kent Johnson wrote:
> abcd wrote:
>
anyone have v2.x of pysqlite that I could download? the website is
down for a hardware upgrade with no date as to when it will be back.
>>>
>>I need v 2.x for windows, running python v2.4
>
>
> I sent pysqlite-2.0.4.win32-py2.4.exe
Well tried, a
Petr Prikryl wrote:
> I did observe the problem when using the -U
> option on Windows 2000. Seems like some infinite
> recursion in cp1250.py -- see below.
>
> I did not try it with earlier versions of Python.
>
> Can this be reproduced on your computer?
I can't try right now. However, I can r
Jesus Rivero - (Neurogeek) wrote:
> Python has sys.path
> If you want to add dirs into your PYTHONPATH add them to sys.path
The OP seems to be asking about C libraries dynamically linked to extension
modules, not Python libraries.
> ACB wrote:
>>>I have been trying to get the gdmodule installed a
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
abcd wrote:
> anyone have v2.x of pysqlite that I could download? the website is
> down for a hardware upgrade with no date as to when it will be back. [...]
The plan is for the complete upgrade to happen tonight.
- -- Gerhard
-BEGIN PGP SIGNATU
John Salerno wrote:
> Here's another question that is related:
>
> while True:
> year = raw_input('Enter year (or other character to quit): ')
> try:
> year = int(year)
> except NameError:
> break
> ...
> raw_input()
>
> This works as expected, except that if you e
On Sat, Mar 25, 2006 at 03:45:56AM -0800, Gerard Flanagan wrote:
[...]
> * If I want to do :
>
> mv mypackage-1.0.2.tar.gz subdir/mypackage-1.0.2.tar.gz
>
> then tab-completion gives me the first occurrence of the file, but I
> have to type the second occurrence - is there a way of
Hi Bruno, hi folks!
thank you very much for your advices.
I didn't know about the property function.
I learned also quite a lot now about "references".
Ok everything is a reference but you can't get a reference of a
reference...
I saw a lot of variations on how to solve this problem, but I find
a
In my ATL Class, I have a function with the body
STDMETHODIMP CSimpleObj::Show()
{
AFX_MANAGE_STATE(AfxGetStaticModuleState())
// TODO: Add your implementation code here
CSimpleDialog myDialog;
int result = myDialog.DoModal();
MessageBox(NULL,TEXT("Live From Python"),
Hello everyone!
I seem to have found the problem!
In my program, I have "print" commands. These print commands are
turned off only when the "noprint" command line argument is supplied.
When the Linux service launched the program, it was not using the
"noprint" argument. When I started using it,
Scott David Daniels wrote:
> Eyal Lotem wrote:
>> By the way, the "real" problem here is referencing by name, rather than
>> using "true" references. Which is the result of using a textual language.
>> The "real" solution would be to store real-references to the function and
>> only present the na
"Clemens Hepper" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> It's strange: python seem to cache constants from 0 to 99:
The Python specification allows but does not require such behind-the-scenes
implementation optimization hacks. As released, CPython 2.4 caches -5 to
99, I
"Jürgen Urner" <[EMAIL PROTECTED]> writes:
> uuid is a python module to generate RFC 4122 compatible UUIDs
>
> Somehow this module was missing in python, so I took over the
> struggle with the C sources and all those quirky bits and bytes.
I strongly encourage you to look at this patch for uuid t
Terry Reedy wrote:
> The Python specification allows but does not require such behind-the-scenes
> implementation optimization hacks. As released, CPython 2.4 caches -5 to
> 99, I believe. In 2.5, the upper limit was increased to 256. The limits
> are in a pair of #define statements in the i
"Peter Hansen" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> [EMAIL PROTECTED] wrote:
>> Do you think this discussion is a proof that the following principle
>> got violated, or do you think that "loop with condition" is not such an
>> atomic thing to be subject to this: "There sh
Kent Johnson <[EMAIL PROTECTED]> writes:
> Kent Johnson wrote:
>> I sent pysqlite-2.0.4.win32-py2.4.exe
>
> Well tried, anyway, someone between OP and me is blocking zip and
> exe attachements.
Good thing too. Please don't send files as attachments in email; it
enables the malware propagation sys
Terry Reedy:
>The Python specification allows but does not require such behind-the-scenes
>implementation optimization hacks. As released, CPython 2.4 caches -5 to
>99, I believe. In 2.5, the upper limit was increased to 256. The limits
>are in a pair of #define statements in the int object s
Hi
I have a tkinter question. In the following script the window will not
display until the script has finished executing. It appears at the same
time as the output "script finished". How can I make it appear
immediately, with the output "script finished" appearing 5 seconds
later.
cheers Dave
[EMAIL PROTECTED] wrote:
> Ok I felt a little bad for my quick answer, these just seem like
> homework problems.
NP. I appreciate your help. These are just little exercises I found
online, just to give me a reason to use Python. :)
--
http://mail.python.org/mailman/listinfo/python-list
Helpful Hints Ivan. Thanks for the points.
Sia
--
http://mail.python.org/mailman/listinfo/python-list
Steven Bethard wrote:
> Robin Becker wrote:
>> Steven Bethard wrote:
>> ...
>
> Can you see an icon with a blue and yellow plus on your desktop? ;)
>
> STeVe
no
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
Hi, is it possible to instantiate a class with a variable.
example
class foo:
def method(self):
pass
x='foo'
Can I use variable x value to create an instance of my class?
Thanks, John
--
http://mail.python.org/mailman/listinfo/python-list
"John" <[EMAIL PROTECTED]> writes:
> class foo:
> def method(self):
> pass
>
> x='foo'
>
> Can I use variable x value to create an instance of my class?
You seem to be asking "is it possible to call an object whose name is
stored in a string".
The answer is yes::
>>> class Foo:
After freezing a PYGTK app, I am unable to run it. It this a common
problem, because I could not find any documentation on it at all.
I tried freezing this example, which gets by the make as well, but
running it results in a failure. This is on Ubuntu Linux:
http://www.moeraki.com/pygtktutorial/
Hi all,
I recently found the Leo Outliner Tool
(http://webpages.charter.net/edreamleo/front.html)written in Python and
installed it on my Windows PC at work and my Debian and Ubuntu PC's at
home. On my Linux installs, however, the application is jumpy. When
scrolling down a long document in Leo, th
On Mon, 27 Mar 2006 11:08:36 -0300,
Felipe Almeida Lessa <[EMAIL PROTECTED]> wrote:
> Em Seg, 2006-03-27 às 08:23 -0500, Dan Sommers escreveu:
>> On Mon, 27 Mar 2006 14:52:46 +0200,
>> Joel Hedlund <[EMAIL PROTECTED]> wrote:
>>
>> > ... According to PEP8 (python programming style guidelines) you
In article <[EMAIL PROTECTED]>,
Ben Finney <[EMAIL PROTECTED]> wrote:
>"John" <[EMAIL PROTECTED]> writes:
>> class foo:
>> def method(self):
>> pass
>>
>> x='foo'
>>
>> Can I use variable x value to create an instance of my class?
>
>You seem to be asking "is it possible to call an obj
Hi there Christopher, I was wondering if you (or anyone reading this )
could quickly summarize the ways in which unittest is unpythonic, or
point me to somewhere which discusses this.
Is this 'consensus opinion' or mainly your own opinion?
Is there a summary somewhere (in addition to the Zen of
if type(key).__name__ == "int" or type(key).__name__ == "long":
abc()
elif type(key).__name__ == "str":
efg()
elif type(key).__name__ == "tuple" or type(key).__name__ == "list":
ijk()
In other words I need to determinie intiger type or string or []/() in
elegant way, possibly with
Florian Diesch <[EMAIL PROTECTED]> wrote:
...
> >> are and want to do it anyway?) Linux puts the whole file system
> >> (including mounted iPods, ISOs and NTFS drives) in one hierarchy.
> >
> > Yes, but you may still want to distinguish (because, for example, hard
> > linking doesn't work acros
"AndyL" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
> if type(key).__name__ == "int" or type(key).__name__ == "long":
> abc()
> elif type(key).__name__ == "str":
> efg()
> elif type(key).__name__ == "tuple" or type(key).__name__ == "list":
> ijk()
>
>
> In other words
AndyL wrote:
> if type(key).__name__ == "int" or type(key).__name__ == "long":
> abc()
> elif type(key).__name__ == "str":
> efg()
> elif type(key).__name__ == "tuple" or type(key).__name__ == "list":
> ijk()
>
>
> In other words I need to determinie intiger type or string or []/() in
James Stroud wrote:
> Here is a suggestion
>
> todo = {(int, long):abc, (str,):afg, (tuple, list):ijk}
> todo[type(key)]()
Is not that a shortcut? I have got "KeyError" exception ...
--
http://mail.python.org/mailman/listinfo/python-list
Paul McGuire wrote:
> "AndyL" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
>
>>if type(key).__name__ == "int" or type(key).__name__ == "long":
>> abc()
>>elif type(key).__name__ == "str":
>> efg()
>>elif type(key).__name__ == "tuple" or type(key).__name__ == "list":
>> i
Em Seg, 2006-03-27 às 21:05 -0500, Dan Sommers escreveu:
> Right off the top of my head, I can't think of a way to make "a = b; a
> is b" return False.
Sorry for being so --quiet. I will try to be more --verbose.
I can think of two types of constants:
1) Those defined in the language, like True,
Ben Finney <[EMAIL PROTECTED]> writes:
> >>> class Foo:
> ... pass
> ...
> >>> foo_name = 'foo'
Dang. As Cameron Laird points out, this should be
>>> foo_name = 'Foo'
each time.
Moral of the story: if the example already works, and then you cut and
paste into the messag
AndyL wrote:
> James Stroud wrote:
>
>> Here is a suggestion
>>
>> todo = {(int, long):abc, (str,):afg, (tuple, list):ijk}
>> todo[type(key)]()
>
>
>
> Is not that a shortcut? I have got "KeyError" exception ...
No, I hit send too soon, mixing ideas in my head. Paul McGuire's answer
is the wa
Terry Hancock wrote:
> When you get
> into stickier stuff like graphics and web programming, the
> formal structure of pyunit can be easier to adapt than
> something which is intrinsically based on string processing.
As pointed out earlier in this thread, Zope 3 has embraced doctests in a
big way
hi
i am using this code to run a ps command in unix
def run(program, *args):
pid = os.fork()
if not pid:
os.execvp(program, (program,) + args)
return os.wait()[0]
run("ps", "-eo pid,ppid,args")
It runs fine, but i wish to store the results into a variablehow
can i do thi
Em Seg, 2006-03-27 às 18:43 -0800, James Stroud escreveu:
> Here is a suggestion
>
> todo = {(int, long):abc, (str,):afg, (tuple, list):ijk}
> todo[type(key)]()
Maybe...
todo = {(int, long): abc, basestr: afg, (tuple, list): ijk}
(y for x,y in todo.iteritems() if isinstance(key, x)).next()()
Fo
Hi all,
Just wondering which technology would best suit the development of
custom intranets in general, things that may be industry specific would
need to be included (say for an industrial design company the addition
of internal memos and even extrememly business specific apps such as
simple inve
"Jean-Claude Garreau" <[EMAIL PROTECTED]> wrote in message news:[EMAIL
PROTECTED]
> Hi,
>
> I'm a beginner with python 2.4. I use it on Win XP Pro. I have no problems
> with the GUI IDLE, but
> when I copy the instructions in a script file, say 'test.py' and double click
> on the file, I have ju
Forgot to mention the ease of deployment using Apache (well basically
LAMP) would be a big bonus, just because I trust and am familiar with
Apache. Thanks!
--
http://mail.python.org/mailman/listinfo/python-list
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes:
> I have noticed some distinctly funny and confused feelings I get when
> using the unittest module, stuff that feels clunky and odd about how it
> is set-up, however I thought that this was just due to *my personal*
> lack of understanding of the d
Hi,there. Sometimes a python CGI script tries to output great
quantities of HTML responce or in other cases, it just falls into a
dead loop. How could my client close that CGI script running on the
server? I tried to use the STOP button in the web browser button, but
it does not work.
In addition,
Hi,there. Sometimes a python CGI script tries to output great
quantities of HTML responce or in other cases, it just falls into a
dead loop. How could my client close that CGI script running on the
server? I tried to use the STOP button in the web browser button, but
it does not work.
In addition,
One quick question:
I have a python cgi script running behind a CGI server which is also
built using python using CGIHTTPServer module. How can my cgi script
obtain the remote ip address?
--
http://mail.python.org/mailman/listinfo/python-list
David wrote:
> 3. What is a simple example of a Pythonic use of __slots__ that does NOT
> involved the creation of **many** instances.
mu. Your question presupposes the existence of such an example.
-Mike
--
http://mail.python.org/mailman/listinfo/python-list
Python disappointly failed to provide a convinient cgi session
management module. Not willing to use external modules, I would like to
implement a simplest Session object on my own.
The basic problem is: how could a python CGI program understand several
requests are in the same session? Definately
os.environ['REMOTE_ADDR']
os.environ['REMOTE_HOST']
--
http://mail.python.org/mailman/listinfo/python-list
Dennis Lee Bieber enlightened us with:
> I suspect the desired function may be browser specific, since it
> sounds like one would need to "pop" a history record to remove the
> "redirect" page from the list...
That's only if you think from the browser's point of view. An internal
redirect goes unn
I really appriciate the help a lot, the but the problems is that i have
already real those. What i was looking for was some kind of detailed
tutorial, that explains the basic ideas about live page and
formhandling etc.
(my be it the time some nevow know guy got onto it)
--
http://mail.python.org
Felipe Almeida Lessa wrote:
> I said [constants defined in your code] can (maybe "should"?) be used with
> "is", and
> AFAICT I'm right as well:
> >>> b = a
> >>> b is a
> True
You should _never_ use 'is' to check for equivalence of value. Yes, due
to the implementation of CPython the behaviour y
On 27 Mar 2006 15:15:05 -0800, <[EMAIL PROTECTED]> wrote:
> Hi
>
> I have a tkinter question. In the following script the window will not
> display until the script has finished executing. It appears at the same
> time as the output "script finished". How can I make it appear
> immediately, with t
"Alvin A. Delagon" <[EMAIL PROTECTED]> writes:
> I have a python cgi script running behind a CGI server which is also
> built using python using CGIHTTPServer module. How can my cgi script
> obtain the remote ip address?
The CGI specification lists a number of environment variables that are
set
all,
trying to load an application (notepad for instance) and have it sit
inside a Python application window. When the main window maximises or
minimises, the (notepad) app follows.
I am pretty sure I need to use a frame widget under tkinter (win32) but
not exactly sure how to do it.
I can ma
Mir Nazim wrote:
> I really appriciate the help a lot, the but the problems is that i have
> already real those. What i was looking for was some kind of detailed
> tutorial, that explains the basic ideas about live page and
> formhandling etc.
> (my be it the time some nevow know guy got onto it)
Thanks a lot Justin! ^_^
--
http://mail.python.org/mailman/listinfo/python-list
Op 2006-03-27, Donn Cave schreef <[EMAIL PROTECTED]>:
> In article <[EMAIL PROTECTED]>,
> "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> ...
>> So - your conclusion is basically right: use is on (complex) objects, not on
>> numbers and strings and other built-ins. The exception from the rule is
>
101 - 181 of 181 matches
Mail list logo