GithubHelp home page GithubHelp logo

python3's People

Contributors

matkuki avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

seaniatwix

python3's Issues

python3.nim(32, 27) Error: 'export' is only allowed at top level

I am getting this weird error when i try to compile my code (transpiled from the python wiki for interoping with C/C++)

import python3


proc spam_system*(self: PyObjectPtr, args: PyObjectPtr): static PyObjectPtr {.cdecl.} =
  var
    command: ptr char
    sts: int

  if PyArg_ParseTuple(args, "s", &command) == 0:
    return nil
  
  sts = system(command)
  return PyLong_FromLong(sts)

i have no clue why it does that.

Question about python object access

The main nim module has stringAsString for accessing a Python string as cstring. I notice this python3 module has equivalent for longAsLong, but I don't see stringAsString. Is there another mechanism for accessing a string that I'm missing?

Maintenance plans

I see this hasnt been updated in a while, are there any plans on updating it?

Error compiling

Tested a simple example and got the following error when compiling:

python3.nim(1577, 16) Error: undeclared identifier: 'PyUCS4'

Looking at the definition of PyUCS4 I can see the issue if I run this:

echo sizeof(int).`$`
echo sizeof(clong).`$`

Which outputs:

8
8

Question: can it be used for writing Python extension modules ?

Hello.

Can this wrapper be used for writing python extensions (which will be compiled to .so files, which are imported by Python) ?

(just like Cython does: it compiles to files, which can be imported as general Python modules)

Thank you.

Best regards,
Vladislav.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.