Lucas Raab <[EMAIL PROTECTED]> wrote:
> I am currently in the process of porting some C code into Python and am
> stuck. I don't claim to be the greatest C/C++ programmer; in fact, my
> skills at C are rudimentary at best. My question is I have the
> statement: "typedef unsigned long int word
Lucas Raab wrote:
I have the
statement: "typedef unsigned long int word32" and later on: "word32
b[3]" referencing the third bit of the integer.
If that's really exactly what you have, then you actually have
something defining an array of three unsigned long integers
named "b". And even if y
How does one query the python environment, ie pythonhome, pythonpath,
etc.
also, are there any HOWTO's on keeping multiple versions of python
happy?
--
http://mail.python.org/mailman/listinfo/python-list
gmane is great! its renaming of newsgroups is quite a headache.
i found that comp.lang.python corresponds to gmane.comp.python.general.
do you know which one corresponds to comp.lang.perl.misc?
there's no .misc or .general...
--
i thought there a strick like preceding a line by -- or something tha
Peter Hansen wrote:
but merely a "b[3]" reference somewhere, it would be referencing
the third element of an array called "b", which is possibly a byte,
"*Fourth* element... I'll come in again. Amongst our elements..."
-Peter
--
http://mail.python.org/mailman/listinfo/python-list
> hi all,
> i have question on how to design a module structure.
> for example, i have 3 files.
> [somewhere]/main.py
> [somewhere]/myLib/Base/BaseA.py
> [somewhere]/myLib/ClassA.py
>
> .
> It's fine when i run main.py.
> however when i run ClassA.py individually, it would fail in import
>
Yes, that's exactly what I needed!
Thanks alot!
-cpghost.
--
Cordula's Web. http://www.cordula.ws/
--
http://mail.python.org/mailman/listinfo/python-list
Nick Craig-Wood wrote:
> Alex Stapleton <[EMAIL PROTECTED]> wrote:
>> Whenever I run python I get
>>
>> "Warning! you are running an untested version of Python."
>>
>> prepended to the start of any output on stdout.
>>
>> This is with Debian and python 2.3 (running the debian 2.1 and 2.2
>>
DogWalker wrote:
> "Luis M. Gonzalez" <[EMAIL PROTECTED]> said:
>
> >[EMAIL PROTECTED] wrote:
> >> python.org = 194.109.137.226
> >>
> >> 194 + 109 + 137 + 226 = 666
> >>
> >> What is this website with such a demonic name and IP address?
What
> >> evils are the programmers who use this language up
Hi,
thanks for the information. But what I was really looking for was
informaion on when and why Python started doing it (previously, it always
used sys.getdefaultencoding())) and why it was done only for 'print' when
stdout is a terminal instead of always.
On Thu, 13 Jan 2005 14:33:20 -0800, Se
You should probably take a look at:
http://www.amk.ca/python/code/medusa
Larry Bates
Syscon, Inc.
Venkat B wrote:
Hi folks,
I'm looking build a CGI-capable SSL-enabled web-server around Python 2.4 on
Linux.
It is to handle ~25 hits possibly arriving "at once". Content is non-static
and built by th
I'm not sure if this is a real problem or if I have been staring at code
too long. given this code
#!/usr/bin/python
from ConfigParser import *
configuration_file = "test.conf"
substitution = {"xyzzy":"maze"}
configuration = SafeConfigParser()
configuration.readfp(file(configuration_file))
list
[EMAIL PROTECTED] (Martin Bless) writes:
> Now that I've got my extension building machine using the VC++ Toolkit
> 2003 up and running I'm keen on using Pyrex (Pyrex-0.9.3,
> Python-2.4.0).
>
> But the definition of the swig_sources() method seems to have changed.
>
> When I try to build the exam
Sort of hard to explain, but if you put another:
list = configuration.items("core")
print list
at the end of the script, you will find that the original config hasn't
been changed.
It is a quirk of how the items() method is implemented using 'yield'
that means that
you see what you do.
In partic
[EMAIL PROTECTED] wrote:
To avoid this, you need to write something like:
. list = []
. for key in configuration.options("core"):
. list.append((key,configuration.get("core",substitution))
. print list
This cause me problems for a different reason, ie., that user vars keys
appear in what ite
Hello. I was wondering if anyone has built a module that works with
urllib2 to upload file content via POST multipart/form-data. I'm
aware of ASPN 146306, however, I need to use urllib2 beacuse I'm
using HTTP Digest over SSL.
Cheers,
Clark
--
http://mail.python.org/mailman/listinfo/python-list
#
# My problem is that I want to create a
# class, but the variables aren't known
# all at once. So, I use a dictionary to
# store the values in temporarily.
# Then when I have a complete set, I want to
# init a class from that dictionary.
# However, I don't want to specify the
# dictionary gets by
> did you really do ./configure, make and make install?
No, I did python setup.py build and python setup.py install
> where is libpq.*
linpq is there in /usr/lib/python2.3/site-packages/pyPgSQL/
> was a postgres installation present while doing ./configure et all?
No, But I installed postgresql-
And now when I did...
cd /usr/local/lib/python2.3/site-packages/pyPgSQL/libpq/
[EMAIL PROTECTED] libpq]# python __init__.py
Traceback (most recent call last):
File "__init__.py", line 23, in ?
from libpq import *
ImportError: ./libpqmodule.so: undefined symbol: PyUnicodeUCS2_EncodeDecimal
True, wasn't thinking. This will affect get() as well. My problem was a
slightly different problem.
In your case you would have got what you wanted if get()/items()
instead of being implemented as:
.try:
.value = d[option]
.except KeyError:
.raise NoOptionE
I found that gDeskCal is also written in Python.
So if I have a theme used by gDesklets,
how can I make the whole thing standalone
so that it can be similar to the case of gDeskCal??
--
http://mail.python.org/mailman/listinfo/python-list
I am having trouble importing a module I created. I'm running PythonWin
on Windows XP if that helps. I saved my module in a folder called
my_scripts in the site-packages directory. I edited the python path to
include the my_scripts folder (it now reads
C:\Python23\Lib;C:\Python23\DLLs;C:\Python23\L
Hello everyone,
I started to use pickle to store the latest user settings for the tool
I wrote. It writes out a pickled text file when it terminates and it
restores the settings when it starts.
It worked very nicely.
However, I got a ValueError when I started the tool from Unix when I
previously
Open the file on windows for writing with "wb" mode, the b is for binary.
--
http://mail.python.org/mailman/listinfo/python-list
On Thu, Jan 13, 2005 at 12:19:49AM +0100, Fredrik Lundh wrote:
> Chris Lasher wrote:
>
> > Since the file I'm working with contains tens of thousands of these
> > records, I believe I need to find a way to hash this file such that I
> > can retrieve the respective sequence more quickly than I coul
Hi,
thank you all for your explanations.
That's really great and helps me a lot.
Thanks,
Torsten.
--
http://mail.python.org/mailman/listinfo/python-list
In <[EMAIL PROTECTED]>
On 2005-01-12 [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> python.org = 194.109.137.226
>
> 194 + 109 + 137 + 226 = 666
>
> What is this website with such a demonic name and IP address? What
> evils are the programmers who use this language up to?
What is the simplest/fa
On Thu, 13 Jan 2005 17:43:01 -0600, Jeff Epler <[EMAIL PROTECTED]> wrote:
>
>--LQksG6bCIzRHxTLp
>Content-Type: text/plain; charset=us-ascii
>Content-Disposition: inline
>Content-Transfer-Encoding: quoted-printable
>
>On Thu, Jan 13, 2005 at 11:04:21PM +, Bengt Richter wrote:
>> One way to do i
Bengt Richter wrote:
Problems? (Besides NIH, which I struggle with regularly, and had to overcome to
accept Tim's
starting point in this ;-)
The ideas regarding creating blocks whose name bindings affect a different scope
are certainly interesting (and relevant to the 'using' out-of-order executi
Antoon Pardon a écrit :
Well I find this a confusing behaviour on python's part. The fact
that instance.field can mean something different, depending on
where in a statement you find it, makes the behaviour inconsistent.
I know people in general here are against declarations, but declarations
could
Paul Rubin wrote:
Come on, that is vacuous. The claim was "expressions are not
statements". But it turns out that expressions ARE statements. The
explanation is "well, that's because they're expression statements".
And there is no obvious case of an expression that can't be used as a
statement.
test
--
http://mail.python.org/mailman/listinfo/python-list
Nick Coghlan <[EMAIL PROTECTED]> writes:
> So, precisely how should one go about cleanly embedding something that
> cares about whitespace into a context which doesn't care in the
> slightest?
Treat the macro like a function call whose arguments are thunks made
from the macro arguments, or somethi
[EMAIL PROTECTED] wrote:
t2 = Test(dictionary.get('a'), dictionary.get('b'),
dictionary.get('c'))
print t2
Try this:
t2 = Test(**dictionary)
This performs keyword argument expansion on the dictionary, matching the
dictionary entries with the named arguments to the Test.__init__ function.
Cheers,
201 - 234 of 234 matches
Mail list logo