Am 09.02.17 um 18:16 schrieb Andreas Paeffgen:
> I guess which does not return an error code.
In fact, id does return a return code. Here an example:
| honk:~ gdie$ which bash; echo $?
| /bin/bash
| 0
| honk:~ gdie$ which wzlbrmpf; echo $?
| 1
It is 0 on success, 1 for a failure. Exactly the
twiz twiza...@gmail.com wrote:
I've been developing with python recreationally for a while on Ubuntu but will
soon be transitioning to full-time python development. I have the option of
using a Mac or Ubuntu environment and I'd like to hear any thoughts on the
pros and cons of each.
I've
Rakshith Nayak rnyk1...@gmail.com wrote:
Always wondered how sound is generated from text. Googling couldn't help. Devs
having knowledge about this could provide, the information, Links, URLs or
anything that could help.
Perhaps try 'text to speech' instead of 'text to sound'?
Best
terminato...@gmail.com wrote:
[...]
The def line has four spaces. The for line then has a hard tab.
This is ambiguous. If the hard tab is assumed to have a width of four
spaces, then they are at the same indentation level. If it is assumed
to have a width of eight spaces, then they are
Steve Simmons square.st...@gmail.com wrote:
html
head
meta http-equiv=content-type content=text/html; charset=ISO-8859-1
/head
body text=#00 bgcolor=#FF
font size=-1font face=Bitstream Vera SansFirst time post -
be gentle wifont size=-1th me :-)br
br
Manuel Pégourié-Gonnard m...@elzevir.fr wrote:
Hi,
I was looking at the example found here [1] which begins with:
[1] http://docs.python.org/py3k/library/imp.html#examples
def __import__(name, globals=None, locals=None, fromlist=None):
# Fast path: see if the module has already been
justmailha...@gmail.com wrote:
How to read properties file in Python? I found ConfigParser() but it has a
'section' limitation, so looking for other alternatives.
Have a look at PyYAML.
Best regards,
Günther
--
http://mail.python.org/mailman/listinfo/python-list
In article cdf072b2-7359-4417-b1e4-d984e4317...@googlegroups.com,
Νικόλαος Κούρας nikos.gr...@gmail.com wrote:
[...]
also it would be nice if datetime.datetime.now(GMT+2) can be used.
In news:mailman.774.1347735926.27098.python-l...@python.org, one of
the first answers to your question you
In article
46758542-1bd6-43fe-8e80-bcf14b7d8...@pi6g2000pbc.googlegroups.com,
sl33k ahsanbag...@gmail.com wrote:
I'm trying project euler problem 3 and I've hit the wall with this
error. What could be the problem here?
l=[]
num=600851475143
i=1
while i=num:
... if num%i==0:
...
Adam Funk a24...@ducksburg.com wrote:
Suppose I'm creating a class that represents a bearing or azimuth,
created either from a string of traditional bearing notation
(N24d30mE) or from a number indicating the angle in degrees as
usually measured in trigonometry (65.5, measured counter-clockwise
nukeymusic nukeymu...@gmail.com wrote:
I'm trying to calculate the difference in seconds between two
[...]
import datetime
date1 = datetime.datetime.strptime(Dec-13-09:47:12, %b-%d-%H:%M:%S)
date2 = datetime.datetime.strptime(Dec-13-09:47:39, %b-%d-%H:%M:%S)
delta = date2 - date1
In article mailman.252.1313818564.27778.python-l...@python.org,
Chris Rebert c...@rebertia.com wrote:
On Fri, Aug 19, 2011 at 1:02 PM, johnny.venter johnny.ven...@zoho.com wrote:
Hello, I am looking for the Python Windows Extensions to see if they can be
installed on a Mac.THanks.
Your
Manatee markrri...@aol.com wrote:
I have unpacked the PyVISA files into the Python/lib/site-packages dir
and from the IDLE GUI I get and error
import visa
Traceback (most recent call last):
File pyshell#25, line 1, in module
import visa
ImportError: No module named visa
There must be
Steven D'Aprano st...@remove-this-cybersource.com.au wrote:
I find myself having need of a class where the class scope is included in
the scope of methods in the class. A simple example from Python 3.1:
x = outside
class Magic:
x = inside
def method(self):
return x
I would
pyt...@bdurham.com wrote:
I have some very simple use cases[1] for adding some version control
capabilities to a product I'm working on. My product uses simple, text
(UTF-8) based scripts that are independent of one another. I would like
to version control these scripts on behalf of my users. By
rantingrick rantingr...@gmail.com wrote:
Another source of asininity seems to be the naming conventions of the
Python language proper! True/False start with an upper case and i
applaud this. However str, list, tuple, int, float --need i go
on...?-- start with lowercase.
Q: Well what the hell is
Gabriel Genellina gagsl-...@yahoo.com.ar wrote:
Try the strptime method with a suitable format, like this (untested):
delta = now2-now1
delta.strftime('%H:%M:%S.%f')
Throws an exception:
|Traceback (most recent call last):
| File stdin, line 1, in module
|AttributeError: 'datetime.timedelta'
Tycho Andersen ty...@tycho.ws wrote:
On Sat, May 8, 2010 at 3:41 PM, Oltmans rolf.oltm...@gmail.com wrote:
Hi, I've a list that looks like following
a = [ [1,2,3,4], [5,6,7,8] ]
Currently, I'm iterating through it like
for i in [k for k in a]:
for a in i:
print a
Hans Mulder han...@xs4all.nl wrote:
Did you try this:
print('%d%%' % (0.7 * 100))
70%
That method will always round down; TomF's method will round to
the nearest whole number:
print %d%% % (0.698 * 100)
69%
print {0:.0%}.format(.698)
70%
It was intended as a hint to this way of
vsoler vicente.so...@gmail.com wrote:
I'm trying to print .7 as 70%
I've tried:
print format(.7,'%%')
.7.format('%%')
but neither works. I don't know what the syntax is...
Did you try this:
print('%d%%' % (0.7 * 100))
70%
Best regards,
Günther
--
Tracubik affdfsdfds...@b.com wrote:
i want to print on linux console (terminal) a message like this one:
error message of variable lenght
to print the asterisks line i do this:
def StringOfAsterisks(myString):
Rotwang sg...@hotmail.co.uk wrote:
Check out http://docs.python.org/library/os.html and the function
chdir it is what you are looking for.
Thank you. So would adding
import os
os.chdir(path)
to site.py (or any other module which is automatically imported during
initialisation) change the
Jean Guillaume Pyraksos wis...@hotmail.com wrote:
What's the best one to use with beginners ?
Something with integrated syntax editor, browser of doc...
Thanks,
I started with 'EasyEclipse for Python', but soon changed to Eclipse
with PyDev, MercurialEclipse and AnyEditTools plugins installed
Ethos kevint...@gmail.com wrote:
I installed NumPy for python 2.6 on my leopard macbook, using the
nifty mac installer they now provide. I have the 2.6 official python
distro installed on my computer, in addition to the 2.5 that is native
on the mac. When I went to test out the installation, with
In article qqitt6-ke@spamfence.net,
Günther Dietrich gd_use...@spamfence.net wrote:
Since no py IDE I found has easy hg access.
Obviously, you didn't try Eclipse with PyDev (http://www.pydev.org)
and Mercurial Eclipse (http://www.vectrace.com/mercurialeclipse/)
plugins.
This combination
NiklasRTZ nikla...@gmail.com wrote:
Since no py IDE I found has easy hg access.
Obviously, you didn't try Eclipse with PyDev (http://www.pydev.org)
and Mercurial Eclipse (http://www.vectrace.com/mercurialeclipse/)
plugins.
This combination is also available stuffed into one package as
candide cand...@free.invalid wrote:
In C, we would manage this with the following statement :
fscanf(foo_file, Best score : %d, score);
Does Python provide an equivalent ?
RTFM! :)
In the python 2.5 manual: Chapter 4.2.6 (search pattern 'scanf' on the
index tab of python25.chm)
There are
zaur szp...@gmail.com wrote:
Python 2.6.2 (r262:71600, Apr 16 2009, 09:17:39)
[GCC 4.0.1 (Apple Computer, Inc. build 5250)] on darwin
Type copyright, credits or license() for more information.
a=1
x=[a]
id(a)==id(x[0])
True
a+=1
a
2
x[0]
1
I thought that += should only change the value of
Paul McGuire pt...@austin.rr.com wrote:
What exactly are you trying to do?
I think, he wants to kind of dereference the list element. So that he
can write
a += 1
instead of
long_name_of_a_list_which_contains_data[mnemonic_pointer_name] += 1
Regards,
Günther
--
LittleGrasshopper seattleha...@yahoo.com wrote:
With so many choices, I was wondering what editor is the one you
prefer when coding Python, and why.
[...]
So what do you guys use, and why? Hopefully we can keep this civil.
I found 'EasyEclipse for Python' soon after I began using Python. With
Krishnakant krm...@gmail.com wrote:
['money datatype' for database stored values]
What ist the real problem? Do you have problems converting results of
float calculations to the 'money datatype' before storing them in the
database, or do you want to avoid the precision issues which come with
Justin Rajewski jus...@embeddedmicro.com wrote:
I need to print variables out over serial, however I need them to not be
in ASCII, ie if the variable is 5 then print 5 not 5.
The function that writes to the serial port requires a string and I can
send non-variables out with the string /x05 for
ma mabdelka...@gmail.com wrote:
If I have this struct in C:
struct spam {
int ham;
char foo;
};
if I have this declaration:
struct spam s_;
If I wanted to pass a reference to a function of s_'s foo character, I
can do something like this:
somefunc(s_.foo)
How do I do the same thing
auzarski2...@gmail.com wrote:
I am using tab separated data in another file that looks like this...
appname1 leadername12005, 02, 022006, 02, 02
appname2 leadername22006, 03, 212007, 06, 28
etc...
The error message looks like this
back (most recent call last):
File
34 matches
Mail list logo