Re: What is a type error?

2006-07-14 Thread George Neuner
On 13 Jul 2006 08:45:49 -0700, "Marshall" <[EMAIL PROTECTED]> wrote: > >On the other hand, there is no problem domain for which pointers >are a requirement. I agree they are deucedly convenient, though. > I would argue that pointers/references _are_ a requirement for I/O. I know of no workable me

Re: TFTP client in python

2006-07-14 Thread malahal
I saw that in Google too! It is server centric and I was looking for client specific code. The code also doesn't compile due to white space issues. If this is the best available, I will have to get dirty in Python! Thanks, Malahal. Stefan Behnel [EMAIL PROTECTED] wrote: > [EMAIL PROTECTED] wrote:

About iServicePro

2006-07-14 Thread david
iServicePro is an innovative approach to offering affordable tools for Java and J2EE developers. in particular, we are a professional team for applying oneself to develop and integrate eclipse plug-in for user applications. Our mission now is to deliver business value and to maximize developers' p

Re: Accessors in Python (getters and setters)

2006-07-14 Thread Steve Holden
mystilleef wrote: > Marc 'BlackJack' Rintsch wrote: > >>In <[EMAIL PROTECTED]>, mystilleef >>wrote: >> >> >>>Maric Michaud wrote: >>> But that's not python philosophy. >>> >>>Python doesn't have any philosophy with regards to naming identifiers. >> >>But the python community has one. Pythonis

Re: About iServicePro

2006-07-14 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > We are committed to the success of your trial. If you need to see a > demonstration by spamming a non-java forum, I think you've just demonstrated what kind of company you're working for quite well, thank you. -- http://mail.python.org/mailman/listinfo/python-list

Re: What is a type error?

2006-07-14 Thread Marshall
George Neuner wrote: > On 13 Jul 2006 08:45:49 -0700, "Marshall" <[EMAIL PROTECTED]> > wrote: > > > >On the other hand, there is no problem domain for which pointers > >are a requirement. I agree they are deucedly convenient, though. > > > > I would argue that pointers/references _are_ a requiremen

Re: TFTP client in python

