> > Or more compactly:
> >
> > words = [Word(w) for w in 'this is probably what you want'.split()]
> > print words
>
> I didn't want to introduce yet some more "confusing" stuff !-)
Indeed, the for loop is perfectly fine and totally readable. Let's save
the "confusing stuff" to the Perl folks.
-
Thank you. It works :-)
P
Rob Williscroft wrote:
> Ok I see, you will probably need these 2 bits of the ctypes
> documentation:
>
> http://docs.python.org/lib/ctypes-structures-unions.html
> http://docs.python.org/lib/ctypes-pointers.html
>
> From there on geting to this is farly straight fo
Yes, thank you.
I found the function SetLocalTime or SetSystemTime to set the time from
MSDN http://msdn2.microsoft.com/en-us/library/ms724942.aspx. I am
having trouble passing parameter to the functions in Python.
Rob Williscroft wrote:
>
> Google will usually find the documentation of anything
I am trying to set the system time on my Windows computer, but avoid
using the DOS command (date, time).
Does anyone know what parameter to pass to function SetLocalTime?
CSharp ref
http://groups.google.com/group/microsoft.public.dotnet.languages.csharp/browse_thread/thread/813b4ef504f77a43/24fc3
Gabriel Genellina wrote:
> os.spawnl(os.P_NOWAIT, 'mycmd.exe', 'mycmd.exe', 'first_arg', 'second_arg')
> That is, you must provide explicitely the value for argv[0] (executable)
> Remember to quote appropiately any parameter with embedded spaces
> (including the executable). On Python 2.5 you coul
Some update...
I just found out that the following seems to work,
import subprocess
subprocess.Popen(' myargs', executable='mycmd.exe')
However, it does not work with "my path\\mycmd.exe"
subprocess.Popen(' myargs', executable='"my path\\mycmd.exe"') # error
--
http://mail.python.org/mailman/
Hi,
I am using Python 2.4.4 on Windows XP SP2.
I am trying to start a process (infinite loop application) in the
background and I've tried several options and none of them seem to
work.
Any help would be much appreciated.
Thanks,
P
1.
# This works on PythonWin interactive window, but the pytho
> > As I recall, ActiveState doesn't distribute the SSL package that the
> > python.org package contains. But... It is possible to copy the SSL
> > related files from a python.org package into the ActiveState
> > installation.
>
Are there any instructions on doing this? My Python installation
Thanks for the reply.
>
> Most folk would seem to be using pyExcelerator rather than pyXLWriter.
> It is much more up to date, it just hasn't been worked on for a year,
I will give it a shot.
> 1. Python COM interface (part of
> http://sourceforge.net/projects/pywin32/) with lots of users (and h
As far as I know, there is pyXLWriter for writing and xlrd for reading.
Is there such thing so that one can open an Excel file into memory and
read/update any sheet/cell on the fly. One analogy to this is the
ConfigParser module.
Any info would be much appreciated.
--
http://mail.python.org/mail
Thanks for the help. I've figured it out. BTW, DLL_API is defined as
#ifdef MYDLL_EXPORTS
#define DLL_API __declspec(dllexport)
#else
#define DLL_API __declspec(dllimport)
#endif
size = c_int()
data = c_char_p('\0' * 8)
mydll = cdll.mydll # Use cdll instead of windll to avoid warnings
status = m
Hi,
I have a C function in the dll does the following:
DLL_API int dll_foo(char **data, size_t *size)
{
strcpy(*data, "hello");
*size = strlen(*data);
return 0;
}
So I would call the function as such,
char data[8];
size_t size;
int status = dll_foo(&data, &size);
I have tried th
Thanks for replying.
I need to pass some external values to the test cases because I want to
run the same tests in different environments such as lab/instrument
setup.
Regards,
Podi
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
Newbie question about unittest. I am having trouble passing a variable
to a test class object.
MyCase class will potentially have many test functions.
Any help would be much appreciated.
Thanks,
P
# File MyCase.py
import unittest
class MyCase(unittest.TestCase):
def __init__(self, val
Alright, pythoneers, here is what I have found from
http://wiki.wxpython.org/index.cgi/CreatingStandaloneExecutables. This
is much easier than the py2exe + nullsoft combo :)
Cheers!
The mcillian installer development is discontinued.
mirror:
http://davidf.sjsoft.com/mirrors/mcmillan-inc/installe
Alright, pythoneers, here is what I have found from
http://wiki.wxpython.org/index.cgi/CreatingStandaloneExecutables. This
is much easier than the py2exe + nullsoft combo :)
Cheers!
The mcillian installer development is discontinued.
mirror:
http://davidf.sjsoft.com/mirrors/mcmillan-inc/installe
I followed the instructions from
http://starship.python.net/crew/theller/moin.cgi/SingleFileExecutable
Copied the second setup.nsi, setup.py, single.py and everything works
like a
champ.
I then replaced "single.exe" by "hello.exe" in setup.nsi. Created
hello.py as
follows:
#! python
def main():
> Have you tried calling InitiateSystemShutdownA mentioned in the
> documentation?
Thanks! This function exists. However,
advapi32.InitiateSystemShutdownA("", 'This is a test', 30, 1, 1)
returns 0 though. I will need to play with it a bit more...
--
http://mail.python.org/mailman/listinfo/python
For tutorial in Windows, I think it is better to use the more
user-friendly interpreter from
http://activestate.com/store/languages/register.plex?id=ActivePython.
Advise the user to just click on the "Next" button without submitting
the optional contact information.
My $0.02
--
http://mail.pytho
I have ctypes version 0.9.6 and Python 2.4.2 running on Windows XP
Professional.
When I tried to use some functions in the Advapi32.dll, some functions
are available and some are not. Is this a bug or feature by design?
In the example below, I am trying to examine the
'InitiateSystemShutdown' fun
Thanks for all the suggestions. Now the wheel comes with bells and
whistles ;)
--
http://mail.python.org/mailman/listinfo/python-list
OK, please don't bother. Here is my wheel :-)
import os
import shutil
def CopyFlat(source, target):
count = 0
for root, dirs, files in os.walk(source):
for file in files:
count += 1
name = root + '\\' + file
print '%04d Copying' % count, name,
Hi,
I am trying to copy all files under a directory tree to a single
directory (in Windows). I can well write the script myself, but was
wonder if anyone has done it so I won't be reinventing the wheel.
Thanks in advance.
Requirement:
# Source file set
source\file1.txt
source\file2.doc
source\d
23 matches
Mail list logo