On Wednesday 25 February 2009, Heracles wrote:
> addchstr((chtype*)PyString_AsString(pS))
You are effectively disabling the well-deserved warnings with the cast here.
Don't do that.
> Now the thing is that when I make calls from python like so:
>
>curses.addchstr(5,10, "@ < Row 5, Col 10")
[
Hi!
I just stumbled across something in Python 2.6 where I'm not sure if it is by
design or a fault:
x = 'abdc'
x[-3:-3] -> ''
x[-3:-2] -> 'b'
x[-3:-1] -> 'bc'
x[-3: 0] -> ''
The one that actually bothers me here is the last one, I would have expected
it to yield 'bcd' instead, because otherwi
On Wednesday 20 May 2009, Chris Plasun wrote:
> I'm to develop console apps on a Linux embedded PowerPC board (Freescale
> MPC8313).
>
> Is there a Python release for the PowerPC platform?
This has pretty little to do with the development of the Python language
itself, so it is rather off topic h
On Saturday 24 October 2009, Christian Heimes wrote:
> Antoine Pitrou wrote:
> > * The unused file: thread_wince.h
> >
> > Windows CE has actually been using thread_nt.h since January 2009 (see
> > http://bugs.python.org/issue4893 ). thread_wince.h is still there, but
> > it's unused and grep bring
On Thursday 12 November 2009, Sriram Srinivasan wrote:
> I don't know if you have used Dev-C++. It has a 'package management'
> mechanism for the standard libraries.
I disagree. It has a package management system for libraries, not for the
standard libraries. The point is that the Python standard
On Tuesday 26 January 2010, Steve Howell wrote:
> Here are the benefits of an O(1) implementation.
[...]
> Did I leave anything out?
Good summary, Steve, thanks!
Anyway, you left two out:
* Inserting at the front gets the same complexity as inserting at the back.
* Inserting and erasing anywh
On Wednesday 04 August 2010, Rob Cliffe wrote:
> As it happens, what sparked the question was trying to determine in a
> platform-independent way whether a path consisted of a bare drive
> specification (e.g. "C:"). I guess
> os.path.splitdrive(MyPath)[1] == ""
> takes care of that.
"platform
On Wednesday 27 October 2010, Kristján Valur Jónsson wrote:
> Although 2.7 has the new buffer interface and memoryview objects, these are
> widely not accepted in the built in modules. Examples are the structmodule,
> some of the socketmodule apis, structmodule, etc.
>
> IMHO this is unfortunate.
On Thursday 11 November 2010, Hirokazu Yamamoto wrote:
> Is it possible to remove Win32 ANSI API (ie: GetFileAttributesA)
> and only use Win32 WIDE API (ie: GetFileAttributesW)?
> Mainly in posixmodule.c.
> I think we can simplify the code hugely.
+1
MS Windows variants that only support the ANSI
On Saturday 04 December 2010, Antoine Pitrou wrote:
> Perhaps SVN doesn't get timestamps right.
SVN doesn't touch timestamps explicitly, it just writes the files as they come
and the system gives them the timestamps. This also makes sense, because the
build system depends on them - you don't wan
On Thursday 10 March 2011, Sturla Molden wrote:
> As for InterlockedCompareExchange et al., MSDN says this: "The
> parameters for this function must be aligned on a 32-bit boundary;
bit != byte
Uli
**
Domino La
Hi!
This is a request for clarification for the thread "how to call a function for
evry 10 seconds" from the user mailinglist/newsgroup.
The gist is this:
1. On Linux/Python 2.6, time.sleep(-1.0) raises an IOError.
2. On MS Windows/Python 2.5 or 2.7 this sleeps forever. It seems that
convertin
On Thursday 30 June 2011, R. David Murray wrote:
> Please file a bug report at bugs.python.org.
Filed as bug #12459.
Uli
**
Domino Laser GmbH, Fangdieckstraße 75a, 22547 Hamburg, Deutschland
Geschäftsführer: Thor
On Monday 04 July 2011, Benjamin Peterson wrote:
> If someone's static analysis tool starts complaining about it, I'd be
> happy to consider adding an assert...
Here is one! To me an assertion is what actually documents that you don't
expect NULL in this context and that the missing check is not
Greetings!
I'm currently trying to assess the effort required for a CE port. I'm already
aware of the project at http://pythonce.sourceforge.net, but I find it a
waste of time to have two separate projects which then require syncing
changes back and forth.
Questions:
- What are the feelings to
On Wednesday 24 September 2008, Neal Norwitz wrote:
> In general, we try to ensure that there is an active maintainer,
> preferably more than one. As long as it doesn't make the code that
> much harder to maintain, it is desirable to support more platforms.
Actually, looking at the sources, there
On Thursday 25 September 2008, Martin v. Löwis wrote:
> > 1. TCHAR is always WCHAR
>
> Python shouldn't be using TCHAR at all; that getpathp uses it is
> misguided (IMO).
It already does, see below...
> > The first point is interesting to the desktop win32 variants because
> > everything since NT
On Friday 26 September 2008, Martin v. Löwis wrote:
> >> Please don't. Whether or not _UNICODE is defined should have no effect.
> >
> > Well, currently it does make a difference. Simple example: CreateFile().
>
> It's not so simple: Python doesn't actually call CreateFile, AFAICT
> (well, it does,
On Sunday 28 September 2008, Gregory P. Smith wrote:
> "broken" systems will always exist. Code to deal with them must be
> possible to write in python 3.0.
>
> since any given path (not just fs) can have its own encoding it makes
> the most sense to me to let the OS deal with the errors and not t
On Monday 29 September 2008, M.-A. Lemburg wrote:
> On 2008-09-29 12:50, Ulrich Eckhardt wrote:
> > 1. For POSIX platforms (using a byte string for the path):
> > Here, the first approach is to convert the path to Unicode, according to
> > the locale's CTYPE category. H
On Monday 29 September 2008, [EMAIL PROTECTED] wrote:
> Also, what about MacOS X?
AFAIK, OS X guarantees UTF-8 for filesystem encodings. So the OS also provides
Unicode filenames and how it deals with broken or legacy media is left up to
the OS.
Uli
--
Sator Laser GmbH
Geschäftsführer: Thors
Hi!
In trunk/PCbuild/readme.txt it says NASM is available from kernel.org. The
project has moved to Sourceforge though, please replace the link with
http://nasm.sf.net
Thanks!
Uli
--
Sator Laser GmbH
Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932
***
On Tuesday 30 September 2008, Martin v. Löwis wrote:
> Ulrich Eckhardt wrote:
> >>> Well, currently it does make a difference. Simple example:
> >>> CreateFile().
> >>
> >> It's not so simple: Python doesn't actually call CreateFile
> >
Hi!
I'm looking at trunk/Python/sysmodule.c, function PySys_SetArgv(). In that
function, there is code like this:
PyObject* path = PySys_GetObject("path");
...
if (path != NULL) {
...
}
My intuition says that if path==NULL, something is very wrong. At least I
would expect to get 'N
On Tuesday 30 September 2008, M.-A. Lemburg wrote:
> On 2008-09-30 08:00, Martin v. Löwis wrote:
> >> Change the default file system encoding to store bytes in Unicode is
> >> like introducing a new Python type: .
> >
> > Exactly. Seems like the best solution to me, despite your polemics.
>
> Not a
Hi!
Is it only me or does it fail for other people, too? I'm getting
| Server sent unexpected return value (503 Service
| Unavailable) in response to OPTIONS request
| for 'http://svn.python.org/projects/python/trunk'
Uli
--
Sator Laser GmbH
Geschäftsführer: Thorsten Föcking, Amtsgericht H
On Thursday 30 October 2008, Victor Stinner wrote:
> > One of the reasons why I'm very keen on us moving to a distributed
> > version control system is to help break the logjam on core developers.
>
> Yeah, exactly :-) Does anyone already maintain a distributed tree?
> Mercurial, GIT, anything else
On Friday 05 December 2008, [EMAIL PROTECTED] wrote:
> Filenames and environment variables would all need to be encoded or
> decoded according to this magic encoding.
Those, and commandline arguments, too.
Uli
--
Sator Laser GmbH
Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932
On Friday 05 December 2008, Adam Olsen wrote:
> Many of the windows APIs use UTF-16 without validating it. They'll
> pass through invalid strings until they hit something that does
> validate, at which point it'll blow up.
>
> I suspect that it doesn't happen very often in practice, as having
> on
On Friday 05 December 2008, Guido van Rossum wrote:
> At the risk of bringing up something that was already rejected, let me
> propose something that follows the path taken in 3.0 for filenames,
> rather than doubling back:
>
> For os.environ, os.getenv() and os.putenv(), I think a similar
> approa
On Friday 05 December 2008, James Y Knight wrote:
> On Dec 5, 2008, at 5:27 AM, Ulrich Eckhardt wrote:
> > Using the byte variant is equally fubar, because e.g. on MS Windows
> > it is not supported, except through a very lossy roundtrip through
> > the locale'
On Sunday 07 December 2008, Guido van Rossum wrote:
> My problem with raising exceptions *by default* when an undecodable
> name exists is that it may render an app completely useless in a
> situation where the developer is no longer around. This happened all
> the time with the 2.x Unicode API, wh
On Monday 08 December 2008, Adam Olsen wrote:
> At this point someone suggests we have a type that can store an
> arbitrary mix of unicode and bytes, so the undecodable portions stay
> in their original form. :P
Well, not an arbitrary mix, but a type that just stores whatever comes from
the syste
On Tuesday 09 December 2008, Adam Olsen wrote:
> On Tue, Dec 9, 2008 at 11:31 AM, Ulrich Eckhardt
>
> <[EMAIL PROTECTED]> wrote:
> > On Monday 08 December 2008, Adam Olsen wrote:
> >> At this point someone suggests we have a type that can store an
> >> arb
On Wednesday 10 December 2008, Adam Olsen wrote:
> On Wed, Dec 10, 2008 at 3:39 AM, Ulrich Eckhardt
>
> <[EMAIL PROTECTED]> wrote:
> > On Tuesday 09 December 2008, Adam Olsen wrote:
> >> The only thing separating this from a bikeshed discussion is that a
>
On Thursday 11 December 2008, Steve Holden wrote:
> Ulrich Eckhardt wrote:
> > What I'd just like some feedback on is the approach to return a distinct
> > type (neither a byte string nor a Unicode string) from readdir(). In
> > order to use this, a programmer will hav
On Thursday 11 December 2008, Steve Holden wrote:
> Ulrich Eckhardt wrote:
> > If readdir() returned Unicode text, people would start taking that for
> > granted. If it returned bytes, just the same. Returning a completely
> > unrelated type will give them enough hint that for
On Thursday 11 December 2008, Adam Olsen wrote:
> The simplest solution there is to have windows bytes APIs that return
> raw UTF-16 bytes (note that windows does NOT guaranteed to be valid
> unicode, despite being much more likely than on linux).
Actually, I'm not aware of this case. I only know
On Friday 12 December 2008, Stephen J. Turnbull wrote:
> I gather that the BFDL's line on this thread of discussion is that
> forcing programmers to think about encodings every time they call out
> to the OS is unacceptable
Exactly that is not necessary.
for n in os.readdir('.'):
f = open
On Friday 12 December 2008, Adam Olsen wrote:
> Only pages like this, which indicate the underlying API is an array of
> WCHAR:
>
> http://blogs.msdn.com/michkap/archive/2005/05/11/416552.aspx
Hmm, true. So even there, the encoding isn't known...
> char * is just fine. You need only pass a lengt
Hi!
I'm currently working again on the CE port, and since 2.6 and 3.0 are now out
of the door, could you apply the patches in #4075 & #4051? Both patches are
fairly isolated and easy to review and I'm pretty sure they won't cause any
inconveniences.
Note: this is far from everything that is ne
Hi!
There are lots of files that are framed with an extern "C" stanza when
compiled under C++. Now, I appreciate that header files are made suitable for
use with C++ with that, but WTF are those doing in .c files???
puzzled greetings
Uli
___
Python-D
On Friday 02 January 2009 06:17:24 Alexander Belopolsky wrote:
> Since that issue is closed, I have created
> http://bugs.python.org/issue4805 with a patch that restores C++
> compilability of the core and a few standard modules.
Looking at the patch, I see three main changes there:
1. Remove the
Hi!
I'm looking at NullImporter_init in import.c and especially at the call to
PyArg_ParseTuple there. What I'm wondering is what that call will do when I
call the function with a Unicode object. Will it convert the Unicode to a
char string first, will it return the Unicode object in a certain
Hi!
The function PyOS_GetLastModificationTime() is documented in sys.rst as taking
a "char*". However, in reality, it takes a "char*" and a "FILE*". Actually,
it should take a "char const*", as it doesn't and shouldn't modify the path.
Further, the normal version doesn't use the path at all, th
On Friday 02 January 2009 22:30:39 Ulrich Eckhardt wrote:
> The function PyOS_GetLastModificationTime() is documented in sys.rst as
> taking a "char*". However, in reality, it takes a "char*" and a "FILE*".
> Actually, it should take a "char const*&quo
On Friday 02 January 2009 23:18:04 Martin v. Löwis wrote:
> Correct me if I'm wrong: it seems that the function isn't called
> anymore. So I propose to just remove it (and the file it lives
> in).
Filed as issue #4817, including patch.
Uli
___
Python-De
On Saturday 03 January 2009 16:52:56 Victor Stinner wrote:
> > A little offtopic: it seems to me it is a flaw of svn, that it
> > encourages the model of two classes of developers, those with a commit
> > access (first class) and those without it (second class).
>
> Yes, that's the problem. Is it n
On Saturday 03 January 2009 17:21:16 Antoine Pitrou wrote:
> Ulrich Eckhardt knuut.de> writes:
> > saying "please merge r1234 from
> > foo into trunk" is much easier than downloading and applying a patch,
> > which doesn't even cover all possible change
On Saturday 03 January 2009 17:36:04 Martin v. Löwis wrote:
> > As far as your goal is concerned, couldn't you live with a branch where
> > you develop the feature?
>
> That still doesn't help the change getting merged into the trunk.
> Whether you store it in a patch file, in a DVCS, or in the ver
[sorry, dropped one pair of mails off the list, hence also the overquoting]
On Sunday 04 January 2009 01:07:08 Mark Hammond wrote:
> > > On 'normal' windows you generally would need to use
> > > WideCharToMultiByte() to get a 'char *' version of your wchar
> > > string but I expect you already kno
On Monday 05 January 2009 23:48:13 Malte Helmert wrote:
> For people who are not core developers but would still like to
> contribute, the Bug Days are quite exciting events. It would be great if
> they could keep going.
As a not core developer, I would like to know what exactly that means.
;)
U
Greetings!
MS Windows CE doesn't provide strdup(), so where should I put it? I guess I
should just compile in Python/strdup.c, right?
However, where should I declare it? My approach would be to declare it in
PC/pyconfig.h. I see that RISCOS also seems to lack that function, which is
why it is
On Wednesday 07 January 2009 16:30:23 Daniel Stutzbach wrote:
> On Wed, Jan 7, 2009 at 5:30 AM, Ulrich Eckhardt wrote:
> > MS Windows CE doesn't provide strdup(), so where should I put it? I guess
> > I should just compile in Python/strdup.c, right?
>
> I'm not
On Saturday 10 January 2009 12:29:47 Kristján Valur Jónsson wrote:
> Currently on Windows, Py_END_ALLOW_THREADS can have the side effect of
> resetting the windows error code returned by GetLastError(). There is a
> number of cases, particularly in posixmodule, with a pattern like:
> Py_BEGIN_ALLOW
On Saturday 10 January 2009 15:11:16 Martin v. Löwis wrote:
> > Well, that's what you get for using globals
>
> Please do take a look at the issue at hand before pointing fingers.
I'm really sorry if this sounded like I was accusing someone,
that was not my intention.
Uli
Hi!
Porting to MS Windows CE, I find that e.g. signals or environment vars are not
supported. How should I handle that? In particular, I'm talking about
PyOS_getsig() and PyOS_setsig(). Should I just #ifdef them out completely or
should I implement them by setting an error? Which error should I
Hi!
Just a short update on my porting issues. I tried various things in the
holidays/vacation, filed several bug reports, got a few patches applied and I
think the thing is taking shape now. However, I couldn't work on it for the
past two weeks since I'm just too swamped at work here. I haven't
On Sunday 25 January 2009, Luke Kenneth Casson Leighton wrote:
> matthieu, thank you for responding. from
> http://en.wikipedia.org/wiki/Dynamic-link_library:
>
> "Third, dynamic linking is inherently the wrong model for paged memory
> managed systems. Such systems work best with the idea that cod
Hi!
In callproc.c from trunk is a function called SetException(), which calls
FormatError() only to discard the contents. Can anyone enlighten me to the
reasons thereof? Is it just to check if the errorcode is registered in the
stringtables?
The reason I ask is the CE port. The FormatMessage A
On Monday 26 January 2009, Thomas Heller wrote:
> Ulrich Eckhardt schrieb:
> > In callproc.c from trunk is a function called SetException(), which calls
[...]
> > My third approach would be to filter out the special error codes first
> > and delegate all others to PyErr_Set
On Monday 26 January 2009, Martin v. Löwis wrote:
> > In callproc.c from trunk is a function called SetException(), which calls
> > FormatError() only to discard the contents. Can anyone enlighten me to
> > the reasons thereof?
>
> Interestingly enough, the code used to say
>
>PyErr_SetString(P
Am 07.01.2012 18:57, schrieb "Martin v. Löwis":
I just tried porting Python as a Metro (Windows 8) App, and failed.
Metro Apps use a variant of the Windows API called WinRT that still
allows to write native applications in C++, but restricts various APIs
to a subset of the full Win32 functionali
Am 31.10.2012 23:15, schrieb Steven D'Aprano:
On 01/11/12 06:57, anatoly techtonik wrote:
[...]
UnboundLocalError: local variable 'FONT_NAMES' referenced before
assignment
[...]
I wonder if this message can be improved with a
pointer to the concept on when global variables become local?
If y
Am 14.11.2012 10:12, schrieb Chris Withers:
Can someone with Python 3 handy compare there too?
C:\Python27\python -m timeit -n 100 -r 5 -v
"dict(a=1, b=2, c=3, d=4, e=5, f=6, g=7)"
raw times: 0.918 0.924 0.922 0.928 0.926
100 loops, best of 5: 0.918 usec per loop
C:\Python27\python
Am 03.12.2012 23:29, schrieb Larry Hastings:
[...autogen some code from special comment strings...]
/*[clinic]
dbm.open -> mapping
basename=dbmopen
const char *filename;
The filename to open.
const char *flags="r";
How to open the file. "r" for read
66 matches
Mail list logo