2006-07-14 Thread Stefan Behnel
> Stefan Behnel [EMAIL PROTECTED] wrote: >> [EMAIL PROTECTED] wrote: >>> Is there a TFTP client python module? I just need "get file" feature. >>> I came across two implementations on WEB, but they are kind of >>> unfinished (got the code from some mailing list!). >> Second hit in Google ("tftp pyt

Re: String handling and the percent operator

2006-07-14 Thread Bruno Desthuilliers
Tom Plunket wrote: > I have some code to autogenerate some boilerplate code so that I don't > need to do the tedious setup stuff when I want to create a new module. > > So, my script prompts the user for the module name, then opens two > files and those files each get the contents of one of these

Re: String handling and the percent operator

2006-07-14 Thread Anthra Norell
- Original Message -From: "Tom Plunket" <[EMAIL PROTECTED]>Newsgroups: comp.lang.pythonTo: Sent: Friday, July 14, 2006 12:49 AMSubject: String handling and the percent operator> I have some code to autogenerate some boilerplate code so that I don't> need to do

Re: What is a type error?

2006-07-14 Thread Marshall
Chris Smith wrote: > Marshall <[EMAIL PROTECTED]> wrote: > > > What you are asking for is some subset of identity, and I've not yet > > > succeeded in understanding exactly what it is or what its limits are... > > > except that so far, it seems to have everything to do with pointers or > > > aliasi

Re: OT: Search for python in Norway

2006-07-14 Thread Stefan Behnel
cyberco wrote: > Although the climate wouldn't make you think so, but searching for > python is hot in Norway: > > http://www.google.com/trends?q=python&ctab=1&geo=all&date=all > > I wonder what the explanation could be. > > Btw: Java seems to be all the rage in India :) > http://www.google.com/

Re: python logging module problem

2006-07-14 Thread Vinay Sajip
Ritesh Raj Sarraf wrote: > When I execute the above code, logger.info()'s messages don't get > displayed. And logger.warning()'s messages get displayed twice. > The warning messages are displayed twice because you have two handlers which both output to the console. The reason you don't get the i

Re: Byte array question

2006-07-14 Thread Dan Winsor
John Machin wrote: > On 14/07/2006 10:41 AM, Dan Winsor wrote: > > Sybren Stuvel wrote: > >> Dan Winsor enlightened us with: > >>> This one "works" in that it runs, but the server on the other end gets > >>> garbage unrelated to the test file. > >> Are you sure it is garbage? Have you tried changi

Re: How to have application-wide global objects

2006-07-14 Thread Jeremy Sanders
Fredrik Lundh wrote: > if you got some other result, you didn't just import the same thing > twice... I think you may be incorrect, or I have misinterpreted you. Try this: ** In test.py import sys import foo.bar print foo.bar.myvar foo.bar.myvar = 42 print foo.bar.myvar

Re: How to have application-wide global objects

2006-07-14 Thread Fredrik Lundh
Jeremy Sanders wrote: >> if you got some other result, you didn't just import the same thing >> twice... > > I think you may be incorrect, or I have misinterpreted you. you've misinterpreted what Python means by "a module". > Try this: > import foo.bar here you import the module named "foo.ba

Re: What is a type error?

2006-07-14 Thread Joachim Durchholz
Marshall schrieb: > What about my example of SQL? Mutation, no pointers, no aliasing. > Yet: useful. Sorry, but SQL does have aliasing. E.g. if you have records that have name="John", surname="Doe", the statements SELECT * FROM persons WHERE name = "John" and SELECT * FROM persons WHERE na

Re: Byte array question

2006-07-14 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Dan Winsor wrote: > Sybren Stuvel wrote: >> [EMAIL PROTECTED] enlightened us with: >> > I want to send thorugh the API. However, no matter how I try it, >> > Java on the other end doesn't like what I'm passing it there. >> >> What have you tried and how did it fail? > > S

Re: What is a type error?

2006-07-14 Thread Andreas Rossberg
Darren New wrote: > Andreas Rossberg wrote: > >> Yes, technically you are right. But this makes a pretty weak notion of >> mutability. All stateful data structures had to stay within their >> lexical scope, and could never be passed to a function. > > Not really. The way Hermes handles this is

Re: What is a type error?

2006-07-14 Thread Andreas Rossberg
Marshall wrote: > > After all, what are the alternatives? Purely-functional > languages remove themselves from a large class of > problems that I consider important: data management. Maybe, but I have yet to see how second-class variables are really more adequate in dealing with it. And note th

Re: What is a type error?

2006-07-14 Thread Joachim Durchholz
Marshall schrieb: > void foo() { > int i = 0; > int j = 0; > j = 1; > i = 2; > // check value of j here. It is still 1, no matter what you filled > // in above. > // The assignment to i cannot be made to affect the value of j. > } > > Those two local primitive variables cannot be ma

Re: How to have application-wide global objects

2006-07-14 Thread Jeremy Sanders
Fredrik Lundh wrote: > no, the "bar.py" *file* gets loaded twice, first as the "foo.bar" > module, and then as the "bar" module. True and I agree with your email, but suppose there is bar1.py and bar2.py in foo, then they can refer to each other by importing bar2 and bar1, respectively. These mod

Re: What is a type error?

2006-07-14 Thread Joachim Durchholz
Marshall schrieb: > By your definition, "pointer" and "variable" are synonyms. That doesn't > seem like a good idea to me. (What if i and j end up in registers? > I have not heard it said that registers have addresses.) There are no registers in the JVM ;-P More specifically, where Joe said "poin

Re: How properly manage memory of this PyObject* array?? (C extension)

2006-07-14 Thread John Machin
On 14/07/2006 4:16 PM, [EMAIL PROTECTED] wrote: >> It's quite simple, really: You malloc it, you free it. > > John - I hope you don't mind that I really want to make sure I > understand your > good wisdom in this area by asking for clarification > > ASSUMPTIONS: > > 1. As long as we properl

Re: stdout/stderr for only one thread in a multithreaded python app

2006-07-14 Thread Antoon Pardon
On 2006-07-13, notanotheridiot <[EMAIL PROTECTED]> wrote: > Hi- > > I'm trying to exec some arbitrary code in one thread of an application > and read anything it prints to stdout or stderr in another thread. My > question is how? > > I've tried changing sys.stdout, but that changes stdout for the w

Re: python logging module problem

2006-07-14 Thread Ritesh Raj Sarraf
Vinay Sajip wrote: > > It's usual to rely on logger levels and to set handler levels for > additional refinement of what goes to a particular handler's > destination. > The problem is that for StreamHandler, logging module logs to sys.stderr. I want to use the logging feature for most of the mess

How to start more than one process at the same time?

2006-07-14 Thread Dirk Hagemann
Hi! How can I start several jobs at the same time with python? I want to collect data from some servers and I don't want to wait until the first server is finished. These jobs should run parallel to save time. What I tried is this: os.popen('regdmp -m server1 "HKEY_LOCAL_MACHINE\\Software\\Int

Re: Chunking sequential values in a list

2006-07-14 Thread Gerard Flanagan
[EMAIL PROTECTED] wrote: > Gerard> David Hirschfield wrote: > >> I have this function: > >> > >> def sequentialChunks(l, stride=1): > ... > >> > >> Which takes a list of numerical values "l" and splits it into chunks > >> where each chunk is sequential... > > Gerard

Re: Accessors in Python (getters and setters)

2006-07-14 Thread riquito
mystilleef ha scritto: > Methods are used to perform actions. Data attributes usually aren't. We > are on different planes. You aren't thinking pythonic. You should not make any difference between accessing an attribute and accessing a function. They both just need to receive the right data to p

Re: What is a type error?

2006-07-14 Thread Joachim Durchholz
Marshall schrieb: > Joachim Durchholz wrote: >> It's just that I know that it's viable to give up destructive updates. >> Giving up pointers is a far more massive restriction. > > Oddly, I feel the opposite. While it's true there are many domains > for which purely functional programming is a fine

Re: python logging module problem

2006-07-14 Thread Peter Otten
Ritesh Raj Sarraf wrote: > Vinay Sajip wrote: >> It's usual to rely on logger levels and to set handler levels for >> additional refinement of what goes to a particular handler's >> destination. > The problem is that for StreamHandler, logging module logs to > sys.stderr. > I want to use the lo

Re: attaching debugger to runinng python program

2006-07-14 Thread alf
Bill Pursell wrote: > Now, in another shell, > % gdb > (gdb) attach 54321 > Thx for the reply. But I wish to debug the python program, not python interpreter itself. -- http://mail.python.org/mailman/listinfo/python-list

Re: Chunking sequential values in a list

2006-07-14 Thread Gerard Flanagan
David Hirschfield wrote: > I have this function: > > def sequentialChunks(l, stride=1): > chunks = [] > chunk = [] > for i,v in enumerate(l[:-1]): > v2 = l[i+1] > if v2-v == stride: > if not chunk: > chunk.append(v) > chunk.append

Re: python logging module problem

2006-07-14 Thread Ritesh Raj Sarraf
Peter Otten wrote: > You can achieve the desired behaviour by adding a custom Filter: > > import sys > import logging > > logger = logging.getLogger("my_app") > logger.setLevel(logging.DEBUG) > > class LevelFilter(logging.Filter): > def __init__(self, level): > self.level = level >

Re: Chunking sequential values in a list

2006-07-14 Thread Peter Otten
[EMAIL PROTECTED] wrote: > If you want something less easy to understand, you can try fixing the > following code that doesn't work: > > from itertools import groupby > l = [1,2,3,5,6,8,12] > keyf = lambda (pos,x): x-l[pos]>1 > [[el[1] for el in gr] for he,gr in groupby(enumerate(l[:-1]), keyf)]

look for a module without import it

2006-07-14 Thread Michele Petrazzo
Hi list, I have to know if a module are present on the system, but I don't want to import it. Only know if it is present. I think that a loop on the site-packages directory can do the work, but is there another solution? Thanks, Michele -- http://mail.python.org/mailman/listinfo/python-list

Re: look for a module without import it

2006-07-14 Thread Fredrik Lundh
Michele Petrazzo wrote: > I have to know if a module are present on the system, but I don't want > to import it. Only know if it is present. > > I think that a loop on the site-packages directory can do the work, but > is there another solution? > more module.py print "I'M MODULE!" > python >>>

Re: Chunking sequential values in a list

2006-07-14 Thread bearophileHUGS
Peter Otten: > which is almost identical to the last example in > http://docs.python.org/lib/itertools-example.html I see, thank you. I haven't had enoug time and brain to fix it (and the OP question seemed like homework, so leaving some other things to do is positive). I think still that too muc

Re: look for a module without import it

2006-07-14 Thread Michele Petrazzo
Fredrik Lundh wrote: >> more module.py > print "I'M MODULE!" > >> python import imp imp.find_module("os") It was! Michele -- http://mail.python.org/mailman/listinfo/python-list

Re: Python strings outside the 128 range

2006-07-14 Thread Diez B. Roggisch
Gerhard Fiedler schrieb: > On 2006-07-13 12:04:58, Richard Brodie wrote: > >>> s = "é" >>> print s > >>> Is there a standard way to do this? >> Use Unicode strings, with an explicit encoding. Say no to ISO-8859-1 >> centrism. >> See: http://www.amk.ca/python/howto/unicode particularly the >>

Re: EuroPython 2006 and Py3.0

2006-07-14 Thread Steve Holden
[EMAIL PROTECTED] wrote: > Kay Schluehr: > >>there is nothing really new or interesting or challenging. >>Micro-optimizations and shape lifting. > > > I see. Maybe Python is becoming a commodity used by more than 10e6 > persons, so changellenges aren't much fit anymore. > Guido has tried to avoi

Re: How can get button's name when cursor move over the button on a web page?

2006-07-14 Thread Steve Holden
Fredrik Lundh wrote: > 尹祥龙 wrote: > > >>How can get button's name when cursor move over the button on a web page? > > > that sounds like a JavaScript question, doesn't it? so what is it doing > on comp.lang.python ? > > > Questions nowadays have no idea which groups they belong to. When *I

Letting a Python application phone home

2006-07-14 Thread Dieter Vanderelst
Hi,I'm working on an educational Python application that collects data about a large group of people (Of course, with the full consent of the students).The application should run on the PC of the participant and send the collected data back home to the server. Furthermore, it is also necessary that

Re: rare error with python at execution

2006-07-14 Thread Steve Holden
Fredrik Lundh wrote: > Luis Morales wrote: > > >>But now I get this error everytime I run a script and I have no idea. It can >>be a simple print 'hello' that it wont work >> >>This is the error I get >> >>'import site' failed; use -v for traceback >> >>Traceback (most recent call last): >> >> Fi

Re: Byte array question

2006-07-14 Thread Dan Winsor
Marc 'BlackJack' Rintsch wrote: > In the Java snippet from your initial post the `chararray` argument was an > *array* of `Byte` arrays. A string is just an one dimensional "byte > array". Maybe it helps if you put `chararray` into a list!? Yup, thanks, that was one that I did try with no impro

Re: Newbie

2006-07-14 Thread [EMAIL PROTECTED]
Stéphane ROCHOY wrote: > Gueorgui Vaskes wrote: > > Could anyone feel me in what do you mostly use python for? > > > > > > > > ___ > > The all-new Yahoo! Mail goes wherever you go - free your email address from > > your Internet provider. ht

imaplib question

2006-07-14 Thread Laszlo Nagy
Hello, I'm trying to write a very simple program that moves all messages from INBOX into another folder. I'm not sure what am I doing wrong. This is a very simple task. I believe I need to call these methods: - search -> get all message UIDs in the INBOX - copy -> copy all messages to anothe

Re: EuroPython 2006 and Py3.0

2006-07-14 Thread Antoon Pardon
On 2006-07-05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Kay Schluehr: >> there is nothing really new or interesting or challenging. >> Micro-optimizations and shape lifting. > > I see. Maybe Python is becoming a commodity used by more than 10e6 > persons, so changellenges aren't much fit anym

Re: Byte array question

2006-07-14 Thread Dan Winsor
John Machin wrote: > On 14/07/2006 10:41 AM, Dan Winsor wrote: > > Sybren Stuvel wrote: > >> Dan Winsor enlightened us with: > >>> This one "works" in that it runs, but the server on the other end gets > >>> garbage unrelated to the test file. > >> Are you sure it is garbage? Have you tried changi

Re: Python strings outside the 128 range

2006-07-14 Thread Diez B. Roggisch
Sybren Stuvel schrieb: > Diez B. Roggisch enlightened us with: >> Of course not. AFAIK there is no way figuring out which encoding the >> target console supports. The best you can do is to offer an option >> that allwos selection of the output encoding. > > You can use the LANG environment variabl

undefined SW_MAXIMIZE for ShowWindow function

2006-07-14 Thread Etayki
Hi! I'm trying to maximize a IE window. I have a handler and I'm trying to call ShowWindow to maximize it: ie = Dispatch('InternetExplorer.Application') handler = ie.HWND ie.Visible = 1 win32gui.ShowWindow(handler, SW_MAXIMIZE) But then I get this error: 'SW_MAXIMIZE' is not defined The functio

Re: undefined SW_MAXIMIZE for ShowWindow function

2006-07-14 Thread Richie Hindle
[Etayki] > How do I get SW_MAXIMIZE to be defined? It's in win32con. Like this: >>> from win32con import * >>> SW_MAXIMIZE 3 -- Richie Hindle [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: undefined SW_MAXIMIZE for ShowWindow function

2006-07-14 Thread Etayki
OK, so it it turns out, the window will maximize when SW_MAXIMIZE =3. But where can I find some documentation for that? Etayki wrote: > Hi! > > I'm trying to maximize a IE window. I have a handler and I'm trying to > call ShowWindow to maximize it: > > ie = Dispatch('InternetExplorer.Application')

Re: undefined SW_MAXIMIZE for ShowWindow function

2006-07-14 Thread Fredrik Lundh
"Etayki" <[EMAIL PROTECTED]> wrote: > I'm trying to maximize a IE window. I have a handler and I'm trying to > call ShowWindow to maximize it: > > ie = Dispatch('InternetExplorer.Application') > handler = ie.HWND > ie.Visible = 1 > win32gui.ShowWindow(handler, SW_MAXIMIZE) > > But then I get this

Re: undefined SW_MAXIMIZE for ShowWindow function

2006-07-14 Thread Fredrik Lundh
>> How do I get SW_MAXIMIZE to be defined? > > by grepping through the Windows header files to see what the corresponding > value is, and using that value to set a Python variable in your script oops. thought you were using ctypes, not the pythonwin extensions. see richie's reply for pythonwin

Re: undefined SW_MAXIMIZE for ShowWindow function

2006-07-14 Thread Richie Hindle
[Etayki] > OK, so it it turns out, the window will maximize when SW_MAXIMIZE =3. > But where can I find some documentation for that? ShowWindow is a Win32 API call, so Googling within msdn.microsoft.com will usually get you straight to the relevant documentation: http://www.google.com/search?q=S

Re: undefined SW_MAXIMIZE for ShowWindow function

2006-07-14 Thread Richie Hindle
[Fredrik] > oops. thought you were using ctypes, not the pythonwin extensions. Even when I'm using ctypes I use win32con for the constants, unless there's some special reason why I need the code to be independent of pywin32. -- Richie Hindle [EMAIL PROTECTED] -- http://mail.python.org/mailman

Re: imaplib question

2006-07-14 Thread Laszlo Nagy
Laszlo Nagy írta: > Hello, > > I'm trying to write a very simple program that moves all messages from > INBOX into another folder. > I'm not sure what am I doing wrong. This is a very simple task. I > believe I need to call these methods: > > - search -> get all message UIDs in the INBOX > - co

Re: Tix.Grid patch

2006-07-14 Thread klappnase
Fredrik Lundh schrieb: > > if you'd spent enough time clicking around on python.org, you might have ended > up on this page: > > http://sourceforge.net/tracker/?group_id=5470&atid=305470 > > (it's not obvious how to get there, so it's probably easiest if you just > click on the > above link ;

Re: wxPython Grid Cell change question

2006-07-14 Thread Kiran
Never mind, I used 2 different binds for the 2 different situations and it worked. thanks for looking anyhow. -- Kiran Kiran wrote: > Hello All, > I created a grid, where I register events every time the user changes > an existing value inside the grid control. Right now, I am using the > event:

Re: Python strings outside the 128 range

2006-07-14 Thread Gerhard Fiedler
On 2006-07-14 10:52:22, Diez B. Roggisch wrote: Will print take care of encoding translation according to the encoding used in the target console? >>> >>> Of course not. AFAIK there is no way figuring out which encoding the >>> target console supports. The best you can do is to offer an

Tix Tree open/close issue

2006-07-14 Thread Sorin Schwimmer
It works. Thanks Rob. Sorin __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -- http://mail.python.org/mailman/listinfo/python-list

Widestudio Users?

2006-07-14 Thread gregarican
Just curious if anyone out there uses Python programming in the Widestudio (http://www.widestudio.org) GUI IDE toolkit. I have looked into it when running into some portability limitations trying certain GUI tookits for Ruby, but couldn't get immersed into Widestudio. Since I use Python as well I w

Re: Python strings outside the 128 range

2006-07-14 Thread Fredrik Lundh
Gerhard Fiedler wrote: > Anyway, it seems that anything non-ASCII is a bit problematic and needs > "manual" handling of the runtime environment encoding. Seems a bit odd, > given the worldwide distribution of Python... I would have thought that > such a rather basic task like printing an accented

Re: EuroPython 2006 and Py3.0

2006-07-14 Thread Lawrence Oluyede
Antoon Pardon <[EMAIL PROTECTED]> wrote: > These are just some ideas. Whether they fit into python or not I will > leave to the developers. I'm not a Python pro. but: > 1) Literal slices, in a sense we already have these, but they are >limited to indexing. You can't do something like fun(::)

Re: EuroPython 2006 and Py3.0

2006-07-14 Thread bearophileHUGS
Steve Holden: > The real problems with the Py3k list seem to be associated with a number > of people who, despite having had little apparent connection to the > language until now, have joined the list and started making > inappropriate suggestions, which then have to be (patiently) rejected. This

Re: attaching debugger to runinng python program

2006-07-14 Thread olsongt
alf wrote: > Bill Pursell wrote: > > Now, in another shell, > > % gdb > > (gdb) attach 54321 > > > > Thx for the reply. But I wish to debug the python program, not python > interpreter itself. I haven't used this, but it looks like it's worth a try: http://hapdebugger.sourceforge.net/ -- http:

Re: What is a type error?

2006-07-14 Thread Marshall
Joachim Durchholz wrote: > Marshall schrieb: > > What about my example of SQL? Mutation, no pointers, no aliasing. > > Yet: useful. > > Sorry, but SQL does have aliasing. Well. I suppose we do not have an agreed upon definition of aliasing, so it is hard to evaluate either way. I would propose usi

Re: How to start more than one process at the same time?

2006-07-14 Thread dbandler
Have you considered a multi-threaded solution? The following websites offer reasonable examples: http://en.wikibooks.org/wiki/Programming:Python/Threading http://www.wellho.net/solutions/python-python-threads-a-first-example.html -Derek Dirk Hagemann wrote: > Hi! > > How can I start several job

Re: What is a type error?

2006-07-14 Thread Marshall
Andreas Rossberg wrote: > Marshall wrote: > > > > After all, what are the alternatives? Purely-functional > > languages remove themselves from a large class of > > problems that I consider important: data management. > > Maybe, but I have yet to see how second-class variables are really more > adeq

Weird platform dependent error: Using pty.fork()

2006-07-14 Thread spacelabstudio
Hi, I'm observing some weird behavior and have written the following test program to demonstrate. This works under cygwin/WinXP but not Gentoo(kernel 2.6): huh.py --- import pty,os,sys # Fork ( pid, fd ) = pty.fork() if pid == 0: # Child thread pr

Re: What is a type error?

2006-07-14 Thread Marshall
Joachim Durchholz wrote: > Marshall schrieb: > > void foo() { > > int i = 0; > > int j = 0; > > j = 1; > > i = 2; > > // check value of j here. It is still 1, no matter what you filled > > // in above. > > // The assignment to i cannot be made to affect the value of j. > > } > > > >

wxPython Grid XY Coordinates question

2006-07-14 Thread Kiran
Hello All, I am writing an app in wxPython using a grid. I need to be able to recognize what cell in the grid the user is hovering over with the mouse. How to do this? I tried XYToCell(x, y), but that doesnt work properly because it thinks that mouse position (0, 0) is the first cell in the g

ie.ExecWB(40004, 2, 0, 0)

2006-07-14 Thread Etayki
Thanks for the previous response. Now I want to do something similar: ie.ExecWB(IDM_SELECTALL, OLECMDEXECOPT_DONTPROMPTUSER) However, I don't have the values for the above constants either, and I don't know how to import them. Any ideas? -- http://mail.python.org/mailman/listinfo/python-list

Re: What is a type error?

2006-07-14 Thread Marshall
Joachim Durchholz wrote: > > You can have aliasing without pointers; e.g. arrays are fully sufficient. > If i = j, then a [i] and a [j] are aliases of the same object. I am having a hard time with this very broad definition of aliasing. Would we also say that a[1+1] and a[2] are aliases? It seems

Re: searching for strings (in a tuple) in a string

2006-07-14 Thread Simon Forman
Simon Forman wrote: ... > I usually use this with assert statements when I need to check a > sequence. Rather than: > > for something in something_else: assert expression > > I say > > assert False not in (expression for something in something_else) > > This way the whole assert statement will be r

Re: imaplib question - answering my own question

2006-07-14 Thread Laszlo Nagy
Laszlo Nagy írta: > Laszlo Nagy írta: > >> Hello, >> >> I'm trying to write a very simple program that moves all messages from >> INBOX into another folder. >> I'm not sure what am I doing wrong. This is a very simple task. I >> believe I need to call these methods: >> >> - search -> get all

{} for set notation

2006-07-14 Thread Nick Vatamaniuc
I really like the set notation idea. Now that sets are first class "citizens" along with dicts, lists and tuples I think they should be used when it makes sense to use them A keyset of a dictionary should be viewed as a set not a list because it is a key_set_ after all. Also sets should get back th

having a problem with an instance of a method.

2006-07-14 Thread john . mcginnis
I wanted to dig a little deeper understanding of Classes, Methods and Instances. However I get this - ' AClassA instance has no attribute' as an error when I call the method I am using as a learning tool. Here's the code, from hammer.py -

time.clock()

2006-07-14 Thread Tobiah
The manual says: On Unix, return the current processor time as a floating point number expressed in seconds. So I ran this program: #!/usr/bin/python import time while 1: print time.clock() This gave me a stream of floats, the integer part of which only updated abou

Re: ie.ExecWB(40004, 2, 0, 0)

2006-07-14 Thread Fredrik Lundh
Etayki wrote: > Thanks for the previous response. Now I want to do something similar: > > ie.ExecWB(IDM_SELECTALL, OLECMDEXECOPT_DONTPROMPTUSER) > > However, I don't have the values for the above constants either, and I > don't know how to import them. Any ideas? hint: google often picks up sou

Re: How to start more than one process at the same time?

2006-07-14 Thread utabintarbo
Look into the subprocess module. Possibly relevant link follows: http://docs.python.org/lib/node244.html -- http://mail.python.org/mailman/listinfo/python-list

Re: EuroPython 2006 and Py3.0

2006-07-14 Thread Nick Vatamaniuc
> The real problems with the Py3k list seem to be associated with a number > of people who, despite having had little apparent connection to the > language until now, have joined the list and started making > inappropriate suggestions, which then have to be (patiently) rejected. Steve, What does

Re: {} for set notation

2006-07-14 Thread tac-tics
Nick Vatamaniuc wrote: > I really like the set notation idea. Now that sets are first class > "citizens" along with dicts, lists and tuples I think they should be > used when it makes sense to use them In actual usage, though, how often is it strictly required one uses a set over a list? It is sim

Re: EuroPython 2006 and Py3.0

2006-07-14 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > This attitude may have some downsides. The Python developers don't know > everything, other people can have some experience of computer languages > too. "some experience of computer languages" != "experience of language design and implementation" as long as most of th

Re: time.clock()

2006-07-14 Thread El Duderino
Tobiah wrote: > Am I barking up the wrong tree? I don't think so, time.clock() has always worked fine for me. You can also try time.time(). It is not as precise, but it might be sufficient for your needs. -- http://mail.python.org/mailman/listinfo/python-list

Re: time.clock()

2006-07-14 Thread Benjamin Niemann
Tobiah wrote: > The manual says: > > On Unix, return the current processor time as a > floating point number expressed in seconds. > > So I ran this program: > > #!/usr/bin/python > > import time > > while 1: > print time.clock() > > > > This gave me a stream of floats, the integer

Re: time.clock()

2006-07-14 Thread Fredrik Lundh
Tobiah wrote: > import time > > while 1: > print time.clock() > > This gave me a stream of floats, the integer part of which > only updated about every three seconds. Now, the manual > also states: > > The precision, and in fact the very definition of the meaning > of ``pr

Re: EuroPython 2006 and Py3.0

2006-07-14 Thread A.M. Kuchling
On Fri, 14 Jul 2006 18:45:07 +0200, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > >> This attitude may have some downsides. The Python developers don't know >> everything, other people can have some experience of computer languages >> too. > > "some experience of

Re: What is a type error?

2006-07-14 Thread rossberg
Marshall wrote: > Andreas Rossberg wrote: > > > > And note that even with second-class state you can still have aliasing > > issues - you just need mutable arrays and pass around indices. Keys in > > databases are a more general form of the same problem. > > So for array a, you would claim that "a[

Python for Embedded Systems?

2006-07-14 Thread Jack
Is there a Python packaging that is specifically for embedded systems? ie, very small and configurable so the user gets to select what modules to install? For Linux-based embedded systems in particular? I'm thinking of running it on the Linksys's Linux-based open source router WRT54G. It has 4MB

activestate vs enpython

2006-07-14 Thread mclaugb
does anyone know if the activestate distribution has all of the numpy, numarray, matplotlib, scipy, and scientific python? their website does not say what it includes. -- http://mail.python.org/mailman/listinfo/python-list

Re: What is a type error?

2006-07-14 Thread Darren New
Andreas Rossberg wrote: > OK, this is interesting. I don't know Hermes, is this sort of like a > dynamically checked equivalent of linear or uniqueness typing? I'm not sure what linear or uniqueness typing is. It's typestate, and if I remember correctly the papers I read 10 years ago, the folks

Re: activestate vs enpython

2006-07-14 Thread Fredrik Lundh
mclaugb wrote: > does anyone know if the activestate distribution has all of the numpy, > numarray, matplotlib, scipy, and scientific python? their website does not > say what it includes. http://www.activestate.com/Products/ActivePython/more_information.plex -- http://mail.python.org/mail

Re: time.clock()

2006-07-14 Thread Grant Edwards
On 2006-07-14, Tobiah <[EMAIL PROTECTED]> wrote: > So I "man 3 clock" and notice: > > The value returned is the CPU time used so far as a clock_t; to get > the number >of seconds used, divide by CLOCKS_PER_SEC. > > So, I'm wondering how to get that value from python. What valu

Re: Python for Embedded Systems?

2006-07-14 Thread Grant Edwards
On 2006-07-14, Jack <[EMAIL PROTECTED]> wrote: > Is there a Python packaging that is specifically for > embedded systems? ie, very small and configurable so the > user gets to select what modules to install? > > For Linux-based embedded systems in particular? > > I'm thinking of running it on the L

Re: EuroPython 2006 and Py3.0

2006-07-14 Thread Antoon Pardon
On 2006-07-14, Lawrence Oluyede <[EMAIL PROTECTED]> wrote: > Antoon Pardon <[EMAIL PROTECTED]> wrote: > >> These are just some ideas. Whether they fit into python or not I will >> leave to the developers. > > I'm not a Python pro. but: > >> 1) Literal slices, in a sense we already have these, but t

printing raw postscript data on windows

2006-07-14 Thread Uwe Schmitt
Hi, I am trying to print raw postscript data on windows. win32print should do the work like this: h=win32print.OpenPrinter(name) win32print.StartDocPrinter(h, 1, ("", "", "RAW")) win32print.WritePrinter(h, file("p.ps").read()) win32print.EndDocPrinter(h) win32print.ClosePrinter(h)

Re: activestate vs enpython

2006-07-14 Thread mclaugb
Um, i didnt see at the "more information" link whether "numpy, numarray, matplotlib, scipy, and scientific python" was included . "Fredrik Lundh" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > mclaugb wrote: > >> does anyone know if the activestate distribution has all of the numpy

Re: Python for Embedded Systems?

2006-07-14 Thread Carl J. Van Arsdall
Grant Edwards wrote: > On 2006-07-14, Jack <[EMAIL PROTECTED]> wrote: > >> Is there a Python packaging that is specifically for >> embedded systems? ie, very small and configurable so the >> user gets to select what modules to install? >> >> For Linux-based embedded systems in particular? >> >>

Re: {} for set notation

2006-07-14 Thread Nick Vatamaniuc
tic-tacs, But how often does one use a list or a tuple when a set is actually more meaningful? -- Probably more than expected, because traditionally comming from C and in the older Python versions there were no sets. A prime example are the keys of the dictionary. They are a _set_ not a list. If

  1   2   >