"Marc 'BlackJack' Rintsch" <[EMAIL PROTECTED]> wrote:
> On Fri, 06 Jul 2007 08:34:55 +0200, Hendrik van Rooyen wrote:
>
> > You can even do it more simply - by writing a GetField() that
> > scans for either the delimiter or end of line or end of file, and
> > returns the "field" found, along wit
What is the generic operating system way of getting the home directory ?
I am guessing it is os.path.expanduser("~"). Is there a better way or an
alternate way ?
If it is as I surmise, the aforementioned expanduser("~") of os.path
seems incorrect to me under Windows. The document says:
"On Win
Dennis Lee Bieber <[EMAIL PROTECTED]> wrote:
...
> Think VMS was the most applicable for that behavior... Haven't seen
> any dynamic priorities on the UNIX/Linux/Solaris systems I've
> encountered...
Dynamic priority scheduling is extremely common in Unixen today (and has
been for many ye
On Fri, 06 Jul 2007 17:31:50 +, DeveloperX wrote:
> Python Attempt: Please note that since I can't type TABs online
> easily, I am using the @ character to represent TABs in the following
> Python code.
Why not indent with spaces, just like you did for the example C code?
--
Steven.
--
On Jul 7, 9:26 am, Robert Dailey <[EMAIL PROTECTED]> wrote:
> On Jul 6, 3:06 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
>
>
>
> > Robert Dailey schrieb:
>
> > > Hi,
>
> > > I'm interested in making a C++ library of mine usable through python.
> > > Python does a similar thing with Expat (the
Jonathan Shan wrote:
Hello,
I am trying to call a function every 5 seconds. My understanding of
time.sleep() is during the sleep time everything "stops". However, in
my application, there are background processes that must be running
continuously during the five second interval. Thus, threading.
On Jul 7, 7:37 am, Robert Dailey <[EMAIL PROTECTED]> wrote:
> On Jul 6, 4:04 pm, Bjoern Schliessmann
>
>
> [EMAIL PROTECTED]> wrote:
> > Robert Dailey wrote:
> > > The description of -m is confusing in the documentation, what does
> > > it really do?
>
> > IMHO, it's quite clear. What's unclear wi
hmm.. why use while True? After 5 secs, the function is going to run. so
t = threading.Thread(5.0, func)
t.start()
should just work. Put it in a infinite loop will start the thread and
then start a the stopped thread... forever.
Jim
On Jul 6, 2007, at 2:40 PM, Jonathan Shan wrote:
> Hello,
Jean-Paul Calderone wrote:
> On Fri, 06 Jul 2007 15:43:55 -, Robert Dailey <[EMAIL PROTECTED]> wrote:
>> Hi,
>>
>> I am interested in creating an expandable (dynamic) 2D dictionary. For
>> example:
>>
>> myvar["cat"]["paw"] = "Some String"
>>
>> The above example assumes "myvar" is declared. In
On Jul 6, 3:06 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> Robert Dailey schrieb:
>
> > Hi,
>
> > I'm interested in making a C++ library of mine usable through python.
> > Python does a similar thing with Expat (the non-validating XML
> > parser). I notice that with Expat, python is importi
On Fri, 06 Jul 2007 14:40:16 -0700, Jonathan Shan wrote:
> I am trying to call a function every 5 seconds. My understanding of
> time.sleep() is during the sleep time everything "stops".
Not "everything", just the thread in which `sleep()` is called.
> However, in my application, there are backg
In article <[EMAIL PROTECTED]>,
Kirk Strauser <[EMAIL PROTECTED]> wrote:
> I was thinking about how a lot of Lisp proponents claim that Lisp is
> inherently parallelizable because its functions don't have (or are not
> supposed to have) side effects, and therefore the compiler can easily tell
> w
Hello,
I am trying to call a function every 5 seconds. My understanding of
time.sleep() is during the sleep time everything "stops". However, in
my application, there are background processes that must be running
continuously during the five second interval. Thus, threading.Timer
seems like a good
On Jul 6, 4:04 pm, Bjoern Schliessmann wrote:
> Robert Dailey wrote:
> > The description of -m is confusing in the documentation, what does
> > it really do?
>
> IMHO, it's quite clear. What's unclear with this description:
>
> -m module-nameSearches sys.path for the named module and runs
>
Robert Dailey wrote:
> The description of -m is confusing in the documentation, what does
> it really do?
IMHO, it's quite clear. What's unclear with this description:
-m module-nameSearches sys.path for the named module and runs
the corresponding .py file as a script.
Reg
Sample email
Dear __,
I recently joined AGLOCO because of a friend recommended it to me. I
am now promoting it to you because I like the idea and I want you to
share in what I think will be an exciting new Internet concept.
AGLOCO's story is simple:
Do you realize how valuable you are?
On 7/6/07, Ed Jensen <[EMAIL PROTECTED]> wrote:
Alex Martelli <[EMAIL PROTECTED]> wrote:
> Calling all vi/vim users (and we'll heartily appreciate the support of
> TextMate fans, BBEdit ones, etc, etc) -- we're at risk being defined out
> of existence, since we're neither happy with Emacs nor wa
Alex Martelli <[EMAIL PROTECTED]> wrote:
> Calling all vi/vim users (and we'll heartily appreciate the support of
> TextMate fans, BBEdit ones, etc, etc) -- we're at risk being defined out
> of existence, since we're neither happy with Emacs nor wanting anything
> like Visual Studio, and yet Kay cl
"Chris Mellon" <[EMAIL PROTECTED]> writes:
> Sure, but thats part of the general refcounting vs GC argument -
> refcounting gives (a certain level of) timeliness in resource
> collection, GC often only runs under memory pressure. If you're
> saying that we should keep refcounting because it provid
On Jul 3, 8:56 am, Sebastian Wiesner <[EMAIL PROTECTED]> wrote:
> [ Benjamin <[EMAIL PROTECTED]> ]
>
> > On Jul 2, 9:47 pm, Justin Ezequiel <[EMAIL PROTECTED]>
>
> > wrote:
> > > On Jul 3, 9:40 am, Benjamin <[EMAIL PROTECTED]> wrote:
> > > > How does one get the path to the file currently executing
Robert Dailey schrieb:
> Hi,
>
> I'm interested in making a C++ library of mine usable through python.
> Python does a similar thing with Expat (the non-validating XML
> parser). I notice that with Expat, python is importing a C++ header
> file into a PY file and the interface is available to pyth
Kirk Strauser wrote:
> I was thinking about how a lot of Lisp proponents claim that Lisp is
> inherently parallelizable because its functions don't have (or are not
> supposed to have) side effects, and therefore the compiler can easily tell
> which calls may be run in parallel instead of strictly
Never mind, I found the problem. I was doing:
python -m compile.py
I really should have been doing:
python compile.py
The description of -m is confusing in the documentation, what does it
really do?
--
http://mail.python.org/mailman/listinfo/python-list
I created a basic python file and made an attempt to execute it from
the command line, however it gives me a weird error after the python
file has been executed:
Traceback (most recent call last):
File "C:\Python25\lib\runpy.py", line 87, in run_module
raise ImportError("No module named " +
Hi,
I'm interested in making a C++ library of mine usable through python.
Python does a similar thing with Expat (the non-validating XML
parser). I notice that with Expat, python is importing a C++ header
file into a PY file and the interface is available to python. I've
read through the python do
"Méta-MCI" <[EMAIL PROTECTED]> writes:
[...]
> And, all COM-servers builds with Python are dynamic-COM-server.
Not true. Look for "comtypes" on this page:
http://python.net/crew/theller/ctypes/
[...]
> about Iron Python: is there a good IDE for it that has a typing assist?
MS calls this "typin
"O.R.Senthil Kumaran" <[EMAIL PROTECTED]> writes:
> Hi,
> There is an Open Tracker item against urllib2 library python.org/sf/735515
> which states that.
> urllib / urllib2 should cache the results of 301 (permanent) redirections.
> This shouldn't break anything, since it's just an internal optimi
Final update: problem solved. In the big script, the snippet was
reading depstats.txt which hadn't been closed.
Sorry for all the bother.
Gerry
--
http://mail.python.org/mailman/listinfo/python-list
On Jul 3, 5:00 pm, Matimus <[EMAIL PROTECTED]> wrote:
> On Jul 3, 2:27 pm, [EMAIL PROTECTED] wrote:
>
>
>
> > Hi,
>
> > I packaged up an application I am developing into an executable. In
> > the application, it has user configurable options. I would like a way
> > to restart the application so tha
Update:
The PC seems to not be a factor (same problem exist on two PCs).
The entire script does some computation and writes depstats.txt.
The code snippet below attempts to read depstats.txt and write another
file. When the code below is run stand-alone, it succeeds. When run
in-line as p
In article <[EMAIL PROTECTED]>,
Japan Shah <[EMAIL PROTECTED]> wrote:
>Hello,
>
>I am trying to connect my Nokia 6610 using usb cable,
>I have installed usb-serial driver of it.
>
>
>I hv tested it with Hyperterminal and it works fine.
>
>but when I wrote a python script I am not able to receive t
Aahz pythoncraft.com> writes:
> In article python.org>,
> =?utf-8?b?U3TDqXBoYW5l?= Larouche polymtl.ca> wrote:
> >
> >If I call the methods in the C++ modules from the Python main thread, I
> >don't have any problem. However, they are usually called from another
> >Python thread (using the thre
On Fri, 06 Jul 2007 16:22:35 +, Robert Dailey wrote:
> On Jul 6, 11:09 am, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote:
>> This gets much easier if you change your structure around a bit:
>>
>> d = {}
>> d["cat", "paw"] = "some string"
>>
>> Jean-Paul
>
> I like this format. I'm not
On Fri, 06 Jul 2007 17:31:50 +, DeveloperX wrote:
> I am trying to figure out how to rewrite the following chunk of code
> in Python:
>
> C source
> [code]
> typedef struct PF
> {
> int flags;
> long user;
> char*filename;
> unsigned char buffer[MAXBUFFERSIZE];
> } PF;
>
> typedef BL
I am trying to figure out how to rewrite the following chunk of code
in Python:
C source
[code]
typedef struct PF
{
int flags;
long user;
char*filename;
unsigned char buffer[MAXBUFFERSIZE];
} PF;
typedef BLOCK
{
PF * packdata;
} BLOCK;
BLOCK* blocks;
[/code]
My first idea was to creat
In article <[EMAIL PROTECTED]>,
Irmen de Jong <[EMAIL PROTECTED]> wrote:
>Paul Rubin wrote:
>> rtk <[EMAIL PROTECTED]> writes:
>>> FYI.. I wanted a simple version of Python to run on an ancient DEC
>>> Alpha box. I got VMS Python 2.5 up and running but it is too slow to
>>> use. It takes *minute
Python 2.5, Windows XP.
I have a 48-line text file written by a Windows python script,
I try to read it as follows:
f = open ("depstats.txt", "r", 0)
for index, line in enumerate(f):
print index, len(line), len(line.split())
f.close()
On one PC, this runs without any problem.
On an
Thank you all very much for your valuable replies. I wasn't aware that
tuples were valid keys in a dictionary object. This is actually the
solution I was looking for. Thank you all once again.
--
http://mail.python.org/mailman/listinfo/python-list
Then you can use other chars as the delimiter, [EMAIL PROTECTED]@b@ or r!a!b!,
etc... The import thing is so long as the interpreter doesn't get
confused on the data and the delimiter. sed also allows for
arbitrary delimiters too as long as you maintain the integrity of the
original meanin
On 6 jul 2007, at 17.43, Robert Dailey wrote:
> Hi,
>
> I am interested in creating an expandable (dynamic) 2D dictionary. For
> example:
>
> myvar["cat"]["paw"] = "Some String"
>
> The above example assumes "myvar" is declared. In order for this to
> work, I have to know ahead of time the conten
On Jul 6, 11:09 am, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote:
> On Fri, 06 Jul 2007 15:43:55 -, Robert Dailey <[EMAIL PROTECTED]> wrote:
> >Hi,
>
> >I am interested in creating an expandable (dynamic) 2D dictionary. For
> >example:
>
> >myvar["cat"]["paw"] = "Some String"
>
> >The above ex
I'm not sure I completely understand what you want, but if you are
using Python2.5 defaultdict might be useful. Below is some example
code using defaultdict.
[code]
from collections import defaultdict
myvar = defaultdict(dict)
myvar["cat"]["paw"] = "SomeString"
myvar["dog"]["tail"] = "wags"
myv
On Fri, 06 Jul 2007 15:43:55 -, Robert Dailey <[EMAIL PROTECTED]> wrote:
>Hi,
>
>I am interested in creating an expandable (dynamic) 2D dictionary. For
>example:
>
>myvar["cat"]["paw"] = "Some String"
>
>The above example assumes "myvar" is declared. In order for this to
>work, I have to know a
On Fri, 2007-07-06 at 15:43 +, Robert Dailey wrote:
> Hi,
>
> I am interested in creating an expandable (dynamic) 2D dictionary. For
> example:
>
> myvar["cat"]["paw"] = "Some String"
>
> The above example assumes "myvar" is declared. In order for this to
> work, I have to know ahead of time
Stefan Behnel wrote:
> Wouldn't that require parallelism in the interpreter first? Mind the
> GIL...
That may be. I'd bet though that I could whip up a native Python workalike
using os.fork() that would work around GIL, at least on Unix (just because
I don't know if Windows has os.fork(), having
On Jul 6, 10:54 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> Robert Dailey wrote:
> > Hi,
>
> > I am interested in creating an expandable (dynamic) 2D dictionary. For
> > example:
>
> > myvar["cat"]["paw"] = "Some String"
>
> > The above example assumes "myvar" is declared. In order for this
Robert Dailey wrote:
> Hi,
>
> I am interested in creating an expandable (dynamic) 2D dictionary. For
> example:
>
> myvar["cat"]["paw"] = "Some String"
>
> The above example assumes "myvar" is declared. In order for this to
> work, I have to know ahead of time the contents of the dictionary. F
Hi,
I am interested in creating an expandable (dynamic) 2D dictionary. For
example:
myvar["cat"]["paw"] = "Some String"
The above example assumes "myvar" is declared. In order for this to
work, I have to know ahead of time the contents of the dictionary. For
the above to work, my declaration mus
Kirk Strauser wrote:
> Suppose that Python had a new decorator, say "@parallelizable". Functions
> so decorated would be eligible for multi-processed or multi-threaded
> execution by such native constructs as list comprehensions, or the map()
> function.
Wouldn't that require parallelism in the i
I was thinking about how a lot of Lisp proponents claim that Lisp is
inherently parallelizable because its functions don't have (or are not
supposed to have) side effects, and therefore the compiler can easily tell
which calls may be run in parallel instead of strictly serially. I'm not a
Lisp exp
Thank you for the lead. That is exactly what I was wishing for.
Thank you,
Nik
--
http://mail.python.org/mailman/listinfo/python-list
In article <[EMAIL PROTECTED]>,
=?utf-8?b?U3TDqXBoYW5l?= Larouche <[EMAIL PROTECTED]> wrote:
>
>If I call the methods in the C++ modules from the Python main thread, I
>don't have any problem. However, they are usually called from another
>Python thread (using the threading module) to keep the GUI
On Jul 6, 12:18 am, Christoph Zwerschke <[EMAIL PROTECTED]> wrote:
> Sorry for the soliloquy, but what I am really using is the following so
> that the re-raised excpetion has the same type:
>
> def PoliteException(e):
> class PoliteException(e.__class__):
> def __init__(self, e):
>
I am currently developing a software called OpenFilters (available at
www.polymtl.ca/larfis). Most of the software is written in Python, but the
classes that do the hard work are written in C++ modules. Since, nowadays, most
new computers have multiple cores and that I want to speed up the software
nik <[EMAIL PROTECTED]> writes:
> I have a VB6 application that I would like to attach to a python
> communications application.
>
> I have come across several discussions on using VB with a Python COM
> back-end, but no starting point. I haven't had anymore luck with
> google at finding out what
Maria Sharapova Angelina joli
search engines ,
cams , adult , photogallery , dating , travel , autos, cars , real estate ,
ads , spor , shopping , domain names
www.alphasearch.gr--
http://mail.python.org/mailman/listinfo/python-list
On 6 Jul, 06:58, nik <[EMAIL PROTECTED]> wrote:
> I have a VB6 application that I would like to attach to a python
> communications application.
>
> I have come across several discussions on using VB with a Python COM
> back-end, but no starting point. I haven't had anymore luck with
> google at fi
On 2007-07-06, Neil Cerutti <[EMAIL PROTECTED]> wrote:
> On 2007-07-05, John Machin <[EMAIL PROTECTED]> wrote:
>> On Jul 6, 5:31 am, Neil Cerutti <[EMAIL PROTECTED]> wrote:
>>>
>>> Mostly you can use the default 'excel' dialect and be quite
>>> happy, since Excel is the main reason anybody still ca
On 7/5/07, Douglas Alan <[EMAIL PROTECTED]> wrote:
> "Chris Mellon" <[EMAIL PROTECTED]> writes:
>
> >> Some people here have been arguing that all code should use "with" to
> >> ensure that the files are closed. But this still wouldn't solve the
> >> problem of the large data structures being left
On 2007-07-05, John Machin <[EMAIL PROTECTED]> wrote:
> On Jul 6, 5:31 am, Neil Cerutti <[EMAIL PROTECTED]> wrote:
>>
>> Mostly you can use the default 'excel' dialect and be quite
>> happy, since Excel is the main reason anybody still cares about
>> this unecessarily hard to parse (it requires mor
On 2007-07-06, Alex Martelli <[EMAIL PROTECTED]> wrote:
> Kay Schluehr <[EMAIL PROTECTED]> wrote:
>> half of the community is happy with Emacs and the other half
>> wants to program in a VS-like environment, neither consensus
>> nor progress has
>
> Calling all vi/vim users (and we'll heartily appr
Wildemar Wildenburger wrote:
> Abhishek Jain wrote:
>> with every iteration your previous values are overwritten ('md' is a
>> dictionary) so thats why your are observing this ouput..
>>
>> check if the following patch solves your problem
>>
>> for entity in temp:
>> md['module']= ent
[EMAIL PROTECTED] wrote:
> Learn Oracle Database Administration in 10 Minutes. No kidding. Check
> it yourself,
>
> http://www.takveen.com
It already takes longer than 10 minutes to install, so I have the time to
learn more than I find in that book before I even get to using it.
Besides, this is
Learn Oracle Database Administration in 10 Minutes. No kidding. Check
it yourself,
http://www.takveen.com
Only good analogy makes complex concepts simple!
--
http://mail.python.org/mailman/listinfo/python-list
On 2007-07-06, Alex Popescu <[EMAIL PROTECTED]> wrote:
> On Jul 6, 4:20 am, Christoph Zwerschke <[EMAIL PROTECTED]> wrote:
>> Alex Popescu wrote:
>> > Probably the simplest solution would be to create a new exception and
>> > wrapping the old one and the additional info. Unfortunately, this
>> > ma
John J. Lee wrote:
>
> What do you mean "is in fact true"? Is what true? That the reason is
> always formatted in those ways when those particular errors occur?
> Not sure there's any reason to rely on that: I'd expect .reason to be
> an exception object, so (reading the docs for module socket)
Gerhard Häring wrote:
> _spitFIRE wrote:
>> [looking up DNS MX records]
>> Thanks for the pointer. However, as I said currently, I can't use
>> anything other than the standard libraries.
>
> Sure you can. You just need to get rid of the "only standard library"
> requirement rule.
>
> That works
This mailing list has been retired. Please use the new Python
Advocacy mailing list instead:
http://mail.python.org/mailman/listinfo/advocacy
Thanks!
--
http://mail.python.org/mailman/listinfo/python-list
On Fri, 06 Jul 2007 08:34:55 +0200, Hendrik van Rooyen wrote:
> "John Machin" wrote:
>
>>
>> I don't know what you mean by "requires more than one
>> character of lookahead" -- any non-Mickey-Mouse implementation of a
>> csv reader will use a finite state machine with about half-a-dozen
>> stat
On Jul 6, 4:20 am, Christoph Zwerschke <[EMAIL PROTECTED]> wrote:
> Alex Popescu wrote:
> > Probably the simplest solution would be to create a new exception and
> > wrapping the old one and the additional info. Unfortunately, this
> > may have a huge impact on 3rd party code that was catching the
On Jul 6, 4:20 am, Christoph Zwerschke <[EMAIL PROTECTED]> wrote:
> Alex Popescu wrote:
>
--
http://mail.python.org/mailman/listinfo/python-list
On Jul 6, 6:19 am, [EMAIL PROTECTED] (Alex Martelli) wrote:
> Alex Popescu <[EMAIL PROTECTED]> wrote:
>
>...
>
> > frameworks (TestNG is not a unit testing framework,
> > but a full flavored testing framework that fits perfectly functional
> > testing, integration testing, and with some of the
> root = Tk()
>
> # save call address
> original_tk_call = root.tk.call
>
> # disable tcl command execution (this is the read-only attribute)
> root.tk.call = tk_dummy_call
>
> ... some code ...
>
> # restore tcl command execution
> root.tk.call = original_tk_call
>
>
> My goal is to make ins
My code is the following:
from Tkinter import *
def tk_dummy_call(*args):
return
root = Tk()
# save call address
original_tk_call = root.tk.call
# disable tcl command execution (this is the read-only attribute)
root.tk.call = tk_dummy_call
... some code ...
# restore tcl command execution
On Jul 6, 8:27 am, Fabrizio Pollastri <[EMAIL PROTECTED]> wrote:
> Hello,
> it is possible to force in some way a write to a read-only attribute of
> a python object? In which case?
> Thanks for any answer.
>
> F. Pollastri
What do you mean by read-only attribute?
If you are trying to change attr
How about subclass datetime.tzinfo? That way you can use asttimezone
to transfer utc to localtime. It requires an aware object though not
naive. A bit more coding, but a lot less converting...
Jim
On Jul 3, 5:16 pm, Matt <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> So a lot of digging on doing this a
_spitFIRE wrote:
> [looking up DNS MX records]
> Thanks for the pointer. However, as I said currently, I can't use
> anything other than the standard libraries.
Sure you can. You just need to get rid of the "only standard library"
requirement rule.
That works best by showing the alternatives to
jolly wrote:
> Hey guys,
>
> I'm rather new to python and i'm have trouble(as usual)
>
> I want to know if it is possible to change where 'import' looks
> this will save me clogging up my python directory
>
> Thanks
>
Easily done. The value of sys.path is a list of directories that import
On 7/6/07, jolly <[EMAIL PROTECTED]> wrote:
> Hey guys,
>
> I'm rather new to python and i'm have trouble(as usual)
Hope it becomes un-usual with Python !
>
> I want to know if it is possible to change where 'import' looks
> this will save me clogging up my python directory
Yes. You can tel
79 matches
Mail list logo