On 2015-06-16 01:24, sohcahto...@gmail.com wrote:
On Monday, June 15, 2015 at 4:57:53 PM UTC-7, Steven D'Aprano wrote:
I have a function in a module which is intended to be used by
importing that name alone, then used interactively:
from module import edir edir(args)
edir is an enhanced
On 2015-06-13 05:48, Malik Rumi wrote:
On Friday, June 12, 2015 at 3:31:36 PM UTC-5, Ian wrote:
On Fri, Jun 12, 2015 at 1:39 PM, Malik Rumi wrote:
I am trying to find a list of strings in a directory of files. Here is my
code:
# -*- coding: utf-8 -*-
import os
import fileinput
s2 =
On 2015-06-11 11:10, David Aldrich wrote:
Hi
I am fairly new to Python. I am writing some code that uses a
dictionary to store definitions of hardware registers. Here is a small
part of it:
import sys
register = {
'address' : 0x3001c,
'fields' : {
'FieldA' : {
On 2015-06-11 12:27, Skybuck Flying wrote:
Then again...
I also believe the highest goal for a programming language is natural
spoken language.
Natural language is full of ambiguities.
If self.somefield equals 10 then...
Does have some understandable ring to it.
However... time
On 2015-06-11 13:03, Adebayo Abraham wrote:
I am not requesting for a solution. I just need the question
explained. I am a beginner python developer and i do not know where
to start from to solve this problem. So anybody, somebody: please
explain this question. Am i to create a testcase or
On 2015-06-08 02:42, Chris Angelico wrote:
On Mon, Jun 8, 2015 at 11:34 AM, random...@fastmail.us wrote:
In general, as the number of trials increases, the probability of having
e.g. at least one of each value never _reaches_ 1, but it gets
arbitrarily close.
And by arbitrarily close, you
On 2015-06-06 23:03, Steve Burrus wrote:
I need some help/assistance with using the python import math function. Like
I am trying to do a = math.sqrt(1000)
a.sqrt
but it fails. what am I doing wrong? Thanx for anyone's help.
In what way does it fail?
If it printed an error
On 2015-06-03 21:41, Mohan Mohta wrote:
Hello
I am trying to create multiple thread through the below program but I am
getting an error
#! /usr/bin/python
import os
import subprocess
import thread
import threading
from thread import start_new_thread
def proc(f) :
com1=ssh -B
On 2015-06-03 17:15, Cecil Westerhof wrote:
Op Wednesday 3 Jun 2015 15:29 CEST schreef Chris Angelico:
On Wed, Jun 3, 2015 at 10:27 PM, Cecil Westerhof ce...@decebal.nl wrote:
def send_message(account_id, message, max_tries,
terminate_program): error_msg = 'Something went wrong with: ' +
On 2015-06-02 05:45, Skybuck Flying wrote:
Example for python:
MyString = Hello World
print MyString.rfind(World)
if MyString.rfind(World):
print yes
else:
print no
Pretty cool.
.rfind returns the index if found, -1 if not found.
World.rfind(World) returns 0, which will be treated as
On 2015-06-01 12:57, Marko Rauhamaa wrote:
Laura Creighton l...@openend.se:
Von Neumann recommended against floating-point numbers for the 1951
IAS machine, arguing that fixed-point arithmetic is preferable. I
agree, but, if John von Neumann couldn't win that argument, then there
is no way on
On 2015-06-01 05:37, Larry Hastings wrote:
On behalf of the Python development community and the Python 3.5 release
team, I'm relieved to announce the availability of Python 3.5.0b2.
Python 3.5.0b1 had a major regression (see
http://bugs.python.org/issue24285 for more information) and as such
On 2015-06-01 16:51, Laura Creighton wrote:
In a message of Mon, 01 Jun 2015 15:26:49 -, alister writes:
I don't think anyone programmed a Sinclair computer to use
pre-decimal currency, we converted to decimal in 1971 (although the
last pre-decimal coin did not go out of use untill 1993)
On 2015-06-01 21:57, Terry Reedy wrote:
On 6/1/2015 7:48 AM, MRAB wrote:
I've just run Windows x86 executable installer and Windows x86-64
executable installer.
While installing, the progress messages overwrote each other without
clearing the background each time.
I saw something like
On 2015-06-01 23:48, Mark Lawrence wrote:
On 01/06/2015 21:29, Tim Chase wrote:
Is Python supposed to support POSIX equivalence classes? I tried
the following in Py2 and Py3:
re.sub('[[=a=]]', 'A', 'aáàãâä', re.U)
'aáàãâä'
which suggests that it doesn't (I would have expected AA
On 2015-06-02 01:55, fl wrote:
On Sunday, May 31, 2015 at 9:46:56 PM UTC-7, fl wrote:
Hi,
When I search solution of reverse a string/number, I came across a short
function online:
def palindrome(num):
return str(num) == str(num)[::-1]
I thought that it is a general function. And
On 2015-05-29 01:03, IronManMark20 wrote:
Hello,
I have been working on a function that gets a bitmap of the thumbnail
for a file. I have had problems getting a large image (256x256) and I
was wondering if someone could help me on one object initialization
that is driving me nuts.
I have code
On 2015-05-28 00:51, Karthik Sharma wrote:
I tried modifying the program as follows as per your suggestion.Doesn't seem to
work.
import simplejson as json
import cjson
json_input = { msgType: 0,
tid: 1,
data: [{\Severity\:\warn\,\Subject\:\Reporting
On 2015-05-27 23:23, Karthik Sharma wrote:
I have the JSON structure shown below and the python code shown below to
manipulate the JSON structure.
import json
json_input = {
msgType: 0,
tid: 1,
data: [{\Severity\:\warn\,\Subject\:\Reporting
On 2015-05-27 21:01, Piyush Verma wrote:
Hi,
I'm facing traceback when using pudb python debugger to debug. Any help
to resolve it.
# python -m pudb file.py input
Traceback (most recent call last):
File /usr/lib/python2.7/runpy.py, line 162, in _run_module_as_main
__main__, fname,
On 2015-05-23 01:27, Benjamin Risher wrote:
First, the snippet provided is a contrived example of a much larger program.
http://pastebin.com/xRqBE5BY
(written in python3 with access to 3.4 if necessary)
The goal: To connect to a listening socket and send commands to the cmd.Cmd()
loop
On 2015-05-22 20:14, Laura Creighton wrote:
The first time you discover that in javascript typeof(null) is 'object' and
not 'null' you will scream. I wonder how many home versions of typeof
to replace the system one exist out in the wild?
I don't think that typeof(null) should be 'null'.
If
On 2015-05-22 17:29, Eric S. Johansson wrote:
2 needs. first is determining if NaturallySpeaking injects keycodes or
ascii char into the windows input queue. second is building a test
widget to capture and display text.
ASCII? :-)
I think I can solve both of these by building a simple text
On 2015-05-21 23:20, John Pote wrote:
Hi everyone.
I recently had the problem of converting from an integer to its
representation as a list of binary bits, each bit being an integer 1 or
0, and vice versa. E.G.
0x53
becomes
[ 0, 1, 0, 1, 0, 0, 1, 1 ]
This I wanted to do for integers of many
On 2015-05-21 14:34, bartc wrote:
On Thursday, 21 May 2015 06:19:39 UTC+1, Steven D'Aprano wrote:
On Wednesday 20 May 2015 19:56, Bartc wrote:
What you *shouldn't* do is implement your own argument convention,
(That's exactly what I did for my static language compiler which
generates x64
On 2015-05-21 17:31, Grant Edwards wrote:
On 2015-05-21, Chris Angelico ros...@gmail.com wrote:
On Fri, May 22, 2015 at 12:14 AM, Grant Edwards invalid@invalid.invalid wrote:
On 2015-05-21, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote:
import glob
On 2015-05-21 00:20, Daniel Gonçalves wrote:
When you decorate a function with contextmanager that didn't yield you got an
AttributeError instead of a proper RuntimeError generator didn't yield. For
example:
@contextlib.contextmanager
def foo():
... pass
...
with foo():
...
On 2015-05-19 23:23, Cecil Westerhof wrote:
Op Tuesday 19 May 2015 23:28 CEST schreef Jon Ribbens:
On 2015-05-19, Cecil Westerhof ce...@decebal.nl wrote:
It looks like that this does what I want (the dot is needed so that
it also works with 2.7): files = sorted(os.listdir('.')) p =
On 2015-05-16 01:43, BartC wrote:
On 15/05/2015 23:44, Marko Rauhamaa wrote:
BartC b...@freeuk.com:
What /is/ a method lookup? Is it when you have this:
A.B()
and need to find whether the expression A (or its class or type) has a
name B associated with it? (And it then needs to check
On 2015-05-14 22:55, BartC wrote:
On 14/05/2015 17:29, Marko Rauhamaa wrote:
BartC b...@freeuk.com:
That's a shame because I wanted to tinker with the main dispatcher
loop to try and find out what exactly is making it slow. Nothing that
seems obvious at first sight.
My guess is the main
On 2015-05-14 01:06, Ethan Furman wrote:
On 05/13/2015 04:24 PM, 20/20 Lab wrote:
I'm a beginner to python. Reading here and there. Written a couple of
short and simple programs to make life easier around the office.
That being said, I'm not even sure what I need to ask for. I've never
On 2015-05-12 23:43, Sayth Renshaw wrote:
why can't I filter a list based on an itertools condition using dropwhile?
This is the docs and the example.
https://docs.python.org/3/library/itertools.html#itertools.dropwhile
def less_than_10(x):
return x 10
itertools.takewhile(less_than_10,
On 2015-05-08 20:00, zljubisic...@gmail.com wrote:
The script is very simple (abc.txt exists in ROOTDIR directory):
import os
import shutil
ROOTDIR = 'C:\Users\zoran'
file1 = os.path.join(ROOTDIR, 'abc.txt')
file2 = os.path.join(ROOTDIR, 'def.txt')
shutil.move(file1, file2)
But it returns
On 2015-05-06 06:32, Kashif Rana wrote:
Hello guys
thanks for the feedback. I think its problem with excel itself, showing wrong
value. Because when I opened the csv file in text editor, I can see correct
value but opening in excel showing wrong value. What I can do to see correct in
excel
On 2015-05-05 18:09, Kashif Rana wrote:
Hello Experts
When I am writing list of dictionaries to CSV file, the key 'schedule' has
value 'Mar 2012' becomes Mar-12. I really do not have clue why thats happening.
Below is the code.
dic_1 = {'action': 'permit',
'dst-address':
On 2015-05-03 16:32, Jon Ribbens wrote:
On 2015-05-03, Chris Angelico ros...@gmail.com wrote:
On Mon, May 4, 2015 at 12:40 AM, Jon Ribbens
jon+use...@unequivocal.co.uk wrote:
If I have a string containing surrogate pairs like this in Python 3.4:
\udb40\udd9d
How do I convert it into the
On 2015-05-03 17:26, Jon Ribbens wrote:
On 2015-05-03, MRAB pyt...@mrabarnett.plus.com wrote:
On 2015-05-03 16:32, Jon Ribbens wrote:
That would, unfortunately, be tell the Unicode Consortium to format
their documents differently, which seems unlikely to happen. I'm
trying to read in: http
On 2015-05-02 22:06, Cecil Westerhof wrote:
Op Saturday 2 May 2015 22:17 CEST schreef Tim Chase:
[dangit, had Control down when I hit enter and it sent
prematurely]
On 2015-05-02 13:02, vasudevram wrote:
http://jugad2.blogspot.in/2015/05/can-python-data-structure-reference.html
On 2015-04-29 19:08, siva sankari R wrote:
file=open(input,r)
line=file.seek(7)
print line
The above code is supposed to print a line but it prints none. I don't know
where the mistake is. Help.!
'seek' will seek to position 7 in the file. It doesn't read. That's
what 'read' is for! :-)
--
On 2015-04-29 22:22, Emile van Sebille wrote:
On 4/29/2015 1:49 PM, Kashif Rana wrote:
pol_elements =
On 2015-04-18 18:50, D. Xenakis wrote:
This sounds like homework... what have you tried, and what happened?
heheh naaah no cheating here. I just provided the example this way to make as
clear as possible what I want to do. Return the returned value from a threaded
function.
apparently this
On 2015-04-12 23:49, Pippo wrote:
I have a text as follows:
#D{#C[Health] #P[Information] -
means any information, including #ST[genetic information],
whether #C[oral | (recorded in (any form | medium))], that
(1)#C[Is created or received by] a
#A[health care provider | health plan | public
On 2015-04-13 01:55, Pippo wrote:
On Sunday, 12 April 2015 20:46:19 UTC-4, Cameron Simpson wrote:
constraint = re.compile(r'(#C\[\w*\]'))
result = constraint.search(content[j],re.MULTILINE)
text.append(result)
print(text)
[...]
result is empty! Although it
On 2015-04-13 00:47, Pippo wrote:
On Sunday, 12 April 2015 19:44:05 UTC-4, Pippo wrote:
On Sunday, 12 April 2015 19:28:44 UTC-4, MRAB wrote:
On 2015-04-12 23:49, Pippo wrote:
I have a text as follows:
#D{#C[Health] #P[Information] -
means any information, including #ST[genetic
On 2015-04-13 01:25, Pippo wrote:
On Sunday, 12 April 2015 20:06:08 UTC-4, MRAB wrote:
On 2015-04-13 00:47, Pippo wrote:
On Sunday, 12 April 2015 19:44:05 UTC-4, Pippo wrote:
On Sunday, 12 April 2015 19:28:44 UTC-4, MRAB wrote:
On 2015-04-12 23:49, Pippo wrote:
I have a text
On 2015-04-09 16:21, Steven D'Aprano wrote:
On Fri, 10 Apr 2015 01:02 am, Chris Angelico wrote:
On Fri, Apr 10, 2015 at 12:53 AM, Alain Ketterlin
al...@dpt-info.u-strasbg.fr wrote:
Ouch, you're right, I tried to stick with Marko's example and forgot the
basics. I meant signed ints, but the
On 2015-04-08 15:28, Peter Otten wrote:
Mattias Ugelvik wrote:
Example: re.match('(?Pfirsta?)(?Psecondb?)', '')
How can I find out that the group 'first' correlates to the positional
regex group 1? I need to know this to resolve crucial ambiguities in a
string manipulation tool I'm making.
On 2015-04-07 15:36, jonas.thornv...@gmail.com wrote:
Den tisdag 7 april 2015 kl. 16:30:15 UTC+2 skrev Denis McMahon:
On Tue, 07 Apr 2015 09:29:59 -0400, Dave Angel wrote:
On 04/07/2015 05:44 AM, jonas.thornv...@gmail.com wrote:
I want todo faster baseconversion for very big bases like
On 2015-04-07 16:05, Grant Edwards wrote:
On 2015-04-07, Chris Angelico ros...@gmail.com wrote:
On Wed, Apr 8, 2015 at 12:36 AM, jonas.thornv...@gmail.com wrote:
Integers are internally assumed to be base 10 otherwise you could not
calculate without giving the base.
All operations on
On 2015-04-07 16:42, Hugo Caldas wrote:
Hi.
I want to connect to a serial port, read and write the port values with
multi threading and save them in random variables in python 3.4.
Where can I found information to do that?
Use the pyserial module.
The module is on PyPI:
On 2015-03-30 22:27, Karthik Sharma wrote:
I have the following python program to read a set of JSON files do some
processing on it and dump them back to the same folder. However When I run the
below program and then try to see the output of the JSON file using
`cat file.json | python -m
On 2015-03-25 22:36, Chris Angelico wrote:
On Thu, Mar 26, 2015 at 6:49 AM, Tiglath Suriol tiglathsur...@gmail.com wrote:
Two possibilities:
You are a moderator. If you are a moderator you are welcome to delete my
tests posts. This is of course improbably because this newsgroup is not
On 2015-03-18 23:22, PK Khatri wrote:
This script untars .gz file to file without extension
import gzip
import glob
import os.path
import tarfile
source_dir = C:\\TEST
dest_dir = C:\\TEST
for src_name in glob.glob(os.path.join(source_dir, '*.gz')):
base =
On 2015-03-18 02:41, Chris Kavanagh wrote:
I have a simple script that takes user input (for an Employee) such as
name, age, etc then puts in an sqlite3 database. The script worked fine
until I realized one problem. The age input field is defined in
SQLAlchemy as an Integer, so if a user inputs
On 2015-03-15 07:26, Dave Farrance wrote:
Mark Lawrence breamore...@yahoo.co.uk wrote:
http://pyfound.blogspot.co.uk/2015/03/bbc-launches-microbit.html may be
of interest to some of you.
Python is one of the three languages that work with the device.
That's cool, and the article says that
On 2015-03-13 16:05, Larry Martell wrote:
I need to remove all trailing zeros to the right of the decimal point,
but leave one zero if it's whole number. For example, if I have this:
On 2015-03-03 01:44, Mark Lawrence wrote:
On 03/03/2015 00:23, Sturla Molden wrote:
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote:
Variations in idiom and spelling are a good thing. They open our minds to
new possibilities, remind us that we aren't all the same, and keep life
On 2015-03-02 13:51, alb wrote:
Hi Steven,
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote:
[]
Since \r is an escape character, that will give you carriage return followed
by ef{fig:abc.
The solution to that is to either escape the backslash:
i = '\\ref{fig:abc}'
or use a raw
On 2015-03-02 14:08, Dave Angel wrote:
On 03/02/2015 08:51 AM, alb wrote:
Hi Steven,
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote:
[snip]
Oh, by the way, i is normally a terrible variable name for a string. Not
only doesn't it explain what the variable is for, but there is a
On 2015-03-02 04:49, Dave Angel wrote:
On 03/01/2015 08:59 PM, MRAB wrote:
On 2015-03-02 01:37, Dennis Lee Bieber wrote
You'd be able to run it on a TI99/4 (in which the BASIC interpreter,
itself, was run on an interpreter... nothing like taking the first
16-bit
home computer
On 2015-03-02 01:37, Dennis Lee Bieber wrote:
On Sun, 1 Mar 2015 13:43:50 +1100, Chris Angelico ros...@gmail.com
declaimed the following:
losing performance. Conversely, I'm sure Python could also have been
implemented on top of BASIC if someone felt like it, though what the
advantages might
On 2015-02-28 16:03, Cousin Stanley wrote:
From : Tim Chase
A quick google-and-tally for languages
and their corresponding number of keywords:
re-sorted
21 : Lua
31 : Python2.x
33 : Python3.x
33 : C
37 : Pike
40 : Perl
40 :
On 2015-02-27 16:45, alister wrote:
On Sat, 28 Feb 2015 03:12:16 +1100, Chris Angelico wrote:
On Sat, Feb 28, 2015 at 3:00 AM, alister
alister.nospam.w...@ntlworld.com wrote:
I think there is a case for bringing back the overlay file, or at least
loading larger programs in sections only
On 2015-02-26 15:23, Larry Martell wrote:
I have a host that has no access to the internet and I need to install
PIL on it. I have an identical host that is on the internet and I have
installed it there (with pip). Is there a way I can copy files from
the connected host to a flash drive and then
On 2015-02-25 20:45, Mark Lawrence wrote:
http://www.slideshare.net/pydanny/python-worst-practices
Any that should be added to this list? Any that be removed as not that bad?
We don't have numeric ZIP codes in the UK, but the entire world has
numeric telephone numbers, so that might be a
On 2015-02-25 22:59, Joel Goldstick wrote:
On Wed, Feb 25, 2015 at 4:28 PM, MRAB pyt...@mrabarnett.plus.com wrote:
On 2015-02-25 20:45, Mark Lawrence wrote:
http://www.slideshare.net/pydanny/python-worst-practices
Any that should be added to this list? Any that be removed
On 2015-02-24 21:40, Zachary Ware wrote:
On Tue, Feb 24, 2015 at 3:34 PM, Roy Smith r...@panix.com wrote:
http://envisage-project.eu/proving-android-java-and-python-sorting-algorithm-is-broken-and-how-to-fix-it/
http://bugs.python.org/issue23515
Note that the article does mention that Python
On 2015-02-21 00:16, ms.isma...@gmail.com wrote:
On Saturday, February 21, 2015 at 8:14:43 AM UTC+8, ms.is...@gmail.com wrote:
On Friday, February 20, 2015 at 4:41:57 PM UTC+8, Mark Lawrence wrote:
On 20/02/2015 08:24, ismaham...@gcuf.edu.pk wrote:
Would you please give your requests a
On 2015-02-21 00:20, ms.isma...@gmail.com wrote:
On Saturday, February 21, 2015 at 8:17:06 AM UTC+8, ms.is...@gmail.com wrote:
On Saturday, February 21, 2015 at 8:14:43 AM UTC+8, ms.is...@gmail.com wrote:
On Friday, February 20, 2015 at 4:41:57 PM UTC+8, Mark Lawrence wrote:
On 20/02/2015
On 2015-02-21 00:14, ms.isma...@gmail.com wrote:
On Friday, February 20, 2015 at 4:41:57 PM UTC+8, Mark Lawrence wrote:
On 20/02/2015 08:24, ismaham...@gcuf.edu.pk wrote:
Would you please give your requests a meaningful subject.
sir these errors whats mean by it
warning (from warnings
On 2015-02-18 02:14, candide wrote:
Le mercredi 18 février 2015 01:50:16 UTC+1, Chris Angelico a écrit :
So, what's a container? It's a thing that you put other objects
into.
I agree with this approach. The important point to consider here is
the last word in your definition : into. There is
On 2015-02-18 01:41, Dennis Lee Bieber wrote:
On Mon, 16 Feb 2015 22:02:33 -0500, Dave Angel da...@davea.name declaimed
the following:
It is a simple problem. All you have to do is send the correct bytes to
a file object that will transfer those bytes to the printer. It's been
a long time
On 2015-02-16 17:07, David Aldrich wrote:
Hi Peter
Thanks very much for your reply. I have added one more question below.
The straightforward approach is to pass a list or tuple:
def build(build_options=()):
subprocess_check_call((make,) + build_options)
build((flagA=true, flagB=true))
On 2015-02-12 17:35, Ian Kelly wrote:
On Thu, Feb 12, 2015 at 10:19 AM, Skip Montanaro
skip.montan...@gmail.com wrote:
I believe this sort of lexicographical comparison wart is one of the reasons
the Python-dev gang decided that there would be no micro versions 9. There
are too many similar
On 2015-02-12 12:34, charles.sart...@gmail.com wrote:
Hello there!
I`m trying to group by a list of Row() objects in 12days interval and sum().
values. Here is an example of the list
[Row(time=datetime.datetime(2013, 1, 1, 0, 0), sum=4676557380615),
Row(time=datetime.datetime(2013, 1, 2, 0,
On 2015-01-29 21:02, alb wrote:
Hi Peter,
Peter Otten __pete...@web.de wrote:
[]
def show2(self):
yield str(self)
for child in self.children:
yield from child.show2()
here is what I get:
SyntaxError: invalid syntax
debian@debian:example$ python3 export_latex.py
On 2015-01-29 23:25, Chris Kaynor wrote:
On Thu, Jan 29, 2015 at 2:57 PM, BartC b...@freeuk.com wrote:
[snip]
Putting in hints, (as as I implemented them using primitive types),
meant that functions and code no longer worked in a generic (or
polymorphic) manner. Code also changes, but the type
On 2015-01-28 13:22, luca72 wrote:
Hello i'm under windows, i have to write a file from my computer to a
local server like taht \\DOCUMENTALE\my_folder\.
How i have to proceed ?
That's a path to a folder that just happens to be on another computer on
your network. Treat it the same way you
On 2015-01-28 11:10, David Aldrich wrote:
Hi
I am just getting started with Python 3.3.3 and Kivy 1.8.
I am using the Kivy development environment on Windows (open a command prompt
and call kivy.bat).
With this minimal code:
import kivy
kivy.require('1.8.0')
from kivy.app import App
from
On 2015-01-25 18:23, Mario Figueiredo wrote:
Consider the following class:
class A:
def __init__(self, value):
self.value = value
def __del__(self):
print('A' instance being collected...)
def __repr__(self):
return
On 2015-01-26 00:32, Ben Finney wrote:
Johannes Bauer dfnsonfsdu...@gmx.de writes:
So, I would like to ask if you have a Pythonic approach to
backtracking problems? If so, I'd love to hear your solutions!
I'm not aware of what the problem is. “Back-tracking” doesn't have a
general meaning I
On 2015-01-24 19:55, Chris Angelico wrote:
On Sun, Jan 25, 2015 at 5:56 AM, Ethan Furman et...@stoneleaf.us wrote:
If the non-generic is what you're concerned about:
# not tested
dispatch_table_a = {}
dispatch_table_b = {}
dispatch_table_c = {}
class dispatch:
def __init__(self,
On 2015-01-23 01:15, Rick Johnson wrote:
Note: This is the closest you're going to get to a PEP from me!
Okay, i have found a solution to the type hinting problem
that will appease both sides. On one side we have those who
are proposing type hinting annotations within function sigs,
and on the
On 2015-01-22 20:23, Rick Johnson wrote:
On Thursday, January 22, 2015 at 4:32:04 AM UTC-6, Mario Figueiredo wrote:
Rick,
Python is the only thing that is pure in the programming
world. The only language that offers the cleanest and
most intuit-able syntax, AND YOURE JUST GOING TO THROW
IT
On 2015-01-20 00:12, Luke Tomaneng wrote:
I have been having a bit of trouble with the things mentioned in the title. I
have written the following script for a Codecademy course:
stock = {
banana: 6,
apple: 0,
orange: 32,
pear: 15
}
prices = {
banana: 4,
apple: 2,
On 2015-01-12 00:04, Mark Lawrence wrote:
On 11/01/2015 23:07, Thomas 'PointedEars' Lahn wrote:
Store Makhzan wrote:
I have this script which can calculate the total of numbers given in a
string […]
total = 0
for c in '0123456789':
total += int(c)
print total
[…]
How should I modify this
On 2015-01-05 14:27, Dariusz Mysior wrote:
I want search count of szukana in zmienna but code below counting all 12 letters from
traktorzysta word
szukana=t
zmienna=traktorzysta
def gen():
count=int(0)
for a in zmienna:
if szukana in zmienna:
count+=1
On 2015-01-02 10:21, Cameron Simpson wrote:
On 02Jan2015 10:00, Ervin Hegedüs airw...@gmail.com wrote:
On Thu, Jan 01, 2015 at 05:13:31PM -0600, Anthony Papillion wrote:
I have a function I'm writing to delete wildcarded files in a directory.
I tried this:
def unlinkFiles():
On 2014-12-31 19:33, Charles Hixson wrote:
In order to allow multiple processes to access a database (currently
SQLite) I want to run the process in a separate thread. Because it will
be accessed from multiple processes I intent to use Queues for shifting
messages back and forth. But none of
On 2014-12-30 22:45, Toni Bajer wrote:
When I try to run the Python 3.4.2 64-bit Installer on Windows 7 it gets
about 90% through and then a new box pops up with the following message...
There is a problem with this Windows Installer package. A program
required for this install to complete
On 2014-12-27 00:39, Juan Christian wrote:
I have the following test code:
import smtplib
fromaddr = 'mksfjnsfji4433j4...@bk.ru mailto:mksfjnsfji4433j4...@bk.ru'
toaddrs = ['mksfjnsfji4433j4...@bk.ru mailto:mksfjnsfji4433j4...@bk.ru']
msg = (From: %s\r\nTo: %s\r\n\r\n
% (fromaddr, ,
On 2014-12-24 00:42, fulga...@gmail.com wrote:
Hello,
I wrote this code (it was on a book)
class TableauNoir:
def __init__(self):
self.surface=
def ecrire(self, message_a_ecrire):
if self.surface != :
self.surface += \n
On 2014-12-22 18:51, Mark Lawrence wrote:
On 22/12/2014 16:23, Grant Edwards wrote:
On 2014-12-21, Roy Smith r...@panix.com wrote:
In article 54974ed7$0$12986$c3e8da3$54964...@news.astraweb.com,
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote:
Obviously you don't write
On 2014-12-23 01:03, sohcahto...@gmail.com wrote:
On Monday, December 22, 2014 4:56:13 PM UTC-8, Roy Smith wrote:
In article mailman.17133.1419276169.18130.python-l...@python.org,
Tim Chase python.l...@tim.thechases.com wrote:
On 2014-12-22 19:05, MRAB wrote:
On 2014-12-22 18:51, Mark
To: pengsir
On 2014-12-09 08:14, pengsir wrote:
My vps ip is x.y.z.w ,i want to download /etc/passwd from linux server
into my local window disk c: .
import paramiko
host = x.y.z.w
port = 22
transport = paramiko.Transport((host, port))
password = mykey
username = root
On 2014-12-09 08:14, pengsir wrote:
My vps ip is x.y.z.w ,i want to download /etc/passwd from linux server
into my local window disk c: .
import paramiko
host = x.y.z.w
port = 22
transport = paramiko.Transport((host, port))
password = mykey
username = root
transport.connect(username =
On 2014-12-08 23:58, Ben Finney wrote:
memilanuk memila...@gmail.com writes:
What I'm having trouble finding a concrete answer to is the difference
between:
(Note that where you write “some_func” the syntax requires an
expression, not a function. I've changed your examples to be clear).
On 2014-12-08 01:00, Chris Angelico wrote:
On Mon, Dec 8, 2014 at 11:45 AM, Roy Smith r...@panix.com wrote:
I take it as result, which makes plenty of sense to me.
OK, so spell it out. Three more keystrokes (well, plus another three
when you use it on the next line). And one of them is a
On 2014-11-29 09:31, Steven D'Aprano wrote:
MRAB wrote:
On 2014-11-29 01:30, Steven D'Aprano wrote:
[snip]
I stress that assertions aren't a replacement for unit testing, but they
compliment unit testing: assertions can help cover code missed by your
unit tests, and check that your unit tests
On 2014-11-29 01:30, Steven D'Aprano wrote:
[snip]
I stress that assertions aren't a replacement for unit testing, but they
compliment unit testing: assertions can help cover code missed by your unit
tests, and check that your unit tests are correct.
[snip]
I think you meant complement. :-)
1401 - 1500 of 4579 matches
Mail list logo