[Tutor] Fw: [docs] Fw: Embedding Python in Another Application Import Statement Bug

2019-07-08 Thread Ibarra, Jesse
I cannot seem to figure this potential bug out.

Please advise,

Jesse Ibarra



From: Julien Palard 
Sent: Sunday, July 7, 2019 2:02 PM
To: Ibarra, Jesse
Cc: d...@python.org
Subject: Re: [docs] Fw: Embedding Python in Another Application Import 
Statement Bug

Hi

> Is this ticket still unsolved?

I do not have a CentOS to try it. You can try on 
https://mail.python.org/mailman/listinfo/tutor list maybe, and if you resolve 
your issue and it happen to be documentation related, don't hesitate to let the 
docs@ list know.

Bests,
--
Julien Palard
https://mdk.fr

___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


[Tutor] Fw: [docs] Python Embedding PyImport_ImportModule

2019-07-08 Thread Ibarra, Jesse
I cannot seem to figure this potential bug out.

Please advise,

Jesse Ibarra



From: Julien Palard 
Sent: Sunday, July 7, 2019 2:04 PM
To: Ibarra, Jesse
Subject: Re: [docs] Python Embedding PyImport_ImportModule

Hi Jesse,

> Why does this code only print the result(array([ 1.,  1.,  1.,  1.,  1.])) 
> once, when I am calling the python code twice?

You're on a mailing list about Python documentation, not embedding support. 
Have you tried https://mail.python.org/mailman/listinfo/tutor?

Bests,
--
Julien Palard
https://mdk.fr

___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Fw: [docs] Python Embedding PyImport_ImportModule

2019-07-08 Thread Alan Gauld via Tutor
On 08/07/2019 15:14, Ibarra, Jesse wrote:
> I cannot seem to figure this potential bug out.

Neither can we since we cannot see any code.

You need to give us some context. What are you trying to do? What
libraries are you using? Which OS and Python versions?

Did you get ay errors? If so post them in their entirety.

But most of all post the code!


-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos


___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] pointers or references to variables or sub-sets of variables query.

2019-07-08 Thread David L Neil

On 8/07/19 10:54 AM, Alan Gauld via Tutor wrote:

On 07/07/2019 20:54, David L Neil wrote:


(However, some of us grew-up at a time when RAM was expensive and even
in our relaxed state, such 'costs' still impinge on our consciousness -


Indeed, my first computer was at the local university and had 64KB.
My second computer was a Sinclair ZX81 (Timex in the USA?) with 16K


Wow, go you! I could never cope with using analog tape decks as digital 
storage devices.


I've just decided to take a look at SBCs. I guess the 'splash' of news 
about the Raspberry Pi 4 contributed to that, and yet also contributes 
to my prevarication/procrastination...


My 'first' was at high school - an over-grown accounting machine. 
Paper-tape program-software, Teletype-style input and 'line-flow' 
output, and a magnetic drum for data-storage (and yes, I was computing 
physical locations in order to optimise response times - try that!)


At uni, we built Motorola D2 Kits - IIRC an 8-bit Motorola MC6800 
processor. Maybe a 6809 - or more likely, that was the one to which we 
aspired. Those who could 'afford' more hardware courses started building 
intelligent devices, eg embedding a microprocessor within a 'dumb 
terminal'/'green screen'. Intelligent devices, Internet of Things. Plus 
ça change!




My third, a CP/M machine with 64K and 256K RAM disk and dual
floppies - such luxury! :-)


Ah nostalgia.

One of my divertissements of that era (early-80s) was MP/M - a bus 
network of what were effectively single-board processors. It implemented 
my first 'computer lab' and we taught everything from COBOL to 
accounting software and word processing on it. Fantastic stuff in its day!
(interestingly, my SBC research last night, took me to a R.Pi device 
embodying exactly these concepts: 
https://www.notebookcheck.net/Raspberry-Pi-Combine-a-Raspberry-Pi-with-up-to-4-Raspberry-Pi-Zeros-for-less-than-US-50-with-the-Cluster-HAT.426998.0.html)




So I agree, it is hard to get out of that mode of thinking. But
today the minimum RAM is typically 4GB or more. My desktop
boxes all have 16GB and even my ancient Netbook has 4G.
My 20 year old iBook has 640M and even that is enough to
run Python with many thousands of data objects instantiated.


particularly temporary, DB tables into MySQL's MEMORY storage (and with
almost zero code-change/risk)!


Yes, I use SQLite's MEMORY facility reguilarly. Not for managing
high volumes but where I need flexible search capability.
A SQL SELECT statement is much more flexible and faster
than any Python search I could cobble together.


(appreciating that I have no difficulty moving from (Python) procedural
programming to (SQL) declarative, but many of our colleagues hate such,
and with a passion)


Yes, I've never quite understood why some programmers are
reluctant to use SQL. For complex structured data it is by far the
simplest approach and usually very efficient, especially with big
volumes. But simple searches on small datasets are easier (or as easy)
in native Python.


Agreed, but if we move beyond standard dict-s, into multi-keyed data 
structures - even with PSL and PyPI at our disposal, isn't it 
much-of-a-muchness to use MySQL/SQLite versus linked-lists or trees?

(or perhaps am showing too much bias from personal experience?)

The "reluctance" (good word!) is intriguing: (a) one more 
package/language to learn - yet such claimants might well have been the 
ones leaping into NoSQL a few years back; and (b) it is a different way 
of thinking - compare 'spaghetti' and monolithic code to "structured", 
procedural to OOP, OOP to 'functional'... I notice a similar likelihood 
to avoid HTML/CSS because of their 'declarative' approaches.


Hey, if you don't like the green ones, that's all the more Smarties/M&Ms 
for me!
(also, avoid the brown ones, they may be 'sheep pellets'/rabbit 
droppings...)

--
Regards =dn
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] pointers or references to variables or sub-sets of variables query.

2019-07-08 Thread bob gailer

Data = [

   ['2019-01-19','Fred Flintstone',23],
['2019-02-01','Scooby doo', 99]
]

Warning 3: age is not a fundamental attribute; it is a computed value!

--
Bob Gailer

___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Fw: [docs] Python Embedding PyImport_ImportModule

2019-07-08 Thread David
On Tue, 9 Jul 2019 at 03:13, Alan Gauld via Tutor  wrote:
> On 08/07/2019 15:14, Ibarra, Jesse wrote:
> >
> > I cannot seem to figure this potential bug out.
>
> Neither can we since we cannot see any code.

I'm guessing this might be the original post:
https://mail.python.org/pipermail/docs/2019-June/041177.html

And while trying to find that one, I noticed that Jesse asked
another question on a similar topic:
https://mail.python.org/pipermail/docs/2019-June/041109.html

The questions are about calling Python functions from C code.
So asking the docs mailing list isn't likely to produce useful responses.

It appears that some good advice on what would be the best place to
ask these questions is needed, can anyone here provide that
information?
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor