I saw the code below at stackoverflow. I have a little idea about the scope of
a class, and list comprehension and generator expressions, but still can't
figure out why Z4 works and Z5 not. Can someone explain it? (in a
not-too-complicated way:-)
class Foo():
XS = [15, 15, 15, 15]
Z4 =
I am doing a series of puzzles.
One of the puzzles has to do with a message embedded in an image.
I am not familiar with python can someone please help me.
Here is a link to the images and the code.
https://drive.google.com/open?id=1dg5jMFtkUvKzhxv_Fqe7QMI_5x-p_CIr
Thank you very much
Afriyie Abraham Kwabena writes:
> ...
> Thanks for the reply maybe I did not explain myself very well but is it
> possible to apply this scenario to a database server like MySQL where I can
> write some python code to post, get, delete, etc to the database? However the
> client (python code I h
oken. After the access, client can POST, GET, etc to the
> server for resources.
>
> Can anyone help me or give guidelines how I can achieve this using python?
> Am new in python (average) and need some guidelines or some links.
As Ben already has pointed out, you have various option
eb server (either
from scratch, or by plugging your code into some existing web server) to
listen for and respond to the HTTP requests.
Have you already chosen which web server will be receiving requests?
> Can anyone help me or give guidelines how I can achieve this using
> python?
The
server for resources.
Can anyone help me or give guidelines how I can achieve this using python?
Am new in python (average) and need some guidelines or some links.
BR
Abraham
--
https://mail.python.org/mailman/listinfo/python-list
;
> > System should perform below operations.
> > a. Reserve a ticket for a passenger.
> > b. List information all reservations done for today’s trains.
>
> We won't do your homework for you. Have a shot at writing it yourself
> first, and then if you need help, bring
On Nov 24, 2018 1:35 AM, wrote:
>
> hello all,
> please hepl me in the above program.
What do you mean by "the above program"? I don't see any.
python to implement Railway Reservation System using file handling
technique.
>
> System should perform below operations.
> a. Reserve a ticket for a p
On Saturday, 24 November 2018 14:33:29 UTC+8, jasmin amrutia wrote:
> hello all,
> please hepl me in the above program. python to implement Railway Reservation
> System using file handling technique.
>
> System should perform below operations.
> a. Reserve a ticket for a passenger.
> b. List in
rmation all reservations done for today’s trains.
We won't do your homework for you. Have a shot at writing it yourself
first, and then if you need help, bring specific questions to the
list.
ChrisA
--
https://mail.python.org/mailman/listinfo/python-list
hello all,
please hepl me in the above program. python to implement Railway Reservation
System using file handling technique.
System should perform below operations.
a. Reserve a ticket for a passenger.
b. List information all reservations done for today’s trains.
--
https://mail.python.org/mai
We would be glad to help. I can't tell from your question what kind of help
you need so please give us more information.
Have you tried to install python?
If so has the installation succeeded?
What do you mean by "open the programming"?
What have you tried?
What do yo
Sent from Mail for Windows 10
--
https://mail.python.org/mailman/listinfo/python-list
but nothing is
working. I want your help to sort out this issue.
From
Sourav Banik,
Dhaka,Bangladesh.
--
https://mail.python.org/mailman/listinfo/python-list
een reports of a recent update
breaking Windows 10 file associations. One such article reporting
this behavior:
https://www.howtogeek.com/fyi/microsoft-broke-windows-10s-file-associations-with-a-botched-update/
which refers to this Microsoft update:
https://support.microsoft.com/en-us/help/4462919/w
Hi, I'm afraid attachments are stripped out of e-mails sent to this list.
Anything you sent was not included, so you'll need to share them in some
other way if you'd like to ask for help.
On Wed, Nov 21, 2018 at 1:18 PM Sourav Banik wrote:
> Hello Python team,
> I'm us
but nothing is
working. I want your help to sort out this issue.
From
Sourav Banik,
Dhaka,Bangladesh.
--
https://mail.python.org/mailman/listinfo/python-list
*if any(roll != 1 and roll != 5 for roll in result):*
another extract of py's beauty!
Abdur-Rahmaan Janhangeer
https://github.com/Abdur-rahmaanJ
Mauritius
--
https://mail.python.org/mailman/listinfo/python-list
On 2018-10-06, eliteanarchyra...@gmail.com
wrote:
> Hi, I am new to python and would like someones help on the
> following:
>
> After rolling 5 dice and putting the results into a list, I
> need to check if any dice is not a 1 or 5.
if any(roll != 1 and roll != 5 for
result'")
# comments on using classes:
class Dice:
...
# no need for die1...die5 - use list comprehension:
alldice = [Dice(6) for i in range(5)]
# object is a bult-in type. it is inadvisable to assign to names of
built-ins
# as this makes the built-in unavailable. Look up
Well these worked like a charm. Cant say I understand some of them and will
have to look into utilizing them in the future, but I appreciate everyones
responses and thank you all. Never needed to check for multiple instances in a
list before.
Nice to have help!
--
https://mail.python.org
On Sat, 06 Oct 2018 21:56:09 +0200, Thomas Jollans wrote:
> On 06/10/2018 20:10, eliteanarchyra...@gmail.com wrote:
>> # - THIS LINE IS WHERE I NEED HELP # ( if 2, 3, 4, 6 in list:
>> )
>> print("you can roll again")
>> else:
>> pri
thing
-
Armand FOUCAULT
armand.fouca...@telecom-bretagne.eu
Message original
Objet**: Creating dice game : NEED HELP ON CHECKING ELEMENTS IN A LIST
De**: eliteanarchyra...@gmail.com
: python-list@python.org
Cc**:
Hi, I am new to python and would like someones
On 06/10/2018 20:10, eliteanarchyra...@gmail.com wrote:
# - THIS LINE IS WHERE I NEED HELP # ( if 2, 3, 4, 6 in list: )
print("you can roll again")
else:
print("you have all 1's and 5's in your result")
You can use a loop:
for good_number in
On 2018-10-06 19:10, eliteanarchyra...@gmail.com wrote:
Hi, I am new to python and would like someones help on the following:
After rolling 5 dice and putting the results into a list, I need to check if
any dice is not a 1 or 5.
if all dice in the list are either a 1 or 5 , I want to
Hi, I am new to python and would like someones help on the following:
After rolling 5 dice and putting the results into a list, I need to check if
any dice is not a 1 or 5.
if all dice in the list are either a 1 or 5 , I want to calculate a result.
if there is a 2,3,4 or 6 in the list i want to
Am 03.10.2018 um 09:34 schrieb Timothy Cowell via Python-list:
Could I please ask for help installing Python on Windows 10 - I've tried twice
(Version 3.7 for windows) selecting the install now option. After first attempt
I uninstalled and tried again.
Each time it has put 4 items i
Hi,
Could I please ask for help installing Python on Windows 10 - I've tried twice
(Version 3.7 for windows) selecting the install now option. After first attempt
I uninstalled and tried again.
Each time it has put 4 items in the programs list from the windows start
button, all
on / 2.0
>
> epsilon = 2 * epsilon
>
> help me!
>
This list is not here to solve every single step of what is
(presumably) your homework for you. Everything you present right here
is what I helped you with in "how to convert this psuedo code to
python".
You will have to at least try
Calculate the true, relative and approximate errors, and Relate the absolute
relative approximate error to the number of significant digits.
epsilon = 1
while epsilon + 1 > 1:
epsilon = epsilon / 2.0
epsilon = 2 * epsilon
help me!
--
*This email and any files transmitted with it
Thanks a lot.
On Thu, Sep 13, 2018 at 5:24 PM, MRAB wrote:
> On 2018-09-13 21:50, Jason Qian via Python-list wrote:
>
>> Hey,
>>
>> Need some help on PyList.
>>
>>
>> #get path
>> PyObject *path = PyObject_GetAttrString(sys, &q
On 2018-09-13 21:50, Jason Qian via Python-list wrote:
Hey,
Need some help on PyList.
#get path
PyObject *path = PyObject_GetAttrString(sys, "path");
#new user path
PyObject* newPath = PyUnicode_DecodeUTF8(userPath, strlen( userPath ),
errors);
#append newPath to path
PyList_A
Hey,
Need some help on PyList.
#get path
PyObject *path = PyObject_GetAttrString(sys, "path");
#new user path
PyObject* newPath = PyUnicode_DecodeUTF8(userPath, strlen( userPath ),
errors);
#append newPath to path
PyList_Append(path, newPath);
How to check if the newPath is alre
Thanks a lot, I've managed to make it work they way I wanted
--
https://mail.python.org/mailman/listinfo/python-list
On 07/09/18 13:55, catanaang...@gmail.com wrote:
HI! I need help putting the output from terminal in a csv file. I work on linux
and I have python 2.7.15. I am running a python program which also runs some
shell scripts.
I need to capture the output from the .sh scripts and put it nicely in a
;
{
"error" : {
"body" : "The requested device is currently not online.",
"detail" : "Make sure to connect the device",
"event" : 123456,
"header" : "Device Unavailable (123456)"
}
}
'
HI! I need help putting the output from terminal in a csv file. I work on linux
and I have python 2.7.15. I am running a python program which also runs some
shell scripts.
I need to capture the output from the .sh scripts and put it nicely in a csv
table. I am using "commands.getoutput(
On Sunday, September 2, 2018 at 1:12:17 AM UTC+8, moh...@gmail.com wrote:
> All,
>
> I m trying to run this small script to find the lowest of the given array of
> numbers. The script works fine for various combination of inputs but fails in
> a weird way for a particular set of inputs, can anyo
On Sat, 1 Sep 2018 10:11:59 -0700 (PDT), moha...@gmail.com wrote:
> All,
>
> I m trying to run this small script to find the lowest of the given
> array of numbers. The script works fine for various combination of
> inputs but fails in a weird way for a particular set of inputs, can
> anyone point
On 9/1/18 1:11 PM, moha...@gmail.com wrote:
All,
I m trying to run this small script to find the lowest of the given array of
numbers. The script works fine for various combination of inputs but fails in a
weird way for a particular set of inputs, can anyone point the mistake in the
script an
On Sat, Sep 1, 2018 at 1:26 PM duncan smith wrote:
>
> On 01/09/18 18:11, moha...@gmail.com wrote:
> > All,
> >
> > I m trying to run this small script to find the lowest of the given array
> > of numbers. The script works fine for various combination of inputs but
> > fails in a weird way for a
On 01/09/18 18:11, moha...@gmail.com wrote:
> All,
>
> I m trying to run this small script to find the lowest of the given array of
> numbers. The script works fine for various combination of inputs but fails in
> a weird way for a particular set of inputs, can anyone point the mistake in
> the
All,
I m trying to run this small script to find the lowest of the given array of
numbers. The script works fine for various combination of inputs but fails in a
weird way for a particular set of inputs, can anyone point the mistake in the
script and the behavior.
Script
x = input ("Enter the
it here I get "testing😀" ("testing" with a smiley face after it,
like I want), so I guess displaying it in the font is the problem, but I
don't know why.. as you can see, both the wxPython and the PyQt examples
use "Arial." I've also tried "FixedSys Excelsior 3.01".
Python version: CPython 2.7.14
OS: Windows 10
thanks for any help
--
https://mail.python.org/mailman/listinfo/python-list
On 03/07/2018 03:41, Terry Reedy wrote:
> On 7/2/2018 8:57 PM, Steven D'Aprano wrote:
>> On Fri, 29 Jun 2018 12:53:15 -0400, Terry Reedy wrote:
>>
>>> On 6/29/2018 6:14 AM, BlindAnagram wrote:
>>>> In Python 3.7.0 on Windows the help file (python370.chm) d
On 7/2/2018 8:57 PM, Steven D'Aprano wrote:
On Fri, 29 Jun 2018 12:53:15 -0400, Terry Reedy wrote:
On 6/29/2018 6:14 AM, BlindAnagram wrote:
In Python 3.7.0 on Windows the help file (python370.chm) displays with
a fixed line length and does not adjust its line length when the user
expand
On Fri, 29 Jun 2018 12:53:15 -0400, Terry Reedy wrote:
> On 6/29/2018 6:14 AM, BlindAnagram wrote:
>> In Python 3.7.0 on Windows the help file (python370.chm) displays with
>> a fixed line length and does not adjust its line length when the user
>> expands the help windo
BlindAnagram schreef op 30/06/2018 15:50:
On 30/06/2018 10:43, Steven D'Aprano wrote:
On Fri, 29 Jun 2018 12:53:15 -0400, Terry Reedy wrote:
On 6/29/2018 6:14 AM, BlindAnagram wrote:
In Python 3.7.0 on Windows the help file (python370.chm) displays with
a fixed line length and doe
On 30/06/2018 10:43, Steven D'Aprano wrote:
> On Fri, 29 Jun 2018 12:53:15 -0400, Terry Reedy wrote:
>
>> On 6/29/2018 6:14 AM, BlindAnagram wrote:
>>> In Python 3.7.0 on Windows the help file (python370.chm) displays with
>>> a fixed line length and does not a
On Fri, 29 Jun 2018 12:53:15 -0400, Terry Reedy wrote:
> On 6/29/2018 6:14 AM, BlindAnagram wrote:
>> In Python 3.7.0 on Windows the help file (python370.chm) displays with
>> a fixed line length and does not adjust its line length when the user
>> expands the help windo
On 29/06/2018 17:53, Terry Reedy wrote:
> On 6/29/2018 6:14 AM, BlindAnagram wrote:
>> In Python 3.7.0 on Windows the help file (python370.chm) displays with a
>> fixed line length and does not adjust its line length when the user
>> expands the help window horizontall
On 6/29/2018 6:14 AM, BlindAnagram wrote:
In Python 3.7.0 on Windows the help file (python370.chm) displays with a
fixed line length and does not adjust its line length when the user
expands the help window horizontally. This behaviour is different to
that of the Python 3.6 help file (python360
In Python 3.7.0 on Windows the help file (python370.chm) displays with a
fixed line length and does not adjust its line length when the user
expands the help window horizontally. This behaviour is different to
that of the Python 3.6 help file (python360.chm) which adjusts its text
to fit the
On 28/06/18 02:23, Andrew von Bevern wrote:
I have tried to install python on my home laptop several times, using 3.6
or 3.7. Each time I get the following error - anyone know what I am doing
wrong?
[image: image.png]
I'm sorry, but this mailing list removes attachments (for perfectly
sensible
text-only list, can you please copy paste the error?
thank you,
Abdur-Rahmaan Janhangeer
https://github.com/Abdur-rahmaanJ
>
--
https://mail.python.org/mailman/listinfo/python-list
I have tried to install python on my home laptop several times, using 3.6
or 3.7. Each time I get the following error - anyone know what I am doing
wrong?
[image: image.png]
thanks in advance
Andrew
--
https://mail.python.org/mailman/listinfo/python-list
I am trying to dynamically add a site-package to a script that is run as a cron
job. The method adduseristepackages does not seem to do anything.
import sys
import site
print('-')print(site.getusersitepackages())
print('add',
site.addusersitepackages('/home/erik/.local/l
ike us to try to guess?
The best way to get help is to COPY AND PASTE (do not re-type from
memory, do not paraphrase or summarise) the EXACT errors you are getting.
We need to know *exactly* what you are trying to do (if you are using
pip, copy and paste the EXACT pip command you are using, if
Hello,
This is vijayteja am getting an error like ssl certificate
failure when try to install packages. I've searched in the internet I've
not got any correct solution please maintain python's official blog which
contains all python issues and problems and how to solve them.
Thanks & Re
On 2018-04-27 21:04:49 -0700, Ed Manning wrote:
> Here is the source code.
>
>
> import re
>
>
> log = open("csg.txt", "r") # Opens a file call session.txt
> regex = re.compile(r'policy id \d+') # search for the policy ID
> regex1 = re.compile(r'log count \d+') # search for the policy ID
>
> f
Here is the source code.
import re
log = open("csg.txt", "r") # Opens a file call session.txt
regex = re.compile(r'policy id \d+') # search for the policy ID
regex1 = re.compile(r'log count \d+') # search for the policy ID
for match in log:
x = regex.findall(match)
y = regex1.findall(m
>
> Surprisingly, neither "setup.py" nor "setup.py --help" doesn't provide a
> list of options either, instead telling you how to show various metadata
> options which are not useful to end users of the software project, trying
> to build/install it.
>
&g
Frequently I have encountered projects packaged using setuptools, with a
setup.py. To find out how to install it, I usually turned to Stack Overflow
(https://stackoverflow.com/a/1472014) which doesn't explain what options
exist or do.
Surprisingly, neither "setup.py" nor "setu
On Mon, 05 Mar 2018 18:13:59 -0600, Peng Yu wrote:
> Hi,
>
>>>> import re
>>>> prog=re.compile('[a-f]+')
>>>> help(prog)
>
> I can use the above command to access SRE_Pattern. But this involves the
> creation of an object of the class
Hi,
>>> import re
>>> prog=re.compile('[a-f]+')
>>> help(prog)
I can use the above command to access SRE_Pattern. But this involves
the creation of an object of the class.
I tried to directly access the class. But it does not work. Does
anybody know if
I can not find an example with this function:
https://docs.scipy.org/doc/scipy/reference/generated/scipy.integrate.RK45.html#scipy.integrate.RK45.
--
https://mail.python.org/mailman/listinfo/python-list
On Thursday, March 1, 2018 at 5:37:28 AM UTC+5:30, Steven D'Aprano wrote:
> On Wed, 28 Feb 2018 09:58:24 -0800, Aktive wrote:
>
> > what the hell do you care about cheating..
> >
> > the world doest care about cheating.
> >
> > its about skill.
>
> Because cheaters don't have skill. That's why
On Wed, 28 Feb 2018 09:58:24 -0800, Aktive wrote:
> what the hell do you care about cheating..
>
> the world doest care about cheating.
>
> its about skill.
Because cheaters don't have skill. That's why they cheat.
> You guys been too much in school
Ah, spoken like a cheater.
--
Steve
On Wednesday, 28 February 2018 06:00:07 UTC+1, Lawrence D’Oliveiro wrote:
> On Wednesday, February 28, 2018 at 4:44:04 PM UTC+13, jlad...@itu.edu wrote:
> > This is part of the reason why interviews for software developer jobs
> > have gotten so crazy.
>
> This is why you need to have a CV that b
On Tuesday, February 27, 2018 at 12:56:52 PM UTC-6, Grant Edwards wrote:
[...]
> The fun part is giving them a solution that's so obscure and "clever"
> that it technically meets the stated requirement but is so far from
> what the instructor wanted that they don't get credit for it (and
> there's
On 02/27/2018 06:54 PM, Grant Edwards wrote:
> The fun part is giving them a solution that's so obscure and "clever"
> that it technically meets the stated requirement but is so far from
> what the instructor wanted that they don't get credit for it (and
> there's no way the student will be able
On Tuesday, February 27, 2018 at 10:56:52 AM UTC-8, Grant Edwards wrote:
> If the student is actively trying to avoid learning something, there's
> nothing you can do to help them. They're just wasting their own time
> and money.
This is part of the reason why interviews for
On 2018-02-26 07:17, Stefan Ram wrote:
Percival John Hackworth quoted:
Define 2 lists. The first one must contain the integer values 1, 2 and 3
a =[ 1, 2, 3 ]
and the second one the string values a, b and c.
b =[ 'a', 'b', 'c']
Iterate through both lists to create another list that
cont
worth
> the bother to engage.
Its worth the bother for the 5% who aren't *intentionally* cheating, but
don't realise it, and just need a reminder that they need to do the work
themselves. (Or at least give co-credit to those they got help from.) Or
those who aren't actually do
On Tue, Feb 27, 2018 at 2:50 PM, Andre Müller wrote:
> Hello,
>
> it's a duplicate:
> https://python-forum.io/Thread-Working-with-lists-homework-2
>
> I have seen this more than one time. We don't like it. You keep people busy
> with one question at different places.
You assume that it was posted
st1 = [str(i) + c for i in range(1,4) for c in letter[:3]]
list2 = [c[::-1] for c in list1]
But this won't help you. Before you understand the code above, you have to
understand for-loops and nested for-loops. Then you can proceed with list
comprehensions. But I don't see that your inten
blems and hands up the answer on a silver platter.
If the student is actively trying to avoid learning something, there's
nothing you can do to help them. They're just wasting their own time
and money.
The fun part is giving them a solution that's so obscure and "clever"
On 2018-02-26, sotaro...@gmail.com wrote:
>
> Help me !
a=[1,2,3,]
b=["a","b","c"]
x=[]
z=[]
bonus=[]
for digits in a:
for letters in b:
x.append(str(digits) + letters)
bonus.append(letters + str(digits))
for
On Tue, Feb 27, 2018 at 12:56 PM, Ian Kelly wrote:
> On Tue, Feb 27, 2018 at 10:16 AM, Igor Korot wrote:
>> Congratulations!
>> You have an "A" for solving the problem and "F" for helping the guy cheat.
>> You should be expelled from the course.
>
> In my experience, this is what happens pretty m
On Tue, Feb 27, 2018 at 10:16 AM, Igor Korot wrote:
> Congratulations!
> You have an "A" for solving the problem and "F" for helping the guy cheat.
> You should be expelled from the course.
In my experience, this is what happens pretty much every time.
Somebody posts a homework question asking fo
l possible combinations : [1a, a1, 1b,
>>b1, 1c, c1, 2a, a2, 2b, b2, 2c, c2, 3a, a3, 3b, b3, 3c, c3]
>>
>>Help me !
>
> #a list of integers
> nums = [1, 2, 3]
>
> #a list of letters
> ltrs = ['a', 'b', 'c']
>
> #a list to ho
e A and B
>elements. The final list should look like one of the 2 lists:
>1. [1a, 1b, 1c, 2a, 2b, 2c, 3a, 3b, 3c]
>2. [a1, a2. a3, b1, b2, b3, c1, c2, c3]
>BONUS: Make the final list contain all possible combinations : [1a, a1, 1b,
>b1, 1c, c1, 2a, a2, 2b, b2, 2c, c2, 3a, a3, 3b,
lements. The final list should look like one of the 2 lists:
> 1. [1a, 1b, 1c, 2a, 2b, 2c, 3a, 3b, 3c]
> 2. [a1, a2. a3, b1, b2, b3, c1, c2, c3]
> BONUS: Make the final list contain all possible combinations : [1a, a1,
> 1b, b1, 1c, c1, 2a, a2, 2b, b2, 2c, c2, 3a, a3, 3b, b3, 3c, c3]
>
e A and B
> elements. The final list should look like one of the 2 lists:
> 1. [1a, 1b, 1c, 2a, 2b, 2c, 3a, 3b, 3c]
> 2. [a1, a2. a3, b1, b2, b3, c1, c2, c3]
> BONUS: Make the final list contain all possible combinations : [1a, a1, 1b,
> b1, 1c, c1, 2a, a2, 2b, b2, 2c, c2, 3a, a3, 3b
Define 2 lists. ...
[...]
Help me !
Sounds like homework. Have you tried anything? Does it work?
--
https://mail.python.org/mailman/listinfo/python-list
Christian Gollwitzer wrote:
> Am 26.02.18 um 10:40 schrieb sotaro...@gmail.com:
>> Define 2 lists. The first one must contain the integer values 1, 2 and 3
>> and the second one the string values a, b and c. Iterate through both
>> lists to create another list that contains all the combinations of
Am 26.02.18 um 10:40 schrieb sotaro...@gmail.com:
Define 2 lists. The first one must contain the integer values 1, 2 and 3 and
the second one the string values a, b and c. Iterate through both lists to
create another list that contains all the combinations of the A and B elements.
The final li
, 1c, 2a, 2b, 2c, 3a, 3b, 3c]
2. [a1, a2. a3, b1, b2, b3, c1, c2, c3]
BONUS: Make the final list contain all possible combinations : [1a, a1, 1b, b1,
1c, c1, 2a, a2, 2b, b2, 2c, c2, 3a, a3, 3b, b3, 3c, c3]
Help me !
--
https://mail.python.org/mailman/listinfo/python-list
On 2/20/2018 7:59 PM, Ben Bacarisse wrote:
Lawrence D’Oliveiro writes:
On Wednesday, February 21, 2018 at 3:10:25 AM UTC+13, Ben Bacarisse wrote:
You almost never /have/ to use nested loops. Has the course got this
far without introducing the idea of a function?
If you are using a function
Lawrence D’Oliveiro writes:
> On Wednesday, February 21, 2018 at 3:10:25 AM UTC+13, Ben Bacarisse wrote:
>> You almost never /have/ to use nested loops. Has the course got this
>> far without introducing the idea of a function?
>
> If you are using a function to avoid a nested loop, perhaps that
Marc Cohen writes:
> USING PYTHON 2:
Why is that?
> Write a program to play this game. This may seem tricky, so break it
> down into parts. Like many programs, we have to use nested loops (one
> loop inside another). In the outermost loop, we want to keep playing
> until we are out of stones.
On Tuesday, February 20, 2018 at 5:08:49 AM UTC, Marc Cohen wrote:
> USING PYTHON 2:
>
> Write a program to play this game. This may seem tricky, so break it down
> into parts. Like many programs, we have to use nested loops (one loop inside
> another). In the outermost loop, we want to keep pla
USING PYTHON 2:
Write a program to play this game. This may seem tricky, so break it down into
parts. Like many programs, we have to use nested loops (one loop inside
another). In the outermost loop, we want to keep playing until we are out of
stones.
Inside that, we want to keep alternating p
Thanks a lot and I will take a look Cython,
On Mon, Feb 19, 2018 at 3:23 PM, Stefan Behnel wrote:
> Jason Qian via Python-list schrieb am 04.02.2018 um 17:52:
> >This is the case of calling python from c and the python function
> will
> > return a string.
>
> Hi Jason,
>
> I noticed that you
Jason Qian via Python-list schrieb am 04.02.2018 um 17:52:
>This is the case of calling python from c and the python function will
> return a string.
Hi Jason,
I noticed that you ran into a couple of problems using the C-API, so I
suggest looking into Cython instead. It basically translates
Jason Qian via Python-list writes:
> This only works when loading modules from the current directory.
> Is there a way I can load from somewhere else ?
Have a look at the module `importlib` and especially its function
`import_module`.
Python knows about two forms of "import": "absolute imp
Hi,
This only works when loading modules from the current directory.
Is there a way I can load from somewhere else ?
Thanks for help,
--
https://mail.python.org/mailman/listinfo/python-list
Hi Chris,
Thanks a lot ! Using PyUnicode_DecodeUTF8 fix the problem.
On Sun, Feb 4, 2018 at 12:02 PM, Chris Angelico wrote:
> On Mon, Feb 5, 2018 at 3:52 AM, Jason Qian via Python-list
> wrote:
> > Hi,
> >
> >This is the case of calling python from c and the python function
> will
> >
On Mon, Feb 5, 2018 at 3:52 AM, Jason Qian via Python-list
wrote:
> Hi,
>
>This is the case of calling python from c and the python function will
> return a string.
>
>It seems python been called correctly, but got error when convert the
> python string to c string.
>
> -- c --
>
>PyO
, "s", &sp)) {
}
and got
"SystemError: new style getargs format but argument is not a tuple"
Thanks for the help
--
https://mail.python.org/mailman/listinfo/python-list
601 - 700 of 11835 matches
Mail list logo