"Vickram" wrote
I need help in translating a C++ code into python..
Can you help please?
The python result is wrong because I may have misread the C++ code
The C++ code is really just C code, there is virtualy no C++ stuff
there.
But that aside your translation is pretty faithful (too fait
Am 08.03.2011 20:00, schrieb Alan Gauld:
"Stefan Behnel" wrote
He doesn't have to write it, as it is very obvious, that no Python code
on earth (even written by Guido himself ;-)) stands a chance
compared to
Fortran or C. Look at this:
There is one big proviso. The C or Fortran needs to be w
The first hundred pages of a thorough python tutorial, and a c++
tutorial should have you doing both of those quite well in a day or
so.
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/
On Tue, Mar 8, 2011 at 6:38 PM, Vickram wrote:
> The python result is wrong because I may have misread the C++ code
Well, really, I suggest you read a tutorial on Python - you don't seem
to be getting a hang on the basics, for example, there's no need for
to use the float() function.
"Stefan Behnel" wrote
He doesn't have to write it, as it is very obvious, that no Python
code
on earth (even written by Guido himself ;-)) stands a chance
compared to
Fortran or C. Look at this:
There is one big proviso. The C or Fortran needs to be well written
It's seriously hard to wri
Hello
I need help in translating a C++ code into python..
Can you help please?
Please find attached the two codes.
The python result is wrong because I may have misread the C++ code
Thanks
Vickram
from mpmath import *
mp.dps=5
c = mpf('299792.458')
H0 = float(70) # Hub
Hi Joel,
I found this on stackoverflow*)
os.environ['PATH'] = os.path.dirname(__file__) + ';' + os.environ['PATH']
windll.LoadLibrary('mydll.dll')
It extends the directory list of the environment variable 'path'.
Now at least I've loaded the dll, but I still need to read up on ctypes an file
ha
On Tue, Mar 8, 2011 at 4:09 AM, ALAN GAULD wrote:
> > When I use os.chdir (by the way: why on earth isn't this called
> os.setcwd()??
> > That's consistent with os.getcwd())
>
> History.
> They are Unix commands (and possibly Multics/PDP before that!).
> cd has been the command in almost every CLI
Hi
I am receiving a string over a socket connection. The string may be
either line and value delimited ascii, or formated binary. The skeleton
of the code which handles the data is:
buffer = socket.recv(1000)
lines = buffer.split(linedelim)
for line in l
Alan Gauld, 08.03.2011 09:51:
"Knacktus" wrote
He doesn't have to write it, as it is very obvious, that no Python code
on earth (even written by Guido himself ;-)) stands a chance compared to
Fortran or C. Look at this:
There is one big proviso. The C or Fortran needs to be well written
in th
> When I use os.chdir (by the way: why on earth isn't this called os.setcwd()??
> That's consistent with os.getcwd())
History.
They are Unix commands (and possibly Multics/PDP before that!).
cd has been the command in almost every CLI OS I've ever used from
CP/M thru' OS/9, Unix, DOS, etc...
Hi all,
Thanks for your replies. It wasn't a permissions issue. Apparently, not the
full
path name should be used. When I use os.chdir (by the way: why on earth isn't
this called os.setcwd()?? That's consistent with os.getcwd()) and then use the
file name only, it works. See the Idle session b
"Knacktus" wrote
He doesn't have to write it, as it is very obvious, that no Python
code on earth (even written by Guido himself ;-)) stands a chance
compared to Fortran or C. Look at this:
There is one big proviso. The C or Fortran needs to be well written
in the first place. It's quite pos
Thanks, Sander. That was simple enough, as I'm learning I sometimes get
caught up in these all too silly mistakes.
Becky
On Mon, Mar 7, 2011 at 11:38 PM, Sander Sweers wrote:
> On Tue, 8 Mar 2011, 07:44:31 CET, Becky Mcquilling <
> ladymcse2...@gmail.com> wrote:
> > gpg = 'c:/program files (x
14 matches
Mail list logo